commit 569dbb88e80deb68974ef6fdd6a13edb9d686261 Author: Linus Torvalds Date: Sun Sep 3 13:56:17 2017 -0700 Linux 4.13 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e3b19d8165c2af2afee313c9b40eee55cf27a55 Merge: d0fa6ea 2c0e838 Author: Linus Torvalds Date: Sun Sep 3 09:50:26 2017 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "The two indirect syscall fixes have sat in linux-next for a few days. I did check back with a hardware designer to ensure a SYNC is really what's required for the GIC fix and so the GIC fix didn't make it into to linux-next in time for this final pull request. It builds in local build tests and passes Imagination's test system" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: irqchip: mips-gic: SYNC after enabling GIC region MIPS: Remove pt_regs adjustments in indirect syscall handler MIPS: seccomp: Fix indirect syscall args commit d0fa6ea10e438cfd4471ac196655fbb2c2b1329a Merge: 3b62dc6 fb1cc2f Author: Linus Torvalds Date: Sun Sep 3 09:35:21 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: - Expand the space for uncompressing as the LZ4 worst case does not fit into the currently reserved space - Validate boot parameters more strictly to prevent out of bound access in the decompressor/boot code - Fix off by one errors in get_segment_base() * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Prevent faulty bootparams.screeninfo from causing harm x86/boot: Provide more slack space during decompression x86/ldt: Fix off by one in get_segment_base() commit 3b62dc6c38d15592b46403d10684607d0038481f Merge: e92d51a 0bcdc09 Author: Linus Torvalds Date: Sun Sep 3 09:30:40 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single fix for a thinko in the raw timekeeper update which causes clock MONOTONIC_RAW to run with erratically increased frequency" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: time: Fix ktime_get_raw() incorrect base accumulation commit e92d51aff5068b96346a45e5118680b3bc3490c2 Merge: d0d6ab5 75e8387 Author: Linus Torvalds Date: Sun Sep 3 09:23:23 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: - Prevent a potential inconistency in the perf user space access which might lead to evading sanity checks. - Prevent perf recording function trace entries twice * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/ftrace: Fix double traces of perf on ftrace:function perf/core: Fix potential double-fetch bug commit d0d6ab53c9abd7dd1070f43a0455328874127ba8 Merge: 54f70f5 7e682f7 Author: Linus Torvalds Date: Fri Sep 1 20:57:27 2017 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs version warning fix from Steve French: "As requested, additional kernel warning messages to clarify the default dialect changes" [ There is still some discussion about exactly which version should be the new default. Longer-term we have auto-negotiation coming, but that's not there yet.. - Linus ] * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: Fix warning messages when mounting to older servers commit 54f70f52e3b3a26164220d98a712a274bd28502f Merge: f8c6d72 6f71a92 Author: Linus Torvalds Date: Fri Sep 1 17:16:40 2017 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A couple of late-arriving fixes before final 4.13: - A few reverts of DT bindings on Allwinner for their ethernet driver. Discussion didn't converge, and since bindings are considered ABI it makes sense to revert instead of having to support two bindings long-term. - A fix to enumerate GPIOs properly on Marvell Armada AP806" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: dts: marvell: fix number of GPIOs in Armada AP806 description arm: dts: sunxi: Revert EMAC changes arm64: dts: allwinner: Revert EMAC changes dt-bindings: net: Revert sun8i dwmac binding commit 6f71a925761e7843965a704eb6682ea337abb4a5 Merge: fabed5a a0ac89b Author: Olof Johansson Date: Fri Sep 1 16:37:02 2017 -0700 Merge tag 'mvebu-fixes-4.13-3' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.13 (part 3) Fix number of GPIOs in AP806 description for Armada 7K/8K * tag 'mvebu-fixes-4.13-3' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: fix number of GPIOs in Armada AP806 description Signed-off-by: Olof Johansson commit f8c6d7246a380fd8d13ebc3f7dac2495dc53db47 Merge: 138e4ad 231d069 Author: Linus Torvalds Date: Fri Sep 1 15:03:13 2017 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "The ismt driver had a problem with a rarely used transaction type and the designware driver was made even more robust against non standard ACPI tables" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: designware: Round down ACPI provided clk to nearest supported clk i2c: ismt: Return EMSGSIZE for block reads with bogus length i2c: ismt: Don't duplicate the receive length for block reads commit 138e4ad67afd5c6c318b056b4d17c17f2c0ca5c0 Author: Oleg Nesterov Date: Fri Sep 1 18:55:33 2017 +0200 epoll: fix race between ep_poll_callback(POLLFREE) and ep_free()/ep_remove() The race was introduced by me in commit 971316f0503a ("epoll: ep_unregister_pollwait() can use the freed pwq->whead"). I did not realize that nothing can protect eventpoll after ep_poll_callback() sets ->whead = NULL, only whead->lock can save us from the race with ep_free() or ep_remove(). Move ->whead = NULL to the end of ep_poll_callback() and add the necessary barriers. TODO: cleanup the ewake/EPOLLEXCLUSIVE logic, it was confusing even before this patch. Hopefully this explains use-after-free reported by syzcaller: BUG: KASAN: use-after-free in debug_spin_lock_before ... _raw_spin_lock_irqsave+0x4a/0x60 kernel/locking/spinlock.c:159 ep_poll_callback+0x29f/0xff0 fs/eventpoll.c:1148 this is spin_lock(eventpoll->lock), ... Freed by task 17774: ... kfree+0xe8/0x2c0 mm/slub.c:3883 ep_free+0x22c/0x2a0 fs/eventpoll.c:865 Fixes: 971316f0503a ("epoll: ep_unregister_pollwait() can use the freed pwq->whead") Reported-by: 范龙飞 Cc: stable@vger.kernel.org Signed-off-by: Oleg Nesterov Signed-off-by: Linus Torvalds fs/eventpoll.c | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) commit 8cf9f2a29ff1265a392e5b2461c69a9e53b4539f Merge: b8a78bb e8a732d Author: Linus Torvalds Date: Fri Sep 1 12:49:03 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix handling of pinned BPF map nodes in hash of maps, from Daniel Borkmann. 2) IPSEC ESP error paths leak memory, from Steffen Klassert. 3) We need an RCU grace period before freeing fib6_node objects, from Wei Wang. 4) Must check skb_put_padto() return value in HSR driver, from FLorian Fainelli. 5) Fix oops on PHY probe failure in ftgmac100 driver, from Andrew Jeffery. 6) Fix infinite loop in UDP queue when using SO_PEEK_OFF, from Eric Dumazet. 7) Use after free when tcf_chain_destroy() called multiple times, from Jiri Pirko. 8) Fix KSZ DSA tag layer multiple free of SKBS, from Florian Fainelli. 9) Fix leak of uninitialized memory in sctp_get_sctp_info(), inet_diag_msg_sctpladdrs_fill() and inet_diag_msg_sctpaddrs_fill(). From Stefano Brivio. 10) L2TP tunnel refcount fixes from Guillaume Nault. 11) Don't leak UDP secpath in udp_set_dev_scratch(), from Yossi Kauperman. 12) Revert a PHY layer change wrt. handling of PHY_HALTED state in phy_stop_machine(), it causes regressions for multiple people. From Florian Fainelli. 13) When packets are sent out of br0 we have to clear the offload_fwdq_mark value. 14) Several NULL pointer deref fixes in packet schedulers when their ->init() routine fails. From Nikolay Aleksandrov. 15) Aquantium devices cannot checksum offload correctly when the packet is <= 60 bytes. From Pavel Belous. 16) Fix vnet header access past end of buffer in AF_PACKET, from Benjamin Poirier. 17) Double free in probe error paths of nfp driver, from Dan Carpenter. 18) QOS capability not checked properly in DCB init paths of mlx5 driver, from Huy Nguyen. 19) Fix conflicts between firmware load failure and health_care timer in mlx5, also from Huy Nguyen. 20) Fix dangling page pointer when DMA mapping errors occur in mlx5, from Eran Ben ELisha. 21) ->ndo_setup_tc() in bnxt_en driver doesn't count rings properly, from Michael Chan. 22) Missing MSIX vector free in bnxt_en, also from Michael Chan. 23) Refcount leak in xfrm layer when using sk_policy, from Lorenzo Colitti. 24) Fix copy of uninitialized data in qlge driver, from Arnd Bergmann. 25) bpf_setsockopts() erroneously always returns -EINVAL even on success. Fix from Yuchung Cheng. 26) tipc_rcv() needs to linearize the SKB before parsing the inner headers, from Parthasarathy Bhuvaragan. 27) Fix deadlock between link status updates and link removal in netvsc driver, from Stephen Hemminger. 28) Missed locking of page fragment handling in ESP output, from Steffen Klassert. 29) Fix refcnt leak in ebpf congestion control code, from Sabrina Dubroca. 30) sxgbe_probe_config_dt() doesn't check devm_kzalloc()'s return value, from Christophe Jaillet. 31) Fix missing ipv6 rx_dst_cookie update when rx_dst is updated during early demux, from Paolo Abeni. 32) Several info leaks in xfrm_user layer, from Mathias Krause. 33) Fix out of bounds read in cxgb4 driver, from Stefano Brivio. 34) Properly propagate obsolete state of route upwards in ipv6 so that upper holders like xfrm can see it. From Xin Long. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (118 commits) udp: fix secpath leak bridge: switchdev: Clear forward mark when transmitting packet mlxsw: spectrum: Forbid linking to devices that have uppers wl1251: add a missing spin_lock_init() Revert "net: phy: Correctly process PHY_HALTED in phy_stop_machine()" net: dsa: bcm_sf2: Fix number of CFP entries for BCM7278 kcm: do not attach PF_KCM sockets to avoid deadlock sch_tbf: fix two null pointer dereferences on init failure sch_sfq: fix null pointer dereference on init failure sch_netem: avoid null pointer deref on init failure sch_fq_codel: avoid double free on init failure sch_cbq: fix null pointer dereferences on init failure sch_hfsc: fix null pointer deref and double free on init failure sch_hhf: fix null pointer dereference on init failure sch_multiq: fix double free on init failure sch_htb: fix crash on init failure net/mlx5e: Fix CQ moderation mode not set properly net/mlx5e: Fix inline header size for small packets net/mlx5: E-Switch, Unload the representors in the correct order net/mlx5e: Properly resolve TC offloaded ipv6 vxlan tunnel source address ... commit b8a78bb4d103b3ea069c4831081cb1ba17062a4b Merge: 3e1d79c8 dd2bc47 Author: Linus Torvalds Date: Fri Sep 1 12:46:30 2017 -0700 Merge tag 'ceph-for-4.13-rc8' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "ceph fscache page locking fix from Zheng, marked for stable" * tag 'ceph-for-4.13-rc8' of git://github.com/ceph/ceph-client: ceph: fix readpage from fscache commit 3e1d79c8111a6077ce2505559f4efaea758c05d2 Merge: d7e44b8 f5308d1 Author: Linus Torvalds Date: Fri Sep 1 10:43:37 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Just a couple drivers fixes (Synaptics PS/2, Xpad)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - fix PowerA init quirk for some gamepad models Input: synaptics - fix device info appearing different on reconnect commit d7e44b86a67fbf983fa6f2b9b2552e84c85589c0 Merge: 381cce5 99c14fc Author: Linus Torvalds Date: Fri Sep 1 10:41:02 2017 -0700 Merge tag 'mmc-v4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull two more MMC fixes from Ulf Hansson: "MMC core: - Fix block status codes MMC host: - sdhci-xenon: Fix SD bus voltage select" * tag 'mmc-v4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-xenon: add set_power callback mmc: block: Fix block status codes commit 381cce59a9d937d686f0b205fa2641499c81c6e6 Merge: bba2a5b 83b033b Author: Linus Torvalds Date: Fri Sep 1 10:38:00 2017 -0700 Merge tag 'sound-4.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Three regression fixes that should be addressed before the final release: a missing mutex call in OSS PCM emulation ioctl, ASoC rt5670 headset detection breakage, and a regression in simple-card parser code" * tag 'sound-4.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: simple_card_utils: fix fallback when "label" property isn't present ALSA: pcm: Fix power lock unbalance via OSS emulation ASoC: rt5670: Fix GPIO headset detection regression commit bba2a5b8221850418846d62887d5de311df335f9 Merge: a1c516a 0fdd49a Author: Linus Torvalds Date: Fri Sep 1 10:36:22 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Three more bug fixes for v4.13. The two memory management related fixes are quite new, they fix kernel crashes that can be triggered by user space. The third commit fixes a bug in the vfio ccw translation code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/mm: fix BUG_ON in crst_table_upgrade s390/mm: fork vs. 5 level page tabel vfio: ccw: fix bad ptr math for TIC cda translation commit a1c516a60a702630347e27c7beb7f2f44ca7a8b5 Merge: e89ce1f 445a582 Author: Linus Torvalds Date: Fri Sep 1 10:30:03 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes the following issues: - Regression in chacha20 handling of chunked input - Crash in algif_skcipher when used with async io - Potential bogus pointer dereference in lib/mpi" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_skcipher - only call put_page on referenced and used pages crypto: testmgr - add chunked test cases for chacha20 crypto: chacha20 - fix handling of chunked input lib/mpi: kunmap after finishing accessing buffer commit e8a732d1bc3ac313e22249c13a153c3fe54aa577 Author: Yossi Kuperman Date: Fri Sep 1 14:42:30 2017 +0200 udp: fix secpath leak After commit dce4551cb2ad ("udp: preserve head state for IP_CMSG_PASSSEC") we preserve the secpath for the whole skb lifecycle, but we also end up leaking a reference to it. We must clear the head state on skb reception, if secpath is present. Fixes: dce4551cb2ad ("udp: preserve head state for IP_CMSG_PASSSEC") Signed-off-by: Yossi Kuperman Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79e99bdd60b484af9afe0147e85a13e66d5c1cdb Author: Ido Schimmel Date: Fri Sep 1 12:22:25 2017 +0300 bridge: switchdev: Clear forward mark when transmitting packet Commit 6bc506b4fb06 ("bridge: switchdev: Add forward mark support for stacked devices") added the 'offload_fwd_mark' bit to the skb in order to allow drivers to indicate to the bridge driver that they already forwarded the packet in L2. In case the bit is set, before transmitting the packet from each port, the port's mark is compared with the mark stored in the skb's control block. If both marks are equal, we know the packet arrived from a switch device that already forwarded the packet and it's not re-transmitted. However, if the packet is transmitted from the bridge device itself (e.g., br0), we should clear the 'offload_fwd_mark' bit as the mark stored in the skb's control block isn't valid. This scenario can happen in rare cases where a packet was trapped during L3 forwarding and forwarded by the kernel to a bridge device. Fixes: 6bc506b4fb06 ("bridge: switchdev: Add forward mark support for stacked devices") Signed-off-by: Ido Schimmel Reported-by: Yotam Gigi Tested-by: Yotam Gigi Reviewed-by: Jiri Pirko Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_device.c | 3 +++ 1 file changed, 3 insertions(+) commit 25cc72a33835ed8a6f53180a822cadab855852ac Author: Ido Schimmel Date: Fri Sep 1 10:52:31 2017 +0200 mlxsw: spectrum: Forbid linking to devices that have uppers The mlxsw driver relies on NETDEV_CHANGEUPPER events to configure the device in case a port is enslaved to a master netdev such as bridge or bond. Since the driver ignores events unrelated to its ports and their uppers, it's possible to engineer situations in which the device's data path differs from the kernel's. One example to such a situation is when a port is enslaved to a bond that is already enslaved to a bridge. When the bond was enslaved the driver ignored the event - as the bond wasn't one of its uppers - and therefore a bridge port instance isn't created in the device. Until such configurations are supported forbid them by checking that the upper device doesn't have uppers of its own. Fixes: 0d65fc13042f ("mlxsw: spectrum: Implement LAG port join/leave") Signed-off-by: Ido Schimmel Reported-by: Nogah Frankel Tested-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ++++++ include/linux/netdevice.h | 2 ++ net/core/dev.c | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) commit 7e682f766f289887c5cbf7c0a1e4970103f01ac4 Author: Steve French Date: Thu Aug 31 21:34:24 2017 -0500 Fix warning messages when mounting to older servers When mounting to older servers, such as Windows XP (or even Windows 7), the limited error messages that can be passed back to user space can get confusing since the default dialect has changed from SMB1 (CIFS) to more secure SMB3 dialect. Log additional information when the user chooses to use the default dialects and when the server does not support the dialect requested. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg Acked-by: Pavel Shilovsky fs/cifs/connect.c | 22 +++++++++++++++++++++- fs/cifs/smb2pdu.c | 7 ++++++- 2 files changed, 27 insertions(+), 2 deletions(-) commit e89ce1f89f62c7e527db3850a91dab3389772af3 Merge: 501d9f7 6e3c152 Author: Linus Torvalds Date: Thu Aug 31 18:45:04 2017 -0700 Merge tag 'cifs-fixes-for-4.13-rc7-and-stable' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Two cifs bug fixes for stable" * tag 'cifs-fixes-for-4.13-rc7-and-stable' of git://git.samba.org/sfrench/cifs-2.6: CIFS: remove endian related sparse warning CIFS: Fix maximum SMB2 header size commit 501d9f79451aff460c3b50c73706494d7ba82d72 Merge: 73adb8c 7ef10f3 Author: Linus Torvalds Date: Thu Aug 31 18:42:21 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Unfortunately a few issues that warrant sending another pull request, even if I had hoped to avoid it. This contains: - A fix for multiqueue xen-blkback, on tear down / disconnect. - A few fixups for NVMe, including a wrong bit definition, fix for host memory buffers, and an nvme rdma page size fix" * 'for-linus' of git://git.kernel.dk/linux-block: nvme: fix the definition of the doorbell buffer config support bit nvme-pci: use dma memory for the host memory buffer descriptors nvme-rdma: default MR page size to 4k xen-blkback: stop blkback thread of every queue in xen_blkif_disconnect commit 73adb8c5b0ea15e3942ab5781eb3e72d4e028ada Merge: 1b2614f 1c23484 Author: Linus Torvalds Date: Thu Aug 31 18:39:19 2017 -0700 Merge tag 'for-4.13/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - A couple fixes for bugs introduced as part of the blk_status_t block layer changes during the 4.13 merge window - A printk throttling fix to use discrete rate limiting state for each DM log level - A stable@ fix for DM multipath that delays request requeueing to avoid CPU lockup if/when the request queue is "dying" * tag 'for-4.13/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm mpath: do not lock up a CPU with requeuing activity dm: fix printk() rate limiting code dm mpath: retry BLK_STS_RESOURCE errors dm: fix the second dec_pending() argument in __split_and_process_bio() commit 1b2614f1dd687d79d413cf34f69b003bbe385709 Merge: ea25c43 e661869 Author: Linus Torvalds Date: Thu Aug 31 17:56:56 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge more fixes from Andrew Morton: "6 fixes" * emailed patches from Andrew Morton : scripts/dtc: fix '%zx' warning include/linux/compiler.h: don't perform compiletime_assert with -O0 mm, madvise: ensure poisoned pages are removed from per-cpu lists mm, uprobes: fix multiple free of ->uprobes_state.xol_area kernel/kthread.c: kthread_worker: don't hog the cpu mm,page_alloc: don't call __node_reclaim() with oom_lock held. commit ea25c43179462e342d4a0e66c3f6a5f53514da05 Merge: c227390 5f32b26 Author: Linus Torvalds Date: Thu Aug 31 17:30:01 2017 -0700 Merge branch 'mmu_notifier_fixes' Merge mmu_notifier fixes from Jérôme Glisse: "The invalidate_page callback suffered from 2 pitfalls. First it used to happen after page table lock was release and thus a new page might have been setup for the virtual address before the call to invalidate_page(). This is in a weird way fixed by commit c7ab0d2fdc84 ("mm: convert try_to_unmap_one() to use page_vma_mapped_walk()") which moved the callback under the page table lock. Which also broke several existing user of the mmu_notifier API that assumed they could sleep inside this callback. The second pitfall was invalidate_page being the only callback not taking a range of address in respect to invalidation but was giving an address and a page. Lot of the callback implementer assumed this could never be THP and thus failed to invalidate the appropriate range for THP pages. By killing this callback we unify the mmu_notifier callback API to always take a virtual address range as input. There is now two clear API (I am not mentioning the youngess API which is seldomly used): - invalidate_range_start()/end() callback (which allow you to sleep) - invalidate_range() where you can not sleep but happen right after page table update under page table lock Note that a lot of existing user feels broken in respect to range_start/ range_end. Many user only have range_start() callback but there is nothing preventing them to undo what was invalidated in their range_start() callback after it returns but before any CPU page table update take place. The code pattern use in kvm or umem odp is an example on how to properly avoid such race. In a nutshell use some kind of sequence number and active range invalidation counter to block anything that might undo what the range_start() callback did. If you do not care about keeping fully in sync with CPU page table (ie you can live with CPU page table pointing to new different page for a given virtual address) then you can take a reference on the pages inside the range_start callback and drop it in range_end or when your driver is done with those pages. Last alternative is to use invalidate_range() if you can do invalidation without sleeping as invalidate_range() callback happens under the CPU page table spinlock right after the page table is updated. The first two patches convert existing mmu_notifier_invalidate_page() calls to mmu_notifier_invalidate_range() and bracket those call with call to mmu_notifier_invalidate_range_start()/end(). The next ten patches remove existing invalidate_page() callback as it can no longer happen. Finally the last page remove the invalidate_page() callback completely so it can RIP. Changes since v1: - remove more dead code in kvm (no testing impact) - more accurate end address computation (patch 2) in page_mkclean_one and try_to_unmap_one - added tested-by/reviewed-by gotten so far" * emailed patches from Jérôme Glisse : mm/mmu_notifier: kill invalidate_page KVM: update to new mmu_notifier semantic v2 xen/gntdev: update to new mmu_notifier semantic sgi-gru: update to new mmu_notifier semantic misc/mic/scif: update to new mmu_notifier semantic iommu/intel: update to new mmu_notifier semantic iommu/amd: update to new mmu_notifier semantic IB/hfi1: update to new mmu_notifier semantic IB/umem: update to new mmu_notifier semantic drm/amdgpu: update to new mmu_notifier semantic powerpc/powernv: update to new mmu_notifier semantic mm/rmap: update to new mmu_notifier semantic v2 dax: update to new mmu_notifier semantic commit c227390c91a355300f47f9bef0aefbdfaaca1500 Author: Dave Kleikamp Date: Thu Aug 31 16:46:59 2017 -0500 jfs should use MAX_LFS_FILESIZE when calculating s_maxbytes jfs had previously avoided the use of MAX_LFS_FILESIZE because it hadn't accounted for the whole 32-bit index range on 32-bit systems. That has been fixed by commit 0cc3b0ec23ce ("Clarify (and fix) MAX_LFS_FILESIZE macros"), so we can simplify the code now. Suggested by Andreas Dilger. Signed-off-by: Dave Kleikamp Reviewed-by: Andreas Dilger Cc: jfs-discussion@lists.sourceforge.net Signed-off-by: Linus Torvalds fs/jfs/super.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit e66186920bff278b18ebe460c710c7b0e0cfdf6e Author: Russell King Date: Thu Aug 31 16:15:36 2017 -0700 scripts/dtc: fix '%zx' warning dtc uses an incorrect format specifier for printing a uint64_t value. uint64_t may be either 'unsigned long' or 'unsigned long long' depending on the host architecture. Fix this by using %llx and casting to unsigned long long, which ensures that we always have a wide enough variable to print 64 bits of hex. HOSTCC scripts/dtc/checks.o scripts/dtc/checks.c: In function 'check_simple_bus_reg': scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=] snprintf(unit_addr, sizeof(unit_addr), "%zx", reg); ^ scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=] Link: http://lkml.kernel.org/r/20170829222034.GJ20805@n2100.armlinux.org.uk Fixes: 828d4cdd012c ("dtc: check.c fix compile error") Signed-off-by: Russell King Cc: Rob Herring Cc: Frank Rowand Cc: Shuah Khan Cc: David Gibson Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/dtc/checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c03567a8e8d5cf2aaca40e605c48f319dc2ead57 Author: Joe Stringer Date: Thu Aug 31 16:15:33 2017 -0700 include/linux/compiler.h: don't perform compiletime_assert with -O0 Commit c7acec713d14 ("kernel.h: handle pointers to arrays better in container_of()") made use of __compiletime_assert() from container_of() thus increasing the usage of this macro, allowing developers to notice type conflicts in usage of container_of() at compile time. However, the implementation of __compiletime_assert relies on compiler optimizations to report an error. This means that if a developer uses "-O0" with any code that performs container_of(), the compiler will always report an error regardless of whether there is an actual problem in the code. This patch disables compile_time_assert when optimizations are disabled to allow such code to compile with CFLAGS="-O0". Example compilation failure: ./include/linux/compiler.h:547:38: error: call to `__compiletime_assert_94' declared with attribute error: pointer type mismatch in container_of() _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^ ./include/linux/compiler.h:530:4: note: in definition of macro `__compiletime_assert' prefix ## suffix(); \ ^~~~~~ ./include/linux/compiler.h:547:2: note: in expansion of macro `_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:46:37: note: in expansion of macro `compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:860:2: note: in expansion of macro `BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ [akpm@linux-foundation.org: use do{}while(0), per Michal] Link: http://lkml.kernel.org/r/20170829230114.11662-1-joe@ovn.org Fixes: c7acec713d14c6c ("kernel.h: handle pointers to arrays better in container_of()") Signed-off-by: Joe Stringer Cc: Ian Abbott Cc: Arnd Bergmann Cc: Michal Nazarewicz Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compiler.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c461ad6a63b37ba74632e90c063d14823c884247 Author: Mel Gorman Date: Thu Aug 31 16:15:30 2017 -0700 mm, madvise: ensure poisoned pages are removed from per-cpu lists Wendy Wang reported off-list that a RAS HWPOISON-SOFT test case failed and bisected it to the commit 479f854a207c ("mm, page_alloc: defer debugging checks of pages allocated from the PCP"). The problem is that a page that was poisoned with madvise() is reused. The commit removed a check that would trigger if DEBUG_VM was enabled but re-enabling the check only fixes the problem as a side-effect by printing a bad_page warning and recovering. The root of the problem is that an madvise() can leave a poisoned page on the per-cpu list. This patch drains all per-cpu lists after pages are poisoned so that they will not be reused. Wendy reports that the test case in question passes with this patch applied. While this could be done in a targeted fashion, it is over-complicated for such a rare operation. Link: http://lkml.kernel.org/r/20170828133414.7qro57jbepdcyz5x@techsingularity.net Fixes: 479f854a207c ("mm, page_alloc: defer debugging checks of pages allocated from the PCP") Signed-off-by: Mel Gorman Reported-by: Wang, Wendy Tested-by: Wang, Wendy Acked-by: David Rientjes Acked-by: Vlastimil Babka Cc: "Hansen, Dave" Cc: "Luck, Tony" Cc: Naoya Horiguchi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 355627f518978b5167256d27492fe0b343aaf2f2 Author: Eric Biggers Date: Thu Aug 31 16:15:26 2017 -0700 mm, uprobes: fix multiple free of ->uprobes_state.xol_area Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new error path before the new mm_struct's ->uprobes_state.xol_area has been set to NULL after being copied from the old mm_struct by the memcpy in dup_mm(). For a task that has previously hit a uprobe tracepoint, this resulted in the 'struct xol_area' being freed multiple times if the task was killed at just the right time while forking. Fix it by setting ->uprobes_state.xol_area to NULL in mm_init() rather than in uprobe_dup_mmap(). With CONFIG_UPROBE_EVENTS=y, the bug can be reproduced by the same C program given by commit 2b7e8665b4ff ("fork: fix incorrect fput of ->exe_file causing use-after-free"), provided that a uprobe tracepoint has been set on the fork_thread() function. For example: $ gcc reproducer.c -o reproducer -lpthread $ nm reproducer | grep fork_thread 0000000000400719 t fork_thread $ echo "p $PWD/reproducer:0x719" > /sys/kernel/debug/tracing/uprobe_events $ echo 1 > /sys/kernel/debug/tracing/events/uprobes/enable $ ./reproducer Here is the use-after-free reported by KASAN: BUG: KASAN: use-after-free in uprobe_clear_state+0x1c4/0x200 Read of size 8 at addr ffff8800320a8b88 by task reproducer/198 CPU: 1 PID: 198 Comm: reproducer Not tainted 4.13.0-rc7-00015-g36fde05f3fb5 #255 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 Call Trace: dump_stack+0xdb/0x185 print_address_description+0x7e/0x290 kasan_report+0x23b/0x350 __asan_report_load8_noabort+0x19/0x20 uprobe_clear_state+0x1c4/0x200 mmput+0xd6/0x360 do_exit+0x740/0x1670 do_group_exit+0x13f/0x380 get_signal+0x597/0x17d0 do_signal+0x99/0x1df0 exit_to_usermode_loop+0x166/0x1e0 syscall_return_slowpath+0x258/0x2c0 entry_SYSCALL_64_fastpath+0xbc/0xbe ... Allocated by task 199: save_stack_trace+0x1b/0x20 kasan_kmalloc+0xfc/0x180 kmem_cache_alloc_trace+0xf3/0x330 __create_xol_area+0x10f/0x780 uprobe_notify_resume+0x1674/0x2210 exit_to_usermode_loop+0x150/0x1e0 prepare_exit_to_usermode+0x14b/0x180 retint_user+0x8/0x20 Freed by task 199: save_stack_trace+0x1b/0x20 kasan_slab_free+0xa8/0x1a0 kfree+0xba/0x210 uprobe_clear_state+0x151/0x200 mmput+0xd6/0x360 copy_process.part.8+0x605f/0x65d0 _do_fork+0x1a5/0xbd0 SyS_clone+0x19/0x20 do_syscall_64+0x22f/0x660 return_from_SYSCALL_64+0x0/0x7a Note: without KASAN, you may instead see a "Bad page state" message, or simply a general protection fault. Link: http://lkml.kernel.org/r/20170830033303.17927-1-ebiggers3@gmail.com Fixes: 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") Signed-off-by: Eric Biggers Reported-by: Oleg Nesterov Acked-by: Oleg Nesterov Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Mark Rutland Cc: Michal Hocko Cc: Peter Zijlstra Cc: Vlastimil Babka Cc: [4.7+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/events/uprobes.c | 2 -- kernel/fork.c | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 22cf8bc6cb0d48c6d31da8eccbd4201ab9b0c4c6 Author: Shaohua Li Date: Thu Aug 31 16:15:23 2017 -0700 kernel/kthread.c: kthread_worker: don't hog the cpu If the worker thread continues getting work, it will hog the cpu and rcu stall complains. Make it a good citizen. This is triggered in a loop block device test. Link: http://lkml.kernel.org/r/5de0a179b3184e1a2183fc503448b0269f24d75b.1503697127.git.shli@fb.com Signed-off-by: Shaohua Li Cc: Petr Mladek Cc: Thomas Gleixner Cc: Tejun Heo Cc: Oleg Nesterov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kthread.c | 1 + 1 file changed, 1 insertion(+) commit e746bf730a76fe53b82c9e6b6da72d58e9ae3565 Author: Tetsuo Handa Date: Thu Aug 31 16:15:20 2017 -0700 mm,page_alloc: don't call __node_reclaim() with oom_lock held. We are doing a last second memory allocation attempt before calling out_of_memory(). But since slab shrinker functions might indirectly wait for other thread's __GFP_DIRECT_RECLAIM && !__GFP_NORETRY memory allocations via sleeping locks, calling slab shrinker functions from node_reclaim() from get_page_from_freelist() with oom_lock held has possibility of deadlock. Therefore, make sure that last second memory allocation attempt does not call slab shrinker functions. Link: http://lkml.kernel.org/r/1503577106-9196-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 5f32b265400de723ab0db23101a75ac073bdd980 Author: Jérôme Glisse Date: Thu Aug 31 17:17:38 2017 -0400 mm/mmu_notifier: kill invalidate_page The invalidate_page callback suffered from two pitfalls. First it used to happen after the page table lock was release and thus a new page might have setup before the call to invalidate_page() happened. This is in a weird way fixed by commit c7ab0d2fdc84 ("mm: convert try_to_unmap_one() to use page_vma_mapped_walk()") that moved the callback under the page table lock but this also broke several existing users of the mmu_notifier API that assumed they could sleep inside this callback. The second pitfall was invalidate_page() being the only callback not taking a range of address in respect to invalidation but was giving an address and a page. Lots of the callback implementers assumed this could never be THP and thus failed to invalidate the appropriate range for THP. By killing this callback we unify the mmu_notifier callback API to always take a virtual address range as input. Finally this also simplifies the end user life as there is now two clear choices: - invalidate_range_start()/end() callback (which allow you to sleep) - invalidate_range() where you can not sleep but happen right after page table update under page table lock Signed-off-by: Jérôme Glisse Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc: Nadav Amit Cc: Mike Galbraith Cc: Kirill A. Shutemov Cc: axie Cc: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmu_notifier.h | 25 ------------------------- mm/mmu_notifier.c | 14 -------------- 2 files changed, 39 deletions(-) commit fb1522e099f0c69f36655af233a64e3f55941f5b Author: Jérôme Glisse Date: Thu Aug 31 17:17:37 2017 -0400 KVM: update to new mmu_notifier semantic v2 Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Changed since v1 (Linus Torvalds) - remove now useless kvm_arch_mmu_notifier_invalidate_page() Signed-off-by: Jérôme Glisse Tested-by: Mike Galbraith Tested-by: Adam Borowski Cc: Paolo Bonzini Cc: Radim Krčmář Cc: kvm@vger.kernel.org Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds arch/arm/include/asm/kvm_host.h | 6 ------ arch/arm64/include/asm/kvm_host.h | 6 ------ arch/mips/include/asm/kvm_host.h | 5 ----- arch/powerpc/include/asm/kvm_host.h | 5 ----- arch/x86/include/asm/kvm_host.h | 2 -- arch/x86/kvm/x86.c | 11 ---------- virt/kvm/kvm_main.c | 42 ------------------------------------- 7 files changed, 77 deletions(-) commit a81461b0546cbf57128f34e3dd6013bcdbdf0371 Author: Jérôme Glisse Date: Thu Aug 31 17:17:36 2017 -0400 xen/gntdev: update to new mmu_notifier semantic Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Reviewed-by: Boris Ostrovsky Cc: Konrad Rzeszutek Wilk Cc: Roger Pau Monné Cc: xen-devel@lists.xenproject.org (moderated for non-subscribers) Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds drivers/xen/gntdev.c | 8 -------- 1 file changed, 8 deletions(-) commit a4870125ca9fcd221fbc5f067967e56cfb4d9fbd Author: Jérôme Glisse Date: Thu Aug 31 17:17:35 2017 -0400 sgi-gru: update to new mmu_notifier semantic Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: Dimitri Sivanich Cc: Jack Steiner Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds drivers/misc/sgi-gru/grutlbpurge.c | 12 ------------ 1 file changed, 12 deletions(-) commit 192e856451d8d5e15aad470dbbb5daf5de3d2c0f Author: Jérôme Glisse Date: Thu Aug 31 17:17:34 2017 -0400 misc/mic/scif: update to new mmu_notifier semantic Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: Sudeep Dutt Cc: Ashutosh Dixit Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds drivers/misc/mic/scif/scif_dma.c | 11 ----------- 1 file changed, 11 deletions(-) commit 30ef7d2c056cb7ef22c16c6fe0756105d584985c Author: Jérôme Glisse Date: Thu Aug 31 17:17:33 2017 -0400 iommu/intel: update to new mmu_notifier semantic Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: David Woodhouse Cc: iommu@lists.linux-foundation.org Cc: Joerg Roedel Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds drivers/iommu/intel-svm.c | 9 --------- 1 file changed, 9 deletions(-) commit f0d1c713d66d7b16527568e79528964cf4b5513d Author: Jérôme Glisse Date: Thu Aug 31 17:17:32 2017 -0400 iommu/amd: update to new mmu_notifier semantic Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: Suravee Suthikulpanit Cc: iommu@lists.linux-foundation.org Cc: Joerg Roedel Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds drivers/iommu/amd_iommu_v2.c | 8 -------- 1 file changed, 8 deletions(-) commit 7def96f0a97310c92e6145c776164af479fb1591 Author: Jérôme Glisse Date: Thu Aug 31 17:17:31 2017 -0400 IB/hfi1: update to new mmu_notifier semantic Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: linux-rdma@vger.kernel.org Cc: Dean Luick Cc: Ira Weiny Cc: Doug Ledford Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds drivers/infiniband/hw/hfi1/mmu_rb.c | 9 --------- 1 file changed, 9 deletions(-) commit b1a89257f28e28eccd65f777ff622c3aab6d8526 Author: Jérôme Glisse Date: Thu Aug 31 17:17:30 2017 -0400 IB/umem: update to new mmu_notifier semantic Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Tested-by: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Cc: Artemy Kovalyov Cc: Doug Ledford Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds drivers/infiniband/core/umem_odp.c | 19 ------------------- 1 file changed, 19 deletions(-) commit c90270a9f11b455102874c15c4c9c1dabb0d030b Author: Jérôme Glisse Date: Thu Aug 31 17:17:29 2017 -0400 drm/amdgpu: update to new mmu_notifier semantic Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Reviewed-by: Christian König Cc: amd-gfx@lists.freedesktop.org Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 31 ------------------------------- 1 file changed, 31 deletions(-) commit d1d5762e4767324ce4ec32f9b2d2aaccfd87f664 Author: Jérôme Glisse Date: Thu Aug 31 17:17:28 2017 -0400 powerpc/powernv: update to new mmu_notifier semantic Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and now are bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse Cc: linuxppc-dev@lists.ozlabs.org Cc: Alistair Popple Cc: Michael Ellerman Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Linus Torvalds arch/powerpc/platforms/powernv/npu-dma.c | 10 ---------- 1 file changed, 10 deletions(-) commit 369ea8242c0fb5239b4ddf0dc568f694bd244de4 Author: Jérôme Glisse Date: Thu Aug 31 17:17:27 2017 -0400 mm/rmap: update to new mmu_notifier semantic v2 Replace all mmu_notifier_invalidate_page() calls by *_invalidate_range() and make sure it is bracketed by calls to *_invalidate_range_start()/end(). Note that because we can not presume the pmd value or pte value we have to assume the worst and unconditionaly report an invalidation as happening. Changed since v2: - try_to_unmap_one() only one call to mmu_notifier_invalidate_range() - compute end with PAGE_SIZE << compound_order(page) - fix PageHuge() case in try_to_unmap_one() Signed-off-by: Jérôme Glisse Reviewed-by: Andrea Arcangeli Cc: Dan Williams Cc: Ross Zwisler Cc: Bernhard Held Cc: Adam Borowski Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc: Nadav Amit Cc: Mike Galbraith Cc: Kirill A. Shutemov Cc: axie Cc: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) commit a4d1a885251382250ec315482bdd8ca52dd61e6a Author: Jérôme Glisse Date: Thu Aug 31 17:17:26 2017 -0400 dax: update to new mmu_notifier semantic Replace all mmu_notifier_invalidate_page() calls by *_invalidate_range() and make sure it is bracketed by calls to *_invalidate_range_start()/end(). Note that because we can not presume the pmd value or pte value we have to assume the worst and unconditionaly report an invalidation as happening. Signed-off-by: Jérôme Glisse Cc: Dan Williams Cc: Ross Zwisler Cc: Bernhard Held Cc: Adam Borowski Cc: Andrea Arcangeli Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc: Nadav Amit Cc: Mike Galbraith Cc: Kirill A. Shutemov Cc: axie Cc: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 19 +++++++++++-------- include/linux/mm.h | 1 + mm/memory.c | 26 +++++++++++++++++++++----- 3 files changed, 33 insertions(+), 13 deletions(-) commit dd2bc473482eedc60c29cf00ad12568ce40ce511 Author: Yan, Zheng Date: Fri Aug 4 11:22:31 2017 +0800 ceph: fix readpage from fscache ceph_readpage() unlocks page prematurely prematurely in the case that page is reading from fscache. Caller of readpage expects that page is uptodate when it get unlocked. So page shoule get locked by completion callback of fscache_read_or_alloc_pages() Cc: stable@vger.kernel.org # 4.1+, needs backporting for < 4.7 Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 24 +++++++++++++++--------- fs/ceph/cache.c | 12 +++--------- 2 files changed, 18 insertions(+), 18 deletions(-) commit f581a0dd744fe32b0a8805e279c59ec1ac676d60 Author: Cong Wang Date: Thu Aug 31 16:47:43 2017 +0200 wl1251: add a missing spin_lock_init() wl1251: add a missing spin_lock_init() This fixes the following kernel warning: [ 5668.771453] BUG: spinlock bad magic on CPU#0, kworker/u2:3/9745 [ 5668.771850] lock: 0xce63ef20, .magic: 00000000, .owner: /-1, .owner_cpu: 0 [ 5668.772277] CPU: 0 PID: 9745 Comm: kworker/u2:3 Tainted: G W 4.12.0-03002-gec979a4-dirty #40 [ 5668.772796] Hardware name: Nokia RX-51 board [ 5668.773071] Workqueue: phy1 wl1251_irq_work [ 5668.773345] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 5668.773803] [] (show_stack) from [] (do_raw_spin_lock+0x6c/0xa0) [ 5668.774230] [] (do_raw_spin_lock) from [] (_raw_spin_lock_irqsave+0x10/0x18) [ 5668.774658] [] (_raw_spin_lock_irqsave) from [] (wl1251_op_tx+0x38/0x5c) [ 5668.775115] [] (wl1251_op_tx) from [] (ieee80211_tx_frags+0x188/0x1c0) [ 5668.775543] [] (ieee80211_tx_frags) from [] (__ieee80211_tx+0x6c/0x130) [ 5668.775970] [] (__ieee80211_tx) from [] (ieee80211_tx+0xdc/0x104) [ 5668.776367] [] (ieee80211_tx) from [] (__ieee80211_subif_start_xmit+0x454/0x8c8) [ 5668.776824] [] (__ieee80211_subif_start_xmit) from [] (ieee80211_subif_start_xmit+0x30/0x2fc) [ 5668.777343] [] (ieee80211_subif_start_xmit) from [] (dev_hard_start_xmit+0x80/0x118) ... by adding the missing spin_lock_init(). Reported-by: Pavel Machek Cc: Kalle Valo Signed-off-by: Cong Wang Acked-by: Pavel Machek Signed-off-by: Kalle Valo Signed-off-by: Pavel Machek Cc: stable@kernel.org Signed-off-by: David S. Miller drivers/net/wireless/ti/wl1251/main.c | 1 + 1 file changed, 1 insertion(+) commit f5308d1b83eba20e69df5e0926ba7257c8dd9074 Author: Cameron Gutman Date: Thu Aug 31 11:52:20 2017 -0700 Input: xpad - fix PowerA init quirk for some gamepad models The PowerA gamepad initialization quirk worked with the PowerA wired gamepad I had around (0x24c6:0x543a), but a user reported [0] that it didn't work for him, even though our gamepads shared the same vendor and product IDs. When I initially implemented the PowerA quirk, I wanted to avoid actually triggering the rumble action during init. My tests showed that my gamepad would work correctly even if it received a rumble of 0 intensity, so that's what I went with. Unfortunately, this apparently isn't true for all models (perhaps a firmware difference?). This non-working gamepad seems to require the real magic rumble packet that the Microsoft driver sends, which actually vibrates the gamepad. To counteract this effect, I still send the old zero-rumble PowerA quirk packet which cancels the rumble effect before the motors can spin up enough to vibrate. [0]: https://github.com/paroj/xpad/issues/48#issuecomment-313904867 Reported-by: Kyle Beauchamp Tested-by: Kyle Beauchamp Fixes: 81093c9848a7 ("Input: xpad - support some quirky Xbox One pads") Cc: stable@vger.kernel.org # v4.12 Signed-off-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 231d069fcde22bd0582c2c9564f1b334d280c7d7 Author: Hans de Goede Date: Tue Aug 29 14:08:35 2017 +0200 i2c: designware: Round down ACPI provided clk to nearest supported clk The Lenovo Miix2 8 DSDT contains an i2c clk / bus speed of 1700000 Hz for one if its devices, which is not supported. This is the second DSDT to show up with an unsupported clk in a short time, remove the hardcoded fix for DSDTs with a 1 MiHz clock and simply always round down the clk to the nearest supported value. Reported-by: russianneuromancer@ya.ru Fixes: 682c6c2188 ("i2c: designware: Some broken DSTDs use 1MiHz ...") Signed-off-by: Hans de Goede Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 83b033bd33a8b7b16f568e3432d3e27d03ef9c82 Merge: bcab3a6 0599730 Author: Takashi Iwai Date: Thu Aug 31 14:08:26 2017 +0200 Merge tag 'asoc-fix-v4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.13 A couple of fixes, one for a regression in simple-card introduced during the merge window that was only reported this week and another for a regression in registration of ACPI GPIOs. commit 0fdd49ad1bb17457d119f8c3bc8ecdd0734eed9c Merge: 8ab867c c389377 Author: Martin Schwidefsky Date: Thu Aug 31 14:05:20 2017 +0200 Merge tag 'vfio-ccw-20170724' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into fixes Pull vfio-ccw fix from Cornelia Huck: "A bugfix in the ccw translation code." commit 8ab867cb0806a8e195de161fd8883a0578d1d050 Author: Martin Schwidefsky Date: Thu Aug 31 13:18:22 2017 +0200 s390/mm: fix BUG_ON in crst_table_upgrade A 31-bit compat process can force a BUG_ON in crst_table_upgrade with specific, invalid mmap calls, e.g. mmap((void*) 0x7fff8000, 0x10000, 3, 32, -1, 0) The arch_get_unmapped_area[_topdown] functions miss an if condition in the decision to do a page table upgrade. Fixes: 9b11c7912d00 ("s390/mm: simplify arch_get_unmapped_area[_topdown]") Cc: # v4.12+ Signed-off-by: Martin Schwidefsky arch/s390/mm/mmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0b89ede629637c03b9a728fb08bfe6ed51de9be7 Author: Martin Schwidefsky Date: Thu Aug 31 12:30:54 2017 +0200 s390/mm: fork vs. 5 level page tabel The mm->context.asce field of a new process is not set up correctly in case of a fork with a 5 level page table. Add the missing case to init_new_context(). Fixes: 1aea9b3f9210 ("s390/mm: implement 5 level pages tables") Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu_context.h | 5 +++++ 1 file changed, 5 insertions(+) commit 05997302b7aa56a7f4a7b9d49d0661865c17874d Merge: 1b4a56c 804e73a Author: Mark Brown Date: Thu Aug 31 12:47:58 2017 +0100 Merge remote-tracking branch 'asoc/fix/rt5670' into asoc-fixes commit ebc8254aeae34226d0bc8fda309fd9790d4dccfe Author: Florian Fainelli Date: Wed Aug 30 17:49:29 2017 -0700 Revert "net: phy: Correctly process PHY_HALTED in phy_stop_machine()" This reverts commit 7ad813f208533cebfcc32d3d7474dc1677d1b09a ("net: phy: Correctly process PHY_HALTED in phy_stop_machine()") because it is creating the possibility for a NULL pointer dereference. David Daney provide the following call trace and diagram of events: When ndo_stop() is called we call: phy_disconnect() +---> phy_stop_interrupts() implies: phydev->irq = PHY_POLL; +---> phy_stop_machine() | +---> phy_state_machine() | +----> queue_delayed_work(): Work queued. +--->phy_detach() implies: phydev->attached_dev = NULL; Now at a later time the queued work does: phy_state_machine() +---->netif_carrier_off(phydev->attached_dev): Oh no! It is NULL: CPU 12 Unable to handle kernel paging request at virtual address 0000000000000048, epc == ffffffff80de37ec, ra == ffffffff80c7c Oops[#1]: CPU: 12 PID: 1502 Comm: kworker/12:1 Not tainted 4.9.43-Cavium-Octeon+ #1 Workqueue: events_power_efficient phy_state_machine task: 80000004021ed100 task.stack: 8000000409d70000 $ 0 : 0000000000000000 ffffffff84720060 0000000000000048 0000000000000004 $ 4 : 0000000000000000 0000000000000001 0000000000000004 0000000000000000 $ 8 : 0000000000000000 0000000000000000 00000000ffff98f3 0000000000000000 $12 : 8000000409d73fe0 0000000000009c00 ffffffff846547c8 000000000000af3b $16 : 80000004096bab68 80000004096babd0 0000000000000000 80000004096ba800 $20 : 0000000000000000 0000000000000000 ffffffff81090000 0000000000000008 $24 : 0000000000000061 ffffffff808637b0 $28 : 8000000409d70000 8000000409d73cf0 80000000271bd300 ffffffff80c7804c Hi : 000000000000002a Lo : 000000000000003f epc : ffffffff80de37ec netif_carrier_off+0xc/0x58 ra : ffffffff80c7804c phy_state_machine+0x48c/0x4f8 Status: 14009ce3 KX SX UX KERNEL EXL IE Cause : 00800008 (ExcCode 02) BadVA : 0000000000000048 PrId : 000d9501 (Cavium Octeon III) Modules linked in: Process kworker/12:1 (pid: 1502, threadinfo=8000000409d70000, task=80000004021ed100, tls=0000000000000000) Stack : 8000000409a54000 80000004096bab68 80000000271bd300 80000000271c1e00 0000000000000000 ffffffff808a1708 8000000409a54000 80000000271bd300 80000000271bd320 8000000409a54030 ffffffff80ff0f00 0000000000000001 ffffffff81090000 ffffffff808a1ac0 8000000402182080 ffffffff84650000 8000000402182080 ffffffff84650000 ffffffff80ff0000 8000000409a54000 ffffffff808a1970 0000000000000000 80000004099e8000 8000000402099240 0000000000000000 ffffffff808a8598 0000000000000000 8000000408eeeb00 8000000409a54000 00000000810a1d00 0000000000000000 8000000409d73de8 8000000409d73de8 0000000000000088 000000000c009c00 8000000409d73e08 8000000409d73e08 8000000402182080 ffffffff808a84d0 8000000402182080 ... Call Trace: [] netif_carrier_off+0xc/0x58 [] phy_state_machine+0x48c/0x4f8 [] process_one_work+0x158/0x368 [] worker_thread+0x150/0x4c0 [] kthread+0xc8/0xe0 [] ret_from_kernel_thread+0x14/0x1c The original motivation for this change originated from Marc Gonzales indicating that his network driver did not have its adjust_link callback executing with phydev->link = 0 while he was expecting it. PHYLIB has never made any such guarantees ever because phy_stop() merely just tells the workqueue to move into PHY_HALTED state which will happen asynchronously. Reported-by: Geert Uytterhoeven Reported-by: David Daney Fixes: 7ad813f20853 ("net: phy: Correctly process PHY_HALTED in phy_stop_machine()") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 3 --- 1 file changed, 3 deletions(-) commit a1bc54a2e4e2b24b1a4d51e49e68fce2102e58e1 Merge: df19163 1213ad2 Author: David S. Miller Date: Wed Aug 30 16:39:01 2017 -0700 Merge tag 'mlx5-fixes-2017-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2017-08-30 This series contains some misc fixes to the mlx5 driver. Please pull and let me know if there's any problem. For -stable: Kernels >= 4.12 net/mlx5e: Fix CQ moderation mode not set properly net/mlx5e: Don't override user RSS upon set channels Kernels >= 4.11 net/mlx5e: Properly resolve TC offloaded ipv6 vxlan tunnel source address Kernels >= 4.10 net/mlx5e: Fix DCB_CAP_ATTR_DCBX capability for DCBNL getcap net/mlx5e: Check for qos capability in dcbnl_initialize Kernels >= 4.9 net/mlx5e: Fix dangling page pointer on DMA mapping error Kernels >= 4.8 net/mlx5e: Fix inline header size for small packets net/mlx5: E-Switch, Unload the representors in the correct order net/mlx5: Fix arm SRQ command for ISSI version 0 ==================== Signed-off-by: David S. Miller commit df191632f814357ee4d646421662d866028b569d Author: Florian Fainelli Date: Wed Aug 30 12:39:33 2017 -0700 net: dsa: bcm_sf2: Fix number of CFP entries for BCM7278 BCM7278 has only 128 entries while BCM7445 has the full 256 entries set, fix that. Fixes: 7318166cacad ("net: dsa: bcm_sf2: Add support for ethtool::rxnfc") Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 4 ++++ drivers/net/dsa/bcm_sf2.h | 1 + drivers/net/dsa/bcm_sf2_cfp.c | 8 ++++---- 3 files changed, 9 insertions(+), 4 deletions(-) commit 351050ecd6523374b370341cc29fe61e2201556b Author: Eric Dumazet Date: Wed Aug 30 09:29:31 2017 -0700 kcm: do not attach PF_KCM sockets to avoid deadlock syzkaller had no problem to trigger a deadlock, attaching a KCM socket to another one (or itself). (original syzkaller report was a very confusing lockdep splat during a sendmsg()) It seems KCM claims to only support TCP, but no enforcement is done, so we might need to add additional checks. Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Acked-by: Tom Herbert Signed-off-by: David S. Miller net/kcm/kcmsock.c | 4 ++++ 1 file changed, 4 insertions(+) commit 42ff72cf27027fa28dd79acabe01d9196f1480a7 Merge: 9424911 7a14724 Author: Linus Torvalds Date: Wed Aug 30 15:28:47 2017 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Dan Williams: "A single patch removing some structure definitions from a uapi header file. These payloads are never processed directly by the kernel they are simply passed through an ioctl as opaque blobs to the ACPI _DSM (Device Specific Method) interface. Userspace should not be depending on the kernel to define these payloads. We will instead provide these definitions via the existing libndctl (https://github.com/pmem/ndctl) project that has NVDIMM command helpers and other definitions" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm: clean up command definitions commit f5c3dd4b5363af997d418174d578a795081aab51 Merge: f0e82d7 c2d6511 Author: David S. Miller Date: Wed Aug 30 15:26:12 2017 -0700 Merge branch 'net-sched-init-failure-fixes' Nikolay Aleksandrov says: ==================== net/sched: init failure fixes I went over all qdiscs' init, destroy and reset callbacks and found the issues fixed in each patch. Mostly they are null pointer dereferences due to uninitialized timer (qdisc watchdog) or double frees due to ->destroy cleaning up a second time. There's more information in each patch. I've tested these by either sending wrong attributes from user-spaces, no attributes or by simulating memory alloc failure where applicable. Also tried all of the qdiscs as a default qdisc. Most of these bugs were present before commit 87b60cfacf9f, I've tried to include proper fixes tags in each patch. I haven't included individual patch acks in the set, I'd appreciate it if you take another look and resend them. ==================== Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit c2d6511e6a4f1f3673d711569c00c3849549e9b0 Author: Nikolay Aleksandrov Date: Wed Aug 30 12:49:05 2017 +0300 sch_tbf: fix two null pointer dereferences on init failure sch_tbf calls qdisc_watchdog_cancel() in both its ->reset and ->destroy callbacks but it may fail before the timer is initialized due to missing options (either not supplied by user-space or set as a default qdisc), also q->qdisc is used by ->reset and ->destroy so we need it initialized. Reproduce: $ sysctl net.core.default_qdisc=tbf $ ip l set ethX up Crash log: [ 959.160172] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 [ 959.160323] IP: qdisc_reset+0xa/0x5c [ 959.160400] PGD 59cdb067 [ 959.160401] P4D 59cdb067 [ 959.160466] PUD 59ccb067 [ 959.160532] PMD 0 [ 959.160597] [ 959.160706] Oops: 0000 [#1] SMP [ 959.160778] Modules linked in: sch_tbf sch_sfb sch_prio sch_netem [ 959.160891] CPU: 2 PID: 1562 Comm: ip Not tainted 4.13.0-rc6+ #62 [ 959.160998] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 959.161157] task: ffff880059c9a700 task.stack: ffff8800376d0000 [ 959.161263] RIP: 0010:qdisc_reset+0xa/0x5c [ 959.161347] RSP: 0018:ffff8800376d3610 EFLAGS: 00010286 [ 959.161531] RAX: ffffffffa001b1dd RBX: ffff8800373a2800 RCX: 0000000000000000 [ 959.161733] RDX: ffffffff8215f160 RSI: ffffffff8215f160 RDI: 0000000000000000 [ 959.161939] RBP: ffff8800376d3618 R08: 00000000014080c0 R09: 00000000ffffffff [ 959.162141] R10: ffff8800376d3578 R11: 0000000000000020 R12: ffffffffa001d2c0 [ 959.162343] R13: ffff880037538000 R14: 00000000ffffffff R15: 0000000000000001 [ 959.162546] FS: 00007fcc5126b740(0000) GS:ffff88005d900000(0000) knlGS:0000000000000000 [ 959.162844] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 959.163030] CR2: 0000000000000018 CR3: 000000005abc4000 CR4: 00000000000406e0 [ 959.163233] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 959.163436] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 959.163638] Call Trace: [ 959.163788] tbf_reset+0x19/0x64 [sch_tbf] [ 959.163957] qdisc_destroy+0x8b/0xe5 [ 959.164119] qdisc_create_dflt+0x86/0x94 [ 959.164284] ? dev_activate+0x129/0x129 [ 959.164449] attach_one_default_qdisc+0x36/0x63 [ 959.164623] netdev_for_each_tx_queue+0x3d/0x48 [ 959.164795] dev_activate+0x4b/0x129 [ 959.164957] __dev_open+0xe7/0x104 [ 959.165118] __dev_change_flags+0xc6/0x15c [ 959.165287] dev_change_flags+0x25/0x59 [ 959.165451] do_setlink+0x30c/0xb3f [ 959.165613] ? check_chain_key+0xb0/0xfd [ 959.165782] rtnl_newlink+0x3a4/0x729 [ 959.165947] ? rtnl_newlink+0x117/0x729 [ 959.166121] ? ns_capable_common+0xd/0xb1 [ 959.166288] ? ns_capable+0x13/0x15 [ 959.166450] rtnetlink_rcv_msg+0x188/0x197 [ 959.166617] ? rcu_read_unlock+0x3e/0x5f [ 959.166783] ? rtnl_newlink+0x729/0x729 [ 959.166948] netlink_rcv_skb+0x6c/0xce [ 959.167113] rtnetlink_rcv+0x23/0x2a [ 959.167273] netlink_unicast+0x103/0x181 [ 959.167439] netlink_sendmsg+0x326/0x337 [ 959.167607] sock_sendmsg_nosec+0x14/0x3f [ 959.167772] sock_sendmsg+0x29/0x2e [ 959.167932] ___sys_sendmsg+0x209/0x28b [ 959.168098] ? do_raw_spin_unlock+0xcd/0xf8 [ 959.168267] ? _raw_spin_unlock+0x27/0x31 [ 959.168432] ? __handle_mm_fault+0x651/0xdb1 [ 959.168602] ? check_chain_key+0xb0/0xfd [ 959.168773] __sys_sendmsg+0x45/0x63 [ 959.168934] ? __sys_sendmsg+0x45/0x63 [ 959.169100] SyS_sendmsg+0x19/0x1b [ 959.169260] entry_SYSCALL_64_fastpath+0x23/0xc2 [ 959.169432] RIP: 0033:0x7fcc5097e690 [ 959.169592] RSP: 002b:00007ffd0d5c7b48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 959.169887] RAX: ffffffffffffffda RBX: ffffffff810d278c RCX: 00007fcc5097e690 [ 959.170089] RDX: 0000000000000000 RSI: 00007ffd0d5c7b90 RDI: 0000000000000003 [ 959.170292] RBP: ffff8800376d3f98 R08: 0000000000000001 R09: 0000000000000003 [ 959.170494] R10: 00007ffd0d5c7910 R11: 0000000000000246 R12: 0000000000000006 [ 959.170697] R13: 000000000066f1a0 R14: 00007ffd0d5cfc40 R15: 0000000000000000 [ 959.170900] ? trace_hardirqs_off_caller+0xa7/0xcf [ 959.171076] Code: 00 41 c7 84 24 14 01 00 00 00 00 00 00 41 c7 84 24 98 00 00 00 00 00 00 00 41 5c 41 5d 41 5e 5d c3 66 66 66 66 90 55 48 89 e5 53 <48> 8b 47 18 48 89 fb 48 8b 40 48 48 85 c0 74 02 ff d0 48 8b bb [ 959.171637] RIP: qdisc_reset+0xa/0x5c RSP: ffff8800376d3610 [ 959.171821] CR2: 0000000000000018 Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation") Fixes: 0fbbeb1ba43b ("[PKT_SCHED]: Fix missing qdisc_destroy() in qdisc_create_dflt()") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/sch_tbf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e232657661242cc8a169595160847b3e66aa7056 Author: Nikolay Aleksandrov Date: Wed Aug 30 12:49:04 2017 +0300 sch_sfq: fix null pointer dereference on init failure Currently only a memory allocation failure can lead to this, so let's initialize the timer first. Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/sch_sfq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 634576a1844dba15bc5e6fc61d72f37e13a21615 Author: Nikolay Aleksandrov Date: Wed Aug 30 12:49:03 2017 +0300 sch_netem: avoid null pointer deref on init failure netem can fail in ->init due to missing options (either not supplied by user-space or used as a default qdisc) causing a timer->base null pointer deref in its ->destroy() and ->reset() callbacks. Reproduce: $ sysctl net.core.default_qdisc=netem $ ip l set ethX up Crash log: [ 1814.846943] BUG: unable to handle kernel NULL pointer dereference at (null) [ 1814.847181] IP: hrtimer_active+0x17/0x8a [ 1814.847270] PGD 59c34067 [ 1814.847271] P4D 59c34067 [ 1814.847337] PUD 37374067 [ 1814.847403] PMD 0 [ 1814.847468] [ 1814.847582] Oops: 0000 [#1] SMP [ 1814.847655] Modules linked in: sch_netem(O) sch_fq_codel(O) [ 1814.847761] CPU: 3 PID: 1573 Comm: ip Tainted: G O 4.13.0-rc6+ #62 [ 1814.847884] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 1814.848043] task: ffff88003723a700 task.stack: ffff88005adc8000 [ 1814.848235] RIP: 0010:hrtimer_active+0x17/0x8a [ 1814.848407] RSP: 0018:ffff88005adcb590 EFLAGS: 00010246 [ 1814.848590] RAX: 0000000000000000 RBX: ffff880058e359d8 RCX: 0000000000000000 [ 1814.848793] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880058e359d8 [ 1814.848998] RBP: ffff88005adcb5b0 R08: 00000000014080c0 R09: 00000000ffffffff [ 1814.849204] R10: ffff88005adcb660 R11: 0000000000000020 R12: 0000000000000000 [ 1814.849410] R13: ffff880058e359d8 R14: 00000000ffffffff R15: 0000000000000001 [ 1814.849616] FS: 00007f733bbca740(0000) GS:ffff88005d980000(0000) knlGS:0000000000000000 [ 1814.849919] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1814.850107] CR2: 0000000000000000 CR3: 0000000059f0d000 CR4: 00000000000406e0 [ 1814.850313] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1814.850518] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1814.850723] Call Trace: [ 1814.850875] hrtimer_try_to_cancel+0x1a/0x93 [ 1814.851047] hrtimer_cancel+0x15/0x20 [ 1814.851211] qdisc_watchdog_cancel+0x12/0x14 [ 1814.851383] netem_reset+0xe6/0xed [sch_netem] [ 1814.851561] qdisc_destroy+0x8b/0xe5 [ 1814.851723] qdisc_create_dflt+0x86/0x94 [ 1814.851890] ? dev_activate+0x129/0x129 [ 1814.852057] attach_one_default_qdisc+0x36/0x63 [ 1814.852232] netdev_for_each_tx_queue+0x3d/0x48 [ 1814.852406] dev_activate+0x4b/0x129 [ 1814.852569] __dev_open+0xe7/0x104 [ 1814.852730] __dev_change_flags+0xc6/0x15c [ 1814.852899] dev_change_flags+0x25/0x59 [ 1814.853064] do_setlink+0x30c/0xb3f [ 1814.853228] ? check_chain_key+0xb0/0xfd [ 1814.853396] ? check_chain_key+0xb0/0xfd [ 1814.853565] rtnl_newlink+0x3a4/0x729 [ 1814.853728] ? rtnl_newlink+0x117/0x729 [ 1814.853905] ? ns_capable_common+0xd/0xb1 [ 1814.854072] ? ns_capable+0x13/0x15 [ 1814.854234] rtnetlink_rcv_msg+0x188/0x197 [ 1814.854404] ? rcu_read_unlock+0x3e/0x5f [ 1814.854572] ? rtnl_newlink+0x729/0x729 [ 1814.854737] netlink_rcv_skb+0x6c/0xce [ 1814.854902] rtnetlink_rcv+0x23/0x2a [ 1814.855064] netlink_unicast+0x103/0x181 [ 1814.855230] netlink_sendmsg+0x326/0x337 [ 1814.855398] sock_sendmsg_nosec+0x14/0x3f [ 1814.855584] sock_sendmsg+0x29/0x2e [ 1814.855747] ___sys_sendmsg+0x209/0x28b [ 1814.855912] ? do_raw_spin_unlock+0xcd/0xf8 [ 1814.856082] ? _raw_spin_unlock+0x27/0x31 [ 1814.856251] ? __handle_mm_fault+0x651/0xdb1 [ 1814.856421] ? check_chain_key+0xb0/0xfd [ 1814.856592] __sys_sendmsg+0x45/0x63 [ 1814.856755] ? __sys_sendmsg+0x45/0x63 [ 1814.856923] SyS_sendmsg+0x19/0x1b [ 1814.857083] entry_SYSCALL_64_fastpath+0x23/0xc2 [ 1814.857256] RIP: 0033:0x7f733b2dd690 [ 1814.857419] RSP: 002b:00007ffe1d3387d8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1814.858238] RAX: ffffffffffffffda RBX: ffffffff810d278c RCX: 00007f733b2dd690 [ 1814.858445] RDX: 0000000000000000 RSI: 00007ffe1d338820 RDI: 0000000000000003 [ 1814.858651] RBP: ffff88005adcbf98 R08: 0000000000000001 R09: 0000000000000003 [ 1814.858856] R10: 00007ffe1d3385a0 R11: 0000000000000246 R12: 0000000000000002 [ 1814.859060] R13: 000000000066f1a0 R14: 00007ffe1d3408d0 R15: 0000000000000000 [ 1814.859267] ? trace_hardirqs_off_caller+0xa7/0xcf [ 1814.859446] Code: 10 55 48 89 c7 48 89 e5 e8 45 a1 fb ff 31 c0 5d c3 31 c0 c3 66 66 66 66 90 55 48 89 e5 41 56 41 55 41 54 53 49 89 fd 49 8b 45 30 <4c> 8b 20 41 8b 5c 24 38 31 c9 31 d2 48 c7 c7 50 8e 1d 82 41 89 [ 1814.860022] RIP: hrtimer_active+0x17/0x8a RSP: ffff88005adcb590 [ 1814.860214] CR2: 0000000000000000 Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation") Fixes: 0fbbeb1ba43b ("[PKT_SCHED]: Fix missing qdisc_destroy() in qdisc_create_dflt()") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/sch_netem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 30c31d746d0eb458ae327f522bc8e4c44cbea0f0 Author: Nikolay Aleksandrov Date: Wed Aug 30 12:49:02 2017 +0300 sch_fq_codel: avoid double free on init failure It is very unlikely to happen but the backlogs memory allocation could fail and will free q->flows, but then ->destroy() will free q->flows too. For correctness remove the first free and let ->destroy clean up. Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/sch_fq_codel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3501d059921246ff617b43e86250a719c140bd97 Author: Nikolay Aleksandrov Date: Wed Aug 30 12:49:01 2017 +0300 sch_cbq: fix null pointer dereferences on init failure CBQ can fail on ->init by wrong nl attributes or simply for missing any, f.e. if it's set as a default qdisc then TCA_OPTIONS (opt) will be NULL when it is activated. The first thing init does is parse opt but it will dereference a null pointer if used as a default qdisc, also since init failure at default qdisc invokes ->reset() which cancels all timers then we'll also dereference two more null pointers (timer->base) as they were never initialized. To reproduce: $ sysctl net.core.default_qdisc=cbq $ ip l set ethX up Crash log of the first null ptr deref: [44727.907454] BUG: unable to handle kernel NULL pointer dereference at (null) [44727.907600] IP: cbq_init+0x27/0x205 [44727.907676] PGD 59ff4067 [44727.907677] P4D 59ff4067 [44727.907742] PUD 59c70067 [44727.907807] PMD 0 [44727.907873] [44727.907982] Oops: 0000 [#1] SMP [44727.908054] Modules linked in: [44727.908126] CPU: 1 PID: 21312 Comm: ip Not tainted 4.13.0-rc6+ #60 [44727.908235] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [44727.908477] task: ffff88005ad42700 task.stack: ffff880037214000 [44727.908672] RIP: 0010:cbq_init+0x27/0x205 [44727.908838] RSP: 0018:ffff8800372175f0 EFLAGS: 00010286 [44727.909018] RAX: ffffffff816c3852 RBX: ffff880058c53800 RCX: 0000000000000000 [44727.909222] RDX: 0000000000000004 RSI: 0000000000000000 RDI: ffff8800372175f8 [44727.909427] RBP: ffff880037217650 R08: ffffffff81b0f380 R09: 0000000000000000 [44727.909631] R10: ffff880037217660 R11: 0000000000000020 R12: ffffffff822a44c0 [44727.909835] R13: ffff880058b92000 R14: 00000000ffffffff R15: 0000000000000001 [44727.910040] FS: 00007ff8bc583740(0000) GS:ffff88005d880000(0000) knlGS:0000000000000000 [44727.910339] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [44727.910525] CR2: 0000000000000000 CR3: 00000000371e5000 CR4: 00000000000406e0 [44727.910731] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [44727.910936] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [44727.911141] Call Trace: [44727.911291] ? lockdep_init_map+0xb6/0x1ba [44727.911461] ? qdisc_alloc+0x14e/0x187 [44727.911626] qdisc_create_dflt+0x7a/0x94 [44727.911794] ? dev_activate+0x129/0x129 [44727.911959] attach_one_default_qdisc+0x36/0x63 [44727.912132] netdev_for_each_tx_queue+0x3d/0x48 [44727.912305] dev_activate+0x4b/0x129 [44727.912468] __dev_open+0xe7/0x104 [44727.912631] __dev_change_flags+0xc6/0x15c [44727.912799] dev_change_flags+0x25/0x59 [44727.912966] do_setlink+0x30c/0xb3f [44727.913129] ? check_chain_key+0xb0/0xfd [44727.913294] ? check_chain_key+0xb0/0xfd [44727.913463] rtnl_newlink+0x3a4/0x729 [44727.913626] ? rtnl_newlink+0x117/0x729 [44727.913801] ? ns_capable_common+0xd/0xb1 [44727.913968] ? ns_capable+0x13/0x15 [44727.914131] rtnetlink_rcv_msg+0x188/0x197 [44727.914300] ? rcu_read_unlock+0x3e/0x5f [44727.914465] ? rtnl_newlink+0x729/0x729 [44727.914630] netlink_rcv_skb+0x6c/0xce [44727.914796] rtnetlink_rcv+0x23/0x2a [44727.914956] netlink_unicast+0x103/0x181 [44727.915122] netlink_sendmsg+0x326/0x337 [44727.915291] sock_sendmsg_nosec+0x14/0x3f [44727.915459] sock_sendmsg+0x29/0x2e [44727.915619] ___sys_sendmsg+0x209/0x28b [44727.915784] ? do_raw_spin_unlock+0xcd/0xf8 [44727.915954] ? _raw_spin_unlock+0x27/0x31 [44727.916121] ? __handle_mm_fault+0x651/0xdb1 [44727.916290] ? check_chain_key+0xb0/0xfd [44727.916461] __sys_sendmsg+0x45/0x63 [44727.916626] ? __sys_sendmsg+0x45/0x63 [44727.916792] SyS_sendmsg+0x19/0x1b [44727.916950] entry_SYSCALL_64_fastpath+0x23/0xc2 [44727.917125] RIP: 0033:0x7ff8bbc96690 [44727.917286] RSP: 002b:00007ffc360991e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [44727.917579] RAX: ffffffffffffffda RBX: ffffffff810d278c RCX: 00007ff8bbc96690 [44727.917783] RDX: 0000000000000000 RSI: 00007ffc36099230 RDI: 0000000000000003 [44727.917987] RBP: ffff880037217f98 R08: 0000000000000001 R09: 0000000000000003 [44727.918190] R10: 00007ffc36098fb0 R11: 0000000000000246 R12: 0000000000000006 [44727.918393] R13: 000000000066f1a0 R14: 00007ffc360a12e0 R15: 0000000000000000 [44727.918597] ? trace_hardirqs_off_caller+0xa7/0xcf [44727.918774] Code: 41 5f 5d c3 66 66 66 66 90 55 48 8d 56 04 45 31 c9 49 c7 c0 80 f3 b0 81 48 89 e5 41 55 41 54 53 48 89 fb 48 8d 7d a8 48 83 ec 48 <0f> b7 0e be 07 00 00 00 83 e9 04 e8 e6 f7 d8 ff 85 c0 0f 88 bb [44727.919332] RIP: cbq_init+0x27/0x205 RSP: ffff8800372175f0 [44727.919516] CR2: 0000000000000000 Fixes: 0fbbeb1ba43b ("[PKT_SCHED]: Fix missing qdisc_destroy() in qdisc_create_dflt()") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/sch_cbq.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 3bdac362a2f89ed3e148fa6f38c5f5d858f50b1a Author: Nikolay Aleksandrov Date: Wed Aug 30 12:49:00 2017 +0300 sch_hfsc: fix null pointer deref and double free on init failure Depending on where ->init fails we can get a null pointer deref due to uninitialized hires timer (watchdog) or a double free of the qdisc hash because it is already freed by ->destroy(). Fixes: 8d5537387505 ("net/sched/hfsc: allocate tcf block for hfsc root class") Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/sch_hfsc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 32db864d33c21fd70a217ba53cb7224889354ffb Author: Nikolay Aleksandrov Date: Wed Aug 30 12:48:59 2017 +0300 sch_hhf: fix null pointer dereference on init failure If sch_hhf fails in its ->init() function (either due to wrong user-space arguments as below or memory alloc failure of hh_flows) it will do a null pointer deref of q->hh_flows in its ->destroy() function. To reproduce the crash: $ tc qdisc add dev eth0 root hhf quantum 2000000 non_hh_weight 10000000 Crash log: [ 690.654882] BUG: unable to handle kernel NULL pointer dereference at (null) [ 690.655565] IP: hhf_destroy+0x48/0xbc [ 690.655944] PGD 37345067 [ 690.655948] P4D 37345067 [ 690.656252] PUD 58402067 [ 690.656554] PMD 0 [ 690.656857] [ 690.657362] Oops: 0000 [#1] SMP [ 690.657696] Modules linked in: [ 690.658032] CPU: 3 PID: 920 Comm: tc Not tainted 4.13.0-rc6+ #57 [ 690.658525] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 690.659255] task: ffff880058578000 task.stack: ffff88005acbc000 [ 690.659747] RIP: 0010:hhf_destroy+0x48/0xbc [ 690.660146] RSP: 0018:ffff88005acbf9e0 EFLAGS: 00010246 [ 690.660601] RAX: 0000000000000000 RBX: 0000000000000020 RCX: 0000000000000000 [ 690.661155] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffff821f63f0 [ 690.661710] RBP: ffff88005acbfa08 R08: ffffffff81b10a90 R09: 0000000000000000 [ 690.662267] R10: 00000000f42b7019 R11: ffff880058578000 R12: 00000000ffffffea [ 690.662820] R13: ffff8800372f6400 R14: 0000000000000000 R15: 0000000000000000 [ 690.663769] FS: 00007f8ae5e8b740(0000) GS:ffff88005d980000(0000) knlGS:0000000000000000 [ 690.667069] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 690.667965] CR2: 0000000000000000 CR3: 0000000058523000 CR4: 00000000000406e0 [ 690.668918] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 690.669945] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 690.671003] Call Trace: [ 690.671743] qdisc_create+0x377/0x3fd [ 690.672534] tc_modify_qdisc+0x4d2/0x4fd [ 690.673324] rtnetlink_rcv_msg+0x188/0x197 [ 690.674204] ? rcu_read_unlock+0x3e/0x5f [ 690.675091] ? rtnl_newlink+0x729/0x729 [ 690.675877] netlink_rcv_skb+0x6c/0xce [ 690.676648] rtnetlink_rcv+0x23/0x2a [ 690.677405] netlink_unicast+0x103/0x181 [ 690.678179] netlink_sendmsg+0x326/0x337 [ 690.678958] sock_sendmsg_nosec+0x14/0x3f [ 690.679743] sock_sendmsg+0x29/0x2e [ 690.680506] ___sys_sendmsg+0x209/0x28b [ 690.681283] ? __handle_mm_fault+0xc7d/0xdb1 [ 690.681915] ? check_chain_key+0xb0/0xfd [ 690.682449] __sys_sendmsg+0x45/0x63 [ 690.682954] ? __sys_sendmsg+0x45/0x63 [ 690.683471] SyS_sendmsg+0x19/0x1b [ 690.683974] entry_SYSCALL_64_fastpath+0x23/0xc2 [ 690.684516] RIP: 0033:0x7f8ae529d690 [ 690.685016] RSP: 002b:00007fff26d2d6b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 690.685931] RAX: ffffffffffffffda RBX: ffffffff810d278c RCX: 00007f8ae529d690 [ 690.686573] RDX: 0000000000000000 RSI: 00007fff26d2d700 RDI: 0000000000000003 [ 690.687047] RBP: ffff88005acbff98 R08: 0000000000000001 R09: 0000000000000000 [ 690.687519] R10: 00007fff26d2d480 R11: 0000000000000246 R12: 0000000000000002 [ 690.687996] R13: 0000000001258070 R14: 0000000000000001 R15: 0000000000000000 [ 690.688475] ? trace_hardirqs_off_caller+0xa7/0xcf [ 690.688887] Code: 00 00 e8 2a 02 ae ff 49 8b bc 1d 60 02 00 00 48 83 c3 08 e8 19 02 ae ff 48 83 fb 20 75 dc 45 31 f6 4d 89 f7 4d 03 bd 20 02 00 00 <49> 8b 07 49 39 c7 75 24 49 83 c6 10 49 81 fe 00 40 00 00 75 e1 [ 690.690200] RIP: hhf_destroy+0x48/0xbc RSP: ffff88005acbf9e0 [ 690.690636] CR2: 0000000000000000 Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation") Fixes: 10239edf86f1 ("net-qdisc-hhf: Heavy-Hitter Filter (HHF) qdisc") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/sch_hhf.c | 3 +++ 1 file changed, 3 insertions(+) commit e89d469e3be3ed3d7124a803211a463ff83d0964 Author: Nikolay Aleksandrov Date: Wed Aug 30 12:48:58 2017 +0300 sch_multiq: fix double free on init failure The below commit added a call to ->destroy() on init failure, but multiq still frees ->queues on error in init, but ->queues is also freed by ->destroy() thus we get double free and corrupted memory. Very easy to reproduce (eth0 not multiqueue): $ tc qdisc add dev eth0 root multiq RTNETLINK answers: Operation not supported $ ip l add dumdum type dummy (crash) Trace log: [ 3929.467747] general protection fault: 0000 [#1] SMP [ 3929.468083] Modules linked in: [ 3929.468302] CPU: 3 PID: 967 Comm: ip Not tainted 4.13.0-rc6+ #56 [ 3929.468625] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 3929.469124] task: ffff88003716a700 task.stack: ffff88005872c000 [ 3929.469449] RIP: 0010:__kmalloc_track_caller+0x117/0x1be [ 3929.469746] RSP: 0018:ffff88005872f6a0 EFLAGS: 00010246 [ 3929.470042] RAX: 00000000000002de RBX: 0000000058a59000 RCX: 00000000000002df [ 3929.470406] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff821f7020 [ 3929.470770] RBP: ffff88005872f6e8 R08: 000000000001f010 R09: 0000000000000000 [ 3929.471133] R10: ffff88005872f730 R11: 0000000000008cdd R12: ff006d75646d7564 [ 3929.471496] R13: 00000000014000c0 R14: ffff88005b403c00 R15: ffff88005b403c00 [ 3929.471869] FS: 00007f0b70480740(0000) GS:ffff88005d980000(0000) knlGS:0000000000000000 [ 3929.472286] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3929.472677] CR2: 00007ffcee4f3000 CR3: 0000000059d45000 CR4: 00000000000406e0 [ 3929.473209] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3929.474109] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3929.474873] Call Trace: [ 3929.475337] ? kstrdup_const+0x23/0x25 [ 3929.475863] kstrdup+0x2e/0x4b [ 3929.476338] kstrdup_const+0x23/0x25 [ 3929.478084] __kernfs_new_node+0x28/0xbc [ 3929.478478] kernfs_new_node+0x35/0x55 [ 3929.478929] kernfs_create_link+0x23/0x76 [ 3929.479478] sysfs_do_create_link_sd.isra.2+0x85/0xd7 [ 3929.480096] sysfs_create_link+0x33/0x35 [ 3929.480649] device_add+0x200/0x589 [ 3929.481184] netdev_register_kobject+0x7c/0x12f [ 3929.481711] register_netdevice+0x373/0x471 [ 3929.482174] rtnl_newlink+0x614/0x729 [ 3929.482610] ? rtnl_newlink+0x17f/0x729 [ 3929.483080] rtnetlink_rcv_msg+0x188/0x197 [ 3929.483533] ? rcu_read_unlock+0x3e/0x5f [ 3929.483984] ? rtnl_newlink+0x729/0x729 [ 3929.484420] netlink_rcv_skb+0x6c/0xce [ 3929.484858] rtnetlink_rcv+0x23/0x2a [ 3929.485291] netlink_unicast+0x103/0x181 [ 3929.485735] netlink_sendmsg+0x326/0x337 [ 3929.486181] sock_sendmsg_nosec+0x14/0x3f [ 3929.486614] sock_sendmsg+0x29/0x2e [ 3929.486973] ___sys_sendmsg+0x209/0x28b [ 3929.487340] ? do_raw_spin_unlock+0xcd/0xf8 [ 3929.487719] ? _raw_spin_unlock+0x27/0x31 [ 3929.488092] ? __handle_mm_fault+0x651/0xdb1 [ 3929.488471] ? check_chain_key+0xb0/0xfd [ 3929.488847] __sys_sendmsg+0x45/0x63 [ 3929.489206] ? __sys_sendmsg+0x45/0x63 [ 3929.489576] SyS_sendmsg+0x19/0x1b [ 3929.489901] entry_SYSCALL_64_fastpath+0x23/0xc2 [ 3929.490172] RIP: 0033:0x7f0b6fb93690 [ 3929.490423] RSP: 002b:00007ffcee4ed588 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 3929.490881] RAX: ffffffffffffffda RBX: ffffffff810d278c RCX: 00007f0b6fb93690 [ 3929.491198] RDX: 0000000000000000 RSI: 00007ffcee4ed5d0 RDI: 0000000000000003 [ 3929.491521] RBP: ffff88005872ff98 R08: 0000000000000001 R09: 0000000000000000 [ 3929.491801] R10: 00007ffcee4ed350 R11: 0000000000000246 R12: 0000000000000002 [ 3929.492075] R13: 000000000066f1a0 R14: 00007ffcee4f5680 R15: 0000000000000000 [ 3929.492352] ? trace_hardirqs_off_caller+0xa7/0xcf [ 3929.492590] Code: 8b 45 c0 48 8b 45 b8 74 17 48 8b 4d c8 83 ca ff 44 89 ee 4c 89 f7 e8 83 ca ff ff 49 89 c4 eb 49 49 63 56 20 48 8d 48 01 4d 8b 06 <49> 8b 1c 14 48 89 c2 4c 89 e0 65 49 0f c7 08 0f 94 c0 83 f0 01 [ 3929.493335] RIP: __kmalloc_track_caller+0x117/0x1be RSP: ffff88005872f6a0 Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation") Fixes: f07d1501292b ("multiq: Further multiqueue cleanup") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/sch_multiq.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 88c2ace69dbef696edba77712882af03879abc9c Author: Nikolay Aleksandrov Date: Wed Aug 30 12:48:57 2017 +0300 sch_htb: fix crash on init failure The commit below added a call to the ->destroy() callback for all qdiscs which failed in their ->init(), but some were not prepared for such change and can't handle partially initialized qdisc. HTB is one of them and if any error occurs before the qdisc watchdog timer and qdisc work are initialized then we can hit either a null ptr deref (timer->base) when canceling in ->destroy or lockdep error info about trying to register a non-static key and a stack dump. So to fix these two move the watchdog timer and workqueue init before anything that can err out. To reproduce userspace needs to send broken htb qdisc create request, tested with a modified tc (q_htb.c). Trace log: [ 2710.897602] BUG: unable to handle kernel NULL pointer dereference at (null) [ 2710.897977] IP: hrtimer_active+0x17/0x8a [ 2710.898174] PGD 58fab067 [ 2710.898175] P4D 58fab067 [ 2710.898353] PUD 586c0067 [ 2710.898531] PMD 0 [ 2710.898710] [ 2710.899045] Oops: 0000 [#1] SMP [ 2710.899232] Modules linked in: [ 2710.899419] CPU: 1 PID: 950 Comm: tc Not tainted 4.13.0-rc6+ #54 [ 2710.899646] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 2710.900035] task: ffff880059ed2700 task.stack: ffff88005ad4c000 [ 2710.900262] RIP: 0010:hrtimer_active+0x17/0x8a [ 2710.900467] RSP: 0018:ffff88005ad4f960 EFLAGS: 00010246 [ 2710.900684] RAX: 0000000000000000 RBX: ffff88003701e298 RCX: 0000000000000000 [ 2710.900933] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88003701e298 [ 2710.901177] RBP: ffff88005ad4f980 R08: 0000000000000001 R09: 0000000000000001 [ 2710.901419] R10: ffff88005ad4f800 R11: 0000000000000400 R12: 0000000000000000 [ 2710.901663] R13: ffff88003701e298 R14: ffffffff822a4540 R15: ffff88005ad4fac0 [ 2710.901907] FS: 00007f2f5e90f740(0000) GS:ffff88005d880000(0000) knlGS:0000000000000000 [ 2710.902277] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2710.902500] CR2: 0000000000000000 CR3: 0000000058ca3000 CR4: 00000000000406e0 [ 2710.902744] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2710.902977] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2710.903180] Call Trace: [ 2710.903332] hrtimer_try_to_cancel+0x1a/0x93 [ 2710.903504] hrtimer_cancel+0x15/0x20 [ 2710.903667] qdisc_watchdog_cancel+0x12/0x14 [ 2710.903866] htb_destroy+0x2e/0xf7 [ 2710.904097] qdisc_create+0x377/0x3fd [ 2710.904330] tc_modify_qdisc+0x4d2/0x4fd [ 2710.904511] rtnetlink_rcv_msg+0x188/0x197 [ 2710.904682] ? rcu_read_unlock+0x3e/0x5f [ 2710.904849] ? rtnl_newlink+0x729/0x729 [ 2710.905017] netlink_rcv_skb+0x6c/0xce [ 2710.905183] rtnetlink_rcv+0x23/0x2a [ 2710.905345] netlink_unicast+0x103/0x181 [ 2710.905511] netlink_sendmsg+0x326/0x337 [ 2710.905679] sock_sendmsg_nosec+0x14/0x3f [ 2710.905847] sock_sendmsg+0x29/0x2e [ 2710.906010] ___sys_sendmsg+0x209/0x28b [ 2710.906176] ? do_raw_spin_unlock+0xcd/0xf8 [ 2710.906346] ? _raw_spin_unlock+0x27/0x31 [ 2710.906514] ? __handle_mm_fault+0x651/0xdb1 [ 2710.906685] ? check_chain_key+0xb0/0xfd [ 2710.906855] __sys_sendmsg+0x45/0x63 [ 2710.907018] ? __sys_sendmsg+0x45/0x63 [ 2710.907185] SyS_sendmsg+0x19/0x1b [ 2710.907344] entry_SYSCALL_64_fastpath+0x23/0xc2 Note that probably this bug goes further back because the default qdisc handling always calls ->destroy on init failure too. Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation") Fixes: 0fbbeb1ba43b ("[PKT_SCHED]: Fix missing qdisc_destroy() in qdisc_create_dflt()") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/sch_htb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 94249117e740de63796d4ac48678e06c4b5ecac1 Merge: c02bf3e 58aec87 Author: Linus Torvalds Date: Wed Aug 30 15:10:56 2017 -0700 Merge tag 'drm-fixes-for-v4.13-rc8' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Two fixes (a vmwgfx and core drm fix) in the queue for 4.13 final, hopefully that is it" * tag 'drm-fixes-for-v4.13-rc8' of git://people.freedesktop.org/~airlied/linux: drm/vmwgfx: Fix F26 Wayland screen update issue drm/bridge/sii8620: Fix memory corruption commit c02bf3e5a698073ed1927365a6a1e70e60baf4ae Merge: 0761fc1 47c4ccd Author: Linus Torvalds Date: Wed Aug 30 15:03:00 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three minor fixes: a NULL deref in qedf, an off by one in sg and a fix to IPR to prevent an error on initialisation" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qedf: Fix a potential NULL pointer dereference scsi: sg: off by one in sg_ioctl() scsi: ipr: Set no_report_opcodes for RAID arrays commit 0761fc15e353aab18e60efacb2faad0b873d3fa8 Merge: dd689a6 2fb4460 Author: Linus Torvalds Date: Wed Aug 30 14:59:38 2017 -0700 Merge branch 'for-linus-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML fix from Richard Weinberger: "This contains a single fix for a regression which was introduced while the merge window" * 'for-linus-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Fix check for _xstate for older hosts commit dd689a68bc3551ad7bdff2c881fede5f0bd12cfa Merge: 36fde05 cec80d8 Author: Linus Torvalds Date: Wed Aug 30 14:54:24 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha update from Matt Turner: "A few fixes and wires up some additional syscalls." [ Some of this is technically not really rc7 material, but it's alpha, and it all looks safe anyway. Matt explains: "My alpha has been offline, hence the very late-in-cycle pull request" and hasn't caused problems before, so he gets to slide. - Linus ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: uapi: Add support for __SANE_USERSPACE_TYPES__ alpha: Define ioremap_wc alpha: Fix section mismatches alpha: support R_ALPHA_REFLONG relocations for module loading alpha: Fix typo in ev6-copy_user.S alpha: Package string routines together alpha: Update for new syscalls alpha: Fix build error without CONFIG_VGA_HOSE. commit 6e3c1529c39e92ed64ca41d53abadabbaa1d5393 Author: Steve French Date: Sun Aug 27 16:56:08 2017 -0500 CIFS: remove endian related sparse warning Recent patch had an endian warning ie cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup() Signed-off-by: Steve French CC: Ronnie Sahlberg CC: Stable Acked-by: Pavel Shilovsky fs/cifs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e37b1784f2be9397a903307574ee565bbadfd75 Author: Pavel Shilovsky Date: Thu Aug 24 15:16:40 2017 -0700 CIFS: Fix maximum SMB2 header size Currently the maximum size of SMB2/3 header is set incorrectly which leads to hanging of directory listing operations on encrypted SMB3 connections. Fix this by setting the maximum size to 170 bytes that is calculated as RFC1002 length field size (4) + transform header size (52) + SMB2 header size (64) + create response size (56). Cc: Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French Acked-by: Sachin Prabhu fs/cifs/smb2pdu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1213ad28f9595a08e3877248bbba1a25c40225d6 Author: Tal Gilboa Date: Mon Aug 28 18:45:08 2017 +0300 net/mlx5e: Fix CQ moderation mode not set properly cq_period_mode assignment was mistakenly removed so it was always set to "0", which is EQE based moderation, regardless of the device CAPs and requested value in ethtool. Fixes: 6a9764efb255 ("net/mlx5e: Isolate open_channels from priv->params") Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + 1 file changed, 1 insertion(+) commit 6aace17e64f4aa1c49802c46bd10688968b3787f Author: Moshe Shemesh Date: Tue Aug 8 15:56:37 2017 +0300 net/mlx5e: Fix inline header size for small packets Fix inline header size, make sure it is not greater than skb len. This bug effects small packets, for example L2 packets with size < 18. Fixes: ae76715d153e ("net/mlx5e: Check the minimum inline header mode before xmit") Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 191220396db840822fc818edf03c49f0c02eb237 Author: Shahar Klein Date: Tue Aug 1 15:29:55 2017 +0300 net/mlx5: E-Switch, Unload the representors in the correct order When changing from switchdev to legacy mode, all the representor port devices (uplink nic and reps) are cleaned up. Part of this cleaning process is removing the neigh entries and the hash table containing them. However, a representor neigh entry might be linked to the uplink port hash table and if the uplink nic is cleaned first the cleaning of the representor will end up in null deref. Fix that by unloading the representors in the opposite order of load. Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors") Signed-off-by: Shahar Klein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08820528c9d3ff0d0eda047d7ef5ecac2da1ef6c Author: Paul Blakey Date: Tue Aug 22 13:51:56 2017 +0300 net/mlx5e: Properly resolve TC offloaded ipv6 vxlan tunnel source address Currently if vxlan tunnel ipv6 src isn't supplied the driver fails to resolve it as part of the route lookup. The resulting encap header is left with a zeroed out ipv6 src address so the packets are sent with this src ip. Use an appropriate route lookup API that also resolves the source ipv6 address if it's not supplied. Fixes: ce99f6b97fcd ('net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels') Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5a8e12678c767ccf8bb16d6237569e4a707d655b Author: Inbar Karmy Date: Mon Aug 14 16:12:16 2017 +0300 net/mlx5e: Don't override user RSS upon set channels Currently, increasing the number of combined channels is changing the RSS spread to use the new created channels. Prevent the RSS spread change in case the user explicitly declare it, to avoid overriding user configuration. Tested: when RSS default: # ethtool -L ens8 combined 4 RSS spread will change and point to 4 channels. # ethtool -X ens8 equal 4 # ethtool -L ens8 combined 6 RSS will not change after increasing the number of the channels. Fixes: 8bf368620486 ('ethtool: ensure channel counts are within bounds during SCHANNELS') Signed-off-by: Inbar Karmy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0556ce72ab16156af6c94cdc7964e4310acc97c0 Author: Eran Ben Elisha Date: Wed Aug 16 14:37:11 2017 +0300 net/mlx5e: Fix dangling page pointer on DMA mapping error Function mlx5e_dealloc_rx_wqe is using page pointer value as an indication to valid DMA mapping. In case that the mapping failed, we released the page but kept the dangling pointer. Store the page pointer only after the DMA mapping passed to avoid invalid page DMA unmap. Fixes: bc77b240b3c5 ("net/mlx5e: Add fragmented memory support for RX multi packet WQE") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10a8d00707082955b177164d4b4e758ffcbd4017 Author: Huy Nguyen Date: Wed Aug 9 10:03:40 2017 -0500 net/mlx5: Remove the flag MLX5_INTERFACE_STATE_SHUTDOWN MLX5_INTERFACE_STATE_SHUTDOWN is not used in the code. Fixes: 5fc7197d3a25 ("net/mlx5: Add pci shutdown callback") Signed-off-by: Huy Nguyen Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 -- include/linux/mlx5/driver.h | 1 - 2 files changed, 3 deletions(-) commit b3cb5388499c5e219324bfe7da2e46cbad82bfcf Author: Huy Nguyen Date: Tue Aug 8 13:17:00 2017 -0500 net/mlx5: Skip mlx5_unload_one if mlx5_load_one fails There is an issue where the firmware fails during mlx5_load_one, the health_care timer detects the issue and schedules a health_care call. Then the mlx5_load_one detects the issue, cleans up and quits. Then the health_care starts and calls mlx5_unload_one to clean up the resources that no longer exist and causes kernel panic. The root cause is that the bit MLX5_INTERFACE_STATE_DOWN is not set after mlx5_load_one fails. The solution is removing the bit MLX5_INTERFACE_STATE_DOWN and quit mlx5_unload_one if the bit MLX5_INTERFACE_STATE_UP is not set. The bit MLX5_INTERFACE_STATE_DOWN is redundant and we can use MLX5_INTERFACE_STATE_UP instead. Fixes: 5fc7197d3a25 ("net/mlx5: Add pci shutdown callback") Signed-off-by: Huy Nguyen Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +--- include/linux/mlx5/driver.h | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) commit 672d0880b7798a917bcc622308f25a0fbb991dab Author: Noa Osherovich Date: Sun Jul 30 13:55:48 2017 +0300 net/mlx5: Fix arm SRQ command for ISSI version 0 Support for ISSI version 0 was recently broken as the arm_srq_cmd command, which is used only for ISSI version 0, was given the opcode for ISSI version 1 instead of ISSI version 0. Change arm_srq_cmd to use the correct command opcode for ISSI version 0. Fixes: af1ba291c5e4 ('{net, IB}/mlx5: Refactor internal SRQ API') Signed-off-by: Noa Osherovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/srq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9e10bf1d349787f373484d835efe2dbb5f9c5614 Author: Huy Nguyen Date: Mon Jul 10 14:00:23 2017 -0500 net/mlx5e: Fix DCB_CAP_ATTR_DCBX capability for DCBNL getcap. Current code doesn't report DCB_CAP_DCBX_HOST capability when query through getcap. User space lldptool expects capability to have HOST mode set when it wants to configure DCBX CEE mode. In absence of HOST mode capability, lldptool fails to switch to CEE mode. This fix returns DCB_CAP_DCBX_HOST capability when port's DCBX controlled mode is under software control. Fixes: 3a6a931dfb8e ("net/mlx5e: Support DCBX CEE API") Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) commit 33c52b6718d2a6cb414440c98560818910d896dc Author: Huy Nguyen Date: Thu Jul 13 13:45:11 2017 -0500 net/mlx5e: Check for qos capability in dcbnl_initialize qos capability is the master capability bit that determines if the DCBX is supported for the PCI function. If this bit is off, driver cannot run any dcbx code. Fixes: e207b7e99176 ("net/mlx5e: ConnectX-4 firmware support for DCBX") Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 3 +++ 1 file changed, 3 insertions(+) commit 1b4a56cd7f5c2f835ffae2a8204fb95597269b10 Author: Lucas Stach Date: Tue Aug 29 17:51:22 2017 +0200 ASoC: simple_card_utils: fix fallback when "label" property isn't present snd_soc_of_parse_card_name() doesn't return an error if the requested property isn't present, but silently fails to fill the card name. This can not be changed, as it is a backwards compatibility measure itself. We can not rely on the return value of this function alone, but must check if the card name has been filled sucessfully when deciding to skip the fallback path, which is in place for existing users. Fixes: dedfaa1eedc7 (ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_name) Signed-off-by: Lucas Stach Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0e82d737d1b727e93adec16cf7132391249356a Author: Sekhar Nori Date: Wed Aug 30 13:37:13 2017 +0530 net: ti: cpsw-common: dont print error if ti_cm_get_macid() fails It is quite common for ti_cm_get_macid() to fail on some of the platforms it is invoked on. They include any platform where mac address is not part of SoC register space. On these platforms, mac address is read and populated in device-tree by bootloader. An example is TI DA850. Downgrade the severity of message to "information", so it does not spam logs when 'quiet' boot is desired. Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ef10f3cddb56c65881301d6b4d39c475369be5d Merge: 015a2f8 223694b Author: Jens Axboe Date: Wed Aug 30 09:10:09 2017 -0600 Merge branch 'nvme-4.13' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "Three more fixes for 4.13 below: - fix the incorrect bit for the doorbell buffer features (Changpeng Liu) - always use a 4k MR page size for RDMA, to not get in trouble with offset in non-4k page size systems (no-op for x86) (Max Gurtovoy) - and a fix for the new nvme host memory buffer support to keep the descriptor list DMA mapped when the buffer is enabled (me)" commit a0ac89b57207ccc87d76f4e6aa9a83026743861b Author: Thomas Petazzoni Date: Wed Aug 30 12:15:37 2017 +0200 arm64: dts: marvell: fix number of GPIOs in Armada AP806 description The Armada AP806 has 20 pins, and therefore 20 GPIOs (from 0 to 19 included) and not 19 pins. Therefore, we fix the Device Tree description for the GPIO controller. Before this patch: $ cat /sys/kernel/debug/pinctrl/f06f4000.system-controller:pinctrl/gpio-ranges GPIO ranges handled: 0: mvebu-gpio GPIOS [0 - 19] PINS [0 - 19] 0: f06f4000.system-controller:gpio GPIOS [0 - 18] PINS [0 - 18] After this patch: $ cat /sys/kernel/debug/pinctrl/f06f4000.system-controller:pinctrl/gpio-ranges GPIO ranges handled: 0: mvebu-gpio GPIOS [0 - 19] PINS [0 - 19] 0: f06f4000.system-controller:gpio GPIOS [0 - 19] PINS [0 - 19] Fixes: 63dac0f4924b9 ("arm64: dts: marvell: add gpio support for Armada 7K/8K") Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcab3a6e64a9647e022b46182c9687a8c3aa9d11 Author: Takashi Iwai Date: Wed Aug 30 14:50:07 2017 +0200 ALSA: pcm: Fix power lock unbalance via OSS emulation PCM OSS emulation issues the drain ioctl without power lock. It used to work in the earlier kernels as the power lock was taken inside snd_pcm_drain() itself. But since 68b4acd32249 ("ALSA: pcm: Apply power lock globally to common ioctls"), the power lock is taken outside the function. Due to that change, the call via OSS emulation leads to the unbalanced power lock, thus it deadlocks. As a quick fix, just take the power lock before snd_pcm_drain() call for OSS emulation path. A better cleanup will follow later. Fixes: 68b4acd32249 ("ALSA: pcm: Apply power lock globally to common ioctls") Reported-and-tested-by: Markus Trippelsdorf Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 223694b9ae8bfba99f3528d49d07a740af6ff95a Author: Changpeng Liu Date: Thu Aug 31 11:22:49 2017 +0800 nvme: fix the definition of the doorbell buffer config support bit NVMe 1.3 specification defines the Optional Admin Command Support feature flags, bit 8 set to '1' then the controller supports the Doorbell Buffer Config command. Bit 7 is used for Virtualization Mangement command. Signed-off-by: Changpeng Liu Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Fixes: f9f38e33 ("nvme: improve performance for virtual NVMe devices") Cc: stable@vger.kernel.org include/linux/nvme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4033f35d174af4804a79fd5731d9e6be976f9f28 Author: Christoph Hellwig Date: Mon Aug 28 10:47:18 2017 +0200 nvme-pci: use dma memory for the host memory buffer descriptors The NVMe 1.3 specification says in section 5.21.1.13: "After a successful completion of a Set Features enabling the host memory buffer, the host shall not write to the associated host memory region, buffer size, or descriptor list until the host memory buffer has been disabled." While this doesn't state that the descriptor list must remain accessible to the device it certainly implies it must remaing readable by the device. So switch to a dma coherent allocation for the descriptor list just to be safe - it's not like the cost for it matters compared to the actual memory buffers. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Fixes: 87ad72a59a38 ("nvme-pci: implement host memory buffer support") drivers/nvme/host/pci.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit b925a2dc165e5ec2330ca1256704faef8ed96913 Author: Max Gurtovoy Date: Mon Aug 28 12:52:27 2017 +0300 nvme-rdma: default MR page size to 4k Due to various page sizes in the system (IOMMU/device/kernel), we set the fabrics controller page size to 4k and block layer boundaries accordinglly. In architectures that uses different kernel page size we'll have a mismatch to the MR page size that may cause a mapping error. Update the MR page size to correspond to the core ctrl settings. Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 99c14fc360dbbb583a03ab985551b12b5c5ca4f1 Author: Zhoujie Wu Date: Mon Aug 21 11:02:09 2017 -0700 mmc: sdhci-xenon: add set_power callback Xenon sdh controller requests proper SD bus voltage select bits programmed even with vmmc power supply. Any reserved value(100b-000b) programmed in this field will lead to controller ignore SD bus power bit and keep its value at zero. Add set_power callback to handle this. Signed-off-by: Zhoujie Wu Acked-by: Adrian Hunter Tested-by: Gregory CLEMENT Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality") Cc: Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2c0e8382386f618c85d20cb05e7cf7df8cdd382c Author: James Hogan Date: Sat Aug 12 21:36:09 2017 -0700 irqchip: mips-gic: SYNC after enabling GIC region A SYNC is required between enabling the GIC region and actually trying to use it, even if the first access is a read, otherwise its possible depending on the timing (and in my case depending on the precise alignment of certain kernel code) to hit CM bus errors on that first access. Add the SYNC straight after setting the GIC base. [paul.burton@imgtec.com: Changes later in this series increase our likelihood of hitting this by reducing the amount of code that runs between enabling the GIC & accessing it.] Fixes: a7057270c280 ("irqchip: mips-gic: Add device-tree support") Signed-off-by: James Hogan Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Thomas Gleixner Cc: Jason Cooper Cc: James Hogan Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: # 3.19.x- Patchwork: https://patchwork.linux-mips.org/patch/17019/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a7c17d8ae4918afe527c141cc20ed34dfe18e7db Author: Adrian Hunter Date: Fri Aug 25 15:43:45 2017 +0300 mmc: block: Fix block status codes Commit 2a842acab109 ("block: introduce new block status code type") changed the error type but not in patches merged through the mmc tree, like commit 0493f6fe5bde ("mmc: block: Move boot partition locking into a driver op"). Fix one error code that is incorrect and also use BLK_STS_OK in preference to 0. Fixes: 17ece345a042 ("Merge tag 'mmc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc") Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 58aec872658b7beab6919073d3f629e18f0df7bd Merge: e38f516 021aba7 Author: Dave Airlie Date: Wed Aug 30 18:41:45 2017 +1000 Merge branch 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux into drm-fixes Single vmwgfx fix. * 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: Fix F26 Wayland screen update issue commit fabed5ad230a5ff8320b2928ec20a52e59a9bf60 Merge: 93a4c83 fe45174 Author: Olof Johansson Date: Tue Aug 29 22:39:18 2017 -0700 Merge tag 'sunxi-fixes-for-4.13-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Allwinner fixes for 4.13, take 3 This is a revert of the EMAC bindings. The discussion has not settled down yet on a proper representation of the PHY, and therefore we cannot commit to a binding yet * tag 'sunxi-fixes-for-4.13-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm: dts: sunxi: Revert EMAC changes arm64: dts: allwinner: Revert EMAC changes dt-bindings: net: Revert sun8i dwmac binding Signed-off-by: Olof Johansson commit 183db481279437590f75a8a0479d512e5dd597de Author: Quan Nguyen Date: Tue Aug 29 15:43:12 2017 -0700 drivers: net: xgene: Correct probe sequence handling The phy is connected at early stage of probe but not properly disconnected if error occurs. This patch fixes the issue. Also changing the return type of xgene_enet_check_phy_handle(), since this function always returns success. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 27 ++++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) commit e7562597b46d099a78d45c781ee8d1a7a93c53f1 Author: Dan Carpenter Date: Tue Aug 29 22:15:16 2017 +0300 nfp: double free on error in probe Both the nfp_net_pf_app_start() and the nfp_net_pci_probe() functions call nfp_net_pf_app_stop_ctrl(pf) so there is a double free. The free should be done from the probe function because it's allocated there so I have removed the call from nfp_net_pf_app_start(). Fixes: 02082701b974 ("nfp: create control vNICs and wire up rx/tx") Signed-off-by: Dan Carpenter Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit beae041307004de7965bfe43307a0e48c8ca40d1 Merge: edbd58b 6d3f58e Author: David S. Miller Date: Tue Aug 29 15:11:44 2017 -0700 Merge branch 'aquantia-fixes' Pavel Belous says: ==================== net:ethernet:aquantia: Atlantic driver Update 2017-08-23 This series contains updates for aQuantia Atlantic driver. It has bugfixes and some improvements. Changes in v2: - "MCP state change" fix removed (will be sent as a separate fix after further investigation.) ==================== Signed-off-by: David S. Miller commit 6d3f58e09f0c1457aa5a6c60e5da08786dd8a18e Author: Pavel Belous Date: Mon Aug 28 21:52:13 2017 +0300 net:ethernet:aquantia: Show info message if bad firmware version detected. We should inform user about wrong firmware version by printing message in dmesg. Fixes: 3d2ff7eebe26 ("net: ethernet: aquantia: Atlantic hardware abstraction layer") Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b21f502f84be082fb63cca8e7ab6eb8f7ee88024 Author: Igor Russkikh Date: Mon Aug 28 21:52:12 2017 +0300 net:ethernet:aquantia: Fix for multicast filter handling. Since the HW supports up to 32 multicast filters we should track count of multicast filters to avoid overflow. If we attempt to add >32 multicast filter - just set NETIF_ALLMULTI flag instead. Fixes: 94f6c9e4cdf6 ("net: ethernet: aquantia: Support for NIC-specific code") Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit bd8ed4415ff8584ccdd1f61c8d7279dc1f9e623e Author: Pavel Belous Date: Mon Aug 28 21:52:11 2017 +0300 net:ethernet:aquantia: Fix for incorrect speed index. The driver choose the optimal interrupt throttling settings depends of current link speed. Due this bug link_status field from aq_hw is never updated and as result always used same interrupt throttling values. Fixes: 3d2ff7eebe26 ("net: ethernet: aquantia: Atlantic hardware abstraction layer") Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 3 +-- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 31 ++++++++++------------ .../aquantia/atlantic/hw_atl/hw_atl_utils.c | 4 +-- .../aquantia/atlantic/hw_atl/hw_atl_utils.h | 3 +-- 4 files changed, 18 insertions(+), 23 deletions(-) commit 0a402e7b9725611069dad4c873d1516f8c805f38 Author: Pavel Belous Date: Mon Aug 28 21:52:10 2017 +0300 net:ethernet:aquantia: Workaround for HW checksum bug. The hardware has the HW Checksum Offload bug when small TCP patckets (with length <= 60 bytes) has wrong "checksum valid" bit. The solution is - ignore checksum valid bit for small packets (with length <= 60 bytes) and mark this as CHECKSUM_NONE to allow network stack recalculate checksum itself. Fixes: ccf9a5ed14be ("net: ethernet: aquantia: Atlantic A0 and B0 specific functions.") Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 6 ++++++ drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 6 ++++++ 2 files changed, 12 insertions(+) commit 64fc7953ffd9424726988dd04945c28141ee41af Author: Pavel Belous Date: Mon Aug 28 21:52:09 2017 +0300 net:ethernet:aquantia: Fix for number of RSS queues. The number of RSS queues should be not more than numbers of CPU. Its does not make sense to increase perfomance, and also cause problems on some motherboards. Fixes: 94f6c9e4cdf6 ("net: ethernet: aquantia: Support for NIC-specific code") Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++ 1 file changed, 2 insertions(+) commit 278175aba363dcc5b0978abe16fa39dcdca67ffb Author: Pavel Belous Date: Mon Aug 28 21:52:08 2017 +0300 net:ethernet:aquantia: Extra spinlocks removed. This patch removes datapath spinlocks which does not perform any useful work. Fixes: 6e70637f9f1e ("net: ethernet: aquantia: Add ring support code") Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 42 +++++++---------------- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 1 - drivers/net/ethernet/aquantia/atlantic/aq_utils.h | 1 - drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 11 ++---- 4 files changed, 14 insertions(+), 41 deletions(-) commit edbd58be15a957f6a760c4a514cd475217eb97fd Author: Benjamin Poirier Date: Mon Aug 28 14:29:41 2017 -0400 packet: Don't write vnet header beyond end of buffer ... which may happen with certain values of tp_reserve and maclen. Fixes: 58d19b19cd99 ("packet: vnet_hdr support for tpacket_rcv") Signed-off-by: Benjamin Poirier Cc: Willem de Bruijn Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/packet/af_packet.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit d55c60eba0ef44ec21831ce26db300763eafd865 Author: Parthasarathy Bhuvaragan Date: Mon Aug 28 17:57:02 2017 +0200 tipc: permit bond slave as bearer For a bond slave device as a tipc bearer, the dev represents the bond interface and orig_dev represents the slave in tipc_l2_rcv_msg(). Since we decode the tipc_ptr from bonding device (dev), we fail to find the bearer and thus tipc links are not established. In this commit, we register the tipc protocol callback per device and look for tipc bearer from both the devices. Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/bearer.c | 26 +++++++++++--------------- net/tipc/bearer.h | 2 ++ 2 files changed, 13 insertions(+), 15 deletions(-) commit 021aba761f2a6c12158afb9993524c300c01fae2 Author: Sinclair Yeh Date: Tue Aug 29 18:55:09 2017 +0200 drm/vmwgfx: Fix F26 Wayland screen update issue vmwgfx currently cannot support non-blocking commit because when vmw_*_crtc_page_flip is called, drm_atomic_nonblocking_commit() schedules the update on a thread. This means vmw_*_crtc_page_flip cannot rely on the new surface being bound before the subsequent dirty and flush operations happen. Cc: # 4.12.x Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Reviewed-by: Charmaine Lee drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit ba201c4f5ebe13d7819081756378777d8153f23e Author: Stephen Douthit Date: Mon Aug 7 17:11:00 2017 -0400 i2c: ismt: Return EMSGSIZE for block reads with bogus length Compare the number of bytes actually seen on the wire to the byte count field returned by the slave device. Previously we just overwrote the byte count returned by the slave with the real byte count and let the caller figure out if the message was sane. Signed-off-by: Stephen Douthit Tested-by: Dan Priamo Acked-by: Neil Horman Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-ismt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b6c159a9cb69c2cf0bf59d4e12c3a2da77e4d994 Author: Stephen Douthit Date: Mon Aug 7 17:10:59 2017 -0400 i2c: ismt: Don't duplicate the receive length for block reads According to Table 15-14 of the C2000 EDS (Intel doc #510524) the rx data pointed to by the descriptor dptr contains the byte count. desc->rxbytes reports all bytes read on the wire, including the "byte count" byte. So if a device sends 4 bytes in response to a block read, on the wire and in the DMA buffer we see: count data1 data2 data3 data4 0x04 0xde 0xad 0xbe 0xef That's what we want to return in data->block to the next level. Instead we were actually prefixing that with desc->rxbytes: bad count count data1 data2 data3 data4 0x05 0x04 0xde 0xad 0xbe 0xef This was discovered while developing a BMC solution relying on the ipmi_ssif.c driver which was trying to interpret the bogus length field as part of the IPMI response. Signed-off-by: Stephen Douthit Tested-by: Dan Priamo Acked-by: Neil Horman Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-ismt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e38f5164cacd3281b72c99ec0f5e4705ec1d1a55 Merge: cc4a41f 79964db Author: Dave Airlie Date: Wed Aug 30 05:53:13 2017 +1000 Merge tag 'drm-misc-fixes-2017-08-28' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Driver Changes: - bridge/sii8620: Fix out-of-bounds write to incorrect register Cc: Maciej Purski Cc: Andrzej Hajda * tag 'drm-misc-fixes-2017-08-28' of git://anongit.freedesktop.org/git/drm-misc: drm/bridge/sii8620: Fix memory corruption commit cec80d82142ab25c71eee24b529cfeaf17c43062 Author: Ben Hutchings Date: Thu Oct 1 01:35:55 2015 +0100 alpha: uapi: Add support for __SANE_USERSPACE_TYPES__ This fixes compiler errors in perf such as: tests/attr.c: In function 'store_event': tests/attr.c:66:27: error: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__u64 {aka long unsigned int}' [-Werror=format=] snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir, ^ Signed-off-by: Ben Hutchings Tested-by: Michael Cree Cc: stable@vger.kernel.org Signed-off-by: Matt Turner arch/alpha/include/asm/types.h | 2 +- arch/alpha/include/uapi/asm/types.h | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 7817cedce04325bed7b618386a245fb461233746 Author: Guenter Roeck Date: Fri Jul 31 19:32:39 2015 -0700 alpha: Define ioremap_wc Commit 3cc2dac5be3f ("drivers/video/fbdev/atyfb: Replace MTRR UC hole with strong UC") introduces calls to ioremap_wc and ioremap_uc. This causes build failures with alpha:allmodconfig. Map the missing functions to ioremap_nocache. Fixes: 3cc2dac5be3f ("drivers/video/fbdev/atyfb: Replace MTRR UC hole with strong UC") Cc: Paul Gortmaker Cc: Luis R. Rodriguez Signed-off-by: Guenter Roeck Signed-off-by: Matt Turner arch/alpha/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) commit 69f0678239b9f45652e1914efa20a397b3acac7a Author: Matt Turner Date: Thu Aug 24 08:59:36 2017 -0700 alpha: Fix section mismatches Signed-off-by: Matt Turner arch/alpha/kernel/core_marvel.c | 4 ++-- arch/alpha/kernel/smp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4f61e0781b701f5eb4f0e186d361c4104659001e Author: Michael Cree Date: Sat Jun 24 13:37:02 2017 +1200 alpha: support R_ALPHA_REFLONG relocations for module loading Since commit 71810db27c1c853b33 (modversions: treat symbol CRCs as 32 bit quantities) R_ALPHA_REFLONG relocations can be required to load modules. This implements it. Tested-by: Bob Tracy Reviewed-by: Richard Henderson Signed-off-by: Michael Cree Signed-off-by: Matt Turner arch/alpha/kernel/module.c | 3 +++ 1 file changed, 3 insertions(+) commit 4606f68faff1b16734f9379937fc49ae289d4c6e Author: Richard Henderson Date: Fri Jun 23 14:20:01 2017 -0700 alpha: Fix typo in ev6-copy_user.S Patch 8525023121de4848b5f0a7d867ffeadbc477774d introduced a typo. That said, the identity AND insns added by that patch are more clearly written as MOV. At the same time, re-schedule the ev6 version so that the first dispatch can execute in parallel. Signed-off-by: Richard Henderson Signed-off-by: Matt Turner arch/alpha/lib/copy_user.S | 2 +- arch/alpha/lib/ev6-copy_user.S | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 4758ce82e66711b1a4557577e30a5f9b88d4a4b5 Author: Richard Henderson Date: Fri Jun 23 14:20:00 2017 -0700 alpha: Package string routines together There are direct branches between {str*cpy,str*cat} and stx*cpy. Ensure the branches are within range by merging these objects. Signed-off-by: Richard Henderson Signed-off-by: Matt Turner arch/alpha/lib/Makefile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit a720830613eaa25eb5bc9b76705a88a36296709a Author: Richard Henderson Date: Fri Jun 23 14:19:59 2017 -0700 alpha: Update for new syscalls Signed-off-by: Richard Henderson Signed-off-by: Matt Turner arch/alpha/include/asm/unistd.h | 2 +- arch/alpha/include/uapi/asm/unistd.h | 14 ++++++++++++++ arch/alpha/kernel/systbls.S | 9 +++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) commit e42faf553c8d7bdd4735cc6b9a9e969aa985d078 Author: Matt Turner Date: Mon Oct 24 22:07:41 2016 -0700 alpha: Fix build error without CONFIG_VGA_HOSE. pci_vga_hose is #defined to 0 in include/asm/vga.h if CONFIG_VGA_HOSE is not set. Signed-off-by: Matt Turner arch/alpha/kernel/core_marvel.c | 2 ++ arch/alpha/kernel/core_titan.c | 2 ++ 2 files changed, 4 insertions(+) commit 36fde05f3fb51edea879636db590d70e11f16c82 Merge: 31a3faf 1c08c22 Author: Linus Torvalds Date: Tue Aug 29 11:16:21 2017 -0700 Merge branch 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "A late but obvious fix for cgroup. I broke the 'cpuset.memory_pressure' file a long time ago (v4.4) by accidentally deleting its file index, which made it a duplicate of the 'cpuset.memory_migrate' file. Spotted and fixed by Waiman" * 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cpuset: Fix incorrect memory_pressure control file mapping commit 31a3faf3229697d646eab0fc942b24d73b0bcfa1 Merge: 785373b 2aca392 Author: Linus Torvalds Date: Tue Aug 29 11:13:52 2017 -0700 Merge branch 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "Late fixes for libata. There's a minor platform driver fix but the important one is READ LOG PAGE. This is a new ATA command which is used to test some optional features but it broke probing of some devices - they locked up instead of failing the unknown command. Christoph tried blacklisting, but, after finding out there are multiple devices which fail this way, backed off to testing feature bit in IDENTIFY data first, which is a bit lossy (we can miss features on some devices) but should be a lot safer" * 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: Revert "libata: quirk read log on no-name M.2 SSD" libata: check for trusted computing in IDENTIFY DEVICE data libata: quirk read log on no-name M.2 SSD sata: ahci-da850: Fix some error handling paths in 'ahci_da850_probe()' commit e8d411d2980723b8f8ba8e4dd78b694c5fd9ea3e Author: Xin Long Date: Mon Aug 28 10:45:01 2017 +0800 ipv6: do not set sk_destruct in IPV6_ADDRFORM sockopt ChunYu found a kernel warn_on during syzkaller fuzzing: [40226.038539] WARNING: CPU: 5 PID: 23720 at net/ipv4/af_inet.c:152 inet_sock_destruct+0x78d/0x9a0 [40226.144849] Call Trace: [40226.147590] [40226.149859] dump_stack+0xe2/0x186 [40226.176546] __warn+0x1a4/0x1e0 [40226.180066] warn_slowpath_null+0x31/0x40 [40226.184555] inet_sock_destruct+0x78d/0x9a0 [40226.246355] __sk_destruct+0xfa/0x8c0 [40226.290612] rcu_process_callbacks+0xaa0/0x18a0 [40226.336816] __do_softirq+0x241/0x75e [40226.367758] irq_exit+0x1f6/0x220 [40226.371458] smp_apic_timer_interrupt+0x7b/0xa0 [40226.376507] apic_timer_interrupt+0x93/0xa0 The warn_on happned when sk->sk_rmem_alloc wasn't 0 in inet_sock_destruct. As after commit f970bd9e3a06 ("udp: implement memory accounting helpers"), udp has changed to use udp_destruct_sock as sk_destruct where it would udp_rmem_release all rmem. But IPV6_ADDRFORM sockopt sets sk_destruct with inet_sock_destruct after changing family to PF_INET. If rmem is not 0 at that time, and there is no place to release rmem before calling inet_sock_destruct, the warn_on will be triggered. This patch is to fix it by not setting sk_destruct in IPV6_ADDRFORM sockopt any more. As IPV6_ADDRFORM sockopt only works for tcp and udp. TCP sock has already set it's sk_destruct with inet_sock_destruct and UDP has set with udp_destruct_sock since they're created. Fixes: f970bd9e3a06 ("udp: implement memory accounting helpers") Reported-by: ChunYu Wang Signed-off-by: Xin Long Acked-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv6/ipv6_sockglue.c | 1 - 1 file changed, 1 deletion(-) commit 04f1c4ad7299470bc4738a2ec563eb6adc0caa08 Merge: c784839 931e79d Author: David S. Miller Date: Tue Aug 29 09:37:06 2017 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-08-29 1) Fix dst_entry refcount imbalance when using socket policies. From Lorenzo Colitti. 2) Fix locking when adding the ESP trailers. 3) Fix tailroom calculation for the ESP trailer by using skb_tailroom instead of skb_availroom. 4) Fix some info leaks in xfrm_user. From Mathias Krause. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 785373b4c38719f4af6775845df6be1dfaea120f Author: Linus Torvalds Date: Tue Aug 29 09:11:06 2017 -0700 Revert "rmap: do not call mmu_notifier_invalidate_page() under ptl" This reverts commit aac2fea94f7a3df8ad1eeb477eb2643f81fd5393. It turns out that that patch was complete and utter garbage, and broke KVM, resulting in odd oopses. Quoting Andrea Arcangeli: "The aforementioned commit has 3 bugs. 1) mmu_notifier_invalidate_range cannot be used in replacement of mmu_notifier_invalidate_range_start/end. For KVM mmu_notifier_invalidate_range is a noop and rightfully so. A MMU notifier implementation has to implement either ->invalidate_range method or the invalidate_range_start/end methods, not both. And if you implement invalidate_range_start/end like KVM is forced to do, calling mmu_notifier_invalidate_range in common code is a noop for KVM. For those MMU notifiers that can get away only implementing ->invalidate_range, the ->invalidate_range is implicitly called by mmu_notifier_invalidate_range_end(). And only those secondary MMUs that share the same pagetable with the primary MMU (like AMD iommuv2) can get away only implementing ->invalidate_range. So all cases (THP on/off) are broken right now. To fix this is enough to replace mmu_notifier_invalidate_range with mmu_notifier_invalidate_range_start;mmu_notifier_invalidate_range_end. Either that or call multiple mmu_notifier_invalidate_page like before. 2) address + (1UL << compound_order(page) is buggy, it should be PAGE_SIZE << compound_order(page), it's bytes not pages, 2M not 512. 3) The whole invalidate_range thing was an attempt to call a single invalidate while walking multiple 4k ptes that maps the same THP (after a pmd virtual split without physical compound page THP split). It's unclear if the rmap_walk will always provide an address that is 2M aligned as parameter to try_to_unmap_one, in presence of THP. I think it needs also an address &= (PAGE_SIZE << compound_order(page)) - 1 to be safe" In general, we should stop making excuses for horrible MMU notifier users. It's much more important that the core VM is sane and safe, than letting MMU notifiers sleep. So if some MMU notifier is sleeping under a spinlock, we need to fix the notifier, not try to make excuses for that garbage in the core VM. Reported-and-tested-by: Bernhard Held Reported-and-tested-by: Adam Borowski Cc: Andrea Arcangeli Cc: Radim Krčmář Cc: Wanpeng Li Cc: Paolo Bonzini Cc: Takashi Iwai Cc: Nadav Amit Cc: Mike Galbraith Cc: Kirill A. Shutemov Cc: Jérôme Glisse Cc: axie Cc: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 52 ++++++++++++++++++++++------------------------------ 1 file changed, 22 insertions(+), 30 deletions(-) commit 2aca392398384f8a2f339f4c661a1699f4f2e2eb Author: Tejun Heo Date: Tue Aug 29 08:36:58 2017 -0700 Revert "libata: quirk read log on no-name M.2 SSD" This reverts commit 35f0b6a779b8b7a98faefd7c1c660b4dac9a5c26. We now conditionalize issuing of READ LOG PAGE on the TRUSTED COMPUTING SUPPORTED bit in the identity data and this shouldn't be necessary. Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 4 ---- include/linux/libata.h | 1 - 2 files changed, 5 deletions(-) commit e8f11db956aa09c1618051a7aaf367d6810d8d8c Author: Christoph Hellwig Date: Tue Aug 29 14:42:06 2017 +0200 libata: check for trusted computing in IDENTIFY DEVICE data ATA-8 and later mirrors the TRUSTED COMPUTING SUPPORTED bit in word 48 of the IDENTIFY DEVICE data. Check this before issuing a READ LOG PAGE command to avoid issues with buggy devices. The only downside is that we can't support Security Send / Receive for a device with an older revision due to the conflicting use of this field in earlier specifications. tj: The reason we need this is because some devices which don't support READ LOG PAGE lock up after getting issued that command. Signed-off-by: Christoph Hellwig Tested-by: David Ahern Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 3 +++ include/linux/ata.h | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 015a2f823e49927e0da4361a7dfadf0aae33146b Merge: 22d5382 dc52d78 Author: Jens Axboe Date: Tue Aug 29 08:32:58 2017 -0600 Merge branch 'stable/for-jens-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus Pull xen-blkback fix from Konrad: "[...] A bug-fix when shutting down xen block backend driver with multiple queues and the driver not clearing all of them." commit 5af2ed36697e2a48cd7d36232212caa6240fe9bb Author: James Cowgill Date: Fri Mar 31 17:09:59 2017 +0100 MIPS: Remove pt_regs adjustments in indirect syscall handler If a restartable syscall is called using the indirect o32 syscall handler - eg: syscall(__NR_waitid, ...), then it is possible for the incorrect arguments to be passed to the syscall after it has been restarted. This is because the syscall handler tries to shift all the registers down one place in pt_regs so that when the syscall is restarted, the "real" syscall is called instead. Unfortunately it only shifts the arguments passed in registers, not the arguments on the user stack. This causes the 4th argument to be duplicated when the syscall is restarted. Fix by removing all the pt_regs shifting so that the indirect syscall handler is called again when the syscall is restarted. The comment "some syscalls like execve get their arguments from struct pt_regs" is long out of date so this should now be safe. Signed-off-by: James Cowgill Reviewed-by: James Hogan Tested-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15856/ Signed-off-by: Ralf Baechle arch/mips/kernel/scall32-o32.S | 11 ----------- arch/mips/kernel/scall64-o32.S | 6 ------ 2 files changed, 17 deletions(-) commit 3d729deaf287c43e415c5d791c9ac8414dbeff70 Author: James Hogan Date: Fri Aug 11 21:56:50 2017 +0100 MIPS: seccomp: Fix indirect syscall args Since commit 669c4092225f ("MIPS: Give __secure_computing() access to syscall arguments."), upon syscall entry when seccomp is enabled, syscall_trace_enter() passes a carefully prepared struct seccomp_data containing syscall arguments to __secure_computing(). Unfortunately it directly uses mips_get_syscall_arg() and fails to take into account the indirect O32 system calls (i.e. syscall(2)) which put the system call number in a0 and have the arguments shifted up by one entry. We can't just revert that commit as samples/bpf/tracex5 would break again, so use syscall_get_arguments() which already takes indirect syscalls into account instead of directly using mips_get_syscall_arg(), similar to what populate_seccomp_data() does. This also removes the redundant error checking of the mips_get_syscall_arg() return value (get_user() already zeroes the result if an argument from the stack can't be loaded). Reported-by: James Cowgill Fixes: 669c4092225f ("MIPS: Give __secure_computing() access to syscall arguments.") Signed-off-by: James Hogan Reviewed-by: Kees Cook Cc: David Daney Cc: Andy Lutomirski Cc: Will Drewry Cc: Oleg Nesterov Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16994/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit fb1cc2f91664fd8a2e454970480b5413725919f1 Author: Jan H. Schönherr Date: Sun Aug 27 20:23:43 2017 +0200 x86/boot: Prevent faulty bootparams.screeninfo from causing harm If a zero for the number of lines manages to slip through, scroll() may underflow some offset calculations, causing accesses outside the video memory. Make the check in __putstr() more pessimistic to prevent that. Signed-off-by: Jan H. Schönherr Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1503858223-14983-1-git-send-email-jschoenh@amazon.de Signed-off-by: Ingo Molnar arch/x86/boot/compressed/misc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5746f0555d00e1cbb7bc20a2fd09041ace6f350c Author: Jan H. Schönherr Date: Sun Aug 27 15:55:24 2017 +0200 x86/boot: Provide more slack space during decompression The current slack space is not enough for LZ4, which has a worst case overhead of 0.4% for data that cannot be further compressed. With an LZ4 compressed kernel with an embedded initrd, the output is likely to overwrite the input. Increase the slack space to avoid that. Signed-off-by: Jan H. Schönherr Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1503842124-29718-1-git-send-email-jschoenh@amazon.de Signed-off-by: Ingo Molnar arch/x86/boot/header.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 75e8387685f6c65feb195a4556110b58f852b848 Author: Zhou Chengming Date: Fri Aug 25 21:49:37 2017 +0800 perf/ftrace: Fix double traces of perf on ftrace:function When running perf on the ftrace:function tracepoint, there is a bug which can be reproduced by: perf record -e ftrace:function -a sleep 20 & perf record -e ftrace:function ls perf script ls 10304 [005] 171.853235: ftrace:function: perf_output_begin ls 10304 [005] 171.853237: ftrace:function: perf_output_begin ls 10304 [005] 171.853239: ftrace:function: task_tgid_nr_ns ls 10304 [005] 171.853240: ftrace:function: task_tgid_nr_ns ls 10304 [005] 171.853242: ftrace:function: __task_pid_nr_ns ls 10304 [005] 171.853244: ftrace:function: __task_pid_nr_ns We can see that all the function traces are doubled. The problem is caused by the inconsistency of the register function perf_ftrace_event_register() with the probe function perf_ftrace_function_call(). The former registers one probe for every perf_event. And the latter handles all perf_events on the current cpu. So when two perf_events on the current cpu, the traces of them will be doubled. So this patch adds an extra parameter "event" for perf_tp_event, only send sample data to this event when it's not NULL. Signed-off-by: Zhou Chengming Reviewed-by: Jiri Olsa Acked-by: Steven Rostedt (VMware) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: alexander.shishkin@linux.intel.com Cc: huawei.libin@huawei.com Link: http://lkml.kernel.org/r/1503668977-12526-1-git-send-email-zhouchengming1@huawei.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 2 +- include/linux/trace_events.h | 4 ++-- kernel/events/core.c | 13 +++++++++---- kernel/trace/trace_event_perf.c | 4 +++- kernel/trace/trace_kprobe.c | 4 ++-- kernel/trace/trace_syscalls.c | 4 ++-- kernel/trace/trace_uprobe.c | 2 +- 7 files changed, 20 insertions(+), 13 deletions(-) commit f12f42acdbb577a12eecfcebbbec41c81505c4dc Author: Meng Xu Date: Wed Aug 23 17:07:50 2017 -0400 perf/core: Fix potential double-fetch bug While examining the kernel source code, I found a dangerous operation that could turn into a double-fetch situation (a race condition bug) where the same userspace memory region are fetched twice into kernel with sanity checks after the first fetch while missing checks after the second fetch. 1. The first fetch happens in line 9573 get_user(size, &uattr->size). 2. Subsequently the 'size' variable undergoes a few sanity checks and transformations (line 9577 to 9584). 3. The second fetch happens in line 9610 copy_from_user(attr, uattr, size) 4. Given that 'uattr' can be fully controlled in userspace, an attacker can race condition to override 'uattr->size' to arbitrary value (say, 0xFFFFFFFF) after the first fetch but before the second fetch. The changed value will be copied to 'attr->size'. 5. There is no further checks on 'attr->size' until the end of this function, and once the function returns, we lose the context to verify that 'attr->size' conforms to the sanity checks performed in step 2 (line 9577 to 9584). 6. My manual analysis shows that 'attr->size' is not used elsewhere later, so, there is no working exploit against it right now. However, this could easily turns to an exploitable one if careless developers start to use 'attr->size' later. To fix this, override 'attr->size' from the second fetch to the one from the first fetch, regardless of what is actually copied in. In this way, it is assured that 'attr->size' is consistent with the checks performed after the first fetch. Signed-off-by: Meng Xu Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Thomas Gleixner Cc: acme@kernel.org Cc: alexander.shishkin@linux.intel.com Cc: meng.xu@gatech.edu Cc: sanidhya@gatech.edu Cc: taesoo@gatech.edu Link: http://lkml.kernel.org/r/1503522470-35531-1-git-send-email-meng.xu@gatech.edu Signed-off-by: Ingo Molnar kernel/events/core.c | 2 ++ 1 file changed, 2 insertions(+) commit eaa2f87c6b840b83827c40db6eb8481689570259 Author: Dan Carpenter Date: Fri Aug 18 13:30:30 2017 +0300 x86/ldt: Fix off by one in get_segment_base() ldt->entries[] is allocated in alloc_ldt_struct(). It has ldt->nr_entries elements and ldt->nr_entries is capped at LDT_ENTRIES. So if "idx" is == ldt->nr_entries then we're reading beyond the end of the buffer. It seems duplicative to have two limit checks when one would work just as well so I removed the check against LDT_ENTRIES. The gdt_page.gdt[] array has GDT_ENTRIES entries. Signed-off-by: Dan Carpenter Acked-by: Andy Lutomirski Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Fixes: d07bdfd322d3 ("perf/x86: Fix USER/KERNEL tagging of samples properly") Link: http://lkml.kernel.org/r/20170818102516.gqwm4xdvvuvjw5ho@mwanda Signed-off-by: Ingo Molnar arch/x86/events/core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c7848399ec7612c2fa4dc0c2eeb9e0b89d00afef Author: Florian Fainelli Date: Mon Aug 28 17:10:51 2017 -0700 net: dsa: Don't dereference dst->cpu_dp->netdev If we do not have a master network device attached dst->cpu_dp will be NULL and accessing cpu_dp->netdev will create a trace similar to the one below. The correct check is on dst->cpu_dp period. [ 1.004650] DSA: switch 0 0 parsed [ 1.008078] Unable to handle kernel NULL pointer dereference at virtual address 00000010 [ 1.016195] pgd = c0003000 [ 1.018918] [00000010] *pgd=80000000004003, *pmd=00000000 [ 1.024349] Internal error: Oops: 206 [#1] SMP ARM [ 1.029157] Modules linked in: [ 1.032228] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc6-00071-g45b45afab9bd-dirty #7 [ 1.040772] Hardware name: Broadcom STB (Flattened Device Tree) [ 1.046704] task: ee08f840 task.stack: ee090000 [ 1.051258] PC is at dsa_register_switch+0x5e0/0x9dc [ 1.056234] LR is at dsa_register_switch+0x5d0/0x9dc [ 1.061211] pc : [] lr : [] psr: 60000213 [ 1.067491] sp : ee091d88 ip : 00000000 fp : 0000000c [ 1.072728] r10: 00000000 r9 : 00000001 r8 : ee208010 [ 1.077965] r7 : ee2b57b0 r6 : ee2b5780 r5 : 00000000 r4 : ee208e0c [ 1.084506] r3 : 00000000 r2 : 00040d00 r1 : 2d1b2000 r0 : 00000016 [ 1.091050] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 1.098199] Control: 32c5387d Table: 00003000 DAC: fffffffd [ 1.103957] Process swapper/0 (pid: 1, stack limit = 0xee090210) Reported-by: Dan Carpenter Fixes: 6d3c8c0dd88a ("net: dsa: Remove master_netdev and use dst->cpu_dp->netdev") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c3a815f471a84811cf8021cf64aae3b8081dfde Author: Linus Torvalds Date: Mon Aug 28 16:45:40 2017 -0700 page waitqueue: always add new entries at the end Commit 3510ca20ece0 ("Minor page waitqueue cleanups") made the page queue code always add new waiters to the back of the queue, which helps upcoming patches to batch the wakeups for some horrid loads where the wait queues grow to thousands of entries. However, I forgot about the nasrt add_page_wait_queue() special case code that is only used by the cachefiles code. That one still continued to add the new wait queue entries at the beginning of the list. Fix it, because any sane batched wakeup will require that we don't suddenly start getting new entries at the beginning of the list that we already handled in a previous batch. [ The current code always does the whole list while holding the lock, so wait queue ordering doesn't matter for correctness, but even then it's better to add later entries at the end from a fairness standpoint ] Signed-off-by: Linus Torvalds mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef9a5a62c63456cbba1beef2fc1372fce105fbbc Author: Roopa Prabhu Date: Sat Aug 26 21:13:48 2017 -0700 bridge: check for null fdb->dst before notifying switchdev drivers current switchdev drivers dont seem to support offloading fdb entries pointing to the bridge device which have fdb->dst not set to any port. This patch adds a NULL fdb->dst check in the switchdev notifier code. This patch fixes the below NULL ptr dereference: $bridge fdb add 00:02:00:00:00:33 dev br0 self [ 69.953374] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 69.954044] IP: br_switchdev_fdb_notify+0x29/0x80 [ 69.954044] PGD 66527067 [ 69.954044] P4D 66527067 [ 69.954044] PUD 7899c067 [ 69.954044] PMD 0 [ 69.954044] [ 69.954044] Oops: 0000 [#1] SMP [ 69.954044] Modules linked in: [ 69.954044] CPU: 1 PID: 3074 Comm: bridge Not tainted 4.13.0-rc6+ #1 [ 69.954044] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014 [ 69.954044] task: ffff88007b827140 task.stack: ffffc90001564000 [ 69.954044] RIP: 0010:br_switchdev_fdb_notify+0x29/0x80 [ 69.954044] RSP: 0018:ffffc90001567918 EFLAGS: 00010246 [ 69.954044] RAX: 0000000000000000 RBX: ffff8800795e0880 RCX: 00000000000000c0 [ 69.954044] RDX: ffffc90001567920 RSI: 000000000000001c RDI: ffff8800795d0600 [ 69.954044] RBP: ffffc90001567938 R08: ffff8800795d0600 R09: 0000000000000000 [ 69.954044] R10: ffffc90001567a88 R11: ffff88007b849400 R12: ffff8800795e0880 [ 69.954044] R13: ffff8800795d0600 R14: ffffffff81ef8880 R15: 000000000000001c [ 69.954044] FS: 00007f93d3085700(0000) GS:ffff88007fd00000(0000) knlGS:0000000000000000 [ 69.954044] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 69.954044] CR2: 0000000000000008 CR3: 0000000066551000 CR4: 00000000000006e0 [ 69.954044] Call Trace: [ 69.954044] fdb_notify+0x3f/0xf0 [ 69.954044] __br_fdb_add.isra.12+0x1a7/0x370 [ 69.954044] br_fdb_add+0x178/0x280 [ 69.954044] rtnl_fdb_add+0x10a/0x200 [ 69.954044] rtnetlink_rcv_msg+0x1b4/0x240 [ 69.954044] ? skb_free_head+0x21/0x40 [ 69.954044] ? rtnl_calcit.isra.18+0xf0/0xf0 [ 69.954044] netlink_rcv_skb+0xed/0x120 [ 69.954044] rtnetlink_rcv+0x15/0x20 [ 69.954044] netlink_unicast+0x180/0x200 [ 69.954044] netlink_sendmsg+0x291/0x370 [ 69.954044] ___sys_sendmsg+0x180/0x2e0 [ 69.954044] ? filemap_map_pages+0x2db/0x370 [ 69.954044] ? do_wp_page+0x11d/0x420 [ 69.954044] ? __handle_mm_fault+0x794/0xd80 [ 69.954044] ? vma_link+0xcb/0xd0 [ 69.954044] __sys_sendmsg+0x4c/0x90 [ 69.954044] SyS_sendmsg+0x12/0x20 [ 69.954044] do_syscall_64+0x63/0xe0 [ 69.954044] entry_SYSCALL64_slow_path+0x25/0x25 [ 69.954044] RIP: 0033:0x7f93d2bad690 [ 69.954044] RSP: 002b:00007ffc7217a638 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 69.954044] RAX: ffffffffffffffda RBX: 00007ffc72182eac RCX: 00007f93d2bad690 [ 69.954044] RDX: 0000000000000000 RSI: 00007ffc7217a670 RDI: 0000000000000003 [ 69.954044] RBP: 0000000059a1f7f8 R08: 0000000000000006 R09: 000000000000000a [ 69.954044] R10: 00007ffc7217a400 R11: 0000000000000246 R12: 00007ffc7217a670 [ 69.954044] R13: 00007ffc72182a98 R14: 00000000006114c0 R15: 00007ffc72182aa0 [ 69.954044] Code: 1f 00 66 66 66 66 90 55 48 89 e5 48 83 ec 20 f6 47 20 04 74 0a 83 fe 1c 74 09 83 fe 1d 74 2c c9 66 90 c3 48 8b 47 10 48 8d 55 e8 <48> 8b 70 08 0f b7 47 1e 48 83 c7 18 48 89 7d f0 bf 03 00 00 00 [ 69.954044] RIP: br_switchdev_fdb_notify+0x29/0x80 RSP: ffffc90001567918 [ 69.954044] CR2: 0000000000000008 [ 69.954044] ---[ end trace 03e9eec4a82c238b ]--- Fixes: 6b26b51b1d13 ("net: bridge: Add support for notifying devices about FDB add/del") Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b339752d054fb32863418452dff350a1086885b1 Author: Tejun Heo Date: Mon Aug 28 14:51:27 2017 -0700 cpumask: fix spurious cpumask_of_node() on non-NUMA multi-node configs When !NUMA, cpumask_of_node(@node) equals cpu_online_mask regardless of @node. The assumption seems that if !NUMA, there shouldn't be more than one node and thus reporting cpu_online_mask regardless of @node is correct. However, that assumption was broken years ago to support DISCONTIGMEM and whether a system has multiple nodes or not is separately controlled by NEED_MULTIPLE_NODES. This means that, on a system with !NUMA && NEED_MULTIPLE_NODES, cpumask_of_node() will report cpu_online_mask for all possible nodes, indicating that the CPUs are associated with multiple nodes which is an impossible configuration. This bug has been around forever but doesn't look like it has caused any noticeable symptoms. However, it triggers a WARN recently added to workqueue to verify NUMA affinity configuration. Fix it by reporting empty cpumask on non-zero nodes if !NUMA. Signed-off-by: Tejun Heo Reported-and-tested-by: Geert Uytterhoeven Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds include/asm-generic/topology.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e8206d2baa41a4c7cf4590929f8819f8309b564d Author: Alexey Brodkin Date: Mon Aug 28 15:03:58 2017 -0700 ARCv2: SMP: Mask only private-per-core IRQ lines on boot at core intc Recent commit a8ec3ee861b6 "arc: Mask individual IRQ lines during core INTC init" breaks interrupt handling on ARCv2 SMP systems. That commit masked all interrupts at onset, as some controllers on some boards (customer as well as internal), would assert interrutps early before any handlers were installed. For SMP systems, the masking was done at each cpu's core-intc. Later, when the IRQ was actually requested, it was unmasked, but only on the requesting cpu. For "common" interrupts, which were wired up from the 2nd level IDU intc, this was as issue as they needed to be enabled on ALL the cpus (given that IDU IRQs are by default served Round Robin across cpus) So fix that by NOT masking "common" interrupts at core-intc, but instead at the 2nd level IDU intc (latter already being done in idu_of_init()) Fixes: a8ec3ee861b6 ("arc: Mask individual IRQ lines during core INTC init") Signed-off-by: Alexey Brodkin [vgupta: reworked changelog, removed the extraneous idu_irq_mask_raw()] Signed-off-by: Vineet Gupta Signed-off-by: Linus Torvalds arch/arc/kernel/intc-arcv2.c | 11 +++++++++-- arch/arc/kernel/intc-compact.c | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) commit 79de3cbe9a974e03a02b71da80da9ee0eb15a2d0 Author: Helge Deller Date: Wed Aug 23 22:37:00 2017 +0200 fs/select: Fix memory corruption in compat_get_fd_set() Commit 464d62421cb8 ("select: switch compat_{get,put}_fd_set() to compat_{get,put}_bitmap()") changed the calculation on how many bytes need to be zeroed when userspace handed over a NULL pointer for a fdset array in the select syscall. The calculation was changed in compat_get_fd_set() wrongly from memset(fdset, 0, ((nr + 1) & ~1)*sizeof(compat_ulong_t)); to memset(fdset, 0, ALIGN(nr, BITS_PER_LONG)); The ALIGN(nr, BITS_PER_LONG) calculates the number of _bits_ which need to be zeroed in the target fdset array (rounded up to the next full bits for an unsigned long). But the memset() call expects the number of _bytes_ to be zeroed. This leads to clearing more memory than wanted (on the stack area or even at kmalloc()ed memory areas) and to random kernel crashes as we have seen them on the parisc platform. The correct change should have been memset(fdset, 0, (ALIGN(nr, BITS_PER_LONG) / BITS_PER_LONG) * BYTES_PER_LONG); which is the same as can be archieved with a call to zero_fd_set(nr, fdset). Fixes: 464d62421cb8 ("select: switch compat_{get,put}_fd_set() to compat_{get,put}_bitmap()" Acked-by:: Al Viro Signed-off-by: Helge Deller Signed-off-by: Linus Torvalds fs/select.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1e2ea8ad37be25a7cdcc974945935829d534d5d3 Author: Xin Long Date: Sat Aug 26 20:10:10 2017 +0800 ipv6: set dst.obsolete when a cached route has expired Now it doesn't check for the cached route expiration in ipv6's dst_ops->check(), because it trusts dst_gc that would clean the cached route up when it's expired. The problem is in dst_gc, it would clean the cached route only when it's refcount is 1. If some other module (like xfrm) keeps holding it and the module only release it when dst_ops->check() fails. But without checking for the cached route expiration, .check() may always return true. Meanwhile, without releasing the cached route, dst_gc couldn't del it. It will cause this cached route never to expire. This patch is to set dst.obsolete with DST_OBSOLETE_KILL in .gc when it's expired, and check obsolete != DST_OBSOLETE_FORCE_CHK in .check. Note that this is even needed when ipv6 dst_gc timer is removed one day. It would set dst.obsolete in .redirect and .update_pmtu instead, and check for cached route expiration when getting it, just like what ipv4 route does. Reported-by: Jianlin Shi Signed-off-by: Xin Long Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 4 +++- net/ipv6/route.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 4e587ea71bf924f7dac621f1351653bd41e446cb Author: Wei Wang Date: Fri Aug 25 15:03:10 2017 -0700 ipv6: fix sparse warning on rt6i_node Commit c5cff8561d2d adds rcu grace period before freeing fib6_node. This generates a new sparse warning on rt->rt6i_node related code: net/ipv6/route.c:1394:30: error: incompatible types in comparison expression (different address spaces) ./include/net/ip6_fib.h:187:14: error: incompatible types in comparison expression (different address spaces) This commit adds "__rcu" tag for rt6i_node and makes sure corresponding rcu API is used for it. After this fix, sparse no longer generates the above warning. Fixes: c5cff8561d2d ("ipv6: add rcu grace period before freeing fib6_node") Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/ip6_fib.h | 2 +- net/ipv6/addrconf.c | 2 +- net/ipv6/ip6_fib.c | 11 +++++++---- net/ipv6/route.c | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) commit 0f3086868e8889a823a6e0f3d299102aa895d947 Author: Stefano Brivio Date: Fri Aug 25 22:48:48 2017 +0200 cxgb4: Fix stack out-of-bounds read due to wrong size to t4_record_mbox() Passing commands for logging to t4_record_mbox() with size MBOX_LEN, when the actual command size is actually smaller, causes out-of-bounds stack accesses in t4_record_mbox() while copying command words here: for (i = 0; i < size / 8; i++) entry->cmd[i] = be64_to_cpu(cmd[i]); Up to 48 bytes from the stack are then leaked to debugfs. This happens whenever we send (and log) commands described by structs fw_sched_cmd (32 bytes leaked), fw_vi_rxmode_cmd (48), fw_hello_cmd (48), fw_bye_cmd (48), fw_initialize_cmd (48), fw_reset_cmd (48), fw_pfvf_cmd (32), fw_eq_eth_cmd (16), fw_eq_ctrl_cmd (32), fw_eq_ofld_cmd (32), fw_acl_mac_cmd(16), fw_rss_glb_config_cmd(32), fw_rss_vi_config_cmd(32), fw_devlog_cmd(32), fw_vi_enable_cmd(48), fw_port_cmd(32), fw_sched_cmd(32), fw_devlog_cmd(32). The cxgb4vf driver got this right instead. When we call t4_record_mbox() to log a command reply, a MBOX_LEN size can be used though, as get_mbox_rpl() will fill cmd_rpl up completely. Fixes: 7f080c3f2ff0 ("cxgb4: Add support to enable logging of firmware mailbox commands") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ad4540cc5aa3dccb8e1e12458d57f8c40fae5a1c Author: Maxime Ripard Date: Fri Aug 25 21:12:17 2017 +0200 net: stmmac: sun8i: Remove the compatibles Since the bindings have been controversial, and we follow the DT stable ABI rule, we shouldn't let a driver with a DT binding that might change slip through in a stable release. Remove the compatibles to make sure the driver will not probe and no-one will start using the binding currently implemented. This commit will obviously need to be reverted in due time. Signed-off-by: Maxime Ripard Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 -------- 1 file changed, 8 deletions(-) commit c73c8a8e0726710f397f8ddce21ef9897e6693e2 Merge: 77146b5 6afd33e Author: David S. Miller Date: Mon Aug 28 15:20:25 2017 -0700 Merge branch 'nfp-flow-dissector-layer' Pieter Jansen van Vuuren says: ==================== nfp: fix layer calculation and flow dissector use Previously when calculating the supported key layers MPLS, IPv4/6 TTL and TOS were not considered. Formerly flow dissectors were referenced without first checking that they are in use and correctly populated by TC. Additionally this patch set fixes the incorrect use of mask field for vlan matching. ==================== Signed-off-by: David S. Miller commit 6afd33e4384060e692705912337b184c1e159aff Author: Pieter Jansen van Vuuren Date: Fri Aug 25 19:31:03 2017 +0200 nfp: remove incorrect mask check for vlan matching Previously the vlan tci field was incorrectly exact matched. This patch fixes this by using the flow dissector to populate the vlan tci field. Fixes: 5571e8c9f241 ("nfp: extend flower matching capabilities") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/match.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 74af5975108f54f9443952c0b4d52487031a7569 Author: Pieter Jansen van Vuuren Date: Fri Aug 25 19:31:02 2017 +0200 nfp: fix supported key layers calculation Previously when calculating the supported key layers MPLS, IPv4/6 TTL and TOS were not considered. This patch checks that the TTL and TOS fields are masked out before offloading. Additionally this patch checks that MPLS packets are correctly handled, by not offloading them. Fixes: af9d842c1354 ("nfp: extend flower add flow offload") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/offload.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit a7cd39e0c7805a93eaa4256370bcd48c506d46c1 Author: Pieter Jansen van Vuuren Date: Fri Aug 25 19:31:01 2017 +0200 nfp: fix unchecked flow dissector use Previously flow dissectors were referenced without first checking that they are in use and correctly populated by TC. This patch fixes this by checking each flow dissector key before referencing them. Fixes: 5571e8c9f241 ("nfp: extend flower matching capabilities") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/match.c | 133 +++++++++++---------- .../net/ethernet/netronome/nfp/flower/offload.c | 41 ++++--- 2 files changed, 93 insertions(+), 81 deletions(-) commit 77146b5d79cfa51aebb8c0e8c19af32b579890f7 Merge: 9ee369a e702c12 Author: David S. Miller Date: Mon Aug 28 11:34:59 2017 -0700 Merge branch 'l2tp-tunnel-refs' Guillaume Nault says: ==================== l2tp: fix some l2tp_tunnel_find() issues in l2tp_netlink Since l2tp_tunnel_find() doesn't take a reference on the tunnel it returns, its users are almost guaranteed to be racy. This series defines l2tp_tunnel_get() which can be used as a safe replacement, and converts some of l2tp_tunnel_find() users in the l2tp_netlink module. Other users often combine this issue with other more or less subtle races. They will be fixed incrementally in followup series. ==================== Signed-off-by: David S. Miller commit e702c1204eb57788ef189c839c8c779368267d70 Author: Guillaume Nault Date: Fri Aug 25 16:51:46 2017 +0200 l2tp: hold tunnel used while creating sessions with netlink Use l2tp_tunnel_get() to retrieve tunnel, so that it can't go away on us. Otherwise l2tp_tunnel_destruct() might release the last reference count concurrently, thus freeing the tunnel while we're using it. Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_netlink.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 4e4b21da3acc68a7ea55f850cacc13706b7480e9 Author: Guillaume Nault Date: Fri Aug 25 16:51:43 2017 +0200 l2tp: hold tunnel while handling genl TUNNEL_GET commands Use l2tp_tunnel_get() instead of l2tp_tunnel_find() so that we get a reference on the tunnel, preventing l2tp_tunnel_destruct() from freeing it from under us. Also move l2tp_tunnel_get() below nlmsg_new() so that we only take the reference when needed. Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_netlink.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 8c0e421525c9eb50d68e8f633f703ca31680b746 Author: Guillaume Nault Date: Fri Aug 25 16:51:42 2017 +0200 l2tp: hold tunnel while handling genl tunnel updates We need to make sure the tunnel is not going to be destroyed by l2tp_tunnel_destruct() concurrently. Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_netlink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bb0a32ce4389e17e47e198d2cddaf141561581ad Author: Guillaume Nault Date: Fri Aug 25 16:51:42 2017 +0200 l2tp: hold tunnel while processing genl delete command l2tp_nl_cmd_tunnel_delete() needs to take a reference on the tunnel, to prevent it from being concurrently freed by l2tp_tunnel_destruct(). Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_netlink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 54652eb12c1b72e9602d09cb2821d5760939190f Author: Guillaume Nault Date: Fri Aug 25 16:51:40 2017 +0200 l2tp: hold tunnel while looking up sessions in l2tp_netlink l2tp_tunnel_find() doesn't take a reference on the returned tunnel. Therefore, it's unsafe to use it because the returned tunnel can go away on us anytime. Fix this by defining l2tp_tunnel_get(), which works like l2tp_tunnel_find(), but takes a reference on the returned tunnel. Caller then has to drop this reference using l2tp_tunnel_dec_refcount(). As l2tp_tunnel_dec_refcount() needs to be moved to l2tp_core.h, let's simplify the patch and not move the L2TP_REFCNT_DEBUG part. This code has been broken (not even compiling) in May 2012 by commit a4ca44fa578c ("net: l2tp: Standardize logging styles") and fixed more than two years later by commit 29abe2fda54f ("l2tp: fix missing line continuation"). So it doesn't appear to be used by anyone. Same thing for l2tp_tunnel_free(); instead of moving it to l2tp_core.h, let's just simplify things and call kfree_rcu() directly in l2tp_tunnel_dec_refcount(). Extra assertions and debugging code provided by l2tp_tunnel_free() didn't help catching any of the reference counting and socket handling issues found while working on this series. Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 66 ++++++++++++++++--------------------------------- net/l2tp/l2tp_core.h | 13 ++++++++++ net/l2tp/l2tp_netlink.c | 6 +++-- 3 files changed, 38 insertions(+), 47 deletions(-) commit 9ee369a405c57613d7c83a3967780c3e30c52ecc Author: Guillaume Nault Date: Fri Aug 25 16:22:17 2017 +0200 l2tp: initialise session's refcount before making it reachable Sessions must be fully initialised before calling l2tp_session_add_to_tunnel(). Otherwise, there's a short time frame where partially initialised sessions can be accessed by external users. Fixes: dbdbc73b4478 ("l2tp: fix duplicate session creation") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4c22868264516fe0c42817a87f37efb44254e7a9 Author: Antoine Tenart Date: Fri Aug 25 16:14:17 2017 +0200 net: mvpp2: fix the mac address used when using PPv2.2 The mac address is only retrieved from h/w when using PPv2.1. Otherwise the variable holding it is still checked and used if it contains a valid value. As the variable isn't initialized to an invalid mac address value, we end up with random mac addresses which can be the same for all the ports handled by this PPv2 driver. Fixes this by initializing the h/w mac address variable to {0}, which is an invalid mac address value. This way the random assignation fallback is called and all ports end up with their own addresses. Signed-off-by: Antoine Tenart Fixes: 2697582144dd ("net: mvpp2: handle misc PPv2.1/PPv2.2 differences") Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b638f0f0b94fc41f419033f2a02c49d52f3fec9 Author: Aleksander Morgado Date: Fri Aug 25 15:39:16 2017 +0200 cdc_ncm: flag the u-blox TOBY-L4 as wwan The u-blox TOBY-L4 is a LTE Advanced (Cat 6) module with HSPA+ and 2G fallback. Unlike the TOBY-L2, this module has one single USB layout and exposes several TTYs for control and a NCM interface for data. Connecting this module may be done just by activating the desired PDP context with 'AT+CGACT=1,' and then running DHCP on the NCM interface. Signed-off-by: Aleksander Morgado Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1e22391e8fbec9c3709bad82b997b108d1c6228b Author: Jesper Dangaard Brouer Date: Fri Aug 25 15:04:32 2017 +0200 net: missing call of trace_napi_poll in busy_poll_stop Noticed that busy_poll_stop() also invoke the drivers napi->poll() function pointer, but didn't have an associated call to trace_napi_poll() like all other call sites. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller net/core/dev.c | 1 + 1 file changed, 1 insertion(+) commit 702e97621ec7e7a36034ebd7a446af04f59d6dee Merge: cc4a41f 636d421 Author: Linus Torvalds Date: Mon Aug 28 11:15:46 2017 -0700 Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming Pull c6x tweaks from Mark Salter. * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming: c6x: Convert to using %pOF instead of full_name c6x: defconfig: Cleanup from old Kconfig options commit 3f9db52dc87b003a1732f3e03f7f5fc8701ef4ad Author: Anthony Martin Date: Mon Aug 28 10:26:12 2017 -0700 Input: synaptics - fix device info appearing different on reconnect User-modified input settings no longer survive a suspend/resume cycle. Starting with 4.12, the touchpad is reinitialized on every reconnect because the hardware appears to be different. This can be reproduced by running the following as root: echo -n reconnect >/sys/devices/platform/i8042/serio1/drvctl A line like the following will show up in dmesg: [30378.295794] psmouse serio1: synaptics: hardware appears to be different: id(149271-149271), model(114865-114865), caps(d047b3-d047b1), ext(b40000-b40000). Note the single bit difference in caps: bit 1 (SYN_CAP_MULTIFINGER). This happens because we modify our stored copy of the device info capabilities when we enable advanced gesture mode but this change is not reflected in the actual hardware capabilities. It worked in the past because synaptics_query_hardware used to modify the stored synaptics_device_info struct instead of filling in a new one, as it does now. Fix it by no longer faking the SYN_CAP_MULTIFINGER bit when setting advanced gesture mode. This necessitated a small refactoring. Fixes: 6c53694fb222 ("Input: synaptics - split device info into a separate structure") Signed-off-by: Anthony Martin Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit 35f0b6a779b8b7a98faefd7c1c660b4dac9a5c26 Author: Christoph Hellwig Date: Mon Aug 28 08:28:08 2017 +0200 libata: quirk read log on no-name M.2 SSD Ido reported that reading the log page on his systems fails, so quirk it as it won't support ZBC or security protocols. Signed-off-by: Christoph Hellwig Reported-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 4 ++++ include/linux/libata.h | 1 + 2 files changed, 5 insertions(+) commit 7a14724f54bf9889fcb1a9f1d4aa4e1d2e969d93 Author: Dan Williams Date: Mon Aug 28 08:33:20 2017 -0700 libnvdimm: clean up command definitions Remove the command payloads that do not have an associated libnvdimm ioctl. I.e. remove the payloads that would only ever be carried in the ND_CMD_CALL envelope. This prevents userspace from growing unnecessary dependencies on this kernel header when userspace already has everything it needs to craft and send these commands. Cc: Jerry Hoemann Reported-by: Yasunori Goto Signed-off-by: Dan Williams include/uapi/linux/ndctl.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) commit 1c23484c355ec360ca2f37914f8a4802c6baeead Author: Bart Van Assche Date: Wed Aug 9 11:32:12 2017 -0700 dm mpath: do not lock up a CPU with requeuing activity When using the block layer in single queue mode, get_request() returns ERR_PTR(-EAGAIN) if the queue is dying and the REQ_NOWAIT flag has been passed to get_request(). Avoid that the kernel reports soft lockup complaints in this case due to continuous requeuing activity. Fixes: 7083abbbf ("dm mpath: avoid that path removal can trigger an infinite loop") Cc: stable@vger.kernel.org Signed-off-by: Bart Van Assche Tested-by: Laurence Oberman Reviewed-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 1 - 1 file changed, 1 deletion(-) commit 604407890ecf624c2fb41013c82b22aade59b455 Author: Bart Van Assche Date: Wed Aug 9 11:32:11 2017 -0700 dm: fix printk() rate limiting code Using the same rate limiting state for different kinds of messages is wrong because this can cause a high frequency message to suppress a report of a low frequency message. Hence use a unique rate limiting state per message type. Fixes: 71a16736a15e ("dm: use local printk ratelimit") Cc: stable@vger.kernel.org Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm.c | 10 ---------- include/linux/device-mapper.h | 41 ++++++++++++----------------------------- 2 files changed, 12 insertions(+), 39 deletions(-) commit 68515cc72191f5c5d86f6ef7091dc8ba714d96e4 Author: Bart Van Assche Date: Wed Aug 9 11:32:15 2017 -0700 dm mpath: retry BLK_STS_RESOURCE errors Retry requests instead of failing them if an out-of-memory error occurs or the block driver below dm-mpath is busy. This restores the v4.12 behavior of noretry_error(), namely that -ENOMEM results in a retry. Fixes: 2a842acab109 ("block: introduce new block status code type") Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 1 - 1 file changed, 1 deletion(-) commit 54385bf75cc6451f29f3a149582584d5015d2c98 Author: Bart Van Assche Date: Wed Aug 9 11:32:10 2017 -0700 dm: fix the second dec_pending() argument in __split_and_process_bio() Detected by sparse. Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t") Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Tested-by: Laurence Oberman Signed-off-by: Mike Snitzer drivers/md/dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe45174b72aead678da581bab9e9a37c9b26a070 Author: Maxime Ripard Date: Fri Aug 25 20:36:48 2017 +0200 arm: dts: sunxi: Revert EMAC changes Since the discussion is not settled yet for the EMAC, and that the release in getting really close, let's revert the changes for now, and we'll reintroduce them later. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 9 -------- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 19 ----------------- arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 7 ------ arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 ------- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 ------- arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 ----- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 ------- arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 22 ------------------- arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts | 16 -------------- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 26 ----------------------- 10 files changed, 128 deletions(-) commit 87e1f5e8bb4bd584de0a8f3b1e42196dca221d02 Author: Maxime Ripard Date: Fri Aug 25 20:36:48 2017 +0200 arm64: dts: allwinner: Revert EMAC changes Since the discussion is not settled yet for the EMAC, and that the release in getting really close, let's revert the changes for now, and we'll reintroduce them later. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 16 ---------------- .../boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 15 --------------- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 17 ----------------- .../dts/allwinner/sun50i-a64-sopine-baseboard.dts | 16 ---------------- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 -------------------- .../boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts | 17 ----------------- .../boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 17 ----------------- .../boot/dts/allwinner/sun50i-h5-orangepi-prime.dts | 17 ----------------- 8 files changed, 135 deletions(-) commit 8aa33ec2f4812d1ee96f4c02ba013f5b9c514343 Author: Maxime Ripard Date: Fri Aug 25 20:34:35 2017 +0200 dt-bindings: net: Revert sun8i dwmac binding This binding still doesn't please everyone, and we're getting far too close from the release to allow it to reach a stable version. Let's remove it until the discussion settles down. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard .../devicetree/bindings/net/dwmac-sun8i.txt | 84 ---------------------- 1 file changed, 84 deletions(-) commit 931e79d7a7ddee4709c56b39de169a36804589a1 Author: Mathias Krause Date: Sat Aug 26 17:09:00 2017 +0200 xfrm_user: fix info leak in build_aevent() The memory reserved to dump the ID of the xfrm state includes a padding byte in struct xfrm_usersa_id added by the compiler for alignment. To prevent the heap info leak, memset(0) the sa_id before filling it. Cc: Jamal Hadi Salim Fixes: d51d081d6504 ("[IPSEC]: Sync series - user") Signed-off-by: Mathias Krause Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 1 + 1 file changed, 1 insertion(+) commit e3e5fc1698ae35ac60d075b477e84accb96e2652 Author: Mathias Krause Date: Sat Aug 26 17:08:59 2017 +0200 xfrm_user: fix info leak in build_expire() The memory reserved to dump the expired xfrm state includes padding bytes in struct xfrm_user_expire added by the compiler for alignment. To prevent the heap info leak, memset(0) the remainder of the struct. Initializing the whole structure isn't needed as copy_to_user_state() already takes care of clearing the padding bytes within the 'state' member. Signed-off-by: Mathias Krause Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 2 ++ 1 file changed, 2 insertions(+) commit 50329c8a340c9dea60d837645fcf13fc36bfb84d Author: Mathias Krause Date: Sat Aug 26 17:08:58 2017 +0200 xfrm_user: fix info leak in xfrm_notify_sa() The memory reserved to dump the ID of the xfrm state includes a padding byte in struct xfrm_usersa_id added by the compiler for alignment. To prevent the heap info leak, memset(0) the whole struct before filling it. Cc: Herbert Xu Fixes: 0603eac0d6b7 ("[IPSEC]: Add XFRMA_SA/XFRMA_POLICY for delete notification") Signed-off-by: Mathias Krause Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 1 + 1 file changed, 1 insertion(+) commit 5fe0d4bd8f86d19f7f24c1ae5a9b6e6a5a52e51a Author: Mathias Krause Date: Sat Aug 26 17:08:57 2017 +0200 xfrm_user: fix info leak in copy_user_offload() The memory reserved to dump the xfrm offload state includes padding bytes of struct xfrm_user_offload added by the compiler for alignment. Add an explicit memset(0) before filling the buffer to avoid the heap info leak. Cc: Steffen Klassert Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") Signed-off-by: Mathias Krause Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc4a41fe5541a73019a864883297bd5043aa6d98 Author: Linus Torvalds Date: Sun Aug 27 17:20:40 2017 -0700 Linux 4.13-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c25833c426b85ed40fc0120b5020a6fb836538f Merge: 80f73b2 2926a2aa Author: Linus Torvalds Date: Sun Aug 27 17:10:34 2017 -0700 Merge tag 'iommu-fixes-v4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fix from Joerg Roedel: "Another fix, this time in common IOMMU sysfs code. In the conversion from the old iommu sysfs-code to the iommu_device_register interface, I missed to update the release path for the struct device associated with an IOMMU. It freed the 'struct device', which was a pointer before, but is now embedded in another struct. Freeing from the middle of allocated memory had all kinds of nasty side effects when an IOMMU was unplugged. Unfortunatly nobody unplugged and IOMMU until now, so this was not discovered earlier. The fix is to make the 'struct device' a pointer again" * tag 'iommu-fixes-v4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: Fix wrong freeing of iommu_device->dev commit 80f73b2da09af8ba94c07c8f34774f4f79330321 Merge: c3c1626 b2a6d1b Author: Linus Torvalds Date: Sun Aug 27 17:08:37 2017 -0700 Merge tag 'char-misc-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fix from Greg KH: "Here is a single misc driver fix for 4.13-rc7. It resolves a reported problem in the Android binder driver due to previous patches in 4.13-rc. It's been in linux-next with no reported issues" * tag 'char-misc-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: ANDROID: binder: fix proc->tsk check. commit c3c162635f4f064af5c1d531be6355d6b23e3d0c Merge: fff4e7a 2c68888 Author: Linus Torvalds Date: Sun Aug 27 17:03:33 2017 -0700 Merge tag 'staging-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/iio fixes from Greg KH: "Here are few small staging driver fixes, and some more IIO driver fixes for 4.13-rc7. Nothing major, just resolutions for some reported problems. All of these have been in linux-next with no reported problems" * tag 'staging-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: magnetometer: st_magn: remove ihl property for LSM303AGR iio: magnetometer: st_magn: fix status register address for LSM303AGR iio: hid-sensor-trigger: Fix the race with user space powering up sensors iio: trigger: stm32-timer: fix get trigger mode iio: imu: adis16480: Fix acceleration scale factor for adis16480 PATCH] iio: Fix some documentation warnings staging: rtl8188eu: add RNX-N150NUB support Revert "staging: fsl-mc: be consistent when checking strcmp() return" iio: adc: stm32: fix common clock rate iio: adc: ina219: Avoid underflow for sleeping time iio: trigger: stm32-timer: add enable attribute iio: trigger: stm32-timer: fix get/set down count direction iio: trigger: stm32-timer: fix write_raw return value iio: trigger: stm32-timer: fix quadrature mode get routine iio: bmp280: properly initialize device for humidity reading commit fff4e7a0e680b29bb8006cc37921562ef4b8e8df Merge: a8b169a 0eb4634 Author: Linus Torvalds Date: Sun Aug 27 17:01:54 2017 -0700 Merge tag 'ntb-4.13-bugfixes' of git://github.com/jonmason/ntb Pull NTB fixes from Jon Mason: "NTB bug fixes to address an incorrect ntb_mw_count reference in the NTB transport, improperly bringing down the link if SPADs are corrupted, and an out-of-order issue regarding link negotiation and data passing" * tag 'ntb-4.13-bugfixes' of git://github.com/jonmason/ntb: ntb: ntb_test: ensure the link is up before trying to configure the mws ntb: transport shouldn't disable link due to bogus values in SPADs ntb: use correct mw_count function in ntb_tool and ntb_transport commit a8b169afbf06a678437632709caac98e16f99263 Author: Linus Torvalds Date: Sun Aug 27 16:25:09 2017 -0700 Avoid page waitqueue race leaving possible page locker waiting The "lock_page_killable()" function waits for exclusive access to the page lock bit using the WQ_FLAG_EXCLUSIVE bit in the waitqueue entry set. That means that if it gets woken up, other waiters may have been skipped. That, in turn, means that if it sees the page being unlocked, it *must* take that lock and return success, even if a lethal signal is also pending. So instead of checking for lethal signals first, we need to check for them after we've checked the actual bit that we were waiting for. Even if that might then delay the killing of the process. This matches the order of the old "wait_on_bit_lock()" infrastructure that the page locking used to use (and is still used in a few other areas). Note that if we still return an error after having unsuccessfully tried to acquire the page lock, that is ok: that means that some other thread was able to get ahead of us and lock the page, and when that other thread then unlocks the page, the wakeup event will be repeated. So any other pending waiters will now get properly woken up. Fixes: 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a page bit") Cc: Nick Piggin Cc: Peter Zijlstra Cc: Mel Gorman Cc: Jan Kara Cc: Davidlohr Bueso Cc: Andi Kleen Signed-off-by: Linus Torvalds mm/filemap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3510ca20ece0150af6b10c77a74ff1b5c198e3e2 Author: Linus Torvalds Date: Sun Aug 27 13:55:12 2017 -0700 Minor page waitqueue cleanups Tim Chen and Kan Liang have been battling a customer load that shows extremely long page wakeup lists. The cause seems to be constant NUMA migration of a hot page that is shared across a lot of threads, but the actual root cause for the exact behavior has not been found. Tim has a patch that batches the wait list traversal at wakeup time, so that we at least don't get long uninterruptible cases where we traverse and wake up thousands of processes and get nasty latency spikes. That is likely 4.14 material, but we're still discussing the page waitqueue specific parts of it. In the meantime, I've tried to look at making the page wait queues less expensive, and failing miserably. If you have thousands of threads waiting for the same page, it will be painful. We'll need to try to figure out the NUMA balancing issue some day, in addition to avoiding the excessive spinlock hold times. That said, having tried to rewrite the page wait queues, I can at least fix up some of the braindamage in the current situation. In particular: (a) we don't want to continue walking the page wait list if the bit we're waiting for already got set again (which seems to be one of the patterns of the bad load). That makes no progress and just causes pointless cache pollution chasing the pointers. (b) we don't want to put the non-locking waiters always on the front of the queue, and the locking waiters always on the back. Not only is that unfair, it means that we wake up thousands of reading threads that will just end up being blocked by the writer later anyway. Also add a comment about the layout of 'struct wait_page_key' - there is an external user of it in the cachefiles code that means that it has to match the layout of 'struct wait_bit_key' in the two first members. It so happens to match, because 'struct page *' and 'unsigned long *' end up having the same values simply because the page flags are the first member in struct page. Cc: Tim Chen Cc: Kan Liang Cc: Mel Gorman Cc: Christopher Lameter Cc: Andi Kleen Cc: Davidlohr Bueso Cc: Peter Zijlstra Signed-off-by: Linus Torvalds kernel/sched/wait.c | 7 ++++--- mm/filemap.c | 11 ++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) commit 0cc3b0ec23ce4c69e1e890ed2b8d2fa932b14aad Author: Linus Torvalds Date: Sun Aug 27 12:12:25 2017 -0700 Clarify (and fix) MAX_LFS_FILESIZE macros We have a MAX_LFS_FILESIZE macro that is meant to be filled in by filesystems (and other IO targets) that know they are 64-bit clean and don't have any 32-bit limits in their IO path. It turns out that our 32-bit value for that limit was bogus. On 32-bit, the VM layer is limited by the page cache to only 32-bit index values, but our logic for that was confusing and actually wrong. We used to define that value to (((loff_t)PAGE_SIZE << (BITS_PER_LONG-1))-1) which is actually odd in several ways: it limits the index to 31 bits, and then it limits files so that they can't have data in that last byte of a page that has the highest 31-bit index (ie page index 0x7fffffff). Neither of those limitations make sense. The index is actually the full 32 bit unsigned value, and we can use that whole full page. So the maximum size of the file would logically be "PAGE_SIZE << BITS_PER_LONG". However, we do wan tto avoid the maximum index, because we have code that iterates over the page indexes, and we don't want that code to overflow. So the maximum size of a file on a 32-bit host should actually be one page less than the full 32-bit index. So the actual limit is ULONG_MAX << PAGE_SHIFT. That means that we will not actually be using the page of that last index (ULONG_MAX), but we can grow a file up to that limit. The wrong value of MAX_LFS_FILESIZE actually caused problems for Doug Nazar, who was still using a 32-bit host, but with a 9.7TB 2 x RAID5 volume. It turns out that our old MAX_LFS_FILESIZE was 8TiB (well, one byte less), but the actual true VM limit is one page less than 16TiB. This was invisible until commit c2a9737f45e2 ("vfs,mm: fix a dead loop in truncate_inode_pages_range()"), which started applying that MAX_LFS_FILESIZE limit to block devices too. NOTE! On 64-bit, the page index isn't a limiter at all, and the limit is actually just the offset type itself (loff_t), which is signed. But for clarity, on 64-bit, just use the maximum signed value, and don't make people have to count the number of 'f' characters in the hex constant. So just use LLONG_MAX for the 64-bit case. That was what the value had been before too, just written out as a hex constant. Fixes: c2a9737f45e2 ("vfs,mm: fix a dead loop in truncate_inode_pages_range()") Reported-and-tested-by: Doug Nazar Cc: Andreas Dilger Cc: Mark Fasheh Cc: Joel Becker Cc: Dave Kleikamp Cc: stable@kernel.org Signed-off-by: Linus Torvalds include/linux/fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bab9752480c54b5f483a0f52e53cbdef55a83219 Merge: 9716bdb 4a64658 Author: Linus Torvalds Date: Sat Aug 26 12:48:29 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a tweak to the IBM Trackpoint driver that helps recognizing trackpoints on never Lenovo Carbons - a fix to the ALPS driver solving scroll issues on some Dells - yet another ACPI ID has been added to Elan I2C toucpad driver - quieted diagnostic message in soc_button_array driver * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ALPS - fix two-finger scroll breakage in right side on ALPS touchpad Input: soc_button_array - silence -ENOENT error on Dell XPS13 9365 Input: trackpoint - add new trackpoint firmware ID Input: elan_i2c - add ELAN0602 ACPI ID to support Lenovo Yoga310 commit 9716bdb23e1d44276299d3cc90884edbeff00341 Merge: c153e62 8e1101d Author: Linus Torvalds Date: Sat Aug 26 12:46:14 2017 -0700 Merge tag 'pci-v4.13-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Remove needlessly alarming MSI affinity warning (this is not actually a bug fix, but the warning prompts unnecessary bug reports)" * tag 'pci-v4.13-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/MSI: Don't warn when irq_create_affinity_masks() returns NULL commit c153e62105c3124d7aee0a1fa563df8b8e995078 Merge: 0adb8f3 ccd5b32 Author: Linus Torvalds Date: Sat Aug 26 09:06:28 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Two fixes: one for an ldt_struct handling bug and a cherry-picked objtool fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Fix use-after-free of ldt_struct objtool: Fix '-mtune=atom' decoding support in objtool 2.0 commit 0adb8f3d312966bd3e712248b48098ce086d03bd Merge: 53ede64 2fe59f5 Author: Linus Torvalds Date: Sat Aug 26 09:02:18 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Ingo Molnar: "Fix a timer granularity handling race+bug, which would manifest itself by spuriously increasing timeouts of some timers (from 1 jiffy to ~500 jiffies in the worst case measured) in certain nohz states" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers: Fix excessive granularity of new timers after a nohz idle commit 53ede64de3da17f76628b493f5e19a01804939d3 Merge: b3242db 64aee2a Author: Linus Torvalds Date: Sat Aug 26 08:59:50 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Ingo Molnar: "A single fix to not allow nonsensical event groups that result in kernel warnings" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix group {cpu,task} validation commit 0bcdc0987cce9880436b70836c6a92bb8e744fd1 Author: John Stultz Date: Fri Aug 25 15:57:04 2017 -0700 time: Fix ktime_get_raw() incorrect base accumulation In comqit fc6eead7c1e2 ("time: Clean up CLOCK_MONOTONIC_RAW time handling"), the following code got mistakenly added to the update of the raw timekeeper: /* Update the monotonic raw base */ seconds = tk->raw_sec; nsec = (u32)(tk->tkr_raw.xtime_nsec >> tk->tkr_raw.shift); tk->tkr_raw.base = ns_to_ktime(seconds * NSEC_PER_SEC + nsec); Which adds the raw_sec value and the shifted down raw xtime_nsec to the base value. But the read function adds the shifted down tk->tkr_raw.xtime_nsec value another time, The result of this is that ktime_get_raw() users (which are all internal users) see the raw time move faster then it should (the rate at which can vary with the current size of tkr_raw.xtime_nsec), which has resulted in at least problems with graphics rendering performance. The change tried to match the monotonic base update logic: seconds = (u64)(tk->xtime_sec + tk->wall_to_monotonic.tv_sec); nsec = (u32) tk->wall_to_monotonic.tv_nsec; tk->tkr_mono.base = ns_to_ktime(seconds * NSEC_PER_SEC + nsec); Which adds the wall_to_monotonic.tv_nsec value, but not the tk->tkr_mono.xtime_nsec value to the base. To fix this, simplify the tkr_raw.base accumulation to only accumulate the raw_sec portion, and do not include the tkr_raw.xtime_nsec portion, which will be added at read time. Fixes: fc6eead7c1e2 ("time: Clean up CLOCK_MONOTONIC_RAW time handling") Reported-and-tested-by: Chris Wilson Signed-off-by: John Stultz Signed-off-by: Thomas Gleixner Cc: Prarit Bhargava Cc: Kevin Brodsky Cc: Richard Cochran Cc: Stephen Boyd Cc: Will Deacon Cc: Miroslav Lichvar Cc: Daniel Mentz Link: http://lkml.kernel.org/r/1503701824-1645-1-git-send-email-john.stultz@linaro.org kernel/time/timekeeping.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f63ae01d890cb68e842c96995bb93106ee85c93d Merge: 64f0f5d 10a54d8 Author: David S. Miller Date: Fri Aug 25 20:11:53 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-08-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.13 Only one iwlwifi patch this time. iwlwifi * fix multiple times reported lockdep warning found by new locking annotation introduced in v4.13-rc1 ==================== Signed-off-by: David S. Miller commit 64f0f5d18a47c703c85576375cc010e83dac6a48 Author: Paolo Abeni Date: Fri Aug 25 14:31:01 2017 +0200 udp6: set rx_dst_cookie on rx_dst updates Currently, in the udp6 code, the dst cookie is not initialized/updated concurrently with the RX dst used by early demux. As a result, the dst_check() in the early_demux path always fails, the rx dst cache is always invalidated, and we can't really leverage significant gain from the demux lookup. Fix it adding udp6 specific variant of sk_rx_dst_set() and use it to set the dst cookie when the dst entry is really changed. The issue is there since the introduction of early demux for ipv6. Fixes: 5425077d73e0 ("net: ipv6: Add early demux handler for UDP unicast") Acked-by: Hannes Frederic Sowa Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/net/udp.h | 2 +- net/ipv4/udp.c | 4 +++- net/ipv6/udp.c | 11 ++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) commit 2207d182c14294d78b98142f0b6a16bea5e8b0fb Author: Christophe Jaillet Date: Fri Aug 25 07:35:51 2017 +0200 net: sxgbe: check memory allocation failure Check memory allocation failure and return -ENOMEM in such a case, as already done few lines below for another memory allocation. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c | 2 ++ 1 file changed, 2 insertions(+) commit 681e9e867ea06219d26f02ae4a93979734b9ad44 Merge: ebfa00c 7a4b813c Author: David S. Miller Date: Fri Aug 25 19:13:28 2017 -0700 Merge branch 'r8169-Be-drop-monitor-friendly' Florian Fainelli says: ==================== r8169: Be drop monitor friendly First patch may be questionable but no other driver appears to be doing that and while it is defendable to account for left packets as dropped during TX clean, this appears misleading. I picked Stanislaw changes which brings us back to 2010, but this was present from pre-git days as well. Second patch fixes the two missing calls to dev_consume_skb_any(). ==================== Signed-off-by: David S. Miller commit 7a4b813cb739ce598ffbad2e84d19d13fa23e25d Author: Florian Fainelli Date: Thu Aug 24 18:34:44 2017 -0700 r8169: Be drop monitor friendly rtl_tx() is the TX reclamation process whereas rtl8169_tx_clear_range() does the TX ring cleaning during shutdown, both of these functions should call dev_consume_skb_any() to be drop monitor friendly. Fixes: cac4b22f3d6a ("r8169: do not account fragments as packets") Fixes: eb781397904e ("r8169: Do not use dev_kfree_skb in xmit path") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1089650d8837095f63e001bbf14d7b48043d67ad Author: Florian Fainelli Date: Thu Aug 24 18:34:43 2017 -0700 r8169: Do not increment tx_dropped in TX ring cleaning rtl8169_tx_clear_range() is responsible for cleaning up the TX ring during interface shutdown, incrementing tx_dropped for every SKB that we left at the time in the ring is misleading. Fixes: cac4b22f3d6a ("r8169: do not account fragments as packets") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 1 - 1 file changed, 1 deletion(-) commit b3242dba9ff285962fe84d1135cafe9383d721f0 Merge: 67a3b5c 91b540f Author: Linus Torvalds Date: Fri Aug 25 18:02:27 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "6 fixes" * emailed patches from Andrew Morton : mm/memblock.c: reversed logic in memblock_discard() fork: fix incorrect fput of ->exe_file causing use-after-free mm/madvise.c: fix freeing of locked page with MADV_FREE dax: fix deadlock due to misaligned PMD faults mm, shmem: fix handling /sys/kernel/mm/transparent_hugepage/shmem_enabled PM/hibernate: touch NMI watchdog when creating snapshot commit 67a3b5cb33633f39db8809ae56c8c1752b541daa Merge: 17e34c4 47c5310 Author: Linus Torvalds Date: Fri Aug 25 17:46:23 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull Paolo Bonzini: "Bugfixes for x86, PPC and s390" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: PPC: Book3S: Fix race and leak in kvm_vm_ioctl_create_spapr_tce() KVM, pkeys: do not use PKRU value in vcpu->arch.guest_fpu.state KVM: x86: simplify handling of PKRU KVM: x86: block guest protection keys unless the host has them enabled KVM: PPC: Book3S HV: Add missing barriers to XIVE code and document them KVM: PPC: Book3S HV: Workaround POWER9 DD1.0 bug causing IPB bit loss KVM: PPC: Book3S HV: Use msgsync with hypervisor doorbells on POWER9 KVM: s390: sthyi: fix specification exception detection KVM: s390: sthyi: fix sthyi inline assembly commit 17e34c4fd0be14e989b08734b302cd357126fe2d Merge: 42e6d5e ba74b6f Author: Linus Torvalds Date: Fri Aug 25 17:40:03 2017 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "Fixes two obvious bugs in virtio pci" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_pci: fix cpu affinity support virtio_blk: fix incorrect message when disk is resized commit 42e6d5e5ee05a0a4fa6f71ffeeafc367a1483740 Merge: 105065c 1a92a80 Author: Linus Torvalds Date: Fri Aug 25 17:32:35 2017 -0700 Merge tag 'powerpc-4.13-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "Just one fix, to add a barrier in the switch_mm() code to make sure the mm cpumask update is ordered vs the MMU starting to load translations. As far as we know no one's actually hit the bug, but that's just luck. Thanks to Benjamin Herrenschmidt, Nicholas Piggin" * tag 'powerpc-4.13-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Ensure cpumask update is ordered commit 105065c3f7164d756ee5495b8670e57f2bcf65c3 Merge: 8c7932a eebe53e Author: Linus Torvalds Date: Fri Aug 25 17:27:26 2017 -0700 Merge tag 'nfsd-4.13-2' of git://linux-nfs.org/~bfields/linux Pull nfsd fixes from Bruce Fields: "Two nfsd bugfixes, neither 4.13 regressions, but both potentially serious" * tag 'nfsd-4.13-2' of git://linux-nfs.org/~bfields/linux: net: sunrpc: svcsock: fix NULL-pointer exception nfsd: Limit end of page list when decoding NFSv4 WRITE commit 8c7932a32e1ebf6e845bd32a5399cce442d2e745 Merge: d580e80 d3edede Author: Linus Torvalds Date: Fri Aug 25 17:22:33 2017 -0700 Merge tag 'cifs-fixes-for-4.13-rc6-and-stable' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Some bug fixes for stable for cifs" * tag 'cifs-fixes-for-4.13-rc6-and-stable' of git://git.samba.org/sfrench/cifs-2.6: cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup() cifs: Fix df output for users with quota limits commit ebfa00c5745660fe7f0a91eea88d4dff658486c4 Author: Sabrina Dubroca Date: Fri Aug 25 13:10:12 2017 +0200 tcp: fix refcnt leak with ebpf congestion control There are a few bugs around refcnt handling in the new BPF congestion control setsockopt: - The new ca is assigned to icsk->icsk_ca_ops even in the case where we cannot get a reference on it. This would lead to a use after free, since that ca is going away soon. - Changing the congestion control case doesn't release the refcnt on the previous ca. - In the reinit case, we first leak a reference on the old ca, then we call tcp_reinit_congestion_control on the ca that we have just assigned, leading to deinitializing the wrong ca (->release of the new ca on the old ca's data) and releasing the refcount on the ca that we actually want to use. This is visible by building (for example) BIC as a module and setting net.ipv4.tcp_congestion_control=bic, and using tcp_cong_kern.c from samples/bpf. This patch fixes the refcount issues, and moves reinit back into tcp core to avoid passing a ca pointer back to BPF. Fixes: 91b5b21c7c16 ("bpf: Add support for changing congestion control") Signed-off-by: Sabrina Dubroca Acked-by: Lawrence Brakmo Signed-off-by: David S. Miller include/net/tcp.h | 4 +--- net/core/filter.c | 7 ++----- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_cong.c | 19 ++++++++++++++----- 4 files changed, 18 insertions(+), 14 deletions(-) commit d580e80c7f2ffb8f86e2417495692ce8bcc91dad Merge: 0b31c3e be3e83e Author: Linus Torvalds Date: Fri Aug 25 17:09:19 2017 -0700 Merge tag 'for-linus-20170825' of git://git.infradead.org/linux-mtd Pull MTD fixes from Brian Norris: "Two fixes - one for a 4.13 regression, and the other for an older one: - Atmel NAND: since we started utilizing ONFI timings, we found that we were being too restrict at rejecting them, partly due to discrepancies in ONFI 4.0 and earlier versions. Relax the restriction to keep these platforms booting. This is a 4.13-rc1 regression. - nandsim: repeated probe/removal may not work after a failed init, because we didn't free up our debugfs files properly on the failure path. This has been around since 3.8, but it's nice to get this fixed now in a nice easy patch that can target -stable, since there's already refactoring work (that also fixes the issue) targeted for the next merge window" * tag 'for-linus-20170825' of git://git.infradead.org/linux-mtd: mtd: nand: atmel: Relax tADL_min constraint mtd: nandsim: remove debugfs entries in error path commit 3614364527daa870264f6dde77f02853cdecd02c Author: Steffen Klassert Date: Fri Aug 25 09:05:42 2017 +0200 ipv6: Fix may be used uninitialized warning in rt6_check rt_cookie might be used uninitialized, fix this by initializing it. Fixes: c5cff8561d2d ("ipv6: add rcu grace period before freeing fib6_node") Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b31c3ec1b0eac7ca71a7aa4a4a93d02fcade33d Merge: 1f5de42 22d5382 Author: Linus Torvalds Date: Fri Aug 25 17:02:59 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A small batch of fixes that should be included for the 4.13 release. This contains: - Revert of the 4k loop blocksize support. Even with a recent batch of 4 fixes, we're still not really happy with it. Rather than be stuck with an API issue, let's revert it and get it right for 4.14. - Trivial patch from Bart, adding a few flags to the blk-mq debugfs exports that were added in this release, but not to the debugfs parts. - Regression fix for bsg, fixing a potential kernel panic. From Benjamin. - Tweak for the blk throttling, improving how we account discards. From Shaohua" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq-debugfs: Add names for recently added flags bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer Revert "loop: support 4k physical blocksize" blk-throttle: cap discard request size commit 1f5de42da44adbd4248f7ed6d1650eb1c53f87a0 Merge: 299c460 2a86cdd Author: Linus Torvalds Date: Fri Aug 25 16:59:38 2017 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C has some bugfixes for you: mainly Jarkko fixed up a few things in the designware driver regarding the new slave mode. But Ulf also fixed a long-standing and now agreed suspend problem. Plus, some simple stuff which nonetheless needs fixing" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: designware: Fix runtime PM for I2C slave mode i2c: designware: Remove needless pm_runtime_put_noidle() call i2c: aspeed: fixed potential null pointer dereference i2c: simtec: use release_mem_region instead of release_resource i2c: core: Make comment about I2C table requirement to reflect the code i2c: designware: Fix standard mode speed when configuring the slave mode i2c: designware: Fix oops from i2c_dw_irq_handler_slave i2c: designware: Fix system suspend commit 8e1101d251647802d0a4ae19eb3d0e1453eaeff4 Author: Christoph Hellwig Date: Fri Aug 25 18:58:42 2017 -0500 PCI/MSI: Don't warn when irq_create_affinity_masks() returns NULL irq_create_affinity_masks() can return NULL on non-SMP systems, when there are not enough "free" vectors available to spread, or if memory allocation for the CPU masks fails. Only the allocation failure is of interest, and even then the system will work just fine except for non-optimally spread vectors. Thus remove the warnings. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Acked-by: David S. Miller drivers/pci/msi.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 299c4608763d1555f7a6aa5451d922aa4a08bbd8 Merge: 8efeb35 d83c2db Author: Linus Torvalds Date: Fri Aug 25 16:57:53 2017 -0700 Merge tag 'mmc-v4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fix from Ulf Hansson: "MMC core: don't return error code R1_OUT_OF_RANGE for open-ending mode" * tag 'mmc-v4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: block: prevent propagating R1_OUT_OF_RANGE for open-ending mode commit 8efeb3500c5e41e2123be27bdc6126246747d46a Merge: 985e775 9ce7651 Author: Linus Torvalds Date: Fri Aug 25 16:56:04 2017 -0700 Merge tag 'sound-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "We're keeping in a good shape, this batch contains just a few small fixes (a regression fix for ASoC rt5677 codec, NULL dereference and error-path fixes in firewire, and a corner-case ioctl error fix for user TLV), as well as usual quirks for USB-audio and HD-audio" * tag 'sound-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: rt5677: Reintroduce I2C device IDs ALSA: hda - Add stereo mic quirk for Lenovo G50-70 (17aa:3978) ALSA: core: Fix unexpected error at replacing user TLV ALSA: usb-audio: Add delay quirk for H650e/Jabra 550a USB headsets ALSA: firewire-motu: destroy stream data surely at failure of card initialization ALSA: firewire: fix NULL pointer dereference when releasing uninitialized data of iso-resource commit 985e775573943327bba16326013f56f62c43292c Merge: 9e15400 7f57706 Author: Linus Torvalds Date: Fri Aug 25 16:43:08 2017 -0700 Merge tag 'dmaengine-fix-4.13-rc7' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fix from Vinod Koul: "A single fix for tegra210-adma driver to check of_irq_get() error" * tag 'dmaengine-fix-4.13-rc7' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: tegra210-adma: fix of_irq_get() error check commit 9e15400180a17c3b41b86a03bb96b2aebed86e64 Merge: 90a6cd5 da61197 Author: Linus Torvalds Date: Fri Aug 25 16:39:51 2017 -0700 Merge tag 'drm-fixes-for-v4.13-rc7' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Fixes for rc7, nothing too crazy, some core, i915, and sunxi fixes, Intel CI has been responsible for some of these fixes being required" * tag 'drm-fixes-for-v4.13-rc7' of git://people.freedesktop.org/~airlied/linux: drm/i915/gvt: Fix the kernel null pointer error drm: Release driver tracking before making the object available again drm/i915: Clear lost context-switch interrupts across reset drm/i915/bxt: use NULL for GPIO connection ID drm/i915/cnl: Fix LSPCON support. drm/i915/vbt: ignore extraneous child devices for a port drm/i915: Initialize 'data' in intel_dsi_dcs_backlight.c drm/atomic: If the atomic check fails, return its value first drm/atomic: Handle -EDEADLK with out-fences correctly drm: Fix framebuffer leak drm/imx: ipuv3-plane: fix YUV framebuffer scanout on the base plane gpu: ipu-v3: add DRM dependency drm/rockchip: Fix suspend crash when drm is not bound drm/sun4i: Implement drm_driver lastclose to restore fbdev console commit 91b540f98872a206ea1c49e4aa6ea8eed0886644 Author: Pavel Tatashin Date: Fri Aug 25 15:55:46 2017 -0700 mm/memblock.c: reversed logic in memblock_discard() In recently introduced memblock_discard() there is a reversed logic bug. Memory is freed of static array instead of dynamically allocated one. Link: http://lkml.kernel.org/r/1503511441-95478-2-git-send-email-pasha.tatashin@oracle.com Fixes: 3010f876500f ("mm: discard memblock data later") Signed-off-by: Pavel Tatashin Reported-by: Woody Suwalski Tested-by: Woody Suwalski Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b7e8665b4ff51c034c55df3cff76518d1a9ee3a Author: Eric Biggers Date: Fri Aug 25 15:55:43 2017 -0700 fork: fix incorrect fput of ->exe_file causing use-after-free Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new error path before a reference is taken on the mm_struct's ->exe_file. Since the ->exe_file of the new mm_struct was already set to the old ->exe_file by the memcpy() in dup_mm(), it was possible for the mmput() in the error path of dup_mm() to drop a reference to ->exe_file which was never taken. This caused the struct file to later be freed prematurely. Fix it by updating mm_init() to NULL out the ->exe_file, in the same place it clears other things like the list of mmaps. This bug was found by syzkaller. It can be reproduced using the following C program: #define _GNU_SOURCE #include #include #include #include #include #include static void *mmap_thread(void *_arg) { for (;;) { mmap(NULL, 0x1000000, PROT_READ, MAP_POPULATE|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); } } static void *fork_thread(void *_arg) { usleep(rand() % 10000); fork(); } int main(void) { fork(); fork(); fork(); for (;;) { if (fork() == 0) { pthread_t t; pthread_create(&t, NULL, mmap_thread, NULL); pthread_create(&t, NULL, fork_thread, NULL); usleep(rand() % 10000); syscall(__NR_exit_group, 0); } wait(NULL); } } No special kernel config options are needed. It usually causes a NULL pointer dereference in __remove_shared_vm_struct() during exit, or in dup_mmap() (which is usually inlined into copy_process()) during fork. Both are due to a vm_area_struct's ->vm_file being used after it's already been freed. Google Bug Id: 64772007 Link: http://lkml.kernel.org/r/20170823211408.31198-1-ebiggers3@gmail.com Fixes: 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") Signed-off-by: Eric Biggers Tested-by: Mark Rutland Acked-by: Michal Hocko Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Vlastimil Babka Cc: [v4.7+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/fork.c | 1 + 1 file changed, 1 insertion(+) commit 263630e8d176d87308481ebdcd78ef9426739c6b Author: Eric Biggers Date: Fri Aug 25 15:55:39 2017 -0700 mm/madvise.c: fix freeing of locked page with MADV_FREE If madvise(..., MADV_FREE) split a transparent hugepage, it called put_page() before unlock_page(). This was wrong because put_page() can free the page, e.g. if a concurrent madvise(..., MADV_DONTNEED) has removed it from the memory mapping. put_page() then rightfully complained about freeing a locked page. Fix this by moving the unlock_page() before put_page(). This bug was found by syzkaller, which encountered the following splat: BUG: Bad page state in process syzkaller412798 pfn:1bd800 page:ffffea0006f60000 count:0 mapcount:0 mapping: (null) index:0x20a00 flags: 0x200000000040019(locked|uptodate|dirty|swapbacked) raw: 0200000000040019 0000000000000000 0000000000020a00 00000000ffffffff raw: ffffea0006f60020 ffffea0006f60020 0000000000000000 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set bad because of flags: 0x1(locked) Modules linked in: CPU: 1 PID: 3037 Comm: syzkaller412798 Not tainted 4.13.0-rc5+ #35 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 bad_page+0x230/0x2b0 mm/page_alloc.c:565 free_pages_check_bad+0x1f0/0x2e0 mm/page_alloc.c:943 free_pages_check mm/page_alloc.c:952 [inline] free_pages_prepare mm/page_alloc.c:1043 [inline] free_pcp_prepare mm/page_alloc.c:1068 [inline] free_hot_cold_page+0x8cf/0x12b0 mm/page_alloc.c:2584 __put_single_page mm/swap.c:79 [inline] __put_page+0xfb/0x160 mm/swap.c:113 put_page include/linux/mm.h:814 [inline] madvise_free_pte_range+0x137a/0x1ec0 mm/madvise.c:371 walk_pmd_range mm/pagewalk.c:50 [inline] walk_pud_range mm/pagewalk.c:108 [inline] walk_p4d_range mm/pagewalk.c:134 [inline] walk_pgd_range mm/pagewalk.c:160 [inline] __walk_page_range+0xc3a/0x1450 mm/pagewalk.c:249 walk_page_range+0x200/0x470 mm/pagewalk.c:326 madvise_free_page_range.isra.9+0x17d/0x230 mm/madvise.c:444 madvise_free_single_vma+0x353/0x580 mm/madvise.c:471 madvise_dontneed_free mm/madvise.c:555 [inline] madvise_vma mm/madvise.c:664 [inline] SYSC_madvise mm/madvise.c:832 [inline] SyS_madvise+0x7d3/0x13c0 mm/madvise.c:760 entry_SYSCALL_64_fastpath+0x1f/0xbe Here is a C reproducer: #define _GNU_SOURCE #include #include #include #define MADV_FREE 8 #define PAGE_SIZE 4096 static void *mapping; static const size_t mapping_size = 0x1000000; static void *madvise_thrproc(void *arg) { madvise(mapping, mapping_size, (long)arg); } int main(void) { pthread_t t[2]; for (;;) { mapping = mmap(NULL, mapping_size, PROT_WRITE, MAP_POPULATE|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); munmap(mapping + mapping_size / 2, PAGE_SIZE); pthread_create(&t[0], 0, madvise_thrproc, (void*)MADV_DONTNEED); pthread_create(&t[1], 0, madvise_thrproc, (void*)MADV_FREE); pthread_join(t[0], NULL); pthread_join(t[1], NULL); munmap(mapping, mapping_size); } } Note: to see the splat, CONFIG_TRANSPARENT_HUGEPAGE=y and CONFIG_DEBUG_VM=y are needed. Google Bug Id: 64696096 Link: http://lkml.kernel.org/r/20170823205235.132061-1-ebiggers3@gmail.com Fixes: 854e9ed09ded ("mm: support madvise(MADV_FREE)") Signed-off-by: Eric Biggers Acked-by: David Rientjes Acked-by: Minchan Kim Acked-by: Michal Hocko Cc: Dmitry Vyukov Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: [v4.5+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fffa281b48a91ad6dac1a18c5907ece58fa3879b Author: Ross Zwisler Date: Fri Aug 25 15:55:36 2017 -0700 dax: fix deadlock due to misaligned PMD faults In DAX there are two separate places where the 2MiB range of a PMD is defined. The first is in the page tables, where a PMD mapping inserted for a given address spans from (vmf->address & PMD_MASK) to ((vmf->address & PMD_MASK) + PMD_SIZE - 1). That is, from the 2MiB boundary below the address to the 2MiB boundary above the address. So, for example, a fault at address 3MiB (0x30 0000) falls within the PMD that ranges from 2MiB (0x20 0000) to 4MiB (0x40 0000). The second PMD range is in the mapping->page_tree, where a given file offset is covered by a radix tree entry that spans from one 2MiB aligned file offset to another 2MiB aligned file offset. So, for example, the file offset for 3MiB (pgoff 768) falls within the PMD range for the order 9 radix tree entry that ranges from 2MiB (pgoff 512) to 4MiB (pgoff 1024). This system works so long as the addresses and file offsets for a given mapping both have the same offsets relative to the start of each PMD. Consider the case where the starting address for a given file isn't 2MiB aligned - say our faulting address is 3 MiB (0x30 0000), but that corresponds to the beginning of our file (pgoff 0). Now all the PMDs in the mapping are misaligned so that the 2MiB range defined in the page tables never matches up with the 2MiB range defined in the radix tree. The current code notices this case for DAX faults to storage with the following test in dax_pmd_insert_mapping(): if (pfn_t_to_pfn(pfn) & PG_PMD_COLOUR) goto unlock_fallback; This test makes sure that the pfn we get from the driver is 2MiB aligned, and relies on the assumption that the 2MiB alignment of the pfn we get back from the driver matches the 2MiB alignment of the faulting address. However, faults to holes were not checked and we could hit the problem described above. This was reported in response to the NVML nvml/src/test/pmempool_sync TEST5: $ cd nvml/src/test/pmempool_sync $ make TEST5 You can grab NVML here: https://github.com/pmem/nvml/ The dmesg warning you see when you hit this error is: WARNING: CPU: 13 PID: 2900 at fs/dax.c:641 dax_insert_mapping_entry+0x2df/0x310 Where we notice in dax_insert_mapping_entry() that the radix tree entry we are about to replace doesn't match the locked entry that we had previously inserted into the tree. This happens because the initial insertion was done in grab_mapping_entry() using a pgoff calculated from the faulting address (vmf->address), and the replacement in dax_pmd_load_hole() => dax_insert_mapping_entry() is done using vmf->pgoff. In our failure case those two page offsets (one calculated from vmf->address, one using vmf->pgoff) point to different order 9 radix tree entries. This failure case can result in a deadlock because the radix tree unlock also happens on the pgoff calculated from vmf->address. This means that the locked radix tree entry that we swapped in to the tree in dax_insert_mapping_entry() using vmf->pgoff is never unlocked, so all future faults to that 2MiB range will block forever. Fix this by validating that the faulting address's PMD offset matches the PMD offset from the start of the file. This check is done at the very beginning of the fault and covers faults that would have mapped to storage as well as faults to holes. I left the COLOUR check in dax_pmd_insert_mapping() in place in case we ever hit the insanity condition where the alignment of the pfn we get from the driver doesn't match the alignment of the userspace address. Link: http://lkml.kernel.org/r/20170822222436.18926-1-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reported-by: "Slusarz, Marcin" Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 435c0b87d661da83771c30ed775f7c37eed193fb Author: Kirill A. Shutemov Date: Fri Aug 25 15:55:33 2017 -0700 mm, shmem: fix handling /sys/kernel/mm/transparent_hugepage/shmem_enabled /sys/kernel/mm/transparent_hugepage/shmem_enabled controls if we want to allocate huge pages when allocate pages for private in-kernel shmem mount. Unfortunately, as Dan noticed, I've screwed it up and the only way to make kernel allocate huge page for the mount is to use "force" there. All other values will be effectively ignored. Link: http://lkml.kernel.org/r/20170822144254.66431-1-kirill.shutemov@linux.intel.com Fixes: 5a6e75f8110c ("shmem: prepare huge= mount option and sysfs knob") Signed-off-by: Kirill A. Shutemov Reported-by: Dan Carpenter Cc: stable [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 556b969a1cfe2686aae149137fa1dfcac0eefe54 Author: Chen Yu Date: Fri Aug 25 15:55:30 2017 -0700 PM/hibernate: touch NMI watchdog when creating snapshot There is a problem that when counting the pages for creating the hibernation snapshot will take significant amount of time, especially on system with large memory. Since the counting job is performed with irq disabled, this might lead to NMI lockup. The following warning were found on a system with 1.5TB DRAM: Freezing user space processes ... (elapsed 0.002 seconds) done. OOM killer disabled. PM: Preallocating image memory... NMI watchdog: Watchdog detected hard LOCKUP on cpu 27 CPU: 27 PID: 3128 Comm: systemd-sleep Not tainted 4.13.0-0.rc2.git0.1.fc27.x86_64 #1 task: ffff9f01971ac000 task.stack: ffffb1a3f325c000 RIP: 0010:memory_bm_find_bit+0xf4/0x100 Call Trace: swsusp_set_page_free+0x2b/0x30 mark_free_pages+0x147/0x1c0 count_data_pages+0x41/0xa0 hibernate_preallocate_memory+0x80/0x450 hibernation_snapshot+0x58/0x410 hibernate+0x17c/0x310 state_store+0xdf/0xf0 kobj_attr_store+0xf/0x20 sysfs_kf_write+0x37/0x40 kernfs_fop_write+0x11c/0x1a0 __vfs_write+0x37/0x170 vfs_write+0xb1/0x1a0 SyS_write+0x55/0xc0 entry_SYSCALL_64_fastpath+0x1a/0xa5 ... done (allocated 6590003 pages) PM: Allocated 26360012 kbytes in 19.89 seconds (1325.28 MB/s) It has taken nearly 20 seconds(2.10GHz CPU) thus the NMI lockup was triggered. In case the timeout of the NMI watch dog has been set to 1 second, a safe interval should be 6590003/20 = 320k pages in theory. However there might also be some platforms running at a lower frequency, so feed the watchdog every 100k pages. [yu.c.chen@intel.com: simplification] Link: http://lkml.kernel.org/r/1503460079-29721-1-git-send-email-yu.c.chen@intel.com [yu.c.chen@intel.com: use interval of 128k instead of 100k to avoid modulus] Link: http://lkml.kernel.org/r/1503328098-5120-1-git-send-email-yu.c.chen@intel.com Signed-off-by: Chen Yu Reported-by: Jan Filipcewicz Suggested-by: Michal Hocko Reviewed-by: Michal Hocko Acked-by: Rafael J. Wysocki Cc: Mel Gorman Cc: Vlastimil Babka Cc: Len Brown Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit dc52d783d68c07a68743d42ef2f9a6f9a6d80fb1 Author: Annie Li Date: Thu Aug 24 17:25:59 2017 -0400 xen-blkback: stop blkback thread of every queue in xen_blkif_disconnect In xen_blkif_disconnect, before checking inflight I/O, following code stops the blkback thread, if (ring->xenblkd) { kthread_stop(ring->xenblkd); wake_up(&ring->shutdown_wq); } If there is inflight I/O in any non-last queue, blkback returns -EBUSY directly, and above code would not be called to stop thread of remaining queue and processs them. When removing vbd device with lots of disk I/O load, some queues with inflight I/O still have blkback thread running even though the corresponding vbd device or guest is gone. And this could cause some problems, for example, if the backend device type is file, some loop devices and blkback thread always lingers there forever after guest is destroyed, and this causes failure of umounting repositories unless rebooting the dom0. This patch allows thread of every queue has the chance to get stopped. Otherwise, only thread of queue previous to(including) first busy one get stopped, blkthread of remaining queue will still run. So stop all threads properly and return -EBUSY if any queue has inflight I/O. Signed-off-by: Annie Li Reviewed-by: Herbert van den Bergh Reviewed-by: Bhavesh Davda Reviewed-by: Adnan Misherfi Acked-by: Roger Pau Monné Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/xenbus.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ba74b6f7fcc07355d087af6939712eed4a454821 Author: Christoph Hellwig Date: Thu Aug 24 18:07:02 2017 +0200 virtio_pci: fix cpu affinity support Commit 0b0f9dc5 ("Revert "virtio_pci: use shared interrupts for virtqueues"") removed the adjustment of the pre_vectors for the virtio MSI-X vector allocation which was added in commit fb5e31d9 ("virtio: allow drivers to request IRQ affinity when creating VQs"). This will lead to an incorrect assignment of MSI-X vectors, and potential deadlocks when offlining cpus. Signed-off-by: Christoph Hellwig Fixes: 0b0f9dc5 ("Revert "virtio_pci: use shared interrupts for virtqueues") Reported-by: YASUAKI ISHIMATSU Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 1046d304900cf9d4b2c730c6860b8e03cc704377 Author: Stefan Hajnoczi Date: Wed Jul 26 15:32:23 2017 +0100 virtio_blk: fix incorrect message when disk is resized The message printed on disk resize is incorrect. The following is printed when resizing to 2 GiB: $ truncate -s 1G test.img $ qemu -device virtio-blk-pci,logical_block_size=4096,... (qemu) block_resize drive1 2G virtio_blk virtio0: new size: 4194304 4096-byte logical blocks (17.2 GB/16.0 GiB) The virtio_blk capacity config field is in 512-byte sector units regardless of logical_block_size as per the VIRTIO specification. Therefore the message should read: virtio_blk virtio0: new size: 524288 4096-byte logical blocks (2.15 GB/2.0 GiB) Note that this only affects the printed message. Thankfully the actual block device has the correct size because the block layer expects capacity in sectors. Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin drivers/block/virtio_blk.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 22d538213ec4fa65b08b1edbf610066d8aab7bbb Author: Bart Van Assche Date: Fri Aug 18 15:52:54 2017 -0700 blk-mq-debugfs: Add names for recently added flags The symbolic constants QUEUE_FLAG_SCSI_PASSTHROUGH, QUEUE_FLAG_QUIESCED and REQ_NOWAIT are missing from blk-mq-debugfs.c. Add these to blk-mq-debugfs.c such that these appear as names in debugfs instead of as numbers. Reviewed-by: Omar Sandoval Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 3 +++ 1 file changed, 3 insertions(+) commit 47c5310a8dbe7c2cb9f0083daa43ceed76c257fa Author: Paul Mackerras Date: Thu Aug 24 19:14:47 2017 +1000 KVM: PPC: Book3S: Fix race and leak in kvm_vm_ioctl_create_spapr_tce() Nixiaoming pointed out that there is a memory leak in kvm_vm_ioctl_create_spapr_tce() if the call to anon_inode_getfd() fails; the memory allocated for the kvmppc_spapr_tce_table struct is not freed, and nor are the pages allocated for the iommu tables. In addition, we have already incremented the process's count of locked memory pages, and this doesn't get restored on error. David Hildenbrand pointed out that there is a race in that the function checks early on that there is not already an entry in the stt->iommu_tables list with the same LIOBN, but an entry with the same LIOBN could get added between then and when the new entry is added to the list. This fixes all three problems. To simplify things, we now call anon_inode_getfd() before placing the new entry in the list. The check for an existing entry is done while holding the kvm->lock mutex, immediately before adding the new entry to the list. Finally, on failure we now call kvmppc_account_memlimit to decrement the process's count of locked memory pages. Reported-by: Nixiaoming Reported-by: David Hildenbrand Signed-off-by: Paul Mackerras Signed-off-by: Paolo Bonzini arch/powerpc/kvm/book3s_64_vio.c | 56 ++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 22 deletions(-) commit 64aee2a965cf2954a038b5522f11d2cd2f0f8f3e Author: Mark Rutland Date: Thu Jun 22 15:41:38 2017 +0100 perf/core: Fix group {cpu,task} validation Regardless of which events form a group, it does not make sense for the events to target different tasks and/or CPUs, as this leaves the group inconsistent and impossible to schedule. The core perf code assumes that these are consistent across (successfully intialised) groups. Core perf code only verifies this when moving SW events into a HW context. Thus, we can violate this requirement for pure SW groups and pure HW groups, unless the relevant PMU driver happens to perform this verification itself. These mismatched groups subsequently wreak havoc elsewhere. For example, we handle watchpoints as SW events, and reserve watchpoint HW on a per-CPU basis at pmu::event_init() time to ensure that any event that is initialised is guaranteed to have a slot at pmu::add() time. However, the core code only checks the group leader's cpu filter (via event_filter_match()), and can thus install follower events onto CPUs violating thier (mismatched) CPU filters, potentially installing them into a CPU without sufficient reserved slots. This can be triggered with the below test case, resulting in warnings from arch backends. #define _GNU_SOURCE #include #include #include #include #include #include #include static int perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu, int group_fd, unsigned long flags) { return syscall(__NR_perf_event_open, attr, pid, cpu, group_fd, flags); } char watched_char; struct perf_event_attr wp_attr = { .type = PERF_TYPE_BREAKPOINT, .bp_type = HW_BREAKPOINT_RW, .bp_addr = (unsigned long)&watched_char, .bp_len = 1, .size = sizeof(wp_attr), }; int main(int argc, char *argv[]) { int leader, ret; cpu_set_t cpus; /* * Force use of CPU0 to ensure our CPU0-bound events get scheduled. */ CPU_ZERO(&cpus); CPU_SET(0, &cpus); ret = sched_setaffinity(0, sizeof(cpus), &cpus); if (ret) { printf("Unable to set cpu affinity\n"); return 1; } /* open leader event, bound to this task, CPU0 only */ leader = perf_event_open(&wp_attr, 0, 0, -1, 0); if (leader < 0) { printf("Couldn't open leader: %d\n", leader); return 1; } /* * Open a follower event that is bound to the same task, but a * different CPU. This means that the group should never be possible to * schedule. */ ret = perf_event_open(&wp_attr, 0, 1, leader, 0); if (ret < 0) { printf("Couldn't open mismatched follower: %d\n", ret); return 1; } else { printf("Opened leader/follower with mismastched CPUs\n"); } /* * Open as many independent events as we can, all bound to the same * task, CPU0 only. */ do { ret = perf_event_open(&wp_attr, 0, 0, -1, 0); } while (ret >= 0); /* * Force enable/disble all events to trigger the erronoeous * installation of the follower event. */ printf("Opened all events. Toggling..\n"); for (;;) { prctl(PR_TASK_PERF_EVENTS_DISABLE, 0, 0, 0, 0); prctl(PR_TASK_PERF_EVENTS_ENABLE, 0, 0, 0, 0); } return 0; } Fix this by validating this requirement regardless of whether we're moving events. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Zhou Chengming Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1498142498-15758-1-git-send-email-mark.rutland@arm.com Signed-off-by: Ingo Molnar kernel/events/core.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit ccd5b3235180eef3cfec337df1c8554ab151b5cc Author: Eric Biggers Date: Thu Aug 24 10:50:29 2017 -0700 x86/mm: Fix use-after-free of ldt_struct The following commit: 39a0526fb3f7 ("x86/mm: Factor out LDT init from context init") renamed init_new_context() to init_new_context_ldt() and added a new init_new_context() which calls init_new_context_ldt(). However, the error code of init_new_context_ldt() was ignored. Consequently, if a memory allocation in alloc_ldt_struct() failed during a fork(), the ->context.ldt of the new task remained the same as that of the old task (due to the memcpy() in dup_mm()). ldt_struct's are not intended to be shared, so a use-after-free occurred after one task exited. Fix the bug by making init_new_context() pass through the error code of init_new_context_ldt(). This bug was found by syzkaller, which encountered the following splat: BUG: KASAN: use-after-free in free_ldt_struct.part.2+0x10a/0x150 arch/x86/kernel/ldt.c:116 Read of size 4 at addr ffff88006d2cb7c8 by task kworker/u9:0/3710 CPU: 1 PID: 3710 Comm: kworker/u9:0 Not tainted 4.13.0-rc4-next-20170811 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x24e/0x340 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 free_ldt_struct.part.2+0x10a/0x150 arch/x86/kernel/ldt.c:116 free_ldt_struct arch/x86/kernel/ldt.c:173 [inline] destroy_context_ldt+0x60/0x80 arch/x86/kernel/ldt.c:171 destroy_context arch/x86/include/asm/mmu_context.h:157 [inline] __mmdrop+0xe9/0x530 kernel/fork.c:889 mmdrop include/linux/sched/mm.h:42 [inline] exec_mmap fs/exec.c:1061 [inline] flush_old_exec+0x173c/0x1ff0 fs/exec.c:1291 load_elf_binary+0x81f/0x4ba0 fs/binfmt_elf.c:855 search_binary_handler+0x142/0x6b0 fs/exec.c:1652 exec_binprm fs/exec.c:1694 [inline] do_execveat_common.isra.33+0x1746/0x22e0 fs/exec.c:1816 do_execve+0x31/0x40 fs/exec.c:1860 call_usermodehelper_exec_async+0x457/0x8f0 kernel/umh.c:100 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 Allocated by task 3700: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3627 kmalloc include/linux/slab.h:493 [inline] alloc_ldt_struct+0x52/0x140 arch/x86/kernel/ldt.c:67 write_ldt+0x7b7/0xab0 arch/x86/kernel/ldt.c:277 sys_modify_ldt+0x1ef/0x240 arch/x86/kernel/ldt.c:307 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 3700: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kfree+0xca/0x250 mm/slab.c:3820 free_ldt_struct.part.2+0xdd/0x150 arch/x86/kernel/ldt.c:121 free_ldt_struct arch/x86/kernel/ldt.c:173 [inline] destroy_context_ldt+0x60/0x80 arch/x86/kernel/ldt.c:171 destroy_context arch/x86/include/asm/mmu_context.h:157 [inline] __mmdrop+0xe9/0x530 kernel/fork.c:889 mmdrop include/linux/sched/mm.h:42 [inline] __mmput kernel/fork.c:916 [inline] mmput+0x541/0x6e0 kernel/fork.c:927 copy_process.part.36+0x22e1/0x4af0 kernel/fork.c:1931 copy_process kernel/fork.c:1546 [inline] _do_fork+0x1ef/0xfb0 kernel/fork.c:2025 SYSC_clone kernel/fork.c:2135 [inline] SyS_clone+0x37/0x50 kernel/fork.c:2129 do_syscall_64+0x26c/0x8c0 arch/x86/entry/common.c:287 return_from_SYSCALL_64+0x0/0x7a Here is a C reproducer: #include #include #include #include #include #include #include static void *fork_thread(void *_arg) { fork(); } int main(void) { struct user_desc desc = { .entry_number = 8191 }; syscall(__NR_modify_ldt, 1, &desc, sizeof(desc)); for (;;) { if (fork() == 0) { pthread_t t; srand(getpid()); pthread_create(&t, NULL, fork_thread, NULL); usleep(rand() % 10000); syscall(__NR_exit_group, 0); } wait(NULL); } } Note: the reproducer takes advantage of the fact that alloc_ldt_struct() may use vmalloc() to allocate a large ->entries array, and after commit: 5d17a73a2ebe ("vmalloc: back off when the current task is killed") it is possible for userspace to fail a task's vmalloc() by sending a fatal signal, e.g. via exit_group(). It would be more difficult to reproduce this bug on kernels without that commit. This bug only affected kernels with CONFIG_MODIFY_LDT_SYSCALL=y. Signed-off-by: Eric Biggers Acked-by: Dave Hansen Cc: [v4.6+] Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Christoph Hellwig Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: Rik van Riel Cc: Tetsuo Handa Cc: Thomas Gleixner Cc: linux-mm@kvack.org Fixes: 39a0526fb3f7 ("x86/mm: Factor out LDT init from context init") Link: http://lkml.kernel.org/r/20170824175029.76040-1-ebiggers3@gmail.com Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 38cfd5e3df9c4f88e76b547eee2087ee5c042ae2 Author: Paolo Bonzini Date: Wed Aug 23 23:16:29 2017 +0200 KVM, pkeys: do not use PKRU value in vcpu->arch.guest_fpu.state The host pkru is restored right after vcpu exit (commit 1be0e61), so KVM_GET_XSAVE will return the host PKRU value instead. Fix this by using the guest PKRU explicitly in fill_xsave and load_xsave. This part is based on a patch by Junkang Fu. The host PKRU data may also not match the value in vcpu->arch.guest_fpu.state, because it could have been changed by userspace since the last time it was saved, so skip loading it in kvm_load_guest_fpu. Reported-by: Junkang Fu Cc: Yang Zhang Fixes: 1be0e61c1f255faaeab04a390e00c8b9b9042870 Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/include/asm/fpu/internal.h | 6 +++--- arch/x86/kvm/x86.c | 17 ++++++++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) commit b9dd21e104bcd45e124acfe978a79df71259e59b Author: Paolo Bonzini Date: Wed Aug 23 23:14:38 2017 +0200 KVM: x86: simplify handling of PKRU Move it to struct kvm_arch_vcpu, replacing guest_pkru_valid with a simple comparison against the host value of the register. The write of PKRU in addition can be skipped if the guest has not enabled the feature. Once we do this, we need not test OSPKE in the host anymore, because guest_CR4.PKE=1 implies host_CR4.PKE=1. The static PKU test is kept to elide the code on older CPUs. Suggested-by: Yang Zhang Fixes: 1be0e61c1f255faaeab04a390e00c8b9b9042870 Cc: stable@vger.kernel.org Reviewed-by: David Hildenbrand Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/kvm_cache_regs.h | 5 ----- arch/x86/kvm/mmu.h | 2 +- arch/x86/kvm/svm.c | 7 ------- arch/x86/kvm/vmx.c | 25 ++++++++----------------- 5 files changed, 10 insertions(+), 30 deletions(-) commit c469268cd523245cc58255f6696e0c295485cb0b Author: Paolo Bonzini Date: Thu Aug 24 11:59:31 2017 +0200 KVM: x86: block guest protection keys unless the host has them enabled If the host has protection keys disabled, we cannot read and write the guest PKRU---RDPKRU and WRPKRU fail with #GP(0) if CR4.PKE=0. Block the PKU cpuid bit in that case. This ensures that guest_CR4.PKE=1 implies host_CR4.PKE=1. Fixes: 1be0e61c1f255faaeab04a390e00c8b9b9042870 Cc: stable@vger.kernel.org Reviewed-by: David Hildenbrand Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54ffd790792898f05e215dce5aa593473e80e92f Author: Steffen Klassert Date: Fri Aug 25 07:34:35 2017 +0200 esp: Fix skb tailroom calculation We use skb_availroom to calculate the skb tailroom for the ESP trailer. skb_availroom calculates the tailroom and subtracts this value by reserved_tailroom. However reserved_tailroom is a union with the skb mark. This means that we subtract the tailroom by the skb mark if set. Fix this by using skb_tailroom instead. Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible") Fixes: 03e2a30f6a27 ("esp6: Avoid skb_cow_data whenever possible") Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 2 +- net/ipv6/esp6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 36ff0dd39f9b88ca83e1733b735e9f22b7be893b Author: Steffen Klassert Date: Fri Aug 25 07:16:07 2017 +0200 esp: Fix locking on page fragment allocation We allocate the page fragment for the ESP trailer inside a spinlock, but consume it outside of the lock. This is racy as some other cou could get the same page fragment then. Fix this by consuming the page fragment inside the lock too. Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible") Fixes: 03e2a30f6a27 ("esp6: Avoid skb_cow_data whenever possible") Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 5 +++-- net/ipv6/esp6.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 9b4e946ce14e20d7addbfb7d9139e604f9fda107 Author: stephen hemminger Date: Thu Aug 24 16:49:16 2017 -0700 netvsc: fix deadlock betwen link status and removal There is a deadlock possible when canceling the link status delayed work queue. The removal process is run with RTNL held, and the link status callback is acquring RTNL. Resolve the issue by using trylock and rescheduling. If cancel is in process, that block it from happening. Fixes: 122a5f6410f4 ("staging: hv: use delayed_work for netvsc_send_garp()") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c3d8d60e1efe5432dc4905646481f460795fac4e Merge: 551143d 991ca84 Author: David S. Miller Date: Thu Aug 24 21:54:35 2017 -0700 Merge branch 'tipc-buffer-reassignment-fixes' Parthasarathy Bhuvaragan says: ==================== tipc: buffer reassignment fixes This series contains fixes for buffer reassignments and a context imbalance. ==================== Signed-off-by: David S. Miller commit 991ca84daa001193066554fa49f3a934746317d6 Author: Parthasarathy Bhuvaragan Date: Thu Aug 24 16:31:24 2017 +0200 tipc: context imbalance at node read unlock If we fail to find a valid bearer in tipc_node_get_linkname(), node_read_unlock() is called without holding the node read lock. This commit fixes this error. Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60d1d93664a0bb3d5af722ed38c57ee165a45bf7 Author: Parthasarathy Bhuvaragan Date: Thu Aug 24 16:31:23 2017 +0200 tipc: reassign pointers after skb reallocation / linearization In tipc_msg_reverse(), we assign skb attributes to local pointers in stack at startup. This is followed by skb_linearize() and for cloned buffers we perform skb relocation using pskb_expand_head(). Both these methods may update the skb attributes and thus making the pointers incorrect. In this commit, we fix this error by ensuring that the pointers are re-assigned after any of these skb operations. Fixes: 29042e19f2c60 ("tipc: let function tipc_msg_reverse() expand header when needed") Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/msg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 27163138b4d80e36f2006273d66b6c122d241f30 Author: Parthasarathy Bhuvaragan Date: Thu Aug 24 16:31:22 2017 +0200 tipc: perform skb_linearize() before parsing the inner header In tipc_rcv(), we linearize only the header and usually the packets are consumed as the nodes permit direct reception. However, if the skb contains tunnelled message due to fail over or synchronization we parse it in tipc_node_check_state() without performing linearization. This will cause link disturbances if the skb was non linear. In this commit, we perform linearization for the above messages. Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/node.c | 2 ++ 1 file changed, 2 insertions(+) commit 551143d8d954fe398324a5caa276f518466c428b Author: Eric Dumazet Date: Thu Aug 24 21:12:28 2017 -0700 net_sched: fix a refcount_t issue with noop_qdisc syzkaller reported a refcount_t warning [1] Issue here is that noop_qdisc refcnt was never really considered as a true refcount, since qdisc_destroy() found TCQ_F_BUILTIN set : if (qdisc->flags & TCQ_F_BUILTIN || !refcount_dec_and_test(&qdisc->refcnt))) return; Meaning that all atomic_inc() we did on noop_qdisc.refcnt were not really needed, but harmless until refcount_t came. To fix this problem, we simply need to not increment noop_qdisc.refcnt, since we never decrement it. [1] refcount_t: increment on 0; use-after-free. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 21754 at lib/refcount.c:152 refcount_inc+0x47/0x50 lib/refcount.c:152 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 21754 Comm: syz-executor7 Not tainted 4.13.0-rc6+ #20 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 panic+0x1e4/0x417 kernel/panic.c:180 __warn+0x1c4/0x1d9 kernel/panic.c:541 report_bug+0x211/0x2d0 lib/bug.c:183 fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:190 do_trap_no_signal arch/x86/kernel/traps.c:224 [inline] do_trap+0x260/0x390 arch/x86/kernel/traps.c:273 do_error_trap+0x120/0x390 arch/x86/kernel/traps.c:310 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:323 invalid_op+0x1e/0x30 arch/x86/entry/entry_64.S:846 RIP: 0010:refcount_inc+0x47/0x50 lib/refcount.c:152 RSP: 0018:ffff8801c43477a0 EFLAGS: 00010282 RAX: 000000000000002b RBX: ffffffff86093c14 RCX: 0000000000000000 RDX: 000000000000002b RSI: ffffffff8159314e RDI: ffffed0038868ee8 RBP: ffff8801c43477a8 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff86093ac0 R13: 0000000000000001 R14: ffff8801d0f3bac0 R15: dffffc0000000000 attach_default_qdiscs net/sched/sch_generic.c:792 [inline] dev_activate+0x7d3/0xaa0 net/sched/sch_generic.c:833 __dev_open+0x227/0x330 net/core/dev.c:1380 __dev_change_flags+0x695/0x990 net/core/dev.c:6726 dev_change_flags+0x88/0x140 net/core/dev.c:6792 dev_ifsioc+0x5a6/0x930 net/core/dev_ioctl.c:256 dev_ioctl+0x2bc/0xf90 net/core/dev_ioctl.c:554 sock_do_ioctl+0x94/0xb0 net/socket.c:968 sock_ioctl+0x2c2/0x440 net/socket.c:1058 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 Fixes: 7b9364050246 ("net, sched: convert Qdisc.refcnt from atomic_t to refcount_t") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Reshetova, Elena Signed-off-by: David S. Miller include/net/sch_generic.h | 7 +++++++ net/sched/sch_api.c | 6 +++--- net/sched/sch_generic.c | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) commit be3e83e3471cd0faff2c2d88fe9cfc73d9a9745a Author: Boris Brezillon Date: Wed Aug 23 20:45:01 2017 +0200 mtd: nand: atmel: Relax tADL_min constraint Version 4 of the ONFI spec mandates that tADL be at least 400 nanoseconds, but, depending on the master clock rate, 400 ns may not fit in the tADL field of the SMC reg. We need to relax the check and accept the -ERANGE return code. Note that previous versions of the ONFI spec had a lower tADL_min (100 or 200 ns). It's not clear why this timing constraint got increased but it seems most NANDs are fine with values lower than 400ns, so we should be safe. Fixes: f9ce2eddf176 ("mtd: nand: atmel: Add ->setup_data_interface() hooks") Signed-off-by: Boris Brezillon Tested-by: Quentin Schulz Signed-off-by: Brian Norris drivers/mtd/nand/atmel/nand-controller.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit b974696da1cfc5aa0c29ed97dc8f6c239899e64b Author: Uwe Kleine-König Date: Wed Aug 23 09:03:04 2017 +0200 mtd: nandsim: remove debugfs entries in error path The debugfs entries must be removed before an error is returned in the probe function. Otherwise another try to load the module fails and when the debugfs files are accessed without the module loaded, the kernel still tries to call a function in that module. Fixes: 5346c27c5fed ("mtd: nandsim: Introduce debugfs infrastructure") Signed-off-by: Uwe Kleine-König Reviewed-by: Richard Weinberger Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/nand/nandsim.c | 1 + 1 file changed, 1 insertion(+) commit c2062ee3d9615828109ffe8089fbf69bed394d05 Author: Florian Fainelli Date: Thu Aug 24 16:01:13 2017 -0700 net: systemport: Free DMA coherent descriptors on errors In case bcm_sysport_init_tx_ring() is not able to allocate ring->cbs, we would return with an error, and call bcm_sysport_fini_tx_ring() and it would see that ring->cbs is NULL and do nothing. This would leak the coherent DMA descriptor area, so we need to free it on error before returning. Reported-by: Eric Dumazet Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 2 ++ 1 file changed, 2 insertions(+) commit d4fec855905fa8bd5fb1c59f73ad2d74a944876a Author: Florian Fainelli Date: Thu Aug 24 15:56:29 2017 -0700 net: bcmgenet: Be drop monitor friendly There are 3 spots where we call dev_kfree_skb() but we are actually just doing a normal SKB consumption: __bcmgenet_tx_reclaim() for normal TX reclamation, bcmgenet_alloc_rx_buffers() during the initial RX ring setup and bcmgenet_free_rx_buffers() during RX ring cleanup. Fixes: d6707bec5986 ("net: bcmgenet: rewrite bcmgenet_rx_refill()") Fixes: f48bed16a756 ("net: bcmgenet: Free skb after last Tx frag") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4e458debbb69af0cbde5bd6430d64519d5f59274 Author: Yuchung Cheng Date: Thu Aug 24 15:48:21 2017 -0700 bpf: fix bpf_setsockopts return value This patch fixes a bug causing any sock operations to always return EINVAL. Fixes: a5192c52377e ("bpf: fix to bpf_setsockops"). Reported-by: Neal Cardwell Signed-off-by: Yuchung Cheng Acked-by: Neal Cardwell Acked-by: Craig Gallek Acked-by: Daniel Borkmann Acked-by: Lawrence Brakmo Signed-off-by: David S. Miller net/core/filter.c | 1 - 1 file changed, 1 deletion(-) commit c45182eb967af11e9482168be5be41aa22e5d321 Author: Florian Fainelli Date: Thu Aug 24 15:20:41 2017 -0700 net: systemport: Be drop monitor friendly Utilize dev_consume_skb_any(cb->skb) in bcm_sysport_free_cb() which is used when a TX packet is completed, as well as when the RX ring is cleaned on shutdown. None of these two cases are packet drops, so be drop monitor friendly. Suggested-by: Eric Dumazet Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da6119797705c2270f17b287660a1e7bd782a1eb Merge: 4b5587c fe4600a Author: Dave Airlie Date: Fri Aug 25 09:29:38 2017 +1000 Merge tag 'drm-misc-fixes-2017-08-24' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Core Changes: - Release driver tracking before making the object available again (Chris) Cc: Chris Wilson * tag 'drm-misc-fixes-2017-08-24' of git://anongit.freedesktop.org/git/drm-misc: drm: Release driver tracking before making the object available again commit 4b5587c8c38754a5204e9bfd72900bd91e6b3610 Merge: b313f78 e7c50e1 Author: Dave Airlie Date: Fri Aug 25 09:29:06 2017 +1000 Merge tag 'drm-intel-fixes-2017-08-24' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.13-rc7 * tag 'drm-intel-fixes-2017-08-24' of git://anongit.freedesktop.org/git/drm-intel: drm/i915/gvt: Fix the kernel null pointer error drm/i915: Clear lost context-switch interrupts across reset drm/i915/bxt: use NULL for GPIO connection ID drm/i915/cnl: Fix LSPCON support. drm/i915/vbt: ignore extraneous child devices for a port drm/i915: Initialize 'data' in intel_dsi_dcs_backlight.c commit 4a646580f793d19717f7e034c8d473b509c27d49 Author: Masaki Ota Date: Thu Aug 24 15:44:36 2017 -0700 Input: ALPS - fix two-finger scroll breakage in right side on ALPS touchpad Fixed the issue that two finger scroll does not work correctly on V8 protocol. The cause is that V8 protocol X-coordinate decode is wrong at SS4 PLUS device. I added SS4 PLUS X decode definition. Mote notes: the problem manifests itself by the commit e7348396c6d5 ("Input: ALPS - fix V8+ protocol handling (73 03 28)"), where a fix for the V8+ protocol was applied. Although the culprit must have been present beforehand, the two-finger scroll worked casually even with the wrongly reported values by some reason. It got broken by the commit above just because it changed x_max value, and this made libinput correctly figuring the MT events. Since the X coord is reported as falsely doubled, the events on the right-half side go outside the boundary, thus they are no longer handled. This resulted as a broken two-finger scroll. One finger event is decoded differently, and it didn't suffer from this problem. The problem was only about MT events. --tiwai Fixes: e7348396c6d5 ("Input: ALPS - fix V8+ protocol handling (73 03 28)") Signed-off-by: Masaki Ota Tested-by: Takashi Iwai Tested-by: Paul Donohue Cc: Signed-off-by: Takashi Iwai Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 41 +++++++++++++++++++++++++++++++---------- drivers/input/mouse/alps.h | 8 ++++++++ 2 files changed, 39 insertions(+), 10 deletions(-) commit 90a6cd503982bfd33ce8c70eb49bd2dd33bc6325 Merge: 4898b99 ec25587 Author: Linus Torvalds Date: Thu Aug 24 15:48:38 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull more rdma fixes from Doug Ledford: "Well, I thought we were going to be done for this -rc cycle. I should have known better than to say so though. We have four additional items that trickled in. One was a simple mistake on my part. I took a patch into my for-next thinking that the issue was less severe than it was. I was then notified that it needed to be in my -rc area instead. The other three were just found late in testing. Summary: - One core fix accidentally applied first to for-next and then cherry picked back because it needed to be in the -rc cycles instead - Another core fix - Two mlx5 fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/mlx5: Always return success for RoCE modify port IB/mlx5: Fix Raw Packet QP event handler assignment IB/core: Avoid accessing non-allocated memory when inferring port type RDMA/uverbs: Initialize cq_context appropriately commit eebe53e87f97975ee58a21693e44797608bf679c Author: Vadim Lomovtsev Date: Mon Aug 21 07:23:07 2017 -0400 net: sunrpc: svcsock: fix NULL-pointer exception While running nfs/connectathon tests kernel NULL-pointer exception has been observed due to races in svcsock.c. Race is appear when kernel accepts connection by kernel_accept (which creates new socket) and start queuing ingress packets to new socket. This happens in ksoftirq context which could run concurrently on a different core while new socket setup is not done yet. The fix is to re-order socket user data init sequence and add write/read barrier calls to be sure that we got proper values for callback pointers before actually calling them. Test results: nfs/connectathon reports '0' failed tests for about 200+ iterations. Crash log: ---<-snip->--- [ 6708.638984] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 6708.647093] pgd = ffff0000094e0000 [ 6708.650497] [00000000] *pgd=0000010ffff90003, *pud=0000010ffff90003, *pmd=0000010ffff80003, *pte=0000000000000000 [ 6708.660761] Internal error: Oops: 86000005 [#1] SMP [ 6708.665630] Modules linked in: nfsv3 nfnetlink_queue nfnetlink_log nfnetlink rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache overlay xt_CONNSECMARK xt_SECMARK xt_conntrack iptable_security ip_tables ah4 xfrm4_mode_transport sctp tun binfmt_misc ext4 jbd2 mbcache loop tcp_diag udp_diag inet_diag rpcrdma ib_isert iscsi_target_mod ib_iser rdma_cm iw_cm libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp ib_ipoib ib_ucm ib_uverbs ib_umad ib_cm ib_core nls_koi8_u nls_cp932 ts_kmp nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack vfat fat ghash_ce sha2_ce sha1_ce cavium_rng_vf i2c_thunderx sg thunderx_edac i2c_smbus edac_core cavium_rng nfsd auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c nicvf nicpf ast i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops [ 6708.736446] ttm drm i2c_core thunder_bgx thunder_xcv mdio_thunder mdio_cavium dm_mirror dm_region_hash dm_log dm_mod [last unloaded: stap_3c300909c5b3f46dcacd49aab3334af_87021] [ 6708.752275] CPU: 84 PID: 0 Comm: swapper/84 Tainted: G W OE 4.11.0-4.el7.aarch64 #1 [ 6708.760787] Hardware name: www.cavium.com CRB-2S/CRB-2S, BIOS 0.3 Mar 13 2017 [ 6708.767910] task: ffff810006842e80 task.stack: ffff81000689c000 [ 6708.773822] PC is at 0x0 [ 6708.776739] LR is at svc_data_ready+0x38/0x88 [sunrpc] [ 6708.781866] pc : [<0000000000000000>] lr : [] pstate: 60000145 [ 6708.789248] sp : ffff810ffbad3900 [ 6708.792551] x29: ffff810ffbad3900 x28: ffff000008c73d58 [ 6708.797853] x27: 0000000000000000 x26: ffff81000bbe1e00 [ 6708.803156] x25: 0000000000000020 x24: ffff800f7410bf28 [ 6708.808458] x23: ffff000008c63000 x22: ffff000008c63000 [ 6708.813760] x21: ffff800f7410bf28 x20: ffff81000bbe1e00 [ 6708.819063] x19: ffff810012412400 x18: 00000000d82a9df2 [ 6708.824365] x17: 0000000000000000 x16: 0000000000000000 [ 6708.829667] x15: 0000000000000000 x14: 0000000000000001 [ 6708.834969] x13: 0000000000000000 x12: 722e736f622e676e [ 6708.840271] x11: 00000000f814dd99 x10: 0000000000000000 [ 6708.845573] x9 : 7374687225000000 x8 : 0000000000000000 [ 6708.850875] x7 : 0000000000000000 x6 : 0000000000000000 [ 6708.856177] x5 : 0000000000000028 x4 : 0000000000000000 [ 6708.861479] x3 : 0000000000000000 x2 : 00000000e5000000 [ 6708.866781] x1 : 0000000000000000 x0 : ffff81000bbe1e00 [ 6708.872084] [ 6708.873565] Process swapper/84 (pid: 0, stack limit = 0xffff81000689c000) [ 6708.880341] Stack: (0xffff810ffbad3900 to 0xffff8100068a0000) [ 6708.886075] Call trace: [ 6708.888513] Exception stack(0xffff810ffbad3710 to 0xffff810ffbad3840) [ 6708.894942] 3700: ffff810012412400 0001000000000000 [ 6708.902759] 3720: ffff810ffbad3900 0000000000000000 0000000060000145 ffff800f79300000 [ 6708.910577] 3740: ffff000009274d00 00000000000003ea 0000000000000015 ffff000008c63000 [ 6708.918395] 3760: ffff810ffbad3830 ffff800f79300000 000000000000004d 0000000000000000 [ 6708.926212] 3780: ffff810ffbad3890 ffff0000080f88dc ffff800f79300000 000000000000004d [ 6708.934030] 37a0: ffff800f7930093c ffff000008c63000 0000000000000000 0000000000000140 [ 6708.941848] 37c0: ffff000008c2c000 0000000000040b00 ffff81000bbe1e00 0000000000000000 [ 6708.949665] 37e0: 00000000e5000000 0000000000000000 0000000000000000 0000000000000028 [ 6708.957483] 3800: 0000000000000000 0000000000000000 0000000000000000 7374687225000000 [ 6708.965300] 3820: 0000000000000000 00000000f814dd99 722e736f622e676e 0000000000000000 [ 6708.973117] [< (null)>] (null) [ 6708.977824] [] tcp_data_queue+0x754/0xc5c [ 6708.983386] [] tcp_rcv_established+0x1a0/0x67c [ 6708.989384] [] tcp_v4_do_rcv+0x15c/0x22c [ 6708.994858] [] tcp_v4_rcv+0xaf0/0xb58 [ 6709.000077] [] ip_local_deliver_finish+0x10c/0x254 [ 6709.006419] [] ip_local_deliver+0xf0/0xfc [ 6709.011980] [] ip_rcv_finish+0x208/0x3a4 [ 6709.017454] [] ip_rcv+0x2dc/0x3c8 [ 6709.022328] [] __netif_receive_skb_core+0x2f8/0xa0c [ 6709.028758] [] __netif_receive_skb+0x38/0x84 [ 6709.034580] [] netif_receive_skb_internal+0x68/0xdc [ 6709.041010] [] napi_gro_receive+0xcc/0x1a8 [ 6709.046690] [] nicvf_cq_intr_handler+0x59c/0x730 [nicvf] [ 6709.053559] [] nicvf_poll+0x38/0xb8 [nicvf] [ 6709.059295] [] net_rx_action+0x2f8/0x464 [ 6709.064771] [] __do_softirq+0x11c/0x308 [ 6709.070164] [] irq_exit+0x12c/0x174 [ 6709.075206] [] __handle_domain_irq+0x78/0xc4 [ 6709.081027] [] gic_handle_irq+0x94/0x190 [ 6709.086501] Exception stack(0xffff81000689fdf0 to 0xffff81000689ff20) [ 6709.092929] fde0: 0000810ff2ec0000 ffff000008c10000 [ 6709.100747] fe00: ffff000008c70ef4 0000000000000001 0000000000000000 ffff810ffbad9b18 [ 6709.108565] fe20: ffff810ffbad9c70 ffff8100169d3800 ffff810006843ab0 ffff81000689fe80 [ 6709.116382] fe40: 0000000000000bd0 0000ffffdf979cd0 183f5913da192500 0000ffff8a254ce4 [ 6709.124200] fe60: 0000ffff8a254b78 0000aaab10339808 0000000000000000 0000ffff8a0c2a50 [ 6709.132018] fe80: 0000ffffdf979b10 ffff000008d6d450 ffff000008c10000 ffff000008d6d000 [ 6709.139836] fea0: 0000000000000054 ffff000008cd3dbc 0000000000000000 0000000000000000 [ 6709.147653] fec0: 0000000000000000 0000000000000000 0000000000000000 ffff81000689ff20 [ 6709.155471] fee0: ffff000008085240 ffff81000689ff20 ffff000008085244 0000000060000145 [ 6709.163289] ff00: ffff81000689ff10 ffff00000813f1e4 ffffffffffffffff ffff00000813f238 [ 6709.171107] [] el1_irq+0xb4/0x140 [ 6709.175976] [] arch_cpu_idle+0x44/0x11c [ 6709.181368] [] default_idle_call+0x20/0x30 [ 6709.187020] [] do_idle+0x158/0x1e4 [ 6709.191973] [] cpu_startup_entry+0x2c/0x30 [ 6709.197624] [] secondary_start_kernel+0x13c/0x160 [ 6709.203878] [<0000000001bc71c4>] 0x1bc71c4 [ 6709.207967] Code: bad PC value [ 6709.211061] SMP: stopping secondary CPUs [ 6709.218830] Starting crashdump kernel... [ 6709.222749] Bye! ---<-snip>--- Signed-off-by: Vadim Lomovtsev Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields net/sunrpc/svcsock.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit fc788f64f1f3eb31e87d4f53bcf1ab76590d5838 Author: Chuck Lever Date: Fri Aug 18 11:12:19 2017 -0400 nfsd: Limit end of page list when decoding NFSv4 WRITE When processing an NFSv4 WRITE operation, argp->end should never point past the end of the data in the final page of the page list. Otherwise, nfsd4_decode_compound can walk into uninitialized memory. More critical, nfsd4_decode_write is failing to increment argp->pagelen when it increments argp->pagelist. This can cause later xdr decoders to assume more data is available than really is, which can cause server crashes on malformed requests. Signed-off-by: Chuck Lever Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4898b99c261efe32348fce28302c01c7b1e1e343 Merge: f7bbf07 d5d6c1d Author: Linus Torvalds Date: Thu Aug 24 14:56:20 2017 -0700 Merge tag 'acpi-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix two recent regressions (in ACPICA and in the ACPI EC driver) and one bug in code introduced during the 4.12 cycle (ACPI device properties library routine). Specifics: - Fix a regression in the ACPI EC driver causing a kernel to crash during initialization on some systems due to a code ordering issue exposed by a recent change (Lv Zheng). - Fix a recent regression in ACPICA due to a change of the behavior of a library function in a way that is not backwards compatible with some existing callers of it (Rafael Wysocki). - Fix a coding mistake in a library function related to the handling of ACPI device properties introduced during the 4.12 cycle (Sakari Ailus)" * tag 'acpi-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: device property: Fix node lookup in acpi_graph_get_child_prop_value() ACPICA: Fix acpi_evaluate_object_typed() ACPI: EC: Fix regression related to wrong ECDT initialization order commit f7bbf0754b52b7f99deb0c8834f771e2b50157d6 Merge: b71a5e3 64236e3 Author: Linus Torvalds Date: Thu Aug 24 14:22:27 2017 -0700 Merge tag 'kbuild-fixes-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix linker script regression caused by dead code elimination support - fix typos and outdated comments - specify kselftest-clean as a PHONY target - fix "make dtbs_install" when $(srctree) includes shell special characters like '~' - Move -fshort-wchar to the global option list because defining it partially emits warnings * tag 'kbuild-fixes-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: update comments of Makefile.asm-generic kbuild: Do not use hyphen in exported variable name Makefile: add kselftest-clean to PHONY target list Kbuild: use -fshort-wchar globally fixdep: trivial: typo fix and correction kbuild: trivial cleanups on the comments kbuild: linker script do not match C names unless LD_DEAD_CODE_DATA_ELIMINATION is configured commit b71a5e3fe81c01dbd0b80eab7ae47d4cbd57d72a Merge: 415be6c 58efbc9 Author: Linus Torvalds Date: Thu Aug 24 14:10:31 2017 -0700 Merge branch 'for-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "We have one more fixup that stems from the blk_status_t conversion that did not quite cover everything. The normal cases were not affected because the code is 0, but any error and retries could mix up new and old values" * 'for-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix blk_status_t/errno confusion commit 415be6c256ddb5ef2eccd9f45fc67d73d49f466a Merge: 1cffe59 8b0db1a Author: Linus Torvalds Date: Thu Aug 24 14:08:22 2017 -0700 Merge tag 'trace-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Various bug fixes: - Two small memory leaks in error paths. - A missed return error code on an error path. - A fix to check the tracing ring buffer CPU when it doesn't exist (caused by setting maxcpus on the command line that is less than the actual number of CPUs, and then onlining them manually). - A fix to have the reset of boot tracers called by lateinit_sync() instead of just lateinit(). As some of the tracers register via lateinit(), and if the clear happens before the tracer is registered, it will never start even though it was told to via the kernel command line" * tag 'trace-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix freeing of filter in create_filter() when set_str is false tracing: Fix kmemleak in tracing_map_array_free() ftrace: Check for null ret_stack on profile function graph entry function ring-buffer: Have ring_buffer_alloc_read_page() return error on offline CPU tracing: Missing error code in tracer_alloc_buffers() tracing: Call clear_boot_tracer() at lateinit_sync commit 6c7e983b220f89e03286dc70a41c7ef3a8b409df Author: Bob Peterson Date: Wed Aug 23 10:43:02 2017 -0400 tipc: Fix tipc_sk_reinit handling of -EAGAIN In 9dbbfb0ab6680c6a85609041011484e6658e7d3c function tipc_sk_reinit had additional logic added to loop in the event that function rhashtable_walk_next() returned -EAGAIN. No worries. However, if rhashtable_walk_start returns -EAGAIN, it does "continue", and therefore skips the call to rhashtable_walk_stop(). That has the effect of calling rcu_read_lock() without its paired call to rcu_read_unlock(). Since rcu_read_lock() may be nested, the problem may not be apparent for a while, especially since resize events may be rare. But the comments to rhashtable_walk_start() state: * ...Note that we take the RCU lock in all * cases including when we return an error. So you must always call * rhashtable_walk_stop to clean up. This patch replaces the continue with a goto and label to ensure a matching call to rhashtable_walk_stop(). Signed-off-by: Bob Peterson Acked-by: Herbert Xu Signed-off-by: David S. Miller net/tipc/socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1cffe5955f1d16523e2850382f4971c5ec8da5c5 Merge: 311fc65 93a4c83 Author: Linus Torvalds Date: Thu Aug 24 14:01:18 2017 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "A small number of bugfixes, again nothing serious. - Alexander Dahl found multiple bugs in the Atmel memory interface driver - A randconfig build fix for at91 was incomplete, the second attempt fixes the remaining corner case - One fix for the TI Keystone queue handler - The Odroid XU4 HDMI port (added in 4.13) needs a small DT fix" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: exynos: add needs-hpd for Odroid-XU3/4 ARM: at91: don't select CONFIG_ARM_CPU_SUSPEND for old platforms soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create memory: atmel-ebi: Fix smc cycle xlate converter memory: atmel-ebi: Allow t_DF timings of zero ns memory: atmel-ebi: Fix smc timing return value evaluation commit e58f95831e7468d25eb6e41f234842ecfe6f014f Author: Arnd Bergmann Date: Wed Aug 23 15:59:49 2017 +0200 qlge: avoid memcpy buffer overflow gcc-8.0.0 (snapshot) points out that we copy a variable-length string into a fixed length field using memcpy() with the destination length, and that ends up copying whatever follows the string: inlined from 'ql_core_dump' at drivers/net/ethernet/qlogic/qlge/qlge_dbg.c:1106:2: drivers/net/ethernet/qlogic/qlge/qlge_dbg.c:708:2: error: 'memcpy' reading 15 bytes from a region of size 14 [-Werror=stringop-overflow=] memcpy(seg_hdr->description, desc, (sizeof(seg_hdr->description)) - 1); Changing it to use strncpy() will instead zero-pad the destination, which seems to be the right thing to do here. The bug is probably harmless, but it seems like a good idea to address it in stable kernels as well, if only for the purpose of building with gcc-8 without warnings. Fixes: a61f80261306 ("qlge: Add ethtool register dump function.") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 311fc65c9fb9c966bca8e6f3ff8132ce57344ab9 Author: Eric W. Biederman Date: Thu Aug 24 15:13:29 2017 -0500 pty: Repair TIOCGPTPEER The implementation of TIOCGPTPEER has two issues. When /dev/ptmx (as opposed to /dev/pts/ptmx) is opened the wrong vfsmount is passed to dentry_open. Which results in the kernel displaying the wrong pathname for the peer. The second is simply by caching the vfsmount and dentry of the peer it leaves them open, in a way they were not previously Which because of the inreased reference counts can cause unnecessary behaviour differences resulting in regressions. To fix these move the ioctl into tty_io.c at a generic level allowing the ioctl to have access to the struct file on which the ioctl is being called. This allows the path of the slave to be derived when opening the slave through TIOCGPTPEER instead of requiring the path to the slave be cached. Thus removing the need for caching the path. A new function devpts_ptmx_path is factored out of devpts_acquire and used to implement a function devpts_mntget. The new function devpts_mntget takes a filp to perform the lookup on and fsi so that it can confirm that the superblock that is found by devpts_ptmx_path is the proper superblock. v2: Lots of fixes to make the code actually work v3: Suggestions by Linus - Removed the unnecessary initialization of filp in ptm_open_peer - Simplified devpts_ptmx_path as gotos are no longer required [ This is the fix for the issue that was reverted in commit 143c97cc6529, but this time without breaking 'pbuilder' due to increased reference counts - Linus ] Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl") Reported-by: Christian Brauner Reported-and-tested-by: Stefan Lippers-Hollmann Signed-off-by: "Eric W. Biederman" Signed-off-by: Linus Torvalds drivers/tty/pty.c | 64 ++++++++++++++++++++-------------------------- drivers/tty/tty_io.c | 3 +++ fs/devpts/inode.c | 65 +++++++++++++++++++++++++++++++++++------------ include/linux/devpts_fs.h | 10 ++++++++ 4 files changed, 89 insertions(+), 53 deletions(-) commit d5d6c1ddb93a7225915cd7e89f35944878d667f9 Merge: 9b40eeb 98529b9 b5212f5 Author: Rafael J. Wysocki Date: Thu Aug 24 22:22:53 2017 +0200 Merge branches 'acpica-fix', 'acpi-ec-fix' and 'acpi-properties-fix' * acpica-fix: ACPICA: Fix acpi_evaluate_object_typed() * acpi-ec-fix: ACPI: EC: Fix regression related to wrong ECDT initialization order * acpi-properties-fix: ACPI: device property: Fix node lookup in acpi_graph_get_child_prop_value() commit 2fb44600fe784449404c6639de26af8361999ec7 Author: Florian Fainelli Date: Tue Jul 18 16:43:47 2017 -0700 um: Fix check for _xstate for older hosts Commit 0a987645672e ("um: Allow building and running on older hosts") attempted to check for PTRACE_{GET,SET}REGSET under the premise that these ptrace(2) parameters were directly linked with the presence of the _xstate structure. After Richard's commit 61e8d462457f ("um: Correctly check for PTRACE_GETRESET/SETREGSET") which properly included linux/ptrace.h instead of asm/ptrace.h, we could get into the original build failure that I reported: arch/x86/um/user-offsets.c: In function 'foo': arch/x86/um/user-offsets.c:54: error: invalid application of 'sizeof' to incomplete type 'struct _xstate' On this particular host, we do have PTRACE_GETREGSET and PTRACE_SETREGSET defined in linux/ptrace.h, but not the structure _xstate that should be pulled from the following include chain: signal.h -> bits/sigcontext.h. Correctly fix this by checking for FP_XSTATE_MAGIC1 which is the correct way to see if struct _xstate is available or not on the host. Fixes: 61e8d462457f ("um: Correctly check for PTRACE_GETRESET/SETREGSET") Fixes: 0a987645672e ("um: Allow building and running on older hosts") Signed-off-by: Florian Fainelli Signed-off-by: Richard Weinberger arch/x86/um/user-offsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec2558796d25e6024071b6bcb8e11392538d57bf Author: Majd Dibbiny Date: Wed Aug 23 08:35:42 2017 +0300 IB/mlx5: Always return success for RoCE modify port CM layer calls ib_modify_port() regardless of the link layer. For the Ethernet ports, qkey violation and Port capabilities are meaningless. Therefore, always return success for ib_modify_port calls on the Ethernet ports. Cc: Selvin Xavier Signed-off-by: Majd Dibbiny Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1d31e9c09f41f9ffa53eaf8457b3e77a1d527f1e Author: Majd Dibbiny Date: Wed Aug 23 08:35:41 2017 +0300 IB/mlx5: Fix Raw Packet QP event handler assignment In case we have SQ and RQ for Raw Packet QP, the SQ's event handler wasn't assigned. Fixing this by assigning event handler for each WQ after creation. [ 1877.145243] Call Trace: [ 1877.148644] [ 1877.150580] [] ? mlx5_rsc_event+0x105/0x210 [mlx5_core] [ 1877.159581] [] ? mlx5_cq_event+0x57/0xd0 [mlx5_core] [ 1877.167137] [] mlx5_eq_int+0x53e/0x6c0 [mlx5_core] [ 1877.174526] [] ? sched_clock+0x9/0x10 [ 1877.180753] [] handle_irq_event_percpu+0x3e/0x1e0 [ 1877.188014] [] handle_irq_event+0x3d/0x60 [ 1877.194567] [] handle_edge_irq+0x77/0x130 [ 1877.201129] [] handle_irq+0xbf/0x150 [ 1877.207244] [] ? atomic_notifier_call_chain+0x1a/0x20 [ 1877.214829] [] do_IRQ+0x4f/0xf0 [ 1877.220498] [] common_interrupt+0x6d/0x6d [ 1877.227025] [ 1877.228967] [] ? cpuidle_enter_state+0x52/0xc0 [ 1877.236990] [] cpuidle_idle_call+0xc5/0x200 [ 1877.243676] [] arch_cpu_idle+0xe/0x30 [ 1877.249831] [] cpu_startup_entry+0xf5/0x290 [ 1877.256513] [] start_secondary+0x265/0x27b [ 1877.263111] Code: Bad RIP value. [ 1877.267296] RIP [< (null)>] (null) [ 1877.273264] RSP [ 1877.277531] CR2: 0000000000000000 Fixes: 19098df2da78 ("IB/mlx5: Refactor mlx5_ib_qp to accommodate other QP types") Signed-off-by: Majd Dibbiny Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 1 + 1 file changed, 1 insertion(+) commit 498ca3c82a7b11e152a46c253f6b2087c929ce00 Author: Noa Osherovich Date: Wed Aug 23 08:35:40 2017 +0300 IB/core: Avoid accessing non-allocated memory when inferring port type Commit 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types") introduced the concept of type in ah_attr: * During ib_register_device, each port is checked for its type which is stored in ib_device's port_immutable array. * During uverbs' modify_qp, the type is inferred using the port number in ib_uverbs_qp_dest struct (address vector) by accessing the relevant port_immutable array and the type is passed on to providers. IB spec (version 1.3) enforces a valid port value only in Reset to Init. During Init to RTR, the address vector must be valid but port number is not mentioned as a field in the address vector, so its value is not validated, which leads to accesses to a non-allocated memory when inferring the port type. Save the real port number in ib_qp during modify to Init (when the comp_mask indicates that the port number is valid) and use this value to infer the port type. Avoid copying the address vector fields if the matching bit is not set in the attr_mask. Address vector can't be modified before the port, so no valid flow is affected. Fixes: 44c58487d51a ('IB/core: Define 'ib' and 'roce' rdma_ah_attr types') Signed-off-by: Noa Osherovich Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 11 +++++++---- drivers/infiniband/core/verbs.c | 7 ++++++- include/rdma/ib_verbs.h | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) commit dadc0736f7be553a25ad34dc437ae379c5ab4a68 Author: Eric Dumazet Date: Thu Aug 24 09:02:49 2017 -0700 virtio_net: be drop monitor friendly This change is needed to not fool drop monitor. (perf record ... -e skb:kfree_skb ) Packets were properly sent and are consumed after TX completion. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af57d2b720252baca5421ec58628da626e1862dc Merge: d0273ef c26844e Author: David S. Miller Date: Thu Aug 24 11:49:19 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Fix use after free of struct proc_dir_entry in ipt_CLUSTERIP, patch from Sabrina Dubroca. 2) Fix spurious EINVAL errors from iptables over nft compatibility layer. 3) Reload pointer to ip header only if there is non-terminal verdict, ie. XT_CONTINUE, otherwise invalid memory access may happen, patch from Taehee Yoo. 4) Fix interaction between SYNPROXY and NAT, SYNPROXY adds sequence adjustment already, however from nf_nat_setup() assumes there's not. Patch from Xin Long. 5) Fix burst arithmetics in nft_limit as Joe Stringer mentioned during NFWS in Faro. Patch from Andy Zhou. ==================== Signed-off-by: David S. Miller commit 79964dbaf662229253b281c42e82e2675a9d3b80 Author: Maciej Purski Date: Mon Aug 21 12:32:51 2017 +0200 drm/bridge/sii8620: Fix memory corruption Function sii8620_mt_read_devcap_reg_recv() used to read array index from a wrong msg register, which caused writing out of array bounds. It led to writing on other fields of struct sii8620. Signed-off-by: Maciej Purski Fixes: e9c6da270 ("drm/bridge/sii8620: add reading device capability registers") Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1503311571-25819-1-git-send-email-m.purski@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1c08c22c874ac88799cab1f78c40f46110274915 Author: Waiman Long Date: Thu Aug 24 12:04:29 2017 -0400 cpuset: Fix incorrect memory_pressure control file mapping The memory_pressure control file was incorrectly set up without a private value (0, by default). As a result, this control file was treated like memory_migrate on read. By adding back the FILE_MEMORY_PRESSURE private value, the correct memory pressure value will be returned. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Fixes: 7dbdb199d3bf ("cgroup: replace cftype->mode with CFTYPE_WORLD_WRITABLE") Cc: stable@vger.kernel.org # v4.4+ kernel/cgroup/cpuset.c | 1 + 1 file changed, 1 insertion(+) commit 9ce76511b67be8fbcdff36b7e1662e3887bb7377 Author: Tom Rini Date: Tue Aug 22 21:51:46 2017 -0400 ASoC: rt5677: Reintroduce I2C device IDs Not all devices with ACPI and this combination of sound devices will have the required information provided via ACPI. Reintroduce the I2C device ID to restore sound functionality on on the Chromebook 'Samus' model. [ More background note: the commit a36afb0ab648 ("ASoC: rt5677: Introduce proper table...") moved the i2c ID probed via ACPI ("RT5677CE:00") to a proper acpi_device_id table. Although the action itself is correct per se, the overseen issue is the reference id->driver_data at rt5677_i2c_probe() for retrieving the corresponding chip model for the given id. Since id=NULL is passed for ACPI matching case, we get an Oops now. We already have queued more fixes for 4.14 and they already address the issue, but they are bigger changes that aren't preferable for the late 4.13-rc stage. So, this patch just papers over the bug as a once-off quick fix for a particular ACPI matching. -- tiwai ] Fixes: a36afb0ab648 ("ASoC: rt5677: Introduce proper table for ACPI enumeration") Signed-off-by: Tom Rini Acked-by: Mark Brown Signed-off-by: Takashi Iwai sound/soc/codecs/rt5677.c | 1 + 1 file changed, 1 insertion(+) commit 58efbc9f5463308c43d812fd0748a4dee44c8a16 Author: Omar Sandoval Date: Tue Aug 22 23:45:59 2017 -0700 Btrfs: fix blk_status_t/errno confusion This fixes several instances of blk_status_t and bare errno ints being mixed up, some of which are real bugs. In the normal case, 0 matches BLK_STS_OK, so we don't observe any effects of the missing conversion, but in case of errors or passes through the repair/retry paths, the errors get mixed up. The changes were identified using 'sparse', we don't have reports of the buggy behaviour. Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t") Signed-off-by: Omar Sandoval Reviewed-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 4 ++-- fs/btrfs/inode.c | 70 +++++++++++++++++++++++++++++------------------------- fs/btrfs/raid56.c | 34 +++++++++++++------------- fs/btrfs/volumes.c | 10 ++++---- fs/btrfs/volumes.h | 6 ++--- 5 files changed, 64 insertions(+), 60 deletions(-) commit 64236e315955cc59e2b612e6a0e59579395530ae Author: Cao jin Date: Tue Aug 22 21:09:53 2017 +0800 kbuild: update comments of Makefile.asm-generic Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada scripts/Makefile.asm-generic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c26844eda9d4fdbd266660e3b3de2d0270e3a1ed Author: andy zhou Date: Mon Aug 21 12:38:53 2017 -0700 netfilter: nf_tables: Fix nft limit burst handling Current implementation treats the burst configuration the same as rate configuration. This can cause the per packet cost to be lower than configured. In effect, this bug causes the token bucket to be refilled at a higher rate than what user has specified. This patch changes the implementation so that the token bucket size is controlled by "rate + burst", while maintain the token bucket refill rate the same as user specified. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Andy Zhou Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_limit.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 50b4d485528d1dbe0bd249f2073140e3444f4a7b Author: Benjamin Block Date: Thu Aug 24 01:57:56 2017 +0200 bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer Since we split the scsi_request out of struct request bsg fails to provide a reply-buffer for the drivers. This was done via the pointer for sense-data, that is not preallocated anymore. Failing to allocate/assign it results in illegal dereferences because LLDs use this pointer unquestioned. An example panic on s390x, using the zFCP driver, looks like this (I had debugging on, otherwise NULL-pointer dereferences wouldn't even panic on s390x): Unable to handle kernel pointer dereference in virtual kernel address space Failing address: 6b6b6b6b6b6b6000 TEID: 6b6b6b6b6b6b6403 Fault in home space mode while using kernel ASCE. AS:0000000001590007 R3:0000000000000024 Oops: 0038 ilc:2 [#1] PREEMPT SMP DEBUG_PAGEALLOC Modules linked in: CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.12.0-bsg-regression+ #3 Hardware name: IBM 2964 N96 702 (z/VM 6.4.0) task: 0000000065cb0100 task.stack: 0000000065cb4000 Krnl PSW : 0704e00180000000 000003ff801e4156 (zfcp_fc_ct_els_job_handler+0x16/0x58 [zfcp]) 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: 0000000000000001 000000005fa9d0d0 000000005fa9d078 0000000000e16866 000003ff00000290 6b6b6b6b6b6b6b6b 0000000059f78f00 000000000000000f 00000000593a0958 00000000593a0958 0000000060d88800 000000005ddd4c38 0000000058b50100 07000000659cba08 000003ff801e8556 00000000659cb9a8 Krnl Code: 000003ff801e4146: e31020500004 lg %r1,80(%r2) 000003ff801e414c: 58402040 l %r4,64(%r2) #000003ff801e4150: e35020200004 lg %r5,32(%r2) >000003ff801e4156: 50405004 st %r4,4(%r5) 000003ff801e415a: e54c50080000 mvhi 8(%r5),0 000003ff801e4160: e33010280012 lt %r3,40(%r1) 000003ff801e4166: a718fffb lhi %r1,-5 000003ff801e416a: 1803 lr %r0,%r3 Call Trace: ([<000003ff801e8556>] zfcp_fsf_req_complete+0x726/0x768 [zfcp]) [<000003ff801ea82a>] zfcp_fsf_reqid_check+0x102/0x180 [zfcp] [<000003ff801eb980>] zfcp_qdio_int_resp+0x230/0x278 [zfcp] [<00000000009b91b6>] qdio_kick_handler+0x2ae/0x2c8 [<00000000009b9e3e>] __tiqdio_inbound_processing+0x406/0xc10 [<00000000001684c2>] tasklet_action+0x15a/0x1d8 [<0000000000bd28ec>] __do_softirq+0x3ec/0x848 [<00000000001675a4>] irq_exit+0x74/0xf8 [<000000000010dd6a>] do_IRQ+0xba/0xf0 [<0000000000bd19e8>] io_int_handler+0x104/0x2d4 [<00000000001033b6>] enabled_wait+0xb6/0x188 ([<000000000010339e>] enabled_wait+0x9e/0x188) [<000000000010396a>] arch_cpu_idle+0x32/0x50 [<0000000000bd0112>] default_idle_call+0x52/0x68 [<00000000001cd0fa>] do_idle+0x102/0x188 [<00000000001cd41e>] cpu_startup_entry+0x3e/0x48 [<0000000000118c64>] smp_start_secondary+0x11c/0x130 [<0000000000bd2016>] restart_int_handler+0x62/0x78 [<0000000000000000>] (null) INFO: lockdep is turned off. Last Breaking-Event-Address: [<000003ff801e41d6>] zfcp_fc_ct_job_handler+0x3e/0x48 [zfcp] Kernel panic - not syncing: Fatal exception in interrupt This patch moves bsg-lib to allocate and setup struct bsg_job ahead of time, including the allocation of a buffer for the reply-data. This means, struct bsg_job is not allocated separately anymore, but as part of struct request allocation - similar to struct scsi_cmd. Reflect this in the function names that used to handle creation/destruction of struct bsg_job. Reported-by: Steffen Maier Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Benjamin Block Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request") Cc: #4.11+ Signed-off-by: Jens Axboe block/bsg-lib.c | 74 +++++++++++++++++++++++++++++-------------------- include/linux/blkdev.h | 1 - include/linux/bsg-lib.h | 2 ++ 3 files changed, 46 insertions(+), 31 deletions(-) commit ab6dd1beac7be3c17f8bf3d38bdf29ecb7293f1e Author: Xin Long Date: Thu Aug 10 10:22:24 2017 +0800 netfilter: check for seqadj ext existence before adding it in nf_nat_setup_info Commit 4440a2ab3b9f ("netfilter: synproxy: Check oom when adding synproxy and seqadj ct extensions") wanted to drop the packet when it fails to add seqadj ext due to no memory by checking if nfct_seqadj_ext_add returns NULL. But that nfct_seqadj_ext_add returns NULL can also happen when seqadj ext already exists in a nf_conn. It will cause that userspace protocol doesn't work when both dnat and snat are configured. Li Shuang found this issue in the case: Topo: ftp client router ftp server 10.167.131.2 <-> 10.167.131.254 10.167.141.254 <-> 10.167.141.1 Rules: # iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 21 -j \ DNAT --to-destination 10.167.141.1 # iptables -t nat -A POSTROUTING -o eth2 -p tcp -m tcp --dport 21 -j \ SNAT --to-source 10.167.141.254 In router, when both dnat and snat are added, nf_nat_setup_info will be called twice. The packet can be dropped at the 2nd time for DNAT due to seqadj ext is already added at the 1st time for SNAT. This patch is to fix it by checking for seqadj ext existence before adding it, so that the packet will not be dropped if seqadj ext already exists. Note that as Florian mentioned, as a long term, we should review ext_add() behaviour, it's better to return a pointer to the existing ext instead. Fixes: 4440a2ab3b9f ("netfilter: synproxy: Check oom when adding synproxy and seqadj ct extensions") Reported-by: Li Shuang Acked-by: Florian Westphal Signed-off-by: Xin Long Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b0db1a5bdfcee0dbfa89607672598ae203c9045 Author: Steven Rostedt (VMware) Date: Wed Aug 23 12:46:27 2017 -0400 tracing: Fix freeing of filter in create_filter() when set_str is false Performing the following task with kmemleak enabled: # cd /sys/kernel/tracing/events/irq/irq_handler_entry/ # echo 'enable_event:kmem:kmalloc:3 if irq >' > trigger # echo 'enable_event:kmem:kmalloc:3 if irq > 31' > trigger # echo scan > /sys/kernel/debug/kmemleak # cat /sys/kernel/debug/kmemleak unreferenced object 0xffff8800b9290308 (size 32): comm "bash", pid 1114, jiffies 4294848451 (age 141.139s) 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: [] kmemleak_alloc+0x4a/0xa0 [] kmem_cache_alloc_trace+0x158/0x290 [] create_filter_start.constprop.28+0x99/0x940 [] create_filter+0xa9/0x160 [] create_event_filter+0xc/0x10 [] set_trigger_filter+0xe5/0x210 [] event_enable_trigger_func+0x324/0x490 [] event_trigger_write+0x1a2/0x260 [] __vfs_write+0xd7/0x380 [] vfs_write+0x101/0x260 [] SyS_write+0xab/0x130 [] entry_SYSCALL_64_fastpath+0x1f/0xbe [] 0xffffffffffffffff The function create_filter() is passed a 'filterp' pointer that gets allocated, and if "set_str" is true, it is up to the caller to free it, even on error. The problem is that the pointer is not freed by create_filter() when set_str is false. This is a bug, and it is not up to the caller to free the filter on error if it doesn't care about the string. Link: http://lkml.kernel.org/r/1502705898-27571-2-git-send-email-chuhu@redhat.com Cc: stable@vger.kernel.org Fixes: 38b78eb85 ("tracing: Factorize filter creation") Reported-by: Chunyu Hu Tested-by: Chunyu Hu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 4 ++++ 1 file changed, 4 insertions(+) commit 475bb3c69ab05df2a6ecef6acc2393703d134180 Author: Chunyu Hu Date: Mon Aug 14 18:18:17 2017 +0800 tracing: Fix kmemleak in tracing_map_array_free() kmemleak reported the below leak when I was doing clear of the hist trigger. With this patch, the kmeamleak is gone. unreferenced object 0xffff94322b63d760 (size 32): comm "bash", pid 1522, jiffies 4403687962 (age 2442.311s) hex dump (first 32 bytes): 00 01 00 00 04 00 00 00 08 00 00 00 ff 00 00 00 ................ 10 00 00 00 00 00 00 00 80 a8 7a f2 31 94 ff ff ..........z.1... backtrace: [] kmemleak_alloc+0x4a/0xa0 [] kmem_cache_alloc_trace+0xca/0x1d0 [] tracing_map_array_alloc+0x26/0x140 [] kretprobe_trampoline+0x0/0x50 [] create_hist_data+0x535/0x750 [] event_hist_trigger_func+0x1f7/0x420 [] event_trigger_write+0xfd/0x1a0 [] __vfs_write+0x37/0x170 [] vfs_write+0xb2/0x1b0 [] SyS_write+0x55/0xc0 [] do_syscall_64+0x67/0x150 [] return_from_SYSCALL_64+0x0/0x6a [] 0xffffffffffffffff unreferenced object 0xffff9431f27aa880 (size 128): comm "bash", pid 1522, jiffies 4403687962 (age 2442.311s) hex dump (first 32 bytes): 00 00 8c 2a 32 94 ff ff 00 f0 8b 2a 32 94 ff ff ...*2......*2... 00 e0 8b 2a 32 94 ff ff 00 d0 8b 2a 32 94 ff ff ...*2......*2... backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc+0xe8/0x220 [] tracing_map_array_alloc+0xb1/0x140 [] kretprobe_trampoline+0x0/0x50 [] create_hist_data+0x535/0x750 [] event_hist_trigger_func+0x1f7/0x420 [] event_trigger_write+0xfd/0x1a0 [] __vfs_write+0x37/0x170 [] vfs_write+0xb2/0x1b0 [] SyS_write+0x55/0xc0 [] do_syscall_64+0x67/0x150 [] return_from_SYSCALL_64+0x0/0x6a [] 0xffffffffffffffff Link: http://lkml.kernel.org/r/1502705898-27571-1-git-send-email-chuhu@redhat.com Cc: stable@vger.kernel.org Fixes: 08d43a5fa063 ("tracing: Add lock-free tracing_map") Signed-off-by: Chunyu Hu Signed-off-by: Steven Rostedt (VMware) kernel/trace/tracing_map.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a8f0f9e49956a74718874b800251455680085600 Author: Steven Rostedt (VMware) Date: Thu Aug 17 16:37:25 2017 -0400 ftrace: Check for null ret_stack on profile function graph entry function There's a small race when function graph shutsdown and the calling of the registered function graph entry callback. The callback must not reference the task's ret_stack without first checking that it is not NULL. Note, when a ret_stack is allocated for a task, it stays allocated until the task exits. The problem here, is that function_graph is shutdown, and a new task was created, which doesn't have its ret_stack allocated. But since some of the functions are still being traced, the callbacks can still be called. The normal function_graph code handles this, but starting with commit 8861dd303c ("ftrace: Access ret_stack->subtime only in the function profiler") the profiler code references the ret_stack on function entry, but doesn't check if it is NULL first. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196611 Cc: stable@vger.kernel.org Fixes: 8861dd303c ("ftrace: Access ret_stack->subtime only in the function profiler") Reported-by: lilydjwg@gmail.com Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 4 ++++ 1 file changed, 4 insertions(+) commit 10a54d8196d11f6cc0db2f71249f93854cb9fe55 Author: Luca Coelho Date: Tue Aug 22 10:37:29 2017 +0300 iwlwifi: pcie: move rx workqueue initialization to iwl_trans_pcie_alloc() Work queues cannot be allocated when a mutex is held because the mutex may be in use and that would make it sleep. Doing so generates the following splat with 4.13+: [ 19.513298] ====================================================== [ 19.513429] WARNING: possible circular locking dependency detected [ 19.513557] 4.13.0-rc5+ #6 Not tainted [ 19.513638] ------------------------------------------------------ [ 19.513767] cpuhp/0/12 is trying to acquire lock: [ 19.513867] (&tz->lock){+.+.+.}, at: [] thermal_zone_get_temp+0x5b/0xb0 [ 19.514047] [ 19.514047] but task is already holding lock: [ 19.514166] (cpuhp_state){+.+.+.}, at: [] cpuhp_thread_fun+0x3a/0x210 [ 19.514338] [ 19.514338] which lock already depends on the new lock. This lock dependency already existed with previous kernel versions, but it was not detected until commit 49dfe2a67797 ("cpuhotplug: Link lock stacks for hotplug callbacks") was introduced. Reported-by: David Weinehall Reported-by: Jiri Kosina Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 ++ drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 10 +--------- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 9 +++++++++ 3 files changed, 12 insertions(+), 9 deletions(-) commit 636d42117800db1a994726fcf017e3633db832a5 Author: Rob Herring Date: Tue Jul 18 16:42:43 2017 -0500 c6x: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Mark Salter arch/c6x/platforms/megamod-pic.c | 22 +++++++++++----------- arch/c6x/platforms/plldata.c | 4 ++-- arch/c6x/platforms/timer64.c | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) commit 98cd249cf9d2c7e2322fbf20c454c019e141a28b Author: Krzysztof Kozlowski Date: Thu Jul 20 06:58:25 2017 +0200 c6x: defconfig: Cleanup from old Kconfig options Remove old, dead Kconfig options (in order appearing in this commit): - EXPERIMENTAL is gone since v3.9; - MISC_DEVICES: commit 7c5763b8453a ("drivers: misc: Remove MISC_DEVICES config option"); Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Salter arch/c6x/configs/dsk6455_defconfig | 2 -- arch/c6x/configs/evmc6457_defconfig | 2 -- arch/c6x/configs/evmc6472_defconfig | 2 -- arch/c6x/configs/evmc6474_defconfig | 2 -- arch/c6x/configs/evmc6678_defconfig | 2 -- 5 files changed, 10 deletions(-) commit 8a4b5784fac2af93ad6a8c08fb56d021e0c0416b Author: Lorenzo Colitti Date: Wed Aug 23 17:14:39 2017 +0900 net: xfrm: don't double-hold dst when sk_policy in use. While removing dst_entry garbage collection, commit 52df157f17e5 ("xfrm: take refcnt of dst when creating struct xfrm_dst bundle") changed xfrm_resolve_and_create_bundle so it returns an xdst with a refcount of 1 instead of 0. However, it did not delete the dst_hold performed by xfrm_lookup when a per-socket policy is in use. This means that when a socket policy is in use, dst entries returned by xfrm_lookup have a refcount of 2, and are not freed when no longer in use. Cc: Wei Wang Fixes: 52df157f17 ("xfrm: take refcnt of dst when creating struct xfrm_dst bundle") Tested: https://android-review.googlesource.com/417481 Tested: https://android-review.googlesource.com/418659 Tested: https://android-review.googlesource.com/424463 Tested: https://android-review.googlesource.com/452776 passes on net-next Signed-off-by: Lorenzo Colitti Acked-by: Wei Wang Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 1 - 1 file changed, 1 deletion(-) commit bb9b52bd51dcb17b965a30167d0812902c1b9927 Author: Benjamin Herrenschmidt Date: Fri Aug 18 12:10:58 2017 +1000 KVM: PPC: Book3S HV: Add missing barriers to XIVE code and document them This adds missing memory barriers to order updates/tests of the virtual CPPR and MFRR, thus fixing a lost IPI problem. While at it also document all barriers in this file. This fixes a bug causing guest IPIs to occasionally get lost. The symptom then is hangs or stalls in the guest. Signed-off-by: Benjamin Herrenschmidt Tested-by: Guilherme G. Piccoli Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_xive_template.c | 57 +++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) commit 2c4fb78f78b6e420604ee1b05bdfb5c1d637869f Author: Benjamin Herrenschmidt Date: Fri Aug 18 12:10:52 2017 +1000 KVM: PPC: Book3S HV: Workaround POWER9 DD1.0 bug causing IPB bit loss This adds a workaround for a bug in POWER9 DD1 chips where changing the CPPR (Current Processor Priority Register) can cause bits in the IPB (Interrupt Pending Buffer) to get lost. Thankfully it only happens when manually manipulating CPPR which is quite rare. When it does happen it can cause interrupts to be delayed or lost. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_xive_template.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit bd0fdb191c8523a9126bb14ac1b22cb47698ebf5 Author: Nicholas Piggin Date: Mon Mar 13 03:03:49 2017 +1000 KVM: PPC: Book3S HV: Use msgsync with hypervisor doorbells on POWER9 When msgsnd is used for IPIs to other cores, msgsync must be executed by the target to order stores performed on the source before its msgsnd (provided the source executes the appropriate sync). Fixes: 1704a81ccebc ("KVM: PPC: Book3S HV: Use msgsnd for IPIs to other cores on POWER9") Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +++ 1 file changed, 3 insertions(+) commit 2fe59f507a65dbd734b990a11ebc7488f6f87a24 Author: Nicholas Piggin Date: Tue Aug 22 18:43:48 2017 +1000 timers: Fix excessive granularity of new timers after a nohz idle When a timer base is idle, it is forwarded when a new timer is added to ensure that granularity does not become excessive. When not idle, the timer tick is expected to increment the base. However there are several problems: - If an existing timer is modified, the base is forwarded only after the index is calculated. - The base is not forwarded by add_timer_on. - There is a window after a timer is restarted from a nohz idle, after it is marked not-idle and before the timer tick on this CPU, where a timer may be added but the ancient base does not get forwarded. These result in excessive granularity (a 1 jiffy timeout can blow out to 100s of jiffies), which cause the rcu lockup detector to trigger, among other things. Fix this by keeping track of whether the timer base has been idle since it was last run or forwarded, and if so then forward it before adding a new timer. There is still a case where mod_timer optimises the case of a pending timer mod with the same expiry time, where the timer can see excessive granularity relative to the new, shorter interval. A comment is added, but it's not changed because it is an important fastpath for networking. This has been tested and found to fix the RCU softlockup messages. Testing was also done with tracing to measure requested versus achieved wakeup latencies for all non-deferrable timers in an idle system (with no lockup watchdogs running). Wakeup latency relative to absolute latency is calculated (note this suffers from round-up skew at low absolute times) and analysed: max avg std upstream 506.0 1.20 4.68 patched 2.0 1.08 0.15 The bug was noticed due to the lockup detector Kconfig changes dropping it out of people's .configs and resulting in larger base clk skew When the lockup detectors are enabled, no CPU can go idle for longer than 4 seconds, which limits the granularity errors. Sub-optimal timer behaviour is observable on a smaller scale in that case: max avg std upstream 9.0 1.05 0.19 patched 2.0 1.04 0.11 Fixes: Fixes: a683f390b93f ("timers: Forward the wheel clock whenever possible") Signed-off-by: Nicholas Piggin Signed-off-by: Thomas Gleixner Tested-by: Jonathan Cameron Tested-by: David Miller Cc: dzickus@redhat.com Cc: sfr@canb.auug.org.au Cc: mpe@ellerman.id.au Cc: Stephen Boyd Cc: linuxarm@huawei.com Cc: abdhalee@linux.vnet.ibm.com Cc: John Stultz Cc: akpm@linux-foundation.org Cc: paulmck@linux.vnet.ibm.com Cc: torvalds@linux-foundation.org Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170822084348.21436-1-npiggin@gmail.com kernel/time/timer.c | 50 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) commit d0273ef3b47861dbd6e2ced85c4a532723a3bf8c Merge: 46f1c52 a22a6ac Author: David S. Miller Date: Wed Aug 23 22:42:43 2017 -0700 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: bug fixes. 3 bug fixes related to XDP ring accounting in bnxt_setup_tc(), freeing MSIX vectors when bnxt_re unregisters, and preserving the user-administered PF MAC address when disabling SRIOV. ==================== Signed-off-by: David S. Miller commit a22a6ac2ff8080c87e446e20592725c064229c71 Author: Michael Chan Date: Wed Aug 23 19:34:05 2017 -0400 bnxt_en: Do not setup MAC address in bnxt_hwrm_func_qcaps(). bnxt_hwrm_func_qcaps() is called during probe to get all device resources and it also sets up the factory MAC address. The same function is called when SRIOV is disabled to reclaim all resources. If the MAC address has been overridden by a user administered MAC address, calling this function will overwrite it. Separate the logic that sets up the default MAC address into a new function bnxt_init_mac_addr() that is only called during probe time. Fixes: 4a21b49b34c0 ("bnxt_en: Improve VF resource accounting.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 40 +++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 12 deletions(-) commit 146ed3c5b87d8c65ec31bc56df26f027fe624b8f Author: Michael Chan Date: Wed Aug 23 19:34:04 2017 -0400 bnxt_en: Free MSIX vectors when unregistering the device from bnxt_re. Take back ownership of the MSIX vectors when unregistering the device from bnxt_re. Fixes: a588e4580a7e ("bnxt_en: Add interface to support RDMA driver.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 2 ++ 1 file changed, 2 insertions(+) commit 87e9b3778c94694c9e098c91a0cc05725f0e017f Author: Michael Chan Date: Wed Aug 23 19:34:03 2017 -0400 bnxt_en: Fix .ndo_setup_tc() to include XDP rings. When the number of TX rings is changed in bnxt_setup_tc(), we need to include the XDP rings in the total TX ring count. Fixes: 38413406277f ("bnxt_en: Add support for XDP_TX action.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + 1 file changed, 1 insertion(+) commit 46f1c52e66dbc0d7a99f7c2a3c9debb497fe7b7b Author: Jakub Kicinski Date: Wed Aug 23 14:41:50 2017 -0700 nfp: TX time stamp packets before HW doorbell is rung TX completion may happen any time after HW queue was kicked. We can't access the skb afterwards. Move the time stamping before ringing the doorbell. Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee6c88bb754e3d363e568da78086adfedb692447 Author: Stefano Brivio Date: Wed Aug 23 13:27:13 2017 +0200 sctp: Avoid out-of-bounds reads from address storage inet_diag_msg_sctp{,l}addr_fill() and sctp_get_sctp_info() copy sizeof(sockaddr_storage) bytes to fill in sockaddr structs used to export diagnostic information to userspace. However, the memory allocated to store sockaddr information is smaller than that and depends on the address family, so we leak up to 100 uninitialized bytes to userspace. Just use the size of the source structs instead, in all the three cases this is what userspace expects. Zero out the remaining memory. Unused bytes (i.e. when IPv4 addresses are used) in source structs sctp_sockaddr_entry and sctp_transport are already cleared by sctp_add_bind_addr() and sctp_transport_new(), respectively. Noticed while testing KASAN-enabled kernel with 'ss': [ 2326.885243] BUG: KASAN: slab-out-of-bounds in inet_sctp_diag_fill+0x42c/0x6c0 [sctp_diag] at addr ffff881be8779800 [ 2326.896800] Read of size 128 by task ss/9527 [ 2326.901564] CPU: 0 PID: 9527 Comm: ss Not tainted 4.11.0-22.el7a.x86_64 #1 [ 2326.909236] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.4.3 01/17/2017 [ 2326.917585] Call Trace: [ 2326.920312] dump_stack+0x63/0x8d [ 2326.924014] kasan_object_err+0x21/0x70 [ 2326.928295] kasan_report+0x288/0x540 [ 2326.932380] ? inet_sctp_diag_fill+0x42c/0x6c0 [sctp_diag] [ 2326.938500] ? skb_put+0x8b/0xd0 [ 2326.942098] ? memset+0x31/0x40 [ 2326.945599] check_memory_region+0x13c/0x1a0 [ 2326.950362] memcpy+0x23/0x50 [ 2326.953669] inet_sctp_diag_fill+0x42c/0x6c0 [sctp_diag] [ 2326.959596] ? inet_diag_msg_sctpasoc_fill+0x460/0x460 [sctp_diag] [ 2326.966495] ? __lock_sock+0x102/0x150 [ 2326.970671] ? sock_def_wakeup+0x60/0x60 [ 2326.975048] ? remove_wait_queue+0xc0/0xc0 [ 2326.979619] sctp_diag_dump+0x44a/0x760 [sctp_diag] [ 2326.985063] ? sctp_ep_dump+0x280/0x280 [sctp_diag] [ 2326.990504] ? memset+0x31/0x40 [ 2326.994007] ? mutex_lock+0x12/0x40 [ 2326.997900] __inet_diag_dump+0x57/0xb0 [inet_diag] [ 2327.003340] ? __sys_sendmsg+0x150/0x150 [ 2327.007715] inet_diag_dump+0x4d/0x80 [inet_diag] [ 2327.012979] netlink_dump+0x1e6/0x490 [ 2327.017064] __netlink_dump_start+0x28e/0x2c0 [ 2327.021924] inet_diag_handler_cmd+0x189/0x1a0 [inet_diag] [ 2327.028045] ? inet_diag_rcv_msg_compat+0x1b0/0x1b0 [inet_diag] [ 2327.034651] ? inet_diag_dump_compat+0x190/0x190 [inet_diag] [ 2327.040965] ? __netlink_lookup+0x1b9/0x260 [ 2327.045631] sock_diag_rcv_msg+0x18b/0x1e0 [ 2327.050199] netlink_rcv_skb+0x14b/0x180 [ 2327.054574] ? sock_diag_bind+0x60/0x60 [ 2327.058850] sock_diag_rcv+0x28/0x40 [ 2327.062837] netlink_unicast+0x2e7/0x3b0 [ 2327.067212] ? netlink_attachskb+0x330/0x330 [ 2327.071975] ? kasan_check_write+0x14/0x20 [ 2327.076544] netlink_sendmsg+0x5be/0x730 [ 2327.080918] ? netlink_unicast+0x3b0/0x3b0 [ 2327.085486] ? kasan_check_write+0x14/0x20 [ 2327.090057] ? selinux_socket_sendmsg+0x24/0x30 [ 2327.095109] ? netlink_unicast+0x3b0/0x3b0 [ 2327.099678] sock_sendmsg+0x74/0x80 [ 2327.103567] ___sys_sendmsg+0x520/0x530 [ 2327.107844] ? __get_locked_pte+0x178/0x200 [ 2327.112510] ? copy_msghdr_from_user+0x270/0x270 [ 2327.117660] ? vm_insert_page+0x360/0x360 [ 2327.122133] ? vm_insert_pfn_prot+0xb4/0x150 [ 2327.126895] ? vm_insert_pfn+0x32/0x40 [ 2327.131077] ? vvar_fault+0x71/0xd0 [ 2327.134968] ? special_mapping_fault+0x69/0x110 [ 2327.140022] ? __do_fault+0x42/0x120 [ 2327.144008] ? __handle_mm_fault+0x1062/0x17a0 [ 2327.148965] ? __fget_light+0xa7/0xc0 [ 2327.153049] __sys_sendmsg+0xcb/0x150 [ 2327.157133] ? __sys_sendmsg+0xcb/0x150 [ 2327.161409] ? SyS_shutdown+0x140/0x140 [ 2327.165688] ? exit_to_usermode_loop+0xd0/0xd0 [ 2327.170646] ? __do_page_fault+0x55d/0x620 [ 2327.175216] ? __sys_sendmsg+0x150/0x150 [ 2327.179591] SyS_sendmsg+0x12/0x20 [ 2327.183384] do_syscall_64+0xe3/0x230 [ 2327.187471] entry_SYSCALL64_slow_path+0x25/0x25 [ 2327.192622] RIP: 0033:0x7f41d18fa3b0 [ 2327.196608] RSP: 002b:00007ffc3b731218 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 2327.205055] RAX: ffffffffffffffda RBX: 00007ffc3b731380 RCX: 00007f41d18fa3b0 [ 2327.213017] RDX: 0000000000000000 RSI: 00007ffc3b731340 RDI: 0000000000000003 [ 2327.220978] RBP: 0000000000000002 R08: 0000000000000004 R09: 0000000000000040 [ 2327.228939] R10: 00007ffc3b730f30 R11: 0000000000000246 R12: 0000000000000003 [ 2327.236901] R13: 00007ffc3b731340 R14: 00007ffc3b7313d0 R15: 0000000000000084 [ 2327.244865] Object at ffff881be87797e0, in cache kmalloc-64 size: 64 [ 2327.251953] Allocated: [ 2327.254581] PID = 9484 [ 2327.257215] save_stack_trace+0x1b/0x20 [ 2327.261485] save_stack+0x46/0xd0 [ 2327.265179] kasan_kmalloc+0xad/0xe0 [ 2327.269165] kmem_cache_alloc_trace+0xe6/0x1d0 [ 2327.274138] sctp_add_bind_addr+0x58/0x180 [sctp] [ 2327.279400] sctp_do_bind+0x208/0x310 [sctp] [ 2327.284176] sctp_bind+0x61/0xa0 [sctp] [ 2327.288455] inet_bind+0x5f/0x3a0 [ 2327.292151] SYSC_bind+0x1a4/0x1e0 [ 2327.295944] SyS_bind+0xe/0x10 [ 2327.299349] do_syscall_64+0xe3/0x230 [ 2327.303433] return_from_SYSCALL_64+0x0/0x6a [ 2327.308194] Freed: [ 2327.310434] PID = 4131 [ 2327.313065] save_stack_trace+0x1b/0x20 [ 2327.317344] save_stack+0x46/0xd0 [ 2327.321040] kasan_slab_free+0x73/0xc0 [ 2327.325220] kfree+0x96/0x1a0 [ 2327.328530] dynamic_kobj_release+0x15/0x40 [ 2327.333195] kobject_release+0x99/0x1e0 [ 2327.337472] kobject_put+0x38/0x70 [ 2327.341266] free_notes_attrs+0x66/0x80 [ 2327.345545] mod_sysfs_teardown+0x1a5/0x270 [ 2327.350211] free_module+0x20/0x2a0 [ 2327.354099] SyS_delete_module+0x2cb/0x2f0 [ 2327.358667] do_syscall_64+0xe3/0x230 [ 2327.362750] return_from_SYSCALL_64+0x0/0x6a [ 2327.367510] Memory state around the buggy address: [ 2327.372855] ffff881be8779700: fc fc fc fc 00 00 00 00 00 00 00 00 fc fc fc fc [ 2327.380914] ffff881be8779780: fb fb fb fb fb fb fb fb fc fc fc fc 00 00 00 00 [ 2327.388972] >ffff881be8779800: 00 00 00 00 fc fc fc fc fb fb fb fb fb fb fb fb [ 2327.397031] ^ [ 2327.401792] ffff881be8779880: fc fc fc fc fb fb fb fb fb fb fb fb fc fc fc fc [ 2327.409850] ffff881be8779900: 00 00 00 00 00 04 fc fc fc fc fc fc 00 00 00 00 [ 2327.417907] ================================================================== This fixes CVE-2017-7558. References: https://bugzilla.redhat.com/show_bug.cgi?id=1480266 Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file") Cc: Xin Long Cc: Vlad Yasevich Cc: Neil Horman Signed-off-by: Stefano Brivio Acked-by: Marcelo Ricardo Leitner Reviewed-by: Xin Long Signed-off-by: David S. Miller net/sctp/sctp_diag.c | 7 +++++-- net/sctp/socket.c | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 2b33bc8aa236b75d6e86a8a79126fd9739e4a5bd Author: Eric Dumazet Date: Wed Aug 23 21:40:32 2017 -0700 net: dsa: use consume_skb() Two kfree_skb() should be consume_skb(), to be friend with drop monitor (perf record ... -e skb:kfree_skb) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/dsa/tag_ksz.c | 2 +- net/dsa/tag_trailer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 40e607cbeeb462a5852fedaacff0c5b57cb472c5 Merge: 2f19f50 1691a4c Author: David S. Miller Date: Wed Aug 23 20:39:44 2017 -0700 Merge branch 'nfp-fixes' Jakub Kicinski says: ==================== nfp: fix SR-IOV deadlock and representor bugs This series tackles the bug I've already tried to fix in commit 6d48ceb27af1 ("nfp: allocate a private workqueue for driver work"). I created a separate workqueue to avoid possible deadlock, and the lockdep error disappeared, coincidentally. The way workqueues are operating, separate workqueue doesn't necessarily mean separate thread of execution. Luckily we can safely forego the lock. Second fix changes the order in which vNIC netdevs and representors are created/destroyed. The fix is kept small and should be sufficient for net because of how flower uses representors, a more thorough fix will be targeted at net-next. Third fix avoids leaking mapped frame buffers if FW sent a frame with unknown portid. ==================== Signed-off-by: David S. Miller commit 1691a4c0f4634d50ffeb74373fdeec63495c911e Author: Jakub Kicinski Date: Tue Aug 22 23:22:44 2017 -0700 nfp: avoid buffer leak when representor is missing When driver receives a muxed frame, but it can't find the representor netdev it is destined to it will try to "drop" that frame, i.e. reuse the buffer. The issue is that the replacement buffer has already been allocated at this point, and reusing the buffer from received frame will leak it. Change the code to put the new buffer on the ring earlier and not reuse the old buffer (make the buffer parameter to nfp_net_rx_drop() a NULL). Fixes: 91bf82ca9eed ("nfp: add support for tx/rx with metadata portid") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 326ce603015eefaa86fc6e490f43638e1010a838 Author: Jakub Kicinski Date: Tue Aug 22 23:22:43 2017 -0700 nfp: make sure representors are destroyed before their lower netdev App start/stop callbacks can perform application initialization. Unfortunately, flower app started using them for creating and destroying representors. This can lead to a situation where lower vNIC netdev is destroyed while representors still try to pass traffic. This will most likely lead to a NULL-dereference on the lower netdev TX path. Move the start/stop callbacks, so that representors are created/ destroyed when vNICs are fully initialized. Fixes: 5de73ee46704 ("nfp: general representor implementation") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit d6e1ab9ea3514840e4f32957c457b094646c2e9d Author: Jakub Kicinski Date: Tue Aug 22 23:22:42 2017 -0700 nfp: don't hold PF lock while enabling SR-IOV Enabling SR-IOV VFs will cause the PCI subsystem to schedule a work and flush its workqueue. Since the nfp driver schedules its own work we can't enable VFs while holding driver load. Commit 6d48ceb27af1 ("nfp: allocate a private workqueue for driver work") tried to avoid this deadlock by creating a separate workqueue. Unfortunately, due to the architecture of workqueue subsystem this does not guarantee a separate thread of execution. Luckily we can simply take pci_enable_sriov() from under the driver lock. Take pci_disable_sriov() from under the lock too for symmetry. Fixes: 6d48ceb27af1 ("nfp: allocate a private workqueue for driver work") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 2f19f50e0f55a8fa067d3705e3f812a4f709567f Merge: 013dae5 4971667 Author: David S. Miller Date: Wed Aug 23 20:33:49 2017 -0700 Merge branch 'dst-tag-ksz-fix' Florian Fainelli says: ==================== net: dsa: Fix tag_ksz.c This implements David's suggestion of providing low-level functions to control whether skb_pad() and skb_put_padto() should be freeing the passed skb. We make use of it to fix a double free in net/dsa/tag_ksz.c that would occur if we kept using skb_put_padto() in both places. ==================== Signed-off-by: David S. Miller commit 49716679248a0bf64d8914711b2d1ea48751853e Author: Florian Fainelli Date: Tue Aug 22 15:12:15 2017 -0700 net: dsa: skb_put_padto() already frees nskb The first call of skb_put_padto() will free up the SKB on error, but we return NULL which tells dsa_slave_xmit() that the original SKB should be freed so this would lead to a double free here. The second skb_put_padto() already frees the passed sk_buff reference upon error, so calling kfree_skb() on it again is not necessary. Detected by CoverityScan, CID#1416687 ("USE_AFTER_FREE") Fixes: e71cb9e00922 ("net: dsa: ksz: fix skb freeing") Signed-off-by: Florian Fainelli Reviewed-by: Woojung Huh Signed-off-by: David S. Miller net/dsa/tag_ksz.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit cd0a137acbb66208368353723f5f1480995cf1c4 Author: Florian Fainelli Date: Tue Aug 22 15:12:14 2017 -0700 net: core: Specify skb_pad()/skb_put_padto() SKB freeing Rename skb_pad() into __skb_pad() and make it take a third argument: free_on_error which controls whether kfree_skb() should be called or not, skb_pad() directly makes use of it and passes true to preserve its existing behavior. Do exactly the same thing with __skb_put_padto() and skb_put_padto(). Suggested-by: David Miller Signed-off-by: Florian Fainelli Reviewed-by: Woojung Huh Signed-off-by: David S. Miller include/linux/skbuff.h | 41 +++++++++++++++++++++++++++++++++++++---- net/core/skbuff.c | 13 ++++++++----- 2 files changed, 45 insertions(+), 9 deletions(-) commit 013dae5dbc07aa521a38f1ca2d32123ec674bd5d Author: Stephan Gatzka Date: Tue Aug 22 14:25:07 2017 +0200 net: stmmac: socfgpa: Ensure emac bit set in sys manager for MII/GMII/SGMII. When using MII/GMII/SGMII in the Altera SoC, the phy needs to be wired through the FPGA. To ensure correct behavior, the appropriate bit in the System Manager FPGA Interface Group register needs to be set. Signed-off-by: Stephan Gatzka Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 47c4ccd3086139d2085e0f1e59c0f26e8ce4ff46 Author: Christophe JAILLET Date: Sun Aug 20 19:09:35 2017 +0200 scsi: qedf: Fix a potential NULL pointer dereference At the beginning of 'qedf_srr_compl()' and of 'qedf_rec_compl()', we check if 'orig_io_req' is NULL. If this happens, a NULL pointer dereference will occur in the error handling path. Fix it by adding an additional label in the error handling path in order to avoid this NULL pointer dereference. [mkp: typo] Fixes: 61d8658b4a43 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.") Signed-off-by: Christophe JAILLET Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_els.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 143c97cc652949893c8056c679012f0aeccb80e5 Author: Linus Torvalds Date: Wed Aug 23 18:16:11 2017 -0700 Revert "pty: fix the cached path of the pty slave file descriptor in the master" This reverts commit c8c03f1858331e85d397bacccd34ef409aae993c. It turns out that while fixing the ptmx file descriptor to have the correct 'struct path' to the associated slave pty is a really good thing, it breaks some user space tools for a very annoying reason. The problem is that /dev/ptmx and its associated slave pty (/dev/pts/X) are on different mounts. That was what caused us to have the wrong path in the first place (we would mix up the vfsmount of the 'ptmx' node, with the dentry of the pty slave node), but it also means that now while we use the right vfsmount, having the pty master open also keeps the pts mount busy. And it turn sout that that makes 'pbuilder' very unhappy, as noted by Stefan Lippers-Hollmann: "This patch introduces a regression for me when using pbuilder 0.228.7[2] (a helper to build Debian packages in a chroot and to create and update its chroots) when trying to umount /dev/ptmx (inside the chroot) on Debian/ unstable (full log and pbuilder configuration file[3] attached). [...] Setting up build-essential (12.3) ... Processing triggers for libc-bin (2.24-15) ... I: unmounting dev/ptmx filesystem W: Could not unmount dev/ptmx: umount: /var/cache/pbuilder/build/1340/dev/ptmx: target is busy (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1).)" apparently pbuilder tries to unmount the /dev/pts filesystem while still holding at least one master node open, which is arguably not very nice, but we don't break user space even when fixing other bugs. So this commit has to be reverted. I'll try to figure out a way to avoid caching the path to the slave pty in the master pty. The only thing that actually wants that slave pty path is the "TIOCGPTPEER" ioctl, and I think we could just recreate the path at that time. Reported-by: Stefan Lippers-Hollmann Cc: Eric W Biederman Cc: Christian Brauner Cc: Al Viro Signed-off-by: Linus Torvalds drivers/tty/pty.c | 7 ++----- fs/devpts/inode.c | 4 +--- include/linux/devpts_fs.h | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) commit 1e6ec9ea89d30739b9447c1860fcb07fc29f3aef Author: Omar Sandoval Date: Wed Aug 23 14:54:59 2017 -0700 Revert "loop: support 4k physical blocksize" There's some stuff still up in the air, let's not get stuck with a subpar ABI. I'll follow up with something better for 4.14. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.c | 42 ++++++------------------------------------ drivers/block/loop.h | 1 - include/uapi/linux/loop.h | 3 --- 3 files changed, 6 insertions(+), 40 deletions(-) commit ea0ea2bc6dd8923d86a0fa98743dbeed98645486 Author: Shaohua Li Date: Fri Aug 18 16:08:13 2017 -0700 blk-throttle: cap discard request size discard request usually is very big and easily use all bandwidth budget of a cgroup. discard request size doesn't really mean the size of data written, so it doesn't make sense to account it into bandwidth budget. Jens pointed out treating the size 0 doesn't make sense too, because discard request does have cost. But it's not easy to find the actual cost. This patch simply makes the size one sector. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 93a4c8355e0e448d83f31801b4c72f66e4360975 Author: Hans Verkuil Date: Wed Aug 23 18:24:50 2017 +0200 ARM: dts: exynos: add needs-hpd for Odroid-XU3/4 CEC support was added for Exynos5 in 4.13, but for the Odroids we need to set 'needs-hpd' as well since CEC is disabled when there is no HDMI hotplug signal, just as for the exynos4 Odroid-U3. This is due to the level-shifter that is disabled when there is no HPD, thus blocking the CEC signal as well. Same close-but-no-cigar board design as the Odroid-U3. Tested with my Odroid XU4. Signed-off-by: Hans Verkuil Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 + 1 file changed, 1 insertion(+) commit 2acf097f16abba684012cca670a61d94178bd1ab Merge: a67ca1e a067d94 Author: Linus Torvalds Date: Wed Aug 23 12:05:46 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Late arm64 fixes. They fix very early boot failures with KASLR where the early mapping of the kernel is incorrect, so the failure mode looks like a hang with no output. There's also a signal-handling fix when a uaccess routine faults with a fatal signal pending, which could be used to create unkillable user tasks using userfaultfd and finally a state leak fix for the floating pointer registers across a call to exec(). We're still seeing some random issues crop up (inode memory corruption and spinlock recursion) but we've not managed to reproduce things reliably enough to debug or bisect them yet. Summary: - Fix very early boot failures with KASLR enabled - Fix fatal signal handling on userspace access from kernel - Fix leakage of floating point register state across exec()" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kaslr: Adjust the offset to avoid Image across alignment boundary arm64: kaslr: ignore modulo offset when validating virtual displacement arm64: mm: abort uaccess retries upon fatal signal arm64: fpsimd: Prevent registers leaking across exec commit a67ca1e9bd07c05548bf7c2d6f065ca9db11e9bf Merge: 5565240 3f13b6a Author: Linus Torvalds Date: Wed Aug 23 11:43:38 2017 -0700 Merge tag 'gpio-v4.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Here are the (hopefully) last GPIO fixes for v4.13: - an important core fix to reject invalid GPIOs *before* trying to obtain a GPIO descriptor for it. - a driver fix for the mvebu driver IRQ handling" * tag 'gpio-v4.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: mvebu: Fix cause computation in irq handler gpio: reject invalid gpio before getting gpio_desc commit d3edede29f74d335f81d95a4588f5f136a9f7dcf Author: Ronnie Sahlberg Date: Wed Aug 23 14:48:14 2017 +1000 cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup() Add checking for the path component length and verify it is <= the maximum that the server advertizes via FileFsAttributeInformation. With this patch cifs.ko will now return ENAMETOOLONG instead of ENOENT when users to access an overlong path. To test this, try to cd into a (non-existing) directory on a CIFS share that has a too long name: cd /mnt/aaaaaaaaaaaaaaa... and it now should show a good error message from the shell: bash: cd: /mnt/aaaaaaaaaaaaaaaa...aaaaaa: File name too long rh bz 1153996 Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Cc: fs/cifs/dir.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 55652400fdab0838b7ef446f4a3541aefdd9ccb0 Merge: 98b9f8a 71eb2ac Author: Linus Torvalds Date: Wed Aug 23 11:34:40 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Six minor and error leg fixes, plus one major change: the reversion of scsi-mq as the default. We're doing the latter temporarily (with a backport to stable) to give us time to fix all the issues that turned up with this default before trying again" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: cxgb4i: call neigh_event_send() to update MAC address Revert "scsi: default to scsi-mq" scsi: sd_zbc: Write unlock zone from sd_uninit_cmnd() scsi: aacraid: Fix out of bounds in aac_get_name_resp scsi: csiostor: fail probe if fw does not support FCoE scsi: megaraid_sas: fix error handle in megasas_probe_one commit 42bec214d8bd432be6d32a1acb0a9079ecd4d142 Author: Sachin Prabhu Date: Thu Aug 3 13:09:03 2017 +0530 cifs: Fix df output for users with quota limits The df for a SMB2 share triggers a GetInfo call for FS_FULL_SIZE_INFORMATION. The values returned are used to populate struct statfs. The problem is that none of the information returned by the call contains the total blocks available on the filesystem. Instead we use the blocks available to the user ie. quota limitation when filling out statfs.f_blocks. The information returned does contain Actual free units on the filesystem and is used to populate statfs.f_bfree. For users with quota enabled, it can lead to situations where the total free space reported is more than the total blocks on the system ending up with df reports like the following # df -h /mnt/a Filesystem Size Used Avail Use% Mounted on //192.168.22.10/a 2.5G -2.3G 2.5G - /mnt/a To fix this problem, we instead populate both statfs.f_bfree with the same value as statfs.f_bavail ie. CallerAvailableAllocationUnits. This is similar to what is done already in the code for cifs and df now reports the quota information for the user used to mount the share. # df --si /mnt/a Filesystem Size Used Avail Use% Mounted on //192.168.22.10/a 2.7G 101M 2.6G 4% /mnt/a Signed-off-by: Sachin Prabhu Signed-off-by: Pierguido Lambri Signed-off-by: Steve French Cc: fs/cifs/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbeb0c8e84805b78f3979b53a4a12751403e4520 Author: Arnd Bergmann Date: Wed Aug 23 16:46:15 2017 +0200 ARM: at91: don't select CONFIG_ARM_CPU_SUSPEND for old platforms My previous patch fixed a link error for all at91 platforms when CONFIG_ARM_CPU_SUSPEND was not set, however this caused another problem on a configuration that enabled CONFIG_ARCH_AT91 but none of the individual SoCs, and that also enabled CPU_ARM720 as the only CPU: warning: (ARCH_AT91 && SOC_IMX23 && SOC_IMX28 && ARCH_PXA && MACH_MVEBU_V7 && SOC_IMX6 && ARCH_OMAP3 && ARCH_OMAP4 && SOC_OMAP5 && SOC_AM33XX && SOC_DRA7XX && ARCH_EXYNOS3 && ARCH_EXYNOS4 && EXYNOS5420_MCPM && EXYNOS_CPU_SUSPEND && ARCH_VEXPRESS_TC2_PM && ARM_BIG_LITTLE_CPUIDLE && ARM_HIGHBANK_CPUIDLE && QCOM_PM) selects ARM_CPU_SUSPEND which has unmet direct dependencies (ARCH_SUSPEND_POSSIBLE) arch/arm/kernel/sleep.o: In function `cpu_resume': (.text+0xf0): undefined reference to `cpu_arm720_suspend_size' arch/arm/kernel/suspend.o: In function `__cpu_suspend_save': suspend.c:(.text+0x134): undefined reference to `cpu_arm720_do_suspend' This improves the hack some more by only selecting ARM_CPU_SUSPEND for the part that requires it, and changing pm.c to drop the contents of unused init functions so we no longer refer to cpu_resume on at91 platforms that don't need it. Fixes: cc7a938f5f30 ("ARM: at91: select CONFIG_ARM_CPU_SUSPEND") Acked-by: Alexandre Belloni Signed-off-by: Arnd Bergmann arch/arm/mach-at91/Kconfig | 2 +- arch/arm/mach-at91/pm.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit e7c50e1156b6418004187104b1135e88921efa50 Merge: d41a3c2 ffeaf9a Author: Jani Nikula Date: Wed Aug 23 11:48:04 2017 +0300 Merge tag 'gvt-fixes-2017-08-23' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-08-23 - Fix possible null ptr reference in error path (Fred) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170823075352.nlo7hp3bplnb5ilx@zhen-hp.sh.intel.com commit bbba6f9d3da357bbabc6fda81e99ff5584500e76 Author: Takashi Iwai Date: Wed Aug 23 09:30:17 2017 +0200 ALSA: hda - Add stereo mic quirk for Lenovo G50-70 (17aa:3978) Lenovo G50-70 (17aa:3978) with Conexant codec chip requires the similar workaround for the inverted stereo dmic like other Lenovo models. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1020657 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 1 + 1 file changed, 1 insertion(+) commit ffeaf9aaf97b4bdaf114d6df52f800d71918768c Author: fred gao Date: Wed Aug 16 15:48:03 2017 +0800 drm/i915/gvt: Fix the kernel null pointer error once error happens in shadow_indirect_ctx function, the variable wa_ctx->indirect_ctx.obj is not initialized but accessed, so the kernel null point panic occurs. Fixes: 894cf7d15634 ("drm/i915/gvt: i915_gem_object_create() returns an error pointer") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98b9f8a4549909c6ba2117dfc09404989e6d8710 Merge: eec3b80 32aaf19 Author: Linus Torvalds Date: Tue Aug 22 21:30:52 2017 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Fix a clang build regression and an potential xattr corruption bug" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: add missing xattr hash update ext4: fix clang build regression commit bd46fc406b30d1db1aff8dabaff8d18bb423fdcf Author: Dan Carpenter Date: Thu Aug 17 10:09:54 2017 +0300 scsi: sg: off by one in sg_ioctl() If "val" is SG_MAX_QUEUE then we are one element beyond the end of the "rinfo" array so the > should be >=. Fixes: 109bade9c625 ("scsi: sg: use standard lists for sg_requests") Signed-off-by: Dan Carpenter Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 723cd772fde2344a9810eeaf5106787d535ec4a4 Author: Brian King Date: Fri Aug 18 16:17:32 2017 -0500 scsi: ipr: Set no_report_opcodes for RAID arrays Since ipr RAID arrays do not support the MAINTENANCE_IN / MI_REPORT_SUPPORTED_OPERATION_CODES, set no_report_opcodes to prevent it from being sent. Signed-off-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 1 + 1 file changed, 1 insertion(+) commit b2a6d1b999a4c13e5997bb864694e77172d45250 Author: Martijn Coenen Date: Fri Jul 28 13:56:08 2017 +0200 ANDROID: binder: fix proc->tsk check. Commit c4ea41ba195d ("binder: use group leader instead of open thread")' was incomplete and didn't update a check in binder_mmap(), causing all mmap() calls into the binder driver to fail. Signed-off-by: Martijn Coenen Tested-by: John Stultz Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1a50c8e4c241a505b7270e1a3c6e50d94e794b1 Author: Florian Fainelli Date: Tue Aug 22 15:24:47 2017 -0700 fsl/man: Inherit parent device and of_node Junote Cai reported that he was not able to get a DSA setup involving the Freescale DPAA/FMAN driver to work and narrowed it down to of_find_net_device_by_node(). This function requires the network device's device reference to be correctly set which is the case here, though we have lost any device_node association there. The problem is that dpaa_eth_add_device() allocates a "dpaa-ethernet" platform device, and later on dpaa_eth_probe() is called but SET_NETDEV_DEV() won't be propagating &pdev->dev.of_node properly. Fix this by inherenting both the parent device and the of_node when dpaa_eth_add_device() creates the platform device. Fixes: 3933961682a3 ("fsl/fman: Add FMan MAC driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit 33ba43ed0afc13a29b1314e3e45a9938d310ba13 Author: Daniel Borkmann Date: Wed Aug 23 00:06:09 2017 +0200 bpf: fix map value attribute for hash of maps Currently, iproute2's BPF ELF loader works fine with array of maps when retrieving the fd from a pinned node and doing a selfcheck against the provided map attributes from the object file, but we fail to do the same for hash of maps and thus refuse to get the map from pinned node. Reason is that when allocating hash of maps, fd_htab_map_alloc() will set the value size to sizeof(void *), and any user space map creation requests are forced to set 4 bytes as value size. Thus, selfcheck will complain about exposed 8 bytes on 64 bit archs vs. 4 bytes from object file as value size. Contract is that fdinfo or BPF_MAP_GET_FD_BY_ID returns the value size used to create the map. Fix it by handling it the same way as we do for array of maps, which means that we leave value size at 4 bytes and in the allocation phase round up value size to 8 bytes. alloc_htab_elem() needs an adjustment in order to copy rounded up 8 bytes due to bpf_fd_htab_map_update_elem() calling into htab_map_update_elem() with the pointer of the map pointer as value. Unlike array of maps where we just xchg(), we're using the generic htab_map_update_elem() callback also used from helper calls, which published the key/value already on return, so we need to ensure to memcpy() the right size. Fixes: bcc6b1b7ebf8 ("bpf: Add hash of maps support") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/bpf/hashtab.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit fcd03e362b1cd17de487953aac34f2d4574895cf Author: Florian Fainelli Date: Tue Aug 22 14:26:47 2017 -0700 net: phy: Deal with unbound PHY driver in phy_attached_print() Priit reported that stmmac was crashing with the trace below. This is because phy_attached_print() is called too early right after the PHY device has been found, but before it has a driver attached, since that is only done in phy_probe() which occurs later. Fix this by dealing with a possibly NULL phydev->drv point since that can happen here, but could also happen if we voluntarily did an unbind of the PHY device with the PHY driver. sun7i-dwmac 1c50000.ethernet: PTP uses main clock sun7i-dwmac 1c50000.ethernet: no reset control found sun7i-dwmac 1c50000.ethernet: no regulator found sun7i-dwmac 1c50000.ethernet: Ring mode enabled sun7i-dwmac 1c50000.ethernet: DMA HW capability register supported sun7i-dwmac 1c50000.ethernet: Normal descriptors libphy: stmmac: probed Unable to handle kernel NULL pointer dereference at virtual address 00000048 pgd = c0004000 [00000048] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc6-00318-g0065bd7fa384 #1 Hardware name: Allwinner sun7i (A20) Family task: ee868000 task.stack: ee85c000 PC is at phy_attached_print+0x1c/0x8c LR is at stmmac_mdio_register+0x12c/0x200 pc : [] lr : [] psr: 60000013 sp : ee85ddc8 ip : 00000000 fp : c07dfb5c r10: ee981210 r9 : 00000001 r8 : eea73000 r7 : eeaa6dd0 r6 : eeb49800 r5 : 00000000 r4 : 00000000 r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : eeb49800 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 4000406a DAC: 00000051 Process swapper/0 (pid: 1, stack limit = 0xee85c210) Stack: (0xee85ddc8 to 0xee85e000) ddc0: 00000000 00000002 eeb49400 eea72000 00000000 eeb49400 dde0: c045e6b4 00000000 ffffffff eeab0810 00000000 c08051f8 ee9292c0 c016d480 de00: eea725c0 eea73000 eea72000 00000001 eea726c0 c0457d0c 00000040 00000020 de20: 00000000 c045b850 00000001 00000000 ee981200 eeab0810 eeaa6ed0 ee981210 de40: 00000000 c094a4a0 00000000 c0465180 eeaa7550 f08d0000 c9ffb90c 00000032 de60: fffffffa 00000032 ee981210 ffffffed c0a46620 fffffdfb c0a46620 c03f7be8 de80: ee981210 c0a9a388 00000000 00000000 c0a46620 c03f63e0 ee981210 c0a46620 dea0: ee981244 00000000 00000007 000000c6 c094a4a0 c03f6534 00000000 c0a46620 dec0: c03f6490 c03f49ec ee828a58 ee9217b4 c0a46620 eeaa4b00 c0a43230 c03f59fc dee0: c08051f8 c094a49c c0a46620 c0a46620 00000000 c091c668 c093783c c03f6dfc df00: ffffe000 00000000 c091c668 c010177c eefe0938 eefe0935 c085e200 000000c6 df20: 00000005 c0136bc8 60000013 c080b3a4 00000006 00000006 c07ce7b4 00000000 df40: c07d7ddc c07cef28 eefe0938 eefe093e c0a0b2f0 c0a641c0 c0a641c0 c0a641c0 df60: c0937834 00000007 000000c6 c094a4a0 00000000 c0900d88 00000006 00000006 df80: 00000000 c09005a8 00000000 c060ecf4 00000000 00000000 00000000 00000000 dfa0: 00000000 c060ecfc 00000000 c0107738 00000000 00000000 00000000 00000000 dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffdeffff ffffffff [] (phy_attached_print) from [] (stmmac_mdio_register+0x12c/0x200) [] (stmmac_mdio_register) from [] (stmmac_dvr_probe+0x850/0x96c) [] (stmmac_dvr_probe) from [] (sun7i_gmac_probe+0x120/0x180) [] (sun7i_gmac_probe) from [] (platform_drv_probe+0x50/0xac) [] (platform_drv_probe) from [] (driver_probe_device+0x234/0x2e4) [] (driver_probe_device) from [] (__driver_attach+0xa4/0xa8) [] (__driver_attach) from [] (bus_for_each_dev+0x4c/0x9c) [] (bus_for_each_dev) from [] (bus_add_driver+0x190/0x214) [] (bus_add_driver) from [] (driver_register+0x78/0xf4) [] (driver_register) from [] (do_one_initcall+0x44/0x168) [] (do_one_initcall) from [] (kernel_init_freeable+0x144/0x1d0) [] (kernel_init_freeable) from [] (kernel_init+0x8/0x110) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) Code: e59021c8 e59d401c e590302c e3540000 (e5922048) ---[ end trace 39ae87c7923562d0 ]--- Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Tested-By: Priit Laes Fixes: fbca164776e4 ("net: stmmac: Use the right logging function in stmmac_mdio_register") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e188245d02ed3798914b528cfe0fb680d2f4a5a6 Merge: fd6055a 30d65e8 Author: David S. Miller Date: Tue Aug 22 14:39:59 2017 -0700 Merge branch 'net-sched-couple-of-chain-fixes' Jiri Pirko says: ==================== net: sched: couple of chain fixes Jiri Pirko (2): net: sched: fix use after free when tcf_chain_destroy is called multiple times net: sched: don't do tcf_chain_flush from tcf_chain_destroy ==================== Signed-off-by: David S. Miller commit 30d65e8f96ad01d9f998039e9af9ce5545e5a4ee Author: Jiri Pirko Date: Tue Aug 22 22:46:50 2017 +0200 net: sched: don't do tcf_chain_flush from tcf_chain_destroy tcf_chain_flush needs to be called with RTNL. However, on free_tcf-> tcf_action_goto_chain_fini-> tcf_chain_put-> tcf_chain_destroy-> tcf_chain_flush callpath, it is called without RTNL. This issue was notified by following warning: [ 155.599052] WARNING: suspicious RCU usage [ 155.603165] 4.13.0-rc5jiri+ #54 Not tainted [ 155.607456] ----------------------------- [ 155.611561] net/sched/cls_api.c:195 suspicious rcu_dereference_protected() usage! Since on this callpath, the chain is guaranteed to be already empty by check in tcf_chain_put, move the tcf_chain_flush call out and call it only where it is needed - into tcf_block_put. Fixes: db50514f9a9c ("net: sched: add termination action to allow goto chain") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 744a4cf63e528c29840f45811d6fb93fd129b87d Author: Jiri Pirko Date: Tue Aug 22 22:46:49 2017 +0200 net: sched: fix use after free when tcf_chain_destroy is called multiple times The goto_chain termination action takes a reference of a chain. In that case, there is an issue when block_put is called tcf_chain_destroy directly. The follo-up call of tcf_chain_put by goto_chain action free works with memory that is already freed. This was caught by kasan: [ 220.337908] BUG: KASAN: use-after-free in tcf_chain_put+0x1b/0x50 [ 220.344103] Read of size 4 at addr ffff88036d1f2cec by task systemd-journal/261 [ 220.353047] CPU: 0 PID: 261 Comm: systemd-journal Not tainted 4.13.0-rc5jiri+ #54 [ 220.360661] Hardware name: Mellanox Technologies Ltd. Mellanox switch/Mellanox x86 mezzanine board, BIOS 4.6.5 08/02/2016 [ 220.371784] Call Trace: [ 220.374290] [ 220.376355] dump_stack+0xd5/0x150 [ 220.391485] print_address_description+0x86/0x410 [ 220.396308] kasan_report+0x181/0x4c0 [ 220.415211] tcf_chain_put+0x1b/0x50 [ 220.418949] free_tcf+0x95/0xc0 So allow tcf_chain_destroy to be called multiple times, free only in case the reference count drops to 0. Fixes: 5bc1701881e3 ("net: sched: introduce multichain support for filters") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit fd6055a806edc4019be1b9fb7d25262599bca5b1 Author: Eric Dumazet Date: Tue Aug 22 09:39:28 2017 -0700 udp: on peeking bad csum, drop packets even if not at head When peeking, if a bad csum is discovered, the skb is unlinked from the queue with __sk_queue_drop_skb and the peek operation restarted. __sk_queue_drop_skb only drops packets that match the queue head. This fails if the skb was found after the head, using SO_PEEK_OFF socket option. This causes an infinite loop. We MUST drop this problematic skb, and we can simply check if skb was already removed by another thread, by looking at skb->next : This pointer is set to NULL by the __skb_unlink() operation, that might have happened only under the spinlock protection. Many thanks to syzkaller team (and particularly Dmitry Vyukov who provided us nice C reproducers exhibiting the lockup) and Willem de Bruijn who provided first version for this patch and a test program. Fixes: 627d2d6b5500 ("udp: enable MSG_PEEK at non-zero offset") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Willem de Bruijn Acked-by: Paolo Abeni Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/datagram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78362998f58c7c271e2719dcd0aaced435c801f9 Author: Sabrina Dubroca Date: Tue Aug 22 15:36:08 2017 +0200 macsec: add genl family module alias This helps tools such as wpa_supplicant can start even if the macsec module isn't loaded yet. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/macsec.c | 1 + 1 file changed, 1 insertion(+) commit bfe9a6d76a15e1b1deb465d25876217d7ca35097 Merge: 4eb6a3b fd849b7 Author: David S. Miller Date: Tue Aug 22 14:25:02 2017 -0700 Merge branch 'tipc-topology-server-fixes' Parthasarathy Bhuvaragan says: ==================== tipc: topology server fixes The following commits fixes two race conditions causing general protection faults. ==================== Signed-off-by: David S. Miller commit fd849b7c41f0fabfe783d0691a63c5518e8ebc99 Author: Ying Xue Date: Tue Aug 22 12:28:41 2017 +0200 tipc: fix a race condition of releasing subscriber object No matter whether a request is inserted into workqueue as a work item to cancel a subscription or to delete a subscription's subscriber asynchronously, the work items may be executed in different workers. As a result, it doesn't mean that one request which is raised prior to another request is definitely handled before the latter. By contrast, if the latter request is executed before the former request, below error may happen: [ 656.183644] BUG: spinlock bad magic on CPU#0, kworker/u8:0/12117 [ 656.184487] general protection fault: 0000 [#1] SMP [ 656.185160] Modules linked in: tipc ip6_udp_tunnel udp_tunnel 9pnet_virtio 9p 9pnet virtio_net virtio_pci virtio_ring virtio [last unloaded: ip6_udp_tunnel] [ 656.187003] CPU: 0 PID: 12117 Comm: kworker/u8:0 Not tainted 4.11.0-rc7+ #6 [ 656.187920] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 656.188690] Workqueue: tipc_rcv tipc_recv_work [tipc] [ 656.189371] task: ffff88003f5cec40 task.stack: ffffc90004448000 [ 656.190157] RIP: 0010:spin_bug+0xdd/0xf0 [ 656.190678] RSP: 0018:ffffc9000444bcb8 EFLAGS: 00010202 [ 656.191375] RAX: 0000000000000034 RBX: ffff88003f8d1388 RCX: 0000000000000000 [ 656.192321] RDX: ffff88003ba13708 RSI: ffff88003ba0cd08 RDI: ffff88003ba0cd08 [ 656.193265] RBP: ffffc9000444bcd0 R08: 0000000000000030 R09: 000000006b6b6b6b [ 656.194208] R10: ffff8800bde3e000 R11: 00000000000001b4 R12: 6b6b6b6b6b6b6b6b [ 656.195157] R13: ffffffff81a3ca64 R14: ffff88003f8d1388 R15: ffff88003f8d13a0 [ 656.196101] FS: 0000000000000000(0000) GS:ffff88003ba00000(0000) knlGS:0000000000000000 [ 656.197172] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 656.197935] CR2: 00007f0b3d2e6000 CR3: 000000003ef9e000 CR4: 00000000000006f0 [ 656.198873] Call Trace: [ 656.199210] do_raw_spin_lock+0x66/0xa0 [ 656.199735] _raw_spin_lock_bh+0x19/0x20 [ 656.200258] tipc_subscrb_subscrp_delete+0x28/0xf0 [tipc] [ 656.200990] tipc_subscrb_rcv_cb+0x45/0x260 [tipc] [ 656.201632] tipc_receive_from_sock+0xaf/0x100 [tipc] [ 656.202299] tipc_recv_work+0x2b/0x60 [tipc] [ 656.202872] process_one_work+0x157/0x420 [ 656.203404] worker_thread+0x69/0x4c0 [ 656.203898] kthread+0x138/0x170 [ 656.204328] ? process_one_work+0x420/0x420 [ 656.204889] ? kthread_create_on_node+0x40/0x40 [ 656.205527] ret_from_fork+0x29/0x40 [ 656.206012] Code: 48 8b 0c 25 00 c5 00 00 48 c7 c7 f0 24 a3 81 48 81 c1 f0 05 00 00 65 8b 15 61 ef f5 7e e8 9a 4c 09 00 4d 85 e4 44 8b 4b 08 74 92 <45> 8b 84 24 40 04 00 00 49 8d 8c 24 f0 05 00 00 eb 8d 90 0f 1f [ 656.208504] RIP: spin_bug+0xdd/0xf0 RSP: ffffc9000444bcb8 [ 656.209798] ---[ end trace e2a800e6eb0770be ]--- In above scenario, the request of deleting subscriber was performed earlier than the request of canceling a subscription although the latter was issued before the former, which means tipc_subscrb_delete() was called before tipc_subscrp_cancel(). As a result, when tipc_subscrb_subscrp_delete() called by tipc_subscrp_cancel() was executed to cancel a subscription, the subscription's subscriber refcnt had been decreased to 1. After tipc_subscrp_delete() where the subscriber was freed because its refcnt was decremented to zero, but the subscriber's lock had to be released, as a consequence, panic happened. By contrast, if we increase subscriber's refcnt before tipc_subscrb_subscrp_delete() is called in tipc_subscrp_cancel(), the panic issue can be avoided. Fixes: d094c4d5f5c7 ("tipc: add subscription refcount to avoid invalid delete") Reported-by: Parthasarathy Bhuvaragan Signed-off-by: Ying Xue Signed-off-by: David S. Miller net/tipc/subscr.c | 2 ++ 1 file changed, 2 insertions(+) commit 458be024ef5f72f1697d5d55289c4ed45f8ee910 Author: Parthasarathy Bhuvaragan Date: Tue Aug 22 12:28:40 2017 +0200 tipc: remove subscription references only for pending timers In commit, 139bb36f754a ("tipc: advance the time of deleting subscription from subscriber->subscrp_list"), we delete the subscription from the subscribers list and from nametable unconditionally. This leads to the following bug if the timer running tipc_subscrp_timeout() in another CPU accesses the subscription list after the subscription delete request. [39.570] general protection fault: 0000 [#1] SMP :: [39.574] task: ffffffff81c10540 task.stack: ffffffff81c00000 [39.575] RIP: 0010:tipc_subscrp_timeout+0x32/0x80 [tipc] [39.576] RSP: 0018:ffff88003ba03e90 EFLAGS: 00010282 [39.576] RAX: dead000000000200 RBX: ffff88003f0f3600 RCX: 0000000000000101 [39.577] RDX: dead000000000100 RSI: 0000000000000201 RDI: ffff88003f0d7948 [39.578] RBP: ffff88003ba03ea0 R08: 0000000000000001 R09: ffff88003ba03ef8 [39.579] R10: 000000000000014f R11: 0000000000000000 R12: ffff88003f0d7948 [39.580] R13: ffff88003f0f3618 R14: ffffffffa006c250 R15: ffff88003f0f3600 [39.581] FS: 0000000000000000(0000) GS:ffff88003ba00000(0000) knlGS:0000000000000000 [39.582] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [39.583] CR2: 00007f831c6e0714 CR3: 000000003d3b0000 CR4: 00000000000006f0 [39.584] Call Trace: [39.584] [39.585] call_timer_fn+0x3d/0x180 [39.585] ? tipc_subscrb_rcv_cb+0x260/0x260 [tipc] [39.586] run_timer_softirq+0x168/0x1f0 [39.586] ? sched_clock_cpu+0x16/0xc0 [39.587] __do_softirq+0x9b/0x2de [39.587] irq_exit+0x60/0x70 [39.588] smp_apic_timer_interrupt+0x3d/0x50 [39.588] apic_timer_interrupt+0x86/0x90 [39.589] RIP: 0010:default_idle+0x20/0xf0 [39.589] RSP: 0018:ffffffff81c03e58 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10 [39.590] RAX: 0000000000000000 RBX: ffffffff81c10540 RCX: 0000000000000000 [39.591] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [39.592] RBP: ffffffff81c03e68 R08: 0000000000000000 R09: 0000000000000000 [39.593] R10: ffffc90001cbbe00 R11: 0000000000000000 R12: 0000000000000000 [39.594] R13: ffffffff81c10540 R14: 0000000000000000 R15: 0000000000000000 [39.595] :: [39.603] RIP: tipc_subscrp_timeout+0x32/0x80 [tipc] RSP: ffff88003ba03e90 [39.604] ---[ end trace 79ce94b7216cb459 ]--- Fixes: 139bb36f754a ("tipc: advance the time of deleting subscription from subscriber->subscrp_list") Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/subscr.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 4eb6a3bdb4629b610a39dd222a0170c72ef1c690 Author: Nogah Frankel Date: Tue Aug 22 10:28:11 2017 +0200 mlxsw: spectrum_switchdev: Fix mrouter flag update Update the value of the mrouter flag in struct mlxsw_sp_bridge_port when it is being changed. Fixes: c57529e1d5d8 ("mlxsw: spectrum: Replace vPorts with Port-VLAN") Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 5160a153a00ef24dc3a47c215e21fbc197f60887 Author: Andrew Jeffery Date: Tue Aug 22 16:06:22 2017 +0930 net: ftgmac100: Fix oops in probe on failure to find associated PHY netif_napi_del() should be paired with netif_napi_add(), however no such call takes place in ftgmac100_probe(). This triggers a NULL pointer dereference if e.g. no PHY is found by the MDIO probe: [ 2.770000] libphy: Fixed MDIO Bus: probed [ 2.770000] ftgmac100 1e660000.ethernet: Generated random MAC address 66:58:c0:5a:50:b8 [ 2.790000] libphy: ftgmac100_mdio: probed [ 2.790000] ftgmac100 1e660000.ethernet (unnamed net_device) (uninitialized): eth%d: no PHY found [ 2.790000] ftgmac100 1e660000.ethernet: MII Probe failed! [ 2.810000] Unable to handle kernel NULL pointer dereference at virtual address 00000004 [ 2.810000] pgd = 80004000 [ 2.810000] [00000004] *pgd=00000000 [ 2.810000] Internal error: Oops: 805 [#1] ARM [ 2.810000] CPU: 0 PID: 1 Comm: swapper Not tainted 4.10.17-1a4df30c39cf5ee0e3d2528c409787ccbb4a672a #1 [ 2.810000] Hardware name: ASpeed SoC [ 2.810000] task: 9e421b60 task.stack: 9e4a0000 [ 2.810000] PC is at netif_napi_del+0x74/0xa4 [ 2.810000] LR is at ftgmac100_probe+0x290/0x674 [ 2.810000] pc : [<80331004>] lr : [<80292b30>] psr: 60000013 [ 2.810000] sp : 9e4a1d70 ip : 9e4a1d88 fp : 9e4a1d84 [ 2.810000] r10: 9e565000 r9 : ffffffed r8 : 00000007 [ 2.810000] r7 : 9e565480 r6 : 9ec072c0 r5 : 00000000 r4 : 9e5654d8 [ 2.810000] r3 : 9e565530 r2 : 00000000 r1 : 00000000 r0 : 9e5654d8 [ 2.810000] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 2.810000] Control: 00c5387d Table: 80004008 DAC: 00000055 [ 2.810000] Process swapper (pid: 1, stack limit = 0x9e4a0188) [ 2.810000] Stack: (0x9e4a1d70 to 0x9e4a2000) [ 2.810000] 1d60: 9e565000 9e549e10 9e4a1dcc 9e4a1d88 [ 2.810000] 1d80: 80292b30 80330f9c ffffffff 9e4a1d98 80146058 9ec072c0 00009e10 00000000 [ 2.810000] 1da0: 9e549e18 9e549e10 ffffffed 805f81f4 fffffdfb 00000000 00000000 00000000 [ 2.810000] 1dc0: 9e4a1dec 9e4a1dd0 80243df8 802928ac 9e549e10 8062cbd8 8062cbe0 805f81f4 [ 2.810000] 1de0: 9e4a1e24 9e4a1df0 80242178 80243da4 803001d0 802ffa60 9e4a1e24 9e549e10 [ 2.810000] 1e00: 9e549e44 805f81f4 00000000 00000000 805b8840 8058a6b0 9e4a1e44 9e4a1e28 [ 2.810000] 1e20: 80242434 80241f04 00000000 805f81f4 80242344 00000000 9e4a1e6c 9e4a1e48 [ 2.810000] 1e40: 80240148 80242350 9e425bac 9e4fdc90 9e790e94 805f81f4 9e790e60 805f5640 [ 2.810000] 1e60: 9e4a1e7c 9e4a1e70 802425dc 802400d8 9e4a1ea4 9e4a1e80 80240ba8 802425c0 [ 2.810000] 1e80: 8050b6ac 9e4a1e90 805f81f4 ffffe000 805b8838 80616720 9e4a1ebc 9e4a1ea8 [ 2.810000] 1ea0: 80243068 80240a68 805ab24c ffffe000 9e4a1ecc 9e4a1ec0 80244a38 80242fec [ 2.810000] 1ec0: 9e4a1edc 9e4a1ed0 805ab264 80244a04 9e4a1f4c 9e4a1ee0 8058ae70 805ab258 [ 2.810000] 1ee0: 80032c68 801e3fd8 8052f800 8041af2c 9e4a1f4c 9e4a1f00 80032f90 8058a6bc [ 2.810000] 1f00: 9e4a1f2c 9e4a1f10 00000006 00000006 00000000 8052f220 805112f0 00000000 [ 2.810000] 1f20: 9e4a1f4c 00000006 80616720 805cf400 80616720 805b8838 80616720 00000057 [ 2.810000] 1f40: 9e4a1f94 9e4a1f50 8058b040 8058add0 00000006 00000006 00000000 8058a6b0 [ 2.810000] 1f60: 3940bf3d 00000007 f115c2e8 00000000 803fd158 00000000 00000000 00000000 [ 2.810000] 1f80: 00000000 00000000 9e4a1fac 9e4a1f98 803fd170 8058af38 00000000 803fd158 [ 2.810000] 1fa0: 00000000 9e4a1fb0 8000a5e8 803fd164 00000000 00000000 00000000 00000000 [ 2.810000] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 2.810000] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 d11dcae8 af8ddec5 [ 2.810000] [<80331004>] (netif_napi_del) from [<80292b30>] (ftgmac100_probe+0x290/0x674) [ 2.810000] [<80292b30>] (ftgmac100_probe) from [<80243df8>] (platform_drv_probe+0x60/0xc0) [ 2.810000] [<80243df8>] (platform_drv_probe) from [<80242178>] (driver_probe_device+0x280/0x44c) [ 2.810000] [<80242178>] (driver_probe_device) from [<80242434>] (__driver_attach+0xf0/0x104) [ 2.810000] [<80242434>] (__driver_attach) from [<80240148>] (bus_for_each_dev+0x7c/0xb0) [ 2.810000] [<80240148>] (bus_for_each_dev) from [<802425dc>] (driver_attach+0x28/0x30) [ 2.810000] [<802425dc>] (driver_attach) from [<80240ba8>] (bus_add_driver+0x14c/0x268) [ 2.810000] [<80240ba8>] (bus_add_driver) from [<80243068>] (driver_register+0x88/0x104) [ 2.810000] [<80243068>] (driver_register) from [<80244a38>] (__platform_driver_register+0x40/0x54) [ 2.810000] [<80244a38>] (__platform_driver_register) from [<805ab264>] (ftgmac100_driver_init+0x18/0x20) [ 2.810000] [<805ab264>] (ftgmac100_driver_init) from [<8058ae70>] (do_one_initcall+0xac/0x168) [ 2.810000] [<8058ae70>] (do_one_initcall) from [<8058b040>] (kernel_init_freeable+0x114/0x1cc) [ 2.810000] [<8058b040>] (kernel_init_freeable) from [<803fd170>] (kernel_init+0x18/0x104) [ 2.810000] [<803fd170>] (kernel_init) from [<8000a5e8>] (ret_from_fork+0x14/0x2c) [ 2.810000] Code: e594205c e5941058 e2843058 e3a05000 (e5812004) [ 3.210000] ---[ end trace f32811052fd3860c ]--- Signed-off-by: Andrew Jeffery Acked-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 1 - 1 file changed, 1 deletion(-) commit b5212f57da145e53df790a7e211d94daac768bf8 Author: Sakari Ailus Date: Tue Aug 22 23:39:58 2017 +0300 ACPI: device property: Fix node lookup in acpi_graph_get_child_prop_value() acpi_graph_get_child_prop_value() is intended to find a child node with a certain property value pair. The check if (!fwnode_property_read_u32(fwnode, prop_name, &nr)) continue; is faulty: fwnode_property_read_u32() returns zero on success, not on failure, leading to comparing values only if the searched property was not found. Moreover, the check is made against the parent device node instead of the child one as it should be. Fixes: 79389a83bc38 (ACPI / property: Add support for remote endpoints) Reported-by: Hyungwoo Yang Signed-off-by: Sakari Ailus Cc: 4.12+ # 4.12+ [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b40eebcd339c47921ff8b04c77af7c762b74216 Author: Rafael J. Wysocki Date: Tue Aug 22 22:44:13 2017 +0200 ACPICA: Fix acpi_evaluate_object_typed() Commit 2d2a954375a0 (ACPICA: Update two error messages to emit control method name) causes acpi_evaluate_object_typed() to fail if its pathname argument is NULL, but some callers of that function in the kernel, particularly acpi_nondev_subnode_data_ok(), pass NULL as pathname to it and expect it to work. For this reason, make acpi_evaluate_object_typed() check if its pathname argument is NULL and fall back to using the pathname of its handle argument if that is the case. Reported-by: Sakari Ailus Tested-by: Yang, Hyungwoo Fixes: 2d2a954375a0 (ACPICA: Update two error messages to emit control method name) Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsxfeval.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 414e7d76af6d3ec2dd4e9079927dbe0e2e4ca914 Author: Florian Fainelli Date: Mon Aug 21 12:59:10 2017 -0700 net/hsr: Check skb_put_padto() return value skb_put_padto() will free the sk_buff passed as reference in case of errors, but we still need to check its return value and decide what to do. Detected by CoverityScan, CID#1416688 ("CHECKED_RETURN") Fixes: ee1c27977284 ("net/hsr: Added support for HSR v1") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/hsr/hsr_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c5cff8561d2d0006e972bd114afd51f082fee77c Author: Wei Wang Date: Mon Aug 21 09:47:10 2017 -0700 ipv6: add rcu grace period before freeing fib6_node We currently keep rt->rt6i_node pointing to the fib6_node for the route. And some functions make use of this pointer to dereference the fib6_node from rt structure, e.g. rt6_check(). However, as there is neither refcount nor rcu taken when dereferencing rt->rt6i_node, it could potentially cause crashes as rt->rt6i_node could be set to NULL by other CPUs when doing a route deletion. This patch introduces an rcu grace period before freeing fib6_node and makes sure the functions that dereference it takes rcu_read_lock(). Note: there is no "Fixes" tag because this bug was there in a very early stage. Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/ip6_fib.h | 30 +++++++++++++++++++++++++++++- net/ipv6/ip6_fib.c | 20 ++++++++++++++++---- net/ipv6/route.c | 14 +++++++++++--- 3 files changed, 56 insertions(+), 8 deletions(-) commit 65159c051c45f269cf40a14f9404248f2d524920 Author: Bharat Potnuri Date: Tue Aug 1 10:58:35 2017 +0530 RDMA/uverbs: Initialize cq_context appropriately Initializing cq_context with ev_queue in create_cq(), leads to NULL pointer dereference in ib_uverbs_comp_handler(), if application doesnot use completion channel. This patch fixes the cq_context initialization. Fixes: 1e7710f3f65 ("IB/core: Change completion channel to use the reworked") Cc: stable@vger.kernel.org # 4.12 Signed-off-by: Potnuri Bharat Teja Reviewed-by: Matan Barak Signed-off-by: Doug Ledford (cherry picked from commit 699a2d5b1b880b4e4e1c7d55fa25659322cf5b51) drivers/infiniband/core/uverbs_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c8d2d95b815c7610720b7e868b395a019864720 Merge: 3de33e1 4ff0308 Author: David S. Miller Date: Tue Aug 22 10:27:26 2017 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-08-21 1) Fix memleaks when ESP takes an error path. 2) Fix null pointer dereference when creating a sub policy that matches the same outer flow as main policy does. From Koichiro Den. 3) Fix possible out-of-bound access in xfrm_migrate. This patch should go to the stable trees too. From Vladis Dronov. 4) ESP can return positive and negative error values, so treat both cases as an error. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 3de33e1ba0506723ab25734e098cf280ecc34756 Author: Stefano Brivio Date: Fri Aug 18 14:40:53 2017 +0200 ipv6: accept 64k - 1 packet length in ip6_find_1stfragopt() A packet length of exactly IPV6_MAXPLEN is allowed, we should refuse parsing options only if the size is 64KiB or more. While at it, remove one extra variable and one assignment which were also introduced by the commit that introduced the size check. Checking the sum 'offset + len' and only later adding 'len' to 'offset' doesn't provide any advantage over directly summing to 'offset' and checking it. Fixes: 6399f1fae4ec ("ipv6: avoid overflow of offset in ip6_find_1stfragopt") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller net/ipv6/output_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit eec3b80fb1ccc6320e0dae85c0dfb2666bc898e1 Merge: 6470812 0f0fc5c Author: Linus Torvalds Date: Tue Aug 22 10:21:05 2017 -0700 Merge tag 'mfd-fixes-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fix from Lee Jones: "Revert duplicate commit in da9062-core" * tag 'mfd-fixes-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: Revert "mfd: da9061: Fix to remove BBAT_CONT register from chip model" commit a067d94d37ed590fd17684d18c3edf52110d305a Author: Catalin Marinas Date: Tue Aug 22 15:39:00 2017 +0100 arm64: kaslr: Adjust the offset to avoid Image across alignment boundary With 16KB pages and a kernel Image larger than 16MB, the current kaslr_early_init() logic for avoiding mappings across swapper table boundaries fails since increasing the offset by kimg_sz just moves the problem to the next boundary. This patch rounds the offset down to (1 << SWAPPER_TABLE_SHIFT) if the Image crosses a PMD_SIZE boundary. Fixes: afd0e5a87670 ("arm64: kaslr: Fix up the kernel image alignment") Cc: Ard Biesheuvel Cc: Mark Rutland Cc: Will Deacon Cc: Neeraj Upadhyay Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/kernel/kaslr.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 4a23e56ad6549d0b8c0fac6d9eb752884379c391 Author: Ard Biesheuvel Date: Fri Aug 18 18:42:30 2017 +0100 arm64: kaslr: ignore modulo offset when validating virtual displacement In the KASLR setup routine, we ensure that the early virtual mapping of the kernel image does not cover more than a single table entry at the level above the swapper block level, so that the assembler routines involved in setting up this mapping can remain simple. In this calculation we add the proposed KASLR offset to the values of the _text and _end markers, and reject it if they would end up falling in different swapper table sized windows. However, when taking the addresses of _text and _end, the modulo offset (the physical displacement modulo 2 MB) is already accounted for, and so adding it again results in incorrect results. So disregard the modulo offset from the calculation. Fixes: 08cdac619c81 ("arm64: relocatable: deal with physically misaligned ...") Reviewed-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 1 - arch/arm64/kernel/kaslr.c | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) commit 289d07a2dc6c6b6f3e4b8a62669320d99dbe6c3d Author: Mark Rutland Date: Tue Jul 11 15:19:22 2017 +0100 arm64: mm: abort uaccess retries upon fatal signal When there's a fatal signal pending, arm64's do_page_fault() implementation returns 0. The intent is that we'll return to the faulting userspace instruction, delivering the signal on the way. However, if we take a fatal signal during fixing up a uaccess, this results in a return to the faulting kernel instruction, which will be instantly retried, resulting in the same fault being taken forever. As the task never reaches userspace, the signal is not delivered, and the task is left unkillable. While the task is stuck in this state, it can inhibit the forward progress of the system. To avoid this, we must ensure that when a fatal signal is pending, we apply any necessary fixup for a faulting kernel instruction. Thus we will return to an error path, and it is up to that code to make forward progress towards delivering the fatal signal. Cc: Catalin Marinas Cc: Laura Abbott Cc: stable@vger.kernel.org Reviewed-by: Steve Capper Tested-by: Steve Capper Reviewed-by: James Morse Tested-by: James Morse Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 096622104e14d8a1db4860bd557717067a0515d2 Author: Dave Martin Date: Fri Aug 18 16:57:01 2017 +0100 arm64: fpsimd: Prevent registers leaking across exec There are some tricky dependencies between the different stages of flushing the FPSIMD register state during exec, and these can race with context switch in ways that can cause the old task's regs to leak across. In particular, a context switch during the memset() can cause some of the task's old FPSIMD registers to reappear. Disabling preemption for this small window would be no big deal for performance: preemption is already disabled for similar scenarios like updating the FPSIMD registers in sigreturn. So, instead of rearranging things in ways that might swap existing subtle bugs for new ones, this patch just disables preemption around the FPSIMD state flushing so that races of this type can't occur here. This brings fpsimd_flush_thread() into line with other code paths. Cc: stable@vger.kernel.org Fixes: 674c242c9323 ("arm64: flush FP/SIMD state correctly after execve()") Reviewed-by: Ard Biesheuvel Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 2 ++ 1 file changed, 2 insertions(+) commit 88c54cdf61f508ebcf8da2d819f5dfc03e954d1d Author: Takashi Iwai Date: Tue Aug 22 08:15:13 2017 +0200 ALSA: core: Fix unexpected error at replacing user TLV When user tries to replace the user-defined control TLV, the kernel checks the change of its content via memcmp(). The problem is that the kernel passes the return value from memcmp() as is. memcmp() gives a non-zero negative value depending on the comparison result, and this shall be recognized as an error code. The patch covers that corner-case, return 1 properly for the changed TLV. Fixes: 8aa9b586e420 ("[ALSA] Control API - more robust TLV implementation") Cc: Signed-off-by: Takashi Iwai sound/core/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 324c654dfc28f899d150873ffb99549c0dcafe47 Merge: 4459398 3fb3b3c Author: Arnd Bergmann Date: Tue Aug 22 15:27:37 2017 +0200 Merge tag 'at91-ab-4.13-drivers-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into fixes Pull "Driver fixes for 4.13" from Alexandre Belloni: - Multiple EBI/SMC timing setting/calculation fixes * tag 'at91-ab-4.13-drivers-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: memory: atmel-ebi: Fix smc cycle xlate converter memory: atmel-ebi: Allow t_DF timings of zero ns memory: atmel-ebi: Fix smc timing return value evaluation commit fe4600a548f2763dec91b3b27a1245c370ceee2a Author: Chris Wilson Date: Sat Aug 19 13:05:58 2017 +0100 drm: Release driver tracking before making the object available again This is the same bug as we fixed in commit f6cd7daecff5 ("drm: Release driver references to handle before making it available again"), but now the exposure is via the PRIME lookup tables. If we remove the object/handle from the PRIME lut, then a new request for the same object/fd will generate a new handle, thus for a short window that object is known to userspace by two different handles. Fix this by releasing the driver tracking before PRIME. Fixes: 0ff926c7d4f0 ("drm/prime: add exported buffers to current fprivs imported buffer list (v2)") Signed-off-by: Chris Wilson Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Cc: Ville Syrjälä Cc: Thierry Reding Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170819120558.6465-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_gem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 804e73adf5cf4b3aea3b6ce058f4dc0191143821 Author: Takashi Iwai Date: Tue Aug 22 07:44:52 2017 +0200 ASoC: rt5670: Fix GPIO headset detection regression RT5670 codec driver and its machine driver for Intel CHT assume the implicit GPIO mapping on the index 0 while BIOS on most devices don't provide it. The recent commit f10e4bf6632b ("gpio: acpi: Even more tighten up ACPI GPIO lookups") restricts such cases and it resulted in a regression where the headset jack setup fails like: rt5670 i2c-10EC5672:00: ASoC: Cannot get gpio at index 0: -2 rt5670 i2c-10EC5672:00: Adding jack GPIO failed For fixing this, we need to provide the GPIO mapping explicitly in the machine driver. Also this patch corrects the string to be passed to gpiolib to match with the pre-given mapping, too. Fixes: f10e4bf6632b ("gpio: acpi: Even more tighten up ACPI GPIO lookups") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115531 Reported-by: Pierre-Louis Bossart Tested-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5672.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 07b3b5e9ed807a0d2077319b8e43a42e941db818 Author: Joakim Tjernlund Date: Tue Aug 22 08:33:53 2017 +0200 ALSA: usb-audio: Add delay quirk for H650e/Jabra 550a USB headsets These headsets reports a lot of: cannot set freq 44100 to ep 0x81 and need a small delay between sample rate settings, just like Zoom R16/24. Add both headsets to the Zoom R16/24 quirk for a 1 ms delay between control msgs. Signed-off-by: Joakim Tjernlund Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0f0fc5c090055983163ed8e7b3a73980e128048c Author: Lee Jones Date: Tue Aug 15 09:30:05 2017 +0100 Revert "mfd: da9061: Fix to remove BBAT_CONT register from chip model" This patch was applied to the MFD twice, causing unwanted behavour. This reverts commit b77eb79acca3203883e8d8dbc7f2b842def1bff8. Fixes: b77eb79acca3 ("mfd: da9061: Fix to remove BBAT_CONT register from chip model") Reported-by: Steve Twiss Reviewed-by: Steve Twiss Signed-off-by: Lee Jones drivers/mfd/da9062-core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b313f780ded9ead1f72df9c8b45f7ea00585a2e5 Merge: 4a9f153 a0ffc51 Author: Dave Airlie Date: Tue Aug 22 16:53:32 2017 +1000 Merge tag 'drm-misc-fixes-2017-08-18' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Core Changes: - Fix framebuffer leak in setplane error condition (Nikil) - Prevent BUG in atomic_ioctl by properly resetting state on EDEADLK (Maarten) - Add missing return in atomic_check_only if atomic_check fails (Maarten) Driver Changes: - rockchip: Don't try to suspend if device not initialized (Jeffy) Cc: Jeffy Chen Cc: Nikhil Mahale Cc: Maarten Lankhorst * tag 'drm-misc-fixes-2017-08-18' of git://anongit.freedesktop.org/git/drm-misc: drm/atomic: If the atomic check fails, return its value first drm/atomic: Handle -EDEADLK with out-fences correctly drm: Fix framebuffer leak drm/rockchip: Fix suspend crash when drm is not bound commit 4a9f153dbdd50ee58955bd876ba0b50de7c5b6c0 Merge: 98f1a17 5be5dd3 Author: Dave Airlie Date: Tue Aug 22 16:52:36 2017 +1000 Merge tag 'imx-drm-fixes-2017-08-18' of git://git.pengutronix.de/git/pza/linux into drm-fixes drm/imx: fix YUV primary plane and IPUv3 build corner case - Enable color space conversion on the primary plane when the framebuffer format is a YUV format. - The IPUv3 base driver now uses drm_format_info in the PRE/PRG code. The PRE/PRG parts are already disabled if DRM is not available. Enforce that if DRM is built as a module, IPUv3 must be built as a module, too. * tag 'imx-drm-fixes-2017-08-18' of git://git.pengutronix.de/git/pza/linux: drm/imx: ipuv3-plane: fix YUV framebuffer scanout on the base plane gpu: ipu-v3: add DRM dependency commit 98f1a17285df1f29c3ec59b2fe7d9b035f3a9b81 Merge: 14ccee7 2a596fc Author: Dave Airlie Date: Tue Aug 22 16:50:07 2017 +1000 Merge tag 'sunxi-drm-fixes-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-fixes Allwinner DRM fixes for 4.13 A single commit to restore the framebuffer console when there's no DRM users left. * tag 'sunxi-drm-fixes-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: drm/sun4i: Implement drm_driver lastclose to restore fbdev console commit 445a582738de6802669aeed9c33ca406c23c3b1f Author: Stephan Mueller Date: Wed Aug 16 11:56:24 2017 +0200 crypto: algif_skcipher - only call put_page on referenced and used pages For asynchronous operation, SGs are allocated without a page mapped to them or with a page that is not used (ref-counted). If the SGL is freed, the code must only call put_page for an SG if there was a page assigned and ref-counted in the first place. This fixes a kernel crash when using io_submit with more than one iocb using the sendmsg and sendpage (vmsplice/splice) interface. Cc: Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/algif_skcipher.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 549f64153c354e69fc19534f7d7e867de1992f95 Author: Ard Biesheuvel Date: Mon Aug 14 14:28:15 2017 +0100 crypto: testmgr - add chunked test cases for chacha20 We failed to catch a bug in the chacha20 code after porting it to the skcipher API. We would have caught it if any chunked tests had been defined, so define some now so we will catch future regressions. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/testmgr.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 4de437265eaac18f880d827f8e105b10de9b87a3 Author: Ard Biesheuvel Date: Mon Aug 14 14:28:14 2017 +0100 crypto: chacha20 - fix handling of chunked input Commit 9ae433bc79f9 ("crypto: chacha20 - convert generic and x86 versions to skcipher") ported the existing chacha20 code to use the new skcipher API, and introduced a bug along the way. Unfortunately, the tcrypt tests did not catch the error, and it was only found recently by Tobias. Stefan kindly diagnosed the error, and proposed a fix which is similar to the one below, with the exception that 'walk.stride' is used rather than the hardcoded block size. This does not actually matter in this case, but it's a better example of how to use the skcipher walk API. Fixes: 9ae433bc79f9 ("crypto: chacha20 - convert generic and x86 ...") Cc: # v4.11+ Cc: Steffen Klassert Reported-by: Tobias Brunner Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/chacha20_generic.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit dea3eb8b452e36cf2dd572b0a797915ccf452ae6 Author: Stephan Mueller Date: Thu Aug 10 08:06:18 2017 +0200 lib/mpi: kunmap after finishing accessing buffer Using sg_miter_start and sg_miter_next, the buffer of an SG is kmap'ed to *buff. The current code calls sg_miter_stop (and thus kunmap) on the SG entry before the last access of *buff. The patch moves the sg_miter_stop call after the last access to *buff to ensure that the memory pointed to by *buff is still mapped. Fixes: 4816c9406430 ("lib/mpi: Fix SG miter leak") Cc: Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu lib/mpi/mpicoder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6470812e22261d2342ef1597be62e63a0423d691 Merge: 05ab303 2dc7753 Author: Linus Torvalds Date: Mon Aug 21 14:07:48 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Just a couple small fixes, two of which have to do with gcc-7: 1) Don't clobber kernel fixed registers in __multi4 libgcc helper. 2) Fix a new uninitialized variable warning on sparc32 with gcc-7, from Thomas Petazzoni. 3) Adjust pmd_t initializer on sparc32 to make gcc happy. 4) If ATU isn't available, don't bark in the logs. From Tushar Dave" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: kernel/pcic: silence gcc 7.x warning in pcibios_fixup_bus() sparc64: remove unnecessary log message sparc64: Don't clibber fixed registers in __multi4. mm: add pmd_t initializer __pmd() to work around a GCC bug. commit 2dc77533f1e495788d73ffa4bee4323b2646d2bb Author: Thomas Petazzoni Date: Sun Aug 13 23:14:58 2017 +0200 sparc: kernel/pcic: silence gcc 7.x warning in pcibios_fixup_bus() When building the kernel for Sparc using gcc 7.x, the build fails with: arch/sparc/kernel/pcic.c: In function ‘pcibios_fixup_bus’: arch/sparc/kernel/pcic.c:647:8: error: ‘cmd’ may be used uninitialized in this function [-Werror=maybe-uninitialized] cmd |= PCI_COMMAND_IO; ^~ The simplified code looks like this: unsigned int cmd; [...] pcic_read_config(dev->bus, dev->devfn, PCI_COMMAND, 2, &cmd); [...] cmd |= PCI_COMMAND_IO; I.e, the code assumes that pcic_read_config() will always initialize cmd. But it's not the case. Looking at pcic_read_config(), if bus->number is != 0 or if the size is not one of 1, 2 or 4, *val will not be initialized. As a simple fix, we initialize cmd to zero at the beginning of pcibios_fixup_bus. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller arch/sparc/kernel/pcic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05ab303b4f9e7121b120c08081546a25e067b4f4 Merge: 0b3baec a8ec3ee Author: Linus Torvalds Date: Mon Aug 21 13:30:36 2017 -0700 Merge tag 'arc-4.13-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - PAE40 related updates - SLC errata for region ops - intc line masking by default * tag 'arc-4.13-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: arc: Mask individual IRQ lines during core INTC init ARCv2: PAE40: set MSB even if !CONFIG_ARC_HAS_PAE40 but PAE exists in SoC ARCv2: PAE40: Explicitly set MSB counterpart of SLC region ops addresses ARC: dma: implement dma_unmap_page and sg variant ARCv2: SLC: Make sure busy bit is set properly for region ops ARC: [plat-sim] Include this platform unconditionally ARC: [plat-axs10x]: prepare dts files for enabling PAE40 on axs103 ARC: defconfig: Cleanup from old Kconfig options commit 0b3baec853d1de731d2e984f26b92c54842c6ff7 Merge: e3181f2 0361984 Author: Linus Torvalds Date: Mon Aug 21 13:27:51 2017 -0700 Merge tag 'rtc-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC fix from Alexandre Belloni: "Fix regmap configuration for ds1307" * tag 'rtc-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: ds1307: fix regmap config commit e3181f2c0c1bd1c066e9359998131eb524309a8e Merge: dd1c1f2 348a400 Author: Linus Torvalds Date: Mon Aug 21 13:16:27 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix IGMP handling wrt VRF, from David Ahern. 2) Fix timer access to freed object in dccp, from Eric Dumazet. 3) Use kmalloc_array() in ptr_ring to avoid overflow cases which are triggerable by userspace. Also from Eric Dumazet. 4) Fix infinite loop in unmapping cleanup of nfp driver, from Colin Ian King. 5) Correct datagram peek handling of empty SKBs, from Matthew Dawson. 6) Fix use after free in TIPC, from Eric Dumazet. 7) When replacing a route in ipv6 we need to reset the round robin pointer, from Wei Wang. 8) Fix bug in pci_find_pcie_root_port() which was unearthed by the relaxed ordering changes, from Thierry Redding. I made sure to get an explicit ACK from Bjorn this time around :-) * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits) ipv6: repair fib6 tree in failure case net_sched: fix order of queue length updates in qdisc_replace() tools lib bpf: improve warning switchdev: documentation: minor typo fixes bpf, doc: also add s390x as arch to sysctl description net: sched: fix NULL pointer dereference when action calls some targets rxrpc: Fix oops when discarding a preallocated service call irda: do not leak initialized list.dev to userspace net/mlx4_core: Enable 4K UAR if SRIOV module parameter is not enabled PCI: Allow PCI express root ports to find themselves tcp: when rearming RTO, if RTO time is in past then fire RTO ASAP net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set ipv6: reset fn->rr_ptr when replacing route sctp: fully initialize the IPv6 address in sctp_v6_to_addr() tipc: fix use-after-free tun: handle register_netdevice() failures properly datagram: When peeking datagrams with offset < 0 don't skip empty skbs bpf, doc: improve sysctl knob description netxen: fix incorrect loop counter decrement nfp: fix infinite loop on umapping cleanup ... commit dd1c1f2f2028a7b851f701fc6a8ebe39dcb95e7c Author: Oleg Nesterov Date: Mon Aug 21 17:35:02 2017 +0200 pids: make task_tgid_nr_ns() safe This was reported many times, and this was even mentioned in commit 52ee2dfdd4f5 ("pids: refactor vnr/nr_ns helpers to make them safe") but somehow nobody bothered to fix the obvious problem: task_tgid_nr_ns() is not safe because task->group_leader points to nowhere after the exiting task passes exit_notify(), rcu_read_lock() can not help. We really need to change __unhash_process() to nullify group_leader, parent, and real_parent, but this needs some cleanups. Until then we can turn task_tgid_nr_ns() into another user of __task_pid_nr_ns() and fix the problem. Reported-by: Troy Kensinger Signed-off-by: Oleg Nesterov Signed-off-by: Linus Torvalds include/linux/pid.h | 4 +++- include/linux/sched.h | 51 +++++++++++++++++++++++++++------------------------ kernel/pid.c | 11 ++++------- 3 files changed, 34 insertions(+), 32 deletions(-) commit f2d8421b88ca28253d6265e3852de9f40aae6e63 Merge: 14ccee7 857b8de Author: Radim Krčmář Date: Mon Aug 21 18:21:30 2017 +0200 Merge tag 'kvm-s390-master-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux KVM: s390: two fixes for sthyi emulation - missing inline assembly constraint - wrong exception handling commit deecd4d71b12626db48544faa66bb897e2cafd07 Author: Josh Poimboeuf Date: Thu Jul 27 15:56:55 2017 -0500 objtool: Fix '-mtune=atom' decoding support in objtool 2.0 With '-mtune=atom', which is enabled with CONFIG_MATOM=y, GCC uses some unusual instructions for setting up the stack. Instead of: mov %rsp, %rbp it does: lea (%rsp), %rbp And instead of: add imm, %rsp it does: lea disp(%rsp), %rsp Add support for these instructions to the objtool decoder. Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: baa41469a7b9 ("objtool: Implement stack validation 2.0") Link: http://lkml.kernel.org/r/4ea1db896e821226efe1f8e09f270771bde47e65.1501188854.git.jpoimboe@redhat.com [ This is a cherry-picked version of upcoming commit 5b8de48e82ba. ] Signed-off-by: Ingo Molnar tools/objtool/arch/x86/decode.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 857b8de96795646c5891cf44ae6fb19b9ff74bf9 Author: Heiko Carstens Date: Thu Aug 3 14:27:30 2017 +0200 KVM: s390: sthyi: fix specification exception detection sthyi should only generate a specification exception if the function code is zero and the response buffer is not on a 4k boundary. The current code would also test for unknown function codes if the response buffer, that is currently only defined for function code 0, is not on a 4k boundary and incorrectly inject a specification exception instead of returning with condition code 3 and return code 4 (unsupported function code). Fix this by moving the boundary check. Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation") Cc: # 4.8+ Reviewed-by: Janosch Frank Signed-off-by: Heiko Carstens Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/sthyi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4a4eefcd0e49f9f339933324c1bde431186a0a7d Author: Heiko Carstens Date: Thu Aug 3 13:05:11 2017 +0200 KVM: s390: sthyi: fix sthyi inline assembly The sthyi inline assembly misses register r3 within the clobber list. The sthyi instruction will always write a return code to register "R2+1", which in this case would be r3. Due to that we may have register corruption and see host crashes or data corruption depending on how gcc decided to allocate and use registers during compile time. Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation") Cc: # 4.8+ Reviewed-by: Janosch Frank Signed-off-by: Heiko Carstens Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/sthyi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d83c2dbaa90a9bd6346e234d9802080a9c7b2fea Author: Shawn Lin Date: Fri Aug 18 09:16:08 2017 +0800 mmc: block: prevent propagating R1_OUT_OF_RANGE for open-ending mode We to some extent should tolerate R1_OUT_OF_RANGE for open-ending mode as it is expected behaviour and most of the backup partition tables should be located near some of the last blocks which will always make open-ending read exceed the capacity of cards. Fixes: 9820a5b11101 ("mmc: core: for data errors, take response of stop cmd into account") Fixes: a04e6bae9e6f ("mmc: core: check also R1 response for stop commands") Signed-off-by: Shawn Lin Reviewed-by: Wolfram Sang Tested-by: Shawn Guo Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 49 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) commit 03619844d81d7459874e88034f0f36d959f0e2df Author: Heiner Kallweit Date: Tue Jul 25 18:44:04 2017 +0200 rtc: ds1307: fix regmap config Current max_register setting breaks reading nvram on certain chips and also reading the standard registers on RX8130 where register map starts at 0x10. Signed-off-by: Heiner Kallweit Fixes: 11e5890b5342 "rtc: ds1307: convert driver to regmap" Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 1 - 1 file changed, 1 deletion(-) commit d41a3c2be178783c85e05025265ab58fbb4d4ce1 Author: Chris Wilson Date: Mon Aug 7 13:19:19 2017 +0100 drm/i915: Clear lost context-switch interrupts across reset During a global reset, we disable the irq. As we disable the irq, the hardware may be raising a GT interrupt that we then ignore, leaving it pending in the GTIIR. After the reset, we then re-enable the irq, triggering the pending interrupt. However, that interrupt was for the stale state from before the reset, and the contents of the CSB buffer are now invalid. v2: Add a comment to make it clear that the double clear is purely my paranoia. Reported-by: "Dong, Chuanxiao" Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Signed-off-by: Chris Wilson Cc: "Dong, Chuanxiao" Cc: Tvrtko Ursulin Cc: Michal Winiarski Cc: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20170807121919.30165-1-chris@chris-wilson.co.uk Link: https://patchwork.freedesktop.org/patch/msgid/20170818090509.5363-1-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry (cherry picked from commit 64f09f00caf0a7cb40a8c0b85789bacba0f51d9e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit a93c11527528c951b8d8db638162128a09e09ec2 Author: Andy Shevchenko Date: Thu Aug 17 13:55:41 2017 +0300 drm/i915/bxt: use NULL for GPIO connection ID The commit 213e08ad60ba ("drm/i915/bxt: add bxt dsi gpio element support") enables GPIO support for Broxton based platforms. While using that API we might get into troubles in the future, because we can't rely on label name in the driver since vendor firmware might provide any GPIO pin there, e.g. "reset", and even mark it in _DSD (in which case the request will fail). To avoid inconsistency and potential issues we have two options: a) generate GPIO ACPI mapping table and supply it via acpi_dev_add_driver_gpios(), or b) just pass NULL as connection ID. The b) approach is much simpler and would work since the driver relies on GPIO indices only. Moreover, the _CRS fallback mechanism, when requesting GPIO, has been made stricter, and supplying non-NULL connection ID when neither _DSD, nor GPIO ACPI mapping is present, is making request fail. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101921 Fixes: f10e4bf6632b ("gpio: acpi: Even more tighten up ACPI GPIO lookups") Cc: Mika Kahola Cc: Jani Nikula Tested-by: Mika Kahola Signed-off-by: Andy Shevchenko Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170817105541.63914-1-andriy.shevchenko@linux.intel.com (cherry picked from commit cd55a1fbd21a820b7dd85a208b3170aa0b06adfa) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dsi_vbt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4459398b6d9e3055ced5de9820364b3bdd79ac25 Author: Keerthy Date: Mon Jul 31 10:01:36 2017 +0530 soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create knav_pool_create is an exported function. In the event of a call before knav_queue_probe, we encounter a NULL pointer dereference in the following line. Hence return -EPROBE_DEFER to the caller till the kdev pointer is non-NULL. Signed-off-by: Keerthy Acked-by: Santosh Shilimkar Signed-off-by: Arnd Bergmann drivers/soc/ti/knav_qmss_queue.c | 3 +++ 1 file changed, 3 insertions(+) commit 348a4002729ccab8b888b38cbc099efa2f2a2036 Author: Wei Wang Date: Fri Aug 18 17:14:49 2017 -0700 ipv6: repair fib6 tree in failure case In fib6_add(), it is possible that fib6_add_1() picks an intermediate node and sets the node's fn->leaf to NULL in order to add this new route. However, if fib6_add_rt2node() fails to add the new route for some reason, fn->leaf will be left as NULL and could potentially cause crash when fn->leaf is accessed in fib6_locate(). This patch makes sure fib6_repair_tree() is called to properly repair fn->leaf in the above failure case. Here is the syzkaller reported general protection fault in fib6_locate: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 0 PID: 40937 Comm: syz-executor3 Not tainted Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801d7d64100 ti: ffff8801d01a0000 task.ti: ffff8801d01a0000 RIP: 0010:[] [] __ipv6_prefix_equal64_half include/net/ipv6.h:475 [inline] RIP: 0010:[] [] ipv6_prefix_equal include/net/ipv6.h:492 [inline] RIP: 0010:[] [] fib6_locate_1 net/ipv6/ip6_fib.c:1210 [inline] RIP: 0010:[] [] fib6_locate+0x281/0x3c0 net/ipv6/ip6_fib.c:1233 RSP: 0018:ffff8801d01a36a8 EFLAGS: 00010202 RAX: 0000000000000020 RBX: ffff8801bc790e00 RCX: ffffc90002983000 RDX: 0000000000001219 RSI: ffff8801d01a37a0 RDI: 0000000000000100 RBP: ffff8801d01a36f0 R08: 00000000000000ff R09: 0000000000000000 R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000001 R13: dffffc0000000000 R14: ffff8801d01a37a0 R15: 0000000000000000 FS: 00007f6afd68c700(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004c6340 CR3: 00000000ba41f000 CR4: 00000000001426f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8801d01a37a8 ffff8801d01a3780 ffffed003a0346f5 0000000c82a23ea0 ffff8800b7bd7700 ffff8801d01a3780 ffff8800b6a1c940 ffffffff82a23ea0 ffff8801d01a3920 ffff8801d01a3748 ffffffff82a223d6 ffff8801d7d64988 Call Trace: [] ip6_route_del+0x106/0x570 net/ipv6/route.c:2109 [] inet6_rtm_delroute+0xfd/0x100 net/ipv6/route.c:3075 [] rtnetlink_rcv_msg+0x549/0x7a0 net/core/rtnetlink.c:3450 [] netlink_rcv_skb+0x141/0x370 net/netlink/af_netlink.c:2281 [] rtnetlink_rcv+0x2f/0x40 net/core/rtnetlink.c:3456 [] netlink_unicast_kernel net/netlink/af_netlink.c:1206 [inline] [] netlink_unicast+0x518/0x750 net/netlink/af_netlink.c:1232 [] netlink_sendmsg+0x8ce/0xc30 net/netlink/af_netlink.c:1778 [] sock_sendmsg_nosec net/socket.c:609 [inline] [] sock_sendmsg+0xcf/0x110 net/socket.c:619 [] sock_write_iter+0x222/0x3a0 net/socket.c:834 [] new_sync_write+0x1dd/0x2b0 fs/read_write.c:478 [] __vfs_write+0xe4/0x110 fs/read_write.c:491 [] vfs_write+0x178/0x4b0 fs/read_write.c:538 [] SYSC_write fs/read_write.c:585 [inline] [] SyS_write+0xd9/0x1b0 fs/read_write.c:577 [] entry_SYSCALL_64_fastpath+0x12/0x17 Note: there is no "Fixes" tag as this seems to be a bug introduced very early. Signed-off-by: Wei Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 68a66d149a8c78ec6720f268597302883e48e9fa Author: Konstantin Khlebnikov Date: Sat Aug 19 15:37:07 2017 +0300 net_sched: fix order of queue length updates in qdisc_replace() This important to call qdisc_tree_reduce_backlog() after changing queue length. Parent qdisc should deactivate class in ->qlen_notify() called from qdisc_tree_reduce_backlog() but this happens only if qdisc->q.qlen in zero. Missed class deactivations leads to crashes/warnings at picking packets from empty qdisc and corrupting state at reactivating this class in future. Signed-off-by: Konstantin Khlebnikov Fixes: 86a7996cc8a0 ("net_sched: introduce qdisc_replace() helper") Acked-by: Cong Wang Signed-off-by: David S. Miller include/net/sch_generic.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 49bf4b36fdee4db3c8bc0507a8413a93a8c711cf Author: Eric Leblond Date: Sun Aug 20 21:48:14 2017 +0200 tools lib bpf: improve warning Signed-off-by: Eric Leblond Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/lib/bpf/libbpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5a78449810b06c3bc5fcd002d52e1a64f9bb397e Author: Chris Packham Date: Mon Aug 21 08:52:54 2017 +1200 switchdev: documentation: minor typo fixes Two typos in switchdev.txt Signed-off-by: Chris Packham Signed-off-by: David S. Miller Documentation/networking/switchdev.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d4dd2d75a26ef07cadc2949efeea9fabc2a5c299 Author: Daniel Borkmann Date: Mon Aug 21 00:26:03 2017 +0200 bpf, doc: also add s390x as arch to sysctl description Looks like this was accidentally missed, so still add s390x as supported eBPF JIT arch to bpf_jit_enable. Fixes: 014cd0a368dc ("bpf: Update sysctl documentation to list all supported architectures") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller Documentation/sysctl/net.txt | 1 + 1 file changed, 1 insertion(+) commit 2bfbe7881ee03d12bbedb05f804d139c88df30a0 Author: Ben Hutchings Date: Sat Aug 19 22:30:02 2017 +0100 kbuild: Do not use hyphen in exported variable name This definition in Makefile.dtbinst: export dtbinst-root ?= $(obj) should define and export dtbinst-root when handling the root dts directory, and do nothing in the subdirectories. However some shells, including dash, will not pass through environment variables whose name includes a hyphen. Usually GNU make does not use a shell to recurse, but if e.g. $(srctree) contains '~' it will use a shell here. Rename the variable to dtbinst_root. References: https://bugs.debian.org/833561 Fixes: 323a028d39cdi ("dts, kbuild: Implement support for dtb vendor subdirs") Signed-off-by: Ben Hutchings Signed-off-by: Masahiro Yamada scripts/Makefile.dtbinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 801d2e9f1cfb24c15ec821288b6bc2e3107f6fcd Author: Shuah Khan Date: Fri Aug 18 15:54:41 2017 -0600 Makefile: add kselftest-clean to PHONY target list kselftest-clean isn't in the PHONY target list. Add it. Signed-off-by: Shuah Khan Signed-off-by: Masahiro Yamada Makefile | 1 + 1 file changed, 1 insertion(+) commit 8c97023cf0518f172b8cb7a9fffc28b89401abbf Author: Arnd Bergmann Date: Wed Jul 26 15:36:23 2017 +0200 Kbuild: use -fshort-wchar globally Commit 971a69db7dc0 ("Xen: don't warn about 2-byte wchar_t in efi") added the --no-wchar-size-warning to the Makefile to avoid this harmless warning: arm-linux-gnueabi-ld: warning: drivers/xen/efi.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail Changing kbuild to use thin archives instead of recursive linking unfortunately brings the same warning back during the final link. The kernel does not use wchar_t string literals at this point, and xen does not use wchar_t at all (only efi_char16_t), so the flag has no effect, but as pointed out by Jan Beulich, adding a wchar_t string literal would be bad here. Since wchar_t is always defined as u16, independent of the toolchain default, always passing -fshort-wchar is correct and lets us remove the Xen specific hack along with fixing the warning. Link: https://patchwork.kernel.org/patch/9275217/ Fixes: 971a69db7dc0 ("Xen: don't warn about 2-byte wchar_t in efi") Signed-off-by: Arnd Bergmann Acked-by: David Vrabel Signed-off-by: Masahiro Yamada Makefile | 2 +- drivers/xen/Makefile | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit 14ccee78fc82f5512908f4424f541549a5705b89 Author: Linus Torvalds Date: Sun Aug 20 14:13:52 2017 -0700 Linux 4.13-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 197e7e521384a23b9e585178f3f11c9fa08274b9 Author: Linus Torvalds Date: Sun Aug 20 13:26:27 2017 -0700 Sanitize 'move_pages()' permission checks The 'move_paghes()' system call was introduced long long ago with the same permission checks as for sending a signal (except using CAP_SYS_NICE instead of CAP_SYS_KILL for the overriding capability). That turns out to not be a great choice - while the system call really only moves physical page allocations around (and you need other capabilities to do a lot of it), you can check the return value to map out some the virtual address choices and defeat ASLR of a binary that still shares your uid. So change the access checks to the more common 'ptrace_may_access()' model instead. This tightens the access checks for the uid, and also effectively changes the CAP_SYS_NICE check to CAP_SYS_PTRACE, but it's unlikely that anybody really _uses_ this legacy system call any more (we hav ebetter NUMA placement models these days), so I expect nobody to notice. Famous last words. Reported-by: Otto Ebeling Acked-by: Eric W. Biederman Cc: Willy Tarreau Cc: stable@kernel.org Signed-off-by: Linus Torvalds mm/migrate.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 2c68888f1d76c668024a9efa50af382df4f3cf8e Merge: f299aec 8b35a5f Author: Greg Kroah-Hartman Date: Sun Aug 20 10:45:54 2017 -0700 Merge tag 'fixes-for-4.13b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fixes for the 4.13 cycle. Given the late stage of this series, some more involved fixes have been held back for the upcoming merge window. The hid-sensor issue has been causing problems for a long time so it is great to have that one finally fixed! No more bug reports for the userspace guys (well about that anyway). * documentation - some warning fixes due to missing colons in kernel-doc. * adis16480 - fix accel scale factor. * bmp280 - properly initialize the device for humidity readings - without this the humidity readings may be skipped and a magic value of 0x8000 returned. * hid-sensor-strigger - fix a race with user space when powering up the sensor. * ina291 - Avoid an underflow for the sleeping time as a result of supporting the fastest rates. * st-magnetometer - Fix the status register address for hte LSM303AGR, - Remove the ihl property for LSM303AGR as the sensor doesn't support active low for the dataready line. * stm32-adc - Fix use of a common clock rate. * stm32-timer - fix the quadrature mode get routine to account for the magic 0 value. set on boot. - fix the return value of write_raw, - fix the get/set down count direction as the enum value was not being converted to the relevant bit field, - add an enable attribute to actually turn it on when in encoder mode, - missing mask when reading the trigger mode. commit 7f680d7ec3153dffc4d37aea517ead2b9fb9b8e9 Merge: 2615a38 45bd07a Author: Linus Torvalds Date: Sun Aug 20 09:36:52 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Another pile of small fixes and updates for x86: - Plug a hole in the SMAP implementation which misses to clear AC on NMI entry - Fix the norandmaps/ADDR_NO_RANDOMIZE logic so the command line parameter works correctly again - Use the proper accessor in the startup64 code for next_early_pgt to prevent accessing of invalid addresses and faulting in the early boot code. - Prevent CPU hotplug lock recursion in the MTRR code - Unbreak CPU0 hotplugging - Rename overly long CPUID bits which got introduced in this cycle - Two commits which mark data 'const' and restrict the scope of data and functions to file scope by making them 'static'" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Constify attribute_group structures x86/boot/64/clang: Use fixup_pointer() to access 'next_early_pgt' x86/elf: Remove the unnecessary ADDR_NO_RANDOMIZE checks x86: Fix norandmaps/ADDR_NO_RANDOMIZE x86/mtrr: Prevent CPU hotplug lock recursion x86: Mark various structures and functions as 'static' x86/cpufeature, kvm/svm: Rename (shorten) the new "virtualized VMSAVE/VMLOAD" CPUID flag x86/smpboot: Unbreak CPU0 hotplug x86/asm/64: Clear AC on NMI entries commit 2615a38f142ffda863dece40120d7fe69af46490 Merge: e46db8d b60bf53 Author: Linus Torvalds Date: Sun Aug 20 09:34:24 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "A few small fixes for timer drivers: - Prevent infinite recursion in the arm architected timer driver with ftrace - Propagate error codes to the caller in case of failure in EM STI driver - Adjust a bogus loop iteration in the arm architected timer driver - Add a missing Kconfig dependency to the pistachio clocksource to prevent build failures - Correctly check for IS_ERR() instead of NULL in the shared timer-of code" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled clocksource/drivers/Kconfig: Fix CLKSRC_PISTACHIO dependencies clocksource/drivers/timer-of: Checking for IS_ERR() instead of NULL clocksource/drivers/em_sti: Fix error return codes in em_sti_probe() clocksource/drivers/arm_arch_timer: Fix mem frame loop initialization commit d912366a59c5384df436fd007667d6e574128b44 Author: Hans de Goede Date: Sun Aug 20 09:29:03 2017 -0700 Input: soc_button_array - silence -ENOENT error on Dell XPS13 9365 The Dell XPS13 9365 has an INT33D2 ACPI node with no GPIOs, causing the following error in dmesg: [ 7.172275] soc_button_array: probe of INT33D2:00 failed with error -2 This commit silences this, by returning -ENODEV when there are no GPIOs. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196679 Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/soc_button_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e46db8d2ef58f9b515f83be4608cef90ff9ae2c6 Merge: 9dae41a 9b231d9 Author: Linus Torvalds Date: Sun Aug 20 09:20:57 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "Two fixes for the perf subsystem: - Fix an inconsistency of RDPMC mm struct tagging across exec() which causes RDPMC to fault. - Correct the timestamp mechanics across IOC_DISABLE/ENABLE which causes incorrect timestamps and total time calculations" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix time on IOC_ENABLE perf/x86: Fix RDPMC vs. mm_struct tracking commit 9dae41a238a952eb65c8aa8a59d8aa39058a7bcf Merge: e18a5eb 8fbbe2d Author: Linus Torvalds Date: Sun Aug 20 09:07:56 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A pile of smallish changes all over the place: - Add a missing ISB in the GIC V1 driver - Remove an ACPI version check in the GIC V3 ITS driver - Add the missing irq_pm_shutdown function for BRCMSTB-L2 to avoid spurious wakeups - Remove the artifical limitation of ITS instances to the number of NUMA nodes which prevents utilizing the ITS hardware correctly - Prevent a infinite parsing loop in the GIC-V3 ITS/MSI code - Honour the force affinity argument in the GIC-V3 driver which is required to make perf work correctly - Correctly report allocation failures in GIC-V2/V3 to avoid using half allocated and initialized interrupts. - Fixup checks against nr_cpu_ids in the generic IPI code" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/ipi: Fixup checks against nr_cpu_ids genirq: Restore trigger settings in irq_modify_status() MAINTAINERS: Remove Jason Cooper's irqchip git tree irqchip/gic-v3-its-platform-msi: Fix msi-parent parsing loop irqchip/gic-v3-its: Allow GIC ITS number more than MAX_NUMNODES irqchip: brcmstb-l2: Define an irq_pm_shutdown function irqchip/gic: Ensure we have an ISB between ack and ->handle_irq irqchip/gic-v3-its: Remove ACPICA version check for ACPI NUMA irqchip/gic-v3: Honor forced affinity setting irqchip/gic-v3: Report failures in gic_irq_domain_alloc irqchip/gic-v2: Report failures in gic_irq_domain_alloc irqchip/atmel-aic: Remove root argument from ->fixup() prototype irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup() irqchip/atmel-aic: Fix unbalanced of_node_put() in aic_common_irq_fixup() commit e18a5ebc2d507f42ca724581a1039ba058fa12da Merge: 58d4e45 7edaeb6 Author: Linus Torvalds Date: Sun Aug 20 08:54:30 2017 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull watchdog fix from Thomas Gleixner: "A fix for the hardlockup watchdog to prevent false positives with extreme Turbo-Modes which make the perf/NMI watchdog fire faster than the hrtimer which is used to verify. Slightly larger than the minimal fix, which just would increase the hrtimer frequency, but comes with extra overhead of more watchdog timer interrupts and thread wakeups for all users. With this change we restrict the overhead to the extreme Turbo-Mode systems" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kernel/watchdog: Prevent false positives with turbo modes commit 8b35a5f87a73842601cd376e0f5b9b25831390f4 Author: Lorenzo Bianconi Date: Wed Aug 16 19:02:51 2017 +0200 iio: magnetometer: st_magn: remove ihl property for LSM303AGR Remove IRQ active low support for LSM303AGR since the sensor does not support that capability for data-ready line Fixes: a9fd053b56c6 (iio: st_sensors: support active-low interrupts) Signed-off-by: Lorenzo Bianconi Reviewed-by: Linus Walleij Cc: Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/st_magn_core.c | 2 -- 1 file changed, 2 deletions(-) commit 541ee9b24fca587f510fe1bc58508d5cf40707af Author: Lorenzo Bianconi Date: Wed Aug 16 19:02:50 2017 +0200 iio: magnetometer: st_magn: fix status register address for LSM303AGR Fixes: 97865fe41322 (iio: st_sensors: verify interrupt event to status) Signed-off-by: Lorenzo Bianconi Reviewed-by: Linus Walleij Cc: Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/st_magn_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1664eaacec31035450132c46ed2915fd2b2049a Author: Srinivas Pandruvada Date: Sat Aug 12 09:09:21 2017 -0700 iio: hid-sensor-trigger: Fix the race with user space powering up sensors It has been reported for a while that with iio-sensor-proxy service the rotation only works after one suspend/resume cycle. This required a wait in the systemd unit file to avoid race. I found a Yoga 900 where I could reproduce this. The problem scenerio is: - During sensor driver init, enable run time PM and also set a auto-suspend for 3 seconds. This result in one runtime resume. But there is a check to avoid a powerup in this sequence, but rpm is active - User space iio-sensor-proxy tries to power up the sensor. Since rpm is active it will simply return. But sensors were not actually powered up in the prior sequence, so actaully the sensors will not work - After 3 seconds the auto suspend kicks If we add a wait in systemd service file to fire iio-sensor-proxy after 3 seconds, then now everything will work as the runtime resume will actually powerup the sensor as this is a user request. To avoid this: - Remove the check to match user requested state, this will cause a brief powerup, but if the iio-sensor-proxy starts immediately it will still work as the sensors are ON. - Also move the autosuspend delay to place when user requested turn off of sensors, like after user finished raw read or buffer disable Signed-off-by: Srinivas Pandruvada Tested-by: Bastien Nocera Cc: Signed-off-by: Jonathan Cameron drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a359bb2a55f384bb93349ddf9d30b20b37e02e8a Author: Fabrice Gasnier Date: Thu Aug 3 11:22:17 2017 +0200 iio: trigger: stm32-timer: fix get trigger mode Fix reading trigger mode, when other bit-fields are set. SMCR register value must be masked to read SMS (slave mode selection) only. Fixes: 9eba381 ("iio: make stm32 trigger driver use INDIO_HARDWARE_TRIGGERED mode") Signed-off-by: Fabrice Gasnier Cc: Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-timer-trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdd0d32eb95f135041236a6885d9006315aa9a1d Author: Dragos Bogdan Date: Fri Aug 4 01:37:27 2017 +0300 iio: imu: adis16480: Fix acceleration scale factor for adis16480 According to the datasheet, the range of the acceleration is [-10 g, + 10 g], so the scale factor should be 10 instead of 5. Signed-off-by: Dragos Bogdan Acked-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/adis16480.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f00fd7ae4f409abb7b2e5d099248832548199f0c Author: Jonathan Corbet Date: Sun Jul 30 16:14:42 2017 -0600 PATCH] iio: Fix some documentation warnings The kerneldoc description for the trig_readonly field of struct iio_dev lacked a colon, leading to this doc build warning: ./include/linux/iio/iio.h:603: warning: No description found for parameter 'trig_readonly' A similar issue for iio_trigger_set_immutable() in trigger.h yielded: ./include/linux/iio/trigger.h:151: warning: No description found for parameter 'indio_dev' ./include/linux/iio/trigger.h:151: warning: No description found for parameter 'trig' Fix the formatting and silence the warnings. Signed-off-by: Jonathan Corbet Signed-off-by: Jonathan Cameron include/linux/iio/iio.h | 2 +- include/linux/iio/trigger.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8fbbe2d7cc478d1544f41f2271787c993c23a4f6 Author: Alexey Dobriyan Date: Sat Aug 19 12:57:51 2017 +0300 genirq/ipi: Fixup checks against nr_cpu_ids Valid CPU ids are [0, nr_cpu_ids-1] inclusive. Fixes: 3b8e29a82dd1 ("genirq: Implement ipi_send_mask/single()") Fixes: f9bce791ae2a ("genirq: Add a new function to get IPI reverse mapping") Signed-off-by: Alexey Dobriyan Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170819095751.GB27864@avx2 kernel/irq/ipi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbd7396b4f24e0c3284fcc05f5def24f52c09884 Author: Takashi Sakamoto Date: Sun Aug 20 15:55:02 2017 +0900 ALSA: firewire-motu: destroy stream data surely at failure of card initialization When failing sound card registration after initializing stream data, this module leaves allocated data in stream data. This commit fixes the bug. Fixes: 9b2bb4f2f4a2 ('ALSA: firewire-motu: add stream management functionality') Cc: # v4.12+ Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu.c | 1 + 1 file changed, 1 insertion(+) commit 0c264af7be2013266c5b4c644f3f366399ee490a Author: Takashi Sakamoto Date: Sun Aug 20 15:54:26 2017 +0900 ALSA: firewire: fix NULL pointer dereference when releasing uninitialized data of iso-resource When calling 'iso_resource_free()' for uninitialized data, this function causes NULL pointer dereference due to its 'unit' member. This occurs when unplugging audio and music units on IEEE 1394 bus at failure of card registration. This commit fixes the bug. The bug exists since kernel v4.5. Fixes: 324540c4e05c ('ALSA: fireface: postpone sound card registration') at v4.12 Fixes: 8865a31e0fd8 ('ALSA: firewire-motu: postpone sound card registration') at v4.12 Fixes: b610386c8afb ('ALSA: firewire-tascam: deleyed registration of sound card') at v4.7 Fixes: 86c8dd7f4da3 ('ALSA: firewire-digi00x: delayed registration of sound card') at v4.7 Fixes: 6c29230e2a5f ('ALSA: oxfw: delayed registration of sound card') at v4.7 Fixes: 7d3c1d5901aa ('ALSA: fireworks: delayed registration of sound card') at v4.7 Fixes: 04a2c73c97eb ('ALSA: bebob: delayed registration of sound card') at v4.7 Fixes: b59fb1900b4f ('ALSA: dice: postpone card registration') at v4.5 Cc: # v4.5+ Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/iso-resources.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ec667683c532c93fb41e100e5d61a518971060e2 Author: Aaron Ma Date: Fri Aug 18 12:17:21 2017 -0700 Input: trackpoint - add new trackpoint firmware ID Synaptics add new TP firmware ID: 0x2 and 0x3, for now both lower 2 bits are indicated as TP. Change the constant to bitwise values. This makes trackpoint to be recognized on Lenovo Carbon X1 Gen5 instead of it being identified as "PS/2 Generic Mouse". Signed-off-by: Aaron Ma Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/trackpoint.c | 3 ++- drivers/input/mouse/trackpoint.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 1d2226e45040ed4aee95b633cbd64702bf7fc2a1 Author: KT Liao Date: Fri Aug 18 16:58:15 2017 -0700 Input: elan_i2c - add ELAN0602 ACPI ID to support Lenovo Yoga310 Add ELAN0602 to the list of known ACPI IDs to enable support for ELAN touchpads found in Lenovo Yoga310. Signed-off-by: KT Liao Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 1 + 1 file changed, 1 insertion(+) commit 4f8a881acc9d1adaf1e552349a0b1df28933a04c Author: Xin Long Date: Fri Aug 18 11:01:36 2017 +0800 net: sched: fix NULL pointer dereference when action calls some targets As we know in some target's checkentry it may dereference par.entryinfo to check entry stuff inside. But when sched action calls xt_check_target, par.entryinfo is set with NULL. It would cause kernel panic when calling some targets. It can be reproduce with: # tc qd add dev eth1 ingress handle ffff: # tc filter add dev eth1 parent ffff: u32 match u32 0 0 action xt \ -j ECN --ecn-tcp-remove It could also crash kernel when using target CLUSTERIP or TPROXY. By now there's no proper value for par.entryinfo in ipt_init_target, but it can not be set with NULL. This patch is to void all these panics by setting it with an ipt_entry obj with all members = 0. Note that this issue has been there since the very beginning. Signed-off-by: Xin Long Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/sched/act_ipt.c | 2 ++ 1 file changed, 2 insertions(+) commit 9a19bad70cf16b0cdf3576efda7deb490e7aa529 Author: David Howells Date: Fri Aug 18 00:19:42 2017 +0100 rxrpc: Fix oops when discarding a preallocated service call rxrpc_service_prealloc_one() doesn't set the socket pointer on any new call it preallocates, but does add it to the rxrpc net namespace call list. This, however, causes rxrpc_put_call() to oops when the call is discarded when the socket is closed. rxrpc_put_call() needs the socket to be able to reach the namespace so that it can use a lock held therein. Fix this by setting a call's socket pointer immediately before discarding it. This can be triggered by unloading the kafs module, resulting in an oops like the following: BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 IP: rxrpc_put_call+0x1e2/0x32d PGD 0 P4D 0 Oops: 0000 [#1] SMP Modules linked in: kafs(E-) CPU: 3 PID: 3037 Comm: rmmod Tainted: G E 4.12.0-fscache+ #213 Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014 task: ffff8803fc92e2c0 task.stack: ffff8803fef74000 RIP: 0010:rxrpc_put_call+0x1e2/0x32d RSP: 0018:ffff8803fef77e08 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8803fab99ac0 RCX: 000000000000000f RDX: ffffffff81c50a40 RSI: 000000000000000c RDI: ffff8803fc92ea88 RBP: ffff8803fef77e30 R08: ffff8803fc87b941 R09: ffffffff82946d20 R10: ffff8803fef77d10 R11: 00000000000076fc R12: 0000000000000005 R13: ffff8803fab99c20 R14: 0000000000000001 R15: ffffffff816c6aee FS: 00007f915a059700(0000) GS:ffff88041fb80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000030 CR3: 00000003fef39000 CR4: 00000000001406e0 Call Trace: rxrpc_discard_prealloc+0x325/0x341 rxrpc_listen+0xf9/0x146 kernel_listen+0xb/0xd afs_close_socket+0x3e/0x173 [kafs] afs_exit+0x1f/0x57 [kafs] SyS_delete_module+0x10f/0x19a do_syscall_64+0x8a/0x149 entry_SYSCALL64_slow_path+0x25/0x25 Fixes: 2baec2c3f854 ("rxrpc: Support network namespacing") Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/call_accept.c | 1 + 1 file changed, 1 insertion(+) commit b024d949a3c24255a7ef1a470420eb478949aa4c Author: Colin Ian King Date: Thu Aug 17 23:14:58 2017 +0100 irda: do not leak initialized list.dev to userspace list.dev has not been initialized and so the copy_to_user is copying data from the stack back to user space which is a potential information leak. Fix this ensuring all of list is initialized to zero. Detected by CoverityScan, CID#1357894 ("Uninitialized scalar variable") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/irda/af_irda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca3d89a3ebe79367bd41b6b8ba37664478ae2dba Author: Huy Nguyen Date: Thu Aug 17 18:29:52 2017 +0300 net/mlx4_core: Enable 4K UAR if SRIOV module parameter is not enabled enable_4k_uar module parameter was added in patch cited below to address the backward compatibility issue in SRIOV when the VM has system's PAGE_SIZE uar implementation and the Hypervisor has 4k uar implementation. The above compatibility issue does not exist in the non SRIOV case. In this patch, we always enable 4k uar implementation if SRIOV is not enabled on mlx4's supported cards. Fixes: 76e39ccf9c36 ("net/mlx4_core: Fix backward compatibility on VFs") Signed-off-by: Huy Nguyen Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b6f6d56c91f5261c55edef2df300698c4486b669 Author: Thierry Reding Date: Thu Aug 17 13:06:14 2017 +0200 PCI: Allow PCI express root ports to find themselves If the pci_find_pcie_root_port() function is called on a root port itself, return the root port rather than NULL. This effectively reverts commit 0e405232871d6 ("PCI: fix oops when try to find Root Port for a PCI device") which added an extra check that would now be redundant. Fixes: a99b646afa8a ("PCI: Disable PCIe Relaxed Ordering if unsupported") Fixes: c56d4450eb68 ("PCI: Turn off Request Attributes to avoid Chelsio T5 Completion erratum") Signed-off-by: Thierry Reding Acked-by: Bjorn Helgaas Tested-by: Shawn Lin Tested-by: Michael Ellerman Signed-off-by: David S. Miller drivers/pci/pci.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit cdbeb633ca71a02b7b63bfeb94994bf4e1a0b894 Author: Neal Cardwell Date: Wed Aug 16 17:53:36 2017 -0400 tcp: when rearming RTO, if RTO time is in past then fire RTO ASAP In some situations tcp_send_loss_probe() can realize that it's unable to send a loss probe (TLP), and falls back to calling tcp_rearm_rto() to schedule an RTO timer. In such cases, sometimes tcp_rearm_rto() realizes that the RTO was eligible to fire immediately or at some point in the past (delta_us <= 0). Previously in such cases tcp_rearm_rto() was scheduling such "overdue" RTOs to happen at now + icsk_rto, which caused needless delays of hundreds of milliseconds (and non-linear behavior that made reproducible testing difficult). This commit changes the logic to schedule "overdue" RTOs ASAP, rather than at now + icsk_rto. Fixes: 6ba8a3b19e76 ("tcp: Tail loss probe (TLP)") Suggested-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 58d4e450a490d5f02183f6834c12550ba26d3b47 Merge: cc28fcd c715b72 Author: Linus Torvalds Date: Fri Aug 18 16:06:33 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "14 fixes" * emailed patches from Andrew Morton : mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes mm/vmalloc.c: don't unconditonally use __GFP_HIGHMEM mm/mempolicy: fix use after free when calling get_mempolicy mm/cma_debug.c: fix stack corruption due to sprintf usage signal: don't remove SIGNAL_UNKILLABLE for traced tasks. mm, oom: fix potential data corruption when oom_reaper races with writer mm: fix double mmap_sem unlock on MMF_UNSTABLE enforced SIGBUS slub: fix per memcg cache leak on css offline mm: discard memblock data later test_kmod: fix description for -s -and -c parameters kmod: fix wait on recursive loop wait: add wait_event_killable_timeout() kernel/watchdog: fix Kconfig constraints for perf hardlockup watchdog mm: memcontrol: fix NULL pointer crash in test_clear_page_writeback() commit bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205 Author: Roopa Prabhu Date: Wed Aug 16 12:38:52 2017 -0700 net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set Syzkaller hit 'general protection fault in fib_dump_info' bug on commit 4.13-rc5.. Guilty file: net/ipv4/fib_semantics.c kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 0 PID: 2808 Comm: syz-executor0 Not tainted 4.13.0-rc5 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 task: ffff880078562700 task.stack: ffff880078110000 RIP: 0010:fib_dump_info+0x388/0x1170 net/ipv4/fib_semantics.c:1314 RSP: 0018:ffff880078117010 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 00000000000000fe RCX: 0000000000000002 RDX: 0000000000000006 RSI: ffff880078117084 RDI: 0000000000000030 RBP: ffff880078117268 R08: 000000000000000c R09: ffff8800780d80c8 R10: 0000000058d629b4 R11: 0000000067fce681 R12: 0000000000000000 R13: ffff8800784bd540 R14: ffff8800780d80b5 R15: ffff8800780d80a4 FS: 00000000022fa940(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004387d0 CR3: 0000000079135000 CR4: 00000000000006f0 Call Trace: inet_rtm_getroute+0xc89/0x1f50 net/ipv4/route.c:2766 rtnetlink_rcv_msg+0x288/0x680 net/core/rtnetlink.c:4217 netlink_rcv_skb+0x340/0x470 net/netlink/af_netlink.c:2397 rtnetlink_rcv+0x28/0x30 net/core/rtnetlink.c:4223 netlink_unicast_kernel net/netlink/af_netlink.c:1265 [inline] netlink_unicast+0x4c4/0x6e0 net/netlink/af_netlink.c:1291 netlink_sendmsg+0x8c4/0xca0 net/netlink/af_netlink.c:1854 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 ___sys_sendmsg+0x779/0x8d0 net/socket.c:2035 __sys_sendmsg+0xd1/0x170 net/socket.c:2069 SYSC_sendmsg net/socket.c:2080 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2076 entry_SYSCALL_64_fastpath+0x1a/0xa5 RIP: 0033:0x4512e9 RSP: 002b:00007ffc75584cc8 EFLAGS: 00000216 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00000000004512e9 RDX: 0000000000000000 RSI: 0000000020f2cfc8 RDI: 0000000000000003 RBP: 000000000000000e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: fffffffffffffffe R13: 0000000000718000 R14: 0000000020c44ff0 R15: 0000000000000000 Code: 00 0f b6 8d ec fd ff ff 48 8b 85 f0 fd ff ff 88 48 17 48 8b 45 28 48 8d 78 30 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 cb 0c 00 00 48 8b 45 28 44 RIP: fib_dump_info+0x388/0x1170 net/ipv4/fib_semantics.c:1314 RSP: ffff880078117010 ---[ end trace 254a7af28348f88b ]--- This patch adds a res->fi NULL check. example run: $ip route get 0.0.0.0 iif virt1-0 broadcast 0.0.0.0 dev lo cache iif virt1-0 $ip route get 0.0.0.0 iif virt1-0 fibmatch RTNETLINK answers: No route to host Reported-by: idaifish Reported-by: Dmitry Vyukov Fixes: b61798130f1b ("net: ipv4: RTM_GETROUTE: return matched fib result when requested") Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/ipv4/route.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 383143f31d7d3525a1dbff733d52fff917f82f15 Author: Wei Wang Date: Wed Aug 16 11:18:09 2017 -0700 ipv6: reset fn->rr_ptr when replacing route syzcaller reported the following use-after-free issue in rt6_select(): BUG: KASAN: use-after-free in rt6_select net/ipv6/route.c:755 [inline] at addr ffff8800bc6994e8 BUG: KASAN: use-after-free in ip6_pol_route.isra.46+0x1429/0x1470 net/ipv6/route.c:1084 at addr ffff8800bc6994e8 Read of size 4 by task syz-executor1/439628 CPU: 0 PID: 439628 Comm: syz-executor1 Not tainted 4.3.5+ #8 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 ffff88018fe435b0 ffffffff81ca384d ffff8801d3588c00 ffff8800bc699380 ffff8800bc699500 dffffc0000000000 ffff8801d40a47c0 ffff88018fe435d8 ffffffff81735751 ffff88018fe43660 ffff8800bc699380 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 sctp: [Deprecated]: syz-executor0 (pid 439615) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead [] kasan_object_err+0x21/0x70 mm/kasan/report.c:158 [] print_address_description mm/kasan/report.c:196 [inline] [] kasan_report_error+0x1b4/0x4a0 mm/kasan/report.c:285 [] kasan_report mm/kasan/report.c:305 [inline] [] __asan_report_load4_noabort+0x43/0x50 mm/kasan/report.c:325 [] rt6_select net/ipv6/route.c:755 [inline] [] ip6_pol_route.isra.46+0x1429/0x1470 net/ipv6/route.c:1084 [] ip6_pol_route_output+0x81/0xb0 net/ipv6/route.c:1203 [] fib6_rule_action+0x1f0/0x680 net/ipv6/fib6_rules.c:95 [] fib_rules_lookup+0x2a6/0x7a0 net/core/fib_rules.c:223 [] fib6_rule_lookup+0xd0/0x250 net/ipv6/fib6_rules.c:41 [] ip6_route_output+0x1d6/0x2c0 net/ipv6/route.c:1224 [] ip6_dst_lookup_tail+0x4d2/0x890 net/ipv6/ip6_output.c:943 [] ip6_dst_lookup_flow+0x9a/0x250 net/ipv6/ip6_output.c:1079 [] ip6_datagram_dst_update+0x538/0xd40 net/ipv6/datagram.c:91 [] __ip6_datagram_connect net/ipv6/datagram.c:251 [inline] [] ip6_datagram_connect+0x518/0xe50 net/ipv6/datagram.c:272 [] ip6_datagram_connect_v6_only+0x63/0x90 net/ipv6/datagram.c:284 [] inet_dgram_connect+0x170/0x1f0 net/ipv4/af_inet.c:564 [] SYSC_connect+0x1a7/0x2f0 net/socket.c:1582 [] SyS_connect+0x29/0x30 net/socket.c:1563 [] entry_SYSCALL_64_fastpath+0x12/0x17 Object at ffff8800bc699380, in cache ip6_dst_cache size: 384 The root cause of it is that in fib6_add_rt2node(), when it replaces an existing route with the new one, it does not update fn->rr_ptr. This commit resets fn->rr_ptr to NULL when it points to a route which is replaced in fib6_add_rt2node(). Fixes: 27596472473a ("ipv6: fix ECMP route replacement") Signed-off-by: Wei Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 4 ++++ 1 file changed, 4 insertions(+) commit f299aec6ebd747298e35934cff7709c6b119ca52 Author: Charles Milette Date: Fri Aug 18 16:30:34 2017 -0400 staging: rtl8188eu: add RNX-N150NUB support Add support for USB Device Rosewill RNX-N150NUB. VendorID: 0x0bda, ProductID: 0xffef Signed-off-by: Charles Milette Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 + 1 file changed, 1 insertion(+) commit 15339e441ec46fbc3bf3486bb1ae4845b0f1bb8d Author: Alexander Potapenko Date: Wed Aug 16 20:16:40 2017 +0200 sctp: fully initialize the IPv6 address in sctp_v6_to_addr() KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). Make sure all fields of an IPv6 address are initialized, which guarantees that the IPv4 fields are also initialized. ================================================================== BUG: KMSAN: use of uninitialized memory in sctp_v6_cmp_addr+0x8d4/0x9f0 net/sctp/ipv6.c:517 CPU: 2 PID: 31056 Comm: syz-executor1 Not tainted 4.11.0-rc5+ #2944 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x172/0x1c0 lib/dump_stack.c:42 is_logbuf_locked mm/kmsan/kmsan.c:59 [inline] kmsan_report+0x12a/0x180 mm/kmsan/kmsan.c:938 native_save_fl arch/x86/include/asm/irqflags.h:18 [inline] arch_local_save_flags arch/x86/include/asm/irqflags.h:72 [inline] arch_local_irq_save arch/x86/include/asm/irqflags.h:113 [inline] __msan_warning_32+0x61/0xb0 mm/kmsan/kmsan_instr.c:467 sctp_v6_cmp_addr+0x8d4/0x9f0 net/sctp/ipv6.c:517 sctp_v6_get_dst+0x8c7/0x1630 net/sctp/ipv6.c:290 sctp_transport_route+0x101/0x570 net/sctp/transport.c:292 sctp_assoc_add_peer+0x66d/0x16f0 net/sctp/associola.c:651 sctp_sendmsg+0x35a5/0x4f90 net/sctp/socket.c:1871 inet_sendmsg+0x498/0x670 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg net/socket.c:643 [inline] SYSC_sendto+0x608/0x710 net/socket.c:1696 SyS_sendto+0x8a/0xb0 net/socket.c:1664 entry_SYSCALL_64_fastpath+0x13/0x94 RIP: 0033:0x44b479 RSP: 002b:00007f6213f21c08 EFLAGS: 00000286 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 000000000044b479 RDX: 0000000000000041 RSI: 0000000020edd000 RDI: 0000000000000006 RBP: 00000000007080a8 R08: 0000000020b85fe4 R09: 000000000000001c R10: 0000000000040005 R11: 0000000000000286 R12: 00000000ffffffff R13: 0000000000003760 R14: 00000000006e5820 R15: 0000000000ff8000 origin description: ----dst_saddr@sctp_v6_get_dst local variable created at: sk_fullsock include/net/sock.h:2321 [inline] inet6_sk include/linux/ipv6.h:309 [inline] sctp_v6_get_dst+0x91/0x1630 net/sctp/ipv6.c:241 sctp_transport_route+0x101/0x570 net/sctp/transport.c:292 ================================================================== BUG: KMSAN: use of uninitialized memory in sctp_v6_cmp_addr+0x8d4/0x9f0 net/sctp/ipv6.c:517 CPU: 2 PID: 31056 Comm: syz-executor1 Not tainted 4.11.0-rc5+ #2944 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x172/0x1c0 lib/dump_stack.c:42 is_logbuf_locked mm/kmsan/kmsan.c:59 [inline] kmsan_report+0x12a/0x180 mm/kmsan/kmsan.c:938 native_save_fl arch/x86/include/asm/irqflags.h:18 [inline] arch_local_save_flags arch/x86/include/asm/irqflags.h:72 [inline] arch_local_irq_save arch/x86/include/asm/irqflags.h:113 [inline] __msan_warning_32+0x61/0xb0 mm/kmsan/kmsan_instr.c:467 sctp_v6_cmp_addr+0x8d4/0x9f0 net/sctp/ipv6.c:517 sctp_v6_get_dst+0x8c7/0x1630 net/sctp/ipv6.c:290 sctp_transport_route+0x101/0x570 net/sctp/transport.c:292 sctp_assoc_add_peer+0x66d/0x16f0 net/sctp/associola.c:651 sctp_sendmsg+0x35a5/0x4f90 net/sctp/socket.c:1871 inet_sendmsg+0x498/0x670 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg net/socket.c:643 [inline] SYSC_sendto+0x608/0x710 net/socket.c:1696 SyS_sendto+0x8a/0xb0 net/socket.c:1664 entry_SYSCALL_64_fastpath+0x13/0x94 RIP: 0033:0x44b479 RSP: 002b:00007f6213f21c08 EFLAGS: 00000286 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 000000000044b479 RDX: 0000000000000041 RSI: 0000000020edd000 RDI: 0000000000000006 RBP: 00000000007080a8 R08: 0000000020b85fe4 R09: 000000000000001c R10: 0000000000040005 R11: 0000000000000286 R12: 00000000ffffffff R13: 0000000000003760 R14: 00000000006e5820 R15: 0000000000ff8000 origin description: ----dst_saddr@sctp_v6_get_dst local variable created at: sk_fullsock include/net/sock.h:2321 [inline] inet6_sk include/linux/ipv6.h:309 [inline] sctp_v6_get_dst+0x91/0x1630 net/sctp/ipv6.c:241 sctp_transport_route+0x101/0x570 net/sctp/transport.c:292 ================================================================== Signed-off-by: Alexander Potapenko Reviewed-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/ipv6.c | 2 ++ 1 file changed, 2 insertions(+) commit 5bfd37b4de5c98e86b12bd13be5aa46c7484a125 Author: Eric Dumazet Date: Wed Aug 16 09:41:54 2017 -0700 tipc: fix use-after-free syszkaller reported use-after-free in tipc [1] When msg->rep skb is freed, set the pointer to NULL, so that caller does not free it again. [1] ================================================================== BUG: KASAN: use-after-free in skb_push+0xd4/0xe0 net/core/skbuff.c:1466 Read of size 8 at addr ffff8801c6e71e90 by task syz-executor5/4115 CPU: 1 PID: 4115 Comm: syz-executor5 Not tainted 4.13.0-rc4+ #32 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x24e/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 skb_push+0xd4/0xe0 net/core/skbuff.c:1466 tipc_nl_compat_recv+0x833/0x18f0 net/tipc/netlink_compat.c:1209 genl_family_rcv_msg+0x7b7/0xfb0 net/netlink/genetlink.c:598 genl_rcv_msg+0xb2/0x140 net/netlink/genetlink.c:623 netlink_rcv_skb+0x216/0x440 net/netlink/af_netlink.c:2397 genl_rcv+0x28/0x40 net/netlink/genetlink.c:634 netlink_unicast_kernel net/netlink/af_netlink.c:1265 [inline] netlink_unicast+0x4e8/0x6f0 net/netlink/af_netlink.c:1291 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1854 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 sock_write_iter+0x31a/0x5d0 net/socket.c:898 call_write_iter include/linux/fs.h:1743 [inline] new_sync_write fs/read_write.c:457 [inline] __vfs_write+0x684/0x970 fs/read_write.c:470 vfs_write+0x189/0x510 fs/read_write.c:518 SYSC_write fs/read_write.c:565 [inline] SyS_write+0xef/0x220 fs/read_write.c:557 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4512e9 RSP: 002b:00007f3bc8184c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 00000000004512e9 RDX: 0000000000000020 RSI: 0000000020fdb000 RDI: 0000000000000006 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b5e76 R13: 00007f3bc8184b48 R14: 00000000004b5e86 R15: 0000000000000000 Allocated by task 4115: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc_node+0x13d/0x750 mm/slab.c:3651 __alloc_skb+0xf1/0x740 net/core/skbuff.c:219 alloc_skb include/linux/skbuff.h:903 [inline] tipc_tlv_alloc+0x26/0xb0 net/tipc/netlink_compat.c:148 tipc_nl_compat_dumpit+0xf2/0x3c0 net/tipc/netlink_compat.c:248 tipc_nl_compat_handle net/tipc/netlink_compat.c:1130 [inline] tipc_nl_compat_recv+0x756/0x18f0 net/tipc/netlink_compat.c:1199 genl_family_rcv_msg+0x7b7/0xfb0 net/netlink/genetlink.c:598 genl_rcv_msg+0xb2/0x140 net/netlink/genetlink.c:623 netlink_rcv_skb+0x216/0x440 net/netlink/af_netlink.c:2397 genl_rcv+0x28/0x40 net/netlink/genetlink.c:634 netlink_unicast_kernel net/netlink/af_netlink.c:1265 [inline] netlink_unicast+0x4e8/0x6f0 net/netlink/af_netlink.c:1291 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1854 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 sock_write_iter+0x31a/0x5d0 net/socket.c:898 call_write_iter include/linux/fs.h:1743 [inline] new_sync_write fs/read_write.c:457 [inline] __vfs_write+0x684/0x970 fs/read_write.c:470 vfs_write+0x189/0x510 fs/read_write.c:518 SYSC_write fs/read_write.c:565 [inline] SyS_write+0xef/0x220 fs/read_write.c:557 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 4115: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x77/0x280 mm/slab.c:3763 kfree_skbmem+0x1a1/0x1d0 net/core/skbuff.c:622 __kfree_skb net/core/skbuff.c:682 [inline] kfree_skb+0x165/0x4c0 net/core/skbuff.c:699 tipc_nl_compat_dumpit+0x36a/0x3c0 net/tipc/netlink_compat.c:260 tipc_nl_compat_handle net/tipc/netlink_compat.c:1130 [inline] tipc_nl_compat_recv+0x756/0x18f0 net/tipc/netlink_compat.c:1199 genl_family_rcv_msg+0x7b7/0xfb0 net/netlink/genetlink.c:598 genl_rcv_msg+0xb2/0x140 net/netlink/genetlink.c:623 netlink_rcv_skb+0x216/0x440 net/netlink/af_netlink.c:2397 genl_rcv+0x28/0x40 net/netlink/genetlink.c:634 netlink_unicast_kernel net/netlink/af_netlink.c:1265 [inline] netlink_unicast+0x4e8/0x6f0 net/netlink/af_netlink.c:1291 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1854 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 sock_write_iter+0x31a/0x5d0 net/socket.c:898 call_write_iter include/linux/fs.h:1743 [inline] new_sync_write fs/read_write.c:457 [inline] __vfs_write+0x684/0x970 fs/read_write.c:470 vfs_write+0x189/0x510 fs/read_write.c:518 SYSC_write fs/read_write.c:565 [inline] SyS_write+0xef/0x220 fs/read_write.c:557 entry_SYSCALL_64_fastpath+0x1f/0xbe The buggy address belongs to the object at ffff8801c6e71dc0 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 208 bytes inside of 224-byte region [ffff8801c6e71dc0, ffff8801c6e71ea0) The buggy address belongs to the page: page:ffffea00071b9c40 count:1 mapcount:0 mapping:ffff8801c6e71000 index:0x0 flags: 0x200000000000100(slab) raw: 0200000000000100 ffff8801c6e71000 0000000000000000 000000010000000c raw: ffffea0007224a20 ffff8801d98caf48 ffff8801d9e79040 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c6e71d80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8801c6e71e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c6e71e80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c6e71f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c6e71f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Jon Maloy Cc: Ying Xue Signed-off-by: David S. Miller net/tipc/netlink_compat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ff244c6b29b176f3f448bc75e55df297225e1b3a Author: Eric Dumazet Date: Fri Aug 18 13:39:56 2017 -0700 tun: handle register_netdevice() failures properly syzkaller reported a double free [1], caused by the fact that tun driver was not updated properly when priv_destructor was added. When/if register_netdevice() fails, priv_destructor() must have been called already. [1] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 security/selinux/hooks.c:5023 CPU: 0 PID: 2919 Comm: syzkaller227220 Not tainted 4.13.0-rc4+ #23 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x7f/0x260 mm/kasan/report.c:252 kasan_report_double_free+0x55/0x80 mm/kasan/report.c:333 kasan_slab_free+0xa0/0xc0 mm/kasan/kasan.c:514 __cache_free mm/slab.c:3503 [inline] kfree+0xd3/0x260 mm/slab.c:3820 selinux_tun_dev_free_security+0x15/0x20 security/selinux/hooks.c:5023 security_tun_dev_free_security+0x48/0x80 security/security.c:1512 tun_set_iff drivers/net/tun.c:1884 [inline] __tun_chr_ioctl+0x2ce6/0x3d50 drivers/net/tun.c:2064 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:2309 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x443ff9 RSP: 002b:00007ffc34271f68 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443ff9 RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ce0 R13: 0000000000401d70 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 2919: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xaa/0xd0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x101/0x6f0 mm/slab.c:3627 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:666 [inline] selinux_tun_dev_alloc_security+0x49/0x170 security/selinux/hooks.c:5012 security_tun_dev_alloc_security+0x6d/0xa0 security/security.c:1506 tun_set_iff drivers/net/tun.c:1839 [inline] __tun_chr_ioctl+0x1730/0x3d50 drivers/net/tun.c:2064 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:2309 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 2919: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x6e/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kfree+0xd3/0x260 mm/slab.c:3820 selinux_tun_dev_free_security+0x15/0x20 security/selinux/hooks.c:5023 security_tun_dev_free_security+0x48/0x80 security/security.c:1512 tun_free_netdev+0x13b/0x1b0 drivers/net/tun.c:1563 register_netdevice+0x8d0/0xee0 net/core/dev.c:7605 tun_set_iff drivers/net/tun.c:1859 [inline] __tun_chr_ioctl+0x1caf/0x3d50 drivers/net/tun.c:2064 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:2309 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 entry_SYSCALL_64_fastpath+0x1f/0xbe The buggy address belongs to the object at ffff8801d2843b40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8801d2843b40, ffff8801d2843b60) The buggy address belongs to the page: page:ffffea000660cea8 count:1 mapcount:0 mapping:ffff8801d2843000 index:0xffff8801d2843fc1 flags: 0x200000000000100(slab) raw: 0200000000000100 ffff8801d2843000 ffff8801d2843fc1 000000010000003f raw: ffffea0006626a40 ffffea00066141a0 ffff8801dbc00100 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d2843a00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8801d2843a80: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc >ffff8801d2843b00: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8801d2843b80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8801d2843c00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/tun.c | 3 +++ 1 file changed, 3 insertions(+) commit c715b72c1ba406f133217b509044c38d8e714a37 Author: Kees Cook Date: Fri Aug 18 15:16:31 2017 -0700 mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes Moving the x86_64 and arm64 PIE base from 0x555555554000 to 0x000100000000 broke AddressSanitizer. This is a partial revert of: eab09532d400 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE") 02445990a96e ("arm64: move ELF_ET_DYN_BASE to 4GB / 4MB") The AddressSanitizer tool has hard-coded expectations about where executable mappings are loaded. The motivation for changing the PIE base in the above commits was to avoid the Stack-Clash CVEs that allowed executable mappings to get too close to heap and stack. This was mainly a problem on 32-bit, but the 64-bit bases were moved too, in an effort to proactively protect those systems (proofs of concept do exist that show 64-bit collisions, but other recent changes to fix stack accounting and setuid behaviors will minimize the impact). The new 32-bit PIE base is fine for ASan (since it matches the ET_EXEC base), so only the 64-bit PIE base needs to be reverted to let x86 and arm64 ASan binaries run again. Future changes to the 64-bit PIE base on these architectures can be made optional once a more dynamic method for dealing with AddressSanitizer is found. (e.g. always loading PIE into the mmap region for marked binaries.) Link: http://lkml.kernel.org/r/20170807201542.GA21271@beast Fixes: eab09532d400 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE") Fixes: 02445990a96e ("arm64: move ELF_ET_DYN_BASE to 4GB / 4MB") Signed-off-by: Kees Cook Reported-by: Kostya Serebryany Acked-by: Will Deacon Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/include/asm/elf.h | 4 ++-- arch/x86/include/asm/elf.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 704b862f9efd6d4c87a8d0a344dda19bda9c6b69 Author: Laura Abbott Date: Fri Aug 18 15:16:27 2017 -0700 mm/vmalloc.c: don't unconditonally use __GFP_HIGHMEM Commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly") added use of __GFP_HIGHMEM for allocations. vmalloc_32 may use GFP_DMA/GFP_DMA32 which does not play nice with __GFP_HIGHMEM and will trigger a BUG in gfp_zone. Only add __GFP_HIGHMEM if we aren't using GFP_DMA/GFP_DMA32. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1482249 Link: http://lkml.kernel.org/r/20170816220705.31374-1-labbott@redhat.com Fixes: 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly") Signed-off-by: Laura Abbott Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 73223e4e2e3867ebf033a5a8eb2e5df0158ccc99 Author: zhong jiang Date: Fri Aug 18 15:16:24 2017 -0700 mm/mempolicy: fix use after free when calling get_mempolicy I hit a use after free issue when executing trinity and repoduced it with KASAN enabled. The related call trace is as follows. BUG: KASan: use after free in SyS_get_mempolicy+0x3c8/0x960 at addr ffff8801f582d766 Read of size 2 by task syz-executor1/798 INFO: Allocated in mpol_new.part.2+0x74/0x160 age=3 cpu=1 pid=799 __slab_alloc+0x768/0x970 kmem_cache_alloc+0x2e7/0x450 mpol_new.part.2+0x74/0x160 mpol_new+0x66/0x80 SyS_mbind+0x267/0x9f0 system_call_fastpath+0x16/0x1b INFO: Freed in __mpol_put+0x2b/0x40 age=4 cpu=1 pid=799 __slab_free+0x495/0x8e0 kmem_cache_free+0x2f3/0x4c0 __mpol_put+0x2b/0x40 SyS_mbind+0x383/0x9f0 system_call_fastpath+0x16/0x1b INFO: Slab 0xffffea0009cb8dc0 objects=23 used=8 fp=0xffff8801f582de40 flags=0x200000000004080 INFO: Object 0xffff8801f582d760 @offset=5984 fp=0xffff8801f582d600 Bytes b4 ffff8801f582d750: ae 01 ff ff 00 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a ........ZZZZZZZZ Object ffff8801f582d760: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Object ffff8801f582d770: 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkk. Redzone ffff8801f582d778: bb bb bb bb bb bb bb bb ........ Padding ffff8801f582d8b8: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ Memory state around the buggy address: ffff8801f582d600: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801f582d680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801f582d700: fc fc fc fc fc fc fc fc fc fc fc fc fb fb fb fc !shared memory policy is not protected against parallel removal by other thread which is normally protected by the mmap_sem. do_get_mempolicy, however, drops the lock midway while we can still access it later. Early premature up_read is a historical artifact from times when put_user was called in this path see https://lwn.net/Articles/124754/ but that is gone since 8bccd85ffbaf ("[PATCH] Implement sys_* do_* layering in the memory policy layer."). but when we have the the current mempolicy ref count model. The issue was introduced accordingly. Fix the issue by removing the premature release. Link: http://lkml.kernel.org/r/1502950924-27521-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Acked-by: Michal Hocko Cc: Minchan Kim Cc: Vlastimil Babka Cc: David Rientjes Cc: Mel Gorman Cc: [2.6+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 5 ----- 1 file changed, 5 deletions(-) commit da094e42848e3c36feaa3b5271e53983fd45424f Author: Prakash Gupta Date: Fri Aug 18 15:16:21 2017 -0700 mm/cma_debug.c: fix stack corruption due to sprintf usage name[] in cma_debugfs_add_one() can only accommodate 16 chars including NULL to store sprintf output. It's common for cma device name to be larger than 15 chars. This can cause stack corrpution. If the gcc stack protector is turned on, this can cause a panic due to stack corruption. Below is one example trace: Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffff8e69a75730 Call trace: dump_backtrace+0x0/0x2c4 show_stack+0x20/0x28 dump_stack+0xb8/0xf4 panic+0x154/0x2b0 print_tainted+0x0/0xc0 cma_debugfs_init+0x274/0x290 do_one_initcall+0x5c/0x168 kernel_init_freeable+0x1c8/0x280 Fix the short sprintf buffer in cma_debugfs_add_one() by using scnprintf() instead of sprintf(). Link: http://lkml.kernel.org/r/1502446217-21840-1-git-send-email-guptap@codeaurora.org Fixes: f318dd083c81 ("cma: Store a name in the cma structure") Signed-off-by: Prakash Gupta Acked-by: Laura Abbott Cc: Greg Kroah-Hartman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/cma_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb61b5911bdc923875cde99eb25203a0e2b06d43 Author: Jamie Iles Date: Fri Aug 18 15:16:18 2017 -0700 signal: don't remove SIGNAL_UNKILLABLE for traced tasks. When forcing a signal, SIGNAL_UNKILLABLE is removed to prevent recursive faults, but this is undesirable when tracing. For example, debugging an init process (whether global or namespace), hitting a breakpoint and SIGTRAP will force SIGTRAP and then remove SIGNAL_UNKILLABLE. Everything continues fine, but then once debugging has finished, the init process is left killable which is unlikely what the user expects, resulting in either an accidentally killed init or an init that stops reaping zombies. Link: http://lkml.kernel.org/r/20170815112806.10728-1-jamie.iles@oracle.com Signed-off-by: Jamie Iles Acked-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/signal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6b31d5955cb29a51c5baffee382f213d75e98fb8 Author: Michal Hocko Date: Fri Aug 18 15:16:15 2017 -0700 mm, oom: fix potential data corruption when oom_reaper races with writer Wenwei Tao has noticed that our current assumption that the oom victim is dying and never doing any visible changes after it dies, and so the oom_reaper can tear it down, is not entirely true. __task_will_free_mem consider a task dying when SIGNAL_GROUP_EXIT is set but do_group_exit sends SIGKILL to all threads _after_ the flag is set. So there is a race window when some threads won't have fatal_signal_pending while the oom_reaper could start unmapping the address space. Moreover some paths might not check for fatal signals before each PF/g-u-p/copy_from_user. We already have a protection for oom_reaper vs. PF races by checking MMF_UNSTABLE. This has been, however, checked only for kernel threads (use_mm users) which can outlive the oom victim. A simple fix would be to extend the current check in handle_mm_fault for all tasks but that wouldn't be sufficient because the current check assumes that a kernel thread would bail out after EFAULT from get_user*/copy_from_user and never re-read the same address which would succeed because the PF path has established page tables already. This seems to be the case for the only existing use_mm user currently (virtio driver) but it is rather fragile in general. This is even more fragile in general for more complex paths such as generic_perform_write which can re-read the same address more times (e.g. iov_iter_copy_from_user_atomic to fail and then iov_iter_fault_in_readable on retry). Therefore we have to implement MMF_UNSTABLE protection in a robust way and never make a potentially corrupted content visible. That requires to hook deeper into the PF path and check for the flag _every time_ before a pte for anonymous memory is established (that means all !VM_SHARED mappings). The corruption can be triggered artificially (http://lkml.kernel.org/r/201708040646.v746kkhC024636@www262.sakura.ne.jp) but there doesn't seem to be any real life bug report. The race window should be quite tight to trigger most of the time. Link: http://lkml.kernel.org/r/20170807113839.16695-3-mhocko@kernel.org Fixes: aac453635549 ("mm, oom: introduce oom reaper") Signed-off-by: Michal Hocko Reported-by: Wenwei Tao Tested-by: Tetsuo Handa Cc: "Kirill A. Shutemov" Cc: Andrea Argangeli Cc: David Rientjes Cc: Oleg Nesterov Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/oom.h | 22 ++++++++++++++++++++++ mm/huge_memory.c | 30 ++++++++++++++++++++++-------- mm/memory.c | 46 ++++++++++++++++++++-------------------------- 3 files changed, 64 insertions(+), 34 deletions(-) commit 5b53a6ea886700a128b697a6fe8375340dea2c30 Author: Michal Hocko Date: Fri Aug 18 15:16:12 2017 -0700 mm: fix double mmap_sem unlock on MMF_UNSTABLE enforced SIGBUS Tetsuo Handa has noticed that MMF_UNSTABLE SIGBUS path in handle_mm_fault causes a lockdep splat Out of memory: Kill process 1056 (a.out) score 603 or sacrifice child Killed process 1056 (a.out) total-vm:4268108kB, anon-rss:2246048kB, file-rss:0kB, shmem-rss:0kB a.out (1169) used greatest stack depth: 11664 bytes left DEBUG_LOCKS_WARN_ON(depth <= 0) ------------[ cut here ]------------ WARNING: CPU: 6 PID: 1339 at kernel/locking/lockdep.c:3617 lock_release+0x172/0x1e0 CPU: 6 PID: 1339 Comm: a.out Not tainted 4.13.0-rc3-next-20170803+ #142 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015 RIP: 0010:lock_release+0x172/0x1e0 Call Trace: up_read+0x1a/0x40 __do_page_fault+0x28e/0x4c0 do_page_fault+0x30/0x80 page_fault+0x28/0x30 The reason is that the page fault path might have dropped the mmap_sem and returned with VM_FAULT_RETRY. MMF_UNSTABLE check however rewrites the error path to VM_FAULT_SIGBUS and we always expect mmap_sem taken in that path. Fix this by taking mmap_sem when VM_FAULT_RETRY is held in the MMF_UNSTABLE path. We cannot simply add VM_FAULT_SIGBUS to the existing error code because all arch specific page fault handlers and g-u-p would have to learn a new error code combination. Link: http://lkml.kernel.org/r/20170807113839.16695-2-mhocko@kernel.org Fixes: 3f70dc38cec2 ("mm: make sure that kthreads will not refault oom reaped memory") Reported-by: Tetsuo Handa Signed-off-by: Michal Hocko Acked-by: David Rientjes Cc: Andrea Argangeli Cc: "Kirill A. Shutemov" Cc: Oleg Nesterov Cc: Wenwei Tao Cc: [4.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f6ba488073fe8159851fe398cc3c5ee383bb4c7a Author: Vladimir Davydov Date: Fri Aug 18 15:16:08 2017 -0700 slub: fix per memcg cache leak on css offline To avoid a possible deadlock, sysfs_slab_remove() schedules an asynchronous work to delete sysfs entries corresponding to the kmem cache. To ensure the cache isn't freed before the work function is called, it takes a reference to the cache kobject. The reference is supposed to be released by the work function. However, the work function (sysfs_slab_remove_workfn()) does nothing in case the cache sysfs entry has already been deleted, leaking the kobject and the corresponding cache. This may happen on a per memcg cache destruction, because sysfs entries of a per memcg cache are deleted on memcg offline if the cache is empty (see __kmemcg_cache_deactivate()). The kmemleak report looks like this: unreferenced object 0xffff9f798a79f540 (size 32): comm "kworker/1:4", pid 15416, jiffies 4307432429 (age 28687.554s) hex dump (first 32 bytes): 6b 6d 61 6c 6c 6f 63 2d 31 36 28 31 35 39 39 3a kmalloc-16(1599: 6e 65 77 72 6f 6f 74 29 00 23 6b c0 ff ff ff ff newroot).#k..... backtrace: kmemleak_alloc+0x4a/0xa0 __kmalloc_track_caller+0x148/0x2c0 kvasprintf+0x66/0xd0 kasprintf+0x49/0x70 memcg_create_kmem_cache+0xe6/0x160 memcg_kmem_cache_create_func+0x20/0x110 process_one_work+0x205/0x5d0 worker_thread+0x4e/0x3a0 kthread+0x109/0x140 ret_from_fork+0x2a/0x40 unreferenced object 0xffff9f79b6136840 (size 416): comm "kworker/1:4", pid 15416, jiffies 4307432429 (age 28687.573s) hex dump (first 32 bytes): 40 fb 80 c2 3e 33 00 00 00 00 00 40 00 00 00 00 @...>3.....@.... 00 00 00 00 00 00 00 00 10 00 00 00 10 00 00 00 ................ backtrace: kmemleak_alloc+0x4a/0xa0 kmem_cache_alloc+0x128/0x280 create_cache+0x3b/0x1e0 memcg_create_kmem_cache+0x118/0x160 memcg_kmem_cache_create_func+0x20/0x110 process_one_work+0x205/0x5d0 worker_thread+0x4e/0x3a0 kthread+0x109/0x140 ret_from_fork+0x2a/0x40 Fix the leak by adding the missing call to kobject_put() to sysfs_slab_remove_workfn(). Link: http://lkml.kernel.org/r/20170812181134.25027-1-vdavydov.dev@gmail.com Fixes: 3b7b314053d02 ("slub: make sysfs file removal asynchronous") Signed-off-by: Vladimir Davydov Reported-by: Andrei Vagin Tested-by: Andrei Vagin Acked-by: Tejun Heo Acked-by: David Rientjes Cc: Michal Hocko Cc: Johannes Weiner Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: [4.12.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3010f876500f9ba921afaeccec30c45ca6584dc8 Author: Pavel Tatashin Date: Fri Aug 18 15:16:05 2017 -0700 mm: discard memblock data later There is existing use after free bug when deferred struct pages are enabled: The memblock_add() allocates memory for the memory array if more than 128 entries are needed. See comment in e820__memblock_setup(): * The bootstrap memblock region count maximum is 128 entries * (INIT_MEMBLOCK_REGIONS), but EFI might pass us more E820 entries * than that - so allow memblock resizing. This memblock memory is freed here: free_low_memory_core_early() We access the freed memblock.memory later in boot when deferred pages are initialized in this path: deferred_init_memmap() for_each_mem_pfn_range() __next_mem_pfn_range() type = &memblock.memory; One possible explanation for why this use-after-free hasn't been hit before is that the limit of INIT_MEMBLOCK_REGIONS has never been exceeded at least on systems where deferred struct pages were enabled. Tested by reducing INIT_MEMBLOCK_REGIONS down to 4 from the current 128, and verifying in qemu that this code is getting excuted and that the freed pages are sane. Link: http://lkml.kernel.org/r/1502485554-318703-2-git-send-email-pasha.tatashin@oracle.com Fixes: 7e18adb4f80b ("mm: meminit: initialise remaining struct pages in parallel with kswapd") Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco Acked-by: Michal Hocko Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 6 ++++-- mm/memblock.c | 38 +++++++++++++++++--------------------- mm/nobootmem.c | 16 ---------------- mm/page_alloc.c | 4 ++++ 4 files changed, 25 insertions(+), 39 deletions(-) commit 768dc4e48420955518974d8486c1b00ec05e7274 Author: Luis R. Rodriguez Date: Fri Aug 18 15:16:02 2017 -0700 test_kmod: fix description for -s -and -c parameters The descriptions were reversed, correct this. Link: http://lkml.kernel.org/r/20170809234635.13443-4-mcgrof@kernel.org Fixes: 64b671204afd71 ("test_sysctl: add generic script to expand on tests") Signed-off-by: Luis R. Rodriguez Reported-by: Daniel Mentz Cc: "Eric W. Biederman" Cc: Colin Ian King Cc: Dan Carpenter Cc: David Binderman Cc: Dmitry Torokhov Cc: Ingo Molnar Cc: Jessica Yu Cc: Josh Poimboeuf Cc: Kees Cook Cc: Matt Redfearn Cc: Matt Redfearn Cc: Michal Marek Cc: Miroslav Benes Cc: Peter Zijlstra (Intel) Cc: Petr Mladek Cc: Rusty Russell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/kmod/kmod.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ba293c9e7db150943f06b12d3eb7213e7fae624 Author: Luis R. Rodriguez Date: Fri Aug 18 15:15:58 2017 -0700 kmod: fix wait on recursive loop Recursive loops with module loading were previously handled in kmod by restricting the number of modprobe calls to 50 and if that limit was breached request_module() would return an error and a user would see the following on their kernel dmesg: request_module: runaway loop modprobe binfmt-464c Starting init:/sbin/init exists but couldn't execute it (error -8) This issue could happen for instance when a 64-bit kernel boots a 32-bit userspace on some architectures and has no 32-bit binary format hanlders. This is visible, for instance, when a CONFIG_MODULES enabled 64-bit MIPS kernel boots a into o32 root filesystem and the binfmt handler for o32 binaries is not built-in. After commit 6d7964a722af ("kmod: throttle kmod thread limit") we now don't have any visible signs of an error and the kernel just waits for the loop to end somehow. Although this *particular* recursive loop could also be addressed by doing a sanity check on search_binary_handler() and disallowing a modular binfmt to be required for modprobe, a generic solution for any recursive kernel kmod issues is still needed. This should catch these loops. We can investigate each loop and address each one separately as they come in, this however puts a stop gap for them as before. Link: http://lkml.kernel.org/r/20170809234635.13443-3-mcgrof@kernel.org Fixes: 6d7964a722af ("kmod: throttle kmod thread limit") Signed-off-by: Luis R. Rodriguez Reported-by: Matt Redfearn Tested-by: Matt Redfearn Cc: "Eric W. Biederman" Cc: Colin Ian King Cc: Dan Carpenter Cc: Daniel Mentz Cc: David Binderman Cc: Dmitry Torokhov Cc: Ingo Molnar Cc: Jessica Yu Cc: Josh Poimboeuf Cc: Kees Cook Cc: Michal Marek Cc: Miroslav Benes Cc: Peter Zijlstra (Intel) Cc: Petr Mladek Cc: Rusty Russell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kmod.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 8ada92799ec4de00f4bc0f10b1ededa256c1ab22 Author: Luis R. Rodriguez Date: Fri Aug 18 15:15:55 2017 -0700 wait: add wait_event_killable_timeout() These are the few pending fixes I have queued up for v4.13-final. One is a a generic regression fix for recursive loops on kmod and the other one is a trivial print out correction. During the v4.13 development we assumed that recursive kmod loops were no longer possible. Clearly that is not true. The regression fix makes use of a new killable wait. We use a killable wait to be paranoid in how signals might be sent to modprobe and only accept a proper SIGKILL. The signal will only be available to userspace to issue *iff* a thread has already entered a wait state, and that happens only if we've already throttled after 50 kmod threads have been hit. Note that although it may seem excessive to trigger a failure afer 5 seconds if all kmod thread remain busy, prior to the series of changes that went into v4.13 we would actually *always* fatally fail any request which came in if the limit was already reached. The new waiting implemented in v4.13 actually gives us *more* breathing room -- the wait for 5 seconds is a wait for *any* kmod thread to finish. We give up and fail *iff* no kmod thread has finished and they're *all* running straight for 5 consecutive seconds. If 50 kmod threads are running consecutively for 5 seconds something else must be really bad. Recursive loops with kmod are bad but they're also hard to implement properly as a selftest without currently fooling current userspace tools like kmod [1]. For instance kmod will complain when you run depmod if it finds a recursive loop with symbol dependency between modules as such this type of recursive loop cannot go upstream as the modules_install target will fail after running depmod. These tests already exist on userspace kmod upstream though (refer to the testsuite/module-playground/mod-loop-*.c files). The same is not true if request_module() is used though, or worst if aliases are used. Likewise the issue with 64-bit kernels booting 32-bit userspace without a binfmt handler built-in is also currently not detected and proactively avoided by userspace kmod tools, or kconfig for all architectures. Although we could complain in the kernel when some of these individual recursive issues creep up, proactively avoiding these situations in userspace at build time is what we should keep striving for. Lastly, since recursive loops could happen with kmod it may mean recursive loops may also be possible with other kernel usermode helpers, this should be investigated and long term if we can come up with a more sensible generic solution even better! [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/log/?h=20170809-kmod-for-v4.13-final [1] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git This patch (of 3): This wait is similar to wait_event_interruptible_timeout() but only accepts SIGKILL interrupt signal. Other signals are ignored. Link: http://lkml.kernel.org/r/20170809234635.13443-2-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Acked-by: Peter Zijlstra (Intel) Cc: Ingo Molnar Cc: Kees Cook Cc: Dmitry Torokhov Cc: Jessica Yu Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Miroslav Benes Cc: Josh Poimboeuf Cc: "Eric W. Biederman" Cc: Shuah Khan Cc: Matt Redfearn Cc: Dan Carpenter Cc: Colin Ian King Cc: Daniel Mentz Cc: David Binderman Cc: Matt Redfearn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/wait.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 92e5aae457787d0bc6b255200d2fb116edf69794 Author: Nicholas Piggin Date: Fri Aug 18 15:15:51 2017 -0700 kernel/watchdog: fix Kconfig constraints for perf hardlockup watchdog Commit 05a4a9527931 ("kernel/watchdog: split up config options") lost the perf-based hardlockup detector's dependency on PERF_EVENTS, which can result in broken builds with some powerpc configurations. Restore the dependency. Add it in for x86 too, despite x86 always selecting PERF_EVENTS it seems reasonable to make the dependency explicit. Link: http://lkml.kernel.org/r/20170810114452.6673-1-npiggin@gmail.com Fixes: 05a4a9527931 ("kernel/watchdog: split up config options") Signed-off-by: Nicholas Piggin Acked-by: Don Zickus Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/Kconfig | 2 +- arch/x86/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 739f79fc9db1b38f96b5a5109b247a650fbebf6d Author: Johannes Weiner Date: Fri Aug 18 15:15:48 2017 -0700 mm: memcontrol: fix NULL pointer crash in test_clear_page_writeback() Jaegeuk and Brad report a NULL pointer crash when writeback ending tries to update the memcg stats: BUG: unable to handle kernel NULL pointer dereference at 00000000000003b0 IP: test_clear_page_writeback+0x12e/0x2c0 [...] RIP: 0010:test_clear_page_writeback+0x12e/0x2c0 Call Trace: end_page_writeback+0x47/0x70 f2fs_write_end_io+0x76/0x180 [f2fs] bio_endio+0x9f/0x120 blk_update_request+0xa8/0x2f0 scsi_end_request+0x39/0x1d0 scsi_io_completion+0x211/0x690 scsi_finish_command+0xd9/0x120 scsi_softirq_done+0x127/0x150 __blk_mq_complete_request_remote+0x13/0x20 flush_smp_call_function_queue+0x56/0x110 generic_smp_call_function_single_interrupt+0x13/0x30 smp_call_function_single_interrupt+0x27/0x40 call_function_single_interrupt+0x89/0x90 RIP: 0010:native_safe_halt+0x6/0x10 (gdb) l *(test_clear_page_writeback+0x12e) 0xffffffff811bae3e is in test_clear_page_writeback (./include/linux/memcontrol.h:619). 614 mod_node_page_state(page_pgdat(page), idx, val); 615 if (mem_cgroup_disabled() || !page->mem_cgroup) 616 return; 617 mod_memcg_state(page->mem_cgroup, idx, val); 618 pn = page->mem_cgroup->nodeinfo[page_to_nid(page)]; 619 this_cpu_add(pn->lruvec_stat->count[idx], val); 620 } 621 622 unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, 623 gfp_t gfp_mask, The issue is that writeback doesn't hold a page reference and the page might get freed after PG_writeback is cleared (and the mapping is unlocked) in test_clear_page_writeback(). The stat functions looking up the page's node or zone are safe, as those attributes are static across allocation and free cycles. But page->mem_cgroup is not, and it will get cleared if we race with truncation or migration. It appears this race window has been around for a while, but less likely to trigger when the memcg stats were updated first thing after PG_writeback is cleared. Recent changes reshuffled this code to update the global node stats before the memcg ones, though, stretching the race window out to an extent where people can reproduce the problem. Update test_clear_page_writeback() to look up and pin page->mem_cgroup before clearing PG_writeback, then not use that pointer afterward. It is a partial revert of 62cccb8c8e7a ("mm: simplify lock_page_memcg()") but leaves the pageref-holding callsites that aren't affected alone. Link: http://lkml.kernel.org/r/20170809183825.GA26387@cmpxchg.org Fixes: 62cccb8c8e7a ("mm: simplify lock_page_memcg()") Signed-off-by: Johannes Weiner Reported-by: Jaegeuk Kim Tested-by: Jaegeuk Kim Reported-by: Bradley Bolen Tested-by: Brad Bolen Cc: Vladimir Davydov Cc: Michal Hocko Cc: [4.6+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 10 ++++++++-- mm/memcontrol.c | 43 +++++++++++++++++++++++++++++++------------ mm/page-writeback.c | 15 ++++++++++++--- 3 files changed, 51 insertions(+), 17 deletions(-) commit a0917e0bc6efc05834c0c1eafebd579a9c75e6e9 Author: Matthew Dawson Date: Fri Aug 18 15:04:54 2017 -0400 datagram: When peeking datagrams with offset < 0 don't skip empty skbs Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove headers from UDP packets before queueing"), when udp packets are being peeked the requested extra offset is always 0 as there is no need to skip the udp header. However, when the offset is 0 and the next skb is of length 0, it is only returned once. The behaviour can be seen with the following python script: from socket import *; f=socket(AF_INET6, SOCK_DGRAM | SOCK_NONBLOCK, 0); g=socket(AF_INET6, SOCK_DGRAM | SOCK_NONBLOCK, 0); f.bind(('::', 0)); addr=('::1', f.getsockname()[1]); g.sendto(b'', addr) g.sendto(b'b', addr) print(f.recvfrom(10, MSG_PEEK)); print(f.recvfrom(10, MSG_PEEK)); Where the expected output should be the empty string twice. Instead, make sk_peek_offset return negative values, and pass those values to __skb_try_recv_datagram/__skb_try_recv_from_queue. If the passed offset to __skb_try_recv_from_queue is negative, the checked skb is never skipped. __skb_try_recv_from_queue will then ensure the offset is reset back to 0 if a peek is requested without an offset, unless no packets are found. Also simplify the if condition in __skb_try_recv_from_queue. If _off is greater then 0, and off is greater then or equal to skb->len, then (_off || skb->len) must always be true assuming skb->len >= 0 is always true. Also remove a redundant check around a call to sk_peek_offset in af_unix.c, as it double checked if MSG_PEEK was set in the flags. V2: - Moved the negative fixup into __skb_try_recv_from_queue, and remove now redundant checks - Fix peeking in udp{,v6}_recvmsg to report the right value when the offset is 0 V3: - Marked new branch in __skb_try_recv_from_queue as unlikely. Signed-off-by: Matthew Dawson Acked-by: Willem de Bruijn Signed-off-by: David S. Miller include/net/sock.h | 4 +--- net/core/datagram.c | 12 +++++++++--- net/ipv4/udp.c | 3 ++- net/ipv6/udp.c | 3 ++- net/unix/af_unix.c | 5 +---- 5 files changed, 15 insertions(+), 12 deletions(-) commit cc28fcdc017e553375c999ca12107ceb27f34ab3 Merge: 70bfc74 77aff8c Author: Linus Torvalds Date: Fri Aug 18 14:25:50 2017 -0700 Merge tag 'xfs-4.13-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "A handful more bug fixes for you today. Changes since last time: - Don't leak resources when mount fails - Don't accidentally clobber variables when looking for free inodes" * tag 'xfs-4.13-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: don't leak quotacheck dquots when cow recovery xfs: clear MS_ACTIVE after finishing log recovery iomap: fix integer truncation issues in the zeroing and dirtying helpers xfs: fix inobt inode allocation search optimization commit 70bfc741f845e55227900e4e5770bc359192c564 Merge: edb20a1 c005390 Author: Linus Torvalds Date: Fri Aug 18 14:12:39 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A small set of fixes that should go into this release. This contains: - An NVMe pull request from Christoph, with a few select fixes. One of them fix a polling regression in this series, in which it's trivial to cause the kernel to disable most of the hardware queue interrupts. - Fixup for a blk-mq queue usage imbalance on request allocation, from Keith. - A xen block pull request from Konrad, fixing two issues with xen/xen-blkfront" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq-pci: add a fallback when pci_irq_get_affinity returns NULL nvme-pci: set cqe_seen on polled completions nvme-fabrics: fix reporting of unrecognized options nvmet-fc: eliminate incorrect static markers on local variables nvmet-fc: correct use after free on list teardown nvmet: don't overwrite identify sn/fr with 0-bytes xen-blkfront: use a right index when checking requests xen: fix bio vec merging blk-mq: Fix queue usage on failed request allocation commit edb20a1b4a31fae825470138a45a1ccee1e051c7 Merge: 039a8e3 870201f Author: Linus Torvalds Date: Fri Aug 18 12:35:22 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "Fourth set of -rc fixes for 4.13 cycle. This is all of the -rc fixes that we know of. I suspect this will be the last rc pull request, but you never know, I could be wrong. Nothing major here. There are the i40iw patches I mentioned in my last pull request minus one that I pulled out because it wasn't a fix and not appropriate for the rc cycle. Then a few other items trickled in and were added to the pull request. It's fairly small aside from those five i40iw patches - Set of five i40iw fixes (the first of these is rather large by line count consideration, but I decided to send it because if fixes a legitimate issue and the line count is because it does so by creating a new function and using it where needed instead of just patching up a few lines...a smaller fix could probably be done, but the larger fix is the better code solution) - One vmw_pvrdma fix - One hns_roce fix (this silences a checker warning, but can't actually happen, I expect a patch to remove this from all drivers that share this same check in for-next) - One iw_cxgb4 fix - Two IB core fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/uverbs: Fix NULL pointer dereference during device removal IB/core: Protect sysfs entry on ib_unregister_device iw_cxgb4: fix misuse of integer variable IB/hns: fix memory leak on ah on error return path i40iw: Fix potential fcn_id_array out of bounds i40iw: Use correct alignment for CQ0 memory i40iw: Fix typecast of tcp_seq_num i40iw: Correct variable names i40iw: Fix parsing of query/commit FPM buffers RDMA/vmw_pvrdma: Report CQ missed events commit 039a8e38473323ed9f6c4415b4c3a36777efac34 Merge: 4283346 5a69aec Author: Linus Torvalds Date: Fri Aug 18 11:11:03 2017 -0700 Merge tag 'powerpc-4.13-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "A bug in the VSX register saving that could cause userspace FP/VMX register corruption. Never seen to happen (that we know of), was found by code inspection, but still tagged for stable given the consequences" * tag 'powerpc-4.13-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Fix VSX enabling/flushing to also test MSR_FP and MSR_VEC commit 42833468027770b8b731e3d9620165873439d237 Merge: cb24785 4dd6a99 Author: Linus Torvalds Date: Fri Aug 18 11:08:48 2017 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "A small number of bugfixes, nothing serious this time. Here is a full list. 4.13 regression fix: - imx7d-sdb pinctrl support regressed in 4.13 due to an incomplete patch DT fixes for recently added devices: - badly copied DT entries on imx6qdl-nitrogen6_som broke PCI reset - sama5d2 memory controller had the wrong ID and registers - imx7 power domains did not work correctly with deferred probing (driver added in 4.12) - Allwinner H5 pinctrl (added in 4.12) did not work right with GPIO interrupts Fixes for older bugs that just got noticed: - i.MX25 ADC support (added in 4.6) apparently never worked right due to a missing 'ranges' property in DT. - Renesas Salvador Audio support (added in v4.5) was broken for device repeated bind/unbind due to a naming conflict. - Various allwinner boards are missing an 'ethernet' alias in DT, leading to unstable device naming. Preventive bugfix: - TI Keystone needs a fix to prevent a NULL pointer dereference with an upcoming PM change" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: soc: ti: ti_sci_pm_domains: Populate name for genpd ARM: dts: imx6qdl-nitrogen6_som2: fix PCIe reset arm64: allwinner: h5: fix pinctrl IRQs arm64: allwinner: a64: sopine: add missing ethernet0 alias arm64: allwinner: a64: pine64: add missing ethernet0 alias arm64: allwinner: a64: bananapi-m64: add missing ethernet0 alias arm64: renesas: salvator-common: avoid audio_clkout naming conflict ARM: dts: i.MX25: add ranges to tscadc soc: imx: gpcv2: fix regulator deferred probe ARM: dts: at91: sama5d2: fix EBI/NAND controllers declaration ARM: dts: at91: sama5d2: use sama5d2 compatible string for SMC ARM: dts: imx7d-sdb: Put pinctrl_spi4 in the correct location commit cb247857f3dae0bdb843362c35027a0066b963a4 Merge: 4478976 0b36f2b Author: Linus Torvalds Date: Fri Aug 18 11:02:49 2017 -0700 Merge tag 'sound-4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes, mostly for regression fixes (sequencer kconfig and emu10k1 probe) and device-specific quirks (three for USB and one for HD-audio). One significant change is a fix for races in ALSA sequencer core, which covers over the previous incomplete fix" * tag 'sound-4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: emu10k1: Fix forgotten user-copy conversion in init code ALSA: usb-audio: add DSD support for new Amanero PID ALSA: usb-audio: Add mute TLV for playback volumes on C-Media devices ALSA: usb-audio: Apply sample rate quirk to Sennheiser headset ALSA: seq: 2nd attempt at fixing race creating a queue ALSA: hda/realtek - Fix pincfg for Dell XPS 13 9370 ALSA: seq: Fix CONFIG_SND_SEQ_MIDI dependency commit 2110ba58303f0c2a03360c5f81fbe67ed312e7b9 Author: Daniel Borkmann Date: Fri Aug 18 17:11:06 2017 +0200 bpf, doc: improve sysctl knob description Current context speaking of tcpdump filters is out of date these days, so lets improve the sysctl description for the BPF knobs a bit. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller Documentation/sysctl/net.txt | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit a120d9ab65354727559b9db75ded8071b7ef19e2 Author: Colin Ian King Date: Fri Aug 18 14:12:06 2017 +0100 netxen: fix incorrect loop counter decrement The loop counter k is currently being decremented from zero which is incorrect. Fix this by incrementing k instead Detected by CoverityScan, CID#401847 ("Infinite loop") Fixes: 83f18a557c6d ("netxen_nic: fw dump support") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4478976a43c5df8bc70e3a6b0e8ead9d7cff0a3f Merge: 04d49f3 ee7b1f3 Author: Linus Torvalds Date: Fri Aug 18 10:51:30 2017 -0700 Merge tag 'dma-mapping-4.13-3' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Another dma-mapping regression fix" * tag 'dma-mapping-4.13-3' of git://git.infradead.org/users/hch/dma-mapping: of: fix DMA mask generation commit eac2c68d663effb077210218788952b5a0c1f60e Author: Colin Ian King Date: Fri Aug 18 12:11:50 2017 +0100 nfp: fix infinite loop on umapping cleanup The while loop that performs the dma page unmapping never decrements index counter f and hence loops forever. Fix this with a pre-decrement on f. Detected by CoverityScan, CID#1357309 ("Infinite loop") Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs") Signed-off-by: Colin Ian King Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit acc8b31665b4cc17b35c4fa445427f7e2f6dc86b Author: Jiri Pirko Date: Fri Aug 18 10:10:43 2017 +0200 net: sched: fix p_filter_chain check in tcf_chain_flush The dereference before check is wrong and leads to an oops when p_filter_chain is NULL. The check needs to be done on the pointer to prevent NULL dereference. Fixes: f93e1cdcf42c ("net/sched: fix filter flushing") Signed-off-by: Jiri Pirko Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c005390374957baacbc38eef96ea360559510aa7 Author: Christoph Hellwig Date: Thu Aug 17 12:24:47 2017 +0200 blk-mq-pci: add a fallback when pci_irq_get_affinity returns NULL While pci_irq_get_affinity should never fail for SMP kernel that implement the affinity mapping, it will always return NULL in the UP case, so provide a fallback mapping of all queues to CPU 0 in that case. Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-pci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6caa0503c43d65de92309b967b5b1aa289af303b Merge: 3e09fc8 e9d8a0f Author: Jens Axboe Date: Fri Aug 18 08:04:15 2017 -0600 Merge branch 'nvme-4.13' of git://git.infradead.org/nvme into for-linus Pull NVMe changes from Christoph: "The fixes are getting really small now - two for FC, one for PCI, one for the fabrics layer and one for the target." commit 7edaeb6841dfb27e362288ab8466ebdc4972e867 Author: Thomas Gleixner Date: Tue Aug 15 09:50:13 2017 +0200 kernel/watchdog: Prevent false positives with turbo modes The hardlockup detector on x86 uses a performance counter based on unhalted CPU cycles and a periodic hrtimer. The hrtimer period is about 2/5 of the performance counter period, so the hrtimer should fire 2-3 times before the performance counter NMI fires. The NMI code checks whether the hrtimer fired since the last invocation. If not, it assumess a hard lockup. The calculation of those periods is based on the nominal CPU frequency. Turbo modes increase the CPU clock frequency and therefore shorten the period of the perf/NMI watchdog. With extreme Turbo-modes (3x nominal frequency) the perf/NMI period is shorter than the hrtimer period which leads to false positives. A simple fix would be to shorten the hrtimer period, but that comes with the side effect of more frequent hrtimer and softlockup thread wakeups, which is not desired. Implement a low pass filter, which checks the perf/NMI period against kernel time. If the perf/NMI fires before 4/5 of the watchdog period has elapsed then the event is ignored and postponed to the next perf/NMI. That solves the problem and avoids the overhead of shorter hrtimer periods and more frequent softlockup thread wakeups. Fixes: 58687acba592 ("lockup_detector: Combine nmi_watchdog and softlockup detector") Reported-and-tested-by: Kan Liang Signed-off-by: Thomas Gleixner Cc: dzickus@redhat.com Cc: prarit@redhat.com Cc: ak@linux.intel.com Cc: babu.moger@oracle.com Cc: peterz@infradead.org Cc: eranian@google.com Cc: acme@redhat.com Cc: stable@vger.kernel.org Cc: atomlin@redhat.com Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1708150931310.1886@nanos arch/x86/Kconfig | 1 + include/linux/nmi.h | 8 +++++++ kernel/watchdog.c | 1 + kernel/watchdog_hld.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ lib/Kconfig.debug | 7 ++++++ 5 files changed, 76 insertions(+) commit e8f241893dfbbebe2813c01eac54f263e6a5e59c Author: Marc Zyngier Date: Fri Aug 18 10:53:45 2017 +0100 genirq: Restore trigger settings in irq_modify_status() irq_modify_status starts by clearing the trigger settings from irq_data before applying the new settings, but doesn't restore them, leaving them to IRQ_TYPE_NONE. That's pretty confusing to the potential request_irq() that could follow. Instead, snapshot the settings before clearing them, and restore them if the irq_modify_status() invocation was not changing the trigger. Fixes: 1e2a7d78499e ("irqdomain: Don't set type when mapping an IRQ") Reported-and-tested-by: jeffy Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Cc: Jon Hunter Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170818095345.12378-1-marc.zyngier@arm.com kernel/irq/chip.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 4dd6a9973b8aaffac4bf37c5bb70e8eae5a7afb4 Author: Dave Gerlach Date: Fri Jul 28 09:51:34 2017 -0700 soc: ti: ti_sci_pm_domains: Populate name for genpd Commit b6a1d093f96b ("PM / Domains: Extend generic power domain debugfs") now creates a debugfs directory for each genpd based on the name of the genpd. Currently no name is given to the genpd created by ti_sci_pm_domains driver so because of this we see a NULL pointer dereferences when it is accessed on boot when the debugfs entry creation is attempted. Give the genpd a name before registering it to avoid this. Fixes: 52835d59fc6c ("soc: ti: Add ti_sci_pm_domains driver") Signed-off-by: Dave Gerlach Signed-off-by: Santosh Shilimkar Signed-off-by: Arnd Bergmann drivers/soc/ti/ti_sci_pm_domains.c | 2 ++ 1 file changed, 2 insertions(+) commit 93112486f4b625130e7a998932b5fe6ff05bef3d Merge: 552c497 c40bc54 Author: Arnd Bergmann Date: Fri Aug 18 11:58:38 2017 +0200 Merge tag 'imx-fixes-4.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes Pull "i.MX fixes for 4.13, round 3" from Shawn Guo: - Fix PCIe reset GPIO of imx6qdl-nitrogen6_som2 board, which was a bad copy from nitrogen6_max device tree. * tag 'imx-fixes-4.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6qdl-nitrogen6_som2: fix PCIe reset commit 552c497c406e49261e6bee6236dd9a3f8fdd7ab5 Merge: 872784b d86e63e Author: Arnd Bergmann Date: Fri Aug 18 11:55:44 2017 +0200 Merge tag 'sunxi-fixes-for-4.13-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Pull "Allwinner fixes for 4.13, round 2" from Chen-Yu Tsai: Three fixes adding a missing alias for the Ethernet controller on A64 boards. One adding a missing interrupt for the pin controller. * tag 'sunxi-fixes-for-4.13-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: allwinner: h5: fix pinctrl IRQs arm64: allwinner: a64: sopine: add missing ethernet0 alias arm64: allwinner: a64: pine64: add missing ethernet0 alias arm64: allwinner: a64: bananapi-m64: add missing ethernet0 alias commit 45bd07ad82622fb7c8dd7504d976b7dd11568965 Author: Arvind Yadav Date: Thu Jul 20 17:00:32 2017 +0530 x86: Constify attribute_group structures attribute_groups are not supposed to change at runtime and none of the groups is modified. Mark the non-const structs as const. [ tglx: Folded into one big patch ] Signed-off-by: Arvind Yadav Signed-off-by: Thomas Gleixner Cc: tony.luck@intel.com Cc: bp@alien8.de Link: http://lkml.kernel.org/r/1500550238-15655-2-git-send-email-arvind.yadav.cs@gmail.com arch/x86/events/intel/uncore.c | 2 +- arch/x86/events/intel/uncore_nhmex.c | 12 ++++----- arch/x86/events/intel/uncore_snb.c | 6 ++--- arch/x86/events/intel/uncore_snbep.c | 42 ++++++++++++++++---------------- arch/x86/kernel/cpu/mcheck/therm_throt.c | 2 +- arch/x86/kernel/cpu/microcode/core.c | 4 +-- arch/x86/kernel/ksysfs.c | 4 +-- 7 files changed, 36 insertions(+), 36 deletions(-) commit 7374bfb82e3844abcc5a5b8034620d80b92b820d Author: Florian Fainelli Date: Thu Jul 27 15:47:33 2017 -0700 MAINTAINERS: Remove Jason Cooper's irqchip git tree Jason's irqchip tree does not seem to have been updated for many months now, remove it from the list of trees to avoid any possible confusion. Jason says: "Unfortunately, when I have time for irqchip, I don't always have the time to properly follow up with pull-requests. So, for the time being, I'll stick to reviewing as I can." Signed-off-by: Florian Fainelli Signed-off-by: Thomas Gleixner Acked-by: Jason Cooper Cc: marc.zyngier@arm.com Link: http://lkml.kernel.org/r/20170727224733.8288-1-f.fainelli@gmail.com MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 0b36f2bd28d040acedb52f4327eb2441afe4f514 Author: Takashi Iwai Date: Fri Aug 18 10:55:10 2017 +0200 ALSA: emu10k1: Fix forgotten user-copy conversion in init code The commit d42fe63d5839 ("ALSA: emu10k1: Get rid of set_fs() usage") converted the user-space copy hack with set_fs() to the direct memcpy(), but one place was forgotten. This resulted in the error from snd_emu10k1_init_efx(), eventually failed to load the driver. Fix the missing piece. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196687 Fixes: d42fe63d5839 ("ALSA: emu10k1: Get rid of set_fs() usage") Signed-off-by: Takashi Iwai sound/pci/emu10k1/emufx.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit ed993c6fdfa7734881a4516852d95ae2d3b604d3 Author: Jussi Laako Date: Fri Aug 18 10:42:14 2017 +0300 ALSA: usb-audio: add DSD support for new Amanero PID Add DSD support for new Amanero Combo384 firmware version with a new PID. This firmware uses DSD_U32_BE. Fixes: 3eff682d765b ("ALSA: usb-audio: Support both DSD LE/BE Amanero firmware versions") Signed-off-by: Jussi Laako Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) commit e9d8a0fdeacd843c85dcef480cdb2ab76bcdb6e4 Author: Keith Busch Date: Thu Aug 17 16:45:06 2017 -0400 nvme-pci: set cqe_seen on polled completions Fixes: 920d13a884 ("nvme-pci: factor out the cqe reading mechanics from __nvme_process_cq") Reported-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1a92a80ad386a1a6e3b36d576d52a1a456394b70 Author: Benjamin Herrenschmidt Date: Mon Jul 24 14:28:00 2017 +1000 powerpc/mm: Ensure cpumask update is ordered There is no guarantee that the various isync's involved with the context switch will order the update of the CPU mask with the first TLB entry for the new context being loaded by the HW. Be safe here and add a memory barrier to order any subsequent load/store which may bring entries into the TLB. The corresponding barrier on the other side already exists as pte updates use pte_xchg() which uses __cmpxchg_u64 which has a sync after the atomic operation. Cc: stable@vger.kernel.org Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Nicholas Piggin [mpe: Add comments in the code] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 18 ++++++++++++++++++ arch/powerpc/include/asm/pgtable-be-types.h | 1 + arch/powerpc/include/asm/pgtable-types.h | 1 + 3 files changed, 20 insertions(+) commit c40bc54fdf2d52a80f66b365f1eac9d43b32e107 Author: Gary Bisson Date: Thu Aug 17 15:50:10 2017 +0200 ARM: dts: imx6qdl-nitrogen6_som2: fix PCIe reset Previous value was a bad copy of nitrogen6_max device tree. Signed-off-by: Gary Bisson Fixes: 3faa1bb2e89c ("ARM: dts: imx: add Boundary Devices Nitrogen6_SOM2 support") Cc: Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04d49f3638d0210de592dd52ad62cfca8b3ed9fe Merge: d33a2a9 28eb462 Author: Linus Torvalds Date: Thu Aug 17 16:48:29 2017 -0700 Merge tag 'drm-fixes-for-v4.13-rc6' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Seems to be slowing down nicely, just one amdgpu fix, and a bunch of i915 fixes" * tag 'drm-fixes-for-v4.13-rc6' of git://people.freedesktop.org/~airlied/linux: drm/amdgpu: save list length when fence is signaled drm/i915: Avoid the gpu reset vs. modeset deadlock drm/i915: Suppress switch_mm emission between the same aliasing_ppgtt drm/i915: Return correct EDP voltage swing table for 0.85V drm/i915/cnl: Add slice and subslice information to debugfs. drm/i915: Perform an invalidate prior to executing golden renderstate drm/i915: remove unused function declaration commit d33a2a914319e9ec71f49bad2b8c8b9e05a58edf Merge: 440105d 8179962 Author: Linus Torvalds Date: Thu Aug 17 14:21:18 2017 -0700 Merge tag 'pm-4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two issues related to exposing the current CPU frequency to user space on x86. Specifics: - Disable interrupts around reading IA32_APERF and IA32_MPERF in aperfmperf_snapshot_khz() (introduced recently) to avoid excessive delays between the reads that may result from interrupt handling (Doug Smythies). - Fix the computation of the CPU frequency to be reported through the pstate_sample tracepoint in intel_pstate (Doug Smythies)" * tag 'pm-4.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: x86: Disable interrupts during MSRs reading cpufreq: intel_pstate: report correct CPU frequencies during trace commit 440105d3c958cf10b5900fac9d4632d47d57a0cc Merge: 3bc6c90 7698869 Author: Linus Torvalds Date: Thu Aug 17 13:45:44 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c - Add antoher Lenovo ACPI ID for upcoming Lenovo NB Input: elan_i2c - add ELAN0608 to the ACPI table Input: trackpoint - assume 3 buttons when buttons detection fails commit 28eb46287916f7f3ceec874959693e3fc49a294a Merge: 41d31b5f 7a7c286 Author: Dave Airlie Date: Fri Aug 18 05:45:03 2017 +1000 Merge branch 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-fixes single amdgpu fix. * 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: save list length when fence is signaled commit 41d31b5fd29bd768a7174b754249c97563c21fae Merge: ef95484 781cc76 Author: Dave Airlie Date: Fri Aug 18 05:43:10 2017 +1000 Merge tag 'drm-intel-fixes-2017-08-16' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.13-rc6 "Chris' "drm/i915: Perform an invalidate prior to executing golden renderstate" and Daniel's "drm/i915: Avoid the gpu reset vs. modeset deadlock" seem like the most important ones. * tag 'drm-intel-fixes-2017-08-16' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Avoid the gpu reset vs. modeset deadlock drm/i915: Suppress switch_mm emission between the same aliasing_ppgtt drm/i915: Return correct EDP voltage swing table for 0.85V drm/i915/cnl: Add slice and subslice information to debugfs. drm/i915: Perform an invalidate prior to executing golden renderstate drm/i915: remove unused function declaration commit 77aff8c76425c8f49b50d0b9009915066739e7d2 Author: Darrick J. Wong Date: Thu Aug 10 14:20:29 2017 -0700 xfs: don't leak quotacheck dquots when cow recovery If we fail a mount on account of cow recovery errors, it's possible that a previous quotacheck left some dquots in memory. The bailout clause of xfs_mountfs forgets to purge these, and so we leak them. Fix that. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_mount.c | 2 ++ 1 file changed, 2 insertions(+) commit 8204f8ddaafafcae074746fcf2a05a45e6827603 Author: Darrick J. Wong Date: Thu Aug 10 14:20:28 2017 -0700 xfs: clear MS_ACTIVE after finishing log recovery Way back when we established inode block-map redo log items, it was discovered that we needed to prevent the VFS from evicting inodes during log recovery because any given inode might be have bmap redo items to replay even if the inode has no link count and is ultimately deleted, and any eviction of an unlinked inode causes the inode to be truncated and freed too early. To make this possible, we set MS_ACTIVE so that inodes would not be torn down immediately upon release. Unfortunately, this also results in the quota inodes not being released at all if a later part of the mount process should fail, because we never reclaim the inodes. So, set MS_ACTIVE right before we do the last part of log recovery and clear it immediately after we finish the log recovery so that everything will be torn down properly if we abort the mount. Fixes: 17c12bcd30 ("xfs: when replaying bmap operations, don't let unlinked inodes get reaped") Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_log.c | 11 +++++++++++ fs/xfs/xfs_mount.c | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) commit 8179962b84668d71586cd3efcb70e823f37a5702 Merge: ef95484 c587c79 8e2f3bc Author: Rafael J. Wysocki Date: Thu Aug 17 21:00:30 2017 +0200 Merge branches 'intel_pstate-fix' and 'cpufreq-x86-fix' * intel_pstate-fix: cpufreq: intel_pstate: report correct CPU frequencies during trace * cpufreq-x86-fix: cpufreq: x86: Disable interrupts during MSRs reading commit 98529b9272e06a7767034fb8a32e43cdecda240a Author: Lv Zheng Date: Wed Aug 16 15:29:49 2017 +0800 ACPI: EC: Fix regression related to wrong ECDT initialization order Commit 2a5708409e4e (ACPI / EC: Fix a gap that ECDT EC cannot handle EC events) introduced acpi_ec_ecdt_start(), but that function is invoked before acpi_ec_query_init(), which is too early. This causes the kernel to crash if an EC event occurs after boot, when ec_query_wq is not valid: BUG: unable to handle kernel NULL pointer dereference at 0000000000000102 ... Workqueue: events acpi_ec_event_handler task: ffff9f539790dac0 task.stack: ffffb437c0e10000 RIP: 0010:__queue_work+0x32/0x430 Normally, the DSDT EC should always be valid, so acpi_ec_ecdt_start() is actually a no-op in the majority of cases. However, commit c712bb58d827 (ACPI / EC: Add support to skip boot stage DSDT probe) caused the probing of the DSDT EC as the "boot EC" to be skipped when the ECDT EC is valid and uncovered the bug. Fix this issue by invoking acpi_ec_ecdt_start() after acpi_ec_query_init() in acpi_ec_init(). Link: https://jira01.devtools.intel.com/browse/LCK-4348 Fixes: 2a5708409e4e (ACPI / EC: Fix a gap that ECDT EC cannot handle EC events) Fixes: c712bb58d827 (ACPI / EC: Add support to skip boot stage DSDT probe) Reported-by: Wang Wendy Tested-by: Feng Chenzhou Signed-off-by: Lv Zheng [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 17 +++++++---------- drivers/acpi/internal.h | 1 - drivers/acpi/scan.c | 1 - 3 files changed, 7 insertions(+), 12 deletions(-) commit 3bc6c906eacec34f0d8dcfd3c7e4513edf152297 Merge: 99f781b d6957f3 Author: Linus Torvalds Date: Thu Aug 17 11:39:54 2017 -0700 Merge branch 'parisc-4.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: - Fix PCI memory bar assignments with 64-bit kernels on machines with Dino/Cujo PCI chipsets. This makes PCI graphic cards work on such machines (from Thomas Bogendoerfer). - Fix documentation to be more clear about the difference between %pF and %pS printk format usage. There are still many places in the kernel which have it wrong (from Petr Mladek, Sergey Senozhatsky & me). * 'parisc-4.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: printk-formats.txt: Better describe the difference between %pS and %pF parisc: pci memory bar assignment fails with 64bit kernels on dino/cujo commit 014cd0a368dc6351c65d51e4ee34f8573a4a1543 Author: Michael Ellerman Date: Thu Aug 17 20:30:39 2017 +1000 bpf: Update sysctl documentation to list all supported architectures The sysctl documentation states that the JIT is only available on x86_64, which is no longer correct. Update the list, and break it out to indicate which architectures support the cBPF JIT (via HAVE_CBPF_JIT) or the eBPF JIT (HAVE_EBPF_JIT). Signed-off-by: Michael Ellerman Acked-by: Daniel Borkmann Signed-off-by: David S. Miller Documentation/sysctl/net.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 81a0b8d74edd5841be29d223ce44bc8db2b00d09 Author: Christoph Hellwig Date: Thu Aug 17 13:57:49 2017 +0200 nvme-fabrics: fix reporting of unrecognized options Only print the specified options that are not recognized, instead of the whole list of options. Signed-off-by: Christoph Hellwig Reviewed-by: Max Gurtovoy drivers/nvme/host/fabrics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 99f781b1bfc199ec8eb86d4e015920faf79d5d57 Merge: c8c03f1 41e327b Author: Linus Torvalds Date: Thu Aug 17 09:26:10 2017 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota fix from Jan Kara: "A fix of a check for quota limit" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: correct space limit check commit c8c03f1858331e85d397bacccd34ef409aae993c Author: Linus Torvalds Date: Wed Aug 16 17:08:07 2017 -0700 pty: fix the cached path of the pty slave file descriptor in the master Christian Brauner reported that if you use the TIOCGPTPEER ioctl() to get a slave pty file descriptor, the resulting file descriptor doesn't look right in /proc//fd/. In particular, he wanted to use readlink() on /proc/self/fd/ to get the pathname of the slave pty (basically implementing "ptsname{_r}()"). The reason for that was that we had generated the wrong 'struct path' when we create the pty in ptmx_open(). In particular, the dentry was correct, but the vfsmount pointed to the mount of the ptmx node. That _can_ be correct - in case you use "/dev/pts/ptmx" to open the master - but usually is not. The normal case is to use /dev/ptmx, which then looks up the pts/ directory, and then the vfsmount of the ptmx node is obviously the /dev directory, not the /dev/pts/ directory. We actually did have the right vfsmount available, but in the wrong place (it gets looked up in 'devpts_acquire()' when we get a reference to the pts filesystem), and so ptmx_open() used the wrong mnt pointer. The end result of this confusion was that the pty worked fine, but when if you did TIOCGPTPEER to get the slave side of the pty, end end result would also work, but have that dodgy 'struct path'. And then when doing "d_path()" on to get the pathname, the vfsmount would not match the root of the pts directory, and d_path() would return an empty pathname thinking that the entry had escaped a bind mount into another mount. This fixes the problem by making devpts_acquire() return the vfsmount for the pts filesystem, allowing ptmx_open() to trivially just use the right mount for the pts dentry, and create the proper 'struct path'. Reported-by: Christian Brauner Cc: Al Viro Acked-by: Eric Biederman Signed-off-by: Linus Torvalds drivers/tty/pty.c | 7 +++++-- fs/devpts/inode.c | 4 +++- include/linux/devpts_fs.h | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) commit 2a86cdd2e7d3c75580f41f89f9b9211e225573cc Author: Jarkko Nikula Date: Tue Aug 15 17:34:45 2017 +0300 i2c: designware: Fix runtime PM for I2C slave mode I2C slave controller must be powered and active all the time when I2C slave backend is registered in order to let master address and communicate with us. Now if the controller is runtime PM capable it will be suspended after probe and cannot ever respond to the master or generate interrupts. Fix this by resuming the controller when I2C slave backend is registered and let it suspend after unregistering. Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-slave.c | 3 +++ 1 file changed, 3 insertions(+) commit 733f6563979d96dec180c350abb8ac67cc0367ba Author: Jarkko Nikula Date: Tue Aug 15 17:34:44 2017 +0300 i2c: designware: Remove needless pm_runtime_put_noidle() call I guess pm_runtime_put_noidle() call in i2c_dw_probe_slave() was copied by accident from similar master mode adapter registration code. It is unbalanced due missing pm_runtime_get_noresume() but harmless since it doesn't decrease dev->power.usage_count below zero. In theory we can hit similar needless runtime suspend/resume cycle during slave mode adapter registration that was happening when registering the master mode adapter. See commit cd998ded5c12 ("i2c: designware: Prevent runtime suspend during adapter registration"). However, since we are slave, we can consider it as a wrong configuration if we have other slaves attached under this adapter and can omit the pm_runtime_get_noresume()/pm_runtime_put_noidle() calls for simplicity. Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-slave.c | 1 - 1 file changed, 1 deletion(-) commit 0f174b3525a43bd51f9397394763925e0ebe7bc7 Author: Takashi Iwai Date: Wed Aug 16 14:18:37 2017 +0200 ALSA: usb-audio: Add mute TLV for playback volumes on C-Media devices C-Media devices (at least some models) mute the playback stream when volumes are set to the minimum value. But this isn't informed via TLV and the user-space, typically PulseAudio, gets confused as if it's still played in a low volume. This patch adds the new flag, min_mute, to struct usb_mixer_elem_info for indicating that the mixer element is with the minimum-mute volume. This flag is set for known C-Media devices in snd_usb_mixer_fu_apply_quirk() in turn. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196669 Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 2 ++ sound/usb/mixer.h | 1 + sound/usb/mixer_quirks.c | 6 ++++++ 3 files changed, 9 insertions(+) commit 872784bffbe4217611922bc0f929dbd9cad65528 Merge: 4450675 8cd7b51 Author: Arnd Bergmann Date: Thu Aug 17 11:00:26 2017 +0200 Merge tag 'renesas-fixes4-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Pull "Fourth Round of Renesas ARM Based SoC Fixes for v4.13" from Simon Horman: * Avoid audio_clkout naming conflict for salvator boards using Renesas R-Car Gen 3 SoCs Morimoto-san says "The clock name of "audio_clkout" is used by the Renesas sound driver. This duplicated naming breaks its clock registering/unregistering. Especially when unbind/bind it can't handle clkout correctly. This patch renames "audio_clkout" to "audio-clkout" to avoid the naming conflict." * tag 'renesas-fixes4-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: renesas: salvator-common: avoid audio_clkout naming conflict commit ee7b1f31200d9f3cc45e1bd22e962bd6b1d4d611 Author: Robin Murphy Date: Fri Aug 11 17:29:56 2017 +0100 of: fix DMA mask generation Historically, DMA masks have suffered some ambiguity between whether they represent the range of physical memory a device can access, or the address bits a device is capable of driving, particularly since on many platforms the two are equivalent. Whilst there are some stragglers left (dma_max_pfn(), I'm looking at you...), the majority of DMA code has been cleaned up to follow the latter definition, not least since it is the only one which makes sense once IOMMUs are involved. In this respect, of_dma_configure() has always done the wrong thing in how it generates initial masks based on "dma-ranges". Although rounding down did not affect the TI Keystone platform where dma_addr + size is already a power of two, in any other case it results in a mask which is at best unnecessarily constrained and at worst unusable. BCM2837 illustrates the problem nicely, where we have a DMA base of 3GB and a size of 1GB - 16MB, giving dma_addr + size = 0xff000000 and a resultant mask of 0x7fffffff, which is then insufficient to even cover the necessary offset, effectively making all DMA addresses out-of-range. This has been hidden until now (mostly because we don't yet prevent drivers from simply overwriting this initial mask later upon probe), but due to recent changes elsewhere now shows up as USB being broken on Raspberry Pi 3. Make it right by rounding up instead of down, such that the mask correctly correctly describes all possisble bits the device needs to emit. Fixes: 9a6d7298b083 ("of: Calculate device DMA masks based on DT dma-range size") Reported-by: Stefan Wahren Reported-by: Andreas Färber Reported-by: Hans Verkuil Signed-off-by: Robin Murphy Acked-by: Rob Herring Signed-off-by: Christoph Hellwig drivers/of/device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 187e91fe5e915f4b7f39b824aa422493463e443d Author: Alexander Potapenko Date: Wed Aug 16 21:08:08 2017 +0200 x86/boot/64/clang: Use fixup_pointer() to access 'next_early_pgt' __startup_64() is normally using fixup_pointer() to access globals in a position-independent fashion. However 'next_early_pgt' was accessed directly, which wasn't guaranteed to work. Luckily GCC was generating a R_X86_64_PC32 PC-relative relocation for 'next_early_pgt', but Clang emitted a R_X86_64_32S, which led to accessing invalid memory and rebooting the kernel. Signed-off-by: Alexander Potapenko Acked-by: Kirill A. Shutemov Cc: Dmitry Vyukov Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Michael Davidson Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: c88d71508e36 ("x86/boot/64: Rewrite startup_64() in C") Link: http://lkml.kernel.org/r/20170816190808.131748-1-glider@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/head64.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 369157b41cca435442cf5add9df209aaf951860d Author: James Smart Date: Wed Aug 16 10:47:03 2017 -0700 nvmet-fc: eliminate incorrect static markers on local variables There were 2 statics introduced that were bogus. Removed the static designations. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/target/fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac9a40905a610fb02086a37b11ff4bf046825a88 Merge: 422ce07 424f727 Author: Linus Torvalds Date: Wed Aug 16 17:21:20 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "A couple of minor fixes (st, ses) and some bigger driver fixes for qla2xxx (crash triggered by fw dump) and ipr (lockdep problems with mq)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ses: Fix wrong page error scsi: ipr: Fix scsi-mq lockdep issue scsi: st: fix blk_get_queue usage scsi: qla2xxx: Fix system crash while triggering FW dump commit 71eb2ac58aa52f7948deda4d9a75754b6898e5c9 Author: Varun Prakash Date: Wed Aug 16 19:40:32 2017 +0530 scsi: cxgb4i: call neigh_event_send() to update MAC address If nud_state is not valid then call neigh_event_send() to update MAC address. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 3 +++ 1 file changed, 3 insertions(+) commit cbe7dfa26eee4819db7b5846181d56fd0cece0ea Author: Christoph Hellwig Date: Sun Aug 13 19:44:22 2017 +0200 Revert "scsi: default to scsi-mq" Defaulting to scsi-mq in 4.13-rc has shown various regressions on setups that we didn't previously consider. Fixes for them are in progress, but too invasive to make it in this cycle. So for now revert the commit that defaults to blk-mq for SCSI. For 4.14 we'll plan to try again with these fixes. This reverts commit 5c279bd9e40624f4ab6e688671026d6005b066fa. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 11 +++++++++++ drivers/scsi/scsi.c | 4 ++++ 2 files changed, 15 insertions(+) commit 70e42fd02c46e2aa9ab07b766d418637e3a51de7 Author: Damien Le Moal Date: Wed Aug 9 12:00:22 2017 +0900 scsi: sd_zbc: Write unlock zone from sd_uninit_cmnd() Releasing a zone write lock only when the write commnand that acquired the lock completes can cause deadlocks due to potential command reordering if the lock owning request is requeued and not executed. This problem exists only with the scsi-mq path as, unlike the legacy path, requests are moved out of the dispatch queue before being prepared and so before locking a zone for a write command. Since sd_uninit_cmnd() is now always called when a request is requeued, call sd_zbc_write_unlock_zone() from that function for write requests that acquired a zone lock instead of from sd_done(). Acquisition of a zone lock by a write command is indicated using the new command flag SCMD_ZONE_WRITE_LOCK. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 3 +++ drivers/scsi/sd_zbc.c | 9 +++++---- include/scsi/scsi_cmnd.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) commit c80267324938a5517fd31fa4bbd2d63c564401f9 Author: Raghava Aditya Renukunta Date: Fri Aug 4 03:51:41 2017 -0700 scsi: aacraid: Fix out of bounds in aac_get_name_resp We terminate the aac_get_name_resp on a byte that is outside the bounds of the structure. Extend the return response by one byte to remove the out of bounds reference. Fixes: b836439faf04 ("aacraid: 4KB sector support") Reported-by: Dan Carpenter Signed-off-by: David Carroll Signed-off-by: Raghava Aditya Renukunta Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 9 +++++++-- drivers/scsi/aacraid/aacraid.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit 82f0fd06d4a84ff32cc2cf9503764219316ec728 Author: Varun Prakash Date: Mon Jul 31 22:02:55 2017 +0530 scsi: csiostor: fail probe if fw does not support FCoE Fail probe if FCoE capability is not enabled in the firmware. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_hw.c | 4 +++- drivers/scsi/csiostor/csio_init.c | 12 ++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) commit 61f0c3c7a0fd37f252b0f23c237973ddf4c21ea7 Author: weiping zhang Date: Tue Aug 8 01:26:57 2017 +0800 scsi: megaraid_sas: fix error handle in megasas_probe_one megasas_mgmt_info.max_index has increased by 1 before megasas_io_attach, if megasas_io_attach return error, then goto fail_io_attach, megasas_mgmt_info.instance has a wrong index here. So first reduce max_index and then set that instance to NULL. Signed-off-by: weiping zhang Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 422ce075f969ffd650e371faa5a02586d0c0b2e6 Merge: 510c8a8 b5fed47 Author: Linus Torvalds Date: Wed Aug 16 16:48:34 2017 -0700 Merge tag 'audit-pr-20170816' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit fixes from Paul Moore: "Two small fixes to the audit code, both explained well in the respective patch descriptions, but the quick summary is one use-after-free fix, and one silly fanotify notification flag fix" * tag 'audit-pr-20170816' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: Receive unmount event audit: Fix use after free in audit_remove_watch_rule() commit c780a049f9bf442314335372c9abc4548bfe3e44 Author: Eric Dumazet Date: Wed Aug 16 11:09:12 2017 -0700 ipv4: better IP_MAX_MTU enforcement While working on yet another syzkaller report, I found that our IP_MAX_MTU enforcements were not properly done. gcc seems to reload dev->mtu for min(dev->mtu, IP_MAX_MTU), and final result can be bigger than IP_MAX_MTU :/ This is a problem because device mtu can be changed on other cpus or threads. While this patch does not fix the issue I am working on, it is probably worth addressing it. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip.h | 4 ++-- net/ipv4/route.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 81fbfe8adaf38d4f5a98c19bebfd41c5d6acaee8 Author: Eric Dumazet Date: Wed Aug 16 10:36:47 2017 -0700 ptr_ring: use kmalloc_array() As found by syzkaller, malicious users can set whatever tx_queue_len on a tun device and eventually crash the kernel. Lets remove the ALIGN(XXX, SMP_CACHE_BYTES) thing since a small ring buffer is not fast anyway. Fixes: 2e0ab8ca83c1 ("ptr_ring: array based FIFO for pointers") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Michael S. Tsirkin Cc: Jason Wang Signed-off-by: David S. Miller include/linux/ptr_ring.h | 9 +++++---- include/linux/skb_array.h | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) commit 120e9dabaf551c6dc03d3a10a1f026376cb1811c Author: Eric Dumazet Date: Wed Aug 16 07:03:15 2017 -0700 dccp: defer ccid_hc_tx_delete() at dismantle time syszkaller team reported another problem in DCCP [1] Problem here is that the structure holding RTO timer (ccid2_hc_tx_rto_expire() handler) is freed too soon. We can not use del_timer_sync() to cancel the timer since this timer wants to grab socket lock (that would risk a dead lock) Solution is to defer the freeing of memory when all references to the socket were released. Socket timers do own a reference, so this should fix the issue. [1] ================================================================== BUG: KASAN: use-after-free in ccid2_hc_tx_rto_expire+0x51c/0x5c0 net/dccp/ccids/ccid2.c:144 Read of size 4 at addr ffff8801d2660540 by task kworker/u4:7/3365 CPU: 1 PID: 3365 Comm: kworker/u4:7 Not tainted 4.13.0-rc4+ #3 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound call_usermodehelper_exec_work Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x24e/0x340 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 ccid2_hc_tx_rto_expire+0x51c/0x5c0 net/dccp/ccids/ccid2.c:144 call_timer_fn+0x233/0x830 kernel/time/timer.c:1268 expire_timers kernel/time/timer.c:1307 [inline] __run_timers+0x7fd/0xb90 kernel/time/timer.c:1601 run_timer_softirq+0x21/0x80 kernel/time/timer.c:1614 __do_softirq+0x2f5/0xba3 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x1cc/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:1044 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:702 RIP: 0010:arch_local_irq_enable arch/x86/include/asm/paravirt.h:824 [inline] RIP: 0010:__raw_write_unlock_irq include/linux/rwlock_api_smp.h:267 [inline] RIP: 0010:_raw_write_unlock_irq+0x56/0x70 kernel/locking/spinlock.c:343 RSP: 0018:ffff8801cd50eaa8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10 RAX: dffffc0000000000 RBX: ffffffff85a090c0 RCX: 0000000000000006 RDX: 1ffffffff0b595f3 RSI: 1ffff1003962f989 RDI: ffffffff85acaf98 RBP: ffff8801cd50eab0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801cc96ea60 R13: dffffc0000000000 R14: ffff8801cc96e4c0 R15: ffff8801cc96e4c0 release_task+0xe9e/0x1a40 kernel/exit.c:220 wait_task_zombie kernel/exit.c:1162 [inline] wait_consider_task+0x29b8/0x33c0 kernel/exit.c:1389 do_wait_thread kernel/exit.c:1452 [inline] do_wait+0x441/0xa90 kernel/exit.c:1523 kernel_wait4+0x1f5/0x370 kernel/exit.c:1665 SYSC_wait4+0x134/0x140 kernel/exit.c:1677 SyS_wait4+0x2c/0x40 kernel/exit.c:1673 call_usermodehelper_exec_sync kernel/kmod.c:286 [inline] call_usermodehelper_exec_work+0x1a0/0x2c0 kernel/kmod.c:323 process_one_work+0xbf3/0x1bc0 kernel/workqueue.c:2097 worker_thread+0x223/0x1860 kernel/workqueue.c:2231 kthread+0x35e/0x430 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:425 Allocated by task 21267: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x127/0x750 mm/slab.c:3561 ccid_new+0x20e/0x390 net/dccp/ccid.c:151 dccp_hdlr_ccid+0x27/0x140 net/dccp/feat.c:44 __dccp_feat_activate+0x142/0x2a0 net/dccp/feat.c:344 dccp_feat_activate_values+0x34e/0xa90 net/dccp/feat.c:1538 dccp_rcv_request_sent_state_process net/dccp/input.c:472 [inline] dccp_rcv_state_process+0xed1/0x1620 net/dccp/input.c:677 dccp_v4_do_rcv+0xeb/0x160 net/dccp/ipv4.c:679 sk_backlog_rcv include/net/sock.h:911 [inline] __release_sock+0x124/0x360 net/core/sock.c:2269 release_sock+0xa4/0x2a0 net/core/sock.c:2784 inet_wait_for_connect net/ipv4/af_inet.c:557 [inline] __inet_stream_connect+0x671/0xf00 net/ipv4/af_inet.c:643 inet_stream_connect+0x58/0xa0 net/ipv4/af_inet.c:682 SYSC_connect+0x204/0x470 net/socket.c:1642 SyS_connect+0x24/0x30 net/socket.c:1623 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 3049: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x77/0x280 mm/slab.c:3763 ccid_hc_tx_delete+0xc5/0x100 net/dccp/ccid.c:190 dccp_destroy_sock+0x1d1/0x2b0 net/dccp/proto.c:225 inet_csk_destroy_sock+0x166/0x3f0 net/ipv4/inet_connection_sock.c:833 dccp_done+0xb7/0xd0 net/dccp/proto.c:145 dccp_time_wait+0x13d/0x300 net/dccp/minisocks.c:72 dccp_rcv_reset+0x1d1/0x5b0 net/dccp/input.c:160 dccp_rcv_state_process+0x8fc/0x1620 net/dccp/input.c:663 dccp_v4_do_rcv+0xeb/0x160 net/dccp/ipv4.c:679 sk_backlog_rcv include/net/sock.h:911 [inline] __sk_receive_skb+0x33e/0xc00 net/core/sock.c:521 dccp_v4_rcv+0xef1/0x1c00 net/dccp/ipv4.c:871 ip_local_deliver_finish+0x2e2/0xba0 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:248 [inline] ip_local_deliver+0x1ce/0x6d0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:477 [inline] ip_rcv_finish+0x8db/0x19c0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:248 [inline] ip_rcv+0xc3f/0x17d0 net/ipv4/ip_input.c:488 __netif_receive_skb_core+0x19af/0x33d0 net/core/dev.c:4417 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4455 process_backlog+0x203/0x740 net/core/dev.c:5130 napi_poll net/core/dev.c:5527 [inline] net_rx_action+0x792/0x1910 net/core/dev.c:5593 __do_softirq+0x2f5/0xba3 kernel/softirq.c:284 The buggy address belongs to the object at ffff8801d2660100 which belongs to the cache ccid2_hc_tx_sock of size 1240 The buggy address is located 1088 bytes inside of 1240-byte region [ffff8801d2660100, ffff8801d26605d8) The buggy address belongs to the page: page:ffffea0007499800 count:1 mapcount:0 mapping:ffff8801d2660100 index:0x0 compound_mapcount: 0 flags: 0x200000000008100(slab|head) raw: 0200000000008100 ffff8801d2660100 0000000000000000 0000000100000005 raw: ffffea00075271a0 ffffea0007538820 ffff8801d3aef9c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d2660400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d2660480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801d2660500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801d2660580: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff8801d2660600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Gerrit Renker Signed-off-by: David S. Miller net/dccp/proto.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 494bea39f3201776cdfddc232705f54a0bd210c4 Author: Liping Zhang Date: Wed Aug 16 13:30:07 2017 +0800 openvswitch: fix skb_panic due to the incorrect actions attrlen For sw_flow_actions, the actions_len only represents the kernel part's size, and when we dump the actions to the userspace, we will do the convertions, so it's true size may become bigger than the actions_len. But unfortunately, for OVS_PACKET_ATTR_ACTIONS, we use the actions_len to alloc the skbuff, so the user_skb's size may become insufficient and oops will happen like this: skbuff: skb_over_panic: text:ffffffff8148fabf len:1749 put:157 head: ffff881300f39000 data:ffff881300f39000 tail:0x6d5 end:0x6c0 dev: ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:129! [...] Call Trace: [] skb_put+0x43/0x44 [] skb_zerocopy+0x6c/0x1f4 [] queue_userspace_packet+0x3a3/0x448 [openvswitch] [] ovs_dp_upcall+0x30/0x5c [openvswitch] [] output_userspace+0x132/0x158 [openvswitch] [] ? ip6_rcv_finish+0x74/0x77 [ipv6] [] do_execute_actions+0xcc1/0xdc8 [openvswitch] [] ovs_execute_actions+0x74/0x106 [openvswitch] [] ovs_dp_process_packet+0xe1/0xfd [openvswitch] [] ? key_extract+0x63c/0x8d5 [openvswitch] [] ovs_vport_receive+0xa1/0xc3 [openvswitch] [...] Also we can find that the actions_len is much little than the orig_len: crash> struct sw_flow_actions 0xffff8812f539d000 struct sw_flow_actions { rcu = { next = 0xffff8812f5398800, func = 0xffffe3b00035db32 }, orig_len = 1384, actions_len = 592, actions = 0xffff8812f539d01c } So as a quick fix, use the orig_len instead of the actions_len to alloc the user_skb. Last, this oops happened on our system running a relative old kernel, but the same risk still exists on the mainline, since we use the wrong actions_len from the beginning. Fixes: ccea74457bbd ("openvswitch: include datapath actions with sampled-packet upcall to userspace") Cc: Neil McKee Signed-off-by: Liping Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/actions.c | 1 + net/openvswitch/datapath.c | 7 ++++--- net/openvswitch/datapath.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) commit d6957f3396d0b1ee54d183524550d791054b5ebe Author: Helge Deller Date: Tue Aug 15 11:34:19 2017 +0200 printk-formats.txt: Better describe the difference between %pS and %pF Sometimes people seems unclear when to use the %pS or %pF printk format. For example, see commit 51d96dc2e2dc ("random: fix warning message on ia64 and parisc") which fixed such a wrong format string. The documentation should be more clear about the difference. Signed-off-by: Helge Deller [pmladek@suse.com: Restructure the entire section] Signed-off-by: Petr Mladek Reviewed-by: Sergey Senozhatsky Signed-off-by: Helge Deller Documentation/printk-formats.txt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 01578e36163cdd0e4fd61d9976de15f13364e26d Author: Oleg Nesterov Date: Tue Aug 15 17:40:11 2017 +0200 x86/elf: Remove the unnecessary ADDR_NO_RANDOMIZE checks The ADDR_NO_RANDOMIZE checks in stack_maxrandom_size() and randomize_stack_top() are not required. PF_RANDOMIZE is set by load_elf_binary() only if ADDR_NO_RANDOMIZE is not set, no need to re-check after that. Signed-off-by: Oleg Nesterov Signed-off-by: Thomas Gleixner Reviewed-by: Dmitry Safonov Cc: stable@vger.kernel.org Cc: Andy Lutomirski Cc: Andrew Morton Cc: Borislav Petkov Cc: Linus Torvalds Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20170815154011.GB1076@redhat.com arch/x86/mm/mmap.c | 3 +-- fs/binfmt_elf.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 47ac5484fd961420e5ec0bb5b972fde381f57365 Author: Oleg Nesterov Date: Tue Aug 15 17:39:52 2017 +0200 x86: Fix norandmaps/ADDR_NO_RANDOMIZE Documentation/admin-guide/kernel-parameters.txt says: norandmaps Don't use address space randomization. Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space but it doesn't work because arch_rnd() which is used to randomize mm->mmap_base returns a random value unconditionally. And as Kirill pointed out, ADDR_NO_RANDOMIZE is broken by the same reason. Just shift the PF_RANDOMIZE check from arch_mmap_rnd() to arch_rnd(). Fixes: 1b028f784e8c ("x86/mm: Introduce mmap_compat_base() for 32-bit mmap()") Signed-off-by: Oleg Nesterov Signed-off-by: Thomas Gleixner Acked-by: Kirill A. Shutemov Acked-by: Cyrill Gorcunov Reviewed-by: Dmitry Safonov Cc: stable@vger.kernel.org Cc: Andy Lutomirski Cc: Andrew Morton Cc: Borislav Petkov Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20170815153952.GA1076@redhat.com arch/x86/mm/mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6170a506899aee3dd4934c928426505e47b1b466 Author: Tushar Dave Date: Wed Aug 16 11:09:10 2017 -0700 sparc64: remove unnecessary log message There is no need to log message if ATU hvapi couldn't get register. Unlike PCI hvapi, ATU hvapi registration failure is not hard error. Even if ATU hvapi registration fails (on system with ATU or without ATU) system continues with legacy IOMMU. So only log message when ATU hvapi successfully get registered. Signed-off-by: Tushar Dave Signed-off-by: David S. Miller arch/sparc/kernel/pci_sun4v.c | 2 -- 1 file changed, 2 deletions(-) commit 47f078339be902e97d0ad828ca1d614a5a95334b Author: Colin Ian King Date: Wed Aug 16 18:21:40 2017 +0100 Revert "staging: fsl-mc: be consistent when checking strcmp() return" The previous fix removed the equal to zero comparisons by the strcmps and now the function always returns true. Revert this change to restore the original correctly functioning code. Detected by CoverityScan, CID#1452267 ("Constant expression result") This reverts commit b93ad9a067e1515af42da7d56bc61f1a25075f94. Fixes: b93ad9a067e1 ("staging: fsl-mc: be consistent when checking strcmp() return") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c7b725be84985532161bcb4fbecd056326998a77 Author: David Ahern Date: Tue Aug 15 18:38:42 2017 -0700 net: igmp: Use ingress interface rather than vrf device Anuradha reported that statically added groups for interfaces enslaved to a VRF device were not persisting. The problem is that igmp queries and reports need to use the data in the in_dev for the real ingress device rather than the VRF device. Update igmp_rcv accordingly. Fixes: e58e41596811 ("net: Enable support for VRF with ipv4 multicast") Reported-by: Anuradha Karuppiah Signed-off-by: David Ahern Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/igmp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 79db795833bf5c3e798bcd7a5aeeee3fb0505927 Author: David S. Miller Date: Tue Aug 15 21:32:19 2017 -0700 sparc64: Don't clibber fixed registers in __multi4. %g4 and %g5 are fixed registers used by the kernel for the thread pointer and the per-cpu offset. Use %o4 and %g7 instead. Diagnosis by Anthony Yznaga. Fixes: 1b4af13ff2cc ("sparc64: Add __multi3 for gcc 7.x and later.") Reported-by: Anatoly Pugachev Tested-by: Anatoly Pugachev Signed-off-by: David S. Miller arch/sparc/lib/multi3.S | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 870201f95fcbd19538aef630393fe9d583eff82e Author: Maor Gottlieb Date: Wed Aug 16 18:57:04 2017 +0300 IB/uverbs: Fix NULL pointer dereference during device removal As part of ib_uverbs_remove_one which might be triggered upon reset flow, we trigger IB_EVENT_DEVICE_FATAL event to userspace application. If device was removed after uverbs fd was opened but before ib_uverbs_get_context was called, the event file will be accessed before it was allocated, result in NULL pointer dereference: [ 72.325873] BUG: unable to handle kernel NULL pointer dereference at (null) ... [ 72.325984] IP: _raw_spin_lock_irqsave+0x22/0x40 [ 72.327123] Call Trace: [ 72.327168] ib_uverbs_async_handler.isra.8+0x2e/0x160 [ib_uverbs] [ 72.327216] ? synchronize_srcu_expedited+0x27/0x30 [ 72.327269] ib_uverbs_remove_one+0x120/0x2c0 [ib_uverbs] [ 72.327330] ib_unregister_device+0xd0/0x180 [ib_core] [ 72.327373] mlx5_ib_remove+0x74/0x140 [mlx5_ib] [ 72.327422] mlx5_remove_device+0xfb/0x110 [mlx5_core] [ 72.327466] mlx5_unregister_interface+0x3c/0xa0 [mlx5_core] [ 72.327509] mlx5_ib_cleanup+0x10/0x962 [mlx5_ib] [ 72.327546] SyS_delete_module+0x155/0x230 [ 72.328472] ? exit_to_usermode_loop+0x70/0xa6 [ 72.329370] do_syscall_64+0x54/0xc0 [ 72.330262] entry_SYSCALL64_slow_path+0x25/0x25 Fix it by checking that user context was allocated before trigger the event. Fixes: 036b10635739 ('IB/uverbs: Enable device removal when there are active user space applications') Signed-off-by: Maor Gottlieb Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e09fc802d05695393a48f6c2d888771b80c4301 Merge: 3280d66 b15bd8c Author: Jens Axboe Date: Wed Aug 16 09:56:34 2017 -0600 Merge branch 'stable/for-jens-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus Pull xen block changes from Konrad: Two fixes, both of them spotted by Amazon: 1) Fix in Xen-blkfront caused by the re-write in 4.8 time-frame. 2) Fix in the xen_biovec_phys_mergeable which allowed guest requests when using NVMe - to slurp up more data than allowed leading to an XSA (which has been made public today). commit 06f8174a97822f6befd28fc2dd315b43b82c700f Author: Shiraz Saleem Date: Mon Jul 17 14:03:50 2017 -0500 IB/core: Protect sysfs entry on ib_unregister_device ib_unregister_device is not protecting removal of sysfs entries. A call to ib_register_device in that window can result in duplicate sysfs entry warning. Move mutex_unlock to after ib_device_unregister_sysfs to protect against sysfs entry creation. This issue is exposed during driver load/unload stress test. WARNING: CPU: 5 PID: 4445 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x5f/0x70 sysfs: cannot create duplicate filename '/class/infiniband/i40iw0' Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./Q87M-D2H BIOS F7 01/17/2014 Workqueue: i40e i40e_service_task [i40e] Call Trace: dump_stack+0x67/0x98 __warn+0xcc/0xf0 warn_slowpath_fmt+0x4a/0x50 ? kernfs_path_from_node+0x4b/0x60 sysfs_warn_dup+0x5f/0x70 sysfs_do_create_link_sd.isra.2+0xb7/0xc0 sysfs_create_link+0x20/0x40 device_add+0x28c/0x600 ib_device_register_sysfs+0x58/0x170 [ib_core] ib_register_device+0x325/0x570 [ib_core] ? i40iw_register_rdma_device+0x1f4/0x400 [i40iw] ? kmem_cache_alloc_trace+0x143/0x330 ? __raw_spin_lock_init+0x2d/0x50 i40iw_register_rdma_device+0x2dc/0x400 [i40iw] i40iw_open+0x10a6/0x1950 [i40iw] ? i40iw_open+0xeab/0x1950 [i40iw] ? i40iw_make_cm_node+0x9c0/0x9c0 [i40iw] i40e_client_subtask+0xa4/0x110 [i40e] i40e_service_task+0xc2d/0x1320 [i40e] process_one_work+0x203/0x710 ? process_one_work+0x16f/0x710 worker_thread+0x126/0x4a0 ? trace_hardirqs_on+0xd/0x10 kthread+0x112/0x150 ? process_one_work+0x710/0x710 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x2e/0x40 ---[ end trace fd11b69e21ea7653 ]--- Couldn't register device i40iw0 with driver model Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d4ba61d218822578dcf6c2453a38e000b0ea01e6 Author: Steve Wise Date: Tue Jul 25 06:51:15 2017 -0700 iw_cxgb4: fix misuse of integer variable Fixes: ee30f7d507c0 ("iw_cxgb4: Max fastreg depth depends on DSGL support") Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b59a3969e95cd9be3699ecf7149ae8ef103b6f5 Author: Colin Ian King Date: Tue Aug 8 18:41:02 2017 +0100 IB/hns: fix memory leak on ah on error return path When dmac is NULL, ah is not being freed on the error return path. Fix this by kfree'ing it. Detected by CoverityScan, CID#1452636 ("Resource Leak") Fixes: d8966fcd4c25 ("IB/core: Use rdma_ah_attr accessor functions") Signed-off-by: Colin Ian King Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_ah.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aa939c12ab8a0c094420ad1b909a957ac590e43e Author: Christopher N Bednarz Date: Tue Aug 8 20:38:48 2017 -0500 i40iw: Fix potential fcn_id_array out of bounds Avoid out of bounds error by utilizing I40IW_MAX_STATS_COUNT instead of I40IW_INVALID_FCN_ID. Signed-off-by: Christopher N Bednarz Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a28f047e5f9b987d614eeee34388087ffdda3e53 Author: Christopher N Bednarz Date: Tue Aug 8 20:38:47 2017 -0500 i40iw: Use correct alignment for CQ0 memory Utilize correct alignment variable when allocating DMA memory for CQ0. Signed-off-by: Christopher N Bednarz Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_puda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29c2415a6669bab354f0aa3445777fe147c7a05d Author: Mustafa Ismail Date: Tue Aug 8 20:38:46 2017 -0500 i40iw: Fix typecast of tcp_seq_num The typecast of tcp_seq_num incorrectly uses u8. Fix by casting to u32. Signed-off-by: Mustafa Ismail Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_uk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8129331f01a683ed8d9a9a65ed01b5c6ad26403a Author: Mustafa Ismail Date: Tue Aug 8 20:38:44 2017 -0500 i40iw: Correct variable names Fix incorrect naming of status code and struct. Use inline instead of immediate. Signed-off-by: Mustafa Ismail Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_status.h | 2 +- drivers/infiniband/hw/i40iw/i40iw_uk.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit f67ace2d8868d06710ceea1b10b124eead5040da Author: Chien Tin Tung Date: Tue Aug 8 20:38:43 2017 -0500 i40iw: Fix parsing of query/commit FPM buffers Parsing of commit/query Host Memory Cache Function Private Memory is not skipping over reserved fields and incorrectly assigning those values into object's base/cnt/max_cnt fields. Skip over reserved fields and set correct values. Also correct memory alignment requirement for commit/query FPM buffers. Signed-off-by: Chien Tin Tung Signed-off-by: Shiraz Saleem Signed-off-by: Christopher N Bednarz Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 121 +++++++++++++++++++++---------- drivers/infiniband/hw/i40iw/i40iw_d.h | 4 +- 2 files changed, 83 insertions(+), 42 deletions(-) commit 31c1a7b8f966470ce136710a95afcf5822fecef8 Author: Rodrigo Vivi Date: Tue Aug 15 20:04:03 2017 -0700 drm/i915/cnl: Fix LSPCON support. When LSPCON support was extended to CNL one part was missed on lspcon_init. So, instead of adding check per platform on lspcon_init let's use HAS_LSPCON that is already there for that purpose. Fixes: ff15947e0f02 ("drm/i915/cnl: LSPCON support is gen9+") Cc: Shashank Sharma Cc: Paulo Zanoni Signed-off-by: Rodrigo Vivi Reviewed-by: Jani Nikula Reviewed-by: Shashank Sharma Link: https://patchwork.freedesktop.org/patch/msgid/20170816030403.11368-1-rodrigo.vivi@intel.com (cherry picked from commit acf58d4e965d40fc014252292b0911b4c9fe6697) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lspcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c648bde211baeda7a029bd6be4957e8be48d8c9 Author: Jani Nikula Date: Fri Aug 11 14:39:07 2017 +0300 drm/i915/vbt: ignore extraneous child devices for a port Ever since we've parsed VBT child devices, starting from 6acab15a7b0d ("drm/i915: use the HDMI DDI buffer translations from VBT"), we've ignored the child device information if more than one child device references the same port. The rationale for this seems lost in time. Since commit 311a20949f04 ("drm/i915: don't init DP or HDMI when not supported by DDI port") we started using this information more to skip HDMI/DP init if the port wasn't there per VBT child devices. However, at the same time it added port defaults without further explanation. Thus, if the child device info was skipped due to multiple child devices referencing the same port, the device info would be retrieved from the somewhat arbitrary defaults. Finally, when commit bb1d132935c2 ("drm/i915/vbt: split out defaults that are set when there is no VBT") stopped initializing the defaults whenever VBT is present, thus trusting the VBT more, we stopped initializing ports which were referenced by more than one child device. Apparently at least Asus UX305UA, UX305U, and UX306U laptops have VBT child device blocks which cause this behaviour. Arguably they were shipped with a broken VBT. Relax the rules for multiple references to the same port, and use the first child device info to reference a port. Retain the logic to debug log about this, though. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101745 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196233 Fixes: bb1d132935c2 ("drm/i915/vbt: split out defaults that are set when there is no VBT") Tested-by: Oliver Weißbarth Reported-by: Oliver Weißbarth Reported-by: Didier G Reported-by: Giles Anderson Cc: Manasi Navare Cc: Ville Syrjälä Cc: Paulo Zanoni Cc: # v4.12+ Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170811113907.6716-1-jani.nikula@intel.com Signed-off-by: Jani Nikula (cherry picked from commit b5273d72750555a673040070bfb23c454a7cd3ef) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_bios.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 211b7aac5443d347ff7b6dabf54702b40228cfaf Author: Balasubramaniam, Hari Chand Date: Tue Aug 15 10:05:46 2017 +0800 drm/i915: Initialize 'data' in intel_dsi_dcs_backlight.c variable 'data' may be used uninitialized in this function. thus, 'function dcs_get_backlight' will return unwanted value/fail. Thus, adding NULL initialized to 'data' variable will solve the return failure happening. v2: Change commit message to reflect upstream with proper message Fixes: 90198355b83c ("drm/i915/dsi: Add DCS control for Panel PWM") Cc: Jani Nikula Cc: Daniel Vetter Cc: Yetunde Adebisi Cc: Deepak M Cc: Jani Nikula Signed-off-by: Balasubramaniam, Hari Chand Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1502762746-191826-1-git-send-email-hari.chand.balasubramaniam@intel.com (cherry picked from commit d59814a5b4852442e1d03c569a4542f8b08356a7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7d2e03928c1936004750c56faf7534c8534f875 Author: Bryan Tan Date: Thu Aug 10 12:05:02 2017 -0700 RDMA/vmw_pvrdma: Report CQ missed events There is a chance of a race between arming the CQ and receiving completions. By reporting CQ missed events any ULPs should poll again to get the completions. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Acked-by: Aditya Sarwade Signed-off-by: Bryan Tan Signed-off-by: Adit Ranadive Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit c88c094985ad38c6f71ab5b0d3d68757db14c8b2 Author: Christophe JAILLET Date: Wed Aug 16 07:31:03 2017 +0200 sata: ahci-da850: Fix some error handling paths in 'ahci_da850_probe()' 'rc' is known to be 0 at this point. If 'platform_get_resource()' or 'devm_ioremap()' fail, return -ENOMEM instead of 0 which means success. tj: Changed error code from -ENOMEM to -ENODEV for get_resource failure as suggested by Sergei. Signed-off-by: Christophe JAILLET Signed-off-by: Tejun Heo Cc: Sergei Shtylyov drivers/ata/ahci_da850.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5a69aec945d27e78abac9fd032533d3aaebf7c1e Author: Benjamin Herrenschmidt Date: Wed Aug 16 16:01:14 2017 +1000 powerpc: Fix VSX enabling/flushing to also test MSR_FP and MSR_VEC VSX uses a combination of the old vector registers, the old FP registers and new "second halves" of the FP registers. Thus when we need to see the VSX state in the thread struct (flush_vsx_to_thread()) or when we'll use the VSX in the kernel (enable_kernel_vsx()) we need to ensure they are all flushed into the thread struct if either of them is individually enabled. Unfortunately we only tested if the whole VSX was enabled, not if they were individually enabled. Fixes: 72cd7b44bc99 ("powerpc: Uncomment and make enable_kernel_vsx() routine available") Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 16a5a480f067f945fd27bf91ffdce3f959b0d4b6 Author: James Smart Date: Mon Aug 14 11:20:32 2017 -0700 nvmet-fc: correct use after free on list teardown Use list_for_each_entry_safe to prevent list handling from referencing next pointers directly after list_del's Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/target/fc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 42819eb7a0957cc340ad4ed8bba736bab5ebc464 Author: Martin Wilck Date: Mon Aug 14 22:12:37 2017 +0200 nvmet: don't overwrite identify sn/fr with 0-bytes The merged version of my patch "nvmet: don't report 0-bytes in serial number" fails to remove two lines which should have been replaced, so that the space-padded strings are overwritten again with 0-bytes. Fix it. Fixes: 42de82a8b544 nvmet: don't report 0-bytes in serial number Signed-off-by: Martin Wilck Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/admin-cmd.c | 6 ------ 1 file changed, 6 deletions(-) commit 4098116039911e8870d84c975e2ec22dab65a909 Author: Thomas Bogendoerfer Date: Sat Aug 12 23:36:47 2017 +0200 parisc: pci memory bar assignment fails with 64bit kernels on dino/cujo For 64bit kernels the lmmio_space_offset of the host bridge window isn't set correctly on systems with dino/cujo PCI host bridges. This leads to not assigned memory bars and failing drivers, which need to use these bars. Signed-off-by: Thomas Bogendoerfer Cc: Acked-by: Helge Deller Signed-off-by: Helge Deller drivers/parisc/dino.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 510c8a899caf095cb13d09d203573deef15db2fe Merge: 40c6d1b 88a5c69 Author: Linus Torvalds Date: Tue Aug 15 18:52:28 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix TCP checksum offload handling in iwlwifi driver, from Emmanuel Grumbach. 2) In ksz DSA tagging code, free SKB if skb_put_padto() fails. From Vivien Didelot. 3) Fix two regressions with bonding on wireless, from Andreas Born. 4) Fix build when busypoll is disabled, from Daniel Borkmann. 5) Fix copy_linear_skb() wrt. SO_PEEK_OFF, from Eric Dumazet. 6) Set SKB cached route properly in inet_rtm_getroute(), from Florian Westphal. 7) Fix PCI-E relaxed ordering handling in cxgb4 driver, from Ding Tianhong. 8) Fix module refcnt leak in ULP code, from Sabrina Dubroca. 9) Fix use of GFP_KERNEL in atomic contexts in AF_KEY code, from Eric Dumazet. 10) Need to purge socket write queue in dccp_destroy_sock(), also from Eric Dumazet. 11) Make bpf_trace_printk() work properly on 32-bit architectures, from Daniel Borkmann. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits) bpf: fix bpf_trace_printk on 32 bit archs PCI: fix oops when try to find Root Port for a PCI device sfc: don't try and read ef10 data on non-ef10 NIC net_sched: remove warning from qdisc_hash_add net_sched/sfq: update hierarchical backlog when drop packet net_sched: reset pointers to tcf blocks in classful qdiscs' destructors ipv4: fix NULL dereference in free_fib_info_rcu() net: Fix a typo in comment about sock flags. ipv6: fix NULL dereference in ip6_route_dev_notify() tcp: fix possible deadlock in TCP stack vs BPF filter dccp: purge write queue in dccp_destroy_sock() udp: fix linear skb reception with PEEK_OFF ipv6: release rt6->rt6i_idev properly during ifdown af_key: do not use GFP_KERNEL in atomic contexts tcp: ulp: avoid module refcnt leak in tcp_set_ulp net/cxgb4vf: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag net/cxgb4: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag PCI: Disable Relaxed Ordering Attributes for AMD A1100 PCI: Disable Relaxed Ordering for some Intel processors PCI: Disable PCIe Relaxed Ordering if unsupported ... commit 88a5c690b66110ad255380d8f629c629cf6ca559 Author: Daniel Borkmann Date: Wed Aug 16 01:45:33 2017 +0200 bpf: fix bpf_trace_printk on 32 bit archs James reported that on MIPS32 bpf_trace_printk() is currently broken while MIPS64 works fine: bpf_trace_printk() uses conditional operators to attempt to pass different types to __trace_printk() depending on the format operators. This doesn't work as intended on 32-bit architectures where u32 and long are passed differently to u64, since the result of C conditional operators follows the "usual arithmetic conversions" rules, such that the values passed to __trace_printk() will always be u64 [causing issues later in the va_list handling for vscnprintf()]. For example the samples/bpf/tracex5 test printed lines like below on MIPS32, where the fd and buf have come from the u64 fd argument, and the size from the buf argument: [...] 1180.941542: 0x00000001: write(fd=1, buf= (null), size=6258688) Instead of this: [...] 1625.616026: 0x00000001: write(fd=1, buf=009e4000, size=512) One way to get it working is to expand various combinations of argument types into 8 different combinations for 32 bit and 64 bit kernels. Fix tested by James on MIPS32 and MIPS64 as well that it resolves the issue. Fixes: 9c959c863f82 ("tracing: Allow BPF programs to call bpf_trace_printk()") Reported-by: James Hogan Tested-by: James Hogan Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/trace/bpf_trace.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) commit 0e405232871d67bf1b238d56b6b3d500e69ebbf3 Author: dingtianhong Date: Tue Aug 15 23:24:48 2017 +0800 PCI: fix oops when try to find Root Port for a PCI device Eric report a oops when booting the system after applying the commit a99b646afa8a ("PCI: Disable PCIe Relaxed..."): [ 4.241029] BUG: unable to handle kernel NULL pointer dereference at 0000000000000050 [ 4.247001] IP: pci_find_pcie_root_port+0x62/0x80 [ 4.253011] PGD 0 [ 4.253011] P4D 0 [ 4.253011] [ 4.258013] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC [ 4.262015] Modules linked in: [ 4.265005] CPU: 31 PID: 1 Comm: swapper/0 Not tainted 4.13.0-dbx-DEV #316 [ 4.271002] Hardware name: Intel RML,PCH/Iota_QC_19, BIOS 2.40.0 06/22/2016 [ 4.279002] task: ffffa2ee38cfa040 task.stack: ffffa51ec0004000 [ 4.285001] RIP: 0010:pci_find_pcie_root_port+0x62/0x80 [ 4.290012] RSP: 0000:ffffa51ec0007ab8 EFLAGS: 00010246 [ 4.295003] RAX: 0000000000000000 RBX: ffffa2ee36bae000 RCX: 0000000000000006 [ 4.303002] RDX: 000000000000081c RSI: ffffa2ee38cfa8c8 RDI: ffffa2ee36bae000 [ 4.310013] RBP: ffffa51ec0007b58 R08: 0000000000000001 R09: 0000000000000000 [ 4.317001] R10: 0000000000000000 R11: 0000000000000000 R12: ffffa51ec0007ad0 [ 4.324005] R13: ffffa2ee36bae098 R14: 0000000000000002 R15: ffffa2ee37204818 [ 4.331002] FS: 0000000000000000(0000) GS:ffffa2ee3fcc0000(0000) knlGS:0000000000000000 [ 4.339002] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4.345001] CR2: 0000000000000050 CR3: 000000401000f000 CR4: 00000000001406e0 [ 4.351002] Call Trace: [ 4.354012] ? pci_configure_device+0x19f/0x570 [ 4.359002] ? pci_conf1_read+0xb8/0xf0 [ 4.363002] ? raw_pci_read+0x23/0x40 [ 4.366011] ? pci_read+0x2c/0x30 [ 4.370014] ? pci_read_config_word+0x67/0x70 [ 4.374012] pci_device_add+0x28/0x230 [ 4.378012] ? pci_vpd_f0_read+0x50/0x80 [ 4.382014] pci_scan_single_device+0x96/0xc0 [ 4.386012] pci_scan_slot+0x79/0xf0 [ 4.389001] pci_scan_child_bus+0x31/0x180 [ 4.394014] acpi_pci_root_create+0x1c6/0x240 [ 4.398013] pci_acpi_scan_root+0x15f/0x1b0 [ 4.402012] acpi_pci_root_add+0x2e6/0x400 [ 4.406012] ? acpi_evaluate_integer+0x37/0x60 [ 4.411002] acpi_bus_attach+0xdf/0x200 [ 4.415002] acpi_bus_attach+0x6a/0x200 [ 4.418014] acpi_bus_attach+0x6a/0x200 [ 4.422013] acpi_bus_scan+0x38/0x70 [ 4.426011] acpi_scan_init+0x10c/0x271 [ 4.429001] acpi_init+0x2fa/0x348 [ 4.433004] ? acpi_sleep_proc_init+0x2d/0x2d [ 4.437001] do_one_initcall+0x43/0x169 [ 4.441001] kernel_init_freeable+0x1d0/0x258 [ 4.445003] ? rest_init+0xe0/0xe0 [ 4.449001] kernel_init+0xe/0x150 ====================== cut here ============================= It looks like the pci_find_pcie_root_port() was trying to find the Root Port for the PCI device which is the Root Port already, it will return NULL and trigger the problem, so check the highest_pcie_bridge to fix thie problem. Fixes: a99b646afa8a ("PCI: Disable PCIe Relaxed Ordering if unsupported") Fixes: c56d4450eb68 ("PCI: Turn off Request Attributes to avoid Chelsio T5 Completion erratum") Reported-by: Eric Dumazet Signed-off-by: Eric Dumazet Signed-off-by: Ding Tianhong Signed-off-by: David S. Miller drivers/pci/pci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 61deee962896f7eb547adc66ef09c8f1e7ddf7d7 Author: Bert Kenward Date: Tue Aug 15 14:55:32 2017 +0100 sfc: don't try and read ef10 data on non-ef10 NIC The MAC stats command takes a port ID, which doesn't exist on pre-ef10 NICs (5000- and 6000- series). This is extracted from the NIC specific data; we misinterpret this as the ef10 data structure, causing us to read potentially unallocated data. With a KASAN kernel this can cause errors with: BUG: KASAN: slab-out-of-bounds in efx_mcdi_mac_stats Fixes: 0a2ab4d988d7 ("sfc: set the port-id when calling MC_CMD_MAC_STATS") Reported-by: Stefano Brivio Tested-by: Stefano Brivio Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi_port.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c90e95147c27b1780e76c6e8fea1b5c78d7d387f Author: Konstantin Khlebnikov Date: Tue Aug 15 16:39:05 2017 +0300 net_sched: remove warning from qdisc_hash_add It was added in commit e57a784d8cae ("pkt_sched: set root qdisc before change() in attach_default_qdiscs()") to hide duplicates from "tc qdisc show" for incative deivices. After 59cc1f61f ("net: sched: convert qdisc linked list to hashtable") it triggered when classful qdisc is added to inactive device because default qdiscs are added before switching root qdisc. Anyway after commit ea3274695353 ("net: sched: avoid duplicates in qdisc dump") duplicates are filtered right in dumper. Signed-off-by: Konstantin Khlebnikov Signed-off-by: David S. Miller net/sched/sch_api.c | 3 --- 1 file changed, 3 deletions(-) commit 325d5dc3f7e7c2840b65e4a2988c082c2c0025c5 Author: Konstantin Khlebnikov Date: Tue Aug 15 16:37:04 2017 +0300 net_sched/sfq: update hierarchical backlog when drop packet When sfq_enqueue() drops head packet or packet from another queue it have to update backlog at upper qdiscs too. Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Signed-off-by: Konstantin Khlebnikov Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_sfq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 898904226b5a6dee657f23cf51e385f50da22596 Author: Konstantin Khlebnikov Date: Tue Aug 15 16:35:21 2017 +0300 net_sched: reset pointers to tcf blocks in classful qdiscs' destructors Traffic filters could keep direct pointers to classes in classful qdisc, thus qdisc destruction first removes all filters before freeing classes. Class destruction methods also tries to free attached filters but now this isn't safe because tcf_block_put() unlike to tcf_destroy_chain() cannot be called second time. This patch set class->block to NULL after first tcf_block_put() and turn second call into no-op. Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure") Signed-off-by: Konstantin Khlebnikov Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/sch_atm.c | 4 +++- net/sched/sch_cbq.c | 4 +++- net/sched/sch_hfsc.c | 4 +++- net/sched/sch_htb.c | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) commit 187e5b3ac84d3421d2de3aca949b2791fbcad554 Author: Eric Dumazet Date: Tue Aug 15 05:26:17 2017 -0700 ipv4: fix NULL dereference in free_fib_info_rcu() If fi->fib_metrics could not be allocated in fib_create_info() we attempt to dereference a NULL pointer in free_fib_info_rcu() : m = fi->fib_metrics; if (m != &dst_default_metrics && atomic_dec_and_test(&m->refcnt)) kfree(m); Before my recent patch, we used to call kfree(NULL) and nothing wrong happened. Instead of using RCU to defer freeing while we are under memory stress, it seems better to take immediate action. This was reported by syzkaller team. Fixes: 3fb07daff8e9 ("ipv4: add reference counting to metrics") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit b3dc8f772fab5b2d284b780830fd56494491e493 Author: Tonghao Zhang Date: Tue Aug 15 04:28:54 2017 -0700 net: Fix a typo in comment about sock flags. Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller include/linux/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12d94a804946af291e24b80fc53ec86264765781 Author: Eric Dumazet Date: Tue Aug 15 04:09:51 2017 -0700 ipv6: fix NULL dereference in ip6_route_dev_notify() Based on a syzkaller report [1], I found that a per cpu allocation failure in snmp6_alloc_dev() would then lead to NULL dereference in ip6_route_dev_notify(). It seems this is a very old bug, thus no Fixes tag in this submission. Let's add in6_dev_put_clear() helper, as we will probably use it elsewhere (once available/present in net-next) [1] kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 17294 Comm: syz-executor6 Not tainted 4.13.0-rc2+ #10 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff88019f456680 task.stack: ffff8801c6e58000 RIP: 0010:__read_once_size include/linux/compiler.h:250 [inline] RIP: 0010:atomic_read arch/x86/include/asm/atomic.h:26 [inline] RIP: 0010:refcount_sub_and_test+0x7d/0x1b0 lib/refcount.c:178 RSP: 0018:ffff8801c6e5f1b0 EFLAGS: 00010202 RAX: 0000000000000037 RBX: dffffc0000000000 RCX: ffffc90005d25000 RDX: ffff8801c6e5f218 RSI: ffffffff82342bbf RDI: 0000000000000001 RBP: ffff8801c6e5f240 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff10038dcbe37 R13: 0000000000000006 R14: 0000000000000001 R15: 00000000000001b8 FS: 00007f21e0429700(0000) GS:ffff8801dc100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001ddbc22000 CR3: 00000001d632b000 CR4: 00000000001426e0 DR0: 0000000020000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Call Trace: refcount_dec_and_test+0x1a/0x20 lib/refcount.c:211 in6_dev_put include/net/addrconf.h:335 [inline] ip6_route_dev_notify+0x1c9/0x4a0 net/ipv6/route.c:3732 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x51/0x90 net/core/dev.c:1678 call_netdevice_notifiers net/core/dev.c:1694 [inline] rollback_registered_many+0x91c/0xe80 net/core/dev.c:7107 rollback_registered+0x1be/0x3c0 net/core/dev.c:7149 register_netdevice+0xbcd/0xee0 net/core/dev.c:7587 register_netdev+0x1a/0x30 net/core/dev.c:7669 loopback_net_init+0x76/0x160 drivers/net/loopback.c:214 ops_init+0x10a/0x570 net/core/net_namespace.c:118 setup_net+0x313/0x710 net/core/net_namespace.c:294 copy_net_ns+0x27c/0x580 net/core/net_namespace.c:418 create_new_namespaces+0x425/0x880 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xae/0x1e0 kernel/nsproxy.c:206 SYSC_unshare kernel/fork.c:2347 [inline] SyS_unshare+0x653/0xfa0 kernel/fork.c:2297 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4512c9 RSP: 002b:00007f21e0428c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000110 RAX: ffffffffffffffda RBX: 0000000000718150 RCX: 00000000004512c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000062020200 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b973d R13: 00000000ffffffff R14: 000000002001d000 R15: 00000000000002dd Code: 50 2b 34 82 c7 00 f1 f1 f1 f1 c7 40 04 04 f2 f2 f2 c7 40 08 f3 f3 f3 f3 e8 a1 43 39 ff 4c 89 f8 48 8b 95 70 ff ff ff 48 c1 e8 03 <0f> b6 0c 18 4c 89 f8 83 e0 07 83 c0 03 38 c8 7c 08 84 c9 0f 85 RIP: __read_once_size include/linux/compiler.h:250 [inline] RSP: ffff8801c6e5f1b0 RIP: atomic_read arch/x86/include/asm/atomic.h:26 [inline] RSP: ffff8801c6e5f1b0 RIP: refcount_sub_and_test+0x7d/0x1b0 lib/refcount.c:178 RSP: ffff8801c6e5f1b0 ---[ end trace e441d046c6410d31 ]--- Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller include/net/addrconf.h | 10 ++++++++++ net/ipv6/route.c | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit b5fed474b98332559f2590c6bc90388a0899e793 Author: Jan Kara Date: Tue Aug 15 13:00:37 2017 +0200 audit: Receive unmount event Although audit_watch_handle_event() can handle FS_UNMOUNT event, it is not part of AUDIT_FS_WATCH mask and thus such event never gets to audit_watch_handle_event(). Thus fsnotify marks are deleted by fsnotify subsystem on unmount without audit being notified about that which leads to a strange state of existing audit rules with dead fsnotify marks. Add FS_UNMOUNT to the mask of events to be received so that audit can clean up its state accordingly. Signed-off-by: Jan Kara Signed-off-by: Paul Moore kernel/audit_watch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d76036ab47eafa6ce52b69482e91ca3ba337d6d6 Author: Jan Kara Date: Tue Aug 15 13:00:36 2017 +0200 audit: Fix use after free in audit_remove_watch_rule() audit_remove_watch_rule() drops watch's reference to parent but then continues to work with it. That is not safe as parent can get freed once we drop our reference. The following is a trivial reproducer: mount -o loop image /mnt touch /mnt/file auditctl -w /mnt/file -p wax umount /mnt auditctl -D Grab our own reference in audit_remove_watch_rule() earlier to make sure mark does not get freed under us. CC: stable@vger.kernel.org Reported-by: Tony Jones Signed-off-by: Jan Kara Tested-by: Tony Jones Signed-off-by: Paul Moore kernel/audit_watch.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 40c6d1b9e2fc4251ca19fa69398f6fa34e813e27 Merge: fcd0735 622b2fb Author: Linus Torvalds Date: Tue Aug 15 12:49:43 2017 -0700 Merge tag 'linux-kselftest-4.13-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "This update consists of important compile and run-time error fixes to timers/freq-step, kmod, and sysctl tests" * tag 'linux-kselftest-4.13-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: timers: freq-step: fix compile error selftests: futex: fix run_tests target test_sysctl: fix sysctl.sh by making it executable test_kmod: fix kmod.sh by making it executable commit 7a7c286d07f9c704e8fd11dd960bf421cc67b66b Author: Chunming Zhou Date: Fri Aug 11 09:34:33 2017 +0800 drm/amdgpu: save list length when fence is signaled update the list first to avoid redundant checks. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 0a6f04184d3d9c21cb6aa12140732aac6930922a Merge: d624d27 e9bf53a Author: David S. Miller Date: Tue Aug 15 10:19:14 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.13 This time quite a few fixes for iwlwifi and one major regression fix for brcmfmac. For the iwlwifi aggregation bug a small change was needed for mac80211, but as Johannes is still away the mac80211 patch is taken via wireless-drivers tree. brcmfmac * fix firmware crash (a recent regression in bcm4343{0,1,8} iwlwifi * Some simple PCI HW ID fix-ups and additions for family 9000 * Remove a bogus warning message with new FWs (bug #196915) * Don't allow illegal channel options to be used (bug #195299) * A fix for checksum offload in family 9000 * A fix serious throughput degradation in 11ac with multiple streams * An old bug in SMPS where the firmware was not aware of SMPS changes * Fix a memory leak in the SAR code * Fix a stuck queue case in AP mode; * Convert a WARN to a simple debug in a legitimate race case (from which we can recover) * Fix a severe throughput aggregation on 9000-family devices due to aggregation issues, needed a small change in mac80211 ==================== Signed-off-by: David S. Miller commit 44506752fafae0c9358af95ffc89c687ce56650e Merge: 64c2c37 8ff235f Author: Arnd Bergmann Date: Tue Aug 15 17:37:10 2017 +0200 Merge tag 'at91-ab-4.13-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into fixes Pull "DT fixes for 4.13" from Alexandre Belloni: - Fix NAND flash support for sama5d2 * tag 'at91-ab-4.13-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: sama5d2: fix EBI/NAND controllers declaration ARM: dts: at91: sama5d2: use sama5d2 compatible string for SMC commit 64c2c372dbcf1b701b79e1f6f0f75c5c83529994 Merge: 69a80d8 8317562 Author: Arnd Bergmann Date: Tue Aug 15 17:34:52 2017 +0200 Merge tag 'imx-fixes-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes Pull "i.MX fixes for 4.13, round 2" from Shawn Guo: - Add missing 'ranges' property for i.MX25 device tree TSCADC node, so that it's child nodes ADC and TSC device can be probed by kernel. - Fix i.MX GPCv2 power domain driver to request regulator after power domain initialization, since regulator could defer probing and therefore cause power domain initialized twice. * tag 'imx-fixes-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: i.MX25: add ranges to tscadc soc: imx: gpcv2: fix regulator deferred probe commit 69a80d8c2cb0956fc2aab41aae786ed0c663b582 Merge: aae4e7a 0596956 Author: Arnd Bergmann Date: Tue Aug 15 17:34:04 2017 +0200 Merge tag 'imx-fixes-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes Pull "i.MX fixes for 4.13" from Shawn Guo: - A fix for imx7d-sdb board to move pinctrl_spi4 pins from low power iomux controller to normal iomuxc node, as the pins belong to normal iomuxc rather than low power one. * tag 'imx-fixes-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx7d-sdb: Put pinctrl_spi4 in the correct location commit b15bd8cb37598afb2963f7eb9e2de468d2d60a2f Author: Munehisa Kamata Date: Wed Aug 9 15:31:40 2017 -0700 xen-blkfront: use a right index when checking requests Since commit d05d7f40791c ("Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block") and 3fc9d690936f ("Merge branch 'for-4.8/drivers' of git://git.kernel.dk/linux-block"), blkfront_resume() has been using an index for iterating ring_info to check request when iterating blk_shadow in an inner loop. This seems to have been accidentally introduced during the massive rewrite of the block layer macros in the commits. This may cause crash like this: [11798.057074] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048 [11798.058832] IP: [] blkfront_resume+0x10a/0x610 .... [11798.061063] Call Trace: [11798.061063] [] xenbus_dev_resume+0x53/0x140 [11798.061063] [] ? xenbus_dev_probe+0x150/0x150 [11798.061063] [] dpm_run_callback+0x3e/0x110 [11798.061063] [] device_resume+0x88/0x190 [11798.061063] [] dpm_resume+0x100/0x2d0 [11798.061063] [] dpm_resume_end+0x11/0x20 [11798.061063] [] do_suspend+0xe8/0x1a0 [11798.061063] [] shutdown_handler+0xfd/0x130 [11798.061063] [] ? split+0x110/0x110 [11798.061063] [] xenwatch_thread+0x86/0x120 [11798.061063] [] ? prepare_to_wait_event+0x110/0x110 [11798.061063] [] kthread+0xd7/0xf0 [11798.061063] [] ? kfree+0x121/0x170 [11798.061063] [] ? kthread_park+0x60/0x60 [11798.061063] [] ? call_usermodehelper_exec_work+0xb0/0xb0 [11798.061063] [] ? call_usermodehelper_exec_async+0x13a/0x140 [11798.061063] [] ret_from_fork+0x25/0x30 Use the right index in the inner loop. Fixes: d05d7f40791c ("Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block") Fixes: 3fc9d690936f ("Merge branch 'for-4.8/drivers' of git://git.kernel.dk/linux-block") Signed-off-by: Munehisa Kamata Reviewed-by: Thomas Friebel Reviewed-by: Eduardo Valentin Reviewed-by: Boris Ostrovsky Cc: Juergen Gross Cc: Konrad Rzeszutek Wilk Reviewed-by: Roger Pau Monne Cc: xen-devel@lists.xenproject.org Cc: stable@vger.kernel.org Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 462cdace790ac2ed6aad1b19c9c0af0143b6aab0 Author: Roger Pau Monne Date: Tue Jul 18 15:01:00 2017 +0100 xen: fix bio vec merging The current test for bio vec merging is not fully accurate and can be tricked into merging bios when certain grant combinations are used. The result of these malicious bio merges is a bio that extends past the memory page used by any of the originating bios. Take into account the following scenario, where a guest creates two grant references that point to the same mfn, ie: grant 1 -> mfn A, grant 2 -> mfn A. These references are then used in a PV block request, and mapped by the backend domain, thus obtaining two different pfns that point to the same mfn, pfn B -> mfn A, pfn C -> mfn A. If those grants happen to be used in two consecutive sectors of a disk IO operation becoming two different bios in the backend domain, the checks in xen_biovec_phys_mergeable will succeed, because bfn1 == bfn2 (they both point to the same mfn). However due to the bio merging, the backend domain will end up with a bio that expands past mfn A into mfn A + 1. Fix this by making sure the check in xen_biovec_phys_mergeable takes into account the offset and the length of the bio, this basically replicates whats done in __BIOVEC_PHYS_MERGEABLE using mfns (bus addresses). While there also remove the usage of __BIOVEC_PHYS_MERGEABLE, since that's already checked by the callers of xen_biovec_phys_mergeable. CC: stable@vger.kernel.org Reported-by: "Jan H. Schönherr" Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Signed-off-by: Konrad Rzeszutek Wilk drivers/xen/biomerge.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3280d66a6363af0df0441709bc0bc302bd9a2510 Author: Keith Busch Date: Mon Aug 14 16:40:11 2017 -0400 blk-mq: Fix queue usage on failed request allocation blk_mq_get_request() does not release the callers queue usage counter when allocation fails. The caller still needs to account for its own queue usage when it is unable to allocate a request. Fixes: 1ad43c0078b7 ("blk-mq: don't leak preempt counter/q_usage_counter when allocating rq failed") Reported-by: Max Gurtovoy Reviewed-by: Ming Lei Reviewed-by: Sagi Grimberg Tested-by: Max Gurtovoy Signed-off-by: Keith Busch Signed-off-by: Jens Axboe block/blk-mq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2926a2aa5c14fb2add75e6584845b1c03022235f Author: Joerg Roedel Date: Mon Aug 14 17:19:26 2017 +0200 iommu: Fix wrong freeing of iommu_device->dev The struct iommu_device has a 'struct device' embedded into it, not as a pointer, but the whole struct. In the conversion of the iommu drivers to use struct iommu_device it was forgotten that the relase function for that struct device simply calls kfree() on the pointer. This frees memory that was never allocated and causes memory corruption. To fix this issue, use a pointer to struct device instead of embedding the whole struct. This needs some updates in the iommu sysfs code as well as the Intel VT-d and AMD IOMMU driver. Reported-by: Sebastian Ott Fixes: 39ab9555c241 ('iommu: Add sysfs bindings for struct iommu_device') Cc: stable@vger.kernel.org # >= v4.11 Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_types.h | 4 +++- drivers/iommu/intel-iommu.c | 4 +++- drivers/iommu/iommu-sysfs.c | 32 ++++++++++++++++++++------------ include/linux/iommu.h | 12 +++++++++++- 4 files changed, 37 insertions(+), 15 deletions(-) commit 84393817db09bb436e934f8f8cc981cbca9ea4dc Author: Thomas Gleixner Date: Tue Aug 15 13:03:47 2017 +0200 x86/mtrr: Prevent CPU hotplug lock recursion Larry reported a CPU hotplug lock recursion in the MTRR code. ============================================ WARNING: possible recursive locking detected systemd-udevd/153 is trying to acquire lock: (cpu_hotplug_lock.rw_sem){.+.+.+}, at: [] stop_machine+0x16/0x30 but task is already holding lock: (cpu_hotplug_lock.rw_sem){.+.+.+}, at: [] mtrr_add_page+0x83/0x470 .... cpus_read_lock+0x48/0x90 stop_machine+0x16/0x30 mtrr_add_page+0x18b/0x470 mtrr_add+0x3e/0x70 mtrr_add_page() holds the hotplug rwsem already and calls stop_machine() which acquires it again. Call stop_machine_cpuslocked() instead. Reported-and-tested-by: Larry Finger Reported-by: Dmitry Vyukov Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1708140920250.1865@nanos Cc: "Paul E. McKenney" Cc: Borislav Petkov arch/x86/kernel/cpu/mtrr/main.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit a0ffc51e20e90e0c1c2491de2b4b03f48b6caaba Author: Maarten Lankhorst Date: Tue Aug 15 11:57:06 2017 +0200 drm/atomic: If the atomic check fails, return its value first The last part of drm_atomic_check_only is testing whether we need to fail with -EINVAL when modeset is not allowed, but forgets to return the value when atomic_check() fails first. This results in -EDEADLK being replaced by -EINVAL, and the sanity check in drm_modeset_drop_locks kicks in: [ 308.531734] ------------[ cut here ]------------ [ 308.531791] WARNING: CPU: 0 PID: 1886 at drivers/gpu/drm/drm_modeset_lock.c:217 drm_modeset_drop_locks+0x33/0xc0 [drm] [ 308.531828] Modules linked in: [ 308.532050] CPU: 0 PID: 1886 Comm: kms_atomic Tainted: G U W 4.13.0-rc5-patser+ #5225 [ 308.532082] Hardware name: NUC5i7RYB, BIOS RYBDWi35.86A.0246.2015.0309.1355 03/09/2015 [ 308.532124] task: ffff8800cd9dae00 task.stack: ffff8800ca3b8000 [ 308.532168] RIP: 0010:drm_modeset_drop_locks+0x33/0xc0 [drm] [ 308.532189] RSP: 0018:ffff8800ca3bf980 EFLAGS: 00010282 [ 308.532211] RAX: dffffc0000000000 RBX: ffff8800ca3bfaf8 RCX: 0000000013a171e6 [ 308.532235] RDX: 1ffff10019477f69 RSI: ffffffffa8ba4fa0 RDI: ffff8800ca3bfb48 [ 308.532258] RBP: ffff8800ca3bf998 R08: 0000000000000000 R09: 0000000000000003 [ 308.532281] R10: 0000000079dbe066 R11: 00000000f760b34b R12: 0000000000000001 [ 308.532304] R13: dffffc0000000000 R14: 00000000ffffffea R15: ffff880096889680 [ 308.532328] FS: 00007ff00959cec0(0000) GS:ffff8800d4e00000(0000) knlGS:0000000000000000 [ 308.532359] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 308.532380] CR2: 0000000000000008 CR3: 00000000ca2e3000 CR4: 00000000003406f0 [ 308.532402] Call Trace: [ 308.532440] drm_mode_atomic_ioctl+0x19fa/0x1c00 [drm] [ 308.532488] ? drm_atomic_set_property+0x1220/0x1220 [drm] [ 308.532565] ? avc_has_extended_perms+0xc39/0xff0 [ 308.532593] ? lock_downgrade+0x610/0x610 [ 308.532640] ? drm_atomic_set_property+0x1220/0x1220 [drm] [ 308.532680] drm_ioctl_kernel+0x154/0x1a0 [drm] [ 308.532755] drm_ioctl+0x624/0x8f0 [drm] [ 308.532858] ? drm_atomic_set_property+0x1220/0x1220 [drm] [ 308.532976] ? drm_getunique+0x210/0x210 [drm] [ 308.533061] do_vfs_ioctl+0xd92/0xe40 [ 308.533121] ? ioctl_preallocate+0x1b0/0x1b0 [ 308.533160] ? selinux_capable+0x20/0x20 [ 308.533191] ? do_fcntl+0x1b1/0xbf0 [ 308.533219] ? kasan_slab_free+0xa2/0xb0 [ 308.533249] ? f_getown+0x4b/0xa0 [ 308.533278] ? putname+0xcf/0xe0 [ 308.533309] ? security_file_ioctl+0x57/0x90 [ 308.533342] SyS_ioctl+0x4e/0x80 [ 308.533374] entry_SYSCALL_64_fastpath+0x18/0xad [ 308.533405] RIP: 0033:0x7ff00779e4d7 [ 308.533431] RSP: 002b:00007fff66a043d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 308.533481] RAX: ffffffffffffffda RBX: 000000e7c7ca5910 RCX: 00007ff00779e4d7 [ 308.533560] RDX: 00007fff66a04430 RSI: 00000000c03864bc RDI: 0000000000000003 [ 308.533608] RBP: 00007ff007a5fb00 R08: 000000e7c7ca4620 R09: 000000e7c7ca5e60 [ 308.533647] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000070 [ 308.533685] R13: 0000000000000000 R14: 0000000000000000 R15: 000000e7c7ca5930 [ 308.533770] Code: ff df 55 48 89 e5 41 55 41 54 53 48 89 fb 48 83 c7 50 48 89 fa 48 c1 ea 03 80 3c 02 00 74 05 e8 94 d4 16 e7 48 83 7b 50 00 74 02 <0f> ff 4c 8d 6b 58 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 [ 308.534086] ---[ end trace 77f11e53b1df44ad ]--- Solve this by adding the missing return. This is also a bugfix because we could end up rejecting updates with -EINVAL because of a early -EDEADLK, while if atomic_check ran to completion it might have downgraded the modeset to a fastset. Signed-off-by: Maarten Lankhorst Testcase: kms_atomic Link: https://patchwork.freedesktop.org/patch/msgid/20170815095706.23624-1-maarten.lankhorst@linux.intel.com Fixes: d34f20d6e2f2 ("drm: Atomic modeset ioctl") Cc: # v4.0+ Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a8e800fe0f68bc28ce309914f47e432742b865ed Author: Takashi Iwai Date: Mon Aug 14 14:35:50 2017 +0200 ALSA: usb-audio: Apply sample rate quirk to Sennheiser headset A Senheisser headset requires the typical sample-rate quirk for avoiding spurious errors from inquiring the current sample rate like: usb 1-1: 2:1: cannot get freq at ep 0x4 usb 1-1: 3:1: cannot get freq at ep 0x83 The USB ID 1395:740a has to be added to the entries in snd_usb_get_sample_rate_quirk(). Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1052580 Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 7e1d90f60a0d501c8503e636942ca704a454d910 Author: Daniel Mentz Date: Mon Aug 14 14:46:01 2017 -0700 ALSA: seq: 2nd attempt at fixing race creating a queue commit 4842e98f26dd80be3623c4714a244ba52ea096a8 ("ALSA: seq: Fix race at creating a queue") attempted to fix a race reported by syzkaller. That fix has been described as follows: " When a sequencer queue is created in snd_seq_queue_alloc(),it adds the new queue element to the public list before referencing it. Thus the queue might be deleted before the call of snd_seq_queue_use(), and it results in the use-after-free error, as spotted by syzkaller. The fix is to reference the queue object at the right time. " Even with that fix in place, syzkaller reported a use-after-free error. It specifically pointed to the last instruction "return q->queue" in snd_seq_queue_alloc(). The pointer q is being used after kfree() has been called on it. It turned out that there is still a small window where a race can happen. The window opens at snd_seq_ioctl_create_queue()->snd_seq_queue_alloc()->queue_list_add() and closes at snd_seq_ioctl_create_queue()->queueptr()->snd_use_lock_use(). Between these two calls, a different thread could delete the queue and possibly re-create a different queue in the same location in queue_list. This change prevents this situation by calling snd_use_lock_use() from snd_seq_queue_alloc() prior to calling queue_list_add(). It is then the caller's responsibility to call snd_use_lock_free(&q->use_lock). Fixes: 4842e98f26dd ("ALSA: seq: Fix race at creating a queue") Reported-by: Dmitry Vyukov Cc: Signed-off-by: Daniel Mentz Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 13 ++++--------- sound/core/seq/seq_queue.c | 14 +++++++++----- sound/core/seq/seq_queue.h | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) commit d624d276d1ddacbcb12ad96832ce0c7b82cd25db Author: Eric Dumazet Date: Mon Aug 14 17:44:43 2017 -0700 tcp: fix possible deadlock in TCP stack vs BPF filter Filtering the ACK packet was not put at the right place. At this place, we already allocated a child and put it into accept queue. We absolutely need to call tcp_child_process() to release its spinlock, or we will deadlock at accept() or close() time. Found by syzkaller team (Thanks a lot !) Fixes: 8fac365f63c8 ("tcp: Add a tcp_filter hook before handle ack packet") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Chenbo Feng Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 4 ++-- net/ipv6/tcp_ipv6.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7749d4ff88d31b0be17c8683143135adaaadc6a7 Author: Eric Dumazet Date: Mon Aug 14 14:10:25 2017 -0700 dccp: purge write queue in dccp_destroy_sock() syzkaller reported that DCCP could have a non empty write queue at dismantle time. WARNING: CPU: 1 PID: 2953 at net/core/stream.c:199 sk_stream_kill_queues+0x3ce/0x520 net/core/stream.c:199 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 2953 Comm: syz-executor0 Not tainted 4.13.0-rc4+ #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 panic+0x1e4/0x417 kernel/panic.c:180 __warn+0x1c4/0x1d9 kernel/panic.c:541 report_bug+0x211/0x2d0 lib/bug.c:183 fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:190 do_trap_no_signal arch/x86/kernel/traps.c:224 [inline] do_trap+0x260/0x390 arch/x86/kernel/traps.c:273 do_error_trap+0x120/0x390 arch/x86/kernel/traps.c:310 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:323 invalid_op+0x1e/0x30 arch/x86/entry/entry_64.S:846 RIP: 0010:sk_stream_kill_queues+0x3ce/0x520 net/core/stream.c:199 RSP: 0018:ffff8801d182f108 EFLAGS: 00010297 RAX: ffff8801d1144140 RBX: ffff8801d13cb280 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff85137b00 RDI: ffff8801d13cb280 RBP: ffff8801d182f148 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801d13cb4d0 R13: ffff8801d13cb3b8 R14: ffff8801d13cb300 R15: ffff8801d13cb3b8 inet_csk_destroy_sock+0x175/0x3f0 net/ipv4/inet_connection_sock.c:835 dccp_close+0x84d/0xc10 net/dccp/proto.c:1067 inet_release+0xed/0x1c0 net/ipv4/af_inet.c:425 sock_release+0x8d/0x1e0 net/socket.c:597 sock_close+0x16/0x20 net/socket.c:1126 __fput+0x327/0x7e0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:246 task_work_run+0x18a/0x260 kernel/task_work.c:116 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0xa32/0x1b10 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:969 get_signal+0x7e8/0x17e0 kernel/signal.c:2330 do_signal+0x94/0x1ee0 arch/x86/kernel/signal.c:808 exit_to_usermode_loop+0x21c/0x2d0 arch/x86/entry/common.c:157 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath+0x3a7/0x450 arch/x86/entry/common.c:263 Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller net/dccp/proto.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 42b7305905be52e467bbc346b0f2f95ad44eb1a0 Author: Al Viro Date: Mon Aug 14 21:31:38 2017 +0200 udp: fix linear skb reception with PEEK_OFF copy_linear_skb() is broken; both of its callers actually expect 'len' to be the amount we are trying to copy, not the offset of the end. Fix it keeping the meanings of arguments in sync with what the callers (both of them) expect. Also restore a saner behavior on EFAULT (i.e. preserving the iov_iter position in case of failure): The commit fd851ba9caa9 ("udp: harden copy_linear_skb()") avoids the more destructive effect of the buggy copy_linear_skb(), e.g. no more invalid memory access, but said function still behaves incorrectly: when peeking with offset it can fail with EINVAL instead of copying the appropriate amount of memory. Reported-by: Sasha Levin Fixes: b65ac44674dd ("udp: try to avoid 2 cache miss on dequeue") Fixes: fd851ba9caa9 ("udp: harden copy_linear_skb()") Signed-off-by: Al Viro Acked-by: Paolo Abeni Tested-by: Sasha Levin Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/udp.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e5645f51ba99738b0e5d708edf9c6454f33b9310 Author: Wei Wang Date: Mon Aug 14 10:44:59 2017 -0700 ipv6: release rt6->rt6i_idev properly during ifdown When a dst is created by addrconf_dst_alloc() for a host route or an anycast route, dst->dev points to loopback dev while rt6->rt6i_idev points to a real device. When the real device goes down, the current cleanup code only checks for dst->dev and assumes rt6->rt6i_idev->dev is the same. This causes the refcount leak on the real device in the above situation. This patch makes sure to always release the refcount taken on rt6->rt6i_idev during dst_dev_put(). Fixes: 587fea741134 ("ipv6: mark DST_NOGC and remove the operation of dst_free()") Reported-by: John Stultz Tested-by: John Stultz Tested-by: Martin KaFai Lau Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 36f41f8fc6d8aa9f8c9072d66ff7cf9055f5e69b Author: Eric Dumazet Date: Mon Aug 14 10:16:45 2017 -0700 af_key: do not use GFP_KERNEL in atomic contexts pfkey_broadcast() might be called from non process contexts, we can not use GFP_KERNEL in these cases [1]. This patch partially reverts commit ba51b6be38c1 ("net: Fix RCU splat in af_key"), only keeping the GFP_ATOMIC forcing under rcu_read_lock() section. [1] : syzkaller reported : in_atomic(): 1, irqs_disabled(): 0, pid: 2932, name: syzkaller183439 3 locks held by syzkaller183439/2932: #0: (&net->xfrm.xfrm_cfg_mutex){+.+.+.}, at: [] pfkey_sendmsg+0x4c8/0x9f0 net/key/af_key.c:3649 #1: (&pfk->dump_lock){+.+.+.}, at: [] pfkey_do_dump+0x76/0x3f0 net/key/af_key.c:293 #2: (&(&net->xfrm.xfrm_policy_lock)->rlock){+...+.}, at: [] spin_lock_bh include/linux/spinlock.h:304 [inline] #2: (&(&net->xfrm.xfrm_policy_lock)->rlock){+...+.}, at: [] xfrm_policy_walk+0x192/0xa30 net/xfrm/xfrm_policy.c:1028 CPU: 0 PID: 2932 Comm: syzkaller183439 Not tainted 4.13.0-rc4+ #24 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:5994 __might_sleep+0x95/0x190 kernel/sched/core.c:5947 slab_pre_alloc_hook mm/slab.h:416 [inline] slab_alloc mm/slab.c:3383 [inline] kmem_cache_alloc+0x24b/0x6e0 mm/slab.c:3559 skb_clone+0x1a0/0x400 net/core/skbuff.c:1037 pfkey_broadcast_one+0x4b2/0x6f0 net/key/af_key.c:207 pfkey_broadcast+0x4ba/0x770 net/key/af_key.c:281 dump_sp+0x3d6/0x500 net/key/af_key.c:2685 xfrm_policy_walk+0x2f1/0xa30 net/xfrm/xfrm_policy.c:1042 pfkey_dump_sp+0x42/0x50 net/key/af_key.c:2695 pfkey_do_dump+0xaa/0x3f0 net/key/af_key.c:299 pfkey_spddump+0x1a0/0x210 net/key/af_key.c:2722 pfkey_process+0x606/0x710 net/key/af_key.c:2814 pfkey_sendmsg+0x4d6/0x9f0 net/key/af_key.c:3650 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 ___sys_sendmsg+0x755/0x890 net/socket.c:2035 __sys_sendmsg+0xe5/0x210 net/socket.c:2069 SYSC_sendmsg net/socket.c:2080 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2076 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x445d79 RSP: 002b:00007f32447c1dc8 EFLAGS: 00000202 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445d79 RDX: 0000000000000000 RSI: 000000002023dfc8 RDI: 0000000000000008 RBP: 0000000000000086 R08: 00007f32447c2700 R09: 00007f32447c2700 R10: 00007f32447c2700 R11: 0000000000000202 R12: 0000000000000000 R13: 00007ffe33edec4f R14: 00007f32447c29c0 R15: 0000000000000000 Fixes: ba51b6be38c1 ("net: Fix RCU splat in af_key") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: David Ahern Acked-by: David Ahern Signed-off-by: David S. Miller net/key/af_key.c | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit 539a06baedd06127389b254f6b9f016ca072da13 Author: Sabrina Dubroca Date: Mon Aug 14 18:04:24 2017 +0200 tcp: ulp: avoid module refcnt leak in tcp_set_ulp __tcp_ulp_find_autoload returns tcp_ulp_ops after taking a reference on the module. Then, if ->init fails, tcp_set_ulp propagates the error but nothing releases that reference. Fixes: 734942cc4ea6 ("tcp: ULP infrastructure") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller net/ipv4/tcp_ulp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit bae514a688881bb8ea15e836cad6df95e4b94190 Merge: 59a361b b629276 Author: David S. Miller Date: Mon Aug 14 22:14:51 2017 -0700 Merge branch 'Add-new-PCI_DEV_FLAGS_NO_RELAXED_ORDERING-flag' Ding Tianhong says: ==================== Add new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag Some devices have problems with Transaction Layer Packets with the Relaxed Ordering Attribute set. This patch set adds a new PCIe Device Flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING, a set of PCI Quirks to catch some known devices with Relaxed Ordering issues, and a use of this new flag by the cxgb4 driver to avoid using Relaxed Ordering with problematic Root Complex Ports. It's been years since I've submitted kernel.org patches, I appolgise for the almost certain submission errors. v2: Alexander point out that the v1 was only a part of the whole solution, some platform which has some issues could use the new flag to indicate that it is not safe to enable relaxed ordering attribute, then we need to clear the relaxed ordering enable bits in the PCI configuration when initializing the device. So add a new second patch to modify the PCI initialization code to clear the relaxed ordering enable bit in the event that the root complex doesn't want relaxed ordering enabled. The third patch was base on the v1's second patch and only be changed to query the relaxed ordering enable bit in the PCI configuration space to allow the Chelsio NIC to send TLPs with the relaxed ordering attributes set. This version didn't plan to drop the defines for Intel Drivers to use the new checking way to enable relaxed ordering because it is not the hardest part of the moment, we could fix it in next patchset when this patches reach the goal. v3: Redesigned the logic for pci_configure_relaxed_ordering when configuration, If a PCIe device didn't enable the relaxed ordering attribute default, we should not do anything in the PCIe configuration, otherwise we should check if any of the devices above us do not support relaxed ordering by the PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag, then base on the result if we get a return that indicate that the relaxed ordering is not supported we should update our device to disable relaxed ordering in configuration space. If the device above us doesn't exist or isn't the PCIe device, we shouldn't do anything and skip updating relaxed ordering because we are probably running in a guest. v4: Rename the functions pcie_get_relaxed_ordering and pcie_disable_relaxed_ordering according John's suggestion, and modify the description, use the true/false as the return value. We shouldn't enable relaxed ordering attribute by the setting in the root complex configuration space for PCIe device, so fix it for cxgb4. Fix some format issues. v5: Removed the unnecessary code for some function which only return the bool value, and add the check for VF device. Make this patch set base on 4.12-rc5. v6: Fix the logic error in the need to enable the relaxed ordering attribute for cxgb4. v7: The cxgb4 drivers will enable the PCIe Capability Device Control[Relaxed Ordering Enable] in PCI Probe() routine, this will break our current solution for some platform which has problematic when enable the relaxed ordering attribute. According to the latest recommendations, remove the enable_pcie_relaxed_ordering(), although it could not cover the Peer-to-Peer scene, but we agree to leave this problem until we really trigger it. Make this patch set base on 4.12 release version. v8: Change the second patch title and description to make it more reasonable, add the acked-by from Alex and Ashok. Add a new patch to enable the Relaxed Ordering Attribute for cxgb4vf driver. Make this patch set base on 4.13-rc2. v9: The document (https://software.intel.com/sites/default/files/managed/9e/ bc/64-ia-32-architectures-optimization-manual.pdf) indicate that the Xeon processors based on Broadwell/Haswell microarchitecture has the problem with Relaxed Ordering Attribute enabled, so add the whole list Device ID from Intel to the patch. v10: Significant rework based on Bjorn's feedback, reorganize the first 2 patches, now the Intel and AMD erratum soc has been divided to the different patches, rename the pcie_relaxed_ordering_supported() to pcie_relaxed_ordering_enabled(), and no need to check every intervening switch except the root ports, update some commits. v11: We shouldn't let the Intel engineer to acked the AMD's erratum patch, fix the funny mistake. ==================== Signed-off-by: David S. Miller commit b629276df7f669b1daaad2131ca418ab55186565 Author: Casey Leedom Date: Tue Aug 15 11:23:27 2017 +0800 net/cxgb4vf: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag cxgb4vf Ethernet driver now queries PCIe configuration space to determine if it can send TLPs to it with the Relaxed Ordering Attribute set, just like the pf did. Signed-off-by: Casey Leedom Signed-off-by: Ding Tianhong Reviewed-by: Casey Leedom Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4vf/adapter.h | 1 + drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 18 ++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 3 +++ 3 files changed, 22 insertions(+) commit b0ba9d5fded9590cac67a482c5aab8b1bf86ee40 Author: Casey Leedom Date: Tue Aug 15 11:23:26 2017 +0800 net/cxgb4: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag cxgb4 Ethernet driver now queries PCIe configuration space to determine if it can send TLPs to it with the Relaxed Ordering Attribute set. Remove the enable_pcie_relaxed_ordering() to avoid enable PCIe Capability Device Control[Relaxed Ordering Enable] at probe routine, to make sure the driver will not send the Relaxed Ordering TLPs to the Root Complex which could not deal the Relaxed Ordering TLPs. Signed-off-by: Casey Leedom Signed-off-by: Ding Tianhong Reviewed-by: Casey Leedom Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 23 +++++++++++++++++------ drivers/net/ethernet/chelsio/cxgb4/sge.c | 5 +++-- 3 files changed, 21 insertions(+), 8 deletions(-) commit 077fa19c5dfa06a6ae04fb1661680940ff837612 Author: dingtianhong Date: Tue Aug 15 11:23:25 2017 +0800 PCI: Disable Relaxed Ordering Attributes for AMD A1100 Casey reported that the AMD ARM A1100 SoC has a bug in its PCIe Root Port where Upstream Transaction Layer Packets with the Relaxed Ordering Attribute clear are allowed to bypass earlier TLPs with Relaxed Ordering set, it would cause Data Corruption, so we need to disable Relaxed Ordering Attribute when Upstream TLPs to the Root Port. Reported-and-suggested-by: Casey Leedom Signed-off-by: Casey Leedom Signed-off-by: Ding Tianhong Acked-by: Casey Leedom Signed-off-by: David S. Miller drivers/pci/quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 87e09cdec4dae08acdb4aa49beb793c19d73e73e Author: dingtianhong Date: Tue Aug 15 11:23:24 2017 +0800 PCI: Disable Relaxed Ordering for some Intel processors According to the Intel spec section 3.9.1 said: 3.9.1 Optimizing PCIe Performance for Accesses Toward Coherent Memory and Toward MMIO Regions (P2P) In order to maximize performance for PCIe devices in the processors listed in Table 3-6 below, the soft- ware should determine whether the accesses are toward coherent memory (system memory) or toward MMIO regions (P2P access to other devices). If the access is toward MMIO region, then software can command HW to set the RO bit in the TLP header, as this would allow hardware to achieve maximum throughput for these types of accesses. For accesses toward coherent memory, software can command HW to clear the RO bit in the TLP header (no RO), as this would allow hardware to achieve maximum throughput for these types of accesses. Table 3-6. Intel Processor CPU RP Device IDs for Processors Optimizing PCIe Performance Processor CPU RP Device IDs Intel Xeon processors based on 6F01H-6F0EH Broadwell microarchitecture Intel Xeon processors based on 2F01H-2F0EH Haswell microarchitecture It means some Intel processors has performance issue when use the Relaxed Ordering Attribute, so disable Relaxed Ordering for these root port. Signed-off-by: Casey Leedom Signed-off-by: Ding Tianhong Acked-by: Alexander Duyck Acked-by: Ashok Raj Signed-off-by: David S. Miller drivers/pci/quirks.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit a99b646afa8a02571ea298bedca6592d818229cd Author: dingtianhong Date: Tue Aug 15 11:23:23 2017 +0800 PCI: Disable PCIe Relaxed Ordering if unsupported When bit4 is set in the PCIe Device Control register, it indicates whether the device is permitted to use relaxed ordering. On some platforms using relaxed ordering can have performance issues or due to erratum can cause data-corruption. In such cases devices must avoid using relaxed ordering. The patch adds a new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING to indicate that Relaxed Ordering (RO) attribute should not be used for Transaction Layer Packets (TLP) targeted towards these affected root complexes. This patch checks if there is any node in the hierarchy that indicates that using relaxed ordering is not safe. In such cases the patch turns off the relaxed ordering by clearing the capability for this device. Signed-off-by: Casey Leedom Signed-off-by: Ding Tianhong Acked-by: Ashok Raj Acked-by: Alexander Duyck Acked-by: Casey Leedom Signed-off-by: David S. Miller drivers/pci/probe.c | 43 +++++++++++++++++++++++++++++++++++++++++++ drivers/pci/quirks.c | 11 +++++++++++ include/linux/pci.h | 3 +++ 3 files changed, 57 insertions(+) commit 76988690402dde2880bfe06ecccf381d48ba8e1c Author: KT Liao Date: Mon Aug 14 20:11:59 2017 -0700 Input: elan_i2c - Add antoher Lenovo ACPI ID for upcoming Lenovo NB Add 2 new IDs (ELAN0609 and ELAN060B) to the list of ACPI IDs that should be handled by the driver. Signed-off-by: KT Liao Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 3 +++ 1 file changed, 3 insertions(+) commit 1874064eed0502bd9bef7be8023757b0c4f26883 Author: Kai-Heng Feng Date: Mon Aug 14 20:11:26 2017 -0700 Input: elan_i2c - add ELAN0608 to the ACPI table Similar to commit 722c5ac708b4f ("Input: elan_i2c - add ELAN0605 to the ACPI table"), ELAN0608 should be handled by elan_i2c. This touchpad can be found in Lenovo ideapad 320-14IKB. BugLink: https://bugs.launchpad.net/bugs/1708852 Signed-off-by: Kai-Heng Feng Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 1 + 1 file changed, 1 insertion(+) commit fcd07350007bdcc0aab506fb9b5703fad48a6521 Merge: 6b9d1c2 afc1f55 Author: Linus Torvalds Date: Mon Aug 14 13:09:59 2017 -0700 Merge tag 'md/4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: "Fix several bugs: - fix a rcu stall issue introduced in 4.12 (Neil Brown) - fix two raid5 cache race conditions (Song Liu)" * tag 'md/4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: MD: not clear ->safemode for external metadata array md/r5cache: fix io_unit handling in r5l_log_endio() md/r5cache: call mddev_lock/unlock() in r5c_journal_mode_set md: fix test in md_write_start() md: always clear ->safemode when md_check_recovery gets the mddev lock. commit f1c0b7e448b9e66dd9a7343bab58a3d3a477e104 Author: Brendan Higgins Date: Fri Jul 28 18:00:12 2017 -0700 i2c: aspeed: fixed potential null pointer dereference Before I skipped null checks when the master is in the STOP state; this fixes that. Signed-off-by: Brendan Higgins Acked-by: Joel Stanley Signed-off-by: Wolfram Sang Fixes: f327c686d3ba ("i2c: aspeed: added driver for Aspeed I2C") drivers/i2c/busses/i2c-aspeed.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 42543aeb48e3701b49e0a83654248afc38feb88f Author: Anton Vasilyev Date: Thu Aug 10 18:15:45 2017 +0300 i2c: simtec: use release_mem_region instead of release_resource Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-simtec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f4b17a14faeec4160f97ad75ea7534f571f12404 Author: Javier Martinez Canillas Date: Wed Aug 9 11:21:28 2017 +0200 i2c: core: Make comment about I2C table requirement to reflect the code I2C drivers were required to have an I2C device ID table even if were for devices that would only be registered using a specific firmware interface (e.g: OF or ACPI). But commit da10c06a044b ("i2c: Make I2C ID tables non-mandatory for DT'ed devices") changed the I2C core to relax the requirement and allow drivers to avoid defining this table. Unfortunately it only took into account drivers for OF-only devices and forgot about ACPI-only ones, and this was fixed by commit c64ffff7a9d1 ("i2c: core: Allow empty id_table in ACPI case as well"). But the latter didn't update the original comment, so it doesn't reflect what the code does now. Signed-off-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4e2d93de070ceaca5097f7ee5c311731b83208a0 Author: Jarkko Nikula Date: Wed Aug 9 15:24:44 2017 +0300 i2c: designware: Fix standard mode speed when configuring the slave mode Code sets bit DW_IC_CON_SPEED_FAST (0x4) always when configuring the slave mode. This results incorrect register value DW_IC_CON_SPEED_HIGH (0x6) when OR'ed together with DW_IC_CON_SPEED_STD (0x2). Remove this and let the code set the speed mode bits according to clock frequency or default to fast mode. Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 984277a041d5ee4a65aaadf0307d67a7c401e11c Author: Jarkko Nikula Date: Fri Aug 11 14:44:55 2017 +0300 i2c: designware: Fix oops from i2c_dw_irq_handler_slave When i2c-designware is initialized in slave mode the i2c-designware-slave.c: i2c_dw_irq_handler_slave() can hit a NULL pointer dereference when I2C slave backend is not registered but code is accessing the struct dw_i2c_dev.slave without testing is it NULL. We might get spurious interrupts from other devices or from IRQ core during unloading the driver when CONFIG_DEBUG_SHIRQ is set. Existing check for enable and IRQ status is not enough since device can be power gated and those bits may read 1. Fix this by handling the interrupt only when also struct dw_i2c_dev.slave is set. Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a23318feeff662c8d25d21623daebdd2e55ec221 Author: Ulf Hansson Date: Wed Aug 9 15:28:22 2017 +0200 i2c: designware: Fix system suspend The commit 8503ff166504 ("i2c: designware: Avoid unnecessary resuming during system suspend"), may suggest to the PM core to try out the so called direct_complete path for system sleep. In this path, the PM core treats a runtime suspended device as it's already in a proper low power state for system sleep, which makes it skip calling the system sleep callbacks for the device, except for the ->prepare() and the ->complete() callbacks. However, the PM core may unset the direct_complete flag for a parent device, in case its child device are being system suspended before. In this scenario, the PM core invokes the system sleep callbacks, no matter if the device is runtime suspended or not. Particularly in cases of an existing i2c slave device, the above path is triggered, which breaks the assumption that the i2c device is always runtime resumed whenever the dw_i2c_plat_suspend() is being called. More precisely, dw_i2c_plat_suspend() calls clk_core_disable() and clk_core_unprepare(), for an already disabled/unprepared clock, leading to a splat in the log about clocks calls being wrongly balanced and breaking system sleep. To still allow the direct_complete path in cases when it's possible, but also to keep the fix simple, let's runtime resume the i2c device in the ->suspend() callback, before continuing to put the device into low power state. Note, in cases when the i2c device is attached to the ACPI PM domain, this problem doesn't occur, because ACPI's ->suspend() callback, assigned to acpi_subsys_suspend(), already calls pm_runtime_resume() for the device. It should also be noted that this change does not fix commit 8503ff166504 ("i2c: designware: Avoid unnecessary resuming during system suspend"). Because for the non-ACPI case, the system sleep support was already broken prior that point. Cc: # v4.4+ Signed-off-by: Ulf Hansson Acked-by: Rafael J. Wysocki Tested-by: John Stultz Tested-by: Jarkko Nikula Acked-by: Jarkko Nikula Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 6b9d1c24e05118568aafeb7890600190a8374f6c Merge: ef95484 8861249 Author: Linus Torvalds Date: Mon Aug 14 11:35:56 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "Fix an error path bug in ixp4xx as well as a read overrun in sha1-avx2" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: x86/sha1 - Fix reads beyond the number of blocks passed crypto: ixp4xx - Fix error handling path in 'aead_perform()' commit 59a361bc6f6e91d57f25ff0aebb0e646beb3b41d Author: Jon Paul Maloy Date: Mon Aug 14 18:28:49 2017 +0200 tipc: avoid inheriting msg_non_seq flag when message is returned In the function msg_reverse(), we reverse the header while trying to reuse the original buffer whenever possible. Those rejected/returned messages are always transmitted as unicast, but the msg_non_seq field is not explicitly set to zero as it should be. We have seen cases where multicast senders set the message type to "NOT dest_droppable", meaning that a multicast message shorter than one MTU will be returned, e.g., during receive buffer overflow, by reusing the original buffer. This has the effect that even the 'msg_non_seq' field is inadvertently inherited by the rejected message, although it is now sent as a unicast message. This again leads the receiving unicast link endpoint to steer the packet toward the broadcast link receive function, where it is dropped. The affected unicast link is thereafter (after 100 failed retransmissions) declared 'stale' and reset. We fix this by unconditionally setting the 'msg_non_seq' flag to zero for all rejected/returned messages. Reported-by: Canh Duc Luu Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/msg.c | 1 + 1 file changed, 1 insertion(+) commit fed5f5718c4989a03b1b4cdc0c7f273c3c74ee9e Author: Jon Paul Maloy Date: Mon Aug 14 17:55:56 2017 +0200 tipc: accept PACKET_MULTICAST packets On L2 bearers, the TIPC broadcast function is sending out packets using the corresponding L2 broadcast address. At reception, we filter such packets under the assumption that they will also be delivered as broadcast packets. This assumption doesn't always hold true. Under high load, we have seen that a switch may convert the destination address and deliver the packet as a PACKET_MULTICAST, something leading to inadvertently dropped packets and a stale and reset broadcast link. We fix this by extending the reception filtering to accept packets of type PACKET_MULTICAST. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bearer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c87d63ac853550e734edfd45e1be5e5aa44fbcc Author: Florian Westphal Date: Mon Aug 14 00:52:58 2017 +0200 ipv4: route: fix inet_rtm_getroute induced crash "ip route get $daddr iif eth0 from $saddr" causes: BUG: KASAN: use-after-free in ip_route_input_rcu+0x1535/0x1b50 Call Trace: ip_route_input_rcu+0x1535/0x1b50 ip_route_input_noref+0xf9/0x190 tcp_v4_early_demux+0x1a4/0x2b0 ip_rcv+0xbcb/0xc05 __netif_receive_skb+0x9c/0xd0 netif_receive_skb_internal+0x5a8/0x890 Problem is that inet_rtm_getroute calls either ip_route_input_rcu (if an iif was provided) or ip_route_output_key_hash_rcu. But ip_route_input_rcu, unlike ip_route_output_key_hash_rcu, already associates the dst_entry with the skb. This clears the SKB_DST_NOREF bit (i.e. skb_dst_drop will release/free the entry while it should not). Thus only set the dst if we called ip_route_output_key_hash_rcu(). I tested this patch by running: while true;do ip r get 10.0.1.2;done > /dev/null & while true;do ip r get 10.0.1.2 iif eth0 from 10.0.1.1;done > /dev/null & ... and saw no crash or memory leak. Cc: Roopa Prabhu Cc: David Ahern Fixes: ba52d61e0ff ("ipv4: route: restore skb_dst_set in inet_rtm_getroute") Signed-off-by: Florian Westphal Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/route.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1724c7c0c9494dcbdd7f630f29e1e8427cb231d1 Merge: 7f5d6da ef95484 Author: Sean Paul Date: Mon Aug 14 13:14:36 2017 -0400 Merge origin/master into drm-misc-fixes Backmerge 4.13-rc5 into drm-misc-fixes, it was getting a little stale. Signed-off-by: Sean Paul commit 781cc76e0c2469cb7ac12ba238a4ea006978e321 Author: Daniel Vetter Date: Tue Aug 8 10:08:26 2017 +0200 drm/i915: Avoid the gpu reset vs. modeset deadlock ... using the biggest hammer we have. This is essentially a weaponized version of the timeout-based wedging Chris added in commit 36703e79a982c8ce5a8e43833291f2719e92d0d1 Author: Chris Wilson Date: Thu Jun 22 11:56:25 2017 +0100 drm/i915: Break modeset deadlocks on reset Because defense-in-depth is good it's good to still have both. Also note that with the locking change we can now restrict this a lot (old gpus and special testing only), so this doesn't kill the TDR benefits on at least anything remotely modern. And futuremore with a few tricks it should be possible to make a much more educated guess about whether an atomic commit is stuck waiting on the gpu (atomic_t counting the pending i915_sw_fence used by the atomic modeset code should do it), so we can improve this. But for now just start with something that is guaranteed to recover faster, for much better CI througput. This defacto reverts TDR on these platforms, but there's not really a single commit to specify as the sole offender. v2: Add a debug message to explain what's going on. We can't DRM_ERROR because that spams CI. And the timeout based fallback still prints a DRM_ERROR, in case something goes wrong. v3: Fix comment layout (Michel) Fixes: 4680816be336 ("drm/i915: Wait first for submission, before waiting for request completion") Fixes: 221fe7994554 ("drm/i915: Perform a direct reset of the GPU from the waiter") Cc: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin (v2) Cc: Michel Thierry Reviewed-by: Tvrtko Ursulin (v2) Reviewed-by: Michel Thierry Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170808080828.23650-1-daniel.vetter@ffwll.ch (cherry picked from commit 97154ec242c14f646a3ab3b4da8f838d197f300d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 430ffaf46c05bda56535893f38e684f5418c4c93 Author: Chris Wilson Date: Sat Aug 12 16:27:24 2017 +0100 drm/i915: Suppress switch_mm emission between the same aliasing_ppgtt When switching between contexts using the aliasing_ppgtt, the VM is shared. We don't need to reload the PD registers unless they are dirty. Martin Peres reported an issue that looks like corruption between Haswell context switches, bisecting to commit f9326be5f1d3 ("drm/i915: Rearrange switch_context to load the aliasing ppgtt on first use"). Switching between the same mm (the aliasing_ppgtt is used for all contexts in this case) should be a nop, but appears to trigger some side-effects in the context switch. However, as we know the switch is redundant in this case, we can skip it and continue to ignore the issue until somebody feels strong enough to investigate full-ppgtt on gen7 again! Except.. Martin was using full-ppgtt which is not supported as it doesn't work correctly yet. So whilst the bisect did yield valuable information about the failures, the fix should not have any user impact under default settings, with the exception of a slightly lower throughput on xcs as the VM would always be reloaded. v2: Also remember to set the legacy_active_context following the switch on xcs (commit e8a9c58fcd9a ("drm/i915: Unify active context tracking between legacy/execlists/guc")) Fixes: f9326be5f1d3 ("drm/i915: Rearrange switch_context to load the aliasing ppgtt on first use") Fixes: e8a9c58fcd9a ("drm/i915: Unify active context tracking between legacy/execlists/guc") Reported-by: Martin Peres Signed-off-by: Chris Wilson Cc: Martin Peres Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170812152724.6883-1-chris@chris-wilson.co.uk (cherry picked from commit 12124bea5b82dc1e917304aed703c27292270051) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_context.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7eceb9d04966435ed2d03f5554413715ab3cb34a Author: Matthias Kaehlcke Date: Mon Jul 17 12:58:54 2017 -0700 drm/i915: Return correct EDP voltage swing table for 0.85V For 0.85V cnl_get_buf_trans_edp() returns the DP table, instead of EDP. Use the correct table. The error was pointed out by this clang warning: drivers/gpu/drm/i915/intel_ddi.c:392:39: warning: variable 'cnl_ddi_translations_edp_0_85V' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const struct cnl_ddi_buf_trans cnl_ddi_translations_edp_0_85V[] = { Fixes: cf54ca8bc567 ("drm/i915/cnl: Implement voltage swing sequence.") Signed-off-by: Matthias Kaehlcke Reviewed-by: Manasi Navare Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170717195854.192139-1-mka@chromium.org (cherry picked from commit 50946c89850db13bd672c664aec6cf4551f71fe9) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dd7a3e7af70ebdd0cdd937b180726d15a4f0948 Author: Rodrigo Vivi Date: Wed Aug 9 13:07:02 2017 -0700 drm/i915/cnl: Add slice and subslice information to debugfs. A missing part to EU slice power gating is the debugfs interface. This patch actually should have been squashed to the initial EU slice power gating one. v2: Initial patch was merged without this part. Fixes: c7ae7e9ab207 ("drm/i915/cnl: Configure EU slice power gating.") Cc: Joonas Lahtinen Signed-off-by: Rodrigo Vivi Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170809200702.11236-1-rodrigo.vivi@intel.com (cherry picked from commit 7ea1adf30f82a4c0910524ac06f8f1f26281bb23) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0125a932e917cb507b682cb66645efdca1f8cab Author: Chris Wilson Date: Tue Aug 8 14:19:04 2017 +0100 drm/i915: Perform an invalidate prior to executing golden renderstate As we may have just bound the renderstate into the GGTT for execution, we need to ensure that the GTT TLB are also flushed. On snb-gt2, this would cause a random GPU hang at the start of a new context (e.g. boot) and on snb-gt1, it was causing the renderstate batch to take ~10s. It was the GPU hang that revealed the truth, as the CS gleefully executed beyond the end of the golden renderstate batch, a good indicator for a GTT TLB miss. Fixes: 20fe17aa52dc ("drm/i915: Remove redundant TLB invalidate on switching contexts") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20170808131904.1385-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala Cc: # v4.12-rc1+ (cherry picked from commit 802673d66f8a6ded5d2689d597853c7bb3a70163) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_render_state.c | 4 ++++ 1 file changed, 4 insertions(+) commit 26a72e8a8d0707f1d49133a19c027a3af9fcfdcb Author: Lionel Landwerlin Date: Fri Aug 4 15:03:48 2017 +0100 drm/i915: remove unused function declaration This function is not part of the driver anymore. Signed-off-by: Lionel Landwerlin Fixes: 90f4fcd56bda ("drm/i915: Remove forced stop ring on suspend/unload") Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170804140348.24971-1-lionel.g.landwerlin@intel.com (cherry picked from commit fe29133df37ac31de9e657ad91bcf74cdfe8c4cd) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.h | 1 - 1 file changed, 1 deletion(-) commit 7f5d6dac548b983702dd7aac1d463bd88dff50a8 Author: Maarten Lankhorst Date: Mon Aug 14 12:07:21 2017 +0200 drm/atomic: Handle -EDEADLK with out-fences correctly complete_crtc_signaling is freeing fence_state, but when retrying num_fences and fence_state are not zero'd. This caused duplicate fd's in the fence_state array, followed by a BUG_ON in fs/file.c because we reallocate freed memory, and installing over an existing fd, or potential other fun. Zero fence_state and num_fences correctly in the retry loop, which allows kms_atomic_transition to pass. Fixes: beaf5af48034 ("drm/fence: add out-fences support") Cc: Gustavo Padovan Cc: Brian Starkey (v10) Cc: Sean Paul Cc: Daniel Vetter Cc: Jani Nikula Cc: David Airlie Signed-off-by: Maarten Lankhorst Cc: # v4.10+ Testcase: kms_atomic_transitions.plane-all-modeset-transition-fencing (with CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y) Link: https://patchwork.freedesktop.org/patch/msgid/20170814100721.13340-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter #intel-gfx on irc drivers/gpu/drm/drm_atomic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 491ab4700d1b64f5cf2f9055e01613a923df5fab Author: Nikhil Mahale Date: Wed Aug 9 09:23:01 2017 +0530 drm: Fix framebuffer leak Do not leak framebuffer if client provided crtc id found invalid. Signed-off-by: Nikhil Mahale Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1502250781-5779-1-git-send-email-nmahale@nvidia.com drivers/gpu/drm/drm_plane.c | 1 + 1 file changed, 1 insertion(+) commit 3f13b6a24f192da3096389b82202f16eff2c11ee Author: Gregory CLEMENT Date: Wed Jul 12 13:22:29 2017 +0200 gpio: mvebu: Fix cause computation in irq handler When switching to regmap, the way to compute the irq cause was reorganized. However while doing it, a typo was introduced: a 'xor' replaced a 'and'. This lead to wrong behavior in the interrupt handler ans one of the symptom was wrong irq handler called on the Armada 388 GP: "->handle_irq(): c016303c, handle_bad_irq+0x0/0x278 ->irq_data.chip(): c0b0ec0c, 0xc0b0ec0c ->action(): (null) IRQ_NOPROBE set IRQ_NOREQUEST set unexpected IRQ trap at vector 00 irq 0, desc: ee804800, depth: 1, count: 0, unhandled: 0" Fixes: 2233bf7a92e7 ("gpio: mvebu: switch to regmap for register access") Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90b05b0598c698252d5f7dcdce335c5a546e9047 Author: Masami Hiramatsu Date: Wed Aug 2 13:47:42 2017 +0900 gpio: reject invalid gpio before getting gpio_desc Check user-given gpio number and reject it before calling gpio_to_desc() because gpio_to_desc() is for kernel driver and it expects given gpio number is valid (means 0 to 511). If given number is invalid, gpio_to_desc() calls WARN() and dump registers and stack for debug. This means user can easily kick WARN() just by writing invalid gpio number (e.g. 512) to /sys/class/gpio/export. Fixes: 0e9a5edf5d01 ("gpio: fix deferred probe detection for legacy API") Signed-off-by: Masami Hiramatsu Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpiolib-sysfs.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 32aaf194201e98db4235b7b71ac62a22e2ac355f Author: Tahsin Erdogan Date: Mon Aug 14 08:30:06 2017 -0400 ext4: add missing xattr hash update When updating an extended attribute, if the padded value sizes are the same, a shortcut is taken to avoid the bulk of the work. This was fine until the xattr hash update was moved inside ext4_xattr_set_entry(). With that change, the hash update got missed in the shortcut case. Thanks to ZhangYi (yizhang089@gmail.com) for root causing the problem. Fixes: daf8328172df ("ext4: eliminate xattr entry e_hash recalculation for removes") Reported-by: Miklos Szeredi Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b80b32b6d5e79798b85cd4644206aaa069059390 Author: Theodore Ts'o Date: Mon Aug 14 08:29:18 2017 -0400 ext4: fix clang build regression Arnd Bergmann As Stefan pointed out, I misremembered what clang can do specifically, and it turns out that the variable-length array at the end of the structure did not work (a flexible array would have worked here but not solved the problem): fs/ext4/mballoc.c:2303:17: error: fields must have a constant size: 'variable length array in structure' extension will never be supported ext4_grpblk_t counters[blocksize_bits + 2]; This reverts part of my previous patch, using a fixed-size array again, but keeping the check for the array overflow. Fixes: 2df2c3402fc8 ("ext4: fix warning about stack corruption") Reported-by: Stefan Agner Tested-by: Chandan Rajendra Signed-off-by: Arnd Bergmann Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8df4b0031067758d8b0a3bfde7d35e980d0376d5 Author: Shih-Yuan Lee (FourDollars) Date: Mon Aug 14 18:00:47 2017 +0800 ALSA: hda/realtek - Fix pincfg for Dell XPS 13 9370 The initial pin configs for Dell headset mode of ALC3271 has changed. /sys/class/sound/hwC0D0/init_pin_configs: (BIOS 0.1.4) 0x12 0xb7a60130 0x13 0xb8a61140 0x14 0x40000000 0x16 0x411111f0 0x17 0x90170110 0x18 0x411111f0 0x19 0x411111f0 0x1a 0x411111f0 0x1b 0x411111f0 0x1d 0x4087992d 0x1e 0x411111f0 0x21 0x04211020 has changed to ... /sys/class/sound/hwC0D0/init_pin_configs: (BIOS 0.2.0) 0x12 0xb7a60130 0x13 0x40000000 0x14 0x411111f0 0x16 0x411111f0 0x17 0x90170110 0x18 0x411111f0 0x19 0x411111f0 0x1a 0x411111f0 0x1b 0x411111f0 0x1d 0x4067992d 0x1e 0x411111f0 0x21 0x04211020 Fixes: b4576de87243 ("ALSA: hda/realtek - Fix typo of pincfg for Dell quirk") Signed-off-by: Shih-Yuan Lee (FourDollars) Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 - 1 file changed, 1 deletion(-) commit e9bf53ab1ee34bb05c104bbfd2b77c844773f8e6 Author: Arend Van Spriel Date: Fri Aug 11 11:07:36 2017 +0100 brcmfmac: feature check for multi-scheduled scan fails on bcm4343x devices The firmware feature check introduced for multi-scheduled scan turned out to be failing for bcm4343{0,1,8} devices resulting in a firmware crash. The reason for this crash has not yet been root cause so this patch avoids the feature check for those device as a short-term fix. Reported-by: Stefan Wahren Reported-by: Ian Molton Fixes: 9fe929aaace6 ("brcmfmac: add firmware feature detection for gscan feature") Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9c9947f893a254ec92cd5fe1439587e583302c9c Merge: 8397913 a0088737 Author: Thomas Gleixner Date: Mon Aug 14 09:34:10 2017 +0200 Merge tag 'irqchip-4.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes for 4.13 from Marc Zyngier Mostly GIC related, again: - GICv3 ITS NUMA handling fixes - GICv3 force affinity handling - Barrier adjustment in both GIC interrupt handling - Error reporting when the DT presents an incompatible interrupt - GICv3 platform MSI DT parsing bug fix - Broadcom L2 PM fix - Atmel AIC cleanups commit d86e63e1f0b7868c55c8d4a54854b85e2bac690b Author: Icenowy Zheng Date: Fri Aug 11 22:27:35 2017 +0800 arm64: allwinner: h5: fix pinctrl IRQs The pin controller of H5 has three IRQs at the chip's GIC, which represents three banks of pinctrl IRQs. However, the device tree used to miss the third IRQ of the pin controller, which makes the PG bank IRQ not usable. Add the missing IRQ to the pinctrl node. Fixes: 4e36de179f27 ("arm64: allwinner: h5: add Allwinner H5 .dtsi") Signed-off-by: Icenowy Zheng Signed-off-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 11e9d7829dd08dbafb24517fe922f11c3a8a9dc2 Author: Andreas Born Date: Sat Aug 12 00:36:55 2017 +0200 bonding: ratelimit failed speed/duplex update warning bond_miimon_commit() handles the UP transition for each slave of a bond in the case of MII. It is triggered 10 times per second for the default MII Polling interval of 100ms. For device drivers that do not implement __ethtool_get_link_ksettings() the call to bond_update_speed_duplex() fails persistently while the MII status could remain UP. That is, in this and other cases where the speed/duplex update keeps failing over a longer period of time while the MII state is UP, a warning is printed every MII polling interval. To address these excessive warnings net_ratelimit() should be used. Printing a warning once would not be sufficient since the call to bond_update_speed_duplex() could recover to succeed and fail again later. In that case there would be no new indication what went wrong. Fixes: b5bf0f5b16b9c (bonding: correctly update link status during mii-commit phase) Signed-off-by: Andreas Born Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ef954844c7ace62f773f4f23e28d2d915adc419f Author: Linus Torvalds Date: Sun Aug 13 16:01:32 2017 -0700 Linux 4.13-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2298fc900f87eb95d1562463c4bbc6661277629 Merge: c9dc281 5fc9484 Author: Linus Torvalds Date: Sun Aug 13 15:34:28 2017 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "Another round of MIPS fixes: - compressed boot: Ignore a generated .c file - VDSO: Fix a register clobber list - DECstation: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression - Octeon: Fix recent cleanups that cleaned away a bit too much thus breaking the arch side of the EDAC and USB drivers. - uasm: Fix duplicate const in "const struct foo const bar[]" which GCC 7.1 no longer accepts. - Fix race on setting and getting cpu_online_mask - Fix preemption issue. To do so cleanly introduce macro to get the size of L3 cache line. - Revert include cleanup that sometimes results in build error - MicroMIPS uses bit 0 of the PC to indicate microMIPS mode. Make sure this bit is set for kernel entry as well. - Prevent configuring the kernel for both microMIPS and MT. There are no such CPUs currently and thus the combination is unsupported and results in build errors. This has been sitting in linux-next for a few days and has survived automated testing by Imagination's test farm. No known regressions pending except a number of issues that crept up due to lots of people switching to GCC 7.1" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: Set ISA bit in entry-y for microMIPS kernels MIPS: Prevent building MT support for microMIPS kernels MIPS: PCI: Fix smp_processor_id() in preemptible MIPS: Introduce cpu_tcache_line_size MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression MIPS: VDSO: Fix clobber lists in fallback code paths Revert "MIPS: Don't unnecessarily include kmalloc.h into ." MIPS: OCTEON: Fix USB platform code breakage. MIPS: Octeon: Fix broken EDAC driver. MIPS: gitignore: ignore generated .c files MIPS: Fix race on setting and getting cpu_online_mask MIPS: mm: remove duplicate "const" qualifier on insn_table commit c9dc281d91aed57251e94c7cca81a5c8777e3e4a Merge: ce7ba95 260d9f2 Author: Linus Torvalds Date: Sun Aug 13 12:44:18 2017 -0700 Merge tag 'driver-core-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are three firmware core fixes for 4.13-rc5. All three of these fix reported issues and have been floating around for a few weeks. They have been in linux-next with no reported problems" * tag 'driver-core-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: firmware: avoid invalid fallback aborts by using killable wait firmware: fix batched requests - send wake up on failure on direct lookups firmware: fix batched requests - wake all waiters commit ce7ba95cf078337c9921b301a7e4b9e82561db38 Merge: 438630e 1cd65d1 Author: Linus Torvalds Date: Sun Aug 13 12:41:58 2017 -0700 Merge tag 'char-misc-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are two patches for 4.13-rc5. One is a fix for a reported thunderbolt issue, and the other a fix for an MEI driver issue. Both have been in linux-next with no reported issues" * tag 'char-misc-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: thunderbolt: Do not enumerate more ports from DROM than the controller has mei: exclude device from suspend direct complete optimization commit 438630ef5b3c8755d642b6ca3bc10625ab0af79b Merge: dd95f18 9527b82 Author: Linus Torvalds Date: Sun Aug 13 12:33:35 2017 -0700 Merge tag 'tty-4.13-rc5' 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 4.13-rc5. One is a revert of a -rc1 patch that turned out to not be a good idea, and the other is a fix for the pl011 serial driver. Both have been in linux-next with no reported issues" * tag 'tty-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "serial: Delete dead code for CIR serial ports" tty: pl011: fix initialization order of QDF2400 E44 commit dd95f1860768e340875d6a325df18d73f2dea304 Merge: 10cec91 cef9886 Author: Linus Torvalds Date: Sun Aug 13 12:30:17 2017 -0700 Merge tag 'staging-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/iio fixes from Greg KH: "Here are some Staging and IIO driver fixes for 4.13-rc5. Nothing major, just a number of small fixes for reported issues. All of these have been in linux-next for a while now with no reported issues. Full details are in the shortlog" * tag 'staging-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING iio: aspeed-adc: wait for initial sequence. iio: accel: bmc150: Always restore device to normal mode after suspend-resume staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read iio: adc: axp288: Fix the GPADC pin reading often wrongly returning 0 iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits iio: accel: st_accel: add SPI-3wire support iio: adc: Revert "axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications" iio: adc: sun4i-gpadc-iio: fix unbalanced irq enable/disable iio: pressure: st_pressure_core: disable multiread by default for LPS22HB iio: light: tsl2563: use correct event code commit 10cec917d0008b3457088f2619ac7331adb4b743 Merge: 89a5527 3b6bcd3 Author: Linus Torvalds Date: Sun Aug 13 12:27:42 2017 -0700 Merge tag 'usb-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of small USB driver fixes and new device ids for 4.13-rc5. There is the usual gadget driver fixes, some new quirks for "messy" hardware, and some new device ids. All have been in linux-next with no reported issues" * tag 'usb-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: serial: pl2303: add new ATEN device id usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter USB: Check for dropped connection before switching to full speed usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume usb: renesas_usbhs: gadget: fix unused-but-set-variable warning usb: renesas_usbhs: Fix UGCTRL2 value for R-Car Gen3 usb: phy: phy-msm-usb: Fix usage of devm_regulator_bulk_get() usb: gadget: udc: renesas_usb3: Fix usb_gadget_giveback_request() calling usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets USB: serial: option: add D-Link DWM-222 device ID usb: musb: fix tx fifo flush handling again usb: core: unlink urbs from the tail of the endpoint's urb_list usb-storage: fix deadlock involving host lock and scsi_done uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069 USB: hcd: Mark secondary HCD as dead if the primary one died USB: serial: cp210x: add support for Qivicon USB ZigBee dongle commit b60bf53abc0323f91ac59b08a7642216281e662e Merge: 216e4a1 adb4f11 Author: Ingo Molnar Date: Sun Aug 13 11:39:45 2017 +0200 Merge branch 'clockevents/4.13-fixes' of http://git.linaro.org/people/daniel.lezcano/linux into timers/urgent Pull clockevents fixes from Daniel Lezcano: " - Fix error check against IS_ERR() instead of NULL for the timer-of code (Dan Carpenter) - Fix infinite recusion with ftrace for the ARM architected timer (Ding Tianhong) - Fix the error code return in the em_sti's probe function (Gustavo A. R. Silva) - Fix Kconfig dependency for the pistachio driver (Matt Redfearn) - Fix mem frame loop initialization for the ARM architected timer (Matthias Kaehlcke)" Signed-off-by: Ingo Molnar commit 89a55278dee487b172fb16295ccb2d0b2a1b319b Merge: a99bcdc 9a51544 Author: Linus Torvalds Date: Sat Aug 12 16:19:43 2017 -0700 Merge tag 'for-linus-20170812' of git://git.infradead.org/linux-mtd Pull another MTD fix from Brian Norris: "An mtdblock regression occurred in -rc1 (all writes were broken!), in the process of some block subsystem refactoring. Noticed and fixed last week, but I'm a little slow on the uptake" * tag 'for-linus-20170812' of git://git.infradead.org/linux-mtd: mtd: blkdevs: Fix mtd block write failure commit 9a51544774a57fcb94994a61860a17f9e63a8d7b Author: Abhishek Sahu Date: Wed Aug 2 18:03:05 2017 +0530 mtd: blkdevs: Fix mtd block write failure All the MTD block write requests are failing with following error messages mkfs.ext4 /dev/mtdblock0 print_req_error: I/O error, dev mtdblock0, sector 0 Buffer I/O error on dev mtdblock0, logical block 0, lost async page write The control is going to default case after block write request because of missing return. Fixes: commit 2a842acab109 ("block: introduce new block status code type") Signed-off-by: Abhishek Sahu Signed-off-by: Brian Norris drivers/mtd/mtd_blkdevs.c | 1 + 1 file changed, 1 insertion(+) commit a99bcdce8395e3eab534d69eb886a1563030bc00 Merge: 043cd07 6f48655 Author: Linus Torvalds Date: Sat Aug 12 12:08:59 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target fixes from Nicholas Bellinger: "The highlights include: - Fix iscsi-target payload memory leak during ISCSI_FLAG_TEXT_CONTINUE (Varun Prakash) - Fix tcm_qla2xxx incorrect use of tcm_qla2xxx_free_cmd during ABORT (Pascal de Bruijn + Himanshu Madhani + nab) - Fix iscsi-target long-standing issue with parallel delete of a single network portal across multiple target instances (Gary Guo + nab) - Fix target dynamic se_node GPF during uncached shutdown regression (Justin Maggard + nab)" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: Fix node_acl demo-mode + uncached dynamic shutdown regression iscsi-target: Fix iscsi_np reset hung task during parallel delete qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2) cxgbit: fix sg_nents calculation iscsi-target: fix invalid flags in text response iscsi-target: fix memory leak in iscsit_setup_text_cmd() cxgbit: add missing __kfree_skb() tcmu: free old string on reconfig tcmu: Fix possible to/from address overflow when doing the memcpy commit 043cd07c555f74ab51c9589d1f5baff4b29929ae Merge: 216e4a1 020db9d Author: Linus Torvalds Date: Sat Aug 12 09:01:36 2017 -0700 Merge tag 'for-linus-4.13b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Some fixes for Xen: - a fix for a regression introduced in 4.13 for a Xen HVM-guest configured with KASLR - a fix for a possible deadlock in the xenbus driver when booting the system - a fix for lost interrupts in Xen guests" * tag 'for-linus-4.13b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/events: Fix interrupt lost during irq_disable and irq_enable xen: avoid deadlock in xenbus xen: fix hvm guest with kaslr enabled xen: split up xen_hvm_init_shared_info() x86: provide an init_mem_mapping hypervisor hook commit afc1f55ca44e257f69da8f43e0714a76686ae8d1 Author: Shaohua Li Date: Fri Aug 11 20:34:45 2017 -0700 MD: not clear ->safemode for external metadata array ->safemode should be triggered by mdadm for external metadaa array, otherwise array's state confuses mdadm. Fixes: 33182d15c6bf(md: always clear ->safemode when md_check_recovery gets the mddev lock.) Cc: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e28ae8e428fefe2facd72cea9f29906ecb9c861d Author: Christoph Hellwig Date: Fri Aug 11 12:45:35 2017 -0700 iomap: fix integer truncation issues in the zeroing and dirtying helpers Fix the min_t calls in the zeroing and dirtying helpers to perform the comparisms on 64-bit types, which prevents them from incorrectly being truncated, and larger zeroing operations being stuck in a never ending loop. Special thanks to Markus Stockhausen for spotting the bug. Reported-by: Paul Menzel Tested-by: Paul Menzel Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/iomap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c44245b3d5435f533ca8346ece65918f84c057f9 Author: Omar Sandoval Date: Fri Aug 11 09:00:06 2017 -0700 xfs: fix inobt inode allocation search optimization When we try to allocate a free inode by searching the inobt, we try to find the inode nearest the parent inode by searching chunks both left and right of the chunk containing the parent. As an optimization, we cache the leftmost and rightmost records that we previously searched; if we do another allocation with the same parent inode, we'll pick up the search where it last left off. There's a bug in the case where we found a free inode to the left of the parent's chunk: we need to update the cached left and right records, but because we already reassigned the right record to point to the left, we end up assigning the left record to both the cached left and right records. This isn't a correctness problem strictly, but it can result in the next allocation rechecking chunks unnecessarily or allocating inodes further away from the parent than it needs to. Fix it by swapping the record pointer after we update the cached left and right records. Fixes: bd169565993b ("xfs: speed up free inode search") Signed-off-by: Omar Sandoval Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_ialloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd851ba9caa9a63fdbb72a2e6ed5560c0989e999 Author: Eric Dumazet Date: Fri Aug 11 10:48:53 2017 -0700 udp: harden copy_linear_skb() syzkaller got crashes with CONFIG_HARDENED_USERCOPY=y configs. Issue here is that recvfrom() can be used with user buffer of Z bytes, and SO_PEEK_OFF of X bytes, from a skb with Y bytes, and following condition : Z < X < Y kernel BUG at mm/usercopy.c:72! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 2917 Comm: syzkaller842281 Not tainted 4.13.0-rc3+ #16 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801d2fa40c0 task.stack: ffff8801d1fe8000 RIP: 0010:report_usercopy mm/usercopy.c:64 [inline] RIP: 0010:__check_object_size+0x3ad/0x500 mm/usercopy.c:264 RSP: 0018:ffff8801d1fef8a8 EFLAGS: 00010286 RAX: 0000000000000078 RBX: ffffffff847102c0 RCX: 0000000000000000 RDX: 0000000000000078 RSI: 1ffff1003a3fded5 RDI: ffffed003a3fdf09 RBP: ffff8801d1fef998 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801d1ea480e R13: fffffffffffffffa R14: ffffffff84710280 R15: dffffc0000000000 FS: 0000000001360880(0000) GS:ffff8801dc000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000202ecfe4 CR3: 00000001d1ff8000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: check_object_size include/linux/thread_info.h:108 [inline] check_copy_size include/linux/thread_info.h:139 [inline] copy_to_iter include/linux/uio.h:105 [inline] copy_linear_skb include/net/udp.h:371 [inline] udpv6_recvmsg+0x1040/0x1af0 net/ipv6/udp.c:395 inet_recvmsg+0x14c/0x5f0 net/ipv4/af_inet.c:793 sock_recvmsg_nosec net/socket.c:792 [inline] sock_recvmsg+0xc9/0x110 net/socket.c:799 SYSC_recvfrom+0x2d6/0x570 net/socket.c:1788 SyS_recvfrom+0x40/0x50 net/socket.c:1760 entry_SYSCALL_64_fastpath+0x1f/0xbe Fixes: b65ac44674dd ("udp: try to avoid 2 cache miss on dequeue") Signed-off-by: Eric Dumazet Cc: Paolo Abeni Signed-off-by: David S. Miller include/net/udp.h | 2 ++ 1 file changed, 2 insertions(+) commit 6401f37c6eec16b9370e539ce9225f44f1cb09fb Merge: 54a6a04 2ed46ce Author: David S. Miller Date: Fri Aug 11 14:59:24 2017 -0700 Merge branch 'bpf-Minor-fix-in-bpf_convert_ctx_access' Daniel Borkmann says: ==================== bpf: Minor fix in bpf_convert_ctx_access First one was found while trying to compile the kernel with !CONFIG_NET_RX_BUSY_POLL. ==================== Signed-off-by: David S. Miller commit 2ed46ce45ec02f6b2188419acdf372a144e06fb5 Author: Daniel Borkmann Date: Fri Aug 11 18:31:25 2017 +0200 bpf: fix two missing target_size settings in bpf_convert_ctx_access When CONFIG_NET_SCHED or CONFIG_NET_RX_BUSY_POLL is /not/ set and we try a narrow __sk_buff load of tc_index or napi_id, respectively, then verifier rightfully complains that it's misconfigured, because we need to set target_size in each of the two cases. The rewrite for the ctx access is just a dummy op, but needs to pass, so fix this up. Fixes: f96da09473b5 ("bpf: simplify narrower ctx access") Reported-by: Shubham Bansal Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/filter.c | 2 ++ 1 file changed, 2 insertions(+) commit e4dde4127396f0c8f1c2e11b3ecc5baf4f8628bf Author: Daniel Borkmann Date: Fri Aug 11 18:31:24 2017 +0200 net: fix compilation when busy poll is not enabled MIN_NAPI_ID is used in various places outside of CONFIG_NET_RX_BUSY_POLL wrapping, so when it's not set we run into build errors such as: net/core/dev.c: In function 'dev_get_by_napi_id': net/core/dev.c:886:16: error: ‘MIN_NAPI_ID’ undeclared (first use in this function) if (napi_id < MIN_NAPI_ID) ^~~~~~~~~~~ Thus, have MIN_NAPI_ID always defined to fix these errors. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/busy_poll.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 54a6a043fb8580d5a741774669ef6049f402f228 Author: Anton Vasilyev Date: Fri Aug 11 15:57:22 2017 +0300 mISDN: Fix null pointer dereference at mISDN_FsmNew If mISDN_FsmNew() fails to allocate memory for jumpmatrix then null pointer dereference will occur on any write to jumpmatrix. The patch adds check on successful allocation and corresponding error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Signed-off-by: David S. Miller drivers/isdn/mISDN/fsm.c | 5 ++++- drivers/isdn/mISDN/fsm.h | 2 +- drivers/isdn/mISDN/layer1.c | 3 +-- drivers/isdn/mISDN/layer2.c | 15 +++++++++++++-- drivers/isdn/mISDN/tei.c | 20 +++++++++++++++++--- 5 files changed, 36 insertions(+), 9 deletions(-) commit bb3afda4fc4ea690ff92a36eef4c0afe4d19da04 Author: Simon Horman Date: Fri Aug 11 10:18:20 2017 +0200 nfp: do not update MTU from BH in flower app The Flower app may receive a request to update the MTU of a representor netdev upon receipt of a control message from the firmware. This requires the RTNL lock which needs to be taken outside of the packet processing path. As a handling of this correctly seems a little to invasive for a fix simply skip setting the MTU for now. Relevant backtrace: [ 1496.288489] BUG: scheduling while atomic: kworker/0:3/373/0x00000100 [ 1496.294911] dca syscopyarea sysfillrect sysimgblt fb_sys_fops ptp drm mxm_wmi ahci pps_core libahci i2c_algo_bit wmi [last unloaded: nfp] [ 1496.294918] CPU: 0 PID: 373 Comm: kworker/0:3 Tainted: G OE 4.13.0-rc3+ #3 [ 1496.294919] Hardware name: Supermicro X10DRi/X10DRi, BIOS 2.0 12/28/2015 [ 1496.294923] Workqueue: events work_for_cpu_fn [ 1496.294924] Call Trace: [ 1496.294927] [ 1496.294931] dump_stack+0x63/0x82 [ 1496.294935] __schedule_bug+0x54/0x70 [ 1496.294937] __schedule+0x62f/0x890 [ 1496.294941] ? intel_unmap_sg+0x90/0x90 [ 1496.294942] schedule+0x36/0x80 [ 1496.294943] schedule_preempt_disabled+0xe/0x10 [ 1496.294945] __mutex_lock.isra.2+0x445/0x4a0 [ 1496.294947] ? device_is_rmrr_locked+0x12/0x50 [ 1496.294950] ? kfree+0x162/0x170 [ 1496.294952] ? device_is_rmrr_locked+0x12/0x50 [ 1496.294953] ? iommu_should_identity_map+0x50/0xe0 [ 1496.294954] __mutex_lock_slowpath+0x13/0x20 [ 1496.294955] ? iommu_no_mapping+0x48/0xd0 [ 1496.294956] ? __mutex_lock_slowpath+0x13/0x20 [ 1496.294957] mutex_lock+0x2f/0x40 [ 1496.294960] rtnl_lock+0x15/0x20 [ 1496.294979] nfp_flower_cmsg_rx+0xc8/0x150 [nfp] [ 1496.294986] nfp_ctrl_poll+0x286/0x350 [nfp] [ 1496.294989] tasklet_action+0xf6/0x110 [ 1496.294992] __do_softirq+0xed/0x278 [ 1496.294993] irq_exit+0xb6/0xc0 [ 1496.294994] do_IRQ+0x4f/0xd0 [ 1496.294996] common_interrupt+0x89/0x89 Fixes: 948faa46c05b ("nfp: add support for control messages for flower app") Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit fbca164776e438b639af592c522b8b0506b54dcc Author: Romain Perier Date: Thu Aug 10 16:56:05 2017 +0200 net: stmmac: Use the right logging function in stmmac_mdio_register Currently, the function stmmac_mdio_register() is only used by stmmac_dvr_probe() from stmmac_main.c, in order to register the MDIO bus and probe information about the PHY. As this function is called before calling register_netdev(), all messages logged from stmmac_mdio_register are prefixed by "(unnamed net_device)". The goal of netdev_info or netdev_err is to dump useful infos about a net_device, when this data structure is partially initialized, there is no point for using these functions. This commit fixes the issue by replacing all netdev_*() by the corresponding dev_*() function for logging. The last netdev_info is replaced by phy_attached_info(), as a valid phydev can be used at this point. Signed-off-by: Romain Perier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 8d55373875052b891ae72c9bcaf9c2d7178676c0 Author: Konstantin Khlebnikov Date: Thu Aug 10 12:31:40 2017 +0300 net/sched/hfsc: allocate tcf block for hfsc root class Without this filters cannot be attached. Signed-off-by: Konstantin Khlebnikov Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure") Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_hfsc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ad729bc9acfb7c47112964b4877ef5404578ed13 Author: Andreas Born Date: Thu Aug 10 06:41:44 2017 +0200 bonding: require speed/duplex only for 802.3ad, alb and tlb The patch c4adfc822bf5 ("bonding: make speed, duplex setting consistent with link state") puts the link state to down if bond_update_speed_duplex() cannot retrieve speed and duplex settings. Assumably the patch was written with 802.3ad mode in mind which relies on link speed/duplex settings. For other modes like active-backup these settings are not required. Thus, only for these other modes, this patch reintroduces support for slaves that do not support reporting speed or duplex such as wireless devices. This fixes the regression reported in bug 196547 (https://bugzilla.kernel.org/show_bug.cgi?id=196547). Fixes: c4adfc822bf5 ("bonding: make speed, duplex setting consistent with link state") Signed-off-by: Andreas Born Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 6 ++++-- include/net/bonding.h | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) commit e71cb9e00922902ba0519f37d09145f117dc02b3 Author: Vivien Didelot Date: Wed Aug 9 16:46:09 2017 -0400 net: dsa: ksz: fix skb freeing The DSA layer frees the original skb when an xmit function returns NULL, meaning an error occurred. But if the tagging code copied the original skb, it is responsible of freeing the copy if an error occurs. The ksz tagging code currently has two issues: if skb_put_padto fails, the skb copy is not freed, and the original skb will be freed twice. To fix that, move skb_put_padto inside both branches of the skb_tailroom condition, before freeing the original skb, and free the copy on error. Signed-off-by: Vivien Didelot Reviewed-by: Woojung Huh Signed-off-by: David S. Miller net/dsa/tag_ksz.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 216e4a1def29a0d04182875034efb764eb37b8ff Merge: e0d0e04 8a9d6e9 Author: Linus Torvalds Date: Fri Aug 11 13:54:09 2017 -0700 Merge tag 'nfs-for-4.13-5' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "A few more NFS client bugfixes from me for rc5. Dros has a stable fix for flexfiles to prevent leaking the nfs4_ff_ds_version arrays when freeing a layout, Trond fixed a potential recovery loop situation with the TEST_STATEID operation, and Christoph fixed up the pNFS blocklayout Kconfig options to prevent unsafe use with kernels that don't have large block device support. Summary: Stable fix: - fix leaking nfs4_ff_ds_version array Other fixes: - improve TEST_STATEID OLD_STATEID handling to prevent recovery loop - require 64-bit sector_t for pNFS blocklayout to prevent 32-bit compile errors" * tag 'nfs-for-4.13-5' of git://git.linux-nfs.org/projects/anna/linux-nfs: pnfs/blocklayout: require 64-bit sector_t NFSv4: Ignore NFS4ERR_OLD_STATEID in nfs41_check_open_stateid() nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays commit e0d0e045b862da06f2a694696797b2c46ae8bc4f Merge: 0993133 4a8b53b Author: Linus Torvalds Date: Fri Aug 11 12:26:49 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A set of fixes that should go into this series. This contains: - Fix from Bart for blk-mq requeue queue running, preventing a continued loop of run/restart. - Fix for a bio/blk-integrity issue, in two parts. One from Christoph, fixing where verification happens, and one from Milan, for a NULL profile. - NVMe pull request, most of the changes being for nvme-fc, but also a few trivial core/pci fixes" * 'for-linus' of git://git.kernel.dk/linux-block: nvme: fix directive command numd calculation nvme: fix nvme reset command timeout handling nvme-pci: fix CMB sysfs file removal in reset path lpfc: support nvmet_fc defer_rcv callback nvmet_fc: add defer_req callback for deferment of cmd buffer return nvme: strip trailing 0-bytes in wwid_show block: Make blk_mq_delay_kick_requeue_list() rerun the queue at a quiet time bio-integrity: only verify integrity on the lowest stacked driver bio-integrity: Fix regression if profile verify_fn is NULL commit 0993133bb8e7a75524748ffed52c62e81c42b3e8 Merge: 7eb97ba 3f8b23a Author: Linus Torvalds Date: Fri Aug 11 11:56:54 2017 -0700 Merge tag 'mmc-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - fix lockdep splat when removing mmc_block module - fix the logic for setting eMMC HS400ES signal voltage MMC host: - omap_hsmmc: add CMD23 capability to fix -EIO errors" * tag 'mmc-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: block: fix lockdep splat when removing mmc_block module mmc: mmc: correct the logic for setting HS400ES signal voltage mmc: host: omap_hsmmc: Add CMD23 capability to omap_hsmmc driver commit 7eb97ba611f5904abb3e0653b005904d9144c81a Merge: 2bfc37c dd0c41f Author: Linus Torvalds Date: Fri Aug 11 11:44:18 2017 -0700 Merge tag 'fbdev-v4.13-rc5' of git://github.com/bzolnier/linux Pull fbdev fixes from Bartlomiej Zolnierkiewicz: - allow user to disable write combined mapping in efifb driver (Dave Airlie) - fix use after free bugs on driver removal in imxfb driver (Dan Carpenter) - fix unused variable warning in omapfb driver (Arnd Bergmann) * tag 'fbdev-v4.13-rc5' of git://github.com/bzolnier/linux: efifb: allow user to disable write combined mapping. fbdev: omapfb: remove unused variable video: fbdev: imxfb: use after free in imxfb_remove() commit 2bfc37cdef08844c77f801a1beaa1f4efd3215df Merge: 7d7a827 9183976 Author: Linus Torvalds Date: Fri Aug 11 11:20:48 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fixes from Miklos Szeredi: "Fix a few bugs in fuse" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: set mapping error in writepage_locked when it fails fuse: Dont call set_page_dirty_lock() for ITER_BVEC pages for async_dio fuse: initialize the flock flag in fuse_file on allocation commit 7d7a827ba92c4a1a29fb1d0812db503e80cf3a59 Merge: 8001a97 a7990c6 Author: Linus Torvalds Date: Fri Aug 11 11:15:51 2017 -0700 Merge tag 'iommu-fixes-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fix from Joerg Roedel: "Fix a NULL-pointer dereference in arm_smmu_add_device" * tag 'iommu-fixes-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/arm-smmu: fix null-pointer dereference in arm_smmu_add_device commit 8a9d6e964d318533ba3d2901ce153ba317c99a89 Author: Christoph Hellwig Date: Sat Aug 5 10:59:14 2017 +0200 pnfs/blocklayout: require 64-bit sector_t The blocklayout code does not compile cleanly for a 32-bit sector_t, and also has no reliable checks for devices sizes, which makes it unsafe to use with a kernel that doesn't support large block devices. Signed-off-by: Christoph Hellwig Reported-by: Arnd Bergmann Fixes: 5c83746a0cf2 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing") Signed-off-by: Anna Schumaker fs/nfs/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 8001a975f955f532d8d0c27b224d58646e202f2a Merge: b2dbdf2 96ea91e Author: Linus Torvalds Date: Fri Aug 11 08:56:01 2017 -0700 Merge tag 'powerpc-4.13-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "All fixes for code that went in this cycle. - a revert of an optimisation to the syscall exit path, which could lead to an oops on either older machines or machines with > 1TB of memory - disable some deep idle states if the firmware configuration for them fails - re-enable HARD/SOFT lockup detectors in defconfigs after a Kconfig change - six fairly small patches fixing bugs in our new watchdog code Thanks to: Gautham R Shenoy, Nicholas Piggin" * tag 'powerpc-4.13-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/watchdog: add locking around init/exit functions powerpc/watchdog: Fix marking of stuck CPUs powerpc/watchdog: Fix final-check recovered case powerpc/watchdog: Moderate touch_nmi_watchdog overhead powerpc/watchdog: Improve watchdog lock primitive powerpc: NMI IPI improve lock primitive powerpc/configs: Re-enable HARD/SOFT lockup detectors powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails Revert "powerpc/64: Avoid restore_math call if possible in syscall exit" commit 622b2fbe625bc255faa4ee69a0fbcab80d3e40e6 Author: Shuah Khan Date: Wed Aug 9 15:59:10 2017 -0600 selftests: timers: freq-step: fix compile error Fix compile error due to ksft_exit_skip() update to take var_args. freq-step.c: In function ‘init_test’: freq-step.c:234:3: error: too few arguments to function ‘ksft_exit_skip’ ksft_exit_skip(); ^~~~~~~~~~~~~~ In file included from freq-step.c:26:0: ../kselftest.h:167:19: note: declared here static inline int ksft_exit_skip(const char *msg, ...) ^~~~~~~~~~~~~~ : recipe for target 'freq-step' failed Signed-off-by: Shuah Khan tools/testing/selftests/timers/freq-step.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a7990c647b35415e3dd07a077480a908678947ba Author: Artem Savkov Date: Tue Aug 8 12:26:02 2017 +0200 iommu/arm-smmu: fix null-pointer dereference in arm_smmu_add_device Commit c54451a "iommu/arm-smmu: Fix the error path in arm_smmu_add_device" removed fwspec assignment in legacy_binding path as redundant which is wrong. It needs to be updated after fwspec initialisation in arm_smmu_register_legacy_master() as it is dereferenced later. Without this there is a NULL-pointer dereference panic during boot on some hosts. Signed-off-by: Artem Savkov Reviewed-by: Robin Murphy Acked-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 020db9d3c1dc0aab9ab1252f4a36b6d8456b8794 Author: Liu Shuo Date: Sun Jul 30 00:59:57 2017 +0800 xen/events: Fix interrupt lost during irq_disable and irq_enable Here is a device has xen-pirq-MSI interrupt. Dom0 might lost interrupt during driver irq_disable/irq_enable. Here is the scenario, 1. irq_disable -> disable_dynirq -> mask_evtchn(irq channel) 2. dev interrupt raised by HW and Xen mark its evtchn as pending 3. irq_enable -> startup_pirq -> eoi_pirq -> clear_evtchn(channel of irq) -> clear pending status 4. consume_one_event process the irq event without pending bit assert which result in interrupt lost once 5. No HW interrupt raising anymore. Now use enable_dynirq for enable_pirq of xen_pirq_chip to remove eoi_pirq when irq_enable. Signed-off-by: Liu Shuo Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/events/events_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 529871bb3c0675d0b425e2070d5a739db097be98 Author: Juergen Gross Date: Fri Jul 28 16:53:55 2017 +0200 xen: avoid deadlock in xenbus When starting the xenwatch thread a theoretical deadlock situation is possible: xs_init() contains: task = kthread_run(xenwatch_thread, NULL, "xenwatch"); if (IS_ERR(task)) return PTR_ERR(task); xenwatch_pid = task->pid; And xenwatch_thread() does: mutex_lock(&xenwatch_mutex); ... event->handle->callback(); ... mutex_unlock(&xenwatch_mutex); The callback could call unregister_xenbus_watch() which does: ... if (current->pid != xenwatch_pid) mutex_lock(&xenwatch_mutex); ... In case a watch is firing before xenwatch_pid could be set and the callback of that watch unregisters a watch, then a self-deadlock would occur. Avoid this by setting xenwatch_pid in xenwatch_thread(). Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/xenbus/xenbus_xs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a8b53be64045fe74398c178041463318f96d5e9 Merge: d4acf36 a082b42 Author: Jens Axboe Date: Fri Aug 11 08:07:19 2017 -0600 Merge branch 'nvme-4.13' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "A few more small fixes - the fc/lpfc update is the biggest by far." commit adb4f11e0a8f4e29900adb2b7af28b6bbd5c1fa4 Author: Ding Tianhong Date: Thu Aug 10 10:52:45 2017 +0800 clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled On platforms with an arch timer erratum workaround, it's possible for arch_timer_reg_read_stable() to recurse into itself when certain tracing options are enabled, leading to stack overflows and related problems. For example, when PREEMPT_TRACER and FUNCTION_GRAPH_TRACER are selected, it's possible to trigger this with: $ mount -t debugfs nodev /sys/kernel/debug/ $ echo function_graph > /sys/kernel/debug/tracing/current_tracer The problem is that in such cases, preempt_disable() instrumentation attempts to acquire a timestamp via trace_clock(), resulting in a call back to arch_timer_reg_read_stable(), and hence recursion. This patch changes arch_timer_reg_read_stable() to use preempt_{disable,enable}_notrace(), which avoids this. This problem is similar to the fixed by upstream commit 96b3d28bf4 ("sched/clock: Prevent tracing recursion in sched_clock_cpu()"). Fixes: 6acc71ccac71 ("arm64: arch_timer: Allows a CPU-specific erratum to only affect a subset of CPUs") Signed-off-by: Ding Tianhong Acked-by: Mark Rutland Acked-by: Marc Zyngier Signed-off-by: Daniel Lezcano arch/arm64/include/asm/arch_timer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ca83dcf4e3bc0c98836dbb97553792ca7ea5429 Author: Juergen Gross Date: Fri Jul 28 12:23:14 2017 +0200 xen: fix hvm guest with kaslr enabled A Xen HVM guest running with KASLR enabled will die rather soon today because the shared info page mapping is using va() too early. This was introduced by commit a5d5f328b0e2baa5ee7c119fd66324eb79eeeb66 ("xen: allocate page for shared info page from low memory"). In order to fix this use early_memremap() to get a temporary virtual address for shared info until va() can be used safely. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Acked-by: Ingo Molnar Signed-off-by: Juergen Gross arch/x86/xen/enlighten_hvm.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 10231f69eb039550864ff3eb395da0c63c03ed5f Author: Juergen Gross Date: Fri Jul 28 12:23:13 2017 +0200 xen: split up xen_hvm_init_shared_info() Instead of calling xen_hvm_init_shared_info() on boot and resume split it up into a boot time function searching for the pfn to use and a mapping function doing the hypervisor mapping call. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Acked-by: Ingo Molnar Signed-off-by: Juergen Gross arch/x86/xen/enlighten_hvm.c | 45 +++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) commit c138d81163d82db044dcaf1141395713f03bf0bf Author: Juergen Gross Date: Fri Jul 28 12:23:12 2017 +0200 x86: provide an init_mem_mapping hypervisor hook Provide a hook in hypervisor_x86 called after setting up initial memory mapping. This is needed e.g. by Xen HVM guests to map the hypervisor shared info page. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Acked-by: Ingo Molnar Signed-off-by: Juergen Gross arch/x86/include/asm/hypervisor.h | 10 ++++++++++ arch/x86/mm/init.c | 3 +++ 2 files changed, 13 insertions(+) commit b45e4c45b13275a6b4a3f83ae8301a1963fbe5d0 Author: Colin Ian King Date: Thu Aug 10 16:57:09 2017 +0100 x86: Mark various structures and functions as 'static' Mark a couple of structures and functions as 'static', pointed out by Sparse: warning: symbol 'bts_pmu' was not declared. Should it be static? warning: symbol 'p4_event_aliases' was not declared. Should it be static? warning: symbol 'rapl_attr_groups' was not declared. Should it be static? symbol 'process_uv2_message' was not declared. Should it be static? Signed-off-by: Colin Ian King Acked-by: Andrew Banman # for the UV change Cc: Alexander Shishkin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Will Deacon Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20170810155709.7094-1-colin.king@canonical.com Signed-off-by: Ingo Molnar arch/x86/events/intel/bts.c | 2 +- arch/x86/events/intel/p4.c | 2 +- arch/x86/events/intel/rapl.c | 2 +- arch/x86/platform/uv/tlb_uv.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 5442c26995527245c94c4a49e535eae8a60a5299 Author: Borislav Petkov Date: Tue Aug 1 20:55:52 2017 +0200 x86/cpufeature, kvm/svm: Rename (shorten) the new "virtualized VMSAVE/VMLOAD" CPUID flag "virtual_vmload_vmsave" is what is going to land in /proc/cpuinfo now as per v4.13-rc4, for a single feature bit which is clearly too long. So rename it to what it is called in the processor manual. "v_vmsave_vmload" is a bit shorter, after all. We could go more aggressively here but having it the same as in the processor manual is advantageous. Signed-off-by: Borislav Petkov Acked-by: Radim Krčmář Cc: Janakarajan Natarajan Cc: Jörg Rödel Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kvm-ML Link: http://lkml.kernel.org/r/20170801185552.GA3743@nazgul.tnic Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/kvm/svm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 599dc457c79bde8bd4fe8bbb2ba1f30ef3d7a5c8 Author: Matt Redfearn Date: Tue Jul 18 09:25:39 2017 +0100 clocksource/drivers/Kconfig: Fix CLKSRC_PISTACHIO dependencies In v4.13, CLKSRC_PISTACHIO can select TIMER_OF on architectures without GENERIC_CLOCKEVENTS, resulting in a struct clock_event_device missing some required features and build breakage compiling timer_of.c. One of the symbols selecting TIMER_OF is CLKSRC_PISTACHIO, so add the dependency on GENERIC_CLOCKEVENTS. Thanks to kbuild test robot for finding this error (https://lkml.org/lkml/2017/7/16/249) Signed-off-by: Matt Redfearn Suggested-by: Ian Abbott Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e80dbd87286d3252ac2f78c6465c16e2ec8d476 Author: Dan Carpenter Date: Mon Jul 10 10:22:25 2017 +0300 clocksource/drivers/timer-of: Checking for IS_ERR() instead of NULL The current code checks the return value of the of_io_request_and_map() function as it was returning a NULL pointer in case of error. However, it returns an error code encoded in the pointer return value, not a NULL value. Fix this by checking the returned pointer against IS_ERR() and return the error with PTR_ERR(). Signed-off-by: Dan Carpenter Signed-off-by: Daniel Lezcano drivers/clocksource/timer-of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9183976ef1c858c289b09066fd57aae51b86653c Author: Jeff Layton Date: Thu May 25 06:57:50 2017 -0400 fuse: set mapping error in writepage_locked when it fails This ensures that we see errors on fsync when writeback fails. Signed-off-by: Jeff Layton Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Miklos Szeredi fs/fuse/file.c | 1 + 1 file changed, 1 insertion(+) commit 5be5dd38d4628fdbff7359f235f7cdf0cf9655f1 Author: Philipp Zabel Date: Fri Aug 5 11:55:18 2016 +0200 drm/imx: ipuv3-plane: fix YUV framebuffer scanout on the base plane Historically, only RGB framebuffers could be assigned to the primary plane. This changed with universal plane support. Since no colorspace conversion was set up for the IPUv3 full plane, assigning YUV frame buffers to the primary plane caused incorrect output. Fix this by enabling color space conversion also for the primary plane. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2406b296a3a80ba1c78707f205556f2388d474ff Author: Arnd Bergmann Date: Fri Jul 21 22:56:19 2017 +0200 gpu: ipu-v3: add DRM dependency The new PRE/PRG driver code causes a link failure when IPUv3 is built-in, but DRM is built as a module: drivers/gpu/ipu-v3/ipu-pre.o: In function `ipu_pre_configure': ipu-pre.c:(.text.ipu_pre_configure+0x18): undefined reference to `drm_format_info' drivers/gpu/ipu-v3/ipu-prg.o: In function `ipu_prg_format_supported': ipu-prg.c:(.text.ipu_prg_format_supported+0x8): undefined reference to `drm_format_info' Adding a Kconfig dependency on DRM means we don't run into this problem any more. If DRM is disabled altogether, the IPUv3 driver is built without PRE/PRG support. Fixes: ea9c260514c1 ("gpu: ipu-v3: add driver for Prefetch Resolve Gasket") Link: https://patchwork.kernel.org/patch/9636665/ Signed-off-by: Arnd Bergmann [p.zabel@pengutronix.de: changed the dependency from DRM to DRM || !DRM, since the link failure only happens when DRM=m and IPUV3_CORE=y. Modified the commit message to reflect this.] Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4d3a869333b74352c372077f316756d38cae09b1 Author: Takashi Iwai Date: Fri Aug 11 09:51:41 2017 +0200 ALSA: seq: Fix CONFIG_SND_SEQ_MIDI dependency The commit 0181307abc1d ("ALSA: seq: Reorganize kconfig and build") rewrote the dependency of each sequencer module in a standard way, but there was one change applied mistakenly: CONFIG_SND_SEQ_MIDI isn't enabled properly by CONFIG_SND_RAWMIDI. I seem to have changed the wrong one instead, CONFIG_SND_SEQ_MIDI_EMUL, which is eventually reverse-selected by CONFIG_SND_SEQ_MIDI itself. This ended up the lack of snd-seq-midi module as reported below. The fix is to put def_tristate properly to CONFIG_SND_SEQ_MIDI instead of *_MIDI_EMUL entry. Fixes: 0181307abc1d ("ALSA: seq: Reorganize kconfig and build") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196633 Signed-off-by: Takashi Iwai sound/core/seq/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b2dbdf2ca1d2803e9cdc46a94554c4a39ffb235a Merge: 27df704 46828dc Author: Linus Torvalds Date: Thu Aug 10 22:33:47 2017 -0700 Merge tag 'drm-fixes-for-v4.13-rc5' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Nothing too earth shattering here, it just seems like lots of little things all over the place. msm has probably the larger amount of changes, but they all seem fine, otherwise, some rockchip, i915, etnaviv and exynos fixes, along with one nouveau regression fix for some older GPUs" * tag 'drm-fixes-for-v4.13-rc5' of git://people.freedesktop.org/~airlied/linux: (35 commits) drm/nouveau/disp/nv04: avoid creation of output paths drm: make DRM_STM default n drm/exynos: forbid creating framebuffers from too small GEM buffers drm/etnaviv: Fix off-by-one error in reloc checking drm/i915: fix backlight invert for non-zero minimum brightness drm/i915/shrinker: Wrap need_resched() inside preempt-disable drm/i915/perf: fix flex eu registers programming drm/i915: Fix out-of-bounds array access in bdw_load_gamma_lut drm/i915/gvt: Change the max length of mmio_reg_rw from 4 to 8 drm/i915/gvt: Initialize MMIO Block with HW state drm/rockchip: vop: report error when check resource error drm/rockchip: vop: round_up pitches to word align drm/rockchip: vop: fix NV12 video display error drm/rockchip: vop: fix iommu page fault when resume drm/i915/gvt: clean workload queue if error happened drm/i915/gvt: change resetting to resetting_eng drm/msm: gpu: don't abuse dma_alloc for non-DMA allocations drm/msm: gpu: call qcom_mdt interfaces only for ARCH_QCOM drm/msm/adreno: Prevent unclocked access when retrieving timestamps drm/msm: Remove __user from __u64 data types ... commit a8ec3ee861b6e4e6b82a98777c65510ae63766c1 Author: Alexey Brodkin Date: Thu Aug 10 18:07:36 2017 +0300 arc: Mask individual IRQ lines during core INTC init ARC cores on reset have all interrupt lines of built-in INTC enabled. Which means once we globally enable interrupts (very early on boot) faulty hardware blocks may trigger an interrupt that Linux kernel cannot handle yet as corresponding handler is not yet installed. In that case system falls in "interrupt storm" and basically never does anything useful except entering and exiting generic IRQ handling code. One real example of that kind of problematic hardware is DW GMAC which also has interrupts enabled on reset and if Ethernet PHY informs GMAC about link state, GMAC immediately reports that upstream to ARC core and here we are. Now with that change we mask all individual IRQ lines making entire system more fool-proof. [This patch was motivated by Adaptrum platform support] Signed-off-by: Alexey Brodkin Cc: Eugeniy Paltsev Tested-by: Alexandru Gagniuc Signed-off-by: Vineet Gupta arch/arc/kernel/intc-arcv2.c | 3 +++ arch/arc/kernel/intc-compact.c | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit 8e2f3bce05e056575c2c84a344a8291fdabb5f21 Author: Doug Smythies Date: Tue Aug 8 14:12:49 2017 -0700 cpufreq: x86: Disable interrupts during MSRs reading According to Intel 64 and IA-32 Architectures SDM, Volume 3, Chapter 14.2, "Software needs to exercise care to avoid delays between the two RDMSRs (for example interrupts)". So, disable interrupts during reading MSRs IA32_APERF and IA32_MPERF. See also: commit 4ab60c3f32c7 (cpufreq: intel_pstate: Disable interrupts during MSRs reading). Signed-off-by: Doug Smythies Reviewed-by: Len Brown Signed-off-by: Rafael J. Wysocki arch/x86/kernel/cpu/aperfmperf.c | 3 +++ 1 file changed, 3 insertions(+) commit c587c79f90632df59c61383c6abebb2e07a81911 Author: Doug Smythies Date: Tue Aug 8 14:05:12 2017 -0700 cpufreq: intel_pstate: report correct CPU frequencies during trace The intel_pstate CPU frequency scaling driver has always calculated CPU frequency incorrectly. Recent changes have eliminted most of the issues, however the frequency reported in the trace buffer, if used, is incorrect. It remains desireable that cpu->pstate.scaling still be a nice round number for things such as when setting max and min frequencies. So the proposal is to just fix the reported frequency in the trace data. Fixes what remains of [1]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=96521 # [1] Signed-off-by: Doug Smythies Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 27df704d43274578ca097c8a60f265faaacee7fb Merge: 4e082e9 e86b298 Author: Linus Torvalds Date: Thu Aug 10 16:20:52 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "21 fixes" * emailed patches from Andrew Morton : (21 commits) userfaultfd: replace ENOSPC with ESRCH in case mm has gone during copy/zeropage zram: rework copy of compressor name in comp_algorithm_store() rmap: do not call mmu_notifier_invalidate_page() under ptl mm: fix list corruptions on shmem shrinklist mm/balloon_compaction.c: don't zero ballooned pages MAINTAINERS: copy virtio on balloon_compaction.c mm: fix KSM data corruption mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem mm: make tlb_flush_pending global mm: refactor TLB gathering API Revert "mm: numa: defer TLB flush for THP migration as long as possible" mm: migrate: fix barriers around tlb_flush_pending mm: migrate: prevent racy access to tlb_flush_pending fault-inject: fix wrong should_fail() decision in task context test_kmod: fix small memory leak on filesystem tests test_kmod: fix the lock in register_test_dev_kmod() test_kmod: fix bug which allows negative values on two config options test_kmod: fix spelling mistake: "EMTPY" -> "EMPTY" userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case mm: ratelimit PFNs busy info message ... commit e86b298bebf7e799e4b7232e9135799f1947552e Author: Mike Rapoport Date: Thu Aug 10 15:24:32 2017 -0700 userfaultfd: replace ENOSPC with ESRCH in case mm has gone during copy/zeropage When the process exit races with outstanding mcopy_atomic, it would be better to return ESRCH error. When such race occurs the process and it's mm are going away and returning "no such process" to the uffd monitor seems better fit than ENOSPC. Link: http://lkml.kernel.org/r/1502111545-32305-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Suggested-by: Michal Hocko Acked-by: Michal Hocko Cc: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Pavel Emelyanov Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f357e345eef7863da037e0243f2d3df4ba6df986 Author: Matthias Kaehlcke Date: Thu Aug 10 15:24:29 2017 -0700 zram: rework copy of compressor name in comp_algorithm_store() comp_algorithm_store() passes the size of the source buffer to strlcpy() instead of the destination buffer size. Make it explicit that the two buffers have the same size and use strcpy() instead of strlcpy(). The latter can be done safely since the function ensures that the string in the source buffer is terminated. Link: http://lkml.kernel.org/r/20170803163350.45245-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aac2fea94f7a3df8ad1eeb477eb2643f81fd5393 Author: Kirill A. Shutemov Date: Thu Aug 10 15:24:27 2017 -0700 rmap: do not call mmu_notifier_invalidate_page() under ptl MMU notifiers can sleep, but in page_mkclean_one() we call mmu_notifier_invalidate_page() under page table lock. Let's instead use mmu_notifier_invalidate_range() outside page_vma_mapped_walk() loop. [jglisse@redhat.com: try_to_unmap_one() do not call mmu_notifier under ptl] Link: http://lkml.kernel.org/r/20170809204333.27485-1-jglisse@redhat.com Link: http://lkml.kernel.org/r/20170804134928.l4klfcnqatni7vsc@black.fi.intel.com Fixes: c7ab0d2fdc84 ("mm: convert try_to_unmap_one() to use page_vma_mapped_walk()") Signed-off-by: Kirill A. Shutemov Signed-off-by: Jérôme Glisse Reported-by: axie Cc: Alex Deucher Cc: "Writer, Tim" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 52 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 22 deletions(-) commit d041353dc98a6339182cd6f628b4c8f111278cb3 Author: Cong Wang Date: Thu Aug 10 15:24:24 2017 -0700 mm: fix list corruptions on shmem shrinklist We saw many list corruption warnings on shmem shrinklist: WARNING: CPU: 18 PID: 177 at lib/list_debug.c:59 __list_del_entry+0x9e/0xc0 list_del corruption. prev->next should be ffff9ae5694b82d8, but was ffff9ae5699ba960 Modules linked in: intel_rapl sb_edac edac_core x86_pkg_temp_thermal coretemp iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul ghash_clmulni_intel raid0 dcdbas shpchp wmi hed i2c_i801 ioatdma lpc_ich i2c_smbus acpi_cpufreq tcp_diag inet_diag sch_fq_codel ipmi_si ipmi_devintf ipmi_msghandler igb ptp crc32c_intel pps_core i2c_algo_bit i2c_core dca ipv6 crc_ccitt CPU: 18 PID: 177 Comm: kswapd1 Not tainted 4.9.34-t3.el7.twitter.x86_64 #1 Hardware name: Dell Inc. PowerEdge C6220/0W6W6G, BIOS 2.2.3 11/07/2013 Call Trace: dump_stack+0x4d/0x66 __warn+0xcb/0xf0 warn_slowpath_fmt+0x4f/0x60 __list_del_entry+0x9e/0xc0 shmem_unused_huge_shrink+0xfa/0x2e0 shmem_unused_huge_scan+0x20/0x30 super_cache_scan+0x193/0x1a0 shrink_slab.part.41+0x1e3/0x3f0 shrink_slab+0x29/0x30 shrink_node+0xf9/0x2f0 kswapd+0x2d8/0x6c0 kthread+0xd7/0xf0 ret_from_fork+0x22/0x30 WARNING: CPU: 23 PID: 639 at lib/list_debug.c:33 __list_add+0x89/0xb0 list_add corruption. prev->next should be next (ffff9ae5699ba960), but was ffff9ae5694b82d8. (prev=ffff9ae5694b82d8). Modules linked in: intel_rapl sb_edac edac_core x86_pkg_temp_thermal coretemp iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul ghash_clmulni_intel raid0 dcdbas shpchp wmi hed i2c_i801 ioatdma lpc_ich i2c_smbus acpi_cpufreq tcp_diag inet_diag sch_fq_codel ipmi_si ipmi_devintf ipmi_msghandler igb ptp crc32c_intel pps_core i2c_algo_bit i2c_core dca ipv6 crc_ccitt CPU: 23 PID: 639 Comm: systemd-udevd Tainted: G W 4.9.34-t3.el7.twitter.x86_64 #1 Hardware name: Dell Inc. PowerEdge C6220/0W6W6G, BIOS 2.2.3 11/07/2013 Call Trace: dump_stack+0x4d/0x66 __warn+0xcb/0xf0 warn_slowpath_fmt+0x4f/0x60 __list_add+0x89/0xb0 shmem_setattr+0x204/0x230 notify_change+0x2ef/0x440 do_truncate+0x5d/0x90 path_openat+0x331/0x1190 do_filp_open+0x7e/0xe0 do_sys_open+0x123/0x200 SyS_open+0x1e/0x20 do_syscall_64+0x61/0x170 entry_SYSCALL64_slow_path+0x25/0x25 The problem is that shmem_unused_huge_shrink() moves entries from the global sbinfo->shrinklist to its local lists and then releases the spinlock. However, a parallel shmem_setattr() could access one of these entries directly and add it back to the global shrinklist if it is removed, with the spinlock held. The logic itself looks solid since an entry could be either in a local list or the global list, otherwise it is removed from one of them by list_del_init(). So probably the race condition is that, one CPU is in the middle of INIT_LIST_HEAD() but the other CPU calls list_empty() which returns true too early then the following list_add_tail() sees a corrupted entry. list_empty_careful() is designed to fix this situation. [akpm@linux-foundation.org: add comments] Link: http://lkml.kernel.org/r/20170803054630.18775-1-xiyou.wangcong@gmail.com Fixes: 779750d20b93 ("shmem: split huge pages beyond i_size under memory pressure") Signed-off-by: Cong Wang Acked-by: Linus Torvalds Acked-by: Kirill A. Shutemov Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit af54aed94bf3a1cf0b847bbbf00f9a58e278b338 Author: Wei Wang Date: Thu Aug 10 15:24:21 2017 -0700 mm/balloon_compaction.c: don't zero ballooned pages Revert commit bb01b64cfab7 ("mm/balloon_compaction.c: enqueue zero page to balloon device")' Zeroing ballon pages is rather time consuming, especially when a lot of pages are in flight. E.g. 7GB worth of ballooned memory takes 2.8s with __GFP_ZERO while it takes ~491ms without it. The original commit argued that zeroing will help ksmd to merge these pages on the host but this argument is assuming that the host actually marks balloon pages for ksm which is not universally true. So we pay performance penalty for something that even might not be used in the end which is wrong. The host can zero out pages on its own when there is a need. [mhocko@kernel.org: new changelog text] Link: http://lkml.kernel.org/r/1501761557-9758-1-git-send-email-wei.w.wang@intel.com Fixes: bb01b64cfab7 ("mm/balloon_compaction.c: enqueue zero page to balloon device") Signed-off-by: Wei Wang Acked-by: Michael S. Tsirkin Acked-by: Michal Hocko Cc: zhenwei.pi Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/balloon_compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0a6a5ae6b5d976592a83bdafc1c2f49b0718c65 Author: Michael S. Tsirkin Date: Thu Aug 10 15:24:18 2017 -0700 MAINTAINERS: copy virtio on balloon_compaction.c Changes to mm/balloon_compaction.c can easily break virtio, and virtio is the only user of that interface. Add a line to MAINTAINERS so whoever changes that file remembers to copy us. Link: http://lkml.kernel.org/r/1501764010-24456-1-git-send-email-mst@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Rafael Aquini Acked-by: Wei Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b3a81d0841a954a3d3e782059960f53e63b37066 Author: Minchan Kim Date: Thu Aug 10 15:24:15 2017 -0700 mm: fix KSM data corruption Nadav reported KSM can corrupt the user data by the TLB batching race[1]. That means data user written can be lost. Quote from Nadav Amit: "For this race we need 4 CPUs: CPU0: Caches a writable and dirty PTE entry, and uses the stale value for write later. CPU1: Runs madvise_free on the range that includes the PTE. It would clear the dirty-bit. It batches TLB flushes. CPU2: Writes 4 to /proc/PID/clear_refs , clearing the PTEs soft-dirty. We care about the fact that it clears the PTE write-bit, and of course, batches TLB flushes. CPU3: Runs KSM. Our purpose is to pass the following test in write_protect_page(): if (pte_write(*pvmw.pte) || pte_dirty(*pvmw.pte) || (pte_protnone(*pvmw.pte) && pte_savedwrite(*pvmw.pte))) Since it will avoid TLB flush. And we want to do it while the PTE is stale. Later, and before replacing the page, we would be able to change the page. Note that all the operations the CPU1-3 perform canhappen in parallel since they only acquire mmap_sem for read. We start with two identical pages. Everything below regards the same page/PTE. CPU0 CPU1 CPU2 CPU3 ---- ---- ---- ---- Write the same value on page [cache PTE as dirty in TLB] MADV_FREE pte_mkclean() 4 > clear_refs pte_wrprotect() write_protect_page() [ success, no flush ] pages_indentical() [ ok ] Write to page different value [Ok, using stale PTE] replace_page() Later, CPU1, CPU2 and CPU3 would flush the TLB, but that is too late. CPU0 already wrote on the page, but KSM ignored this write, and it got lost" In above scenario, MADV_FREE is fixed by changing TLB batching API including [set|clear]_tlb_flush_pending. Remained thing is soft-dirty part. This patch changes soft-dirty uses TLB batching API instead of flush_tlb_mm and KSM checks pending TLB flush by using mm_tlb_flush_pending so that it will flush TLB to avoid data lost if there are other parallel threads pending TLB flush. [1] http://lkml.kernel.org/r/BD3A0EBE-ECF4-41D4-87FA-C755EA9AB6BD@gmail.com Link: http://lkml.kernel.org/r/20170802000818.4760-8-namit@vmware.com Signed-off-by: Minchan Kim Signed-off-by: Nadav Amit Reported-by: Nadav Amit Tested-by: Nadav Amit Reviewed-by: Andrea Arcangeli Cc: Mel Gorman Cc: Hugh Dickins Cc: "David S. Miller" Cc: Andy Lutomirski Cc: Heiko Carstens Cc: Ingo Molnar Cc: Jeff Dike Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Nadav Amit Cc: Rik van Riel Cc: Russell King Cc: Sergey Senozhatsky Cc: Tony Luck Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 7 +++++-- mm/ksm.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 99baac21e4585f4258f919502c6e23f1e5edc98c Author: Minchan Kim Date: Thu Aug 10 15:24:12 2017 -0700 mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem Nadav reported parallel MADV_DONTNEED on same range has a stale TLB problem and Mel fixed it[1] and found same problem on MADV_FREE[2]. Quote from Mel Gorman: "The race in question is CPU 0 running madv_free and updating some PTEs while CPU 1 is also running madv_free and looking at the same PTEs. CPU 1 may have writable TLB entries for a page but fail the pte_dirty check (because CPU 0 has updated it already) and potentially fail to flush. Hence, when madv_free on CPU 1 returns, there are still potentially writable TLB entries and the underlying PTE is still present so that a subsequent write does not necessarily propagate the dirty bit to the underlying PTE any more. Reclaim at some unknown time at the future may then see that the PTE is still clean and discard the page even though a write has happened in the meantime. I think this is possible but I could have missed some protection in madv_free that prevents it happening." This patch aims for solving both problems all at once and is ready for other problem with KSM, MADV_FREE and soft-dirty story[3]. TLB batch API(tlb_[gather|finish]_mmu] uses [inc|dec]_tlb_flush_pending and mmu_tlb_flush_pending so that when tlb_finish_mmu is called, we can catch there are parallel threads going on. In that case, forcefully, flush TLB to prevent for user to access memory via stale TLB entry although it fail to gather page table entry. I confirmed this patch works with [4] test program Nadav gave so this patch supersedes "mm: Always flush VMA ranges affected by zap_page_range v2" in current mmotm. NOTE: This patch modifies arch-specific TLB gathering interface(x86, ia64, s390, sh, um). It seems most of architecture are straightforward but s390 need to be careful because tlb_flush_mmu works only if mm->context.flush_mm is set to non-zero which happens only a pte entry really is cleared by ptep_get_and_clear and friends. However, this problem never changes the pte entries but need to flush to prevent memory access from stale tlb. [1] http://lkml.kernel.org/r/20170725101230.5v7gvnjmcnkzzql3@techsingularity.net [2] http://lkml.kernel.org/r/20170725100722.2dxnmgypmwnrfawp@suse.de [3] http://lkml.kernel.org/r/BD3A0EBE-ECF4-41D4-87FA-C755EA9AB6BD@gmail.com [4] https://patchwork.kernel.org/patch/9861621/ [minchan@kernel.org: decrease tlb flush pending count in tlb_finish_mmu] Link: http://lkml.kernel.org/r/20170808080821.GA31730@bbox Link: http://lkml.kernel.org/r/20170802000818.4760-7-namit@vmware.com Signed-off-by: Minchan Kim Signed-off-by: Nadav Amit Reported-by: Nadav Amit Reported-by: Mel Gorman Acked-by: Mel Gorman Cc: Ingo Molnar Cc: Russell King Cc: Tony Luck Cc: Martin Schwidefsky Cc: "David S. Miller" Cc: Heiko Carstens Cc: Yoshinori Sato Cc: Jeff Dike Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Hugh Dickins Cc: Mel Gorman Cc: Nadav Amit Cc: Rik van Riel Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/tlb.h | 7 ++++++- arch/ia64/include/asm/tlb.h | 4 +++- arch/s390/include/asm/tlb.h | 7 ++++++- arch/sh/include/asm/tlb.h | 4 ++-- arch/um/include/asm/tlb.h | 7 ++++++- include/asm-generic/tlb.h | 2 +- include/linux/mm_types.h | 8 ++++++++ mm/memory.c | 18 ++++++++++++++++-- 8 files changed, 48 insertions(+), 9 deletions(-) commit 0a2dd266dd6b7a31503b5bbe63af05961a6b446d Author: Minchan Kim Date: Thu Aug 10 15:24:09 2017 -0700 mm: make tlb_flush_pending global Currently, tlb_flush_pending is used only for CONFIG_[NUMA_BALANCING| COMPACTION] but upcoming patches to solve subtle TLB flush batching problem will use it regardless of compaction/NUMA so this patch doesn't remove the dependency. [akpm@linux-foundation.org: remove more ifdefs from world's ugliest printk statement] Link: http://lkml.kernel.org/r/20170802000818.4760-6-namit@vmware.com Signed-off-by: Minchan Kim Signed-off-by: Nadav Amit Acked-by: Mel Gorman Cc: "David S. Miller" Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Heiko Carstens Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jeff Dike Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Nadav Amit Cc: Rik van Riel Cc: Russell King Cc: Sergey Senozhatsky Cc: Tony Luck Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 21 --------------------- mm/debug.c | 4 ---- 2 files changed, 25 deletions(-) commit 56236a59556cfd3bae7bffb7e5f438b5ef0af880 Author: Minchan Kim Date: Thu Aug 10 15:24:05 2017 -0700 mm: refactor TLB gathering API This patch is a preparatory patch for solving race problems caused by TLB batch. For that, we will increase/decrease TLB flush pending count of mm_struct whenever tlb_[gather|finish]_mmu is called. Before making it simple, this patch separates architecture specific part and rename it to arch_tlb_[gather|finish]_mmu and generic part just calls it. It shouldn't change any behavior. Link: http://lkml.kernel.org/r/20170802000818.4760-5-namit@vmware.com Signed-off-by: Minchan Kim Signed-off-by: Nadav Amit Acked-by: Mel Gorman Cc: Ingo Molnar Cc: Russell King Cc: Tony Luck Cc: Martin Schwidefsky Cc: "David S. Miller" Cc: Heiko Carstens Cc: Yoshinori Sato Cc: Jeff Dike Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Hugh Dickins Cc: Mel Gorman Cc: Nadav Amit Cc: Rik van Riel Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/tlb.h | 6 ++++-- arch/ia64/include/asm/tlb.h | 6 ++++-- arch/s390/include/asm/tlb.h | 12 ++++++------ arch/sh/include/asm/tlb.h | 6 ++++-- arch/um/include/asm/tlb.h | 8 +++++--- include/asm-generic/tlb.h | 7 ++++--- include/linux/mm_types.h | 6 ++++++ mm/memory.c | 28 +++++++++++++++++++++------- 8 files changed, 54 insertions(+), 25 deletions(-) commit a9b802500ebbff1544519a2969323b719dac21f0 Author: Nadav Amit Date: Thu Aug 10 15:24:02 2017 -0700 Revert "mm: numa: defer TLB flush for THP migration as long as possible" While deferring TLB flushes is a good practice, the reverted patch caused pending TLB flushes to be checked while the page-table lock is not taken. As a result, in architectures with weak memory model (PPC), Linux may miss a memory-barrier, miss the fact TLB flushes are pending, and cause (in theory) a memory corruption. Since the alternative of using smp_mb__after_unlock_lock() was considered a bit open-coded, and the performance impact is expected to be small, the previous patch is reverted. This reverts b0943d61b8fa ("mm: numa: defer TLB flush for THP migration as long as possible"). Link: http://lkml.kernel.org/r/20170802000818.4760-4-namit@vmware.com Signed-off-by: Nadav Amit Suggested-by: Mel Gorman Acked-by: Mel Gorman Acked-by: Rik van Riel Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Andy Lutomirski Cc: "David S. Miller" Cc: Andrea Arcangeli Cc: Heiko Carstens Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jeff Dike Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Nadav Amit Cc: Russell King Cc: Tony Luck Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 7 +++++++ mm/migrate.c | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) commit 0a2c40487f3e4215c6ab46e7f837036badfb542b Author: Nadav Amit Date: Thu Aug 10 15:23:59 2017 -0700 mm: migrate: fix barriers around tlb_flush_pending Reading tlb_flush_pending while the page-table lock is taken does not require a barrier, since the lock/unlock already acts as a barrier. Removing the barrier in mm_tlb_flush_pending() to address this issue. However, migrate_misplaced_transhuge_page() calls mm_tlb_flush_pending() while the page-table lock is already released, which may present a problem on architectures with weak memory model (PPC). To deal with this case, a new parameter is added to mm_tlb_flush_pending() to indicate if it is read without the page-table lock taken, and calling smp_mb__after_unlock_lock() in this case. Link: http://lkml.kernel.org/r/20170802000818.4760-3-namit@vmware.com Signed-off-by: Nadav Amit Acked-by: Rik van Riel Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Andy Lutomirski Cc: Mel Gorman Cc: "David S. Miller" Cc: Andrea Arcangeli Cc: Heiko Carstens Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jeff Dike Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Nadav Amit Cc: Russell King Cc: Tony Luck Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 16af97dc5a8975371a83d9e30a64038b48f40a2d Author: Nadav Amit Date: Thu Aug 10 15:23:56 2017 -0700 mm: migrate: prevent racy access to tlb_flush_pending Patch series "fixes of TLB batching races", v6. It turns out that Linux TLB batching mechanism suffers from various races. Races that are caused due to batching during reclamation were recently handled by Mel and this patch-set deals with others. The more fundamental issue is that concurrent updates of the page-tables allow for TLB flushes to be batched on one core, while another core changes the page-tables. This other core may assume a PTE change does not require a flush based on the updated PTE value, while it is unaware that TLB flushes are still pending. This behavior affects KSM (which may result in memory corruption) and MADV_FREE and MADV_DONTNEED (which may result in incorrect behavior). A proof-of-concept can easily produce the wrong behavior of MADV_DONTNEED. Memory corruption in KSM is harder to produce in practice, but was observed by hacking the kernel and adding a delay before flushing and replacing the KSM page. Finally, there is also one memory barrier missing, which may affect architectures with weak memory model. This patch (of 7): Setting and clearing mm->tlb_flush_pending can be performed by multiple threads, since mmap_sem may only be acquired for read in task_numa_work(). If this happens, tlb_flush_pending might be cleared while one of the threads still changes PTEs and batches TLB flushes. This can lead to the same race between migration and change_protection_range() that led to the introduction of tlb_flush_pending. The result of this race was data corruption, which means that this patch also addresses a theoretically possible data corruption. An actual data corruption was not observed, yet the race was was confirmed by adding assertion to check tlb_flush_pending is not set by two threads, adding artificial latency in change_protection_range() and using sysctl to reduce kernel.numa_balancing_scan_delay_ms. Link: http://lkml.kernel.org/r/20170802000818.4760-2-namit@vmware.com Fixes: 20841405940e ("mm: fix TLB flush race between migration, and change_protection_range") Signed-off-by: Nadav Amit Acked-by: Mel Gorman Acked-by: Rik van Riel Acked-by: Minchan Kim Cc: Andy Lutomirski Cc: Hugh Dickins Cc: "David S. Miller" Cc: Andrea Arcangeli Cc: Heiko Carstens Cc: Ingo Molnar Cc: Jeff Dike Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Russell King Cc: Sergey Senozhatsky Cc: Tony Luck Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 31 ++++++++++++++++++++++--------- kernel/fork.c | 2 +- mm/debug.c | 2 +- mm/mprotect.c | 4 ++-- 4 files changed, 26 insertions(+), 13 deletions(-) commit 9eeb52ae712e72141c4c1d173048a606ba8f42f6 Author: Akinobu Mita Date: Thu Aug 10 15:23:53 2017 -0700 fault-inject: fix wrong should_fail() decision in task context Commit 1203c8e6fb0a ("fault-inject: simplify access check for fail-nth") unintentionally broke a conditional statement in should_fail(). Any faults are not injected in the task context by the change when the systematic fault injection is not used. This change restores to the previous correct behaviour. Link: http://lkml.kernel.org/r/1501633700-3488-1-git-send-email-akinobu.mita@gmail.com Fixes: 1203c8e6fb0a ("fault-inject: simplify access check for fail-nth") Signed-off-by: Akinobu Mita Reported-by: Lu Fengqi Tested-by: Lu Fengqi Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/fault-inject.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4e98ebe5f435fbe5bca91c24bc5d5a2b33025e08 Author: Dan Carpenter Date: Thu Aug 10 15:23:50 2017 -0700 test_kmod: fix small memory leak on filesystem tests The break was in the wrong place so file system tests don't work as intended, leaking memory at each test switch. [mcgrof@kernel.org: massaged commit subject, noted memory leak issue without the fix] Link: http://lkml.kernel.org/r/20170802211450.27928-6-mcgrof@kernel.org Fixes: 39258f448d71 ("kmod: add test driver to stress test the module loader") Signed-off-by: Dan Carpenter Signed-off-by: Luis R. Rodriguez Reported-by: David Binderman Cc: Colin Ian King Cc: Dmitry Torokhov Cc: Eric W. Biederman Cc: Jessica Yu Cc: Josh Poimboeuf Cc: Kees Cook Cc: Michal Marek Cc: Miroslav Benes Cc: Petr Mladek Cc: Rusty Russell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c56771316ef50992ada284b4c01b03842b2660d Author: Dan Carpenter Date: Thu Aug 10 15:23:47 2017 -0700 test_kmod: fix the lock in register_test_dev_kmod() We accidentally just drop the lock twice instead of taking it and then releasing it. This isn't a big issue unless you are adding more than one device to test on, and the kmod.sh doesn't do that yet, however this obviously is the correct thing to do. [mcgrof@kernel.org: massaged subject, explain what happens] Link: http://lkml.kernel.org/r/20170802211450.27928-5-mcgrof@kernel.org Fixes: 39258f448d71 ("kmod: add test driver to stress test the module loader") Signed-off-by: Dan Carpenter Signed-off-by: Luis R. Rodriguez Cc: Colin Ian King Cc: David Binderman Cc: Dmitry Torokhov Cc: Eric W. Biederman Cc: Jessica Yu Cc: Josh Poimboeuf Cc: Kees Cook Cc: Michal Marek Cc: Miroslav Benes Cc: Petr Mladek Cc: Rusty Russell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 434b06ae23bab4f4111a674f9b64409c87fa8df9 Author: Luis R. Rodriguez Date: Thu Aug 10 15:23:44 2017 -0700 test_kmod: fix bug which allows negative values on two config options Parsing with kstrtol() enables values to be negative, and we failed to check for negative values when parsing with test_dev_config_update_uint_sync() or test_dev_config_update_uint_range(). test_dev_config_update_uint_range() has a minimum check though so an issue is not present there. test_dev_config_update_uint_sync() is only used for the number of threads to use (config_num_threads_store()), and indeed this would fail with an attempt for a large allocation. Although the issue is only present in practice with the first fix both by using kstrtoul() instead of kstrtol(). Link: http://lkml.kernel.org/r/20170802211450.27928-4-mcgrof@kernel.org Fixes: 39258f448d71 ("kmod: add test driver to stress test the module loader") Signed-off-by: Luis R. Rodriguez Reported-by: Dan Carpenter Cc: Colin Ian King Cc: David Binderman Cc: Dmitry Torokhov Cc: Eric W. Biederman Cc: Jessica Yu Cc: Josh Poimboeuf Cc: Kees Cook Cc: Michal Marek Cc: Miroslav Benes Cc: Petr Mladek Cc: Rusty Russell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kmod.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a4afe8cdec1646c3d258b02d1cfdfb1313b76eb1 Author: Colin Ian King Date: Thu Aug 10 15:23:40 2017 -0700 test_kmod: fix spelling mistake: "EMTPY" -> "EMPTY" Trivial fix to spelling mistake in snprintf text [mcgrof@kernel.org: massaged commit message] Link: http://lkml.kernel.org/r/20170802211450.27928-3-mcgrof@kernel.org Fixes: 39258f448d71 ("kmod: add test driver to stress test the module loader") Signed-off-by: Colin Ian King Signed-off-by: Luis R. Rodriguez Cc: Dmitry Torokhov Cc: Kees Cook Cc: Jessica Yu Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Miroslav Benes Cc: Josh Poimboeuf Cc: Eric W. Biederman Cc: Shuah Khan Cc: Dan Carpenter Cc: David Binderman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5af10dfd0afc559bb4b0f7e3e8227a1578333995 Author: Andrea Arcangeli Date: Thu Aug 10 15:23:38 2017 -0700 userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that triggered it and the kernel must cope with it returning -EEXIST from ioctl(UFFDIO_COPY) as expected. page dumped because: VM_BUG_ON_PAGE(!PageLocked(page)) kernel BUG at mm/filemap.c:964! invalid opcode: 0000 [#1] SMP CPU: 1 PID: 22582 Comm: qemu-system-x86 Not tainted 4.11.11-300.fc26.x86_64 #1 RIP: unlock_page+0x4a/0x50 Call Trace: hugetlb_mcopy_atomic_pte+0xc0/0x320 mcopy_atomic+0x96f/0xbe0 userfaultfd_ioctl+0x218/0xe90 do_vfs_ioctl+0xa5/0x600 SyS_ioctl+0x79/0x90 entry_SYSCALL_64_fastpath+0x1a/0xa9 Link: http://lkml.kernel.org/r/20170802165145.22628-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Tested-by: Maxime Coquelin Reviewed-by: Mike Kravetz Cc: "Dr. David Alan Gilbert" Cc: Mike Rapoport Cc: Alexey Perevalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75dddef32514f7aa58930bde6a1263253bc3d4ba Author: Jonathan Toppins Date: Thu Aug 10 15:23:35 2017 -0700 mm: ratelimit PFNs busy info message The RDMA subsystem can generate several thousand of these messages per second eventually leading to a kernel crash. Ratelimit these messages to prevent this crash. Doug said: "I've been carrying a version of this for several kernel versions. I don't remember when they started, but we have one (and only one) class of machines: Dell PE R730xd, that generate these errors. When it happens, without a rate limit, we get rcu timeouts and kernel oopses. With the rate limit, we just get a lot of annoying kernel messages but the machine continues on, recovers, and eventually the memory operations all succeed" And: "> Well... why are all these EBUSY's occurring? It sounds inefficient > (at least) but if it is expected, normal and unavoidable then > perhaps we should just remove that message altogether? I don't have an answer to that question. To be honest, I haven't looked real hard. We never had this at all, then it started out of the blue, but only on our Dell 730xd machines (and it hits all of them), but no other classes or brands of machines. And we have our 730xd machines loaded up with different brands and models of cards (for instance one dedicated to mlx4 hardware, one for qib, one for mlx5, an ocrdma/cxgb4 combo, etc), so the fact that it hit all of the machines meant it wasn't tied to any particular brand/model of RDMA hardware. To me, it always smelled of a hardware oddity specific to maybe the CPUs or mainboard chipsets in these machines, so given that I'm not an mm expert anyway, I never chased it down. A few other relevant details: it showed up somewhere around 4.8/4.9 or thereabouts. It never happened before, but the prinkt has been there since the 3.18 days, so possibly the test to trigger this message was changed, or something else in the allocator changed such that the situation started happening on these machines? And, like I said, it is specific to our 730xd machines (but they are all identical, so that could mean it's something like their specific ram configuration is causing the allocator to hit this on these machine but not on other machines in the cluster, I don't want to say it's necessarily the model of chipset or CPU, there are other bits of identicalness between these machines)" Link: http://lkml.kernel.org/r/499c0f6cc10d6eb829a67f2a4d75b4228a9b356e.1501695897.git.jtoppins@redhat.com Signed-off-by: Jonathan Toppins Reviewed-by: Doug Ledford Tested-by: Doug Ledford Cc: Michal Hocko Cc: Vlastimil Babka Cc: Mel Gorman Cc: Hillf Danton Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d507e2ebd2c7be9138e5cf5c0cb1931c90c42ab1 Author: Johannes Weiner Date: Thu Aug 10 15:23:31 2017 -0700 mm: fix global NR_SLAB_.*CLAIMABLE counter reads As Tetsuo points out: "Commit 385386cff4c6 ("mm: vmstat: move slab statistics from zone to node counters") broke "Slab:" field of /proc/meminfo . It shows nearly 0kB" In addition to /proc/meminfo, this problem also affects the slab counters OOM/allocation failure info dumps, can cause early -ENOMEM from overcommit protection, and miscalculate image size requirements during suspend-to-disk. This is because the patch in question switched the slab counters from the zone level to the node level, but forgot to update the global accessor functions to read the aggregate node data instead of the aggregate zone data. Use global_node_page_state() to access the global slab counters. Fixes: 385386cff4c6 ("mm: vmstat: move slab statistics from zone to node counters") Link: http://lkml.kernel.org/r/20170801134256.5400-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reported-by: Tetsuo Handa Acked-by: Michal Hocko Cc: Josef Bacik Cc: Vladimir Davydov Cc: Stefan Agner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/meminfo.c | 8 ++++---- kernel/power/snapshot.c | 2 +- mm/page_alloc.c | 9 +++++---- mm/util.c | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) commit 9157259d16a8ee8116a98d32f29b797689327e8d Author: Zi Yan Date: Thu Aug 3 09:17:21 2017 -0400 mm: add pmd_t initializer __pmd() to work around a GCC bug. THP migration is added but only supports x86_64 at the moment. For all other architectures, swp_entry_to_pmd() only returns a zero pmd_t. Due to a GCC zero initializer bug #53119, the standard (pmd_t){0} initializer is not accepted by all GCC versions. __pmd() is a feasible workaround. In addition, sparc32's pmd_t is an array instead of a single value, so we need (pmd_t){ {0}, } instead of (pmd_t){0}. Thus, a different __pmd() definition is needed in sparc32. Signed-off-by: Zi Yan Signed-off-by: David S. Miller arch/sparc/include/asm/page_32.h | 2 ++ 1 file changed, 2 insertions(+) commit 4e082e9ba7cdd7466b1ea81527feb93f4da8c580 Merge: 2627393 8466489 Author: Linus Torvalds Date: Thu Aug 10 14:52:45 2017 -0700 Merge tag 'pci-v4.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Work around Renesas uPD72020x 32-bit DMA issue" * tag 'pci-v4.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue PCI: Add pci_reset_function_locked() commit 1cd65d17612e8b64989f7af20213d4bb7a7f4d91 Author: Mika Westerberg Date: Tue Jul 25 17:41:58 2017 +0300 thunderbolt: Do not enumerate more ports from DROM than the controller has Some Alpine Ridge LP DROMs (there might be others) erroneusly list more ports than the controller actually has. Most probably because DROM of the full Dual/Single port Thunderbolt controller was reused for LP version. The current DROM parser does not check the upper bound thus it leads to crash when sw->ports[] is accessed over bounds: BUG: unable to handle kernel NULL pointer dereference at 00000000000002ec IP: tb_drom_read+0x383/0x890 [thunderbolt] PGD 0 P4D 0 Oops: 0000 [#1] SMP CPU: 3 PID: 12248 Comm: systemd-udevd Not tainted 4.13.0-rc1-next-20170719 #1 Hardware name: LENOVO 20HF000YGE/20HF000YGE, BIOS N1WET32W (1.11 ) 05/23/2017 task: ffff8a293e4bcd80 task.stack: ffffa698027a8000 RIP: 0010:tb_drom_read+0x383/0x890 [thunderbolt] RSP: 0018:ffffa698027ab990 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8a2940af7800 RCX: 0000000000000000 RDX: ffff8a2940ebb400 RSI: 0000000000000000 RDI: ffffa698027ab9a0 RBP: ffffa698027ab9d0 R08: 0000000000000001 R09: 0000000000000002 R10: ffff8a2940ebb5b0 R11: 0000000000000000 R12: ffff8a293bfa968c R13: 000000000000002c R14: 0000000000000056 R15: 0000000000000056 FS: 00007f0a945a38c0(0000) GS:ffff8a2961580000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000002ec CR3: 000000043e785000 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tb_switch_add+0x9d/0x730 [thunderbolt] ? tb_switch_alloc+0x3cd/0x4d0 [thunderbolt] icm_start+0x5a/0xa0 [thunderbolt] tb_domain_add+0xc3/0xf0 [thunderbolt] nhi_probe+0x19e/0x310 [thunderbolt] local_pci_probe+0x42/0xa0 pci_device_probe+0x18d/0x1a0 driver_probe_device+0x2ff/0x450 __driver_attach+0xa4/0xe0 ? driver_probe_device+0x450/0x450 bus_for_each_dev+0x6e/0xb0 driver_attach+0x1e/0x20 bus_add_driver+0x1d0/0x270 ? 0xffffffffc0bbb000 driver_register+0x60/0xe0 ? 0xffffffffc0bbb000 __pci_register_driver+0x4c/0x50 nhi_init+0x28/0x1000 [thunderbolt] do_one_initcall+0x50/0x190 ? __vunmap+0x81/0xb0 ? _cond_resched+0x1a/0x50 ? kmem_cache_alloc_trace+0x15f/0x1c0 ? do_init_module+0x27/0x1e9 do_init_module+0x5f/0x1e9 load_module+0x24e7/0x2a60 ? vfs_read+0x115/0x130 SYSC_finit_module+0xfc/0x120 ? SYSC_finit_module+0xfc/0x120 SyS_finit_module+0xe/0x10 do_syscall_64+0x67/0x170 entry_SYSCALL64_slow_path+0x25/0x25 Fix this by making sure we only enumerate DROM port entries the hardware actually has. Reported-by: Christian Kellner Signed-off-by: Mika Westerberg Reviewed-by: Lukas Wunner Tested-by: Christian Kellner Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/eeprom.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 557909e195aea23d9e6b29cef0be3d795f4cf675 Author: Alexander Usyskin Date: Thu Aug 3 17:30:19 2017 +0300 mei: exclude device from suspend direct complete optimization MEI device performs link reset during system suspend sequence. The link reset cannot be performed while device is in runtime suspend state. The resume sequence is bypassed with suspend direct complete optimization,so the optimization should be disabled for mei devices. Fixes: [ 192.940537] Restarting tasks ... [ 192.940610] PGI is not set [ 192.940619] ------------[ cut here ]------------ [ 192.940623] WARNING: CPU: 0 me.c:653 mei_me_pg_exit_sync+0x351/0x360 [ 192.940624] Modules linked in: [ 192.940627] CPU: 0 PID: 1661 Comm: kworker/0:3 Not tainted 4.13.0-rc2+ #2 [ 192.940628] Hardware name: Dell Inc. XPS 13 9343/0TM99H, BIOS A11 12/08/2016 [ 192.940630] Workqueue: pm pm_runtime_work [ 192.940642] Call Trace: [ 192.940646] ? pci_pme_active+0x1de/0x1f0 [ 192.940649] ? pci_restore_standard_config+0x50/0x50 [ 192.940651] ? kfree+0x172/0x190 [ 192.940653] ? kfree+0x172/0x190 [ 192.940655] ? pci_restore_standard_config+0x50/0x50 [ 192.940663] mei_me_pm_runtime_resume+0x3f/0xc0 [ 192.940665] pci_pm_runtime_resume+0x7a/0xa0 [ 192.940667] __rpm_callback+0xb9/0x1e0 [ 192.940668] ? preempt_count_add+0x6d/0xc0 [ 192.940670] rpm_callback+0x24/0x90 [ 192.940672] ? pci_restore_standard_config+0x50/0x50 [ 192.940674] rpm_resume+0x4e8/0x800 [ 192.940676] pm_runtime_work+0x55/0xb0 [ 192.940678] process_one_work+0x184/0x3e0 [ 192.940680] worker_thread+0x4d/0x3a0 [ 192.940681] ? preempt_count_sub+0x9b/0x100 [ 192.940683] kthread+0x122/0x140 [ 192.940684] ? process_one_work+0x3e0/0x3e0 [ 192.940685] ? __kthread_create_on_node+0x1a0/0x1a0 [ 192.940688] ret_from_fork+0x27/0x40 [ 192.940690] Code: 96 3a 9e ff 48 8b 7d 98 e8 cd 21 58 00 83 bb bc 01 00 00 04 0f 85 40 fe ff ff e9 41 fe ff ff 48 c7 c7 5f 04 99 96 e8 93 6b 9f ff <0f> ff e9 5d fd ff ff e8 33 fe 99 ff 0f 1f 00 0f 1f 44 00 00 55 [ 192.940719] ---[ end trace a86955597774ead8 ]--- [ 192.942540] done. Suggested-by: Rafael J. Wysocki Reported-by: Dominik Brodowski Cc: Rafael J. Wysocki Cc: Dominik Brodowski Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/pci-me.c | 6 ++++++ drivers/misc/mei/pci-txe.c | 6 ++++++ 2 files changed, 12 insertions(+) commit 260d9f2fc5655a2552701cdd0b909c4466732f19 Author: Luis R. Rodriguez Date: Thu Jul 20 13:13:11 2017 -0700 firmware: avoid invalid fallback aborts by using killable wait Commit 0cb64249ca500 ("firmware_loader: abort request if wait_for_completion is interrupted") added via 4.0 added support to abort the fallback mechanism when a signal was detected and wait_for_completion_interruptible() returned -ERESTARTSYS -- for instance when a user hits CTRL-C. The abort was overly *too* effective. When a child process terminates (successful or not) the signal SIGCHLD can be sent to the parent process which ran the child in the background and later triggered a sync request for firmware through a sysfs interface which relies on the fallback mechanism. This signal in turn can be recieved by the interruptible wait we constructed on firmware_class and detects it as an abort *before* userspace could get a chance to write the firmware. Upon failure -EAGAIN is returned, so userspace is also kept in the dark about exactly what happened. We can reproduce the issue with the fw_fallback.sh selftest: Before this patch: $ sudo tools/testing/selftests/firmware/fw_fallback.sh ... tools/testing/selftests/firmware/fw_fallback.sh: error - sync firmware request cancelled due to SIGCHLD After this patch: $ sudo tools/testing/selftests/firmware/fw_fallback.sh ... tools/testing/selftests/firmware/fw_fallback.sh: SIGCHLD on sync ignored as expected Fix this by making the wait killable -- only killable by SIGKILL (kill -9). We loose the ability to allow userspace to cancel a write with CTRL-C (SIGINT), however its been decided the compromise to require SIGKILL is worth the gains. Chances of this issue occuring are low due to the number of drivers upstream exclusively relying on the fallback mechanism for firmware (2 drivers), however this is observed in the field with custom drivers with sysfs triggers to load firmware. Only distributions relying on the fallback mechanism are impacted as well. An example reported issue was on Android, as follows: 1) Android init (pid=1) fork()s (say pid=42) [this child process is totally unrelated to firmware loading, it could be sleep 2; for all we care ] 2) Android init (pid=1) does a write() on a (driver custom) sysfs file which ends up calling request_firmware() kernel side 3) The firmware loading fallback mechanism is used, the request is sent to userspace and pid 1 waits in the kernel on wait_* 4) before firmware loading completes pid 42 dies (for any reason, even normal termination) 5) Kernel delivers SIGCHLD to pid=1 to tell it a child has died, which causes -ERESTARTSYS to be returned from wait_* 6) The kernel's wait aborts and return -EAGAIN for the request_firmware() caller. Cc: stable # 4.0 Fixes: 0cb64249ca500 ("firmware_loader: abort request if wait_for_completion is interrupted") Suggested-by: "Eric W. Biederman" Suggested-by: Dmitry Torokhov Tested-by: Martin Fuzzey Reported-by: Martin Fuzzey Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_class.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 90d41e74a9c36a84e2efbd2a5b8d79299feee6fa Author: Luis R. Rodriguez Date: Thu Jul 20 13:13:10 2017 -0700 firmware: fix batched requests - send wake up on failure on direct lookups Fix batched requests from waiting forever on failure. The firmware API batched requests feature has been broken since the API call request_firmware_direct() was introduced on commit bba3a87e982ad ("firmware: Introduce request_firmware_direct()"), added on v3.14 *iff* the firmware being requested was not present in *certain kernel builds* [0]. When no firmware is found the worker which goes on to finish never informs waiters queued up of this, so any batched request will stall in what seems to be forever (MAX_SCHEDULE_TIMEOUT). Sadly, a reboot will also stall, as the reboot notifier was only designed to kill custom fallback workers. The issue seems to the user as a type of soft lockup, what *actually* happens underneath the hood is a wait call which never completes as we failed to issue a completion on error. For device drivers with optional firmware schemes (ie, Intel iwlwifi, or Netronome -- even though it uses request_firmware() and not request_firmware_direct()), this could mean that when you boot a system with multiple cards the firmware will seem to never load on the system, or that the card is just not responsive even the driver initialization. Due to differences in scheduling possible this should not always trigger -- one would need to to ensure that multiple requests are in place at the right time for this to work, also release_firmware() must not be called prior to any other incoming request. The complexity may not be worth supporting batched requests in the future given the wait mechanism is only used also for the fallback mechanism. We'll keep it for now and just fix it. Its reported that at least with the Intel WiFi cards on one system this issue was creeping up 50% of the boots [0]. Before this commit batched requests testing revealed: ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n CONFIG_FW_LOADER_USER_HELPER=y Most common Linux distribution setup. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() FAIL OK request_firmware_direct() FAIL OK request_firmware_nowait(uevent=true) FAIL OK request_firmware_nowait(uevent=false) FAIL OK ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n CONFIG_FW_LOADER_USER_HELPER=n Only possible if CONFIG_DELL_RBU=n and CONFIG_LEDS_LP55XX_COMMON=n, rare. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() FAIL OK request_firmware_direct() FAIL OK request_firmware_nowait(uevent=true) FAIL OK request_firmware_nowait(uevent=false) FAIL OK ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y CONFIG_FW_LOADER_USER_HELPER=y Google Android setup. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() OK OK request_firmware_direct() FAIL OK request_firmware_nowait(uevent=true) OK OK request_firmware_nowait(uevent=false) OK OK ============================================================================ Ater this commit batched testing results: ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n CONFIG_FW_LOADER_USER_HELPER=y Most common Linux distribution setup. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() OK OK request_firmware_direct() OK OK request_firmware_nowait(uevent=true) OK OK request_firmware_nowait(uevent=false) OK OK ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n CONFIG_FW_LOADER_USER_HELPER=n Only possible if CONFIG_DELL_RBU=n and CONFIG_LEDS_LP55XX_COMMON=n, rare. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() OK OK request_firmware_direct() OK OK request_firmware_nowait(uevent=true) OK OK request_firmware_nowait(uevent=false) OK OK ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y CONFIG_FW_LOADER_USER_HELPER=y Google Android setup. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() OK OK request_firmware_direct() OK OK request_firmware_nowait(uevent=true) OK OK request_firmware_nowait(uevent=false) OK OK ============================================================================ [0] https://bugzilla.kernel.org/show_bug.cgi?id=195477 Cc: stable # v3.14 Fixes: bba3a87e982ad ("firmware: Introduce request_firmware_direct()" Reported-by: Nicolas Reported-by: John Ewalt Reported-by: Jakub Kicinski Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_class.c | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) commit e44565f62a72064e686f7a852137595ec94d78f2 Author: Luis R. Rodriguez Date: Thu Jul 20 13:13:09 2017 -0700 firmware: fix batched requests - wake all waiters The firmware cache mechanism serves two purposes, the secondary purpose is not well documented nor understood. This fixes a regression with the secondary purpose of the firmware cache mechanism: batched requests on successful lookups. Without this fix *any* time a batched request is triggered, secondary requests for which the batched request mechanism was designed for will seem to last forver and seem to never return. This issue is present for all kernel builds possible, and a hard reset is required. The firmware cache is used for: 1) Addressing races with file lookups during the suspend/resume cycle by keeping firmware in memory during the suspend/resume cycle 2) Batched requests for the same file rely only on work from the first file lookup, which keeps the firmware in memory until the last release_firmware() is called Batched requests *only* take effect if secondary requests come in prior to the first user calling release_firmware(). The devres name used for the internal firmware cache is used as a hint other pending requests are ongoing, the firmware buffer data is kept in memory until the last user of the buffer calls release_firmware(), therefore serializing requests and delaying the release until all requests are done. Batched requests wait for a wakup or signal so we can rely on the first file fetch to write to the pending secondary requests. Commit 5b029624948d ("firmware: do not use fw_lock for fw_state protection") ported the firmware API to use swait, and in doing so failed to convert complete_all() to swake_up_all() -- it used swake_up(), loosing the ability for *some* batched requests to take effect. We *could* fix this by just using swake_up_all() *but* swait is now known to be very special use case, so its best to just move away from it. So we just go back to using completions as before commit 5b029624948d ("firmware: do not use fw_lock for fw_state protection") given this was using complete_all(). Without this fix it has been reported plugging in two Intel 6260 Wifi cards on a system will end up enumerating the two devices only 50% of the time [0]. The ported swake_up() should have actually handled the case with two devices, however, *if more than two cards are used* the swake_up() would not have sufficed. This change is only part of the required fixes for batched requests. Another fix is provided in the next patch. This particular change should fix the cases where more than three requests with the same firmware name is used, otherwise batched requests will wait for MAX_SCHEDULE_TIMEOUT and just timeout eventually. Below is a summary of tests triggering batched requests on different kernel builds. Before this patch: ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n CONFIG_FW_LOADER_USER_HELPER=y Most common Linux distribution setup. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() FAIL FAIL request_firmware_direct() FAIL FAIL request_firmware_nowait(uevent=true) FAIL FAIL request_firmware_nowait(uevent=false) FAIL FAIL ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n CONFIG_FW_LOADER_USER_HELPER=n Only possible if CONFIG_DELL_RBU=n and CONFIG_LEDS_LP55XX_COMMON=n, rare. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() FAIL FAIL request_firmware_direct() FAIL FAIL request_firmware_nowait(uevent=true) FAIL FAIL request_firmware_nowait(uevent=false) FAIL FAIL ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y CONFIG_FW_LOADER_USER_HELPER=y Google Android setup. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() FAIL FAIL request_firmware_direct() FAIL FAIL request_firmware_nowait(uevent=true) FAIL FAIL request_firmware_nowait(uevent=false) FAIL FAIL ============================================================================ After this patch: ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n CONFIG_FW_LOADER_USER_HELPER=y Most common Linux distribution setup. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() FAIL OK request_firmware_direct() FAIL OK request_firmware_nowait(uevent=true) FAIL OK request_firmware_nowait(uevent=false) FAIL OK ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n CONFIG_FW_LOADER_USER_HELPER=n Only possible if CONFIG_DELL_RBU=n and CONFIG_LEDS_LP55XX_COMMON=n, rare. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() FAIL OK request_firmware_direct() FAIL OK request_firmware_nowait(uevent=true) FAIL OK request_firmware_nowait(uevent=false) FAIL OK ============================================================================ CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y CONFIG_FW_LOADER_USER_HELPER=y Google Android setup. API-type no-firmware-found firmware-found ---------------------------------------------------------------------- request_firmware() OK OK request_firmware_direct() FAIL OK request_firmware_nowait(uevent=true) OK OK request_firmware_nowait(uevent=false) OK OK ============================================================================ [0] https://bugzilla.kernel.org/show_bug.cgi?id=195477 CC: [4.10+] Cc: Ming Lei Fixes: 5b029624948d ("firmware: do not use fw_lock for fw_state protection") Reported-by: Jakub Kicinski Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_class.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 3b6bcd3d093c698d32e93d4da57679b8fbc5e01e Author: Greg Kroah-Hartman Date: Thu Aug 10 11:54:12 2017 -0700 USB: serial: pl2303: add new ATEN device id This adds a new ATEN device id for a new pl2303-based device. Reported-by: Peter Kuo Cc: stable Cc: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/pl2303.c | 2 ++ drivers/usb/serial/pl2303.h | 1 + 2 files changed, 3 insertions(+) commit 7496cfe5431f21da5d27a8388c326397e3f0a5db Author: Kai-Heng Feng Date: Tue Aug 8 17:51:27 2017 +0800 usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter Moshi USB to Ethernet Adapter internally uses a Genesys Logic hub to connect to Realtek r8153. The Realtek r8153 ethernet does not work on the internal hub, no-lpm quirk can make it work. Since another r8153 dongle at my hand does not have the issue, so add the quirk to the Genesys Logic hub instead. Signed-off-by: Kai-Heng Feng Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 94c43b9897abf4ea366ed4dba027494e080c7050 Author: Alan Stern Date: Tue Aug 1 10:41:56 2017 -0400 USB: Check for dropped connection before switching to full speed Some buggy USB disk adapters disconnect and reconnect multiple times during the enumeration procedure. This may lead to a device connecting at full speed instead of high speed, because when the USB stack sees that a device isn't able to enumerate at high speed, it tries to hand the connection over to a full-speed companion controller. The logic for doing this is careful to check that the device is still connected. But this check is inadequate if the device disconnects and reconnects before the check is done. The symptom is that a device works, but much more slowly than it is capable of operating. The situation was made worse recently by commit 22547c4cc4fe ("usb: hub: Wait for connection to be reestablished after port reset"), which increases the delay following a reset before a disconnect is recognized, thus giving the device more time to reconnect. This patch makes the check more robust. If the device was disconnected at any time during enumeration, we will now skip the full-speed handover. Signed-off-by: Alan Stern Reported-and-tested-by: Zdenek Kabelac Reviewed-by: Guenter Roeck Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e788787ef4f9c24aafefc480a8da5f92b914e5e6 Author: Sandeep Singh Date: Fri Aug 4 16:35:56 2017 +0530 usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume Certain HP keyboards would keep inputting a character automatically which is the wake-up key after S3 resume On some AMD platforms USB host fails to respond (by holding resume-K) to USB device (an HP keyboard) resume request within 1ms (TURSM) and ensures that resume is signaled for at least 20 ms (TDRSMDN), which is defined in USB 2.0 spec. The result is that the keyboard is out of function. In SNPS USB design, the host responds to the resume request only after system gets back to S0 and the host gets to functional after the internal HW restore operation that is more than 1 second after the initial resume request from the USB device. As a workaround for specific keyboard ID(HP Keyboards), applying port reset after resume when the keyboard is plugged in. Signed-off-by: Sandeep Singh Signed-off-by: Shyam Sundar S K cc: Nehal Shah Reviewed-by: Felipe Balbi Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 1 + drivers/usb/host/pci-quirks.c | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit a082b426286d1ead97fb87646ea361d528be023d Author: Kwan (Hingkwan) Huen-SSI Date: Wed Aug 9 11:26:29 2017 -0700 nvme: fix directive command numd calculation The numd field of directive receive command takes number of dwords to transfer. This fix has the correct calculation for numd. Signed-off-by: Kwan (Hingkwan) Huen-SSI Reviewed-by: Jens Axboe Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 634b8325905031eeafa61951623681ebc1329385 Author: Keith Busch Date: Thu Aug 10 11:23:31 2017 +0200 nvme: fix nvme reset command timeout handling We need to return an error if a timeout occurs on any NVMe command during initialization. Without this, the nvme reset work will be stuck. A timeout will have a negative error code, meaning we need to stop initializing the controller. All postitive returns mean the controller is still usable. bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196325 Signed-off-by: Keith Busch Cc: Martin Peres [jth consolidated cleanup path ] Signed-off-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 26273939ace935dd7553b31d279eab30b40f7b9a Merge: f213ad3 c27927e Author: Linus Torvalds Date: Thu Aug 10 10:30:29 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix handling of initial STATE message in TIPC, from Jon Paul Maloy. 2) Fix stats handling in bcm_sysport_get_stats(), from Florian Fainelli. 3) Reject 16777215 VNI value in geneve_validate(), from Girish Moodalbail. 4) Fix initial IGMP sysctl setting regression, from Nikolay Borisov. 5) Once a UFO fragmented frame is treated as UFO, we should continue doing so. Likewise once a frame has been segmented, we should continue doing that and not try to convert it to a UFO frame. From Willem de Bruijn. 6) Test the AF_PACKET RX/TX ring pg_vec state under the socket lock to prevent races. From Willem de Bruijn. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: packet: fix tp_reserve race in packet_set_ring udp: consistently apply ufo or fragmentation net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_target igmp: Fix regression caused by igmp sysctl namespace code. geneve: maximum value of VNI cannot be used net: systemport: Fix software statistics for SYSTEMPORT Lite tipc: remove premature ESTABLISH FSM event at link synchronization commit c27927e372f0785f3303e8fad94b85945e2c97b7 Author: Willem de Bruijn Date: Thu Aug 10 12:41:58 2017 -0400 packet: fix tp_reserve race in packet_set_ring Updates to tp_reserve can race with reads of the field in packet_set_ring. Avoid this by holding the socket lock during updates in setsockopt PACKET_RESERVE. This bug was discovered by syzkaller. Fixes: 8913336a7e8d ("packet: add PACKET_RESERVE sockopt") Reported-by: Andrey Konovalov Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/packet/af_packet.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa Author: Willem de Bruijn Date: Thu Aug 10 12:29:19 2017 -0400 udp: consistently apply ufo or fragmentation When iteratively building a UDP datagram with MSG_MORE and that datagram exceeds MTU, consistently choose UFO or fragmentation. Once skb_is_gso, always apply ufo. Conversely, once a datagram is split across multiple skbs, do not consider ufo. Sendpage already maintains the first invariant, only add the second. IPv6 does not have a sendpage implementation to modify. A gso skb must have a partial checksum, do not follow sk_no_check_tx in udp_send_skb. Found by syzkaller. Fixes: e89e9cf539a2 ("[IPv4/IPv6]: UFO Scatter-gather approach") Reported-by: Andrey Konovalov Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/ipv4/ip_output.c | 8 +++++--- net/ipv4/udp.c | 2 +- net/ipv6/ip6_output.c | 7 ++++--- 3 files changed, 10 insertions(+), 7 deletions(-) commit f213ad386bc5727a354e7098e34351e1b0a049a3 Merge: 8d31f80 3ee7059 Author: Linus Torvalds Date: Thu Aug 10 09:36:06 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc updates from David Miller: 1) Recognize M8 cpus, just basic chip ID matching, from Allen Pais. 2) Prevent crashes when bringing up sunvdc virtual block devices in some environments. From Jim Quigley. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sunvdc: prevent sunvdc panic when mpgroup disk added to guest domain sparc64: Increase max_phys_bits to 51 and VA bits to 53 for M8. sparc64: recognize and support sparc M8 cpu type sparc64: properly name the cpu constants commit a008873740a3d44946c7e72e456f15146cfd7287 Author: Lorenzo Pieralisi Date: Thu Aug 10 15:41:17 2017 +0100 irqchip/gic-v3-its-platform-msi: Fix msi-parent parsing loop While parsing the msi-parent property to chase up the IRQ domain a given device belongs to, the index into the msi-parent tuple should be incremented to ensure all properties entries are taken into account. Current code missed the index update so the parsing loop does not work in case multiple msi-parent phandles are present and may turn into an infinite loop in of_pmsi_get_dev_id() if phandle at index 0 does not correspond to the domain we are actually looking-up. Fix the code by updating the phandle index at each iteration in of_pmsi_get_dev_id(). Fixes: deac7fc1c87f ("irqchip/gic-v3-its: Parse new version of msi-parent property") Signed-off-by: Lorenzo Pieralisi Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its-platform-msi.c | 1 + 1 file changed, 1 insertion(+) commit fdf6e7a8c96ebe115b6460768c82dd136ecbd8db Author: Hanjun Guo Date: Wed Jul 26 18:15:49 2017 +0800 irqchip/gic-v3-its: Allow GIC ITS number more than MAX_NUMNODES When enabling ITS NUMA support on D05, I got the boot log: [ 0.000000] SRAT: PXM 0 -> ITS 0 -> Node 0 [ 0.000000] SRAT: PXM 0 -> ITS 1 -> Node 0 [ 0.000000] SRAT: PXM 0 -> ITS 2 -> Node 0 [ 0.000000] SRAT: PXM 1 -> ITS 3 -> Node 1 [ 0.000000] SRAT: ITS affinity exceeding max count[4] This is wrong on D05 as we have 8 ITSs with 4 NUMA nodes. So dynamically alloc the memory needed instead of using its_srat_maps[MAX_NUMNODES], which count the number of ITS entry(ies) in SRAT and alloc its_srat_maps as needed, then build the mapping of numa node to ITS ID. Of course, its_srat_maps will be freed after ITS probing because we don't need that after boot. After doing this, I got what I wanted: [ 0.000000] SRAT: PXM 0 -> ITS 0 -> Node 0 [ 0.000000] SRAT: PXM 0 -> ITS 1 -> Node 0 [ 0.000000] SRAT: PXM 0 -> ITS 2 -> Node 0 [ 0.000000] SRAT: PXM 1 -> ITS 3 -> Node 1 [ 0.000000] SRAT: PXM 2 -> ITS 4 -> Node 2 [ 0.000000] SRAT: PXM 2 -> ITS 5 -> Node 2 [ 0.000000] SRAT: PXM 2 -> ITS 6 -> Node 2 [ 0.000000] SRAT: PXM 3 -> ITS 7 -> Node 3 Fixes: dbd2b8267233 ("irqchip/gic-v3-its: Add ACPI NUMA node mapping") Signed-off-by: Hanjun Guo Reviewed-by: Lorenzo Pieralisi Cc: Ganapatrao Kulkarni Cc: John Garry Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) commit 10e66760fa8ee11f254a69433fc132d04758a5fc Author: Vitaly Kuznetsov Date: Thu Aug 3 12:58:18 2017 +0200 x86/smpboot: Unbreak CPU0 hotplug A hang on CPU0 onlining after a preceding offlining is observed. Trace shows that CPU0 is stuck in check_tsc_sync_target() waiting for source CPU to run check_tsc_sync_source() but this never happens. Source CPU, in its turn, is stuck on synchronize_sched() which is called from native_cpu_up() -> do_boot_cpu() -> unregister_nmi_handler(). So it's a classic ABBA deadlock, due to the use of synchronize_sched() in unregister_nmi_handler(). Fix the bug by moving unregister_nmi_handler() from do_boot_cpu() to native_cpu_up() after cpu onlining is done. Signed-off-by: Vitaly Kuznetsov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170803105818.9934-1-vkuznets@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 5c23a558a65406cac472df07fd26a2688a42cad2 Author: Gustavo A. R. Silva Date: Fri Jun 30 01:14:45 2017 -0500 clocksource/drivers/em_sti: Fix error return codes in em_sti_probe() Propagate the return values of platform_get_irq and devm_request_irq on failure. Cc: Frans Klaver Signed-off-by: Gustavo A. R. Silva Signed-off-by: Daniel Lezcano drivers/clocksource/em_sti.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d197f7988721221fac64f899efd7657c15281810 Author: Matthias Kaehlcke Date: Mon Jul 31 11:37:28 2017 -0700 clocksource/drivers/arm_arch_timer: Fix mem frame loop initialization The loop to find the best memory frame in arch_timer_mem_acpi_init() initializes the loop counter with itself ('i = i'), which is suspicious in the first place and pointed out by clang. The loop condition is 'i < timer_count' and a prior for loop exits when 'i' reaches 'timer_count', therefore the second loop is never executed. Initialize the loop counter with 0 to iterate over all timers, which supposedly was the intention before the typo monster attacked. Fixes: c2743a36765d3 ("clocksource: arm_arch_timer: add GTDT support for memory-mapped timer") Signed-off-by: Matthias Kaehlcke Reported-by: Ard Biesheuvel Acked-by: Mark Rutland Signed-off-by: Daniel Lezcano drivers/clocksource/arm_arch_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e93c17301ac55321fc18e0f8316e924e58a83c8c Author: Andy Lutomirski Date: Mon Aug 7 19:43:13 2017 -0700 x86/asm/64: Clear AC on NMI entries This closes a hole in our SMAP implementation. This patch comes from grsecurity. Good catch! Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/314cc9f294e8f14ed85485727556ad4f15bb1659.1502159503.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 2 ++ 1 file changed, 2 insertions(+) commit 9b231d9f47c6114d317ce28cff92a74ad80547f5 Author: Peter Zijlstra Date: Thu Aug 3 15:42:09 2017 +0200 perf/core: Fix time on IOC_ENABLE Vince reported that when we do IOC_ENABLE/IOC_DISABLE while the task is SIGSTOP'ed state the timestamps go wobbly. It turns out we indeed fail to correctly account time while in 'OFF' state and doing IOC_ENABLE without getting scheduled in exposes the problem. Further thinking about this problem, it occurred to me that we can suffer a similar fate when we migrate an uncore event between CPUs. The perf_event_install() on the 'new' CPU will do add_event_to_ctx() which will reset all the time stamp, resulting in a subsequent update_event_times() to overwrite the total_time_* fields with smaller values. Reported-by: Vince Weaver Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/events/core.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) commit bfe334924ccd9f4a53f30240c03cf2f43f5b2df1 Author: Peter Zijlstra Date: Wed Aug 2 19:39:30 2017 +0200 perf/x86: Fix RDPMC vs. mm_struct tracking Vince reported the following rdpmc() testcase failure: > Failing test case: > > fd=perf_event_open(); > addr=mmap(fd); > exec() // without closing or unmapping the event > fd=perf_event_open(); > addr=mmap(fd); > rdpmc() // GPFs due to rdpmc being disabled The problem is of course that exec() plays tricks with what is current->mm, only destroying the old mappings after having installed the new mm. Fix this confusion by passing along vma->vm_mm instead of relying on current->mm. Reported-by: Vince Weaver Tested-by: Vince Weaver Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: 1e0fb9ec679c ("perf: Add pmu callbacks to track event mapping and unmapping") Link: http://lkml.kernel.org/r/20170802173930.cstykcqefmqt7jau@hirez.programming.kicks-ass.net [ Minor cleanups. ] Signed-off-by: Ingo Molnar arch/x86/events/core.c | 16 +++++++--------- include/linux/perf_event.h | 4 ++-- kernel/events/core.c | 6 +++--- 3 files changed, 12 insertions(+), 14 deletions(-) commit 1c78f7735b2bdd0afbe5d14c5c8b6d8d381b6f13 Author: Max Gurtovoy Date: Sun Jul 30 01:45:08 2017 +0300 nvme-pci: fix CMB sysfs file removal in reset path Currently we create the sysfs entry even if we fail mapping it. In that case, the unmapping will not remove the sysfs created file. There is no good reason to create a sysfs entry for a non working CMB and show his characteristics. Fixes: f63572dff ("nvme: unmap CMB and remove sysfs file in reset path") Signed-off-by: Max Gurtovoy Reviewed-by: Stephen Bates Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 507384209371fc25cab203b95e7bdf50e58b47d5 Author: James Smart Date: Tue Aug 1 15:12:40 2017 -0700 lpfc: support nvmet_fc defer_rcv callback Currently, calls to nvmet_fc_rcv_fcp_req() always copied the FC-NVME cmd iu to a temporary buffer before returning, allowing the driver to immediately repost the buffer to the hardware. To address timing conditions on queue element structures vs async command reception, the nvmet_fc transport occasionally may need to hold on to the command iu buffer for a short period. In these cases, the nvmet_fc_rcv_fcp_req() will return a special return code (-EOVERFLOW). In these cases, the LLDD must delay until the new defer_rcv lldd callback is called before recycling the buffer back to the hw. This patch adds support for the new nvmet_fc transport defer_rcv callback and recognition of the new error code when passing commands to the transport. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/scsi/lpfc/lpfc_attr.c | 4 +++- drivers/scsi/lpfc/lpfc_debugfs.c | 5 ++++- drivers/scsi/lpfc/lpfc_nvmet.c | 30 ++++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_nvmet.h | 1 + 4 files changed, 38 insertions(+), 2 deletions(-) commit 0fb228d30b8d72bfee51f57e638d412324d44a11 Author: James Smart Date: Tue Aug 1 15:12:39 2017 -0700 nvmet_fc: add defer_req callback for deferment of cmd buffer return At queue creation, the transport allocates a local job struct (struct nvmet_fc_fcp_iod) for each possible element of the queue. When a new CMD is received from the wire, a jobs struct is allocated from the queue and then used for the duration of the command. The job struct contains buffer space for the wire command iu. Thus, upon allocation of the job struct, the cmd iu buffer is copied to the job struct and the LLDD may immediately free/reuse the CMD IU buffer passed in the call. However, in some circumstances, due to the packetized nature of FC and the api of the FC LLDD which may issue a hw command to send the wire response, but the LLDD may not get the hw completion for the command and upcall the nvmet_fc layer before a new command may be asynchronously received on the wire. In other words, its possible for the initiator to get the response from the wire, thus believe a command slot free, and send a new command iu. The new command iu may be received by the LLDD and passed to the transport before the LLDD had serviced the hw completion and made the teardown calls for the original job struct. As such, there is no available job struct available for the new io. E.g. it appears like the host sent more queue elements than the queue size. It didn't based on it's understanding. Rather than treat this as a hard connection failure queue the new request until the job struct does free up. As the buffer isn't copied as there's no job struct, a special return value must be returned to the LLDD to signify to hold off on recycling the cmd iu buffer. And later, when a job struct is allocated and the buffer copied, a new LLDD callback is introduced to notify the LLDD and allow it to recycle it's command iu buffer. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/target/fc.c | 212 +++++++++++++++++++++++++++++++++++------ include/linux/nvme-fc-driver.h | 7 ++ 2 files changed, 191 insertions(+), 28 deletions(-) commit 758f3735580c21b8a36d644128af6608120a1dde Author: Martin Wilck Date: Thu Jul 20 18:34:02 2017 +0200 nvme: strip trailing 0-bytes in wwid_show Some broken controllers (such as earlier Linux targets) pad model or serial fields with 0-bytes rather than spaces. The NVMe spec disallows 0 bytes in "ASCII" fields. Thus strip trailing 0-bytes, too. Also make sure that we get no underflow for pathological input. Signed-off-by: Martin Wilck Reviewed-by: Hannes Reinecke Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 56a9155074b4d23aa07a98c35c6f107dd50a9367 Author: Icenowy Zheng Date: Sat Jul 22 10:28:52 2017 +0800 arm64: allwinner: a64: sopine: add missing ethernet0 alias The EMAC Ethernet controller was enabled, but an accompanying alias was not added. This results in unstable numbering if other Ethernet devices, such as a USB dongle, are present. Also, the bootloader uses the alias to assign a generated stable MAC address to the device node. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Fixes: 96219b004865 ("arm64: allwinner: a64: add device tree for SoPine with baseboard") [wens@csie.org: Rewrite commit log as fixing a previous patch with Fixes] Signed-off-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 1 + 1 file changed, 1 insertion(+) commit dff751c68904cf587d918cfb6b2f5b0112f73bc9 Author: Icenowy Zheng Date: Sat Jul 22 10:28:51 2017 +0800 arm64: allwinner: a64: pine64: add missing ethernet0 alias The EMAC Ethernet controller was enabled, but an accompanying alias was not added. This results in unstable numbering if other Ethernet devices, such as a USB dongle, are present. Also, the bootloader uses the alias to assign a generated stable MAC address to the device node. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Fixes: 970239437493 ("arm64: allwinner: pine64: Enable dwmac-sun8i") [wens@csie.org: Rewrite commit log as fixing a previous patch with Fixes] Signed-off-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 1 + 1 file changed, 1 insertion(+) commit 7dc88d2afb6e5c6bd6bbedc394eb43c1e3114bdd Author: Icenowy Zheng Date: Sat Jul 22 10:28:50 2017 +0800 arm64: allwinner: a64: bananapi-m64: add missing ethernet0 alias The EMAC Ethernet controller was enabled, but an accompanying alias was not added. This results in unstable numbering if other Ethernet devices, such as a USB dongle, are present. Also, the bootloader uses the alias to assign a generated stable MAC address to the device node. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Fixes: e7295499903d ("arm64: allwinner: bananapi-m64: Enable dwmac-sun8i") [wens@csie.org: Rewrite commit log as fixing a previous patch with Fixes] Signed-off-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 1 + 1 file changed, 1 insertion(+) commit 96d9703050a0036a3360ec98bb41e107c90664fe Author: Xin Long Date: Wed Aug 9 18:15:19 2017 +0800 net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_target Commit 55917a21d0cc ("netfilter: x_tables: add context to know if extension runs from nft_compat") introduced a member nft_compat to xt_tgchk_param structure. But it didn't set it's value for ipt_init_target. With unexpected value in par.nft_compat, it may return unexpected result in some target's checkentry. This patch is to set all it's fields as 0 and only initialize the non-zero fields in ipt_init_target. v1->v2: As Wang Cong's suggestion, fix it by setting all it's fields as 0 and only initializing the non-zero fields. Fixes: 55917a21d0cc ("netfilter: x_tables: add context to know if extension runs from nft_compat") Suggested-by: Cong Wang Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sched/act_ipt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1714020e42b17135032c8606f7185b3fb2ba5d78 Author: Nikolay Borisov Date: Wed Aug 9 14:38:04 2017 +0300 igmp: Fix regression caused by igmp sysctl namespace code. Commit dcd87999d415 ("igmp: net: Move igmp namespace init to correct file") moved the igmp sysctls initialization from tcp_sk_init to igmp_net_init. This function is only called as part of per-namespace initialization, only if CONFIG_IP_MULTICAST is defined, otherwise igmp_mc_init() call in ip_init is compiled out, casuing the igmp pernet ops to not be registerd and those sysctl being left initialized with 0. However, there are certain functions, such as ip_mc_join_group which are always compiled and make use of some of those sysctls. Let's do a partial revert of the aforementioned commit and move the sysctl initialization into inet_init_net, that way they will always have sane values. Fixes: dcd87999d415 ("igmp: net: Move igmp namespace init to correct file") Link: https://bugzilla.kernel.org/show_bug.cgi?id=196595 Reported-by: Gerardo Exequiel Pozzi Signed-off-by: Nikolay Borisov Signed-off-by: David S. Miller net/ipv4/af_inet.c | 7 +++++++ net/ipv4/igmp.c | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) commit 04db70d9fe7019d96118158fbaaccb4959ba2bd4 Author: Girish Moodalbail Date: Tue Aug 8 17:26:24 2017 -0700 geneve: maximum value of VNI cannot be used Geneve's Virtual Network Identifier (VNI) is 24 bit long, so the range of values for it would be from 0 to 16777215 (2^24 -1). However, one cannot create a geneve device with VNI set to 16777215. This patch fixes this issue. Signed-off-by: Girish Moodalbail Signed-off-by: David S. Miller drivers/net/geneve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50ddfbafcd1e1f95185dfaa4ad794f742b0beaf8 Author: Florian Fainelli Date: Tue Aug 8 14:45:09 2017 -0700 net: systemport: Fix software statistics for SYSTEMPORT Lite With SYSTEMPORT Lite we have holes in our statistics layout that make us skip over the hardware MIB counters, bcm_sysport_get_stats() was not taking that into account resulting in reporting 0 for all SW-maintained statistics, fix this by skipping accordingly. Fixes: 44a4524c54af ("net: systemport: Add support for SYSTEMPORT Lite") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 4 ++++ 1 file changed, 4 insertions(+) commit ed43594aede9719e56eca72fc6a9a200c60b60e6 Author: Jon Paul Maloy Date: Tue Aug 8 22:23:56 2017 +0200 tipc: remove premature ESTABLISH FSM event at link synchronization When a link between two nodes come up, both endpoints will initially send out a STATE message to the peer, to increase the probability that the peer endpoint also is up when the first traffic message arrives. Thereafter, if the establishing link is the second link between two nodes, this first "traffic" message is a TUNNEL_PROTOCOL/SYNCH message, helping the peer to perform initial synchronization between the two links. However, the initial STATE message may be lost, in which case the SYNCH message will be the first one arriving at the peer. This should also work, as the SYNCH message itself will be used to take up the link endpoint before initializing synchronization. Unfortunately the code for this case is broken. Currently, the link is brought up through a tipc_link_fsm_evt(ESTABLISHED) when a SYNCH arrives, whereupon __tipc_node_link_up() is called to distribute the link slots and take the link into traffic. But, __tipc_node_link_up() is itself starting with a test for whether the link is up, and if true, returns without action. Clearly, the tipc_link_fsm_evt(ESTABLISHED) call is unnecessary, since tipc_node_link_up() is itself issuing such an event, but also harmful, since it inhibits tipc_node_link_up() to perform the test of its tasks, and the link endpoint in question hence is never taken into traffic. This problem has been exposed when we set up dual links between pre- and post-4.4 kernels, because the former ones don't send out the initial STATE message described above. We fix this by removing the unnecessary event call. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/node.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3ee70591d6c47ef4c4699b3395ba96ce287db937 Author: Jim Quigley Date: Fri Jul 21 09:20:15 2017 -0400 sunvdc: prevent sunvdc panic when mpgroup disk added to guest domain Using mpgroup to define multiple paths for a virtual disk causes multiple virtual-device-port ports to be created for that virtual device. Each virtual-device-port port then gets a vdisk created for it by the Linux sunvdc driver. As mpgroup is not supported by the Linux sunvdc driver it cannot handle multiple ports for a single vdisk, leading to a kernel panic at startup. This fix prevents more than one vdisk per virtual-device-port being created until full virtual disk multipathing (mpgroup) support is implemented. Signed-off-by: Jim Quigley Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Reviewed-by: Alexandre Chartre Reviewed-by: Aaron Young Signed-off-by: David S. Miller drivers/block/sunvdc.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 6f48655facfd7f7ccfe6d252ac0fe319ab02e4dd Author: Nicholas Bellinger Date: Sun Aug 6 16:10:03 2017 -0700 target: Fix node_acl demo-mode + uncached dynamic shutdown regression This patch fixes a generate_node_acls = 1 + cache_dynamic_acls = 0 regression, that was introduced by commit 01d4d673558985d9a118e1e05026633c3e2ade9b Author: Nicholas Bellinger Date: Wed Dec 7 12:55:54 2016 -0800 which originally had the proper list_del_init() usage, but was dropped during list review as it was thought unnecessary by HCH. However, list_del_init() usage is required during the special generate_node_acls = 1 + cache_dynamic_acls = 0 case when transport_free_session() does a list_del(&se_nacl->acl_list), followed by target_complete_nacl() doing the same thing. This was manifesting as a general protection fault as reported by Justin: kernel: general protection fault: 0000 [#1] SMP kernel: Modules linked in: kernel: CPU: 0 PID: 11047 Comm: iscsi_ttx Not tainted 4.13.0-rc2.x86_64.1+ #20 kernel: Hardware name: Intel Corporation S5500BC/S5500BC, BIOS S5500.86B.01.00.0064.050520141428 05/05/2014 kernel: task: ffff88026939e800 task.stack: ffffc90007884000 kernel: RIP: 0010:target_put_nacl+0x49/0xb0 kernel: RSP: 0018:ffffc90007887d70 EFLAGS: 00010246 kernel: RAX: dead000000000200 RBX: ffff8802556ca000 RCX: 0000000000000000 kernel: RDX: dead000000000100 RSI: 0000000000000246 RDI: ffff8802556ce028 kernel: RBP: ffffc90007887d88 R08: 0000000000000001 R09: 0000000000000000 kernel: R10: ffffc90007887df8 R11: ffffea0009986900 R12: ffff8802556ce020 kernel: R13: ffff8802556ce028 R14: ffff8802556ce028 R15: ffffffff88d85540 kernel: FS: 0000000000000000(0000) GS:ffff88027fc00000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 00007fffe36f5f94 CR3: 0000000009209000 CR4: 00000000003406f0 kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 kernel: Call Trace: kernel: transport_free_session+0x67/0x140 kernel: transport_deregister_session+0x7a/0xc0 kernel: iscsit_close_session+0x92/0x210 kernel: iscsit_close_connection+0x5f9/0x840 kernel: iscsit_take_action_for_connection_exit+0xfe/0x110 kernel: iscsi_target_tx_thread+0x140/0x1e0 kernel: ? wait_woken+0x90/0x90 kernel: kthread+0x124/0x160 kernel: ? iscsit_thread_get_cpumask+0x90/0x90 kernel: ? kthread_create_on_node+0x40/0x40 kernel: ret_from_fork+0x22/0x30 kernel: Code: 00 48 89 fb 4c 8b a7 48 01 00 00 74 68 4d 8d 6c 24 08 4c 89 ef e8 e8 28 43 00 48 8b 93 20 04 00 00 48 8b 83 28 04 00 00 4c 89 ef <48> 89 42 08 48 89 10 48 b8 00 01 00 00 00 00 ad de 48 89 83 20 kernel: RIP: target_put_nacl+0x49/0xb0 RSP: ffffc90007887d70 kernel: ---[ end trace f12821adbfd46fed ]--- To address this, go ahead and use proper list_del_list() for all cases of se_nacl->acl_list deletion. Reported-by: Justin Maggard Tested-by: Justin Maggard Cc: Justin Maggard Cc: stable@vger.kernel.org # 4.1+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_tpg.c | 4 ++-- drivers/target/target_core_transport.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit d4acf3650c7c968f46ad932b9a25d1cc24cf4998 Author: Bart Van Assche Date: Wed Aug 9 11:28:06 2017 -0700 block: Make blk_mq_delay_kick_requeue_list() rerun the queue at a quiet time The blk_mq_delay_kick_requeue_list() function is used by the device mapper and only by the device mapper to rerun the queue and requeue list after a delay. This function is called once per request that gets requeued. Modify this function such that the queue is run once per path change event instead of once per request that is requeued. Fixes: commit 2849450ad39d ("blk-mq: introduce blk_mq_delay_kick_requeue_list()") Signed-off-by: Bart Van Assche Cc: Mike Snitzer Cc: Laurence Oberman Cc: Signed-off-by: Jens Axboe block/blk-mq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f86e28c4dc8d475cb82ca8d018daaa1564534aad Author: Christoph Hellwig Date: Wed Aug 9 17:47:27 2017 +0200 bio-integrity: only verify integrity on the lowest stacked driver This gets us back to the behavior in 4.12 and earlier. Signed-off-by: Christoph Hellwig Fixes: 7c20f116 ("bio-integrity: stop abusing bi_end_io") Signed-off-by: Jens Axboe block/bio-integrity.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c775d2098d35bd130a883bbdf6af9401a8c4cb2d Author: Milan Broz Date: Wed Aug 9 17:47:26 2017 +0200 bio-integrity: Fix regression if profile verify_fn is NULL In dm-integrity target we register integrity profile that have both generate_fn and verify_fn callbacks set to NULL. This is used if dm-integrity is stacked under a dm-crypt device for authenticated encryption (integrity payload contains authentication tag and IV seed). In this case the verification is done through own crypto API processing inside dm-crypt; integrity profile is only holder of these data. (And memory is owned by dm-crypt as well.) After the commit (and previous changes) Commit 7c20f11680a441df09de7235206f70115fbf6290 Author: Christoph Hellwig Date: Mon Jul 3 16:58:43 2017 -0600 bio-integrity: stop abusing bi_end_io we get this crash: : BUG: unable to handle kernel NULL pointer dereference at (null) : IP: (null) : *pde = 00000000 ... : : Workqueue: kintegrityd bio_integrity_verify_fn : task: f48ae180 task.stack: f4b5c000 : EIP: (null) : EFLAGS: 00210286 CPU: 0 : EAX: f4b5debc EBX: 00001000 ECX: 00000001 EDX: 00000000 : ESI: 00001000 EDI: ed25f000 EBP: f4b5dee8 ESP: f4b5dea4 : DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 : CR0: 80050033 CR2: 00000000 CR3: 32823000 CR4: 001406d0 : Call Trace: : ? bio_integrity_process+0xe3/0x1e0 : bio_integrity_verify_fn+0xea/0x150 : process_one_work+0x1c7/0x5c0 : worker_thread+0x39/0x380 : kthread+0xd6/0x110 : ? process_one_work+0x5c0/0x5c0 : ? kthread_worker_fn+0x100/0x100 : ? kthread_worker_fn+0x100/0x100 : ret_from_fork+0x19/0x24 : Code: Bad EIP value. : EIP: (null) SS:ESP: 0068:f4b5dea4 : CR2: 0000000000000000 Patch just skip the whole verify workqueue if verify_fn is set to NULL. Fixes: 7c20f116 ("bio-integrity: stop abusing bi_end_io") Signed-off-by: Milan Broz [hch: trivial whitespace fix] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio-integrity.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 46828dc77961d9286e55671c4dd3b6c9effadf1a Merge: 92f190a 372aa73 Author: Dave Airlie Date: Thu Aug 10 11:45:04 2017 +1000 Merge branch 'linux-4.13' of git://github.com/skeggsb/linux into drm-fixes single nouveau regression fix. * 'linux-4.13' of git://github.com/skeggsb/linux: drm/nouveau/disp/nv04: avoid creation of output paths commit 372aa73e20197d463fc8b34524c20b089a98b1c3 Author: Ben Skeggs Date: Thu Aug 10 11:32:18 2017 +1000 drm/nouveau/disp/nv04: avoid creation of output paths Fixes hitting WARN_ON() during initialisation of pre-NV50 GPUs, caused by the recent changes to support pad macro routing on GM20x. We currently don't use them here for older GPUs anyway. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 2 ++ 1 file changed, 2 insertions(+) commit 92f190aba2d57c91ef99e227e36461234c35eb7b Author: Michał Mirosław Date: Wed Aug 9 01:42:22 2017 +0200 drm: make DRM_STM default n Default config value for all other drivers is N. Signed-off-by: Michał Mirosław Signed-off-by: Dave Airlie drivers/gpu/drm/stm/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 52ae28e7e7e316099bd16c3ffd91c4213ac10adc Merge: 1c52a78 d6f756e Author: Dave Airlie Date: Thu Aug 10 10:27:45 2017 +1000 Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes single etnaviv fix. * 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: Fix off-by-one error in reloc checking commit 1c52a78e71d1cb58149861f7b46827458c766be2 Merge: 9157822 1e2ba78 Author: Dave Airlie Date: Thu Aug 10 10:17:31 2017 +1000 Merge tag 'drm-intel-fixes-2017-08-09-1' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.13-rc5 * tag 'drm-intel-fixes-2017-08-09-1' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: fix backlight invert for non-zero minimum brightness drm/i915/shrinker: Wrap need_resched() inside preempt-disable drm/i915/perf: fix flex eu registers programming drm/i915: Fix out-of-bounds array access in bdw_load_gamma_lut drm/i915/gvt: Change the max length of mmio_reg_rw from 4 to 8 drm/i915/gvt: Initialize MMIO Block with HW state drm/i915/gvt: clean workload queue if error happened drm/i915/gvt: change resetting to resetting_eng commit 9157822b9d7282611093886acd237168691de383 Merge: db488ab 80c471e Author: Dave Airlie Date: Thu Aug 10 10:07:13 2017 +1000 Merge tag 'drm-misc-fixes-2017-08-08' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Core Changes: - dma-buf: Allow multiple sync_files to wrap a single dma-fence (Chris) Driver Changes: - rockchip: misc fixes to vop driver from the downstream rockchip tree (Mark) - Error path cleanups to tc358767 & host1x (Lucas & Paul, respectively) * tag 'drm-misc-fixes-2017-08-08' of git://anongit.freedesktop.org/git/drm-misc: drm/rockchip: vop: report error when check resource error drm/rockchip: vop: round_up pitches to word align drm/rockchip: vop: fix NV12 video display error drm/rockchip: vop: fix iommu page fault when resume dma-buf/sync_file: Allow multiple sync_files to wrap a single dma-fence drm/bridge: tc358767: fix probe without attached output node commit db488ab0f5e6653b256d8af60033c363c2f0a9d6 Merge: 6606e9a 1899bd5 Author: Dave Airlie Date: Thu Aug 10 10:06:42 2017 +1000 Merge tag 'exynos-drm-fixes-for-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Fix a issue to display system memory region outside a gem buffer. * tag 'exynos-drm-fixes-for-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: forbid creating framebuffers from too small GEM buffers commit 6606e9afb880acd6bcee13c9e831e88f07c8e495 Merge: aae4e7a 8f93e04 Author: Dave Airlie Date: Thu Aug 10 10:06:00 2017 +1000 Merge branch 'msm-fixes-4.13-rc3' of git://people.freedesktop.org/~robclark/linux into drm-fixes Bunch of msm fixes for 4.13 * 'msm-fixes-4.13-rc3' of git://people.freedesktop.org/~robclark/linux: drm/msm: gpu: don't abuse dma_alloc for non-DMA allocations drm/msm: gpu: call qcom_mdt interfaces only for ARCH_QCOM drm/msm/adreno: Prevent unclocked access when retrieving timestamps drm/msm: Remove __user from __u64 data types drm/msm: args->fence should be args->flags drm/msm: Turn off hardware clock gating before reading A5XX registers drm/msm: Allow hardware clock gating to be toggled drm/msm: Remove some potentially blocked register ranges drm/msm/mdp5: Drop clock names with "_clk" suffix drm/msm/mdp5: Fix typo in encoder_enable path drm/msm: NULL pointer dereference in drivers/gpu/drm/msm/msm_gem_vma.c drm/msm: fix WARN_ON in add_vma() with no iommu drm/msm/dsi: Calculate link clock rates with updated dsi->lanes drm/msm/mdp5: fix unclocked register access in _cursor_set() drm/msm: unlock on error in msm_gem_get_iova() drm/msm: fix an integer overflow test drm/msm/mdp5: Fix compilation warnings commit 8d31f80eb38819e4f2905ad21c0e8998382a08f7 Merge: 48fb6f4 0cca6c8 Author: Linus Torvalds Date: Wed Aug 9 14:30:34 2017 -0700 Merge tag 'pinctrl-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "These are the pin control fixes I have gathered since the return from my vacation. They boiled in -next a while so let's get them in. Apart from the documentation build it is purely driver fixes. Which is nice. The Intel fixes seem kind of important. - Fix the documentation build as the docs were moved - Correct the UART pin list on the Intel Merrifield - Fix pin assignment and number of pins on the Marvell Armada 37xx pin controller - Cover the Setzer models in the Chromebook DMI quirk in the Intel cheryview driver so they start working - Add the missing "sim" function to the sunxi driver - Fix USB pin definitions on Uniphier Pro4 - Smatch fix for invalid reference in the zx pin control driver" * tag 'pinctrl-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: generic: update references to Documentation/pinctrl.txt pinctrl: intel: merrifield: Correct UART pin lists pinctrl: armada-37xx: Fix number of pin in south bridge pinctrl: armada-37xx: Fix the pin 23 on south bridge pinctrl: cherryview: Add Setzer models to the Chromebook DMI quirk pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver pinctrl: uniphier: fix USB3 pin assignment for Pro4 pinctrl: zte: fix dereference of 'data' in zx_set_mux() commit 48fb6f4db940e92cfb16cd878cddd59ea6120d06 Author: Mel Gorman Date: Wed Aug 9 08:27:11 2017 +0100 futex: Remove unnecessary warning from get_futex_key Commit 65d8fc777f6d ("futex: Remove requirement for lock_page() in get_futex_key()") removed an unnecessary lock_page() with the side-effect that page->mapping needed to be treated very carefully. Two defensive warnings were added in case any assumption was missed and the first warning assumed a correct application would not alter a mapping backing a futex key. Since merging, it has not triggered for any unexpected case but Mark Rutland reported the following bug triggering due to the first warning. kernel BUG at kernel/futex.c:679! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 3695 Comm: syz-executor1 Not tainted 4.13.0-rc3-00020-g307fec773ba3 #3 Hardware name: linux,dummy-virt (DT) task: ffff80001e271780 task.stack: ffff000010908000 PC is at get_futex_key+0x6a4/0xcf0 kernel/futex.c:679 LR is at get_futex_key+0x6a4/0xcf0 kernel/futex.c:679 pc : [] lr : [] pstate: 80000145 The fact that it's a bug instead of a warning was due to an unrelated arm64 problem, but the warning itself triggered because the underlying mapping changed. This is an application issue but from a kernel perspective it's a recoverable situation and the warning is unnecessary so this patch removes the warning. The warning may potentially be triggered with the following test program from Mark although it may be necessary to adjust NR_FUTEX_THREADS to be a value smaller than the number of CPUs in the system. #include #include #include #include #include #include #include #include #define NR_FUTEX_THREADS 16 pthread_t threads[NR_FUTEX_THREADS]; void *mem; #define MEM_PROT (PROT_READ | PROT_WRITE) #define MEM_SIZE 65536 static int futex_wrapper(int *uaddr, int op, int val, const struct timespec *timeout, int *uaddr2, int val3) { syscall(SYS_futex, uaddr, op, val, timeout, uaddr2, val3); } void *poll_futex(void *unused) { for (;;) { futex_wrapper(mem, FUTEX_CMP_REQUEUE_PI, 1, NULL, mem + 4, 1); } } int main(int argc, char *argv[]) { int i; mem = mmap(NULL, MEM_SIZE, MEM_PROT, MAP_SHARED | MAP_ANONYMOUS, -1, 0); printf("Mapping @ %p\n", mem); printf("Creating futex threads...\n"); for (i = 0; i < NR_FUTEX_THREADS; i++) pthread_create(&threads[i], NULL, poll_futex, NULL); printf("Flipping mapping...\n"); for (;;) { mmap(mem, MEM_SIZE, MEM_PROT, MAP_FIXED | MAP_SHARED | MAP_ANONYMOUS, -1, 0); } return 0; } Reported-and-tested-by: Mark Rutland Signed-off-by: Mel Gorman Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org # 4.7+ Signed-off-by: Linus Torvalds kernel/futex.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 358f8c26b15daf16859cb3bd33db7e601707200e Merge: 31cf92f 9c80034 Author: Linus Torvalds Date: Wed Aug 9 13:21:28 2017 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "The main thing is to allow empty id_tables for ACPI to make some drivers get probed again. It looks a bit bigger than usual because it needs some internal renaming, too. Other than that, there is a fix for broken DSTDs, a super simple enablement for ARM MPS, and two documentation fixes which I'd like to see in v4.13 already" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: rephrase explanation of I2C_CLASS_DEPRECATED i2c: allow i2c-versatile for ARM MPS platforms i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz i2c: designware: Print clock freq on invalid clock freq error i2c: core: Allow empty id_table in ACPI case as well i2c: mux: pinctrl: mention correct module name in Kconfig help text commit 9d6b9b8d1cdbda449bd30e6f63b8eeca15829475 Merge: 368bd88 20fc690 Author: Kalle Valo Date: Wed Aug 9 22:37:23 2017 +0300 Merge tag 'iwlwifi-for-kalle-2018-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes Some more fixes for 4.13 * Fix a memory leak in the SAR code; * Fix a stuck queue case in AP mode; * Convert a WARN to a simple debug in a legitimate race case (from which we can recover); * Fix a severe throughput aggregation on 9000-family devices due to aggregation issues. commit 0fa375e6bc9023211eead30a6a79963c45a563da Author: Jeffy Chen Date: Wed Aug 9 18:41:03 2017 +0800 drm/rockchip: Fix suspend crash when drm is not bound Currently we are allocating drm_device in rockchip_drm_bind, so if the suspend/resume code access it when drm is not bound, we would hit this crash: [ 253.402836] Unable to handle kernel NULL pointer dereference at virtual address 00000028 [ 253.402837] pgd = ffffffc06c9b0000 [ 253.402841] [00000028] *pgd=0000000000000000, *pud=0000000000000000 [ 253.402844] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 253.402859] Modules linked in: btusb btrtl btbcm btintel bluetooth ath10k_pci ath10k_core ar10k_ath ar10k_mac80211 cfg80211 ip6table_filter asix usbnet mii [ 253.402864] CPU: 4 PID: 1331 Comm: cat Not tainted 4.4.70 #15 [ 253.402865] Hardware name: Google Scarlet (DT) [ 253.402867] task: ffffffc076c0ce00 ti: ffffffc06c2c8000 task.ti: ffffffc06c2c8000 [ 253.402871] PC is at rockchip_drm_sys_suspend+0x20/0x5c Add sanity checks to prevent that. Reported-by: Brian Norris Signed-off-by: Jeffy Chen Signed-off-by: Sean Paul Link: https://patchwork.kernel.org/patch/9890297/ drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 31cf92f3dda8ecf4ce19761847cad6e1ffa144e1 Merge: d555eb6 1ad43c0 Author: Linus Torvalds Date: Wed Aug 9 10:37:35 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Three patches that should go into this release. Two of them are from Paolo and fix up some corner cases with BFQ, and the last patch is from Ming and fixes up a potential usage count imbalance regression due to the recent NOWAIT work" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq: don't leak preempt counter/q_usage_counter when allocating rq failed block, bfq: consider also in_service_entity to state whether an entity is active block, bfq: reset in_service_entity if it becomes idle commit c0ca0e5934b3bd70d456b363a6a989a3b4a692f1 Author: Trond Myklebust Date: Tue Aug 8 21:39:28 2017 -0400 NFSv4: Ignore NFS4ERR_OLD_STATEID in nfs41_check_open_stateid() If the call to TEST_STATEID returns NFS4ERR_OLD_STATEID, then it just means we raced with other calls to OPEN. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d555eb6b363455997f1e3ab8604e323c28972ad5 Merge: 4530cca 60c4081 Author: Linus Torvalds Date: Wed Aug 9 10:33:49 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "Fix two regressions in the inside-secure driver with respect to hmac(sha1)" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: inside-secure - fix the sha state length in hmac_sha1_setkey crypto: inside-secure - fix invalidation check in hmac_sha1_setkey commit 4530cca1989b70b2c487ad5bcf82e608ab55f734 Merge: bfa738c 8d63bee Author: Linus Torvalds Date: Wed Aug 9 10:14:04 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "The pull requests are getting smaller, that's progress I suppose :-) 1) Fix infinite loop in CIPSO option parsing, from Yujuan Qi. 2) Fix remote checksum handling in VXLAN and GUE tunneling drivers, from Koichiro Den. 3) Missing u64_stats_init() calls in several drivers, from Florian Fainelli. 4) TCP can set the congestion window to an invalid ssthresh value after congestion window reductions, from Yuchung Cheng. 5) Fix BPF jit branch generation on s390, from Daniel Borkmann. 6) Correct MIPS ebpf JIT merge, from David Daney. 7) Correct byte order test in BPF test_verifier.c, from Daniel Borkmann. 8) Fix various crashes and leaks in ASIX driver, from Dean Jenkins. 9) Handle SCTP checksums properly in mlx4 driver, from Davide Caratti. 10) We can potentially enter tcp_connect() with a cached route already, due to fastopen, so we have to explicitly invalidate it. 11) skb_warn_bad_offload() can bark in legitimate situations, fix from Willem de Bruijn" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits) net: avoid skb_warn_bad_offload false positives on UFO qmi_wwan: fix NULL deref on disconnect ppp: fix xmit recursion detection on ppp channels rds: Reintroduce statistics counting tcp: fastopen: tcp_connect() must refresh the route net: sched: set xt_tgchk_param par.net properly in ipt_init_target net: dsa: mediatek: add adjust link support for user ports net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets qed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()' hysdn: fix to a race condition in put_log_buffer s390/qeth: fix L3 next-hop in xmit qeth hdr asix: Fix small memory leak in ax88772_unbind() asix: Ensure asix_rx_fixup_info members are all reset asix: Add rx->ax_skb = NULL after usbnet_skb_return() bpf: fix selftest/bpf/test_pkt_md_access on s390x netvsc: fix race on sub channel creation bpf: fix byte order test in test_verifier xgene: Always get clk source, but ignore if it's missing for SGMII ports MIPS: Add missing file for eBPF JIT. bpf, s390: fix build for libbpf and selftest suite ... commit 7ba190be873a86b2b90a25daca93ca1ced6c4423 Author: Shuah Khan Date: Wed Aug 2 15:47:33 2017 -0600 selftests: futex: fix run_tests target make -C tools/testing/selftests/futex/ run_tests doesn't run the futex tests. Running the tests when `dirname $(OUTPUT)` == $(PWD) doesn't work when the $(OUTPUT) is $(PWD) which is the case when the test is run using make -C tools/testing/selftests/futex/ run_tests. Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Shuah Khan Reviewed-by: Darren Hart (VMware) Signed-off-by: Shuah Khan tools/testing/selftests/futex/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e433fc4d1a93310d31e7671faca8660a2890908 Author: Cao jin Date: Tue Aug 8 21:20:50 2017 +0800 fixdep: trivial: typo fix and correction Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada scripts/basic/fixdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 312a3d0918bb7d65862fbbd3e2f2f4630e4d6f56 Author: Cao jin Date: Wed Aug 2 10:31:06 2017 +0800 kbuild: trivial cleanups on the comments This is a bunch of trivial fixes and cleanups. Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada Makefile | 10 +++++----- scripts/Kbuild.include | 7 +++---- scripts/Makefile.build | 8 ++++---- scripts/basic/Makefile | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) commit cb87481ee89dbd6609e227afbf64900fb4e5c930 Author: Nicholas Piggin Date: Wed Jul 26 22:46:27 2017 +1000 kbuild: linker script do not match C names unless LD_DEAD_CODE_DATA_ELIMINATION is configured The .data and .bss sections were modified in the generic linker script to pull in sections named .data., which are generated by gcc with -ffunction-sections and -fdata-sections options. The problem with this pattern is it can also match section names that Linux defines explicitly, e.g., .data.unlikely. This can cause Linux sections to get moved into the wrong place. The way to avoid this is to use ".." separators for explicit section names (the dot character is valid in a section name but not a C identifier). However currently there are sections which don't follow this rule, so for now just disable the wild card by default. Example: http://marc.info/?l=linux-arm-kernel&m=150106824024221&w=2 Cc: # 4.9 Fixes: b67067f1176df ("kbuild: allow archs to select link dead code/data elimination") Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada include/asm-generic/vmlinux.lds.h | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit 96ea91e7b6ee2c406598d859e7348b4829404eea Author: Nicholas Piggin Date: Wed Aug 9 22:41:26 2017 +1000 powerpc/watchdog: add locking around init/exit functions When CPUs start and stop the watchdog, they manipulate shared data that is normally protected by the lock. Other CPUs can be running concurrently at this time, so it's a good idea to use locking here to be on the safe side. Remove the barrier which is undocumented and didn't do anything. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/watchdog.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 87607a30be92f1ecee3af6f4a5779e179db98118 Author: Nicholas Piggin Date: Wed Aug 9 22:41:25 2017 +1000 powerpc/watchdog: Fix marking of stuck CPUs When the SMP detector finds other CPUs stuck, it iterates over them and marks them as stuck. This pulls them out of the pending mask and allows the detector to continue with remaining good CPUs (if nmi_watchdog=panic is not enabled). The code to dothat was buggy because when setting a CPU stuck, if the pending mask became empty, it resets it to keep the watchdog running. However the iterator will continue to run over the new pending mask and mark remaining good CPUs sas stuck. Fix this by doing it with cpumask bitwise operations. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/watchdog.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 8e23692175ad465628b8c86c1acc154fecad97be Author: Nicholas Piggin Date: Wed Aug 9 22:41:24 2017 +1000 powerpc/watchdog: Fix final-check recovered case When the watchdog decides to panic, it takes the lock and double checks everything (to avoid races with the CPU being unstuck or panic()ed by something else). The exit label was misplaced and would result in all-CPUs backtrace and watchdog panic even in the case that the condition was found to be resolved. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/watchdog.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 26c5c6e129ee725f103938262a034861ada467ae Author: Nicholas Piggin Date: Wed Aug 9 22:41:23 2017 +1000 powerpc/watchdog: Moderate touch_nmi_watchdog overhead Some code can go into a tight loop calling touch_nmi_watchdog (e.g., stop_machine CPU hotplug code). This can cause contention on watchdog locks particularly if all CPUs with watchdog enabled are spinning in the loops. Avoid this storm of activity by running the watchdog timer callback from this path if we have exceeded the timer period since it was last run. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/watchdog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d8e2a4053574002135fbb032c2e74f1d1dbb2103 Author: Nicholas Piggin Date: Wed Aug 9 22:41:22 2017 +1000 powerpc/watchdog: Improve watchdog lock primitive - Hard-disable interrupts before taking the lock, which prevents soft-NMI re-entrancy and therefore can prevent deadlocks. - Use raw_ variants of local_irq_disable to avoid irq debugging. - When the lock is contended, spin at low SMT priority, using loads only, and with interrupts enabled (where possible). Some stalls have been noticed at high loads that go away with improved locking. There should not be so much locking contention in the first place (which is addressed in a subsequent patch), but locking should still be improved. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/watchdog.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 0459ddfdb31e7d812b555a2530ecbacdf96961a6 Author: Nicholas Piggin Date: Wed Aug 9 22:41:21 2017 +1000 powerpc: NMI IPI improve lock primitive When the NMI IPI lock is contended, spin at low SMT priority, using loads only, and with interrupts enabled (where possible). This improves behaviour under high contention (e.g., a system crash when a number of CPUs are trying to enter the debugger). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7310d5c8c55e8987a854507f71022f8de676bbf4 Author: Michael Ellerman Date: Wed Aug 9 20:57:55 2017 +1000 powerpc/configs: Re-enable HARD/SOFT lockup detectors In commit 05a4a9527931 ("kernel/watchdog: split up config options"), CONFIG_LOCKUP_DETECTOR was split into two separate config options, CONFIG_HARDLOCKUP_DETECTOR and CONFIG_SOFTLOCKUP_DETECTOR. Our defconfigs still have CONFIG_LOCKUP_DETECTOR=y, but that is no longer user selectable, and we don't mention the new options, so we end up with none of them enabled. So update the defconfigs to turn on the new SOFT and HARD options, the end result being the same as what we had previously. Fixes: 05a4a9527931 ("kernel/watchdog: split up config options") Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 3 ++- arch/powerpc/configs/ppc64_defconfig | 3 ++- arch/powerpc/configs/pseries_defconfig | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 8861249c740fc4af9ddc5aee321eafefb960d7c6 Author: megha.dey@linux.intel.com Date: Wed Aug 2 13:49:09 2017 -0700 crypto: x86/sha1 - Fix reads beyond the number of blocks passed It was reported that the sha1 AVX2 function(sha1_transform_avx2) is reading ahead beyond its intended data, and causing a crash if the next block is beyond page boundary: http://marc.info/?l=linux-crypto-vger&m=149373371023377 This patch makes sure that there is no overflow for any buffer length. It passes the tests written by Jan Stancek that revealed this problem: https://github.com/jstancek/sha1-avx2-crash I have re-enabled sha1-avx2 by reverting commit b82ce24426a4071da9529d726057e4e642948667 Cc: Fixes: b82ce24426a4 ("crypto: sha1-ssse3 - Disable avx2") Originally-by: Ilya Albrekht Tested-by: Jan Stancek Signed-off-by: Megha Dey Reported-by: Jan Stancek Signed-off-by: Herbert Xu arch/x86/crypto/sha1_avx2_x86_64_asm.S | 67 ++++++++++++++++++---------------- arch/x86/crypto/sha1_ssse3_glue.c | 2 +- 2 files changed, 37 insertions(+), 32 deletions(-) commit 28389575a8cf933a5f3c378556b9f4d3cce0efd2 Author: Herbert Xu Date: Wed Aug 2 16:40:47 2017 +0800 crypto: ixp4xx - Fix error handling path in 'aead_perform()' In commit 0f987e25cb8a, the source processing has been moved in front of the destination processing, but the error handling path has not been modified accordingly. Free resources in the correct order to avoid some leaks. Cc: Fixes: 0f987e25cb8a ("crypto: ixp4xx - Fix false lastlen uninitialised warning") Reported-by: Christophe JAILLET Signed-off-by: Herbert Xu Reviewed-by: Arnd Bergmann drivers/crypto/ixp4xx_crypto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3f8b23a09a87aa65df3e13129cb2d9cffcb394db Author: Michał Mirosław Date: Wed Aug 9 01:48:59 2017 +0200 mmc: block: fix lockdep splat when removing mmc_block module Fix lockdep splat introduced in v4.13-rc4. [ 266.297226] ------------[ cut here ]------------ [ 266.300078] WARNING: CPU: 2 PID: 176 at /mnt/src/jaja/git/tf300t/include/linux/blkdev.h:657 mmc_blk_remove_req+0xd0/0xe8 [mmc_block] [ 266.302937] Modules linked in: mmc_block(-) sdhci_tegra sdhci_pltfm sdhci pwrseq_simple pwrseq_emmc mmc_core [ 266.305941] CPU: 2 PID: 176 Comm: rmmod Tainted: G W 4.13.0-rc4mq-00208-gb691e67724b8-dirty #694 [ 266.308852] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) [ 266.311719] [] (unwind_backtrace) from [] (show_stack+0x18/0x1c) [ 266.314664] [] (show_stack) from [] (dump_stack+0x84/0x98) [ 266.317644] [] (dump_stack) from [] (__warn+0xf4/0x10c) [ 266.320542] [] (__warn) from [] (warn_slowpath_null+0x28/0x30) [ 266.323534] [] (warn_slowpath_null) from [] (mmc_blk_remove_req+0xd0/0xe8 [mmc_block]) [ 266.326568] [] (mmc_blk_remove_req [mmc_block]) from [] (mmc_blk_remove_parts.constprop.6+0x50/0x64 [mmc_block]) [ 266.329678] [] (mmc_blk_remove_parts.constprop.6 [mmc_block]) from [] (mmc_blk_remove+0x24/0x140 [mmc_block]) [ 266.332894] [] (mmc_blk_remove [mmc_block]) from [] (mmc_bus_remove+0x20/0x28 [mmc_core]) [ 266.336198] [] (mmc_bus_remove [mmc_core]) from [] (device_release_driver_internal+0x164/0x200) [ 266.339367] [] (device_release_driver_internal) from [] (driver_detach+0x40/0x74) [ 266.342537] [] (driver_detach) from [] (bus_remove_driver+0x68/0xdc) [ 266.345660] [] (bus_remove_driver) from [] (mmc_blk_exit+0xc/0x2cc [mmc_block]) [ 266.348875] [] (mmc_blk_exit [mmc_block]) from [] (SyS_delete_module+0x1c4/0x254) [ 266.352068] [] (SyS_delete_module) from [] (ret_fast_syscall+0x0/0x34) [ 266.355308] ---[ end trace f68728a0d3053b72 ]--- Fixes: 7c84b8b43d3d ("mmc: block: bypass the queue even if usage is present for hotplug") Signed-off-by: Michał Mirosław Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 2 ++ 1 file changed, 2 insertions(+) commit 20fc690f38d17b8f961101a477a9aa0841fb6e20 Author: Naftali Goldstein Date: Tue Jul 11 10:07:32 2017 +0300 iwlwifi: mvm: send delba upon rx ba session timeout When an RX block-ack session times out, the firmware, which offloads RX reordering but not the BA session negotiation, stops the session but doesn't send a DELBA. This causes the the session to remain active in the remote device, so no more BA sessions will be established, causing a severe throughput degradation due to the lack of aggregation. Use the new ieee80211_rx_ba_timer_expired API when the ba session timer expires, since this will tear down the ba session and also send a delba. The previous API used is intended for drivers that offload the addba/delba negotiation, but not the rx reordering, while our driver does the opposite. This patch depends on "mac80211: add api to start ba session timer expired flow". Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04c2cf34362f133be09878bd752f8b014318b59a Author: Naftali Goldstein Date: Tue Jul 11 10:07:25 2017 +0300 mac80211: add api to start ba session timer expired flow Some drivers handle rx buffer reordering internally (and by extension handle also the rx ba session timer internally), but do not ofload the addba/delba negotiation. Add an api for these drivers to properly tear-down the ba session, including sending a delba. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho include/net/mac80211.h | 15 +++++++++++++++ net/mac80211/agg-rx.c | 22 +++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) commit 7f5770678b2d0cc8f3ffbf7eb73410f2acba7925 Author: Sergei Shtylyov Date: Sun Jul 30 21:10:44 2017 +0300 dmaengine: tegra210-adma: fix of_irq_get() error check of_irq_get() may return 0 as well as negative error number on failure, while the driver only checks for the negative values. The driver would then call request_irq(0, ...) in tegra_adma_alloc_chan_resources() and never get valid channel interrupt. Check for 'tdc->irq <= 0' instead and return -ENXIO from the driver's probe iff of_irq_get() returned 0. Fixes: f46b195799b5 ("dmaengine: tegra-adma: Add support for Tegra210 ADMA") Signed-off-by: Sergei Shtylyov Acked-by: Thierry Reding Acked-by: Jon Hunter Signed-off-by: Vinod Koul drivers/dma/tegra210-adma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a600852a9d00be08c539307a42729fd46b0a654e Author: Emmanuel Grumbach Date: Thu Jul 27 15:34:12 2017 +0300 iwlwifi: mvm: don't WARN when a legit race happens in A-MPDU When we start an Rx A-MPDU session, we first get the AddBA request, then we send an ADD_STA command to the firmware that will reply with a BAID which is a hardware resource that tracks the BA session. This BAID will appear on each and every frame that we get from the firwmare until the A-MPDU session is torn down. In the Rx path, we look at this BAID to manage the reordering buffer. This flow is inherently racy since the hardware will start to put the BAID in the frames it receives even if the firmware hasn't sent the response to the ADD_STA command. This basically means that the driver can get frames with a valid BAID that it doesn't know yet. When that happens, the driver used to WARN. Fix this by simply not WARN in this case. When the driver will know abou the BAID, it will initialise the relevant states and the next frame with a valid BAID will refresh them. Fixes: b915c10174fb ("iwlwifi: mvm: add reorder buffer per queue") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7e39a00d593133ca8fcd3eef0409685e7c895ee6 Author: Avraham Stern Date: Wed Jul 26 15:08:45 2017 +0300 iwlwifi: mvm: start mac queues when deferred tx frames are purged In AP mode, if a station is removed just as it is adding a new stream, the queue in question will remain stopped and no more TX will happen in this queue, leading to connection failures and other problems. This is because under DQA, when tx is deferred because a queue needs to be allocated, the mac queue for that TID is stopped until the new stream is added. If at this point the station that this stream belongs to is removed, all the deferred tx frames are purged, but the mac queue is not restarted. As a result, all following tx on this queue will not be transmitted. Fix this by starting the relevant mac queues when the deferred tx frames are purged. Fixes: 24afba7690e4 ("iwlwifi: mvm: support bss dynamic alloc/dealloc of queues") Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 8d63bee643f1fb53e472f0e135cae4eb99d62d19 Author: Willem de Bruijn Date: Tue Aug 8 14:22:55 2017 -0400 net: avoid skb_warn_bad_offload false positives on UFO skb_warn_bad_offload triggers a warning when an skb enters the GSO stack at __skb_gso_segment that does not have CHECKSUM_PARTIAL checksum offload set. Commit b2504a5dbef3 ("net: reduce skb_warn_bad_offload() noise") observed that SKB_GSO_DODGY producers can trigger the check and that passing those packets through the GSO handlers will fix it up. But, the software UFO handler will set ip_summed to CHECKSUM_NONE. When __skb_gso_segment is called from the receive path, this triggers the warning again. Make UFO set CHECKSUM_UNNECESSARY instead of CHECKSUM_NONE. On Tx these two are equivalent. On Rx, this better matches the skb state (checksum computed), as CHECKSUM_NONE here means no checksum computed. See also this thread for context: http://patchwork.ozlabs.org/patch/799015/ Fixes: b2504a5dbef3 ("net: reduce skb_warn_bad_offload() noise") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/dev.c | 2 +- net/ipv4/udp_offload.c | 2 +- net/ipv6/udp_offload.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit bbae08e592706dc32e5c7c97827b13c1c178668b Author: Bjørn Mork Date: Tue Aug 8 18:02:11 2017 +0200 qmi_wwan: fix NULL deref on disconnect qmi_wwan_disconnect is called twice when disconnecting devices with separate control and data interfaces. The first invocation will set the interface data to NULL for both interfaces to flag that the disconnect has been handled. But the matching NULL check was left out when qmi_wwan_disconnect was added, resulting in this oops: usb 2-1.4: USB disconnect, device number 4 qmi_wwan 2-1.4:1.6 wwp0s29u1u4i6: unregister 'qmi_wwan' usb-0000:00:1d.0-1.4, WWAN/QMI device BUG: unable to handle kernel NULL pointer dereference at 00000000000000e0 IP: qmi_wwan_disconnect+0x25/0xc0 [qmi_wwan] PGD 0 P4D 0 Oops: 0000 [#1] SMP Modules linked in: CPU: 2 PID: 33 Comm: kworker/2:1 Tainted: G E 4.12.3-nr44-normandy-r1500619820+ #1 Hardware name: LENOVO 4291LR7/4291LR7, BIOS CBET4000 4.6-810-g50522254fb 07/21/2017 Workqueue: usb_hub_wq hub_event [usbcore] task: ffff8c882b716040 task.stack: ffffb8e800d84000 RIP: 0010:qmi_wwan_disconnect+0x25/0xc0 [qmi_wwan] RSP: 0018:ffffb8e800d87b38 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff8c8824f3f1d0 RDI: ffff8c8824ef6400 RBP: ffff8c8824ef6400 R08: 0000000000000000 R09: 0000000000000000 R10: ffffb8e800d87780 R11: 0000000000000011 R12: ffffffffc07ea0e8 R13: ffff8c8824e2e000 R14: ffff8c8824e2e098 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8c8835300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000e0 CR3: 0000000229ca5000 CR4: 00000000000406e0 Call Trace: ? usb_unbind_interface+0x71/0x270 [usbcore] ? device_release_driver_internal+0x154/0x210 ? qmi_wwan_unbind+0x6d/0xc0 [qmi_wwan] ? usbnet_disconnect+0x6c/0xf0 [usbnet] ? qmi_wwan_disconnect+0x87/0xc0 [qmi_wwan] ? usb_unbind_interface+0x71/0x270 [usbcore] ? device_release_driver_internal+0x154/0x210 Reported-and-tested-by: Nathaniel Roach Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support") Cc: Daniele Palmas Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0a0e1a85c83775a648041be2b15de6d0a2f2b8eb Author: Guillaume Nault Date: Tue Aug 8 11:43:24 2017 +0200 ppp: fix xmit recursion detection on ppp channels Commit e5dadc65f9e0 ("ppp: Fix false xmit recursion detect with two ppp devices") dropped the xmit_recursion counter incrementation in ppp_channel_push() and relied on ppp_xmit_process() for this task. But __ppp_channel_push() can also send packets directly (using the .start_xmit() channel callback), in which case the xmit_recursion counter isn't incremented anymore. If such packets get routed back to the parent ppp unit, ppp_xmit_process() won't notice the recursion and will call ppp_channel_push() on the same channel, effectively creating the deadlock situation that the xmit_recursion mechanism was supposed to prevent. This patch re-introduces the xmit_recursion counter incrementation in ppp_channel_push(). Since the xmit_recursion variable is now part of the parent ppp unit, incrementation is skipped if the channel doesn't have any. This is fine because only packets routed through the parent unit may enter the channel recursively. Finally, we have to ensure that pch->ppp is not going to be modified while executing ppp_channel_push(). Instead of taking this lock only while calling ppp_xmit_process(), we now have to hold it for the full ppp_channel_push() execution. This respects the ppp locks ordering which requires locking ->upl before ->downl. Fixes: e5dadc65f9e0 ("ppp: Fix false xmit recursion detect with two ppp devices") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 05bfd7dbb53a10be4a3e7aebaeec04b558198d49 Author: Håkon Bugge Date: Tue Aug 8 11:13:32 2017 +0200 rds: Reintroduce statistics counting In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection while senders are present"), refilling the receive queue was removed from rds_ib_recv(), along with the increment of s_ib_rx_refill_from_thread. Commit 73ce4317bf98 ("RDS: make sure we post recv buffers") re-introduces filling the receive queue from rds_ib_recv(), but does not add the statistics counter. rds_ib_recv() was later renamed to rds_ib_recv_path(). This commit reintroduces the statistics counting of s_ib_rx_refill_from_thread and s_ib_rx_refill_from_cq. Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang Reviewed-by: Wei Lin Guay Reviewed-by: Shamir Rabinovitch Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_recv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8ba60924710cde564a3905588b6219741d6356d0 Author: Eric Dumazet Date: Tue Aug 8 01:41:58 2017 -0700 tcp: fastopen: tcp_connect() must refresh the route With new TCP_FASTOPEN_CONNECT socket option, there is a possibility to call tcp_connect() while socket sk_dst_cache is either NULL or invalid. +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 4 +0 fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 +0 setsockopt(4, SOL_TCP, TCP_FASTOPEN_CONNECT, [1], 4) = 0 +0 connect(4, ..., ...) = 0 << sk->sk_dst_cache becomes obsolete, or even set to NULL >> +1 sendto(4, ..., 1000, MSG_FASTOPEN, ..., ...) = 1000 We need to refresh the route otherwise bad things can happen, especially when syzkaller is running on the host :/ Fixes: 19f6d3f3c8422 ("net/tcp-fastopen: Add new API support") Reported-by: Dmitry Vyukov Signed-off-by: Eric Dumazet Cc: Wei Wang Cc: Yuchung Cheng Acked-by: Wei Wang Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 4 ++++ 1 file changed, 4 insertions(+) commit ec0acb09313074ba1a4976945791d9c6815f39fb Author: Xin Long Date: Tue Aug 8 15:25:25 2017 +0800 net: sched: set xt_tgchk_param par.net properly in ipt_init_target Now xt_tgchk_param par in ipt_init_target is a local varibale, par.net is not initialized there. Later when xt_check_target calls target's checkentry in which it may access par.net, it would cause kernel panic. Jaroslav found this panic when running: # ip link add TestIface type dummy # tc qd add dev TestIface ingress handle ffff: # tc filter add dev TestIface parent ffff: u32 match u32 0 0 \ action xt -j CONNMARK --set-mark 4 This patch is to pass net param into ipt_init_target and set par.net with it properly in there. v1->v2: As Wang Cong pointed, I missed ipt_net_id != xt_net_id, so fix it by also passing net_id to __tcf_ipt_init. v2->v3: Missed the fixes tag, so add it. Fixes: ecb2421b5ddf ("netfilter: add and use nf_ct_netns_get/put") Reported-by: Jaroslav Aster Signed-off-by: Xin Long Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/act_ipt.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8e6f1521ec431dbade73f57e21e5dc46eaae50ba Author: John Crispin Date: Mon Aug 7 16:20:49 2017 +0200 net: dsa: mediatek: add adjust link support for user ports Manually adjust the port settings of user ports once PHY polling has completed. This patch extends the adjust_link callback to configure the per port PMCR register, applying the proper values polled from the PHY. Without this patch flow control was not always getting setup properly. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: Muciri Gatimu Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/dsa/mt7530.c | 38 ++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mt7530.h | 1 + 2 files changed, 39 insertions(+) commit e718fe450e616227b74d27a233cdf37b4df0c82b Author: Davide Caratti Date: Thu Aug 3 22:54:48 2017 +0200 net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets if the NIC fails to validate the checksum on TCP/UDP, and validation of IP checksum is successful, the driver subtracts the pseudo-header checksum from the value obtained by the hardware and sets CHECKSUM_COMPLETE. Don't do that if protocol is IPPROTO_SCTP, otherwise CRC32c validation fails. V2: don't test MLX4_CQE_STATUS_IPV6 if MLX4_CQE_STATUS_IPV4 is set Reported-by: Shuang Li Fixes: f8c6455bb04b ("net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE") Signed-off-by: Davide Caratti Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 1899bd57570a3e610db574b57d1e7e66378aa908 Author: Marek Szyprowski Date: Wed Jul 12 12:09:22 2017 +0200 drm/exynos: forbid creating framebuffers from too small GEM buffers Add a check if the framebuffer described by the provided drm_mode_fb_cmd2 structure fits into provided GEM buffers. Without this check it is possible to create a framebuffer object from a small buffer and set it to the hardware, what results in displaying system memory outside the allocated GEM buffer. Signed-off-by: Marek Szyprowski Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fb.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 1feb26162bee7b2f110facfec71b5c7bdbc7d14d Author: Weston Andros Adamson Date: Tue Aug 1 16:25:01 2017 -0400 nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays The client was freeing the nfs4_ff_layout_ds, but not the contained nfs4_ff_ds_version array. Signed-off-by: Weston Andros Adamson Cc: stable@vger.kernel.org # v4.0+ Signed-off-by: Anna Schumaker fs/nfs/flexfilelayout/flexfilelayoutdev.c | 1 + 1 file changed, 1 insertion(+) commit bfa738cf3dfae2111626650f86135f93c5ff0a22 Merge: b95c29a 48107c4 Author: Linus Torvalds Date: Tue Aug 8 11:42:33 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "Third set of -rc fixes for 4.13 cycle - small set of miscellanous fixes - a reasonably sizable set of IPoIB fixes that deal with multiple long standing issues" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/hns: checking for IS_ERR() instead of NULL RDMA/mlx5: Fix existence check for extended address vector IB/uverbs: Fix device cleanup RDMA/uverbs: Prevent leak of reserved field IB/core: Fix race condition in resolving IP to MAC IB/ipoib: Notify on modify QP failure only when relevant Revert "IB/core: Allow QP state transition from reset to error" IB/ipoib: Remove double pointer assigning IB/ipoib: Clean error paths in add port IB/ipoib: Add get statistics support to SRIOV VF IB/ipoib: Add multicast packets statistics IB/ipoib: Set IPOIB_NEIGH_TBL_FLUSH after flushed completion initialization IB/ipoib: Prevent setting negative values to max_nonsrq_conn_qp IB/ipoib: Make sure no in-flight joins while leaving that mcast IB/ipoib: Use cancel_delayed_work_sync when needed IB/ipoib: Fix race between light events and interface restart commit b95c29a20f070babfea92ab8f741ec94695617d3 Author: Joe Perches Date: Sat Aug 5 18:45:49 2017 -0700 parse-maintainers: Move matching sections from MAINTAINERS Allow any number of command line arguments to match either the section header or the section contents and create new files. Create MAINTAINERS.new and SECTION.new. This allows scripting of the movement of various sections from MAINTAINERS. Signed-off-by: Joe Perches Signed-off-by: Linus Torvalds scripts/parse-maintainers.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit fe9090301fed202a80a6113534efaa0d9184543b Author: Joe Perches Date: Sat Aug 5 18:45:48 2017 -0700 parse-maintainers: Use perl hash references and specific filenames Instead of reading STDIN and writing STDOUT, use specific filenames of MAINTAINERS and MAINTAINERS.new. Use hash references instead of global hash %hash so future modifications can read and write specific hashes to split up MAINTAINERS into multiple files using a script. Signed-off-by: Joe Perches Signed-off-by: Linus Torvalds scripts/parse-maintainers.pl | 57 ++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 23 deletions(-) commit 61f741645a354d91fece7b9cbb2f3f3587db8b8a Author: Joe Perches Date: Sat Aug 5 18:45:47 2017 -0700 parse-maintainers: Add section pattern sorting Section [A-Z]: patterns are not currently in any required sorting order. Add a specific sorting sequence to MAINTAINERS entries. Sort F: and X: patterns in alphabetic order. The preferred section ordering is: SECTION HEADER M: Maintainers R: Reviewers P: Named persons without email addresses L: Mailing list addresses S: Status of this section (Supported, Maintained, Orphan, etc...) W: Any relevant URLs T: Source code control type (git, quilt, etc) Q: Patchwork patch acceptance queue site B: Bug tracking URIs C: Chat URIs F: Files with wildcard patterns (alphabetic ordered) X: Excluded files with wildcard patterns (alphabetic ordered) N: Files with regex patterns K: Keyword regexes in source code for maintainership identification Miscellaneous perl neatening: - Rename %map to %hash, map has a different meaning in perl - Avoid using \& and local variables for function indirection - Use return for a little c like clarity - Use c-like function call style instead of &function Signed-off-by: Joe Perches Signed-off-by: Linus Torvalds scripts/parse-maintainers.pl | 70 +++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 21 deletions(-) commit 6f7d98ec445b61f8f416fedfe607cb4f1653a8bc Author: Joe Perches Date: Fri Aug 4 21:45:48 2017 -0700 get_maintainer: Prepare for separate MAINTAINERS files Allow for MAINTAINERS to become a directory and if it is, read all the files in the directory for maintained sections. Optionally look for all files named MAINTAINERS in directories excluding the .git directory by using --find-maintainer-files. This optional feature adds ~.3 seconds of CPU on an Intel i5-6200 with an SSD. Miscellanea: - Create a read_maintainer_file subroutine from the existing code - Test only the existence of MAINTAINERS, not whether it's a file Signed-off-by: Joe Perches Signed-off-by: Linus Torvalds scripts/get_maintainer.pl | 91 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 25 deletions(-) commit 6209ef67883ae6407cceb557b9ec4b2117d91697 Author: Randy Dunlap Date: Wed Aug 2 10:57:45 2017 -0700 MAINTAINERS: openbmc mailing list is moderated The openbmc mailing list is moderated for non-subscribers. Signed-off-by: Randy Dunlap Acked-by: Brendan Higgins Cc: Benjamin Herrenschmidt Cc: Joel Stanley Signed-off-by: Linus Torvalds MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1ffc2d25ae98878f37445d223b3344686b5c822 Author: Sedat Dilek Date: Tue Jul 25 14:53:42 2017 +0200 MAINTAINERS: greybus: Fix typo s/LOOBACK/LOOPBACK Fixes: f47e07bc5f1a5c48 ("Fix up MAINTAINERS file problems") Cc: Joe Perches Signed-off-by: Sedat Dilek Signed-off-by: Linus Torvalds MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92ddd95919466de5d34f3cb43635da9a7f9ab814 Author: Haibo Chen Date: Tue Aug 8 18:54:01 2017 +0800 mmc: mmc: correct the logic for setting HS400ES signal voltage Change the default err value to -EINVAL, make sure the card only has type EXT_CSD_CARD_TYPE_HS400_1_8V also do the signal voltage setting when select hs400es mode. Fixes: commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode") Cc: Signed-off-by: Haibo Chen Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de70be0ae3c9283a7d16fd5fbdc03840f01065cf Merge: 51d96dc f930c70 Author: Linus Torvalds Date: Tue Aug 8 09:38:41 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small fixes, one re-fix of a previous fix and five patches sorting out hotplug in the bnx2X class of drivers. The latter is rather involved, but necessary because these drivers have started dropping lockdep recursion warnings on the hotplug lock because of its conversion to a percpu rwsem" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sg: only check for dxfer_len greater than 256M scsi: aacraid: reading out of bounds scsi: qedf: Limit number of CQs scsi: bnx2i: Simplify cpu hotplug code scsi: bnx2fc: Simplify CPU hotplug code scsi: bnx2i: Prevent recursive cpuhotplug locking scsi: bnx2fc: Prevent recursive cpuhotplug locking scsi: bnx2fc: Plug CPU hotplug race commit 51d96dc2e2dc2cf9b81cf976cc93c51ba3ac2f92 Author: Helge Deller Date: Tue Aug 8 18:28:41 2017 +0200 random: fix warning message on ia64 and parisc Fix the warning message on the parisc and IA64 architectures to show the correct function name of the caller by using %pS instead of %pF. The message is printed with the value of _RET_IP_ which calls __builtin_return_address(0) and as such returns the IP address caller instead of pointer to a function descriptor of the caller. The effect of this patch is visible on the parisc and ia64 architectures only since those are the ones which use function descriptors while on all others %pS and %pF will behave the same. Cc: Theodore Ts'o Cc: Jason A. Donenfeld Signed-off-by: Helge Deller Fixes: eecabf567422 ("random: suppress spammy warnings about unseeded randomness") Fixes: d06bfd1989fe ("random: warn when kernel uses unseeded randomness") Signed-off-by: Linus Torvalds drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 424f727b94132a4193af401dd823c44612d1d59f Author: Brian King Date: Tue Aug 1 13:45:36 2017 -0500 scsi: ses: Fix wrong page error If a SES device returns an error on a requested diagnostic page, we are currently printing an error indicating the wrong page was received. Fix this up to simply return a failure and only check the returned page when the diagnostic page buffer was populated by the device. Signed-off-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/ses.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0e17a9b0df29590c45dfb296f541270a5941f41 Author: Brian King Date: Tue Aug 1 10:21:30 2017 -0500 scsi: ipr: Fix scsi-mq lockdep issue Fixes the following lockdep warning that can occur when scsi-mq is enabled with ipr due to ipr calling scsi_unblock_requests from irq context. The fix is to move the call to scsi_unblock_requests to ipr's existing workqueue. stack backtrace: CPU: 28 PID: 0 Comm: swapper/28 Not tainted 4.13.0-rc2-gcc6x-gf74c89b #1 Call Trace: [c000001fffe97550] [c000000000b50818] dump_stack+0xe8/0x160 (unreliable) [c000001fffe97590] [c0000000001586d0] print_usage_bug+0x2d0/0x390 [c000001fffe97640] [c000000000158f34] mark_lock+0x7a4/0x8e0 [c000001fffe976f0] [c00000000015a000] __lock_acquire+0x6a0/0x1a70 [c000001fffe97860] [c00000000015befc] lock_acquire+0xec/0x2e0 [c000001fffe97930] [c000000000b71514] _raw_spin_lock+0x44/0x70 [c000001fffe97960] [c0000000005b60f4] blk_mq_sched_dispatch_requests+0xa4/0x2a0 [c000001fffe979c0] [c0000000005acac0] __blk_mq_run_hw_queue+0x100/0x2c0 [c000001fffe97a00] [c0000000005ad478] __blk_mq_delay_run_hw_queue+0x118/0x130 [c000001fffe97a40] [c0000000005ad61c] blk_mq_start_hw_queues+0x6c/0xa0 [c000001fffe97a80] [c000000000797aac] scsi_kick_queue+0x2c/0x60 [c000001fffe97aa0] [c000000000797cf0] scsi_run_queue+0x210/0x360 [c000001fffe97b10] [c00000000079b888] scsi_run_host_queues+0x48/0x80 [c000001fffe97b40] [c0000000007b6090] ipr_ioa_bringdown_done+0x70/0x1e0 [c000001fffe97bc0] [c0000000007bc860] ipr_reset_ioa_job+0x80/0xf0 [c000001fffe97bf0] [c0000000007b4d50] ipr_reset_timer_done+0xd0/0x100 [c000001fffe97c30] [c0000000001937bc] call_timer_fn+0xdc/0x4b0 [c000001fffe97cf0] [c000000000193d08] expire_timers+0x178/0x330 [c000001fffe97d60] [c0000000001940c8] run_timer_softirq+0xb8/0x120 [c000001fffe97de0] [c000000000b726a8] __do_softirq+0x168/0x6d8 [c000001fffe97ef0] [c0000000000df2c8] irq_exit+0x108/0x150 [c000001fffe97f10] [c000000000017bf4] __do_irq+0x2a4/0x4a0 [c000001fffe97f90] [c00000000002da50] call_do_irq+0x14/0x24 [c0000007fad93aa0] [c000000000017e8c] do_IRQ+0x9c/0x140 [c0000007fad93af0] [c000000000008b98] hardware_interrupt_common+0x138/0x140 Reported-by: Michael Ellerman Signed-off-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 33 +++++++++++++++++++-------------- drivers/scsi/ipr.h | 2 ++ 2 files changed, 21 insertions(+), 14 deletions(-) commit 180efde0a3f43dbe533e4be203c2918793482d4e Author: Bodo Stroesser Date: Tue Aug 1 14:42:54 2017 +0200 scsi: st: fix blk_get_queue usage If blk_queue_get() in st_probe fails, disk->queue must not be set to SDp->request_queue, as that would result in put_disk() dropping a not taken reference. Thus, disk->queue should be set only after a successful blk_queue_get(). Fixes: 2b5bebccd282 ("st: Take additional queue ref in st_probe") Signed-off-by: Bodo Stroesser Acked-by: Shirish Pargaonkar Signed-off-by: Hannes Reinecke Reviewed-by: Ewan D. Milne Acked-by: Kai Mäkisara Signed-off-by: Martin K. Petersen drivers/scsi/st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be37aa4b993bd5d4191f76a7bd43be33f987b972 Author: Michael Hernandez Date: Mon Jul 31 14:45:10 2017 -0700 scsi: qla2xxx: Fix system crash while triggering FW dump This patch fixes system hang/crash while firmware dump is attempted with Block MQ enabled in qla2xxx driver. Fix is to remove check in fw dump template entries for existing request and response queues so that full buffer size is calculated during template size calculation. Following stack trace is seen during firmware dump capture process [ 694.390588] qla2xxx [0000:81:00.0]-5003:11: ISP System Error - mbx1=4b1fh mbx2=10h mbx3=2ah mbx7=0h. [ 694.402336] BUG: unable to handle kernel paging request at ffffc90008c7b000 [ 694.402372] IP: memcpy_erms+0x6/0x10 [ 694.402386] PGD 105f01a067 [ 694.402386] PUD 85f89c067 [ 694.402398] PMD 10490cb067 [ 694.402409] PTE 0 [ 694.402421] [ 694.402437] Oops: 0002 [#1] PREEMPT SMP [ 694.402452] Modules linked in: netconsole configfs qla2xxx scsi_transport_fc nvme_fc nvme_fabrics bnep bluetooth rfkill xt_tcpudp unix_diag xt_multiport ip6table_filter ip6_tables iptable_filter ip_tables x_tables af_packet iscsi_ibft iscsi_boot_sysfs xfs libcrc32c ipmi_ssif sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass igb crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel iTCO_wdt aes_x86_64 crypto_simd ptp iTCO_vendor_support glue_helper cryptd lpc_ich joydev i2c_i801 pcspkr ioatdma mei_me pps_core tpm_tis mei mfd_core acpi_power_meter tpm_tis_core ipmi_si ipmi_devintf tpm ipmi_msghandler shpchp wmi dca button acpi_pad btrfs xor uas usb_storage hid_generic usbhid raid6_pq crc32c_intel ast i2c_algo_bit drm_kms_helper syscopyarea sysfillrect [ 694.402692] sysimgblt fb_sys_fops xhci_pci ttm ehci_pci sr_mod xhci_hcd cdrom ehci_hcd drm usbcore sg [ 694.402730] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-1-default+ #19 [ 694.402753] Hardware name: Supermicro X10DRi/X10DRi, BIOS 1.1a 10/16/2015 [ 694.402776] task: ffffffff81c0e4c0 task.stack: ffffffff81c00000 [ 694.402798] RIP: 0010:memcpy_erms+0x6/0x10 [ 694.402813] RSP: 0018:ffff88085fc03cd0 EFLAGS: 00210006 [ 694.402832] RAX: ffffc90008c7ae0c RBX: 0000000000000004 RCX: 000000000001fe0c [ 694.402856] RDX: 0000000000020000 RSI: ffff8810332c01f4 RDI: ffffc90008c7b000 [ 694.402879] RBP: ffff88085fc03d18 R08: 0000000000020000 R09: 0000000000279e0a [ 694.402903] R10: 0000000000000000 R11: f000000000000000 R12: ffff88085fc03d80 [ 694.402927] R13: ffffc90008a01000 R14: ffffc90008a056d4 R15: ffff881052ef17e0 [ 694.402951] FS: 0000000000000000(0000) GS:ffff88085fc00000(0000) knlGS:0000000000000000 [ 694.402977] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 694.403012] CR2: ffffc90008c7b000 CR3: 0000000001c09000 CR4: 00000000001406f0 [ 694.403036] Call Trace: [ 694.403047] [ 694.403072] ? qla27xx_fwdt_entry_t263+0x18e/0x380 [qla2xxx] [ 694.403099] qla27xx_walk_template+0x9d/0x1a0 [qla2xxx] [ 694.403124] qla27xx_fwdump+0x1f3/0x272 [qla2xxx] [ 694.403149] qla2x00_async_event+0xb08/0x1a50 [qla2xxx] [ 694.403169] ? enqueue_task_fair+0xa2/0x9d0 Signed-off-by: Mike Hernandez Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_tmpl.c | 12 ------------ 1 file changed, 12 deletions(-) commit a9501d742127e613d744e29814e9532bacb147e8 Author: Song Liu Date: Thu Aug 3 10:03:17 2017 -0700 md/r5cache: fix io_unit handling in r5l_log_endio() In r5l_log_endio(), once log->io_list_lock is released, the io unit may be accessed (or even freed) by other threads. Current code doesn't handle the io_unit properly, which leads to potential race conditions. This patch solves this race condition by: 1. Add a pending_stripe count flush_payload. Multiple flush_payloads are counted as only one pending_stripe. Flag has_flush_payload is added to show whether the io unit has flush_payload; 2. In r5l_log_endio(), check flags has_null_flush and has_flush_payload with log->io_list_lock held. After the lock is released, this IO unit is only accessed when we know the pending_stripe counter cannot be zeroed by other threads. Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit b44886c54a999771060371c3a05d5fedfc7e2102 Author: Song Liu Date: Mon Jul 31 14:52:26 2017 -0700 md/r5cache: call mddev_lock/unlock() in r5c_journal_mode_set In r5c_journal_mode_set(), it is necessary to call mddev_lock() before accessing conf and conf->log. Otherwise, the conf->log may change (and become NULL). Shaohua: fix unlock in failure cases Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 81fe48e9aa00bdd509bd3c37a76d1132da6b9f09 Author: NeilBrown Date: Tue Aug 8 16:56:36 2017 +1000 md: fix test in md_write_start() md_write_start() needs to clear the in_sync flag is it is set, or if there might be a race with set_in_sync() such that the later will set it very soon. In the later case it is sufficient to take the spinlock to synchronize with set_in_sync(), and then set the flag if needed. The current test is incorrect. It should be: if "flag is set" or "race is possible" "flag is set" is trivially "mddev->in_sync". "race is possible" should be tested by "mddev->sync_checkers". If sync_checkers is 0, then there can be no race. set_in_sync() will wait in percpu_ref_switch_to_atomic_sync() for an RCU grace period, and as md_write_start() holds the rcu_read_lock(), set_in_sync() will be sure ot see the update to writes_pending. If sync_checkers is > 0, there could be race. If md_write_start() happened entirely between if (!mddev->in_sync && percpu_ref_is_zero(&mddev->writes_pending)) { and mddev->in_sync = 1; in set_in_sync(), then it would not see that is_sync had been set, and set_in_sync() would not see that writes_pending had been incremented. This bug means that in_sync is sometimes not set when it should be. Consequently there is a small chance that the array will be marked as "clean" when in fact it is inconsistent. Fixes: 4ad23a976413 ("MD: use per-cpu counter for writes_pending") cc: stable@vger.kernel.org (v4.12+) Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33182d15c6bf182f7ae32a66ea4a547d979cd6d7 Author: NeilBrown Date: Tue Aug 8 16:56:36 2017 +1000 md: always clear ->safemode when md_check_recovery gets the mddev lock. If ->safemode == 1, md_check_recovery() will try to get the mddev lock and perform various other checks. If mddev->in_sync is zero, it will call set_in_sync, and clear ->safemode. However if mddev->in_sync is not zero, ->safemode will not be cleared. When md_check_recovery() drops the mddev lock, the thread is woken up again. Normally it would just check if there was anything else to do, find nothing, and go to sleep. However as ->safemode was not cleared, it will take the mddev lock again, then wake itself up when unlocking. This results in an infinite loop, repeatedly calling md_check_recovery(), which RCU or the soft-lockup detector will eventually complain about. Prior to commit 4ad23a976413 ("MD: use per-cpu counter for writes_pending"), safemode would only be set to one when the writes_pending counter reached zero, and would be cleared again when writes_pending is incremented. Since that patch, safemode is set more freely, but is not reliably cleared. So in md_check_recovery() clear ->safemode before checking ->in_sync. Fixes: 4ad23a976413 ("MD: use per-cpu counter for writes_pending") Cc: stable@vger.kernel.org (4.12+) Reported-by: Dominik Brodowski Reported-by: David R Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 3 +++ 1 file changed, 3 insertions(+) commit d6f756e09f01ea7a0efbbcef269a1e384a35d824 Author: Wladimir J. van der Laan Date: Tue Jul 25 14:33:36 2017 +0200 drm/etnaviv: Fix off-by-one error in reloc checking A relocation pointing to the last four bytes of a buffer can legitimately happen in the case of small vertex buffers. CC: stable@vger.kernel.org #4.9+ Signed-off-by: Wladimir J. van der Laan Reviewed-by: Philipp Zabel Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5fc9484f5e41b239d1e7a123219e53f333e43ba5 Author: Paul Burton Date: Mon Aug 7 16:16:47 2017 -0700 MIPS: Set ISA bit in entry-y for microMIPS kernels When building a kernel for the microMIPS ISA, ensure that the ISA bit (ie. bit 0) in the entry address is set. Otherwise we may include an entry address in images which bootloaders will jump to as MIPS32 code. I originally tried using "objdump -f" to obtain the entry address, which works for microMIPS but it always outputs a 32 bit address for a 32 bit ELF whilst nm will sign extend to 64 bit. That matters for systems where we might want to run a MIPS32 kernel on a MIPS64 CPU & load it with a MIPS64 bootloader, which would then jump to a non-canonical (non-sign-extended) address. This works in all cases as it only changes the behaviour for microMIPS kernels, but isn't the prettiest solution. A possible alternative would be to write a custom tool to just extract, sign extend & print the entry point of an ELF executable. I'm open to feedback if that would be preferred. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16950/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 527f10285bc3f700407bf3aab0ea7b3b9f9338da Author: Paul Burton Date: Mon Aug 7 16:18:04 2017 -0700 MIPS: Prevent building MT support for microMIPS kernels We don't currently support the MT ASE for microMIPS kernels, and there are no CPUs currently in existence that use both. They can however both be enabled in Kconfig, resulting in build failures such as: AS arch/mips/kernel/cps-vec.o arch/mips/kernel/cps-vec.S: Assembler messages: arch/mips/kernel/cps-vec.S:242: Warning: the 32-bit microMIPS architecture does not support the `mt' extension arch/mips/kernel/cps-vec.S:276: Error: unrecognized opcode `mttc0 $13,$2,2' arch/mips/kernel/cps-vec.S:282: Error: unrecognized opcode `mttc0 $8,$1,2' arch/mips/kernel/cps-vec.S:285: Error: unrecognized opcode `mttc0 $0,$2,1' ... Fix this by preventing MT from being enabled when targeting microMIPS. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16951/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 785a12afdb4a52903447fd890633c82fdda4b6f7 Author: Gautham R. Shenoy Date: Tue Aug 8 14:13:15 2017 +0530 powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails Currently, we use the opal call opal_slw_set_reg() to inform the Sleep-Winkle Engine (SLW) to restore the contents of some of the Hypervisor state on wakeup from deep idle states that lose full hypervisor context (characterized by the flag OPAL_PM_LOSE_FULL_CONTEXT). However, the current code has a bug in that if opal_slw_set_reg() fails, we don't disable the use of these deep states (winkle on POWER8, stop4 onwards on POWER9). This patch fixes this bug by ensuring that if programing the sleep-winkle engine to restore the hypervisor states in pnv_save_sprs_for_deep_states() fails, then we exclude such states by clearing the OPAL_PM_LOSE_FULL_CONTEXT flag from supported_cpuidle_states. As a result POWER8 will be prevented from using winkle for CPU-Hotplug, and POWER9 will put the offlined CPUs to the default stop state when available. Further, we ensure in the initialization of the cpuidle-powernv driver to only include those states whose flags are present in supported_cpuidle_states, thereby skipping OPAL_PM_LOSE_FULL_CONTEXT states when they have been disabled due to stop-api failure. Fixes: 1e1601b38e6 ("powerpc/powernv/idle: Restore SPRs for deep idle states via stop API.") Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 41 ++++++++++++++++++++++++++++++++--- drivers/cpuidle/cpuidle-powernv.c | 10 +++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) commit ac2b21157a3104ad2daa21c65e6cc73604edba0b Author: Kishon Vijay Abraham I Date: Tue Aug 8 10:48:15 2017 +0530 mmc: host: omap_hsmmc: Add CMD23 capability to omap_hsmmc driver omap_hsmmc driver always relied on CMD12 to stop transmission. However if CMD12 is not issued at the correct timing, the card will indicate a out of range error. With certain cards in some of the DRA7 based boards, -EIO error is observed. By Adding CMD23 capability, the MMC core will send MMC_SET_BLOCK_COUNT command before MMC_READ_MULTIPLE_BLOCK/MMC_WRITE_MULTIPLE_BLOCK commands. commit a04e6bae9e6f12 ("mmc: core: check also R1 response for stop commands") exposed this bug in omap_hsmmc driver. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 623ce3456671ea842c0ebda79c38655c8c04af74 Merge: d16b9d2 bc652eb Author: Linus Torvalds Date: Mon Aug 7 18:58:10 2017 -0700 Merge tag 'xtensa-20170807' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fixes from Max Filippov: - use asm-generic instances of asm/param.h and asm/device.h instead of exact copies in arch/xtensa/include/asm; - fix build error for xtensa cores with aliasing WT cache: define cache flushing functions and copy_{to,from}_user_page; - add missing EXPORT_SYMBOLs for clear_user_highpage, copy_user_highpage, flush_dcache_page, local_flush_cache_range, local_flush_cache_page, csum_partial and csum_partial_copy_generic. * tag 'xtensa-20170807' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: mm/cache: add missing EXPORT_SYMBOLs xtensa: don't limit csum_partial export by CONFIG_NET xtensa: fix cache aliasing handling code for WT cache xtensa: remove wrapper header for asm/param.h xtensa: remove wrapper header for asm/device.h commit d16b9d223bf98b739ea6e72d6fedbe8d432777e7 Merge: 1742c0f 3398367 Author: Linus Torvalds Date: Mon Aug 7 18:40:18 2017 -0700 Merge tag 'for-linus-20170807' of git://git.infradead.org/linux-mtd Pull MTD fixes from Brian Norris: "I missed getting these out for rc4, but here are some MTD fixes. Just NAND fixes (in both the core handling, and a few drivers). Notes stolen from Boris: Core fixes: - fix data interface setup for ONFI NANDs that do not support the SET FEATURES command - fix a kernel doc header - fix potential integer overflow when retrieving timing information from the parameter page - fix wrong OOB layout for small page NANDs Driver fixes: - fix potential division-by-zero bug - fix backward compat with old atmel-nand DT bindings - fix ->setup_data_interface() in the atmel NAND driver" * tag 'for-linus-20170807' of git://git.infradead.org/linux-mtd: mtd: nand: atmel: Fix EDO mode check mtd: nand: Declare tBERS, tR and tPROG as u64 to avoid integer overflow mtd: nand: Fix timing setup for NANDs that do not support SET FEATURES mtd: nand: Fix a docs build warning mtd: nand: sunxi: fix potential divide-by-zero error nand: fix wrong default oob layout for small pages using soft ecc mtd: nand: atmel: Fix DT backward compatibility in pmecc.c commit 1742c0f0554ec9a463f859a63ef0a7ba0a45310a Merge: aae4e7a 56bdf85 Author: Linus Torvalds Date: Mon Aug 7 18:16:22 2017 -0700 Merge tag 'xfs-4.13-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "I have a couple more bug fixes for you today: - fix memory leak when issuing discard - fix propagation of the dax inode flag" * tag 'xfs-4.13-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: Fix per-inode DAX flag inheritance xfs: Fix leak of discard bio commit 735302665c353d6756e7fa2a2cf41b039299f732 Author: Matt Redfearn Date: Wed Jul 26 08:41:09 2017 +0100 MIPS: PCI: Fix smp_processor_id() in preemptible Commit 1c3c5eab1715 ("sched/core: Enable might_sleep() and smp_processor_id() checks early") enables checks for might_sleep() and smp_processor_id() being used in preemptible code earlier in the boot than before. This results in a new BUG from pcibios_set_cache_line_size(). BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 caller is pcibios_set_cache_line_size+0x10/0x70 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc1-00007-g3ce3e4ba4275 #615 Stack: 0000000000000000 ffffffff81189694 0000000000000000 ffffffff81822318 000000000000004e 0000000000000001 800000000e20bd08 20c49ba5e3540000 0000000000000000 0000000000000000 ffffffff818d0000 0000000000000000 0000000000000000 ffffffff81189328 ffffffff818ce692 0000000000000000 0000000000000000 ffffffff81189bc8 ffffffff818d0000 0000000000000000 ffffffff81828907 ffffffff81769970 800000020ec78d80 ffffffff818c7b48 0000000000000001 0000000000000001 ffffffff818652b0 ffffffff81896268 ffffffff818c0000 800000020ec7fb40 800000020ec7fc58 ffffffff81684cac 0000000000000000 ffffffff8118ab50 0000000000000030 ffffffff81769970 0000000000000001 ffffffff81122a58 0000000000000000 0000000000000000 ... Call Trace: [] show_stack+0x90/0xb0 [] dump_stack+0xac/0xf0 [] check_preemption_disabled+0x120/0x128 [] pcibios_set_cache_line_size+0x10/0x70 [] do_one_initcall+0x48/0x140 [] kernel_init_freeable+0x194/0x24c [] kernel_init+0x14/0x118 [] ret_from_kernel_thread+0x14/0x1c Fix this by using the cpu_*cache_line_size() macros instead. These macros are the "proper" way to determine the CPU cache sizes. This makes use of the newly added cpu_tcache_line_size. Fixes: 1c3c5eab1715 ("sched/core: Enable might_sleep() and smp_processor_id() checks early") Signed-off-by: Matt Redfearn Suggested-by: James Hogan Reviewed-by: James Hogan Signed-off-by: Ralf Baechle arch/mips/pci/pci.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 21da5332327b6d183bd93336ecf29c70bc609b7b Author: Matt Redfearn Date: Wed Jul 26 08:41:08 2017 +0100 MIPS: Introduce cpu_tcache_line_size There exist macros to return the cache line size of the L1 dcache and L2 scache but there is currently no macro for the L3 tcache. Add this macro which will be used by the following patch "MIPS: PCI: Fix smp_processor_id() in preemptible" Signed-off-by: Matt Redfearn Cc: Maciej W. Rozycki Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16871/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-features.h | 3 +++ 1 file changed, 3 insertions(+) commit eb2a6b800c2d1336cce6709d48c42753a611c07b Author: Christophe Jaillet Date: Mon Aug 7 00:00:17 2017 +0200 qed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()' We allocate 'p_info->mfw_mb_cur' and 'p_info->mfw_mb_shadow' but we check 'p_info->mfw_mb_addr' instead of 'p_info->mfw_mb_cur'. 'p_info->mfw_mb_addr' is never 0, because it is initiliazed a few lines above in 'qed_load_mcp_offsets()'. Update the test and check the result of the 2 'kzalloc()' instead. Signed-off-by: Christophe JAILLET Acked-by: Tomer Tayar Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b0949d407431559f7c80a02f5382f5e1c77b8d1 Author: Luis R. Rodriguez Date: Thu Aug 3 09:57:13 2017 -0700 test_sysctl: fix sysctl.sh by making it executable We had just forogtten to do this. Without this the following test fails: $ sudo make -C tools/testing/selftests/sysctl/ run_tests make: Entering directory '/home/mcgrof/linux-next/tools/testing/selftests/sysctl' /bin/sh: ./sysctl.sh: Permission denied selftests: sysctl.sh [FAIL] /home/mcgrof/linux-next/tools/testing/selftests/sysctl make: Leaving directory '/home/mcgrof/linux-next/tools/testing/selftests/sysctl' Fixes: 64b671204afd71 ("test_sysctl: add generic script to expand on tests") Signed-off-by: Luis R. Rodriguez Signed-off-by: Shuah Khan tools/testing/selftests/sysctl/sysctl.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 0a9c40cea70d3f2dfa401bc259b318cd9aec8613 Author: Luis R. Rodriguez Date: Thu Aug 3 09:57:12 2017 -0700 test_kmod: fix kmod.sh by making it executable We had just forgotten to do this. Without this if we run the following we get a permission denied: sudo make -C tools/testing/selftests/kmod/ run_tests make: Entering directory '/home/mcgrof/linux-next/tools/testing/selftests/kmod' /bin/sh: ./kmod.sh: Permission denied selftests: kmod.sh [FAIL] /home/mcgrof/linux-next/tools/testing/selftests/kmod make: Leaving directory '/home/mcgrof/linux-next/tools/testing/selftests/kmod Fixes: 39258f448d71 ("kmod: add test driver to stress test the module loader") Signed-off-by: Luis R. Rodriguez Signed-off-by: Shuah Khan tools/testing/selftests/kmod/kmod.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit b925ef37b0a152b0c06aa43bc9204d0116f676d7 Author: Anton Volkov Date: Mon Aug 7 15:54:14 2017 +0300 hysdn: fix to a race condition in put_log_buffer The synchronization type that was used earlier to guard the loop that deletes unused log buffers may lead to a situation that prevents any thread from going through the loop. The patch deletes previously used synchronization mechanism and moves the loop under the spin_lock so the similar cases won't be feasible in the future. Found by by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Volkov Signed-off-by: David S. Miller drivers/isdn/hysdn/hysdn_proclog.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit ec2c6726322f0d270bab477e4904bf9496f70ee5 Author: Julian Wiedmann Date: Mon Aug 7 13:28:39 2017 +0200 s390/qeth: fix L3 next-hop in xmit qeth hdr On L3, the qeth_hdr struct needs to be filled with the next-hop IP address. The current code accesses rtable->rt_gateway without checking that rtable is a valid address. The accidental access to a lowcore area results in a random next-hop address in the qeth_hdr. rtable (or more precisely, skb_dst(skb)) can be NULL in rare cases (for instance together with AF_PACKET sockets). This patch adds the missing NULL-ptr checks. Signed-off-by: Julian Wiedmann Signed-off-by: Ursula Braun Fixes: 87e7597b5a3 qeth: Move away from using neighbour entries in qeth_l3_fill_header() Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48107c4e596c8523d46c7b04f92cf29e7569a01e Merge: 5db465f 5dc78ad Author: Doug Ledford Date: Mon Aug 7 13:30:40 2017 -0400 Merge tag 'rdma-rc-2017-07-26' of git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma into leon-ipoib IPoIB fixes for 4.13 The patchset provides various fixes for IPoIB. It is combination of fixes to various issues discovered during verification along with static checkers cleanup patches. Most of the patches are from pre-git era and hence lack of Fixes lines. There is one exception in this IPoIB group - addition of patch revert: Revert "IB/core: Allow QP state transition from reset to error", but it followed by proper fix to the annoying print, so I thought it is appropriate to include it. Signed-off-by: Doug Ledford commit c0e0fb837909f22b93fbb05e365be215a9e75d10 Merge: f9ea322 d0c8f33 Author: David S. Miller Date: Mon Aug 7 10:10:19 2017 -0700 Merge branch 'asix-Improve-robustness' Dean Jenkins says: ==================== asix: Improve robustness Please consider taking these patches to improve the robustness of the ASIX USB to Ethernet driver. Failures prompting an ASIX driver code review ============================================= On an ARM i.MX6 embedded platform some strange one-off and two-off failures were observed in and around the ASIX USB to Ethernet driver. This was observed on a highly modified kernel 3.14 with the ASIX driver containing back-ported changes from kernel.org up to kernel 4.8 approximately. a) A one-off failure in asix_rx_fixup_internal(): There was an occurrence of an attempt to write off the end of the netdev buffer which was trapped by skb_over_panic() in skb_put(). [20030.846440] skbuff: skb_over_panic: text:7f2271c0 len:120 put:60 head:8366ecc0 data:8366ed02 tail:0x8366ed7a end:0x8366ed40 dev:eth0 [20030.863007] Kernel BUG at 8044ce38 [verbose debug info unavailable] [20031.215345] Backtrace: [20031.217884] [<8044cde0>] (skb_panic) from [<8044d50c>] (skb_put+0x50/0x5c) [20031.227408] [<8044d4bc>] (skb_put) from [<7f2271c0>] (asix_rx_fixup_internal+0x1c4/0x23c [asix]) [20031.242024] [<7f226ffc>] (asix_rx_fixup_internal [asix]) from [<7f22724c>] (asix_rx_fixup_common+0x14/0x18 [asix]) [20031.260309] [<7f227238>] (asix_rx_fixup_common [asix]) from [<7f21f7d4>] (usbnet_bh+0x74/0x224 [usbnet]) [20031.269879] [<7f21f760>] (usbnet_bh [usbnet]) from [<8002f834>] (call_timer_fn+0xa4/0x1f0) [20031.283961] [<8002f790>] (call_timer_fn) from [<80030834>] (run_timer_softirq+0x230/0x2a8) [20031.302782] [<80030604>] (run_timer_softirq) from [<80028780>] (__do_softirq+0x15c/0x37c) [20031.321511] [<80028624>] (__do_softirq) from [<80028c38>] (irq_exit+0x8c/0xe8) [20031.339298] [<80028bac>] (irq_exit) from [<8000e9c8>] (handle_IRQ+0x8c/0xc8) [20031.350038] [<8000e93c>] (handle_IRQ) from [<800085c8>] (gic_handle_irq+0xb8/0xf8) [20031.365528] [<80008510>] (gic_handle_irq) from [<8050de80>] (__irq_svc+0x40/0x70) Analysis of the logic of the ASIX driver (containing backported changes from kernel.org up to kernel 4.8 approximately) suggested that the software could not trigger skb_over_panic(). The analysis of the kernel BUG() crash information suggested that the netdev buffer was written with 2 minimal 60 octet length Ethernet frames (ASIX hardware drops the 4 octet FCS field) and the 2nd Ethernet frame attempted to write off the end of the netdev buffer. Note that the netdev buffer should only contain 1 Ethernet frame so if an attempt to write 2 Ethernet frames into the buffer is made then that is wrong. However, the logic of the asix_rx_fixup_internal() only allows 1 Ethernet frame to be written into the netdev buffer. Potentially this failure was due to memory corruption because it was only seen once. b) Two-off failures in the NAPI layer's backlog queue: There were 2 crashes in the NAPI layer's backlog queue presumably after asix_rx_fixup_internal() called usbnet_skb_return(). [24097.273945] Unable to handle kernel NULL pointer dereference at virtual address 00000004 [24097.398944] PC is at process_backlog+0x80/0x16c [24097.569466] Backtrace: [24097.572007] [<8045ad98>] (process_backlog) from [<8045b64c>] (net_rx_action+0xcc/0x248) [24097.591631] [<8045b580>] (net_rx_action) from [<80028780>] (__do_softirq+0x15c/0x37c) [24097.610022] [<80028624>] (__do_softirq) from [<800289cc>] (run_ksoftirqd+0x2c/0x84) and [ 1059.828452] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 1059.953715] PC is at process_backlog+0x84/0x16c [ 1060.140896] Backtrace: [ 1060.143434] [<8045ad98>] (process_backlog) from [<8045b64c>] (net_rx_action+0xcc/0x248) [ 1060.163075] [<8045b580>] (net_rx_action) from [<80028780>] (__do_softirq+0x15c/0x37c) [ 1060.181474] [<80028624>] (__do_softirq) from [<80028c38>] (irq_exit+0x8c/0xe8) [ 1060.199256] [<80028bac>] (irq_exit) from [<8000e9c8>] (handle_IRQ+0x8c/0xc8) [ 1060.210006] [<8000e93c>] (handle_IRQ) from [<800085c8>] (gic_handle_irq+0xb8/0xf8) [ 1060.225492] [<80008510>] (gic_handle_irq) from [<8050de80>] (__irq_svc+0x40/0x70) The embedded board was only using an ASIX USB to Ethernet adaptor eth0. Analysis suggested that the doubly-linked list pointers of the backlog queue had been corrupted because one of the link pointers was NULL. Potentially this failure was due to memory corruption because it was only seen twice. Results of the ASIX driver code review ====================================== During the code review some weaknesses were observed in the ASIX driver and the following patches have been created to improve the robustness. Brief overview of the patches ----------------------------- 1. asix: Add rx->ax_skb = NULL after usbnet_skb_return() The current ASIX driver sends the received Ethernet frame to the NAPI layer of the network stack via the call to usbnet_skb_return() in asix_rx_fixup_internal() but retains the rx->ax_skb pointer to the netdev buffer. The driver no longer needs the rx->ax_skb pointer at this point because the NAPI layer now has the Ethernet frame. This means that asix_rx_fixup_internal() must not use rx->ax_skb after the call to usbnet_skb_return() because it could corrupt the handling of the Ethernet frame within the network layer. Therefore, to remove the risk of erroneous usage of rx->ax_skb, set rx->ax_skb to NULL after the call to usbnet_skb_return(). This avoids potential erroneous freeing of rx->ax_skb and erroneous writing to the netdev buffer. If the software now somehow inappropriately reused rx->ax_skb, then a NULL pointer dereference of rx->ax_skb would occur which makes investigation easier. 2. asix: Ensure asix_rx_fixup_info members are all reset This patch creates reset_asix_rx_fixup_info() to allow all the asix_rx_fixup_info structure members to be consistently reset to initial conditions. Call reset_asix_rx_fixup_info() upon each detectable error condition so that the next URB is processed from a known state. Otherwise, there is a risk that some members of the asix_rx_fixup_info structure may be incorrect after an error occurred so potentially leading to a malfunction. 3. asix: Fix small memory leak in ax88772_unbind() This patch creates asix_rx_fixup_common_free() to allow the rx->ax_skb to be freed when necessary. asix_rx_fixup_common_free() is called from ax88772_unbind() before the parent private data structure is freed. Without this patch, there is a risk of a small netdev buffer memory leak each time ax88772_unbind() is called during the reception of an Ethernet frame that spans across 2 URBs. Testing ======= The patches have been sanity tested on a 64-bit Linux laptop running kernel 4.13-rc2 with the 3 patches applied on top. The ASIX USB to Adaptor used for testing was (output of lsusb): ID 0b95:772b ASIX Electronics Corp. AX88772B Test #1 ------- The test ran a flood ping test script which slowly incremented the ICMP Echo Request's payload from 0 to 5000 octets. This eventually causes IPv4 fragmentation to occur which causes Ethernet frames to be sent very close to each other so increases the probability that an Ethernet frame will span 2 URBs. The test showed that all pings were successful. The test took about 15 minutes to complete. Test #2 ------- A script was run on the laptop to periodically run ifdown and ifup every second so that the ASIX USB to Adaptor was up for 1 second and down for 1 second. From a Linux PC connected to the laptop, the following ping command was used ping -f -s 5000 The large ICMP payload causes IPv4 fragmentation resulting in multiple Ethernet frames per original IP packet. Kernel debug within the ASIX driver was enabled to see whether any ASIX errors were generated. The test was run for about 24 hours and no ASIX errors were seen. Patches ======= The 3 patches have been rebased off the net-next repo master branch with HEAD fbbeefd net: fec: Allow reception of frames bigger than 1522 bytes ==================== Signed-off-by: David S. Miller commit d0c8f338ab41438bdf8472cb4209d4ab54d439d5 Author: Dean Jenkins Date: Mon Aug 7 09:50:16 2017 +0100 asix: Fix small memory leak in ax88772_unbind() When Ethernet frames span mulitple URBs, the netdev buffer memory pointed to by the asix_rx_fixup_info structure remains allocated during the time gap between the 2 executions of asix_rx_fixup_internal(). This means that if ax88772_unbind() is called within this time gap to free the memory of the parent private data structure then a memory leak of the part filled netdev buffer memory will occur. Therefore, create a new function asix_rx_fixup_common_free() to free the memory of the netdev buffer and add a call to asix_rx_fixup_common_free() from inside ax88772_unbind(). Consequently when an unbind occurs part way through receiving an Ethernet frame, the netdev buffer memory that is holding part of the received Ethernet frame will now be freed. Signed-off-by: Dean Jenkins Signed-off-by: David S. Miller drivers/net/usb/asix.h | 1 + drivers/net/usb/asix_common.c | 15 +++++++++++++++ drivers/net/usb/asix_devices.c | 1 + 3 files changed, 17 insertions(+) commit 960eb4eeaa47a3a5061a4e47e28411e85840ab2c Author: Dean Jenkins Date: Mon Aug 7 09:50:15 2017 +0100 asix: Ensure asix_rx_fixup_info members are all reset There is a risk that the members of the structure asix_rx_fixup_info become unsynchronised leading to the possibility of a malfunction. For example, rx->split_head was not being set to false after an error was detected so potentially could cause a malformed 32-bit Data header word to be formed. Therefore add function reset_asix_rx_fixup_info() to reset all the members of asix_rx_fixup_info so that future processing will start with known initial conditions. Also, if (skb->len != offset) becomes true then call reset_asix_rx_fixup_info() so that the processing of the next URB starts with known initial conditions. Without the call, the check does nothing which potentially could lead to a malfunction when the next URB is processed. In addition, for robustness, call reset_asix_rx_fixup_info() before every error path's "return 0". This ensures that the next URB is processed from known initial conditions. Signed-off-by: Dean Jenkins Signed-off-by: David S. Miller drivers/net/usb/asix_common.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit 22889dbbd98a0e3390e9120074c39c6e5a3fea5e Author: Dean Jenkins Date: Mon Aug 7 09:50:14 2017 +0100 asix: Add rx->ax_skb = NULL after usbnet_skb_return() In asix_rx_fixup_internal() there is a risk that rx->ax_skb gets reused after passing the Ethernet frame into the network stack via usbnet_skb_return(). The risks include: a) asynchronously freeing rx->ax_skb after passing the netdev buffer to the NAPI layer which might corrupt the backlog queue. b) erroneously reusing rx->ax_skb such as calling skb_put_data() multiple times which causes writing off the end of the netdev buffer. Therefore add a defensive rx->ax_skb = NULL after usbnet_skb_return() so that it is not possible to free rx->ax_skb or to apply skb_put_data() too many times. Signed-off-by: Dean Jenkins Signed-off-by: David S. Miller drivers/net/usb/asix_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f9ea3225ddafa269cf1f6b495d132c26fde93903 Author: Thomas Richter Date: Mon Aug 7 10:16:36 2017 +0200 bpf: fix selftest/bpf/test_pkt_md_access on s390x Commit 18f3d6be6be1 ("selftests/bpf: Add test cases to test narrower ctx field loads") introduced new eBPF test cases. One of them (test_pkt_md_access.c) fails on s390x. The BPF verifier error message is: [root@s8360046 bpf]# ./test_progs test_pkt_access:PASS:ipv4 349 nsec test_pkt_access:PASS:ipv6 212 nsec [....] libbpf: load bpf program failed: Permission denied libbpf: -- BEGIN DUMP LOG --- libbpf: 0: (71) r2 = *(u8 *)(r1 +0) invalid bpf_context access off=0 size=1 libbpf: -- END LOG -- libbpf: failed to load program 'test1' libbpf: failed to load object './test_pkt_md_access.o' Summary: 29 PASSED, 1 FAILED [root@s8360046 bpf]# This is caused by a byte endianness issue. S390x is a big endian architecture. Pointer access to the lowest byte or halfword of a four byte value need to add an offset. On little endian architectures this offset is not needed. Fix this and use the same approach as the originator used for other files (for example test_verifier.c) in his original commit. With this fix the test program test_progs succeeds on s390x: [root@s8360046 bpf]# ./test_progs test_pkt_access:PASS:ipv4 236 nsec test_pkt_access:PASS:ipv6 217 nsec test_xdp:PASS:ipv4 3624 nsec test_xdp:PASS:ipv6 1722 nsec test_l4lb:PASS:ipv4 926 nsec test_l4lb:PASS:ipv6 1322 nsec test_tcp_estats:PASS: 0 nsec test_bpf_obj_id:PASS:get-fd-by-notexist-prog-id 0 nsec test_bpf_obj_id:PASS:get-fd-by-notexist-map-id 0 nsec test_bpf_obj_id:PASS:get-prog-info(fd) 0 nsec test_bpf_obj_id:PASS:get-map-info(fd) 0 nsec test_bpf_obj_id:PASS:get-prog-info(fd) 0 nsec test_bpf_obj_id:PASS:get-map-info(fd) 0 nsec test_bpf_obj_id:PASS:get-prog-fd(next_id) 0 nsec test_bpf_obj_id:PASS:get-prog-info(next_id->fd) 0 nsec test_bpf_obj_id:PASS:get-prog-fd(next_id) 0 nsec test_bpf_obj_id:PASS:get-prog-info(next_id->fd) 0 nsec test_bpf_obj_id:PASS:check total prog id found by get_next_id 0 nsec test_bpf_obj_id:PASS:get-map-fd(next_id) 0 nsec test_bpf_obj_id:PASS:get-map-fd(next_id) 0 nsec test_bpf_obj_id:PASS:get-map-fd(next_id) 0 nsec test_bpf_obj_id:PASS:get-map-fd(next_id) 0 nsec test_bpf_obj_id:PASS:get-map-fd(next_id) 0 nsec test_bpf_obj_id:PASS:get-map-fd(next_id) 0 nsec test_bpf_obj_id:PASS:get-map-fd(next_id) 0 nsec test_bpf_obj_id:PASS:check get-map-info(next_id->fd) 0 nsec test_bpf_obj_id:PASS:get-map-fd(next_id) 0 nsec test_bpf_obj_id:PASS:check get-map-info(next_id->fd) 0 nsec test_bpf_obj_id:PASS:check total map id found by get_next_id 0 nsec test_pkt_md_access:PASS: 277 nsec Summary: 30 PASSED, 0 FAILED [root@s8360046 bpf]# Fixes: 18f3d6be6be1 ("selftests/bpf: Add test cases to test narrower ctx field loads") Signed-off-by: Thomas Richter Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_pkt_md_access.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 41e327b586762833e48b3703d53312ac32f05f24 Author: zhangyi (F) Date: Mon Aug 7 21:35:05 2017 +0800 quota: correct space limit check Currently we compare total space (curspace + rsvspace) with space limit in quota-tools when setting grace time and also in check_bdq(), but we missing rsvspace in somewhere else, correct them. This patch also fix incorrect zero dqb_btime and grace time updating failure when we use rsvspace(e.g. ext4 dalloc feature). Signed-off-by: zhangyi (F) Signed-off-by: Jan Kara fs/quota/dquot.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 68fe55680d0f3342969f49412fceabb90bdfadba Author: Maciej W. Rozycki Date: Sun Jul 30 21:28:15 2017 +0100 MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression Fix a commit 3021773c7c3e ("MIPS: DEC: Avoid la pseudo-instruction in delay slots") regression and remove assembly errors: arch/mips/dec/int-handler.S: Assembler messages: arch/mips/dec/int-handler.S:162: Error: Macro used $at after ".set noat" arch/mips/dec/int-handler.S:163: Error: Macro used $at after ".set noat" arch/mips/dec/int-handler.S:229: Error: Macro used $at after ".set noat" arch/mips/dec/int-handler.S:230: Error: Macro used $at after ".set noat" triggering with with the CPU_DADDI_WORKAROUNDS option set and the DADDIU instruction. This is because with that option in place the instruction becomes a macro, which expands to an LI/DADDU (or actually ADDIU/DADDU) sequence that uses $at as a temporary register. With CPU_DADDI_WORKAROUNDS we only support `-msym32' compilation though, and this is already enforced in arch/mips/Makefile, so choose the 32-bit expansion variant for the supported configurations and then replace the 64-bit variant with #error just in case. Fixes: 3021773c7c3e ("MIPS: DEC: Avoid la pseudo-instruction in delay slots") Signed-off-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 4.8+ Patchwork: https://patchwork.linux-mips.org/patch/16893/ Signed-off-by: Ralf Baechle arch/mips/dec/int-handler.S | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) commit 0cca6c8920ade95e2741b2062cf1397dc546fb0f Author: Ludovic Desroches Date: Sun Aug 6 16:00:05 2017 +0200 pinctrl: generic: update references to Documentation/pinctrl.txt Update deprecated references to Documentation/pinctrl.txt since it has been moved to Documentation/driver-api/pinctl.rst. Signed-off-by: Ludovic Desroches Fixes: 5a9b73832e9e ("pinctrl.txt: move it to the driver-api book") Signed-off-by: Linus Walleij Documentation/gpio/gpio-legacy.txt | 2 +- MAINTAINERS | 2 +- include/linux/device.h | 2 +- include/linux/pinctrl/pinconf-generic.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 5d996132d921c391af5f267123eca1a6a3148ecd Author: Andy Shevchenko Date: Fri Aug 4 19:26:34 2017 +0300 pinctrl: intel: merrifield: Correct UART pin lists UART pin lists consist GPIO numbers which is simply wrong. Replace it by pin numbers. Fixes: 4e80c8f50574 ("pinctrl: intel: Add Intel Merrifield pin controller support") Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-merrifield.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c017d21147848fe017772764a77a7f32c5b017f9 Author: Florian Fainelli Date: Thu Jul 27 15:38:17 2017 -0700 irqchip: brcmstb-l2: Define an irq_pm_shutdown function The Broadcom STB platforms support S5 and we allow specific hardware wake-up events to take us out of this state. Because we were not defining an irq_pm_shutdown() function pointer, we would not be correctly masking non-wakeup events, which would result in spurious wake-ups from sources that were not explicitly configured for wake-up. Fixes: 7f646e92766e ("irqchip: brcmstb-l2: Add Broadcom Set Top Box Level-2 interrupt controller") Acked-by: Gregory Fong Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier drivers/irqchip/irq-brcmstb-l2.c | 1 + 1 file changed, 1 insertion(+) commit 6b67c3906cd74d88da4f6717b4b294bd52fce56a Author: Gregory CLEMENT Date: Tue Aug 1 17:57:20 2017 +0200 pinctrl: armada-37xx: Fix number of pin in south bridge On the south bridge we have pin from to 29, so it gives 30 pins (and not 29). Without this patch the kernel complain with the following traces: cat /sys/kernel/debug/pinctrl/d0018800.pinctrl/pingroups [ 154.530205] armada-37xx-pinctrl d0018800.pinctrl: failed to get pin(29) name [ 154.537567] ------------[ cut here ]------------ [ 154.542348] WARNING: CPU: 1 PID: 1347 at /home/gclement/open/kernel/marvell-mainline-linux/drivers/pinctrl/core.c:1610 pinctrl_groups_show+0x15c/0x1a0 [ 154.555918] Modules linked in: [ 154.558890] CPU: 1 PID: 1347 Comm: cat Tainted: G W 4.13.0-rc1-00001-g19e1b9fa219d #525 [ 154.568316] Hardware name: Marvell Armada 3720 Development Board DB-88F3720-DDR3 (DT) [ 154.576311] task: ffff80001d32d100 task.stack: ffff80001bdc0000 [ 154.583048] PC is at pinctrl_groups_show+0x15c/0x1a0 [ 154.587816] LR is at pinctrl_groups_show+0x148/0x1a0 [ 154.592847] pc : [] lr : [] pstate: 00000145 [ 154.600840] sp : ffff80001bdc3c80 [ 154.604255] x29: ffff80001bdc3c80 x28: 00000000f7750000 [ 154.609825] x27: ffff80001d05d198 x26: 0000000000000009 [ 154.615224] x25: ffff0000089ead20 x24: 0000000000000002 [ 154.620705] x23: ffff000008c8e1d0 x22: ffff80001be55700 [ 154.626187] x21: ffff80001d05d100 x20: 0000000000000005 [ 154.631667] x19: 0000000000000006 x18: 0000000000000010 [ 154.637238] x17: 0000000000000000 x16: ffff0000081fc4b8 [ 154.642726] x15: 0000000000000006 x14: ffff0000899e537f [ 154.648214] x13: ffff0000099e538d x12: 206f742064656c69 [ 154.653613] x11: 6166203a6c727463 x10: 0000000005f5e0ff [ 154.659094] x9 : ffff80001bdc38c0 x8 : 286e697020746567 [ 154.664576] x7 : ffff000008551870 x6 : 000000000000011b [ 154.670146] x5 : 0000000000000000 x4 : 0000000000000000 [ 154.675544] x3 : 0000000000000000 x2 : 0000000000000000 [ 154.681025] x1 : ffff000008c8e1d0 x0 : ffff80001be55700 [ 154.686507] Call trace: [ 154.688668] Exception stack(0xffff80001bdc3ab0 to 0xffff80001bdc3be0) [ 154.695224] 3aa0: 0000000000000006 0001000000000000 [ 154.703310] 3ac0: ffff80001bdc3c80 ffff0000083e3adc ffff80001bdc3bb0 00000000ffffffd8 [ 154.711304] 3ae0: 4554535953425553 6f6674616c703d4d 4349564544006d72 6674616c702b3d45 [ 154.719478] 3b00: 313030643a6d726f 6e69702e30303838 ffff80006c727463 ffff0000089635d8 [ 154.727562] 3b20: ffff80001d1ca0cb ffff000008af0fa4 ffff80001bdc3b40 ffff000008c8e1dc [ 154.735648] 3b40: ffff80001bdc3bc0 ffff000008223174 ffff80001be55700 ffff000008c8e1d0 [ 154.743731] 3b60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 154.752354] 3b80: 000000000000011b ffff000008551870 286e697020746567 ffff80001bdc38c0 [ 154.760446] 3ba0: 0000000005f5e0ff 6166203a6c727463 206f742064656c69 ffff0000099e538d [ 154.767910] 3bc0: ffff0000899e537f 0000000000000006 ffff0000081fc4b8 0000000000000000 [ 154.776085] [] pinctrl_groups_show+0x15c/0x1a0 [ 154.782823] [] seq_read+0x184/0x460 [ 154.787505] [] full_proxy_read+0x60/0xa8 [ 154.793431] [] __vfs_read+0x1c/0x110 [ 154.799001] [] vfs_read+0x84/0x140 [ 154.803860] [] SyS_read+0x44/0xa0 [ 154.808983] [] el0_svc_naked+0x24/0x28 [ 154.814459] ---[ end trace 4cbb00a92d616b95 ]--- Cc: stable@vger.kernel.org Fixes: 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx") Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ac6e7ccc11e795a6e3eecc1f59346a99e51cd07 Author: Gregory CLEMENT Date: Tue Aug 1 17:57:19 2017 +0200 pinctrl: armada-37xx: Fix the pin 23 on south bridge Pin 23 on South bridge does not belong to the rgmii group. It belongs to a separate group which can have 3 functions. Due to this the fix also have to update the way the functions are managed. Until now each groups used NB_FUNCS(which was 2) functions. For the mpp23, 3 functions are available but it is the only group which needs it, so on the loop involving NB_FUNCS an extra test was added to handle only the functions added. The bug was visible with the merge of the commit 07d065abf93d "arm64: dts: marvell: armada-3720-db: Add vqmmc regulator for SD slot", the gpio regulator used the gpio 23, due to this the whole rgmii group was setup to gpio which broke the Ethernet support on the Armada 3720 DB board. Thanks to this patch, the UHS SD cards (which need the vqmmc) _and_ the Ethernet work again. Cc: stable@vger.kernel.org Fixes: 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx") Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit b399ee28c29c07f6a7ad87dade9148828757e6e9 Author: Goran Ferenc Date: Thu Jul 27 18:08:47 2017 +0200 MIPS: VDSO: Fix clobber lists in fallback code paths Extend clobber lists to include all GP registers. Fixes: 0b523a85e134 ("MIPS: VDSO: Add implementation of gettimeofday() fallback") Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: James Hogan Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16879/ Signed-off-by: Ralf Baechle arch/mips/vdso/gettimeofday.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 44a12806d010944a5727f1dc99123121e3e2c8c6 Author: Michael Ellerman Date: Mon Aug 7 21:25:01 2017 +1000 Revert "powerpc/64: Avoid restore_math call if possible in syscall exit" This reverts commit bc4f65e4cf9d6cc43e0e9ba0b8648cf9201cd55f. As reported by Andreas, this commit is causing unrecoverable SLB misses in the system call exit path: Unrecoverable exception 4100 at c00000000000a1ec Oops: Unrecoverable exception, sig: 6 [#1] SMP NR_CPUS=2 PowerMac ... CPU: 0 PID: 18626 Comm: rm Not tainted 4.13.0-rc3 #1 task: c00000018335e080 task.stack: c000000139e50000 NIP: c00000000000a1ec LR: c00000000000a118 CTR: 0000000000000000 REGS: c000000139e53bb0 TRAP: 4100 Not tainted (4.13.0-rc3) MSR: 9000000000001030 CR: 24000044 XER: 20000000 SOFTE: 1 GPR00: 0000000000000000 c000000139e53e30 c000000000abb500 fffffffffffffffe GPR04: c0000001eb866298 0000000000000000 0000000000000000 c00000018335e080 GPR08: 900000000000d032 0000000000000000 0000000000000002 fffffffffffff001 GPR12: c000000139e50000 c00000000ffff000 00003fffa8c0dca0 00003fffa8c0dc88 GPR16: 0000000010000000 0000000000000001 00003fffa8c0eaa0 0000000000000000 GPR20: 00003fffa8c27528 00003fffa8c27b00 0000000000000000 0000000000000000 GPR24: 00003fffa8c0d918 00003ffff1b3efa0 00003fffa8c26d68 0000000000000000 GPR28: 00003fffa8c249e8 00003fffa8c263d0 00003fffa8c27550 00003ffff1b3ef10 NIP [c00000000000a1ec] system_call_exit+0xc0/0x21c LR [c00000000000a118] system_call+0x58/0x6c Call Trace: [c000000139e53e30] [c00000000000a118] system_call+0x58/0x6c (unreliable) Instruction dump: 64a51000 7c6300d0 f8a101a0 4bffff9c 3c000000 60000006 780007c6 64000000 60000000 7c004039 4082001c e8ed0170 <88070b78> 88c70b79 7c003214 2c200000 This is caused by us trying to load THREAD_LOAD_FP with MSR_RI=0, and taking an SLB miss on the thread struct. Reported-by: Andreas Schwab Diagnosed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 60 +++++++++++++----------------------------- arch/powerpc/kernel/process.c | 4 --- 2 files changed, 18 insertions(+), 46 deletions(-) commit 1e2ba788787c86f527eca6ffd9adb97d691a810e Author: Jani Nikula Date: Wed May 31 11:33:55 2017 +0300 drm/i915: fix backlight invert for non-zero minimum brightness When we started following the backlight minimum brightness in 6dda730e55f4 ("drm/i915: respect the VBT minimum backlight brightness") we overlooked the brightness invert quirk. Even if we invert the brightness, we need to take the min limit into account. We probably missed this because the invert has only been required on gen4 for proper operation. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101127 Fixes: 6dda730e55f4 ("drm/i915: respect the VBT minimum backlight brightness") Cc: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170531083355.7898-1-jani.nikula@intel.com (cherry picked from commit e9d7486eac949f2a8d121657e536c8abdd4ea088) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd82f37a9ddaaafb33d8bc3f44857edbad5d52bf Author: Chris Wilson Date: Fri Aug 4 11:41:35 2017 +0100 drm/i915/shrinker: Wrap need_resched() inside preempt-disable In order for us to successfully detect the end of a timeslice, preemption must be disabled. Otherwise, inside the loop we may be preempted many times without our noticing, and each time our timeslice will be reset, invalidating need_resched() Reported-by: Joonas Lahtinen Reported-by: Tomi Sarvela Fixes: 290271de34f6 ("drm/i915: Spin for struct_mutex inside shrinker") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: # v4.13-rc1+ Link: https://patchwork.freedesktop.org/patch/msgid/20170804104135.26805-1-chris@chris-wilson.co.uk Tested-by: Joonas Lahtinen Reviewed-by: Joonas Lahtinen (cherry picked from commit 6cb0c6ad9e07f2c7971c4e8e0d9b7ceba151a925) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_shrinker.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit b5fa57ddc4a2492441a1391f07d5c8a282271249 Author: Lionel Landwerlin Date: Thu Aug 3 17:58:07 2017 +0100 drm/i915/perf: fix flex eu registers programming We were reserving fewer dwords in the ring than necessary. Indeed we're always writing all registers once, so discard the actual number of registers given by the user and just program the whitelisted ones once. Fixes: 19f81df2859e ("drm/i915/perf: Add OA unit support for Gen 8+") Reported-by: Matthew Auld Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Cc: # v4.12+ Link: https://patchwork.freedesktop.org/patch/msgid/20170803165812.2373-6-lionel.g.landwerlin@intel.com (cherry picked from commit 01d928e9a1644eb2e28f684905f888e700c7b9dc) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae5b0675942ab30cde96099c68a2290bd1aafcca Author: Paul Burton Date: Tue Aug 1 13:32:57 2017 -0700 Revert "MIPS: Don't unnecessarily include kmalloc.h into ." Commit 296e46db0073 ("MIPS: Don't unnecessarily include kmalloc.h into .") claimed that the inclusion of the machine's kmalloc.h from asm/cache.h is unnecessary, but this is not true. Without including kmalloc.h we don't get a definition for ARCH_DMA_MINALIGN, which means we no longer suitably align DMA. Further to this the definition of ARCH_KMALLOC_MINALIGN provided by linux/slab.h ends up being set to the alignment of an unsigned long long value rather than to ARCH_DMA_MINALIGN, which means that buffers allocated using kmalloc may no longer be safely aligned for use with DMA. Fix this by re-adding the include of kmalloc.h in asm/cache.h. This reverts commit 296e46db0073 ("MIPS: Don't unnecessarily include kmalloc.h into .") Signed-off-by: Paul Burton Fixes: 296e46db0073 ("MIPS: Don't unnecessarily include kmalloc.h into .") Cc: linux-mips@linux-mips.org Cc: stable # v4.12+ Patchwork: https://patchwork.linux-mips.org/patch/16895/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cache.h | 2 ++ 1 file changed, 2 insertions(+) commit bed58464303fabdbf126544cbdd95a9e1c2e9949 Author: Steven J. Hill Date: Wed Aug 2 12:39:50 2017 -0500 MIPS: OCTEON: Fix USB platform code breakage. Fix build error when CONFIG_SMP is turned off: CC [M] arch/mips/cavium-octeon/octeon-usb.o arch/mips/cavium-octeon/octeon-usb.c: In function ‘dwc3_octeon_device_init’: arch/mips/cavium-octeon/octeon-usb.c:540:4: error: implicit declaration of function ‘devm_iounmap’ [-Werror=implicit-function-declaration] devm_iounmap(&pdev->dev, base); Signed-off-by: Steven J. Hill Reviewed-by: James Hogan Tested-by: Matt Redfearn Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16907/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/octeon-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81a67e52763d1db6b3200c648d1efa16daddc536 Author: Steven J. Hill Date: Wed Aug 2 12:39:28 2017 -0500 MIPS: Octeon: Fix broken EDAC driver. Commit "MIPS: Octeon: Remove unused L2C types and macros." broke the the EDAC driver. Bring back 'cvmx-l2d-defs.h' file and the missing types for L2C. Fixes: 15f6847923a8 ("MIPS: Octeon: Remove unused L2C types and macros.") Fixes: 15f6847923a8 ("MIPS: Octeon: Remove unused L2C types and macros.") Signed-off-by: Steven J. Hill Reviewed-by: James Hogan Cc: linux-mips@linux-mips.org Cc: # 4.12+ Patchwork: https://patchwork.linux-mips.org/patch/16906/ Signed-off-by: Ralf Baechle arch/mips/include/asm/octeon/cvmx-l2c-defs.h | 37 ++++++++++++++++- arch/mips/include/asm/octeon/cvmx-l2d-defs.h | 60 ++++++++++++++++++++++++++++ arch/mips/include/asm/octeon/cvmx.h | 1 + 3 files changed, 97 insertions(+), 1 deletion(-) commit 33a73649acc412848996ae0921d577f33eb54af5 Author: Bartosz Golaszewski Date: Wed Aug 2 17:04:04 2017 +0200 MIPS: gitignore: ignore generated .c files Add ashldi3.c and bswapsi.c to the list of ignored files. Signed-off-by: Bartosz Golaszewski Reviewed-by: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16905/ Signed-off-by: Ralf Baechle arch/mips/boot/compressed/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 6f542ebeaee0ee552a902ce3892220fc22c7ec8e Author: Matija Glavinic Pecotic Date: Thu Aug 3 08:20:22 2017 +0200 MIPS: Fix race on setting and getting cpu_online_mask While testing cpu hoptlug (cpu down and up in loops) on kernel 4.4, it was observed that occasionally check for cpu online will fail in kernel/cpu.c, _cpu_up: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/kernel/cpu.c?h=v4.4.79#n485 518 /* Arch-specific enabling code. */ 519 ret = __cpu_up(cpu, idle); 520 521 if (ret != 0) 522 goto out_notify; 523 BUG_ON(!cpu_online(cpu)); Reason is race between start_secondary and _cpu_up. cpu_callin_map is set before cpu_online_mask. In __cpu_up, cpu_callin_map is waited for, but cpu online mask is not, resulting in race in which secondary processor started and set cpu_callin_map, but not yet set the online mask,resulting in above BUG being hit. Upstream differs in the area. cpu_online check is in bringup_wait_for_ap, which is after cpu reached AP_ONLINE_IDLE,where secondary passed its start function. Nonetheless, fix makes start_secondary safe and not depending on other locks throughout the code. It protects as well against cpu_online checks put in between sometimes in the future. Fix this by moving completion after all flags are set. Signed-off-by: Matija Glavinic Pecotic Cc: Alexander Sverdlin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16925/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 00e06297b351d286199c6cf542ea70b8fbabafee Author: Thomas Petazzoni Date: Thu Aug 3 21:16:15 2017 +0200 MIPS: mm: remove duplicate "const" qualifier on insn_table Fixes the following gcc 7.x build error: arch/mips/mm/uasm-mips.c:51:26: error: duplicate ‘const’ declaration specifier [-Werror=duplicate-decl-specifier] static const struct insn const insn_table[insn_invalid] = { Signed-off-by: Thomas Petazzoni Fixes: ce807d5f67ed ("MIPS: Optimize uasm insn lookup.") Cc: David Daney Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16926/ Signed-off-by: Ralf Baechle arch/mips/mm/uasm-mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e2d0967acd3fcb202f70534bc4534c4e4216cfa Merge: 5279fc7 d608659 Author: Jani Nikula Date: Mon Aug 7 11:32:46 2017 +0300 Merge tag 'gvt-fixes-2017-08-07' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-08-07 - two regression fixes for 65f9f6febf12, one is for display MMIO initial value (Tina), another for 64bit MMIO access (Xiong) - two reset fixes from Chuanxiao Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170807080716.qljcvws6opydnotk@zhen-hp.sh.intel.com commit 5279fc7724ae3a82c9cfe5b09c1fb07ff0e41056 Author: Maarten Lankhorst Date: Mon Jul 24 11:14:31 2017 +0200 drm/i915: Fix out-of-bounds array access in bdw_load_gamma_lut bdw_load_gamma_lut is writing beyond the array to the maximum value. The intend of the function is to clamp values > 1 to 1, so write the intended color to the max register. This fixes the following KASAN warning: [ 197.020857] [IGT] kms_pipe_color: executing [ 197.063434] [IGT] kms_pipe_color: starting subtest ctm-0-25-pipe0 [ 197.078989] ================================================================== [ 197.079127] BUG: KASAN: slab-out-of-bounds in bdw_load_gamma_lut.isra.2+0x3b9/0x570 [i915] [ 197.079188] Read of size 2 at addr ffff8800d38db150 by task kms_pipe_color/1839 [ 197.079208] CPU: 2 PID: 1839 Comm: kms_pipe_color Tainted: G U 4.13.0-rc1-patser+ #5211 [ 197.079215] Hardware name: NUC5i7RYB, BIOS RYBDWi35.86A.0246.2015.0309.1355 03/09/2015 [ 197.079220] Call Trace: [ 197.079230] dump_stack+0x68/0x9e [ 197.079239] print_address_description+0x6f/0x250 [ 197.079251] kasan_report+0x216/0x370 [ 197.079374] ? bdw_load_gamma_lut.isra.2+0x3b9/0x570 [i915] [ 197.079451] ? gen8_write16+0x4e0/0x4e0 [i915] [ 197.079460] __asan_report_load2_noabort+0x14/0x20 [ 197.079535] bdw_load_gamma_lut.isra.2+0x3b9/0x570 [i915] [ 197.079612] broadwell_load_luts+0x1df/0x550 [i915] [ 197.079690] intel_color_load_luts+0x7b/0x80 [i915] [ 197.079764] intel_begin_crtc_commit+0x138/0x760 [i915] [ 197.079783] drm_atomic_helper_commit_planes_on_crtc+0x1a3/0x820 [drm_kms_helper] [ 197.079859] ? intel_pre_plane_update+0x571/0x580 [i915] [ 197.079937] intel_update_crtc+0x238/0x330 [i915] [ 197.080016] intel_update_crtcs+0x10f/0x210 [i915] [ 197.080092] intel_atomic_commit_tail+0x1552/0x3340 [i915] [ 197.080101] ? _raw_spin_unlock+0x3c/0x40 [ 197.080110] ? __queue_work+0xb40/0xbf0 [ 197.080188] ? skl_update_crtcs+0xc00/0xc00 [i915] [ 197.080195] ? trace_hardirqs_on+0xd/0x10 [ 197.080269] ? intel_atomic_commit_ready+0x128/0x13c [i915] [ 197.080329] ? __i915_sw_fence_complete+0x5b8/0x6d0 [i915] [ 197.080336] ? debug_object_activate+0x39e/0x580 [ 197.080397] ? i915_sw_fence_await+0x30/0x30 [i915] [ 197.080409] ? __might_sleep+0x15b/0x180 [ 197.080483] intel_atomic_commit+0x944/0xa70 [i915] [ 197.080490] ? refcount_dec_and_test+0x11/0x20 [ 197.080567] ? intel_atomic_commit_tail+0x3340/0x3340 [i915] [ 197.080597] ? drm_atomic_crtc_set_property+0x303/0x580 [drm] [ 197.080674] ? intel_atomic_commit_tail+0x3340/0x3340 [i915] [ 197.080704] drm_atomic_commit+0xd7/0xe0 [drm] [ 197.080722] drm_atomic_helper_crtc_set_property+0xec/0x130 [drm_kms_helper] [ 197.080749] drm_mode_crtc_set_obj_prop+0x7d/0xb0 [drm] [ 197.080775] drm_mode_obj_set_property_ioctl+0x50b/0x5d0 [drm] [ 197.080783] ? __might_fault+0x104/0x180 [ 197.080809] ? drm_mode_obj_find_prop_id+0x160/0x160 [drm] [ 197.080838] ? drm_mode_obj_find_prop_id+0x160/0x160 [drm] [ 197.080861] drm_ioctl_kernel+0x154/0x1a0 [drm] [ 197.080885] drm_ioctl+0x624/0x8f0 [drm] [ 197.080910] ? drm_mode_obj_find_prop_id+0x160/0x160 [drm] [ 197.080934] ? drm_getunique+0x210/0x210 [drm] [ 197.080943] ? __handle_mm_fault+0x1bd0/0x1ce0 [ 197.080949] ? lock_downgrade+0x610/0x610 [ 197.080957] ? __lru_cache_add+0x15a/0x180 [ 197.080967] do_vfs_ioctl+0xd92/0xe40 [ 197.080975] ? ioctl_preallocate+0x1b0/0x1b0 [ 197.080982] ? selinux_capable+0x20/0x20 [ 197.080991] ? __do_page_fault+0x7b7/0x9a0 [ 197.080997] ? lock_downgrade+0x5bb/0x610 [ 197.081007] ? security_file_ioctl+0x57/0x90 [ 197.081016] SyS_ioctl+0x4e/0x80 [ 197.081024] entry_SYSCALL_64_fastpath+0x18/0xad [ 197.081030] RIP: 0033:0x7f61f287a987 [ 197.081035] RSP: 002b:00007fff7d44d188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 197.081043] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f61f287a987 [ 197.081048] RDX: 00007fff7d44d1c0 RSI: 00000000c01864ba RDI: 0000000000000003 [ 197.081053] RBP: 00007f61f2b3eb00 R08: 0000000000000059 R09: 0000000000000000 [ 197.081058] R10: 0000002ea5c4a290 R11: 0000000000000246 R12: 00007f61f2b3eb58 [ 197.081063] R13: 0000000000001010 R14: 00007f61f2b3eb58 R15: 0000000000002702 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101659 Signed-off-by: Maarten Lankhorst Reported-by: Martin Peres Cc: Martin Peres Fixes: 82cf435b3134 ("drm/i915: Implement color management on bdw/skl/bxt/kbl") Cc: Shashank Sharma Cc: Kiran S Kumar Cc: Kausal Malladi Cc: Lionel Landwerlin Cc: Matt Roper Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v4.7+ Link: https://patchwork.freedesktop.org/patch/msgid/20170724091431.24251-1-maarten.lankhorst@linux.intel.com Reviewed-by: Lionel Landwerlin (cherry picked from commit 09a92bc8773b4314e02b478e003fe5936ce85adb) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_color.c | 1 + 1 file changed, 1 insertion(+) commit d6086598d34e1cf9091c7be201f5b2041dc6203e Author: Xiong Zhang Date: Wed Aug 2 10:31:01 2017 +0800 drm/i915/gvt: Change the max length of mmio_reg_rw from 4 to 8 When linux guest access mmio with __raw_i915_read64 or __raw_i915_write64, its length is 8 bytes. This fix the linux guest in xengt couldn't boot up as it fail in reading pv_info->magic. Fixes: 65f9f6febf12 ("drm/i915/gvt: Optimize MMIO register handling for some large MMIO blocks") Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cd7b51ff57c74260b20c97623b0e0d420c22be8 Author: Kuninori Morimoto Date: Wed Aug 2 10:26:58 2017 +0000 arm64: renesas: salvator-common: avoid audio_clkout naming conflict clock name of "audio_clkout" is used by Renesas sound driver. This duplicated naming breaks its clock registering/unregistering. Especially, when unbind/bind it can't handle clkout correctly. This patch renames "audio_clkout" to "audio-clkout" to avoid naming conflict. Fixes: 8a8f181d2cfd ("arm64: renesas: salvator-x: use CS2000 as AUDIO_CLK_B") Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ff0308f06da5016aafb05330ed37809b54f81ae Author: Steffen Klassert Date: Mon Aug 7 08:31:07 2017 +0200 esp: Fix error handling on layer 2 xmit. esp_output_tail() and esp6_output_tail() can return negative and positive error values. We currently treat only negative values as errors, fix this to treat both cases as error. Fixes: fca11ebde3f0 ("esp4: Reorganize esp_output") Fixes: 383d0350f2cc ("esp6: Reorganize esp_output") Signed-off-by: Steffen Klassert net/ipv4/esp4_offload.c | 2 +- net/ipv6/esp6_offload.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 732e49850c5e15231e11a0a464748bcbade5e3c2 Author: stephen hemminger Date: Thu Aug 3 17:13:54 2017 -0700 netvsc: fix race on sub channel creation The existing sub channel code did not wait for all the sub-channels to completely initialize. This could lead to race causing crash in napi_netif_del() from bad list. The existing code would send an init message, then wait only for the initial response that the init message was received. It thought it was waiting for sub channels but really the init response did the wakeup. The new code keeps track of the number of open channels and waits until that many are open. Other issues here were: * host might return less sub-channels than was requested. * the new init status is not valid until after init was completed. Fixes: b3e6b82a0099 ("hv_netvsc: Wait for sub-channels to be processed during probe") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 3 ++- drivers/net/hyperv/netvsc.c | 1 + drivers/net/hyperv/rndis_filter.c | 14 ++++++++------ 3 files changed, 11 insertions(+), 7 deletions(-) commit aae4e7a8bc44722fe70d58920a36916b1043195e Author: Linus Torvalds Date: Sun Aug 6 18:44:49 2017 -0700 Linux 4.13-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acdae9ee6aba82f5bba1fb44325793572db02fbc Merge: ed66da1 946da69 Author: Linus Torvalds Date: Sun Aug 6 16:11:34 2017 -0700 Merge tag 'platform-drivers-x86-v4.13-4' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fix from Darren Hart: "Fix loop preventing some platforms from waking up via the power button in s2idle: - intel-vbtn: match power button on press rather than release" * tag 'platform-drivers-x86-v4.13-4' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: intel-vbtn: match power button on press rather than release commit 978d13d60c34818a41fc35962602bdfa5c03f214 Author: Nicholas Bellinger Date: Fri Aug 4 23:59:31 2017 -0700 iscsi-target: Fix iscsi_np reset hung task during parallel delete This patch fixes a bug associated with iscsit_reset_np_thread() that can occur during parallel configfs rmdir of a single iscsi_np used across multiple iscsi-target instances, that would result in hung task(s) similar to below where configfs rmdir process context was blocked indefinately waiting for iscsi_np->np_restart_comp to finish: [ 6726.112076] INFO: task dcp_proxy_node_:15550 blocked for more than 120 seconds. [ 6726.119440] Tainted: G W O 4.1.26-3321 #2 [ 6726.125045] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 6726.132927] dcp_proxy_node_ D ffff8803f202bc88 0 15550 1 0x00000000 [ 6726.140058] ffff8803f202bc88 ffff88085c64d960 ffff88083b3b1ad0 ffff88087fffeb08 [ 6726.147593] ffff8803f202c000 7fffffffffffffff ffff88083f459c28 ffff88083b3b1ad0 [ 6726.155132] ffff88035373c100 ffff8803f202bca8 ffffffff8168ced2 ffff8803f202bcb8 [ 6726.162667] Call Trace: [ 6726.165150] [] schedule+0x32/0x80 [ 6726.170156] [] schedule_timeout+0x214/0x290 [ 6726.176030] [] ? __send_signal+0x52/0x4a0 [ 6726.181728] [] wait_for_completion+0x96/0x100 [ 6726.187774] [] ? wake_up_state+0x10/0x10 [ 6726.193395] [] iscsit_reset_np_thread+0x62/0xe0 [iscsi_target_mod] [ 6726.201278] [] iscsit_tpg_disable_portal_group+0x96/0x190 [iscsi_target_mod] [ 6726.210033] [] lio_target_tpg_store_enable+0x4f/0xc0 [iscsi_target_mod] [ 6726.218351] [] configfs_write_file+0xaa/0x110 [ 6726.224392] [] vfs_write+0xa4/0x1b0 [ 6726.229576] [] SyS_write+0x41/0xb0 [ 6726.234659] [] system_call_fastpath+0x12/0x71 It would happen because each iscsit_reset_np_thread() sets state to ISCSI_NP_THREAD_RESET, sends SIGINT, and then blocks waiting for completion on iscsi_np->np_restart_comp. However, if iscsi_np was active processing a login request and more than a single iscsit_reset_np_thread() caller to the same iscsi_np was blocked on iscsi_np->np_restart_comp, iscsi_np kthread process context in __iscsi_target_login_thread() would flush pending signals and only perform a single completion of np->np_restart_comp before going back to sleep within transport specific iscsit_transport->iscsi_accept_np code. To address this bug, add a iscsi_np->np_reset_count and update __iscsi_target_login_thread() to keep completing np->np_restart_comp until ->np_reset_count has reached zero. Reported-by: Gary Guo Tested-by: Gary Guo Cc: Mike Christie Cc: Hannes Reinecke Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 1 + drivers/target/iscsi/iscsi_target_login.c | 7 +++++-- include/target/iscsi/iscsi_target_core.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) commit ed66da1104c44bda233930af49d51742dc02b26b Merge: 6ea1bc9 4e56201 Author: Linus Torvalds Date: Sun Aug 6 12:31:17 2017 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "A large number of ext4 bug fixes and cleanups for v4.13" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix copy paste error in ext4_swap_extents() ext4: fix overflow caused by missing cast in ext4_resize_fs() ext4, project: expand inode extra size if possible ext4: cleanup ext4_expand_extra_isize_ea() ext4: restructure ext4_expand_extra_isize ext4: fix forgetten xattr lock protection in ext4_expand_extra_isize ext4: make xattr inode reads faster ext4: inplace xattr block update fails to deduplicate blocks ext4: remove unused mode parameter ext4: fix warning about stack corruption ext4: fix dir_nlink behaviour ext4: silence array overflow warning ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize ext4: release discard bio after sending discard commands ext4: convert swap_inode_data() over to use swap() on most of the fields ext4: error should be cleared if ea_inode isn't added to the cache ext4: Don't clear SGID when inheriting ACLs ext4: preserve i_mode if __ext4_set_acl() fails ext4: remove unused metadata accounting variables ext4: correct comment references to ext4_ext_direct_IO() commit 6ea1bc9b1a05891b5ab02ac516abc6dfc00fe22c Merge: fbb7761 f13343e Author: Linus Torvalds Date: Sun Aug 6 11:52:01 2017 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "This fixes two build issues for ralink platforms, both due to missing #includes which used to be included indirectly via other headers" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: ralink: mt7620: Add missing header MIPS: ralink: Fix build error due to missing header commit fbb77611e95d3d5b2af86a59754a3130877cb667 Author: Dmitry V. Levin Date: Sat Aug 5 23:00:50 2017 +0300 Fix compat_sys_sigpending breakage The latest change of compat_sys_sigpending in commit 8f13621abced ("sigpending(): move compat to native") has broken it in two ways. First, it tries to write 4 bytes more than userspace expects: sizeof(old_sigset_t) == sizeof(long) == 8 instead of sizeof(compat_old_sigset_t) == sizeof(u32) == 4. Second, on big endian architectures these bytes are being written in the wrong order. This bug was found by strace test suite. Reported-by: Anatoly Pugachev Inspired-by: Eugene Syromyatnikov Fixes: 8f13621abced ("sigpending(): move compat to native") Signed-off-by: Dmitry V. Levin Acked-by: Al Viro Signed-off-by: Linus Torvalds kernel/signal.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 4e5620132144666ab41fc2799fbc055830187b7e Author: Maninder Singh Date: Sun Aug 6 01:33:07 2017 -0400 ext4: fix copy paste error in ext4_swap_extents() This bug was found by a static code checker tool for copy paste problems. Signed-off-by: Maninder Singh Signed-off-by: Vaneet Narang Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aec51758ce10a9c847a62a48a168f8c804c6e053 Author: Jerry Lee Date: Sun Aug 6 01:18:31 2017 -0400 ext4: fix overflow caused by missing cast in ext4_resize_fs() On a 32-bit platform, the value of n_blcoks_count may be wrong during the file system is resized to size larger than 2^32 blocks. This may caused the superblock being corrupted with zero blocks count. Fixes: 1c6bd7173d66 Signed-off-by: Jerry Lee Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org # 3.7+ fs/ext4/resize.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c03b45b853f5829816d871283c792e7527a7ded1 Author: Miao Xie Date: Sun Aug 6 01:00:49 2017 -0400 ext4, project: expand inode extra size if possible When upgrading from old format, try to set project id to old file first time, it will return EOVERFLOW, but if that file is dirtied(touch etc), changing project id will be allowed, this might be confusing for users, we could try to expand @i_extra_isize here too. Reported-by: Zhang Yi Signed-off-by: Miao Xie Signed-off-by: Wang Shilong Signed-off-by: Theodore Ts'o fs/ext4/ext4_jbd2.h | 3 ++ fs/ext4/inode.c | 97 +++++++++++++++++++++++++++++++++++++++++------------ fs/ext4/ioctl.c | 9 +++-- 3 files changed, 85 insertions(+), 24 deletions(-) commit b640b2c51b26459fc08f2185a385495b0f509a80 Author: Miao Xie Date: Sun Aug 6 00:55:48 2017 -0400 ext4: cleanup ext4_expand_extra_isize_ea() Clean up some goto statement, make ext4_expand_extra_isize_ea() clearer. Signed-off-by: Miao Xie Signed-off-by: Theodore Ts'o Reviewed-by: Wang Shilong fs/ext4/xattr.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit cf0a5e818fe216dbdf5da4e829e157d27ebfc8a4 Author: Miao Xie Date: Sun Aug 6 00:40:01 2017 -0400 ext4: restructure ext4_expand_extra_isize Current ext4_expand_extra_isize just tries to expand extra isize, if someone is holding xattr lock or some check fails, it will give up. So rename its name to ext4_try_to_expand_extra_isize. Besides that, we clean up unnecessary check and move some relative checks into it. Signed-off-by: Miao Xie Signed-off-by: Theodore Ts'o Reviewed-by: Wang Shilong fs/ext4/inode.c | 67 ++++++++++++++++++++++++--------------------------------- fs/ext4/xattr.c | 9 +++++++- 2 files changed, 36 insertions(+), 40 deletions(-) commit 3b10fdc6d8bd048f4fb14af5eda2051ace7b8b16 Author: Miao Xie Date: Sun Aug 6 00:27:38 2017 -0400 ext4: fix forgetten xattr lock protection in ext4_expand_extra_isize We should avoid the contention between the i_extra_isize update and the inline data insertion, so move the xattr trylock in front of i_extra_isize update. Signed-off-by: Miao Xie Reviewed-by: Wang Shilong fs/ext4/inode.c | 18 ++++++++++++++++-- fs/ext4/xattr.c | 10 ---------- 2 files changed, 16 insertions(+), 12 deletions(-) commit 9699d4f91d9bd2f70dcc37afe3c9f18145ab2dba Author: Tahsin Erdogan Date: Sun Aug 6 00:07:01 2017 -0400 ext4: make xattr inode reads faster ext4_xattr_inode_read() currently reads each block sequentially while waiting for io operation to complete before moving on to the next block. This prevents request merging in block layer. Add a ext4_bread_batch() function that starts reads for all blocks then optionally waits for them to complete. A similar logic is used in ext4_find_entry(), so update that code to use the new function. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 2 ++ fs/ext4/inode.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ fs/ext4/namei.c | 43 ++++++++++++++----------------------------- fs/ext4/xattr.c | 51 ++++++++++++++++++++++++++++++++------------------- 4 files changed, 92 insertions(+), 48 deletions(-) commit ec00022030da5761518476096626338bd67df57a Author: Tahsin Erdogan Date: Sat Aug 5 22:41:42 2017 -0400 ext4: inplace xattr block update fails to deduplicate blocks When an xattr block has a single reference, block is updated inplace and it is reinserted to the cache. Later, a cache lookup is performed to see whether an existing block has the same contents. This cache lookup will most of the time return the just inserted entry so deduplication is not achieved. Running the following test script will produce two xattr blocks which can be observed in "File ACL: " line of debugfs output: mke2fs -b 1024 -I 128 -F -O extent /dev/sdb 1G mount /dev/sdb /mnt/sdb touch /mnt/sdb/{x,y} setfattr -n user.1 -v aaa /mnt/sdb/x setfattr -n user.2 -v bbb /mnt/sdb/x setfattr -n user.1 -v aaa /mnt/sdb/y setfattr -n user.2 -v bbb /mnt/sdb/y debugfs -R 'stat x' /dev/sdb | cat debugfs -R 'stat y' /dev/sdb | cat This patch defers the reinsertion to the cache so that we can locate other blocks with the same contents. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger fs/ext4/xattr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 77a2e84d51729da7957d19283523af7b571d61f6 Author: Tahsin Erdogan Date: Sat Aug 5 22:15:45 2017 -0400 ext4: remove unused mode parameter ext4_alloc_file_blocks() does not use its mode parameter. Remove it. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 2df2c3402fc81918a888e1ec711369f6014471f2 Author: Arnd Bergmann Date: Sat Aug 5 21:57:46 2017 -0400 ext4: fix warning about stack corruption After commit 62d1034f53e3 ("fortify: use WARN instead of BUG for now"), we get a warning about possible stack overflow from a memcpy that was not strictly bounded to the size of the local variable: inlined from 'ext4_mb_seq_groups_show' at fs/ext4/mballoc.c:2322:2: include/linux/string.h:309:9: error: '__builtin_memcpy': writing between 161 and 1116 bytes into a region of size 160 overflows the destination [-Werror=stringop-overflow=] We actually had a bug here that would have been found by the warning, but it was already fixed last year in commit 30a9d7afe70e ("ext4: fix stack memory corruption with 64k block size"). This replaces the fixed-length structure on the stack with a variable-length structure, using the correct upper bound that tells the compiler that everything is really fine here. I also change the loop count to check for the same upper bound for consistency, but the existing code is already correct here. Note that while clang won't allow certain kinds of variable-length arrays in structures, this particular instance is fine, as the array is at the end of the structure, and the size is strictly bounded. Signed-off-by: Arnd Bergmann Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit c7414892067204fcb8f8ebb4309d0fdd8c7242fe Author: Andreas Dilger Date: Sat Aug 5 19:47:34 2017 -0400 ext4: fix dir_nlink behaviour The dir_nlink feature has been enabled by default for new ext4 filesystems since e2fsprogs-1.41 in 2008, and was automatically enabled by the kernel for older ext4 filesystems since the dir_nlink feature was added with ext4 in kernel 2.6.28+ when the subdirectory count exceeded EXT4_LINK_MAX-1. Automatically adding the file system features such as dir_nlink is generally frowned upon, since it could cause the file system to not be mountable on older kernel, thus preventing the administrator from rolling back to an older kernel if necessary. In this case, the administrator might also want to disable the feature because glibc's fts_read() function does not correctly optimize directory traversal for directories that use st_nlinks field of 1 to indicate that the number of links in the directory are not tracked by the file system, and could fail to traverse the full directory hierarchy. Fortunately, in the past ten years very few users have complained about incomplete file system traversal by glibc's fts_read(). This commit also changes ext4_inc_count() to allow i_nlinks to reach the full EXT4_LINK_MAX links on the parent directory (including "." and "..") before changing i_links_count to be 1. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196405 Signed-off-by: Andreas Dilger Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 3 ++- fs/ext4/namei.c | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) commit 381cebfe72e17e495281c07c976797f5a397515a Author: Dan Carpenter Date: Sat Aug 5 19:00:31 2017 -0400 ext4: silence array overflow warning I get a static checker warning: fs/ext4/ext4.h:3091 ext4_set_de_type() error: buffer overflow 'ext4_type_by_mode' 15 <= 15 It seems unlikely that we would hit this read overflow in real life, but it's also simple enough to make the array 16 bytes instead of 15. Signed-off-by: Dan Carpenter Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcf5ea10992fbac3c7473a1db33d56a139333cd1 Author: Jan Kara Date: Sat Aug 5 17:43:24 2017 -0400 ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize ext4_find_unwritten_pgoff() does not properly handle a situation when starting index is in the middle of a page and blocksize < pagesize. The following command shows the bug on filesystem with 1k blocksize: xfs_io -f -c "falloc 0 4k" \ -c "pwrite 1k 1k" \ -c "pwrite 3k 1k" \ -c "seek -a -r 0" foo In this example, neither lseek(fd, 1024, SEEK_HOLE) nor lseek(fd, 2048, SEEK_DATA) will return the correct result. Fix the problem by neglecting buffers in a page before starting offset. Reported-by: Andreas Gruenbacher Signed-off-by: Theodore Ts'o Signed-off-by: Jan Kara CC: stable@vger.kernel.org # 3.8+ fs/ext4/file.c | 3 +++ 1 file changed, 3 insertions(+) commit 946da69954485c4da51c785438f98fb13784941a Author: Mario Limonciello Date: Fri Aug 4 12:00:06 2017 -0500 platform/x86: intel-vbtn: match power button on press rather than release This fixes a problem where the system gets stuck in a loop unable to wakeup via power button in s2idle. The problem happens because: - press power button: - system emits 0xc0 (power press), event ignored - system emits 0xc1 (power release), event processed, emited as KEY_POWER - set wakeup_mode to true - system goes to s2idle - press power button - system emits 0xc0 (power press), wakeup_mode is true, system wakes - system emits 0xc1 (power release), event processed, emited as KEY_POWER - system goes to s2idle again To avoid this situation, process the presses (which matches what intel-hid does too). Verified on an Dell XPS 9365 Signed-off-by: Mario Limonciello Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/intel-vbtn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0fdd951c9bef93637d5af036851e7a5632fbd6c3 Merge: aab7761 8033120 Author: Linus Torvalds Date: Sat Aug 5 14:09:26 2017 -0700 Merge tag 'media/v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "This series is larger than I would like to submit for -rc4. My original intent were to sent it to either -rc2 or -rc3. Unfortunately, due to my vacations, I got a lot of pending stuff after my return, and had to do some biz trips, with prevented me to send this earlier. Several fixes: - some fixes at atomisp staging driver - several gcc 7 warning fixes - cleanup media SVG files, in order to fix PDF build on some distros - fix random Kconfig build of venus driver - some fixes for the venus driver - some changes from semaphone to mutex in ngene's driver - some locking fixes at dib0700 driver - several fixes on ngene's driver and frontends to make it properly support some new boards added on Kernel 4.13 - some fixes to CEC drivers - omap_vout: vrfb: convert to dmaengine - docs-rst: document EBUSY for VIDIOC_S_FMT Please notice that the big diffstat changes here are at the SVG files. Visually, the images look the same, but the file size is now a lot smaller than before, and they don't use some XML tags that would cause them to be badly parsed by some ImageMagick versions, or to require a lot of memory by TeTex, with would break PDF output on some distributions" * tag 'media/v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (68 commits) media: atomisp2: array underflow in imx_enum_frame_size() media: atomisp2: array underflow in ap1302_enum_frame_size() media: atomisp2: Array underflow in atomisp_enum_input() media: platform: davinci: drop VPFE_CMD_S_CCDC_RAW_PARAMS media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl media: venus: don't abuse dma_alloc for non-DMA allocations media: venus: hfi: fix error handling in hfi_sys_init_done() media: venus: fix compile-test build on non-qcom ARM platform media: venus: mark PM functions as __maybe_unused media: cec-notifier: small improvements media: pulse8-cec: persistent_config should be off by default media: cec: cec_transmit_attempt_done: ignore CEC_TX_STATUS_MAX_RETRIES media: staging: atomisp: array underflow in ioctl media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds media: svg: avoid too long lines media: svg files: simplify files media: selection.svg: simplify the SVG file media: vimc: set id_table for platform drivers media: staging: atomisp: disable warnings with cc-disable-warning media: davinci: variable 'common' set but not used ... commit aae9d563230f974f2daa7135f911f021b2bba9e6 Author: Christophe Jaillet Date: Fri Jul 14 12:06:59 2017 +0200 iwlwifi: mvm: Fix a memory leak in an error handling path in 'iwl_mvm_sar_get_wgds_table()' We should free 'wgds.pointer' here as done a few lines above in another error handling path. It was allocated within 'acpi_evaluate_object()'. Fixes: c52030a01ccc ("iwlwifi: mvm: add GEO_TX_POWER_LIMIT cmd for geographic tx power table") Signed-off-by: Christophe JAILLET Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e45105772db41c5318b2a7ec1c420183183414e3 Author: Daeho Jeong Date: Sat Aug 5 13:11:57 2017 -0400 ext4: release discard bio after sending discard commands We've changed the discard command handling into parallel manner. But, in this change, I forgot decreasing the usage count of the bio which was used to send discard request. I'm sorry about that. Fixes: a015434480dc ("ext4: send parallel discards on commit completions") Signed-off-by: Daeho Jeong Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/mballoc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aab7761c4f65a909047d10fc0c337800f770e820 Merge: ef9ca02 9e9509e Author: Linus Torvalds Date: Sat Aug 5 06:55:13 2017 -0700 Merge tag 'gpio-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: - LP87565: set the proper output level for direction_output. - stm32: fix the kernel build by selecting the hierarchical irqdomain symbol properly - this happens to be done in the pin control framework but whatever, it had dependencies to GPIO so we need to apply it here. - Select the hierarchical IRQ domain also for Xgene. - Fix wakeups to work on MXC. - Fix up the device tree binding on Exar that went astray, also add the right bindings. - Fix the unwanted events for edges from the library. - Fix the unbalanced chanined IRQ on the Tegra. * tag 'gpio-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: tegra: fix unbalanced chained_irq_enter/exit gpiolib: skip unwanted events, don't convert them to opposite edge gpio: exar: Use correct property prefix and document bindings gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source gpio: xgene-sb: select IRQ_DOMAIN_HIERARCHY pinctrl: stm32: select IRQ_DOMAIN_HIERARCHY instead of depends on gpio: lp87565: Set proper output level and direction for direction_output MAINTAINERS: Add entry for Whiskey Cove PMIC GPIO driver commit 8317562097acec4c9e9750eb91115687931bca35 Author: Martin Kaiser Date: Wed Aug 2 22:06:11 2017 +0200 ARM: dts: i.MX25: add ranges to tscadc Add a ranges; line to the tscadc node. This creates a 1:1 mapping between the addresses used by tscadc and those in its child nodes (adc, tsc). Without such a mapping, the reg = ... lines in the tsc and adc nodes do not create a resource. Probing the fsl-imx25-tcq and fsl-imx25-tsadc drivers will then fail since there's no IORESOURCE_MEM. Signed-off-by: Martin Kaiser Fixes: 92f651f39b42 ("ARM: dts: imx25: Add TSC and ADC support") Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25.dtsi | 1 + 1 file changed, 1 insertion(+) commit 9e01e2d56db23485a75864b6aeee8e443f024ddb Author: Stefan Agner Date: Wed Aug 2 12:51:29 2017 -0700 soc: imx: gpcv2: fix regulator deferred probe If a regulator requests a deferred probe, the power domain gets initialized twice. This leads to a list double add (without list debugging the kernel hangs due to the double add later): WARNING: CPU: 0 PID: 19 at lib/list_debug.c:31 __list_add_valid+0xbc/0xc4 list_add double add: new=c1229754, prev=c12383b4, next=c1229754. Initialize the power domain after we get the regulator. Also do not print an error in case the regulator defers probing. Cc: Fabio Estevam Cc: Andrey Smirnov Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Fixes: 03aa12629fc4 ("soc: imx: Add GPCv2 power gating driver") Signed-off-by: Stefan Agner Acked-by: Andrey Smirnov Tested-by: Andrey Smirnov Signed-off-by: Shawn Guo drivers/soc/imx/gpcv2.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 33983675fbd5b2447430c3dd4c205e879576b475 Merge: 5771a8c ee02f73 Author: Brian Norris Date: Fri Aug 4 18:42:37 2017 -0700 Merge tag 'nand/fixes-for-4.13-rc4' of git://git.infradead.org/l2-mtd into MTD """ This PR contains both core and drivers fixes for 4.13. Core fixes: - Fix data interface setup for ONFI NANDs that do not support the SET FEATURES command - Fix a kernel doc header - Fix potential integer overflow when retrieving timing information from the parameter page - Fix wrong OOB layout for small page NANDs Driver fixes: - Fix potential division-by-zero bug - Fix backward compat with old atmel-nand DT bindings - Fix ->setup_data_interface() in the atmel NAND driver """ commit ef9ca02baa87c619aa4aa3d9784931ebf0c1ece2 Merge: 6999507 f54d2cd Author: Linus Torvalds Date: Fri Aug 4 16:45:29 2017 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A handful of critical fixes for changes introduce this merge window. - The TI sci_clk_get() API was pretty broken and nobody noticed. - There were some CPUfreq crashes on C.H.I.P devices because we failed to propagate rates up the clk tree. - Also, the Intel Atom PMC clk driver needs to mark a clk critical if the firmware has it enabled already so that audio doesn't get killed on Baytrail. - Gemini devices have a dead serial console because the reset control usage in the serial driver assume one method of reset that gemini doesn't support (this will be fixed in the next version in the reset framework so this is the small fix for -rc series). - Finally we have two rate calculation fixes, one for Exynos and one for Meson SoCs, that fix rate inconsistencies" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: keystone: sci-clk: Fix sci_clk_get clk: meson: mpll: fix mpll0 fractional part ignored clk: samsung: exynos5420: The EPLL rate table corrections clk: sunxi-ng: sun5i: Add clk_set_rate_parent to the CPU clock clk: x86: Do not gate clocks enabled by the firmware clk: gemini: Fix reset regression commit 2c460621bb2e6baf8a475c407cdb29029b2497ac Author: Daniel Borkmann Date: Fri Aug 4 22:24:41 2017 +0200 bpf: fix byte order test in test_verifier We really must check with #if __BYTE_ORDER == XYZ instead of just presence of #ifdef __LITTLE_ENDIAN. I noticed that when actually running this on big endian machine, the latter test resolves to true for user space, same for #ifdef __BIG_ENDIAN. E.g., looking at endian.h from libc, both are also defined there, so we really must test this against __BYTE_ORDER instead for proper insns selection. For the kernel, such checks are fine though e.g. see 13da9e200fe4 ("Revert "endian: #define __BYTE_ORDER"") and 415586c9e6d3 ("UAPI: fix endianness conditionals in M32R's asm/stat.h") for some more context, but not for user space. Lets also make sure to properly include endian.h. After that, suite passes for me: ./test_verifier: ELF 64-bit MSB executable, [...] Linux foo 4.13.0-rc3+ #4 SMP Fri Aug 4 06:59:30 EDT 2017 s390x s390x s390x GNU/Linux Before fix: Summary: 505 PASSED, 11 FAILED After fix: Summary: 516 PASSED, 0 FAILED Fixes: 18f3d6be6be1 ("selftests/bpf: Add test cases to test narrower ctx field loads") Signed-off-by: Daniel Borkmann Acked-by: Yonghong Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 699950741604979437a59069855d1c34910587f0 Merge: 0d5b994 53a5abd Author: Linus Torvalds Date: Fri Aug 4 15:18:27 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM: - Yet another race with VM destruction plugged - A set of small vgic fixes x86: - Preserve pending INIT - RCU fixes in paravirtual async pf, VM teardown, and VMXOFF emulation - nVMX interrupt injection and dirty tracking fixes - initialize to make UBSAN happy" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: arm/arm64: vgic: Use READ_ONCE fo cmpxchg KVM: nVMX: Fix interrupt window request with "Acknowledge interrupt on exit" KVM: nVMX: mark vmcs12 pages dirty on L2 exit kvm: nVMX: don't flush VMCS12 during VMXOFF or VCPU teardown KVM: nVMX: do not pin the VMCS12 KVM: avoid using rcu_dereference_protected KVM: X86: init irq->level in kvm_pv_kick_cpu_op KVM: X86: Fix loss of pending INIT due to race KVM: async_pf: make rcu irq exit if not triggered from idle task KVM: nVMX: fixes to nested virt interrupt injection KVM: nVMX: do not fill vm_exit_intr_error_code in prepare_vmcs12 KVM: arm/arm64: Handle hva aging while destroying the vm KVM: arm/arm64: PMU: Fix overflow interrupt injection KVM: arm/arm64: Fix bug in advertising KVM_CAP_MSI_DEVID capability commit 0d5b9944070ab1408b41e55971508d962d7943a0 Merge: d1faa3e bb68cfe Author: Linus Torvalds Date: Fri Aug 4 15:16:09 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Thomas Gleixner: "The recent irq core changes unearthed API abuse in the HPET code, which manifested itself in a suspend/resume regression. The fix replaces the cruft with the proper function calls and cures the regression" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hpet: Cure interface abuse in the resume path commit d1faa3e78a2b11adc9461ebf7593df75cc93bce3 Merge: 65f4740 34f41c0 Author: Linus Torvalds Date: Fri Aug 4 15:14:09 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single fix for a multiplication overflow in the timer code on 32bit systems" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers: Fix overflow in get_next_timer_interrupt commit 65f4740e72991fd565791b86b6cf8725fc8eb5bc Merge: b3c6858 41c454f Author: Linus Torvalds Date: Fri Aug 4 15:12:15 2017 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "This comes a bit later than I planned, and as a consequence is a larger than it should be. Most of the changes are devicetree fixes, across lots of platforms: Renesas, Samsung Exynos, Marvell EBU, TI OMAP, Rockchips, Amlogic Meson, Sigma Desings Tango, Allwinner SUNxi and TI Davinci. Also across many platforms, I applied an older series of simple randconfig build fixes. This includes making the CONFIG_MTD_XIP option compile again, which had been broken for many years and probably has not been missed, but it felt wrong to just remove it completely. The only other changes are: - We enable HWSPINLOCK in defconfig to get some Qualcomm boards to work out of the box. - A few regression fixes for Texas Instruments OMAP2+. - A boot regression fix for the Renesas regulator quirk. - A suspend/resume fix for Uniphier SoCs, fixing the resume of the system bus" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits) ARM: dts: tango4: Request RGMII RX and TX clock delays bus: uniphier-system-bus: set up registers when resuming ARM64: dts: marvell: armada-37xx: Fix the number of GPIO on south bridge ARM: shmobile: rcar-gen2: Fix deadlock in regulator quirk arm64: defconfig: enable missing HWSPINLOCK ARM: pxa: select both FB and FB_W100 for eseries ARM: ixp4xx: fix ioport_unmap definition ARM: ep93xx: use ARM_PATCH_PHYS_VIRT correctly ARM: mmp: mark usb_dma_mask as __maybe_unused ARM: omap2: mark unused functions as __maybe_unused ARM: omap1: avoid unused variable warning ARM: sirf: mark sirfsoc_init_late as __maybe_unused ARM: ixp4xx: use normal prototype for {read,write}s{b,w,l} ARM: omap1/ams-delta: warn about failed regulator enable ARM: rpc: rename RAM_SIZE macro ARM: w90x900: normalize clk API ARM: ep93xx: normalize clk API ARM: dts: sun8i: a83t: Switch to CCU device tree binding macros arm64: allwinner: sun50i-a64: Correct emac register size ARM: dts: sunxi: h3/h5: Correct emac register size ... commit 56bdf855e676f1f2ed7033f288f57dfd315725ba Author: Lukas Czerner Date: Thu Aug 3 13:19:13 2017 -0700 xfs: Fix per-inode DAX flag inheritance According to the commit that implemented per-inode DAX flag: commit 58f88ca2df72 ("xfs: introduce per-inode DAX enablement") the flag is supposed to act as "inherit flag". Currently this only works in the situations where parent directory already has a flag in di_flags set, otherwise inheritance does not work. This is because setting the XFS_DIFLAG2_DAX flag is done in a wrong branch designated for di_flags, not di_flags2. Fix this by moving the code to branch designated for setting di_flags2, which does test for flags in di_flags2. Fixes: 58f88ca2df72 ("xfs: introduce per-inode DAX enablement") Signed-off-by: Lukas Czerner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit ea7bd56fa309d10a41b1041827a63c0746c47554 Author: Jan Kara Date: Wed Aug 2 12:37:16 2017 -0700 xfs: Fix leak of discard bio The bio describing discard operation is allocated by __blkdev_issue_discard() which returns us a reference to it. That reference is never released and thus we leak this bio. Drop the bio reference once it completes in xlog_discard_endio(). CC: stable@vger.kernel.org Fixes: 4560e78f40cb55bd2ea8f1ef4001c5baa88531c7 Signed-off-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 1 + 1 file changed, 1 insertion(+) commit b3c6858fb172512f63838523ae7817ae8adec564 Merge: 0a23ea6 82cd588 Author: Linus Torvalds Date: Fri Aug 4 12:11:48 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Here are some more arm64 fixes for 4.13. The main one is the PTE race with the hardware walker, but there are a couple of other things too. - Report correct timer frequency to userspace when trapping CNTFRQ_EL0 - Fix race with hardware page table updates when updating access flags - Silence clang overflow warning in VA_START and PAGE_OFFSET calculations" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: avoid overflow in VA_START and PAGE_OFFSET arm64: Fix potential race with hardware DBM in ptep_set_access_flags() arm64: Use arch_timer_get_rate when trapping CNTFRQ_EL0 commit 5db465f235e74293e285e1fa924a55e52ba52a98 Author: Dan Carpenter Date: Fri Aug 4 11:12:08 2017 +0300 IB/hns: checking for IS_ERR() instead of NULL The hns_roce_v1_create_lp_qp() returns NULL on error, not error pointers. Fixes: bfcc681bd09d ("IB/hns: Fix the bug when free mr") Signed-off-by: Dan Carpenter Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaf83aecd294fd61db6b34051f718f3e7ea34c22 Author: Thomas Bogendoerfer Date: Thu Aug 3 15:43:14 2017 +0200 xgene: Always get clk source, but ignore if it's missing for SGMII ports Even the driver doesn't do anything with the clk source for SGMII ports it needs to be enabled by doing a devm_clk_get(), if there is a clk source in DT. Fixes: 0db01097cabd ('xgene: Don't fail probe, if there is no clk resource for SGMII interfaces') Signed-off-by: Thomas Bogendoerfer Tested-by: Laura Abbott Acked-by: Iyappan Subramanian Tested-by: Will Deacon Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 931b3c1a832621b4bdcbaf783096fc267eb36fbe Author: Leon Romanovsky Date: Tue Aug 1 09:41:37 2017 +0300 RDMA/mlx5: Fix existence check for extended address vector The extended address vector is the highest bit in be32 variable, but it was compared with the lowest. This patch fixes the endianness of that check and removes already declared define. Fixes: 17d2f88f92ce ("IB/mlx5: Add ODP atomics support") Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/odp.c | 2 +- include/linux/mlx5/qp.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit efdd6f53b10aead0f5cf19a93dd3eb268ac0d991 Author: Yishai Hadas Date: Tue Aug 1 09:41:36 2017 +0300 IB/uverbs: Fix device cleanup Uverbs device should be cleaned up only when there is no potential usage of. As part of ib_uverbs_remove_one which might be triggered upon reset flow the device reference count is decreased as expected and leave the final cleanup to the FDs that were opened. Current code increases reference count upon opening a new command FD and decreases it upon closing the file. The event FD is opened internally and rely on the command FD by taking on it a reference count. In case that the command FD was closed and just later the event FD we may ensure that the device resources as of srcu are still alive as they are still in use. Fixing the above by moving the reference count decreasing to the place where the command FD is really freed instead of doing that when it was just closed. fixes: 036b10635739 ("IB/uverbs: Enable device removal when there are active user space applications") Signed-off-by: Yishai Hadas Reviewed-by: Matan Barak Reviewed-by: Jason Gunthorpe Tested-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f7a6cb7b38c6845b26aaa8bbdf519ff6e3090831 Author: Leon Romanovsky Date: Tue Aug 1 09:41:35 2017 +0300 RDMA/uverbs: Prevent leak of reserved field initialize to zero the response structure to prevent the leakage of "resp.reserved" field. drivers/infiniband/core/uverbs_cmd.c:1178 ib_uverbs_resize_cq() warn: check that 'resp.reserved' doesn't leak information Fixes: 33b9b3ee9709 ("IB: Add userspace support for resizing CQs") Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fff41e1f89d93feef9833c49a415dc337af5a99 Author: Parav Pandit Date: Tue Aug 1 09:41:34 2017 +0300 IB/core: Fix race condition in resolving IP to MAC Currently while resolving IP address to MAC address single delayed work is used for resolving multiple such resolve requests. This singled work is essentially performs two tasks. (a) any retry needed to resolve and (b) it executes the callback function for all completed requests While work is executing callbacks, any new work scheduled on for this workqueue is lost because workqueue has completed looking at all pending requests and now looking at callbacks, but work is still under execution. Any further retry to look at pending requests in process_req() after executing callbacks would lead to similar race condition (may be reduce the probably further but doesn't eliminate it). Retrying to enqueue work that from queue_req() context is not something rest of the kernel modules have followed. Therefore fix in this patch utilizes kernel facility to enqueue multiple work items to a workqueue. This ensures that no such requests gets lost in synchronization. Request list is still maintained so that rdma_cancel_addr() can unlink the request and get the completion with error sooner. Neighbour update event handling continues to be handled in same way as before. Additionally process_req() work entry cancels any pending work for a request that gets completed while processing those requests. Originally ib_addr was ST workqueue, but it became MT work queue with patch of [1]. This patch again makes it similar to ST so that neighbour update events handler work item doesn't race with other work items. In one such below trace, (though on 4.5 based kernel) it can be seen that process_req() never executed the callback, which is likely for an event that was schedule by queue_req() when previous callback was getting executed by workqueue. [] schedule+0x3e/0x90 [] schedule_timeout+0x1b5/0x210 [] ? ip_route_output_flow+0x27/0x70 [] ? addr_resolve+0x149/0x1b0 [ib_addr] [] wait_for_completion+0x10f/0x170 [] ? try_to_wake_up+0x210/0x210 [] ? rdma_copy_addr+0xa0/0xa0 [ib_addr] [] rdma_addr_find_l2_eth_by_grh+0x1d0/0x278 [ib_addr] [] ? sub_alloc+0x77/0x1c0 [] ib_init_ah_from_wc+0x3a7/0x5a0 [ib_core] [] cm_req_handler+0xea/0x580 [ib_cm] [] ? __switch_to+0x212/0x5e0 [] cm_work_handler+0x6d/0x150 [ib_cm] [] process_one_work+0x151/0x4b0 [] worker_thread+0x120/0x480 [] ? __schedule+0x30b/0x890 [] ? process_one_work+0x4b0/0x4b0 [] ? process_one_work+0x4b0/0x4b0 [] kthread+0xce/0xf0 [] ? kthread_freezable_should_stop+0x70/0x70 [] ret_from_fork+0x42/0x70 [] ? kthread_freezable_should_stop+0x70/0x70 INFO: task kworker/u144:1:156520 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. kworker/u144:1 D ffff883ffe1d7600 0 156520 2 0x00000080 Workqueue: ib_addr process_req [ib_addr] ffff883f446fbbd8 0000000000000046 ffff881f95280000 ffff881ff24de200 ffff883f66120000 ffff883f446f8008 ffff881f95280000 ffff883f6f9208c4 ffff883f6f9208c8 00000000ffffffff ffff883f446fbbf8 ffffffff816b0dde [1] http://lkml.iu.edu/hypermail/linux/kernel/1608.1/05834.html Signed-off-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 62 ++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 14 deletions(-) commit b6bd53f9c4e825fca82fe1392157c78443c814ab Author: David Daney Date: Thu Aug 3 17:10:12 2017 -0700 MIPS: Add missing file for eBPF JIT. Inexplicably, commit f381bf6d82f0 ("MIPS: Add support for eBPF JIT.") lost a file somewhere on its path to Linus' tree. Add back the missing ebpf_jit.c so that we can build with CONFIG_BPF_JIT selected. This version of ebpf_jit.c is identical to the original except for two minor change need to resolve conflicts with changes merged from the BPF branch: A) Set prog->jited_len = image_size; B) Use BPF_TAIL_CALL instead of BPF_CALL | BPF_X Fixes: f381bf6d82f0 ("MIPS: Add support for eBPF JIT.") Signed-off-by: David Daney Acked-by: Daniel Borkmann Signed-off-by: David S. Miller arch/mips/net/ebpf_jit.c | 1950 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1950 insertions(+) commit 7a97325191eecd1343c819291bce48fe0024f7dd Merge: 1aff0c3 bad1926 Author: David S. Miller Date: Fri Aug 4 11:18:01 2017 -0700 Merge branch 's390-bpf-jit-fixes' Daniel Borkmann says: ==================== Two BPF fixes for s390 Found while testing some other work touching JITs. ==================== Signed-off-by: David S. Miller commit bad1926dd2f60bbb4af5223ace3a7b34a0219a66 Author: Daniel Borkmann Date: Fri Aug 4 14:20:55 2017 +0200 bpf, s390: fix build for libbpf and selftest suite The BPF feature test as well as libbpf is missing the __NR_bpf define for s390 and currently refuses to compile (selftest suite depends on libbpf as well). Similar issue was fixed some time ago via b0c47807d31d ("bpf: Add sparc support to tools and samples."), just do the same and add definitions. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller tools/build/feature/test-bpf.c | 2 ++ tools/lib/bpf/bpf.c | 2 ++ 2 files changed, 4 insertions(+) commit b0a0c2566f28e71e5e32121992ac8060cec75510 Author: Daniel Borkmann Date: Fri Aug 4 14:20:54 2017 +0200 bpf, s390: fix jit branch offset related to ldimm64 While testing some other work that required JIT modifications, I run into test_bpf causing a hang when JIT enabled on s390. The problematic test case was the one from ddc665a4bb4b (bpf, arm64: fix jit branch offset related to ldimm64), and turns out that we do have a similar issue on s390 as well. In bpf_jit_prog() we update next instruction address after returning from bpf_jit_insn() with an insn_count. bpf_jit_insn() returns either -1 in case of error (e.g. unsupported insn), 1 or 2. The latter is only the case for ldimm64 due to spanning 2 insns, however, next address is only set to i + 1 not taking actual insn_count into account, thus fix is to use insn_count instead of 1. bpf_jit_enable in mode 2 provides also disasm on s390: Before fix: 000003ff800349b6: a7f40003 brc 15,3ff800349bc ; target 000003ff800349ba: 0000 unknown 000003ff800349bc: e3b0f0700024 stg %r11,112(%r15) 000003ff800349c2: e3e0f0880024 stg %r14,136(%r15) 000003ff800349c8: 0db0 basr %r11,%r0 000003ff800349ca: c0ef00000000 llilf %r14,0 000003ff800349d0: e320b0360004 lg %r2,54(%r11) 000003ff800349d6: e330b03e0004 lg %r3,62(%r11) 000003ff800349dc: ec23ffeda065 clgrj %r2,%r3,10,3ff800349b6 ; jmp 000003ff800349e2: e3e0b0460004 lg %r14,70(%r11) 000003ff800349e8: e3e0b04e0004 lg %r14,78(%r11) 000003ff800349ee: b904002e lgr %r2,%r14 000003ff800349f2: e3b0f0700004 lg %r11,112(%r15) 000003ff800349f8: e3e0f0880004 lg %r14,136(%r15) 000003ff800349fe: 07fe bcr 15,%r14 After fix: 000003ff80ef3db4: a7f40003 brc 15,3ff80ef3dba 000003ff80ef3db8: 0000 unknown 000003ff80ef3dba: e3b0f0700024 stg %r11,112(%r15) 000003ff80ef3dc0: e3e0f0880024 stg %r14,136(%r15) 000003ff80ef3dc6: 0db0 basr %r11,%r0 000003ff80ef3dc8: c0ef00000000 llilf %r14,0 000003ff80ef3dce: e320b0360004 lg %r2,54(%r11) 000003ff80ef3dd4: e330b03e0004 lg %r3,62(%r11) 000003ff80ef3dda: ec230006a065 clgrj %r2,%r3,10,3ff80ef3de6 ; jmp 000003ff80ef3de0: e3e0b0460004 lg %r14,70(%r11) 000003ff80ef3de6: e3e0b04e0004 lg %r14,78(%r11) ; target 000003ff80ef3dec: b904002e lgr %r2,%r14 000003ff80ef3df0: e3b0f0700004 lg %r11,112(%r15) 000003ff80ef3df6: e3e0f0880004 lg %r14,136(%r15) 000003ff80ef3dfc: 07fe bcr 15,%r14 test_bpf.ko suite runs fine after the fix. Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Signed-off-by: Daniel Borkmann Tested-by: Michael Holzheu Signed-off-by: David S. Miller arch/s390/net/bpf_jit_comp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1aff0c3402fbda8c629b12f5490977717cc0e2ab Merge: 337f1b0 852cfee Author: David S. Miller Date: Fri Aug 4 11:15:08 2017 -0700 Merge branch 'mlxsw-Couple-of-fixes' Jiri Pirko says: ==================== mlxsw: Couple of fixes Ido says: The first patch prevents us from warning about valid situations that can happen due to the fact that some operations in switchdev are deferred. Second patch fixes a long standing problem in which we didn't correctly free resources upon module removal, resulting in a memory leak. ==================== Signed-off-by: David S. Miller commit 852cfeed0ebe93a1c1e0c153c04a57221f72bd7e Author: Ido Schimmel Date: Fri Aug 4 14:12:30 2017 +0200 mlxsw: spectrum_switchdev: Release multicast groups during fini Each multicast group (MID) stores a bitmap of ports to which a packet should be forwarded to in case an MDB entry associated with the MID is hit. Since the initial introduction of IGMP snooping in commit 3a49b4fde2a1 ("mlxsw: Adding layer 2 multicast support") the driver didn't correctly free these multicast groups upon ungraceful situations such as the removal of the upper bridge device or module removal. The correct way to fix this is to associate each MID with the bridge ports member in it and then drop the reference in case the bridge port is destroyed, but this will result in a lot more code and will be fixed in net-next. For now, upon module removal, traverse the MID list and release each one. Fixes: 3a49b4fde2a1 ("mlxsw: Adding layer 2 multicast support") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 17b334a876fe121abbd6634ace83ca58deea4bc5 Author: Ido Schimmel Date: Fri Aug 4 14:12:29 2017 +0200 mlxsw: spectrum_switchdev: Don't warn about valid situations Some operations in the bridge driver such as MDB deletion are preformed in an atomic context and thus deferred to a process context by the switchdev infrastructure. Therefore, by the time the operation is performed by the underlying device driver it's possible the bridge port context is already gone. This is especially true for removal flows, but theoretically can also be invoked during addition. Remove the warnings in such situations and return normally. Fixes: c57529e1d5d8 ("mlxsw: spectrum: Replace vPorts with Port-VLAN") Fixes: 3922285d96e7 ("net: bridge: Add support for offloading port attributes") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit fdaccf74fe83ab3438df014efd55788a1dd414b5 Author: Vijay Kumar Date: Fri Jul 28 19:29:32 2017 -0600 sparc64: Increase max_phys_bits to 51 and VA bits to 53 for M8. On M8 chips, use a max_phys_bits value of 51. Also, M8 supports VA bits up to 54 bits. However, for now restrict VA bits to 53 due to 4-level pagetable limitation. Signed-off-by: Vijay Kumar Reviewed-by: Bob Picco Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 7d484acb2f90643de7e242fd47e48c3ebb22df3a Author: Allen Pais Date: Mon Jul 24 11:44:18 2017 +0530 sparc64: recognize and support sparc M8 cpu type Recognize SPARC-M8 cpu type, hardware caps and cpu distribution map. Signed-off-by: Allen Pais Signed-off-by: David Aldridge Signed-off-by: David S. Miller arch/sparc/include/asm/spitfire.h | 2 ++ arch/sparc/kernel/cpu.c | 6 ++++++ arch/sparc/kernel/cpumap.c | 1 + arch/sparc/kernel/head_64.S | 6 ++++++ arch/sparc/kernel/setup_64.c | 15 +++++++++++++-- arch/sparc/mm/init_64.c | 2 ++ 6 files changed, 30 insertions(+), 2 deletions(-) commit 9e48cd4a77d5170433a2e611eeda7accdf96604d Author: Allen Pais Date: Mon Jul 24 11:44:17 2017 +0530 sparc64: properly name the cpu constants Acked-by: Sam Ravnborg Acked-by: David S. Miller Signed-off-by: Allen Pais Signed-off-by: David S. Miller arch/sparc/include/asm/spitfire.h | 14 ++++++++++++++ arch/sparc/kernel/head_64.S | 16 ++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) commit 0a23ea65ce9f10ec2ea392571006b781b150327f Merge: c63716a 0ede1c4 Author: Linus Torvalds Date: Fri Aug 4 10:17:45 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: - block interrupts properly across the entire MMU context change (both the hw MMU context change and the TSB table change) so that we don't get a perf event interrupt in the middle. From Rob Gardner. - be sure to register hugepages early enough, from Nitin Gupta. - UltraSPARC-III user copy exception handling would return garbage for the copied length in some circumstances. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix exception handling in UltraSPARC-III memcpy. sbus: Convert to using %pOF instead of full_name sparc: defconfig: Cleanup from old Kconfig options sparc64: Register hugepages during arch init sparc64: Prevent perf from running during super critical sections commit c63716ab4d77f3df7d12260fc62cbf847c2a85d1 Merge: a64c40e ae78dd8 Author: Linus Torvalds Date: Fri Aug 4 10:15:11 2017 -0700 Merge tag 'ceph-for-4.13-rc4' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A bunch of fixes and follow-ups for -rc1 Luminous patches: issues with ->reencode_message() and last minute RADOS semantic changes in v12.1.2" * tag 'ceph-for-4.13-rc4' of git://github.com/ceph/ceph-client: libceph: make RECOVERY_DELETES feature create a new interval libceph: upmap semantic changes crush: assume weight_set != null imples weight_set_size > 0 libceph: fallback for when there isn't a pool-specific choose_arg libceph: don't call ->reencode_message() more than once per message libceph: make encode_request_*() work with r_mempool requests commit a64c40e79fb20c15e42e184d7cde30f900d138eb Merge: 83b89ea 5ef26e9 Author: Linus Torvalds Date: Fri Aug 4 10:11:13 2017 -0700 Merge tag 'sound-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Now we hit the usual ASoC-fix-flood in the middle of release. Most of the changes are trivial and device-specific, while one significant change is the fix for unbalanced of_graph_*() refcounts. This involved a change in the graph API itself that had been a bit messy" * tag 'sound-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix speaker output from VAIO VPCL14M1R device property: Fix usecount for of_graph_get_port_parent() ASoC: rt5665: fix wrong register for bclk ratio control ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform ASoC: codecs: msm8916-analog: fix DIG_CLK_CTL_RXD3_CLK_EN define ASoC: Intel: Skylake: Fix missing sentinels in sst_acpi_mach ASoC: sh: hac: add missing "int ret" ASoC: samsung: odroid: Fix EPLL frequency values ASoC: sgtl5000: Use snd_soc_kcontrol_codec() ASoC: rt5665: fix GPIO6 pin function define ASoC: ux500: Restore platform DAI assignments ASoC: fix pcm-creation regression ASoC: do not close shared backend dailink ASoC: pxa: SND_PXA2XX_SOC should depend on HAS_DMA ASoC: Intel: Skylake: Fix default dma_buffer_size ASoC: rt5663: Update the HW default values based on the shipping version ASoC: imx-ssi: add check on platform_get_irq return value commit 83b89ea4ad3137f9bdcf043b4895fdb719bb3d47 Merge: 8145f37 74ddda7 Author: Linus Torvalds Date: Fri Aug 4 10:05:29 2017 -0700 Merge tag 'iommu-fixes-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - fix a scheduling-while-atomic bug in the AMD IOMMU driver. It was found after the checker was enabled earlier. - a fix for the virtual APIC code in the AMD IOMMU driver which delivers device interrupts directly into KVM guests for assigned devices. - fixes for the recently merged lock-less page-table code for ARM. The redundant TLB syncs got reverted and locks added again around the TLB sync code. - fix for error handling in arm_smmu_add_device() - address sanitization fix for arm io-pgtable code * tag 'iommu-fixes-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Fix schedule-while-atomic BUG in initialization code iommu/amd: Enable ga_log_intr when enabling guest_mode iommu/io-pgtable: Sanitise map/unmap addresses iommu/arm-smmu: Fix the error path in arm_smmu_add_device Revert "iommu/io-pgtable: Avoid redundant TLB syncs" iommu/mtk: Avoid redundant TLB syncs locally iommu/arm-smmu: Reintroduce locking around TLB sync operations commit 8145f373aedefe7ed73e54f0c36032a88cc29e1c Merge: 47d4758 7c84b8b Author: Linus Torvalds Date: Fri Aug 4 10:02:56 2017 -0700 Merge tag 'mmc-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of mmc fixes intended for v4.13-rc4. MMC core: - Fix NULL pointer dereference for block I/O during hotplug MMC host: - sdhci-of-at91: Fix card detect for non-removable cards" * tag 'mmc-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: block: bypass the queue even if usage is present for hotplug mmc: sdhci-of-at91: force card detect value for non removable devices commit 47d47585d04e1a23e7734118f8a317cbcda8c139 Merge: 841fe95 5669b998 Author: Linus Torvalds Date: Fri Aug 4 09:59:24 2017 -0700 Merge tag 'drm-fixes-for-v4.13-rc4' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Either my email ate everything or everyone is on holidays, either way all I can find is some lonely AMD fixes" [ Europe might be on vacation, and the Pacific NW is too hot for work. ] * tag 'drm-fixes-for-v4.13-rc4' of git://people.freedesktop.org/~airlied/linux: drm/amdgpu: Use list_del_init in amdgpu_mn_unregister drm/amdgpu: Fix undue fallthroughs in golden registers initialization drm/amdgpu: fix header on gfx9 clear state commit 841fe95303cc7b47485a142ed518599ffc55ac35 Merge: 869c058 3db40c3 Author: Linus Torvalds Date: Fri Aug 4 09:56:54 2017 -0700 Merge tag 'powerpc-4.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fixes for recently merged code: - a fix for the _PAGE_DEVMAP support, which was breaking KVM on Power9 radix - avoid a (harmless) lockdep warning in the early SMP code - return failure for some uses of dma_set_mask() rather than falling back to 32-bits - fix stack setup in watchdog soft_nmi_common() to use emergency stack - fix of_irq_to_resource() error check in of_fsl_spi_probe() Two fixes going to stable: - fix saving of Transactional Memory SPRs in core dump - fix __check_irq_replay missing decrementer interrupt And two misc: - fix 64-bit boot wrapper build with non-biarch compiler - work around a POWER9 PMU hang after state-loss idle Thanks to: Alistair Popple, Aneesh Kumar K.V, Cyril Bur, Gustavo Romero, Jose Ricardo Ziviani, Laurent Vivier, Nicholas Piggin, Oliver O'Halloran, Sergei Shtylyov, Suraj Jitindar Singh, Thomas Gleixner" * tag 'powerpc-4.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64: Fix __check_irq_replay missing decrementer interrupt powerpc/perf: POWER9 PMU stops after idle workaround powerpc/83xx/mpc832x_rdb: fix of_irq_to_resource() error check powerpc/64s: Fix stack setup in watchdog soft_nmi_common() powerpc/powernv/pci: Return failure for some uses of dma_set_mask() powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler powerpc/smp: Call smp_ops->setup_cpu() directly on the boot CPU powerpc/tm: Fix saving of TM SPRs in core dump powerpc/mm: Fix pmd/pte_devmap() on non-leaf entries commit 0ede1c401332173ab0693121dc6cde04a4dbf131 Author: David S. Miller Date: Fri Aug 4 09:47:52 2017 -0700 sparc64: Fix exception handling in UltraSPARC-III memcpy. Mikael Pettersson reported that some test programs in the strace-4.18 testsuite cause an OOPS. After some debugging it turns out that garbage values are returned when an exception occurs, causing the fixup memset() to be run with bogus arguments. The problem is that two of the exception handler stubs write the successfully copied length into the wrong register. Fixes: ee841d0aff64 ("sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.") Reported-by: Mikael Pettersson Tested-by: Mikael Pettersson Reviewed-by: Sam Ravnborg Signed-off-by: David S. Miller arch/sparc/lib/U3memcpy.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82cd588052815eb4146f9f7c5347ca5e32c56360 Author: Nick Desaulniers Date: Thu Aug 3 11:03:58 2017 -0700 arm64: avoid overflow in VA_START and PAGE_OFFSET The bitmask used to define these values produces overflow, as seen by this compiler warning: arch/arm64/kernel/head.S:47:8: warning: integer overflow in preprocessor expression #elif (PAGE_OFFSET & 0x1fffff) != 0 ^~~~~~~~~~~ arch/arm64/include/asm/memory.h:52:46: note: expanded from macro 'PAGE_OFFSET' #define PAGE_OFFSET (UL(0xffffffffffffffff) << (VA_BITS - 1)) ~~~~~~~~~~~~~~~~~~ ^ It would be preferrable to use GENMASK_ULL() instead, but it's not set up to be used from assembly (the UL() macro token pastes UL suffixes when not included in assembly sources). Suggested-by: Ard Biesheuvel Suggested-by: Yury Norov Suggested-by: Matthias Kaehlcke Signed-off-by: Nick Desaulniers Signed-off-by: Will Deacon arch/arm64/include/asm/memory.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6d332747fa5f0a6843b56b5b129168ba909336d1 Author: Catalin Marinas Date: Tue Jul 25 14:53:03 2017 +0100 arm64: Fix potential race with hardware DBM in ptep_set_access_flags() In a system with DBM (dirty bit management) capable agents there is a possible race between a CPU executing ptep_set_access_flags() (maybe non-DBM capable) and a hardware update of the dirty state (clearing of PTE_RDONLY). The scenario: a) the pte is writable (PTE_WRITE set), clean (PTE_RDONLY set) and old (PTE_AF clear) b) ptep_set_access_flags() is called as a result of a read access and it needs to set the pte to writable, clean and young (PTE_AF set) c) a DBM-capable agent, as a result of a different write access, is marking the entry as young (setting PTE_AF) and dirty (clearing PTE_RDONLY) The current ptep_set_access_flags() implementation would set the PTE_RDONLY bit in the resulting value overriding the DBM update and losing the dirty state. This patch fixes such race by setting PTE_RDONLY to the most permissive (lowest value) of the current entry and the new one. Fixes: 66dbd6e61a52 ("arm64: Implement ptep_set_access_flags() for hardware AF/DBM") Cc: Will Deacon Acked-by: Mark Rutland Acked-by: Steve Capper Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 41c454fa0e86e3d186abfe1598645ead667da4ac Merge: ae11985 6ea57ad Author: Arnd Bergmann Date: Fri Aug 4 13:22:33 2017 +0200 Merge tag 'davinci-fixes-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes Pull "DaVinci fixes for v4.13" from Sekhar Nori: Drop unused VPIF endpoints from device-tree. They should be used only when an actual remote-endpoint is connected. * tag 'davinci-fixes-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-lcdk: drop unused VPIF endpoints ARM: dts: da850-evm: drop unused VPIF endpoints commit ae119859a1bf228231c9a8f25f6b69cc92d447b0 Merge: 3d8db0a c50f9fb Author: Arnd Bergmann Date: Fri Aug 4 13:04:42 2017 +0200 Merge tag 'sunxi-fixes-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Pull "Allwinner fixes for 4.13" from Chen-Yu Tsai: Two fixes to correct the EMAC blocks memory region size to match the datasheet. One that converts raw A83T clock indices to macros from the clk dt-binding header, completing the A83T sunxi-ng clk driver. * tag 'sunxi-fixes-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: a83t: Switch to CCU device tree binding macros arm64: allwinner: sun50i-a64: Correct emac register size ARM: dts: sunxi: h3/h5: Correct emac register size commit 3d8db0a889a7f6a1f3a4f67bd4c598a7fd42141a Merge: 985333b 3ac8093 Author: Arnd Bergmann Date: Fri Aug 4 13:03:24 2017 +0200 Merge tag 'qcom-arm64-defconfig-fixes-for-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into fixes Pull "Qualcomm ARM64 based defconfig Fixes for v4.13-rc2" from Andy Gross: * Enable missing HWSPINLOCK * tag 'qcom-arm64-defconfig-fixes-for-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: defconfig: enable missing HWSPINLOCK commit 985333b0eef8603b02181c4ec0a722b82be9642d Author: Marc Gonzalez Date: Fri Jul 28 15:27:49 2017 +0200 ARM: dts: tango4: Request RGMII RX and TX clock delays RX and TX clock delays are required. Request them explicitly. Fixes: cad008b8a77e6 ("ARM: dts: tango4: Initial device trees") Cc: stable@vger.kernel.org Signed-off-by: Marc Gonzalez Signed-off-by: Arnd Bergmann arch/arm/boot/dts/tango4-vantage-1172.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f4233ee13fb89b70e56b2df7789e2a3d131c85e Author: Masahiro Yamada Date: Mon Jul 31 14:49:25 2017 +0900 bus: uniphier-system-bus: set up registers when resuming When resuming, set up registers that have been lost in the sleep state. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann drivers/bus/uniphier-system-bus.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 264e22afa3aee4017ef5be42c7d5069560334c44 Merge: 48cb953 fce8dc5 Author: Arnd Bergmann Date: Fri Aug 4 12:54:41 2017 +0200 Merge tag 'renesas-fixes3-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Pull "Third Round of Renesas ARM Based SoC Fixes for v4.13" from Simon Horman: Fix deadlock in regulator quirk for R-Car Gen 2 SoCs The da9063/da9210 regulator quirk for R-Car Gen2 boards uses a bus notifier, and unregisters the notifier when it is no longer needed. However, a notifier must not be unregistered from within the call chain. This bug went unnoticed, as blocking_notifier_chain_unregister() didn't take the semaphore during early boot. This is no longer the case as of upstream commit 1c3c5eab171590f8 ("sched/core: Enable might_sleep() and smp_processor_id() checks early") and a deadlock occurs. * tag 'renesas-fixes3-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: rcar-gen2: Fix deadlock in regulator quirk commit 48cb953e6d899f2b0fb38c8b69c260929107ad4c Merge: b99bba0 d7a65c4 Author: Arnd Bergmann Date: Fri Aug 4 12:53:21 2017 +0200 Merge tag 'mvebu-fixes-4.13-2' of git://git.infradead.org/linux-mvebu into fixes Pull "mvebu fixes for 4.13 (part 2)" from Gregory CLEMENT: All the fixes are for ARM64 mvebu: - Fix the RTC interrupt on A7K/A8K which was missed when switching from GIC to ICU - Mark the A7K/A8K crypto engine as dma coherent - Fix the number of GPIO on south bridge on Armada 3700 * tag 'mvebu-fixes-4.13-2' of git://git.infradead.org/linux-mvebu: ARM64: dts: marvell: armada-37xx: Fix the number of GPIO on south bridge arm64: dts: marvell: mark the cp110 crypto engine as dma coherent arm64: dts: marvell: use ICU for the CP110 slave RTC commit b99bba09a57591f4fe6d3704fb386ca3ae588c9c Merge: e86c86b 72fb2c8 Author: Arnd Bergmann Date: Fri Aug 4 12:50:52 2017 +0200 Merge tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into fixes Pull "Amlogic fixes for v4.13-rc" from Kevin Hilman: - 2 minor DT fixes * tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gxl-s905x-libretech-cc: fixup board definition ARM64: dts: meson-gx: use specific compatible for the AO pwms commit e86c86bc8e6f7a5ac28464276b187035e65c3c15 Merge: 1d20d8a ca12437 Author: Arnd Bergmann Date: Fri Aug 4 12:48:46 2017 +0200 Merge tag 'v4.13-rockchip-dts32fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes Pull "Rockchip dts32 fixes for 4.13" from Heiko Stübner: Fix for the recently added mali dt support. The example showed a wrong value, so fix it before it gets copy-pasted to much. * tag 'v4.13-rockchip-dts32fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: fix mali gpu node on rk3288 dt-bindings: gpu: drop wrong compatible from midgard binding example commit 02b6ed44304e458d68e454493ab272f4e3c3c53a Author: Tina Zhang Date: Fri Aug 4 17:39:41 2017 +0800 drm/i915/gvt: Initialize MMIO Block with HW state MMIO block with tracked mmio, is introduced for the sake of performance of searching tracked mmio. All the tracked mmio needs to get the initial value from the HW state during vGPU being created. This patch is to initialize the tracked registers in MMIO block with the HW state. v2: Add "Fixes:" line for this patch (Zhenyu) Fixes: 65f9f6febf12 ("drm/i915/gvt: Optimize MMIO register handling for some large MMIO blocks") Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/firmware.c | 11 ++++++++++- drivers/gpu/drm/i915/gvt/gvt.h | 12 ++++++++++++ drivers/gpu/drm/i915/gvt/handlers.c | 36 +++++++++++++++++------------------- 3 files changed, 39 insertions(+), 20 deletions(-) commit b5ddb6d54729d814356937572d6c9b599f10c29f Author: Vineet Gupta Date: Thu Aug 3 17:45:44 2017 +0530 ARCv2: PAE40: set MSB even if !CONFIG_ARC_HAS_PAE40 but PAE exists in SoC PAE40 confiuration in hardware extends some of the address registers for TLB/cache ops to 2 words. So far kernel was NOT setting the higher word if feature was not enabled in software which is wrong. Those need to be set to 0 in such case. Normally this would be done in the cache flush / tlb ops, however since these registers only exist conditionally, this would have to be conditional to a flag being set on boot which is expensive/ugly - specially for the more common case of PAE exists but not in use. Optimize that by zero'ing them once at boot - nobody will write to them afterwards Cc: stable@vger.kernel.org #4.4+ Signed-off-by: Vineet Gupta arch/arc/include/asm/mmu.h | 2 ++ arch/arc/mm/cache.c | 34 ++++++++++++++++++++++++++++------ arch/arc/mm/tlb.c | 12 +++++++++++- 3 files changed, 41 insertions(+), 7 deletions(-) commit 7d79cee2c6540ea64dd917a14e2fd63d4ac3d3c0 Author: Alexey Brodkin Date: Tue Aug 1 12:58:47 2017 +0300 ARCv2: PAE40: Explicitly set MSB counterpart of SLC region ops addresses It is necessary to explicitly set both SLC_AUX_RGN_START1 and SLC_AUX_RGN_END1 which hold MSB bits of the physical address correspondingly of region start and end otherwise SLC region operation is executed in unpredictable manner Without this patch, SLC flushes on HSDK (IOC disabled) were taking seconds. Cc: stable@vger.kernel.org #4.4+ Reported-by: Vladimir Kondratiev Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta [vgupta: PAR40 regs only written if PAE40 exist] arch/arc/include/asm/cache.h | 2 ++ arch/arc/mm/cache.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 2e332fec2f2c996f8d5447b0946ca43bb0ae4b42 Author: Vineet Gupta Date: Tue Jul 18 12:14:09 2017 -0700 ARC: dma: implement dma_unmap_page and sg variant Signed-off-by: Vineet Gupta arch/arc/mm/dma.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit b37174d95b0251611a80ef60abf03752e9d66d67 Author: Alexey Brodkin Date: Fri Jul 7 12:25:14 2017 +0300 ARCv2: SLC: Make sure busy bit is set properly for region ops c70c473396cb "ARCv2: SLC: Make sure busy bit is set properly on SLC flushing" fixes problem for entire SLC operation where the problem was initially caught. But given a nature of the issue it is perfectly possible for busy bit to be read incorrectly even when region operation was started. So extending initial fix for regional operation as well. Signed-off-by: Alexey Brodkin Cc: stable@vger.kernel.org #4.10 Signed-off-by: Vineet Gupta arch/arc/mm/cache.c | 3 +++ 1 file changed, 3 insertions(+) commit 33460f86ad2c982f3172a10b17948ccaf923f07f Author: Vineet Gupta Date: Fri Jul 28 16:53:50 2017 +0530 ARC: [plat-sim] Include this platform unconditionally Essentially remove CONFIG_ARC_PLAT_SIM There is no need for any platform specific code, just the board DTS match strings which we can include unconditionally Signed-off-by: Vineet Gupta arch/arc/Kconfig | 1 - arch/arc/Makefile | 2 +- arch/arc/configs/haps_hs_defconfig | 1 - arch/arc/configs/haps_hs_smp_defconfig | 1 - arch/arc/configs/nsim_700_defconfig | 1 - arch/arc/configs/nsim_hs_defconfig | 1 - arch/arc/configs/nsim_hs_smp_defconfig | 1 - arch/arc/configs/nsimosci_defconfig | 1 - arch/arc/configs/nsimosci_hs_defconfig | 1 - arch/arc/configs/nsimosci_hs_smp_defconfig | 1 - arch/arc/plat-sim/Kconfig | 13 ------------- arch/arc/plat-sim/platform.c | 5 ++++- 12 files changed, 5 insertions(+), 24 deletions(-) commit f862b31514bad66e48d9d4ff6036ee051cf36a6f Author: Eugeniy Paltsev Date: Mon Jun 26 14:47:25 2017 +0300 ARC: [plat-axs10x]: prepare dts files for enabling PAE40 on axs103 Enable 64bit adressing, where it needed, to make possible enabling PAE40 on axs103. This patch doesn't affect on any functionality. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/axc001.dtsi | 20 +++++++++----------- arch/arc/boot/dts/axc003.dtsi | 21 ++++++++++----------- arch/arc/boot/dts/axc003_idu.dtsi | 21 ++++++++++----------- arch/arc/boot/dts/axs10x_mb.dtsi | 2 +- 4 files changed, 30 insertions(+), 34 deletions(-) commit 80c471ea040ad9006ebff6d64221a04e8fa1b7f6 Author: Mark yao Date: Mon Jul 31 17:49:55 2017 +0800 drm/rockchip: vop: report error when check resource error The user would be confused while facing a error commit without any error report. Signed-off-by: Mark Yao Reviewed-by: Sandy huang Link: https://patchwork.freedesktop.org/patch/msgid/1501494596-7090-1-git-send-email-mark.yao@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 79a0b149d4e3d45fc46673f4b29a157776c174e2 Author: Mark yao Date: Mon Jul 31 17:49:50 2017 +0800 drm/rockchip: vop: round_up pitches to word align VOP pitch register is word align, need align to word. VOP_WIN0_VIR: bit[31:16] win0_vir_stride_uv Number of words of Win0 uv Virtual width bit[15:0] win0_vir_width Number of words of Win0 yrgb Virtual width ARGB888 : win0_vir_width RGB888 : (win0_vir_width*3/4) + (win0_vir_width%3) RGB565 : ceil(win0_vir_width/2) YUV : ceil(win0_vir_width/4) Signed-off-by: Mark Yao Reviewed-by: Sandy huang Link: https://patchwork.freedesktop.org/patch/msgid/1501494591-7034-1-git-send-email-mark.yao@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f04f5925ce763e07cb405d1fbe97a53b6c026a3 Author: Mark yao Date: Mon Jul 31 17:49:46 2017 +0800 drm/rockchip: vop: fix NV12 video display error fixup the scale calculation formula on the case src_height == (dst_height/2). Signed-off-by: Mark Yao Reviewed-by: Sandy huang Link: https://patchwork.freedesktop.org/patch/msgid/1501494586-6984-1-git-send-email-mark.yao@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 3 +++ 1 file changed, 3 insertions(+) commit da6c9bbf418dcb0f8be261f4353400fa959b1e92 Author: Mark yao Date: Mon Jul 31 17:49:42 2017 +0800 drm/rockchip: vop: fix iommu page fault when resume Iommu would get page fault with following path: vop_disable: 1, disable all windows and set vop config done 2, vop enter to standy, all windows not works, but their registers are not clean, when you read window's enable bit, may found the window is enable. vop_enable: 1, memcpy(vop->regsbak, vop->regs, len) save current vop registers to vop->regsbak, then you can found window is enable on regsbak. 2, VOP_WIN_SET(vop, win, gate, 1); force enable window gate, but gate and enable are on same hardware register, then window enable bit rewrite to vop hardware. 3, vop power on, and vop might try to scan destroyed buffer, then iommu get page fault. Move windows disable after vop regsbak restore, then vop regsbak mechanism would keep tracing the modify, everything would be safe. Signed-off-by: Mark Yao Reviewed-by: Sandy huang Link: https://patchwork.freedesktop.org/patch/msgid/1501494582-6934-1-git-send-email-mark.yao@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 33 +++++++++++++---------------- 1 file changed, 15 insertions(+), 18 deletions(-) commit 3db40c312c2c1eb2187c5731102fa8ff380e6e40 Author: Nicholas Piggin Date: Tue Aug 1 23:59:28 2017 +1000 powerpc/64: Fix __check_irq_replay missing decrementer interrupt If the decrementer wraps again and de-asserts the decrementer exception while hard-disabled, __check_irq_replay() has a test to notice the wrap when interrupts are re-enabled. The decrementer check must be done when clearing the PACA_IRQ_HARD_DIS flag, not when the PACA_IRQ_DEC flag is tested. Previously this worked because the decrementer interrupt was always the first one checked after clearing the hard disable flag, but HMI check was moved ahead of that, which introduced this bug. This can cause a missed decrementer interrupt if we soft-disable interrupts then take an HMI which is recorded in irq_happened, then hard-disable interrupts for > 4s to wrap the decrementer. Fixes: e0e0d6b7390b ("powerpc/64: Replay hypervisor maintenance interrupt first") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/irq.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 09539f9b123652e969894d6299ae0df2fe12cb5d Author: Nicholas Piggin Date: Thu Jul 20 11:53:22 2017 +1000 powerpc/perf: POWER9 PMU stops after idle workaround POWER9 DD2 PMU can stop after a state-loss idle in some conditions. A solution is to set then clear MMCRA[60] after wake from state-loss idle. MMCRA[60] is a non-architected bit, see the user manual for details. Signed-off-by: Nicholas Piggin Acked-by: Madhavan Srinivasan Reviewed-by: Vaidyanathan Srinivasan Acked-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5669b9989eaa664cacbad6a85631550bccdad963 Merge: 16f73eb 68c9793 Author: Dave Airlie Date: Fri Aug 4 11:43:14 2017 +1000 Merge branch 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Just a few small fixes for 4.13. * 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: Use list_del_init in amdgpu_mn_unregister drm/amdgpu: Fix undue fallthroughs in golden registers initialization drm/amdgpu: fix header on gfx9 clear state commit 337f1b07db97b75bfd91eb333ff3ec3b82c5b1e6 Merge: b91d532 df92c83 Author: David S. Miller Date: Thu Aug 3 15:38:31 2017 -0700 Merge branch 'tcp-xmit-timer-rearming' Neal Cardwell says: ==================== tcp: fix xmit timer rearming to avoid stalls This patch series is a bug fix for a TCP loss recovery performance bug reported independently in recent netdev threads: (i) July 26, 2017: netdev thread "TCP fast retransmit issues" (ii) July 26, 2017: netdev thread: "[PATCH V2 net-next] TLP: Don't reschedule PTO when there's one outstanding TLP retransmission" Many thanks to Klavs Klavsen and Mao Wenan for the detailed reports, traces, and packetdrill test cases, which enabled us to root-cause this issue and verify the fix. - v1 -> v2: - In patch 2/3, changed an unclear comment in the pre-existing code in tcp_schedule_loss_probe() to be more clear (thanks to Eric Dumazet for suggesting we improve this). ==================== Signed-off-by: David S. Miller commit df92c8394e6ea0469e8056946ef8add740ab8046 Author: Neal Cardwell Date: Thu Aug 3 09:19:54 2017 -0400 tcp: fix xmit timer to only be reset if data ACKed/SACKed Fix a TCP loss recovery performance bug raised recently on the netdev list, in two threads: (i) July 26, 2017: netdev thread "TCP fast retransmit issues" (ii) July 26, 2017: netdev thread: "[PATCH V2 net-next] TLP: Don't reschedule PTO when there's one outstanding TLP retransmission" The basic problem is that incoming TCP packets that did not indicate forward progress could cause the xmit timer (TLP or RTO) to be rearmed and pushed back in time. In certain corner cases this could result in the following problems noted in these threads: - Repeated ACKs coming in with bogus SACKs corrupted by middleboxes could cause TCP to repeatedly schedule TLPs forever. We kept sending TLPs after every ~200ms, which elicited bogus SACKs, which caused more TLPs, ad infinitum; we never fired an RTO to fill in the holes. - Incoming data segments could, in some cases, cause us to reschedule our RTO or TLP timer further out in time, for no good reason. This could cause repeated inbound data to result in stalls in outbound data, in the presence of packet loss. This commit fixes these bugs by changing the TLP and RTO ACK processing to: (a) Only reschedule the xmit timer once per ACK. (b) Only reschedule the xmit timer if tcp_clean_rtx_queue() deems the ACK indicates sufficient forward progress (a packet was cumulatively ACKed, or we got a SACK for a packet that was sent before the most recent retransmit of the write queue head). This brings us back into closer compliance with the RFCs, since, as the comment for tcp_rearm_rto() notes, we should only restart the RTO timer after forward progress on the connection. Previously we were restarting the xmit timer even in these cases where there was no forward progress. As a side benefit, this commit simplifies and speeds up the TCP timer arming logic. We had been calling inet_csk_reset_xmit_timer() three times on normal ACKs that cumulatively acknowledged some data: 1) Once near the top of tcp_ack() to switch from TLP timer to RTO: if (icsk->icsk_pending == ICSK_TIME_LOSS_PROBE) tcp_rearm_rto(sk); 2) Once in tcp_clean_rtx_queue(), to update the RTO: if (flag & FLAG_ACKED) { tcp_rearm_rto(sk); 3) Once in tcp_ack() after tcp_fastretrans_alert() to switch from RTO to TLP: if (icsk->icsk_pending == ICSK_TIME_RETRANS) tcp_schedule_loss_probe(sk); This commit, by only rescheduling the xmit timer once per ACK, simplifies the code and reduces CPU overhead. This commit was tested in an A/B test with Google web server traffic. SNMP stats and request latency metrics were within noise levels, substantiating that for normal web traffic patterns this is a rare issue. This commit was also tested with packetdrill tests to verify that it fixes the timer behavior in the corner cases discussed in the netdev threads mentioned above. This patch is a bug fix patch intended to be queued for -stable relases. Fixes: 6ba8a3b19e76 ("tcp: Tail loss probe (TLP)") Reported-by: Klavs Klavsen Reported-by: Mao Wenan Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 25 ++++++++++++++++--------- net/ipv4/tcp_output.c | 9 --------- 2 files changed, 16 insertions(+), 18 deletions(-) commit a2815817ffa68c7933a43eb55836d6e789bd4389 Author: Neal Cardwell Date: Thu Aug 3 09:19:53 2017 -0400 tcp: enable xmit timer fix by having TLP use time when RTO should fire Have tcp_schedule_loss_probe() base the TLP scheduling decision based on when the RTO *should* fire. This is to enable the upcoming xmit timer fix in this series, where tcp_schedule_loss_probe() cannot assume that the last timer installed was an RTO timer (because we are no longer doing the "rearm RTO, rearm RTO, rearm TLP" dance on every ACK). So tcp_schedule_loss_probe() must independently figure out when an RTO would want to fire. In the new TLP implementation following in this series, we cannot assume that icsk_timeout was set based on an RTO; after processing a cumulative ACK the icsk_timeout we see can be from a previous TLP or RTO. So we need to independently recalculate the RTO time (instead of reading it out of icsk_timeout). Removing this dependency on the nature of icsk_timeout makes things a little easier to reason about anyway. Note that the old and new code should be equivalent, since they are both saying: "if the RTO is in the future, but at an earlier time than the normal TLP time, then set the TLP timer to fire when the RTO would have fired". Fixes: 6ba8a3b19e76 ("tcp: Tail loss probe (TLP)") Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit e1a10ef7fa876f8510aaec36ea5c0cf34baba410 Author: Neal Cardwell Date: Thu Aug 3 09:19:52 2017 -0400 tcp: introduce tcp_rto_delta_us() helper for xmit timer fix Pure refactor. This helper will be required in the xmit timer fix later in the patch series. (Because the TLP logic will want to make this calculation.) Fixes: 6ba8a3b19e76 ("tcp: Tail loss probe (TLP)") Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 10 ++++++++++ net/ipv4/tcp_input.c | 5 +---- 2 files changed, 11 insertions(+), 4 deletions(-) commit 869c058fbe741cadff09647c68dbeae7d012f52d Merge: 995d03a 796b755 Author: Linus Torvalds Date: Thu Aug 3 15:25:14 2017 -0700 Merge tag 'vfio-v4.13-rc4' of git://github.com/awilliam/linux-vfio Pull VFIO fixes from Alex Williamson: - SPAPR/EEH config build fix (Murilo Opsfelder Araujo) - Fix possible device lock deadlock (Alex Williamson) - Correctly size integrated endpoint PCIe capabilities (Alex Williamson) * tag 'vfio-v4.13-rc4' of git://github.com/awilliam/linux-vfio: vfio/pci: Fix handling of RC integrated endpoint PCIe capability size vfio/pci: Use pci_try_reset_function() on initial open include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH commit b91d532928dff2141ea9c107c3e73104d9843767 Author: Xin Long Date: Thu Aug 3 14:13:46 2017 +0800 ipv6: set rt6i_protocol properly in the route when it is installed After commit c2ed1880fd61 ("net: ipv6: check route protocol when deleting routes"), ipv6 route checks rt protocol when trying to remove a rt entry. It introduced a side effect causing 'ip -6 route flush cache' not to work well. When flushing caches with iproute, all route caches get dumped from kernel then removed one by one by sending DELROUTE requests to kernel for each cache. The thing is iproute sends the request with the cache whose proto is set with RTPROT_REDIRECT by rt6_fill_node() when kernel dumps it. But in kernel the rt_cache protocol is still 0, which causes the cache not to be matched and removed. So the real reason is rt6i_protocol in the route is not set when it is allocated. As David Ahern's suggestion, this patch is to set rt6i_protocol properly in the route when it is installed and remove the codes setting rtm_protocol according to rt6i_flags in rt6_fill_node. This is also an improvement to keep rt6i_protocol consistent with rtm_protocol. Fixes: c2ed1880fd61 ("net: ipv6: check route protocol when deleting routes") Reported-by: Jianlin Shi Suggested-by: David Ahern Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/route.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 995d03ae266d3f3bec8844d01b6c3ded19b9cc1c Merge: 8d3fe85 19ec8e4 Author: Linus Torvalds Date: Thu Aug 3 14:58:13 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "15 fixes" [ This does not merge the "fortify: use WARN instead of BUG for now" patch, which needs a bit of extra work to build cleanly with all configurations. Arnd is on it. - Linus ] * emailed patches from Andrew Morton : ocfs2: don't clear SGID when inheriting ACLs mm: allow page_cache_get_speculative in interrupt context userfaultfd: non-cooperative: flush event_wqh at release time ipc: add missing container_of()s for randstruct cpuset: fix a deadlock due to incomplete patching of cpusets_enabled() userfaultfd_zeropage: return -ENOSPC in case mm has gone mm: take memory hotplug lock within numa_zonelist_order_handler() mm/page_io.c: fix oops during block io poll in swapin path zram: do not free pool->size_class kthread: fix documentation build warning kasan: avoid -Wmaybe-uninitialized warning userfaultfd: non-cooperative: notify about unmap of destination during mremap mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries pid: kill pidhash_size in pidhash_init() mm/hugetlb.c: __get_user_pages ignores certain follow_hugetlb_page errors commit 8d3fe85f07a99cbf82f12c486414eda1d186bfa1 Merge: 73784fb 3de559d Author: Linus Torvalds Date: Thu Aug 3 12:37:12 2017 -0700 Merge tag 'acpi-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix two issues in the ACPI SoC drivers (Intel LPSS and AMD APD), a crash in the PCC mailbox initialization code and a WDAT watchdog initialization failure. Specifics: - Fix a device ID of Hisilicon Hip07/08 in the ACPI APD (AMD SoC) driver (Hanjun Guo). - Fix list corruption (introduced during the 4.11 cycle) in the ACPI LPSS (Intel SoC) driver (Hans de Goede). - Fix PCC mailbox handling code crash during initialization when PCCT is not present and PCC channel 0 is requested (Hoan Tran). - Fix a WDAT watchdog initialization issue causing platform device creation to fail due to partially overlapping address ranges in resources (Ryan Kennedy)" * tag 'acpi-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: APD: Fix HID for Hisilicon Hip07/08 mailbox: pcc: Fix crash when request PCC channel 0 ACPI / watchdog: Fix init failure with overlapping register regions ACPI / LPSS: Only call pwm_add_table() for the first PWM controller commit 73784fb73be6fc0a5a204468bc39a2b95f28424b Merge: 19ec50a43 78aa904 Author: Linus Torvalds Date: Thu Aug 3 12:32:49 2017 -0700 Merge tag 'pm-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two cpufreq issues, one introduced recently and one related to recent changes, fix cpufreq documentation, fix up recently added code in the Thunderbolt driver and update runtime PM framework documentation. Specifics: - Fix the handling of the scaling_cur_freq cpufreq policy attribute on x86 systems with the MPERF/APERF registers present to make it behave more as expected after recent changes (Rafael Wysocki). - Drop a leftover callback from the intel_pstate driver which also prevents the cpuinfo_cur_freq cpufreq policy attribute from being incorrectly exposed when intel_pstate works in the active mode (Rafael Wysocki). - Add a missing piece describing the cpuinfo_cur_freq policy attribute to cpufreq documentation (Rafael Wysocki). - Fix up a recently added part of the Thunderbolt driver to avoid aborting system suspends if its mailbox commands time out (Rafael Wysocki). - Update device runtime PM framework documentation to reflect the current behavior of the code (Johan Hovold)" * tag 'pm-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thunderbolt: icm: Ignore mailbox errors in icm_suspend() cpufreq: x86: Make scaling_cur_freq behave more as expected PM / runtime: Document new pm_runtime_set_suspended() constraint cpufreq: docs: Add missing cpuinfo_cur_freq description cpufreq: intel_pstate: Drop ->get from intel_pstate structure commit 3de559d4df546442e28fab91e1c9cab3f19ca24f Merge: 16f73eb f7f3dd5 31e86cb ecfc159 Author: Rafael J. Wysocki Date: Thu Aug 3 20:30:18 2017 +0200 Merge branches 'acpi-soc', 'acpi-wdat' and 'acpi-cppc' * acpi-soc: ACPI: APD: Fix HID for Hisilicon Hip07/08 ACPI / LPSS: Only call pwm_add_table() for the first PWM controller * acpi-wdat: ACPI / watchdog: Fix init failure with overlapping register regions * acpi-cppc: mailbox: pcc: Fix crash when request PCC channel 0 commit 78aa904a773bfd008606c2065709e23173180ace Merge: 8a05c31 c3bf5bb a684c5b Author: Rafael J. Wysocki Date: Thu Aug 3 20:29:45 2017 +0200 Merge branches 'pm-core' and 'pm-misc' * pm-core: PM / runtime: Document new pm_runtime_set_suspended() constraint * pm-misc: thunderbolt: icm: Ignore mailbox errors in icm_suspend() commit 8a05c3115dc0f239b46659d9d190e370d6413ff1 Merge: 16f73eb 4815d3c c2e3af1 22baebd Author: Rafael J. Wysocki Date: Thu Aug 3 20:29:24 2017 +0200 Merge branches 'pm-cpufreq-x86', 'pm-cpufreq-docs' and 'intel_pstate' * pm-cpufreq-x86: cpufreq: x86: Make scaling_cur_freq behave more as expected * pm-cpufreq-docs: cpufreq: docs: Add missing cpuinfo_cur_freq description * intel_pstate: cpufreq: intel_pstate: Drop ->get from intel_pstate structure commit 8cc34c8d6113bef00a3a6d59ee101145cc350d61 Merge: 2326744 fd1b866 Author: Greg Kroah-Hartman Date: Thu Aug 3 09:51:02 2017 -0700 Merge tag 'usb-serial-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.13-rc4 Here are some new device ids for v4.13-rc4. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit 2dda640040876cd8ae646408b69eea40c24f9ae9 Author: Eric Dumazet Date: Wed Aug 2 23:10:46 2017 -0700 net: fix keepalive code vs TCP_FASTOPEN_CONNECT syzkaller was able to trigger a divide by 0 in TCP stack [1] Issue here is that keepalive timer needs to be updated to not attempt to send a probe if the connection setup was deferred using TCP_FASTOPEN_CONNECT socket option added in linux-4.11 [1] divide error: 0000 [#1] SMP CPU: 18 PID: 0 Comm: swapper/18 Not tainted task: ffff986f62f4b040 ti: ffff986f62fa2000 task.ti: ffff986f62fa2000 RIP: 0010:[] [] __tcp_select_window+0x8d/0x160 Call Trace: [] tcp_transmit_skb+0x11/0x20 [] tcp_xmit_probe_skb+0xc1/0xe0 [] tcp_write_wakeup+0x68/0x160 [] tcp_keepalive_timer+0x17b/0x230 [] call_timer_fn+0x39/0xf0 [] run_timer_softirq+0x1d7/0x280 [] __do_softirq+0xcb/0x257 [] irq_exit+0x9c/0xb0 [] smp_apic_timer_interrupt+0x6a/0x80 [] apic_timer_interrupt+0x7f/0x90 [] ? cpuidle_enter_state+0x13a/0x3b0 [] ? cpuidle_enter_state+0x11d/0x3b0 Tested: Following packetdrill no longer crashes the kernel `echo 0 >/proc/sys/net/ipv4/tcp_timestamps` // Cache warmup: send a Fast Open cookie request 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 +0 setsockopt(3, SOL_TCP, TCP_FASTOPEN_CONNECT, [1], 4) = 0 +0 connect(3, ..., ...) = -1 EINPROGRESS (Operation is now in progress) +0 > S 0:0(0) +.01 < S. 123:123(0) ack 1 win 14600 +0 > . 1:1(0) ack 1 +0 close(3) = 0 +0 > F. 1:1(0) ack 1 +0 < F. 1:1(0) ack 2 win 92 +0 > . 2:2(0) ack 2 +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 4 +0 fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 +0 setsockopt(4, SOL_TCP, TCP_FASTOPEN_CONNECT, [1], 4) = 0 +0 setsockopt(4, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 +.01 connect(4, ..., ...) = 0 +0 setsockopt(4, SOL_TCP, TCP_KEEPIDLE, [5], 4) = 0 +10 close(4) = 0 `echo 1 >/proc/sys/net/ipv4/tcp_timestamps` Fixes: 19f6d3f3c842 ("net/tcp-fastopen: Add new API support") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Wei Wang Cc: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4d2bbb0ef88ffd4bc91e3d39917d2dd49dddf054 Merge: ed25497 54e22f2 Author: David S. Miller Date: Thu Aug 3 09:23:11 2017 -0700 Merge tag 'batadv-net-for-davem-20170802' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - fix TT sync flag inconsistency problems, which can lead to excess packets, by Linus Luessing ==================== Signed-off-by: David S. Miller commit 2326744159620e521896e0edc9736d659f228955 Merge: 45d7386 b7d44c3 Author: Greg Kroah-Hartman Date: Thu Aug 3 09:21:08 2017 -0700 Merge tag 'fixes-for-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.13-rc4 Another fix for isochronous transfers on dwc3. This time around, we're making sure that we use correct PIDs in all transfer sizes. MSM PHY driver got a fix for the use of devm_regulator_bulk_get() API which will avoid kernel crashes. Renesas DRD driver got 3 fixes: a fix on giveback, a fix for proper controller programming and the removal of set-but-never-used variable. commit 53a5abd8392e5f6e5b134fe47eb9f2400256d93e Merge: 6550c4d 3af4e41 Author: Radim Krčmář Date: Thu Aug 3 17:59:58 2017 +0200 Merge tag 'kvm-arm-for-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM Fixes for v4.13-rc4 - Yet another race with VM destruction plugged - A set of small vgic fixes commit 61c12b49e1c9c77d7a1bcc161de540d0fd21cf0c Author: Ashish Samant Date: Wed Jul 12 19:26:58 2017 -0700 fuse: Dont call set_page_dirty_lock() for ITER_BVEC pages for async_dio Commit 8fba54aebbdf ("fuse: direct-io: don't dirty ITER_BVEC pages") fixes the ITER_BVEC page deadlock for direct io in fuse by checking in fuse_direct_io(), whether the page is a bvec page or not, before locking it. However, this check is missed when the "async_dio" mount option is enabled. In this case, set_page_dirty_lock() is called from the req->end callback in request_end(), when the fuse thread is returning from userspace to respond to the read request. This will cause the same deadlock because the bvec condition is not checked in this path. Here is the stack of the deadlocked thread, while returning from userspace: [13706.656686] INFO: task glusterfs:3006 blocked for more than 120 seconds. [13706.657808] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [13706.658788] glusterfs D ffffffff816c80f0 0 3006 1 0x00000080 [13706.658797] ffff8800d6713a58 0000000000000086 ffff8800d9ad7000 ffff8800d9ad5400 [13706.658799] ffff88011ffd5cc0 ffff8800d6710008 ffff88011fd176c0 7fffffffffffffff [13706.658801] 0000000000000002 ffffffff816c80f0 ffff8800d6713a78 ffffffff816c790e [13706.658803] Call Trace: [13706.658809] [] ? bit_wait_io_timeout+0x80/0x80 [13706.658811] [] schedule+0x3e/0x90 [13706.658813] [] schedule_timeout+0x1b5/0x210 [13706.658816] [] ? gup_pud_range+0x1db/0x1f0 [13706.658817] [] ? kvm_clock_read+0x1e/0x20 [13706.658819] [] ? kvm_clock_get_cycles+0x9/0x10 [13706.658822] [] ? ktime_get+0x52/0xc0 [13706.658824] [] io_schedule_timeout+0xa4/0x110 [13706.658826] [] bit_wait_io+0x36/0x50 [13706.658828] [] __wait_on_bit_lock+0x76/0xb0 [13706.658831] [] ? lock_request+0x46/0x70 [fuse] [13706.658834] [] __lock_page+0xaa/0xb0 [13706.658836] [] ? wake_atomic_t_function+0x40/0x40 [13706.658838] [] set_page_dirty_lock+0x58/0x60 [13706.658841] [] fuse_release_user_pages+0x58/0x70 [fuse] [13706.658844] [] ? fuse_aio_complete+0x190/0x190 [fuse] [13706.658847] [] fuse_aio_complete_req+0x29/0x90 [fuse] [13706.658849] [] request_end+0xd9/0x190 [fuse] [13706.658852] [] fuse_dev_do_write+0x336/0x490 [fuse] [13706.658854] [] fuse_dev_write+0x6e/0xa0 [fuse] [13706.658857] [] ? security_file_permission+0x23/0x90 [13706.658859] [] do_iter_readv_writev+0x60/0x90 [13706.658862] [] ? fuse_dev_splice_write+0x350/0x350 [fuse] [13706.658863] [] do_readv_writev+0x171/0x1f0 [13706.658866] [] ? try_to_wake_up+0x210/0x210 [13706.658868] [] vfs_writev+0x41/0x50 [13706.658870] [] SyS_writev+0x56/0xf0 [13706.658872] [] ? syscall_trace_leave+0xf1/0x160 [13706.658874] [] system_call_fastpath+0x12/0x71 Fix this by making should_dirty a fuse_io_priv parameter that can be checked in fuse_aio_complete_req(). Reported-by: Tiger Yang Signed-off-by: Ashish Samant Signed-off-by: Miklos Szeredi fs/fuse/file.c | 6 +++--- fs/fuse/fuse_i.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 3af4e414af5ce014d1f88cd816d997048298b310 Author: Christoffer Dall Date: Wed Aug 2 16:28:42 2017 +0200 KVM: arm/arm64: vgic: Use READ_ONCE fo cmpxchg There is a small chance that the compiler could generate separate loads for the dist->propbaser which could be modified from another CPU. As we want to make sure we atomically update the entire value, and don't race with other updates, guarantee that the cmpxchg operation compares against the original value. Acked-by: Catalin Marinas Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-mmio-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6550c4df7e50d09f86385ce20fd7e969a5638da3 Author: Wanpeng Li Date: Mon Jul 31 19:25:27 2017 -0700 KVM: nVMX: Fix interrupt window request with "Acknowledge interrupt on exit" ------------[ cut here ]------------ WARNING: CPU: 5 PID: 2288 at arch/x86/kvm/vmx.c:11124 nested_vmx_vmexit+0xd64/0xd70 [kvm_intel] CPU: 5 PID: 2288 Comm: qemu-system-x86 Not tainted 4.13.0-rc2+ #7 RIP: 0010:nested_vmx_vmexit+0xd64/0xd70 [kvm_intel] Call Trace: vmx_check_nested_events+0x131/0x1f0 [kvm_intel] ? vmx_check_nested_events+0x131/0x1f0 [kvm_intel] kvm_arch_vcpu_ioctl_run+0x5dd/0x1be0 [kvm] ? vmx_vcpu_load+0x1be/0x220 [kvm_intel] ? kvm_arch_vcpu_load+0x62/0x230 [kvm] kvm_vcpu_ioctl+0x340/0x700 [kvm] ? kvm_vcpu_ioctl+0x340/0x700 [kvm] ? __fget+0xfc/0x210 do_vfs_ioctl+0xa4/0x6a0 ? __fget+0x11d/0x210 SyS_ioctl+0x79/0x90 do_syscall_64+0x8f/0x750 ? trace_hardirqs_on_thunk+0x1a/0x1c entry_SYSCALL64_slow_path+0x25/0x25 This can be reproduced by booting L1 guest w/ 'noapic' grub parameter, which means that tells the kernel to not make use of any IOAPICs that may be present in the system. Actually external_intr variable in nested_vmx_vmexit() is the req_int_win variable passed from vcpu_enter_guest() which means that the L0's userspace requests an irq window. I observed the scenario (!kvm_cpu_has_interrupt(vcpu) && L0's userspace reqeusts an irq window) is true, so there is no interrupt which L1 requires to inject to L2, we should not attempt to emualte "Acknowledge interrupt on exit" for the irq window requirement in this scenario. This patch fixes it by not attempt to emulate "Acknowledge interrupt on exit" if there is no L1 requirement to inject an interrupt to L2. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li [Added code comment to make it obvious that the behavior is not correct. We should do a userspace exit with open interrupt window instead of the nested VM exit. This patch still improves the behavior, so it was accepted as a (temporary) workaround.] Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit b7d44c36a6f6d956e1539e0dd42f98b26e5a4684 Author: Yoshihiro Shimoda Date: Fri Jul 28 19:28:57 2017 +0900 usb: renesas_usbhs: gadget: fix unused-but-set-variable warning The commit b8b9c974afee ("usb: renesas_usbhs: gadget: disable all eps when the driver stops") causes the unused-but-set-variable warning. But, if the usbhsg_ep_disable() will return non-zero value, udc/core.c doesn't clear the ep->enabled flag. So, this driver should not return non-zero value, if the pipe is zero because this means the pipe is already disabled. Otherwise, the ep->enabled flag is never cleared when the usbhsg_ep_disable() is called by the renesas_usbhs driver first. Fixes: b8b9c974afee ("usb: renesas_usbhs: gadget: disable all eps when the driver stops") Fixes: 11432050f070 ("usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()") Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/mod_gadget.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2acecd58969897795cf015c9057ebd349a3fda8a Author: Yoshihiro Shimoda Date: Wed Aug 2 13:21:45 2017 +0900 usb: renesas_usbhs: Fix UGCTRL2 value for R-Car Gen3 The latest HW manual (Rev.0.55) shows us this UGCTRL2.VBUSSEL bit. If the bit sets to 1, the VBUS drive is controlled by phy related registers (called "UCOM Registers" on the manual). Since R-Car Gen3 environment will control VBUS by phy-rcar-gen3-usb2 driver, the UGCTRL2.VBUSSEL bit should be set to 1. So, this patch fixes the register's value. Otherwise, even if the ID pin indicates to peripheral, the R-Car will output USBn_PWEN to 1 when a host driver is running. Fixes: de18757e272d ("usb: renesas_usbhs: add R-Car Gen3 power control" Cc: # v4.6+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/rcar3.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5a8141bd41f0e7f7758956e2340e10cdf5f2b0b9 Author: Rajendra Nayak Date: Wed Aug 2 13:15:42 2017 +0530 usb: phy: phy-msm-usb: Fix usage of devm_regulator_bulk_get() The regulator_bulk_data pointer passed to devm_regulator_bulk_get() is used to store the client handles for the regulators, which is later used by devm_regulator_bulk_release() to free the regulators. Passing a local array as is done here means the memory used to store the handles is freed causing the handles to be corrupted, resulting in a crash when devm_regulator_bulk_release() tries to free them. Fix this my moving the array inside of the msm_otg structure. Signed-off-by: Rajendra Nayak Signed-off-by: Felipe Balbi drivers/usb/phy/phy-msm-usb.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit aca5b9ebd096039657417c321a9252c696b359c2 Author: Yoshihiro Shimoda Date: Wed Aug 2 21:06:35 2017 +0900 usb: gadget: udc: renesas_usb3: Fix usb_gadget_giveback_request() calling According to the gadget.h, a "complete" function will always be called with interrupts disabled. However, sometimes usb3_request_done() function is called with interrupts enabled. So, this function should be held by spin_lock_irqsave() to disable interruption. Also, this driver has to call spin_unlock() to avoid spinlock recursion by this driver before calling usb_gadget_giveback_request(). Reported-by: Kazuya Mizuguchi Tested-by: Kazuya Mizuguchi Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Cc: # v4.5+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 40d829fb2ec636b6b4b0cc95e2546ab9aca04cc9 Author: Manu Gautam Date: Wed Jul 19 17:07:10 2017 +0530 usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets The PIDs for Isochronous data transfers are incorrect for high bandwidth IN endpoints when the request length is less than EP wMaxPacketSize. As per spec correct PIDs for ISOC data transfers are: 1) For request length <= maxpacket - DATA0, 2) For maxpacket < length <= (2 * maxpacket) - DATA1, DATA0 3) For (2 * maxpacket) < length <= (3 * maxpacket) - DATA2, DATA1, DATA0. But driver always sets PCM fields based on wMaxPacketSize due to which DATA2 happens even for small requests. Fix this by setting the PCM field of trb->size depending on request length rather than fixing it to the value depending on wMaxPacketSize. Ideally it shouldn't give any issues as dwc3 will send 0-length packet for next IN token if host sends (even after receiving a short packet). Windows seems to ignore this but with MacOS frame loss observed when using f_uvc. Signed-off-by: Manu Gautam Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 7c84b8b43d3d550fa6f0b57277d03f2e1bafb357 Author: Shawn Lin Date: Tue Jul 25 09:11:28 2017 +0800 mmc: block: bypass the queue even if usage is present for hotplug The commit 304419d8a7e9 ("mmc: core: Allocate per-request data using the block layer core") refactored mechanism of queue handling caused mmc_init_request() can be called just after mmc_cleanup_queue() caused null pointer dereference. Another commit bbdc74dc19e0 ("mmc: block: Prevent new req entering queue after its cleanup") tried to fix the problem. However it actually miss one corner case. We could still reproduce the issue mentioned with these steps: (1) insert a SD card and mount it (2) hotplug it, so it will leave md->usage still be counted (3) reboot the system which will sync data and umount the card [Unable to handle kernel NULL pointer dereference at virtual address 00000000 [user pgtable: 4k pages, 48-bit VAs, pgd = ffff80007bab3000 [[0000000000000000] *pgd=000000007a828003, *pud=0000000078dce003, *pmd=000000007aab6003, *pte=0000000000000000 [Internal error: Oops: 96000007 [#1] PREEMPT SMP [Modules linked in: [CPU: 3 PID: 3507 Comm: umount Tainted: G W 4.13.0-rc1-next-20170720-00012-g9d9bf45 #33 [Hardware name: Firefly-RK3399 Board (DT) [task: ffff80007a1de200 task.stack: ffff80007a01c000 [PC is at mmc_init_request+0x14/0xc4 [LR is at alloc_request_size+0x4c/0x74 [pc : [] lr : [] pstate: 600001c5 [sp : ffff80007a01f8f0 .... [[] mmc_init_request+0x14/0xc4 [[] alloc_request_size+0x4c/0x74 [[] mempool_create_node+0xb8/0x17c [[] blk_init_rl+0x9c/0x120 [[] blkg_alloc+0x110/0x234 [[] blkg_create+0x424/0x468 [[] blkg_lookup_create+0xd8/0x14c [[] generic_make_request_checks+0x368/0x3b0 [[] generic_make_request+0x1c/0x240 So mmc_blk_put wouldn't calling blk_cleanup_queue which actually the QUEUE_FLAG_DYING and QUEUE_FLAG_BYPASS should stay. Block core expect blk_queue_bypass_{start, end} internally to bypass/drain the queue before actually dying the queue, so it didn't expose API to set the queue bypass. I think we should set QUEUE_FLAG_BYPASS whenever queue is removed, although the md->usage is still counted, as no dispatch queue could be found then. Fixes: 304419d8a7e9 ("mmc: core: Allocate per-request data using the block layer core") Signed-off-by: Shawn Lin Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 1 + 1 file changed, 1 insertion(+) commit 7a1e3f143176e8ebdb2f5a9b3b47abc18b879d90 Author: Ludovic Desroches Date: Wed Jul 26 16:02:46 2017 +0200 mmc: sdhci-of-at91: force card detect value for non removable devices When the device is non removable, the card detect signal is often used for another purpose i.e. muxed to another SoC peripheral or used as a GPIO. It could lead to wrong behaviors depending the default value of this signal if not muxed to the SDHCI controller. Fixes: bb5f8ea4d514 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC") Signed-off-by: Ludovic Desroches Acked-by: Adrian Hunter Cc: Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 2d80bd3f7eb69204cd5dec4fa7fe7e12cbfaed13 Author: Andy Shevchenko Date: Tue Jul 4 15:58:39 2017 +0300 pinctrl: cherryview: Add Setzer models to the Chromebook DMI quirk Add one more model to the Chromebook DMI quirk to make it working again. Link: https://bugzilla.kernel.org/show_bug.cgi?id=194945 Fixes: 2a8209fa6823 ("pinctrl: cherryview: Extend the Chromebook DMI quirk to Intel_Strago systems") Reported-by: mail@abhishek.geek.nz Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7bab09631c2a303f87a7eb7e3d69e888673b9b7e Author: Vladis Dronov Date: Wed Aug 2 19:50:14 2017 +0200 xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?id=1474928 Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)") Cc: # v2.6.21-rc1 Reported-by: "bo Zhang" Signed-off-by: Vladis Dronov Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 368bd88ebb64cabe4a1ec727659214bb8d693707 Merge: 5f5d031 558f479 Author: Kalle Valo Date: Thu Aug 3 11:01:11 2017 +0300 Merge tag 'iwlwifi-for-kalle-2017-08-02' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes Some fixes in iwlwifi for 4.13 * Some simple PCI HW ID fix-ups and additions for family 9000; * A couple of bugzilla fixes: - Remove a bogus warning message with new FWs (196915) - Don't allow illegal channel options to be used (195299) * A fix for checksum offload in family 9000; * A fix serious throughput degradation in 11ac with multiple streams; * An old bug in SMPS where the firmware was not aware of SMPS changes; commit 60c4081ec4195389f4fa1fce83eaad5e4b948748 Author: Antoine Ténart Date: Wed Jul 19 11:02:31 2017 +0200 crypto: inside-secure - fix the sha state length in hmac_sha1_setkey A check is performed on the ipad/opad in the safexcel_hmac_sha1_setkey function, but the index used by the loop doing it is wrong. It is currently the size of the state array while it should be the size of a sha1 state. This patch fixes it. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Reported-by: Dan Carpenter Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42ef3bedf30020a3b5298c2b918ccd7b6e1794d3 Author: Antoine Ténart Date: Wed Jul 19 11:02:30 2017 +0200 crypto: inside-secure - fix invalidation check in hmac_sha1_setkey The safexcel_hmac_sha1_setkey function checks if an invalidation command should be issued, i.e. when the context ipad/opad change. This checks is done after filling the ipad/opad which and it can't be true. The patch fixes this by moving the check before the ipad/opad memcpy operations. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 19ec50a438c2ea3e370f6d453bf2f2e6e45ef72b Merge: 9f5af54 d9cb733 Author: Linus Torvalds Date: Wed Aug 2 20:56:44 2017 -0700 Merge tag 'nfs-for-4.13-4' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "Two fixes from Trond this time, now that he's back from his vacation. The first is a stable fix for the EXCHANGE_ID issue on the mailing list, and the other fixes a double-free situation that he found at the same time. Stable fix: - Fix EXCHANGE_ID corrupt verifier issue Other fix: - Fix double frees in nfs4_test_session_trunk()" * tag 'nfs-for-4.13-4' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFSv4: Fix double frees in nfs4_test_session_trunk() NFSv4: Fix EXCHANGE_ID corrupt verifier issue commit 9f5af546e6acc30f075828cb58c7f09665033967 Author: Annie Cherkaev Date: Sat Jul 15 15:08:58 2017 -0600 isdn/i4l: fix buffer overflow This fixes a potential buffer overflow in isdn_net.c caused by an unbounded strcpy. [ ISDN seems to be effectively unmaintained, and the I4L driver in particular is long deprecated, but in case somebody uses this.. - Linus ] Signed-off-by: Jiten Thakkar Signed-off-by: Annie Cherkaev Cc: Karsten Keil Cc: Kees Cook Cc: stable@kernel.org Signed-off-by: Linus Torvalds drivers/isdn/i4l/isdn_common.c | 1 + drivers/isdn/i4l/isdn_net.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) commit f54d2cd3c1a231e00732442fca329341d4f4250b Author: Tero Kristo Date: Wed Aug 2 21:32:13 2017 +0300 clk: keystone: sci-clk: Fix sci_clk_get Currently a bug in the sci_clk_get implementation causes it to always return a clock belonging to the last device in the static list of clock data. This is due to a bug in the init code that causes the array used by sci_clk_get to only be populated with the clocks for the last device, as each device overwrites the entire array with its own clocks. Fix this by calculating the actual number of clocks for the SoC, and allocating the whole array in one go. Also, we don't need the handle to the init data array anymore after doing this, instead we can just compare the dev_id / clk_id against the registered clocks and use binary search for speed. Signed-off-by: Tero Kristo Reported-by: Dave Gerlach Fixes: b745c0794e2f ("clk: keystone: Add sci-clk driver support") Cc: Nishanth Menon Tested-by: Franklin Cooper Signed-off-by: Stephen Boyd drivers/clk/keystone/sci-clk.c | 66 +++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 24 deletions(-) commit 19ec8e48582670c021e998b9deb88e39a842ff45 Author: Jan Kara Date: Wed Aug 2 13:32:30 2017 -0700 ocfs2: don't clear SGID when inheriting ACLs When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the owning group of 'DIR0'). However when 'DIR0' also has some default ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on 'DIR1' to get cleared if user is not member of the owning group. Fix the problem by moving posix_acl_update_mode() out of ocfs2_set_acl() into ocfs2_iop_set_acl(). That way the function will not be called when inheriting ACLs which is what we want as it prevents SGID bit clearing and the mode has been properly set by posix_acl_create() anyway. Also posix_acl_chmod() that is calling ocfs2_set_acl() takes care of updating mode itself. Fixes: 073931017b4 ("posix_acl: Clear SGID bit when setting file permissions") Link: http://lkml.kernel.org/r/20170801141252.19675-3-jack@suse.cz Signed-off-by: Jan Kara Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/acl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 1ee1c3f5b5cff959e0ac95a125bd15eaf88cc638 Author: Kan Liang Date: Wed Aug 2 13:32:27 2017 -0700 mm: allow page_cache_get_speculative in interrupt context Kernel panic when calling the IRQ-safe __get_user_pages_fast in NMI handler. The bug was introduced by commit 2947ba054a4d ("x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation"). The original x86 __get_user_page_fast used plain get_page() or page_ref_add(). However, the generic __get_user_page_fast uses page_cache_get_speculative(), which has VM_BUG_ON(in_interrupt()). There is no reason to prevent page_cache_get_speculative from using in interrupt context. According to the author, putting a BUG_ON there is just because the code is not verifying correctness of interrupt races. I did some tests in interrupt context. There is no issue found. Removing VM_BUG_ON(in_interrupt()) for page_cache_get_speculative(). Link: http://lkml.kernel.org/r/1501609146-59730-1-git-send-email-kan.liang@intel.com Fixes: 2947ba054a4d ("x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation") Signed-off-by: Kan Liang Cc: Jens Axboe Cc: Al Viro Cc: Kirill A. Shutemov Cc: Ying Huang Cc: Nicholas Piggin Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 2 -- 1 file changed, 2 deletions(-) commit 5a18b64e3f02125be1c0ef777501ae38aafe2a24 Author: Mike Rapoport Date: Wed Aug 2 13:32:24 2017 -0700 userfaultfd: non-cooperative: flush event_wqh at release time There may still be threads waiting on event_wqh at the time the userfault file descriptor is closed. Flush the events wait-queue to prevent waiting threads from hanging. Link: http://lkml.kernel.org/r/1501398127-30419-1-git-send-email-rppt@linux.vnet.ibm.com Fixes: 9cd75c3cd4c3d ("userfaultfd: non-cooperative: add ability to report non-PF events from uffd descriptor") Signed-off-by: Mike Rapoport Cc: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Pavel Emelyanov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 3 +++ 1 file changed, 3 insertions(+) commit ade9f91b32b964e83d294f4973d50083b08ef6fc Author: Kees Cook Date: Wed Aug 2 13:32:21 2017 -0700 ipc: add missing container_of()s for randstruct When building with the randstruct gcc plugin, the layout of the IPC structs will be randomized, which requires any sub-structure accesses to use container_of(). The proc display handlers were missing the needed container_of()s since the iterator is passing in the top-level struct kern_ipc_perm. This would lead to crashes when running the "lsipc" program after the system had IPC registered (e.g. after starting up Gnome): general protection fault: 0000 [#1] PREEMPT SMP ... RIP: 0010:shm_add_rss_swap.isra.1+0x13/0xa0 ... Call Trace: sysvipc_shm_proc_show+0x5e/0x150 sysvipc_proc_show+0x1a/0x30 seq_read+0x2e9/0x3f0 ... Link: http://lkml.kernel.org/r/20170730205950.GA55841@beast Fixes: 3859a271a003 ("randstruct: Mark various structs for randomization") Signed-off-by: Kees Cook Reported-by: Dominik Brodowski Acked-by: Davidlohr Bueso Acked-by: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 3 ++- ipc/sem.c | 3 ++- ipc/shm.c | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) commit 89affbf5d9ebb15c6460596822e8857ea2f9e735 Author: Dima Zavin Date: Wed Aug 2 13:32:18 2017 -0700 cpuset: fix a deadlock due to incomplete patching of cpusets_enabled() In codepaths that use the begin/retry interface for reading mems_allowed_seq with irqs disabled, there exists a race condition that stalls the patch process after only modifying a subset of the static_branch call sites. This problem manifested itself as a deadlock in the slub allocator, inside get_any_partial. The loop reads mems_allowed_seq value (via read_mems_allowed_begin), performs the defrag operation, and then verifies the consistency of mem_allowed via the read_mems_allowed_retry and the cookie returned by xxx_begin. The issue here is that both begin and retry first check if cpusets are enabled via cpusets_enabled() static branch. This branch can be rewritted dynamically (via cpuset_inc) if a new cpuset is created. The x86 jump label code fully synchronizes across all CPUs for every entry it rewrites. If it rewrites only one of the callsites (specifically the one in read_mems_allowed_retry) and then waits for the smp_call_function(do_sync_core) to complete while a CPU is inside the begin/retry section with IRQs off and the mems_allowed value is changed, we can hang. This is because begin() will always return 0 (since it wasn't patched yet) while retry() will test the 0 against the actual value of the seq counter. The fix is to use two different static keys: one for begin (pre_enable_key) and one for retry (enable_key). In cpuset_inc(), we first bump the pre_enable key to ensure that cpuset_mems_allowed_begin() always return a valid seqcount if are enabling cpusets. Similarly, when disabling cpusets via cpuset_dec(), we first ensure that callers of cpuset_mems_allowed_retry() will start ignoring the seqcount value before we let cpuset_mems_allowed_begin() return 0. The relevant stack traces of the two stuck threads: CPU: 1 PID: 1415 Comm: mkdir Tainted: G L 4.9.36-00104-g540c51286237 #4 Hardware name: Default string Default string/Hardware, BIOS 4.29.1-20170526215256 05/26/2017 task: ffff8817f9c28000 task.stack: ffffc9000ffa4000 RIP: smp_call_function_many+0x1f9/0x260 Call Trace: smp_call_function+0x3b/0x70 on_each_cpu+0x2f/0x90 text_poke_bp+0x87/0xd0 arch_jump_label_transform+0x93/0x100 __jump_label_update+0x77/0x90 jump_label_update+0xaa/0xc0 static_key_slow_inc+0x9e/0xb0 cpuset_css_online+0x70/0x2e0 online_css+0x2c/0xa0 cgroup_apply_control_enable+0x27f/0x3d0 cgroup_mkdir+0x2b7/0x420 kernfs_iop_mkdir+0x5a/0x80 vfs_mkdir+0xf6/0x1a0 SyS_mkdir+0xb7/0xe0 entry_SYSCALL_64_fastpath+0x18/0xad ... CPU: 2 PID: 1 Comm: init Tainted: G L 4.9.36-00104-g540c51286237 #4 Hardware name: Default string Default string/Hardware, BIOS 4.29.1-20170526215256 05/26/2017 task: ffff8818087c0000 task.stack: ffffc90000030000 RIP: int3+0x39/0x70 Call Trace: <#DB> ? ___slab_alloc+0x28b/0x5a0 ? copy_process.part.40+0xf7/0x1de0 __slab_alloc.isra.80+0x54/0x90 copy_process.part.40+0xf7/0x1de0 copy_process.part.40+0xf7/0x1de0 kmem_cache_alloc_node+0x8a/0x280 copy_process.part.40+0xf7/0x1de0 _do_fork+0xe7/0x6c0 _raw_spin_unlock_irq+0x2d/0x60 trace_hardirqs_on_caller+0x136/0x1d0 entry_SYSCALL_64_fastpath+0x5/0xad do_syscall_64+0x27/0x350 SyS_clone+0x19/0x20 do_syscall_64+0x60/0x350 entry_SYSCALL64_slow_path+0x25/0x25 Link: http://lkml.kernel.org/r/20170731040113.14197-1-dmitriyz@waymo.com Fixes: 46e700abc44c ("mm, page_alloc: remove unnecessary taking of a seqlock when cpusets are disabled") Signed-off-by: Dima Zavin Reported-by: Cliff Spradlin Acked-by: Vlastimil Babka Cc: Peter Zijlstra Cc: Christopher Lameter Cc: Li Zefan Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/cpuset.h | 19 +++++++++++++++++-- kernel/cgroup/cpuset.c | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) commit 9d95aa4bada24be35bb94827a55e1d6e243d866e Author: Mike Rapoport Date: Wed Aug 2 13:32:15 2017 -0700 userfaultfd_zeropage: return -ENOSPC in case mm has gone In the non-cooperative userfaultfd case, the process exit may race with outstanding mcopy_atomic called by the uffd monitor. Returning -ENOSPC instead of -EINVAL when mm is already gone will allow uffd monitor to distinguish this case from other error conditions. Unfortunately I overlooked userfaultfd_zeropage when updating userfaultd_copy(). Link: http://lkml.kernel.org/r/1501136819-21857-1-git-send-email-rppt@linux.vnet.ibm.com Fixes: 96333187ab162 ("userfaultfd_copy: return -ENOSPC in case mm has gone") Signed-off-by: Mike Rapoport Cc: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Pavel Emelyanov Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 2 ++ 1 file changed, 2 insertions(+) commit 167d0f258fedbfc859ad4105b1ea236818d41bdd Author: Heiko Carstens Date: Wed Aug 2 13:32:12 2017 -0700 mm: take memory hotplug lock within numa_zonelist_order_handler() Andre Wild reported the following warning: WARNING: CPU: 2 PID: 1205 at kernel/cpu.c:240 lockdep_assert_cpus_held+0x4c/0x60 Modules linked in: CPU: 2 PID: 1205 Comm: bash Not tainted 4.13.0-rc2-00022-gfd2b2c57ec20 #10 Hardware name: IBM 2964 N96 702 (z/VM 6.4.0) task: 00000000701d8100 task.stack: 0000000073594000 Krnl PSW : 0704f00180000000 0000000000145e24 (lockdep_assert_cpus_held+0x4c/0x60) ... Call Trace: lockdep_assert_cpus_held+0x42/0x60) stop_machine_cpuslocked+0x62/0xf0 build_all_zonelists+0x92/0x150 numa_zonelist_order_handler+0x102/0x150 proc_sys_call_handler.isra.12+0xda/0x118 proc_sys_write+0x34/0x48 __vfs_write+0x3c/0x178 vfs_write+0xbc/0x1a0 SyS_write+0x66/0xc0 system_call+0xc4/0x2b0 locks held by bash/1205: #0: (sb_writers#4){.+.+.+}, at: vfs_write+0xa6/0x1a0 #1: (zl_order_mutex){+.+...}, at: numa_zonelist_order_handler+0x44/0x150 #2: (zonelists_mutex){+.+...}, at: numa_zonelist_order_handler+0xf4/0x150 Last Breaking-Event-Address: lockdep_assert_cpus_held+0x48/0x60 This can be easily triggered with e.g. echo n > /proc/sys/vm/numa_zonelist_order In commit 3f906ba23689a ("mm/memory-hotplug: switch locking to a percpu rwsem") memory hotplug locking was changed to fix a potential deadlock. This also switched the stop_machine() invocation within build_all_zonelists() to stop_machine_cpuslocked() which now expects that online cpus are locked when being called. This assumption is not true if build_all_zonelists() is being called from numa_zonelist_order_handler(). In order to fix this simply add a mem_hotplug_begin()/mem_hotplug_done() pair to numa_zonelist_order_handler(). Link: http://lkml.kernel.org/r/20170726111738.38768-1-heiko.carstens@de.ibm.com Fixes: 3f906ba23689a ("mm/memory-hotplug: switch locking to a percpu rwsem") Signed-off-by: Heiko Carstens Reported-by: Andre Wild Acked-by: Michal Hocko Cc: KAMEZAWA Hiroyuki Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) commit b0ba2d0faf6520dd0e534a9410114e043e9ab084 Author: Tetsuo Handa Date: Wed Aug 2 13:32:09 2017 -0700 mm/page_io.c: fix oops during block io poll in swapin path When a thread is OOM-killed during swap_readpage() operation, an oops occurs because end_swap_bio_read() is calling wake_up_process() based on an assumption that the thread which called swap_readpage() is still alive. Out of memory: Kill process 525 (polkitd) score 0 or sacrifice child Killed process 525 (polkitd) total-vm:528128kB, anon-rss:0kB, file-rss:4kB, shmem-rss:0kB oom_reaper: reaped process 525 (polkitd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC Modules linked in: nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter coretemp ppdev pcspkr vmw_balloon sg shpchp vmw_vmci parport_pc parport i2c_piix4 ip_tables xfs libcrc32c sd_mod sr_mod cdrom ata_generic pata_acpi vmwgfx ahci libahci drm_kms_helper ata_piix syscopyarea sysfillrect sysimgblt fb_sys_fops mptspi scsi_transport_spi ttm e1000 mptscsih drm mptbase i2c_core libata serio_raw CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.13.0-rc2-next-20170725 #129 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/31/2013 task: ffffffffb7c16500 task.stack: ffffffffb7c00000 RIP: 0010:__lock_acquire+0x151/0x12f0 Call Trace: lock_acquire+0x59/0x80 _raw_spin_lock_irqsave+0x3b/0x4f try_to_wake_up+0x3b/0x410 wake_up_process+0x10/0x20 end_swap_bio_read+0x6f/0xf0 bio_endio+0x92/0xb0 blk_update_request+0x88/0x270 scsi_end_request+0x32/0x1c0 scsi_io_completion+0x209/0x680 scsi_finish_command+0xd4/0x120 scsi_softirq_done+0x120/0x140 __blk_mq_complete_request_remote+0xe/0x10 flush_smp_call_function_queue+0x51/0x120 generic_smp_call_function_single_interrupt+0xe/0x20 smp_trace_call_function_single_interrupt+0x22/0x30 smp_call_function_single_interrupt+0x9/0x10 call_function_single_interrupt+0xa7/0xb0 RIP: 0010:native_safe_halt+0x6/0x10 default_idle+0xe/0x20 arch_cpu_idle+0xa/0x10 default_idle_call+0x1e/0x30 do_idle+0x187/0x200 cpu_startup_entry+0x6e/0x70 rest_init+0xd0/0xe0 start_kernel+0x456/0x477 x86_64_start_reservations+0x24/0x26 x86_64_start_kernel+0xf7/0x11a secondary_startup_64+0xa5/0xa5 Code: c3 49 81 3f 20 9e 0b b8 41 bc 00 00 00 00 44 0f 45 e2 83 fe 01 0f 87 62 ff ff ff 89 f0 49 8b 44 c7 08 48 85 c0 0f 84 52 ff ff ff ff 80 98 01 00 00 8b 3d 5a 49 c4 01 45 8b b3 18 0c 00 00 85 RIP: __lock_acquire+0x151/0x12f0 RSP: ffffa01f39e03c50 ---[ end trace 6c441db499169b1e ]--- Kernel panic - not syncing: Fatal exception in interrupt Kernel Offset: 0x36000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) ---[ end Kernel panic - not syncing: Fatal exception in interrupt Fix it by holding a reference to the thread. [akpm@linux-foundation.org: add comment] Fixes: 23955622ff8d231b ("swap: add block io poll in swapin path") Signed-off-by: Tetsuo Handa Reviewed-by: Shaohua Li Cc: Tim Chen Cc: Huang Ying Cc: Jens Axboe Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_io.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3189c82056beeaf26733296be21043c091743cd9 Author: Minchan Kim Date: Wed Aug 2 13:32:03 2017 -0700 zram: do not free pool->size_class Mike reported kernel goes oops with ltp:zram03 testcase. zram: Added device: zram0 zram0: detected capacity change from 0 to 107374182400 BUG: unable to handle kernel paging request at 0000306d61727a77 IP: zs_map_object+0xb9/0x260 PGD 0 P4D 0 Oops: 0000 [#1] SMP Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: zram(E) xfs(E) libcrc32c(E) btrfs(E) xor(E) raid6_pq(E) loop(E) ebtable_filter(E) ebtables(E) ip6table_filter(E) ip6_tables(E) iptable_filter(E) ip_tables(E) x_tables(E) af_packet(E) br_netfilter(E) bridge(E) stp(E) llc(E) iscsi_ibft(E) iscsi_boot_sysfs(E) nls_iso8859_1(E) nls_cp437(E) vfat(E) fat(E) intel_powerclamp(E) coretemp(E) cdc_ether(E) kvm_intel(E) usbnet(E) mii(E) kvm(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) iTCO_wdt(E) ghash_clmulni_intel(E) bnx2(E) iTCO_vendor_support(E) pcbc(E) ioatdma(E) ipmi_ssif(E) aesni_intel(E) i5500_temp(E) i2c_i801(E) aes_x86_64(E) lpc_ich(E) shpchp(E) mfd_core(E) crypto_simd(E) i7core_edac(E) dca(E) glue_helper(E) cryptd(E) ipmi_si(E) button(E) acpi_cpufreq(E) ipmi_devintf(E) pcspkr(E) ipmi_msghandler(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) ext4(E) crc16(E) mbcache(E) jbd2(E) sd_mod(E) ata_generic(E) i2c_algo_bit(E) ata_piix(E) drm_kms_helper(E) ahci(E) syscopyarea(E) sysfillrect(E) libahci(E) sysimgblt(E) fb_sys_fops(E) uhci_hcd(E) ehci_pci(E) ttm(E) ehci_hcd(E) libata(E) drm(E) megaraid_sas(E) usbcore(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) efivarfs(E) autofs4(E) [last unloaded: zram] CPU: 6 PID: 12356 Comm: swapon Tainted: G E 4.13.0.g87b2c3f-default #194 Hardware name: IBM System x3550 M3 -[7944K3G]-/69Y5698 , BIOS -[D6E150AUS-1.10]- 12/15/2010 task: ffff880158d2c4c0 task.stack: ffffc90001680000 RIP: 0010:zs_map_object+0xb9/0x260 Call Trace: zram_bvec_rw.isra.26+0xe8/0x780 [zram] zram_rw_page+0x6e/0xa0 [zram] bdev_read_page+0x81/0xb0 do_mpage_readpage+0x51a/0x710 mpage_readpages+0x122/0x1a0 blkdev_readpages+0x1d/0x20 __do_page_cache_readahead+0x1b2/0x270 ondemand_readahead+0x180/0x2c0 page_cache_sync_readahead+0x31/0x50 generic_file_read_iter+0x7e7/0xaf0 blkdev_read_iter+0x37/0x40 __vfs_read+0xce/0x140 vfs_read+0x9e/0x150 SyS_read+0x46/0xa0 entry_SYSCALL_64_fastpath+0x1a/0xa5 Code: 81 e6 00 c0 3f 00 81 fe 00 00 16 00 0f 85 9f 01 00 00 0f b7 13 65 ff 05 5e 07 dc 7e 66 c1 ea 02 81 e2 ff 01 00 00 49 8b 54 d4 08 <8b> 4a 48 41 0f af ce 81 e1 ff 0f 00 00 41 89 c9 48 c7 c3 a0 70 RIP: zs_map_object+0xb9/0x260 RSP: ffffc90001683988 CR2: 0000306d61727a77 He bisected the problem is [1]. After commit cf8e0fedf078 ("mm/zsmalloc: simplify zs_max_alloc_size handling"), zram doesn't use double pointer for pool->size_class any more in zs_create_pool so counter function zs_destroy_pool don't need to free it, either. Otherwise, it does kfree wrong address and then, kernel goes Oops. Link: http://lkml.kernel.org/r/20170725062650.GA12134@bbox Fixes: cf8e0fedf078 ("mm/zsmalloc: simplify zs_max_alloc_size handling") Signed-off-by: Minchan Kim Reported-by: Mike Galbraith Tested-by: Mike Galbraith Reviewed-by: Sergey Senozhatsky Cc: Jerome Marchand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 1 - 1 file changed, 1 deletion(-) commit d16977f3a6cfbb5e9ce477f423a1bf343347c1ed Author: Jonathan Corbet Date: Wed Aug 2 13:32:01 2017 -0700 kthread: fix documentation build warning The kerneldoc comment for kthread_create() had an incorrect argument name, leading to a warning in the docs build. Correct it, and make one more small step toward a warning-free build. Link: http://lkml.kernel.org/r/20170724135916.7f486c6f@lwn.net Signed-off-by: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7701557bfdd81ff44cab13a80439319a735d8e2 Author: Arnd Bergmann Date: Wed Aug 2 13:31:58 2017 -0700 kasan: avoid -Wmaybe-uninitialized warning gcc-7 produces this warning: mm/kasan/report.c: In function 'kasan_report': mm/kasan/report.c:351:3: error: 'info.first_bad_addr' may be used uninitialized in this function [-Werror=maybe-uninitialized] print_shadow_for_address(info->first_bad_addr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/kasan/report.c:360:27: note: 'info.first_bad_addr' was declared here The code seems fine as we only print info.first_bad_addr when there is a shadow, and we always initialize it in that case, but this is relatively hard for gcc to figure out after the latest rework. Adding an intialization to the most likely value together with the other struct members shuts up that warning. Fixes: b235b9808664 ("kasan: unify report headers") Link: https://patchwork.kernel.org/patch/9641417/ Link: http://lkml.kernel.org/r/20170725152739.4176967-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Suggested-by: Alexander Potapenko Suggested-by: Andrey Ryabinin Acked-by: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 1 + 1 file changed, 1 insertion(+) commit b22823719302e88d0e2a6bb06433bd97b175a8d8 Author: Mike Rapoport Date: Wed Aug 2 13:31:55 2017 -0700 userfaultfd: non-cooperative: notify about unmap of destination during mremap When mremap is called with MREMAP_FIXED it unmaps memory at the destination address without notifying userfaultfd monitor. If the destination were registered with userfaultfd, the monitor has no way to distinguish between the old and new ranges and to properly relate the page faults that would occur in the destination region. Fixes: 897ab3e0c49e ("userfaultfd: non-cooperative: add event for memory unmaps") Link: http://lkml.kernel.org/r/1500276876-3350-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Acked-by: Pavel Emelyanov Cc: Andrea Arcangeli Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mremap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3ea277194daaeaa84ce75180ec7c7a2075027a68 Author: Mel Gorman Date: Wed Aug 2 13:31:52 2017 -0700 mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries Nadav Amit identified a theoritical race between page reclaim and mprotect due to TLB flushes being batched outside of the PTL being held. He described the race as follows: CPU0 CPU1 ---- ---- user accesses memory using RW PTE [PTE now cached in TLB] try_to_unmap_one() ==> ptep_get_and_clear() ==> set_tlb_ubc_flush_pending() mprotect(addr, PROT_READ) ==> change_pte_range() ==> [ PTE non-present - no flush ] user writes using cached RW PTE ... try_to_unmap_flush() The same type of race exists for reads when protecting for PROT_NONE and also exists for operations that can leave an old TLB entry behind such as munmap, mremap and madvise. For some operations like mprotect, it's not necessarily a data integrity issue but it is a correctness issue as there is a window where an mprotect that limits access still allows access. For munmap, it's potentially a data integrity issue although the race is massive as an munmap, mmap and return to userspace must all complete between the window when reclaim drops the PTL and flushes the TLB. However, it's theoritically possible so handle this issue by flushing the mm if reclaim is potentially currently batching TLB flushes. Other instances where a flush is required for a present pte should be ok as either the page lock is held preventing parallel reclaim or a page reference count is elevated preventing a parallel free leading to corruption. In the case of page_mkclean there isn't an obvious path that userspace could take advantage of without using the operations that are guarded by this patch. Other users such as gup as a race with reclaim looks just at PTEs. huge page variants should be ok as they don't race with reclaim. mincore only looks at PTEs. userfault also should be ok as if a parallel reclaim takes place, it will either fault the page back in or read some of the data before the flush occurs triggering a fault. Note that a variant of this patch was acked by Andy Lutomirski but this was for the x86 parts on top of his PCID work which didn't make the 4.13 merge window as expected. His ack is dropped from this version and there will be a follow-on patch on top of PCID that will include his ack. [akpm@linux-foundation.org: tweak comments] [akpm@linux-foundation.org: fix spello] Link: http://lkml.kernel.org/r/20170717155523.emckq2esjro6hf3z@suse.de Reported-by: Nadav Amit Signed-off-by: Mel Gorman Cc: Andy Lutomirski Cc: [v4.4+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 4 ++++ mm/internal.h | 5 ++++- mm/madvise.c | 1 + mm/memory.c | 1 + mm/mprotect.c | 1 + mm/mremap.c | 1 + mm/rmap.c | 36 ++++++++++++++++++++++++++++++++++++ 7 files changed, 48 insertions(+), 1 deletion(-) commit 27e37d84e55f47bf28f7072fadf8fa2cbc3d9375 Author: Kefeng Wang Date: Wed Aug 2 13:31:50 2017 -0700 pid: kill pidhash_size in pidhash_init() After commit 3d375d78593c ("mm: update callers to use HASH_ZERO flag"), drop unused pidhash_size in pidhash_init(). Link: http://lkml.kernel.org/r/1500389267-49222-1-git-send-email-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/pid.c | 3 --- 1 file changed, 3 deletions(-) commit 2be7cfed995e25de1ffaffe14cc065b7ffb528e0 Author: Daniel Jordan Date: Wed Aug 2 13:31:47 2017 -0700 mm/hugetlb.c: __get_user_pages ignores certain follow_hugetlb_page errors Commit 9a291a7c9428 ("mm/hugetlb: report -EHWPOISON not -EFAULT when FOLL_HWPOISON is specified") causes __get_user_pages to ignore certain errors from follow_hugetlb_page. After such error, __get_user_pages subsequently calls faultin_page on the same VMA and start address that follow_hugetlb_page failed on instead of returning the error immediately as it should. In follow_hugetlb_page, when hugetlb_fault returns a value covered under VM_FAULT_ERROR, follow_hugetlb_page returns it without setting nr_pages to 0 as __get_user_pages expects in this case, which causes the following to happen in __get_user_pages: the "while (nr_pages)" check succeeds, we skip the "if (!vma..." check because we got a VMA the last time around, we find no page with follow_page_mask, and we call faultin_page, which calls hugetlb_fault for the second time. This issue also slightly changes how __get_user_pages works. Before, it only returned error if it had made no progress (i = 0). But now, follow_hugetlb_page can clobber "i" with an error code since its new return path doesn't check for progress. So if "i" is nonzero before a failing call to follow_hugetlb_page, that indication of progress is lost and __get_user_pages can return error even if some pages were successfully pinned. To fix this, change follow_hugetlb_page so that it updates nr_pages, allowing __get_user_pages to fail immediately and restoring the "error only if no progress" behavior to __get_user_pages. Tested that __get_user_pages returns when expected on error from hugetlb_fault in follow_hugetlb_page. Fixes: 9a291a7c9428 ("mm/hugetlb: report -EHWPOISON not -EFAULT when FOLL_HWPOISON is specified") Link: http://lkml.kernel.org/r/1500406795-58462-1-git-send-email-daniel.m.jordan@oracle.com Signed-off-by: Daniel Jordan Acked-by: Punit Agrawal Cc: Andrea Arcangeli Cc: "Aneesh Kumar K.V" Cc: Gerald Schaefer Cc: James Morse Cc: "Kirill A. Shutemov" Cc: Michal Hocko Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: zhong jiang Cc: [4.12.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit c9f04407f2e0b3fc9ff7913c65fcfcb0a4b61570 Author: David Matlack Date: Tue Aug 1 14:00:40 2017 -0700 KVM: nVMX: mark vmcs12 pages dirty on L2 exit The host physical addresses of L1's Virtual APIC Page and Posted Interrupt descriptor are loaded into the VMCS02. The CPU may write to these pages via their host physical address while L2 is running, bypassing address-translation-based dirty tracking (e.g. EPT write protection). Mark them dirty on every exit from L2 to prevent them from getting out of sync with dirty tracking. Also mark the virtual APIC page and the posted interrupt descriptor dirty when KVM is virtualizing posted interrupt processing. Signed-off-by: David Matlack Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 53 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 10 deletions(-) commit 8ca44e88c32f86721c6ceca8e5e9b0b40c98907d Author: David Matlack Date: Tue Aug 1 14:00:39 2017 -0700 kvm: nVMX: don't flush VMCS12 during VMXOFF or VCPU teardown According to the Intel SDM, software cannot rely on the current VMCS to be coherent after a VMXOFF or shutdown. So this is a valid way to handle VMCS12 flushes. 24.11.1 Software Use of Virtual-Machine Control Structures ... If a logical processor leaves VMX operation, any VMCSs active on that logical processor may be corrupted (see below). To prevent such corruption of a VMCS that may be used either after a return to VMX operation or on another logical processor, software should execute VMCLEAR for that VMCS before executing the VMXOFF instruction or removing power from the processor (e.g., as part of a transition to the S3 and S4 power states). ... This fixes a "suspicious rcu_dereference_check() usage!" warning during kvm_vm_release() because nested_release_vmcs12() calls kvm_vcpu_write_guest_page() without holding kvm->srcu. Signed-off-by: David Matlack Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 9f744c59746078280ef28163aa136ef3f625804e Author: Paolo Bonzini Date: Thu Jul 27 15:54:46 2017 +0200 KVM: nVMX: do not pin the VMCS12 Since the current implementation of VMCS12 does a memcpy in and out of guest memory, we do not need current_vmcs12 and current_vmcs12_page anymore. current_vmptr is enough to read and write the VMCS12. And David Matlack noted: This patch also fixes dirty tracking (memslot->dirty_bitmap) of the VMCS12 page by using kvm_write_guest. nested_release_page() only marks the struct page dirty. Signed-off-by: Paolo Bonzini Reviewed-by: David Hildenbrand [Added David Matlack's note and nested_release_page_clean() fix.] Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit 3898da947bbaf9e7fd5816e825978d360028bba2 Author: Paolo Bonzini Date: Wed Aug 2 17:55:54 2017 +0200 KVM: avoid using rcu_dereference_protected During teardown, accesses to memslots and buses are using rcu_dereference_protected with an always-true condition because these accesses are done outside the usual mutexes. This is because the last reference is gone and there cannot be any concurrent modifications, but rcu_dereference_protected is ugly and unobvious. Instead, check the refcount in kvm_get_bus and __kvm_memslots. Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář include/linux/kvm_host.h | 6 ++++-- virt/kvm/kvm_main.c | 11 ++++------- 2 files changed, 8 insertions(+), 9 deletions(-) commit ebd28fcb55e288030abb5bca4869603b3e1f5f7c Author: Longpeng(Mike) Date: Wed Aug 2 11:20:51 2017 +0800 KVM: X86: init irq->level in kvm_pv_kick_cpu_op 'lapic_irq' is a local variable and its 'level' field isn't initialized, so 'level' is random, it doesn't matter but makes UBSAN unhappy: UBSAN: Undefined behaviour in .../lapic.c:... load of value 10 is not a valid value for type '_Bool' ... Call Trace: [] dump_stack+0x1e/0x20 [] ubsan_epilogue+0x12/0x55 [] __ubsan_handle_load_invalid_value+0x118/0x162 [] kvm_apic_set_irq+0xc3/0xf0 [kvm] [] kvm_irq_delivery_to_apic_fast+0x450/0x910 [kvm] [] kvm_irq_delivery_to_apic+0xfa/0x7a0 [kvm] [] kvm_emulate_hypercall+0x62e/0x760 [kvm] [] handle_vmcall+0x1a/0x30 [kvm_intel] [] vmx_handle_exit+0x7a2/0x1fa0 [kvm_intel] ... Signed-off-by: Longpeng(Mike) Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) commit f4ef19108608c81769db69976999d056c070a6f0 Author: Wanpeng Li Date: Tue Aug 1 16:05:25 2017 -0700 KVM: X86: Fix loss of pending INIT due to race When SMP VM start, AP may lost INIT because of receiving INIT between kvm_vcpu_ioctl_x86_get/set_vcpu_events. vcpu 0 vcpu 1 kvm_vcpu_ioctl_x86_get_vcpu_events events->smi.latched_init = 0 send INIT to vcpu1 set vcpu1's pending_events kvm_vcpu_ioctl_x86_set_vcpu_events if (events->smi.latched_init == 0) clear INIT in pending_events This patch fixes it by just update SMM related flags if we are in SMM. Thanks Peng Hao for the report and original commit message. Reported-by: Peng Hao Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 68c9793d63e02f0683fdbf5e82d148d72ed1dbe0 Author: Felix Kuehling Date: Tue Aug 1 22:34:55 2017 -0400 drm/amdgpu: Use list_del_init in amdgpu_mn_unregister Otherwise bo->shadow_list (which is aliased by bo->mn_list) will not appear empty in amdgpu_ttm_bo_destroy and cause an oops when freeing former userptr BOs. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5694785cf09bf0e7bd8e5f62361ea34fa162a4a0 Author: Jean Delvare Date: Sun Jul 30 10:18:25 2017 +0200 drm/amdgpu: Fix undue fallthroughs in golden registers initialization As I was staring at the si_init_golden_registers code, I noticed that the Pitcairn initialization silently falls through the Cape Verde initialization, and the Oland initialization falls through the Hainan initialization. However there is no comment stating that this is intentional, and the radeon driver doesn't have any such fallthrough, so I suspect this is not supposed to happen. Signed-off-by: Jean Delvare Fixes: 62a37553414a ("drm/amdgpu: add si implementation v10") Cc: Ken Wang Cc: Alex Deucher Cc: "Marek Olšák" Cc: "Christian König" Cc: Flora Cui Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/si.c | 2 ++ 1 file changed, 2 insertions(+) commit a7e52ad7ed82e21273eccff93d1477a7b313aabb Author: Steven Rostedt (VMware) Date: Wed Aug 2 14:20:54 2017 -0400 ring-buffer: Have ring_buffer_alloc_read_page() return error on offline CPU Chunyu Hu reported: "per_cpu trace directories and files are created for all possible cpus, but only the cpus which have ever been on-lined have their own per cpu ring buffer (allocated by cpuhp threads). While trace_buffers_open, the open handler for trace file 'trace_pipe_raw' is always trying to access field of ring_buffer_per_cpu, and would panic with the NULL pointer. Align the behavior of trace_pipe_raw with trace_pipe, that returns -NODEV when openning it if that cpu does not have trace ring buffer. Reproduce: cat /sys/kernel/debug/tracing/per_cpu/cpu31/trace_pipe_raw (cpu31 is never on-lined, this is a 16 cores x86_64 box) Tested with: 1) boot with maxcpus=14, read trace_pipe_raw of cpu15. Got -NODEV. 2) oneline cpu15, read trace_pipe_raw of cpu15. Get the raw trace data. Call trace: [ 5760.950995] RIP: 0010:ring_buffer_alloc_read_page+0x32/0xe0 [ 5760.961678] tracing_buffers_read+0x1f6/0x230 [ 5760.962695] __vfs_read+0x37/0x160 [ 5760.963498] ? __vfs_read+0x5/0x160 [ 5760.964339] ? security_file_permission+0x9d/0xc0 [ 5760.965451] ? __vfs_read+0x5/0x160 [ 5760.966280] vfs_read+0x8c/0x130 [ 5760.967070] SyS_read+0x55/0xc0 [ 5760.967779] do_syscall_64+0x67/0x150 [ 5760.968687] entry_SYSCALL64_slow_path+0x25/0x25" This was introduced by the addition of the feature to reuse reader pages instead of re-allocating them. The problem is that the allocation of a reader page (which is per cpu) does not check if the cpu is online and set up for the ring buffer. Link: http://lkml.kernel.org/r/1500880866-1177-1-git-send-email-chuhu@redhat.com Cc: stable@vger.kernel.org Fixes: 73a757e63114 ("ring-buffer: Return reader page back into existing ring buffer") Reported-by: Chunyu Hu Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 14 +++++++++----- kernel/trace/ring_buffer_benchmark.c | 2 +- kernel/trace/trace.c | 16 +++++++++++----- 3 files changed, 21 insertions(+), 11 deletions(-) commit 147d88e0b5eb90191bc5c12ca0a3c410b75a13d2 Author: Dan Carpenter Date: Tue Aug 1 14:02:01 2017 +0300 tracing: Missing error code in tracer_alloc_buffers() If ring_buffer_alloc() or one of the next couple function calls fail then we should return -ENOMEM but the current code returns success. Link: http://lkml.kernel.org/r/20170801110201.ajdkct7vwzixahvx@mwanda Cc: Sebastian Andrzej Siewior Cc: Ingo Molnar Cc: stable@vger.kernel.org Fixes: b32614c03413 ('tracing/rb: Convert to hotplug state machine') Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 1 + 1 file changed, 1 insertion(+) commit 4bb0f0e73c8c30917d169c4a0f1ac083690c545b Author: Steven Rostedt (VMware) Date: Tue Aug 1 12:01:52 2017 -0400 tracing: Call clear_boot_tracer() at lateinit_sync The clear_boot_tracer function is used to reset the default_bootup_tracer string to prevent it from being accessed after boot, as it originally points to init data. But since clear_boot_tracer() is called via the init_lateinit() call, it races with the initcall for registering the hwlat tracer. If someone adds "ftrace=hwlat" to the kernel command line, depending on how the linker sets up the text, the saved command line may be cleared, and the hwlat tracer never is initialized. Simply have the clear_boot_tracer() be called by initcall_lateinit_sync() as that's for tasks to be called after lateinit. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196551 Cc: stable@vger.kernel.org Fixes: e7c15cd8a ("tracing: Added hardware latency tracer") Reported-by: Zamir SUN Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed254971edea92c3ac5c67c6a05247a92aa6075e Author: Yuchung Cheng Date: Tue Aug 1 13:22:32 2017 -0700 tcp: avoid setting cwnd to invalid ssthresh after cwnd reduction states If the sender switches the congestion control during ECN-triggered cwnd-reduction state (CA_CWR), upon exiting recovery cwnd is set to the ssthresh value calculated by the previous congestion control. If the previous congestion control is BBR that always keep ssthresh to TCP_INIFINITE_SSTHRESH, cwnd ends up being infinite. The safe step is to avoid assigning invalid ssthresh value when recovery ends. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4d96f12a072c669d48dc3a2c6b539a9faeca138d Author: Thomas Falcon Date: Tue Aug 1 15:04:36 2017 -0500 ibmvnic: Initialize SCRQ's during login renegotiation SCRQ resources are freed during renegotiation, but they are not re-allocated afterwards due to some changes in the initialization process. Fix that by re-allocating the memory after renegotation. SCRQ's can also be freed if a server capabilities request fails. If this were encountered during a device reset for example, SCRQ's may not be re-allocated. This operation is not necessary anymore so remove it. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit bed9ff165960921303a100228585f2d1691b42eb Author: Hector Martin Date: Wed Aug 2 00:45:44 2017 +0900 usb: qmi_wwan: add D-Link DWM-222 device ID Signed-off-by: Hector Martin Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit db803a46ae33b9dadc064240b700f610c89549ee Merge: 9075bd2 bff0c68 Author: David S. Miller Date: Wed Aug 2 10:44:10 2017 -0700 Merge branch 'mlx4-misc-fixes' Tariq Toukan says: ==================== mlx4 misc fixes This patchset contains misc bug fixes from the team to the mlx4 Core and Eth drivers. Patch 1 by Inbar fixes a wrong ethtool indication for Wake-on-LAN. The other 3 patches by Jack add a missing capability description, and fixes the off-by-1 misalignment for the following capabilities descriptions. Series generated against net commit: cc75f8514db6 samples/bpf: fix bpf tunnel cleanup ==================== Signed-off-by: David S. Miller commit bff0c6840c135c14675404ba697aae2638c37cb6 Author: Jack Morgenstein Date: Tue Aug 1 16:43:46 2017 +0300 net/mlx4_core: Fixes missing capability bit in flags2 capability dump The cited commit introduced the following new enum value in file include/linux/mlx4/device.h: QUERY_DEV_CAP_DIAG_RPRT_PER_PORT However, it failed to introduce a corresponding entry in function dump_dev_cap_flags2() for outputting a line in the message log when this capability bit is set. The change here fixes that omission. Fixes: c7c122ed67e4 ("net/mlx4: Add diagnostic counters capability bit") Reported-by: Mukesh Kacker Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/fw.c | 1 + 1 file changed, 1 insertion(+) commit f9fb9d0b8519a795eeaca5108205593b66068cce Author: Jack Morgenstein Date: Tue Aug 1 16:43:45 2017 +0300 net/mlx4_core: Fix namespace misalignment in QinQ VST support commit The cited commit introduced the following new enum value in file include/linux/mlx4/device.h: MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP However the value of MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP needs to stay consistent with the value used in another namespace in function dump_dev_cap_flags2(), which is manually kept in sync. The change here restores that consistency. Fixes: 7c3d21c8153c ("net/mlx4_core: Preparation for VF vlan protocol 802.1ad") Reported-by: Mukesh Kacker Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5886259c127026ee4a6a7093d6c320440d833fda Author: Jack Morgenstein Date: Tue Aug 1 16:43:44 2017 +0300 net/mlx4_core: Fix sl_to_vl_change bit offset in flags2 dump The index value in function dump_dev_cap_flags2() for outputting "sl to vl mapping table change event support" needs to be consistent with the value of the enumerated constant MLX4_DEV_CAP_FLAG2_SL_TO_VL_CHANGE_EVENT defined in file include/linux/mlx4_device.h The change here restores that consistency. Fixes: fd10ed8e6f42 ("IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets") Reported-by: Mukesh Kacker Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c994f778bb1cca8ebe7a4e528cefec233e93b5cc Author: Inbar Karmy Date: Tue Aug 1 16:43:43 2017 +0300 net/mlx4_en: Fix wrong indication of Wake-on-LAN (WoL) support Currently when WoL is supported but disabled, ethtool reports: "Supports Wake-on: d". Fix the indication of Wol support, so that the indication remains "g" all the time if the NIC supports WoL. Tested: As accepted, when NIC supports WoL- ethtool reports: Supports Wake-on: g Wake-on: d when NIC doesn't support WoL- ethtool reports: Supports Wake-on: d Wake-on: d Fixes: 14c07b1358ed ("mlx4: Wake on LAN support") Signed-off-by: Inbar Karmy Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 15 ++++++++------- drivers/net/ethernet/mellanox/mlx4/fw.c | 4 ++++ drivers/net/ethernet/mellanox/mlx4/fw.h | 1 + drivers/net/ethernet/mellanox/mlx4/main.c | 2 ++ include/linux/mlx4/device.h | 1 + 5 files changed, 16 insertions(+), 7 deletions(-) commit 9075bd206c956dd1e216fb8d15cd56c7260b1d08 Merge: 12c5d0c 0573f94 Author: David S. Miller Date: Wed Aug 2 10:39:58 2017 -0700 Merge branch 'lan78xx-Fixes' Nisar Sayed says: ==================== lan78xx: Fixes to lan78xx driver This series of patches are for lan78xx driver. These patches fixes potential issues associated with lan78xx driver ==================== Signed-off-by: David S. Miller commit 0573f94b1abfb42952275ca67f665dbd720b00d7 Author: Nisar Sayed Date: Tue Aug 1 10:24:33 2017 +0000 lan78xx: Fix to handle hard_header_len update Fix to handle hard_header_len update When ifconfig up/down sequence is initiated hard_header_len get updated incrementally for each ifconfig up /down sequence, this leads invalid hard_header_len, moving to lan78xx_bind to have one time update of hard_header_len addresses the issue. Signed-off-by: Nisar Sayed Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fb52c3b597f0b44e893ded8c253845561f9f57da Author: Nisar Sayed Date: Tue Aug 1 10:24:17 2017 +0000 lan78xx: USB fast connect/disconnect crash fix USB fast connect/disconnect crash fix When USB plugged/unplugged at fast rate, lan78xx_mdio_init() in lan78xx_bind() failing case is not handled. Whenever lan78xx_mdio_init() failed, dev->mdiobus will be freed, however since lan78xx_bind() not consider as error and try to proceed for further initialization in lan78xx_probe() which leads system hung/crash. Also when register_netdev() failed, netdev is freed without calling lan78xx_unbind(). Hence halting the failed cases right manner fixes the system crash/hung issue. Signed-off-by: Nisar Sayed Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8466489ef5ba48272ba4fa4ea9f8f403306de4c7 Author: Marc Zyngier Date: Tue Aug 1 20:11:08 2017 -0500 xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue The Renesas uPD72020x XHCI controller seems to suffer from a really annoying bug, where it may retain some of its DMA programming across a XHCI reset, and despite the driver correctly programming new DMA addresses. This is visible if the device has been using 64-bit DMA addresses, and is then switched to using 32-bit DMA addresses. The top 32 bits of the address (now zero) are ignored are replaced by the 32 bits from the *previous* programming. Sticking with 64-bit DMA always works, but doesn't seem very appropriate. A PCI reset of the device restores the normal functionality, which is done at probe time. Unfortunately, this has to be done before any quirk has been discovered, hence the intrusive nature of the fix. Tested-by: Ard Biesheuvel Signed-off-by: Marc Zyngier Signed-off-by: Bjorn Helgaas Acked-by: Mathias Nyman CC: stable@vger.kernel.org # v4.11+ drivers/usb/host/pci-quirks.c | 20 ++++++++++++++++++++ drivers/usb/host/pci-quirks.h | 1 + drivers/usb/host/xhci-pci.c | 7 +++++++ 3 files changed, 28 insertions(+) commit 4d3f5d04d69e9479a3df88ceb0e2cd8188a49366 Merge: 33611ba 51391ca Author: Linus Torvalds Date: Wed Aug 2 09:43:28 2017 -0700 Merge tag 'platform-drivers-x86-v4.13-3' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: "Fix two bugs under error or abnormal usage conditions. Correct a config dependency: dell-wmi: - Fix driver interface version query wmi: - Fix error handling in acpi_wmi_init() peaq-wmi: - select INPUT_POLLDEV" * tag 'platform-drivers-x86-v4.13-3' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: dell-wmi: Fix driver interface version query platform/x86: wmi: Fix error handling in acpi_wmi_init() platform/x86: peaq-wmi: select INPUT_POLLDEV commit 5c0858f12bbdbc9c69fc36ce7b509596df145600 Merge: b48d7c5 9735ee9 Author: Stephen Boyd Date: Wed Aug 2 09:11:44 2017 -0700 Merge tag 'sunxi-clk-fixes-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes Pull one Allwinner clock fix from Chen-Yu Tsai: One critical clock fix for sun5i (A10s/A13/R8) which enables propagation of clock rate changes from the "cpu" clock to it's parent PLL clock. This fixes cpufreq related crashes that have been observed on KernelCI with the C.H.I.P. and multi_v7_defconfig. * tag 'sunxi-clk-fixes-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: sun5i: Add clk_set_rate_parent to the CPU clock commit b48d7c5b896277fdb1462aae3a4c13858132764b Merge: 5b30850 1f737ff Author: Stephen Boyd Date: Wed Aug 2 09:09:42 2017 -0700 Merge tag 'meson-clk-fixes-for-4.13-rc4-v2' of git://github.com/baylibre/clk-meson into clk-fixes Pull one Meson clock fix from Neil Armstrong * tag 'meson-clk-fixes-for-4.13-rc4-v2' of git://github.com/baylibre/clk-meson: clk: meson: mpll: fix mpll0 fractional part ignored commit 39a06b67c2c1256bcf2361a1f67d2529f70ab206 Author: Will Deacon Date: Tue Jul 18 18:37:55 2017 +0100 irqchip/gic: Ensure we have an ISB between ack and ->handle_irq Devices that expose their interrupt status registers via system registers (e.g. Statistical profiling, CPU PMU, DynamIQ PMU, arch timer, vgic (although unused by Linux), ...) rely on a context synchronising operation on the CPU to ensure that the updated status register is visible to the CPU when handling the interrupt. This usually happens as a result of taking the IRQ exception in the first place, but there are two race scenarios where this isn't the case. For example, let's say we have two peripherals (X and Y), where Y uses a system register for its interrupt status. Case 1: 1. CPU takes an IRQ exception as a result of X raising an interrupt 2. Y then raises its interrupt line, but the update to its system register is not yet visible to the CPU 3. The GIC decides to expose Y's interrupt number first in the Ack register 4. The CPU runs the IRQ handler for Y, but the status register is stale Case 2: 1. CPU takes an IRQ exception as a result of X raising an interrupt 2. CPU reads the interrupt number for X from the Ack register and runs its IRQ handler 3. Y raises its interrupt line and the Ack register is updated, but again, the update to its system register is not yet visible to the CPU. 4. Since the GIC drivers poll the Ack register, we read Y's interrupt number and run its handler without a context synchronisation operation, therefore seeing the stale register value. In either case, we run the risk of missing an IRQ. This patch solves the problem by ensuring that we execute an ISB in the GIC drivers prior to invoking the interrupt handler. This is already the case for GICv3 and EOIMode 1 (the usual case for the host). Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 2 ++ drivers/irqchip/irq-gic.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit d1ce263feb40e6b3208f3e1ebec6dbe86df6f522 Author: Robert Richter Date: Wed Jul 12 15:25:09 2017 +0200 irqchip/gic-v3-its: Remove ACPICA version check for ACPI NUMA The version check was added due to dependency to a618c7f89a02 ACPICA: Add support for new SRAT subtable Now, that this code is in the kernel, remove the check. This is esp. useful to enable backports. Signed-off-by: Robert Richter Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33611ba0fed7c7f7768aeb5e0dcda85cc8cf74c4 Merge: 26c5ceb 2c67521 Author: Linus Torvalds Date: Wed Aug 2 08:43:19 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "These seven patches are mostly minor build, Kconfig and error leg fixes" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qedi: Fix return code in qedi_ep_connect() scsi: lpfc: fix linking against modular NVMe support scsi: scsi_transport_fc: return -EBUSY for deleted vport scsi: libcxgbi: add check for valid cxgbi_task_data scsi: aic7xxx: fix firmware build with O=path scsi: megaraid_sas: fix memleak in megasas_alloc_cmdlist_fusion scsi: qedi: Add ISCSI_BOOT_SYSFS to Kconfig commit 5ef26e966d3fd105ad9a7e8e8f6d12c7fbd4c03d Merge: 3f3c371 60668a2 Author: Takashi Iwai Date: Wed Aug 2 17:11:45 2017 +0200 Merge tag 'asoc-fix-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.13 Quite a few fixes here that have been sent since the merge window, the biggest one is the fix from Tony for some confusion with the device property API which was causing issues with the of-graph card. This is fixed with some changes in the graph API itself as it seemed very likely to be error prone. commit 1ad43c0078b79a76accd0fe64062e47b3430dc6b Author: Ming Lei Date: Wed Aug 2 08:01:45 2017 +0800 blk-mq: don't leak preempt counter/q_usage_counter when allocating rq failed When blk_mq_get_request() failed, preempt counter isn't released, and blk_mq_make_request() doesn't release the counter too. This patch fixes the issue, and makes sure that preempt counter is only held if rq is allocated successfully. The same policy is applied on .q_usage_counter too. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit d7a65c4905bc9c304ecf3d8aa566802f6119480f Author: Gregory CLEMENT Date: Tue Aug 1 18:01:35 2017 +0200 ARM64: dts: marvell: armada-37xx: Fix the number of GPIO on south bridge The number of pins in South Bridge is 30 and not 29. There is a fix for the driver for the pinctrl, but a fix is also need at device tree level for the GPIO. Fixes: afda007feda5 ("ARM64: dts: marvell: Add pinctrl nodes for Armada 3700") Cc: Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9cb73300ac0001832c048a489c592263fc28193 Author: Trond Myklebust Date: Tue Aug 1 16:02:48 2017 -0400 NFSv4: Fix double frees in nfs4_test_session_trunk() rpc_clnt_add_xprt() expects the callback function to be synchronous, and expects to release the transport and switch references itself. Fixes: 04fa2c6bb51b1 ("NFS pnfs data server multipath session trunking") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4client.c | 3 --- fs/nfs/nfs4proc.c | 16 +++------------- 2 files changed, 3 insertions(+), 16 deletions(-) commit 3f3c371421e601fa93b6cb7fb52da9ad59ec90b4 Author: Sergei A. Trusov Date: Wed Aug 2 20:23:48 2017 +1000 ALSA: hda - Fix speaker output from VAIO VPCL14M1R Sony VAIO VPCL14M1R needs the quirk to make the speaker working properly. Tested-by: Dmitriy Cc: Signed-off-by: Sergei A. Trusov Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 3f5a95ad6c6c05e6b00f0c20e30da66c986564d5 Author: Koichiro Den Date: Tue Aug 1 23:21:46 2017 +0900 xfrm: fix null pointer dereference on state and tmpl sort Creating sub policy that matches the same outer flow as main policy does leads to a null pointer dereference if the outer mode's family is ipv4. For userspace compatibility, this patch just eliminates the crash i.e., does not introduce any new sorting rule, which would fruitlessly affect all but the aforementioned case. Signed-off-by: Koichiro Den Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f29bb7861a5107cc1afbf5a565c3109aa88d5984 Author: Sergei Shtylyov Date: Sat Jul 29 22:52:09 2017 +0300 powerpc/83xx/mpc832x_rdb: fix of_irq_to_resource() error check of_irq_to_resource() has recently been fixed to return negative error #'s along with 0 in case of failure, however the Freescale MPC832x RDB board code still only regards 0 as a failure indication -- fix it up. Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()") Signed-off-by: Sergei Shtylyov Acked-by: Scott Wood Signed-off-by: Michael Ellerman arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e9509e38fbe034782339eb09c915f0b5765ff69 Author: Michał Mirosław Date: Tue Jul 18 14:35:45 2017 +0200 gpio: tegra: fix unbalanced chained_irq_enter/exit When more than one GPIO IRQs are triggered simultaneously, tegra_gpio_irq_handler() called chained_irq_exit() multiple times for one chained_irq_enter(). Fixes: 3c92db9ac0ca3eee8e46e2424b6c074e2e394ad9 Signed-off-by: Michał Mirosław [Also changed the variable to a bool] Signed-off-by: Linus Walleij drivers/gpio/gpio-tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ee02f73e04c0e690600f621a3a1d2245834af7fe Author: Boris Brezillon Date: Mon Jul 31 10:32:21 2017 +0200 mtd: nand: atmel: Fix EDO mode check EDO mode should be used when tRC is less than 30ns, but timings are expressed in picoseconds in the nand_sdr_timings struct. Signed-off-by: Boris Brezillon Fixes: f9ce2eddf176 ("mtd: nand: atmel: Add ->setup_data_interface() hooks") Reported-by: Alexander Dahl Tested-by: Alexander Dahl Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d29231000bbe0fb9e4893a9c68151ffdd3b5469 Author: Boris Brezillon Date: Mon Jul 31 10:31:27 2017 +0200 mtd: nand: Declare tBERS, tR and tPROG as u64 to avoid integer overflow All timings in nand_sdr_timings are expressed in picoseconds but some of them may not fit in an u32. Signed-off-by: Boris Brezillon Fixes: 204e7ecd47e2 ("mtd: nand: Add a few more timings to nand_sdr_timings") Reported-by: Alexander Dahl Cc: Reviewed-by: Alexander Dahl Tested-by: Alexander Dahl Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_timings.c | 6 +++--- include/linux/mtd/nand.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit a11bf5ed951f8900d244d09eb03a888b59c7fc82 Author: Boris Brezillon Date: Mon Jul 31 10:29:56 2017 +0200 mtd: nand: Fix timing setup for NANDs that do not support SET FEATURES Some ONFI NANDs do not support the SET/GET FEATURES commands, which, according to the spec, is perfectly valid. On these NANDs we can't set a specific timing mode using the "timing mode" feature, and we should assume the NAND does not require any setup to enter a specific timing mode. Signed-off-by: Boris Brezillon Fixes: d8e725dd8311 ("mtd: nand: automate NAND timings selection") Reported-by: Alexander Dahl Cc: Tested-by: Alexander Dahl Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cb25fae18207330caac848d850e11f9cdb500dbf Author: Jonathan Corbet Date: Sun Jul 30 16:18:03 2017 -0600 mtd: nand: Fix a docs build warning Commit 0b4773fd1649 (mtd: nand: Drop unused cached programming support) removed the "cached" parameter from nand_write_page(), but did not update the kerneldoc comments, creating this docs build warning: ./drivers/mtd/nand/nand_base.c:2751: warning: Excess function parameter 'cached' description in 'nand_write_page' Remove the offending line so we can have a little peace and quiet. Signed-off-by: Jonathan Corbet Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 1 - 1 file changed, 1 deletion(-) commit 791eccd94965a8029ae09c5530bcb9a76794e408 Author: Bryan O'Donoghue Date: Fri Jul 28 14:22:57 2017 +0100 mtd: nand: sunxi: fix potential divide-by-zero error clk_round_rate() can return <= 0. Currently the value returned by clk_round_rate() is used directly for a division. This patch introduces a guard to ensure a divide-by-zero or a divide by a negative number for that matter can't happen by bugging out returning -EINVAL if clk_round_rate() returns <= 0. Fixes: 2d43457f79e4 ("mtd: nand: sunxi: fix EDO mode selection") Signed-off-by: Bryan O'Donoghue Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 4 ++++ 1 file changed, 4 insertions(+) commit f7f8c1756e9a5f1258a7cc6b663f8451b724900f Author: Miquel Raynal Date: Wed Jul 5 08:51:09 2017 +0200 nand: fix wrong default oob layout for small pages using soft ecc When using soft ecc, if no ooblayout is given, the core automatically uses one of the nand_ooblayout_{sp,lp}*() functions to determine the layout inside the out of band data. Until kernel version 4.6, struct nand_ecclayout was used for that purpose. During the migration from 4.6 to 4.7, an error shown up in the small page layout, in the case oob section is only 8 bytes long. The layout was using three bytes (0, 1, 2) for ecc, two bytes (3, 4) as free bytes, one byte (5) for bad block marker and finally two bytes (6, 7) as free bytes, as shown there: [linux-4.6] drivers/mtd/nand/nand_base.c:52 static struct nand_ecclayout nand_oob_8 = { .eccbytes = 3, .eccpos = {0, 1, 2}, .oobfree = { {.offset = 3, .length = 2}, {.offset = 6, .length = 2} } }; This fixes the current implementation which is incoherent. It references bit 3 at the same time as an ecc byte and a free byte. Furthermore, it is clear with the previous implementation that there is only one ecc section with 8 bytes oob sections. We shall return -ERANGE in the nand_ooblayout_ecc_sp() function when asked for the second section. Signed-off-by: Miquel Raynal Fixes: 41b207a70d3a ("mtd: nand: implement the default mtd_ooblayout_ops") Cc: Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 12c5d0c0485fd03127e24848af0f0aff399d2db9 Merge: 1bff8a0 87173cd Author: David S. Miller Date: Tue Aug 1 20:06:07 2017 -0700 Merge branch 'net-Fix-64-bit-statistics-seqcount-init' Florian Fainelli says: ==================== drivers: net: Fix 64-bit statistics seqcount init This patch series fixes a bunch of drivers to have their 64-bit statistics seqcount cookie be initialized correctly. Most of these drivers (except b44, gtp) are probably used on 64-bit only hosts and so the lockdep splat might have never been seen. ==================== Signed-off-by: David S. Miller commit 87173cd6cf242f2340db187d82bd47a48fe5e5fe Author: Florian Fainelli Date: Tue Aug 1 12:11:13 2017 -0700 ipvlan: Fix 64-bit statistics seqcount initialization On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a lockdep splat indicating this seqcount is not correctly initialized, fix that by using the proper helper function: netdev_alloc_pcpu_stats(). Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a0dee1ffe0e8f4101e704a325e97f8997b0abcc Author: Florian Fainelli Date: Tue Aug 1 12:11:12 2017 -0700 netvsc: Initialize 64-bit stats seqcount On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a lockdep splat indicating this seqcount is not correctly initialized, fix that. In commit 6c80f3fc2398 ("netvsc: report per-channel stats in ethtool statistics") netdev_alloc_pcpu_stats() was removed in favor of open-coding the 64-bits statistics, except that u64_stats_init() was missed. Fixes: 6c80f3fc2398 ("netvsc: report per-channel stats in ethtool statistics") Signed-off-by: Florian Fainelli Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 2 ++ 1 file changed, 2 insertions(+) commit 790cb2ebb3f9c5d26a320117d5d13cafe479484d Author: Florian Fainelli Date: Tue Aug 1 12:11:10 2017 -0700 gtp: Initialize 64-bit per-cpu stats correctly On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a lockdep splat indicating this seqcount is not correctly initialized, fix that by using netdev_alloc_pcpu_stats() instead of an open coded allocation. Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ceb781a1aa0356086e2bdc76bcd953fcb7ac377 Author: Florian Fainelli Date: Tue Aug 1 12:11:09 2017 -0700 nfp: Initialize RX and TX ring 64-bit stats seqcounts On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a lockdep splat indicating this seqcount is not correctly initialized, fix that. Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs") Signed-off-by: Florian Fainelli Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 ++ 1 file changed, 2 insertions(+) commit 7c3a4626eb65e78ebe208f48ffa21a5002f7f38e Author: Florian Fainelli Date: Tue Aug 1 12:11:08 2017 -0700 ixgbe: Initialize 64-bit stats seqcounts On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a lockdep splat indicating this seqcount is not correctly initialized, fix that. Fixes: 4197aa7bb818 ("ixgbevf: provide 64 bit statistics") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7d6d067790289e4f61f59fa60550ca5918aa25bd Author: Florian Fainelli Date: Tue Aug 1 12:11:07 2017 -0700 i40e: Initialize 64-bit statistics TX ring seqcount On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a lockdep splat indicating this seqcount is not correctly initialized, fix that. Fixes: 980e9b118642 ("i40e: Add support for 64 bit netstats") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 ++ 1 file changed, 2 insertions(+) commit e43c9f23efadade684773a855675c99da278c862 Author: Florian Fainelli Date: Tue Aug 1 12:11:06 2017 -0700 b44: Initialize 64-bit stats seqcount On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a lockdep splat indicating this seqcount is not correctly initialized, fix that. Fixes: eeda8585522b ("b44: add 64 bit stats") Signed-off-by: Florian Fainelli Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/b44.c | 1 + 1 file changed, 1 insertion(+) commit f2e2c00adcdc59b9fe86c82259abdaf32d0ee6ea Author: Chuanxiao Dong Date: Tue Aug 1 17:47:26 2017 +0800 drm/i915/gvt: clean workload queue if error happened If a workload caused a HW GPU hang or it is in the middle of vGPU reset, the workload queue should be cleaned up to emulate the hang state of the GPU. v2: - use ENGINE_MASK(ring_id) instead of (1 << ring_id). (Zhenyu) Signed-off-by: Chuanxiao Dong Cc: Zhenyu Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/execlist.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 6184cc8ddbb318758a000da68c5285fc2dd74338 Author: Chuanxiao Dong Date: Tue Aug 1 17:47:25 2017 +0800 drm/i915/gvt: change resetting to resetting_eng Use resetting_eng to identify which engine is resetting so the rest ones' workload won't be impacted v2: - use ENGINE_MASK(ring_id) instead of (1 << ring_id). (Zhenyu) Signed-off-by: Chuanxiao Dong Cc: Zhenyu Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/execlist.c | 10 +++++----- drivers/gpu/drm/i915/gvt/gvt.h | 2 +- drivers/gpu/drm/i915/gvt/scheduler.c | 3 ++- drivers/gpu/drm/i915/gvt/vgpu.c | 8 +++++--- 4 files changed, 13 insertions(+), 10 deletions(-) commit a477b9cd37aa81a490dfa3265b7ff4f2c5a92463 Author: Marc Zyngier Date: Tue Aug 1 20:11:02 2017 -0500 PCI: Add pci_reset_function_locked() The implementation of PCI workarounds may require that the device is reset from its probe function. This implies that the PCI device lock is already held, and makes calling pci_reset_function() impossible (since it will itself try to take that lock). Add pci_reset_function_locked(), which is the equivalent of pci_reset_function(), except that it requires the PCI device lock to be already held by the caller. Tested-by: Ard Biesheuvel Signed-off-by: Marc Zyngier [bhelgaas: folded in fix for conflict with 52354b9d1f46 ("PCI: Remove __pci_dev_reset() and pci_dev_reset()")] Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # 4.11: 52354b9d1f46: PCI: Remove __pci_dev_reset() and pci_dev_reset() Cc: stable@vger.kernel.org # 4.11 drivers/pci/pci.c | 35 +++++++++++++++++++++++++++++++++++ include/linux/pci.h | 1 + 2 files changed, 36 insertions(+) commit 8f93e043d048b671c32c6f0a5102fefa800c4618 Author: Arnd Bergmann Date: Wed Jul 26 21:59:21 2017 +0200 drm/msm: gpu: don't abuse dma_alloc for non-DMA allocations In zap_shader_load_mdt(), we pass a pointer to a phys_addr_t into dmam_alloc_coherent, which the compiler warns about: drivers/gpu/drm/msm/adreno/a5xx_gpu.c: In function 'zap_shader_load_mdt': drivers/gpu/drm/msm/adreno/a5xx_gpu.c:54:50: error: passing argument 3 of 'dmam_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types] The returned DMA address is later passed on to a function that takes a phys_addr_t, so it's clearly wrong to use the DMA mapping interface here: the memory may be uncached, or the address may be completely wrong if there is an IOMMU connected to the device. What the code actually wants to do is to get the physical address from the reserved-mem node. It goes through the dma-mapping interfaces for obscure reasons, and this apparently only works by chance, relying on specific bugs in the error handling of the arm64 dma-mapping implementation. The same problem existed in the "venus" media driver, which was now fixed by Stanimir Varbanov after long discussions. In order to make some progress here, I have now ported his approach over to the adreno driver. The patch is currently untested, and should get a good review, but it is now much simpler than the original, and it should be obvious what goes wrong if I made a mistake in the port. See also: a6e2d36bf6b7 ("media: venus: don't abuse dma_alloc for non-DMA allocations") Cc: Stanimir Varbanov Fixes: 7c65817e6d38 ("drm/msm: gpu: Enable zap shader for A5XX") Acked-by: Bjorn Andersson Acked-and-Tested-by: Jordan Crouse Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 72 +++++++++++------------------------ drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 2 - 2 files changed, 23 insertions(+), 51 deletions(-) commit bdab8e8b2bc89dce73b6bcabcd295806ce2e5ef9 Author: Arnd Bergmann Date: Wed Jul 26 17:52:44 2017 +0200 drm/msm: gpu: call qcom_mdt interfaces only for ARCH_QCOM When compile-testing for something other than ARCH_QCOM, we run into a link error: drivers/gpu/drm/msm/adreno/a5xx_gpu.o: In function `a5xx_hw_init': a5xx_gpu.c:(.text.a5xx_hw_init+0x600): undefined reference to `qcom_mdt_get_size' a5xx_gpu.c:(.text.a5xx_hw_init+0x93c): undefined reference to `qcom_mdt_load' There is already an #ifdef that tries to check for CONFIG_QCOM_MDT_LOADER, but that symbol is only meaningful when building for ARCH_QCOM. This adds a compile-time check for ARCH_QCOM, and clarifies the Kconfig select statement so we don't even try it for other targets. The check for CONFIG_QCOM_MDT_LOADER can then go away, which also improves compile-time coverage and makes the code a little nicer to read. Fixes: 7c65817e6d38 ("drm/msm: gpu: Enable zap shader for A5XX") Acked-by: Jordan Crouse Acked-by: Bjorn Andersson Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark drivers/gpu/drm/msm/Kconfig | 2 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) commit 541de4c9c953438b677c31072e7762115ac11299 Author: Archit Taneja Date: Fri Jul 28 16:17:08 2017 +0530 drm/msm/adreno: Prevent unclocked access when retrieving timestamps msm_gpu's get_timestamp() op (called by the MSM_GET_PARAM ioctl) can result in register accesses. We need our power domain and clocks to be active for that. Make sure they are enabled here. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit cdbc78ba702650b02b9e3e957dbaa725423bdf1e Author: Jordan Crouse Date: Thu Jul 27 10:42:35 2017 -0600 drm/msm: Remove __user from __u64 data types __user should be used to identify user pointers and not __u64 variables containing pointers. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark include/uapi/drm/msm_drm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b0135ab91af16be57e444e74023e48b1f379ab36 Author: Jordan Crouse Date: Thu Jul 27 10:42:34 2017 -0600 drm/msm: args->fence should be args->flags Fix a typo in msm_ioctl_gem_submit - check args->flags for the MSM_SUBMIT_NO_IMPLICIT flag instead of args->fence. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a23cb3b52fec73b22671bac65356d8c55bf37706 Author: Jordan Crouse Date: Thu Jul 27 10:42:32 2017 -0600 drm/msm: Turn off hardware clock gating before reading A5XX registers On A5XX GPU hardware clock gating needs to be turned off before reading certain GPU registers via AHB. Turn off HWCG before calling adreno_show() to safely dump all the registers without a system hang. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6e749e5971fc7c7a33d7a673fbe4944604b397cf Author: Jordan Crouse Date: Thu Jul 27 10:42:31 2017 -0600 drm/msm: Allow hardware clock gating to be toggled There are some use cases wherein we need to turn off hardware clock gating before reading certain registers. Modify the A5XX HWCG function to allow user to enable or disable clock gating at will. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 42 ++++++++--------------------------- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 1 + 2 files changed, 10 insertions(+), 33 deletions(-) commit 3394f5618dfe8e686a2429aad75edf7ff6540911 Author: Jordan Crouse Date: Thu Jul 27 10:42:30 2017 -0600 drm/msm: Remove some potentially blocked register ranges The 0xf400 and 0xf800 ranges are in the RBBM_SECVID block which may be protected from CPU access. Skip dumping them since they are minimally useful for debugging and they aren't worth a system hang. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 49 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 25 deletions(-) commit 1bff8a0c1f8c236209ee369b7952751c04eaa71a Author: K. Den Date: Tue Aug 1 01:05:39 2017 +0900 gue: fix remcsum when GRO on and CHECKSUM_PARTIAL boundary is outer UDP In the case that GRO is turned on and the original received packet is CHECKSUM_PARTIAL, if the outer UDP header is exactly at the last csum-unnecessary point, which for instance could occur if the packet comes from another Linux guest on the same Linux host, we have to do either remcsum_adjust or set up CHECKSUM_PARTIAL again with its csum_start properly reset considering RCO. However, since b7fe10e5ebac ("gro: Fix remcsum offload to deal with frags in GRO") that barrier in such case could be skipped if GRO turned on, hence we pass over it and the inner L4 validation mistakenly reckons it as a bad csum. This patch makes remcsum_offload being reset at the same time of GRO remcsum cleanup, so as to make it work in such case as before. Fixes: b7fe10e5ebac ("gro: Fix remcsum offload to deal with frags in GRO") Signed-off-by: Koichiro Den Signed-off-by: David S. Miller net/ipv4/fou.c | 1 + 1 file changed, 1 insertion(+) commit be73b3043bf465455d4c9b88f68e03b6447bcfb0 Author: K. Den Date: Tue Aug 1 01:05:20 2017 +0900 vxlan: fix remcsum when GRO on and CHECKSUM_PARTIAL boundary is outer UDP In the case that GRO is turned on and the original received packet is CHECKSUM_PARTIAL, if the outer UDP header is exactly at the last csum-unnecessary point, which for instance could occur if the packet comes from another Linux guest on the same Linux host, we have to do either remcsum_adjust or set up CHECKSUM_PARTIAL again with its csum_start properly reset considering RCO. However, since b7fe10e5ebac("gro: Fix remcsum offload to deal with frags in GRO") that barrier in such case could be skipped if GRO turned on, hence we pass over it and the inner L4 validation mistakenly reckons it as a bad csum. This patch makes remcsum_offload being reset at the same time of GRO remcsum cleanup, so as to make it work in such case as before. Fixes: b7fe10e5ebac ("gro: Fix remcsum offload to deal with frags in GRO") Signed-off-by: Koichiro Den Signed-off-by: David S. Miller drivers/net/vxlan.c | 1 + 1 file changed, 1 insertion(+) commit d0538f5048fafe5633c58f25c3332f67739cdeb4 Author: Archit Taneja Date: Fri Jul 28 16:17:00 2017 +0530 drm/msm/mdp5: Drop clock names with "_clk" suffix We have upstream bindings (msm8916) that have the "_clk" suffix in the clock names. The downstream bindings also require it. We want to drop the "_clk" suffix and at the same time support existing bindings. Update the MDP5 code with the the msm_clk_get() helper to support both old and new clock names. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b0e77fd87cf302351e537881c8daf8d1c69cf541 Author: Archit Taneja Date: Fri Jul 28 16:16:59 2017 +0530 drm/msm/mdp5: Fix typo in encoder_enable path The mdp5_cmd_encoder_disable is accidentally called in the encoder enable path. We've not seen any problems since we haven't tested with command mode panels in a while. Fix the copy-paste error. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51391caf99e34d2d75ffc428845062d93aa739c6 Author: Andy Lutomirski Date: Tue Aug 1 08:37:26 2017 -0700 platform/x86: dell-wmi: Fix driver interface version query When I converted dell-wmi to the new bus infrastructure, I left the call to dell_wmi_check_descriptor_buffer() in dell_wmi_init(). This could cause two problems: - An error message when loading the driver on a system without dell-wmi. We'd try to read the event descriptor even if the WMI GUID wasn't there. - A possible race if dell-wmi was loaded manually before wmi was fully initialized. Fix it by moving the call to the probe function where it belongs. Fixes: bff589be59c5 ("platform/x86: dell-wmi: Convert to the WMI bus infrastructure") Signed-off-by: Andy Lutomirski Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 79687057c2880d871451f107548187e4853c38e6 Author: Hans Verkuil Date: Sun Jul 30 14:46:56 2017 +0200 drm/msm: NULL pointer dereference in drivers/gpu/drm/msm/msm_gem_vma.c While I was testing the upcoming adv7533 CEC support with my Dragonboard c410 I encountered this NULL pointer dereference: [ 17.912822] Unable to handle kernel NULL pointer dereference at virtual address 000000e8 [ 17.917191] user pgtable: 4k pages, 48-bit VAs, pgd = ffff800030e9f000 [ 17.925249] [00000000000000e8] *pgd=00000000b0daf003, *pud=0000000000000000 [ 17.931650] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 17.938395] Modules linked in: btqcomsmd btqca arc4 wcn36xx mac80211 bluetooth cfg80211 ecdh_generic r8152 snd_soc_hdmi_codec adv7511 cec qcom_wcnss_pil msm mdt_loader drm_kms_helper msm_rng rng_core drm [ 17.943967] CPU: 0 PID: 1684 Comm: Xorg Tainted: G W 4.13.0-rc1-dragonboard #111 [ 17.962005] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) [ 17.970685] task: ffff800031236c00 task.stack: ffff800033fbc000 [ 17.977582] PC is at msm_gem_unmap_vma+0x20/0x80 [msm] [ 17.983213] LR is at put_iova+0x60/0xb8 [msm] [ 17.988303] pc : [] lr : [] pstate: 20000145 [ 17.992733] sp : ffff800033fbfb30 [ 18.000193] x29: ffff800033fbfb30 x28: ffff800030b5f000 [ 18.003407] x27: 00000000000000b4 x26: ffff0000009f8cd8 [ 18.008789] x25: 0000000000000004 x24: dead000000000100 [ 18.014085] x23: dead000000000200 x22: ffff800030b5fd40 [ 18.019379] x21: ffff800030b5fc00 x20: 0000000000000000 [ 18.024675] x19: ffff80003082bf00 x18: 0000000000000000 [ 18.029970] x17: 0000ffffb3347e70 x16: ffff000008207638 [ 18.035265] x15: 0000000000000053 x14: 0000000000000000 [ 18.040560] x13: 0000000000000038 x12: 0101010101010101 [ 18.045855] x11: 7f7f7f7f7f7f7f7f x10: 0000000000000040 [ 18.051150] x9 : ffff800030b5f038 x8 : ffff800031657b50 [ 18.056446] x7 : ffff800031657b78 x6 : 0000000000000000 [ 18.061740] x5 : 0000000000000000 x4 : 00000000b5c01000 [ 18.067036] x3 : 0000000000000000 x2 : ffff8000337bf300 [ 18.072330] x1 : ffff80003082bf00 x0 : 0000000000000000 [ 18.077629] Process Xorg (pid: 1684, stack limit = 0xffff800033fbc000) [ 18.082925] Stack: (0xffff800033fbfb30 to 0xffff800033fc0000) [ 18.089262] fb20: ffff800033fbfb60 ffff000000ac07c8 [ 18.095081] fb40: ffff80003082bf00 ffff800030b5fc90 ffff800030b5fc00 ffff000000abf4a0 [ 18.102893] fb60: ffff800033fbfba0 ffff000000ac16b0 ffff800030b5fc00 ffff8000338ff870 [ 18.110706] fb80: ffff8000338ff800 ffff800030b5fc00 ffff800030b5fda8 ffff800033fbfd80 [ 18.118518] fba0: ffff800033fbfbe0 ffff0000009d4244 ffff800030b5fc00 ffff800030b5f038 [ 18.126332] fbc0: ffff800033fbfbd0 ffff800030b5fc00 ffff800030b5f038 ffff0000009d4840 [ 18.134144] fbe0: ffff800033fbfbf0 ffff0000009d4858 ffff800033fbfc10 ffff0000009d48e4 [ 18.141955] fc00: ffff800030b5fc00 ffff8000338ffd98 ffff800033fbfc30 ffff0000009d49a4 [ 18.149768] fc20: ffff800030b5fc00 ffff800030b5f000 ffff800033fbfc60 ffff0000009d4a4c [ 18.157581] fc40: ffff800030b5f050 ffff800030b5f000 0000000000000001 ffff800030b5fc00 [ 18.165394] fc60: ffff800033fbfca0 ffff0000009d4ab0 0000000000000018 ffff800030b5f000 [ 18.173206] fc80: ffff0000009efd28 ffff800033fbfd80 ffff8000338ff800 ffff0000009d56a8 [ 18.181019] fca0: ffff800033fbfcb0 ffff0000009efd54 ffff800033fbfcc0 ffff0000009d56c8 [ 18.188831] fcc0: ffff800033fbfd00 ffff0000009d58e0 ffff0000009fa6e0 00000000c00464b4 [ 18.196643] fce0: 0000000000000004 ffff80003082b400 0000ffffea1f0e00 0000000000000000 [ 18.204456] fd00: ffff800033fbfe00 ffff000008206f0c ffff80000335caf8 ffff80003082b400 [ 18.212269] fd20: 0000ffffea1f0e00 ffff80003082b400 00000000c00464b4 0000ffffea1f0e00 [ 18.220081] fd40: 0000000000000124 000000000000001d ffff0000089d2000 ffff800031236c00 [ 18.227894] fd60: ffff800033fbfd80 0000000000000004 ffff0000009efd28 ffff800033fbfd80 [ 18.235706] fd80: 0000000100000001 0000008000000001 0000001800000020 0000000000000001 [ 18.243518] fda0: 0000000100000000 0000000100000001 0000ffff00000000 0000ffff00000000 [ 18.251331] fdc0: 0000000000000124 0000000000000038 ffff0000089d2000 ffff800031236c00 [ 18.259144] fde0: ffff800033fbfe40 ffff000008214124 ffff800033fbfe30 ffff000008203290 [ 18.266956] fe00: ffff800033fbfe80 ffff0000082076b4 0000000000000000 ffff800030d8a000 [ 18.274768] fe20: ffff80003082b400 0000000000000016 ffff800033fbfe50 ffff0000081f0488 [ 18.282581] fe40: ffff800033fbfe80 ffff000008207678 0000000000000000 ffff80003082b400 [ 18.290393] fe60: ffff800033fbfe70 ffff0000082138b0 ffff800033fbfe80 ffff000008207658 [ 18.298207] fe80: 0000000000000000 ffff000008082f84 0000000000000000 0000800034a16000 [ 18.306017] fea0: ffffffffffffffff 0000ffffb3347e7c 0000000000000000 0000000000000015 [ 18.313832] fec0: 0000000000000016 00000000c00464b4 0000ffffea1f0e00 0000000000000001 [ 18.321643] fee0: 0000000000000020 0000000000000080 0000000000000001 0000000000000000 [ 18.329456] ff00: 000000000000001d 000000012692c5b0 0101010101010101 7f7f7f7f7f7f7f7f [ 18.337269] ff20: 0101010101010101 0000000000000038 0000000000000000 0000000000000053 [ 18.345082] ff40: 0000ffffb368b2b8 0000ffffb3347e70 0000000000000000 0000ffffb3847000 [ 18.352894] ff60: 0000ffffea1f0e00 00000000c00464b4 0000000000000016 0000ffffea1f0edc [ 18.360705] ff80: 000000012692ad20 0000000000000003 00000001214282e4 0000000121428388 [ 18.368518] ffa0: 0000000000000000 0000ffffea1f0da0 0000ffffb367185c 0000ffffea1f0da0 [ 18.376332] ffc0: 0000ffffb3347e7c 0000000000000000 0000000000000016 000000000000001d [ 18.384142] ffe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 18.391953] Call trace: [ 18.399760] Exception stack(0xffff800033fbf950 to 0xffff800033fbfa80) [ 18.402023] f940: ffff80003082bf00 0001000000000000 [ 18.408622] f960: ffff800033fbfb30 ffff000000ac2d58 0000000020000145 ffff8000338ffa78 [ 18.416435] f980: 0000000000000000 0000000000000000 ffff800033fbf9e0 ffff0000089afcf0 [ 18.424248] f9a0: ffff80000348f230 ffff8000338ffa78 0000000000000000 0000000000000000 [ 18.432060] f9c0: ffff8000338ffaa8 0000000000000001 ffff800033fbfb80 ffff0000009e8f38 [ 18.439872] f9e0: ffff800033fbfa10 ffff0000089a9ff8 0000000000000027 ffff80003082b918 [ 18.447684] fa00: 0000000000000000 ffff80003082bf00 ffff8000337bf300 0000000000000000 [ 18.455497] fa20: 00000000b5c01000 0000000000000000 0000000000000000 ffff800031657b78 [ 18.463310] fa40: ffff800031657b50 ffff800030b5f038 0000000000000040 7f7f7f7f7f7f7f7f [ 18.471122] fa60: 0101010101010101 0000000000000038 0000000000000000 0000000000000053 [ 18.479062] [] msm_gem_unmap_vma+0x20/0x80 [msm] [ 18.486862] [] put_iova+0x60/0xb8 [msm] [ 18.492938] [] msm_gem_free_object+0x60/0x198 [msm] [ 18.498432] [] drm_gem_object_free+0x1c/0x58 [drm] [ 18.504854] [] drm_gem_object_put_unlocked+0x90/0xa0 [drm] [ 18.511273] [] drm_gem_object_handle_put_unlocked+0x64/0xd0 [drm] [ 18.518300] [] drm_gem_object_release_handle+0x54/0x98 [drm] [ 18.525679] [] drm_gem_handle_delete+0x64/0xb8 [drm] [ 18.532968] [] drm_gem_dumb_destroy+0x10/0x18 [drm] [ 18.539479] [] drm_mode_destroy_dumb_ioctl+0x2c/0x40 [drm] [ 18.545992] [] drm_ioctl_kernel+0x68/0xe0 [drm] [ 18.553105] [] drm_ioctl+0x178/0x3b0 [drm] [ 18.558970] [] do_vfs_ioctl+0xa4/0x7d0 [ 18.564694] [] SyS_ioctl+0x7c/0x98 [ 18.569992] [] el0_svc_naked+0x38/0x3c [ 18.574941] Code: a90153f3 aa0003f4 f90013f5 aa0103f3 (f9407400) [ 18.580502] ---[ end trace b1ac6888ec40b0be ]--- It turns out that the aspace argument in msm_gem_unmap_vma() is NULL. Signed-off-by: Hans Verkuil [Note: this case gets hit with !IOMMU config] Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_vma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3949a9a3e09f87e0371e80a2bef6ec0d48b575d Author: Hans Verkuil Date: Sun Jul 30 14:42:36 2017 +0200 drm/msm: fix WARN_ON in add_vma() with no iommu While I was testing the upcoming adv7533 CEC support with my Dragonboard c410 I encountered this warning several times during boot: [ 4.408309] WARNING: CPU: 3 PID: 1347 at drivers/gpu/drm/msm/msm_gem.c:312 add_vma+0x78/0x88 [msm] [ 4.412951] Modules linked in: snd_soc_hdmi_codec adv7511 cec qcom_wcnss_pil msm mdt_loader drm_kms_helper msm_rng rng_core drm [ 4.421728] CPU: 3 PID: 1347 Comm: kworker/3:3 Not tainted 4.13.0-rc1-dragonboard #111 [ 4.433090] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) [ 4.441081] Workqueue: events deferred_probe_work_func [ 4.447929] task: ffff800031243600 task.stack: ffff800003394000 [ 4.453023] PC is at add_vma+0x78/0x88 [msm] [ 4.458823] LR is at _msm_gem_new+0xd4/0x188 [msm] [ 4.463207] pc : [] lr : [] pstate: 40000145 [ 4.467811] sp : ffff8000033978a0 [ 4.475357] x29: ffff8000033978a0 x28: ffff8000031dea18 [ 4.478572] x27: ffff800003933a00 x26: ffff800003b39800 [ 4.483953] x25: ffff8000338ff800 x24: 0000000000000001 [ 4.489249] x23: 0000000000000000 x22: ffff800003b39800 [ 4.494544] x21: ffff8000338ff800 x20: 0000000000000000 [ 4.499839] x19: ffff800003932600 x18: 0000000000000001 [ 4.505135] x17: 0000ffff8969e9e0 x16: ffff7e00000ce7a0 [ 4.510429] x15: ffffffffffffffff x14: ffff8000833977ef [ 4.515724] x13: ffff8000033977f3 x12: 0000000000000038 [ 4.521020] x11: 0101010101010101 x10: ffffff7f7fff7f7f [ 4.526315] x9 : 0000000000000000 x8 : ffff800003932800 [ 4.531633] x7 : 0000000000000000 x6 : 000000000000003f [ 4.531644] x5 : 0000000000000040 x4 : 0000000000000000 [ 4.531650] x3 : ffff800031243600 x2 : 0000000000000000 [ 4.531655] x1 : 0000000000000000 x0 : 0000000000000000 [ 4.531670] Call trace: [ 4.531676] Exception stack(0xffff8000033976c0 to 0xffff8000033977f0) [ 4.531683] 76c0: ffff800003932600 0001000000000000 ffff8000033978a0 ffff000000ac01f8 [ 4.531688] 76e0: 0000000000000140 0000000000000000 ffff800003932550 ffff800003397780 [ 4.531694] 7700: ffff800003397730 ffff000008261ce8 0000000000000000 ffff8000031d2f80 [ 4.531699] 7720: ffff800003397800 ffff0000081d671c 0000000000000140 0000000000000000 [ 4.531705] 7740: ffff000000ac04c0 0000000000004003 ffff800003397908 00000000014080c0 [ 4.531710] 7760: 0000000000000000 ffff800003b39800 0000000000000000 0000000000000000 [ 4.531716] 7780: 0000000000000000 ffff800031243600 0000000000000000 0000000000000040 [ 4.531721] 77a0: 000000000000003f 0000000000000000 ffff800003932800 0000000000000000 [ 4.531726] 77c0: ffffff7f7fff7f7f 0101010101010101 0000000000000038 ffff8000033977f3 [ 4.531730] 77e0: ffff8000833977ef ffffffffffffffff [ 4.531881] [] add_vma+0x78/0x88 [msm] [ 4.532011] [] _msm_gem_new+0xd4/0x188 [msm] [ 4.532134] [] msm_gem_new+0x10/0x18 [msm] [ 4.532260] [] msm_dsi_host_modeset_init+0x17c/0x268 [msm] [ 4.532384] [] msm_dsi_modeset_init+0x34/0x1b8 [msm] [ 4.532504] [] modeset_init+0x408/0x488 [msm] [ 4.532623] [] mdp5_kms_init+0x2b4/0x338 [msm] [ 4.532745] [] msm_drm_bind+0x218/0x4e8 [msm] [ 4.532755] [] try_to_bring_up_master+0x1f4/0x318 [ 4.532762] [] component_add+0x98/0x180 [ 4.532887] [] dsi_dev_probe+0x18/0x28 [msm] [ 4.532895] [] platform_drv_probe+0x58/0xc0 [ 4.532901] [] driver_probe_device+0x324/0x458 [ 4.532907] [] __device_attach_driver+0xac/0x170 [ 4.532913] [] bus_for_each_drv+0x4c/0x98 [ 4.532918] [] __device_attach+0xc0/0x160 [ 4.532924] [] device_initial_probe+0x10/0x18 [ 4.532929] [] bus_probe_device+0x94/0xa0 [ 4.532934] [] deferred_probe_work_func+0x8c/0xe8 [ 4.532941] [] process_one_work+0x1d4/0x330 [ 4.532946] [] worker_thread+0x48/0x468 [ 4.532952] [] kthread+0x12c/0x130 [ 4.532958] [] ret_from_fork+0x10/0x40 [ 4.532962] ---[ end trace b1ac6888ec40b0bb ]--- Signed-off-by: Hans Verkuil Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 4 ++++ 1 file changed, 4 insertions(+) commit 40413955ee265a5e42f710940ec78f5450d49149 Author: yujuan.qi Date: Mon Jul 31 11:23:01 2017 +0800 Cipso: cipso_v4_optptr enter infinite loop in for(),if((optlen > 0) && (optptr[1] == 0)), enter infinite loop. Test: receive a packet which the ip length > 20 and the first byte of ip option is 0, produce this issue Signed-off-by: yujuan.qi Acked-by: Paul Moore Signed-off-by: David S. Miller net/ipv4/cipso_ipv4.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit fdaa419bb24cc191f2dce2ec19af1ef7c5076a36 Merge: bc78d64 a93439c Author: David S. Miller Date: Tue Aug 1 15:22:56 2017 -0700 Merge branch 'ethernet-ti-cpts-fix-tx-timestamping-timeout' Grygorii Strashko says: ==================== net: ethernet: ti: cpts: fix tx timestamping timeout With the low Ethernet connection speed cpdma notification about packet processing can be received before CPTS TX timestamp event, which is set when packet actually left CPSW while cpdma notification is sent when packet pushed in CPSW fifo. As result, when connection is slow and CPU is fast enough TX timestamping is not working properly. Issue was discovered using timestamping tool on am57x boards with Ethernet link speed forced to 100M and on am335x-evm with Ethernet link speed forced to 10M. Patch3 - This series fixes it by introducing TX SKB queue to store PTP SKBs for which Ethernet Transmit Event hasn't been received yet and then re-check this queue with new Ethernet Transmit Events by scheduling CPTS overflow work more often until TX SKB queue is not empty. Patch 1,2 - As CPTS overflow work is time critical task it important to ensure that its scheduling is not delayed. Unfortunately, There could be significant delay in CPTS work schedule under high system load and on -RT which could cause CPTS misbehavior due to internal counter overflow and there is no way to tune CPTS overflow work execution policy and priority manually. The kthread_worker can be used instead of workqueues, as it creates separate named kthread for each worker and its its execution policy and priority can be configured using chrt tool. Instead of modifying CPTS driver itself it was proposed to it was proposed to add PTP auxiliary worker to the PHC subsystem [1], so other drivers can benefit from this feature also. [1] https://www.spinics.net/lists/netdev/msg445392.html changes in v4: - fixed memleak in ptp_clock_register() - undocumented change in cpts_find_ts() moved to separate patch (minor fix) changes in v3: - patch 1: added proper error handling in ptp_clock_register. minor comments applied. changes in v2: - added PTP auxiliary worker to the PHC subsystem Links v3: https://www.spinics.net/lists/netdev/msg446058.html v2: https://www.spinics.net/lists/netdev/msg445859.html v1: https://www.spinics.net/lists/netdev/msg445387.html ==================== Signed-off-by: David S. Miller commit a93439cce2c1d31469e8245c504dbb6d1bed8749 Author: Grygorii Strashko Date: Fri Jul 28 17:30:05 2017 -0500 net: ethernet: ti: cpts: fix fifo read in cpts_find_ts Now the call chain cpts_find_ts() |- cpts_fifo_read(cpts, CPTS_EV_PUSH) will stop reading CPTS FIFO if PUSH event is found. But this is not expected and CPTS FIFI should be completely drained here. This is most probably copy-paste error and it has no negative impact as CPTS_EV_PUSH should not be present in FIFO without TS_PUSH request and cpts_systim_read() and cpts_find_ts() synchronized by spin_lock. Correct above by calling cpts_fifo_read() with -1 parameter, so it will read all CPTS event from FIFO. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d5f54fec0a18eea5e4ac005646fd2bc2118636c Author: Grygorii Strashko Date: Fri Jul 28 17:30:04 2017 -0500 net: ethernet: ti: cpts: fix tx timestamping timeout With the low speed Ethernet connection CPDMA notification about packet processing can be received before CPTS TX timestamp event, which is set when packet actually left CPSW while cpdma notification is sent when packet pushed in CPSW fifo. As result, when connection is slow and CPU is fast enough TX timestamping is not working properly. Fix it, by introducing TX SKB queue to store PTP SKBs for which Ethernet Transmit Event hasn't been received yet and then re-check this queue with new Ethernet Transmit Events by scheduling CPTS overflow work more often (every 1 jiffies) until TX SKB queue is not empty. Side effect of this change is: - User space tools require to take into account possible delay in TX timestamp processing (for example ptp4l works with tx_timestamp_timeout=400 under net traffic and tx_timestamp_timeout=25 in idle). Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpts.c | 84 +++++++++++++++++++++++++++++++++++++++++- drivers/net/ethernet/ti/cpts.h | 1 + 2 files changed, 83 insertions(+), 2 deletions(-) commit 999f129289ab1599e7cdc08804a9b5ec4e1418f4 Author: Grygorii Strashko Date: Fri Jul 28 17:30:03 2017 -0500 net: ethernet: ti: cpts: convert to use ptp auxiliary worker There could be significant delay in CPTS work schedule under high system load and on -RT which could cause CPTS misbehavior due to internal counter overflow. Usage of own kthread_worker allows to avoid such kind of issues and makes it possible to tune priority of CPTS kthread_worker thread on -RT (thread name "cpts"). Hence, the CPTS driver is converted to use PTP auxiliary worker as PHC subsystem implements such functionality in a generic way now. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpts.c | 27 +++++++++++++-------------- drivers/net/ethernet/ti/cpts.h | 1 - 2 files changed, 13 insertions(+), 15 deletions(-) commit d9535cb7b7603aeb549c697ecdf92024e4d0a650 Author: Grygorii Strashko Date: Fri Jul 28 17:30:02 2017 -0500 ptp: introduce ptp auxiliary worker Many PTP drivers required to perform some asynchronous or periodic work, like periodically handling PHC counter overflow or handle delayed timestamp for RX/TX network packets. In most of the cases, such work is implemented using workqueues. Unfortunately, Kernel workqueues might introduce significant delay in work scheduling under high system load and on -RT, which could cause misbehavior of PTP drivers due to internal counter overflow, for example, and there is no way to tune its execution policy and priority manuallly. Hence, The kthread_worker can be used insted of workqueues, as it create separte named kthread for each worker and its its execution policy and priority can be configured using chrt tool. This prblem was reported for two drivers TI CPSW CPTS and dp83640, so instead of modifying each of these driver it was proposed to add PTP auxiliary worker to the PHC subsystem. The patch adds PTP auxiliary worker in PHC subsystem using kthread_worker and kthread_delayed_work and introduces two new PHC subsystem APIs: - long (*do_aux_work)(struct ptp_clock_info *ptp) callback in ptp_clock_info structure, which driver should assign if it require to perform asynchronous or periodic work. Driver should return the delay of the PTP next auxiliary work scheduling time (>=0) or negative value in case further scheduling is not required. - int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay) which allows schedule PTP auxiliary work. The name of kthread_worker thread corresponds PTP PHC device name "ptp%d". Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/ptp/ptp_clock.c | 42 ++++++++++++++++++++++++++++++++++++++++ drivers/ptp/ptp_private.h | 3 +++ include/linux/ptp_clock_kernel.h | 20 +++++++++++++++++++ 3 files changed, 65 insertions(+) commit fd40559c8657418385e42f797e0b04bfc0add748 Author: Trond Myklebust Date: Tue Aug 1 16:02:47 2017 -0400 NFSv4: Fix EXCHANGE_ID corrupt verifier issue The verifier is allocated on the stack, but the EXCHANGE_ID RPC call was changed to be asynchronous by commit 8d89bd70bc939. If we interrrupt the call to rpc_wait_for_completion_task(), we can therefore end up transmitting random stack contents in lieu of the verifier. Fixes: 8d89bd70bc939 ("NFS setup async exchange_id") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 11 ++++------- fs/nfs/nfs4xdr.c | 2 +- include/linux/nfs_xdr.h | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) commit d4cea38ebb4de90913085391ce4febde1a4ba9aa Author: Archit Taneja Date: Wed Jul 12 15:09:55 2017 +0530 drm/msm/dsi: Calculate link clock rates with updated dsi->lanes After the commit mentioned below, we start computing the byte and pixel clocks (dsi_calc_clk_rate) in the DSI bridge's mode_set() op. The calculation involves the number of DSI lanes being used by the downstream bridge/panel. If the downstream bridge/panel tries to change the number of DSI lanes (as done in the ADV7533 driver) in its mode_set() op, then our DSI host driver will not have the correct number of lanes when computing byte/pixel clocks. Fix this by delaying the clock rate calculation in the DSI bridge enable path. In particular, compute the clock rates in msm_dsi_host_get_phy_clk_req(). This fixes the DSI host error interrupts seen when we try to switch between modes that require different number of lanes (4 to 3 lanes, or vice versa) on db410c. The error interrupts occur since the byte/pixel clock rates aren't according to what the DSI video mode timing engine expects. Fixes: b62aa70a98c5 ("drm/msm/dsi: Move PHY operations out of host") Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit af1f5f12c21bd9dc08f578d86adc192eec4eb28a Author: Rob Clark Date: Mon Jul 3 13:15:57 2017 -0400 drm/msm/mdp5: fix unclocked register access in _cursor_set() Fixes an insta-reboot when screen-blanking kicks in, due to cursor updates without clocks enabled. Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 71e3dfa167b105d3c06e76fee1d0e2fd1e502cf6 Author: Dan Carpenter Date: Mon Jul 10 10:20:42 2017 +0300 drm/msm: unlock on error in msm_gem_get_iova() We recently added locking to this function but there was a direct return that was overlooked where we need to unlock. Fixes: 0e08270a1f01 ("drm/msm: Separate locking of buffer resources from struct_mutex") Signed-off-by: Dan Carpenter Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 337c017ccdf2653d0040099433fc1a2b1beb5926 Author: Wanpeng Li Date: Tue Aug 1 05:20:03 2017 -0700 KVM: async_pf: make rcu irq exit if not triggered from idle task WARNING: CPU: 5 PID: 1242 at kernel/rcu/tree_plugin.h:323 rcu_note_context_switch+0x207/0x6b0 CPU: 5 PID: 1242 Comm: unity-settings- Not tainted 4.13.0-rc2+ #1 RIP: 0010:rcu_note_context_switch+0x207/0x6b0 Call Trace: __schedule+0xda/0xba0 ? kvm_async_pf_task_wait+0x1b2/0x270 schedule+0x40/0x90 kvm_async_pf_task_wait+0x1cc/0x270 ? prepare_to_swait+0x22/0x70 do_async_page_fault+0x77/0xb0 ? do_async_page_fault+0x77/0xb0 async_page_fault+0x28/0x30 RIP: 0010:__d_lookup_rcu+0x90/0x1e0 I encounter this when trying to stress the async page fault in L1 guest w/ L2 guests running. Commit 9b132fbe5419 (Add rcu user eqs exception hooks for async page fault) adds rcu_irq_enter/exit() to kvm_async_pf_task_wait() to exit cpu idle eqs when needed, to protect the code that needs use rcu. However, we need to call the pair even if the function calls schedule(), as seen from the above backtrace. This patch fixes it by informing the RCU subsystem exit/enter the irq towards/away from idle for both n.halted and !n.halted. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Paul E. McKenney Cc: stable@vger.kernel.org Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kernel/kvm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b96fb439774e1bfb7d027ad324fa48606167cb52 Author: Paolo Bonzini Date: Thu Jul 27 12:29:32 2017 +0200 KVM: nVMX: fixes to nested virt interrupt injection There are three issues in nested_vmx_check_exception: 1) it is not taking PFEC_MATCH/PFEC_MASK into account, as reported by Wanpeng Li; 2) it should rebuild the interruption info and exit qualification fields from scratch, as reported by Jim Mattson, because the values from the L2->L0 vmexit may be invalid (e.g. if an emulated instruction causes a page fault, the EPT misconfig's exit qualification is incorrect). 3) CR2 and DR6 should not be written for exception intercept vmexits (CR2 only for AMD). This patch fixes the first two and adds a comment about the last, outlining the fix. Cc: Jim Mattson Cc: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 10 +++++++ arch/x86/kvm/vmx.c | 87 ++++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 72 insertions(+), 25 deletions(-) commit 65e93108891e571f177c202add9288eda9ac4100 Author: Dan Carpenter Date: Fri Jun 30 10:59:15 2017 +0300 drm/msm: fix an integer overflow test We recently added an integer overflow check but it needs an additional tweak to work properly on 32 bit systems. The problem is that we're doing the right hand side of the assignment as type unsigned long so the max it will have an integer overflow instead of being larger than SIZE_MAX. That means the "sz > SIZE_MAX" condition is never true even on 32 bit systems. We need to first cast it to u64 and then do the math. Fixes: 4a630fadbb29 ("drm/msm: Fix potential buffer overflow issue") Signed-off-by: Dan Carpenter Acked-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d490c9cd2f67399e1dbc951f190d03724b81d0c8 Author: Viresh Kumar Date: Thu Jun 29 14:49:59 2017 +0530 drm/msm/mdp5: Fix compilation warnings Following compilation warnings were observed for these files: CC [M] drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.o drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c: In function 'blend_setup': drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c:223:7: warning: missing braces around initializer [-Wmissing-braces] enum mdp5_pipe stage[STAGE_MAX + 1][MAX_PIPE_STAGE] = { SSPP_NONE }; ^ drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c:223:7: warning: (near initialization for 'stage[0]') [-Wmissing-braces] drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c:224:7: warning: missing braces around initializer [-Wmissing-braces] enum mdp5_pipe r_stage[STAGE_MAX + 1][MAX_PIPE_STAGE] = { SSPP_NONE }; ^ drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c:224:7: warning: (near initialization for 'r_stage[0]') [-Wmissing-braces] drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c: In function 'mdp5_plane_mode_set': drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:892:9: warning: missing braces around initializer [-Wmissing-braces] struct phase_step step = { 0 }; ^ drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:892:9: warning: (near initialization for 'step.x') [-Wmissing-braces] drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:893:9: warning: missing braces around initializer [-Wmissing-braces] struct pixel_ext pe = { 0 }; ^ drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:893:9: warning: (near initialization for 'pe.left') [-Wmissing-braces] This happens because in the first case we were initializing a two dimensional array with {0} and in the second case we were initializing a struct containing two arrays with {0}. Fix them by adding another pair of {}. Signed-off-by: Viresh Kumar Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 4 ++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7313c698050387a11c21afb0c6b4c61f21f7c042 Author: Paolo Bonzini Date: Thu Jul 27 10:31:25 2017 +0200 KVM: nVMX: do not fill vm_exit_intr_error_code in prepare_vmcs12 Do this in the caller of nested_vmx_vmexit instead. nested_vmx_check_exception was doing a vmwrite to the vmcs02's VM_EXIT_INTR_ERROR_CODE field, so that prepare_vmcs12 would move the field to vmcs12->vm_exit_intr_error_code. However that isn't possible on pre-Haswell machines. Moving the vmcs12 write to the callers fixes it. Reported-by: Jim Mattson Signed-off-by: Paolo Bonzini [Changed nested_vmx_reflect_vmexit() return type to (int)1 from (bool)1, thanks to fengguang.wu@intel.com] Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 52 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 18 deletions(-) commit 26c5cebfdb6ca799186f1e56be7d6f2480c5012c Merge: bc78d64 74ad3d2 Author: Linus Torvalds Date: Tue Aug 1 13:20:24 2017 -0700 Merge branch 'parisc-4.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parsic fixes from Helge Deller: - Our cache flushing code ran into a BUG in case context is not current. Fix it by flushing the whole cache in such rare situations (by Dave Anglin). - Fix a "sleeping function called from invalid context BUG" in our pdc_stable driver by rearranging our locks (by James Bottomley) - The thread and irq stacks require more than 16 KB since kernel 4.11. Increase both to 32 KB. - Define CONFIG_CPU_BIG_ENDIAN unconditionally on parisc to avoid wrong behaviour in qrwlock functions (by Babu Moger). * 'parisc-4.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Define CONFIG_CPU_BIG_ENDIAN parisc: pdc_stable: Fix locking when creating sysfs links parisc: Increase thread and stack size to 32kb parisc: Handle vma's whose context is not current in flush_cache_range commit fd1b8668af59a11bb754a6c9b0051c6c5ce73b74 Author: Hector Martin Date: Wed Aug 2 00:45:06 2017 +0900 USB: serial: option: add D-Link DWM-222 device ID Add device id for D-Link DWM-222. Cc: stable@vger.kernel.org Signed-off-by: Hector Martin Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) commit 0eb46345364d7318b11068c46e8a68d5dc10f65e Author: Logan Gunthorpe Date: Tue Jul 25 14:57:42 2017 -0600 ntb: ntb_test: ensure the link is up before trying to configure the mws After the link tests, there is a race on one side of the test for the link coming up. It's possible, in some cases, for the test script to write to the 'peer_trans' files before the link has come up. To fix this, we simply use the link event file to ensure both sides see the link as up before continuning. Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe Signed-off-by: Jon Mason Fixes: a9c59ef77458 ("ntb_test: Add a selftest script for the NTB subsystem") tools/testing/selftests/ntb/ntb_test.sh | 4 ++++ 1 file changed, 4 insertions(+) commit bc652eb6a0d5cffaea7dc8e8ad488aab2a1bf1ed Author: Max Filippov Date: Tue Aug 1 11:15:15 2017 -0700 xtensa: mm/cache: add missing EXPORT_SYMBOLs Functions clear_user_highpage, copy_user_highpage, flush_dcache_page, local_flush_cache_range and local_flush_cache_page may be used from modules. Export them. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov arch/xtensa/mm/cache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7f81e55c737a8fa82c71f290945d729a4902f8d2 Author: Max Filippov Date: Tue Aug 1 11:02:46 2017 -0700 xtensa: don't limit csum_partial export by CONFIG_NET csum_partial and csum_partial_copy_generic are defined unconditionally and are available even when CONFIG_NET is disabled. They are used not only by the network drivers, but also by scsi and media. Don't limit these functions export by CONFIG_NET. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov arch/xtensa/kernel/xtensa_ksyms.c | 2 -- 1 file changed, 2 deletions(-) commit f3fd2afed8eee91620d05b69ab94c14793c849d7 Author: Dave Jiang Date: Fri Jul 28 15:10:48 2017 -0700 ntb: transport shouldn't disable link due to bogus values in SPADs It seems that under certain scenarios the SPAD can have bogus values caused by an agent (i.e. BIOS or other software) that is not the kernel driver, and that causes memory window setup failure. This should not cause the link to be disabled because if we do that, the driver will never recover again. We have verified in testing that this issue happens and prevents proper link recovery. Signed-off-by: Dave Jiang Acked-by: Allen Hubbe Signed-off-by: Jon Mason Fixes: 84f766855f61 ("ntb: stop link work when we do not have memory") drivers/ntb/ntb_transport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9527b82ae3af1ebf465506868fb55e7f862cd9da Author: Sean Young Date: Tue Aug 1 12:24:17 2017 +0100 Revert "serial: Delete dead code for CIR serial ports" This reverts commit 1104321a7b3bb670dc614ffa7958c553e7b3b836. The code is not dead at all and breaks winbond-cir. Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A 00:03: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a CIR port lirc lirc0: lirc_dev: driver ir-lirc-codec (winbond-cir) registered at minor = 0 winbond-cir 00:03: Region 0x2f8-0x2ff already in use! winbond-cir: probe of 00:03 failed with error -16 Signed-off-by: Sean Young Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit ae78dd8139ce93a528beb7f3914531b7a7be9e30 Author: Ilya Dryomov Date: Thu Jul 27 17:59:14 2017 +0200 libceph: make RECOVERY_DELETES feature create a new interval This is needed so that the OSDs can regenerate the missing set at the start of a new interval where support for recovery deletes changed. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil include/linux/ceph/osd_client.h | 1 + include/linux/ceph/osdmap.h | 2 ++ include/linux/ceph/rados.h | 4 ++++ net/ceph/osd_client.c | 5 +++++ net/ceph/osdmap.c | 5 ++++- 5 files changed, 16 insertions(+), 1 deletion(-) commit f53b7665c8cec40c8a638b55ee098b721e6be20c Author: Ilya Dryomov Date: Thu Jul 27 15:16:39 2017 +0200 libceph: upmap semantic changes - apply both pg_upmap and pg_upmap_items - allow bidirectional swap of pg-upmap-items Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/osdmap.c | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) commit c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 Author: Ilya Dryomov Date: Mon Jul 24 15:49:52 2017 +0200 crush: assume weight_set != null imples weight_set_size > 0 Reflects ceph.git commit 5e8fa3e06b68fae1582c9230a3a8d1abc6146286. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/crush/mapper.c | 2 +- net/ceph/osdmap.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit e17e8969f5c59a10083af5e260bdad6026872203 Author: Ilya Dryomov Date: Mon Jul 24 16:43:49 2017 +0200 libceph: fallback for when there isn't a pool-specific choose_arg There is now a fallback to a choose_arg index of -1 if there isn't a pool-specific choose_arg set. If you create a per-pool weight-set, that works for that pool. Otherwise we try the compat/default one. If that doesn't exist either, then we use the normal CRUSH weights. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil include/linux/crush/crush.h | 2 +- net/ceph/osdmap.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 4690faf00cf838392ce038202a85ac0d5f1df598 Author: Ilya Dryomov Date: Wed Jul 26 09:59:15 2017 +0200 libceph: don't call ->reencode_message() more than once per message Reencoding an already reencoded message is a bad idea. This could happen on Policy::stateful_server connections (!CEPH_MSG_CONNECT_LOSSY), such as MDS sessions. This didn't pop up in testing because currently only OSD requests are reencoded and OSD sessions are always lossy. Fixes: 98ad5ebd1505 ("libceph: ceph_connection_operations::reencode_message() method") Signed-off-by: Ilya Dryomov Reviewed-by: "Yan, Zheng" net/ceph/messenger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 986e89898acb3d8f750f259a90cb73afca426b58 Author: Ilya Dryomov Date: Tue Jul 25 14:40:03 2017 +0200 libceph: make encode_request_*() work with r_mempool requests Messages allocated out of ceph_msgpool have a fixed front length (pool->front_len). Asserting that the entire front has been filled while encoding is thus wrong. Fixes: 8cb441c0545d ("libceph: MOSDOp v8 encoding (actual spgid + full hash)") Reported-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov Reviewed-by: "Yan, Zheng" net/ceph/osd_client.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 60668a2dcafcf8aad0860f5a5c93eb2d7438052e Merge: 440174a 9f8f5b5 7e5824c 9d154e4 364e93c 295c5ba Author: Mark Brown Date: Tue Aug 1 15:17:11 2017 +0100 Merge remote-tracking branches 'asoc/fix/rt5663', 'asoc/fix/rt5665', 'asoc/fix/samsung', 'asoc/fix/sgtl5000' and 'asoc/fix/sh' into asoc-linus commit 440174aca84d6aec1a75d6d79c276c7c65b14296 Merge: 7e5fed0 b1cd2e3 ae1fbdf deab456 651e926 c0a480d ac1ca3b Author: Mark Brown Date: Tue Aug 1 15:17:06 2017 +0100 Merge remote-tracking branches 'asoc/fix/dpcm', 'asoc/fix/imx', 'asoc/fix/msm8916', 'asoc/fix/multi-pcm', 'asoc/fix/of-graph' and 'asoc/fix/pxa' into asoc-linus commit 7e5fed09ddbb7d0f16af0ebdaca2c22b0a2fed77 Merge: 16f73eb 6512dd4 Author: Mark Brown Date: Tue Aug 1 15:17:04 2017 +0100 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit c0a480d1acf7dc184f9f3e7cf724483b0d28dc2e Author: Tony Lindgren Date: Fri Jul 28 01:23:15 2017 -0700 device property: Fix usecount for of_graph_get_port_parent() Fix inconsistent use of of_graph_get_port_parent() where asoc_simple_card_parse_graph_dai() does of_node_get() before calling it while other callers do not. We can fix this by not trashing the node passed to of_graph_get_port_parent(). Let's also make sure the callers have correct refcounts and remove related incorrect of_node_put() calls for of_for_each_phandle as that's done by of_phandle_iterator_next() except when we break out of the loop early. Let's fix both issues with a single patch to avoid kobject refcounts getting messed up more if two patches are merged separately. Otherwise strange issues can happen caused by memory corruption caused by too many kobject_del() calls such as: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 ... (___might_sleep) (__mutex_lock) (mutex_lock_nested) (kernfs_remove) (kobject_del) (kobject_put) (of_get_next_parent) (of_graph_get_port_parent) (asoc_simple_card_parse_graph_dai [snd_soc_simple_card_utils]) (asoc_graph_card_probe [snd_soc_audio_graph_card]) Fixes: 0ef472a973eb ("of_graph: add of_graph_get_port_parent()") Fixes: 2692c1c63c29 ("ASoC: add audio-graph-card support") Fixes: 1689333f8311 ("ASoC: simple-card-utils: add asoc_simple_card_parse_graph_dai()") Signed-off-by: Tony Lindgren Reviewed-by: Rob Herring Tested-by: Antonio Borneo Tested-by: Kuninori Morimoto Signed-off-by: Mark Brown drivers/of/property.c | 17 +++++++++++++++-- sound/soc/generic/audio-graph-card.c | 10 +++++----- sound/soc/generic/audio-graph-scu-card.c | 15 +++++++++------ sound/soc/generic/simple-card-utils.c | 8 +++----- sound/soc/soc-core.c | 2 ++ 5 files changed, 34 insertions(+), 18 deletions(-) commit 34f41c0316ed52b0b44542491d89278efdaa70e4 Author: Matija Glavinic Pecotic Date: Tue Aug 1 09:11:52 2017 +0200 timers: Fix overflow in get_next_timer_interrupt For e.g. HZ=100, timer being 430 jiffies in the future, and 32 bit unsigned int, there is an overflow on unsigned int right-hand side of the expression which results with wrong values being returned. Type cast the multiplier to 64bit to avoid that issue. Fixes: 46c8f0b077a8 ("timers: Fix get_next_timer_interrupt() computation") Signed-off-by: Matija Glavinic Pecotic Signed-off-by: Thomas Gleixner Reviewed-by: Alexander Sverdlin Cc: khilman@baylibre.com Cc: akpm@linux-foundation.org Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/a7900f04-2a21-c9fd-67be-ab334d459ee5@nokia.com kernel/time/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f737ffa13efd3da2c703d45894ea234e9290c89 Author: Jerome Brunet Date: Fri Jul 28 18:32:28 2017 +0200 clk: meson: mpll: fix mpll0 fractional part ignored mpll0 clock is special compared to the other mplls. It needs another bit (ssen) to be set to activate the fractional part the mpll divider Fixes: 007e6e5c5f01 ("clk: meson: mpll: add rw operation") Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/clk-mpll.c | 7 +++++++ drivers/clk/meson/clkc.h | 1 + drivers/clk/meson/gxbb.c | 5 +++++ drivers/clk/meson/meson8b.c | 5 +++++ 4 files changed, 18 insertions(+) commit df1e76f28ffe87d1b065eecab2d0fbb89e6bdee5 Author: Bartosz Golaszewski Date: Mon Jul 3 11:12:03 2017 +0200 gpiolib: skip unwanted events, don't convert them to opposite edge The previous fix for filtering out of unwatched events was not entirely correct. Instead of skipping the events we don't want, they are now interpreted as events with opposing edge. In order to fix it: always read the GPIO line value on interrupt and only emit the event if it corresponds with the event type we requested. Cc: stable@vger.kernel.org Fixes: ad537b822577 ("gpiolib: fix filtering out unwanted events") Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a589e211bd74715a63f507dade294ba618259ff7 Author: Jan Kiszka Date: Wed Jul 19 07:31:14 2017 +0200 gpio: exar: Use correct property prefix and document bindings The device-specific property should be prefixed with the vendor name, not "linux,", as Linus Walleij pointed out. Change this and document the bindings of this platform device. We didn't ship the old binding in a release yet. So we can still change it without breaking an official API. Fixes: 380b1e2f3a2f ("gpio-exar/8250-exar: Make set of exported GPIOs configurable") Signed-off-by: Jan Kiszka Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-exar.txt | 5 +++++ drivers/gpio/gpio-exar.c | 2 +- drivers/tty/serial/8250/8250_exar.c | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) commit 7e5824c93412c7fd6503e7769f8b6eb7199cd3b8 Author: Bard Liao Date: Tue Aug 1 10:30:53 2017 +0800 ASoC: rt5665: fix wrong register for bclk ratio control The register of setting back ratio should be RT5665_ADDA_CLK_2 instead of RT5665_ADDA_CLK_1. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6f97add0f2ac83b98b06dbdda58fa47638ae7b0 Author: Marc Zyngier Date: Fri Jul 21 18:15:27 2017 +0100 arm64: Use arch_timer_get_rate when trapping CNTFRQ_EL0 In an ideal world, CNTFRQ_EL0 always contains the timer frequency for the kernel to use. Sadly, we get quite a few broken systems where the firmware authors cannot be bothered to program that register on all CPUs, and rely on DT to provide that frequency. So when trapping CNTFRQ_EL0, make sure to return the actual rate (as known by the kernel), and not CNTFRQ_EL0. Acked-by: Mark Rutland Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb68cfe2f5a7f43058aed299fdbb73eb281734ed Author: Thomas Gleixner Date: Mon Jul 31 22:07:09 2017 +0200 x86/hpet: Cure interface abuse in the resume path The HPET resume path abuses irq_domain_[de]activate_irq() to restore the MSI message in the HPET chip for the boot CPU on resume and it relies on an implementation detail of the interrupt core code, which magically makes the HPET unmask call invoked via a irq_disable/enable pair. This worked as long as the irq code did unconditionally invoke the unmask() callback. With the recent changes which keep track of the masked state to avoid expensive hardware access, this does not longer work. As a consequence the HPET timer interrupts are not unmasked which breaks resume as the boot CPU waits forever that a timer interrupt arrives. Make the restore of the MSI message explicit and invoke the unmask() function directly. While at it get rid of the pointless affinity setting as nothing can change the affinity of the interrupt and the vector across suspend/resume. The restore of the MSI message reestablishes the previous affinity setting which is the correct one. Fixes: bf22ff45bed6 ("genirq: Avoid unnecessary low level irq function calls") Reported-and-tested-by: Tomi Sarvela Reported-by: Martin Peres Signed-off-by: Thomas Gleixner Acked-by: "Rafael J. Wysocki" Cc: jeffy.chen@rock-chips.com Cc: Peter Zijlstra Cc: Marc Zyngier Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1707312158590.2287@nanos arch/x86/kernel/hpet.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 558f479f687aca6a336e13309424a7c3afd32721 Author: Tzipi Peres Date: Sun Jul 30 13:29:30 2017 +0300 iwlwifi: add the new 9000 series PCI IDs Add two PCI IDs for the 9160 series. Add five PCI IDs for the 9260 series. Add one PCI IDs for the 9270 series. Add seven PCI IDs for the 9460 series. Add five PCI IDs for the 9560 series. Signed-off-by: Tzipi Peres Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 8addabf8e6e299f790038fdc92ddceaaf76adab8 Author: Naftali Goldstein Date: Thu Jul 27 04:53:55 2017 +0300 iwlwifi: mvm: set the RTS_MIMO_PROT bit in flag mask when sending sta to fw Set the STA_FLG_RTS_MIMO_PROT bit in station_flags_msk of the add sta command, so that when smps mode changes, the FW will know about it. In particular, in AP mode, clients are added upon receival of an auth request, at which point there's no knowledge of the client's smps mode. When the assoc request arrives, the add_sta command is resent to modify the station parameters. At this point the driver knows the smps mode, but since the corresponding bit in the mask is not set, the fw doesn't update this field so there's no rts protection for mimo. Fixes: 5bc5aaad407c ("iwlwifi: mvm: set up initial SMPS/NSS station info") Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e9fb92e13d5e743a6ff13d3206c0f9e5e8cbc1f4 Author: Haim Dreyfuss Date: Sun Jul 9 15:51:44 2017 +0300 iwlwifi: fix fw_pre_next_step to apply also for C step C step NICs should use the latest FW (currently B step). Correct the condition to make C step NICs advanced its default FW name to the latest one. Also rename _next_ to b_or_c to avoid confusion. Fixes: 5da083d1922c ("iwlwifi: add support for 9000 HW B-step NICs") Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 14 +++++++------- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 8 ++++---- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 5 +++-- 3 files changed, 14 insertions(+), 13 deletions(-) commit 87f55616f81bf6c82f0e94cf4661151399d2a7b6 Author: Gregory Greenman Date: Thu Jul 6 05:27:55 2017 +0300 iwlwifi: mvm: rs: fix TLC statistics collection Statistics should be collected according to the actual rate a frame/aggregation was transmitted and not according to the initial rate from the last LQ command (these rates are different if the frames were retransmitted at a lower rate from the rate scale table). This is needed to remove throughput degradation. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9465c3f8ba67cff697c0529de5a03cc5e1509d41 Author: Gregory Greenman Date: Thu Jul 6 05:07:33 2017 +0300 iwlwifi: mvm: set A-MPDU bit upon empty BA notification from FW The bit was set only if there was at least one reclaimed frame in an aggregation. It's important to set it also in the case that the whole A-MPDU was lost, otherwise rate scaling statistics will not be updated correctly. Thus, set it always in ba notification handler. This fixes a throughput degradation of about 20% in certain scenarios with multiple streams on 11ac. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 ++ 1 file changed, 2 insertions(+) commit cc9269f89643c8684eb516ab3cd1cb49385f83fa Author: Philipp Rosenberger Date: Wed Jul 12 10:36:39 2017 +0200 gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source In the function gpio_set_wake_irq(), port->irq_high is only checked for zero. As platform_get_irq() returns a value less then zero if no interrupt was found, any gpio >= 16 was handled like an irq_high interrupt was available. On iMX27 for example no high interrupt is available. This lead to the problem that only some gpios (the lower 16) were useable as wake sources. Signed-off-by: Philipp Rosenberger Signed-off-by: Linus Walleij drivers/gpio/gpio-mxc.c | 3 +++ 1 file changed, 3 insertions(+) commit 92b0f7b26b313b23cc9bef0bd406607f4566c0c0 Author: Emmanuel Grumbach Date: Mon Jul 3 16:25:33 2017 +0300 iwlwifi: split the regulatory rules when the bandwidth flags require it When we create a regulatory domain out of an MCC notification, we need to make sure that all the channels in the rule have the exact same properties. The current code mixes channel 36 and 40 although 36 can be a control channel with HT40+ (36, 40) whereas 40 can't be a control channel with HT40+ since (40, 44) is invalid. Because of that, cfg80211 would allow to connect in 40MHz to APs that are configured to channel 40 HT40+ and that made our firmware assert. Fix this by checking the bandwidth flags before taking the decision if the rule should be split. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=195299 partly. Fixes: af45a9003f1f ("iwlwifi: create regdomain from mcc_update_cmd response") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 58877d7428b0747134cb65096d51dfabdc62000d Author: Emmanuel Grumbach Date: Thu Jun 29 16:18:21 2017 +0300 iwlwifi: add TLV for MLME offload firmware capability The firmware now adds a new DWORD for the MLME offload's capability even on firmware versions that don't support it. Add the TLV bit to avoid getting the print: capa flags index 3 larger than supported by driver. This fixes the bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196195 Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/file.h | 2 ++ 1 file changed, 2 insertions(+) commit c23d200fec9e7523ecf24017187fea4e2f4abee4 Author: Masahiro Yamada Date: Wed Jul 12 08:11:50 2017 +0900 gpio: xgene-sb: select IRQ_DOMAIN_HIERARCHY This driver calls irq_domain_hierarchy() and irq_chip_*_parent(). They are available only when CONFIG_IRQ_DOMAIN_HIERARCHY is enabled. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 8db63f5361a80bb91e1c54bccd888060ca07f513 Author: Masahiro Yamada Date: Wed Jul 12 08:11:49 2017 +0900 pinctrl: stm32: select IRQ_DOMAIN_HIERARCHY instead of depends on Drivers that need IRQ_DOMAIN_HIERARCHY should "select" it, but drivers/pinctrl/stm32/Kconfig is the only exception that uses "depends on" syntax. This prevents GPIO drivers from select'ing IRQ_DOMAIN_HIERARCHY. For example, if I add "select IRQ_DOMAIN_HIERARCHY" to GPIO_XGENE_SB, I get the following recursive dependency error. drivers/gpio/Kconfig:13:error: recursive dependency detected! For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpio/Kconfig:13: symbol GPIOLIB is selected by PINCTRL_STM32 For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/pinctrl/stm32/Kconfig:3: symbol PINCTRL_STM32 is selected by PINCTRL_STM32F429 For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/pinctrl/stm32/Kconfig:11: symbol PINCTRL_STM32F429 depends on IRQ_DOMAIN_HIERARCHY For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" kernel/irq/Kconfig:67: symbol IRQ_DOMAIN_HIERARCHY is selected by GPIO_XGENE_SB For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpio/Kconfig:502: symbol GPIO_XGENE_SB depends on GPIOLIB Signed-off-by: Masahiro Yamada Tested-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3f25bb4b7f7718d391321608f947840a79934568 Author: Emmanuel Grumbach Date: Wed Jun 21 10:35:09 2017 +0300 iwlwifi: mvm: fix TCP CSUM offload with WEP and A000 series When we enabled TCP checksum offload, we need to tell the firmware where the IP header starts. If we have an IV, then we need to adapt that value since the IV is placed before the SNAP header. This is true only for cases where the driver adds the IV, not the WEP case in which the IV is added by the firmware itself. On A000 devices series, the IV is always added by the device. Fix this. Fixes: 5e6a98dc4863 ("iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit bc78d646e708dabd1744ca98744dea316f459497 Merge: 2e7ca20 cc75f85 Author: Linus Torvalds Date: Mon Jul 31 22:36:42 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Handle notifier registry failures properly in tun/tap driver, from Tonghao Zhang. 2) Fix bpf verifier handling of subtraction bounds and add a testcase for this, from Edward Cree. 3) Increase reset timeout in ftgmac100 driver, from Ben Herrenschmidt. 4) Fix use after free in prd_retire_rx_blk_timer_exired() in AF_PACKET, from Cong Wang. 5) Fix SElinux regression due to recent UDP optimizations, from Paolo Abeni. 6) We accidently increment IPSTATS_MIB_FRAGFAILS in the ipv6 code paths, fix from Stefano Brivio. 7) Fix some mem leaks in dccp, from Xin Long. 8) Adjust MDIO_BUS kconfig deps to avoid build errors, from Arnd Bergmann. 9) Mac address length check and buffer size fixes from Cong Wang. 10) Don't leak sockets in ipv6 udp early demux, from Paolo Abeni. 11) Fix return value when copy_from_user() fails in bpf_prog_get_info_by_fd(), from Daniel Borkmann. 12) Handle PHY_HALTED properly in phy library state machine, from Florian Fainelli. 13) Fix OOPS in fib_sync_down_dev(), from Ido Schimmel. 14) Fix truesize calculation in virtio_net which led to performance regressions, from Michael S Tsirkin. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (76 commits) samples/bpf: fix bpf tunnel cleanup udp6: fix jumbogram reception ppp: Fix a scheduling-while-atomic bug in del_chan Revert "net: bcmgenet: Remove init parameter from bcmgenet_mii_config" virtio_net: fix truesize for mergeable buffers mv643xx_eth: fix of_irq_to_resource() error check MAINTAINERS: Add more files to the PHY LIBRARY section ipv4: fib: Fix NULL pointer deref during fib_sync_down_dev() net: phy: Correctly process PHY_HALTED in phy_stop_machine() sunhme: fix up GREG_STAT and GREG_IMASK register offsets bpf: fix bpf_prog_get_info_by_fd to dump correct xlated_prog_len tcp: avoid bogus gcc-7 array-bounds warning net: tc35815: fix spelling mistake: "Intterrupt" -> "Interrupt" bpf: don't indicate success when copy_from_user fails udp6: fix socket leak on early demux net: thunderx: Fix BGX transmit stall due to underflow Revert "vhost: cache used event for better performance" team: use a larger struct for mac address net: check dev->addr_len for dev_set_mac_address() phy: bcm-ns-usb3: fix MDIO_BUS dependency ... commit cc75f8514db6a3aec517760fccaf954e5b46478c Author: William Tu Date: Mon Jul 31 14:40:50 2017 -0700 samples/bpf: fix bpf tunnel cleanup test_tunnel_bpf.sh fails to remove the vxlan11 tunnel device, causing the next geneve tunnelling test case fails. In addition, the geneve reserved bit in tcbpf2_kern.c should be zero, according to the RFC. Signed-off-by: William Tu Signed-off-by: David S. Miller samples/bpf/tcbpf2_kern.c | 4 ++-- samples/bpf/test_tunnel_bpf.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit cb891fa6a1d5f52c5f5c07b6f7f4c6d65ea55fc0 Author: Paolo Abeni Date: Mon Jul 31 16:52:36 2017 +0200 udp6: fix jumbogram reception Since commit 67a51780aebb ("ipv6: udp: leverage scratch area helpers") udp6_recvmsg() read the skb len from the scratch area, to avoid a cache miss. But the UDP6 rx path support RFC 2675 UDPv6 jumbograms, and their length exceeds the 16 bits available in the scratch area. As a side effect the length returned by recvmsg() is: % (1<<16) This commit addresses the issue allocating one more bit in the IP6CB flags field and setting it for incoming jumbograms. Such field is still in the first cacheline, so at recvmsg() time we can check it and fallback to access skb->len if required, without a measurable overhead. Fixes: 67a51780aebb ("ipv6: udp: leverage scratch area helpers") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/linux/ipv6.h | 6 ++++++ net/ipv6/exthdrs.c | 1 + net/ipv6/udp.c | 11 ++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) commit ddab82821fa633da768879fc515e76dcb1207151 Author: Gao Feng Date: Mon Jul 31 18:07:38 2017 +0800 ppp: Fix a scheduling-while-atomic bug in del_chan The PPTP set the pptp_sock_destruct as the sock's sk_destruct, it would trigger this bug when __sk_free is invoked in atomic context, because of the call path pptp_sock_destruct->del_chan->synchronize_rcu. Now move the synchronize_rcu to pptp_release from del_chan. This is the only one case which would free the sock and need the synchronize_rcu. The following is the panic I met with kernel 3.3.8, but this issue should exist in current kernel too according to the codes. BUG: scheduling while atomic __schedule_bug+0x5e/0x64 __schedule+0x55/0x580 ? ppp_unregister_channel+0x1cd5/0x1de0 [ppp_generic] ? dev_hard_start_xmit+0x423/0x530 ? sch_direct_xmit+0x73/0x170 __cond_resched+0x16/0x30 _cond_resched+0x22/0x30 wait_for_common+0x18/0x110 ? call_rcu_bh+0x10/0x10 wait_for_completion+0x12/0x20 wait_rcu_gp+0x34/0x40 ? wait_rcu_gp+0x40/0x40 synchronize_sched+0x1e/0x20 0xf8417298 0xf8417484 ? sock_queue_rcv_skb+0x109/0x130 __sk_free+0x16/0x110 ? udp_queue_rcv_skb+0x1f2/0x290 sk_free+0x16/0x20 __udp4_lib_rcv+0x3b8/0x650 Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/ppp/pptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00d51094b8a5856ae790048a332ae24f1dd7c994 Author: Florian Fainelli Date: Mon Jul 31 11:05:32 2017 -0700 Revert "net: bcmgenet: Remove init parameter from bcmgenet_mii_config" This reverts commit 28b45910ccda ("net: bcmgenet: Remove init parameter from bcmgenet_mii_config") because in the process of moving from dev_info() to dev_info_once() we essentially lost the helpful printed messages once the second instance of the driver is loaded. dev_info_once() does not actually print the message once per device instance, but once period. Fixes: 28b45910ccda ("net: bcmgenet: Remove init parameter from bcmgenet_mii_config") Signed-off-by: Florian Fainelli Reviewed-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 2 +- drivers/net/ethernet/broadcom/genet/bcmmii.c | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) commit 1daa8790d0280d2c719658e39bd59fce65efa909 Author: Michael S. Tsirkin Date: Mon Jul 31 21:49:49 2017 +0300 virtio_net: fix truesize for mergeable buffers Seth Forshee noticed a performance degradation with some workloads. This turns out to be due to packet drops. Euan Kemp noticed that this is because we drop all packets where length exceeds the truesize, but for some packets we add in extra memory without updating the truesize. This in turn was kept around unchanged from ab7db91705e95 ("virtio-net: auto-tune mergeable rx buffer size for improved performance"). That commit had an internal reason not to account for the extra space: not enough bits to do it. No longer true so let's account for the allocated length exactly. Many thanks to Seth Forshee for the report and bisecting and Euan Kemp for debugging the issue. Fixes: 680557cf79f8 ("virtio_net: rework mergeable buffer handling") Reported-by: Euan Kemp Tested-by: Euan Kemp Reported-by: Seth Forshee Tested-by: Seth Forshee Signed-off-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cfbcb61f6c2ac9aeb7731d2ec59fe3bf53786c49 Author: Sergei Shtylyov Date: Sat Jul 29 22:18:41 2017 +0300 mv643xx_eth: fix of_irq_to_resource() error check of_irq_to_resource() has recently been fixed to return negative error #'s along with 0 in case of failure, however the Marvell MV643xx Ethernet driver still only regards 0 as invalid IRQ -- fix it up. Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13332db54fb5a821c86432238d33be1ff0429394 Author: Florian Fainelli Date: Mon Jul 31 09:47:50 2017 -0700 MAINTAINERS: Add more files to the PHY LIBRARY section Include missing files that are provided by, used, or directly maintained within the PHY LIBRARY, this include uapi header, header files used by Device Tree code etc. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller MAINTAINERS | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 71ed7ee35ad2c5300f4b51634185a0193b4fb0fa Author: Ido Schimmel Date: Fri Jul 28 23:27:44 2017 +0300 ipv4: fib: Fix NULL pointer deref during fib_sync_down_dev() Michał reported a NULL pointer deref during fib_sync_down_dev() when unregistering a netdevice. The problem is that we don't check for 'in_dev' being NULL, which can happen in very specific cases. Usually routes are flushed upon NETDEV_DOWN sent in either the netdev or the inetaddr notification chains. However, if an interface isn't configured with any IP address, then it's possible for host routes to be flushed following NETDEV_UNREGISTER, after NULLing dev->ip_ptr in inetdev_destroy(). To reproduce: $ ip link add type dummy $ ip route add local 1.1.1.0/24 dev dummy0 $ ip link del dev dummy0 Fix this by checking for the presence of 'in_dev' before referencing it. Fixes: 982acb97560c ("ipv4: fib: Notify about nexthop status changes") Signed-off-by: Ido Schimmel Reported-by: Michał Mirosław Tested-by: Michał Mirosław Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ad813f208533cebfcc32d3d7474dc1677d1b09a Author: Florian Fainelli Date: Fri Jul 28 11:58:36 2017 -0700 net: phy: Correctly process PHY_HALTED in phy_stop_machine() Marc reported that he was not getting the PHY library adjust_link() callback function to run when calling phy_stop() + phy_disconnect() which does not indeed happen because we set the state machine to PHY_HALTED but we don't get to run it to process this state past that point. Fix this with a synchronous call to phy_state_machine() in order to have the state machine actually act on PHY_HALTED, set the PHY device's link down, turn the network device's carrier off and finally call the adjust_link() function. Reported-by: Marc Gonzalez Fixes: a390d1f379cf ("phylib: convert state_queue work to delayed_work") Signed-off-by: Florian Fainelli Signed-off-by: Marc Gonzalez Signed-off-by: David S. Miller drivers/net/phy/phy.c | 3 +++ 1 file changed, 3 insertions(+) commit 96a734bae00f4ea46d0f3f3a8e347c31d24489bd Author: Mark Cave-Ayland Date: Thu Jul 27 17:26:00 2017 +0100 sunhme: fix up GREG_STAT and GREG_IMASK register offsets Update the values to match those from the STP2002QFP documentation. Signed-off-by: Mark Cave-Ayland Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunhme.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2e7ca2064cbb070834233ea540ac9c2ff0d09894 Merge: ff2620f 3c74541 Author: Linus Torvalds Date: Mon Jul 31 14:03:05 2017 -0700 Merge branch 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "Several cgroup bug fixes. - cgroup core was calling a migration callback on empty migrations, which could make cpuset crash. - There was a very subtle bug where the controller interface files aren't created directly when cgroup2 is mounted. Because later operations create them, this bug didn't get noticed earlier. - Failed writes to cgroup.subtree_control were incorrectly returning zero" * 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: fix error return value from cgroup_subtree_control() cgroup: create dfl_root files on subsys registration cgroup: don't call migration methods if there are no tasks to migrate commit ff2620f778b1942eea40bd43773094dbc0e76c7e Merge: 3dcc4c7 1ad0f0a Author: Linus Torvalds Date: Mon Jul 31 13:37:28 2017 -0700 Merge branch 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fixes from Tejun Heo: "Two notable fixes. - While adding NUMA affinity support to unbound workqueues, the assumption that an unbound workqueue with max_active == 1 is ordered was broken. The plan was to use explicit alloc_ordered_workqueue() for those cases. Unfortunately, I forgot to update the documentation properly and we grew a handful of use cases which depend on that assumption. While we want to convert them to alloc_ordered_workqueue(), we don't really lose anything by enforcing ordered execution on unbound max_active == 1 workqueues and it doesn't make sense to risk subtle bugs. Restore the assumption. - Workqueue assumes that CPU <-> NUMA node mapping remains static. This is a general assumption - we don't have any synchronization mechanism around CPU <-> node mapping. Unfortunately, powerpc may change the mapping dynamically leading to crashes. Michael added a workaround so that we at least don't crash while powerpc hotplug code gets updated" * 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Work around edge cases for calc of pool's cpumask workqueue: implicit ordered attribute should be overridable workqueue: restore WQ_UNBOUND/max_active==1 to be ordered commit 3dcc4c7d422ce5f2887a021190234a683f8f8cb1 Merge: 16f73eb 2f60e1a Author: Linus Torvalds Date: Mon Jul 31 13:33:21 2017 -0700 Merge branch 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "Dan found a really old bug where libata hotplug code wasn't sanitizing index value from userland and may end up indexing with a negative number. It is scary but fortunately can only be triggered by root. Other than that, minor fixes" * 'for-4.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata: fix a couple of doc build warnings libata: array underflow in ata_find_dev() ata: sata_rcar: add gen[23] fallback compatibility strings libata: remove unused rc in ata_eh_handle_port_resume libata: Cleanup ata_read_log_page() ata: fix gemini Kconfig dependencies commit 5b30850bd6bda5188eedec60d364256617a87343 Author: Sylwester Nawrocki Date: Fri Jul 21 13:19:50 2017 +0200 clk: samsung: exynos5420: The EPLL rate table corrections This patch fixes values of the EPLL K coefficient and changes the EPLL output frequency values to match exactly what is possible to achieve with given M, P, S, K coefficients. This allows to avoid rounding errors and unexpected frequency being set with clk_set_rate(), due to recalc_rate returning different values than the PLL rate specified in the exynos5420_epll_24mhz_tbl table. E.g. this prevents a case where two consecutive clk_set_rate() calls with same argument result in different PLL output frequency. The PLL output frequencies have been calculated with formula: f = fxtal * (M * 2^16 + K) / (P * 2^S) / 2^16 where fxtal = 24000000. Fixes: 9842452acd ("clk: samsung: exynos542x: Add EPLL rate table") Signed-off-by: Sylwester Nawrocki Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-exynos5420.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9beceb54fa2c0b47532dd2b07f37e410641cf9b2 Author: Taehee Yoo Date: Thu Jul 27 11:22:04 2017 +0900 netfilter: x_tables: Fix use-after-free in ipt_do_table. If verdict is NF_STOLEN in the SYNPROXY target, the skb is consumed. However, ipt_do_table() always tries to get ip header from the skb. So that, KASAN triggers the use-after-free message. We can reproduce this message using below command. # iptables -I INPUT -p tcp -j SYNPROXY --mss 1460 [ 193.542265] BUG: KASAN: use-after-free in ipt_do_table+0x1405/0x1c10 [ ... ] [ 193.578603] Call Trace: [ 193.581590] [ 193.584107] dump_stack+0x68/0xa0 [ 193.588168] print_address_description+0x78/0x290 [ 193.593828] ? ipt_do_table+0x1405/0x1c10 [ 193.598690] kasan_report+0x230/0x340 [ 193.603194] __asan_report_load2_noabort+0x19/0x20 [ 193.608950] ipt_do_table+0x1405/0x1c10 [ 193.613591] ? rcu_read_lock_held+0xae/0xd0 [ 193.618631] ? ip_route_input_rcu+0x27d7/0x4270 [ 193.624348] ? ipt_do_table+0xb68/0x1c10 [ 193.629124] ? do_add_counters+0x620/0x620 [ 193.634234] ? iptable_filter_net_init+0x60/0x60 [ ... ] After this patch, only when verdict is XT_CONTINUE, ipt_do_table() tries to get ip header. Also arpt_do_table() is modified because it has same bug. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 10 +++++----- net/ipv4/netfilter/ip_tables.c | 9 +++++---- 2 files changed, 10 insertions(+), 9 deletions(-) commit dd0c41f8a7e0babdadc61d5201ac8505a79dec05 Author: Dave Airlie Date: Mon Jul 31 18:45:41 2017 +0200 efifb: allow user to disable write combined mapping. This patch allows the user to disable write combined mapping of the efifb framebuffer console using an nowc option. A customer noticed major slowdowns while logging to the console with write combining enabled, on other tasks running on the same CPU. (10x or greater slow down on all other cores on the same CPU as is doing the logging). I reproduced this on a machine with dual CPUs. Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz (6 core) I wrote a test that just mmaps the pci bar and writes to it in a loop, while this was running in the background one a single core with (taskset -c 1), building a kernel up to init/version.o (taskset -c 8) went from 13s to 133s or so. I've yet to explain why this occurs or what is going wrong I haven't managed to find a perf command that in any way gives insight into this. 11,885,070,715 instructions # 1.39 insns per cycle vs 12,082,592,342 instructions # 0.13 insns per cycle is the only thing I've spotted of interest, I've tried at least: dTLB-stores,dTLB-store-misses,L1-dcache-stores,LLC-store,LLC-store-misses,LLC-load-misses,LLC-loads,\mem-loads,mem-stores,iTLB-loads,iTLB-load-misses,cache-references,cache-misses For now it seems at least a good idea to allow a user to disable write combining if they see this until we can figure it out. Note also most users get a real framebuffer driver loaded when kms kicks in, it just happens on these machines the kernel didn't support the gpu specific driver. Signed-off-by: Dave Airlie Acked-by: Peter Jones Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Signed-off-by: Bartlomiej Zolnierkiewicz Documentation/fb/efifb.txt | 6 ++++++ drivers/video/fbdev/efifb.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 7b4dfbe7880cf2092db3c94c6a34ae6ffa8aa344 Author: Arnd Bergmann Date: Mon Jul 31 18:45:41 2017 +0200 fbdev: omapfb: remove unused variable Removing the default display name left a harmless warning: fbdev/omap2/omapfb/dss/core.c: In function 'omap_dss_probe': fbdev/omap2/omapfb/dss/core.c:196:30: error: unused variable 'pdata' [-Werror=unused-variable] This removes the now-unused variable as well. Fixes: 278cba7eaf54 ("drm: omapdrm: Remove unused default display name support") Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap2/omapfb/dss/core.c | 1 - 1 file changed, 1 deletion(-) commit 5ae29649e03f58be0f412c21b62b203aa7cf1680 Author: Dan Carpenter Date: Mon Jul 31 18:45:41 2017 +0200 video: fbdev: imxfb: use after free in imxfb_remove() We free "info" then dereference it on the next line. Really this whole function would be better if we wrote it to unwind in the mirror of how things are allocated in the probe. Signed-off-by: Dan Carpenter Cc: Alexander Shiyan Cc: Sascha Hauer Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/imxfb.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 74ad3d28af2104b92dd83a43add79e6a8c45d8e2 Author: Babu Moger Date: Thu Jul 6 09:34:19 2017 -0700 parisc: Define CONFIG_CPU_BIG_ENDIAN While working on enabling queued rwlock on SPARC, found this following code in include/asm-generic/qrwlock.h which uses CONFIG_CPU_BIG_ENDIAN to clear a byte. static inline u8 *__qrwlock_write_byte(struct qrwlock *lock) { return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); } Problem is many of the fixed big endian architectures don't define CPU_BIG_ENDIAN and clears the wrong byte. Define CPU_BIG_ENDIAN for parisc architecture to fix it. Signed-off-by: Babu Moger Signed-off-by: Helge Deller arch/parisc/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 9c80034921d1ece5c0e3241ba1645bce32387684 Author: Wolfram Sang Date: Sat Jul 29 14:11:43 2017 +0200 i2c: rephrase explanation of I2C_CLASS_DEPRECATED Hopefully making clear that it is not needed for new drivers. Signed-off-by: Wolfram Sang include/linux/i2c.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5871a1538cd2d7a4a18e5e21adc7e9e6dab702e2 Author: Russell King Date: Wed Jul 26 11:03:49 2017 +0100 i2c: allow i2c-versatile for ARM MPS platforms Allow i2c-versatile to be enabled for ARM MPS platforms. Signed-off-by: Russell King Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f60e1ab2f0e148e82cb53c539ad003ffc9b9bd0 Author: Jonathan Corbet Date: Sun Jul 30 16:16:04 2017 -0600 libata: fix a couple of doc build warnings The kerneldoc comments for a couple of functions in drivers/ata/libata-eh.c had fallen behind the current implementation, resulting in these doc build warnings: ./drivers/ata/libata-eh.c:1449: warning: No description found for parameter 'link' ./drivers/ata/libata-eh.c:1449: warning: Excess function parameter 'ap' description in 'ata_eh_done' ./drivers/ata/libata-eh.c:1590: warning: No description found for parameter 'qc' ./drivers/ata/libata-eh.c:1590: warning: Excess function parameter 'dev' description in 'ata_eh_request_sense' Update the comments and make the warnings go away. Signed-off-by: Jonathan Corbet Signed-off-by: Tejun Heo drivers/ata/libata-eh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93964fd4ea6ab86a2d2853a9ae56ae0c24cbbe16 Author: James Bottomley Date: Mon Jul 31 15:49:54 2017 +0200 parisc: pdc_stable: Fix locking when creating sysfs links There's no need to take the write lock when creating sysfs links. This patch fixes the following BUG: BUG: sleeping function called from invalid context at mm/slab.h:416 in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0 CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc2-00110-g0b5477d9dabd #111 Backtrace: [<0000000040217ac8>] show_stack+0x20/0x38 [<00000000406fbbb0>] dump_stack+0xb0/0x128 [<0000000040274090>] ___might_sleep+0x180/0x1b8 [<0000000040274144>] __might_sleep+0x7c/0xe8 [<0000000040373874>] kmem_cache_alloc+0x14c/0x1e0 [<0000000040419514>] __kernfs_new_node+0x84/0x1b8 [<000000004041b09c>] kernfs_new_node+0x3c/0x78 [<000000004041e040>] kernfs_create_link+0x40/0xd8 [<000000004041f320>] sysfs_do_create_link_sd.isra.0+0xb0/0x130 [<000000004041f3d4>] sysfs_create_link+0x34/0x58 [<000000004011b4a4>] pdc_stable_init+0x2c4/0x458 [<0000000040200250>] do_one_initcall+0x70/0x1d8 [<0000000040101644>] kernel_init_freeable+0x27c/0x390 [<000000004020be44>] kernel_init+0x24/0x1c0 Signed-off-by: James Bottomley Reported-by: Meelis Roos Signed-off-by: Helge Deller drivers/parisc/pdc_stable.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c69b9e1278a2a23482a12bf56e54463f03b9e3f1 Merge: 682c6c2 d1510a2 Author: Wolfram Sang Date: Mon Jul 31 16:12:19 2017 +0200 Merge branch 'i2c-mux/for-current' of https://github.com/peda-r/i2c-mux into i2c/for-current commit 682c6c2188f39d13548ccdc89c9888fbcb547889 Author: Hans de Goede Date: Thu Jul 13 15:45:02 2017 +0200 i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz At least the Acer Iconia Tab8 / aka W1-810 uses 1MiHz instead of 1MHz for one of its busses, fix this up to 1MHz instead of failing the probe of that bus. This fixes the accelerometer on the Acer Iconia Tab8 not working. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 3 +++ 1 file changed, 3 insertions(+) commit 22acc37b8681461707a3fc73505af808f9af8260 Author: Hans de Goede Date: Thu Jul 13 15:45:01 2017 +0200 i2c: designware: Print clock freq on invalid clock freq error When we refuse to probe due to an invalid clock frequency, log the frequency which is causing this error. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 99f828436788f0155798145853607ca8f0e6de93 Author: Chris Wilson Date: Fri Jul 28 22:29:51 2017 +0100 dma-buf/sync_file: Allow multiple sync_files to wrap a single dma-fence Up until recently sync_file were create to export a single dma-fence to userspace, and so we could canabalise a bit insie dma-fence to mark whether or not we had enable polling for the sync_file itself. However, with the advent of syncobj, we do allow userspace to create multiple sync_files for a single dma-fence. (Similarly, that the sw-sync validation framework also started returning multiple sync-files wrapping a single dma-fence for a syncpt also triggering the problem.) This patch reverts my suggestion in commit e24165537312 ("dma-buf/sync_file: only enable fence signalling on poll()") to use a single bit in the shared dma-fence and restores the sync_file->flags for tracking the bits individually. Reported-by: Gustavo Padovan Fixes: f1e8c67123cf ("dma-buf/sw-sync: Use an rbtree to sort fences in the timeline") Fixes: e9083420bbac ("drm: introduce sync objects (v4)") Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Sean Paul Cc: Gustavo Padovan Cc: dri-devel@lists.freedesktop.org Cc: # v4.13-rc1+ Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170728212951.7818-1-chris@chris-wilson.co.uk (cherry picked from commit db1fc97ca0c0d3fdeeadf314d99a26188438940a) drivers/dma-buf/sync_file.c | 5 +++-- include/linux/sync_file.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) commit d81ece747d8727bb8b1cfc9a20dbe62f09a4e35a Author: Icenowy Zheng Date: Sat Jul 22 10:50:53 2017 +0800 pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver The PH16 pin has a function with mux id 0x5, which is the DET pin of the "sim" (smart card reader) IP block. This function is missing in old versions of A10/A20 SoCs' datasheets and user manuals, so it's also missing in the old drivers. The newest A10 Datasheet V1.70 and A20 Datasheet V1.41 contain this pin function, and it's discovered during implementing R40 pinctrl driver. Add it to the driver. As we now merged A20 pinctrl driver to the A10 one, we need to only fix the A10 driver now. Fixes: f2821b1ca3a2 ("pinctrl: sunxi: Move Allwinner A10 pinctrl driver to a driver of its own") Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 1 + 1 file changed, 1 insertion(+) commit c64ffff7a9d1eee6624d3eaab36968fe6df31a9f Author: Andy Shevchenko Date: Mon Jul 17 17:13:28 2017 +0300 i2c: core: Allow empty id_table in ACPI case as well For now empty ID table is not allowed with ACPI and prevents driver to be probed. Add a check to allow empty ID table. This introduces a helper i2c_acpi_match_device(). Note, we rename some static function in i2c-core-acpi.c to distinguish with public API. Fixes: da10c06a044b ("i2c: Make I2C ID tables non-mandatory for DT'ed devices") Signed-off-by: Andy Shevchenko Tested-by: Rajmohan Mani Acked-by: Mika Westerberg [wsa: needed to get some drivers probed again] Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 19 +++++++++++++++---- drivers/i2c/i2c-core-base.c | 1 + drivers/i2c/i2c-core.h | 9 +++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) commit 65ff135b4f748f7d5f0d6a21b860e88a0d1fb7c5 Author: Kunihiko Hayashi Date: Thu Jul 6 15:54:23 2017 +0900 pinctrl: uniphier: fix USB3 pin assignment for Pro4 According to pinctrl assignment for Pro4, each definition of USB#2 and USB#3 are as follows. 184: USB2VBUS 185: USB2OD 186: USB2ID 187: USB3VBUS 188: USB3OD USB#2 has an additional pin "USB2ID", but the chip doesn't use this pin while in host-mode. Considering this pin, the pin definitions for USB#3 should be {187, 188}. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa8f6d0619fa6775083fff24061e46e7039a8493 Author: Axel Lin Date: Mon Jul 3 16:28:12 2017 +0800 gpio: lp87565: Set proper output level and direction for direction_output The value argument of lp87565_gpio_direction_output() means output level rather than gpio direction. Signed-off-by: Axel Lin Reviewed-by: Keerthy Tested-by: Keerthy Signed-off-by: Linus Walleij drivers/gpio/gpio-lp87565.c | 46 +++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit b962e2cd357f2a529fe14387092401e6552f43d6 Author: Shawn Guo Date: Sat Jul 1 11:45:36 2017 +0800 pinctrl: zte: fix dereference of 'data' in zx_set_mux() It fixes the following Smatch complaint: drivers/pinctrl/zte/pinctrl-zx.c:76 zx_set_mux() warn: variable dereferenced before check 'data' (see line 67) Reported-by: Dan Carpenter Fixes: cbff0c4d27f4 ("pinctrl: add ZTE ZX pinctrl driver support") Signed-off-by: Shawn Guo Signed-off-by: Linus Walleij drivers/pinctrl/zte/pinctrl-zx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a684c5b1887cbb95d624e33574fabf8a5ca599e9 Author: Rafael J. Wysocki Date: Tue Jul 25 01:31:00 2017 +0200 thunderbolt: icm: Ignore mailbox errors in icm_suspend() On one of my test machines nhi_mailbox_cmd() called from icm_suspend() times out and returnes an error which then is propagated to the caller and causes the entire system suspend to be aborted which isn't very useful. Instead of aborting system suspend, print the error into the log and continue. Signed-off-by: Rafael J. Wysocki Acked-by: Mika Westerberg Acked-by: Michael Jamet drivers/thunderbolt/icm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cc491f1d3583146eaee635c86b9c9227fa835c6c Author: Nicholas Piggin Date: Sat Jul 29 22:50:27 2017 +1000 powerpc/64s: Fix stack setup in watchdog soft_nmi_common() The watchdog soft-NMI exception stack setup loads a stack pointer twice, which is an obvious error. It ends up using the system reset interrupt (true-NMI) stack, which is also a bug because the watchdog could be preempted by a system reset interrupt that overwrites the NMI stack. Change the soft-NMI to use the "emergency stack". The current kernel stack is not used, because of the longer-term goal to prevent asynchronous stack access using soft-disable. Fixes: 2104180a5369 ("powerpc/64s: implement arch-specific hardlockup watchdog") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit bb272221e9db79f13d454e1f3fb6b05013be985e Merge: 253fd51 5771a8c Author: Michael Ellerman Date: Mon Jul 31 20:20:29 2017 +1000 Merge tag 'v4.13-rc1' into fixes The fixes branch is based off a random pre-rc1 commit, because we had some fixes that needed to go in before rc1 was released. However we now need to fix some code that went in after that point, but before rc1, so merge rc1 to get that code into fixes so we can fix it! commit 54e22f265e872ae140755b3318521d400a094605 Author: Linus Lüssing Date: Thu Jul 6 07:02:25 2017 +0200 batman-adv: fix TT sync flag inconsistencies This patch fixes an issue in the translation table code potentially leading to a TT Request + Response storm. The issue may occur for nodes involving BLA and an inconsistent configuration of the batman-adv AP isolation feature. However, since the new multicast optimizations, a single, malformed packet may lead to a mesh-wide, persistent Denial-of-Service, too. The issue occurs because nodes are currently OR-ing the TT sync flags of all originators announcing a specific MAC address via the translation table. When an intermediate node now receives a TT Request and wants to answer this on behalf of the destination node, then this intermediate node now responds with an altered flag field and broken CRC. The next OGM of the real destination will lead to a CRC mismatch and triggering a TT Request and Response again. Furthermore, the OR-ing is currently never undone as long as at least one originator announcing the according MAC address remains, leading to the potential persistency of this issue. This patch fixes this issue by storing the flags used in the CRC calculation on a a per TT orig entry basis to be able to respond with the correct, original flags in an intermediate TT Response for one thing. And to be able to correctly unset sync flags once all nodes announcing a sync flag vanish for another. Fixes: e9c00136a475 ("batman-adv: fix tt_global_entries flags update") Signed-off-by: Linus Lüssing Acked-by: Antonio Quartulli [sw: typo in commit message] Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 60 ++++++++++++++++++++++++++++++++------ net/batman-adv/types.h | 2 ++ 2 files changed, 53 insertions(+), 9 deletions(-) commit 727fd697da83bf78f8734940d0c394b6c7c3067f Author: Kuppuswamy Sathyanarayanan Date: Fri Jun 30 12:20:15 2017 -0700 MAINTAINERS: Add entry for Whiskey Cove PMIC GPIO driver Added maintainer info for Whiskey Cove PMIC GPIO driver. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Linus Walleij MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 8f8201dfed91a43ac38c899c82f81eef3d36afd9 Author: Helge Deller Date: Mon Jul 31 08:38:27 2017 +0200 parisc: Increase thread and stack size to 32kb Since kernel 4.11 the thread and irq stacks on parisc randomly overflow the default size of 16k. The reason why stack usage suddenly grew is yet unknown. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Helge Deller arch/parisc/include/asm/thread_info.h | 2 +- arch/parisc/kernel/irq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 13d57093c141db2036364d6be35e394fc5b64728 Author: John David Anglin Date: Sun Jul 30 16:20:19 2017 -0400 parisc: Handle vma's whose context is not current in flush_cache_range In testing James' patch to drivers/parisc/pdc_stable.c, I hit the BUG statement in flush_cache_range() during a system shutdown: kernel BUG at arch/parisc/kernel/cache.c:595! CPU: 2 PID: 6532 Comm: kworker/2:0 Not tainted 4.13.0-rc2+ #1 Workqueue: events free_ioctx IAOQ[0]: flush_cache_range+0x144/0x148 IAOQ[1]: flush_cache_page+0x0/0x1a8 RP(r2): flush_cache_range+0xec/0x148 Backtrace: [<00000000402910ac>] unmap_page_range+0x84/0x880 [<00000000402918f4>] unmap_single_vma+0x4c/0x60 [<0000000040291a18>] zap_page_range_single+0x110/0x160 [<0000000040291c34>] unmap_mapping_range+0x174/0x1a8 [<000000004026ccd8>] truncate_pagecache+0x50/0xa8 [<000000004026cd84>] truncate_setsize+0x54/0x70 [<000000004033d534>] put_aio_ring_file+0x44/0xb0 [<000000004033d5d8>] aio_free_ring+0x38/0x140 [<000000004033d714>] free_ioctx+0x34/0xa8 [<00000000401b0028>] process_one_work+0x1b8/0x4d0 [<00000000401b04f4>] worker_thread+0x1b4/0x648 [<00000000401b9128>] kthread+0x1b0/0x208 [<0000000040150020>] end_fault_vector+0x20/0x28 [<0000000040639518>] nf_ip_reroute+0x50/0xa8 [<0000000040638ed0>] nf_ip_route+0x10/0x78 [<0000000040638c90>] xfrm4_mode_tunnel_input+0x180/0x1f8 CPU: 2 PID: 6532 Comm: kworker/2:0 Not tainted 4.13.0-rc2+ #1 Workqueue: events free_ioctx Backtrace: [<0000000040163bf0>] show_stack+0x20/0x38 [<0000000040688480>] dump_stack+0xa8/0x120 [<0000000040163dc4>] die_if_kernel+0x19c/0x2b0 [<0000000040164d0c>] handle_interruption+0xa24/0xa48 This patch modifies flush_cache_range() to handle non current contexts. In as much as this occurs infrequently, the simplest approach is to flush the entire cache when this happens. Signed-off-by: John David Anglin Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Helge Deller arch/parisc/kernel/cache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9c5d58fb9e1df8c9ead4daf9e770ce61e4256e02 Author: Jeff Layton Date: Mon Jul 31 00:55:34 2017 -0400 ext4: convert swap_inode_data() over to use swap() on most of the fields For some odd reason, it forces a byte-by-byte copy of each field. A plain old swap() on most of these fields would be more efficient. We do need to retain the memswap of i_data however as that field is an array. Signed-off-by: Theodore Ts'o Signed-off-by: Jeff Layton Reviewed-by: Jan Kara fs/ext4/ioctl.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 191eac33009e6a6d31e87cfa425a20d0e79704b4 Author: Emoly Liu Date: Mon Jul 31 00:40:22 2017 -0400 ext4: error should be cleared if ea_inode isn't added to the cache For Lustre, if ea_inode fails in hash validation but passes parent inode and generation checks, it won't be added to the cache as well as the error "-EFSCORRUPTED" should be cleared, otherwise it will cause "Structure needs cleaning" when running getfattr command. Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9723 Cc: stable@vger.kernel.org Fixes: dec214d00e0d78a08b947d7dccdfdb84407a9f4d Signed-off-by: Emoly Liu Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Reviewed-by: tahsin@google.com fs/ext4/xattr.c | 1 + 1 file changed, 1 insertion(+) commit a3bb2d5587521eea6dab2d05326abb0afb460abd Author: Jan Kara Date: Sun Jul 30 23:33:01 2017 -0400 ext4: Don't clear SGID when inheriting ACLs When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the owning group of 'DIR0'). However when 'DIR0' also has some default ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on 'DIR1' to get cleared if user is not member of the owning group. Fix the problem by moving posix_acl_update_mode() out of __ext4_set_acl() into ext4_set_acl(). That way the function will not be called when inheriting ACLs which is what we want as it prevents SGID bit clearing and the mode has been properly set by posix_acl_create() anyway. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: stable@vger.kernel.org Signed-off-by: Theodore Ts'o Signed-off-by: Jan Kara Reviewed-by: Andreas Gruenbacher fs/ext4/acl.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 397e434176bb62bc6068d2210af1d876c6212a7e Author: Ernesto A. Fernández Date: Sun Jul 30 22:43:41 2017 -0400 ext4: preserve i_mode if __ext4_set_acl() fails When changing a file's acl mask, __ext4_set_acl() will first set the group bits of i_mode to the value of the mask, and only then set the actual extended attribute representing the new acl. If the second part fails (due to lack of space, for example) and the file had no acl attribute to begin with, the system will from now on assume that the mask permission bits are actual group permission bits, potentially granting access to the wrong users. Prevent this by only changing the inode mode after the acl has been set. Signed-off-by: Ernesto A. Fernández Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/acl.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit a627b0a7c15ee4d2c87a86d5be5c8167382e8d0d Author: Eric Whitney Date: Sun Jul 30 22:30:11 2017 -0400 ext4: remove unused metadata accounting variables Two variables in ext4_inode_info, i_reserved_meta_blocks and i_allocated_meta_blocks, are unused. Removing them saves a little memory per in-memory inode and cleans up clutter in several tracepoints. Adjust tracepoint output from ext4_alloc_da_blocks() for consistency and fix a typo and whitespace near these changes. Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/ext4.h | 6 ++---- fs/ext4/super.c | 2 -- include/trace/events/ext4.h | 35 ++++++++--------------------------- 3 files changed, 10 insertions(+), 33 deletions(-) commit 1e21196c8e3e210cbef130e23e40c4adc3d9ce10 Author: Eric Whitney Date: Sun Jul 30 22:26:40 2017 -0400 ext4: correct comment references to ext4_ext_direct_IO() Commit 914f82a32d0268847 "ext4: refactor direct IO code" deleted ext4_ext_direct_IO(), but references to that function remain in comments. Update them to refer to ext4_direct_IO_write(). Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Reviewed-by: Jan Kara fs/ext4/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6bcbb3174caa5f1ccc894f8ae077631659d5a629 Author: Nicholas Bellinger Date: Fri Jun 30 00:08:13 2017 -0700 qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2) This patch drops two incorrect usages of tcm_qla2xxx_free_cmd() during TMR ABORT within tcm_qla2xxx_handle_data_work() and tcm_qla2xxx_aborted_task(), which where attempting to dispatch into workqueue context to do tcm_qla2xxx_complete_free() and subsequently invoke transport_generic_free_cmd(). This is incorrect because during TMR ABORT target-core will drop the outstanding se_cmd->cmd_kref references once it has quiesced the se_cmd via transport_wait_for_tasks(), and in the case of qla2xxx it should not attempt to do it's own transport_generic_free_cmd() once the abort has occured. As reported by Pascal, this was originally manifesting as a BUG_ON(cmd->cmd_in_wq) in qlt_free_cmd() during TMR ABORT, with a LIO backend that had sufficently high enough WRITE latency to trigger a host side TMR ABORT_TASK. (v2: Drop the qla_tgt_cmd->write_pending_abort_comp changes, as they will be addressed in a seperate series) Reported-by: Pascal de Bruijn Tested-by: Pascal de Bruijn Cc: Pascal de Bruijn Reported-by: Lukasz Engel Cc: Lukasz Engel Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: # 3.10+ Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/tcm_qla2xxx.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit d96adb9b076a12d30500347e2e667689062f44a0 Author: Varun Prakash Date: Sat Jul 29 21:01:49 2017 +0530 cxgbit: fix sg_nents calculation The current logic of calculating sg_nents can fail if data_offset % PAGE_SIZE is not zero. For example - PAGE_SIZE = 4096 data_len = 3072 data_offset = 3072 As per current logic sg_nents = max(1UL, DIV_ROUND_UP(data_len, PAGE_SIZE)); sg_nents = max(1UL, DIV_ROUND_UP(3072, 4096)); sg_nents = 1 But as data_offset % PAGE_SIZE = 3072 we should skip 3072 bytes skip = 3K sg_nents = max(1UL, DIV_ROUND_UP(3K(skip) + 3K(data_len), 4K(PAGE_SIZE)); sg_nents = 2; This patch fixes this issue by adding skip to data_len. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger drivers/target/iscsi/cxgbit/cxgbit_target.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 310d40a973c560a24c79f84cb5f16dc540a05686 Author: Varun Prakash Date: Sun Jul 23 20:03:45 2017 +0530 iscsi-target: fix invalid flags in text response In case of multiple text responses iscsi-target sets both 'F' and 'C' bit for the final text response pdu, this issue happens because hdr->flags is not zeroed out before ORing with 'F' bit. This patch removes the | operator to fix this issue. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea8dc5b4cd2195ee582cae28afa4164c6dea1738 Author: Varun Prakash Date: Sun Jul 23 20:03:33 2017 +0530 iscsi-target: fix memory leak in iscsit_setup_text_cmd() On receiving text request iscsi-target allocates buffer for payload in iscsit_handle_text_cmd() and assigns buffer pointer to cmd->text_in_ptr, this buffer is currently freed in iscsit_release_cmd(), if iscsi-target sets 'C' bit in text response then it will receive another text request from the initiator with ttt != 0xffffffff in this case iscsi-target will find cmd using itt and call iscsit_setup_text_cmd() which will set cmd->text_in_ptr to NULL without freeing previously allocated buffer. This patch fixes this issue by calling kfree(cmd->text_in_ptr) in iscsit_setup_text_cmd() before assigning NULL to it. For the first text request cmd->text_in_ptr is NULL as cmd is memset to 0 in iscsit_allocate_cmd(). Signed-off-by: Varun Prakash Cc: # 4.0+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 1 + 1 file changed, 1 insertion(+) commit 66b59f9b1f41ee61eb4862bbcfc1e7db5298ba9e Author: Varun Prakash Date: Sun Jul 23 20:03:07 2017 +0530 cxgbit: add missing __kfree_skb() Call __kfree_skb() after processing skb to avoid memory leak. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger drivers/target/iscsi/cxgbit/cxgbit_cm.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit ededd039d1b96035b23592c049efcae53922cfce Author: Bryant G. Ly Date: Fri Jul 14 08:11:04 2017 -0500 tcmu: free old string on reconfig On initial tcmu_configure_device call the info->name would have already been allocated and set, so on the second call make sure to free it first. Reported-by: Mike Christie Reviewed-by: Mike Christie Signed-off-by: Bryant G. Ly Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 2 ++ 1 file changed, 2 insertions(+) commit c542942cb42186f99b6d715a833c7afad359f48f Author: Xiubo Li Date: Wed Jul 12 15:51:17 2017 +0800 tcmu: Fix possible to/from address overflow when doing the memcpy For most case the sg->length equals to PAGE_SIZE, so this bug won't be triggered. Otherwise this will crash the kernel, for example when all segments' sg->length equal to 1K. Signed-off-by: Xiubo Li Reviewed-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 16f73eb02d7e1765ccab3d2018e0bd98eb93d973 Author: Linus Torvalds Date: Sun Jul 30 12:40:36 2017 -0700 Linux 4.13-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f137e0b0c5903d4a12ed2954c64924e4a979232d Merge: e4776b8 20c6c18 Author: Linus Torvalds Date: Sun Jul 30 12:19:35 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A small set of x86 fixes: - prevent the kernel from using the EFI reboot method when EFI is disabled. - two patches addressing clang issues" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Disable the address-of-packed-member compiler warning x86/efi: Fix reboot_mode when EFI runtime services are disabled x86/boot: #undef memcpy() et al in string.c commit e4776b8ccbdc4b8a0744641cd66197a91ec37689 Merge: dbc52a8 6c423f5 Author: Linus Torvalds Date: Sun Jul 30 11:54:08 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Two patches addressing build warnings caused by inconsistent kernel doc comments" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/wait: Clean up some documentation warnings sched/core: Fix some documentation build warnings commit dbc52a80308c237a2ee0e46e63fdbfbcb518978e Merge: 06efc7d 38115f2 Author: Linus Torvalds Date: Sun Jul 30 11:52:15 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A couple of fixes for performance counters and kprobes: - a series of small patches which make the uncore performance counters on Skylake server systems work correctly - add a missing instruction slot release to the failure path of kprobes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kprobes/x86: Release insn_slot in failure path perf/x86/intel/uncore: Fix missing marker for skx_uncore_cha_extra_regs perf/x86/intel/uncore: Fix SKX CHA event extra regs perf/x86/intel/uncore: Remove invalid Skylake server CHA filter field perf/x86/intel/uncore: Fix Skylake server CHA LLC_LOOKUP event umask perf/x86/intel/uncore: Fix Skylake server PCU PMU event format perf/x86/intel/uncore: Fix Skylake UPI PMU event masks commit 06efc7df376659963ba4de26217ebdcdc2a6c09b Merge: 0a07b23 8397913 Author: Linus Torvalds Date: Sun Jul 30 11:27:33 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "Fix for a regression caused by the conversion of x86 to the generic hotplug code. Instead of doing a plain single line revert, this adds a pile of comments so the semantics of the force argument are clear" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/cpuhotplug: Revert "Set force affinity flag on hotplug migration" commit 50dbe1f4b453b2860ef0e3d48054b9fd24d5ae97 Author: Fabrice Gasnier Date: Mon Jul 24 18:10:38 2017 +0200 iio: adc: stm32: fix common clock rate ADC clock input is provided to internal prescaler (that decreases its frequency). It's then used as reference clock for conversions. - Fix common clock rate used then by stm32-adc sub-devices. Take common prescaler into account. Currently, rate is used to set "boost" mode. It may unnecessarily be set. This impacts power consumption. - Fix ADC max clock rate on STM32H7 (fADC from datasheet). Currently, prescaler may be set too low. This can result in ADC reference clock used for conversion to exceed max allowed clock frequency. Fixes: 95e339b6e85d ("iio: adc: stm32: add support for STM32H7") Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc-core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cef988642cdac44e910a27cb6e8166c96f86a0df Author: Ian Abbott Date: Fri Jul 28 16:22:31 2017 +0100 staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING Comedi's read and write file operation handlers (`comedi_read()` and `comedi_write()`) currently call `copy_to_user()` or `copy_from_user()` whilst in the `TASK_INTERRUPTIBLE` state, which falls foul of the `might_fault()` checks when enabled. Fix it by setting the current task state back to `TASK_RUNNING` a bit earlier before calling these functions. Reported-by: Piotr Gregor Signed-off-by: Ian Abbott Cc: # 4.5+ Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 3 +++ 1 file changed, 3 insertions(+) commit 37ef38f3f83891a2f413fb872bae7d0f9bb95b27 Author: Timur Tabi Date: Thu Jul 27 16:15:52 2017 -0500 tty: pl011: fix initialization order of QDF2400 E44 The work-around for Qualcomm Technologies QDF2400 Erratum 44 hinges on a global variable defined in the pl011 driver. The ACPI SPCR parsing code determines whether the work-around is needed, and if so, it changes the console name from "pl011" to "qdf2400_e44". The expectation is that the pl011 driver will implement the work-around when it sees the console name. The global variable qdf2400_e44_present is set when that happens. The problem is that work-around needs to be enabled when the pl011 driver probes, not when the console name is queried. However, sbsa_probe() is called before pl011_console_match(). The work-around appeared to work previously because the default console on QDF2400 platforms was always ttyAMA1. The first time sbsa_probe() is called (for ttyAMA0), qdf2400_e44_present is still false. Then pl011_console_match() is called, and it sets qdf2400_e44_present to true. All subsequent calls to sbsa_probe() enable the work-around. The solution is to move the global variable into spcr.c and let the pl011 driver query it during probe time. This works because all QDF2400 platforms require SPCR, so parse_spcr() will always be called. pl011_console_match still checks for the "qdf2400_e44" console name, but it doesn't do anything else special. Fixes: 5a0722b898f8 ("tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44") Tested-by: Jeffrey Hugo Signed-off-by: Timur Tabi Signed-off-by: Greg Kroah-Hartman drivers/acpi/spcr.c | 36 ++++++++++++++++++++++++++++++++++-- drivers/tty/serial/amba-pl011.c | 37 +++++++++++++++++++------------------ include/linux/acpi.h | 1 + 3 files changed, 54 insertions(+), 20 deletions(-) commit 45d73860530a14c608f410b91c6c341777bfa85d Author: Bin Liu Date: Tue Jul 25 09:31:34 2017 -0500 usb: musb: fix tx fifo flush handling again commit 68fe05e2a451 ("usb: musb: fix tx fifo flush handling") drops the 1ms delay trying to solve the long disconnect time issue when application queued many tx urbs. However, the 1ms delay is needed for some use cases, for example, without the delay, reconnecting AR9271 WIFI dongle no longer works if the connection is dropped from the AP. So let's add back the 1ms delay in musb_h_tx_flush_fifo(), and solve the long disconnect time problem with a separate patch for usb_hcd_flush_endpoint(). Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_host.c | 1 + 1 file changed, 1 insertion(+) commit 2eac13624364db5b5e1666ae0bb3a4d36bc56b6e Author: Bin Liu Date: Tue Jul 25 09:31:33 2017 -0500 usb: core: unlink urbs from the tail of the endpoint's urb_list While unlink an urb, if the urb has been programmed in the controller, the controller driver might do some hw related actions to tear down the urb. Currently usb_hcd_flush_endpoint() passes each urb from the head of the endpoint's urb_list to the controller driver, which could make the controller driver think each urb has been programmed and take the unnecessary actions for each urb. This patch changes the behavior in usb_hcd_flush_endpoint() to pass the urbs from the tail of the list, to avoid any unnecessary actions in an controller driver. Cc: stable@vger.kernel.org # v4.4+ Acked-by: Alan Stern Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b52291a0743fc4db4a7495c846a6f31ee84d282 Author: Alan Stern Date: Wed Jul 26 11:49:19 2017 -0400 usb-storage: fix deadlock involving host lock and scsi_done Christoph Hellwig says that since version 4.12, the kernel switched to using blk-mq by default. The old code used a softirq for handling request completions, but blk-mq can handle completions in the caller's context. This may cause a problem for usb-storage, because it invokes the ->scsi_done callback while holding the host lock, and the completion routine sometimes tries to acquire the same lock (when running the error handler, for example). The consequence is that the existing code will sometimes deadlock upon error completion of a SCSI command (with a lockdep warning). This is easy enough to fix, since usb-storage doesn't really need to hold the host lock while the callback runs. It was simpler to write it that way, but moving the call outside the locked region is pretty easy and there's no downside. That's what this patch does. Signed-off-by: Alan Stern Reported-and-tested-by: Arthur Marsh CC: Christoph Hellwig CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/usb.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 89f23d51defcb94a5026d4b5da13faf4e1150a6f Author: Alan Swanson Date: Wed Jul 26 12:03:33 2017 +0100 uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069 Similar to commit d595259fbb7a ("usb-storage: Add ignore-residue quirk for Initio INIC-3619") for INIC-3169 in unusual_devs.h but INIC-3069 already present in unusual_uas.h. Both in same controller IC family. Issue is that MakeMKV fails during key exchange with installed bluray drive with following error: 002004:0000 Error 'Scsi error - ILLEGAL REQUEST:COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT ESTABLISHED' occurred while issuing SCSI command AD010..080002400 to device 'SG:dev_11:0' Signed-off-by: Alan Swanson Acked-by: Oliver Neukum Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/unusual_uas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd5a6a4fdaba150089af2afc220eae0fef74878a Author: Rafael J. Wysocki Date: Tue Jul 25 23:58:50 2017 +0200 USB: hcd: Mark secondary HCD as dead if the primary one died Make usb_hc_died() clear the HCD_FLAG_RH_RUNNING flag for the shared HCD and set HCD_FLAG_DEAD for it, in analogy with what is done for the primary one. Among other thigs, this prevents check_root_hub_suspended() from returning -EBUSY for dead HCDs which helps to work around system suspend issues in some situations. This actually fixes occasional suspend failures on one of my test machines. Suggested-by: Alan Stern Signed-off-by: Rafael J. Wysocki Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 2 ++ 1 file changed, 2 insertions(+) commit ff3aa88a4d61468baece3fc2bb54e2a3bea6360f Author: Stefan Brüns Date: Wed Jul 26 23:32:06 2017 +0200 iio: adc: ina219: Avoid underflow for sleeping time Proper support for the INA219 lowered the minimum sampling period from 2*140us to 2*84us. Subtracting 200us later leads to an underflow and an almost infinite udelay later. Using a signed int for the sampling period provides sufficient range (at most 2*8640*1024us), but catches the underflow when comparing with buffer_us. Fixes: 18edac2e22f4 ("iio: adc: Fix integration time/averaging for INA219/220") Signed-off-by: Stefan Brüns Signed-off-by: Jonathan Cameron drivers/iio/adc/ina2xx-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90938ca432e6b8f6bb1c22a24984738fc3d906ed Author: Fabrice Gasnier Date: Thu Jul 27 18:19:00 2017 +0200 iio: trigger: stm32-timer: add enable attribute In order to use encoder mode, timers needs to be enabled (e.g. CEN bit) along with peripheral clock. Add IIO_CHAN_INFO_ENABLE attribute to handle this. Also, in triggered mode, CEN bit is set automatically in hardware. Then clock must be enabled before starting triggered mode. Signed-off-by: Fabrice Gasnier Acked-by: Benjamin Gaignard Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-timer-trigger.c | 55 +++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 14 deletions(-) commit 06e3fe89988b1c99a3d9953b1d3b1faf3f047017 Author: Fabrice Gasnier Date: Thu Jul 27 18:18:59 2017 +0200 iio: trigger: stm32-timer: fix get/set down count direction Fixes: 4adec7da0536 ("iio: stm32 trigger: Add quadrature encoder device") This fixes two issues: - stm32_set_count_direction: to set down direction - stm32_get_count_direction: to get down direction IIO core provides/expects value to be an index of iio_enum items array. This needs to be turned by these routines into TIM_CR1_DIR (e.g. BIT(4)) value. Also, report error when attempting to write direction, when in encoder mode: in this case, direction is read only (given by encoder inputs). Signed-off-by: Fabrice Gasnier Acked-by: Benjamin Gaignard Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-timer-trigger.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 1987a08cd989fd9e5690e90a04e70046e93315f4 Author: Fabrice Gasnier Date: Thu Jul 27 18:18:58 2017 +0200 iio: trigger: stm32-timer: fix write_raw return value Fixes: 4adec7da0536 ("iio: stm32 trigger: Add quadrature encoder device") IIO core expects zero as return value for write_raw() callback in case of success. Signed-off-by: Fabrice Gasnier Acked-by: Benjamin Gaignard Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-timer-trigger.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 50b39608efb1e60f334f9b59128fd6d970bfd5a6 Author: Fabrice Gasnier Date: Thu Jul 27 18:18:57 2017 +0200 iio: trigger: stm32-timer: fix quadrature mode get routine Fixes: 4adec7da0536 ("iio: stm32 trigger: Add quadrature encoder device") SMS bitfiled is mode + 1. After reset, upon boot, SMS = 0. When reading from sysfs, stm32_get_quadrature_mode() returns -1 (e.g. -EPERM) which is wrong error code here. So, check SMS bitfiled matches valid encoder mode, or return -EINVAL. Signed-off-by: Fabrice Gasnier Acked-by: Benjamin Gaignard Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-timer-trigger.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit eb92b4183d93a6f101a6bd3aaae651de404c119a Author: Andreas Klinger Date: Tue Jul 25 11:11:14 2017 +0200 iio: bmp280: properly initialize device for humidity reading If the device is not initialized at least once it happens that the humidity reading is skipped, which means the special value 0x8000 is delivered. For omitting this case the oversampling of the humidity must be set before the oversampling of the temperature und pressure is set as written in the datasheet of the BME280. Furthermore proper error detection is added in case a skipped value is read from the device. This is done also for pressure and temperature reading. Especially it don't make sense to compensate this value and treat it as regular value. Signed-off-by: Andreas Klinger Signed-off-by: Jonathan Cameron drivers/iio/pressure/bmp280-core.c | 27 ++++++++++++++++++++++++--- drivers/iio/pressure/bmp280.h | 5 +++++ 2 files changed, 29 insertions(+), 3 deletions(-) commit f7f3dd5b4cbb138ed4559b0d096bab76a8f476de Author: Hanjun Guo Date: Fri Jul 28 17:42:35 2017 +0800 ACPI: APD: Fix HID for Hisilicon Hip07/08 ACPI HID for Hisilicon Hip07/08 should be HISI02A1/2, not HISI0A21/2, HISI02A1/2 was tested ok but was modified by the stupid typo when upstream the patches (by me), correct them to the right IDs (matching the IDs in drivers/i2c/busses/i2c-designware-platdrv.c). Fixes: 6e14cf361a0c (ACPI / APD: Add clock frequency for Hisilicon Hip07/08 I2C controller) Reported-by: Tao Tian Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4815d3c56d1e10449a44089a47544d9ba84fad0d Author: Rafael J. Wysocki Date: Fri Jul 28 14:45:03 2017 +0200 cpufreq: x86: Make scaling_cur_freq behave more as expected After commit f8475cef9008 "x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF" the scaling_cur_freq policy attribute in sysfs only behaves as expected on x86 with APERF/MPERF registers available when it is read from at least twice in a row. The value returned by the first read may not be meaningful, because the computations in there use cached values from the previous iteration of aperfmperf_snapshot_khz() which may be stale. To prevent that from happening, modify arch_freq_get_on_cpu() to call aperfmperf_snapshot_khz() twice, with a short delay between these calls, if the previous invocation of aperfmperf_snapshot_khz() was too far back in the past (specifically, more that 1s ago). Also, as pointed out by Doug Smythies, aperf_delta is limited now and the multiplication of it by cpu_khz won't overflow, so simplify the s->khz computations too. Fixes: f8475cef9008 "x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF" Reported-by: Doug Smythies Signed-off-by: Rafael J. Wysocki arch/x86/kernel/cpu/aperfmperf.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit 9975a54b3c9ecf029cbf5dd7a8c9701b1d74029e Author: Daniel Borkmann Date: Fri Jul 28 17:05:25 2017 +0200 bpf: fix bpf_prog_get_info_by_fd to dump correct xlated_prog_len bpf_prog_size(prog->len) is not the correct length we want to dump back to user space. The code in bpf_prog_get_info_by_fd() uses this to copy prog->insnsi to user space, but bpf_prog_size(prog->len) also includes the size of struct bpf_prog itself plus program instructions and is usually used either in context of accounting or for bpf_prog_alloc() et al, thus we copy out of bounds in bpf_prog_get_info_by_fd() potentially. Use the correct bpf_prog_insn_size() instead. Fixes: 1e2709769086 ("bpf: Add BPF_OBJ_GET_INFO_BY_FD") Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/bpf/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efe967cdec32af93e15839cc639695ec5f637771 Author: Arnd Bergmann Date: Fri Jul 28 16:41:37 2017 +0200 tcp: avoid bogus gcc-7 array-bounds warning When using CONFIG_UBSAN_SANITIZE_ALL, the TCP code produces a false-positive warning: net/ipv4/tcp_output.c: In function 'tcp_connect': net/ipv4/tcp_output.c:2207:40: error: array subscript is below array bounds [-Werror=array-bounds] tp->chrono_stat[tp->chrono_type - 1] += now - tp->chrono_start; ^~ net/ipv4/tcp_output.c:2207:40: error: array subscript is below array bounds [-Werror=array-bounds] tp->chrono_stat[tp->chrono_type - 1] += now - tp->chrono_start; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ I have opened a gcc bug for this, but distros have already shipped compilers with this problem, and it's not clear yet whether there is a way for gcc to avoid the warning. As the problem is related to the bitfield access, this introduces a temporary variable to store the old enum value. I did not notice this warning earlier, since UBSAN is disabled when building with COMPILE_TEST, and that was always turned on in both allmodconfig and randconfig tests. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81601 Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4084e01db9d52213bd2d63941c72d2788b38e1ed Merge: b103ec7 5f5d031 Author: David S. Miller Date: Sat Jul 29 15:30:08 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.13 Two fixes for for brcmfmac, the crash was reported by two people already so it's a high priority fix. brcmfmac * fix a crash in skb headroom handling in v4.13-rc1 * fix a memory leak due to a merge error in v4.6 ==================== Signed-off-by: David S. Miller commit b103ec73b27ad385241c806a21f8e2bdeae2f13a Author: Colin Ian King Date: Thu Jul 27 23:15:09 2017 +0100 net: tc35815: fix spelling mistake: "Intterrupt" -> "Interrupt" Trivial fix to spelling mistake in printk message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/tc35815.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46d556e6aaa0ec4dc83648ab1ca3d01dd2fa3ea3 Author: Paolo Valente Date: Sat Jul 29 12:42:56 2017 +0200 block, bfq: consider also in_service_entity to state whether an entity is active Groups of BFQ queues are represented by generic entities in BFQ. When a queue belonging to a parent entity is deactivated, the parent entity may need to be deactivated too, in case the deactivated queue was the only active queue for the parent entity. This deactivation may need to be propagated upwards if the entity belongs, in its turn, to a further higher-level entity, and so on. In particular, the upward propagation of deactivation stops at the first parent entity that remains active even if one of its child entities has been deactivated. To decide whether the last non-deactivation condition holds for a parent entity, BFQ checks whether the field next_in_service is still not NULL for the parent entity, after the deactivation of one of its child entity. If it is not NULL, then there are certainly other active entities in the parent entity, and deactivations can stop. Unfortunately, this check misses a corner case: if in_service_entity is not NULL, then next_in_service may happen to be NULL, although the parent entity is evidently active. This happens if: 1) the entity pointed by in_service_entity is the only active entity in the parent entity, and 2) according to the definition of next_in_service, the in_service_entity cannot be considered as next_in_service. See the comments on the definition of next_in_service for details on this second point. Hitting the above corner case causes crashes. To address this issue, this commit: 1) Extends the above check on only next_in_service to controlling both next_in_service and in_service_entity (if any of them is not NULL, then no further deactivation is performed) 2) Improves the (important) comments on how next_in_service is defined and updated; in particular it fixes a few rather obscure paragraphs Reported-by: Eric Wheeler Reported-by: Rick Yiu Reported-by: Tom X Nguyen Signed-off-by: Paolo Valente Tested-by: Eric Wheeler Tested-by: Rick Yiu Tested-by: Laurentiu Nicola Tested-by: Tom X Nguyen Signed-off-by: Jens Axboe block/bfq-iosched.h | 22 ++++++-- block/bfq-wf2q.c | 142 +++++++++++++++++++++++++++++----------------------- 2 files changed, 95 insertions(+), 69 deletions(-) commit 6ab1d8da972d4c4e318607e96c5ecb32101c80f4 Author: Paolo Valente Date: Fri Jul 28 21:41:18 2017 +0200 block, bfq: reset in_service_entity if it becomes idle BFQ implements hierarchical scheduling by representing each group of queues with a generic parent entity. For each parent entity, BFQ maintains an in_service_entity pointer: if one of the child entities happens to be in service, in_service_entity points to it. The resetting of these pointers happens only on queue expirations: when the in-service queue is expired, i.e., stops to be the queue in service, BFQ resets all in_service_entity pointers along the parent-entity path from this queue to the root entity. Functions handling the scheduling of entities assume, naturally, that in-service entities are active, i.e., have pending I/O requests (or, as a special case, even if they have no pending requests, they are expected to receive a new request very soon, with the scheduler idling the storage device while waiting for such an event). Unfortunately, the above resetting scheme of the in_service_entity pointers may cause this assumption to be violated. For example, the in-service queue may happen to remain without requests because of a request merge. In this case the queue does become idle, and all related data structures are updated accordingly. But in_service_entity still points to the queue in the parent entity. This inconsistency may even propagate to higher-level parent entities, if they happen to become idle as well, as a consequence of the leaf queue becoming idle. For this queue and parent entities, scheduling functions have an undefined behaviour, and, as reported, may easily lead to kernel crashes or hangs. This commit addresses this issue by simply resetting the in_service_entity field also when it is detected to point to an entity becoming idle (regardless of why the entity becomes idle). Reported-by: Laurentiu Nicola Signed-off-by: Paolo Valente Tested-by: Laurentiu Nicola Signed-off-by: Jens Axboe block/bfq-wf2q.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 89b096898a8450b0a5b97d521e000ae9f94f81f9 Author: Daniel Borkmann Date: Thu Jul 27 21:02:46 2017 +0200 bpf: don't indicate success when copy_from_user fails err in bpf_prog_get_info_by_fd() still holds 0 at that time from prior check_uarg_tail_zero() check. Explicitly return -EFAULT instead, so user space can be notified of buggy behavior. Fixes: 1e2709769086 ("bpf: Add BPF_OBJ_GET_INFO_BY_FD") Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/bpf/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9f2c1ae123a751d4e4f949144500219354d5ee1 Author: Paolo Abeni Date: Thu Jul 27 14:45:09 2017 +0200 udp6: fix socket leak on early demux When an early demuxed packet reaches __udp6_lib_lookup_skb(), the sk reference is retrieved and used, but the relevant reference count is leaked and the socket destructor is never called. Beyond leaking the sk memory, if there are pending UDP packets in the receive queue, even the related accounted memory is leaked. In the long run, this will cause persistent forward allocation errors and no UDP skbs (both ipv4 and ipv6) will be able to reach the user-space. Fix this by explicitly accessing the early demux reference before the lookup, and properly decreasing the socket reference count after usage. Also drop the skb_steal_sock() in __udp6_lib_lookup_skb(), and the now obsoleted comment about "socket cache". The newly added code is derived from the current ipv4 code for the similar path. v1 -> v2: fixed the __udp6_lib_rcv() return code for resubmission, as suggested by Eric Reported-by: Sam Edwards Reported-by: Marc Haber Fixes: 5425077d73e0 ("net: ipv6: Add early demux handler for UDP unicast") Signed-off-by: Paolo Abeni Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/udp.h | 1 + net/ipv4/udp.c | 3 ++- net/ipv6/udp.c | 27 ++++++++++++++++++--------- 3 files changed, 21 insertions(+), 10 deletions(-) commit 500268e9f28de972514de89a5a1b4106d0417989 Author: Sunil Goutham Date: Thu Jul 27 12:53:04 2017 +0530 net: thunderx: Fix BGX transmit stall due to underflow For SGMII/RGMII/QSGMII interfaces when physical link goes down while traffic is high is resulting in underflow condition being set on that specific BGX's LMAC. Which assets a backpresure and VNIC stops transmitting packets. This is due to BGX being disabled in link status change callback while packet is in transit. This patch fixes this issue by not disabling BGX but instead just disables packet Rx and Tx. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 27 ++++++++++++++++++----- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 2 ++ 2 files changed, 24 insertions(+), 5 deletions(-) commit 8d65843c44269c21e95c98090d9bb4848d473853 Author: Jason Wang Date: Thu Jul 27 11:22:05 2017 +0800 Revert "vhost: cache used event for better performance" This reverts commit 809ecb9bca6a9424ccd392d67e368160f8b76c92. Since it was reported to break vhost_net. We want to cache used event and use it to check for notification. The assumption was that guest won't move the event idx back, but this could happen in fact when 16 bit index wraps around after 64K entries. Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/vhost.c | 28 ++++++---------------------- drivers/vhost/vhost.h | 3 --- 2 files changed, 6 insertions(+), 25 deletions(-) commit 90fecc145e49ba0e910173e8b9fe94a458ef3024 Merge: 996f6e1 bcec601 Author: David S. Miller Date: Sat Jul 29 11:26:45 2017 -0700 Merge tag 'mlx5-fixes-2017-07-27-V2' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2017-07-27 This series contains some misc fixes to the mlx5 driver. Please pull and let me know if there's any problem. V1->V2: - removed redundant braces for -stable: 4.7 net/mlx5: Fix command bad flow on command entry allocation failure 4.9 net/mlx5: Consider tx_enabled in all modes on remap net/mlx5e: Fix outer_header_zero() check size 4.10 net/mlx5: Fix mlx5_add_flow_rules call with correct num of dests 4.11 net/mlx5: Fix mlx5_ifc_mtpps_reg_bits structure size net/mlx5e: Add field select to MTPPS register net/mlx5e: Fix broken disable 1PPS flow net/mlx5e: Change 1PPS out scheme net/mlx5e: Add missing support for PTP_CLK_REQ_PPS request net/mlx5e: Fix wrong delay calculation for overflow check scheduling net/mlx5e: Schedule overflow check work to mlx5e workqueue 4.12 net/mlx5: Fix command completion after timeout access invalid structure net/mlx5e: IPoIB, Modify add/remove underlay QPN flows I hope this is not too much, but most of the patches do apply cleanly on -stable. ==================== Signed-off-by: David S. Miller commit 996f6e12cfb33ff6c3e39b4511bb3b8bc564b342 Author: WANG Cong Date: Wed Jul 26 15:22:07 2017 -0700 team: use a larger struct for mac address IPv6 tunnels use sizeof(struct in6_addr) as dev->addr_len, but in many places especially bonding, we use struct sockaddr to copy and set mac addr, this could lead to stack out-of-bounds access. Fix it by using a larger address storage like bonding. Reported-by: Andrey Konovalov Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller drivers/net/team/team.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0254e0c632bfe4a0cf610e2d90397474144f00d2 Author: WANG Cong Date: Wed Jul 26 15:22:06 2017 -0700 net: check dev->addr_len for dev_set_mac_address() Historically, dev_ifsioc() uses struct sockaddr as mac address definition, this is why dev_set_mac_address() accepts a struct sockaddr pointer as input but now we have various types of mac addresse whose lengths are up to MAX_ADDR_LEN, longer than struct sockaddr, and saved in dev->addr_len. It is too late to fix dev_ifsioc() due to API compatibility, so just reject those larger than sizeof(struct sockaddr), otherwise we would read and use some random bytes from kernel stack. Fortunately, only a few IPv6 tunnel devices have addr_len larger than sizeof(struct sockaddr) and they don't support ndo_set_mac_addr(). But with team driver, in lb mode, they can still be enslaved to a team master and make its mac addr length as the same. Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/core/dev_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) commit fce8dc5e50e44d8f644e0f7854e6d7d518fedb68 Author: Geert Uytterhoeven Date: Wed Jul 12 16:45:20 2017 +0200 ARM: shmobile: rcar-gen2: Fix deadlock in regulator quirk Simon Horman reported that Koelsch and Lager hang during boot, and bisected this to commit 1c3c5eab171590f8 ("sched/core: Enable might_sleep() and smp_processor_id() checks early"). The da9063/da9210 regulator quirk for R-Car Gen2 boards uses a bus notifier, and unregisters the notifier when it is no longer needed. However, a notifier must not be unregistered from within the call chain. This bug went unnoticed, as blocking_notifier_chain_unregister() didn't take the semaphore during early boot. The aforementioned commit changed that behavior, leading to a deadlock. Fix this by removing the call to bus_unregister_notifier(), and keeping local completion state instead. Reported-by: Simon Horman Fixes: 663fbb52159cca6f ("ARM: shmobile: R-Car Gen2: Add da9063/da9210 regulator quirk") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6d0f581d1768d3eaba15776e7dd1fdfec10cfe36 Author: Max Filippov Date: Fri Jul 28 17:42:59 2017 -0700 xtensa: fix cache aliasing handling code for WT cache Currently building kernel for xtensa core with aliasing WT cache fails with the following messages: mm/memory.c:2152: undefined reference to `flush_dcache_page' mm/memory.c:2332: undefined reference to `local_flush_cache_page' mm/memory.c:1919: undefined reference to `local_flush_cache_range' mm/memory.c:4179: undefined reference to `copy_to_user_page' mm/memory.c:4183: undefined reference to `copy_from_user_page' This happens because implementation of these functions is only compiled when data cache is WB, which looks wrong: even when data cache doesn't need flushing it still needs invalidation. The functions like __flush_[invalidate_]dcache_* are correctly defined for both WB and WT caches (and even if they weren't that'd still be ok, just slower). Fix this by providing the same implementation of the above functions for both WB and WT cache. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov arch/xtensa/mm/cache.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 0a07b238e5f488b459b6113a62e06b6aab017f71 Merge: 286ba84 531da74 Author: Linus Torvalds Date: Fri Jul 28 17:21:41 2017 -0700 Merge tag 'devicetree-fixes-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: "Two small DT fixes: - Fix error handling in of_irq_to_resource_table() due to of_irq_to_resource() error return changes. - Fix dtx_diff script due to dts include path changes" * tag 'devicetree-fixes-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: irq: fix of_irq_to_resource() error check scripts/dtc: dtx_diff - update include dts paths to match build commit 286ba844c59bf0deebc25119f48e00a9ae54efb9 Merge: 19993e7 b7dbcc0 Author: Linus Torvalds Date: Fri Jul 28 14:44:56 2017 -0700 Merge tag 'nfs-for-4.13-3' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "More NFS client bugfixes for 4.13. Most of these fix locking bugs that Ben and Neil noticed, but I also have a patch to fix one more access bug that was reported after last week. Stable fixes: - Fix a race where CB_NOTIFY_LOCK fails to wake a waiter - Invalidate file size when taking a lock to prevent corruption Other fixes: - Don't excessively generate tiny writes with fallocate - Use the raw NFS access mask in nfs4_opendata_access()" * tag 'nfs-for-4.13-3' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails to wake a waiter NFS: Optimize fallocate by refreshing mapping when needed. NFS: invalidate file size when taking a lock. NFS: Use raw NFS access mask in nfs4_opendata_access() commit 19993e7378533d8d802d707be271074f2eb8e4fd Merge: 8155469 5b094d6 Author: Linus Torvalds Date: Fri Jul 28 14:29:48 2017 -0700 Merge tag 'xfs-4.13-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - fix firstfsb variables that we left uninitialized, which could lead to locking problems. - check for NULL metadata buffer pointers before using them. - don't allow btree cursor manipulation if the btree block is corrupt. Better to just shut down. - fix infinite loop problems in quotacheck. - fix buffer overrun when validating directory blocks. - fix deadlock problem in bunmapi. * tag 'xfs-4.13-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix multi-AG deadlock in xfs_bunmapi xfs: check that dir block entries don't off the end of the buffer xfs: fix quotacheck dquot id overflow infinite loop xfs: check _alloc_read_agf buffer pointer before using xfs: set firstfsb to NULLFSBLOCK before feeding it to _bmapi_write xfs: check _btree_check_block value commit 8155469341a60ba7064d64b62bb32af5a901ccaf Merge: 8562e89 7b5e0a4 Author: Linus Torvalds Date: Fri Jul 28 13:36:56 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "s390: - SRCU fix PPC: - host crash fixes x86: - bugfixes, including making nested posted interrupts really work Generic: - tweaks to kvm_stat and to uevents" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: LAPIC: Fix reentrancy issues with preempt notifiers tools/kvm_stat: add '-f help' to get the available event list tools/kvm_stat: use variables instead of hard paths in help output KVM: nVMX: Fix loss of L2's NMI blocking state KVM: nVMX: Fix posted intr delivery when vcpu is in guest mode x86: irq: Define a global vector for nested posted interrupts KVM: x86: do mask out upper bits of PAE CR3 KVM: make pid available for uevents without debugfs KVM: s390: take srcu lock when getting/setting storage keys KVM: VMX: remove unused field KVM: PPC: Book3S HV: Fix host crash on changing HPT size KVM: PPC: Book3S HV: Enable TM before accessing TM registers commit 8562e89eb419f8de247556652abdbf1b9a645543 Merge: 3d9d740 e91b2b1 Author: Linus Torvalds Date: Fri Jul 28 13:35:12 2017 -0700 Merge tag 'for-linus-4.13b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Three minor cleanups for xen related drivers" * tag 'for-linus-4.13b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: dont fiddle with event channel masking in suspend/resume xen: selfballoon: remove unnecessary static in frontswap_selfshrink() xen: Drop un-informative message during boot commit 3d9d7405c0699ade882fec0c1cc6685cd5742ab3 Merge: 080012b 92bbd16 Author: Linus Torvalds Date: Fri Jul 28 13:29:36 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "I'd been collecting these whilst we debugged a CPU hotplug failure, but we ended up diagnosing that one to tglx, who has taken a fix via the -tip tree separately. We're seeing some NFS issues that we haven't gotten to the bottom of yet, and we've uncovered some issues with our backtracing too so there might be another fixes pull before we're done. Summary: - Ensure we have a guard page after the kernel image in vmalloc - Fix incorrect prefetch stride in copy_page - Ensure irqs are disabled in die() - Fix for event group validation in QCOM L2 PMU driver - Fix requesting of PMU IRQs on AMD Seattle - Minor cleanups and fixes" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mmu: Place guard page after mapping of kernel image drivers/perf: arm_pmu: Request PMU SPIs with IRQF_PER_CPU arm64: sysreg: Fix unprotected macro argmuent in write_sysreg perf: qcom_l2: fix column exclusion check arm64/lib: copy_page: use consistent prefetch stride arm64/numa: Drop duplicate message perf: Convert to using %pOF instead of full_name arm64: Convert to using %pOF instead of full_name arm64: traps: disable irq in die() arm64: atomics: Remove '&' from '+&' asm constraint in lse atomics arm64: uaccess: Remove redundant __force from addr cast in __range_ok commit 080012bad6e28e373e3f90c81b20adea4801b3a5 Merge: e26f1be 0da12a7 Author: Linus Torvalds Date: Fri Jul 28 13:25:15 2017 -0700 Merge tag 'powerpc-4.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "The highlight is Ben's patch to work around a host killing bug when running KVM guests with the Radix MMU on Power9. See the long change log of that commit for more detail. And then three fairly minor fixes: - fix of_node_put() underflow during reconfig remove, using old DLPAR tools. - fix recently introduced ld version check with 64-bit LE-only toolchain. - free the subpage_prot_table correctly, avoiding a memory leak. Thanks to: Aneesh Kumar K.V, Benjamin Herrenschmidt, Laurent Vivier" * tag 'powerpc-4.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm/hash: Free the subpage_prot_table correctly powerpc/Makefile: Fix ld version check with 64-bit LE-only toolchain powerpc/pseries: Fix of_node_put() underflow during reconfig remove powerpc/mm/radix: Workaround prefetch issue with KVM commit b7dbcc0e433f0f61acb89ed9861ec996be4f2b38 Author: Benjamin Coddington Date: Fri Jul 28 12:33:54 2017 -0400 NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails to wake a waiter nfs4_retry_setlk() sets the task's state to TASK_INTERRUPTIBLE within the same region protected by the wait_queue's lock after checking for a notification from CB_NOTIFY_LOCK callback. However, after releasing that lock, a wakeup for that task may race in before the call to freezable_schedule_timeout_interruptible() and set TASK_WAKING, then freezable_schedule_timeout_interruptible() will set the state back to TASK_INTERRUPTIBLE before the task will sleep. The result is that the task will sleep for the entire duration of the timeout. Since we've already set TASK_INTERRUPTIBLE in the locked section, just use freezable_schedule_timout() instead. Fixes: a1d617d8f134 ("nfs: allow blocking locks to be awoken by lock callbacks") Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e26f1bea3b833fb2c16fb5f0a949da1efa219de3 Merge: 0a2a133 41cdf7a Author: Linus Torvalds Date: Fri Jul 28 12:31:49 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - remove broken dt bindings in inside-secure - fix authencesn crash when used with digest_null - fix cavium/nitrox firmware path - fix SHA3 failure in brcm - fix Kconfig dependency for brcm * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: authencesn - Fix digest_null crash crypto: brcm - remove BCM_PDC_MBOX dependency in Kconfig Documentation/bindings: crypto: remove the dma-mask property crypto: inside-secure - do not parse the dma mask from dt crypto: cavium/nitrox - Change in firmware path. crypto: brcm - Fix SHA3-512 algorithm failure commit 0a2a1330d2621c7f963d9f55bb094811cc1c06b9 Merge: 9583f1c 0e4324a Author: Linus Torvalds Date: Fri Jul 28 12:26:59 2017 -0700 Merge branch 'for-4.13-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Fixes addressing problems reported by users, and there's one more regression fix" * 'for-4.13-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: round down size diff when shrinking/growing device Btrfs: fix early ENOSPC due to delalloc btrfs: fix lockup in find_free_extent with read-only block groups Btrfs: fix dir item validation when replaying xattr deletes commit 9583f1c99fe5a11b3f294ac8093e93f008bea29e Merge: 1731a47 ed9b66d Author: Linus Torvalds Date: Fri Jul 28 12:24:21 2017 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: "This fixes several bugs, three of them are marked for stable: - an initialization issue fixed by Ming - a bio clone race issue fixed by me - an async tx flush issue fixed by Ofer - other cleanups" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: MD: fix warnning for UP case md/raid5: add thread_group worker async_tx_issue_pending_all md: simplify code with bio_io_error md/raid1: fix writebehind bio clone md: raid1-10: move raid1/raid10 common code into raid1-10.c md: raid1/raid10: initialize bvec table via bio_add_page() md: remove 'idx' from 'struct resync_pages' commit 1731a47444e7bf66d5cf9415bbd6ac5e3903d719 Merge: 0fa8dc4 273752c Author: Linus Torvalds Date: Fri Jul 28 12:17:17 2017 -0700 Merge tag 'for-4.13/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - a few DM integrity fixes that improve performance. One that address inefficiencies in the on-disk journal device layout. Another that makes use of the block layer's on-stack plugging when writing the journal. - a dm-bufio fix for the blk_status_t conversion that went in during the merge window. - a few DM raid fixes that address correctness when suspending the device and a validation fix for validation that occurs during device activation. - a couple DM zoned target fixes. Important one being the fix to not use GFP_KERNEL in the IO path due to concerns about deadlock in low-memory conditions (e.g. swap over a DM zoned device, etc). - a DM DAX device fix to make sure dm_dax_flush() is called if the underlying DAX device is operating as a write cache. * tag 'for-4.13/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm, dax: Make sure dm_dax_flush() is called if device supports it dm verity fec: fix GFP flags used with mempool_alloc() dm zoned: use GFP_NOIO in I/O path dm zoned: remove test for impossible REQ_OP_FLUSH conditions dm raid: bump target version dm raid: avoid mddev->suspended access dm raid: fix activation check in validate_raid_redundancy() dm raid: remove WARN_ON() in raid10_md_layout_to_format() dm bufio: fix error code in dm_bufio_write_dirty_buffers() dm integrity: test for corrupted disk format during table load dm integrity: WARN_ON if variables representing journal usage get out of sync dm integrity: use plugging when writing the journal dm integrity: fix inefficient allocation of journal space commit 0fa8dc423c55ad3bef3cafe16ccc1caec8e4c7d7 Merge: a2d4875 75cb8e9 Author: Linus Torvalds Date: Fri Jul 28 12:13:34 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A small collection of fixes that should go into this series. This contains: - NVMe pull request from Christoph, with various fixes for nvme proper and nvme-fc. - disable runtime PM for blk-mq for now. With scsi now defaulting to using blk-mq, this reared its head as an issue. Longer term we'll fix up runtime PM for blk-mq, for now just disable it to prevent a hang on laptop resume for some folks. - blk-mq CPU <-> hw queue map fix from Christoph. - xen/blkfront pull request from Konrad, with two small fixes for the blkfront driver. - a few fixups for nbd from Joseph. - a stable fix for pblk from Javier" * 'for-linus' of git://git.kernel.dk/linux-block: lightnvm: pblk: advance bio according to lba index nvme: validate admin queue before unquiesce nbd: clear disconnected on reconnect nvme-pci: fix HMB size calculation nvme-fc: revise TRADDR parsing nvme-fc: address target disconnect race conditions in fcp io submit nvme: fabrics commands should use the fctype field for data direction nvme: also provide a UUID in the WWID sysfs attribute xen/blkfront: always allocate grants first from per-queue persistent grants xen-blkfront: fix mq start/stop race blk-mq: map queues to all present CPUs block: disable runtime-pm for blk-mq xen-blkfront: Fix handling of non-supported operations nbd: only set sndtimeo if we have a timeout set nbd: take tx_lock before disconnecting nbd: allow multiple disconnects to be sent commit a2d48756cab7771468d55562716b77311631e92c Merge: 0b5477d 3f5b4b7 Author: Linus Torvalds Date: Fri Jul 28 12:04:36 2017 -0700 Merge tag 'mmc-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "Here are a couple of mmc fixes intended for v4.13-rc1. I have also included a couple of cleanup patches in this pull request for OMAP2+, related to the omap_hsmmc driver. The reason is because of the changes are also depending on OMAP SoC specific code, so this simplifies how to deal with this. Summary: MMC host: - sunxi: Correct time phase settings - omap_hsmmc: Clean up some dead code - dw_mmc: Fix message printed for deprecated num-slots DT binding - dw_mmc: Fix DT documentation" * tag 'mmc-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: Documentation: dw-mshc: deprecate num-slots mmc: dw_mmc: fix the wrong condition check of getting num-slots from DT mmc: host: omap_hsmmc: remove unused platform callbacks ARM: OMAP2+: hsmmc.c: Remove dead code mmc: sunxi: Keep default timing phase settings for new timing mode commit 1ad0f0a7aa1bf3bd42dcd108a96713d255eacd9f Author: Michael Bringmann Date: Thu Jul 27 16:27:14 2017 -0500 workqueue: Work around edge cases for calc of pool's cpumask There is an underlying assumption/trade-off in many layers of the Linux system that CPU <-> node mapping is static. This is despite the presence of features like NUMA and 'hotplug' that support the dynamic addition/ removal of fundamental system resources like CPUs and memory. PowerPC systems, however, do provide extensive features for the dynamic change of resources available to a system. Currently, there is little or no synchronization protection around the updating of the CPU <-> node mapping, and the export/update of this information for other layers / modules. In systems which can change this mapping during 'hotplug', like PowerPC, the information is changing underneath all layers that might reference it. This patch attempts to ensure that a valid, usable cpumask attribute is used by the workqueue infrastructure when setting up new resource pools. It prevents a crash that has been observed when an 'empty' cpumask is passed along to the worker/task scheduling code. It is intended as a temporary workaround until a more fundamental review and correction of the issue can be done. [With additions to the patch provided by Tejun Hao ] Signed-off-by: Michael Bringmann Signed-off-by: Tejun Heo kernel/workqueue.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 75cb8e939cf30ebdfffd9b28566d8aead95138a8 Author: Javier González Date: Fri Jul 28 15:13:16 2017 +0200 lightnvm: pblk: advance bio according to lba index When a lba either hits the cache or corresponds to an empty entry in the L2P table, we need to advance the bio according to the position in which the lba is located. Otherwise, we will copy data in the wrong page, thus causing data corruption for the application. In case of a cache hit, we assumed that bio->bi_iter.bi_idx would contain the correct index, but this is no necessarily true. Instead, use the local bio advance counter and iterator. This guarantees that lbas hitting the cache are copied into the right bv_page. In case of an empty L2P entry, we omitted to advance the bio. In the cases when the same I/O also contains a cache hit, data corresponding to this lba will be copied to the wrong bv_page. Fix this by advancing the bio as we do in the case of a cache hit. Fixes: a4bd217b4326 lightnvm: physical block device (pblk) target Signed-off-by: Javier González Signed-off-by: Jens Axboe drivers/lightnvm/pblk-rb.c | 4 ++-- drivers/lightnvm/pblk-read.c | 23 ++++++++++++++++------- drivers/lightnvm/pblk.h | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) commit 253fd51e2f533552ae35a0c661705da6c4842c1b Author: Alistair Popple Date: Wed Jul 26 15:26:40 2017 +1000 powerpc/powernv/pci: Return failure for some uses of dma_set_mask() Commit 8e3f1b1d8255 ("powerpc/powernv/pci: Enable 64-bit devices to access >4GB DMA space") introduced the ability for PCI device drivers to request a DMA mask between 64 and 32 bits and actually get a mask greater than 32-bits. However currently if certain machine configuration dependent conditions are not meet the code silently falls back to a 32-bit mask. This makes it hard for device drivers to detect which mask they actually got. Instead we should return an error when the request could not be fulfilled which allows drivers to either fallback or implement other workarounds as documented in DMA-API-HOWTO.txt. Signed-off-by: Alistair Popple Acked-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6512dd4dcf640412637ece8a412e83c3a0046d2f Author: Harsha Priya N Date: Thu Jul 27 17:41:26 2017 -0700 ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform This patch fixes the pop noise in dmic recording using rt5514 on kabylake platform. This patch enables the rt5514 to use MCLK instead of BLCK as the sysclock which fixes the pop noise. Signed-off-by: Harsha Priya Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 349d63c33a34e39b205cf116d2406e096a029f8b Author: Harsha Priya N Date: Thu Jul 27 17:41:25 2017 -0700 ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform This patch fixes the cracking noise in rt5663 headphones for kabylake platform by calling rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER to set ASRC. The ASRC function is for asynchronous MCLK and LRCK. For RT5663 ASRC should be enabled to support special i2s clock format like Intel's 100fs. ASRC function will track i2s clock and generate a corresponding system clock for codec. Calling this function helps select the clock source for both RT5663_AD_STEREO_FILTER and RT5663_DA_STEREO_FILTER filters which fixes the crackling sound. Signed-off-by: Harsha Priya Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 65c5ec11c25eff6ba6e9b1cbfff014875fddd1e0 Author: Michael Ellerman Date: Wed Jul 26 23:19:04 2017 +1000 powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler Historically the boot wrapper was always built 32-bit big endian, even for 64-bit kernels. That was because old firmwares didn't necessarily support booting a 64-bit image. Because of that arch/powerpc/boot/Makefile uses CROSS32CC for compilation. However when we added 64-bit little endian support, we also added support for building the boot wrapper 64-bit. However we kept using CROSS32CC, because in most cases it is just CC and everything works. However if the user doesn't specify CROSS32_COMPILE (which no one ever does AFAIK), and CC is *not* biarch (32/64-bit capable), then CROSS32CC becomes just "gcc". On native systems that is probably OK, but if we're cross building it definitely isn't, leading to eg: gcc ... -m64 -mlittle-endian -mabi=elfv2 ... arch/powerpc/boot/cpm-serial.c gcc: error: unrecognized argument in option ‘-mabi=elfv2’ gcc: error: unrecognized command line option ‘-mlittle-endian’ make: *** [zImage] Error 2 To fix it, stop using CROSS32CC, because we may or may not be building 32-bit. Instead setup a BOOTCC, which defaults to CC, and only use CROSS32_COMPILE if it's set and we're building for 32-bit. Fixes: 147c05168fc8 ("powerpc/boot: Add support for 64bit little endian wrapper") Signed-off-by: Michael Ellerman Reviewed-by: Cyril Bur arch/powerpc/boot/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 7b7622bb95eb587cbaa79608e47b832a82a262b1 Author: Michael Ellerman Date: Thu Jul 27 23:23:37 2017 +1000 powerpc/smp: Call smp_ops->setup_cpu() directly on the boot CPU In smp_cpus_done() we need to call smp_ops->setup_cpu() for the boot CPU, which means it has to run *on* the boot CPU. In the past we ensured it ran on the boot CPU by changing the CPU affinity mask of current directly. That was removed in commit 6d11b87d55eb ("powerpc/smp: Replace open coded task affinity logic"), and replaced with a work queue call. Unfortunately using a work queue leads to a lockdep warning, now that the CPU hotplug lock is a regular semaphore: ====================================================== WARNING: possible circular locking dependency detected ... kworker/0:1/971 is trying to acquire lock: (cpu_hotplug_lock.rw_sem){++++++}, at: [] apply_workqueue_attrs+0x34/0xa0 but task is already holding lock: ((&wfc.work)){+.+.+.}, at: [] process_one_work+0x25c/0x800 ... CPU0 CPU1 ---- ---- lock((&wfc.work)); lock(cpu_hotplug_lock.rw_sem); lock((&wfc.work)); lock(cpu_hotplug_lock.rw_sem); Although the deadlock can't happen in practice, because smp_cpus_done() only runs in early boot before CPU hotplug is allowed, lockdep can't tell that. Luckily in commit 8fb12156b8db ("init: Pin init task to the boot CPU, initially") tglx changed the generic code to pin init to the boot CPU to begin with. The unpinning of init from the boot CPU happens in sched_init_smp(), which is called after smp_cpus_done(). So smp_cpus_done() is always called on the boot CPU, which means we don't need the work queue call at all - and the lockdep warning goes away. Signed-off-by: Michael Ellerman Reviewed-by: Thomas Gleixner arch/powerpc/kernel/smp.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 92bbd16e500c85bc210ba48caecbfbdb721bb5b4 Author: Will Deacon Date: Mon Jul 24 11:46:09 2017 +0100 arm64: mmu: Place guard page after mapping of kernel image The vast majority of virtual allocations in the vmalloc region are followed by a guard page, which can help to avoid overruning on vma into another, which may map a read-sensitive device. This patch adds a guard page to the end of the kernel image mapping (i.e. following the data/bss segments). Cc: Mark Rutland Reviewed-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 20c6c189045539d29f4854d92b7ea9c329e1edfc Author: Matthias Kaehlcke Date: Tue Jul 25 14:50:53 2017 -0700 x86/boot: Disable the address-of-packed-member compiler warning The clang warning 'address-of-packed-member' is disabled for the general kernel code, also disable it for the x86 boot code. This suppresses a bunch of warnings like this when building with clang: ./arch/x86/include/asm/processor.h:535:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer value [-Waddress-of-packed-member] return this_cpu_read_stable(cpu_tss.x86_tss.sp0); ^~~~~~~~~~~~~~~~~~~ ./arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable' #define this_cpu_read_stable(var) percpu_stable_op("mov", var) ^~~ ./arch/x86/include/asm/percpu.h:228:16: note: expanded from macro 'percpu_stable_op' : "p" (&(var))); ^~~ Signed-off-by: Matthias Kaehlcke Cc: Doug Anderson Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170725215053.135586-1-mka@chromium.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/Makefile | 1 + 1 file changed, 1 insertion(+) commit cd63f3cf1d59b7ad8419eba1cac8f9126e79cc43 Author: Gustavo Romero Date: Wed Jul 19 01:44:13 2017 -0400 powerpc/tm: Fix saving of TM SPRs in core dump Currently flush_tmregs_to_thread() does not save the TM SPRs (TFHAR, TFIAR, TEXASR) to the thread struct, unless the process is currently inside a suspended transaction. If the process is core dumping, and the TM SPRs have changed since the last time the process was context switched, then we will save stale values of the TM SPRs to the core dump. Fix it by saving the live register state to the thread struct in that case. Fixes: 08e1c01d6aed ("powerpc/ptrace: Enable support for TM SPR state") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Gustavo Romero Reviewed-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/ptrace.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit c9c98bc5cc2ab4e0d5c9ad58286fa7e1670dfded Author: Oliver O'Halloran Date: Fri Jul 28 01:35:53 2017 +1000 powerpc/mm: Fix pmd/pte_devmap() on non-leaf entries The Radix MMU translation tree as defined in ISA v3.0 contains two different types of entry, directories and leaves. Leaves are identified by _PAGE_PTE being set. The formats of the two entries are different, with the directory entries containing no spare bits for use by software. In particular the bit we use for _PAGE_DEVMAP is not reserved for software, and is part of the NLB (Next Level Base) field, essentially the address of the next level in the tree. Note that the Linux pte_t is not == _PAGE_PTE. A huge page pmd entry (or devmap!) is also a leaf and so has _PAGE_PTE set, even though we use a pmd_t for it in Linux. The fix is to ensure that the pmd/pte_devmap() confirm they are looking at a leaf entry (_PAGE_PTE) as well as checking _PAGE_DEVMAP. Fixes: ebd31197931d ("powerpc/mm: Add devmap support for ppc64") Signed-off-by: Oliver O'Halloran Tested-by: Laurent Vivier Tested-by: Jose Ricardo Ziviani Reviewed-by: Suraj Jitindar Singh Reviewed-by: Aneesh Kumar K.V [mpe: Add a comment in the code and flesh out change log] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 3ac8093cf5f7203140a3d8c28785d0d0dd89cd7c Author: Georgi Djakov Date: Wed Jul 19 15:55:13 2017 +0300 arm64: defconfig: enable missing HWSPINLOCK The hardware spinlock drivers now depend on HWSPINLOCK (instead of selecting it), so we need to explicitly enable it after commit 35fc8a07d7f9 ("Make HWSPINLOCK a menuconfig to ease disabling") Without HWSPINLOCK, various drivers are left with unsatisfied dependencies and Qcom boards using shared memory based communication to request regulators are failing to boot and mount rootfs. Fix this by explicitly enabling HWSPINLOCK in defconfig. Signed-off-by: Georgi Djakov Signed-off-by: Andy Gross arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit d630213f2a47933e1037909273a20023ba3e598d Author: Lucas Stach Date: Mon Jul 10 14:41:25 2017 +0200 drm/bridge: tc358767: fix probe without attached output node The output node of the TC358767 is only used if another bridge is chained behind it. Panels attached to the TC358767 can be detected using the usual DP AUX probing. This restores the old behavior of ignoring the output if no endpoint is found. Fixes: ebc944613567 (drm: convert drivers to use drm_of_find_panel_or_bridge) CC: stable@vger.kernel.org Acked-by: Andrey Gusakov Signed-off-by: Lucas Stach Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20170710124125.9019-1-l.stach@pengutronix.de drivers/gpu/drm/bridge/tc358767.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b5477d9dabd96ded4c5ef7a5f08b00188fc1dec Merge: 0ce2f38 2080658 Author: Linus Torvalds Date: Thu Jul 27 19:54:53 2017 -0700 Merge tag 'drm-fixes-for-v4.13-rc3' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "These iare the fixes for 4.13-rc3: vmwgfx, exynos, i915, amdgpu, nouveau, host1x and displayport fixes. As expected people woke up this week, i915 didn't do an -rc2 pull so got a bumper -rc3 pull, and Ben resurfaced on nouveau and fixed a bunch of major crashers seen on Fedora 26, and there are a few vmwgfx fixes as well. Otherwise exynos had some regression fixes/cleanups, and amdgpu has an rcu locking regression fix and a couple of minor fixes" * tag 'drm-fixes-for-v4.13-rc3' of git://people.freedesktop.org/~airlied/linux: (44 commits) drm/i915: Fix bad comparison in skl_compute_plane_wm. drm/i915: Force CPU synchronisation even if userspace requests ASYNC drm/i915: Only skip updating execobject.offset after error drm/i915: Only mark the execobject as pinned on success drm/i915: Remove assertion from raw __i915_vma_unpin() drm/i915/cnl: Fix loadgen select programming on ddi vswing sequence drm/i915: Fix scaler init during CRTC HW state readout drm/i915/selftests: Fix an error handling path in 'mock_gem_device()' drm/i915: Unbreak gpu reset vs. modeset locking gpu: host1x: Free the IOMMU domain when there is no device to attach drm/i915: Fix cursor updates on some platforms drm/i915: Fix user ptr check size in eb_relocate_vma() drm: exynos: mark pm functions as __maybe_unused drm/exynos: select CEC_CORE if CEC_NOTIFIER drm/exynos/hdmi: fix disable sequence drm/exynos: mic: add a bridge at probe drm/exynos/dsi: Remove error handling for bridge_node DT parsing drm/exynos: dsi: do not try to find bridge drm: exynos: hdmi: make of_device_ids const. drm: exynos: constify mixer_match_types and *_mxr_drv_data. ... commit 20806588f015921ef0704de36a4750f828f399ea Merge: d5bcd11 7e17510 Author: Dave Airlie Date: Fri Jul 28 12:32:59 2017 +1000 Merge tag 'exynos-drm-fixes-for-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Summary: - fix probing fail issue of dsi driver without bridge device. - fix disable sequence of hdmi driver. - trivial cleanups. * tag 'exynos-drm-fixes-for-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm: exynos: mark pm functions as __maybe_unused drm/exynos: select CEC_CORE if CEC_NOTIFIER drm/exynos/hdmi: fix disable sequence drm/exynos: mic: add a bridge at probe drm/exynos/dsi: Remove error handling for bridge_node DT parsing drm/exynos: dsi: do not try to find bridge drm: exynos: hdmi: make of_device_ids const. drm: exynos: constify mixer_match_types and *_mxr_drv_data. exynos_drm: Clean up duplicated assignment in exynos_drm_driver commit 245db3c349e0b413e0fec8d6179f6b767649ad63 Author: Arnd Bergmann Date: Wed Jul 26 17:14:00 2017 +0200 phy: bcm-ns-usb3: fix MDIO_BUS dependency The driver attempts to 'select MDIO_DEVICE', but the code is actually a loadable module when PHYLIB=m: drivers/phy/broadcom/phy-bcm-ns-usb3.o: In function `bcm_ns_usb3_mdiodev_phy_write': phy-bcm-ns-usb3.c:(.text.bcm_ns_usb3_mdiodev_phy_write+0x28): undefined reference to `mdiobus_write' drivers/phy/broadcom/phy-bcm-ns-usb3.o: In function `bcm_ns_usb3_module_exit': phy-bcm-ns-usb3.c:(.exit.text+0x18): undefined reference to `mdio_driver_unregister' drivers/phy/broadcom/phy-bcm-ns-usb3.o: In function `bcm_ns_usb3_module_init': phy-bcm-ns-usb3.c:(.init.text+0x18): undefined reference to `mdio_driver_register' phy-bcm-ns-usb3.c:(.init.text+0x38): undefined reference to `mdio_driver_unregister' Using 'depends on MDIO_BUS' instead will avoid the link error. Fixes: af850e14a7ae ("phy: bcm-ns-usb3: add MDIO driver using proper bus layer") Signed-off-by: Arnd Bergmann Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/phy/broadcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c3464a8c31829e6e7efbf8258dc062f761509d7 Author: Arnd Bergmann Date: Wed Jul 26 17:13:59 2017 +0200 net: phy: rework Kconfig settings for MDIO_BUS I still see build errors in randconfig builds and have had this patch for a while to locally work around it: drivers/built-in.o: In function `xgene_mdio_probe': mux-core.c:(.text+0x352154): undefined reference to `of_mdiobus_register' mux-core.c:(.text+0x352168): undefined reference to `mdiobus_free' mux-core.c:(.text+0x3521c0): undefined reference to `mdiobus_alloc_size' The idea is that CONFIG_MDIO_BUS now reflects whether the mdio_bus code is built-in or a module, and other drivers that use the core code can simply depend on that, instead of having a complex dependency line. Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") Signed-off-by: Arnd Bergmann Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit d5bcd1113ba52e1697da804c7eff1af9deea662f Merge: 2213b66 5fe220a Author: Dave Airlie Date: Fri Jul 28 10:19:08 2017 +1000 Merge tag 'drm-intel-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes i915 fixes for -rc3 Bit more than usual since we missed -rc2. 4x cc: stable, 2 gvt patches, but all fairly minor stuff. Last minute rebase was to add a few missing cc: stable, I did prep the pull this morning already and made sure CI approves. * tag 'drm-intel-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Fix bad comparison in skl_compute_plane_wm. drm/i915: Force CPU synchronisation even if userspace requests ASYNC drm/i915: Only skip updating execobject.offset after error drm/i915: Only mark the execobject as pinned on success drm/i915: Remove assertion from raw __i915_vma_unpin() drm/i915/cnl: Fix loadgen select programming on ddi vswing sequence drm/i915: Fix scaler init during CRTC HW state readout drm/i915/selftests: Fix an error handling path in 'mock_gem_device()' drm/i915: Unbreak gpu reset vs. modeset locking drm/i915: Fix cursor updates on some platforms drm/i915: Fix user ptr check size in eb_relocate_vma() drm/i915/gvt: Extend KBL platform support in GVT-g drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse commit 2213b666c9abf9b753c43f78c7130be2d662b44f Merge: 517069f fea2099 Author: Dave Airlie Date: Fri Jul 28 10:14:08 2017 +1000 Merge tag 'drm-misc-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Core Changes: - dp: A few fixes in drm_dp_downstream_debug() (Chris) - rockchip: sanitize the Kconfig dependencies (fallout from EXTCON) (Arnd) - host1x: Free the iommu domain when attach_device fails (Paul) Cc: Chris Wilson Cc: Arnd Bergmann Cc: Paul Kocialkowski * tag 'drm-misc-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-misc: gpu: host1x: Free the IOMMU domain when there is no device to attach drm/rockchip: fix Kconfig dependencies drm/dp: Don't trust drm_dp_downstream_id() drm/dp: Fix read pointer for drm_dp_downsteam_debug() commit 0ce2f385119344dc620ec635e355008a9d6f8401 Merge: 36cb531 f6248dd Author: Linus Torvalds Date: Thu Jul 27 15:30:08 2017 -0700 Merge tag 'acpi-4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These are two fixups for the suspend-to-idle handling in the ACPI subsystem after recent changes in that area and two simple fixes of the ACPI NUMA code. Specifics: - Add an ACPI module parameter to allow users to override the new default behavior on some systems where the EC GPE is not disabled during suspend-to-idle in case the EC on their systems generates excessive wakeup events and they want to sacrifice some functionality (like power button wakeups) for extra battery life while suspended (Rafael Wysocki). - Fix flushing of the outstanding EC work in the ACPI core suspend-to-idle code (Rafael Wysocki). - Add a missing include and fix a messed-up comment in the ACPI NUMA code (Ross Zwisler)" * tag 'acpi-4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: NUMA: Fix typo in the full name of SRAT ACPI: NUMA: add missing include in acpi_numa.h ACPI / PM / EC: Flush all EC work in acpi_freeze_sync() ACPI / EC: Add parameter to force disable the GPE on suspend commit c3bf5bb521907e7b5a574ae7a2734df3acb11c2f Author: Johan Hovold Date: Mon Jul 24 11:53:56 2017 +0200 PM / runtime: Document new pm_runtime_set_suspended() constraint Since commit a8636c89648a (PM / Runtime: Don't allow to suspend a device with an active child) it is no longer permitted to set RPM_SUSPENDED state for a device with active children unless power.ignore_children is set. Update the documentation to reflect this. Signed-off-by: Johan Hovold Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki Documentation/power/runtime_pm.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c2e3af11a979688bc9b9229867688e89e343a465 Author: Rafael J. Wysocki Date: Thu Jul 27 02:05:56 2017 +0200 cpufreq: docs: Add missing cpuinfo_cur_freq description Add a description of the cpuinfo_cur_freq policy attribute in sysfs to the cpufreq documentation under Documentation/admin-guide/pm/ as it is missing after commit 2a0e49279850 (cpufreq: User/admin documentation update and consolidation) that overlooked it. Fixes: 2a0e49279850 (cpufreq: User/admin documentation update and consolidation) Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Documentation/admin-guide/pm/cpufreq.rst | 8 ++++++++ 1 file changed, 8 insertions(+) commit 22baebd489c78cf7d02030bf50b0c99e4fcb6748 Author: Rafael J. Wysocki Date: Wed Jul 26 00:42:54 2017 +0200 cpufreq: intel_pstate: Drop ->get from intel_pstate structure The ->get callback in the intel_pstate structure was mostly there for the scaling_cur_freq sysfs attribute to work, but after commit f8475cef9008 (x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF) that attribute uses arch_freq_get_on_cpu() provided by the x86 arch code on all processors supported by intel_pstate, so it doesn't need the ->get callback from the driver any more. Moreover, the very presence of the ->get callback in the intel_pstate structure causes the cpuinfo_cur_freq attribute to be present when intel_pstate operates in the active mode, which is bogus, because the role of that attribute is to return the current CPU frequency as seen by the hardware. For intel_pstate, though, this is just an average frequency and not really current, but computed for the previous sampling interval (the actual current frequency may be way different at the point this value is obtained by reading from cpuinfo_cur_freq), and after commit 82b4e03e01bc (intel_pstate: skip scheduler hook when in "performance" mode) the value in cpuinfo_cur_freq may be stale or just 0, depending on the driver's operation mode. In fact, however, on the hardware supported by intel_pstate there is no way to read the current CPU frequency from it, so the cpuinfo_cur_freq attribute should not be present at all when this driver is in use. For this reason, drop intel_pstate_get() and clear the ->get callback pointer pointing to it, so that the cpuinfo_cur_freq is not present for intel_pstate in the active mode any more. Fixes: 82b4e03e01bc (intel_pstate: skip scheduler hook when in "performance" mode) Reported-by: Huaisheng Ye Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/intel_pstate.c | 8 -------- 1 file changed, 8 deletions(-) commit f6248dd88dba3aeb19351410a027d92eee7ceb72 Merge: 880a662 02cb489 Author: Rafael J. Wysocki Date: Thu Jul 27 23:14:08 2017 +0200 Merge branches 'acpi-pm' and 'acpi-numa' * acpi-pm: ACPI / PM / EC: Flush all EC work in acpi_freeze_sync() ACPI / EC: Add parameter to force disable the GPE on suspend * acpi-numa: ACPI: NUMA: Fix typo in the full name of SRAT ACPI: NUMA: add missing include in acpi_numa.h commit 1d20d8a9fce8f1e2ef00a0f3d068fa18d59ddf8f Author: Arnd Bergmann Date: Wed Mar 19 18:41:37 2014 +0100 ARM: pxa: select both FB and FB_W100 for eseries We get a link error trying to access the w100fb_gpio_read/write functions from the platform when the driver is a loadable module or not built-in, so the platform already uses 'select' to hard-enable the driver. However, that fails if the framebuffer subsystem is disabled altogether. I've considered various ways to fix this properly, but they all seem like too much work or too risky, so this simply adds another 'select' to force the subsystem on as well. Fixes: 82427de2c7c3 ("ARM: pxa: PXA_ESERIES depends on FB_W100.") Signed-off-by: Arnd Bergmann arch/arm/mach-pxa/Kconfig | 1 + 1 file changed, 1 insertion(+) commit c4caa8db4c90a6d0e2258e34a203961e07903c05 Author: Arnd Bergmann Date: Fri Jun 10 10:51:04 2016 +0200 ARM: ixp4xx: fix ioport_unmap definition An empty macro definition can cause unexpected behavior, in case of the ixp4xx ioport_unmap, we get two warnings: drivers/net/wireless/marvell/libertas/if_cs.c: In function 'if_cs_release': drivers/net/wireless/marvell/libertas/if_cs.c:826:3: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] ioport_unmap(card->iobase); drivers/vfio/pci/vfio_pci_rdwr.c: In function 'vfio_pci_vga_rw': drivers/vfio/pci/vfio_pci_rdwr.c:230:15: error: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Werror=parentheses] is_ioport ? ioport_unmap(iomem) : iounmap(iomem); This uses an inline function to define the macro in a safer way. Signed-off-by: Arnd Bergmann Acked-by: Krzysztof Halasa arch/arm/mach-ixp4xx/include/mach/io.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit cd5bad4135e8e72144a19429d359c36fd4172a88 Author: Arnd Bergmann Date: Wed Mar 26 00:17:09 2014 +0100 ARM: ep93xx: use ARM_PATCH_PHYS_VIRT correctly Just like ARCH_MULTIPLATFORM, we want to use ARM_PATCH_PHYS_VIRT when possible, but that fails for NOMMU or XIP_KERNEL configurations. Using 'imply' instead of 'select' gets this right and only uses the symbol when we don't have to hardcode the address anyway. Signed-off-by: Arnd Bergmann Acked-by: Alexander Sverdlin arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c1953f351263bdc0857326bde7ff95a43700b6c Author: Arnd Bergmann Date: Fri Jan 15 13:04:01 2016 +0100 ARM: mmp: mark usb_dma_mask as __maybe_unused This variable may be used by some devices that each have their on Kconfig symbol, or by none of them, and that causes a build warning: arch/arm/mach-mmp/devices.c:241:12: error: 'usb_dma_mask' defined but not used [-Werror=unused-variable] Marking it __maybe_unused avoids the warning. Signed-off-by: Arnd Bergmann arch/arm/mach-mmp/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 293ea3d0ab9970c7f3d8163793d3407e5a86497a Author: Arnd Bergmann Date: Thu Jan 14 16:57:33 2016 +0100 ARM: omap2: mark unused functions as __maybe_unused The omap_generic_init() and omap_hwmod_init_postsetup() functions are used in the initialization for all OMAP2+ SoC types, but in the extreme case that those are all disabled, we get a warning about unused code: arch/arm/mach-omap2/io.c:412:123: error: 'omap_hwmod_init_postsetup' defined but not used [-Werror=unused-function] arch/arm/mach-omap2/board-generic.c:30:123: error: 'omap_generic_init' defined but not used [-Werror=unused-function] This annotates both as __maybe_unused to shut up that warning. Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren Reviewed-by: Sebastian Reichel arch/arm/mach-omap2/board-generic.c | 2 +- arch/arm/mach-omap2/io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d1c888878cb19229653aecfbbfd928300ba2805b Author: Arnd Bergmann Date: Tue Dec 29 17:09:18 2015 +0100 ARM: omap1: avoid unused variable warning The osk_mistral_init() contains code that is only compiled when CONFIG_PM is set, but it uses a variable that is declared outside of the #ifdef: arch/arm/mach-omap1/board-osk.c: In function 'osk_mistral_init': arch/arm/mach-omap1/board-osk.c:513:7: warning: unused variable 'ret' [-Wunused-variable] This removes the #ifdef around the user of the variable, make it always used. Signed-off-by: Arnd Bergmann Suggested-by: Tony Lindgren Acked-by: Aaro Koskinen arch/arm/mach-omap1/board-osk.c | 4 ---- 1 file changed, 4 deletions(-) commit c1ae3f7c4b7c4ae0c83014969c99e8108e268e16 Author: Arnd Bergmann Date: Tue Dec 29 14:40:00 2015 +0100 ARM: sirf: mark sirfsoc_init_late as __maybe_unused sirfsoc_init_late is called by each of the three individual SoC definitions, but in a randconfig build, we can encounter a situation where they are all disabled: arch/arm/mach-prima2/common.c:18:123: warning: 'sirfsoc_init_late' defined but not used [-Wunused-function] While that is not a useful configuration, the warning also doesn't help, so this patch marks the function as __maybe_unused to let the compiler know it is there intentionally. Signed-off-by: Arnd Bergmann arch/arm/mach-prima2/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f3b4d8fcc28d68bc4b01bec0b886f31c4ea3efb Author: Arnd Bergmann Date: Fri Jan 15 13:32:43 2016 +0100 ARM: ixp4xx: use normal prototype for {read,write}s{b,w,l} ixp4xx defines the arguments to its __indirect_writesb() and other functions as pointers to fixed-size data. This is not necessarily wrong, and it works most of the time, but it causes warnings in at least one driver: drivers/net/ethernet/smsc/smc91x.c: In function 'smc_rcv': drivers/net/ethernet/smsc/smc91x.c:495:21: error: passing argument 2 of '__indirect_readsw' from incompatible pointer type [-Werror=incompatible-pointer-types] SMC_PULL_DATA(lp, data, packet_len - 4); All other definitions of the same functions pass void pointers, so doing the same here avoids the warnings. Signed-off-by: Arnd Bergmann Acked-by: Krzysztof Halasa arch/arm/mach-ixp4xx/include/mach/io.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 595a9f9a570f0372228f1f0cca95583043e54a4b Author: Arnd Bergmann Date: Fri Jan 15 14:41:03 2016 +0100 ARM: omap1/ams-delta: warn about failed regulator enable The modem pm handler in the ams-delta board uses regulator_enable() but does not check for a successful return code: board-ams-delta.c:521:3: error: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Werror=unused-result] It is not easy to propagate that return code to the callers in uart_configure_port/uart_suspend_port/uart_resume_port, unless we change all UART drivers, and it is unclear what those would do with the return code. Instead, this patch uses a runtime warning to replace the compiletime warning. I have checked that the regulator in question is hardcoded to a fixed-voltage GPIO regulator, and that should never fail to get enabled if I understand the code right. Acked-by: Tony Lindgren Acked-by: Aaro Koskinen Link: https://patchwork.kernel.org/patch/8391981/ Signed-off-by: Arnd Bergmann arch/arm/mach-omap1/board-ams-delta.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 47589c4af939bcc01da5d9a803fe0413c72a31c2 Author: Arnd Bergmann Date: Sun Jan 17 00:37:36 2016 +0100 ARM: rpc: rename RAM_SIZE macro The RAM_SIZE macro in mach/hardware.h conflicts with macros of the same name in multiple drivers, leading to annoying build warnings: In file included from drivers/net/ethernet/cirrus/cs89x0.c:79:0: drivers/net/ethernet/cirrus/cs89x0.h:324:0: error: "RAM_SIZE" redefined [-Werror] #define RAM_SIZE 0x1000 /* The card has 4k bytes or RAM */ ^ In file included from /git/arm-soc/arch/arm/mach-rpc/include/mach/io.h:16:0, from /git/arm-soc/arch/arm/include/asm/io.h:194, from /git/arm-soc/include/linux/scatterlist.h:8, from /git/arm-soc/include/linux/dmaengine.h:24, from /git/arm-soc/include/linux/netdevice.h:38, from /git/arm-soc/drivers/net/ethernet/cirrus/cs89x0.c:54: arch/arm/mach-rpc/include/mach/hardware.h:28:0: note: this is the location of the previous definition #define RAM_SIZE 0x10000000 We don't use RAM_SIZE/RAM_START at all, so we could just remove them, but it might be nice to leave them for documentation purposes, so this renames them to RPC_RAM_SIZE/RPC_RAM_START in order to avoid the build warnings Signed-off-by: Arnd Bergmann arch/arm/mach-rpc/include/mach/hardware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd7fefe1f06ca6cc2d1503def95bf53e2549a44b Author: Arnd Bergmann Date: Tue Jan 28 21:17:41 2014 +0100 ARM: w90x900: normalize clk API w90x900 still provides its own variant of the clk API rather than using the generic COMMON_CLK API. This generally works, but it causes some link errors with drivers using the clk_set_rate, clk_get_parent, clk_set_parent or clk_round_rate functions when a platform lacks those interfaces. This adds empty stub implementations for each of them, and I don't even try to do something useful here but instead just print a WARN() message to make it obvious what is going on if they ever end up being called. The drivers that call these won't be used on these platforms (otherwise we'd get a link error today), so the added code is harmless bloat and will warn about accidental use. A while ago there was a proposal to change w90x900 to use the common-clk implementation, which would be the way it should be handled properly. Signed-off-by: Arnd Bergmann arch/arm/mach-w90x900/clock.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit ef8aa4e0a0df2470148203725acd8b6e75acdc0b Author: Alexander Sverdlin Date: Sun Nov 22 15:24:28 2015 +0100 ARM: ep93xx: normalize clk API It's a combination of the patch from Arnd Bergmann, which added empty stubs for clk_round_rate() and clk_set_parent() and a working trivial implementation of clk_get_parent(). The later is required for ADC driver. Signed-off-by: Alexander Sverdlin Signed-off-by: Arnd Bergmann arch/arm/mach-ep93xx/clock.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 5fe220a160e5422cebc076393c6bfd6d920243fd Merge: e9ba403 26a201a Author: Daniel Vetter Date: Thu Jul 27 22:07:52 2017 +0200 Merge tag 'gvt-fixes-2017-07-26' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-07-26 - Turn on KBL support for more SKUs (Jianjun) - Fix vblank timer close bug (Fred) Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170726075621.hrauvik62gi2jecj@zhen-hp.sh.intel.com commit e9ba4032a2568ef5b360de95eb6e09195a1b2efd Author: Maarten Lankhorst Date: Mon Jul 17 13:13:55 2017 +0200 drm/i915: Fix bad comparison in skl_compute_plane_wm. ddb_allocation && ddb_allocation / blocks_per_line >= 1 is the same as ddb_allocation >= blocks_per_line, so use the latter to simplify this. This fixes the following compiler warning: drivers/gpu/drm/i915/intel_pm.c:4467]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. Signed-off-by: Maarten Lankhorst Fixes: d555cb5827d6 ("drm/i915/skl+: use linetime latency if ddb size is not available") Cc: "Mahesh Kumar" Reported-by: David Binderman Cc: David Binderman Cc: # v4.13-rc1+ Reviewed-by: Mahesh Kumar (cherry picked from commit 54d20ed1fff23c7d2633f01fc788111bf9c51c5d) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170717111355.4523-1-maarten.lankhorst@linux.intel.com Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b98da66174416a1c7ada93e1eb382e8a4424f87 Author: Chris Wilson Date: Fri Jul 21 15:50:37 2017 +0100 drm/i915: Force CPU synchronisation even if userspace requests ASYNC The goal here was to minimise doing any thing or any check inside the kernel that was not strictly required. For a userspace that assumes complete control over the cache domains, the kernel is usually using outdated information and may trigger clflushes where none were required. However, swapping is a situation where userspace has no knowledge of the domain transfer, and will leave the object in the CPU cache. The kernel must flush this out to the backing storage prior to use with the GPU. As we use an asynchronous task tracked by an implicit fence for this, we also need to cancel the ASYNC flag on the object so that the object will wait for the clflush to complete before being executed. This also absolves userspace of the responsibility imposed by commit 77ae9957897d ("drm/i915: Enable userspace to opt-out of implicit fencing") that its needed to ensure that the object was out of the CPU cache prior to use on the GPU. Fixes: 77ae9957897d ("drm/i915: Enable userspace to opt-out of implicit fencing") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101571 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Jason Ekstrand Reviewed-by: Jason Ekstrand Link: https://patchwork.freedesktop.org/patch/msgid/20170721145037.25105-5-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter (cherry picked from commit 0f46daa1a273779a0b73d768a788ca3f04238f9c) Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_clflush.c | 7 ++++--- drivers/gpu/drm/i915/i915_gem_clflush.h | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 ++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) commit adf27835a583470707debc55554b638dd85cb8a9 Author: Chris Wilson Date: Fri Jul 21 15:50:36 2017 +0100 drm/i915: Only skip updating execobject.offset after error I was being overly paranoid in not updating the execobject.offset after performing the fallback copy where we set reloc.presumed_offset to -1. The thinking was to ensure that a subsequent NORELOC execbuf would be forced to process the invalid relocations. However this is overkill so long as we *only* update the execobject.offset following a successful update of the relocation value witin the batch. If we have to repeat the execbuf due to a later interruption, then we may skip the relocations on the second pass (honouring NORELOC) since the execobject.offset match the actual offsets (even though reloc.presumed_offset is garbage). Subsequent calls to execbuf with NORELOC should themselves ensure that the reloc.presumed_offset have been corrected in case of future migration. Reporting back the actual execobject.offset, even when reloc.presumed_offset is garbage, ensures that reuse of those objects use the latest information to avoid relocations. Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101635 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170721145037.25105-4-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter (cherry picked from commit 1f727d9e725a408ef58d159c20fb2e51818ff153) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bed8d1c840f0b3ddefc5c27a983a1d587cf873e9 Author: Chris Wilson Date: Fri Jul 21 15:50:35 2017 +0100 drm/i915: Only mark the execobject as pinned on success If we fail to acquire a fence (for old school fenced GPU access) then we unwind the vma reservation, including its pin. However, we were making the execobject as holding the pin before erring out, leading to a double unpin: [ 3193.991802] kernel BUG at drivers/gpu/drm/i915/i915_vma.h:287! [ 3193.998131] invalid opcode: 0000 [#1] PREEMPT SMP [ 3194.002816] Modules linked in: snd_hda_intel i915 vgem snd_hda_codec_analog snd_hda_codec_generic coretemp snd_hda_codec snd_hwdep snd_hda_core snd_pcm lpc_ich mei_me e1000e mei prime_numbers ptp pps_core [last unloaded: i915] [ 3194.022841] CPU: 0 PID: 8123 Comm: kms_flip Tainted: G U 4.13.0-rc1-CI-CI_DRM_471+ #1 [ 3194.031765] Hardware name: Dell Inc. OptiPlex 755 /0PU052, BIOS A04 11/05/2007 [ 3194.040343] task: ffff8800785d4c40 task.stack: ffffc90001768000 [ 3194.046339] RIP: 0010:eb_release_vmas.isra.6+0x119/0x180 [i915] [ 3194.052234] RSP: 0018:ffffc9000176ba80 EFLAGS: 00010246 [ 3194.057439] RAX: 00000000000003c0 RBX: ffff8800710fc2d8 RCX: ffff8800588e4f48 [ 3194.064546] RDX: ffffffff1fffffff RSI: 00000000ffffffff RDI: ffff8800588e00d0 [ 3194.071654] RBP: ffffc9000176bab0 R08: 0000000000000000 R09: 0000000000000000 [ 3194.078761] R10: 0000000000000040 R11: 0000000000000001 R12: ffff880060822f00 [ 3194.085867] R13: 0000000000000310 R14: 00000000000003b8 R15: ffffc9000176bbb0 [ 3194.092975] FS: 00007fd2b94aba40(0000) GS:ffff88007d200000(0000) knlGS:0000000000000000 [ 3194.101033] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3194.106754] CR2: 00007ffbec3ff000 CR3: 0000000074e67000 CR4: 00000000000006f0 [ 3194.113861] Call Trace: [ 3194.116321] eb_relocate_slow+0x67/0x4e0 [i915] [ 3194.120861] i915_gem_do_execbuffer+0x429/0x1260 [i915] [ 3194.126070] ? lock_acquire+0xb5/0x210 [ 3194.129803] ? __might_fault+0x39/0x90 [ 3194.133563] i915_gem_execbuffer2+0x9b/0x1b0 [i915] [ 3194.138447] ? i915_gem_execbuffer+0x2b0/0x2b0 [i915] [ 3194.143478] drm_ioctl_kernel+0x64/0xb0 [ 3194.147298] drm_ioctl+0x2cd/0x390 [ 3194.150710] ? i915_gem_execbuffer+0x2b0/0x2b0 [i915] [ 3194.155741] ? finish_task_switch+0xa5/0x210 [ 3194.159993] ? finish_task_switch+0x6a/0x210 [ 3194.164247] do_vfs_ioctl+0x90/0x670 [ 3194.167806] ? entry_SYSCALL_64_fastpath+0x5/0xb1 [ 3194.172492] ? __this_cpu_preempt_check+0x13/0x20 [ 3194.177176] ? trace_hardirqs_on_caller+0xe7/0x1c0 [ 3194.181946] SyS_ioctl+0x3c/0x70 [ 3194.185159] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 3194.189756] RIP: 0033:0x7fd2b76a8587 [ 3194.193314] RSP: 002b:00007fff074845b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 3194.200855] RAX: ffffffffffffffda RBX: ffffffff8146da43 RCX: 00007fd2b76a8587 [ 3194.207962] RDX: 00007fff074846e0 RSI: 0000000040406469 RDI: 0000000000000003 [ 3194.215068] RBP: ffffc9000176bf88 R08: 0000000000000000 R09: 0000000000000003 [ 3194.222175] R10: 00007fd2b796bb58 R11: 0000000000000246 R12: 00007fff07484880 [ 3194.229280] R13: 0000000000000003 R14: 0000000040406469 R15: 0000000000000000 [ 3194.236386] ? __this_cpu_preempt_check+0x13/0x20 [ 3194.241070] Code: 24 b0 00 00 00 48 85 c9 0f 84 6c ff ff ff 8b 41 20 85 c0 7e 73 83 e8 01 89 41 20 41 8b 84 24 e8 00 00 00 a8 0f 0f 85 5f ff ff ff <0f> 0b 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d f3 c3 49 8b 84 [ 3194.259943] RIP: eb_release_vmas.isra.6+0x119/0x180 [i915] RSP: ffffc9000176ba80 [ 3194.268047] ---[ end trace 1d7348c6575d8800 ]--- [ 3673.658819] softdog: Initiating panic [ 3673.662471] Kernel panic - not syncing: Software Watchdog Timer expired [ 3673.669066] Kernel Offset: disabled [ 3673.672541] Rebooting in 1 seconds.. Reported-by: Tomi Sarvela Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170721145037.25105-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter (cherry picked from commit 1da7b54c46bcfe5484af0b27d8c9003b238031b0) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a6c00779b2b03f2568c2c697afb1c2cd7f90cac6 Author: Chris Wilson Date: Fri Jul 21 15:50:34 2017 +0100 drm/i915: Remove assertion from raw __i915_vma_unpin() After we detect a i915_vma pin overflow, we call __i915_vma_unpin to cleanup. However, on an overflow the pin_count bitfield will be zero, triggering an assertion, even though we the intention is to merely warn and report the error back to the user (as historically the culprit has be a leak in the display code). Fixes: 20dfbde463c8 ("drm/i915: Wrap vma->pin_count accessors with small inline helpers") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170721145037.25105-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter (cherry picked from commit 67fddd902b8e37b15a905c287ce4e40f52a564af) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_vma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5846a73f26a1efa45e2c2edd36aa2ed0a6ad380a Author: Navare, Manasi D Date: Mon Jul 17 15:05:22 2017 -0700 drm/i915/cnl: Fix loadgen select programming on ddi vswing sequence The condition for setting the Loadgen Select bit of PORT_TX_DW4 register during DDI Vswing Sequence should be Bit rate <=6 GHz whereas the existing code checks only Bit Rate < 6GHz. This patch fixes this condition. While at it also remove the redundant paranthesis. Fixes: cf54ca8bc567 ("drm/i915/cnl: Implement voltage swing sequence.") Cc: Paulo Zanoni Cc: Rodrigo Vivi Signed-off-by: Manasi Navare Reviewed-by: Paulo Zanoni Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/1500329122-32662-1-git-send-email-manasi.d.navare@intel.com Signed-off-by: Daniel Vetter (cherry picked from commit a8e45a1c42d11597e975f3e5f2fe182f90cdaa7f) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 283d6860d64f5091565bf729b0a6d6af14ae6c27 Author: Imre Deak Date: Thu Jul 20 14:28:20 2017 +0300 drm/i915: Fix scaler init during CRTC HW state readout The scaler allocation code depends on a non-zero default value for the crtc scaler_id, so make sure we initialize the scaler state accordingly even if the crtc is off. This fixes at least an initial YUV420 modeset (added in a follow-up patchset by Shashank) when booting with the screen off: after the initial HW readout and modeset which enables the scaler a subsequent modeset will disable the scaler which isn't properly allocated. This results in a funky HW state where the pipe scaler HW registers can't be modified and the normally black screen is grey and shifted to the right or jitters. The problem was revealed by Shashank's YUV420 patchset and first reported by Ville. v2: - In the stable tag also include versions which need backporting (Jani) Cc: Jani Nikula Cc: Shashank Sharma Cc: Ville Syrjälä Cc: Chandra Konduru Cc: Matt Roper Cc: # 4.2.x Reported-by: Ville Syrjälä Fixes: a1b2278e4dfc ("drm/i915: skylake panel fitting using shared scalers") Signed-off-by: Imre Deak Reviewed-by: Mahesh Kumar Link: https://patchwork.freedesktop.org/patch/msgid/20170720112820.26816-1-imre.deak@intel.com Signed-off-by: Daniel Vetter (cherry picked from commit 5fb9dadf336f3590c799e8cbde348215dccc2aa2) Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3d91142528db7d4ea34e3233c261acc48c164b9a Author: Christophe JAILLET Date: Thu Jul 20 00:35:03 2017 +0200 drm/i915/selftests: Fix an error handling path in 'mock_gem_device()' Goto the right label in case of error, otherwise there is a leak. This has been introduced by c5cf9a9147ff. In this patch a goto has not been updated. Fixes: c5cf9a9147ff ("drm/i915: Create a kmem_cache to allocate struct i915_priolist from") Signed-off-by: Christophe JAILLET Link: https://patchwork.freedesktop.org/patch/msgid/20170719223503.30580-1-christophe.jaillet@wanadoo.fr Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson (cherry picked from commit a5ec7fe81a6ec38cb8b8a798d0552cbcadce7aa9) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4706ca779a723913469a47bbdd63ede01681f0c4 Author: Daniel Vetter Date: Wed Jul 19 14:54:55 2017 +0200 drm/i915: Unbreak gpu reset vs. modeset locking Taking the modeset locks unconditionally isn't the greatest idea, because atm that part is still broken and times out (and then atomic keels over). And there's really no reason to do so, the old code didn't do that either. To make the patch a bit simpler let's also nuke 2 cases that are only around for the old mmioflip paths. Atomic nonblocking workers will not die (minus bugs) when a gpu reset happens. And of course this doesn't fix any of the gpu reset vs. modeset deadlock fun, but it at least stop modern CI machines from keeling over all over the place for no reason at all. And we still have the explicit testcases to run the fake gpu reset, so coverage isn't that much worse. v2: Split out additional changes on top, restrict this to purely reducing the critical section of modeset locks. v2: Review from Maarten - update comments - don't oops when state is NULL in intel_finish_reset, but try to at least still drop locks properly. The hw is going to be toast anyway. Fixes: 739748939974 ("drm/i915: Fix modeset handling during gpu reset, v5.") Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Cc: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170719125502.25696-3-daniel.vetter@ffwll.ch (cherry picked from commit ce87ea15ebc60a9f8f156b2549f7b2cf7fe48d04) Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 60 +++++++++++------------------------- 1 file changed, 18 insertions(+), 42 deletions(-) commit 36cb531d867a48ea6942696c68eb8a08df1b1d02 Merge: 8cdaad9 56008c0 Author: Linus Torvalds Date: Thu Jul 27 12:44:05 2017 -0700 Merge branch 'parisc-4.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: - The majority of lines changed are due to regenerated defconfig files. - The support for the Page Deallocation Table (PDT) which was merged in the merge window for 4.13 contained a bug which crashes the kernel if a bad page is reported by firmware. This is now fixed and the kernel messages will show which memory slot holds the broken DIMM. - Commit 3a166fc2d4ef ("kbuild: handle libs-y archives separately from built-in.o archives") broke linking the parisc kernel due to millicode symbols which can't be reached then any longer. This was fixed by modifying the parisc vmlinux.lds linker script. - If the stack checker panics on stack overflow, avoid recursive panics. - Some parisc machines can't physically power off and thus instead start after some time to flood the console by presumably detected soft lockups. Avoid this by disabling the lockup detectors before entering the endless for-next loop. - Dave Anglin provided fixes which prevents TLB speculation on flushed pages on PA8800/PA9000 CPUs. - Arvind Yadav sent a trivial patch to constify the attribute_group structure in our firmware on-board-flash storage driver (pdc_stable.c) * 'parisc-4.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Extend disabled preemption in copy_user_page parisc: Prevent TLB speculation on flushed pages on CPUs that only support equivalent aliases parisc: Suspend lockup detectors before system halt parisc: Show DIMM slot number which holds broken memory module parisc: Add function to return DIMM slot of physical address parisc: Fix crash when calling PDC_PAT_MEM PDT firmware function parisc: regenerate defconfig files parisc: pdc_stable: constify attribute_group structures. parisc: Merge millicode routines via linker script parisc: Disable further stack checks when panic occurs during stack check commit e91b2b1194335ca83d8a40fa4e0efd480bf2babe Author: Juergen Gross Date: Mon Jul 17 19:47:03 2017 +0200 xen: dont fiddle with event channel masking in suspend/resume Instead of fiddling with masking the event channels during suspend and resume handling let do the irq subsystem do its job. It will do the mask and unmask operations as needed. Signed-off-by: Juergen Gross Acked-by: Thomas Gleixner Reviewed-by: Boris Ostrovsky Tested-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/events/events_base.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 039937308e55fba152a40e5d729a43731f56acab Author: Gustavo A. R. Silva Date: Tue Jul 4 13:34:05 2017 -0500 xen: selfballoon: remove unnecessary static in frontswap_selfshrink() Remove unnecessary static on local variables last_frontswap_pages and tgt_frontswap_pages. Such variables are initialized before being used, on every execution path throughout the function. The statics have no benefit and, removing them reduce the code size. This issue was detected using Coccinelle and the following semantic patch: @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; You can see a significant difference in the code size after executing the size command, before and after the code change: before: text data bss dec hex filename 5633 3452 384 9469 24fd drivers/xen/xen-selfballoon.o after: text data bss dec hex filename 5576 3308 256 9140 23b4 drivers/xen/xen-selfballoon.o Signed-off-by: Gustavo A. R. Silva Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross drivers/xen/xen-selfballoon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d02ca074f63ba562cc0786121e92e38c59e6d97f Author: Punit Agrawal Date: Thu Jul 20 12:04:02 2017 +0100 xen: Drop un-informative message during boot On systems that are not booted as a Xen domain, the xenfs driver prints the following message during boot. [ 3.460595] xenfs: not registering filesystem on non-xen platform As the user chose not to boot a Xen domain, this message does not provide useful information. Drop this message. Signed-off-by: Punit Agrawal Cc: Boris Ostrovsky Cc: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/xenfs/super.c | 1 - 1 file changed, 1 deletion(-) commit 8cdaad964740556669aca5894da5d3274d3d449c Merge: 60187bd ba92b11 Author: Linus Torvalds Date: Thu Jul 27 10:44:28 2017 -0700 Merge tag 'sound-4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This is a pretty boring pull request, containing a few HD-audio quirks and ID updates as usual suspects, as well as a fix for a regression of FM801 chip on ia64 (what a legacy combination!)" * tag 'sound-4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Add mute led support for HP ProBook 440 G4 ALSA: hda/realtek - No loopback on ALC225/ALC295 codec ALSA: hda/realtek - Update headset mode for ALC225 ALSA: fm801: Initialize chip after IRQ handler is registered ALSA: hda/realtek - Update headset mode for ALC298 ALSA: hda - Add missing NVIDIA GPU codec IDs to patch table commit 60187bd4fda6091a574e31d5bf7856d1e4f8d172 Merge: da08f35 ce184a0 Author: Linus Torvalds Date: Thu Jul 27 10:35:07 2017 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "Two areas addressed by these fixes: - Fixes from Dave Martin for the signal frames that were broken with certain configurations. No one noticed until recently. - More kexec fixes to ensure that the crashkernel region is correctly allocated, and a fix for the location of the device tree when several kexec kernels are loaded" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8687/1: signal: Fix unparseable iwmmxt_sigframe in uc_regspace[] ARM: 8686/1: iwmmxt: Add missing __user annotations to sigframe accessors ARM: kexec: fix failure to boot crash kernel ARM: kexec: avoid allocating crashkernel region outside lowmem commit 796b755066dd6254bfb6388fec901631e868d1c7 Author: Alex Williamson Date: Thu Jul 27 10:39:33 2017 -0600 vfio/pci: Fix handling of RC integrated endpoint PCIe capability size Root complex integrated endpoints do not have a link and therefore may use a smaller PCIe capability in config space than we expect when building our config map. Add a case for these to avoid reporting an erroneous overlap. Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_config.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 6ba80d4348bd8cce2a0a6bbc21e5e1e760de42a9 Author: NeilBrown Date: Mon Jul 24 13:18:50 2017 +1000 NFS: Optimize fallocate by refreshing mapping when needed. posix_fallocate() will allocate space in an NFS file by considering the last byte of every 4K block. If it is before EOF, it will read the byte and if it is zero, a zero is written out. If it is after EOF, the zero is unconditionally written. For the blocks beyond EOF, if NFS believes its cache is valid, it will expand these writes to write full pages, and then will merge the pages. This results if (typically) 1MB writes. If NFS believes its cache is not valid (particularly if NFS_INO_INVALID_DATA or NFS_INO_REVAL_PAGECACHE are set - see nfs_write_pageuptodate()), it will send the individual 1-byte writes. This results in (typically) 256 times as many RPC requests, and can be substantially slower. Currently nfs_revalidate_mapping() is only used when reading a file or mmapping a file, as these are times when the content needs to be up-to-date. Writes don't generally need the cache to be up-to-date, but writes beyond EOF can benefit, particularly in the posix_fallocate() case. So this patch calls nfs_revalidate_mapping() when writing beyond EOF - i.e. when there is a gap between the end of the file and the start of the write. If the cache is thought to be out of date (as happens after taking a file lock), this will cause a GETATTR, and the two flags mentioned above will be cleared. With this, posix_fallocate() on a newly locked file does not generate excessive tiny writes. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker fs/nfs/file.c | 2 ++ 1 file changed, 2 insertions(+) commit 442ce0499c0535f8972b68fa1fda357357a5c953 Author: NeilBrown Date: Mon Jul 24 13:18:50 2017 +1000 NFS: invalidate file size when taking a lock. Prior to commit ca0daa277aca ("NFS: Cache aggressively when file is open for writing"), NFS would revalidate, or invalidate, the file size when taking a lock. Since that commit it only invalidates the file content. If the file size is changed on the server while wait for the lock, the client will have an incorrect understanding of the file size and could corrupt data. This particularly happens when writing beyond the (supposed) end of file and can be easily be demonstrated with posix_fallocate(). If an application opens an empty file, waits for a write lock, and then calls posix_fallocate(), glibc will determine that the underlying filesystem doesn't support fallocate (assuming version 4.1 or earlier) and will write out a '0' byte at the end of each 4K page in the region being fallocated that is after the end of the file. NFS will (usually) detect that these writes are beyond EOF and will expand them to cover the whole page, and then will merge the pages. Consequently, NFS will write out large blocks of zeroes beyond where it thought EOF was. If EOF had moved, the pre-existing part of the file will be over-written. Locking should have protected against this, but it doesn't. This patch restores the use of nfs_zap_caches() which invalidated the cached attributes. When posix_fallocate() asks for the file size, the request will go to the server and get a correct answer. cc: stable@vger.kernel.org (v4.8+) Fixes: ca0daa277aca ("NFS: Cache aggressively when file is open for writing") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker fs/nfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fea20995976f4b2e8968f852a18e280487d42f0d Author: Paul Kocialkowski Date: Mon Jul 10 21:33:05 2017 +0200 gpu: host1x: Free the IOMMU domain when there is no device to attach When there is no device to attach to the IOMMU domain, as may be the case when the device-tree does not contain the proper iommu node, it is best to keep going without IOMMU support rather than failing. This allows the driver to probe and function instead of taking down all of the tegra drm driver, leading to missing display support. Signed-off-by: Paul Kocialkowski Fixes: 404bfb78daf3 ("gpu: host1x: Add IOMMU support") Reviewed-by: Mikko Perttunen Tested-by: Marcel Ziswiler Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170710193305.5987-1-contact@paulk.fr drivers/gpu/host1x/dev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3f5b4b79d4c0fa71fd7d74c2a44bbc0869c04c9b Author: Shawn Lin Date: Tue Jul 18 16:31:38 2017 +0800 Documentation: dw-mshc: deprecate num-slots dwmmc host driver already deprecate it in the driver but didn't modify the documentation to reflect the fact. This patch deprecates it and clean up num-slots from the examples of all variant host drivers. Signed-off-by: Shawn Lin Acked-by: Jaehoon Chung Acked-by: Rob Herring Fixes: d30a8f7bdf64 ("mmc: dw_mmc: deprecated the "num-slots" property") Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt | 1 - Documentation/devicetree/bindings/mmc/img-dw-mshc.txt | 1 - Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt | 2 -- .../devicetree/bindings/mmc/synopsys-dw-mshc.txt | 16 +++++++--------- Documentation/devicetree/bindings/mmc/zx-dw-mshc.txt | 1 - 5 files changed, 7 insertions(+), 14 deletions(-) commit 5a60f4b6da95b91d17425923fa61e1844af0aff0 Merge: e9193da 7dd1ab1 Author: Jens Axboe Date: Thu Jul 27 08:08:22 2017 -0600 Merge branch 'nvme-4.13' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph commit c471e70b187e62efc77bcdf6f58795907f8f4851 Author: Alex Deucher Date: Wed Jul 26 22:10:53 2017 -0400 drm/amdgpu: fix header on gfx9 clear state This got missed when we open sourced this. Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/clearstate_gfx9.h | 41 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 16f5df8b5d71ef2eaeac067806de7ebd6df3f2d0 Author: Shawn Lin Date: Fri Jul 21 16:39:56 2017 +0800 mmc: dw_mmc: fix the wrong condition check of getting num-slots from DT Change to print the information about when the deprecated "num-slots" DT binding is being used, as to avoid confusion when browsing the log: dwmmc_rockchip fe320000.dwmmc: 'num-slots' was deprecated. Signed-off-by: Shawn Lin Fixes: d30a8f7bdf64 ("mmc: dw_mmc: deprecated the "num-slots" property") Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcec601f30fb41e9233674942fa4040a6e63657a Author: Paul Blakey Date: Thu Jul 6 16:40:34 2017 +0300 net/mlx5: Fix mlx5_add_flow_rules call with correct num of dests When adding ethtool steering rule with action DISCARD we wrongly pass a NULL dest with dest_num 1 to mlx5_add_flow_rules(). What this error seems to have caused is sending VPORT 0 (MLX5_FLOW_DESTINATION_TYPE_VPORT) as the fte dest instead of no dests. We have fte action correctly set to DROP so it might been ignored anyways. To reproduce use: # sudo ethtool --config-nfc flow-type ether \ dst aa:bb:cc:dd:ee:ff action -1 Fixes: 74491de93712 ("net/mlx5: Add multi dest support") Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f08c39ed0bfb503c7b3e013cd40d036ce6a0941a Author: Eugenia Emantayev Date: Wed Jul 12 17:44:07 2017 +0300 net/mlx5e: Schedule overflow check work to mlx5e workqueue This is done in order to ensure that work will not run after the cleanup. Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit d439c84509a510e864fdc6166c760482cd03fc57 Author: Eugenia Emantayev Date: Wed Jul 12 17:27:18 2017 +0300 net/mlx5e: Fix wrong delay calculation for overflow check scheduling The overflow_period is calculated in seconds. In order to use it for delayed work scheduling translation to jiffies is needed. Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cf5033089b078303b102b65e3ccbbfa3ce0f4367 Author: Eugenia Emantayev Date: Sun May 28 14:27:02 2017 +0300 net/mlx5e: Add missing support for PTP_CLK_REQ_PPS request Add the missing option to enable the PTP_CLK_PPS function. In this case pin should be configured as 1PPS IN first and then it will be connected to PPS mechanism. Events will be reported as PTP_CLOCK_PPSUSR events to relevant sysfs. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 20 ++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 - 3 files changed, 21 insertions(+), 1 deletion(-) commit 4272f9b88db9223216cdf87314f570f6d81295b4 Author: Eugenia Emantayev Date: Sun May 28 14:06:01 2017 +0300 net/mlx5e: Change 1PPS out scheme In order to fix the drift in 1PPS out need to adjust the next pulse. On each 1PPS out falling edge driver gets the event, then the event handler adjusts the next pulse starting time. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 +- drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 116 ++++++++++++++------- 2 files changed, 87 insertions(+), 38 deletions(-) commit 49c5031ca6f0628ef973a11b17e463e088bf859e Author: Eugenia Emantayev Date: Sun May 28 12:01:38 2017 +0300 net/mlx5e: Fix broken disable 1PPS flow Need to disable the MTPPS and unsubscribe from the pulse events when user disables the 1PPS functionality. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 75 +++++++++++++--------- 1 file changed, 46 insertions(+), 29 deletions(-) commit fa3676885e3b5be1edfa1b2cc775e20a45b34a19 Author: Eugenia Emantayev Date: Thu May 25 16:09:34 2017 +0300 net/mlx5e: Add field select to MTPPS register In order to mark relevant fields while setting the MTPPS register add field select. Otherwise it can cause a misconfiguration in firmware. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 29 +++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 5 ++++ include/linux/mlx5/mlx5_ifc.h | 10 +++++--- 4 files changed, 36 insertions(+), 10 deletions(-) commit 0b794ffae7afa7c4e5accac8791c4b78e8d080ce Author: Eugenia Emantayev Date: Thu May 25 15:11:26 2017 +0300 net/mlx5: Fix mlx5_ifc_mtpps_reg_bits structure size Fix miscalculation in reserved_at_1a0 field. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0242f4a0bb03906010bbf80495512be00494a0ef Author: Ilan Tayari Date: Wed Jul 5 10:17:04 2017 +0300 net/mlx5e: Fix outer_header_zero() check size outer_header_zero() routine checks if the outer_headers match of a flow-table entry are all zero. This function uses the size of whole fte_match_param, instead of just the outer_headers member, causing failure to detect all-zeros if any other members of the fte_match_param are non-zero. Use the correct size for zero check. Fixes: 6dc6071cfcde ("net/mlx5e: Add ethtool flow steering support") Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58569ef8f619761548e7d198f59e8ebe3af91d04 Author: Alex Vesker Date: Thu Jul 6 15:40:32 2017 +0300 net/mlx5e: IPoIB, Modify add/remove underlay QPN flows On interface remove, the clean-up was done incorrectly causing an error in the log: "SET_FLOW_TABLE_ROOT(0x92f) op_mod(0x0) failed...syndrome (0x7e9f14)" This was caused by the following flow: -ndo_uninit: Move QP state to RST (this disconnects the QP from FT), the QP cannot be attached to any FT unless it is in RTS. -mlx5_rdma_netdev_free: cleanup_rx: Destroy FT cleanup_tx: Destroy QP and remove QPN from FT This caused a problem when destroying current FT we tried to re-attach the QP to the next FT which is not needed. The correct flow is: -mlx5_rdma_netdev_free: cleanup_rx: remove QPN from FT & Destroy FT cleanup_tx: Destroy QP Fixes: 508541146af1 ("net/mlx5: Use underlay QPN from the root name space") Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 219c81f7d1d5a89656cb3b53d3b4e11e93608d80 Author: Moshe Shemesh Date: Sun Jun 25 18:45:32 2017 +0300 net/mlx5: Fix command bad flow on command entry allocation failure When driver fail to allocate an entry to send command to FW, it must notify the calling function and release the memory allocated for this command. Fixes: e126ba97dba9e ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Moshe Shemesh Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 061870800efb4e3d1ad4082a2569363629bdfcfc Author: Moshe Shemesh Date: Thu Jul 6 15:48:40 2017 +0300 net/mlx5: Fix command completion after timeout access invalid structure Completion on timeout should not free the driver command entry structure as it will need to access it again once real completion event from FW will occur. Fixes: 73dd3a4839c1 ('net/mlx5: Avoid using pending command interface slots') Signed-off-by: Moshe Shemesh Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit dc798b4cc0f2a06e7ad7d522403de274b86a0a6f Author: Aviv Heller Date: Sun Jul 2 19:13:43 2017 +0300 net/mlx5: Consider tx_enabled in all modes on remap The tx_enabled lag event field is used to determine whether a slave is active. Current logic uses this value only if the mode is active-backup. However, LACP mode, although considered a load balancing mode, can mark a slave as inactive in certain situations (e.g., LACP timeout). This fix takes the tx_enabled value into account when remapping, with no respect to the LAG mode (this should not affect the behavior in XOR mode, since in this mode both slaves are marked as active). Fixes: 7907f23adc18 (net/mlx5: Implement RoCE LAG feature) Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lag.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 079adf05398f12371ea91dd53fdf61ee6352bc01 Author: Eran Ben Elisha Date: Thu Jun 1 09:40:56 2017 +0300 net/mlx5: Clean SRIOV eswitch resources upon VF creation failure Upon sriov enable, eswitch is always enabled. Currently, if enable hca failed over all VFs, we would skip eswitch disable as part of sriov disable, which will lead to resources leak. Fix it by disabling eswitch if it was enabled (use indication from eswitch mode). Fixes: 6b6adee3dad2 ('net/mlx5: SRIOV core code refactoring') Signed-off-by: Eran Ben Elisha Signed-off-by: Noa Osherovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 8397913303abc9333f376a518a8368fa22ca5e6e Author: Thomas Gleixner Date: Thu Jul 27 12:21:11 2017 +0200 genirq/cpuhotplug: Revert "Set force affinity flag on hotplug migration" That commit was part of the changes moving x86 to the generic CPU hotplug interrupt migration code. The force flag was required on x86 before the hierarchical irqdomain rework, but invoking set_affinity() with force=true stayed and had no side effects. At some point in the past, the force flag got repurposed to support the exynos timer interrupt affinity setting to a not yet online CPU, so the interrupt controller callback does not verify the supplied affinity mask against cpu_online_mask. Setting the flag in the CPU hotplug code causes the cpu online masking to be blocked on these irq controllers and results in potentially affining an interrupt to the CPU which is unplugged, i.e. instead of moving it away, it's just reassigned to it. As the force flags is not longer needed on x86, it's safe to revert that patch so the ARM irqchips which use the force flag work again. Add comments to that effect, so this won't happen again. Note: The online mask handling should be done in the generic code and the force flag and the masking in the irq chips removed all together, but that's not a change possible for 4.13. Fixes: 77f85e66aa8b ("genirq/cpuhotplug: Set force affinity flag on hotplug migration") Reported-by: Will Deacon Signed-off-by: Thomas Gleixner Acked-by: Will Deacon Cc: Marc Zyngier Cc: Russell King Cc: LAK Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1707271217590.3109@nanos Signed-off-by: Thomas Gleixner include/linux/irq.h | 7 ++++++- kernel/irq/cpuhotplug.c | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit c50f9fb6c535edf4731eecb53d91ebc297e82e5b Author: Chen-Yu Tsai Date: Fri Jul 14 14:42:52 2017 +0800 ARM: dts: sun8i: a83t: Switch to CCU device tree binding macros Now that the CCU device tree binding headers have been merged, we can use the properly named macros in the device tree, instead of raw numbers. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t.dtsi | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 3a4bae5fd44aa1cf49780dd25b3a89e6a39e8560 Author: Corentin Labbe Date: Mon Jul 10 20:44:40 2017 +0200 arm64: allwinner: sun50i-a64: Correct emac register size The datasheet said that emac register size is 0x10000 not 0x100 Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard [wens@csie.org: Fixed commit subject prefix] Signed-off-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 072b6e3692532b6281bf781ded1c7a986ac17471 Author: Corentin Labbe Date: Thu Jul 6 10:53:34 2017 +0200 ARM: dts: sunxi: h3/h5: Correct emac register size The datasheet said that emac register size is 0x10000 not 0x104 Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard [wens@csie.org: Fixed commit subject prefix] Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sunxi-h3-h5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f930c7043663188429cd9b254e9d761edfc101ce Author: Johannes Thumshirn Date: Thu Jul 27 09:11:26 2017 +0200 scsi: sg: only check for dxfer_len greater than 256M Don't make any assumptions on the sg_io_hdr_t::dxfer_direction or the sg_io_hdr_t::dxferp in order to determine if it is a valid request. The only way we can check for bad requests is by checking if the length exceeds 256M. Signed-off-by: Johannes Thumshirn Fixes: 28676d869bbb (scsi: sg: check for valid direction before starting the request) Reported-by: Jason L Tibbitts III Tested-by: Jason L Tibbitts III Suggested-by: Doug Gilbert Cc: Doug Gilbert Cc: Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) commit a3287c41ff405025bc57b165a0f6cd698bbbc1be Author: Will Deacon Date: Tue Jul 25 16:30:34 2017 +0100 drivers/perf: arm_pmu: Request PMU SPIs with IRQF_PER_CPU Since the PMU register interface is banked per CPU, CPU PMU interrrupts cannot be handled by a CPU other than the one with the PMU asserting the interrupt. This means that migrating PMU SPIs, as we do during a CPU hotplug operation doesn't make any sense and can lead to the IRQ being disabled entirely if we route a spurious IRQ to the new affinity target. This has been observed in practice on AMD Seattle, where CPUs on the non-boot cluster appear to take a spurious PMU IRQ when coming online, which is routed to CPU0 where it cannot be handled. This patch passes IRQF_PERCPU for PMU SPIs and forcefully sets their affinity prior to requesting them, ensuring that they cannot be migrated during hotplug events. This interacts badly with the DB8500 erratum workaround that ping-pongs the interrupt affinity from the handler, so we avoid passing IRQF_PERCPU in that case by allowing the IRQ flags to be overridden in the platdata. Fixes: 3cf7ee98b848 ("drivers/perf: arm_pmu: move irq request/free into probe") Cc: Mark Rutland Cc: Linus Walleij Signed-off-by: Will Deacon arch/arm/mach-ux500/cpu-db8500.c | 1 + drivers/perf/arm_pmu.c | 41 ++++++++++++++++++++++++++-------------- include/linux/perf/arm_pmu.h | 4 ++++ 3 files changed, 32 insertions(+), 14 deletions(-) commit 77a374c29992b1a0e2f4a6e2867324c4de6e23c4 Author: Arnd Bergmann Date: Tue Jan 28 21:17:41 2014 +0100 ARM: sa1100: normalize clk API sa1100 provides its own variant of the clk API rather than using the generic COMMON_CLK API. This generally works, but it causes some link errors with drivers using the clk_set_rate, clk_get_parent, clk_set_parent or clk_round_rate functions when a platform lacks those interfaces. This adds trivial stub implementations for each of them, based on the behavior of the COMMON_CLK implementation: - set_rate() and set_parent() report success without doing anything - round_rate() returns the clk rate - get_parent() returns NULL. This adds the minimal bloat and should do the right thing for the simple clock hardware in this SoC. Signed-off-by: Arnd Bergmann arch/arm/mach-sa1100/clock.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 31d5cf1476a09c95d8f5c2d1d77fa57f7d802b52 Author: Arnd Bergmann Date: Tue Jan 28 21:17:41 2014 +0100 ARM: davinci: normalize clk API davinci still has its own clk implementation, but lacks a clk_get_parent() helper, which can lead to link errors in randconfig builds. This adds the usual implementation. Acked-by: Sekhar Nori Signed-off-by: Arnd Bergmann arch/arm/mach-davinci/clock.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d997211e1ea14a67baadf391a8106d4330244700 Author: Arnd Bergmann Date: Sat Mar 15 11:21:06 2014 +0100 ARM: sa1100/pxa: fix MTD_XIP build In commit 3169663ac5902 "ARM: sa11x0/pxa: convert OS timer registers to IOMEM", the definition of the OSCR macro was changed to be an __iomem pointer, but the same register is also used by the XIP code. This patch does the corresponding change here as well. On PXA, the IRQ register definitions were removed even earlier, in commit 5d284e353eb1 ("ARM: pxa: avoid accessing interrupt registers directly"). This patch unfortunately brings some of that back. An earlier version of my patch moved the code into an external function, which could not work for CONFIG_XIP_KERNEL+CONFIG_MTD_XIP, so this restores something close to the original code. Link: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-March/241716.html Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann arch/arm/mach-pxa/include/mach/mtd-xip.h | 10 +++++++--- arch/arm/mach-sa1100/include/mach/mtd-xip.h | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) commit 8b9740178f2a380339fc1ce6d780bb442580eb2c Author: Arnd Bergmann Date: Fri Jun 9 10:00:17 2017 +0200 ARM: davinci: don't mark vpif_input structures as 'const' A change to the platform data definitions caused a warning in the board code: arch/arm/mach-davinci/board-da850-evm.c:1221:13: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] arch/arm/mach-davinci/board-da850-evm.c:1231:13: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] This is a bit unfortunate, since we generally like structure definitions to be const, but as this is legacy code, the easiest way out is still to remove the 'const' annotation here. Fixes: 4a5f8ae50b66 ("[media] davinci: vpif_capture: get subdevs from DT when available") Fixes: 231ce279e6e3 ("ARM: davinci: fix const warnings") Acked-by: Sekhar Nori Signed-off-by: Arnd Bergmann arch/arm/mach-davinci/board-da850-evm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fe89168c4065885700fa4f755a5157392aaae03c Author: Geert Uytterhoeven Date: Tue Jul 25 09:12:18 2017 +0200 soc: zte: Restrict SOC_ZTE to ARCH_ZX or COMPILE_TEST The ZTE SoC drivers are only useful when building for a ZTE ZX platform. Fixes: 4c2c2e39713b8cfb ("soc: zte: pm_domains: Prepare for supporting ARMv8 zx2967 family") Signed-off-by: Geert Uytterhoeven Reviewed-by: Baoyou Xie Signed-off-by: Arnd Bergmann drivers/soc/zte/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5f5d03143de5e0c593da4ab18fc6393c2815e108 Author: Arend Van Spriel Date: Wed Jul 26 13:09:24 2017 +0100 brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice Due to a bugfix in wireless tree and the commit mentioned below a merge was needed which went haywire. So the submitted change resulted in the function brcmf_sdiod_sgtable_alloc() being called twice during the probe thus leaking the memory of the first call. Cc: stable@vger.kernel.org # 4.6.x Fixes: 4d7928959832 ("brcmfmac: switch to new platform data") Reported-by: Stefan Wahren Tested-by: Stefan Wahren Reviewed-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 ----- 1 file changed, 5 deletions(-) commit 58f36b4526add4870476e1dc97a8467cf16aeee6 Author: Daniel Stone Date: Wed Jul 26 12:24:10 2017 +0100 brcmfmac: Don't grow SKB by negative size The commit to rework the headroom check in start_xmit() now calls pxskb_expand_head() unconditionally if the header is CoW. Unfortunately, it does so with the delta between the extant headroom and the header length, which may be negative if there is already sufficient headroom. pskb_expand_head() does allow for size being 0, in which case it just copies, so clamp the header delta to zero. Opening Chrome (and all my tabs) on a PCIE device was enough to reliably hit this. Fixes: 270a6c1f65fe ("brcmfmac: rework headroom check in .start_xmit()") Signed-off-by: Daniel Stone Cc: Arend Van Spriel Cc: James Hughes Cc: Hante Meuleman Cc: Pieter-Paul Giesberts Cc: Franky Lin Tested-by: Hans de Goede Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ea57ad6b9526f8106d0bf410b41a7223462ff89 Author: Kevin Hilman Date: Mon Jul 17 10:47:18 2017 -0700 ARM: dts: da850-lcdk: drop unused VPIF endpoints Drop the unused endpoints. They should only be used when there is an actual remote-endpoint connected. Cc: Sekhar Nori Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 7 ------- 1 file changed, 7 deletions(-) commit 0b048ff2cff5e1fb6894aa9cd7b31670cfe33f22 Author: Kevin Hilman Date: Thu Jun 15 14:57:30 2017 -0700 ARM: dts: da850-evm: drop unused VPIF endpoints Drop the unused endpoints. They should only be used when there is an actual remote-endpoint connected. Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 21 --------------------- 1 file changed, 21 deletions(-) commit 75f4e381315dbba0fa143398fa8cb0e40e4ec224 Merge: a3c0d2f 8d45141 Author: Arnd Bergmann Date: Thu Jul 27 12:54:35 2017 +0200 Merge tag 'mvebu-fixes-4.13-1' of git://git.infradead.org/linux-mvebu into fixes Pull "mvebu fixes for 4.13 (part 1)" from Gregory CLEMENT: - Fix wrong irq type for gpio expeander on Armada 388 GP - Use __pa_symbol instead of virt_to_phys in the mv98dx3236 platform SMP code * tag 'mvebu-fixes-4.13-1' of git://git.infradead.org/linux-mvebu: ARM: dts: armada-38x: Fix irq type for pca955 ARM: mvebu: use __pa_symbol in the mv98dx3236 platform SMP code commit a3c0d2fb082cdd6d70455fe6fb5ed584f05950ea Author: Krzysztof Kozlowski Date: Mon Jul 17 21:45:27 2017 +0200 ARM: dts: exynos: Add clocks to audss block to fix silent hang on Exynos4412 Add necessary parent clocks for audss (Audio SubSystem, MAUDIO) clock controller block. This allows driver to keep EPLL enabled before accessing any MAUDIO registers thus fixing silent hang. This silent hang appeared with commit 6edfa11cb396 ("clk: samsung: Add enable/disable operation for PLL36XX clocks"), e.g. on Odroid U3 usually with last (but unrelated) messages: [ 2.382741] input: gpio_keys as /devices/platform/gpio_keys/input/input0 [ 2.405686] usb 1-3: new high-speed USB device number 3 using exynos-ehci [ 2.419843] max77686-rtc max77686-rtc: setting system clock to 2017-06-21 17:04:13 UTC (1498064653) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann arch/arm/boot/dts/exynos4.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit b2e58cbee39c076c37b7e566640751922d88d9d5 Merge: d4e7400 2752660 Author: Arnd Bergmann Date: Thu Jul 27 12:51:28 2017 +0200 Merge tag 'renesas-fixes2-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Pull "Second Round of Renesas ARM Based SoC Fixes for v4.13" from Simon Horman: Correct order of sound clock frequencies for ULCB boards used by r8a7795 and r8a7796 SoCs. These sounds clock frequencies are used as the ADG clock (output clocks for audio module) initial setting and sound codec's initial system clock which needs the maximum clock frequency. Thus, descending order is required. * tag 'renesas-fixes2-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: renesas: ulcb: sound clock-frequency needs descending order commit d4e740053aed4d13ba4101a722a6733401ca54a0 Merge: 2f9227c ff570a0 Author: Arnd Bergmann Date: Thu Jul 27 12:50:35 2017 +0200 Merge tag 'omap-for-v4.13/fixes-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Pull "Few fixes for omaps for issues found recently" from Tony Lindgren: - Fix disable_irq related shared IRQ warnings for omap3 PRM - Fix omap4 legacy code regression that accidentally removed code that we still need for PRM interrupts - Fix dm8168-evm NAND pins and MMC write protect pin direction - Fix dra71-evm mdio impedance values * tag 'omap-for-v4.13/fixes-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: dra71-evm: mdio: Fix impedance values ARM: dts: dm816x: Correct the state of the write protect pin ARM: dts: dm816x: Correct NAND support nodes ARM: OMAP4: Fix legacy code clean-up regression ARM: OMAP2+: Fix omap3 prm shared irq commit 2f9227c79874fef0f8b974cf7701f5a8ad2bb6bf Merge: 520eccd 5e2feac Author: Arnd Bergmann Date: Thu Jul 27 12:48:50 2017 +0200 Merge tag 'renesas-fixes-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Pull "Renesas ARM Based SoC Fixes for v4.13" from Simon Horman: Correct order of sound clock frequencies for Salvator boards used by r8a7795 and r8a7796 SoCs. These sounds clock frequencies are used as the ADG clock (output clocks for audio module) initial setting and sound codec's initial system clock which needs the maximum clock frequency. Thus, descending order is required. * tag 'renesas-fixes-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: renesas: salvator-common: sound clock-frequency needs descending order commit d34cfebbf9cca8308e7bba3636a1a0fd79131051 Author: Ville Syrjälä Date: Fri Jul 14 18:52:27 2017 +0300 drm/i915: Fix cursor updates on some platforms Turns out that just writing CURPOS isn't sufficient to move the cursor on some platforms. My 830 works just fine, but eg. 945 and PNV don't. On those platforms we need to arm even the CURPOS update with a CURBASE write. Even worse, a write to any of the cursor register apart from CURBASE will cancel an already pending cursor update. So if we have armed a CURCNTR/CURBASE update, a subsequent CURPOS write prior to vblank would cancel that armed update. Thus we're left with a cursor that doesn't appear to move, or even change shape. Fix the problem by always performing the CURBASE write after a CURPOS write. Bspec is somewhat unclear which platforms actually require this CURBASE write and which don't. So to keep it simple and to make sure we really fix the problem across all supported devices, let's just perform the CURBASE write unconditionally. Cc: Paul Menzel Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101790 Fixes: 75343a44c901 ("drm/i915: Drop useless posting reads from cursor commit") Signed-off-by: Ville Syrjälä Tested-by: Paul Menzel Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170714155227.6089-1-ville.syrjala@linux.intel.com (cherry picked from commit 8753d2bc5e49daad301ce65f5dada57ed924fad6) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 7728124af30e04b9c2c3e3125e28963b065867c2 Author: Imre Deak Date: Fri Jul 14 18:12:42 2017 +0300 drm/i915: Fix user ptr check size in eb_relocate_vma() Fix the sizeof(ptr) vs. sizeof(*ptr) typo. Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array") Cc: Chris Wilson Cc: Joonas Lahtinen Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170714151242.517-2-imre.deak@intel.com (cherry picked from commit edd9003f7f9dddd28fdd768e6e7569d996c769cb) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b84202c946cd3da3a8daa92c682510e9ed80321 Author: Xin Long Date: Wed Jul 26 16:24:59 2017 +0800 sctp: fix the check for _sctp_walk_params and _sctp_walk_errors Commit b1f5bfc27a19 ("sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}()") tried to fix the issue that it may overstep the chunk end for _sctp_walk_{params, errors} with 'chunk_end > offset(length) + sizeof(length)'. But it introduced a side effect: When processing INIT, it verifies the chunks with 'param.v == chunk_end' after iterating all params by sctp_walk_params(). With the check 'chunk_end > offset(length) + sizeof(length)', it would return when the last param is not yet accessed. Because the last param usually is fwdtsn supported param whose size is 4 and 'chunk_end == offset(length) + sizeof(length)' This is a badly issue even causing sctp couldn't process 4-shakes. Client would always get abort when connecting to server, due to the failure of INIT chunk verification on server. The patch is to use 'chunk_end <= offset(length) + sizeof(length)' instead of 'chunk_end < offset(length) + sizeof(length)' for both _sctp_walk_params and _sctp_walk_errors. Fixes: b1f5bfc27a19 ("sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}()") Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller include/net/sctp/sctp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e90ce2fc27cad7e7b1e72b9e66201a7a4c124c2b Author: Xin Long Date: Wed Jul 26 14:20:15 2017 +0800 dccp: fix a memleak for dccp_feat_init err process In dccp_feat_init, when ccid_get_builtin_ccids failsto alloc memory for rx.val, it should free tx.val before returning an error. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/dccp/feat.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b7953d3c0e30a5fc944f6b7bd0bcceb0794bcd85 Author: Xin Long Date: Wed Jul 26 14:19:46 2017 +0800 dccp: fix a memleak that dccp_ipv4 doesn't put reqsk properly The patch "dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly" fixed reqsk refcnt leak for dccp_ipv6. The same issue exists on dccp_ipv4. This patch is to fix it for dccp_ipv4. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/dccp/ipv4.c | 1 + 1 file changed, 1 insertion(+) commit 0c2232b0a71db0ac1d22f751aa1ac0cadb950fd2 Author: Xin Long Date: Wed Jul 26 14:19:09 2017 +0800 dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly In dccp_v6_conn_request, after reqsk gets alloced and hashed into ehash table, reqsk's refcnt is set 3. one is for req->rsk_timer, one is for hlist, and the other one is for current using. The problem is when dccp_v6_conn_request returns and finishes using reqsk, it doesn't put reqsk. This will cause reqsk refcnt leaks and reqsk obj never gets freed. Jianlin found this issue when running dccp_memleak.c in a loop, the system memory would run out. dccp_memleak.c: int s1 = socket(PF_INET6, 6, IPPROTO_IP); bind(s1, &sa1, 0x20); listen(s1, 0x9); int s2 = socket(PF_INET6, 6, IPPROTO_IP); connect(s2, &sa1, 0x20); close(s1); close(s2); This patch is to put the reqsk before dccp_v6_conn_request returns, just as what tcp_conn_request does. Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/dccp/ipv6.c | 1 + 1 file changed, 1 insertion(+) commit 0da12a7a81f1e2255e89dc783c565e84801475a2 Author: Aneesh Kumar K.V Date: Sat Jun 17 20:00:55 2017 +0530 powerpc/mm/hash: Free the subpage_prot_table correctly Fixes: dad6f37c2602e ("powerpc: subpage_protect: Increase the array size to take care of 64TB") Signed-off-by: Aneesh Kumar K.V Tested-by: Ram Pai Signed-off-by: Michael Ellerman arch/powerpc/mm/subpage-prot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6fd916a625110d75bd4d15b8488df44cf41c9fc Author: Dan Carpenter Date: Tue Jul 25 22:49:55 2017 +0300 scsi: aacraid: reading out of bounds "qd.id" comes directly from the copy_from_user() on the line before so we should verify that it's within bounds. Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 722477c4f2c50bc8d800d293a3bc5aa843f16e8d Author: Thomas Bogendoerfer Date: Tue Jul 25 11:19:21 2017 +0200 scsi: qedf: Limit number of CQs FCOE offloading failed with: [qed_sp_fcoe_func_start:150(sp-0-3b:00.02)]Cannot satisfy CQ amount. CQs requested 8, CQs available 6. Aborting function start [qed_fcoe_start:821()]Failed to start fcoe [__qedf_probe:3041]:6: Cannot start FCoE function. The reason is a newly introduced check in the qed main part. This change also provides the information about how many CQs are available, so we simply limit the number of requested CQs.. Fixes: 3c5da9427802 ("qed: Share additional information with qedf") Signed-off-by: Thomas Bogendoerfer Reviewed-by: Johannes Thumshirn Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf.h | 3 ++- drivers/scsi/qedf/qedf_main.c | 20 +++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) commit f9f22a86912f9d36b50e9b3b383fabfb9f22dd46 Author: Thomas Gleixner Date: Mon Jul 24 12:53:00 2017 +0200 scsi: bnx2i: Simplify cpu hotplug code The CPU hotplug related code of this driver can be simplified by: 1) Consolidating the callbacks into a single state. The CPU thread can be torn down on the CPU which goes offline. There is no point in delaying that to the CPU dead state 2) Let the core code invoke the online/offline callbacks and remove the extra for_each_online_cpu() loops. Signed-off-by: Thomas Gleixner Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2i/bnx2i_init.c | 65 ++++++++++------------------------------- include/linux/cpuhotplug.h | 1 - 2 files changed, 15 insertions(+), 51 deletions(-) commit 1937f8a29f4a650bc27e0311b43b53509a34fd22 Author: Thomas Gleixner Date: Mon Jul 24 12:52:59 2017 +0200 scsi: bnx2fc: Simplify CPU hotplug code The CPU hotplug related code of this driver can be simplified by: 1) Consolidating the callbacks into a single state. The CPU thread can be torn down on the CPU which goes offline. There is no point in delaying that to the CPU dead state 2) Let the core code invoke the online/offline callbacks and remove the extra for_each_online_cpu() loops. Signed-off-by: Thomas Gleixner Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 69 +++++++++------------------------------ include/linux/cpuhotplug.h | 1 - 2 files changed, 15 insertions(+), 55 deletions(-) commit 2fa2fa1ae6b42fc4c4995fdbf8fd7df96bb25ba4 Author: Thomas Gleixner Date: Mon Jul 24 12:52:58 2017 +0200 scsi: bnx2i: Prevent recursive cpuhotplug locking The BNX2I module init/exit code installs/removes the hotplug callbacks with the cpu hotplug lock held. This worked with the old CPU locking implementation which allowed recursive locking, but with the new percpu rwsem based mechanism this is not longer allowed. Use the _cpuslocked() variants to fix this. Reported-by: Steven Rostedt Acked-by: Chad Dupuis Signed-off-by: Thomas Gleixner Signed-off-by: Martin K. Petersen drivers/scsi/bnx2i/bnx2i_init.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 2c2b66ae9d11d99f5f6d7010f0d46401ed9031ce Author: Thomas Gleixner Date: Mon Jul 24 12:52:57 2017 +0200 scsi: bnx2fc: Prevent recursive cpuhotplug locking The BNX2FC module init/exit code installs/removes the hotplug callbacks with the cpu hotplug lock held. This worked with the old CPU locking implementation which allowed recursive locking, but with the new percpu rwsem based mechanism this is not longer allowed. Use the _cpuslocked() variants to fix this. Reported-by: kernel test robot Acked-by: Chad Dupuis Signed-off-by: Thomas Gleixner Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 8addebc14a322fa8ca67cd57c6038069acde8ddc Author: Thomas Gleixner Date: Mon Jul 24 12:52:56 2017 +0200 scsi: bnx2fc: Plug CPU hotplug race bnx2fc_process_new_cqes() has protection against CPU hotplug, which relies on the per cpu thread pointer. This protection is racy because it happens only partially with the per cpu fp_work_lock held. If the CPU is unplugged after the lock is dropped, the wakeup code can dereference a NULL pointer or access freed and potentially reused memory. Restructure the code so the thread check and wakeup happens with the fp_work_lock held. Signed-off-by: Thomas Gleixner Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_hwi.c | 45 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit 7e1751001818209b214b8c3df0b3c91fae250ea2 Author: Arnd Bergmann Date: Fri Jul 21 22:47:18 2017 +0200 drm: exynos: mark pm functions as __maybe_unused The rework of the exynos DRM clock handling introduced warnings for configurations that have CONFIG_PM disabled: drivers/gpu/drm/exynos/exynos_hdmi.c:736:13: error: 'hdmi_clk_disable_gates' defined but not used [-Werror=unused-function] static void hdmi_clk_disable_gates(struct hdmi_context *hdata) ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/exynos/exynos_hdmi.c:717:12: error: 'hdmi_clk_enable_gates' defined but not used [-Werror=unused-function] static int hdmi_clk_enable_gates(struct hdmi_context *hdata) The problem is that the PM functions themselves are inside of an #ifdef, but some functions they call are not. This patch removes the #ifdef and instead marks the PM functions as __maybe_unused, which is a more reliable way to get it right. Link: https://patchwork.kernel.org/patch/8436281/ Fixes: 9be7e9898444 ("drm/exynos/hdmi: clock code re-factoring") Signed-off-by: Arnd Bergmann Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8f4e01f9f05e460eceed03df7f1b90095727e05a Author: Hans Verkuil Date: Mon Jul 17 13:48:14 2017 +0200 drm/exynos: select CEC_CORE if CEC_NOTIFIER If the s5p-cec driver is a module and the drm exynos driver is built-in, then the CEC core will be a module also, causing the CEC notifier to fail (will be compiled as empty functions). To prevent this select CEC_CORE if CEC_NOTIFIER is set to ensure the CEC core is also built into the kernel. Signed-off-by: Hans Verkuil Signed-off-by: Inki Dae drivers/gpu/drm/exynos/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 861b27eca78355aa0a9712612c3ccd7d847a1614 Author: Andrzej Hajda Date: Wed Jul 12 12:01:23 2017 +0200 drm/exynos/hdmi: fix disable sequence The "Fixes" patch was incorrectly merged, as a result PHY is prematurely powered off and for example Odroid-U3 cannot disable TV power domain when HDMI cable is unplugged. Signed-off-by: Andrzej Hajda Reported-by: Marek Szyprowski Fixes: 625e63e2 ("drm/exynos/hdmi: fix pipeline disable order") Tested-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 2 -- 1 file changed, 2 deletions(-) commit 576d72fbfb454eb903447fee5e5dbb5cfb700fee Author: Inki Dae Date: Mon Jul 3 16:08:23 2017 +0900 drm/exynos: mic: add a bridge at probe This patch moves drm_bridge_add call into probe. It doesn't need to call drm_bridge_add call every time bind callback is called. Changelog v2 - moved drm_bridge_remove call into remove callback. - corrected description. Suggested-by: Andrzej Hajda Reviewed-by: Andrzej Hajda Reviewed-by: Hoegeun Kwon Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 0d51a0a534534c8b5d843620243e2370a3e87217 Author: Hoegeun Kwon Date: Wed Jun 21 19:51:43 2017 +0900 drm/exynos/dsi: Remove error handling for bridge_node DT parsing Remove the error handling of bridge_node because the bridge_node is optional. For example, In case of Exynos SoC, a bridge device such as mDNIe and MIC could be placed between Display Controller and MIPI DSI device but the bridge device is optional. Signed-off-by: Hoegeun Kwon Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 -- 1 file changed, 2 deletions(-) commit c9948920cfc63c5ed4eb37f461a1b2752d2e1d3b Author: Inki Dae Date: Wed Jun 14 17:09:00 2017 +0900 drm/exynos: dsi: do not try to find bridge It doesn't need to try to find a bridge if bridge node doesn't exist. Reviewed-by: Shuah Khan Tested-by: Shuah Khan Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e3cc51ea0b8ae056cd18adc62c03573b24ed46cd Author: Arvind Yadav Date: Mon Jun 19 14:54:03 2017 +0530 drm: exynos: hdmi: make of_device_ids const. of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 12294 1192 0 13486 34ae drivers/gpu/drm/exynos/exynos_hdmi.o File size after constify hdmi_match_types. text data bss dec hex filename 13318 176 0 13494 34b6 drivers/gpu/drm/exynos/exynos_hdmi.o Signed-off-by: Arvind Yadav Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e6cc1c588fd827dd9e7359a4fe20b25743fe6b9 Author: Arvind Yadav Date: Mon Jun 19 15:42:42 2017 +0530 drm: exynos: constify mixer_match_types and *_mxr_drv_data. File size before: text data bss dec hex filename 9983 1424 0 11407 2c8f drivers/gpu/drm/exynos/exynos_mixer.o File size after constify: text data bss dec hex filename 11231 176 0 11407 2c8f drivers/gpu/drm/exynos/exynos_mixer.o Signed-off-by: Arvind Yadav Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1d6bb0f9b4cca9861c69fd3af5a7ead0dad77070 Author: Gabriel Krisman Bertazi Date: Wed Jun 21 14:17:14 2017 +0900 exynos_drm: Clean up duplicated assignment in exynos_drm_driver num_ioctls is already assigned when declaring the exynos_drm_driver structure. No need to duplicate it here. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 - 1 file changed, 1 deletion(-) commit d777b2ddbecf509bc61ee4f0fe0d3b5a909d698a Author: Jakub Kicinski Date: Tue Jul 25 15:16:12 2017 -0700 bpf: don't zero out the info struct in bpf_obj_get_info_by_fd() The buffer passed to bpf_obj_get_info_by_fd() should be initialized to zeros. Kernel will enforce that to guarantee we can safely extend info structures in the future. Making the bpf_obj_get_info_by_fd() call in libbpf perform the zeroing is problematic, however, since some members of the info structures may need to be initialized by the callers (for instance pointers to buffers to which kernel is to dump translated and jited images). Remove the zeroing and fix up the in-tree callers before any kernel has been released with this code. As Daniel points out this seems to be the intended operation anyway, since commit 95b9afd3987f ("bpf: Test for bpf ID") is itself setting the buffer pointers before calling bpf_obj_get_info_by_fd(). Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 1 - tools/testing/selftests/bpf/test_progs.c | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 0c3a8f8b8fabff4f3ad2dd7b95ae0e90cdd1aebb Author: Matthias Kaehlcke Date: Tue Jul 25 11:36:25 2017 -0700 netpoll: Fix device name check in netpoll_setup() Apparently netpoll_setup() assumes that netpoll.dev_name is a pointer when checking if the device name is set: if (np->dev_name) { ... However the field is a character array, therefore the condition always yields true. Check instead whether the first byte of the array has a non-zero value. Signed-off-by: Matthias Kaehlcke Signed-off-by: David S. Miller net/core/netpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 517069ff6ec0971e0794ab97d4fcfa8b143746e4 Merge: cfd1081 41ebafc Author: Dave Airlie Date: Thu Jul 27 08:49:48 2017 +1000 Merge branch 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Three misc amd fixes. * 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: fix AVFS voltage offset for Vega10 drm/amdgpu/gfx9: simplify and fix GRBM index selection drm/amdgpu: Fix blocking in RCU critical section(v2) commit 1e6f209515a08de29ec53b653eac73b50efd949c Author: Anna Schumaker Date: Tue Jul 25 16:10:47 2017 -0400 NFS: Use raw NFS access mask in nfs4_opendata_access() Commit bd8b2441742b ("NFS: Store the raw NFS access mask in the inode's access cache") changed how the access results are stored after an access() call. An NFS v4 OPEN might have access bits returned with the opendata, so we should use the NFS4_ACCESS values when determining the return value in nfs4_opendata_access(). Fixes: bd8b2441742b ("NFS: Store the raw NFS access mask in the inode's access cache") Reported-by: Eryu Guan Signed-off-by: Anna Schumaker Tested-by: Takashi Iwai fs/nfs/nfs4proc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d94708a553022bf012fa95af10532a134eeb5a52 Author: WANG Cong Date: Tue Jul 25 09:44:25 2017 -0700 bonding: commit link status change after propose Commit de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring") moves link status commitment into bond_mii_monitor(), but it still relies on the return value of bond_miimon_inspect() as the hint. We need to return non-zero as long as we propose a link status change. Fixes: de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring") Reported-by: Benjamin Gilbert Tested-by: Benjamin Gilbert Cc: Mahesh Bandewar Signed-off-by: Cong Wang Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 3fb3b3c4b68e33bb4acf42361b6a0db96115de35 Author: Alexander Dahl Date: Tue Jul 25 14:00:24 2017 +0200 memory: atmel-ebi: Fix smc cycle xlate converter The converter function for translating ns timings in register values was initialized with a wrong function pointer. This resulted in wrong register values also for the setup and pulse registers when configuring the EBI interface trough dts. Includes a small fix in a comment of the smc driver, which was probably just a copy'n'paste mistake. Signed-off-by: Alexander Dahl Acked-by: Boris Brezillon Acked-by: Lee Jones Signed-off-by: Alexandre Belloni drivers/memory/atmel-ebi.c | 2 +- drivers/mfd/atmel-smc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1f6b53901f5bffbbb0464c732e83bb2a3a784ff7 Author: Alexander Dahl Date: Tue Jul 25 14:00:23 2017 +0200 memory: atmel-ebi: Allow t_DF timings of zero ns As reported in [1] and in [2] it's not possible to set the device tree property 'atmel,smc-tdf-ns' to zero, although the SoC allows a setting of 0ns for the t_DF time. Allow this setting by doing the same thing as in the atmel nand controller driver by setting ncycles to ATMEL_SMC_MODE_TDF_MIN if zero is set in the dts. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-March/490966.html [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-July/520652.html Suggested-by: Boris Brezillon Signed-off-by: Alexander Dahl Acked-by: Boris Brezillon Signed-off-by: Alexandre Belloni drivers/memory/atmel-ebi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bc9b934b2fbbd51008a1b52c0cd1b457e6440736 Author: Alexander Dahl Date: Tue Jul 25 14:00:22 2017 +0200 memory: atmel-ebi: Fix smc timing return value evaluation Setting optional EBI/SMC properties through device tree always fails due to wrong evaluation of the return value of atmel_ebi_xslate_smc_timings(). If you put some of those properties in your dts file, but not 'atmel,smc-tdf-ns' the local variable 'required' in atmel_ebi_xslate_smc_timings() stays on 'false' after the first 'if' block. This leads to setting 'ret' to -EINVAL in the first run of the following 'for' loop which is then the return value of this function. However if you set 'atmel,smc-tdf-ns' in the dts file and everything in atmel_ebi_xslate_smc_timings() works well, it returns the content of 'required' which is 'true' then. So the function atmel_ebi_xslate_smc_timings() always returns non-zero which lets its call in atmel_ebi_xslate_smc_config() always fail and thus returning -EINVAL, so the EBI configuration for this node fails. Judging from the following code evaluating the local 'required' variable in atmel_ebi_xslate_smc_config() and the call of caps->xlate_config in atmel_ebi_dev_setup() it's probably right to only let the call fail if a negative error code is returned. Signed-off-by: Alexander Dahl Acked-by: Boris Brezillon Signed-off-by: Alexandre Belloni drivers/memory/atmel-ebi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f47803503247c9ec414072c0724073a1c8c3433 Author: Alex Williamson Date: Wed Jul 26 14:33:15 2017 -0600 vfio/pci: Use pci_try_reset_function() on initial open Device lock bites again; if a device .remove() callback races a user calling ioctl(VFIO_GROUP_GET_DEVICE_FD), the unbind request will hold the device lock, but the user ioctl may have already taken a vfio_device reference. In the case of a PCI device, the initial open will attempt to reset the device, which again attempts to get the device lock, resulting in deadlock. Use the trylock PCI reset interface and return error on the open path if reset fails due to lock contention. Link: https://lkml.org/lkml/2017/7/25/381 Reported-by: Wen Congyang Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 273752c9ff03eb83856601b2a3458218bb949e46 Author: Vivek Goyal Date: Wed Jul 26 09:35:09 2017 -0400 dm, dax: Make sure dm_dax_flush() is called if device supports it Currently dm_dax_flush() is not being called, even if underlying dax device supports write cache, because DAXDEV_WRITE_CACHE is not being propagated up to the DM dax device. If the underlying dax device supports write cache, set DAXDEV_WRITE_CACHE on the DM dax device. This will cause dm_dax_flush() to be called. Fixes: abebfbe2f7 ("dm: add ->flush() dax operation support") Signed-off-by: Vivek Goyal Acked-by: Dan Williams Signed-off-by: Mike Snitzer drivers/dax/super.c | 6 ++++++ drivers/md/dm-table.c | 35 +++++++++++++++++++++++++++++++++++ include/linux/dax.h | 1 + 3 files changed, 42 insertions(+) commit 34c96507e8f6be497c15497be05f489fb34c5880 Author: NeilBrown Date: Mon Apr 10 12:13:00 2017 +1000 dm verity fec: fix GFP flags used with mempool_alloc() mempool_alloc() cannot fail for GFP_NOIO allocation, so there is no point testing for failure. One place the code tested for failure was passing "0" as the GFP flags. This is most unusual and is probably meant to be GFP_NOIO, so that is changed. Also, allocation from ->extra_pool and ->prealloc_pool are repeated before releasing the previous allocation. This can deadlock if the code is servicing a write under high memory pressure. To avoid deadlocks, change these to use GFP_NOWAIT and leave the error handling in place. Signed-off-by: NeilBrown Signed-off-by: Mike Snitzer drivers/md/dm-verity-fec.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit 4218a9554653bd5be6e3c740749282b57434bd73 Author: Damien Le Moal Date: Mon Jul 24 16:44:37 2017 +0900 dm zoned: use GFP_NOIO in I/O path Use GFP_NOIO for memory allocations in the I/O path. Other memory allocations in the initialization path can use GFP_KERNEL. Reported-by: Mikulas Patocka Signed-off-by: Damien Le Moal Reviewed-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-zoned-metadata.c | 12 ++++++------ drivers/md/dm-zoned-reclaim.c | 2 +- drivers/md/dm-zoned-target.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) commit bb67b496c338e15813f075f482067da930f52e39 Author: Murilo Opsfelder Araujo Date: Tue Jul 18 14:22:20 2017 -0300 include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the following: drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release': vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release' drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open': vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open' In this case, vfio_pci.c should use the empty definitions of vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions. This patch fixes it by guarding these function definitions with CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is built, which is where the non-empty versions of these functions are. We need to make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate option. This issue was found during a randconfig build. Logs are here: http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/ Signed-off-by: Murilo Opsfelder Araujo Reviewed-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Alex Williamson include/linux/vfio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da08f35b0f82b0a7a79f518faf8d0c0b477f91bc Merge: fd2b2c57 cfa0ebc Author: Linus Torvalds Date: Wed Jul 26 10:46:48 2017 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes and cleanups from Michael Tsirkin: "Fixes some minor issues all over the codebase" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio-net: fix module unloading virtio-balloon: coding format cleanup virtio-balloon: deflate via a page list virtio_blk: Use sysfs_match_string() helper commit 7b5e0a4e82bf5a451b57586cd4401f0907fcf68c Merge: 1d518c6 ef42719 Author: Paolo Bonzini Date: Wed Jul 26 15:19:01 2017 +0200 Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master Two commits which fix host crashes. Signed-off-by: Paolo BOnzini commit 1d518c6820daf4e00d29adfba980aee05f605f0f Author: Wanpeng Li Date: Tue Jul 25 00:43:15 2017 -0700 KVM: LAPIC: Fix reentrancy issues with preempt notifiers Preempt can occur in the preemption timer expiration handler: CPU0 CPU1 preemption timer vmexit handle_preemption_timer(vCPU0) kvm_lapic_expired_hv_timer hv_timer_is_use == true sched_out sched_in kvm_arch_vcpu_load kvm_lapic_restart_hv_timer restart_apic_timer start_hv_timer already-expired timer or sw timer triggerd in the window start_sw_timer cancel_hv_timer /* back in kvm_lapic_expired_hv_timer */ cancel_hv_timer WARN_ON(!apic->lapic_timer.hv_timer_in_use); ==> Oops This can be reproduced if CONFIG_PREEMPT is enabled. ------------[ cut here ]------------ WARNING: CPU: 4 PID: 2972 at /home/kernel/linux/arch/x86/kvm//lapic.c:1563 kvm_lapic_expired_hv_timer+0x9e/0xb0 [kvm] CPU: 4 PID: 2972 Comm: qemu-system-x86 Tainted: G OE 4.13.0-rc2+ #16 RIP: 0010:kvm_lapic_expired_hv_timer+0x9e/0xb0 [kvm] Call Trace: handle_preemption_timer+0xe/0x20 [kvm_intel] vmx_handle_exit+0xb8/0xd70 [kvm_intel] kvm_arch_vcpu_ioctl_run+0xdd1/0x1be0 [kvm] ? kvm_arch_vcpu_load+0x47/0x230 [kvm] ? kvm_arch_vcpu_load+0x62/0x230 [kvm] kvm_vcpu_ioctl+0x340/0x700 [kvm] ? kvm_vcpu_ioctl+0x340/0x700 [kvm] ? __fget+0xfc/0x210 do_vfs_ioctl+0xa4/0x6a0 ? __fget+0x11d/0x210 SyS_ioctl+0x79/0x90 do_syscall_64+0x81/0x220 entry_SYSCALL64_slow_path+0x25/0x25 ------------[ cut here ]------------ WARNING: CPU: 4 PID: 2972 at /home/kernel/linux/arch/x86/kvm//lapic.c:1498 cancel_hv_timer.isra.40+0x4f/0x60 [kvm] CPU: 4 PID: 2972 Comm: qemu-system-x86 Tainted: G W OE 4.13.0-rc2+ #16 RIP: 0010:cancel_hv_timer.isra.40+0x4f/0x60 [kvm] Call Trace: kvm_lapic_expired_hv_timer+0x3e/0xb0 [kvm] handle_preemption_timer+0xe/0x20 [kvm_intel] vmx_handle_exit+0xb8/0xd70 [kvm_intel] kvm_arch_vcpu_ioctl_run+0xdd1/0x1be0 [kvm] ? kvm_arch_vcpu_load+0x47/0x230 [kvm] ? kvm_arch_vcpu_load+0x62/0x230 [kvm] kvm_vcpu_ioctl+0x340/0x700 [kvm] ? kvm_vcpu_ioctl+0x340/0x700 [kvm] ? __fget+0xfc/0x210 do_vfs_ioctl+0xa4/0x6a0 ? __fget+0x11d/0x210 SyS_ioctl+0x79/0x90 do_syscall_64+0x81/0x220 entry_SYSCALL64_slow_path+0x25/0x25 This patch fixes it by making the caller of cancel_hv_timer, start_hv_timer and start_sw_timer be in preemption-disabled regions, which trivially avoid any reentrancy issue with preempt notifier. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li [Add more WARNs. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 67fbcd62f54d4503e3dc63b68af1c6757b74e050 Author: Lin Ma Date: Tue Jul 25 19:05:54 2017 +0800 tools/kvm_stat: add '-f help' to get the available event list Signed-off-by: Lin Ma Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit efcb521943a8df5210f16f312037c2edc3e1449f Author: Lin Ma Date: Tue Jul 25 19:05:53 2017 +0800 tools/kvm_stat: use variables instead of hard paths in help output Using variables instead of hard paths makes the requirements information more accurate. Signed-off-by: Lin Ma Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cb9083eb6e9cfb117c67f812065e82c7bdd64273 Merge: 2d6144e 4f89914 Author: Paolo Bonzini Date: Wed Jul 26 18:59:36 2017 +0200 Merge tag 'kvm-s390-master-4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: fixup missing srcu lock We need to hold the srcu lock when accessing memory slots during migration Signed-off-by: Paolo Bonzini commit 2d6144e366fb39609aecf7a658e2e10af37627e9 Author: Wanpeng Li Date: Tue Jul 25 03:40:46 2017 -0700 KVM: nVMX: Fix loss of L2's NMI blocking state Run kvm-unit-tests/eventinj.flat in L1 w/ ept=0 on both L0 and L1: Before NMI IRET test Sending NMI to self NMI isr running stack 0x461000 Sending nested NMI to self After nested NMI to self Nested NMI isr running rip=40038e After iret After NMI to self FAIL: NMI Commit 4c4a6f790ee862 (KVM: nVMX: track NMI blocking state separately for each VMCS) tracks NMI blocking state separately for vmcs01 and vmcs02. However it is not enough: - The L2 (kvm-unit-tests/eventinj.flat) generates NMI that will fault on IRET, so the L2 can generate #PF which can be intercepted by L0. - L0 walks L1's guest page table and sees the mapping is invalid, it resumes the L1 guest and injects the #PF into L1. At this point the vmcs02 has nmi_known_unmasked=true. - L1 sets set bit 3 (blocking by NMI) in the interruptibility-state field of vmcs12 (and fixes the shadow page table) before resuming L2 guest. - L1 executes VMRESUME to resume L2, causing a vmexit to L0 - during VMRESUME emulation, prepare_vmcs02 sets bit 3 in the interruptibility-state field of vmcs02, but nmi_known_unmasked is still true. - L2 immediately exits to L0 with another page fault, because L0 still has not updated the NGVA->HPA page tables. However, nmi_known_unmasked is true so vmx_recover_nmi_blocking does not do anything. The fix is to update nmi_known_unmasked when preparing vmcs02 from vmcs12. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 ++ 1 file changed, 2 insertions(+) commit 06a5524f091b6b41b0007810c74cc9315923a145 Author: Wincy Van Date: Fri Apr 28 13:13:59 2017 +0800 KVM: nVMX: Fix posted intr delivery when vcpu is in guest mode The PI vector for L0 and L1 must be different. If dest vcpu0 is in guest mode while vcpu1 is delivering a non-nested PI to vcpu0, there wont't be any vmexit so that the non-nested interrupt will be delayed. Signed-off-by: Wincy Van Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 210f84b0ca7743f3b2a9acfae81df668dbbb6a12 Author: Wincy Van Date: Fri Apr 28 13:13:58 2017 +0800 x86: irq: Define a global vector for nested posted interrupts We are using the same vector for nested/non-nested posted interrupts delivery, this may cause interrupts latency in L1 since we can't kick the L2 vcpu out of vmx-nonroot mode. This patch introduces a new vector which is only for nested posted interrupts to solve the problems above. Signed-off-by: Wincy Van Signed-off-by: Paolo Bonzini arch/x86/entry/entry_64.S | 1 + arch/x86/include/asm/entry_arch.h | 2 ++ arch/x86/include/asm/hardirq.h | 1 + arch/x86/include/asm/hw_irq.h | 2 ++ arch/x86/include/asm/irq_vectors.h | 3 ++- arch/x86/kernel/irq.c | 19 +++++++++++++++++++ arch/x86/kernel/irqinit.c | 2 ++ 7 files changed, 29 insertions(+), 1 deletion(-) commit a512177ef3bb92dbec8a96fe337b11c126bf9c91 Author: Paolo Bonzini Date: Mon Jul 24 18:54:38 2017 +0200 KVM: x86: do mask out upper bits of PAE CR3 This reverts the change of commit f85c758dbee54cc3612a6e873ef7cecdb66ebee5, as the behavior it modified was intended. The VM is running in 32-bit PAE mode, and Table 4-7 of the Intel manual says: Table 4-7. Use of CR3 with PAE Paging Bit Position(s) Contents 4:0 Ignored 31:5 Physical address of the 32-Byte aligned page-directory-pointer table used for linear-address translation 63:32 Ignored (these bits exist only on processors supporting the Intel-64 architecture) To placate the static checker, write the mask explicitly as an unsigned long constant instead of using a 32-bit unsigned constant. Cc: Dan Carpenter Fixes: f85c758dbee54cc3612a6e873ef7cecdb66ebee5 Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fdeaf7e3eb37c6dbc4b4ac97dbe1945d239eb788 Author: Claudio Imbrenda Date: Mon Jul 24 13:40:03 2017 +0200 KVM: make pid available for uevents without debugfs Simplify and improve the code so that the PID is always available in the uevent even when debugfs is not available. This adds a userspace_pid field to struct kvm, as per Radim's suggestion, so that the PID can be retrieved on destruction too. Acked-by: Janosch Frank Fixes: 286de8f6ac9202 ("KVM: trigger uevents when creating or destroying a VM") Signed-off-by: Claudio Imbrenda Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 35 ++++++++++++----------------------- 2 files changed, 13 insertions(+), 23 deletions(-) commit 9688f9b020263c4a17471d09bb18e34eccc1c0a5 Author: Paolo Abeni Date: Wed Jul 26 11:33:49 2017 +0200 udp: unbreak build lacking CONFIG_XFRM We must use pre-processor conditional block or suitable accessors to manipulate skb->sp elsewhere builds lacking the CONFIG_XFRM will break. Fixes: dce4551cb2ad ("udp: preserve head state for IP_CMSG_PASSSEC") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit deab4563ad6a7f4668024455fa61b87f1d25ff73 Author: Damien Riegel Date: Tue Jul 25 13:51:24 2017 -0400 ASoC: codecs: msm8916-analog: fix DIG_CLK_CTL_RXD3_CLK_EN define The wrong bit is assigned to DIG_CLK_CTL_RXD3_CLK_EN, change it for the correct one. Signed-off-by: Damien Riegel Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dd1ab163c17e11473a65b11f7e748db30618ebb Author: Scott Bauer Date: Tue Jul 25 10:27:06 2017 -0600 nvme: validate admin queue before unquiesce With a misbehaving controller it's possible we'll never enter the live state and create an admin queue. When we fail out of reset work it's possible we failed out early enough without setting up the admin queue. We tear down queues after a failed reset, but needed to do some more sanitization. Fixes 443bd90f2cca: "nvme: host: unquiesce queue in nvme_kill_queues()" [ 189.650995] nvme nvme1: pci function 0000:0b:00.0 [ 317.680055] nvme nvme0: Device not ready; aborting reset [ 317.680183] nvme nvme0: Removing after probe failure status: -19 [ 317.681258] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 317.681397] general protection fault: 0000 [#1] SMP KASAN [ 317.682984] CPU: 3 PID: 477 Comm: kworker/3:2 Not tainted 4.13.0-rc1+ #5 [ 317.683112] Hardware name: Gigabyte Technology Co., Ltd. Z170X-UD5/Z170X-UD5-CF, BIOS F5 03/07/2016 [ 317.683284] Workqueue: events nvme_remove_dead_ctrl_work [nvme] [ 317.683398] task: ffff8803b0990000 task.stack: ffff8803c2ef0000 [ 317.683516] RIP: 0010:blk_mq_unquiesce_queue+0x2b/0xa0 [ 317.683614] RSP: 0018:ffff8803c2ef7d40 EFLAGS: 00010282 [ 317.683716] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1006fbdcde3 [ 317.683847] RDX: 0000000000000038 RSI: 1ffff1006f5a9245 RDI: 0000000000000000 [ 317.683978] RBP: ffff8803c2ef7d58 R08: 1ffff1007bcdc974 R09: 0000000000000000 [ 317.684108] R10: 1ffff1007bcdc975 R11: 0000000000000000 R12: 00000000000001c0 [ 317.684239] R13: ffff88037ad49228 R14: ffff88037ad492d0 R15: ffff88037ad492e0 [ 317.684371] FS: 0000000000000000(0000) GS:ffff8803de6c0000(0000) knlGS:0000000000000000 [ 317.684519] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 317.684627] CR2: 0000002d1860c000 CR3: 000000045b40d000 CR4: 00000000003406e0 [ 317.684758] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 317.684888] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 317.685018] Call Trace: [ 317.685084] nvme_kill_queues+0x4d/0x170 [nvme_core] [ 317.685185] nvme_remove_dead_ctrl_work+0x3a/0x90 [nvme] [ 317.685289] process_one_work+0x771/0x1170 [ 317.685372] worker_thread+0xde/0x11e0 [ 317.685452] ? pci_mmcfg_check_reserved+0x110/0x110 [ 317.685550] kthread+0x2d3/0x3d0 [ 317.685617] ? process_one_work+0x1170/0x1170 [ 317.685704] ? kthread_create_on_node+0xc0/0xc0 [ 317.685785] ret_from_fork+0x25/0x30 [ 317.685798] Code: 0f 1f 44 00 00 55 48 b8 00 00 00 00 00 fc ff df 48 89 e5 41 54 4c 8d a7 c0 01 00 00 53 48 89 fb 4c 89 e2 48 c1 ea 03 48 83 ec 08 <80> 3c 02 00 75 50 48 8b bb c0 01 00 00 e8 33 8a f9 00 0f ba b3 [ 317.685872] RIP: blk_mq_unquiesce_queue+0x2b/0xa0 RSP: ffff8803c2ef7d40 [ 317.685908] ---[ end trace a3f8704150b1e8b4 ]--- Signed-off-by: Scott Bauer Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5b094d6dac0451ad89b1dc088395c7b399b7e9e8 Author: Christoph Hellwig Date: Tue Jul 18 11:16:51 2017 -0700 xfs: fix multi-AG deadlock in xfs_bunmapi Just like in the allocator we must avoid touching multiple AGs out of order when freeing blocks, as freeing still locks the AGF and can cause the same AB-BA deadlocks as in the allocation path. Signed-off-by: Christoph Hellwig Reported-by: Nikolay Borisov Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 74ddda71f44c84af62f736a77fb9fcebe5bb436a Author: Joerg Roedel Date: Wed Jul 26 14:17:55 2017 +0200 iommu/amd: Fix schedule-while-atomic BUG in initialization code The register_syscore_ops() function takes a mutex and might sleep. In the IOMMU initialization code it is invoked during irq-remapping setup already, where irqs are disabled. This causes a schedule-while-atomic bug: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 in_atomic(): 0, irqs_disabled(): 1, pid: 1, name: swapper/0 no locks held by swapper/0/1. irq event stamp: 304 hardirqs last enabled at (303): [] _raw_spin_unlock_irqrestore+0x36/0x60 hardirqs last disabled at (304): [] enable_IR_x2apic+0x79/0x196 softirqs last enabled at (36): [] __do_softirq+0x35f/0x4ec softirqs last disabled at (31): [] irq_exit+0x105/0x120 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc2.1.el7a.test.x86_64.debug #1 Hardware name: PowerEdge C6145 /040N24, BIOS 3.5.0 10/28/2014 Call Trace: dump_stack+0x85/0xca ___might_sleep+0x22a/0x260 __might_sleep+0x4a/0x80 __mutex_lock+0x58/0x960 ? iommu_completion_wait.part.17+0xb5/0x160 ? register_syscore_ops+0x1d/0x70 ? iommu_flush_all_caches+0x120/0x150 mutex_lock_nested+0x1b/0x20 register_syscore_ops+0x1d/0x70 state_next+0x119/0x910 iommu_go_to_state+0x29/0x30 amd_iommu_enable+0x13/0x23 Fix it by moving the register_syscore_ops() call to the next initialization step, which runs with irqs enabled. Reported-by: Artem Savkov Tested-by: Artem Savkov Acked-by: Thomas Gleixner Fixes: 2c0ae1720c09 ('iommu/amd: Convert iommu initialization to state machine') Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8033120f36c0b7212825f621a54e2d0f5ce72f72 Author: Dan Carpenter Date: Wed Jul 19 05:58:20 2017 -0400 media: atomisp2: array underflow in imx_enum_frame_size() The code looks in imx_enum_frame_size() looks like this: 2066 int index = fse->index; 2067 struct imx_device *dev = to_imx_sensor(sd); 2068 2069 mutex_lock(&dev->input_lock); 2070 if (index >= dev->entries_curr_table) { 2071 mutex_unlock(&dev->input_lock); 2072 return -EINVAL; 2073 } 2074 2075 fse->min_width = dev->curr_res_table[index].width; "fse->index" is a u32 that comes from the user. We want negative values of "index" to be -EINVAL so we don't read before the start of the dev->curr_res_table[] array. I've made "entries_curr_table" unsigned long to fix this. I thought about making it unsigned int, but because of struct alignment, it doesn't use more memory either way. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/imx/imx.h | 2 +- drivers/staging/media/atomisp/i2c/ov8858.h | 2 +- drivers/staging/media/atomisp/i2c/ov8858_btns.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 115b7ac211d11c5995296dc612c4c8fab349d4b9 Author: Dan Carpenter Date: Wed Jul 19 05:56:18 2017 -0400 media: atomisp2: array underflow in ap1302_enum_frame_size() The problem is this code from ap1302_enum_frame_size(): 738 int index = fse->index; 739 740 mutex_lock(&dev->input_lock); 741 context = ap1302_get_context(sd); 742 if (index >= dev->cntx_res[context].res_num) { 743 mutex_unlock(&dev->input_lock); 744 return -EINVAL; 745 } 746 747 res_table = dev->cntx_res[context].res_table; 748 fse->min_width = res_table[index].width; "fse->index" is a u32 that come from the user. We want negative values of "index" to be treated as -EINVAL but they're not so we can read from before the start of the res_table[] array. I've fixed this by making "res_num" a u32. I made "cur_res" a u32 as well, just for consistency. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ap1302.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b065c554ca55fbc96eced98c7cec0f442ab018a Author: Dan Carpenter Date: Wed Jul 19 05:55:47 2017 -0400 media: atomisp2: Array underflow in atomisp_enum_input() The problem here is this code from atomisp_enum_input(): 581 int index = input->index; 582 583 if (index >= isp->input_cnt) 584 return -EINVAL; 585 586 if (!isp->inputs[index].camera) 587 return -EINVAL; "input->index" is a u32 which comes from the ioctl. We want negative values of "index" to be counted as -EINVAL but they aren't. I've fixed this by changing the type of "isp->input_cnt" to unsigned int. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b76e3f933327f9fd9df9a65a2d239e6e350cbee2 Author: Vinod Koul Date: Tue Jul 25 12:08:12 2017 +0530 ASoC: Intel: Skylake: Fix missing sentinels in sst_acpi_mach Couple of instances of sst_acpi_mach were having missing sentinels so add them up Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 2 ++ 1 file changed, 2 insertions(+) commit b25db383928cecba356835583b16fa7008f97b3a Author: Prabhakar Lad Date: Thu Jul 20 04:56:31 2017 -0400 media: platform: davinci: drop VPFE_CMD_S_CCDC_RAW_PARAMS drop VPFE_CMD_S_CCDC_RAW_PARAMS ioctl from dm355/dm644x following reasons: - This ioctl was never in public api and was only defined in kernel header. - The function set_params constantly mixes up pointers and phys_addr_t numbers. - This is part of a 'VPFE_CMD_S_CCDC_RAW_PARAMS' ioctl command that is described as an 'experimental ioctl that will change in future kernels'. - The code to allocate the table never gets called after we copy_from_user the user input over the kernel settings, and then compare them for inequality. - We then go on to use an address provided by user space as both the __user pointer for input and pass it through phys_to_virt to come up with a kernel pointer to copy the data to. This looks like a trivially exploitable root hole. Signed-off-by: Lad, Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/ccdc_hw_device.h | 10 -- drivers/media/platform/davinci/dm355_ccdc.c | 92 +-------------- drivers/media/platform/davinci/dm644x_ccdc.c | 151 +----------------------- drivers/media/platform/davinci/vpfe_capture.c | 75 ------------ include/media/davinci/dm644x_ccdc.h | 12 -- include/media/davinci/vpfe_capture.h | 10 -- 6 files changed, 4 insertions(+), 346 deletions(-) commit da05d52d2f0f6bd61094a0cd045fed94bf7d673a Author: Prabhakar Lad Date: Thu Jul 20 08:02:09 2017 -0400 media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl this patch makes sure VPFE_CMD_S_CCDC_RAW_PARAMS ioctl no longer works for vpfe_capture driver with a minimal patch suitable for backporting. - This ioctl was never in public api and was only defined in kernel header. - The function set_params constantly mixes up pointers and phys_addr_t numbers. - This is part of a 'VPFE_CMD_S_CCDC_RAW_PARAMS' ioctl command that is described as an 'experimental ioctl that will change in future kernels'. - The code to allocate the table never gets called after we copy_from_user the user input over the kernel settings, and then compare them for inequality. - We then go on to use an address provided by user space as both the __user pointer for input and pass it through phys_to_virt to come up with a kernel pointer to copy the data to. This looks like a trivially exploitable root hole. Due to these reasons we make sure this ioctl now returns -EINVAL and backport this patch as far as possible. Fixes: 5f15fbb68fd7 ("V4L/DVB (12251): v4l: dm644x ccdc module for vpfe capture driver") Signed-off-by: Lad, Prabhakar Cc: # for v3.7 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpfe_capture.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 377a22d3caec3d2cda0cc996101121145ac43ff2 Author: Stanimir Varbanov Date: Wed Jul 19 07:51:37 2017 -0400 media: venus: don't abuse dma_alloc for non-DMA allocations In venus_boot(), we pass a pointer to a phys_addr_t into dmam_alloc_coherent, which the compiler warns about: platform/qcom/venus/firmware.c: In function 'venus_boot': platform/qcom/venus/firmware.c:63:49: error: passing argument 3 of 'dmam_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types] To avoid the error refactor venus_boot function by discard dma_alloc_coherent invocation because we don't want to map the memory for the device. Something more, the usage of DMA mapping API is actually wrong and the current implementation relies on several bugs in DMA mapping code. When these bugs are fixed that will break firmware loading, so fix this now to avoid future troubles. The meaning of venus_boot is to copy the content of the firmware buffer into reserved (and memblock removed) block of memory and pass that physical address to the trusted zone for authentication and mapping through iommu form the secure world. After iommu mapping is done the iova is passed as ane entry point to the remote processor. After this change memory-region property is parsed manually and the physical address is memremap to CPU, call mdt_load to load firmware segments into proper places and unmap reserved memory. Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions") Signed-off-by: Stanimir Varbanov Reviewed-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/core.c | 10 ++-- drivers/media/platform/qcom/venus/core.h | 1 - drivers/media/platform/qcom/venus/firmware.c | 74 ++++++++++++---------------- drivers/media/platform/qcom/venus/firmware.h | 5 +- 4 files changed, 39 insertions(+), 51 deletions(-) commit 3e7caae5f2853436153a7d5f253fd7e0e720f4b8 Author: Rob Clark Date: Mon Jul 17 04:56:50 2017 -0400 media: venus: hfi: fix error handling in hfi_sys_init_done() Not entirely sure what triggers it, but with venus build as kernel module and in initrd, we hit this crash: Unable to handle kernel paging request at virtual address ffff80003c039000 pgd = ffff00000a14f000 [ffff80003c039000] *pgd=00000000bd9f7003, *pud=00000000bd9f6003, *pmd=00000000bd9f0003, *pte=0000000000000000 Internal error: Oops: 96000007 [#1] SMP Modules linked in: qcom_wcnss_pil(E+) crc32_ce(E) qcom_common(E) venus_core(E+) remoteproc(E) snd_soc_msm8916_digital(E) virtio_ring(E) cdc_ether(E) snd_soc_lpass_apq8016(E) snd_soc_lpass_cpu(E) snd_soc_apq8016_sbc(E) snd_soc_lpass_platform(E) v4l2_mem2mem(E) virtio(E) snd_soc_core(E) ac97_bus(E) snd_pcm_dmaengine(E) snd_seq(E) leds_gpio(E) videobuf2_v4l2(E) videobuf2_core(E) snd_seq_device(E) snd_pcm(E) videodev(E) media(E) nvmem_qfprom(E) msm(E) snd_timer(E) snd(E) soundcore(E) spi_qup(E) mdt_loader(E) qcom_tsens(E) qcom_spmi_temp_alarm(E) nvmem_core(E) msm_rng(E) uas(E) usb_storage(E) dm9601(E) usbnet(E) mii(E) mmc_block(E) adv7511(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) qcom_spmi_vadc(E) qcom_vadc_common(PE) industrialio(E) pinctrl_spmi_mpp(E) pinctrl_spmi_gpio(E) rtc_pm8xxx(E) clk_smd_rpm(E) sdhci_msm(E) sdhci_pltfm(E) qcom_smd_regulator(E) drm(E) smd_rpm(E) qcom_spmi_pmic(E) regmap_spmi(E) ci_hdrc_msm(E) ci_hdrc(E) usb3503(E) extcon_usb_gpio(E) phy_msm_usb(E) udc_core(E) qcom_hwspinlock(E) extcon_core(E) ehci_msm(E) i2c_qup(E) sdhci(E) mmc_core(E) spmi_pmic_arb(E) spmi(E) qcom_smd(E) smsm(E) rpmsg_core(E) smp2p(E) smem(E) hwspinlock_core(E) gpio_keys(E) CPU: 2 PID: 551 Comm: irq/150-venus Tainted: P E 4.12.0+ #1625 Hardware name: qualcomm dragonboard410c/dragonboard410c, BIOS 2017.07-rc2-00144-ga97bdbdf72-dirty 07/08/2017 task: ffff800037338000 task.stack: ffff800038e00000 PC is at hfi_sys_init_done+0x64/0x140 [venus_core] LR is at hfi_process_msg_packet+0xcc/0x1e8 [venus_core] pc : [] lr : [] pstate: 20400145 sp : ffff800038e03c60 x29: ffff800038e03c60 x28: 0000000000000000 x27: 00000000000df018 x26: ffff00000118f4d0 x25: 0000000000020003 x24: ffff80003a8d3010 x23: ffff00000118f760 x22: ffff800037b40028 x21: ffff8000382981f0 x20: ffff800037b40028 x19: ffff80003c039000 x18: 0000000000000020 x17: 0000000000000000 x16: ffff800037338000 x15: ffffffffffffffff x14: 0000001000000014 x13: 0000000100001007 x12: 0000000100000020 x11: 0000100e00000000 x10: 0000000000000001 x9 : 0000000200000000 x8 : 0000001400000001 x7 : 0000000000001010 x6 : 0000000000000148 x5 : 0000000000001009 x4 : ffff80003c039000 x3 : 00000000cd770abb x2 : 0000000000000042 x1 : 0000000000000788 x0 : 0000000000000002 Process irq/150-venus (pid: 551, stack limit = 0xffff800038e00000) Call trace: [] hfi_sys_init_done+0x64/0x140 [venus_core] [] hfi_process_msg_packet+0xcc/0x1e8 [venus_core] [] venus_isr_thread+0x1b4/0x208 [venus_core] [] hfi_isr_thread+0x28/0x38 [venus_core] [] irq_thread_fn+0x30/0x70 [] irq_thread+0x14c/0x1c8 [] kthread+0x138/0x140 [] ret_from_fork+0x10/0x40 Code: 52820125 52820207 7a431820 54000249 (b9400263) ---[ end trace c963460f20a984b6 ]--- The problem is that in the error case, we've incremented the data ptr but not decremented rem_bytes, and keep reading (presumably garbage) until eventually we go beyond the end of the buffer. Instead, on first error, we should probably just bail out. Other option is to increment read_bytes by sizeof(u32) before the switch, rather than only accounting for the ptype header in the non-error case. Note that in this case it is HFI_ERR_SYS_INVALID_PARAMETER, ie. an unrecognized/unsupported parameter, so interpreting the next word as a property type would be bogus. The other error cases are due to truncated buffer, so there isn't likely to be anything valid to interpret in the remainder of the buffer. So just bailing seems like a reasonable solution. Signed-off-by: Rob Clark Reviewed-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi_msgs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b8f9bdc151e4a61eaa385900e580aad1e68f094b Author: Arnd Bergmann Date: Mon Jul 17 04:56:49 2017 -0400 media: venus: fix compile-test build on non-qcom ARM platform If QCOM_MDT_LOADER is enabled, but ARCH_QCOM is not, we run into a build error: ERROR: "qcom_mdt_load" [drivers/media/platform/qcom/venus/venus-core.ko] undefined! ERROR: "qcom_mdt_get_size" [drivers/media/platform/qcom/venus/venus-core.ko] undefined! This changes the 'select' statement again, so we only try to enable those symbols when the drivers will actually get built, and explicitly test for QCOM_MDT_LOADER to be enabled before calling into it. Fixes: 76724b30f222 ("[media] media: venus: enable building with COMPILE_TEST") Signed-off-by: Arnd Bergmann Reviewed-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 4 ++-- drivers/media/platform/qcom/venus/firmware.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit eb918f915f5bdf0d78479567dab016dfa975673e Author: Arnd Bergmann Date: Mon Jul 17 04:56:47 2017 -0400 media: venus: mark PM functions as __maybe_unused Without PM support, gcc warns about two unused functions: platform/qcom/venus/core.c:146:13: error: 'venus_clks_disable' defined but not used [-Werror=unused-function] platform/qcom/venus/core.c:126:12: error: 'venus_clks_enable' defined but not used [-Werror=unused-function] The problem as usual are incorrect #ifdefs, so the easiest fix is to do away with the #ifdef completely and mark the suspend/resume handlers as __maybe_unused, which they are. Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions") Signed-off-by: Arnd Bergmann Reviewed-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fc1ff45a07abf240aa0c6586c11465c86c8cab8d Author: Hans Verkuil Date: Sat Jul 15 09:32:56 2017 -0300 media: cec-notifier: small improvements Allow calling cec_notifier_set_phys_addr and cec_notifier_set_phys_addr_from_edid with a NULL notifier, in which case these functions do nothing. Add a cec_notifier_phys_addr_invalidate helper function (the notifier equivalent of cec_phys_addr_invalidate). These changes simplify drm CEC driver support. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-notifier.c | 6 ++++++ include/media/cec-notifier.h | 15 +++++++++++++++ 2 files changed, 21 insertions(+) commit 9b7c0c476f66ee212925c801c4141fdd83b7336d Author: Hans Verkuil Date: Sun Jul 16 05:15:47 2017 -0300 media: pulse8-cec: persistent_config should be off by default The persistent_config option is used to make the CEC settings persistent by using the eeprom inside the device to store this information. This was on by default, which caused confusion since this device now behaves differently from other CEC devices which all come up unconfigured. Another reason for doing this now is that I hope a more standard way of selecting persistent configuration will be created in the future. And for that to work all CEC drivers should behave the same and come up unconfigured by default. None of the open source CEC applications are using this CEC framework at the moment so change this behavior before it is too late. Signed-off-by: Hans Verkuil Cc: # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pulse8-cec/pulse8-cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd34ca8758d0ee9b13c0c067a956b0e9eb247d18 Author: Hans Verkuil Date: Wed Jul 12 17:07:08 2017 -0300 media: cec: cec_transmit_attempt_done: ignore CEC_TX_STATUS_MAX_RETRIES The switch in cec_transmit_attempt_done() should ignore the CEC_TX_STATUS_MAX_RETRIES status bit. Calling this function with e.g. CEC_TX_STATUS_NACK | CEC_TX_STATUS_MAX_RETRIES is perfectly legal and should not trigger the WARN(1). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3aa68405d907cdec852078d73a200608d5aa473 Author: Dan Carpenter Date: Mon Jul 17 04:58:54 2017 -0300 media: staging: atomisp: array underflow in ioctl I noticed an array underflow in ov5693_enum_frame_size(). The code looks like this: int index = fse->index; if (index >= N_RES) retur -EINVAL; fse->index is a u32 that comes from the user. We want negative values to be counted as -EINVAL but they aren't. There are several ways to fix this but I feel like the best fix for future proofing is to change the type of N_RES from int to unsigned long to make it the same as if we were comparing against ARRAY_SIZE(). Signed-off-by: Dan Carpenter Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/gc0310.h | 2 +- drivers/staging/media/atomisp/i2c/gc2235.h | 2 +- drivers/staging/media/atomisp/i2c/ov2680.h | 3 +-- drivers/staging/media/atomisp/i2c/ov2722.h | 2 +- drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) commit 9f5039ba440e499d85c29b1ddbc3cbc9dc90e44b Author: Sean Young Date: Fri Jul 7 18:49:18 2017 -0300 media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds Since commit e8f4818895b3 ("[media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve") lircd uses the ioctl LIRC_GET_REC_RESOLUTION to determine the shortest pulse or space that the hardware can detect. This breaks decoding in lirc because lircd expects the answer in microseconds, but nanoseconds is returned. Cc: # v2.6.36+ Reported-by: Derek Tested-by: Derek Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd10be381c7749d27e4fe69041004c432e59b301 Author: Mauro Carvalho Chehab Date: Tue Jul 18 09:30:55 2017 -0300 media: svg: avoid too long lines Sending patches with SVG files via e-mail has a drawback: line size could be bigger than 998, with is the limit given by RFC 5322[1]. So, we need to enforce a lower limit, in order to allow those patches to be properly reviewed. [1] https://tools.ietf.org/html/rfc5322#section-2.1.1 So, use this small Perl script to limit columns size to ~900. use Text::Wrap; $Text::Wrap::columns = 900; $t.=$_ while (<>); print wrap("","",$t); Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/crop.svg | 253 +- Documentation/media/uapi/v4l/fieldseq_bt.svg | 170 +- Documentation/media/uapi/v4l/fieldseq_tb.svg | 175 +- Documentation/media/uapi/v4l/nv12mt.svg | 764 +++--- Documentation/media/uapi/v4l/nv12mt_example.svg | 2474 ++++++++++---------- .../uapi/v4l/subdev-image-processing-crop.svg | 10 +- .../uapi/v4l/subdev-image-processing-full.svg | 10 +- ...ubdev-image-processing-scaling-multi-source.svg | 10 +- Documentation/media/uapi/v4l/vbi_525.svg | 614 ++--- Documentation/media/uapi/v4l/vbi_625.svg | 388 +-- Documentation/media/uapi/v4l/vbi_hsync.svg | 238 +- 11 files changed, 2558 insertions(+), 2548 deletions(-) commit 86eaa804fc5282d3112b54503187ab651fff59fd Author: Mauro Carvalho Chehab Date: Mon Jul 17 11:57:29 2017 -0300 media: svg files: simplify files Debian's ImageMagick is currently unable to decode those images. Use scour to simplify the SVG, and provide only one font type, in order to make it more palatable. Signed-off-by: Mauro Carvalho Chehab Documentation/media/typical_media_device.svg | 3054 +------------------------- Documentation/media/uapi/dvb/dvbstb.svg | 668 +----- Documentation/media/uapi/v4l/bayer.svg | 1013 +-------- Documentation/media/uapi/v4l/constraints.svg | 356 +-- 4 files changed, 162 insertions(+), 4929 deletions(-) commit 38f79cba960b2620f5a1a16199a280c90859e72e Author: Mauro Carvalho Chehab Date: Fri Jul 14 15:33:34 2017 -0300 media: selection.svg: simplify the SVG file This file is too big, with cause it to require a lot of memory when parsed by texlive. Optimize it, in order to avoid the need of touching at main_memory at texmf.cnf. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/selection.svg | 6957 +++++----------------------- 1 file changed, 1148 insertions(+), 5809 deletions(-) commit bf183e0fed825991bc7c9466d0403c8c1c326c4d Author: Javier Martinez Canillas Date: Fri Jul 14 05:58:39 2017 -0300 media: vimc: set id_table for platform drivers The vimc platform drivers define a platform device ID table but these are not set to the .id_table field in the platform driver structure. So the platform device ID table is only used to fill the aliases in the module but are not used for matching (works because the platform subsystem fallbacks to the driver's name if no .id_table is set). But this also means that the platform device ID table isn't used if the driver is built-in, which leads to the following build warning: This causes the following build warnings when the driver is built-in: drivers/media/platform/vimc//vimc-capture.c:528:40: warning: ‘vimc_cap_driver_ids’ defined but not used [-Wunused-const-variable=] static const struct platform_device_id vimc_cap_driver_ids[] = { ^~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc//vimc-debayer.c:588:40: warning: ‘vimc_deb_driver_ids’ defined but not used [-Wunused-const-variable=] static const struct platform_device_id vimc_deb_driver_ids[] = { ^~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc//vimc-scaler.c:442:40: warning: ‘vimc_sca_driver_ids’ defined but not used [-Wunused-const-variable=] static const struct platform_device_id vimc_sca_driver_ids[] = { ^~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc//vimc-sensor.c:376:40: warning: ‘vimc_sen_driver_ids’ defined but not used [-Wunused-const-variable=] static const struct platform_device_id vimc_sen_driver_ids[] = { ^~~~~~~~~~~~~~~~~~~ Reported-by: Mauro Carvalho Chehab Suggested-by: Sakari Ailus Signed-off-by: Javier Martinez Canillas Reviewed-by: Helen Koike Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-capture.c | 15 ++++++++------- drivers/media/platform/vimc/vimc-debayer.c | 15 ++++++++------- drivers/media/platform/vimc/vimc-scaler.c | 15 ++++++++------- drivers/media/platform/vimc/vimc-sensor.c | 15 ++++++++------- 4 files changed, 32 insertions(+), 28 deletions(-) commit d0153c7ff9226535a51e6a81f61656c9500957f4 Author: Dave Martin Date: Tue Jul 25 12:52:41 2017 +0100 arm64: sysreg: Fix unprotected macro argmuent in write_sysreg write_sysreg() may misparse the value argument because it is used without parentheses to protect it. This patch adds the ( ) in order to avoid any surprises. Acked-by: Mark Rutland Signed-off-by: Dave Martin [will: same change to write_sysreg_s] Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c17c1c3099d7367e67d51290884846dfeecf7bf Author: Neil Leeder Date: Mon Jul 24 17:17:02 2017 -0400 perf: qcom_l2: fix column exclusion check The check for column exclusion did not verify that the event being checked was an L2 event, and not a software event. Software events should not be checked for column exclusion. This resulted in a group with both software and L2 events sometimes incorrectly rejecting the L2 event for column exclusion and not counting it. Add a check for PMU type before applying column exclusion logic. Fixes: 21bdbb7102edeaeb ("perf: add qcom l2 cache perf events driver") Acked-by: Mark Rutland Signed-off-by: Neil Leeder Signed-off-by: Will Deacon drivers/perf/qcom_l2_pmu.c | 2 ++ 1 file changed, 2 insertions(+) commit b40b2386bce982ad97f3683b2b34e589c3be5c5a Author: Michael Ellerman Date: Wed Jul 26 15:00:42 2017 +1000 powerpc/Makefile: Fix ld version check with 64-bit LE-only toolchain In commit efe0160cfd40 ("powerpc/64: Linker on-demand sfpr functions for modules"), we added an ld version check early in the powerpc top-level Makefile. Because the Makefile runs before the kernel config is setup, the checks for CONFIG_CPU_LITTLE_ENDIAN etc. all take the default case. So we end up configuring ld for 32-bit big endian. That would be OK, except that for historical (or perhaps no) reason, we use 'override LD' to add the endian flags to the LD variable itself, rather than the normal approach of adding them to LDFLAGS. The end result is that when we check the ld version we run it as: $(CROSS_COMPILE)ld -EB -m elf32ppc --version This often works, unless you are using a 64-bit only and/or little endian only, toolchain. In which case you see something like: $ make defconfig powerpc64le-linux-ld: unrecognised emulation mode: elf32ppc Supported emulations: elf64lppc elf32lppc elf32lppclinux elf32lppcsim /bin/sh: 1: [: -ge: unexpected operator The proper fix is to stop using 'override LD', but that will require a fair bit of testing. Instead we can fix it for now just by reordering the Makefile to do the version check earlier. Fixes: efe0160cfd40 ("powerpc/64: Linker on-demand sfpr functions for modules") Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 4fd1bd443e80b12f0a01a45fb9a793206b41cb72 Author: Laurent Vivier Date: Fri Jul 21 16:51:39 2017 +0200 powerpc/pseries: Fix of_node_put() underflow during reconfig remove As for commit 68baf692c435 ("powerpc/pseries: Fix of_node_put() underflow during DLPAR remove"), the call to of_node_put() must be removed from pSeries_reconfig_remove_node(). dlpar_detach_node() and pSeries_reconfig_remove_node() both call of_detach_node(), and thus the node should not be released in both cases. Fixes: 0829f6d1f69e ("of: device_node kobject lifecycle fixes") Cc: stable@vger.kernel.org # v3.15+ Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/reconfig.c | 1 - 1 file changed, 1 deletion(-) commit a25bd72badfa793ab5aeafd50dbd9db39f8c9179 Author: Benjamin Herrenschmidt Date: Mon Jul 24 14:26:06 2017 +1000 powerpc/mm/radix: Workaround prefetch issue with KVM There's a somewhat architectural issue with Radix MMU and KVM. When coming out of a guest with AIL (Alternate Interrupt Location, ie, MMU enabled), we start executing hypervisor code with the PID register still containing whatever the guest has been using. The problem is that the CPU can (and will) then start prefetching or speculatively load from whatever host context has that same PID (if any), thus bringing translations for that context into the TLB, which Linux doesn't know about. This can cause stale translations and subsequent crashes. Fixing this in a way that is neither racy nor a huge performance impact is difficult. We could just make the host invalidations always use broadcast forms but that would hurt single threaded programs for example. We chose to fix it instead by partitioning the PID space between guest and host. This is possible because today Linux only use 19 out of the 20 bits of PID space, so existing guests will work if we make the host use the top half of the 20 bits space. We additionally add support for a property to indicate to Linux the size of the PID register which will be useful if we eventually have processors with a larger PID space available. There is still an issue with malicious guests purposefully setting the PID register to a value in the hosts PID range. Hopefully future HW can prevent that, but in the meantime, we handle it with a pair of kludges: - On the way out of a guest, before we clear the current VCPU in the PACA, we check the PID and if it's outside of the permitted range we flush the TLB for that PID. - When context switching, if the mm is "new" on that CPU (the corresponding bit was set for the first time in the mm cpumask), we check if any sibling thread is in KVM (has a non-NULL VCPU pointer in the PACA). If that is the case, we also flush the PID for that CPU (core). This second part is needed to handle the case where a process is migrated (or starts a new pthread) on a sibling thread of the CPU coming out of KVM, as there's a window where stale translations can exist before we detect it and flush them out. A future optimization could be added by keeping track of whether the PID has ever been used and avoid doing that for completely fresh PIDs. We could similarily mark PIDs that have been the subject of a global invalidation as "fresh". But for now this will do. Signed-off-by: Benjamin Herrenschmidt [mpe: Rework the asm to build with CONFIG_PPC_RADIX_MMU=n, drop unneeded include of kvm_book3s_asm.h] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu.h | 15 ++++---- arch/powerpc/include/asm/mmu_context.h | 18 ++++++++-- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 59 +++++++++++++++++++++++++++----- arch/powerpc/mm/mmu_context_book3s64.c | 5 +-- arch/powerpc/mm/pgtable-radix.c | 34 +++++++++++++++++- arch/powerpc/mm/tlb-radix.c | 45 ++++++++++++++++++++++-- 6 files changed, 154 insertions(+), 22 deletions(-) commit 4813497b537c6208c90d6cbecac5072d347de900 Author: Marc Gonzalez Date: Tue Jul 25 14:35:03 2017 +0200 net: ethernet: nb8800: Handle all 4 RGMII modes identically Before commit bf8f6952a233 ("Add blurb about RGMII") it was unclear whose responsibility it was to insert the required clock skew, and in hindsight, some PHY drivers got it wrong. The solution forward is to introduce a new property, explicitly requiring skew from the node to which it is attached. In the interim, this driver will handle all 4 RGMII modes identically (no skew). Fixes: 52dfc8301248 ("net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller") Signed-off-by: Marc Gonzalez Signed-off-by: David S. Miller drivers/net/ethernet/aurora/nb8800.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 80d887dbb673f007938c467fbfa118bba3e9f37d Author: stephen hemminger Date: Mon Jul 24 21:03:19 2017 -0700 Revert "netvsc: optimize calculation of number of slots" The logic for computing page buffer scatter does not take into account the impact of compound pages. Therefore the optimization to compute number of slots was incorrect and could cause stack corruption a skb was sent with lots of fragments from huge pages. This reverts commit 60b86665af0dfbeebda8aae43f0ba451cd2dcfe5. Fixes: 60b86665af0d ("netvsc: optimize calculation of number of slots") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 43 +++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) commit 6cee9d649cd1824a4d9ce6940dd716f2bf2ef24f Author: Joel Stanley Date: Tue Jul 25 10:19:01 2017 +0930 ftgmac100: return error in ftgmac100_alloc_rx_buf The error paths set err, but it's not returned. I wondered if we should fix all of the callers to check the returned value, but Ben explains why the code is this way: > Most call sites ignore it on purpose. There's nothing we can do if > we fail to get a buffer at interrupt time, so we point the buffer to > the scratch page so the HW doesn't DMA into lalaland and lose the > packet. > > The one call site that tests and can fail is the one used when brining > the interface up. If we fail to allocate at that point, we fail the > ifup. But as you noticed, I do have a bug not returning the error. Acked-by: Benjamin Herrenschmidt Signed-off-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit afce615aaabfbaad02550e75c0bec106dafa1adf Author: Stefano Brivio Date: Mon Jul 24 23:14:28 2017 +0200 ipv6: Don't increase IPSTATS_MIB_FRAGFAILS twice in ip6_fragment() RFC 2465 defines ipv6IfStatsOutFragFails as: "The number of IPv6 datagrams that have been discarded because they needed to be fragmented at this output interface but could not be." The existing implementation, instead, would increase the counter twice in case we fail to allocate room for single fragments: once for the fragment, once for the datagram. This didn't look intentional though. In one of the two affected affected failure paths, the double increase was simply a result of a new 'goto fail' statement, introduced to avoid a skb leak. The other path appears to be affected since at least 2.6.12-rc2. Reported-by: Sabrina Dubroca Fixes: 1d325d217c7f ("ipv6: ip6_fragment: fix headroom tests and skb leak") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 4 ---- 1 file changed, 4 deletions(-) commit fd2b2c57ec2020ae1b5e24717a876c71e31e5ab8 Merge: 5d4eeb8 14074ab Author: Linus Torvalds Date: Tue Jul 25 20:10:10 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three small fixes. The transfer size fixes are actually correcting some performance drops on the hpsa and smartpqi cards. The cards actually have an internal cache for request speed up but bypass it for transfers > 1MB. Since 4.3 the efficiency of our merges has rendered the cache mostly unused, so limit transfers to under 1MB to recover the cache boost" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sg: fix static checker warning in sg_is_valid_dxfer scsi: smartpqi: limit transfer length to 1MB scsi: hpsa: limit transfer length to 1MB commit 5d4eeb8a6124da65a2119601c4016ecc37e867b6 Merge: cef55b5 832e4c8 Author: Linus Torvalds Date: Tue Jul 25 19:46:05 2017 -0700 Merge tag 'uuid-for-4.13-2' of git://git.infradead.org/users/hch/uuid Pull uuid fixes from Christoph Hellwig: - add a missing "!" in the uuid tests - remove the last remaining user of the uuid_be type, and then the type and its helpers * tag 'uuid-for-4.13-2' of git://git.infradead.org/users/hch/uuid: uuid: remove uuid_be thunderbolt: use uuid_t instead of uuid_be uuid: fix incorrect uuid_equal conversion in test_uuid_test commit cef55b518c7b83020fc8bcc496402242cc921f29 Merge: 25f6a53 878ec36 Author: Linus Torvalds Date: Tue Jul 25 17:17:18 2017 -0700 Merge tag 'dma-mapping-4.13-2' of git://git.infradead.org/users/hch/dma-mapping Pull dma mapping fixes from Christoph Hellwig: "split the global dma coherent pool from the per-device pool. This fixes a regression in the earlier 4.13 pull requests where the global pool would override a per-device CMA pool (Vladimir Murzin)" * tag 'dma-mapping-4.13-2' of git://git.infradead.org/users/hch/dma-mapping: ARM: NOMMU: Wire-up default DMA interface dma-coherent: introduce interface for default DMA pool commit ecfc1599ef8759a17bf40f12a75f8420c471be9a Author: Hoan Tran Date: Fri Jul 21 15:09:29 2017 -0700 mailbox: pcc: Fix crash when request PCC channel 0 When PCCT is not available, kernel crashes as below when requests PCC channel 0. This patch fixes this issue. [ 0.920454] PCCT header not found. ... [ 8.031309] Unable to handle kernel NULL pointer dereference at virtual address 00000010 [ 8.031310] [0000000000000010] user address but active_mm is swapper [ 8.031312] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 8.031313] Modules linked in: [ 8.031316] CPU: 31 PID: 1 Comm: swapper/0 Tainted: G W 4.13.0-rc1 #18 [ 8.031317] Hardware name: AppliedMicro(R) 07/20/2017 [ 8.031318] task: ffff809ef3b08000 task.stack: ffff809ef3b10000 [ 8.031322] PC is at pcc_mbox_request_channel+0x8c/0x160 [ 8.031325] LR is at xgene_slimpro_i2c_probe+0x1c0/0x378 [ 8.031326] pc : [] lr : [] pstate: 00000045 [ 8.031327] sp : ffff809ef3b13bd0 [ 8.031327] x29: ffff809ef3b13bd0 x28: ffff000008ed90a0 [ 8.031329] x27: ffff000009091000 x26: ffff000008e50470 [ 8.031330] x25: ffff000008ed9100 x24: ffff809eefd9ac30 [ 8.031332] x23: 0000000000000000 x22: ffff0000090e3e10 [ 8.031333] x21: ffff0000090e3000 x20: 0000000000000000 [ 8.031335] x19: 0000000000000000 x18: 0000000000087ffc [ 8.031336] x17: 2fe48d76a78303f0 x16: 0000000000087ffc [ 8.031337] x15: ffff000000000000 x14: 0000000000000000 [ 8.031339] x13: 0000000000000000 x12: 0000000000000018 [ 8.031340] x11: 0000000000000018 x10: 0101010101010101 [ 8.031342] x9 : 0000000000000000 x8 : 7f7f7f7f7f7f7f7f [ 8.031343] x7 : fefefefeff6b646d x6 : 0000008080808080 [ 8.031345] x5 : 0000000000000000 x4 : 0000000000000001 [ 8.031346] x3 : 0000000000000000 x2 : ffff000008819b64 [ 8.031348] x1 : 0000000000000000 x0 : 0000000000000000 ... [ 8.031393] Call trace: [ 8.031394] Exception stack(0xffff809ef3b13a00 to 0xffff809ef3b13b30) [ 8.031395] 3a00: 0000000000000000 0001000000000000 ffff809ef3b13bd0 ffff000008899450 [ 8.031397] 3a20: ffff809f7e1f9a10 ffff000008f60be0 0000000000000001 ffff809ef3b13b7c [ 8.031398] 3a40: ffff809f7e1f9a10 0000000000000000 ffff000009091000 0000000000000003 [ 8.031399] 3a60: ffff000009091000 0000000000000003 ffff809ef3b13a80 ffff0000084e0794 [ 8.031400] 3a80: ffff809ef3b13a90 ffff00000850bb64 ffff809ef3b13ad0 ffff00000850bf34 [ 8.031402] 3aa0: 0000000000000000 0000000000000000 ffff000008819b64 0000000000000000 [ 8.031403] 3ac0: 0000000000000001 0000000000000000 0000008080808080 fefefefeff6b646d [ 8.031404] 3ae0: 7f7f7f7f7f7f7f7f 0000000000000000 0101010101010101 0000000000000018 [ 8.031405] 3b00: 0000000000000018 0000000000000000 0000000000000000 ffff000000000000 [ 8.031406] 3b20: 0000000000087ffc 2fe48d76a78303f0 [ 8.031409] [] pcc_mbox_request_channel+0x8c/0x160 [ 8.031410] [] xgene_slimpro_i2c_probe+0x1c0/0x378 [ 8.031413] [] platform_drv_probe+0x50/0xbc [ 8.031414] [] driver_probe_device+0x21c/0x2d0 [ 8.031416] [] __driver_attach+0xac/0xb0 [ 8.031417] [] bus_for_each_dev+0x58/0x98 [ 8.031418] [] driver_attach+0x20/0x28 [ 8.031419] [] bus_add_driver+0x1c8/0x22c [ 8.031421] [] driver_register+0x60/0xf4 [ 8.031422] [] __platform_driver_register+0x4c/0x54 [ 8.031425] [] xgene_slimpro_i2c_driver_init+0x18/0x20 [ 8.031426] [] do_one_initcall+0x38/0x124 [ 8.031429] [] kernel_init_freeable+0x190/0x22c [ 8.031431] [] kernel_init+0x10/0xfc [ 8.031432] [] ret_from_fork+0x10/0x50 [ 8.031434] Code: cb030e63 8b030013 b140067f 54fffda8 (f9400a61) [ 8.031448] ---[ end trace 14eb48a4e1e1f9fb ]--- Signed-off-by: Hoan Tran Acked-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/mailbox/pcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31e86cb99a3af0653f0e317fdd9c05b530c70af8 Author: Ryan Kennedy Date: Sat Jul 15 17:48:18 2017 -0400 ACPI / watchdog: Fix init failure with overlapping register regions Partially overlapping regions cause platform device creation to fail. The latter of two overlapping resources will fail to be reserved. Fix this by merging overlapping resource ranges while enumerating WDAT table entries. Signed-off-by: Ryan Kennedy Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_watchdog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ed9b66d21866ae3bf16557406258ebe6c00a9a84 Author: Shaohua Li Date: Tue Jul 25 15:18:13 2017 -0700 MD: fix warnning for UP case spin_is_locked always returns 0 for UP case, so ignores it Reported-by: Joshua Kinard Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56008c04ebc099940021b714da2d7779117cf6a7 Author: John David Anglin Date: Tue Jul 25 17:23:35 2017 -0400 parisc: Extend disabled preemption in copy_user_page It's always bothered me that we only disable preemption in copy_user_page around the call to flush_dcache_page_asm. This patch extends this to after the copy. Signed-off-by: John David Anglin Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Helge Deller arch/parisc/kernel/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae7a609c34b6fb12328c553b5f9aab26ae74a28e Author: John David Anglin Date: Tue Jul 25 17:11:26 2017 -0400 parisc: Prevent TLB speculation on flushed pages on CPUs that only support equivalent aliases Helge noticed that we flush the TLB page in flush_cache_page but not in flush_cache_range or flush_cache_mm. For a long time, we have had random segmentation faults building packages on machines with PA8800/8900 processors. These machines only support equivalent aliases. We don't see these faults on machines that don't require strict coherency. So, it appears TLB speculation sometimes leads to cache corruption on machines that require coherency. This patch adds TLB flushes to flush_cache_range and flush_cache_mm when coherency is required. We only flush the TLB in flush_cache_page when coherency is required. The patch also optimizes flush_cache_range. It turns out we always have the right context to use flush_user_dcache_range_asm and flush_user_icache_range_asm. The patch has been tested for some time on rp3440, rp3410 and A500-44. It's been boot tested on c8000. No random segmentation faults were observed during testing. Signed-off-by: John David Anglin Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Helge Deller arch/parisc/kernel/cache.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) commit e9193da00fb5624348b420717af798f01f0bfd64 Merge: 7a362ea bd912ef3 Author: Jens Axboe Date: Tue Jul 25 15:30:21 2017 -0600 Merge branch 'stable/for-jens-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus Pull xen-blkfront fixes from Konrad for 4.13. commit ba92b1142879731f80377770f4710e5f0a953aad Author: Kai-Heng Feng Date: Wed Jul 26 00:23:46 2017 +0800 ALSA: hda - Add mute led support for HP ProBook 440 G4 Mic mute led does not work on HP ProBook 440 G4. We can use CXT_FIXUP_MUTE_LED_GPIO fixup to support it. BugLink: https://bugs.launchpad.net/bugs/1705586 Signed-off-by: Kai-Heng Feng Cc: # v4.12+ Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 1 + 1 file changed, 1 insertion(+) commit 41ebafc0b881a709adb0918ccb0732455437144e Author: Eric Huang Date: Mon Jul 17 17:18:33 2017 -0400 drm/amd/powerplay: fix AVFS voltage offset for Vega10 Signed-off-by: Eric Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 4d48708c5e8cfe6010259e2b22a8cf7714a51b66 Author: Nicolai Hähnle Date: Fri Jul 14 13:00:04 2017 +0200 drm/amdgpu/gfx9: simplify and fix GRBM index selection Copy the approach taken by gfx8, which simplifies the code, and set the instance index properly. The latter is required for debugging, e.g. for reading wave status by UMR. Signed-off-by: Nicolai Hähnle Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit b7ae412c6f7050b917d8b0bf2dadb212d740d8a5 Author: Alex Xie Date: Thu Jul 20 00:02:08 2017 -0400 drm/amdgpu: Fix blocking in RCU critical section(v2) In RCU read-side critical sections, blocking or sleeping is prohibited. v2: Unlock RCU for the code path where result==NULL. (David Zhou) Update subject Tested-by and reported by: Dave Airlie [ 141.965723] ============================= [ 141.965724] WARNING: suspicious RCU usage [ 141.965726] 4.12.0-rc7 #221 Not tainted [ 141.965727] ----------------------------- [ 141.965728] /home/airlied/devel/kernel/linux-2.6/include/linux/rcupdate.h:531 Illegal context switch in RCU read-side critical section! [ 141.965730] other info that might help us debug this: [ 141.965731] rcu_scheduler_active = 2, debug_locks = 0 [ 141.965732] 1 lock held by amdgpu_cs:0/1332: [ 141.965733] #0: (rcu_read_lock){......}, at: [] amdgpu_bo_list_get+0x0/0x109 [amdgpu] [ 141.965774] stack backtrace: [ 141.965776] CPU: 6 PID: 1332 Comm: amdgpu_cs:0 Not tainted 4.12.0-rc7 #221 [ 141.965777] Hardware name: To be filled by O.E.M. To be filled by O.E.M./M5A97 R2.0, BIOS 2603 06/26/2015 [ 141.965778] Call Trace: [ 141.965782] dump_stack+0x68/0x92 [ 141.965785] lockdep_rcu_suspicious+0xf7/0x100 [ 141.965788] ___might_sleep+0x56/0x1fc [ 141.965790] __might_sleep+0x68/0x6f [ 141.965793] __mutex_lock+0x4e/0x7b5 [ 141.965817] ? amdgpu_bo_list_get+0xa4/0x109 [amdgpu] [ 141.965820] ? lock_acquire+0x125/0x1b9 [ 141.965844] ? amdgpu_bo_list_set+0x464/0x464 [amdgpu] [ 141.965846] mutex_lock_nested+0x16/0x18 [ 141.965848] ? mutex_lock_nested+0x16/0x18 [ 141.965872] amdgpu_bo_list_get+0xa4/0x109 [amdgpu] [ 141.965895] amdgpu_cs_ioctl+0x4a0/0x17dd [amdgpu] [ 141.965898] ? radix_tree_node_alloc.constprop.11+0x77/0xab [ 141.965916] drm_ioctl+0x264/0x393 [drm] [ 141.965939] ? amdgpu_cs_find_mapping+0x83/0x83 [amdgpu] [ 141.965942] ? trace_hardirqs_on_caller+0x16a/0x186 Signed-off-by: Alex Xie Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 7a362ea96d0df873397be04f4556e92f7e37c5ec Author: Josef Bacik Date: Tue Jul 25 13:31:19 2017 -0400 nbd: clear disconnected on reconnect If our device loses its connection for longer than the dead timeout we will set NBD_DISCONNECTED in order to quickly fail any pending IO's that flood in after the IO's that were waiting during the dead timer. However if we re-connect at some point in the future we'll still see this DISCONNECTED flag set if we then lose our connection again after that, which means we won't get notifications for our newly lost connections. Fix this by just clearing the DISCONNECTED flag on reconnect in order to make sure everything works as it's supposed to. Reported-by: Dan Melnic Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 2 ++ 1 file changed, 2 insertions(+) commit 56188832a50f09998cb570ba3771a1d25c193c0e Author: Helge Deller Date: Tue Jul 25 21:41:41 2017 +0200 parisc: Suspend lockup detectors before system halt Some machines can't power off the machine, so disable the lockup detectors to avoid this watchdog BUG to show up every few seconds: watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [systemd-shutdow:1] Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # 4.9+ arch/parisc/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) commit c46bafc4d2536a079455706cf31582b67192d5b7 Author: Helge Deller Date: Tue Jul 25 20:12:25 2017 +0200 parisc: Show DIMM slot number which holds broken memory module The Page Deallocation Table (PDT) holds the physical addresses of all broken memory addresses. With the physical address we now are able to show which DIMM slot (e.g. 1a, 3c) actually holds the broken memory module so that users are able to replace it. Signed-off-by: Helge Deller arch/parisc/kernel/pdt.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 783692558a60cd69d8d86900b33846263598ca6c Author: Phil Sutter Date: Tue Jul 25 13:36:21 2017 +0200 lib: test_rhashtable: Fix KASAN warning I forgot one spot when introducing struct test_obj_val. Fixes: e859afe1ee0c5 ("lib: test_rhashtable: fix for large entry counts") Reported by: kernel test robot Signed-off-by: Phil Sutter Signed-off-by: David S. Miller lib/test_rhashtable.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2eaa38d9fcba5294182268b8d11770cf3fdc9bc9 Author: Marc Gonzalez Date: Tue Jul 25 11:08:15 2017 +0200 net: phy: Remove trailing semicolon in macro definition Commit e5a03bfd873c2 ("phy: Add an mdio_device structure") introduced a spurious trailing semicolon. Remove it. Signed-off-by: Marc Gonzalez Signed-off-by: David S. Miller include/linux/phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edbe9597aca2e2601e6e152bdea200b6cf1b8b47 Author: Mikulas Patocka Date: Fri Jul 21 11:56:46 2017 -0400 dm zoned: remove test for impossible REQ_OP_FLUSH conditions The value REQ_OP_FLUSH is only used by the block code for request-based devices. Remove the tests for REQ_OP_FLUSH from the bio-based dm-zoned-target. Signed-off-by: Mikulas Patocka Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-zoned-target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac6a318888f6b94925de603d4563edf7e86e04c8 Author: Heinz Mauelshagen Date: Thu Jul 13 17:52:18 2017 +0200 dm raid: bump target version Bumo dm-raid target version to 1.12.1 to reflect that commit cc27b0c78c ("md: fix deadlock between mddev_suspend() and md_write_start()") is available. This version change allows userspace to detect that MD fix is available. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-raid.txt | 1 + drivers/md/dm-raid.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 0cf352e5a00a0ccf362e4ae60dcaa3318933f6e4 Author: Heinz Mauelshagen Date: Thu Jul 13 17:34:24 2017 +0200 dm raid: avoid mddev->suspended access Use runtime flag to ensure that an mddev gets suspended/resumed just once. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f4af3f82daed14ea06ac22eac198a45f56eb2cb1 Author: Heinz Mauelshagen Date: Thu Jul 13 17:36:12 2017 +0200 dm raid: fix activation check in validate_raid_redundancy() During growing reshapes (i.e. stripes being added to a raid set), the new stripe images are not in-sync and not part of the raid set until the reshape is started. LVM2 has to request multiple table reloads involving superblock updates in order to reflect proper size of SubLVs in the cluster. Before a stripe adding reshape starts, validate_raid_redundancy() fails as a result of that because it checks the total number of devices against the number of rebuild ones rather than the actual ones in the raid set (as retrieved from the superblock) thus resulting in failed raid4/5/6/10 redundancy checks. E.g. convert 3 stripes -> 7 stripes raid5 (which only allows for maximum 1 device to fail) requesting +4 delta disks causing 4 devices to rebuild during reshaping thus failing activation. To fix this, move validate_raid_redundancy() to get access to the current raid_set members. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bbac1e06a415c0658dd328ba9c5f640c2d97be3a Author: Heinz Mauelshagen Date: Thu Jul 13 17:33:22 2017 +0200 dm raid: remove WARN_ON() in raid10_md_layout_to_format() Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0a94efb5acbb6980d7c9ab604372d93cd507e4d8 Author: Tejun Heo Date: Sun Jul 23 08:36:15 2017 -0400 workqueue: implicit ordered attribute should be overridable 5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered") automatically enabled ordered attribute for unbound workqueues w/ max_active == 1. Because ordered workqueues reject max_active and some attribute changes, this implicit ordered mode broke cases where the user creates an unbound workqueue w/ max_active == 1 and later explicitly changes the related attributes. This patch distinguishes explicit and implicit ordered setting and overrides from attribute changes if implict. Signed-off-by: Tejun Heo Fixes: 5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered") include/linux/workqueue.h | 4 +++- kernel/workqueue.c | 13 +++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) commit 25a9b76597fafbbf688dd4473cb910568deb2b0c Author: Helge Deller Date: Tue Jul 25 19:26:23 2017 +0200 parisc: Add function to return DIMM slot of physical address Add a firmware wrapper function, which asks PDC firmware for the DIMM slot of a physical address. This is needed to show users which DIMM module needs replacement in case a broken DIMM was encountered. Signed-off-by: Helge Deller arch/parisc/include/asm/pdcpat.h | 16 +++++++++++++++- arch/parisc/kernel/firmware.c | 25 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) commit dce4551cb2adb1ac9a30f8ab5299d614392b3cff Author: Paolo Abeni Date: Tue Jul 25 17:57:47 2017 +0200 udp: preserve head state for IP_CMSG_PASSSEC Paul Moore reported a SELinux/IP_PASSSEC regression caused by missing skb->sp at recvmsg() time. We need to preserve the skb head state to process the IP_CMSG_PASSSEC cmsg. With this commit we avoid releasing the skb head state in the BH even if a secpath is attached to the current skb, and stores the skb status (with/without head states) in the scratch area, so that we can access it at skb deallocation time, without incurring in cache-miss penalties. This also avoids misusing the skb CB for ipv6 packets, as introduced by the commit 0ddf3fb2c43d ("udp: preserve skb->dst if required for IP options processing"). Clean a bit the scratch area helpers implementation, to reduce the code differences between 32 and 64 bits build. Reported-by: Paul Moore Fixes: 0a463c78d25b ("udp: avoid a cache miss on dequeue") Fixes: 0ddf3fb2c43d ("udp: preserve skb->dst if required for IP options processing") Signed-off-by: Paolo Abeni Tested-by: Paul Moore Signed-off-by: David S. Miller include/net/udp.h | 33 ++++++++++++++++++++++----------- net/ipv4/udp.c | 38 ++++++++++++++++++-------------------- 2 files changed, 40 insertions(+), 31 deletions(-) commit f520e55241e1cf0c10d308ccf47513f28533f60a Author: Helge Deller Date: Tue Jul 25 18:20:54 2017 +0200 parisc: Fix crash when calling PDC_PAT_MEM PDT firmware function Commit c9c2877d08d9 ("parisc: Add Page Deallocation Table (PDT) support") introduced the pdc_pat_mem_read_pd_pdt() firmware helper function, which crashed the system because it trashed the stack if the pdc_pat_mem_read_pd_retinfo struct was located on the stack (and which is in size less than the required 32 64-bit values). Fix it by using the pdc_result struct instead when calling firmware and copy the return values back into the result struct when finished sucessfully. While debugging this code I noticed that the pdc_type wasn't set correctly either, so let's fix that too. Fixes: c9c2877d08d9 ("parisc: Add Page Deallocation Table (PDT) support") Signed-off-by: Helge Deller arch/parisc/kernel/firmware.c | 11 +++++++++-- arch/parisc/kernel/pdt.c | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) commit 50cdb7c61b019a732fe34635a7cbf2a7487f5e90 Author: Christoph Hellwig Date: Tue Jul 25 17:39:07 2017 +0200 nvme-pci: fix HMB size calculation It's possible the preferred HMB size may not be a multiple of the chunk_size. This patch moves len to function scope and uses that in the for loop increment so the last iteration doesn't cause the total size to exceed the allocated HMB size. Based on an earlier patch from Keith Busch. Signed-off-by: Christoph Hellwig Reported-by: Dan Carpenter Reviewed-by: Keith Busch Fixes: 87ad72a59a38 ("nvme-pci: implement host memory buffer support") drivers/nvme/host/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9c5358e15ca12ed3dc3b1e51671dee5d155de8e0 Author: James Smart Date: Mon Jul 17 13:59:39 2017 -0700 nvme-fc: revise TRADDR parsing The FC-NVME spec hasn't locked down on the format string for TRADDR. Currently the spec is lobbying for "nn-<16hexdigits>:pn-<16hexdigits>" where the wwn's are hex values but not prefixed by 0x. Most implementations so far expect a string format of "nn-0x<16hexdigits>:pn-0x<16hexdigits>" to be used. The transport uses the match_u64 parser which requires a leading 0x prefix to set the base properly. If it's not there, a match will either fail or return a base 10 value. The resolution in T11 is pushing out. Therefore, to fix things now and to cover any eventuality and any implementations already in the field, this patch adds support for both formats. The change consists of replacing the token matching routine with a routine that validates the fixed string format, and then builds a local copy of the hex name with a 0x prefix before calling the system parser. Note: the same parser routine exists in both the initiator and target transports. Given this is about the only "shared" item, we chose to replicate rather than create an interdendency on some shared code. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 102 ++++++++++++++++++++++++----------------------- drivers/nvme/target/fc.c | 101 ++++++++++++++++++++++++---------------------- include/linux/nvme-fc.h | 19 +++++++++ 3 files changed, 125 insertions(+), 97 deletions(-) commit 8b25f351929b5a5216ccb2c8882965134019679d Author: James Smart Date: Tue Jul 18 14:29:34 2017 -0700 nvme-fc: address target disconnect race conditions in fcp io submit There are cases where threads are in the process of submitting new io when the LLDD calls in to remove the remote port. In some cases, the next io actually goes to the LLDD, who knows the remoteport isn't present and rejects it. To properly recovery/restart these i/o's we don't want to hard fail them, we want to treat them as temporary resource errors in which a delayed retry will work. Add a couple more checks on remoteport connectivity and commonize the busy response handling when it's seen. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 2fd4167fadd1360ab015e4f0e88e51843e49556c Author: Jon Derrick Date: Wed Jul 12 10:58:19 2017 -0600 nvme: fabrics commands should use the fctype field for data direction Fabrics commands with opcode 0x7F use the fctype field to indicate data direction. Signed-off-by: Jon Derrick Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Fixes: eb793e2c ("nvme.h: add NVMe over Fabrics definitions") include/linux/nvme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6484f5d16f9d5368afac61091972242f3bd695a9 Author: Johannes Thumshirn Date: Wed Jul 12 15:38:56 2017 +0200 nvme: also provide a UUID in the WWID sysfs attribute The WWID sysfs attribute can provide multiple means of a World Wide ID for a NVMe device. It can either be a NGUID, a EUI-64 or a concatenation of VID, Serial Number, Model and the Namespace ID in this order of preference. If the target also sends us a UUID use the UUID for identification and give it the highest priority. This eases generation of /dev/disk/by-* symlinks. Signed-off-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 25f6a53799d667283d3bee29a6ac75ae3dae38dc Merge: a9d0683 f070e5a Author: Linus Torvalds Date: Tue Jul 25 08:51:57 2017 -0700 Merge tag 'jfs-4.13' of git://github.com/kleikamp/linux-shaggy Pull JFS fixes from David Kleikamp. * tag 'jfs-4.13' of git://github.com/kleikamp/linux-shaggy: jfs: preserve i_mode if __jfs_set_acl() fails jfs: Don't clear SGID when inheriting ACLs jfs: atomically read inode size commit a9d0683e0b62b46c7a5d0ebd8f642d8f9a4b7b32 Merge: eeb7c41 c228352 Author: Linus Torvalds Date: Tue Jul 25 08:49:00 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - regression fix (missing IRQs) for devices that require 'always poll' quirk, from Dmitry Torokhov - new device ID addition to Ortek driver, from Benjamin Tissoires * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: ortek: add one more buggy device HID: usbhid: fix "always poll" quirk commit eeb7c41d9d7c0902accb1d481fe78d84d30c69cc Merge: 520eccd 97ca7bf Author: Linus Torvalds Date: Tue Jul 25 08:44:27 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Three bug fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/mm: set change and reference bit on lazy key enablement s390: chp: handle CRW_ERC_INIT for channel-path status change s390/perf: fix problem state detection commit 6215894e11de224183c89b001f5363912442b489 Author: Darrick J. Wong Date: Fri Jul 21 11:04:23 2017 -0700 xfs: check that dir block entries don't off the end of the buffer When we're checking the entries in a directory buffer, make sure that the entry length doesn't push us off the end of the buffer. Found via xfs/388 writing ones to the length fields. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_dir2_data.c | 4 ++++ 1 file changed, 4 insertions(+) commit bd912ef3e46b6edb51bb8af4b73fd2be7817e305 Author: Dongli Zhang Date: Wed Jun 28 20:57:28 2017 +0800 xen/blkfront: always allocate grants first from per-queue persistent grants This patch partially reverts 3df0e50 ("xen/blkfront: pseudo support for multi hardware queues/rings"). The xen-blkfront queue/ring might hang due to grants allocation failure in the situation when gnttab_free_head is almost empty while many persistent grants are reserved for this queue/ring. As persistent grants management was per-queue since 73716df ("xen/blkfront: make persistent grants pool per-queue"), we should always allocate from persistent grants first. Acked-by: Roger Pau Monné Signed-off-by: Dongli Zhang Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 4b422cb99836de3d261faec20a0329385bdec43d Author: Junxiao Bi Date: Thu Jul 20 09:26:21 2017 +0800 xen-blkfront: fix mq start/stop race When ring buf full, hw queue will be stopped. While blkif interrupt consume request and make free space in ring buf, hw queue will be started again. But since start queue is protected by spin lock while stop not, that will cause a race. interrupt: process: blkif_interrupt() blkif_queue_rq() kick_pending_request_queues_locked() blk_mq_start_stopped_hw_queues() clear_bit(BLK_MQ_S_STOPPED, &hctx->state) blk_mq_stop_hw_queue(hctx) blk_mq_run_hw_queue(hctx, async) If ring buf is made empty in this case, interrupt will never come, then the hw queue will be stopped forever, all processes waiting for the pending io in the queue will hung. Signed-off-by: Junxiao Bi Reviewed-by: Ankur Arora Acked-by: Roger Pau Monné Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edc11d49f88e3281457853a530c9e5a5540b355a Author: Dan Carpenter Date: Wed Jul 12 10:26:34 2017 +0300 dm bufio: fix error code in dm_bufio_write_dirty_buffers() We should be returning normal negative error codes here. The "a" variables comes from &c->async_write_error which is a blk_status_t converted to a regular error code. In the current code, the blk_status_t gets propogated back to pool_create() and eventually results in an Oops. Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t") Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bc86a41e96c5b6f07453c405e036d95acc673389 Author: Mikulas Patocka Date: Fri Jul 21 11:58:38 2017 -0400 dm integrity: test for corrupted disk format during table load If the dm-integrity superblock was corrupted in such a way that the journal_sections field was zero, the integrity target would deadlock because it would wait forever for free space in the journal. Detect this situation and refuse to activate the device. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Fixes: 7eada909bfd7 ("dm: add integrity target") Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 5 +++++ 1 file changed, 5 insertions(+) commit aa03a91ffaefcffb397cddf88b97215b3eff726d Author: Mikulas Patocka Date: Fri Jul 21 13:16:06 2017 -0400 dm integrity: WARN_ON if variables representing journal usage get out of sync If this WARN_ON triggers it speaks to programmer error, and likely implies corruption, but no released kernel should trigger it. This WARN_ON serves to assist DM integrity developers as changes are made/tested in the future. BUG_ON is excessive for catching programmer error, if a user or developer would like warnings to trigger a panic, they can enable that via /proc/sys/kernel/panic_on_warn Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 2 ++ 1 file changed, 2 insertions(+) commit cfa0ebc9d6d6308564f5174ecb655b9d504b2be5 Author: Andrew Jones Date: Mon Jul 24 15:38:32 2017 +0200 virtio-net: fix module unloading Unregister the driver before removing multi-instance hotplug callbacks. This order avoids the warning issued from __cpuhp_remove_state_cpuslocked when the number of remaining instances isn't yet zero. Fixes: 8017c279196a ("net/virtio-net: Convert to hotplug state machine") Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Jones Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9aada5fff212913372410ae45c18c7c3cade67a Author: Wei Wang Date: Wed Jul 12 20:40:15 2017 +0800 virtio-balloon: coding format cleanup Clean up the comment format. Signed-off-by: Wei Wang Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 195a8c43e93d8cec3256f4433f641bd4db35e23c Author: Liang Li Date: Wed Jul 12 20:40:14 2017 +0800 virtio-balloon: deflate via a page list This patch saves the deflated pages to a list, instead of the PFN array. Accordingly, the balloon_pfn_to_page() function is removed. Signed-off-by: Liang Li Signed-off-by: Michael S. Tsirkin Signed-off-by: Wei Wang Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit f53d5aa050dafe19bb4a1e37d73880aee2490a68 Author: Andy Shevchenko Date: Fri Jun 9 15:07:42 2017 +0300 virtio_blk: Use sysfs_match_string() helper Use sysfs_match_string() helper instead of open coded variant. Cc: "Michael S. Tsirkin" Cc: Jason Wang Signed-off-by: Andy Shevchenko Signed-off-by: Michael S. Tsirkin Reviewed-by: Jason Wang drivers/block/virtio_blk.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7e5a672289c9754d07e1c3b33649786d3d70f5e4 Author: Suzuki K Poulose Date: Wed Jul 5 09:57:00 2017 +0100 KVM: arm/arm64: Handle hva aging while destroying the vm The mmu_notifier_release() callback of KVM triggers cleaning up the stage2 page table on kvm-arm. However there could be other notifier callbacks in parallel with the mmu_notifier_release(), which could cause the call backs ending up in an empty stage2 page table. Make sure we check it for all the notifier callbacks. Cc: stable@vger.kernel.org Fixes: commit 293f29363 ("kvm-arm: Unmap shadow pagetables properly") Reported-by: Alex Graf Reviewed-by: Christoffer Dall Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier virt/kvm/arm/mmu.c | 4 ++++ 1 file changed, 4 insertions(+) commit d9f89b4e9290e46cd9b273e9ad0bff0f93e86fae Author: Andrew Jones Date: Sat Jul 1 18:26:54 2017 +0200 KVM: arm/arm64: PMU: Fix overflow interrupt injection kvm_pmu_overflow_set() is called from perf's interrupt handler, making the call of kvm_vgic_inject_irq() from it introduced with "KVM: arm/arm64: PMU: remove request-less vcpu kick" a really bad idea, as it's quite easy to try and retake a lock that the interrupted context is already holding. The fix is to use a vcpu kick, leaving the interrupt injection to kvm_pmu_sync_hwstate(), like it was doing before the refactoring. We don't just revert, though, because before the kick was request-less, leaving the vcpu exposed to the request-less vcpu kick race, and also because the kick was used unnecessarily from register access handlers. Reviewed-by: Christoffer Dall Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 2 +- include/kvm/arm_pmu.h | 2 -- virt/kvm/arm/pmu.c | 43 +++++++++++++++---------------------------- 3 files changed, 16 insertions(+), 31 deletions(-) commit 79962a5c8ba5b33f49d88a058e2124bf2ff3c034 Author: Shanker Donthineni Date: Sat Jul 8 08:48:30 2017 -0500 KVM: arm/arm64: Fix bug in advertising KVM_CAP_MSI_DEVID capability Commit 0e4e82f154e3 ("KVM: arm64: vgic-its: Enable ITS emulation as a virtual MSI controller") tried to advertise KVM_CAP_MSI_DEVID, but the code logic was not updating the dist->msis_require_devid field correctly. If hypervisor tool creates the ITS device after VGIC initialization then we don't advertise KVM_CAP_MSI_DEVID capability. Update the field msis_require_devid to true inside vgic_its_create() to fix the issue. Fixes: 0e4e82f154e3 ("vgic-its: Enable ITS emulation as a virtual MSI controller") Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-init.c | 3 --- virt/kvm/arm/vgic/vgic-its.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) commit efe6f241602cb61466895f6816b8ea6b90f04d4e Author: Suravee Suthikulpanit Date: Wed Jul 5 21:29:59 2017 -0500 iommu/amd: Enable ga_log_intr when enabling guest_mode IRTE[GALogIntr] bit should set when enabling guest_mode, which enables IOMMU to generate entry in GALog when IRTE[IsRun] is not set, and send an interrupt to notify IOMMU driver. Signed-off-by: Suravee Suthikulpanit Cc: Joerg Roedel Cc: stable@vger.kernel.org # v4.9+ Fixes: d98de49a53e48 ('iommu/amd: Enable vAPIC interrupt remapping mode by default') Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 1 + 1 file changed, 1 insertion(+) commit a46cdc4c630309684ae2dec07ffd47322334bf43 Merge: 520eccd 7655739 Author: Joerg Roedel Date: Tue Jul 25 15:00:04 2017 +0200 Merge branch 'for-joerg/arm-smmu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into iommu/fixes commit 4f899147424a189b0ad1fdd6f35784ed5a642e83 Author: Christian Borntraeger Date: Mon Jul 10 13:35:48 2017 +0200 KVM: s390: take srcu lock when getting/setting storage keys The following warning was triggered by missing srcu locks around the storage key handling functions. ============================= WARNING: suspicious RCU usage 4.12.0+ #56 Not tainted ----------------------------- ./include/linux/kvm_host.h:572 suspicious rcu_dereference_check() usage! rcu_scheduler_active = 2, debug_locks = 1 1 lock held by live_migration/4936: #0: (&mm->mmap_sem){++++++}, at: [<0000000000141be0>] kvm_arch_vm_ioctl+0x6b8/0x22d0 CPU: 8 PID: 4936 Comm: live_migration Not tainted 4.12.0+ #56 Hardware name: IBM 2964 NC9 704 (LPAR) Call Trace: ([<000000000011378a>] show_stack+0xea/0xf0) [<000000000055cc4c>] dump_stack+0x94/0xd8 [<000000000012ee70>] gfn_to_memslot+0x1a0/0x1b8 [<0000000000130b76>] gfn_to_hva+0x2e/0x48 [<0000000000141c3c>] kvm_arch_vm_ioctl+0x714/0x22d0 [<000000000013306c>] kvm_vm_ioctl+0x11c/0x7b8 [<000000000037e2c0>] do_vfs_ioctl+0xa8/0x6c8 [<000000000037e984>] SyS_ioctl+0xa4/0xb8 [<00000000008b20a4>] system_call+0xc4/0x27c 1 lock held by live_migration/4936: #0: (&mm->mmap_sem){++++++}, at: [<0000000000141be0>] kvm_arch_vm_ioctl+0x6b8/0x22d0 Signed-off-by: Christian Borntraeger Reviewed-by: Pierre Morel arch/s390/kvm/kvm-s390.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4ecf7191fdcc5686c1eb2b06d7f93ce29d636cf0 Author: Stefan Assmann Date: Mon Jul 24 14:22:48 2017 +0200 x86/efi: Fix reboot_mode when EFI runtime services are disabled When EFI runtime services are disabled, for example by the "noefi" kernel cmdline parameter, the reboot_type could still be set to BOOT_EFI causing reboot to fail. Fix this by checking if EFI runtime services are enabled. Signed-off-by: Stefan Assmann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170724122248.24006-1-sassmann@kpanic.de [ Fixed 'not disabled' double negation. ] Signed-off-by: Ingo Molnar arch/x86/kernel/reboot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6c423f5751b9f68bfe7c7545519d4c7159f93e1b Author: Jonathan Corbet Date: Mon Jul 24 13:58:00 2017 -0600 sched/wait: Clean up some documentation warnings A couple of kerneldoc comments in had incorrect names for macro parameters, with this unsightly result: ./include/linux/wait.h:555: warning: No description found for parameter 'wq' ./include/linux/wait.h:555: warning: Excess function parameter 'wq_head' description in 'wait_event_interruptible_hrtimeout' ./include/linux/wait.h:759: warning: No description found for parameter 'wq_head' ./include/linux/wait.h:759: warning: Excess function parameter 'wq' description in 'wait_event_killable' Correct the comments and kill the warnings. Signed-off-by: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/20170724135800.769c4042@lwn.net Signed-off-by: Ingo Molnar include/linux/wait.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bf50f0e8a03005d19de66d01261d855cdeedf572 Author: Jonathan Corbet Date: Mon Jul 24 13:56:28 2017 -0600 sched/core: Fix some documentation build warnings The kerneldoc comments for try_to_wake_up_local() were out of date, leading to these documentation build warnings: ./kernel/sched/core.c:2080: warning: No description found for parameter 'rf' ./kernel/sched/core.c:2080: warning: Excess function parameter 'cookie' description in 'try_to_wake_up_local' Update the comment to reflect current reality and give us some peace and quiet. Signed-off-by: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/20170724135628.695cecfc@lwn.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18d5e6c34a8eda438d5ad8b3b15f42dab01bf05d Author: Michael Davidson Date: Mon Jul 24 16:51:55 2017 -0700 x86/boot: #undef memcpy() et al in string.c undef memcpy() and friends in boot/string.c so that the functions defined here will have the correct names, otherwise we end up up trying to redefine __builtin_memcpy() etc. Surprisingly, GCC allows this (and, helpfully, discards the __builtin_ prefix from the function name when compiling it), but clang does not. Adding these #undef's appears to preserve what I assume was the original intent of the code. Signed-off-by: Michael Davidson Signed-off-by: Matthias Kaehlcke Acked-by: H. Peter Anvin Cc: Arnd Bergmann Cc: Bernhard.Rosenkranzer@linaro.org Cc: Greg Hackmann Cc: Kees Cook Cc: Linus Torvalds Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170724235155.79255-1-mka@chromium.org Signed-off-by: Ingo Molnar arch/x86/boot/string.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 288be97cc74e31b7871c75eb11a8dd768dcb535d Author: Ard Biesheuvel Date: Wed Jul 12 15:44:14 2017 +0100 arm64/lib: copy_page: use consistent prefetch stride The optional prefetch instructions in the copy_page() routine are inconsistent: at the start of the function, two cachelines are prefetched beyond the one being loaded in the first iteration, but in the loop, the prefetch is one more line ahead. This appears to be unintentional, so let's fix it. While at it, fix the comment style and white space. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/lib/copy_page.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit cfd10811080f5bb0592e21d0b197d445f133ba9e Merge: 739b000 38bcb20 Author: Dave Airlie Date: Tue Jul 25 15:41:39 2017 +1000 Merge branch 'linux-4.13' of git://github.com/skeggsb/linux into drm-fixes two more fixes for issues nouveau found in fedora 26. * 'linux-4.13' of git://github.com/skeggsb/linux: drm/nouveau/bar/gf100: fix access to upper half of BAR2 drm/nouveau/disp/nv50-: bump max chans to 21 commit 38bcb208f60924a031b9f809f7cd252ea4a94e5f Author: Ben Skeggs Date: Tue Jul 25 11:06:47 2017 +1000 drm/nouveau/bar/gf100: fix access to upper half of BAR2 Bit 30 being set causes the upper half of BAR2 to stay in physical mode, mapped over the end of VRAM, even when the rest of the BAR has been set to virtual mode. We inherited our initial value from RM, but I'm not aware of any reason we need to keep it that way. This fixes severe GPU hang/lockup issues revealed by Wayland on F26. Shout-out to NVIDIA for the quick response with the potential cause! Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org # 4.3+ drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a90e049cacd965dade4dae7263b4d3fd550e78b6 Author: Ilia Mirkin Date: Wed Jun 28 08:24:45 2017 -0400 drm/nouveau/disp/nv50-: bump max chans to 21 GP102's cursors go from chan 17..20. Increase the array size to hold their data properly. Fixes: e50fcff15f ("drm/nouveau/disp/gp102: fix cursor/overlay immediate channel indices") Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26a201a2ba82a801973ce29e1004b64742e81e7e Author: Jian Jun Chen Date: Wed Jul 19 13:16:56 2017 +0800 drm/i915/gvt: Extend KBL platform support in GVT-g Extend KBL platform support in GVT-g. Validation tests are done on KBL server and KBL NUC. Both show the same quality. Signed-off-by: Jian Jun Chen Cc: Zhenyu Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/intel_gvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c67521821acd900d7508f37e49d0b494011106d Author: Dan Carpenter Date: Wed Jul 12 10:31:21 2017 +0300 scsi: qedi: Fix return code in qedi_ep_connect() We shouldn't be writing over the "ret" variable. It means we return ERR_PTR(0) which is NULL and it results in a NULL dereference in the caller. Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_iscsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cd069bb9f9ff13b23492fda6ccdb458ac4f641ca Author: Arnd Bergmann Date: Fri Jul 21 22:53:46 2017 +0200 scsi: lpfc: fix linking against modular NVMe support When LPFC is built-in but NVMe is a loadable module, we fail to link the kernel: drivers/scsi/built-in.o: In function `lpfc_nvme_create_localport': (.text+0x156a82): undefined reference to `nvme_fc_register_localport' drivers/scsi/built-in.o: In function `lpfc_nvme_destroy_localport': (.text+0x156eaa): undefined reference to `nvme_fc_unregister_remoteport' We can avoid this either by forcing lpfc to be a module, or by disabling NVMe support in this case. This implements the former. Fixes: 7d7080335f8d ("scsi: lpfc: Finalize Kconfig options for nvme") Cc: stable@vger.kernel.org Link: https://patchwork.kernel.org/patch/9636569/ Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 260f4aeddb48b16b2f4da306f4d97d44ef102f6b Author: Hannes Reinecke Date: Mon Jul 24 12:09:36 2017 +0200 scsi: scsi_transport_fc: return -EBUSY for deleted vport When trying to delete a vport via 'vport_delete' sysfs attribute we should be checking if the port is already in state VPORT_DELETING; if so there's no need to do anything. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5029271072bf55afa6d836180ee93af09b26ab8b Author: Varun Prakash Date: Sun Jul 23 20:01:32 2017 +0530 scsi: libcxgbi: add check for valid cxgbi_task_data In error case it is possible that ->cleanup_task() gets called without calling ->alloc_pdu() in this case cxgbi_task_data is not valid, so add a check for for valid cxgbi_task_data in cxgbi_cleanup_task(). Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/libcxgbi.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 516b7db593f3a541e2e98867575c3c697f41a247 Author: Jakub Kicinski Date: Tue Jul 18 18:58:34 2017 -0700 scsi: aic7xxx: fix firmware build with O=path Building firmware with O=path was apparently broken in aic7 for ever. Message of the previous commit to the Makefile (from 2008) mentions this unfortunate state of affairs already. Fix this, mostly to make randconfig builds more reliable. Signed-off-by: Jakub Kicinski Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/aic7xxx/Makefile | 12 ++++---- drivers/scsi/aic7xxx/aicasm/Makefile | 53 ++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 30 deletions(-) commit 70c54e210ee9a2939f39ca58ee0b52afa24addec Author: Shu Wang Date: Fri Jul 21 18:54:09 2017 +0800 scsi: megaraid_sas: fix memleak in megasas_alloc_cmdlist_fusion Found this issue by kmemleak, a few kb mem was leaked in megasas_alloc_cmdlist_fusion when kzalloc failed for one megasas_cmd_fusion allocation. unreferenced object 0xffff88045dbd2000 (size 8192): comm "systemd-udevd", pid 323, jiffies 4294671759 (age 49.008s) backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc+0xe8/0x220 [] megasas_alloc_cmdlist_fusion+0x34/0xe0 [megaraid_sas] (gdb) list *megasas_alloc_cmdlist_fusion+0x34 0xd5c4 is in megasas_alloc_cmdlist_fusion (drivers/scsi/megaraid/megaraid_sas_fusion.c:443). [] megasas_alloc_cmds_fusion+0x25/0x410 [megaraid_sas] [] megasas_init_adapter_fusion+0x21f/0x640 [megaraid_sas] [] megasas_init_fw+0x357/0xd30 [megaraid_sas] [] megasas_probe_one.part.33+0x636/0x1100 [megaraid_sas] [] megasas_probe_one+0x46/0xc0 [megaraid_sas] [] local_pci_probe+0x45/0xa0 [] pci_device_probe+0x192/0x1b0 [] driver_probe_device+0x2a8/0x460 [] __driver_attach+0xdd/0xe0 [] bus_for_each_dev+0x6c/0xc0 [] driver_attach+0x1e/0x20 [] bus_add_driver+0x45/0x270 [] driver_register+0x60/0xe0 unreferenced object 0xffff880454ce3600 (size 192): backtrace: [] kmemleak_alloc+0x4a/0xa0 [] kmem_cache_alloc_trace+0xca/0x1d0 [] megasas_alloc_cmdlist_fusion+0x77/0xe0 [megaraid_sas] (gdb) list *megasas_alloc_cmdlist_fusion+0x77 0xd607 is in megasas_alloc_cmdlist_fusion (drivers/scsi/megaraid/megaraid_sas_fusion.c:450). [] megasas_alloc_cmds_fusion+0x25/0x410 [megaraid_sas] [] megasas_init_adapter_fusion+0x21f/0x640 [megaraid_sas] [] megasas_init_fw+0x357/0xd30 [megaraid_sas] [] megasas_probe_one.part.33+0x636/0x1100 [megaraid_sas] [] megasas_probe_one+0x46/0xc0 [megaraid_sas] [] local_pci_probe+0x45/0xa0 [] pci_device_probe+0x192/0x1b0 [] driver_probe_device+0x2a8/0x460 [] __driver_attach+0xdd/0xe0 [] bus_for_each_dev+0x6c/0xc0 [] driver_attach+0x1e/0x20 [] bus_add_driver+0x45/0x270 [] driver_register+0x60/0xe0 Signed-off-by: Shu Wang Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit cc20c29ebc70a227c8bffa46ffc672f81fefa6d7 Author: Nilesh Javali Date: Wed Jul 19 02:07:55 2017 -0700 scsi: qedi: Add ISCSI_BOOT_SYSFS to Kconfig qedi uses iscsi_boot_sysfs to export the targets used for boot to sysfs. Select the config option to make sure the module is built. This addresses the compile time issue, drivers/scsi/qedi/qedi_main.o: In function `qedi_remove': qedi_main.c:(.text+0x3bbd): undefined reference to `iscsi_boot_destroy_kset' drivers/scsi/qedi/qedi_main.o: In function `__qedi_probe.constprop.0': qedi_main.c:(.text+0x577a): undefined reference to `iscsi_boot_create_target' qedi_main.c:(.text+0x5807): undefined reference to `iscsi_boot_create_target' qedi_main.c:(.text+0x587f): undefined reference to `iscsi_boot_create_initiator' qedi_main.c:(.text+0x58f3): undefined reference to `iscsi_boot_create_ethernet' qedi_main.c:(.text+0x5927): undefined reference to `iscsi_boot_destroy_kset' qedi_main.c:(.text+0x5d7b): undefined reference to `iscsi_boot_create_host_kset' [mkp: fixed whitespace] Signed-off-by: Nilesh Javali Fixes: c57ec8fb7c02 ("scsi: qedi: Add support for Boot from SAN over iSCSI offload") Reported-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/qedi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9f9e772da2db279c8d8c9206d271b8009c9093f4 Author: Florian Fainelli Date: Mon Jul 24 10:49:23 2017 -0700 net: dsa: Initialize ds->cpu_port_mask earlier The mt7530 driver has its dsa_switch_ops::get_tag_protocol function check ds->cpu_port_mask to issue a warning in case the configured CPU port is not capable of supporting tags. After commit 14be36c2c96c ("net: dsa: Initialize all CPU and enabled ports masks in dsa_ds_parse()") we slightly re-arranged the initialization such that this was no longer working. Just make sure that ds->cpu_port_mask is set prior to the first call to get_tag_protocol, thus restoring the expected contract. In case of error, the CPU port bit is cleared. Fixes: 14be36c2c96c ("net: dsa: Initialize all CPU and enabled ports masks in dsa_ds_parse()") Reported-by: Sean Wang Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit c800aaf8d869f2b9b47b10c5c312fe19f0a94042 Author: WANG Cong Date: Mon Jul 24 10:07:32 2017 -0700 packet: fix use-after-free in prb_retire_rx_blk_timer_expired() There are multiple reports showing we have a use-after-free in the timer prb_retire_rx_blk_timer_expired(), where we use struct tpacket_kbdq_core::pkbdq, a pg_vec, after it gets freed by free_pg_vec(). The interesting part is it is not freed via packet_release() but via packet_setsockopt(), which means we are not closing the socket. Looking into the big and fat function packet_set_ring(), this could happen if we satisfy the following conditions: 1. closing == 0, not on packet_release() path 2. req->tp_block_nr == 0, we don't allocate a new pg_vec 3. rx_ring->pg_vec is already set as V3, which means we already called packet_set_ring() wtih req->tp_block_nr > 0 previously 4. req->tp_frame_nr == 0, pass sanity check 5. po->mapped == 0, never called mmap() In this scenario we are clearing the old rx_ring->pg_vec, so we need to free this pg_vec, but we don't stop the timer on this path because of closing==0. The timer has to be stopped as long as we need to free pg_vec, therefore the check on closing!=0 is wrong, we should check pg_vec!=NULL instead. Thanks to liujian for testing different fixes. Reported-by: alexander.levin@verizon.com Reported-by: Dave Jones Reported-by: liujian (CE) Tested-by: liujian (CE) Cc: Ding Tianhong Cc: Willem de Bruijn Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/packet/af_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d57b9db1ae0cde366c9cc6b038cb1e8ff05557a1 Author: Benjamin Herrenschmidt Date: Mon Jul 24 16:59:07 2017 +1000 ftgmac100: Make the MDIO bus a child of the ethernet device Populate mii_bus->parent with our own platform device before registering, which makes it easier to locate the MDIO bus in sysfs when trying to diagnose problems. Signed-off-by: Benjamin Herrenschmidt Acked-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 1 + 1 file changed, 1 insertion(+) commit c7472ec4a00c298d2b55c0aa945b8a4c10f6f898 Author: Benjamin Herrenschmidt Date: Mon Jul 24 16:59:01 2017 +1000 ftgmac100: Increase reset timeout We had reports of 50us not being sufficient to reset the MAC, thus hitting the "Hardware reset failed" error bringing the interface up on some AST2400 based machines. This bumps the timeout to 200us. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69ec932e364b1ba9c3a2085fe96b76c8a3f71e7c Author: Liping Zhang Date: Sun Jul 23 17:52:23 2017 +0800 openvswitch: fix potential out of bound access in parse_ct Before the 'type' is validated, we shouldn't use it to fetch the ovs_ct_attr_lens's minlen and maxlen, else, out of bound access may happen. Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") Signed-off-by: Liping Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9476d393667968b4a02afbe9d35a3558482b943e Author: Thomas Jarosch Date: Sat Jul 22 17:14:34 2017 +0200 mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled DMA transfers are not allowed to buffers that are on the stack. Therefore allocate a buffer to store the result of usb_control_message(). Fixes these bugreports: https://bugzilla.kernel.org/show_bug.cgi?id=195217 https://bugzilla.redhat.com/show_bug.cgi?id=1421387 https://bugzilla.redhat.com/show_bug.cgi?id=1427398 Shortened kernel backtrace from 4.11.9-200.fc25.x86_64: kernel: ------------[ cut here ]------------ kernel: WARNING: CPU: 3 PID: 2957 at drivers/usb/core/hcd.c:1587 kernel: transfer buffer not dma capable kernel: Call Trace: kernel: dump_stack+0x63/0x86 kernel: __warn+0xcb/0xf0 kernel: warn_slowpath_fmt+0x5a/0x80 kernel: usb_hcd_map_urb_for_dma+0x37f/0x570 kernel: ? try_to_del_timer_sync+0x53/0x80 kernel: usb_hcd_submit_urb+0x34e/0xb90 kernel: ? schedule_timeout+0x17e/0x300 kernel: ? del_timer_sync+0x50/0x50 kernel: ? __slab_free+0xa9/0x300 kernel: usb_submit_urb+0x2f4/0x560 kernel: ? urb_destroy+0x24/0x30 kernel: usb_start_wait_urb+0x6e/0x170 kernel: usb_control_msg+0xdc/0x120 kernel: mcs_get_reg+0x36/0x40 [mcs7780] kernel: mcs_net_open+0xb5/0x5c0 [mcs7780] ... Regression goes back to 4.9, so it's a good candidate for -stable. Though it's the decision of the maintainer. Thanks to Dan Williams for adding the "transfer buffer not dma capable" warning in the first place. It instantly pointed me in the right direction. Patch has been tested with transferring data from a Polar watch. Signed-off-by: Thomas Jarosch Signed-off-by: David S. Miller drivers/net/irda/mcs7780.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit f4458b92d2190757bef81a5f282d2644ccbaec23 Author: Thor Thayer Date: Fri Jul 21 16:35:09 2017 -0500 net: stmmac: Adjust dump offset of DMA registers for ethtool The commit fbf68229ffe7 ("net: stmmac: unify registers dumps methods") in the Linux kernel modified the register dump to store the DMA registers at the DMA register offset (0x1000) but ethtool (stmmac.c) looks for the DMA registers after the MAC registers which is offset 55. This patch copies the DMA registers from the higher offset to the offset where ethtool expects them. Signed-off-by: Thor Thayer Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h | 3 +++ drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 5 +++++ 4 files changed, 10 insertions(+), 2 deletions(-) commit 864d9664245565a6b9df86a68c7664a25a4fcd58 Author: Paolo Abeni Date: Fri Jul 21 18:49:45 2017 +0200 net/socket: fix type in assignment and trim long line The commit ffb07550c76f ("copy_msghdr_from_user(): get rid of field-by-field copyin") introduce a new sparse warning: net/socket.c:1919:27: warning: incorrect type in assignment (different address spaces) net/socket.c:1919:27: expected void *msg_control net/socket.c:1919:27: got void [noderef] *[addressable] msg_control and a line above 80 chars, let's fix them Fixes: ffb07550c76f ("copy_msghdr_from_user(): get rid of field-by-field copyin") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/socket.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 490198ea62b3beb56322e8b00d5d925d6afeb76d Merge: 1819ae3 d755cbc Author: David S. Miller Date: Mon Jul 24 14:15:47 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-07-21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.13 Important, but small in size, fixes. brcmfmac * fix a regression in SDIO support introduced in v4.13-rc1 rtlwifi * fix a regression in bluetooth coexistance introduced in v4.13-rc1 iwlwifi * a few NULL pointer dereferences in the recovery flow * a small but important fix for IBSS * a one-liner fix for tracing, which was including too much data ==================== Signed-off-by: David S. Miller commit 1819ae3dfebe7bb2ade39dbf04518448c922dc51 Author: Ido Schimmel Date: Fri Jul 21 18:04:28 2017 +0200 mlxsw: spectrum_router: Don't offload routes next in list Each FIB node holds a linked list of routes sharing the same prefix and length. In the case of IPv4 it's ordered according to table ID, metric and TOS and only the first route in the list is actually programmed to the device. In case a gatewayed route is added somewhere in the list, then after its nexthop group will be refreshed and become valid (due to the resolution of its gateway), it'll mistakenly overwrite the existing entry. Example: 192.168.200.0/24 dev enp3s0np3 scope link metric 1000 offload 192.168.200.0/24 via 192.168.100.1 dev enp3s0np3 metric 1000 offload Both routes are marked as offloaded despite the fact only the first one should actually be present in the device's table. When refreshing the nexthop group, don't write the route to the device's table unless it's the first in its node. Fixes: 9aecce1c7d97 ("mlxsw: spectrum_router: Correctly handle identical routes") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e859afe1ee0c5ae981c55387ccd45eba258a7842 Author: Phil Sutter Date: Fri Jul 21 16:51:31 2017 +0200 lib: test_rhashtable: fix for large entry counts During concurrent access testing, threadfunc() concatenated thread ID and object index to create a unique key like so: | tdata->objs[i].value = (tdata->id << 16) | i; This breaks if a user passes an entries parameter of 64k or higher, since 'i' might use more than 16 bits then. Effectively, this will lead to duplicate keys in the table. Fix the problem by introducing a struct holding object and thread ID and using that as key instead of a single integer type field. Fixes: f4a3e90ba5739 ("rhashtable-test: extend to test concurrency") Reported by: Manuel Messner Signed-off-by: Phil Sutter Acked-by: Herbert Xu Signed-off-by: David S. Miller lib/test_rhashtable.c | 53 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 21 deletions(-) commit 1d9b86de3776aa0e809745e5c9e272b79a7ac09b Merge: 70dba20 9305706 Author: David S. Miller Date: Mon Jul 24 14:02:55 2017 -0700 Merge branch 'bpf-fix-verifier-min-max-handling-in-BPF_SUB' Edward Cree says: ==================== bpf: fix verifier min/max handling in BPF_SUB I managed to come up with a test for the swapped bounds in BPF_SUB, so here it is along with a patch that fixes it, separated out from my 'rewrite everything' series so it can go to -stable. ==================== Signed-off-by: David S. Miller commit 9305706c2e808ae59f1eb201867f82f1ddf6d7a6 Author: Edward Cree Date: Fri Jul 21 14:37:34 2017 +0100 bpf/verifier: fix min/max handling in BPF_SUB We have to subtract the src max from the dst min, and vice-versa, since (e.g.) the smallest result comes from the largest subtrahend. Fixes: 484611357c19 ("bpf: allow access into map value arrays") Signed-off-by: Edward Cree Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 545722cb0fc993226a01844fb27cf832459eb1c0 Author: Edward Cree Date: Fri Jul 21 14:36:57 2017 +0100 selftests/bpf: subtraction bounds test There is a bug in the verifier's handling of BPF_SUB: [a,b] - [c,d] yields was [a-c, b-d] rather than the correct [a-d, b-c]. So here is a test which, with the bogus handling, will produce ranges of [0,0] and thus allowed accesses; whereas the correct handling will give a range of [-255, 255] (and hence the right-shift will give a range of [0, 255]) and the accesses will be rejected. Signed-off-by: Edward Cree Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 70dba204a396c1c094749c4ef9bd27d5e8176a08 Author: Mark Brown Date: Thu Jul 20 11:06:31 2017 +0100 net: ethernet: mediatek: Explicitly include linux/interrupt.h The mediatek ethernet driver uses interrupts but does not explicitly include linux/interrupt.h, relying on implicit includes. Fix this so we don't get build breaks as happened for ARM in next-20170720. Signed-off-by: Mark Brown Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + 1 file changed, 1 insertion(+) commit 5edfbd3c0697e643f179dba819a7c09375b42543 Author: Tonghao Zhang Date: Thu Jul 20 02:41:34 2017 -0700 tun/tap: Add the missed return value check of register_netdevice_notifier There is some codes of tun/tap module which did not check the return value of register_netdevice_notifier. Add the check now. Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller drivers/net/tun.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 6c7fce6fa86a110d6455662d823c4e09f8f7be4a Author: Sean Wang Date: Sat Jul 22 20:45:55 2017 +0800 net: ethernet: mediatek: avoid potential invalid memory access Potential dangerous invalid memory might be accessed if invalid mac value reflected from the forward port field in rxd4 caused by possible potential hardware defects. So added a simple sanity checker to avoid the kind of situation happening. Signed-off-by: Sean Wang Acked-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 02cb489be7ad07e74ab40baa908d2e20460ebdb2 Author: Ross Zwisler Date: Fri Jul 21 16:51:24 2017 -0600 ACPI: NUMA: Fix typo in the full name of SRAT To save someone the time of searching the ACPI spec for "Static Resource Affinity Table". Signed-off-by: Ross Zwisler Signed-off-by: Rafael J. Wysocki drivers/acpi/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0c2d9c1de0f6be33fe817069b06663277153c20 Author: Ross Zwisler Date: Fri Jul 21 16:51:23 2017 -0600 ACPI: NUMA: add missing include in acpi_numa.h Right now if a file includes acpi_numa.h and they don't happen to include linux/numa.h before it, they get the following warning: ./include/acpi/acpi_numa.h:9:5: warning: "MAX_NUMNODES" is not defined [-Wundef] #if MAX_NUMNODES > 256 ^~~~~~~~~~~~ Signed-off-by: Ross Zwisler Signed-off-by: Rafael J. Wysocki include/acpi/acpi_numa.h | 1 + 1 file changed, 1 insertion(+) commit 76451d79bde6bed17e113f057e58e1fa5fb79e78 Author: Christoph Hellwig Date: Tue Jul 18 17:04:40 2017 +0200 blk-mq: map queues to all present CPUs We already do this for PCI mappings, and the higher level code now expects that CPU on/offlining doesn't have an affect on the queue mappings. Signed-off-by: Christoph Hellwig Tested-by: Max Gurtovoy Reviewed-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-mq-cpumap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 832e4c83abc5ec25af77db6c8a0f36d78f1cf825 Author: Christoph Hellwig Date: Thu May 11 09:16:24 2017 +0200 uuid: remove uuid_be Everything uses uuid_t now. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko include/linux/uuid.h | 14 -------------- 1 file changed, 14 deletions(-) commit 7c39ffe7a821dfd1f801627e1813f7c025e4c918 Author: Christoph Hellwig Date: Tue Jul 18 15:30:05 2017 +0200 thunderbolt: use uuid_t instead of uuid_be Switch thunderbolt to the new uuid type. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg drivers/thunderbolt/switch.c | 8 ++++---- drivers/thunderbolt/tb.h | 4 ++-- drivers/thunderbolt/tb_msgs.h | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) commit c228352dc67ea8fa5770c83e2d9c2fbafb3e700a Author: Benjamin Tissoires Date: Tue Jul 18 18:28:13 2017 +0200 HID: ortek: add one more buggy device The iHome keypad also requires the same tweak we are doing for other Ortek devices. Reported-by: Mairin Duffy Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-ortek.c | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) commit cfaf2d034360166e569a4929dd83ae9698bed856 Author: Brian Foster Date: Mon Jul 24 08:33:25 2017 -0700 xfs: fix quotacheck dquot id overflow infinite loop If a dquot has an id of U32_MAX, the next lookup index increment overflows the uint32_t back to 0. This starts the lookup sequence over from the beginning, repeats indefinitely and results in a livelock. Update xfs_qm_dquot_walk() to explicitly check for the lookup overflow and exit the loop. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_qm.c | 3 +++ 1 file changed, 3 insertions(+) commit 7e96d559634b73a8158ee99a7abece2eacec2668 Author: Ofer Heifetz Date: Mon Jul 24 09:17:40 2017 +0300 md/raid5: add thread_group worker async_tx_issue_pending_all Since thread_group worker and raid5d kthread are not in sync, if worker writes stripe before raid5d then requests will be waiting for issue_pendig. Issue observed when building raid5 with ext4, in some build runs jbd2 would get hung and requests were waiting in the HW engine waiting to be issued. Fix this by adding a call to async_tx_issue_pending_all in the raid5_do_work. Signed-off-by: Ofer Heifetz Cc: stable@vger.kernel.org Signed-off-by: Shaohua Li drivers/md/raid5.c | 2 ++ 1 file changed, 2 insertions(+) commit 765e40b675a9566459ddcb8358ad16f3b8344bbe Author: Christoph Hellwig Date: Fri Jul 21 13:46:10 2017 +0200 block: disable runtime-pm for blk-mq The blk-mq code lacks support for looking at the rpm_status field, tracking active requests and the RQF_PM flag. Due to the default switch to blk-mq for scsi people start to run into suspend / resume issue due to this fact, so make sure we disable the runtime PM functionality until it is properly implemented. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 31c4ccc3ecb4944f6936082fabb5a86e3d086191 Author: Bart Van Assche Date: Fri Jul 21 19:11:10 2017 +0200 xen-blkfront: Fix handling of non-supported operations This patch fixes the following sparse warnings: drivers/block/xen-blkfront.c:916:45: warning: incorrect type in argument 2 (different base types) drivers/block/xen-blkfront.c:916:45: expected restricted blk_status_t [usertype] error drivers/block/xen-blkfront.c:916:45: got int [signed] error drivers/block/xen-blkfront.c:1599:47: warning: incorrect type in assignment (different base types) drivers/block/xen-blkfront.c:1599:47: expected int [signed] error drivers/block/xen-blkfront.c:1599:47: got restricted blk_status_t [usertype] drivers/block/xen-blkfront.c:1607:55: warning: incorrect type in assignment (different base types) drivers/block/xen-blkfront.c:1607:55: expected int [signed] error drivers/block/xen-blkfront.c:1607:55: got restricted blk_status_t [usertype] drivers/block/xen-blkfront.c:1625:55: warning: incorrect type in assignment (different base types) drivers/block/xen-blkfront.c:1625:55: expected int [signed] error drivers/block/xen-blkfront.c:1625:55: got restricted blk_status_t [usertype] drivers/block/xen-blkfront.c:1628:62: warning: restricted blk_status_t degrades to integer Compile-tested only. Fixes: commit 2a842acab109 ("block: introduce new block status code type") Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Konrad Rzeszutek Wilk Cc: Roger Pau Monné Cc: Signed-off-by: Jens Axboe drivers/block/xen-blkfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e4324a4c36b3eb5cd1f71cbbc38d888f919ebfc Author: Nikolay Borisov Date: Fri Jul 21 11:28:24 2017 +0300 btrfs: round down size diff when shrinking/growing device Further testing showed that the fix introduced in 7dfb8be11b5d ("btrfs: Round down values which are written for total_bytes_size") was insufficient and it could still lead to discrepancies between the total_bytes in the super block and the device total bytes. So this patch also ensures that the difference between old/new sizes when shrinking/growing is also rounded down. This ensure that we won't be subtracting/adding a non-sectorsize multiples to the superblock/device total sizees. Fixes: 7dfb8be11b5d ("btrfs: Round down values which are written for total_bytes_size") Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17024ad0a0fdfcfe53043afb969b813d3e020c21 Author: Omar Sandoval Date: Thu Jul 20 15:10:35 2017 -0700 Btrfs: fix early ENOSPC due to delalloc If a lot of metadata is reserved for outstanding delayed allocations, we rely on shrink_delalloc() to reclaim metadata space in order to fulfill reservation tickets. However, shrink_delalloc() has a shortcut where if it determines that space can be overcommitted, it will stop early. This made sense before the ticketed enospc system, but now it means that shrink_delalloc() will often not reclaim enough space to fulfill any tickets, leading to an early ENOSPC. (Reservation tickets don't care about being able to overcommit, they need every byte accounted for.) Fix it by getting rid of the shortcut so that shrink_delalloc() reclaims all of the metadata it is supposed to. This fixes early ENOSPCs we were seeing when doing a btrfs receive to populate a new filesystem, as well as early ENOSPCs Christoph saw when doing a big cp -r onto Btrfs. Fixes: 957780eb2788 ("Btrfs: introduce ticketed enospc infrastructure") Tested-by: Christoph Anton Mitterer Cc: stable@vger.kernel.org Reviewed-by: Josef Bacik Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 4 ---- 1 file changed, 4 deletions(-) commit 144439376bfcd1d178e37bc08e27a58f82719bdb Author: Jeff Mahoney Date: Wed Jul 19 23:25:51 2017 -0400 btrfs: fix lockup in find_free_extent with read-only block groups If we have a block group that is all of the following: 1) uncached in memory 2) is read-only 3) has a disk cache state that indicates we need to recreate the cache AND the file system has enough free space fragmentation such that the request for an extent of a given size can't be honored; AND have a single CPU core; AND it's the block group with the highest starting offset such that there are no opportunities (like reading from disk) for the loop to yield the CPU; We can end up with a lockup. The root cause is simple. Once we're in the position that we've read in all of the other block groups directly and none of those block groups can honor the request, there are no more opportunities to sleep. We end up trying to start a caching thread which never gets run if we only have one core. This *should* present as a hung task waiting on the caching thread to make some progress, but it doesn't. Instead, it degrades into a busy loop because of the placement of the read-only check. During the first pass through the loop, block_group->cached will be set to BTRFS_CACHE_STARTED and have_caching_bg will be set. Then we hit the read-only check and short circuit the loop. We're not yet in LOOP_CACHING_WAIT, so we skip that loop back before going through the loop again for other raid groups. Then we move to LOOP_CACHING_WAIT state. During the this pass through the loop, ->cached will still be BTRFS_CACHE_STARTED, which means it's not cached, so we'll enter cache_block_group, do a lot of nothing, and return, and also set have_caching_bg again. Then we hit the read-only check and short circuit the loop. The same thing happens as before except now we DO trigger the LOOP_CACHING_WAIT && have_caching_bg check and loop back up to the top. We do this forever. There are two fixes in this patch since they address the same underlying bug. The first is to add a cond_resched to the end of the loop to ensure that the caching thread always has an opportunity to run. This will fix the soft lockup issue, but find_free_extent will still loop doing nothing until the thread has completed. The second is to move the read-only check to the top of the loop. We're never going to return an allocation within a read-only block group so we may as well skip it early. The check for ->cached == BTRFS_CACHE_ERROR would cause the same problem except that BTRFS_CACHE_ERROR is considered a "done" state and we won't re-set have_caching_bg again. Many thanks to Stephan Kulow for his excellent help in the testing process. Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ce184a0dee92a0a333236a26478e304dca29a3df Author: Dave Martin Date: Fri Jun 30 18:56:59 2017 +0100 ARM: 8687/1: signal: Fix unparseable iwmmxt_sigframe in uc_regspace[] In kernels with CONFIG_IWMMXT=y running on non-iWMMXt hardware, the signal frame can be left partially uninitialised in such a way that userspace cannot parse uc_regspace[] safely. In particular, this means that the VFP registers cannot be located reliably in the signal frame when a multi_v7_defconfig kernel is run on the majority of platforms. The cause is that the uc_regspace[] is laid out statically based on the kernel config, but the decision of whether to save/restore the iWMMXt registers must be a runtime decision. To minimise breakage of software that may assume a fixed layout, this patch emits a dummy block of the same size as iwmmxt_sigframe, for non-iWMMXt threads. However, the magic and size of this block are now filled in to help parsers skip over it. A new DUMMY_MAGIC is defined for this purpose. It is probably legitimate (if non-portable) for userspace to manufacture its own sigframe for sigreturn, and there is no obvious reason why userspace should be required to insert a DUMMY_MAGIC block when running on non-iWMMXt hardware, when omitting it has worked just fine forever in other configurations. So in this case, sigreturn does not require this block to be present. Reported-by: Edmund Grimley-Evans Signed-off-by: Dave Martin Signed-off-by: Russell King arch/arm/include/asm/ucontext.h | 6 ++++ arch/arm/kernel/signal.c | 76 ++++++++++++++++++++++++++++++++--------- 2 files changed, 65 insertions(+), 17 deletions(-) commit 269583559cdd8ab1203210893590ed4cc6af8171 Author: Dave Martin Date: Fri Jun 30 18:56:09 2017 +0100 ARM: 8686/1: iwmmxt: Add missing __user annotations to sigframe accessors preserve_iwmmxt_context() and restore_iwmmxt_context() lack __user accessors on their arguments pointing to the user signal frame. There does not be appear to be a bug here, but this omission is inconsistent with the crunch and vfp sigframe access functions. This patch adds the annotations, for consistency. Signed-off-by: Dave Martin Signed-off-by: Russell King arch/arm/kernel/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 295c5ba4c0886b7d55e229218b077fe3510b0ccd Author: Kuninori Morimoto Date: Mon Jul 24 06:47:59 2017 +0000 ASoC: sh: hac: add missing "int ret" commit b047e1cce8 ("ASoC: ac97: Support multi-platform AC'97") modified hac_soc_platform_probe(), but "int ret" was missed. This patch adds missing "int ret", otherwise, we will get linux/sound/soc/sh/hac.c: In function 'hac_soc_platform_probe': linux/sound/soc/sh/hac.c:318: error: 'ret' undeclared (first use in this function) linux/sound/soc/sh/hac.c:318: error: (Each undeclared identifier is reported only once linux/sound/soc/sh/hac.c:318: error: for each function it appears in.) Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/hac.c | 2 ++ 1 file changed, 2 insertions(+) commit 9735ee9e3cc3ba113ac96b0368ef3f1a73092a23 Author: Maxime Ripard Date: Fri Jul 21 18:19:35 2017 +0200 clk: sunxi-ng: sun5i: Add clk_set_rate_parent to the CPU clock The current CPU clock is missing the option to change the rate of its parents, leading to improper rates calculated by cpufreq, and eventually crashes. Cc: Fixes: 5e73761786d6 ("clk: sunxi-ng: Add sun5i CCU driver") Reported-by: Kevin Hilman Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun5i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38115f2f8cec8087d558c062e779c443a01f87d6 Author: Masami Hiramatsu Date: Fri Jul 21 23:45:52 2017 +0900 kprobes/x86: Release insn_slot in failure path The following commit: 003002e04ed3 ("kprobes: Fix arch_prepare_kprobe to handle copy insn failures") returns an error if the copying of the instruction, but does not release the allocated insn_slot. Clean up correctly. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 003002e04ed3 ("kprobes: Fix arch_prepare_kprobe to handle copy insn failures") Link: http://lkml.kernel.org/r/150064834183.6172.11694375818447664416.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ba883b4abc9cd837441b01eb9cf8d9196181294d Author: Stephane Eranian Date: Thu Jul 13 10:35:50 2017 -0700 perf/x86/intel/uncore: Fix missing marker for skx_uncore_cha_extra_regs This skx_uncore_cha_extra_regs array was missing an end-marker. Signed-off-by: Stephane Eranian Signed-off-by: Kan Liang Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1499967350-10385-7-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snbep.c | 1 + 1 file changed, 1 insertion(+) commit 8aa7b7b4b4a601978672dce6604b9f5630b2eeb8 Author: Stephane Eranian Date: Thu Jul 13 10:35:49 2017 -0700 perf/x86/intel/uncore: Fix SKX CHA event extra regs This patch adds two missing event extra regs for Skylake Server CHA PMU: - TOR_INSERTS - TOR_OCCUPANCY Were missing support for all the filters, including opcode matchers. Signed-off-by: Stephane Eranian Signed-off-by: Kan Liang Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1499967350-10385-6-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snbep.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9ad0fbd8fcd9e6815908c772f8d792a9d764449e Author: Kan Liang Date: Thu Jul 13 10:35:48 2017 -0700 perf/x86/intel/uncore: Remove invalid Skylake server CHA filter field There is no field c6 and link for CHA BOX FILTER. Signed-off-by: Kan Liang Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1499967350-10385-5-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snbep.c | 3 --- 1 file changed, 3 deletions(-) commit c3f02682a101b83424128915b14e60c156c03f02 Author: Kan Liang Date: Thu Jul 13 10:35:47 2017 -0700 perf/x86/intel/uncore: Fix Skylake server CHA LLC_LOOKUP event umask Correct the umask for LLC_LOOKUP.LOCAL and LLC_LOOKUP.REMOTE events Signed-off-by: Kan Liang Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1499967350-10385-4-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snbep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bab4e569e80c07ba6fe5e4f2d815adeef26cee94 Author: Kan Liang Date: Thu Jul 13 10:35:46 2017 -0700 perf/x86/intel/uncore: Fix Skylake server PCU PMU event format PCU event format for SKX are different from snbep. Introduce a new format group for SKX PCU. Signed-off-by: Kan Liang Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1499967350-10385-3-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snbep.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit b3625980a65db6b6b6bbd5790a77ab95ce6397c5 Author: Stephane Eranian Date: Thu Jul 13 10:35:45 2017 -0700 perf/x86/intel/uncore: Fix Skylake UPI PMU event masks This patch fixes the event_mask and event_ext_mask for the Intel Skylake Server UPI PMU. Bit 21 is not used as a filter. The extended umask is from bit 32 to bit 55. Correct both umasks. Signed-off-by: Stephane Eranian Signed-off-by: Kan Liang Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1499967350-10385-2-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snbep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fa19871a166f6a940eb97dd511d3ddb1841ed95a Author: Paolo Bonzini Date: Fri Jul 14 13:38:28 2017 +0200 KVM: VMX: remove unused field Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 1 - 1 file changed, 1 deletion(-) commit c389377c01bf2d6e2a178e86aef8535931bfbd75 Author: Jason J. Herne Date: Fri Jul 21 03:14:36 2017 +0200 vfio: ccw: fix bad ptr math for TIC cda translation When we are translating channel data addresses from guest to host address space for TIC instructions we are getting incorrect addresses because of a pointer arithmetic error. We currently calculate the offset of the TIC's cda from the start of the channel program chain (ccw->cda - ccw_head). We then add that to the address of the ccw chain in host memory (iter->ch_ccw). The problem is that iter->ch_ccw is a pointer to struct ccw1 so when we increment it we are actually incrementing by the size of struct ccw1 which is 8 bytes. The intent was to increment by n-bytes, not n*8. The fix: cast iter->ch_ccw to char* so it will be incremented by n*1. Reviewed-by: Dong Jia Shi Signed-off-by: Jason J. Herne Signed-off-by: Dong Jia Shi Message-Id: <20170721011436.76112-1-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef42719814db06fdfa26cd7566de0b64de173320 Author: Paul Mackerras Date: Fri Jul 21 15:41:49 2017 +1000 KVM: PPC: Book3S HV: Fix host crash on changing HPT size Commit f98a8bf9ee20 ("KVM: PPC: Book3S HV: Allow KVM_PPC_ALLOCATE_HTAB ioctl() to change HPT size", 2016-12-20) changed the behaviour of the KVM_PPC_ALLOCATE_HTAB ioctl so that it now allocates a new HPT and new revmap array if there was a previously-allocated HPT of a different size from the size being requested. In this case, we need to reset the rmap arrays of the memslots, because the rmap arrays will contain references to HPTEs which are no longer valid. Worse, these references are also references to slots in the new revmap array (which parallels the HPT), and the new revmap array contains random contents, since it doesn't get zeroed on allocation. The effect of having these stale references to slots in the revmap array that contain random contents is that subsequent calls to functions such as kvmppc_add_revmap_chain will crash because they will interpret the non-zero contents of the revmap array as HPTE indexes and thus index outside of the revmap array. This leads to host crashes such as the following. [ 7072.862122] Unable to handle kernel paging request for data at address 0xd000000c250c00f8 [ 7072.862218] Faulting instruction address: 0xc0000000000e1c78 [ 7072.862233] Oops: Kernel access of bad area, sig: 11 [#1] [ 7072.862286] SMP NR_CPUS=1024 [ 7072.862286] NUMA [ 7072.862325] PowerNV [ 7072.862378] Modules linked in: kvm_hv vhost_net vhost tap xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables rpcrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm iw_cxgb3 mlx5_ib ib_core ses enclosure scsi_transport_sas ipmi_powernv ipmi_devintf ipmi_msghandler powernv_op_panel i2c_opal nfsd auth_rpcgss oid_registry [ 7072.863085] nfs_acl lockd grace sunrpc kvm_pr kvm xfs libcrc32c scsi_dh_alua dm_service_time radeon lpfc nvme_fc nvme_fabrics nvme_core scsi_transport_fc i2c_algo_bit tg3 drm_kms_helper ptp pps_core syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm dm_multipath i2c_core cxgb3 mlx5_core mdio [last unloaded: kvm_hv] [ 7072.863381] CPU: 72 PID: 56929 Comm: qemu-system-ppc Not tainted 4.12.0-kvm+ #59 [ 7072.863457] task: c000000fe29e7600 task.stack: c000001e3ffec000 [ 7072.863520] NIP: c0000000000e1c78 LR: c0000000000e2e3c CTR: c0000000000e25f0 [ 7072.863596] REGS: c000001e3ffef560 TRAP: 0300 Not tainted (4.12.0-kvm+) [ 7072.863658] MSR: 9000000100009033 [ 7072.863667] CR: 44082882 XER: 20000000 [ 7072.863767] CFAR: c0000000000e2e38 DAR: d000000c250c00f8 DSISR: 42000000 SOFTE: 1 GPR00: c0000000000e2e3c c000001e3ffef7e0 c000000001407d00 d000000c250c00f0 GPR04: d00000006509fb70 d00000000b3d2048 0000000003ffdfb7 0000000000000000 GPR08: 00000001007fdfb7 00000000c000000f d0000000250c0000 000000000070f7bf GPR12: 0000000000000008 c00000000fdad000 0000000010879478 00000000105a0d78 GPR16: 00007ffaf4080000 0000000000001190 0000000000000000 0000000000010000 GPR20: 4001ffffff000415 d00000006509fb70 0000000004091190 0000000ee1881190 GPR24: 0000000003ffdfb7 0000000003ffdfb7 00000000007fdfb7 c000000f5c958000 GPR28: d00000002d09fb70 0000000003ffdfb7 d00000006509fb70 d00000000b3d2048 [ 7072.864439] NIP [c0000000000e1c78] kvmppc_add_revmap_chain+0x88/0x130 [ 7072.864503] LR [c0000000000e2e3c] kvmppc_do_h_enter+0x84c/0x9e0 [ 7072.864566] Call Trace: [ 7072.864594] [c000001e3ffef7e0] [c000001e3ffef830] 0xc000001e3ffef830 (unreliable) [ 7072.864671] [c000001e3ffef830] [c0000000000e2e3c] kvmppc_do_h_enter+0x84c/0x9e0 [ 7072.864751] [c000001e3ffef920] [d00000000b38d878] kvmppc_map_vrma+0x168/0x200 [kvm_hv] [ 7072.864831] [c000001e3ffef9e0] [d00000000b38a684] kvmppc_vcpu_run_hv+0x1284/0x1300 [kvm_hv] [ 7072.864914] [c000001e3ffefb30] [d00000000f465664] kvmppc_vcpu_run+0x44/0x60 [kvm] [ 7072.865008] [c000001e3ffefb60] [d00000000f461864] kvm_arch_vcpu_ioctl_run+0x114/0x290 [kvm] [ 7072.865152] [c000001e3ffefbe0] [d00000000f453c98] kvm_vcpu_ioctl+0x598/0x7a0 [kvm] [ 7072.865292] [c000001e3ffefd40] [c000000000389328] do_vfs_ioctl+0xd8/0x8c0 [ 7072.865410] [c000001e3ffefde0] [c000000000389be4] SyS_ioctl+0xd4/0x130 [ 7072.865526] [c000001e3ffefe30] [c00000000000b760] system_call+0x58/0x6c [ 7072.865644] Instruction dump: [ 7072.865715] e95b2110 793a0020 7b4926e4 7f8a4a14 409e0098 807c000c 786326e4 7c6a1a14 [ 7072.865857] 935e0008 7bbd0020 813c000c 913e000c <93a30008> 93bc000c 48000038 60000000 [ 7072.866001] ---[ end trace 627b6e4bf8080edc ]--- Note that to trigger this, it is necessary to use a recent upstream QEMU (or other userspace that resizes the HPT at CAS time), specify a maximum memory size substantially larger than the current memory size, and boot a guest kernel that does not support HPT resizing. This fixes the problem by resetting the rmap arrays when the old HPT is freed. Fixes: f98a8bf9ee20 ("KVM: PPC: Book3S HV: Allow KVM_PPC_ALLOCATE_HTAB ioctl() to change HPT size") Cc: stable@vger.kernel.org # v4.11+ Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e47057151422a67ce08747176fa21cb3b526a2c9 Author: Paul Mackerras Date: Fri Jul 21 13:57:14 2017 +1000 KVM: PPC: Book3S HV: Enable TM before accessing TM registers Commit 46a704f8409f ("KVM: PPC: Book3S HV: Preserve userspace HTM state properly", 2017-06-15) added code to read transactional memory (TM) registers but forgot to enable TM before doing so. The result is that if userspace does have live values in the TM registers, a KVM_RUN ioctl will cause a host kernel crash like this: [ 181.328511] Unrecoverable TM Unavailable Exception f60 at d00000001e7d9980 [ 181.328605] Oops: Unrecoverable TM Unavailable Exception, sig: 6 [#1] [ 181.328613] SMP NR_CPUS=2048 [ 181.328613] NUMA [ 181.328618] PowerNV [ 181.328646] Modules linked in: vhost_net vhost tap nfs_layout_nfsv41_files rpcsec_gss_krb5 nfsv4 dns_resolver nfs +fscache xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat +nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 tun ebtable_filter ebtables +ip6table_filter ip6_tables iptable_filter bridge stp llc kvm_hv kvm nfsd ses enclosure scsi_transport_sas ghash_generic +auth_rpcgss gf128mul xts sg ctr nfs_acl lockd vmx_crypto shpchp ipmi_powernv i2c_opal grace ipmi_devintf i2c_core +powernv_rng sunrpc ipmi_msghandler ibmpowernv uio_pdrv_genirq uio leds_powernv powernv_op_panel ip_tables xfs sd_mod +lpfc ipr bnx2x libata mdio ptp pps_core scsi_transport_fc libcrc32c dm_mirror dm_region_hash dm_log dm_mod [ 181.329278] CPU: 40 PID: 9926 Comm: CPU 0/KVM Not tainted 4.12.0+ #1 [ 181.329337] task: c000003fc6980000 task.stack: c000003fe4d80000 [ 181.329396] NIP: d00000001e7d9980 LR: d00000001e77381c CTR: d00000001e7d98f0 [ 181.329465] REGS: c000003fe4d837e0 TRAP: 0f60 Not tainted (4.12.0+) [ 181.329523] MSR: 9000000000009033 [ 181.329527] CR: 24022448 XER: 00000000 [ 181.329608] CFAR: d00000001e773818 SOFTE: 1 [ 181.329608] GPR00: d00000001e77381c c000003fe4d83a60 d00000001e7ef410 c000003fdcfe0000 [ 181.329608] GPR04: c000003fe4f00000 0000000000000000 0000000000000000 c000003fd7954800 [ 181.329608] GPR08: 0000000000000001 c000003fc6980000 0000000000000000 d00000001e7e2880 [ 181.329608] GPR12: d00000001e7d98f0 c000000007b19000 00000001295220e0 00007fffc0ce2090 [ 181.329608] GPR16: 0000010011886608 00007fff8c89f260 0000000000000001 00007fff8c080028 [ 181.329608] GPR20: 0000000000000000 00000100118500a6 0000010011850000 0000010011850000 [ 181.329608] GPR24: 00007fffc0ce1b48 0000010011850000 00000000d673b901 0000000000000000 [ 181.329608] GPR28: 0000000000000000 c000003fdcfe0000 c000003fdcfe0000 c000003fe4f00000 [ 181.330199] NIP [d00000001e7d9980] kvmppc_vcpu_run_hv+0x90/0x6b0 [kvm_hv] [ 181.330264] LR [d00000001e77381c] kvmppc_vcpu_run+0x2c/0x40 [kvm] [ 181.330322] Call Trace: [ 181.330351] [c000003fe4d83a60] [d00000001e773478] kvmppc_set_one_reg+0x48/0x340 [kvm] (unreliable) [ 181.330437] [c000003fe4d83b30] [d00000001e77381c] kvmppc_vcpu_run+0x2c/0x40 [kvm] [ 181.330513] [c000003fe4d83b50] [d00000001e7700b4] kvm_arch_vcpu_ioctl_run+0x114/0x2a0 [kvm] [ 181.330586] [c000003fe4d83bd0] [d00000001e7642f8] kvm_vcpu_ioctl+0x598/0x7a0 [kvm] [ 181.330658] [c000003fe4d83d40] [c0000000003451b8] do_vfs_ioctl+0xc8/0x8b0 [ 181.330717] [c000003fe4d83de0] [c000000000345a64] SyS_ioctl+0xc4/0x120 [ 181.330776] [c000003fe4d83e30] [c00000000000b004] system_call+0x58/0x6c [ 181.330833] Instruction dump: [ 181.330869] e92d0260 e9290b50 e9290108 792807e3 41820058 e92d0260 e9290b50 e9290108 [ 181.330941] 792ae8a4 794a1f87 408204f4 e92d0260 <7d4022a6> f9490ff0 e92d0260 7d4122a6 [ 181.331013] ---[ end trace 6f6ddeb4bfe92a92 ]--- The fix is just to turn on the TM bit in the MSR before accessing the registers. Cc: stable@vger.kernel.org # v3.14+ Fixes: 46a704f8409f ("KVM: PPC: Book3S HV: Preserve userspace HTM state properly") Reported-by: Jan Stancek Tested-by: Jan Stancek Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 2 ++ 1 file changed, 2 insertions(+) commit 739b000994b7c813e4cac56c077abd8f6b0ccaab Merge: 507e8e5 8046306 Author: Dave Airlie Date: Mon Jul 24 15:57:28 2017 +1000 Merge branch 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux into drm-fixes misc vmwgfx fixes. * 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: constify pci_device_id. drm/vmwgfx: Fix gcc-7.1.1 warning drm/vmwgfx: Fix cursor hotspot issue with Wayland on Fedora drm/vmwgfx: Limit max desktop dimensions to 8Kx8K drm/vmwgfx: dma-buf: Constify ttm_place structures. drm/vmwgfx: fix comment mistake for vmw_cmd_dx_set_index_buffer() drm/vmwgfx: Use dma_pool_zalloc drm/vmwgfx: Fix handling of errors returned by 'vmw_cotable_alloc()' drm/vmwgfx: Fix NULL pointer comparison commit 507e8e5e5d3fd640e24420be9cbd1c50190bdb4a Merge: 520eccd 746c842 Author: Dave Airlie Date: Mon Jul 24 15:38:53 2017 +1000 Merge branch 'linux-4.13' of git://github.com/skeggsb/linux into drm-fixes nouveau regression fixes. * 'linux-4.13' of git://github.com/skeggsb/linux: drm/nouveau/kms: remove call to drm_crtc_vblank_off() during unload/suspend drm/nouveau/kms/nv50: update vblank state in response to modeset actions drm/nouveau/disp: add tv encoders to output resource mapping drm/nouveau/i2c/gf119-: add support for address-only transactions commit 055655a9f0fefef2256310a128a4cdaff8b8c432 Merge: 520eccd 737cc2a Author: Greg Kroah-Hartman Date: Sun Jul 23 20:54:31 2017 -0700 Merge tag 'iio-fixes-for-4.13a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes for the 4.13 cycle. * ad2s1210 - Fix negative angular velocity reads (identified by a gcc 7 warning) * aspeed-adc - Wait for initialization sequence to finish before enabling channels. Without it no channels work. * axp288 - Revert a patch that dropped some bogus register mods. No one is entirely sure why but it breaks charging on some devices. - Fix GPADC pin read returning 0. Turns out a small sleep is needed. * bmc150 - Make sure device is restored to normal state after suspend / resume cycle. Otherwise, simple sysfs reads are broken. * tsl2563 - fix wrong event code. * st-accel - add spi 3-wire support. Needed to fix the lsm303agr accelerometer which only had 3 wires in all cases. Side effect is to enable optional 3-wire support for other devices. * st-pressure - disable multiread by default for LPS22HB (only effects SPI) * sun4i-gpadc-iio - fix unbalanced irq enable / disable * vf610 - Fix VALT slection for REFSEL bits - ensures we are using the right reference pins. commit 746c842d1f64caad81d82f0054c0e063c8aa5399 Author: Ben Skeggs Date: Wed Jul 19 08:47:07 2017 +1000 drm/nouveau/kms: remove call to drm_crtc_vblank_off() during unload/suspend These on()/off() calls should be done as a result of modesetting actions, and as we shut down all heads already on unload/suspend, it's pointless to call off() again. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_display.c | 5 ----- 1 file changed, 5 deletions(-) commit 4a5431af19bc52c4dd491e989543c66a52380f00 Author: Ben Skeggs Date: Mon Jul 24 11:01:52 2017 +1000 drm/nouveau/kms/nv50: update vblank state in response to modeset actions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 587f577e0beb4d20ee60bac8d21134b4c5a9fd29 Author: Ben Skeggs Date: Tue Jul 18 13:30:29 2017 +1000 drm/nouveau/disp: add tv encoders to output resource mapping We don't support them on G80, but we need to add them to the mapping to avoid triggering a WARN_ON() on GPUs where the ports are present. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 1 + 2 files changed, 2 insertions(+) commit 13a86519202c5d119d83640d6f781f3181205d2c Author: Ben Skeggs Date: Wed Jul 19 16:49:59 2017 +1000 drm/nouveau/i2c/gf119-: add support for address-only transactions Since switching the I2C-over-AUX helpers, there have been regressions on some display combinations due to us not having support for "address only" transactions. This commits enables support for them for GF119 and newer. Earlier GPUs have been reverted to a custom I2C-over-AUX algorithm. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_connector.c | 2 -- drivers/gpu/drm/nouveau/nv50_display.c | 13 ++++++-- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c | 4 +++ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h | 6 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c | 30 ++++++++++++------- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgf119.c | 35 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 5 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/padgf119.c | 4 +-- 9 files changed, 81 insertions(+), 19 deletions(-) commit b9670ca20abcdd1587c15f8cf2d39edce5d2f37d Author: Arnd Bergmann Date: Fri Jul 21 23:12:06 2017 +0200 drm/rockchip: fix Kconfig dependencies A bug that I had fixed earlier just came back, with CONFIG_EXTCON=m, the rockchip drm driver will fail to link: drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_get_port_lanes': cdn-dp-core.c:(.text.cdn_dp_get_port_lanes+0x30): undefined reference to `extcon_get_state' cdn-dp-core.c:(.text.cdn_dp_get_port_lanes+0x6c): undefined reference to `extcon_get_property' drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_check_sink_connection': cdn-dp-core.c:(.text.cdn_dp_check_sink_connection+0x80): undefined reference to `extcon_get_state' drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_enable': cdn-dp-core.c:(.text.cdn_dp_enable+0x748): undefined reference to `extcon_get_property' The problem is that that the sub-drivers are now all linked into the main rockchip drm module, which breaks all the Kconfig dependencies that are specified in the options for those sub-drivers. This clarifies the dependency to ensure that we can only turn on the DP driver when EXTCON is reachable. As the 'select' statements can now cause additional options to become built-in when they should be loadable modules, I'm moving those into the main driver config option. The dependency on DRM_ROCKCHIP can be reduced into a single 'if' statement here for brevity, but this has no functional effect. Fixes: b6705157b2db ("drm/rockchip: add extcon dependency for DP") Fixes: 8820b68bd378 ("drm/rockchip: Refactor the component match logic.") Link: https://patchwork.kernel.org/patch/9648761/ Acked-by: Guenter Roeck Tested-by: Jeffy Chen Signed-off-by: Arnd Bergmann Signed-off-by: Mark Yao Link: https://patchwork.freedesktop.org/patch/msgid/20170721211214.3386387-1-arnd@arndb.de drivers/gpu/drm/rockchip/Kconfig | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 520eccdfe187591a51ea9ab4c1a024ae4d0f68d9 Author: Linus Torvalds Date: Sun Jul 23 16:15:17 2017 -0700 Linux 4.13-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7683e9e529258d01ce99216ad3be21f59eff83ec Author: Linus Torvalds Date: Sun Jul 23 16:06:21 2017 -0700 Properly alphabetize MAINTAINERS file This adds a perl script to actually parse the MAINTAINERS file, clean up some whitespace in it, warn about errors in it, and then properly sort the end result. My perl-fu is atrocious, so the script has basically been created by randomly putting various characters in a pile, mixing them around, and then looking it the end result does anything interesting when used as a perl script. Signed-off-by: Linus Torvalds MAINTAINERS | 3585 +++++++++++++++++++++--------------------- scripts/parse-maintainers.pl | 77 + 2 files changed, 1868 insertions(+), 1794 deletions(-) commit f47e07bc5f1a5c48ed60a8ee55352cb4b2bf4d51 Author: Linus Torvalds Date: Sun Jul 23 15:08:05 2017 -0700 Fix up MAINTAINERS file problems Prepping for scripting the MAINTAINERS file cleanup (and possible split) showed a couple of cases where the headers for a couple of entries were bogus. There's a few different kinds of bogosities: - the X-GENE SOC EDAC case was confused and split over two lines - there were four entries for "GREYBUS PROTOCOLS DRIVERS" that were all different things. - the NOKIA N900 CAMERA SUPPORT" was duplicated all of which were more obvious when you started doing associative arrays in perl to track these things by the header (so that we can alphabetize this thing properly, and so that we might split it up by the data too). Cc: Joe Perches Signed-off-by: Linus Torvalds MAINTAINERS | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 108ea18722df59d8977951eecd635d296fa64765 Author: Helge Deller Date: Sun Jul 23 22:08:42 2017 +0200 parisc: regenerate defconfig files Signed-off-by: Helge Deller arch/parisc/configs/712_defconfig | 41 ++++++----------------- arch/parisc/configs/a500_defconfig | 50 +++++++---------------------- arch/parisc/configs/b180_defconfig | 17 ++-------- arch/parisc/configs/c3000_defconfig | 38 ++++------------------ arch/parisc/configs/c8000_defconfig | 17 ++-------- arch/parisc/configs/default_defconfig | 49 +++++++--------------------- arch/parisc/configs/generic-32bit_defconfig | 21 +----------- arch/parisc/configs/generic-64bit_defconfig | 48 +++++++++------------------ 8 files changed, 59 insertions(+), 222 deletions(-) commit 343fdfb7d062a52ff39a004d42e4ad1cf7883bc6 Author: Arvind Yadav Date: Tue Jul 11 14:30:34 2017 +0530 parisc: pdc_stable: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Helge Deller drivers/parisc/pdc_stable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cd819e8e978b361ae558056a9e79fd30e6acb0d Author: Helge Deller Date: Sun Jul 9 22:50:40 2017 +0200 parisc: Merge millicode routines via linker script When compiling the 4.13-rc kernel I got those linker errors: libgcc2.c:(.text+0x110): relocation truncated to fit: R_PARISC_PCREL22F against symbol `$$divU' defined in .text.div section in /usr/lib/gcc/hppa64-linux-gnu/4.9.2/libgcc.a(_divU.o) hppa64-linux-gnu-ld: /usr/lib/gcc/hppa64-linux-gnu/4.9.2/libgcc.a(_moddi3.o)(.text+0x174): cannot reach $$divU Avoid such errors by bundling the millicode routines in the linker script. Signed-off-by: Helge Deller arch/parisc/kernel/vmlinux.lds.S | 2 ++ 1 file changed, 2 insertions(+) commit 5bc64bd246ca00e0bb0b7137afaf586f2f66a911 Author: Helge Deller Date: Sat Jul 8 23:25:14 2017 +0200 parisc: Disable further stack checks when panic occurs during stack check Before the irq handler detects a low stack and then panics the kernel, disable further stack checks to avoid recursive panics. Reported-by: John David Anglin Signed-off-by: Helge Deller arch/parisc/kernel/irq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a56e88ec05df50110f2bf578b6e17128f37111ed Merge: 4b162c5 96edd61 Author: Linus Torvalds Date: Sun Jul 23 11:22:45 2017 -0700 Merge tag 'for-linus-4.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Some fixes and cleanups for running under Xen" * tag 'for-linus-4.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/balloon: don't online new memory initially xen/x86: fix cpu hotplug xen/grant-table: log the lack of grants xen/x86: Don't BUG on CPU0 offlining commit 3c74541777302eec43a0d1327c4d58b8659a776b Author: Tejun Heo Date: Sun Jul 23 08:14:15 2017 -0400 cgroup: fix error return value from cgroup_subtree_control() While refactoring, f7b2814bb9b6 ("cgroup: factor out cgroup_{apply|finalize}_control() from cgroup_subtree_control_write()") broke error return value from the function. The return value from the last operation is always overridden to zero. Fix it. Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 737cc2a593782df6846b3cab7e0f64384f58364a Author: Mykola Kostenok Date: Mon Jul 17 12:00:35 2017 +0300 iio: aspeed-adc: wait for initial sequence. This patch enables adc engine at initialization time and waits for the initial sequence completion before enabling adc channels. Without this code adc channels are not functional and shows zeros for all connected channels. Tested on mellanox msn platform. v1 -> v2: Pointed by Rick Altherr: - Wait init sequence code enabled by bool from OF match table. Signed-off-by: Mykola Kostenok Reviewed-by: Rick Altherr Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/aspeed_adc.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 5dc78ad1904db597bdb4427f3ead437aae86f54c Author: Erez Shitrit Date: Thu Jul 13 14:29:08 2017 +0300 IB/ipoib: Notify on modify QP failure only when relevant Modify QP can fail and it can be acceptable, like when moving from RST to ERR state, all the rest are not acceptable and a message to the log should be printed. The current code prints on all failures and many messages like: "Failed to modify QP to ERROR state" appear, even when supported by the state machine of the QP object. Signed-off-by: Erez Shitrit Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_ib.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit b287b76e89503ef1d403cc5cc8bd74b035d25bfa Author: Leon Romanovsky Date: Sun Jul 23 10:46:14 2017 +0300 Revert "IB/core: Allow QP state transition from reset to error" The commit ebc9ca43e1d5 ("IB/core: Allow QP state transition from reset to error") allowed transition from Reset to Error state for the QPs. This behavior doesn't follow the IBTA specification 1.3, which in 10.3.1 QUEUE PAIR AND EE CONTEXT STATES section. The quote from the spec: "An error can be forced from any state, except Reset, with the Modify QP/EE Verb." Signed-off-by: Leon Romanovsky drivers/infiniband/core/verbs.c | 1 - 1 file changed, 1 deletion(-) commit 1b355094b308f3377c8f574ce86135ee159c6285 Author: Leon Romanovsky Date: Sat Jul 15 16:26:55 2017 +0300 IB/ipoib: Remove double pointer assigning There is no need to assign "p" pointer twice. This patch fixes the following smatch warning: drivers/infiniband/ulp/ipoib/ipoib_cm.c:517 ipoib_cm_rx_handler() warn: missing break? reassigning 'p->id' Fixes: 839fcaba355a ("IPoIB: Connected mode experimental support") Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 - 1 file changed, 1 deletion(-) commit dc892e17bbae670a3d7aa6ab8bd1033b15b24645 Author: Leon Romanovsky Date: Thu Jul 13 13:34:19 2017 +0300 IB/ipoib: Clean error paths in add port Refactor error paths in ipoib_add_port() function. The code flow ensures that the function terminates on every error flow and it makes redundant all "else" cases. The functions are called during the flow are returning "result < 0", in case of error, so there is no need to check it explicitly. Fixes: 58e9cc90cda7 ("IB/IPoIB: Fix bad error flow in ipoib_add_port()") Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit eb54714ddcb2462d4d4b8aa78d028b61e217a835 Author: Feras Daoud Date: Sun Jul 2 15:05:59 2017 +0300 IB/ipoib: Add get statistics support to SRIOV VF Add SRIOV VF support to get traffic statistics. Signed-off-by: Feras Daoud Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + 1 file changed, 1 insertion(+) commit 4829d964dfb027558c732cfa0d13b716ab3f0838 Author: Alex Vesker Date: Mon Jul 10 18:12:43 2017 +0300 IB/ipoib: Add multicast packets statistics Update the multicast counter when multicast packets are received and provide this information through ethtool support. Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 3 ++- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit d2e46fccc3e3d73a741efe433f00960331280696 Author: Feras Daoud Date: Sun Jul 16 11:33:01 2017 +0300 IB/ipoib: Set IPOIB_NEIGH_TBL_FLUSH after flushed completion initialization Set IPOIB_NEIGH_TBL_FLUSH bit after initializing the neighbor flushed completion, otherwise the garbage collector may signal a completion while it is not initialized yet. Fixes: b63b70d87741 ("IPoIB: Use a private hash table for path lookup in xmit path") Signed-off-by: Feras Daoud Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11f74b40359b19f760964e71d04882a6caf530cc Author: Alex Vesker Date: Thu Jul 13 11:27:12 2017 +0300 IB/ipoib: Prevent setting negative values to max_nonsrq_conn_qp Don't allow negative values to max_nonsrq_conn_qp. There is no functional impact on a negative value but it is logicically incorrect. Fixes: 68e995a29572 ("IPoIB/cm: Add connected mode support for devices without SRQs") Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + 1 file changed, 1 insertion(+) commit a08e1120627f72e9ed7c291e3b9f8dd29c1513ab Author: Erez Shitrit Date: Wed Jul 12 13:11:54 2017 +0300 IB/ipoib: Make sure no in-flight joins while leaving that mcast While cleaning neighs and there is a send-only mcast neigh, the driver should wait to finish its join process before trying to remove it. Without this patch, we will see messages like: "ipoib_mcast_leave on an in-flight join" and unexpected results in the join_complete. Signed-off-by: Erez Shitrit Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 6bdc8de2e86e717124a715ecc480892a2c331ff5 Author: Erez Shitrit Date: Wed Jul 12 10:40:25 2017 +0300 IB/ipoib: Use cancel_delayed_work_sync when needed The work mcast_task can re-queue itself, so instead of doing cancel && flush_workqueue, that still can leave a queued task on the air, use cancel_delayed_work_sync. Also, no need to use lock over the cancel, the original lock was due to bit assignment setting (IPOIB_MCAST_RUN) that is not in use anymore. Signed-off-by: Erez Shitrit Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit edf3f301db7af7e784d06f7059dfc8a69359af13 Author: Feras Daoud Date: Mon Jul 10 18:45:41 2017 +0300 IB/ipoib: Fix race between light events and interface restart A potential race between light_event and interface restart may attach multicast group to an already attached QP. Scenario: light_event flow goes through ipoib_mcast_dev_flush function, if a context switch occurs before calling ipoib_mcast_remove_list, then we may face a situation where the broadcast of the priv is null and the corresponding QP is not detached yet. If an "interface restart" runs during the previous context switch, the following scenario occurs: When the device goes up, ipoib_ib_dev_up function will be called, it will send a new registration request to the broadcast group and then attach the group to the QP that was not detached before. IPOIB_FLUSH_LIGHT INTERFACE RESTART __ipoib_ib_dev_flush | | | | | | | ipoib_mcast_dev_flush | Move mcast list and broadcast to remove_list | | | | | Context Switch--> | | ipoib_ib_dev_down | | | | | ipoib_ib_dev_up | | | | | ipoib_mcast_join_task | allocate new broadcast | | | | | Attach QP to multicast group | | | | | <--Context Switch ipoib_mcast_leave Detach QP from multicast group Signed-off-by: Feras Daoud Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib.h | 1 + drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 2 ++ 3 files changed, 4 insertions(+) commit 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 Author: Juergen Gross Date: Mon Jul 10 10:10:45 2017 +0200 xen/balloon: don't online new memory initially When setting up the Xenstore watch for the memory target size the new watch will fire at once. Don't try to reach the configured target size by onlining new memory in this case, as the current memory size will be smaller in almost all cases due to e.g. BIOS reserved pages. Onlining new memory will lead to more problems e.g. undesired conflicts with NVMe devices meant to be operated as block devices. Instead remember the difference between target size and current size when the watch fires for the first time and apply it to any further size changes, too. In order to avoid races between balloon.c and xen-balloon.c init calls do the xen-balloon.c initialization from balloon.c. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/balloon.c | 3 +++ drivers/xen/xen-balloon.c | 22 ++++++++++++---------- include/xen/balloon.h | 8 ++++++++ 3 files changed, 23 insertions(+), 10 deletions(-) commit c185ddec54657c145a0c2055e4b87918da24974f Author: Juergen Gross Date: Wed Jul 5 16:05:20 2017 +0200 xen/x86: fix cpu hotplug Commit dc6416f1d711eb4c1726e845d653235dcaae12e1 ("xen/x86: Call cpu_startup_entry(CPUHP_AP_ONLINE_IDLE) from xen_play_dead()") introduced an error leading to a stack overflow of the idle task when a cpu was brought offline/online many times: by calling cpu_startup_entry() instead of returning at the end of xen_play_dead() do_idle() would be entered again and again. Don't use cpu_startup_entry(), but cpuhp_online_idle() instead allowing to return from xen_play_dead(). Cc: # 4.12 Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/smp_pv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 29d11cfd8698038b87458ba4d1329b9da81150a5 Author: Wengang Wang Date: Tue Jul 18 09:40:35 2017 +0200 xen/grant-table: log the lack of grants log a message when we enter this situation: 1) we already allocated the max number of available grants from hypervisor and 2) we still need more (but the request fails because of 1)). Sometimes the lack of grants causes IO hangs in xen_blkfront devices. Adding this log would help debuging. Signed-off-by: Wengang Wang Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Junxiao Bi Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross drivers/xen/grant-table.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 0e4d394fe50308f69eb061eb89de78279df1e9dc Author: Vitaly Kuznetsov Date: Mon Jun 26 18:39:30 2017 +0200 xen/x86: Don't BUG on CPU0 offlining CONFIG_BOOTPARAM_HOTPLUG_CPU0 allows to offline CPU0 but Xen HVM guests BUG() in xen_teardown_timer(). Remove the BUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM. Signed-off-by: Vitaly Kuznetsov Acked-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/time.c | 1 - 1 file changed, 1 deletion(-) commit a7ee8cf190ecc8f118f0b7839912564117524d85 Author: Josef Bacik Date: Fri Jul 21 10:48:15 2017 -0400 nbd: only set sndtimeo if we have a timeout set A user reported that he was getting immediate disconnects with my sndtimeo patch applied. This is because by default the OSS nbd client doesn't set a timeout, so we end up setting the sndtimeo to 0, which of course means we have send errors a lot. Instead only set our sndtimeo if the user specified a timeout, otherwise we'll just wait forever like we did previously. Fixes: dc88e34d69d8 ("nbd: set sk->sk_sndtimeo for our sockets") Reported-by: Adam Borowski Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b4b2aeccf0f0fa1fd356cc72eeda7a2c66c39904 Author: Josef Bacik Date: Fri Jul 21 10:48:14 2017 -0400 nbd: take tx_lock before disconnecting We need to take the tx_lock so we don't interleave our disconnect request between real data going down the wire. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2e13456fb3d3e5f462dc1e59efc04eb62df35566 Author: Josef Bacik Date: Fri Jul 21 10:48:13 2017 -0400 nbd: allow multiple disconnects to be sent There's no reason to limit ourselves to one disconnect message per socket. Sometimes networks do strange things, might as well let sysadmins hit the panic button as much as they want. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4b162c530d9c101381500e586fedb1340595a6ff Merge: ae75d1a 1009ccd Author: Linus Torvalds Date: Sat Jul 22 09:25:00 2017 -0700 Merge tag 'hwmon-for-linus-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: "Avoid buffer overruns in applesmc driver" * tag 'hwmon-for-linus-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (applesmc) Avoid buffer overruns commit ae75d1aefe04c30de9b344abc69939cf7b537ac6 Merge: dedaff2 c632517 Author: Linus Torvalds Date: Sat Jul 22 09:00:24 2017 -0700 Merge tag 'tty-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are some small tty and serial driver fixes for 4.13-rc2. Nothing huge at all, a revert of a patch that turned out to break things, a fix up for a new tty ioctl we added in 4.13-rc1 to get the uapi definition correct, and a few minor serial driver fixes for reported issues. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: Fix TIOCGPTPEER ioctl definition tty: hide unused pty_get_peer function tty: serial: lpuart: Fix the logic for detecting the 32-bit type UART serial: imx: Prevent TX buffer PIO write when a DMA has been started Revert "serial: imx-serial - move DMA buffer configuration to DT" serial: sh-sci: Uninitialized variables in sysfs files serial: st-asc: Potential error pointer dereference commit dedaff2f6d0dd1e88022da6aaa3dbc97f7b5cf8b Merge: 55fd939 c89876d Author: Linus Torvalds Date: Sat Jul 22 08:57:24 2017 -0700 Merge tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char and misc driver fixes for 4.13-rc2. All fix reported problems with 4.13-rc1 or older kernels (like the binder fixes). Full details in the shortlog. All have been in linux-next with no reported issues" * tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: w1: omap-hdq: fix error return code in omap_hdq_probe() regmap: regmap-w1: Fix build troubles w1: Fix slave count on 1-Wire bus (resend) mux: mux-core: unregister mux_class in mux_exit() mux: remove the Kconfig question for the subsystem nvmem: rockchip-efuse: amend compatible rk322x-efuse to rk3228-efuse drivers/fsi: fix fsi_slave_mode prototype fsi: core: register with postcore_initcall thunderbolt: Correct access permissions for active NVM contents vmbus: re-enable channel tasklet spmi: pmic-arb: Always allocate ppid_to_apid table MAINTAINERS: Add entry for SPMI subsystem spmi: Include OF based modalias in device uevent binder: Use wake up hint for synchronous transactions. binder: use group leader instead of open thread Revert "android: binder: Sanity check at binder ioctl" commit 55fd939e8ee4538c3b66a28975dcc3beb96f80ba Merge: bcb53e5 d6f5f07 Author: Linus Torvalds Date: Sat Jul 22 08:55:16 2017 -0700 Merge tag 'usb-4.13-rc2' 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 4.13-rc2. The usual batch, gadget fixes for reported issues, as well as xhci fixes, and a small random collection of other fixes for reported issues. All have been in linux-next with no reported issues" * tag 'usb-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (25 commits) xhci: fix memleak in xhci_run() usb: xhci: fix spinlock recursion for USB2 test mode xhci: fix 20000ms port resume timeout usb: xhci: Issue stop EP command only when the EP state is running xhci: Bad Ethernet performance plugged in ASM1042A host xhci: Fix NULL pointer dereference when cleaning up streams for removed host usb: renesas_usbhs: gadget: disable all eps when the driver stops usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL usb: gadget: udc: renesas_usb3: protect usb3_ep->started in usb3_start_pipen() usb: gadget: udc: renesas_usb3: fix zlp transfer by the dmac usb: gadget: udc: renesas_usb3: fix free size in renesas_usb3_dma_free_prd() usb: gadget: f_uac2: endianness fixes. usb: gadget: f_uac1: endianness fixes. include: usb: audio: specify exact endiannes of descriptors usb: gadget: udc: start_udc() can be static usb: dwc2: gadget: On USB RESET reset device address to zero usb: storage: return on error to avoid a null pointer dereference usb: typec: include linux/device.h in ucsi.h USB: cdc-acm: add device-id for quirky printer usb: dwc3: gadget: only unmap requests from DMA if mapped ... commit bcb53e5769227813b7878df1ec9d329b0bd68f74 Merge: 82abbea7 5a1d4c5 Author: Linus Torvalds Date: Sat Jul 22 08:53:24 2017 -0700 Merge tag 'staging-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are some small staging driver fixes for reported issues for 4.13-rc2. Also in here is a new driver, the virtualbox DRM driver. It's stand-alone and got acks from the DRM developers to go in through this tree. It's a new thing, but it should be fine for this point in the rc cycle due to it being independent. All of this has been in linux-next for a while with no reported issues" * tag 'staging-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: rtl8188eu: add TL-WN722N v2 support staging: speakup: safely register and unregister ldisc staging: speakup: add functions to register and unregister ldisc staging: speakup: safely close tty staging: sm750fb: avoid conflicting vesafb staging: lustre: ko2iblnd: check copy_from_iter/copy_to_iter return code staging: vboxvideo: Add vboxvideo to drivers/staging staging: sm750fb: fixed a assignment typo staging: rtl8188eu: memory leak in rtw_free_cmd_obj() staging: vchiq_arm: fix error codes in probe staging: comedi: ni_mio_common: fix AO timer off-by-one regression commit 82abbea734d659b4218ad06734b4927b43261985 Author: Randy Dunlap Date: Fri Jul 21 13:32:27 2017 -0700 MAINTAINERS: fix alphabetical ordering Fix major alphabetic errors. No attempt to fix items that all begin with the same word (like ARM, BROADCOM, DRM, EDAC, FREESCALE, INTEL, OMAP, PCI, SAMSUNG, TI, USB, etc.). (diffstat +/- is different by one line because TI KEYSTONE MULTICORE had 2 blank lines after it.) Signed-off-by: Randy Dunlap Acked-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 1683 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 841 insertions(+), 842 deletions(-) commit 505d5c11192960a3f0639d1d9e05dffeddd4e874 Merge: 9931341 1ebf980 Author: Linus Torvalds Date: Fri Jul 21 16:26:01 2017 -0700 Merge tag 'nfs-for-4.13-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client bugfixes from Anna Schumaker: "Stable bugfix: - Fix error reporting regression Bugfixes: - Fix setting filelayout ds address race - Fix subtle access bug when using ACLs - Fix setting mnt3_counts array size - Fix a couple of pNFS commit races" * tag 'nfs-for-4.13-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFS/filelayout: Fix racy setting of fl->dsaddr in filelayout_check_deviceid() NFS: Be more careful about mapping file permissions NFS: Store the raw NFS access mask in the inode's access cache NFSv3: Convert nfs3_proc_access() to use nfs_access_set_mask() NFS: Refactor NFS access to kernel access mask calculation net/sunrpc/xprt_sock: fix regression in connection error reporting. nfs: count correct array for mnt3_counts array size Revert commit 722f0b891198 ("pNFS: Don't send COMMITs to the DSes if...") pNFS/flexfiles: Handle expired layout segments in ff_layout_initiate_commit() NFS: Fix another COMMIT race in pNFS NFS: Fix a COMMIT race in pNFS mount: copy the port field into the cloned nfs_server structure. NFS: Don't run wake_up_bit() when nobody is waiting... nfs: add export operations commit 99313414dda451a8c00b139afc77a803e647f309 Merge: 0151ef0 0e08255 Author: Linus Torvalds Date: Fri Jul 21 16:24:22 2017 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "This fixes a crash with SELinux and several other old and new bugs" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: check for bad and whiteout index on lookup ovl: do not cleanup directory and whiteout index entries ovl: fix xattr get and set with selinux ovl: remove unneeded check for IS_ERR() ovl: fix origin verification of index dir ovl: mark parent impure on ovl_link() ovl: fix random return value on mount commit 972777171f33f9932f51feebe42dbcc1b475d01a Author: Alexey Khoroshilov Date: Sat Jul 22 00:48:06 2017 +0300 platform/x86: wmi: Fix error handling in acpi_wmi_init() The order of resource deallocations is messed up in acpi_wmi_init(). It should be vice versa. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0151ef0085f946eed75da851297577f88d74c50c Merge: bb236db 42de82a Author: Linus Torvalds Date: Fri Jul 21 16:20:05 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A small set of fixes for -rc2 - two fixes for BFQ, documentation and code, and a removal of an unused variable in nbd. Outside of that, a small collection of fixes from the usual crew on the nvme side" * 'for-linus' of git://git.kernel.dk/linux-block: nvmet: don't report 0-bytes in serial number nvmet: preserve controller serial number between reboots nvmet: Move serial number from controller to subsystem nvmet: prefix version configfs file with attr nvme-pci: Fix an error handling path in 'nvme_probe()' nvme-pci: Remove nvme_setup_prps BUG_ON nvme-pci: add another device ID with stripe quirk nvmet-fc: fix byte swapping in nvmet_fc_ls_create_association nvme: fix byte swapping in the streams code nbd: kill unused ret in recv_work bfq: dispatch request to prevent queue stalling after the request completion bfq: fix typos in comments about B-WF2Q+ algorithm commit 531da74075a7805768ce3cd323e37e3548cbf6c5 Author: Sergei Shtylyov Date: Fri Jul 21 20:30:39 2017 +0300 of: irq: fix of_irq_to_resource() error check of_irq_to_resource() has recently been fixed to return negative error #'s along with 0, however of_irq_to_resource_table() still only regards 0 as invalid IRQ -- fix it up. Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()") Signed-off-by: Sergei Shtylyov Signed-off-by: Rob Herring drivers/of/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb236dbeea8181c6733e6d34a53bfef9c8ef4e95 Merge: 24a1635 a62ab66 Author: Linus Torvalds Date: Fri Jul 21 14:22:05 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull more rdma fixes from Doug Ledford: "As per my previous pull request, there were two drivers that each had a rather large number of legitimate fixes still to be sent. As it turned out, I also missed a reasonably large set of fixes from one person across the stack that are all important fixes. All in all, the bnxt_re, i40iw, and Dan Carpenter are 3/4 to 2/3rds of this pull request. There were some other random fixes that I didn't send in the last pull request that I added to this one. This catches the rdma stack up to the fixes from up to about the beginning of this week. Any more fixes I'll wait and batch up later in the -rc cycle. This will give us a good base to start with for basing a for-next branch on -rc2. Summary: - i40iw fixes - bnxt_re fixes - Dan Carpenter bugfixes across stack - ten more random fixes, no more than two from any one person" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (37 commits) RDMA/core: Initialize port_num in qp_attr RDMA/uverbs: Fix the check for port number IB/cma: Fix reference count leak when no ipv4 addresses are set RDMA/iser: don't send an rkey if all data is written as immadiate-data rxe: fix broken receive queue draining RDMA/qedr: Prevent memory overrun in verbs' user responses iw_cxgb4: don't use WR keys/addrs for 0 byte reads IB/mlx4: Fix CM REQ retries in paravirt mode IB/rdmavt: Setting of QP timeout can overflow jiffies computation IB/core: Fix sparse warnings RDMA/bnxt_re: Fix the value reported for local ack delay RDMA/bnxt_re: Report MISSED_EVENTS in req_notify_cq RDMA/bnxt_re: Fix return value of poll routine RDMA/bnxt_re: Enable atomics only if host bios supports RDMA/bnxt_re: Specify RDMA component when allocating stats context RDMA/bnxt_re: Fixed the max_rd_atomic support for initiator and destination QP RDMA/bnxt_re: Report supported value to IB stack in query_device RDMA/bnxt_re: Do not free the ctx_tbl entry if delete GID fails RDMA/bnxt_re: Fix WQE Size posted to HW to prevent it from throwing error RDMA/bnxt_re: Free doorbell page index (DPI) during dealloc ucontext ... commit 24a1635a41bccb5cc426eaef8b88c7e0961ef6bb Merge: f79ec88 5896ec7 Author: Linus Torvalds Date: Fri Jul 21 14:16:42 2017 -0700 Merge tag 'drm-fixes-for-v4.13-rc2' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "A bunch of fixes for rc2: two imx regressions, vc4 fix, dma-buf fix, some displayport mst fixes, and an amdkfd fix. Nothing too crazy, I assume we just haven't see much rc1 testing yet" * tag 'drm-fixes-for-v4.13-rc2' of git://people.freedesktop.org/~airlied/linux: drm/mst: Avoid processing partially received up/down message transactions drm/mst: Avoid dereferencing a NULL mstb in drm_dp_mst_handle_up_req() drm/mst: Fix error handling during MST sideband message reception drm/imx: parallel-display: Accept drm_of_find_panel_or_bridge failure drm/imx: fix typo in ipu_plane_formats[] drm/vc4: Fix VBLANK handling in crtc->enable() path dma-buf/fence: Avoid use of uninitialised timestamp drm/amdgpu: Remove unused field kgd2kfd_shared_resources.num_mec drm/radeon: Remove initialization of shared_resources.num_mec drm/amdkfd: Remove unused references to shared_resources.num_mec drm/amdgpu: Fix KFD oversubscription by tracking queues correctly commit f79ec886f994918de057dd224fa2dfdc162bb3c3 Merge: b0a7528 f86f418 Author: Linus Torvalds Date: Fri Jul 21 13:59:51 2017 -0700 Merge tag 'trace-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Three minor updates - Use the new GFP_RETRY_MAYFAIL to be more aggressive in allocating memory for the ring buffer without causing OOMs - Fix a memory leak in adding and removing instances - Add __rcu annotation to be able to debug RCU usage of function tracing a bit better" * tag 'trace-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: trace: fix the errors caused by incompatible type of RCU variables tracing: Fix kmemleak in instance_rmdir tracing/ring_buffer: Try harder to allocate commit b0a752818bdba3d0fe9de593618ccab9f1101508 Merge: 10fc955 f1ff89e Author: Linus Torvalds Date: Fri Jul 21 13:58:10 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "A bunch of small fixes for x86" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: x86: hyperv: avoid livelock in oneshot SynIC timers KVM: VMX: Fix invalid guest state detection after task-switch emulation x86: add MULTIUSER dependency for KVM KVM: nVMX: Disallow VM-entry in MOV-SS shadow KVM: nVMX: track NMI blocking state separately for each VMCS KVM: x86: masking out upper bits commit 10fc95547fcc672ef1fc18ae1b70e1e9f52f246a Merge: 4ec9f7a 029d925 Author: Linus Torvalds Date: Fri Jul 21 13:54:37 2017 -0700 Merge tag 'powerpc-4.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "A handful of fixes, mostly for new code: - some reworking of the new STRICT_KERNEL_RWX support to make sure we also remove executable permission from __init memory before it's freed. - a fix to some recent optimisations to the hypercall entry where we were clobbering r12, this was breaking nested guests (PR KVM). - a fix for the recent patch to opal_configure_cores(). This could break booting on bare metal Power8 boxes if the kernel was built without CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG. - .. and finally a workaround for spurious PMU interrupts on Power9 DD2. Thanks to: Nicholas Piggin, Anton Blanchard, Balbir Singh" * tag 'powerpc-4.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Mark __init memory no-execute when STRICT_KERNEL_RWX=y powerpc/mm/hash: Refactor hash__mark_rodata_ro() powerpc/mm/radix: Refactor radix__mark_rodata_ro() powerpc/64s: Fix hypercall entry clobbering r12 input powerpc/perf: Avoid spurious PMU interrupts after idle powerpc/powernv: Fix boot on Power8 bare metal due to opal_configure_cores() commit 6308d8e3d42bea15461c696df1ad74c2944b5c23 Author: Guoqing Jiang Date: Fri Jul 21 16:33:44 2017 +0800 md: simplify code with bio_io_error Since bio_io_error sets bi_status to BLK_STS_IOERR, and calls bio_endio, so we can use it directly. And as mentioned by Shaohua, there are also two places in raid5.c can use bio_io_error either. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid1.c | 3 +-- drivers/md/raid10.c | 6 ++---- drivers/md/raid5.c | 9 +++------ 3 files changed, 6 insertions(+), 12 deletions(-) commit 16d56e2fcc1fc15b981369653c3b41d7ff0b443d Author: Shaohua Li Date: Mon Jul 17 14:33:48 2017 -0700 md/raid1: fix writebehind bio clone After bio is submitted, we should not clone it as its bi_iter might be invalid by driver. This is the case of behind_master_bio. In certain situration, we could dispatch behind_master_bio immediately for the first disk and then clone it for other disks. https://bugzilla.kernel.org/show_bug.cgi?id=196383 Reported-and-tested-by: Markus Reviewed-by: Ming Lei Fix: 841c1316c7da(md: raid1: improve write behind) Cc: stable@vger.kernel.org (4.12+) Signed-off-by: Shaohua Li drivers/md/raid1.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) commit be453e7761d0e72d8a1b2fcfde6d1a7e53881190 Author: Ming Lei Date: Fri Jul 14 16:14:44 2017 +0800 md: raid1-10: move raid1/raid10 common code into raid1-10.c No function change, just move 'struct resync_pages' and related helpers into raid1-10.c Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/md.h | 53 ------------------------------------------- drivers/md/raid1-10.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/md/raid1.c | 9 -------- drivers/md/raid10.c | 9 -------- 4 files changed, 62 insertions(+), 71 deletions(-) commit fb0eb5df09307603b21845af1d143cc910154593 Author: Ming Lei Date: Fri Jul 14 16:14:43 2017 +0800 md: raid1/raid10: initialize bvec table via bio_add_page() We will support multipage bvec soon, so initialize bvec table using the standardy way instead of writing the talbe directly. Otherwise it won't work any more once multipage bvec is enabled. Acked-by: Guoqing Jiang Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1-10.c | 19 +++++++++++++++++++ drivers/md/raid1.c | 18 ++++-------------- drivers/md/raid10.c | 6 ++++-- 3 files changed, 27 insertions(+), 16 deletions(-) commit 022e510fcbda79183fd2cdc01abb01b4be80d03f Author: Ming Lei Date: Fri Jul 14 16:14:42 2017 +0800 md: remove 'idx' from 'struct resync_pages' bio_add_page() won't fail for resync bio, and the page index for each bio is same, so remove it. More importantly the 'idx' of 'struct resync_pages' is initialized in mempool allocator function, the current way is wrong since mempool is only responsible for allocation, we can't use that for initialization. Suggested-by: NeilBrown Reported-by: NeilBrown Reported-and-tested-by: Patrick Fixes: f0250618361d(md: raid10: don't use bio's vec table to manage resync pages) Fixes: 98d30c5812c3(md: raid1: don't use bio's vec table to manage resync pages) Cc: stable@vger.kernel.org (4.12+) Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/md.h | 1 - drivers/md/raid1.c | 6 +++--- drivers/md/raid10.c | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) commit 4ec9f7a18b9fcef6e8f7c13279b48e3bb5d4d704 Merge: e234b4a db15e7f Author: Linus Torvalds Date: Fri Jul 21 11:20:58 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Half of the fixes are for various build time warnings triggered by randconfig builds. Most (but not all...) were harmless. There's also: - ACPI boundary condition fixes - UV platform fixes - defconfig updates - an AMD K6 CPU init fix - a %pOF printk format related preparatory change - .. and a warning fix related to the tlb/PCID changes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/devicetree: Convert to using %pOF instead of ->full_name x86/platform/uv/BAU: Disable BAU on single hub configurations x86/platform/intel-mid: Fix a format string overflow warning x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG x86/build: Silence the build with "make -s" x86/io: Add "memory" clobber to insb/insw/insl/outsb/outsw/outsl x86/fpu/math-emu: Avoid bogus -Wint-in-bool-context warning x86/fpu/math-emu: Fix possible uninitialized variable use perf/x86: Shut up false-positive -Wmaybe-uninitialized warning x86/defconfig: Remove stale, old Kconfig options x86/ioapic: Pass the correct data to unmask_ioapic_irq() x86/acpi: Prevent out of bound access caused by broken ACPI tables x86/mm, KVM: Fix warning when !CONFIG_PREEMPT_COUNT x86/platform/uv/BAU: Fix congested_response_us not taking effect x86/cpu: Use indirect call to measure performance in init_amd_k6() commit e234b4a807202990a0aec4e74aa552fe76b5b6d2 Merge: 5a77f02 32f2fea Author: Linus Torvalds Date: Fri Jul 21 11:18:09 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Ingo Molnar: "A timer_irq_init() clocksource API robustness fix" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/timer-of: Handle of_irq_get_byname() result correctly commit 5a77f0254b35e0bea414305e1b71a6bdaee814dc Merge: bbcdea6 193be41 Author: Linus Torvalds Date: Fri Jul 21 11:16:12 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "A cputime fix and code comments/organization fix to the deadline scheduler" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/deadline: Fix confusing comments about selection of top pi-waiter sched/cputime: Don't use smp_processor_id() in preemptible context commit bbcdea658f42070d25e7764f1b81785a51cb1642 Merge: 8b810a3 df6c3db Author: Linus Torvalds Date: Fri Jul 21 11:12:48 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Two hw-enablement patches, two race fixes, three fixes for regressions of semantics, plus a number of tooling fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Add proper condition to run sched_task callbacks perf/core: Fix locking for children siblings group read perf/core: Fix scheduling regression of pinned groups perf/x86/intel: Fix debug_store reset field for freq events perf/x86/intel: Add Goldmont Plus CPU PMU support perf/x86/intel: Enable C-state residency events for Apollo Lake perf symbols: Accept zero as the kernel base address Revert "perf/core: Drop kernel samples even though :u is specified" perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target perf evsel: State in the default event name if attr.exclude_kernel is set perf evsel: Fix attr.exclude_kernel setting for default cycles:p commit 8b810a3a35eec9cd5e9245266dd0ae10de063094 Merge: 34eddef 69f0d42 Author: Linus Torvalds Date: Fri Jul 21 11:11:23 2017 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixlet from Ingo Molnar: "Remove an unnecessary priority adjustment in the rtmutex code" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rtmutex: Remove unnecessary priority adjustment commit 1ebf980127924c639e2b85c08468311ba1c95b70 Author: Trond Myklebust Date: Thu Jul 20 17:00:02 2017 -0400 NFS/filelayout: Fix racy setting of fl->dsaddr in filelayout_check_deviceid() We must set fl->dsaddr once, and once only, even if there are multiple processes calling filelayout_check_deviceid() for the same layout segment. Reported-by: Olga Kornievskaia Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/filelayout/filelayout.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 34eddefee41a56b378d866897bf83ed909fb4ab3 Merge: 0a6109f acc80c3 Author: Linus Torvalds Date: Fri Jul 21 11:07:41 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "A resume_irq() fix, plus a number of static declaration fixes" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/digicolor: Drop unnecessary static irqchip/mips-cpu: Drop unnecessary static irqchip/gic/realview: Drop unnecessary static irqchip/mips-gic: Remove population of irq domain names genirq/PM: Properly pretend disabled state when force resuming interrupts commit 0a6109fd1b605cbfa58ae9ae9d571d0f4140b727 Merge: 921edf3 325cdac Author: Linus Torvalds Date: Fri Jul 21 10:41:19 2017 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fixes from Ingo Molnar: "A fix to WARN_ON_ONCE() done by modules, plus a MAINTAINERS update" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debug: Fix WARN_ON_ONCE() for modules MAINTAINERS: Update the PTRACE entry commit 9d154e42a338a4142e7a656d662ebf98c4ceb26b Author: Sylwester Nawrocki Date: Fri Jul 21 18:29:20 2017 +0200 ASoC: samsung: odroid: Fix EPLL frequency values To prevent incorrect setting of the EPLL the clock frequency values are changed to exact values as possible to obtain on the EPLL output with given PLL coefficients. This patch is required after recent change of the EPLL rate table by patch "clk: samsung: exynos5420: The EPLL rate table corrections". Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/odroid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cf601774c9f23078010adc9e6cd29470fafa5678 Author: Dmitry Torokhov Date: Wed Jul 12 17:14:24 2017 -0700 HID: usbhid: fix "always poll" quirk Even though the IO for devices with "always poll" quirk is already running, we still need to set HID_OPENED bit in usbhid->iofl so the interrupt handler does not ignore the data coming from the device. Reported-by: Olof Johansson Tested-by: Olof Johansson Fixes: e399396a6b0 ("HID: usbhid: remove custom locking from usbhid_open...") Signed-off-by: Dmitry Torokhov Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/usbhid/hid-core.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit ecbb903c56745d59c301db26dd7d8b74b520eb84 Author: Trond Myklebust Date: Tue Jul 11 17:54:35 2017 -0400 NFS: Be more careful about mapping file permissions When mapping a directory, we want the MAY_WRITE permissions to reflect whether or not we have permission to modify, add and delete the directory entries. MAY_EXEC must map to lookup permissions. On the other hand, for files, we want MAY_WRITE to reflect a permission to modify and extend the file. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit bd8b2441742b49c76bec707757bd9c028ea9838e Author: Trond Myklebust Date: Tue Jul 11 17:54:34 2017 -0400 NFS: Store the raw NFS access mask in the inode's access cache Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 9 ++++++--- include/linux/nfs_fs.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) commit eda3e20847788c453aa7ab478aeaceb56ed29cb6 Author: Trond Myklebust Date: Tue Jul 11 17:54:33 2017 -0400 NFSv3: Convert nfs3_proc_access() to use nfs_access_set_mask() Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs3proc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 15d4b73ac2232d6f2beb61d8b2400ea66e4da606 Author: Trond Myklebust Date: Tue Jul 11 17:54:32 2017 -0400 NFS: Refactor NFS access to kernel access mask calculation Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) commit 967003bb2cae121d345fd807eb757d9422229713 Author: Chris Wilson Date: Thu Jul 20 18:45:32 2017 +0100 drm/dp: Don't trust drm_dp_downstream_id() Before we interpret drm_dp_downstream_id() as a string, make sure it is NULL terminated, even when drm_dp_downtsream_id() fails. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101660 Signed-off-by: Chris Wilson Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170720174532.23377-2-chris@chris-wilson.co.uk drivers/gpu/drm/drm_dp_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c11a93f5fd9229dc7c8b90570c75cf70bc3976c2 Author: Chris Wilson Date: Thu Jul 20 18:45:31 2017 +0100 drm/dp: Fix read pointer for drm_dp_downsteam_debug() Pass in the array and not a pointer to the array to drm_dp_dpcd_read(). Signed-off-by: Chris Wilson Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170720174532.23377-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ffbc1d65583394be12801655781dd2b079ce169 Author: NeilBrown Date: Wed Jul 19 14:05:01 2017 +1000 net/sunrpc/xprt_sock: fix regression in connection error reporting. Commit 3d4762639dd3 ("tcp: remove poll() flakes when receiving RST") in v4.12 changed the order in which ->sk_state_change() and ->sk_error_report() are called when a socket is shut down - sk_state_change() is now called first. This causes xs_tcp_state_change() -> xs_sock_mark_closed() -> xprt_disconnect_done() to wake all pending tasked with -EAGAIN. When the ->sk_error_report() callback arrives, it is too late to pass the error on, and it is lost. As easy way to demonstrate the problem caused is to try to start rpc.nfsd while rcpbind isn't running. nfsd will attempt a tcp connection to rpcbind. A ECONNREFUSED error is returned, but sunrpc code loses the error and keeps retrying. If it saw the ECONNREFUSED, it would abort. To fix this, handle the sk->sk_err in the TCP_CLOSE branch of xs_tcp_state_change(). Fixes: 3d4762639dd3 ("tcp: remove poll() flakes when receiving RST") Cc: stable@vger.kernel.org (v4.12) Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker net/sunrpc/xprtsock.c | 2 ++ 1 file changed, 2 insertions(+) commit ecc7b435d2beb025d7506af74cf749af2cef5734 Author: Eryu Guan Date: Tue Jul 18 13:32:32 2017 +0800 nfs: count correct array for mnt3_counts array size Array size of mnt3_counts should be the size of array mnt3_procedures, not mnt_procedures, though they're same in size right now. Found this by code inspection. Fixes: 1c5876ddbdb4 ("sunrpc: move p_count out of struct rpc_procinfo") Cc: Christoph Hellwig Signed-off-by: Eryu Guan Reviewed-by: Christoph Hellwig Signed-off-by: Anna Schumaker fs/nfs/mount_clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d755cbc26e8295ae8e5d30425364e093b4247a85 Merge: 271612d bf8b286 Author: Kalle Valo Date: Fri Jul 21 14:33:27 2017 +0300 Merge tag 'iwlwifi-for-kalle-2017-07-21' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes Some iwlwifi fixes for 4.13: * A few NULL pointer dereferences in the recovery flow; * A small but important fix for IBSS; * A one-liner fix for tracing, which was including too much data; * Some of these are bugzilla bug fixes; commit 364e93ca5dd6f4d266c3a5ff169961d2caac19fb Author: Fabio Estevam Date: Thu Jul 20 14:36:17 2017 -0300 ASoC: sgtl5000: Use snd_soc_kcontrol_codec() Since commit a72952672005 ("ASoC: sgtl5000: add avc support") the following kernel crash happens after running a 'reboot' command: ALSA: Storing mixer settings... [ 20.031604] Unable to handle kernel paging request at virtual address fffffffe [ 20.039268] pgd = de2a0000 [ 20.041999] [fffffffe] *pgd=8fffd861, *pte=00000000, *ppte=00000000 [ 20.048387] Internal error: Oops: 80000007 [#1] SMP ARM The function that takes a kcontrol parameter and returns the codec that registered the control is snd_soc_kcontrol_codec(), so use the correct function to fix the problem. Fixes: a72952672005 ("ASoC: sgtl5000: add avc support") Signed-off-by: Fabio Estevam Tested-by: Richard Leitner Reviewed-by: Richard Leitner Signed-off-by: Mark Brown sound/soc/codecs/sgtl5000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 536dcc9c34035778892a7e3cbf45166ce73f8d34 Author: Tobias Klauser Date: Fri Jul 21 10:44:07 2017 +0200 xtensa: remove wrapper header for asm/param.h xtensa's asm/device.h is a verbatim copy of asm-generic/device.h and does not add any arch specific extensions. Thus, use the asm-generic header directly. Signed-off-by: Tobias Klauser Signed-off-by: Max Filippov arch/xtensa/include/asm/Kbuild | 1 + arch/xtensa/include/asm/param.h | 18 ------------------ 2 files changed, 1 insertion(+), 18 deletions(-) commit b82d6cb41eb54bf1c0e5d2ae73f49a4dff54c54b Author: Tobias Klauser Date: Fri Jul 21 10:35:31 2017 +0200 xtensa: remove wrapper header for asm/device.h xtensa's asm/device.h is a verbatim copy of asm-generic/device.h and does not add any arch specific extensions. Thus, use the asm-generic header directly. Acked-by: Max Filippov Signed-off-by: Tobias Klauser Signed-off-by: Max Filippov arch/xtensa/include/asm/Kbuild | 1 + arch/xtensa/include/asm/device.h | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) commit e674ac9a470547ae6b9714e6bbe4960b60d148c6 Author: Kailang Yang Date: Fri Jul 21 17:15:07 2017 +0800 ALSA: hda/realtek - No loopback on ALC225/ALC295 codec ALC225/ALC295 also have no loopback mixer. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 5a36767a41650518f35ea0bae9a2d6e775f1aed1 Author: Kailang Yang Date: Fri Jul 21 15:23:53 2017 +0800 ALSA: hda/realtek - Update headset mode for ALC225 Dell new platform with new hardware layout. Old headset mode policy will cause headset mode check type has a chance to check fail. So, we update new headset mode to match new hardware layout. New headset mode policy also could suitable to old hardware layout. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 77 +++++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 25 deletions(-) commit bf8b286f86fcc66d138fd992acfa37839340218d Author: Johannes Berg Date: Fri Jun 30 10:48:28 2017 +0200 iwlwifi: mvm: defer setting IWL_MVM_STATUS_IN_HW_RESTART A hardware/firmware error may happen at any point in time. In particular, it might happen while mac80211 is in the middle of a flow. We observed the following situation: * mac80211 is in authentication flow, in ieee80211_prep_connection() * iwlwifi firmware crashes, but no error can be reported at this precise point (mostly because the driver method is void, but even if it wasn't we'd just shift to a race condition) * mac80211 continues the flow, trying to add the AP station * iwlwifi has already set its internal restart flag, and so thinks that adding the station is part of the restart and already set up, so it uses the information that's supposed to already be in the struct This can happen with any flow in mac80211 and with any information we try to preserve across hardware restarts. To fix this, only set a new HW_RESTART_REQUESTED flag and translate that to IN_HW_RESTART once mac80211 actually starts the restart by calling our start() method. As a consequence, any mac80211 flow in progress at the time of the restart will properly finish (certainly with errors), before the restart is attempted. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=195299. Reported-by: djagoo Reported-by: Łukasz Siudut Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 8 +++++++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 +++--- 3 files changed, 12 insertions(+), 4 deletions(-) commit 7b758a111819006ba64dd23aa016d42a20ba8557 Author: Luca Coelho Date: Tue Jun 20 13:40:03 2017 +0300 iwlwifi: mvm: handle IBSS probe_queue in a few missing places When IBSS was implemented for DQA, we missid a few places where it should be handled in the same way as AP. Fixes: ee48b72211f8 ("iwlwifi: mvm: support ibss in dqa mode") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5462bcd8c9dc7e7ff2dd54c3f1bb5a9a729f7a73 Author: Emmanuel Grumbach Date: Wed Jun 14 12:21:05 2017 +0300 iwlwifi: fix tracing when tx only is enabled iwl_trace_data is somewhat confusing. It returns a bool that tells if the payload of the skb should be added to the tx_data event. If it returns false, then the payload of the skb is added to the tx event. The purpose is to be able to start tracing with -e iwlwifi and record non-data packets only which saves bandwidth. Since EAPOLs are important, seldom and not real data packet (despite being WiFi data packets), they are included in tx event and thus iwl_trace_data returns false on those. This last part was buggy, and because of that, all the data packets were included in the tx event. Fix that. Fixes: 0c4cb7314d15 ("iwlwifi: tracing: decouple from mac80211") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2388bd7b133504fa0991f483db66fad3a0de8694 Author: Dan Carpenter Date: Wed Jun 14 13:44:51 2017 +0300 iwlwifi: missing error code in iwl_trans_pcie_alloc() We don't set the error code here so we end up returning ERR_PTR(0) which is NULL. The caller doesn't expect that so it results in a NULL dereference. Fixes: 2e5d4a8f61dc ("iwlwifi: pcie: Add new configuration to enable MSIX") Signed-off-by: Dan Carpenter Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 61dd8a8a6a0c3cbfb6b02ab652c4f4efb93f3d79 Author: Emmanuel Grumbach Date: Mon Jun 12 15:10:09 2017 +0300 iwlwifi: mvm: fix a NULL pointer dereference of error in recovery Sometimes, we can have an firmware crash while trying to recover from a previous firmware problem. When that happens, lots of things can go wrong. For example the stations don't get added properly to mvm->fw_id_to_mac_id. Mac80211 tries to stop A-MPDU upon reconfig but in case of a firmware crash we will bail out fairly early and in the end, we won't delete the A-MPDU Rx timeout. When that timer expired after a double firmware crash, we end up dereferencing mvm->fw_id_to_mac_id[sta_id] which is NULL. Fixes: 10b2b2019d81 ("iwlwifi: mvm: add infrastructure for tracking BA session in driver") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f6eac740a9b6f3737a969bad82931633519a1cc5 Author: Mordechai Goodstein Date: Sun Jun 11 18:00:36 2017 +0300 iwlwifi: pcie: fix unused txq NULL pointer dereference Before TVQM, all TX queues were allocated straight at init. With TVQM, queues are allocated on demand and hence we need to check if a queue exists before dereferencing it. Fixes: 66128fa08806 ("iwlwifi: move to TVQM mode") Signed-off-by: Mordechai Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 +++ 1 file changed, 3 insertions(+) commit 0b0f934e92a8eaed2e6c48a50eae6f84661f74f3 Author: Emmanuel Grumbach Date: Thu Jun 8 10:55:26 2017 +0300 iwlwifi: dvm: prevent an out of bounds access iwlagn_check_ratid_empty takes the tid as a parameter, but it doesn't check that it is not IWL_TID_NON_QOS. Since IWL_TID_NON_QOS = 8 and iwl_priv::tid_data is an array with 8 entries, accessing iwl_priv::tid_data[IWL_TID_NON_QOS] is a bad idea. This happened in iwlagn_rx_reply_tx. Since iwlagn_check_ratid_empty is relevant only to check whether we can open A-MPDU, this flow is irrelevant if tid is IWL_TID_NON_QOS. Call iwlagn_check_ratid_empty only inside the if (tid != IWL_TID_NON_QOS) a few lines earlier in the function. Cc: Reported-by: Seraphime Kirkovski Tested-by: Seraphime Kirkovski Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db15e7f27369b81b6605a546d54eb844f87370a5 Author: Rob Herring Date: Tue Jul 18 16:42:47 2017 -0500 x86/devicetree: Convert to using %pOF instead of ->full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each device node. Signed-off-by: Rob Herring Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: devicetree@vger.kernel.org Link: http://lkml.kernel.org/r/20170718214339.7774-7-robh@kernel.org [ Clarify the error message while at it, as 'node' is ambiguous. ] Signed-off-by: Ingo Molnar arch/x86/kernel/devicetree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit df6c3db8d30fb1699ccbc403196b86324f4257af Author: Jiri Olsa Date: Wed Jul 19 09:52:47 2017 +0200 perf/x86/intel: Add proper condition to run sched_task callbacks We have 2 functions using the same sched_task callback: - PEBS drain for free running counters - LBR save/store Both of them are called from intel_pmu_sched_task() and either of them can be unwillingly triggered when the other one is configured to run. Let's say there's PEBS drain configured in sched_task callback for the event, but in the callback itself (intel_pmu_sched_task()) we will also run the code for LBR save/restore, which we did not ask for, but the code in intel_pmu_sched_task() does not check for that. This can lead to extra cycles in some perf monitoring, like when we monitor PEBS event without LBR data. # perf record --no-timestamp -c 10000 -e cycles:p ./perf bench sched pipe -l 1000000 (We need PEBS, non freq/non timestamp event to enable the sched_task callback) The perf stat of cycles and msr:write_msr for above command before the change: ... Performance counter stats for './perf record --no-timestamp -c 10000 -e cycles:p \ ./perf bench sched pipe -l 1000000' (5 runs): 18,519,557,441 cycles:k 91,195,527 msr:write_msr 29.334476406 seconds time elapsed And after the change: ... Performance counter stats for './perf record --no-timestamp -c 10000 -e cycles:p \ ./perf bench sched pipe -l 1000000' (5 runs): 18,704,973,540 cycles:k 27,184,720 msr:write_msr 16.977875900 seconds time elapsed There's no affect on cycles:k because the sched_task happens with events switched off, however the msr:write_msr tracepoint counter together with almost 50% of time speedup show the improvement. Monitoring LBR event and having extra PEBS drain processing in sched_task callback showed just a little speedup, because the drain function does not do much extra work in case there is no PEBS data. Adding conditions to recognize the configured work that needs to be done in the x86_pmu's sched_task callback. Suggested-by: Peter Zijlstra Signed-off-by: Jiri Olsa Acked-by: Peter Zijlstra (Intel) Cc: Kan Liang Cc: Alexander Shishkin Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170719075247.GA27506@krava Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 6 ++---- arch/x86/events/intel/ds.c | 14 ++++++++------ arch/x86/events/intel/lbr.c | 4 ++++ 3 files changed, 14 insertions(+), 10 deletions(-) commit 2fe9a5c6ade4dfb53ff1c137cca3828d9d1d0948 Author: Andrew Banman Date: Thu Jul 20 17:05:51 2017 -0500 x86/platform/uv/BAU: Disable BAU on single hub configurations The BAU confers no benefit to a UV system running with only one hub/socket. Permanently disable the BAU driver if there are less than two hubs online to avoid BAU overhead. We have observed failed boots on single-socket UV4 systems caused by BAU that are avoided with this patch. Also, while at it, consolidate initialization error blocks and fix a memory leak. Signed-off-by: Andrew Banman Acked-by: Russ Anderson Acked-by: Mike Travis Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: tony.ernst@hpe.com Link: http://lkml.kernel.org/r/1500588351-78016-1-git-send-email-abanman@hpe.com [ Minor cleanups. ] Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 2aeb1883547626d82c597cce2c99f0b9c62e2425 Author: Jiri Olsa Date: Thu Jul 20 16:14:55 2017 +0200 perf/core: Fix locking for children siblings group read We're missing ctx lock when iterating children siblings within the perf_read path for group reading. Following race and crash can happen: User space doing read syscall on event group leader: T1: perf_read lock event->ctx->mutex perf_read_group lock leader->child_mutex __perf_read_group_add(child) list_for_each_entry(sub, &leader->sibling_list, group_entry) ----> sub might be invalid at this point, because it could get removed via perf_event_exit_task_context in T2 Child exiting and cleaning up its events: T2: perf_event_exit_task_context lock ctx->mutex list_for_each_entry_safe(child_event, next, &child_ctx->event_list,... perf_event_exit_event(child) lock ctx->lock perf_group_detach(child) unlock ctx->lock ----> child is removed from sibling_list without any sync with T1 path above ... free_event(child) Before the child is removed from the leader's child_list, (and thus is omitted from perf_read_group processing), we need to ensure that perf_read_group touches child's siblings under its ctx->lock. Peter further notes: | One additional note; this bug got exposed by commit: | | ba5213ae6b88 ("perf/core: Correct event creation with PERF_FORMAT_GROUP") | | which made it possible to actually trigger this code-path. Tested-by: Andi Kleen Signed-off-by: Jiri Olsa Acked-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: ba5213ae6b88 ("perf/core: Correct event creation with PERF_FORMAT_GROUP") Link: http://lkml.kernel.org/r/20170720141455.2106-1-jolsa@kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 271612d72da5b46715447bc18add4a1cf7d87687 Author: Larry Finger Date: Mon Jul 17 09:34:19 2017 -0500 Revert "rtlwifi: btcoex: rtl8723be: fix ant_sel not work" This reverts commit f95d95a7cd5514549dcf6ba754f0ee834cce3e1f. With commit f95d95a7cd55 ("rtlwifi: btcoex: rtl8723be: fix ant_sel not work"), the kernel has a NULL pointer dereference oops. This content and the proper fix will be included in a later patch. Fixes: f95d95a7cd55 ("rtlwifi: btcoex: rtl8723be: fix ant_sel not work") Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 3 --- drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 - 2 files changed, 4 deletions(-) commit 0a16628212b8b0daac643b6a0f1caa4e9482afc8 Author: Arend Van Spriel Date: Wed Jul 12 10:32:48 2017 +0100 brcmfmac: fix regression in brcmf_sdio_txpkt_hdalign() Recent change in brcmf_sdio_txpkt_hdalign() changed the behavior and now always returns 0. This resulted in a regression which basically renders the device useless. Fixes: 270a6c1f65fe ("brcmfmac: rework headroom check in .start_xmit()") Reported-by: S. Gilles Tested-by: S. Gilles Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d9cf48416596717184b36d96c313311ad39dac05 Author: Christoph Hellwig Date: Thu Jul 20 09:54:03 2017 +0200 uuid: fix incorrect uuid_equal conversion in test_uuid_test Fixes: df33767d ("uuid: hoist helpers uuid_equal() and uuid_copy() from xfs") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko lib/test_uuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5896ec77d70d33dd38a455b0aa5f3154aeecea09 Merge: 660f6b5 799ee29 Author: Dave Airlie Date: Fri Jul 21 14:04:44 2017 +1000 Merge tag 'imx-drm-fixes-2017-07-18' of git://git.pengutronix.de/git/pza/linux into drm-fixes imx-drm: fix parallel display regression and typo in plane format list - Fix a regression where the parallel-display driver would not probe anymore if no panel is specified in the device tree, since the introduction of drm_of_find_panel_or_bridge. - Fix a typo in the plane format list: replace a duplicate BGRA8888 format with BGRX8888, as originally intended. * tag 'imx-drm-fixes-2017-07-18' of git://git.pengutronix.de/git/pza/linux: drm/imx: parallel-display: Accept drm_of_find_panel_or_bridge failure drm/imx: fix typo in ipu_plane_formats[] commit 660f6b5c639228cf53b4eecda86c8dd9055bed53 Merge: 22a548d 636c4c3 Author: Dave Airlie Date: Fri Jul 21 14:04:10 2017 +1000 Merge tag 'drm-misc-fixes-2017-07-20' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Core Changes: - fence: Introduce new fence flag to signify timestamp is populated (Chris) - mst: Avoid processing incomplete data + fix NULL dereference (Imre) Driver Changes: - vc4: Avoid WARN from grabbing a ref from vblank that's not on (Boris) Cc: Chris Wilson Cc: Boris Brezillon Cc: Imre Deak * tag 'drm-misc-fixes-2017-07-20' of git://anongit.freedesktop.org/git/drm-misc: drm/mst: Avoid processing partially received up/down message transactions drm/mst: Avoid dereferencing a NULL mstb in drm_dp_mst_handle_up_req() drm/mst: Fix error handling during MST sideband message reception drm/vc4: Fix VBLANK handling in crtc->enable() path dma-buf/fence: Avoid use of uninitialised timestamp commit 22a548d04853297b3855dcac2881d0cb52e3b99c Merge: 5771a8c f835edf Author: Dave Airlie Date: Fri Jul 21 14:00:40 2017 +1000 Merge tag 'drm-amdkfd-fixes-2017-07-18' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes This is a pull request for 4.13-rc2/3. The first patch addresses a bug that appears when doing over-subscription of queues, due to a miscalculation of the number of available compute queues. The other three patches remove dead code that was created from the bugfix. * tag 'drm-amdkfd-fixes-2017-07-18' of git://people.freedesktop.org/~gabbayo/linux: drm/amdgpu: Remove unused field kgd2kfd_shared_resources.num_mec drm/radeon: Remove initialization of shared_resources.num_mec drm/amdkfd: Remove unused references to shared_resources.num_mec drm/amdgpu: Fix KFD oversubscription by tracking queues correctly commit 921edf312a6a20be16cf2b60e0dec3dce35e5cb9 Author: Arnd Bergmann Date: Fri Jul 14 11:25:13 2017 +0200 ide: avoid warning for timings calculation gcc-7 warns about the result of a constant multiplication used as a boolean: drivers/ide/ide-timings.c: In function 'ide_timing_quantize': drivers/ide/ide-timings.c:112:24: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] q->setup = EZ(t->setup * 1000, T); This slightly rearranges the macro to simplify the code and avoid the warning at the same time. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/ide/ide-timings.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 72fb2c852188ad75ab3badb55bf491925b9eba46 Author: Jerome Brunet Date: Mon Jul 17 18:03:01 2017 +0200 ARM64: dts: meson-gxl-s905x-libretech-cc: fixup board definition The libretech CC derives less from the p212 than initially thought. Several voltage regulators are different and the capabilities of the sdcard and emmc also differ. Deriving from the p212 is not convient anymore so the libretech is now derived from s905x definition directly. Fixes: cd84aff1d981 ("ARM64: dts: meson-gxl: Add Libre Technology CC support") Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 103 ++++++++++++++++++--- 1 file changed, 91 insertions(+), 12 deletions(-) commit 6620f146849d15d35f3a2f6f5c5d5f2ff13a6b58 Author: Jerome Brunet Date: Thu Jun 8 14:39:55 2017 +0200 ARM64: dts: meson-gx: use specific compatible for the AO pwms Use the specific compatible for AO pwms so the pwms input can be correctly set FDIV4 is not present on the pwm A0, so change kadhas vim input clocks to xtal. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit a00c69632a90a0e5ce195dd3115566772f237294 Author: Arnd Bergmann Date: Thu Jul 20 18:00:50 2017 +0200 platform/x86: peaq-wmi: select INPUT_POLLDEV The new driver fails to build without INPUT_POLLDEV drivers/platform/x86/peaq-wmi.o: In function `peaq_wmi_exit': peaq-wmi.c:(.exit.text+0x1c): undefined reference to `input_unregister_polled_device' drivers/platform/x86/peaq-wmi.o: In function `peaq_wmi_init': peaq-wmi.c:(.init.text+0x23): undefined reference to `input_allocate_polled_device' peaq-wmi.c:(.init.text+0x18e): undefined reference to `input_register_polled_device' For some reason, all other drivers that need this use 'select' here rather than 'depends on', so I'm doing the same. Fixes: 13bb0fd5519d ("platform/x86: peaq-wmi: Add new peaq-wmi driver") Signed-off-by: Arnd Bergmann Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 96080f697786e0a30006fcbcc5b53f350fcb3e9f Merge: 63a8636 cbf5ecb Author: Linus Torvalds Date: Thu Jul 20 16:33:39 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) BPF verifier signed/unsigned value tracking fix, from Daniel Borkmann, Edward Cree, and Josef Bacik. 2) Fix memory allocation length when setting up calls to ->ndo_set_mac_address, from Cong Wang. 3) Add a new cxgb4 device ID, from Ganesh Goudar. 4) Fix FIB refcount handling, we have to set it's initial value before the configure callback (which can bump it). From David Ahern. 5) Fix double-free in qcom/emac driver, from Timur Tabi. 6) A bunch of gcc-7 string format overflow warning fixes from Arnd Bergmann. 7) Fix link level headroom tests in ip_do_fragment(), from Vasily Averin. 8) Fix chunk walking in SCTP when iterating over error and parameter headers. From Alexander Potapenko. 9) TCP BBR congestion control fixes from Neal Cardwell. 10) Fix SKB fragment handling in bcmgenet driver, from Doug Berger. 11) BPF_CGROUP_RUN_PROG_SOCK_OPS needs to check for null __sk, from Cong Wang. 12) xmit_recursion in ppp driver needs to be per-device not per-cpu, from Gao Feng. 13) Cannot release skb->dst in UDP if IP options processing needs it. From Paolo Abeni. 14) Some netdev ioctl ifr_name[] NULL termination fixes. From Alexander Levin and myself. 15) Revert some rtnetlink notification changes that are causing regressions, from David Ahern. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (83 commits) net: bonding: Fix transmit load balancing in balance-alb mode rds: Make sure updates to cp_send_gen can be observed net: ethernet: ti: cpsw: Push the request_irq function to the end of probe ipv4: initialize fib_trie prior to register_netdev_notifier call. rtnetlink: allocate more memory for dev_set_mac_address() net: dsa: b53: Add missing ARL entries for BCM53125 bpf: more tests for mixed signed and unsigned bounds checks bpf: add test for mixed signed and unsigned bounds checks bpf: fix up test cases with mixed signed/unsigned bounds bpf: allow to specify log level and reduce it for test_verifier bpf: fix mixed signed/unsigned derived min/max value bounds ipv6: avoid overflow of offset in ip6_find_1stfragopt net: tehuti: don't process data if it has not been copied from userspace Revert "rtnetlink: Do not generate notifications for CHANGEADDR event" net: dsa: mv88e6xxx: Enable CMODE config support for 6390X dt-binding: ptp: Add SoC compatibility strings for dte ptp clock NET: dwmac: Make dwmac reset unconditional net: Zero terminate ifr_name in dev_ifname(). wireless: wext: terminate ifr name coming from userspace netfilter: fix netfilter_net_init() return ... commit cbf5ecb305601d063dc94a57680dfbc3f96c188d Author: Kosuke Tatsukawa Date: Thu Jul 20 05:20:40 2017 +0000 net: bonding: Fix transmit load balancing in balance-alb mode balance-alb mode used to have transmit dynamic load balancing feature enabled by default. However, transmit dynamic load balancing no longer works in balance-alb after commit 8b426dc54cf4 ("bonding: remove hardcoded value"). Both balance-tlb and balance-alb use the function bond_do_alb_xmit() to send packets. This function uses the parameter tlb_dynamic_lb. tlb_dynamic_lb used to have the default value of 1 for balance-alb, but now the value is set to 0 except in balance-tlb. Re-enable transmit dyanmic load balancing by initializing tlb_dynamic_lb for balance-alb similar to balance-tlb. Fixes: 8b426dc54cf4 ("bonding: remove hardcoded value") Signed-off-by: Kosuke Tatsukawa Acked-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e623a48ee433985f6ca0fb238f0002cc2eccdf53 Author: Håkon Bugge Date: Thu Jul 20 12:28:55 2017 +0200 rds: Make sure updates to cp_send_gen can be observed cp->cp_send_gen is treated as a normal variable, although it may be used by different threads. This is fixed by using {READ,WRITE}_ONCE when it is incremented and READ_ONCE when it is read outside the {acquire,release}_in_xmit protection. Normative reference from the Linux-Kernel Memory Model: Loads from and stores to shared (but non-atomic) variables should be protected with the READ_ONCE(), WRITE_ONCE(), and ACCESS_ONCE(). Clause 5.1.2.4/25 in the C standard is also relevant. Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/send.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 070f9c658a59f9a736b1c040001d37b0952e778e Author: Keerthy Date: Thu Jul 20 16:59:52 2017 +0530 net: ethernet: ti: cpsw: Push the request_irq function to the end of probe Push the request_irq function to the end of probe so as to ensure all the required fields are populated in the event of an ISR getting executed right after requesting the irq. Currently while loading the crash kernel a crash was seen as soon as devm_request_threaded_irq was called. This was due to n->poll being NULL which is called as part of net_rx_action function. Suggested-by: Sekhar Nori Signed-off-by: Keerthy Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 49 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 24 deletions(-) commit 8799a221f5944a7d74516ecf46d58c28ec1d1f75 Author: Mahesh Bandewar Date: Wed Jul 19 15:41:33 2017 -0700 ipv4: initialize fib_trie prior to register_netdev_notifier call. Net stack initialization currently initializes fib-trie after the first call to netdevice_notifier() call. In fact fib_trie initialization needs to happen before first rtnl_register(). It does not cause any problem since there are no devices UP at this moment, but trying to bring 'lo' UP at initialization would make this assumption wrong and exposes the issue. Fixes following crash Call Trace: ? alternate_node_alloc+0x76/0xa0 fib_table_insert+0x1b7/0x4b0 fib_magic.isra.17+0xea/0x120 fib_add_ifaddr+0x7b/0x190 fib_netdev_event+0xc0/0x130 register_netdevice_notifier+0x1c1/0x1d0 ip_fib_init+0x72/0x85 ip_rt_init+0x187/0x1e9 ip_init+0xe/0x1a inet_init+0x171/0x26c ? ipv4_offload_init+0x66/0x66 do_one_initcall+0x43/0x160 kernel_init_freeable+0x191/0x219 ? rest_init+0x80/0x80 kernel_init+0xe/0x150 ret_from_fork+0x22/0x30 Code: f6 46 23 04 74 86 4c 89 f7 e8 ae 45 01 00 49 89 c7 4d 85 ff 0f 85 7b ff ff ff 31 db eb 08 4c 89 ff e8 16 47 01 00 48 8b 44 24 38 <45> 8b 6e 14 4d 63 76 74 48 89 04 24 0f 1f 44 00 00 48 83 c4 08 RIP: kmem_cache_alloc+0xcf/0x1c0 RSP: ffff9b1500017c28 CR2: 0000000000000014 Fixes: 7b1a74fdbb9e ("[NETNS]: Refactor fib initialization so it can handle multiple namespaces.") Fixes: 7f9b80529b8a ("[IPV4]: fib hash|trie initialization") Signed-off-by: Mahesh Bandewar Acked-by: "Eric W. Biederman" Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 153711f9421be5dbc973dc57a4109dc9d54c89b1 Author: WANG Cong Date: Thu Jul 20 11:27:57 2017 -0700 rtnetlink: allocate more memory for dev_set_mac_address() virtnet_set_mac_address() interprets mac address as struct sockaddr, but upper layer only allocates dev->addr_len which is ETH_ALEN + sizeof(sa_family_t) in this case. We lack a unified definition for mac address, so just fix the upper layer, this also allows drivers to interpret it to struct sockaddr freely. Reported-by: David Ahern Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/core/rtnetlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit be35e8c516c1915a3035d266a2015b41f73ba3f9 Author: Florian Fainelli Date: Thu Jul 20 12:25:22 2017 -0700 net: dsa: b53: Add missing ARL entries for BCM53125 The BCM53125 entry was missing an arl_entries member which would basically prevent the ARL search from terminating properly. This switch has 4 ARL entries, so add that. Fixes: 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations") Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 1 + 1 file changed, 1 insertion(+) commit 5067f4cf23cb073cf664372804104c4a5891dc59 Merge: 6399f1f 8641250 Author: David S. Miller Date: Thu Jul 20 15:20:28 2017 -0700 Merge branch 'BPF-map-value-adjust-fix' Daniel Borkmann says: ==================== BPF map value adjust fix First patch in the series is the actual fix and the remaining patches are just updates to selftests. ==================== Signed-off-by: David S. Miller commit 8641250251bfcd93479c71783c6792ae3325d7e4 Author: Daniel Borkmann Date: Fri Jul 21 00:00:25 2017 +0200 bpf: more tests for mixed signed and unsigned bounds checks Add a couple of more test cases to BPF selftests that are related to mixed signed and unsigned checks. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 418 ++++++++++++++++++++++++++++ 1 file changed, 418 insertions(+) commit b712296a41ce0a114895fdff68fc22aada165b07 Author: Edward Cree Date: Fri Jul 21 00:00:24 2017 +0200 bpf: add test for mixed signed and unsigned bounds checks These failed due to a bug in verifier bounds handling. Signed-off-by: Edward Cree Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit a1502132866fd2d2705eef4041dd6d7d849f48a2 Author: Daniel Borkmann Date: Fri Jul 21 00:00:23 2017 +0200 bpf: fix up test cases with mixed signed/unsigned bounds Fix the few existing test cases that used mixed signed/unsigned bounds and switch them only to one flavor. Reason why we need this is that proper boundaries cannot be derived from mixed tests. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d655490417ee22da3267fe6592a0ec2023c3c0db Author: Daniel Borkmann Date: Fri Jul 21 00:00:22 2017 +0200 bpf: allow to specify log level and reduce it for test_verifier For the test_verifier case, it's quite hard to parse log level 2 to figure out what's causing an issue when used to log level 1. We do want to use bpf_verify_program() in order to simulate some of the tests with strict alignment. So just add an argument to pass the level and put it to 1 for test_verifier. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 4 ++-- tools/lib/bpf/bpf.h | 2 +- tools/testing/selftests/bpf/test_align.c | 2 +- tools/testing/selftests/bpf/test_verifier.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 4cabc5b186b5427b9ee5a7495172542af105f02b Author: Daniel Borkmann Date: Fri Jul 21 00:00:21 2017 +0200 bpf: fix mixed signed/unsigned derived min/max value bounds Edward reported that there's an issue in min/max value bounds tracking when signed and unsigned compares both provide hints on limits when having unknown variables. E.g. a program such as the following should have been rejected: 0: (7a) *(u64 *)(r10 -8) = 0 1: (bf) r2 = r10 2: (07) r2 += -8 3: (18) r1 = 0xffff8a94cda93400 5: (85) call bpf_map_lookup_elem#1 6: (15) if r0 == 0x0 goto pc+7 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R10=fp 7: (7a) *(u64 *)(r10 -16) = -8 8: (79) r1 = *(u64 *)(r10 -16) 9: (b7) r2 = -1 10: (2d) if r1 > r2 goto pc+3 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R1=inv,min_value=0 R2=imm-1,max_value=18446744073709551615,min_align=1 R10=fp 11: (65) if r1 s> 0x1 goto pc+2 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R1=inv,min_value=0,max_value=1 R2=imm-1,max_value=18446744073709551615,min_align=1 R10=fp 12: (0f) r0 += r1 13: (72) *(u8 *)(r0 +0) = 0 R0=map_value_adj(ks=8,vs=8,id=0),min_value=0,max_value=1 R1=inv,min_value=0,max_value=1 R2=imm-1,max_value=18446744073709551615,min_align=1 R10=fp 14: (b7) r0 = 0 15: (95) exit What happens is that in the first part ... 8: (79) r1 = *(u64 *)(r10 -16) 9: (b7) r2 = -1 10: (2d) if r1 > r2 goto pc+3 ... r1 carries an unsigned value, and is compared as unsigned against a register carrying an immediate. Verifier deduces in reg_set_min_max() that since the compare is unsigned and operation is greater than (>), that in the fall-through/false case, r1's minimum bound must be 0 and maximum bound must be r2. Latter is larger than the bound and thus max value is reset back to being 'invalid' aka BPF_REGISTER_MAX_RANGE. Thus, r1 state is now 'R1=inv,min_value=0'. The subsequent test ... 11: (65) if r1 s> 0x1 goto pc+2 ... is a signed compare of r1 with immediate value 1. Here, verifier deduces in reg_set_min_max() that since the compare is signed this time and operation is greater than (>), that in the fall-through/false case, we can deduce that r1's maximum bound must be 1, meaning with prior test, we result in r1 having the following state: R1=inv,min_value=0,max_value=1. Given that the actual value this holds is -8, the bounds are wrongly deduced. When this is being added to r0 which holds the map_value(_adj) type, then subsequent store access in above case will go through check_mem_access() which invokes check_map_access_adj(), that will then probe whether the map memory is in bounds based on the min_value and max_value as well as access size since the actual unknown value is min_value <= x <= max_value; commit fce366a9dd0d ("bpf, verifier: fix alu ops against map_value{, _adj} register types") provides some more explanation on the semantics. It's worth to note in this context that in the current code, min_value and max_value tracking are used for two things, i) dynamic map value access via check_map_access_adj() and since commit 06c1c049721a ("bpf: allow helpers access to variable memory") ii) also enforced at check_helper_mem_access() when passing a memory address (pointer to packet, map value, stack) and length pair to a helper and the length in this case is an unknown value defining an access range through min_value/max_value in that case. The min_value/max_value tracking is /not/ used in the direct packet access case to track ranges. However, the issue also affects case ii), for example, the following crafted program based on the same principle must be rejected as well: 0: (b7) r2 = 0 1: (bf) r3 = r10 2: (07) r3 += -512 3: (7a) *(u64 *)(r10 -16) = -8 4: (79) r4 = *(u64 *)(r10 -16) 5: (b7) r6 = -1 6: (2d) if r4 > r6 goto pc+5 R1=ctx R2=imm0,min_value=0,max_value=0,min_align=2147483648 R3=fp-512 R4=inv,min_value=0 R6=imm-1,max_value=18446744073709551615,min_align=1 R10=fp 7: (65) if r4 s> 0x1 goto pc+4 R1=ctx R2=imm0,min_value=0,max_value=0,min_align=2147483648 R3=fp-512 R4=inv,min_value=0,max_value=1 R6=imm-1,max_value=18446744073709551615,min_align=1 R10=fp 8: (07) r4 += 1 9: (b7) r5 = 0 10: (6a) *(u16 *)(r10 -512) = 0 11: (85) call bpf_skb_load_bytes#26 12: (b7) r0 = 0 13: (95) exit Meaning, while we initialize the max_value stack slot that the verifier thinks we access in the [1,2] range, in reality we pass -7 as length which is interpreted as u32 in the helper. Thus, this issue is relevant also for the case of helper ranges. Resetting both bounds in check_reg_overflow() in case only one of them exceeds limits is also not enough as similar test can be created that uses values which are within range, thus also here learned min value in r1 is incorrect when mixed with later signed test to create a range: 0: (7a) *(u64 *)(r10 -8) = 0 1: (bf) r2 = r10 2: (07) r2 += -8 3: (18) r1 = 0xffff880ad081fa00 5: (85) call bpf_map_lookup_elem#1 6: (15) if r0 == 0x0 goto pc+7 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R10=fp 7: (7a) *(u64 *)(r10 -16) = -8 8: (79) r1 = *(u64 *)(r10 -16) 9: (b7) r2 = 2 10: (3d) if r2 >= r1 goto pc+3 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R1=inv,min_value=3 R2=imm2,min_value=2,max_value=2,min_align=2 R10=fp 11: (65) if r1 s> 0x4 goto pc+2 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R1=inv,min_value=3,max_value=4 R2=imm2,min_value=2,max_value=2,min_align=2 R10=fp 12: (0f) r0 += r1 13: (72) *(u8 *)(r0 +0) = 0 R0=map_value_adj(ks=8,vs=8,id=0),min_value=3,max_value=4 R1=inv,min_value=3,max_value=4 R2=imm2,min_value=2,max_value=2,min_align=2 R10=fp 14: (b7) r0 = 0 15: (95) exit This leaves us with two options for fixing this: i) to invalidate all prior learned information once we switch signed context, ii) to track min/max signed and unsigned boundaries separately as done in [0]. (Given latter introduces major changes throughout the whole verifier, it's rather net-next material, thus this patch follows option i), meaning we can derive bounds either from only signed tests or only unsigned tests.) There is still the case of adjust_reg_min_max_vals(), where we adjust bounds on ALU operations, meaning programs like the following where boundaries on the reg get mixed in context later on when bounds are merged on the dst reg must get rejected, too: 0: (7a) *(u64 *)(r10 -8) = 0 1: (bf) r2 = r10 2: (07) r2 += -8 3: (18) r1 = 0xffff89b2bf87ce00 5: (85) call bpf_map_lookup_elem#1 6: (15) if r0 == 0x0 goto pc+6 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R10=fp 7: (7a) *(u64 *)(r10 -16) = -8 8: (79) r1 = *(u64 *)(r10 -16) 9: (b7) r2 = 2 10: (3d) if r2 >= r1 goto pc+2 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R1=inv,min_value=3 R2=imm2,min_value=2,max_value=2,min_align=2 R10=fp 11: (b7) r7 = 1 12: (65) if r7 s> 0x0 goto pc+2 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R1=inv,min_value=3 R2=imm2,min_value=2,max_value=2,min_align=2 R7=imm1,max_value=0 R10=fp 13: (b7) r0 = 0 14: (95) exit from 12 to 15: R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R1=inv,min_value=3 R2=imm2,min_value=2,max_value=2,min_align=2 R7=imm1,min_value=1 R10=fp 15: (0f) r7 += r1 16: (65) if r7 s> 0x4 goto pc+2 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R1=inv,min_value=3 R2=imm2,min_value=2,max_value=2,min_align=2 R7=inv,min_value=4,max_value=4 R10=fp 17: (0f) r0 += r7 18: (72) *(u8 *)(r0 +0) = 0 R0=map_value_adj(ks=8,vs=8,id=0),min_value=4,max_value=4 R1=inv,min_value=3 R2=imm2,min_value=2,max_value=2,min_align=2 R7=inv,min_value=4,max_value=4 R10=fp 19: (b7) r0 = 0 20: (95) exit Meaning, in adjust_reg_min_max_vals() we must also reset range values on the dst when src/dst registers have mixed signed/ unsigned derived min/max value bounds with one unbounded value as otherwise they can be added together deducing false boundaries. Once both boundaries are established from either ALU ops or compare operations w/o mixing signed/unsigned insns, then they can safely be added to other regs also having both boundaries established. Adding regs with one unbounded side to a map value where the bounded side has been learned w/o mixing ops is possible, but the resulting map value won't recover from that, meaning such op is considered invalid on the time of actual access. Invalid bounds are set on the dst reg in case i) src reg, or ii) in case dst reg already had them. The only way to recover would be to perform i) ALU ops but only 'add' is allowed on map value types or ii) comparisons, but these are disallowed on pointers in case they span a range. This is fine as only BPF_JEQ and BPF_JNE may be performed on PTR_TO_MAP_VALUE_OR_NULL registers which potentially turn them into PTR_TO_MAP_VALUE type depending on the branch, so only here min/max value cannot be invalidated for them. In terms of state pruning, value_from_signed is considered as well in states_equal() when dealing with adjusted map values. With regards to breaking existing programs, there is a small risk, but use-cases are rather quite narrow where this could occur and mixing compares probably unlikely. Joint work with Josef and Edward. [0] https://lists.iovisor.org/pipermail/iovisor-dev/2017-June/000822.html Fixes: 484611357c19 ("bpf: allow access into map value arrays") Reported-by: Edward Cree Signed-off-by: Daniel Borkmann Signed-off-by: Edward Cree Signed-off-by: Josef Bacik Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 1 + kernel/bpf/verifier.c | 108 +++++++++++++++++++++++++++++++++++++------ 2 files changed, 95 insertions(+), 14 deletions(-) commit 63a86362130f4c17eaa57f3ef5171ec43111a54e Merge: 54a7d50 ffa64d5 Author: Linus Torvalds Date: Thu Jul 20 14:56:46 2017 -0700 Merge tag 'pm-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These are two stable-candidate fixes for the intel_pstate driver and the generic power domains (genpd) framework. Specifics: - Fix the average CPU load computations in the intel_pstate driver on Knights Landing (Xeon Phi) processors that require an extra factor to compensate for a rate change differences between the TSC and MPERF which is missing (Srinivas Pandruvada). - Fix an initialization ordering issue in the generic power domains (genpd) framework (Sudeep Holla)" * tag 'pm-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present cpufreq: intel_pstate: Correct the busy calculation for KNL commit 10479e2dea83d4c421ad05dfc55d918aa8dfc0cd Author: Darrick J. Wong Date: Mon Jul 17 14:30:57 2017 -0700 xfs: check _alloc_read_agf buffer pointer before using In some circumstances, _alloc_read_agf can return an error code of zero but also a null AGF buffer pointer. Check for this and jump out. Fixes-coverity-id: 1415250 Fixes-coverity-id: 1415320 Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_refcount.c | 4 ++++ fs/xfs/xfs_reflink.c | 2 ++ 2 files changed, 6 insertions(+) commit 4c1a67bd3606540b9b42caff34a1d5cd94b1cf65 Author: Darrick J. Wong Date: Mon Jul 17 14:30:51 2017 -0700 xfs: set firstfsb to NULLFSBLOCK before feeding it to _bmapi_write We must initialize the firstfsb parameter to _bmapi_write so that it doesn't incorrectly treat stack garbage as a restriction on which AGs it can search for free space. Fixes-coverity-id: 1402025 Fixes-coverity-id: 1415167 Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_bmap.c | 9 +++++++++ fs/xfs/xfs_reflink.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit 1e86eabe73b73c82e1110c746ed3ec6d5e1c0a0d Author: Darrick J. Wong Date: Mon Jul 17 14:30:45 2017 -0700 xfs: check _btree_check_block value Check the _btree_check_block return value for the firstrec and lastrec functions, since we have the ability to signal that the repositioning did not succeed. Fixes-coverity-id: 114067 Fixes-coverity-id: 114068 Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_btree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8cd3ec51c0c329e996cb5b366355524eab694cd2 Author: Rob Herring Date: Tue Jul 18 16:43:27 2017 -0500 sbus: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Acked-by: David S. Miller Signed-off-by: David S. Miller drivers/sbus/char/display7seg.c | 4 ++-- drivers/sbus/char/flash.c | 4 ++-- drivers/sbus/char/uctrl.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 45fc0113ccee2352ec470a48687c906edc37eca3 Author: Krzysztof Kozlowski Date: Thu Jul 20 07:00:55 2017 +0200 sparc: defconfig: Cleanup from old Kconfig options Remove old, dead Kconfig options (in order appearing in this commit): - EXPERIMENTAL is gone since v3.9; - INET_LRO: commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"); - AUTOFS_FS: commit 561c5cf9236a ("staging: Remove autofs3"); - RCU_CPU_STALL_DETECTOR: commit a00e0d714fbd ("rcu: Remove conditional compilation for RCU CPU stall warnings"); - USB_DEVICE_CLASS: commit 007bab91324e ("USB: remove CONFIG_USB_DEVICE_CLASS"); - SYSCTL_SYSCALL_CHECK: commit 7c60c48f58a7 ("sysctl: Improve the sysctl sanity checks"); Signed-off-by: Krzysztof Kozlowski Acked-by: David S. Miller Signed-off-by: David S. Miller arch/sparc/configs/sparc32_defconfig | 4 ---- arch/sparc/configs/sparc64_defconfig | 4 ---- 2 files changed, 8 deletions(-) commit 8399e4b88a93fc7bc00fff3b8da9b2e718b7f45e Author: Nitin Gupta Date: Wed Jul 19 17:12:54 2017 -0700 sparc64: Register hugepages during arch init Add hstate for each supported hugepage size using arch initcall. This change fixes some hugepage parameter parsing inconsistencies: case 1: no hugepage parameters Without hugepage parameters, only a hugepages-8192kB entry is visible in sysfs. It's different from x86_64 where both 2M and 1G hugepage sizes are available. case 2: default_hugepagesz=[64K|256M|2G] When specifying only a default_hugepagesz parameter, the default hugepage size isn't really changed and it stays at 8M. This is again different from x86_64. Orabug: 25869946 Reviewed-by: Bob Picco Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 54a7d50b9205b5064628c1d10de6531d2d9fbc90 Author: Linus Torvalds Date: Thu Jul 20 11:34:47 2017 -0700 x86: mark kprobe templates as character arrays, not single characters They really are, and the "take the address of a single character" makes the string fortification code unhappy (it believes that you can now only acccess one byte, rather than a byte range, and then raises errors for the memory copies going on in there). We could now remove a few 'addressof' operators (since arrays naturally degrade to pointers), but this is the minimal patch that just changes the C prototypes of those template arrays (the templates themselves are defined in inline asm). Reported-by: kernel test robot Acked-and-tested-by: Masami Hiramatsu Cc: Daniel Micay Signed-off-by: Linus Torvalds arch/x86/include/asm/kprobes.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 791f2df39b8248490ab41022939debaa82b96028 Merge: 465b0db 8496946 Author: Linus Torvalds Date: Thu Jul 20 10:41:12 2017 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull misc filesystem fixes from Jan Kara: "Several ACL related fixes for ext2, reiserfs, and hfsplus. And also one minor isofs cleanup" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: hfsplus: Don't clear SGID when inheriting ACLs isofs: Fix off-by-one in 'session' mount option parsing reiserfs: preserve i_mode if __reiserfs_set_acl() fails ext2: preserve i_mode if ext2_set_acl() fails ext2: Don't clear SGID when inheriting ACLs reiserfs: Don't clear SGID when inheriting ACLs commit 465b0dbb38a02c449c62563ce0995e741c0ebe18 Merge: f58781c 4db08d0 Author: Linus Torvalds Date: Thu Jul 20 10:30:16 2017 -0700 Merge tag 'for-f2fs-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fixes from Jaegeuk Kim: "We've filed some bug fixes: - missing f2fs case in terms of stale SGID bit, introduced by Jan - build error for seq_file.h - avoid cpu lockup - wrong inode_unlock in error case" * tag 'for-f2fs-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: avoid cpu lockup f2fs: include seq_file.h for sysfs.c f2fs: Don't clear SGID when inheriting ACLs f2fs: remove extra inode_unlock() in error path commit f58781c983393716e3d57398eb980a31121a5a7f Merge: ae1c908 b0659ae Author: Linus Torvalds Date: Thu Jul 20 10:22:26 2017 -0700 Merge branch 'stable-4.13' of git://git.infradead.org/users/pcmoore/audit Pull audit fix from Paul Moore: "A small audit fix, just a single line, to plug a memory leak in some audit error handling code" * 'stable-4.13' of git://git.infradead.org/users/pcmoore/audit: audit: fix memleak in auditd_send_unicast_skb. commit ae1c908517b4d9e156f0eaed8b98238587c94250 Merge: c6efb45 bbb3be1 Author: Linus Torvalds Date: Thu Jul 20 10:17:53 2017 -0700 Merge tag 'libnvdimm-fixes-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A handful of small fixes for 4.13-rc2. Three of these fixes are tagged for -stable. They have all appeared in at least one -next release with no reported issues - Fix handling of media errors that span a sector - Fix support of multiple namespaces in a libnvdimm region being in device-dax mode - Clean up the machine check notifier properly when the nfit driver fails to register - Address a static analysis (smatch) report in device-dax" * tag 'libnvdimm-fixes-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: device-dax: fix sysfs duplicate warnings MAINTAINERS: list drivers/acpi/nfit/ files for libnvdimm sub-system acpi/nfit: Fix memory corruption/Unregister mce decoder on failure device-dax: fix 'passing zero to ERR_PTR()' warning libnvdimm: fix badblock range handling of ARS range commit c6efb4548d0a665b791b3db0de7accd63d630f1d Merge: beaec53 929b60a Author: Linus Torvalds Date: Thu Jul 20 10:14:54 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - HID multitouch 4.12 regression fix from Dmitry Torokhov - error handling fix for HID++ driver from Gustavo A. R. Silva * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: hid-logitech-hidpp: add NULL check on devm_kmemdup() return value HID: multitouch: do not blindly set EV_KEY or EV_ABS bits commit ffa64d5e0d2f053d76ff9b1d2f437150b49c4112 Merge: 5771a8c 6e34e1f 975e83c Author: Rafael J. Wysocki Date: Thu Jul 20 18:57:15 2017 +0200 Merge branches 'intel_pstate' and 'pm-domains' * intel_pstate: cpufreq: intel_pstate: Correct the busy calculation for KNL * pm-domains: PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present commit ece4b206be9934b3bb32adb1261545ead831c993 Author: Punit Agrawal Date: Thu Jul 20 12:03:59 2017 +0100 arm64/numa: Drop duplicate message When booting linux on a system without CONFIG_NUMA enabled, the following messages are printed during boot - NUMA: Faking a node at [mem 0x0000000000000000-0x00000083ffffffff] NUMA: Adding memblock [0x8000000000 - 0x8000e7ffff] on node 0 NUMA: Adding memblock [0x8000e80000 - 0x83f65cffff] on node 0 NUMA: Adding memblock [0x83f65d0000 - 0x83f665ffff] on node 0 NUMA: Adding memblock [0x83f6660000 - 0x83f676ffff] on node 0 NUMA: Adding memblock [0x83f6770000 - 0x83f678ffff] on node 0 NUMA: Adding memblock [0x83f6790000 - 0x83fb82ffff] on node 0 NUMA: Adding memblock [0x83fb830000 - 0x83fbc0ffff] on node 0 NUMA: Adding memblock [0x83fbc10000 - 0x83fbdfffff] on node 0 NUMA: Adding memblock [0x83fbe00000 - 0x83fbffffff] on node 0 NUMA: Adding memblock [0x83fc000000 - 0x83fffbffff] on node 0 NUMA: Adding memblock [0x83fffc0000 - 0x83fffdffff] on node 0 NUMA: Adding memblock [0x83fffe0000 - 0x83ffffffff] on node 0 NUMA: Initmem setup node 0 [mem 0x8000000000-0x83ffffffff] NUMA: NODE_DATA [mem 0x83fffec500-0x83fffedfff] The information is then duplicated by core kernel messages right after the above output. Early memory node ranges node 0: [mem 0x0000008000000000-0x0000008000e7ffff] node 0: [mem 0x0000008000e80000-0x00000083f65cffff] node 0: [mem 0x00000083f65d0000-0x00000083f665ffff] node 0: [mem 0x00000083f6660000-0x00000083f676ffff] node 0: [mem 0x00000083f6770000-0x00000083f678ffff] node 0: [mem 0x00000083f6790000-0x00000083fb82ffff] node 0: [mem 0x00000083fb830000-0x00000083fbc0ffff] node 0: [mem 0x00000083fbc10000-0x00000083fbdfffff] node 0: [mem 0x00000083fbe00000-0x00000083fbffffff] node 0: [mem 0x00000083fc000000-0x00000083fffbffff] node 0: [mem 0x00000083fffc0000-0x00000083fffdffff] node 0: [mem 0x00000083fffe0000-0x00000083ffffffff] Initmem setup node 0 [mem 0x0000008000000000-0x00000083ffffffff] Remove the duplication of memblock layout information printed during boot by dropping the messages from arm64 numa initialisation. Signed-off-by: Punit Agrawal Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/mm/numa.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit a62ab66b13a0f9bcb17b7b761f6670941ed5cd62 Author: Ismail, Mustafa Date: Fri Jul 14 09:41:31 2017 -0500 RDMA/core: Initialize port_num in qp_attr Initialize the port_num for iWARP in rdma_init_qp_attr. Fixes: 5ecce4c9b17b("Check port number supplied by user verbs cmds") Cc: # v2.6.14+ Reviewed-by: Steve Wise Signed-off-by: Mustafa Ismail Tested-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 2 ++ 1 file changed, 2 insertions(+) commit 5a7a88f1b488e4ee49eb3d5b82612d4d9ffdf2c3 Author: Ismail, Mustafa Date: Fri Jul 14 09:41:30 2017 -0500 RDMA/uverbs: Fix the check for port number The port number is only valid if IB_QP_PORT is set in the mask. So only check port number if it is valid to prevent modify_qp from failing due to an invalid port number. Fixes: 5ecce4c9b17b("Check port number supplied by user verbs cmds") Cc: # v2.6.14+ Reviewed-by: Steve Wise Signed-off-by: Mustafa Ismail Tested-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 963916fdb3e5ad4af57ac959b5a03bf23f7568ca Author: Kalderon, Michal Date: Thu Jul 6 23:22:11 2017 +0300 IB/cma: Fix reference count leak when no ipv4 addresses are set Once in_dev_get is called to receive in_device pointer, the in_device reference counter is increased, but if there are no ipv4 addresses configured on the net-device the ifa_list will be null, resulting in a flow that doesn't call in_dev_put to decrease the ref_cnt. This was exposed when running RoCE over ipv6 without any ipv4 addresses configured Fixes: commit 8e3867310c90 ("IB/cma: Fix a race condition in iboe_addr_get_sgid()") Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford include/rdma/ib_addr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e6e52aec494900912fedd7b595b8827ba70a670d Author: Sagi Grimberg Date: Thu Jul 6 10:21:36 2017 +0300 RDMA/iser: don't send an rkey if all data is written as immadiate-data We might get some bogus error completions in case the target will remotely invalidate the rkey and the HCA will need to retransmit from this buffer. Signed-off-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iser_initiator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1217197142d1681a8b8aaa88cdf4b245b76974cd Author: Vijay Immanuel Date: Tue Jun 27 12:19:38 2017 +0300 rxe: fix broken receive queue draining If we modified the qp to ERROR state, and drained the recieve queue, post_recv must trigger the responder task to complete the drain work request. Cc: Bart Van Assche Signed-off-by: Vijay Immanuel Signed-off-by: Sagi Grimberg Reviewed-by: Bart Van Assche -- Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_resp.c | 3 +++ drivers/infiniband/sw/rxe/rxe_verbs.c | 3 +++ 2 files changed, 6 insertions(+) commit c75d3ec8c0ee469de79ae83c1a827d753603e49f Author: Amrani, Ram Date: Mon Jun 26 19:05:04 2017 +0300 RDMA/qedr: Prevent memory overrun in verbs' user responses Wrap ib_copy_to_udata with a function that ensures that the data being copied over to user space isn't longer than the allowed. Fixes: cecbcddf6461 ("qedr: Add support for QP verbs") Fixes: a7efd7773e31 ("qedr: Add support for PD,PKEY and CQ verbs") Fixes: ac1b36e55a51 ("qedr: Add support for user context verbs") Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 720336c42e41a917002fcae3aa14e30f5022bbb7 Author: Ganesh Goudar Date: Wed Jun 21 19:55:43 2017 +0530 iw_cxgb4: don't use WR keys/addrs for 0 byte reads Only use the read sge lkey/addr and the remote rkey/addr if the length of the read is not zero. Otherwise the read response might be treated as the RTR read response and not delivered to the application. Or worse Terminator hardware will fail a 0B read if the STAG is 0 even if the read length is 0. Signed-off-by: Steve Wise Signed-off-by: Ganesh Goudar Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4542e3c79a2c5a167cbeb4f4190d5f705d272002 Author: Håkon Bugge Date: Tue Jun 20 14:07:50 2017 +0200 IB/mlx4: Fix CM REQ retries in paravirt mode CM REQs cannot be successfully retried, because a new pv_cm_id is created for each request, without checking if one already exists. By checking if an id exists before creating one, the bug is fixed. This bug can be provoked by running an RDMA CM user-land application, but inserting a five seconds delay before the rdma_accept() call on the passive side. This delay is larger than the default CMA timeout, and triggers a retry from the active side. The retried REQ will use another pv_cm_id (the cm_id on the wire). This confuses the CM protocol and two REJs are sent from the passive side. Here is an excerpt from ibdump running without the patch: 3.285092 LID: 4 -> LID: 4 SDP 290 CM: ConnectRequest(SDP Hello) 7.382711 LID: 4 -> LID: 4 SDP 290 CM: ConnectRequest(SDP Hello) 7.382861 LID: 4 -> LID: 4 InfiniBand 290 CM: ConnectReject 7.387644 LID: 4 -> LID: 4 InfiniBand 290 CM: ConnectReject and here is the same with bug fix applied: 3.251010 LID: 4 -> LID: 4 SDP 290 CM: ConnectRequest(SDP Hello) 7.349387 LID: 4 -> LID: 4 SDP 290 CM: ConnectRequest(SDP Hello) 8.258443 LID: 4 -> LID: 4 SDP 290 CM: ConnectReply(SDP Hello) 8.259890 LID: 4 -> LID: 4 InfiniBand 290 CM: ReadyToUse Suggested-by: Venkat Venkatsubra Signed-off-by: Håkon Bugge Reported-by: Wei Lin Guay Tested-by: Wei Lin Guay Reviewed-by: Yuval Shaia Acked-by: Jack Morgenstein Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/cm.c | 4 ++++ 1 file changed, 4 insertions(+) commit a25ce4270bfdd522207b02f81a594c7d1746b697 Author: Kaike Wan Date: Sat Jun 17 10:37:26 2017 -0700 IB/rdmavt: Setting of QP timeout can overflow jiffies computation Current computation of qp->timeout_jiffies in rvt_modify_qp() will cause overflow due to the fact that the input to the function usecs_to_jiffies is only 32-bit ( unsigned int). Overflow will occur when attr->timeout is equal to or greater than 30. The consequence is unnecessarily excessive retry and thus degradation of the system performance. This patch fixes the problem by limiting the input to 5-bit and calling usecs_to_jiffies() before multiplying the scaling factor. Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 4 +--- include/rdma/rdmavt_qp.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) commit 266098b841d48f7f0db40424bdbc072e4db14e9b Author: Matan Barak Date: Thu Jun 8 17:30:47 2017 +0300 IB/core: Fix sparse warnings Delete unused variables to prevent sparse warnings. Fixes: db1b5ddd5336 ("IB/core: Rename uverbs event file structure") Fixes: fd3c7904db6e ("IB/core: Change idr objects to use the new schema") Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 10 ---------- 1 file changed, 10 deletions(-) commit 601577b7d14cba5848b4c44ef719881f8538f702 Author: Selvin Xavier Date: Thu Jun 29 12:28:19 2017 -0700 RDMA/bnxt_re: Fix the value reported for local ack delay Local ack delay exposed by the driver is 0 which means infinite QP timeout. Reporting the default value to 16 (approx 260ms) Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/bnxt_re.h | 7 +++++++ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) commit 499e456981d376ef614e257d5dcb280581db9ac6 Author: Selvin Xavier Date: Thu Jun 29 12:28:18 2017 -0700 RDMA/bnxt_re: Report MISSED_EVENTS in req_notify_cq While invoking the req_notify_cq hook, ULPs can request whether the CQs have any CQEs pending. If CQEs are pending, drivers can indicate it by returning 1 for req_notify_cq. The stack will poll CQ again till CQ is empty. This patch peeks the CQ for any valid entries and return accordingly. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 5 +++++ drivers/infiniband/hw/bnxt_re/qplib_fp.c | 19 +++++++++++++++++++ drivers/infiniband/hw/bnxt_re/qplib_fp.h | 1 + 3 files changed, 25 insertions(+) commit 10d1dedf9b428ed776f244eb8b43f28974da3fb0 Author: Devesh Sharma Date: Thu Jun 29 12:28:17 2017 -0700 RDMA/bnxt_re: Fix return value of poll routine Fix the incorrect reporting of number of polled entries by taking into account the max CQ depth in the driver. Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 + 1 file changed, 1 insertion(+) commit 254cd2590d408f2c0375fbf73ef8250d47529e7b Author: Devesh Sharma Date: Thu Jun 29 12:28:16 2017 -0700 RDMA/bnxt_re: Enable atomics only if host bios supports Driver shall check if the host system bios has enabled Atomic operations capability in PCI Device Control 2 register of the pci-device. Expose the ATOMIC_HCA flag only if the Atomic operations capability is set. Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 6 ++++-- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 14 ++++++++++++++ drivers/infiniband/hw/bnxt_re/qplib_sp.h | 3 +++ 3 files changed, 21 insertions(+), 2 deletions(-) commit 536f092805cecc5c2c0ba7f051a7552619bd4491 Author: Somnath Kotur Date: Thu Jun 29 12:28:14 2017 -0700 RDMA/bnxt_re: Specify RDMA component when allocating stats context Starting FW version 20.6.47, firmware is keeping separate statistics for L2 and RDMA. However, driver needs to specify RDMA or not when allocating stat_ctx. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/main.c | 1 + 1 file changed, 1 insertion(+) commit a25d112fe9c8e8817cde1df17a82aee472c55993 Author: Eddie Wai Date: Thu Jun 29 12:28:13 2017 -0700 RDMA/bnxt_re: Fixed the max_rd_atomic support for initiator and destination QP There's a couple of bugs in the support of max_rd_atomic and max_dest_rd_atomic. In the modify_qp, if the requested max_rd_atomic, which is the ORRQ size, is greater than what the chip can support, then we have to cap the request to chip max as we can't have the HW overflow the ORRQ. Capping the max_rd_atomic support internally is okay to do as the remaining read/atomic WRs will still be sitting in the SQ. However, for the max_dest_rd_atomic, the driver has to error out as this dictates the IRRQ size and we can't control what the remote side sends. Signed-off-by: Eddie Wai Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 58d4a671d0eac45db1c7f27c8684c277249ac127 Author: Selvin Xavier Date: Thu Jun 29 12:28:12 2017 -0700 RDMA/bnxt_re: Report supported value to IB stack in query_device - Report supported value for max_mr_size to IB stack in query_device. Also, check and log if MR size requested by application in reg_user_mr() is greater than value currently supported by driver. - Report only 4K page size support for now - Fix Max_QP value returned by ibv_devinfo -vv. In case of PF, FW reserves 129 QPs for creating QP1s of VFs and PF. So the max_qp value reported by FW for PF doesn'tt include the QP1. Fixing this issue by adding 1 with the value reported by FW. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 ++ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 12 ++++++++---- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) commit 4a62c5e9e2e1c15ceb1654715d9284d97f921119 Author: Selvin Xavier Date: Thu Jun 29 12:28:11 2017 -0700 RDMA/bnxt_re: Do not free the ctx_tbl entry if delete GID fails This fix is added only to avoid system crash in some a specific scenario. When bnxt_re driver is loaded and if user tries to change interface mac address, delete GID fails because QP1 is still associated with existing MAC (default GID). If the above command fails GID tables are not modified in the h/w or driver, but the GID context memory is freed. Now, if the user changes the mac back to the original value, another add_gid comes to the driver where the driver reports that the GID is already present in its table and tries to access the context which was already freed. So, in this case, in order to avoid NULL pointer de-reference, this patch removes the context memory free if delete_gid fails and the same context memory is re-used in new add_gid. Memory cleanup will be taken care during driver unload, while deleting the GID table. Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit ab69d4c8da38024191f3514c1296e9e8deea4e98 Author: Somnath Kotur Date: Thu Jun 29 12:28:09 2017 -0700 RDMA/bnxt_re: Fix WQE Size posted to HW to prevent it from throwing error Posting WQE size of 2 results in a WQE_FORMAT_ERROR thrown by the HW as it requires host to supply WQE Size with room for atleast one SGE so that the resulting WQE size be atleast 3. Signed-off-by: Somnath Kotur Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/qplib_fp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b3b2c7c5506bd8d15214136f8b11a2e6c9728033 Author: Devesh Sharma Date: Thu Jun 29 12:28:08 2017 -0700 RDMA/bnxt_re: Free doorbell page index (DPI) during dealloc ucontext The driver must free the DPI during the dealloc_ucontext instead of freeing it during dealloc_pd. However, the DPI allocation scheme remains unchanged. Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 58 ++++++++++++++++---------------- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 3 +- 2 files changed, 30 insertions(+), 31 deletions(-) commit 396551eb00e46aa8f843c448bced0c76971ec58c Author: Dan Carpenter Date: Wed Jun 14 13:20:09 2017 +0300 IB/mlx5: Fix a warning message "umem" is a valid pointer. We intended to print "*umem" or even just "err" instead. Signed-off-by: Dan Carpenter Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0c6e88288d65c93bbc7da4fb6f7d51b2733228a Author: Dan Carpenter Date: Thu Jul 13 10:46:49 2017 +0300 RDMA/ocrdma: Fix error codes in ocrdma_create_srq() If either of these allocations fail then we return ERR_PTR(0). That's equivalent to NULL and results in a NULL pointer dereference in the caller. Fixes: fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter") Signed-off-by: Dan Carpenter Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 1 + 1 file changed, 1 insertion(+) commit dd75cfa6d3216c79c695f5af13e52208afe374ad Author: Dan Carpenter Date: Thu Jul 13 10:46:14 2017 +0300 RDMA/ocrdma: Fix an error code in ocrdma_alloc_pd() We should preserve the original "status" error code instead of resetting it to zero. Returning ERR_PTR(0) is the same as NULL and results in a NULL dereference in the callers. I added a printk() on error instead. Fixes: 45e86b33ec8b ("RDMA/ocrdma: Cache recv DB until QP moved to RTR") Signed-off-by: Dan Carpenter Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9064d6055c14f700aa13f7c72fd3e63d12bee643 Author: Dan Carpenter Date: Thu Jul 13 10:48:00 2017 +0300 IB/cxgb3: Fix error codes in iwch_alloc_mr() We accidentally don't set the error code on some error paths. It means return ERR_PTR(0) which is NULL and results in a NULL dereference in the caller. Fixes: 13a239330abd ("RDMA/cxgb3: Don't ignore insert_handle() failures") Signed-off-by: Dan Carpenter Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/iwch_provider.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 6ebedacbb44602d4dec3348dee5ec31dd9b09521 Author: Dan Carpenter Date: Thu Jul 13 10:47:40 2017 +0300 cxgb4: Fix error codes in c4iw_create_cq() If one of these kmalloc() calls fails then we return ERR_PTR(0) which is NULL. It results in a NULL dereference in the callers. Fixes: cfdda9d76436 ("RDMA/cxgb4: Add driver for Chelsio T4 RNIC") Signed-off-by: Dan Carpenter Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cq.c | 1 + 1 file changed, 1 insertion(+) commit 6031e079aa4656743298ea235b894ee883f45c71 Author: Dan Carpenter Date: Thu Jul 13 10:47:22 2017 +0300 IB/i40iw: Fix error code in i40iw_create_cq() We accidentally forgot to set the error code if ib_copy_from_udata() fails. It means we return ERR_PTR(0) which is NULL and results in a NULL dereference in the callers. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Dan Carpenter Acked-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5c8857b653e71a9850a02837e1268e3198abbd1a Author: Dan Carpenter Date: Thu Jul 13 10:45:48 2017 +0300 IB/IPoIB: Fix error code in ipoib_add_port() We accidentally don't see the error code on some of these error paths. It means we return ERR_PTR(0) which is NULL and it results in a NULL dereference in the caller. This bug dates to pre-git days. Signed-off-by: Dan Carpenter Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + 1 file changed, 1 insertion(+) commit 653f0a71daf1a71d55d3af368c28c8114c11c607 Author: Dan Carpenter Date: Mon Jul 10 10:22:47 2017 +0300 RDMA/bnxt_re: checking for NULL instead of IS_ERR() bnxt_re_alloc_mw() doesn't return NULL, it returns error pointers. Fixes: 9152e0b722b2 ("RDMA/bnxt_re: HW workarounds for handling specific conditions") Signed-off-by: Dan Carpenter Acked-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af56e53ccd29bda062a1ae75276dc9c0f8eedf47 Author: Tatyana Nikolova Date: Wed Jul 5 21:25:33 2017 -0500 i40iw: Free QP PBLEs when the QP is destroyed If the physical buffer list entries (PBLEs) of a QP are freed up at i40iw_dereg_mr, they can be assigned to a newly created QP before the previous QP is destroyed. Fix this by freeing PBLEs only when the QP is destroyed. Signed-off-by: Tatyana Nikolova Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 15 +++++++++++---- drivers/infiniband/hw/i40iw/i40iw_verbs.h | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) commit 44b99f88cdd5b47046c511aa64ae71ad2c9e5b1e Author: Shiraz Saleem Date: Fri Jun 23 16:04:02 2017 -0500 i40iw: Avoid memory leak of CQP request objects Control Queue Pair (CQP) request objects, which have not received a completion upon interface close, remain in memory. To fix this, identify and free all pending CQP request objects during destroy CQP OP. Signed-off-by: Shiraz Saleem Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw.h | 1 + drivers/infiniband/hw/i40iw/i40iw_main.c | 2 ++ drivers/infiniband/hw/i40iw/i40iw_utils.c | 52 +++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) commit c709d7f229a273c7c5664e9dfe5432b031842d0c Author: Henry Orosco Date: Fri Jun 23 16:04:01 2017 -0500 i40iw: Update list correctly To avoid infinite loop, in i40iw_ieq_handle_exception, update plist inside while loop. Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_puda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5c9d27e6c79ab3ab36092fe67fb7f2c6a120171 Author: Henry Orosco Date: Fri Jun 23 16:04:00 2017 -0500 i40iw: Add missing memory barrier Add missing write memory barrier before writing the header containing valid bit to the WQE in i40iw_puda_send. Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_puda.c | 3 +++ 1 file changed, 3 insertions(+) commit b5e452a04a10f12763f9836d3d3999f3bb1e56fb Author: Shiraz Saleem Date: Fri Jun 23 16:03:59 2017 -0500 i40iw: Free QP resources on CQP destroy QP failure Current flow leaves software QP structures in memory if Control Queue Pair (CQP) destroy QP OP fails. To fix this, free QP resources on fail of CQP destroy QP OP. Signed-off-by: Shiraz Saleem Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_utils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6327cb09dfda103f7255ef218ac18697b293554a Author: Shiraz Saleem Date: Fri Jun 23 16:03:58 2017 -0500 i40iw: Release cm_id ref on PCI function reset On PCI function reset, cm_id reference is not released which causes an application hang, as it waits on the cm_id to be released on rdma_destroy. To fix this, call i40iw_cm_disconn during a PCI function reset to clean-up resources and release cm_id reference. Signed-off-by: Shiraz Saleem Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6c1d94de4e75160d3ea5af3bf51d290341db1d44 Author: Shiraz Saleem Date: Fri Jun 23 16:03:57 2017 -0500 i40iw: Utilize iwdev->reset during PCI function reset Utilize iwdev->reset on a PCI function reset notification instead of passing in reset flag for resource clean-up. Signed-off-by: Shiraz Saleem Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_main.c | 51 +++++++++++++++----------------- 1 file changed, 24 insertions(+), 27 deletions(-) commit 415920aa174666c0ac8c47eee974acc9f49efec4 Author: Mustafa Ismail Date: Fri Jun 23 16:03:56 2017 -0500 i40iw: Do not poll CCQ after it is destroyed Control Queue Pair (CQP) OPs, in this case - Update SDs, cannot poll the Control Completion Queue (CCQ) after CCQ is destroyed. Instead, poll via registers. Signed-off-by: Mustafa Ismail Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 2 ++ 1 file changed, 2 insertions(+) commit be8822db62ddda6d316d2dd682679732ed2f0abf Author: Mustafa Ismail Date: Fri Jun 23 16:03:55 2017 -0500 i40iw: Fix order of cleanup in close The order for calling i40iw_destroy_pble_pool is incorrect. Also, add PBLE_CHUNK_MEM init state to track pble pool creation and destruction. Signed-off-by: Mustafa Ismail Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f1ff89ec4447c4e39d275a1ca3de43eed2a92745 Author: Roman Kagan Date: Thu Jul 20 17:26:40 2017 +0300 kvm: x86: hyperv: avoid livelock in oneshot SynIC timers If the SynIC timer message delivery fails due to SINT message slot being busy, there's no point to attempt starting the timer again until we're notified of the slot being released by the guest (via EOM or EOI). Even worse, when a oneshot timer fails to deliver its message, its re-arming with an expiration time in the past leads to immediate retry of the delivery, and so on, without ever letting the guest vcpu to run and release the slot, which results in a livelock. To avoid that, only start the timer when there's no timer message pending delivery. When there is, meaning the slot is busy, the processing will be restarted upon notification from the guest that the slot is released. Signed-off-by: Roman Kagan Signed-off-by: Radim Krčmář arch/x86/kvm/hyperv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f244deed7a254b4a61333e6886575ce0102e8356 Author: Wanpeng Li Date: Thu Jul 20 01:11:54 2017 -0700 KVM: VMX: Fix invalid guest state detection after task-switch emulation This can be reproduced by EPT=1, unrestricted_guest=N, emulate_invalid_state=Y or EPT=0, the trace of kvm-unit-tests/taskswitch2.flat is like below, it tries to emulate invalid guest state task-switch: kvm_exit: reason TASK_SWITCH rip 0x0 info 40000058 0 kvm_emulate_insn: 42000:0:0f 0b (0x2) kvm_emulate_insn: 42000:0:0f 0b (0x2) failed kvm_inj_exception: #UD (0x0) kvm_entry: vcpu 0 kvm_exit: reason TASK_SWITCH rip 0x0 info 40000058 0 kvm_emulate_insn: 42000:0:0f 0b (0x2) kvm_emulate_insn: 42000:0:0f 0b (0x2) failed kvm_inj_exception: #UD (0x0) ...................... It appears that the task-switch emulation updates rflags (and vm86 flag) only after the segments are loaded, causing vmx->emulation_required to be set, when in fact invalid guest state emulation is not needed. This patch fixes it by updating vmx->emulation_required after the rflags (and vm86 flag) is updated in task-switch emulation. Thanks Radim for moving the update to vmx__set_flags and adding Paolo's suggestion for the check. Suggested-by: Nadav Amit Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Nadav Amit Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit b4b201d88b7c9b3c6acdd03f9adec0c9857548ce Author: Frank Rowand Date: Wed Jul 19 18:35:31 2017 -0700 scripts/dtc: dtx_diff - update include dts paths to match build Update the cpp include flags for compiling device tree dts files to match the changes made to the kernel build process in commit d5d332d3f7e8 ("devicetree: Move include prefixes from arch to separate directory"). Cc: # 4.12 Signed-off-by: Frank Rowand Signed-off-by: Rob Herring scripts/dtc/dtx_diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 880a66275ef4d1e08e5d4dcf4cec768de18c68ef Author: Rafael J. Wysocki Date: Thu Jul 20 03:43:12 2017 +0200 ACPI / PM / EC: Flush all EC work in acpi_freeze_sync() Commit eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle) introduced acpi_freeze_sync() whose purpose is to flush all of the processing of possible wakeup events signaled via the ACPI SCI. However, it doesn't flush the query workqueue used by the EC driver, so the events generated by the EC may not be processed timely which leads to issues (increased overhead at least, lost events possibly). To fix that introduce acpi_ec_flush_work() that will flush all of the outstanding EC work and call it from acpi_freeze_sync(). Fixes: eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle) Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 8 ++++++++ drivers/acpi/internal.h | 4 ++++ drivers/acpi/sleep.c | 6 +++--- 3 files changed, 15 insertions(+), 3 deletions(-) commit 6ed860052906146cb2d9c71e7dc092053bc7f442 Merge: 5771a8c 7638063 Author: Rafael J. Wysocki Date: Thu Jul 20 16:44:09 2017 +0200 Merge branch 'acpi-ec' into acpi-pm commit 42de82a8b544fa55670feef7d6f85085fba48fc0 Author: Martin Wilck Date: Fri Jul 14 00:25:31 2017 +0200 nvmet: don't report 0-bytes in serial number The NVME standard mandates that the SN, MN, and FR fields of the Identify Controller Data Structure be "ASCII strings". That means that they may not contain 0-bytes, not even string terminators. Signed-off-by: Martin Wilck Reviewed-by: Hannes Reinecke [hch: fixed for the move of the serial field, updated description] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit fcbc545959676282e7f46be5c8d8aea26a89ea47 Author: Johannes Thumshirn Date: Fri Jul 14 15:36:56 2017 +0200 nvmet: preserve controller serial number between reboots The NVMe target has no way to preserve controller serial IDs across reboots which breaks udev scripts doing SYMLINK+="dev/disk/by-id/nvme-$env{ID_SERIAL}-part%n. Export the randomly generated serial number via configfs and allow setting of a serial via configfs to mitigate this breakage. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/configfs.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 2e7f5d2af2155084c6f7c86328d36e698cd84954 Author: Johannes Thumshirn Date: Fri Jul 14 15:36:55 2017 +0200 nvmet: Move serial number from controller to subsystem The NVMe specification defines the serial number as: "Serial Number (SN): Contains the serial number for the NVM subsystem that is assigned by the vendor as an ASCII string. Refer to section 7.10 for unique identifier requirements. Refer to section 1.5 for ASCII string requirements" So move it from the controller to the subsystem, where it belongs. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 2 +- drivers/nvme/target/core.c | 5 ++--- drivers/nvme/target/nvmet.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit 41528f8036f835e44884f4b0ce0d18191aa0a98f Author: Johannes Thumshirn Date: Fri Jul 14 15:36:54 2017 +0200 nvmet: prefix version configfs file with attr The NVMe target's attribute files need an attr prefix in order to have nvmetcli recognize them. Add this attribute. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/configfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b00c9b7aa06786fc5469783965ff3e2a705a1dec Author: Christophe JAILLET Date: Sun Jul 16 10:39:03 2017 +0200 nvme-pci: Fix an error handling path in 'nvme_probe()' Release resources in the correct order in order not to miss a 'put_device()' if 'nvme_dev_map()' fails. Fixes: b00a726a9fd8 ("NVMe: Don't unmap controller registers on reset") Signed-off-by: Christophe JAILLET Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 86eea2895d11dde9bf43fa2046331e84154e00f4 Author: Keith Busch Date: Wed Jul 12 15:59:07 2017 -0400 nvme-pci: Remove nvme_setup_prps BUG_ON This patch replaces the invalid nvme SGL kernel panic with a warning, and returns an appropriate error. The warning will occur only on the first occurance, and sgl details will be printed to help debug how the request was allowed to form. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit f99cb7af40f99703bacf1640dc8a4b09062c1f0f Author: David Wayne Fugate Date: Mon Jul 10 12:39:59 2017 -0600 nvme-pci: add another device ID with stripe quirk Adds a fourth Intel controller which has the "stripe" quirk. Signed-off-by: David Wayne Fugate Acked-by: Keith Busch Acked-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 3 +++ 1 file changed, 3 insertions(+) commit 7722ecdc54a4019eaeeebfdac53915bf0c68a7ff Author: Christoph Hellwig Date: Fri Jul 14 11:14:46 2017 +0200 nvmet-fc: fix byte swapping in nvmet_fc_ls_create_association We always need to do non-equal comparisms on the native endian versions to get the correct result. Signed-off-by: Christoph Hellwig Reviewed-by: James Smart Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dc1a0afbacaeaced8f5679a99047c0467f1099e9 Author: Christoph Hellwig Date: Fri Jul 14 11:12:09 2017 +0200 nvme: fix byte swapping in the streams code Signed-off-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- include/linux/nvme.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit 878ec36765fa71ffe656bc003d25bb9f8bad28f9 Author: Vladimir Murzin Date: Thu Jul 20 11:19:59 2017 +0100 ARM: NOMMU: Wire-up default DMA interface The way how default DMA pool is exposed has changed and now we need to use dedicated interface to work with it. This patch makes alloc/release operations to use such interface. Since, default DMA pool is not handled by generic code anymore we have to implement our own mmap operation. Tested-by: Andras Szemzo Reviewed-by: Robin Murphy Signed-off-by: Vladimir Murzin Signed-off-by: Christoph Hellwig arch/arm/mm/dma-mapping-nommu.c | 45 ++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) commit 43fc509c3efb5c973991ee24c449ab2a0d71dd1e Author: Vladimir Murzin Date: Thu Jul 20 11:19:58 2017 +0100 dma-coherent: introduce interface for default DMA pool Christoph noticed [1] that default DMA pool in current form overload the DMA coherent infrastructure. In reply, Robin suggested [2] to split the per-device vs. global pool interfaces, so allocation/release from default DMA pool is driven by dma ops implementation. This patch implements Robin's idea and provide interface to allocate/release/mmap the default (aka global) DMA pool. To make it clear that existing *_from_coherent routines work on per-device pool rename them to *_from_dev_coherent. [1] https://lkml.org/lkml/2017/7/7/370 [2] https://lkml.org/lkml/2017/7/7/431 Cc: Vineet Gupta Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Ralf Baechle Suggested-by: Robin Murphy Tested-by: Andras Szemzo Reviewed-by: Robin Murphy Signed-off-by: Vladimir Murzin Signed-off-by: Christoph Hellwig arch/arc/mm/dma.c | 2 +- arch/arm/mm/dma-mapping.c | 2 +- arch/arm64/mm/dma-mapping.c | 4 +- arch/mips/mm/dma-default.c | 2 +- drivers/base/dma-coherent.c | 164 ++++++++++++++++++++++++++++---------------- drivers/base/dma-mapping.c | 2 +- include/linux/dma-mapping.h | 40 ++++++++--- 7 files changed, 144 insertions(+), 72 deletions(-) commit 929b60a85b731d803f2b7829149496479eba0b20 Author: Gustavo A. R. Silva Date: Fri Jul 7 00:12:13 2017 -0500 HID: hid-logitech-hidpp: add NULL check on devm_kmemdup() return value Check return value from call to devm_kmemdup() in order to prevent a NULL pointer dereference. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 3 +++ 1 file changed, 3 insertions(+) commit f86f418059b94aa01f9342611a272ca60c583e89 Author: Chunyan Zhang Date: Wed Jun 7 16:12:51 2017 +0800 trace: fix the errors caused by incompatible type of RCU variables The variables which are processed by RCU functions should be annotated as RCU, otherwise sparse will report the errors like below: "error: incompatible types in comparison expression (different address spaces)" Link: http://lkml.kernel.org/r/1496823171-7758-1-git-send-email-zhang.chunyan@linaro.org Signed-off-by: Chunyan Zhang [ Updated to not be 100% 80 column strict ] Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 6 +++--- include/linux/trace_events.h | 2 +- kernel/trace/ftrace.c | 41 +++++++++++++++++++++++++++-------------- kernel/trace/trace.h | 6 +++--- 4 files changed, 34 insertions(+), 21 deletions(-) commit db9108e054700c96322b0f0028546aa4e643cf0b Author: Chunyu Hu Date: Thu Jul 20 18:36:09 2017 +0800 tracing: Fix kmemleak in instance_rmdir Hit the kmemleak when executing instance_rmdir, it forgot releasing mem of tracing_cpumask. With this fix, the warn does not appear any more. unreferenced object 0xffff93a8dfaa7c18 (size 8): comm "mkdir", pid 1436, jiffies 4294763622 (age 9134.308s) hex dump (first 8 bytes): ff ff ff ff ff ff ff ff ........ backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc_node+0xf1/0x280 [] alloc_cpumask_var_node+0x23/0x30 [] alloc_cpumask_var+0xe/0x10 [] instance_mkdir+0x90/0x240 [] tracefs_syscall_mkdir+0x40/0x70 [] vfs_mkdir+0x109/0x1b0 [] SyS_mkdir+0xd0/0x100 [] do_syscall_64+0x67/0x150 [] return_from_SYSCALL_64+0x0/0x6a [] 0xffffffffffffffff Link: http://lkml.kernel.org/r/1500546969-12594-1-git-send-email-chuhu@redhat.com Cc: stable@vger.kernel.org Fixes: ccfe9e42e451 ("tracing: Make tracing_cpumask available for all instances") Signed-off-by: Chunyu Hu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 1 + 1 file changed, 1 insertion(+) commit d6f5f071f1e13cadecf8aef1faa7e5d6fbc9f33b Author: Shu Wang Date: Thu Jul 20 14:48:31 2017 +0300 xhci: fix memleak in xhci_run() Found this issue by kmemleak. xhci_run() did not check return val and free command for xhci_queue_vendor_command() unreferenced object 0xffff88011c0be500 (size 64): comm "kworker/0:1", pid 58, jiffies 4294670908 (age 50.420s) hex dump (first 32 bytes): backtrace: [] kmemleak_alloc+0x4a/0xa0 [] kmem_cache_alloc_trace+0xca/0x1d0 [] xhci_alloc_command+0x44/0x130 [] xhci_run+0x4cc/0x630 [] usb_add_hcd+0x3bb/0x950 [] usb_hcd_pci_probe+0x188/0x500 [] xhci_pci_probe+0x2c/0x220 [] local_pci_probe+0x45/0xa0 [] work_for_cpu_fn+0x14/0x20 [] process_one_work+0x149/0x360 [] worker_thread+0x1d8/0x3c0 [] kthread+0x109/0x140 [] ret_from_fork+0x25/0x30 [] 0xffffffffffffffff Cc: Signed-off-by: Shu Wang Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 576d55460e7f209139545a348746c2fcadf61bc3 Author: Peter Chen Date: Thu Jul 20 14:48:30 2017 +0300 usb: xhci: fix spinlock recursion for USB2 test mode Both xhci_hub_control and xhci_disable_slot tries to hold spinlock, the spinlock recursion occurs when enters USB2 test mode. Fix it by unlock spinlock before calling xhci_disable_slot. Cc: Fixes: 0f1d832ed1fb ("usb: xhci: Add port test modes support for usb2") Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 2 ++ 1 file changed, 2 insertions(+) commit a54408d0a004757789863d74e29c2297edae0b4d Author: Mathias Nyman Date: Thu Jul 20 14:48:29 2017 +0300 xhci: fix 20000ms port resume timeout A uncleared PLC (port link change) bit will prevent furuther port event interrupts for that port. Leaving it uncleared caused get_port_status() to timeout after 20000ms while waiting to get the final port event interrupt for resume -> U0 state change. This is a targeted fix for a specific case where we get a port resume event racing with xhci resume. The port event interrupt handler notices xHC is not yet running and bails out early, leaving PLC uncleared. The whole xhci port resuming needs more attention, but while working on it it anyways makes sense to always ensure PLC is cleared in get_port_status before setting a new link state and waiting for its completion. Cc: Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 3 +++ 1 file changed, 3 insertions(+) commit 28a2369f7d72ece55089f33e7d7b9c1223673cc3 Author: Shyam Sundar S K Date: Thu Jul 20 14:48:28 2017 +0300 usb: xhci: Issue stop EP command only when the EP state is running on AMD platforms with SNPS 3.1 USB controller if stop endpoint command is issued the controller does not respond, when the EP is not in running state. HW completes the command execution and reports "Context State Error" completion code. This is as per the spec. However HW on receiving the second command additionally marks EP to Flow control state in HW which is RTL bug. This bug causes the HW not to respond to any further doorbells that are rung by the driver. This makes the EP to not functional anymore and causes gross functional failures. As a workaround, not to hit this problem, it's better to check the EP state and issue a stop EP command only when the EP is in running state. As a sidenote, even with this patch there is still a possibility of triggering the RTL bug if the context state races with the stop endpoint command as described in xHCI spec 4.6.9 [code simplification and reworded sidenote in commit message -Mathias] Signed-off-by: Shyam Sundar S K Signed-off-by: Nehal Shah Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 9da5a1092b13468839b1a864b126cacfb72ad016 Author: Jiahau Chang Date: Thu Jul 20 14:48:27 2017 +0300 xhci: Bad Ethernet performance plugged in ASM1042A host When USB Ethernet is plugged in ASMEDIA ASM1042A xHCI host, bad performance was manifesting in Web browser use (like download large file such as ISO image). It is known limitation of ASM1042A that is not compatible with driver scheduling, As a workaround we can modify flow control handling of ASM1042A. The register we modify is changes the behavior [use quirk bit 28, usleep_range 40-60us, empty non-pci function -Mathias] Cc: Signed-off-by: Jiahau Chang Signed-off-by: Ian Pilcher Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/pci-quirks.c | 54 +++++++++++++++++++++++++++++++++++++++++++ drivers/usb/host/pci-quirks.h | 2 ++ drivers/usb/host/xhci-pci.c | 6 +++++ drivers/usb/host/xhci.c | 6 +++++ drivers/usb/host/xhci.h | 1 + 5 files changed, 69 insertions(+) commit 4b895868bb2da60a386a17cde3bf9ecbc70c79f4 Author: Mathias Nyman Date: Thu Jul 20 14:48:26 2017 +0300 xhci: Fix NULL pointer dereference when cleaning up streams for removed host This off by one in stream_id indexing caused NULL pointer dereference and soft lockup on machines with USB attached SCSI devices connected to a hotpluggable xhci controller. The code that cleans up pending URBs for dead hosts tried to dereference a stream ring at the invalid stream_id 0. ep->stream_info->stream_rings[0] doesn't point to a ring. Start looping stream_id from 1 like in all the other places in the driver, and check that the ring exists before trying to kill URBs on it. Reported-by: rocko r Cc: Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b50e2842b25fc14299ccf98dc9467b6304082bcb Author: Bard Liao Date: Thu Jul 20 13:07:49 2017 +0800 ASoC: rt5665: fix GPIO6 pin function define The GPIO6 pin function select value was wrong. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d70262a2d60886da6fe5b1fc8bbcd76cbbc306d Author: Russell King Date: Wed Jul 19 23:09:58 2017 +0100 ARM: kexec: fix failure to boot crash kernel When kexec was converted to DTB, the dtb address was passed between machine_kexec_prepare() and machine_kexec() using a static variable. This is bad news if you load a crash kernel followed by a normal kernel or vice versa - the last loaded kernel overwrites the dtb address. This can result in kexec failures, as (eg) we try to boot the crash kernel with the last loaded dtb. For example, with: the crash kernel fails to find the dtb. Avoid this by defining a kimage architecture structure, and store the address to be passed in r2 there, which will either be the ATAGs or the dtb blob. Fixes: 4cabd1d9625c ("ARM: 7539/1: kexec: scan for dtb magic in segments") Fixes: 42d720d1731a ("ARM: kexec: Make .text R/W in machine_kexec") Reported-by: Keerthy Tested-by: Keerthy Signed-off-by: Russell King arch/arm/include/asm/kexec.h | 5 +++++ arch/arm/kernel/machine_kexec.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) commit 67556d7a851c20116923c23f1d49ecdec954e3a0 Author: Russell King Date: Wed Jul 19 23:01:38 2017 +0100 ARM: kexec: avoid allocating crashkernel region outside lowmem Allocating the crashkernel region outside lowmem causes the kernel to oops while trying to kexec into the new kernel: Loading crashdump kernel... Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = edd70000 [00000000] *pgd=de19e835 Internal error: Oops: 817 [#2] SMP ARM Modules linked in: ... CPU: 0 PID: 689 Comm: sh Not tainted 4.12.0-rc3-next-20170601-04015-gc3a5a20 Hardware name: Generic DRA74X (Flattened Device Tree) task: edb32f00 task.stack: edf18000 PC is at memcpy+0x50/0x330 LR is at 0xe3c34001 pc : [] lr : [] psr: 800c0193 sp : edf19c2c ip : 0a000001 fp : c0553170 r10: c055316e r9 : 00000001 r8 : e3130001 r7 : e4903004 r6 : 0a000014 r5 : e3500000 r4 : e59f106c r3 : e59f0074 r2 : ffffffe8 r1 : c010fb88 r0 : 00000000 Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: add7006a DAC: 00000051 Process sh (pid: 689, stack limit = 0xedf18218) Stack: (0xedf19c2c to 0xedf1a000) ... [] (memcpy) from [] (machine_kexec+0xa8/0x12c) [] (machine_kexec) from [] (__crash_kexec+0x5c/0x98) [] (__crash_kexec) from [] (crash_kexec+0x5c/0x68) [] (crash_kexec) from [] (die+0x228/0x490) [] (die) from [] (__do_kernel_fault.part.0+0x54/0x1e4) [] (__do_kernel_fault.part.0) from [] (do_page_fault+0x1e8/0x400) [] (do_page_fault) from [] (do_DataAbort+0x38/0xb8) [] (do_DataAbort) from [] (__dabt_svc+0x64/0xa0) This is caused by image->control_code_page being a highmem page, so page_address(image->control_code_page) returns NULL. In any case, we don't want the control page to be a highmem page. We already limit the crash kernel region to the top of 32-bit physical memory space. Also limit it to the top of lowmem in physical space. Reported-by: Keerthy Tested-by: Keerthy Signed-off-by: Russell King arch/arm/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) commit 325cdacd03c12629aa5f9ee2ace49b1f3dc184a8 Author: Josh Poimboeuf Date: Sat Jul 15 00:10:58 2017 -0500 debug: Fix WARN_ON_ONCE() for modules Mike Galbraith reported a situation where a WARN_ON_ONCE() call in DRM code turned into an oops. As it turns out, WARN_ON_ONCE() seems to be completely broken when called from a module. The bug was introduced with the following commit: 19d436268dde ("debug: Add _ONCE() logic to report_bug()") That commit changed WARN_ON_ONCE() to move its 'once' logic into the bug trap handler. It requires a writable bug table so that the BUGFLAG_DONE bit can be written to the flags to indicate the first warning has occurred. The bug table was made writable for vmlinux, which relies on vmlinux.lds.S and vmlinux.lds.h for laying out the sections. However, it wasn't made writable for modules, which rely on the ELF section header flags. Reported-by: Mike Galbraith Tested-by: Masami Hiramatsu Signed-off-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 19d436268dde ("debug: Add _ONCE() logic to report_bug()") Link: http://lkml.kernel.org/r/a53b04235a65478dd9afc51f5b329fdc65c84364.1500095401.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/arm/include/asm/bug.h | 2 +- arch/arm64/include/asm/bug.h | 2 +- arch/blackfin/include/asm/bug.h | 4 ++-- arch/mn10300/include/asm/bug.h | 2 +- arch/parisc/include/asm/bug.h | 6 +++--- arch/powerpc/include/asm/bug.h | 8 ++++---- arch/s390/include/asm/bug.h | 4 ++-- arch/sh/include/asm/bug.h | 4 ++-- arch/x86/include/asm/bug.h | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) commit 76557391433c77d330cede1a531b358d2f90df66 Author: Robin Murphy Date: Mon Jul 3 14:52:24 2017 +0100 iommu/io-pgtable: Sanitise map/unmap addresses It may be an egregious error to attempt to use addresses outside the range of the pagetable format, but that still doesn't mean we should merrily wreak havoc by silently mapping/unmapping whatever truncated portions of them might happen to correspond to real addresses. Add some up-front checks to sanitise our inputs so that buggy callers don't invite potential memory corruption. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 6 ++++++ drivers/iommu/io-pgtable-arm.c | 7 +++++++ 2 files changed, 13 insertions(+) commit c54451a5e2415948274bc71f469e5349469addcc Author: Vivek Gautam Date: Thu Jul 6 15:07:00 2017 +0530 iommu/arm-smmu: Fix the error path in arm_smmu_add_device fwspec->iommu_priv is available only after arm_smmu_master_cfg instance has been allocated. We shouldn't free it before that. Also it's logical to free the master cfg itself without checking for fwspec. Signed-off-by: Vivek Gautam [will: remove redundant assignment to fwspec] Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2984f7f3bb5a82df763c2d81444573ed86f36eb8 Author: Robin Murphy Date: Thu Jul 6 17:55:31 2017 +0100 Revert "iommu/io-pgtable: Avoid redundant TLB syncs" The tlb_sync_pending flag was necessary for correctness in the Mediatek M4U driver, but since it offered a small theoretical optimisation for all io-pgtable users it was implemented as a high-level thing. However, now that some users may not be using a synchronising lock, there are several ways this flag can go wrong for them, and at worst it could result in incorrect behaviour. Since we've addressed the correctness issue within the Mediatek driver itself, and fixing the optimisation aspect to be concurrency-safe would be quite a headache (and impose extra overhead on every operation for the sake of slightly helping one case which will virtually never happen in typical usage), let's just retire it. This reverts commit 88492a4700360a086e55d8874ad786105a5e8b0f. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 98a8f63e56a0bdcf1d0af8d840d011ab90386684 Author: Robin Murphy Date: Thu Jul 6 17:55:30 2017 +0100 iommu/mtk: Avoid redundant TLB syncs locally Under certain circumstances, the io-pgtable code may end up issuing two TLB sync operations without any intervening invalidations. This goes badly for the M4U hardware, since it means the second sync ends up polling for a non-existent operation to finish, and as a result times out and warns. The io_pgtable_tlb_* helpers implement a high-level optimisation to avoid issuing the second sync at all in such cases, but in order to work correctly that requires all pagetable operations to be serialised under a lock, thus is no longer applicable to all io-pgtable users. Since we're the only user actually relying on this flag for correctness, let's reimplement it locally to avoid the headache of trying to make the high-level version concurrency-safe for other users. CC: Yong Wu CC: Matthias Brugger Tested-by: Yong Wu Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/mtk_iommu.c | 6 ++++++ drivers/iommu/mtk_iommu.h | 1 + 2 files changed, 7 insertions(+) commit 8e517e762a826d16451fb6ffb0a8722e4265582e Author: Will Deacon Date: Thu Jul 6 15:55:48 2017 +0100 iommu/arm-smmu: Reintroduce locking around TLB sync operations Commit 523d7423e21b ("iommu/arm-smmu: Remove io-pgtable spinlock") removed the locking used to serialise map/unmap calls into the io-pgtable code from the ARM SMMU driver. This is good for performance, but opens us up to a nasty race with TLB syncs because the TLB sync register is shared within a context bank (or even globally for stage-2 on SMMUv1). There are two cases to consider: 1. A CPU can be spinning on the completion of a TLB sync, take an interrupt which issues a subsequent TLB sync, and then report a timeout on return from the interrupt. 2. A CPU can be spinning on the completion of a TLB sync, but other CPUs can continuously issue additional TLB syncs in such a way that the backoff logic reports a timeout. Rather than fix this by spinning for completion of prior TLB syncs before issuing a new one (which may suffer from fairness issues on large systems), instead reintroduce locking around TLB sync operations in the ARM SMMU driver. Fixes: 523d7423e21b ("iommu/arm-smmu: Remove io-pgtable spinlock") Cc: Robin Murphy Reported-by: Ray Jui Tested-by: Ray Jui Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 5f4216f49ba19a6ba9e1f286e7de69b70991742b Author: Rob Herring Date: Tue Jul 18 16:43:22 2017 -0500 perf: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Will Deacon drivers/perf/arm_pmu_platform.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a270f32735a20affe325c351c359f13603537d05 Author: Rob Herring Date: Tue Jul 18 16:42:42 2017 -0500 arm64: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Will Deacon arch/arm64/kernel/cpu_ops.c | 4 ++-- arch/arm64/kernel/smp.c | 12 ++++++------ arch/arm64/kernel/topology.c | 22 +++++++++++----------- 3 files changed, 19 insertions(+), 19 deletions(-) commit 6f44a0bacb79a03972c83759711832b382b1b8ac Author: Qiao Zhou Date: Fri Jul 7 17:29:34 2017 +0800 arm64: traps: disable irq in die() In current die(), the irq is disabled for __die() handle, not including the possible panic() handling. Since the log in __die() can take several hundreds ms, new irq might come and interrupt current die(). If the process calling die() holds some critical resource, and some other process scheduled later also needs it, then it would deadlock. The first panic will not be executed. So here disable irq for the whole flow of die(). Signed-off-by: Qiao Zhou Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 32fb5d73c98b079e7c815b62e9d88a39ff8ce509 Author: Will Deacon Date: Fri Jul 7 17:01:50 2017 +0100 arm64: atomics: Remove '&' from '+&' asm constraint in lse atomics The lse implementation of atomic64_dec_if_positive uses the '+&' constraint, but the '&' is redundant and confusing in this case, since early clobber on a read/write operand is a strange concept. Replace the constraint with '+'. Signed-off-by: Will Deacon arch/arm64/include/asm/atomic_lse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c396fe7f0c2efdf6c02d723f7bd492c58725c822 Author: Will Deacon Date: Mon Jul 3 14:37:46 2017 +0100 arm64: uaccess: Remove redundant __force from addr cast in __range_ok Casting a pointer to an integral type doesn't require a __force attribute, because you'll need to cast back to a pointer in order to dereference the thing anyway. This patch removes the redundant __force cast from __range_ok. Reported-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e082555cec9510d276965fe391f709acb32c0f4 Author: Amir Goldstein Date: Tue Jul 18 21:07:43 2017 +0300 ovl: check for bad and whiteout index on lookup Index should always be of the same file type as origin, except for the case of a whiteout index. A whiteout index should only exist if all lower aliases have been unlinked, which means that finding a lower origin on lookup whose index is a whiteout should be treated as a lookup error. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 61b674710cd9afa2a8b17bdd1ac80670c9b79f1d Author: Amir Goldstein Date: Tue Jul 18 21:07:42 2017 +0300 ovl: do not cleanup directory and whiteout index entries Directory index entries are going to be used for looking up redirected upper dirs by lower dir fh when decoding an overlay file handle of a merge dir. Whiteout index entries are going to be used as an indication that an exported overlay file handle should be treated as stale (i.e. after unlink of the overlay inode). We don't know the verification rules for directory and whiteout index entries, because they have not been implemented yet, so fail to mount overlay rw if those entries are found to avoid corrupting an index that was created by a newer kernel. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 19 +++++++++++++++---- fs/overlayfs/readdir.c | 5 ++++- 2 files changed, 19 insertions(+), 5 deletions(-) commit 1d88f183734c0d916428911df006e645a6162cab Author: Miklos Szeredi Date: Thu Jul 20 11:08:21 2017 +0200 ovl: fix xattr get and set with selinux inode_doinit_with_dentry() in SELinux wants to read the upper inode's xattr to get security label, and ovl_xattr_get() calls ovl_dentry_real(), which depends on dentry->d_inode, but d_inode is null and not initialized yet at this point resulting in an Oops. Fix by getting the upperdentry info from the inode directly in this case. Reported-by: Eryu Guan Fixes: 09d8b586731b ("ovl: move __upperdentry to ovl_inode") Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 32 +++++++++++++++++--------------- fs/overlayfs/overlayfs.h | 7 ++++--- fs/overlayfs/super.c | 8 ++++---- fs/overlayfs/util.c | 7 ++++++- 4 files changed, 31 insertions(+), 23 deletions(-) commit 0bc73048d7baecf94117d1a948853a627e6ba5c8 Author: Arnd Bergmann Date: Wed Jul 19 14:53:06 2017 +0200 x86/platform/intel-mid: Fix a format string overflow warning We have space for exactly three characters for the index in "max7315_%d_base", but as GCC points out having more would cause an string overflow: arch/x86/platform/intel-mid/device_libs/platform_max7315.c: In function 'max7315_platform_data': arch/x86/platform/intel-mid/device_libs/platform_max7315.c:41:26: error: '%d' directive writing between 1 and 11 bytes into a region of size 9 [-Werror=format-overflow=] sprintf(base_pin_name, "max7315_%d_base", nr); ^~~~~~~~~~~~~~~~~ arch/x86/platform/intel-mid/device_libs/platform_max7315.c:41:26: note: directive argument in the range [-2147483647, 2147483647] arch/x86/platform/intel-mid/device_libs/platform_max7315.c:41:3: note: 'sprintf' output between 15 and 25 bytes into a destination of size 17 sprintf(base_pin_name, "max7315_%d_base", nr); This makes it use an snprintf() to truncate the string if that happened rather than overflowing the stack. In practice, this is safe, because there won't be a large number of max7315 devices in the systems, and both the format and the length are defined by the firmware interface. Signed-off-by: Arnd Bergmann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170719125310.2487451-9-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/device_libs/platform_max7315.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d689c64d189e43d782fec5649fb0afe303c5b3f9 Author: Arnd Bergmann Date: Wed Jul 19 14:53:05 2017 +0200 x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG The IOSF_MBI option requires PCI support, without it we get a harmless Kconfig warning when it gets selected by PUNIT_ATOM_DEBUG: warning: (X86_INTEL_LPSS && SND_SST_IPC_ACPI && MMC_SDHCI_ACPI && PUNIT_ATOM_DEBUG) selects IOSF_MBI which has unmet direct dependencies (PCI) This adds another dependency to avoid the warning. Signed-off-by: Arnd Bergmann Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170719125310.2487451-8-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) commit d460131dd50599e0e9405d5f4ae02c27d529a44a Author: Arnd Bergmann Date: Wed Jul 19 14:53:03 2017 +0200 x86/build: Silence the build with "make -s" Every kernel build on x86 will result in some output: Setup is 13084 bytes (padded to 13312 bytes). System is 4833 kB CRC 6d35fa35 Kernel: arch/x86/boot/bzImage is ready (#2) This shuts it up, so that 'make -s' is truely silent as long as everything works. Building without '-s' should produce unchanged output. Signed-off-by: Arnd Bergmann Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170719125310.2487451-6-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/boot/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7206f9bf108eb9513d170c73f151367a1bdf3dbf Author: Arnd Bergmann Date: Wed Jul 19 14:53:02 2017 +0200 x86/io: Add "memory" clobber to insb/insw/insl/outsb/outsw/outsl The x86 version of insb/insw/insl uses an inline assembly that does not have the target buffer listed as an output. This can confuse the compiler, leading it to think that a subsequent access of the buffer is uninitialized: drivers/net/wireless/wl3501_cs.c: In function ‘wl3501_mgmt_scan_confirm’: drivers/net/wireless/wl3501_cs.c:665:9: error: ‘sig.status’ is used uninitialized in this function [-Werror=uninitialized] drivers/net/wireless/wl3501_cs.c:668:12: error: ‘sig.cap_info’ may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/net/sb1000.c: In function 'sb1000_rx': drivers/net/sb1000.c:775:9: error: 'st[0]' is used uninitialized in this function [-Werror=uninitialized] drivers/net/sb1000.c:776:10: error: 'st[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/net/sb1000.c:784:11: error: 'st[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized] I tried to mark the exact input buffer as an output here, but couldn't figure it out. As suggested by Linus, marking all memory as clobbered however is good enough too. For the outs operations, I also add the memory clobber, to force the input to be written to local variables. This is probably already guaranteed by the "asm volatile", but it can't hurt to do this for symmetry. Suggested-by: Linus Torvalds Signed-off-by: Arnd Bergmann Acked-by: Linus Torvalds Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Link: http://lkml.kernel.org/r/20170719125310.2487451-5-arnd@arndb.de Link: https://lkml.org/lkml/2017/7/12/605 Signed-off-by: Ingo Molnar arch/x86/include/asm/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5623452a0eaec1d44cc9f0770444a48847c9953f Author: Arnd Bergmann Date: Wed Jul 19 14:53:01 2017 +0200 x86/fpu/math-emu: Avoid bogus -Wint-in-bool-context warning gcc-7.1.1 produces this warning: arch/x86/math-emu/reg_add_sub.c: In function 'FPU_add': arch/x86/math-emu/reg_add_sub.c:80:48: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context] This appears to be a bug in gcc-7.1.1, and I have reported it as PR81484. The compiler suggests that code written as if (a & b ? c : d) is usually incorrect and should have been if (a & (b ? c : d)) However, in this case, we correctly write if ((a & b) ? c : d) and should not get a warning for it. This adds a dirty workaround for the problem, adding a comparison with zero inside of the macro. The warning is currently disabled in the kernel, so we may decide not to apply the patch, and instead wait for future gcc releases to fix the problem. On the other hand, it seems to be the only instance of this particular problem. Signed-off-by: Arnd Bergmann Cc: Bill Metzenthen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170719125310.2487451-4-arnd@arndb.de Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81484 Signed-off-by: Ingo Molnar arch/x86/math-emu/fpu_emu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75e2f0a6b16141cb347f442033ec907380d4d66e Author: Arnd Bergmann Date: Wed Jul 19 14:53:00 2017 +0200 x86/fpu/math-emu: Fix possible uninitialized variable use When building the kernel with "make EXTRA_CFLAGS=...", this overrides the "PARANOID" preprocessor macro defined in arch/x86/math-emu/Makefile, and we run into a build warning: arch/x86/math-emu/reg_compare.c: In function ‘compare_i_st_st’: arch/x86/math-emu/reg_compare.c:254:6: error: ‘f’ may be used uninitialized in this function [-Werror=maybe-uninitialized] This fixes the implementation to work correctly even without the PARANOID flag, and also fixes the Makefile to not use the EXTRA_CFLAGS variable but instead use the ccflags-y variable in the Makefile that is meant for this purpose. Signed-off-by: Arnd Bergmann Cc: Bill Metzenthen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170719125310.2487451-3-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/math-emu/Makefile | 4 ++-- arch/x86/math-emu/reg_compare.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 11d8b05855f3749bcb6c57e2c4052921b9605c77 Author: Arnd Bergmann Date: Wed Jul 19 14:52:59 2017 +0200 perf/x86: Shut up false-positive -Wmaybe-uninitialized warning The intialization function checks for various failure scenarios, but unfortunately the compiler gets a little confused about the possible combinations, leading to a false-positive build warning when -Wmaybe-uninitialized is set: arch/x86/events/core.c: In function ‘init_hw_perf_events’: arch/x86/events/core.c:264:3: warning: ‘reg_fail’ may be used uninitialized in this function [-Wmaybe-uninitialized] arch/x86/events/core.c:264:3: warning: ‘val_fail’ may be used uninitialized in this function [-Wmaybe-uninitialized] pr_err(FW_BUG "the BIOS has corrupted hw-PMU resources (MSR %x is %Lx)\n", We can't actually run into this case, so this shuts up the warning by initializing the variables to a known-invalid state. Suggested-by: Peter Zijlstra Signed-off-by: Arnd Bergmann Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170719125310.2487451-2-arnd@arndb.de Link: https://patchwork.kernel.org/patch/9392595/ Signed-off-by: Ingo Molnar arch/x86/events/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e7f0b6c2371d41e9bd902fe863be2ec4b6d4e31 Author: Krzysztof Kozlowski Date: Thu Jul 20 07:01:25 2017 +0200 x86/defconfig: Remove stale, old Kconfig options Remove old, dead Kconfig options (in order appearing in this commit): - EXPERIMENTAL is gone since v3.9; - IP_NF_TARGET_ULOG: commit d4da843e6fad ("netfilter: kill remnants of ulog targets"); - USB_LIBUSUAL: commit f61870ee6f8c ("usb: remove libusual"); Signed-off-by: Krzysztof Kozlowski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1500526885-4341-1-git-send-email-krzk@kernel.org Signed-off-by: Ingo Molnar arch/x86/configs/i386_defconfig | 3 --- arch/x86/configs/x86_64_defconfig | 3 --- 2 files changed, 6 deletions(-) commit e708e35ba6d89ff785b225cd07dcccab04fa954a Author: Seunghun Han Date: Tue Jul 18 18:20:44 2017 +0900 x86/ioapic: Pass the correct data to unmask_ioapic_irq() One of the rarely executed code pathes in check_timer() calls unmask_ioapic_irq() passing irq_get_chip_data(0) as argument. That's wrong as unmask_ioapic_irq() expects a pointer to the irq data of interrupt 0. irq_get_chip_data(0) returns NULL, so the following dereference in unmask_ioapic_irq() causes a kernel panic. The issue went unnoticed in the first place because irq_get_chip_data() returns a void pointer so the compiler cannot do a type check on the argument. The code path was added for machines with broken configuration, but it seems that those machines are either not running current kernels or simply do not longer exist. Hand in irq_get_irq_data(0) as argument which provides the correct data. [ tglx: Rewrote changelog ] Fixes: 4467715a44cc ("x86/irq: Move irq_cfg.irq_2_pin into io_apic.c") Signed-off-by: Seunghun Han Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1500369644-45767-1-git-send-email-kkamagui@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dad5ab0db8deac535d03e3fe3d8f2892173fa6a4 Author: Seunghun Han Date: Tue Jul 18 20:03:51 2017 +0900 x86/acpi: Prevent out of bound access caused by broken ACPI tables The bus_irq argument of mp_override_legacy_irq() is used as the index into the isa_irq_to_gsi[] array. The bus_irq argument originates from ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI tables, but is nowhere sanity checked. That allows broken or malicious ACPI tables to overwrite memory, which might cause malfunction, panic or arbitrary code execution. Add a sanity check and emit a warning when that triggers. [ tglx: Added warning and rewrote changelog ] Signed-off-by: Seunghun Han Signed-off-by: Thomas Gleixner Cc: security@kernel.org Cc: "Rafael J. Wysocki" Cc: stable@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/acpi/boot.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 636c4c3e762b62aa93632c645ca65879285b16e3 Author: Imre Deak Date: Wed Jul 19 16:46:32 2017 +0300 drm/mst: Avoid processing partially received up/down message transactions Currently we may process up/down message transactions containing uninitialized data. This can happen if there was an error during the reception of any message in the transaction, but we happened to receive the last message correctly with the end-of-message flag set. To avoid this abort the reception of the transaction when the first error is detected, rejecting any messages until a message with the start-of-message flag is received (which will start a new transaction). This is also what the DP 1.4 spec 2.11.8.2 calls for in this case. In addtion this also prevents receiving bogus transactions without the first message with the the start-of-message flag set. v2: - unchanged v3: - git add the part that actually skips messages after an error in drm_dp_sideband_msg_build() Cc: Dave Airlie Cc: Lyude Cc: Daniel Vetter Signed-off-by: Imre Deak Reviewed-by: Lyude Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170719134632.13366-1-imre.deak@intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 7f8b3987da54cb4d41ad2545cd4d7958b9a36bdf Author: Imre Deak Date: Wed Jul 19 14:43:29 2017 +0300 drm/mst: Avoid dereferencing a NULL mstb in drm_dp_mst_handle_up_req() In case of an unknown broadcast message is sent mstb will remain unset, so check for this. Cc: Dave Airlie Cc: Lyude Cc: Daniel Vetter Signed-off-by: Imre Deak Reviewed-by: Lyude Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170719114330.26540-3-imre.deak@intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 448421b5e93b9177c5698f0cf6f5e72d2995eeca Author: Imre Deak Date: Wed Jul 19 14:43:28 2017 +0300 drm/mst: Fix error handling during MST sideband message reception Handle any error due to partial reads, timeouts etc. to avoid parsing uninitialized data subsequently. Also bail out if the parsing itself fails. Cc: Dave Airlie Cc: Lyude Cc: Daniel Vetter Signed-off-by: Imre Deak Reviewed-by: Lyude Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170719114330.26540-2-imre.deak@intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3bda69c1c3993a2bddbae01397d12bfef6054011 Author: Alexander Shishkin Date: Tue Jul 18 14:08:34 2017 +0300 perf/core: Fix scheduling regression of pinned groups Vince Weaver reported: > I was tracking down some regressions in my perf_event_test testsuite. > Some of the tests broke in the 4.11-rc1 timeframe. > > I've bisected one of them, this report is about > tests/overflow/simul_oneshot_group_overflow > This test creates an event group containing two sampling events, set > to overflow to a signal handler (which disables and then refreshes the > event). > > On a good kernel you get the following: > Event perf::instructions with period 1000000 > Event perf::instructions with period 2000000 > fd 3 overflows: 946 (perf::instructions/1000000) > fd 4 overflows: 473 (perf::instructions/2000000) > Ending counts: > Count 0: 946379875 > Count 1: 946365218 > > With the broken kernels you get: > Event perf::instructions with period 1000000 > Event perf::instructions with period 2000000 > fd 3 overflows: 938 (perf::instructions/1000000) > fd 4 overflows: 318 (perf::instructions/2000000) > Ending counts: > Count 0: 946373080 > Count 1: 653373058 The root cause of the bug is that the following commit: 487f05e18a ("perf/core: Optimize event rescheduling on active contexts") erronously assumed that event's 'pinned' setting determines whether the event belongs to a pinned group or not, but in fact, it's the group leader's pinned state that matters. This was discovered by Vince in the test case described above, where two instruction counters are grouped, the group leader is pinned, but the other event is not; in the regressed case the counters were off by 33% (the difference between events' periods), but should be the same within the error margin. Fix the problem by looking at the group leader's pinning. Reported-by: Vince Weaver Tested-by: Vince Weaver Signed-off-by: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: 487f05e18a ("perf/core: Optimize event rescheduling on active contexts") Link: http://lkml.kernel.org/r/87lgnmvw7h.fsf@ashishki-desk.ger.corp.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6399f1fae4ec29fab5ec76070435555e256ca3a6 Author: Sabrina Dubroca Date: Wed Jul 19 22:28:55 2017 +0200 ipv6: avoid overflow of offset in ip6_find_1stfragopt In some cases, offset can overflow and can cause an infinite loop in ip6_find_1stfragopt(). Make it unsigned int to prevent the overflow, and cap it at IPV6_MAXPLEN, since packets larger than that should be invalid. This problem has been here since before the beginning of git history. Signed-off-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/output_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1e6c22aef28364dcc5f03c04a05ec463bc2b3431 Author: Colin Ian King Date: Wed Jul 19 18:46:59 2017 +0100 net: tehuti: don't process data if it has not been copied from userspace The array data is only populated with valid information from userspace if cmd != SIOCDEVPRIVATE, other cases the array contains garbage on the stack. The subsequent switch statement acts on a subcommand in data[0] which could be any garbage value if cmd is SIOCDEVPRIVATE which seems incorrect to me. Instead, just return EOPNOTSUPP for the case where cmd == SIOCDEVPRIVATE to avoid this issue. As a side note, I suspect that the original intention of the code was for this ioctl to work just for cmd == SIOCDEVPRIVATE (and the current logic is reversed). However, I don't wont to change the current semantics in case any userspace code relies on this existing behaviour. Detected by CoverityScan, CID#139647 ("Uninitialized scalar variable") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/tehuti/tehuti.c | 2 ++ 1 file changed, 2 insertions(+) commit 3753654e541938717b13f2b25791c3171a3a06aa Author: David Ahern Date: Wed Jul 19 10:22:40 2017 -0700 Revert "rtnetlink: Do not generate notifications for CHANGEADDR event" This reverts commit cd8966e75ed3c6b41a37047a904617bc44fa481f. The duplicate CHANGEADDR event message is sent regardless of link status whereas the setlink changes only generate a notification when the link is up. Not sending a notification when the link is down breaks dhcpcd which only processes hwaddr changes when the link is down. Fixes reported regression: https://bugzilla.kernel.org/show_bug.cgi?id=196355 Reported-by: Yaroslav Isakov Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit bb0a2675f72b458e64f47071e8aabdb225a6af4d Author: Martin Hundebøll Date: Wed Jul 19 08:17:02 2017 +0200 net: dsa: mv88e6xxx: Enable CMODE config support for 6390X Commit f39908d3b1c45 ('net: dsa: mv88e6xxx: Set the CMODE for mv88e6390 ports 9 & 10') added support for setting the CMODE for the 6390X family, but only enabled it for 9290 and 6390 - and left out 6390X. Fix support for setting the CMODE on 6390X also by assigning mv88e6390x_port_set_cmode() to the .port_set_cmode function pointer in mv88e6390x_ops too. Fixes: f39908d3b1c4 ("net: dsa: mv88e6xxx: Set the CMODE for mv88e6390 ports 9 & 10") Signed-off-by: Martin Hundebøll Reviewed-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 1 + 1 file changed, 1 insertion(+) commit 65e3c766359992f6cbe3fa1ef0a19546ecbdf380 Author: Arun Parameswaran Date: Thu Jul 6 10:37:57 2017 -0700 dt-binding: ptp: Add SoC compatibility strings for dte ptp clock Add SoC specific compatibility strings to the Broadcom DTE based PTP clock binding document. Fixed the document heading and node name. Fixes: 80d6076140b2 ("dt-binding: ptp: add bindings document for dte based ptp clock") Signed-off-by: Arun Parameswaran Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/ptp/brcm,ptp-dte.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit a7c3e62bdc71d33f75803115d44e3ee7dab3d811 Author: Mikulas Patocka Date: Wed Jul 19 11:24:08 2017 -0400 dm integrity: use plugging when writing the journal When copying data from the journal to the appropriate place, we submit many IOs. Some of these IOs could go to adjacent areas. Use on-stack plugging so that adjacent IOs get merged during submission. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 5 +++++ 1 file changed, 5 insertions(+) commit 9dd59727dbc21d33a9add4c5b308a5775cd5a6ef Author: Mikulas Patocka Date: Wed Jul 19 11:23:40 2017 -0400 dm integrity: fix inefficient allocation of journal space When using a block size greater than 512 bytes, the dm-integrity target allocates journal space inefficiently. It allocates one journal entry for each 512-byte chunk of data, fills an entry for each block of data and leaves the remaining entries unused. This issue doesn't cause data corruption, but all the unused journal entries degrade performance severely. For example, with 4k blocks and an 8k bio, it would allocate 16 journal entries but only use 2 entries. The remaining 14 entries were left unused. Fix this by adding the missing 'log2_sectors_per_block' shifts that are required to have each journal entry map to a full block. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Fixes: 7eada909bfd7 ("dm: add integrity target") Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit beaec533fc2701a28a4d667f67c9f59c6e4e0d13 Author: Alexander Potapenko Date: Wed Jul 19 20:27:30 2017 +0200 llist: clang: introduce member_address_is_nonnull() Currently llist_for_each_entry() and llist_for_each_entry_safe() iterate until &pos->member != NULL. But when building the kernel with Clang, the compiler assumes &pos->member cannot be NULL if the member's offset is greater than 0 (which would be equivalent to the object being non-contiguous in memory). Therefore the loop condition is always true, and the loops become infinite. To work around this, introduce the member_address_is_nonnull() macro, which casts object pointer to uintptr_t, thus letting the member pointer to be NULL. Signed-off-by: Alexander Potapenko Tested-by: Sodagudi Prasad Signed-off-by: Linus Torvalds include/linux/llist.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 90f522a20e3d16d153e5a5f84cf4ff92281ee417 Author: Eugeniy Paltsev Date: Tue Jul 18 17:07:15 2017 +0300 NET: dwmac: Make dwmac reset unconditional Unconditional reset dwmac before HW init if reset controller is present. In existing implementation we reset dwmac only after second module probing: (module load -> unload -> load again [reset happens]) Now we reset dwmac at every module load: (module load [reset happens] -> unload -> load again [reset happens]) Also some reset controllers have only reset callback instead of assert + deassert callbacks pair, so handle this case. Signed-off-by: Eugeniy Paltsev Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 63679112c536289826fec61c917621de95ba2ade Author: David S. Miller Date: Wed Jul 19 13:33:24 2017 -0700 net: Zero terminate ifr_name in dev_ifname(). The ifr.ifr_name is passed around and assumed to be NULL terminated. Signed-off-by: David S. Miller net/core/dev_ioctl.c | 1 + 1 file changed, 1 insertion(+) commit 98de4e0ea47d106846fc0e30ce4e644283fa7fc2 Author: Levin, Alexander Date: Tue Jul 18 04:23:16 2017 +0000 wireless: wext: terminate ifr name coming from userspace ifr name is assumed to be a valid string by the kernel, but nothing was forcing username to pass a valid string. In turn, this would cause panics as we tried to access the string past it's valid memory. Signed-off-by: Sasha Levin Signed-off-by: David S. Miller net/core/dev_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) commit 3aa0907675a38498d8f2d343e94207ad28a117cf Author: Boris Brezillon Date: Mon Jul 17 20:20:08 2017 +0200 mtd: nand: atmel: Fix DT backward compatibility in pmecc.c PMECC caps extraction from old DT bindings is broken, thus leading to erroneous EL registers offset, which in turn make HW ECC unusable on sama5d2 when old bindings are in use. Passing the NAND dev node instead of the NFC node to of_match_node() solves the problem. Signed-off-by: Boris Brezillon Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") Cc: Tested-by: Romain Izard drivers/mtd/nand/atmel/pmecc.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 213297369cf4900eba906dd32ce845074e30f487 Author: Trond Myklebust Date: Wed Jul 12 19:10:59 2017 -0400 Revert commit 722f0b891198 ("pNFS: Don't send COMMITs to the DSes if...") Doing the test without taking any locks is racy, and so really it makes more sense to do it in the flexfiles code (which is the only case that cares). Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/pnfs_nfs.c | 7 ------- 1 file changed, 7 deletions(-) commit 4b75053e9bb6db4b700526d2d67c67a0d07f867e Author: Trond Myklebust Date: Wed Jul 12 19:10:58 2017 -0400 pNFS/flexfiles: Handle expired layout segments in ff_layout_initiate_commit() If the layout has expired due to a fencing event, then we should not attempt to commit to the DS. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/flexfilelayout/flexfilelayout.c | 4 ++++ 1 file changed, 4 insertions(+) commit 41181886459b281ed1346369f27b3c3bb8e2dde3 Author: Trond Myklebust Date: Wed Jul 12 19:10:57 2017 -0400 NFS: Fix another COMMIT race in pNFS We must make sure that cinfo->ds->ncommitting is in sync with the commit list, since it is checked as part of pnfs_commit_list(). Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/pnfs_nfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e39928f942ff7a9d1cb9005423e9e35a0a4bb2e0 Author: Trond Myklebust Date: Wed Jul 12 19:10:56 2017 -0400 NFS: Fix a COMMIT race in pNFS We must make sure that cinfo->ds->nwritten is in sync with the commit list, since it is checked as part of pnfs_scan_commit_lists(). Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/pnfs_nfs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 89a6814d9b665b196aa3a102f96b6dc7e8cb669e Author: Steve Dickson Date: Thu Jun 29 11:48:26 2017 -0400 mount: copy the port field into the cloned nfs_server structure. Doing this copy eliminates the "port=0" entry in the /proc/mounts entries Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=69241 Signed-off-by: Steve Dickson Signed-off-by: Anna Schumaker fs/nfs/client.c | 1 + 1 file changed, 1 insertion(+) commit e33bf72361bdd764c827e160249a3e06d2a8e2fe Author: Filipe Manana Date: Tue Jul 18 20:34:02 2017 +0100 Btrfs: fix dir item validation when replaying xattr deletes We were passing an incorrect slot number to the function that validates directory items when we are replaying xattr deletes from a log tree. The correct slot is stored at variable 'i' and not at 'path->slots[0]', so the call to the validation function was only correct for the first iteration of the loop, when 'i == path->slots[0]'. After this fix, the fstest generic/066 passes again. Fixes: 8ee8c2d62d5f ("btrfs: Verify dir_item in replay_xattr_deletes") Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-log.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e06fdaf40a5c021dd4a2ec797e8b724f07360070 Merge: a90c6ac 8acdf50 Author: Linus Torvalds Date: Wed Jul 19 08:55:18 2017 -0700 Merge tag 'gcc-plugins-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull structure randomization updates from Kees Cook: "Now that IPC and other changes have landed, enable manual markings for randstruct plugin, including the task_struct. This is the rest of what was staged in -next for the gcc-plugins, and comes in three patches, largest first: - mark "easy" structs with __randomize_layout - mark task_struct with an optional anonymous struct to isolate the __randomize_layout section - mark structs to opt _out_ of automated marking (which will come later) And, FWIW, this continues to pass allmodconfig (normal and patched to enable gcc-plugins) builds of x86_64, i386, arm64, arm, powerpc, and s390 for me" * tag 'gcc-plugins-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: randstruct: opt-out externally exposed function pointer structs task_struct: Allow randomized layout randstruct: Mark various structs for randomization commit a90c6ac2b5651b1f907de512c2fa648c9fa6bb6e Merge: 74cbd96 7c40b22 Author: Linus Torvalds Date: Wed Jul 19 08:49:46 2017 -0700 Merge tag 'ceph-for-4.13-rc2' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A number of small fixes for -rc1 Luminous changes plus a readdir race fix, marked for stable" * tag 'ceph-for-4.13-rc2' of git://github.com/ceph/ceph-client: libceph: potential NULL dereference in ceph_msg_data_create() ceph: fix race in concurrent readdir libceph: don't call encode_request_finish() on MOSDBackoff messages libceph: use alloc_pg_mapping() in __decode_pg_upmap_items() libceph: set -EINVAL in one place in crush_decode() libceph: NULL deref on osdmap_apply_incremental() error path libceph: fix old style declaration warnings commit 5c0338c68706be53b3dc472e4308961c36e4ece1 Author: Tejun Heo Date: Tue Jul 18 18:41:52 2017 -0400 workqueue: restore WQ_UNBOUND/max_active==1 to be ordered The combination of WQ_UNBOUND and max_active == 1 used to imply ordered execution. After NUMA affinity 4c16bd327c74 ("workqueue: implement NUMA affinity for unbound workqueues"), this is no longer true due to per-node worker pools. While the right way to create an ordered workqueue is alloc_ordered_workqueue(), the documentation has been misleading for a long time and people do use WQ_UNBOUND and max_active == 1 for ordered workqueues which can lead to subtle bugs which are very difficult to trigger. It's unlikely that we'd see noticeable performance impact by enforcing ordering on WQ_UNBOUND / max_active == 1 workqueues. Let's automatically set __WQ_ORDERED for those workqueues. Signed-off-by: Tejun Heo Reported-by: Christoph Hellwig Reported-by: Alexei Potashnik Fixes: 4c16bd327c74 ("workqueue: implement NUMA affinity for unbound workqueues") Cc: stable@vger.kernel.org # v3.10+ kernel/workqueue.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 59a5e266c3f5c1567508888dd61a45b86daed0fa Author: Dan Carpenter Date: Wed Jul 19 13:06:41 2017 +0300 libata: array underflow in ata_find_dev() My static checker complains that "devno" can be negative, meaning that we read before the start of the loop. I've looked at the code, and I think the warning is right. This come from /proc so it's root only or it would be quite a quite a serious bug. The call tree looks like this: proc_scsi_write() <- gets id and channel from simple_strtoul() -> scsi_add_single_device() <- calls shost->transportt->user_scan() -> ata_scsi_user_scan() -> ata_find_dev() Signed-off-by: Dan Carpenter Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # all versions at this point drivers/ata/libata-scsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b0659ae5e30074ede1dc08f2c6d64f0c11d64e0f Author: Shu Wang Date: Tue Jul 18 14:37:24 2017 +0800 audit: fix memleak in auditd_send_unicast_skb. Found this issue by kmemleak report, auditd_send_unicast_skb did not free skb if rcu_dereference(auditd_conn) returns null. unreferenced object 0xffff88082568ce00 (size 256): comm "auditd", pid 1119, jiffies 4294708499 backtrace: [] kmemleak_alloc+0x4a/0xa0 [] kmem_cache_alloc_node+0xcc/0x210 [] __alloc_skb+0x5d/0x290 [] audit_make_reply+0x54/0xd0 [] audit_receive_msg+0x967/0xd70 ---------------- (gdb) list *audit_receive_msg+0x967 0xffffffff8113dff7 is in audit_receive_msg (kernel/audit.c:1133). 1132 skb = audit_make_reply(0, AUDIT_REPLACE, 0, 0, &pvnr, sizeof(pvnr)); --------------- [] audit_receive+0x52/0xa0 [] netlink_unicast+0x181/0x240 [] netlink_sendmsg+0x2c2/0x3b0 [] sock_sendmsg+0x38/0x50 [] SYSC_sendto+0x102/0x190 [] SyS_sendto+0xe/0x10 [] entry_SYSCALL_64_fastpath+0x1a/0xa5 [] 0xffffffffffffffff Signed-off-by: Shu Wang Signed-off-by: Paul Moore kernel/audit.c | 1 + 1 file changed, 1 insertion(+) commit c2ce3f5d89d57301e2756ac325fe2ebc33bfec30 Author: Arnd Bergmann Date: Wed Jul 19 14:53:04 2017 +0200 x86: add MULTIUSER dependency for KVM KVM tries to select 'TASKSTATS', which had additional dependencies: warning: (KVM) selects TASKSTATS which has unmet direct dependencies (NET && MULTIUSER) Signed-off-by: Arnd Bergmann Signed-off-by: Radim Krčmář arch/x86/kvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3f1dfb6e818a2352c38e3e37bb983eae98621b5 Author: Jim Mattson Date: Mon Jul 17 12:00:34 2017 -0700 KVM: nVMX: Disallow VM-entry in MOV-SS shadow Immediately following MOV-to-SS/POP-to-SS, VM-entry is disallowed. This check comes after the check for a valid VMCS. When this check fails, the instruction pointer should fall through to the next instruction, the ALU flags should be set to indicate VMfailValid, and the VM-instruction error should be set to 26 ("VM entry with events blocked by MOV SS"). Signed-off-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4c4a6f790ee862ee9f0dc8b35c71f55bcf792b71 Author: Paolo Bonzini Date: Fri Jul 14 13:36:11 2017 +0200 KVM: nVMX: track NMI blocking state separately for each VMCS vmx_recover_nmi_blocking is using a cached value of the guest interruptibility info, which is stored in vmx->nmi_known_unmasked. vmx_recover_nmi_blocking is run for both normal and nested guests, so the cached value must be per-VMCS. This fixes eventinj.flat in a nested non-EPT environment. With EPT it works, because the EPT violation handler doesn't have the vmx->nmi_known_unmasked optimization (it is unnecessary because, unlike vmx_recover_nmi_blocking, it can just look at the exit qualification). Thanks to Wanpeng Li for debugging the testcase and providing an initial patch. Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 76380636280b46541a9d2fe5aac497475bfbcde8 Author: Rafael J. Wysocki Date: Wed Jul 19 14:41:58 2017 +0200 ACPI / EC: Add parameter to force disable the GPE on suspend After commit 8110dd281e15 (ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems) the configuration of GPEs, including the EC one, is not changed during suspend-to-idle on recent systems. That's in order to make system wakeup events generated by the EC work, in particular. However, on some of the systems in question (for example on Dell XPS13 9365), in addition to generating system wakeup events the EC generates a heartbeat sequence of interrupts that have nothing to do with wakeup while suspended, and the Low Power Idle S0 _DSM interface doesn't change that behavior. The users of those systems may prefer to disable the EC GPE during system suspend, for the cost of non-functional power button wakeup or similar, but currently there is no way to do that. For this reason, add a new module parameter, ec_no_wakeup, for the EC driver module that, if set, will cause the EC GPE to be disabled during system suspend and re-enabled during the subsequent system resume. Link: https://bugzilla.kernel.org/show_bug.cgi?id=192591#c106 Amends: 8110dd281e15 (ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems) Reported-and-tested-by: Patrik Kullman Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 975e83cfb8dc16e7a2fdc58188c77c0c605876c2 Author: Sudeep Holla Date: Fri Jul 14 11:51:48 2017 +0100 PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present If the genpd->attach_dev or genpd->power_on fails, genpd_dev_pm_attach may return -EPROBE_DEFER initially. However genpd_alloc_dev_data sets the PM domain for the device unconditionally. When subsequent attempts are made to call genpd_dev_pm_attach, it may return -EEXISTS checking dev->pm_domain without re-attempting to call attach_dev or power_on. platform_drv_probe then attempts to call drv->probe as the return value -EEXIST != -EPROBE_DEFER, which may end up in a situation where the device is accessed without it's power domain switched on. Fixes: f104e1e5ef57 (PM / Domains: Re-order initialization of generic_pm_domain_data) Cc: 4.4+ # v4.4+ Signed-off-by: Sudeep Holla Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 848618857d2535176037bdc085f8d012d907071f Author: Joel Fernandes Date: Wed Jul 12 19:14:16 2017 -0700 tracing/ring_buffer: Try harder to allocate ftrace can fail to allocate per-CPU ring buffer on systems with a large number of CPUs coupled while large amounts of cache happening in the page cache. Currently the ring buffer allocation doesn't retry in the VM implementation even if direct-reclaim made some progress but still wasn't able to find a free page. On retrying I see that the allocations almost always succeed. The retry doesn't happen because __GFP_NORETRY is used in the tracer to prevent the case where we might OOM, however if we drop __GFP_NORETRY, we risk destabilizing the system if OOM killer is triggered. To prevent this situation, use the __GFP_RETRY_MAYFAIL flag introduced recently [1]. Tested the following still succeeds without destabilizing a system with 1GB memory. echo 300000 > /sys/kernel/debug/tracing/buffer_size_kb [1] https://marc.info/?l=linux-mm&m=149820805124906&w=2 Link: http://lkml.kernel.org/r/20170713021416.8897-1-joelaf@google.com Cc: Tim Murray Cc: Ingo Molnar Cc: Andrew Morton Acked-by: Vlastimil Babka Acked-by: Johannes Weiner Acked-by: Michal Hocko Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ec0aef9881d18aa781268ec9cba8eba5b202f5b4 Author: Antoine Tenart Date: Wed Jul 19 11:04:26 2017 +0200 arm64: dts: marvell: mark the cp110 crypto engine as dma coherent The crypto engines found on the cp110 master and slave are dma coherent. This patch adds the relevant property to their dt nodes. Cc: stable@vger.kernel.org # v4.12+ Fixes: 973020fd9498 ("arm64: marvell: dts: add crypto engine description for 7k/8k") Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 1 + 2 files changed, 2 insertions(+) commit f85c758dbee54cc3612a6e873ef7cecdb66ebee5 Author: Dan Carpenter Date: Mon Jul 17 11:14:26 2017 +0300 KVM: x86: masking out upper bits kvm_read_cr3() returns an unsigned long and gfn is a u64. We intended to mask out the bottom 5 bits but because of the type issue we mask the top 32 bits as well. I don't know if this is a real problem, but it causes static checker warnings. Signed-off-by: Dan Carpenter Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d69f3a8c2ed1c7f322d23145bc0c3d980ebbacb Merge: 446230f b8b9c97 Author: Greg Kroah-Hartman Date: Wed Jul 19 13:15:30 2017 +0200 Merge tag 'fixes-for-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.13-rc2 First set of fixes for the current -rc cycle. Only three fixes on dwc3 this time around (proper order for getting a PHY reference, fix for unmapping DMA and a fix for requesting IRQ on the OMAP glue layer). Most fixes are on the renesas USB controller, fixing several old bugs with most going to stable. dwc2 also learned that it *must* reset USB Address to zero on Reset interrupts. Apart from these, some drivers needed HAS_DMA dependency and there's a sparse warning fix for bdc udc. commit f7fb77fc12352d15180dc3c08ffba10573d5167d Author: Pablo Neira Ayuso Date: Tue Jul 18 20:03:05 2017 +0200 netfilter: nft_compat: check extension hook mask only if set If the x_tables extension comes with no hook mask, skip this validation. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_compat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3840538ad384fb7891adeeaf36624f870c51fc0e Author: Sabrina Dubroca Date: Tue Jul 18 14:56:17 2017 +0200 netfilter: ipt_CLUSTERIP: fix use-after-free of proc entry When we delete a netns with a CLUSTERIP rule, clusterip_net_exit() is called first, removing /proc/net/ipt_CLUSTERIP. Then clusterip_config_entry_put() is called from clusterip_tg_destroy(), and tries to remove its entry under /proc/net/ipt_CLUSTERIP/. Fix this by checking that the parent directory of the entry to remove hasn't already been deleted. The following triggers a KASAN splat (stealing the reproducer from 202f59afd441, thanks to Jianlin Shi and Xin Long): ip netns add test ip link add veth0_in type veth peer name veth0_out ip link set veth0_in netns test ip netns exec test ip link set lo up ip netns exec test ip link set veth0_in up ip netns exec test iptables -I INPUT -d 1.2.3.4 -i veth0_in -j \ CLUSTERIP --new --clustermac 89:d4:47:eb:9a:fa --total-nodes 3 \ --local-node 1 --hashmode sourceip-sourceport ip netns del test Fixes: ce4ff76c15a8 ("netfilter: ipt_CLUSTERIP: make proc directory per net namespace") Signed-off-by: Sabrina Dubroca Reviewed-by: Xin Long Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_CLUSTERIP.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b8b9c974afee685789fcbb191b52d1790be3608c Author: Yoshihiro Shimoda Date: Wed Jul 19 16:16:55 2017 +0900 usb: renesas_usbhs: gadget: disable all eps when the driver stops A gadget driver will not disable eps immediately when ->disconnect() is called. But, since this driver assumes all eps stop after the ->disconnect(), unexpected behavior happens (especially in system suspend). So, this patch disables all eps in usbhsg_try_stop(). After disabling eps by renesas_usbhs driver, since some functions will be called by both a gadget and renesas_usbhs driver, renesas_usbhs driver should protect uep->pipe. To protect uep->pipe easily, this patch adds a new lock in struct usbhsg_uep. Fixes: 2f98382dc ("usb: renesas_usbhs: Add Renesas USBHS Gadget") Cc: # v3.0+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/mod_gadget.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 59a0879a0e17b2e43ecdc5e3299da85b8410d7ce Author: Yoshihiro Shimoda Date: Wed Jul 19 16:16:54 2017 +0900 usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL This patch fixes an issue that some registers may be not initialized after resume if the USBHSF_RUNTIME_PWCTRL is not set. Otherwise, if a cable is not connected, the driver will not enable INTENB0.VBSE after resume. And then, the driver cannot detect the VBUS. Fixes: ca8a282a5373 ("usb: gadget: renesas_usbhs: add suspend/resume support") Cc: # v3.2+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bbb3be170ac2891526ad07b18af7db226879a8e7 Author: Dan Williams Date: Tue Jul 18 17:49:14 2017 -0700 device-dax: fix sysfs duplicate warnings Fix warnings of the form... WARNING: CPU: 10 PID: 4983 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x62/0x80 sysfs: cannot create duplicate filename '/class/dax/dax12.0' Call Trace: dump_stack+0x63/0x86 __warn+0xcb/0xf0 warn_slowpath_fmt+0x5a/0x80 ? kernfs_path_from_node+0x4f/0x60 sysfs_warn_dup+0x62/0x80 sysfs_do_create_link_sd.isra.2+0x97/0xb0 sysfs_create_link+0x25/0x40 device_add+0x266/0x630 devm_create_dax_dev+0x2cf/0x340 [dax] dax_pmem_probe+0x1f5/0x26e [dax_pmem] nvdimm_bus_probe+0x71/0x120 ...by reusing the namespace id for the device-dax instance name. Now that we have decided that there will never by more than one device-dax instance per libnvdimm-namespace parent device [1], we can directly reuse the namepace ids. There are some possible follow-on cleanups, but those are saved for a later patch to simplify the -stable backport. [1]: https://lists.01.org/pipermail/linux-nvdimm/2016-December/008266.html Fixes: 98a29c39dc68 ("libnvdimm, namespace: allow creation of multiple pmem...") Cc: Jeff Moyer Cc: Reported-by: Dariusz Dokupil Signed-off-by: Dan Williams drivers/dax/device-dax.h | 2 +- drivers/dax/device.c | 24 ++++++++++++++++-------- drivers/dax/pmem.c | 12 +++++++----- 3 files changed, 24 insertions(+), 14 deletions(-) commit 293b915fd9bebf33cdc906516fb28d54649a25ac Author: Oscar Campos Date: Tue Jul 18 17:20:36 2017 -0700 Input: trackpoint - assume 3 buttons when buttons detection fails Trackpoint buttons detection fails on ThinkPad 570 and 470 series, this makes the middle button of the trackpoint to not being recogized. As I don't believe there is any trackpoint with less than 3 buttons this patch just assumes three buttons when the extended button information read fails. Signed-off-by: Oscar Campos Acked-by: Peter Hutterer Signed-off-by: Dmitry Torokhov drivers/input/mouse/trackpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d31fd43c0f9a41e2678a1e78c0f22f0384c6edd3 Author: Carlo Caione Date: Fri Jul 14 10:23:56 2017 +0200 clk: x86: Do not gate clocks enabled by the firmware Read the enable register to determine if the clock is already in use by the firmware. In this case avoid gating the clock. Tested-by: Enric Balletbo i Serra Acked-by: Andy Shevchenko Acked-by: Darren Hart (VMware) Signed-off-by: Carlo Caione Fixes: 282a4e4ce5f9 ("platform/x86: Enable Atom PMC platform clocks") Signed-off-by: Stephen Boyd drivers/clk/x86/clk-pmc-atom.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7af608e4f9530372aec6e940552bf76595f2e265 Author: Tejun Heo Date: Tue Jul 18 17:57:46 2017 -0400 cgroup: create dfl_root files on subsys registration On subsystem registration, css_populate_dir() is not called on the new root css, so the interface files for the subsystem on cgrp_dfl_root aren't created on registration. This is a residue from the days when cgrp_dfl_root was used only as the parking spot for unused subsystems, which no longer is true as it's used as the root for cgroup2. This is often fine as later operations tend to create them as a part of mount (cgroup1) or subtree_control operations (cgroup2); however, it's not difficult to mount cgroup2 with the controller interface files missing as Waiman found out. Fix it by invoking css_populate_dir() on the root css on subsys registration. Signed-off-by: Tejun Heo Reported-and-tested-by: Waiman Long Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 4 ++++ 1 file changed, 4 insertions(+) commit f13343e87713959437a4a50a730de1736f23fc20 Author: Harvey Hunt Date: Tue Jul 18 14:25:46 2017 +0100 MIPS: ralink: mt7620: Add missing header Fix a build error caused by not including . The following compilation errors are caused by the missing header: arch/mips/ralink/mt7620.c: In function ‘mt7620_get_cpu_pll_rate’: arch/mips/ralink/mt7620.c:431:2: error: implicit declaration of function ‘WARN_ON’ [-Werror=implicit-function-declaration] WARN_ON(div >= ARRAY_SIZE(mt7620_clk_divider)); ^ arch/mips/ralink/mt7620.c: In function ‘mt7620_get_sys_rate’: arch/mips/ralink/mt7620.c:500:2: error: implicit declaration of function ‘WARN’ [-Werror=implicit-function-declaration] if (WARN(!div, "invalid divider for OCP ratio %u", ocp_ratio)) ^ arch/mips/ralink/mt7620.c: In function ‘mt7620_dram_init’: arch/mips/ralink/mt7620.c:619:3: error: implicit declaration of function ‘BUG’ [-Werror=implicit-function-declaration] BUG(); ^ cc1: some warnings being treated as errors scripts/Makefile.build:302: recipe for target 'arch/mips/ralink/mt7620.o' failed Signed-off-by: Harvey Hunt Cc: John Crispin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16781/ Signed-off-by: Ralf Baechle arch/mips/ralink/mt7620.c | 1 + 1 file changed, 1 insertion(+) commit e3ccf1d1dee5129beb839fe05c61eb134131bdd6 Author: Harvey Hunt Date: Tue Jul 18 14:25:45 2017 +0100 MIPS: ralink: Fix build error due to missing header Previously, was included before ralink_regs.h in all ralink files - leading to being implicitly included. After commit 26dd3e4ff9ac ("MIPS: Audit and remove any unnecessary uses of module.h") removed the inclusion of module.h from multiple places, some ralink platforms failed to build with the following error: In file included from arch/mips/ralink/mt7620.c:17:0: ./arch/mips/include/asm/mach-ralink/ralink_regs.h: In function ‘rt_sysc_w32’: ./arch/mips/include/asm/mach-ralink/ralink_regs.h:38:2: error: implicit declaration of function ‘__raw_writel’ [-Werror=implicit-function-declaration] __raw_writel(val, rt_sysc_membase + reg); ^ ./arch/mips/include/asm/mach-ralink/ralink_regs.h: In function ‘rt_sysc_r32’: ./arch/mips/include/asm/mach-ralink/ralink_regs.h:43:2: error: implicit declaration of function ‘__raw_readl’ [-Werror=implicit-function-declaration] return __raw_readl(rt_sysc_membase + reg); Fix this by including . Signed-off-by: Harvey Hunt Fixes: 26dd3e4ff9ac ("MIPS: Audit and remove any unnecessary uses of module.h") Cc: John Crispin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: #4.11+ Patchwork: https://patchwork.linux-mips.org/patch/16780/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-ralink/ralink_regs.h | 2 ++ 1 file changed, 2 insertions(+) commit 073dd5ad34b1d3aaadaa7e5e8cbe576d9545f163 Author: Dan Carpenter Date: Tue Jul 18 22:38:56 2017 +0300 netfilter: fix netfilter_net_init() return We accidentally return an uninitialized variable. Fixes: cf56c2f892a8 ("netfilter: remove old pre-netns era hook api") Signed-off-by: Dan Carpenter Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/netfilter/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit acc80c39929b9f2ff8b45fcfe103385a3e45c1a7 Author: Julia Lawall Date: Sat Jul 15 22:07:45 2017 +0200 irqchip/digicolor: Drop unnecessary static Drop static on a local variable, when the variable is initialized before any possible use. Thus, the static has no benefit. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; // Signed-off-by: Julia Lawall Signed-off-by: Thomas Gleixner Acked-by: Baruch Siach Cc: keescook@chromium.org Cc: Marc Zyngier Cc: kernel-janitors@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/1500149266-32357-11-git-send-email-Julia.Lawall@lip6.fr drivers/irqchip/irq-digicolor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82faeffa7e130e2ae43aa681a34c02d56dabd177 Author: Julia Lawall Date: Sat Jul 15 22:07:41 2017 +0200 irqchip/mips-cpu: Drop unnecessary static Drop static on a local variable, when the variable is initialized before any possible use. Thus, the static has no benefit. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; // Signed-off-by: Julia Lawall Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: kernel-janitors@vger.kernel.org Cc: keescook@chromium.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/1500149266-32357-7-git-send-email-Julia.Lawall@lip6.fr drivers/irqchip/irq-mips-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 512f9e790897e84d5b802436768508ee4628fc16 Author: Julia Lawall Date: Sat Jul 15 22:07:40 2017 +0200 irqchip/gic/realview: Drop unnecessary static Drop static on a local variable, when the variable is initialized before any possible use. Thus, the static has no benefit. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; // Signed-off-by: Julia Lawall Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: kernel-janitors@vger.kernel.org Cc: keescook@chromium.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/1500149266-32357-6-git-send-email-Julia.Lawall@lip6.fr drivers/irqchip/irq-gic-realview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f070e5ac9bc7de71c34402048ce5526dccbd347c Author: Ernesto A. Fernández Date: Wed Jul 12 06:55:35 2017 -0300 jfs: preserve i_mode if __jfs_set_acl() fails When changing a file's acl mask, __jfs_set_acl() will first set the group bits of i_mode to the value of the mask, and only then set the actual extended attribute representing the new acl. If the second part fails (due to lack of space, for example) and the file had no acl attribute to begin with, the system will from now on assume that the mask permission bits are actual group permission bits, potentially granting access to the wrong users. Prevent this by only changing the inode mode after the acl has been set. Signed-off-by: Ernesto A. Fernández Signed-off-by: Dave Kleikamp fs/jfs/acl.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 9bcf66c72d726322441ec82962994e69157613e4 Author: Jan Kara Date: Thu Jun 22 15:31:10 2017 +0200 jfs: Don't clear SGID when inheriting ACLs When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the owning group of 'DIR0'). However when 'DIR0' also has some default ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on 'DIR1' to get cleared if user is not member of the owning group. Fix the problem by moving posix_acl_update_mode() out of __jfs_set_acl() into jfs_set_acl(). That way the function will not be called when inheriting ACLs which is what we want as it prevents SGID bit clearing and the mode has been properly set by posix_acl_create() anyway. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: stable@vger.kernel.org CC: jfs-discussion@lists.sourceforge.net Signed-off-by: Jan Kara Signed-off-by: Dave Kleikamp fs/jfs/acl.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 3e16afd33f8fdad0a39586d670ade3cad67e1360 Merge: 0ddf3fb 36ac344 Author: David S. Miller Date: Tue Jul 18 12:01:39 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Missing netlink message sanity check in nfnetlink, patch from Mateusz Jurczyk. 2) We now have netfilter per-netns hooks, so let's kill global hook infrastructure, this infrastructure is known to be racy with netns. We don't care about out of tree modules. Patch from Florian Westphal. 3) find_appropriate_src() is buggy when colissions happens after the conversion of the nat bysource to rhashtable. Also from Florian. 4) Remove forward chain in nf_tables arp family, it's useless and it is causing quite a bit of confusion, from Florian Westphal. 5) nf_ct_remove_expect() is called with the wrong parameter, causing kernel oops, patch from Florian Westphal. ==================== Signed-off-by: David S. Miller commit 0ddf3fb2c43d2e65aee5de158ed694ea11ef229d Author: Paolo Abeni Date: Tue Jul 18 11:57:55 2017 +0200 udp: preserve skb->dst if required for IP options processing Eric noticed that in udp_recvmsg() we still need to access skb->dst while processing the IP options. Since commit 0a463c78d25b ("udp: avoid a cache miss on dequeue") skb->dst is no more available at recvmsg() time and bad things will happen if we enter the relevant code path. This commit address the issue, avoid clearing skb->dst if any IP options are present into the relevant skb. Since the IP CB is contained in the first skb cacheline, we can test it to decide to leverage the consume_stateless_skb() optimization, without measurable additional cost in the faster path. v1 -> v2: updated commit message tags Fixes: 0a463c78d25b ("udp: avoid a cache miss on dequeue") Reported-by: Andrey Konovalov Reported-by: Eric Dumazet Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/udp.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 74cbd96bc2e00f5daa805e2ebf49e998f7045062 Merge: bef85bd 6409e84 Author: Linus Torvalds Date: Tue Jul 18 11:51:08 2017 -0700 Merge tag 'md/4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: - raid5-ppl fix by Artur. This one is introduced in this release cycle. - raid5 reshape fix by Xiao. This is an old bug and will be added to stable. - bitmap fix by Guoqing. * tag 'md/4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: raid5-ppl: use BIOSET_NEED_BVECS when creating bioset Raid5 should update rdev->sectors after reshape md/bitmap: don't read page from device with Bitmap_sync commit 799f917233f6ed242ee9416bf80b14819f0c97f3 Author: Christophe Jaillet Date: Mon Jul 17 19:42:41 2017 +0200 atm: zatm: Fix an error handling path in 'zatm_init_one()' If 'dma_set_mask_and_coherent()' fails, we must undo the previous 'pci_request_regions()' call. Adjust corresponding 'goto' to jump at the right place of the error handling path. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/atm/zatm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc290a114fc6034b0f6a5a46e2fb7d54976cf87a Author: Rob Gardner Date: Mon Jul 17 09:22:27 2017 -0600 sparc64: Prevent perf from running during super critical sections This fixes another cause of random segfaults and bus errors that may occur while running perf with the callgraph option. Critical sections beginning with spin_lock_irqsave() raise the interrupt level to PIL_NORMAL_MAX (14) and intentionally do not block performance counter interrupts, which arrive at PIL_NMI (15). But some sections of code are "super critical" with respect to perf because the perf_callchain_user() path accesses user space and may cause TLB activity as well as faults as it unwinds the user stack. One particular critical section occurs in switch_mm: spin_lock_irqsave(&mm->context.lock, flags); ... load_secondary_context(mm); tsb_context_switch(mm); ... spin_unlock_irqrestore(&mm->context.lock, flags); If a perf interrupt arrives in between load_secondary_context() and tsb_context_switch(), then perf_callchain_user() could execute with the context ID of one process, but with an active TSB for a different process. When the user stack is accessed, it is very likely to incur a TLB miss, since the h/w context ID has been changed. The TLB will then be reloaded with a translation from the TSB for one process, but using a context ID for another process. This exposes memory from one process to another, and since it is a mapping for stack memory, this usually causes the new process to crash quickly. This super critical section needs more protection than is provided by spin_lock_irqsave() since perf interrupts must not be allowed in. Since __tsb_context_switch already goes through the trouble of disabling interrupts completely, we fix this by moving the secondary context load down into this better protected region. Orabug: 25577560 Signed-off-by: Dave Aldridge Signed-off-by: Rob Gardner Signed-off-by: David S. Miller arch/sparc/include/asm/mmu_context_64.h | 14 +++++++++----- arch/sparc/kernel/tsb.S | 12 ++++++++++++ arch/sparc/power/hibernate.c | 3 +-- 3 files changed, 22 insertions(+), 7 deletions(-) commit 18bcf2907df935981266532e1e0d052aff2e6fae Author: Alexander Potapenko Date: Mon Jul 17 12:35:58 2017 +0200 ipv4: ipv6: initialize treq->txhash in cookie_v[46]_check() KMSAN reported use of uninitialized memory in skb_set_hash_from_sk(), which originated from the TCP request socket created in cookie_v6_check(): ================================================================== BUG: KMSAN: use of uninitialized memory in tcp_transmit_skb+0xf77/0x3ec0 CPU: 1 PID: 2949 Comm: syz-execprog Not tainted 4.11.0-rc5+ #2931 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 TCP: request_sock_TCPv6: Possible SYN flooding on port 20028. Sending cookies. Check SNMP counters. Call Trace: __dump_stack lib/dump_stack.c:16 dump_stack+0x172/0x1c0 lib/dump_stack.c:52 kmsan_report+0x12a/0x180 mm/kmsan/kmsan.c:927 __msan_warning_32+0x61/0xb0 mm/kmsan/kmsan_instr.c:469 skb_set_hash_from_sk ./include/net/sock.h:2011 tcp_transmit_skb+0xf77/0x3ec0 net/ipv4/tcp_output.c:983 tcp_send_ack+0x75b/0x830 net/ipv4/tcp_output.c:3493 tcp_delack_timer_handler+0x9a6/0xb90 net/ipv4/tcp_timer.c:284 tcp_delack_timer+0x1b0/0x310 net/ipv4/tcp_timer.c:309 call_timer_fn+0x240/0x520 kernel/time/timer.c:1268 expire_timers kernel/time/timer.c:1307 __run_timers+0xc13/0xf10 kernel/time/timer.c:1601 run_timer_softirq+0x36/0xa0 kernel/time/timer.c:1614 __do_softirq+0x485/0x942 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 irq_exit+0x1fa/0x230 kernel/softirq.c:405 exiting_irq+0xe/0x10 ./arch/x86/include/asm/apic.h:657 smp_apic_timer_interrupt+0x5a/0x80 arch/x86/kernel/apic/apic.c:966 apic_timer_interrupt+0x86/0x90 arch/x86/entry/entry_64.S:489 RIP: 0010:native_restore_fl ./arch/x86/include/asm/irqflags.h:36 RIP: 0010:arch_local_irq_restore ./arch/x86/include/asm/irqflags.h:77 RIP: 0010:__msan_poison_alloca+0xed/0x120 mm/kmsan/kmsan_instr.c:440 RSP: 0018:ffff880024917cd8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10 RAX: 0000000000000246 RBX: ffff8800224c0000 RCX: 0000000000000005 RDX: 0000000000000004 RSI: ffff880000000000 RDI: ffffea0000b6d770 RBP: ffff880024917d58 R08: 0000000000000dd8 R09: 0000000000000004 R10: 0000160000000000 R11: 0000000000000000 R12: ffffffff85abf810 R13: ffff880024917dd8 R14: 0000000000000010 R15: ffffffff81cabde4 poll_select_copy_remaining+0xac/0x6b0 fs/select.c:293 SYSC_select+0x4b4/0x4e0 fs/select.c:653 SyS_select+0x76/0xa0 fs/select.c:634 entry_SYSCALL_64_fastpath+0x13/0x94 arch/x86/entry/entry_64.S:204 RIP: 0033:0x4597e7 RSP: 002b:000000c420037ee0 EFLAGS: 00000246 ORIG_RAX: 0000000000000017 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004597e7 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 000000c420037ef0 R08: 000000c420037ee0 R09: 0000000000000059 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000042dc20 R13: 00000000000000f3 R14: 0000000000000030 R15: 0000000000000003 chained origin: save_stack_trace+0x37/0x40 arch/x86/kernel/stacktrace.c:59 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:302 kmsan_save_stack mm/kmsan/kmsan.c:317 kmsan_internal_chain_origin+0x12a/0x1f0 mm/kmsan/kmsan.c:547 __msan_store_shadow_origin_4+0xac/0x110 mm/kmsan/kmsan_instr.c:259 tcp_create_openreq_child+0x709/0x1ae0 net/ipv4/tcp_minisocks.c:472 tcp_v6_syn_recv_sock+0x7eb/0x2a30 net/ipv6/tcp_ipv6.c:1103 tcp_get_cookie_sock+0x136/0x5f0 net/ipv4/syncookies.c:212 cookie_v6_check+0x17a9/0x1b50 net/ipv6/syncookies.c:245 tcp_v6_cookie_check net/ipv6/tcp_ipv6.c:989 tcp_v6_do_rcv+0xdd8/0x1c60 net/ipv6/tcp_ipv6.c:1298 tcp_v6_rcv+0x41a3/0x4f00 net/ipv6/tcp_ipv6.c:1487 ip6_input_finish+0x82f/0x1ee0 net/ipv6/ip6_input.c:279 NF_HOOK ./include/linux/netfilter.h:257 ip6_input+0x239/0x290 net/ipv6/ip6_input.c:322 dst_input ./include/net/dst.h:492 ip6_rcv_finish net/ipv6/ip6_input.c:69 NF_HOOK ./include/linux/netfilter.h:257 ipv6_rcv+0x1dbd/0x22e0 net/ipv6/ip6_input.c:203 __netif_receive_skb_core+0x2f6f/0x3a20 net/core/dev.c:4208 __netif_receive_skb net/core/dev.c:4246 process_backlog+0x667/0xba0 net/core/dev.c:4866 napi_poll net/core/dev.c:5268 net_rx_action+0xc95/0x1590 net/core/dev.c:5333 __do_softirq+0x485/0x942 kernel/softirq.c:284 origin: save_stack_trace+0x37/0x40 arch/x86/kernel/stacktrace.c:59 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:302 kmsan_internal_poison_shadow+0xb1/0x1a0 mm/kmsan/kmsan.c:198 kmsan_kmalloc+0x7f/0xe0 mm/kmsan/kmsan.c:337 kmem_cache_alloc+0x1c2/0x1e0 mm/slub.c:2766 reqsk_alloc ./include/net/request_sock.h:87 inet_reqsk_alloc+0xa4/0x5b0 net/ipv4/tcp_input.c:6200 cookie_v6_check+0x4f4/0x1b50 net/ipv6/syncookies.c:169 tcp_v6_cookie_check net/ipv6/tcp_ipv6.c:989 tcp_v6_do_rcv+0xdd8/0x1c60 net/ipv6/tcp_ipv6.c:1298 tcp_v6_rcv+0x41a3/0x4f00 net/ipv6/tcp_ipv6.c:1487 ip6_input_finish+0x82f/0x1ee0 net/ipv6/ip6_input.c:279 NF_HOOK ./include/linux/netfilter.h:257 ip6_input+0x239/0x290 net/ipv6/ip6_input.c:322 dst_input ./include/net/dst.h:492 ip6_rcv_finish net/ipv6/ip6_input.c:69 NF_HOOK ./include/linux/netfilter.h:257 ipv6_rcv+0x1dbd/0x22e0 net/ipv6/ip6_input.c:203 __netif_receive_skb_core+0x2f6f/0x3a20 net/core/dev.c:4208 __netif_receive_skb net/core/dev.c:4246 process_backlog+0x667/0xba0 net/core/dev.c:4866 napi_poll net/core/dev.c:5268 net_rx_action+0xc95/0x1590 net/core/dev.c:5333 __do_softirq+0x485/0x942 kernel/softirq.c:284 ================================================================== Similar error is reported for cookie_v4_check(). Fixes: 58d607d3e52f ("tcp: provide skb->hash to synack packets") Signed-off-by: Alexander Potapenko Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/syncookies.c | 1 + net/ipv6/syncookies.c | 1 + 2 files changed, 2 insertions(+) commit e5dadc65f9e0177eb649bcd9d333f1ebf871223e Author: Gao Feng Date: Mon Jul 17 18:34:42 2017 +0800 ppp: Fix false xmit recursion detect with two ppp devices The global percpu variable ppp_xmit_recursion is used to detect the ppp xmit recursion to avoid the deadlock, which is caused by one CPU tries to lock the xmit lock twice. But it would report false recursion when one CPU wants to send the skb from two different PPP devices, like one L2TP on the PPPoE. It is a normal case actually. Now use one percpu member of struct ppp instead of the gloable variable to detect the xmit recursion of one ppp device. Fixes: 55454a565836 ("ppp: avoid dealock on recursive xmit") Signed-off-by: Gao Feng Signed-off-by: Liu Jianying Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit bef85bd7db2669291e33c59875fae33d24c11da3 Merge: 15b0a8d ebc9ca4 Author: Linus Torvalds Date: Tue Jul 18 11:16:40 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "First set of -rc fixes for 4.13 cycle: - misc iSER fixes - namespace fixups - fix the fact that IPoIB didn't use the proper API for noio mem allocs - rxe driver fixes - hns_roce fixes - misc core fixes - misc IPoIB fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (27 commits) IB/core: Allow QP state transition from reset to error IB/hns: Fix for checkpatch.pl comment style warnings IB/hns: Fix the bug with modifying the MAC address without removing the driver IB/hns: Fix the bug with rdma operation IB/hns: Fix the bug with wild pointer when destroy rc qp IB/hns: Fix the bug of polling cq failed for loopback Qps IB/rxe: Set dma_mask and coherent_dma_mask IB/rxe: Fix kernel panic from skb destructor IB/ipoib: Let lower driver handle get_stats64 call IB/core: Add ordered workqueue for RoCE GID management IB/mlx5: Clean mr_cache debugfs in case of failure IB/core: Remove NOIO QP create flag {net, IB}/mlx4: Remove gfp flags argument IB/{rdmavt, qib, hfi1}: Remove gfp flags argument IB/IPoIB: Convert IPoIB to memalloc_noio_* calls IB/IPoIB: Forward MTU change to driver below IB: Convert msleep below 20ms to usleep_range IB/uverbs: Make use of ib_modify_qp variant to avoid resolving DMAC IB/core: Introduce modify QP operation with udata IB/core: Don't resolve IP address to the loopback device ... commit 15b0a8d1d45a116cbd03d41fd066285ac8ecd3b4 Merge: cb8c65c eff7936 Author: Linus Torvalds Date: Tue Jul 18 11:11:13 2017 -0700 Merge tag 'nfsd-4.13-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fix from Bruce Fields: "One fix for a problem introduced in the most recent merge window and found by Dave Jones and KASAN" * tag 'nfsd-4.13-1' of git://linux-nfs.org/~bfields/linux: nfsd: Fix a memory scribble in the callback channel commit 84969465ddc4f8aeb3b993123b571aa01c5f2683 Author: Jan Kara Date: Wed Jun 21 15:02:47 2017 +0200 hfsplus: Don't clear SGID when inheriting ACLs When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the owning group of 'DIR0'). However when 'DIR0' also has some default ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on 'DIR1' to get cleared if user is not member of the owning group. Fix the problem by creating __hfsplus_set_posix_acl() function that does not call posix_acl_update_mode() and use it when inheriting ACLs. That prevents SGID bit clearing and the mode has been properly set by posix_acl_create() anyway. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: stable@vger.kernel.org Signed-off-by: Jan Kara fs/hfsplus/posix_acl.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 579c183e4fe01d493f2efef8a335a9607376f754 Author: Thomas Petazzoni Date: Tue Jul 18 15:10:32 2017 +0200 arm64: dts: marvell: use ICU for the CP110 slave RTC When the conversion of the Marvell CP110 Device Tree description from using GIC interrupts to using ICU interrupts was done, the RTC on the slave CP110 was left unchanged. This commit fixes that, so that all devices on the CP properly get their interrupt through the ICU. Fixes: 6ef84a827c375 ("arm64: dts: marvell: enable GICP and ICU on Armada 7K/8K") Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 781001ff9678e5df048cca3d4290c1638a28cafa Author: Yoshihiro Shimoda Date: Tue Jul 18 21:26:42 2017 +0900 usb: gadget: udc: renesas_usb3: protect usb3_ep->started in usb3_start_pipen() This patch fixes an issue that unexpected behavior happens when both the interrupt handler and renesas_usb3_ep_enable() are called. In this case, since usb3_start_pipen() checked the usb3_ep->started, but the flags was not protected. So, this patch protects the flag by usb3->lock. Since renesas_usb3_ep_enable() for EP0 will be not called, this patch doesn't take care of usb3_start_pipe0(). Reviewed-by: Geert Uytterhoeven Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ebe6b2b81464a2c083542feb1a1a6c78a2268151 Author: Yoshihiro Shimoda Date: Tue Jul 18 21:26:41 2017 +0900 usb: gadget: udc: renesas_usb3: fix zlp transfer by the dmac The dedicated dmac can transfer a zero-length-packet (zlp) if some bits of the USB_COM_CON register. However, the commit 2d4aa21a73ba ("usb: gadget: udc: renesas_usb3: add support for dedicated DMAC") didn't set the bits to 1. So, this patch fixes it. Fixes: 2d4aa21a73b ("usb: gadget: udc: renesas_usb3: add support for dedicated DMAC) Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 80584efcc6bc99871433cc5b8f639cc0154962ea Author: Yoshihiro Shimoda Date: Tue Jul 18 21:26:40 2017 +0900 usb: gadget: udc: renesas_usb3: fix free size in renesas_usb3_dma_free_prd() The commit 2d4aa21a73ba ("usb: gadget: udc: renesas_usb3: add support for dedicated DMAC") has a bug in the renesas_usb3_dma_free_prd(). The size of dma_free_coherent() should be the same with dma_alloc_coherent() Otherwise, this code causes a WARNING by mm/page_alloc.c when renesas_usb3_dma_free_prd() is called. So, this patch fixes it. Fixes: 2d4aa21a73ba ("usb: gadget: udc: renesas_usb3: add support for dedicated DMAC") Reviewed-by: Geert Uytterhoeven Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc853e26f73e903e0c87e24f2695b5dcf33b3bc1 Author: Jiri Olsa Date: Fri Jul 14 18:35:51 2017 +0200 perf/x86/intel: Fix debug_store reset field for freq events There's a bug in PEBs event enabling code, that prevents PEBS freq events to work properly after non freq PEBS event was run. freq events - perf_event_attr::freq set -F option of perf record PEBS events - perf_event_attr::precise_ip > 0 default for perf record Like in following example with CPU 0 busy, we expect ~10000 samples for following perf tool run: # perf record -F 10000 -C 0 sleep 1 [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.640 MB perf.data (10031 samples) ] Everything's fine, but once we run non freq PEBS event like: # perf record -c 10000 -C 0 sleep 1 [ perf record: Woken up 4 times to write data ] [ perf record: Captured and wrote 1.053 MB perf.data (20061 samples) ] the freq events start to fail like this: # perf record -F 10000 -C 0 sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.185 MB perf.data (40 samples) ] The issue is in non freq PEBs event initialization of debug_store reset field, which value is used to auto-reload the counter value after PEBS event drain. This value is not being used for PEBS freq events, but once we run non freq event it stays in debug_store data and screws the sample_freq counting for PEBS freq events. Setting the reset field to 0 for freq events. Signed-off-by: Jiri Olsa Acked-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170714163551.19459-1-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 2 ++ 1 file changed, 2 insertions(+) commit dd0b06b551f6b14da19582e301814746d838965a Author: Kan Liang Date: Wed Jul 12 09:44:23 2017 -0400 perf/x86/intel: Add Goldmont Plus CPU PMU support Add perf core PMU support for Intel Goldmont Plus CPU cores: - The init code is based on Goldmont. - There is a new cache event list, based on the Goldmont cache event list. - All four general-purpose performance counters support PEBS. - The first general-purpose performance counter is for reduced skid PEBS mechanism. Using :ppp to indicate the event which want to do reduced skid PEBS. - Goldmont Plus has 4-wide pipeline for Topdown Signed-off-by: Kan Liang Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Link: http://lkml.kernel.org/r/20170712134423.17766-1-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 158 +++++++++++++++++++++++++++++++++++++++++++ arch/x86/events/intel/ds.c | 6 ++ arch/x86/events/perf_event.h | 2 + 3 files changed, 166 insertions(+) commit 5c10b048c37cc08a21fa97a0575eccf4948948ca Author: Harry Pan Date: Mon Jul 17 18:37:49 2017 +0800 perf/x86/intel: Enable C-state residency events for Apollo Lake Goldmont microarchitecture supports C1/C3/C6, PC2/PC3/PC6/PC10 state residency counters, the patch enables them for Apollo Lake platform. The MSR information is based on Intel Software Developers' Manual, Vol. 4, Order No. 335592, Table 2-6 and 2-12. Signed-off-by: Harry Pan Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: bp@suse.de Cc: davidcc@google.com Cc: gs0622@gmail.com Cc: lukasz.odzioba@intel.com Cc: piotr.luc@intel.com Cc: srinivas.pandruvada@linux.intel.com Link: http://lkml.kernel.org/r/20170717103749.24337-1-harry.pan@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cstate.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 34363c057b368114d8b93376ec6b65ef5f36a55b Author: Jan Kara Date: Tue Jul 18 12:27:56 2017 +0200 isofs: Fix off-by-one in 'session' mount option parsing According to ECMA-130 standard maximum valid track number is 99. Since 'session' mount option starts indexing at 0 (and we add 1 to the passed number), we should refuse value 99. Also the condition in isofs_get_last_session() unnecessarily repeats the check - remove it. Reported-by: David Howells Signed-off-by: Jan Kara fs/isofs/inode.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 610e1ae9b533be82b3aa118b907e0a703256913d Author: Andy Shevchenko Date: Sun Jul 16 21:40:03 2017 +0300 ALSA: fm801: Initialize chip after IRQ handler is registered The commit b56fa687e02b ("ALSA: fm801: detect FM-only card earlier") rearranged initialization calls, i.e. it makes snd_fm801_chip_init() to be called before we register interrupt handler and set PCI bus mastering. Somehow it prevents FM801-AU to work properly. Thus, partially revert initialization order changed by commit mentioned above. Fixes: b56fa687e02b ("ALSA: fm801: detect FM-only card earlier") Reported-by: Émeric MASCHINO Tested-by: Émeric MASCHINO Signed-off-by: Andy Shevchenko Cc: # v4.5+ Signed-off-by: Takashi Iwai sound/pci/fm801.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 029d9252b116fa52a95150819e62af1f6e420fe5 Author: Michael Ellerman Date: Fri Jul 14 16:51:23 2017 +1000 powerpc/mm: Mark __init memory no-execute when STRICT_KERNEL_RWX=y Currently even with STRICT_KERNEL_RWX we leave the __init text marked executable after init, which is bad. Add a hook to mark it NX (no-execute) before we free it, and implement it for radix and hash. Note that we use __init_end as the end address, not _einittext, because overlaps_kernel_text() uses __init_end, because there are additional executable sections other than .init.text between __init_begin and __init_end. Tested on radix and hash with: 0:mon> p $__init_begin *** 400 exception occurred Fixes: 1e0fc9d1eb2b ("powerpc/Kconfig: Enable STRICT_KERNEL_RWX for some configs") Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/powerpc/include/asm/book3s/64/pgtable.h | 1 + arch/powerpc/include/asm/book3s/64/radix.h | 1 + arch/powerpc/include/asm/pgtable.h | 7 +++++++ arch/powerpc/mm/mem.c | 1 + arch/powerpc/mm/pgtable-hash64.c | 12 ++++++++++++ arch/powerpc/mm/pgtable-radix.c | 8 ++++++++ arch/powerpc/mm/pgtable_64.c | 8 ++++++++ 8 files changed, 39 insertions(+) commit 8d4514173211586c6238629b1ef1e071927735f5 Author: Gregory CLEMENT Date: Wed Jul 12 13:23:11 2017 +0200 ARM: dts: armada-38x: Fix irq type for pca955 As written in the datasheet the PCA955 can only handle low level irq and not edge irq. Without this fix the interrupt is not usable for pca955: the gpio-pca953x driver already set the irq type as low level which is incompatible with edge type, then the kernel prevents using the interrupt: "irq: type mismatch, failed to map hwirq-18 for /soc/internal-regs/gpio@18100!" Fixes: 928413bd859c ("ARM: mvebu: Add Armada 388 General Purpose Development Board support") Cc: stable@vger.kernel.org Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-gp.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76127d6fe00062bddb25515d8a4f44633c41fe14 Author: Gregory CLEMENT Date: Fri Jul 7 09:59:28 2017 +0200 ARM: mvebu: use __pa_symbol in the mv98dx3236 platform SMP code As we already did for Armada XP switch from virt_to_phys() to __pa_symbol(). The reason for it was well explained by Mark Rutland so let's quote him: "virt_to_phys() is intended to operate on the linear/direct mapping of RAM. __pa_symbol() is intended to operate on the kernel mapping, which may not be in the linear/direct mapping on all architectures. e.g. arm64 and x86_64 map the kernel image and RAM separately. On 32-bit ARM the kernel image mapping is tied to the linear/direct mapping, so that works, but as it's semantically wrong (and broken for generic code), the DEBUG_VIRTUAL checks complain." Fixes: db88977894ab ("arm: mvebu: support for SMP on 98DX3336 SoC") Cc: Reviewed-by: Florian Fainelli Tested-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm/mach-mvebu/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcea8aed91f53b51f9b943dc01f12d8aa666c720 Author: Ernesto A. Fernández Date: Mon Jul 17 18:42:41 2017 +0200 reiserfs: preserve i_mode if __reiserfs_set_acl() fails When changing a file's acl mask, reiserfs_set_acl() will first set the group bits of i_mode to the value of the mask, and only then set the actual extended attribute representing the new acl. If the second part fails (due to lack of space, for example) and the file had no acl attribute to begin with, the system will from now on assume that the mask permission bits are actual group permission bits, potentially granting access to the wrong users. Prevent this by only changing the inode mode after the acl has been set. Signed-off-by: Ernesto A. Fernández Signed-off-by: Jan Kara fs/reiserfs/xattr_acl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit fe26569eb9197d845d73abe7dd20f603d79eb031 Author: Ernesto A. Fernández Date: Wed Jul 12 06:54:19 2017 -0300 ext2: preserve i_mode if ext2_set_acl() fails When changing a file's acl mask, ext2_set_acl() will first set the group bits of i_mode to the value of the mask, and only then set the actual extended attribute representing the new acl. If the second part fails (due to lack of space, for example) and the file had no acl attribute to begin with, the system will from now on assume that the mask permission bits are actual group permission bits, potentially granting access to the wrong users. Prevent this by only changing the inode mode after the acl has been set. [JK: Rebased on top of "ext2: Don't clear SGID when inheriting ACLs"] Signed-off-by: Ernesto A. Fernández Signed-off-by: Jan Kara fs/ext2/acl.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 41cdf7a45389e01991ee31e3301ed83cb3e3f7dc Author: Herbert Xu Date: Mon Jul 17 15:32:30 2017 +0800 crypto: authencesn - Fix digest_null crash When authencesn is used together with digest_null a crash will occur on the decrypt path. This is because normally we perform a special setup to preserve the ESN, but this is skipped if there is no authentication. However, on the post-authentication path it always expects the preservation to be in place, thus causing a crash when digest_null is used. This patch fixes this by also skipping the post-processing when there is no authentication. Fixes: 104880a6b470 ("crypto: authencesn - Convert to new AEAD...") Cc: Reported-by: Jan Tluka Signed-off-by: Herbert Xu crypto/authencesn.c | 5 +++++ 1 file changed, 5 insertions(+) commit efc856edfd66acc5da34fec92d7feca6fd0f9add Author: raveendra padasalagi Date: Tue Jul 11 15:50:06 2017 +0530 crypto: brcm - remove BCM_PDC_MBOX dependency in Kconfig SPU driver is dependent on generic MAILBOX API's to communicate with underlying DMA engine driver. So this patch removes BCM_PDC_MBOX "depends on" for SPU driver in Kconfig and adds MAILBOX as dependent module. Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver") Signed-off-by: Raveendra Padasalagi Reviewed-by: Ray Jui Reviewed-by: Scott Branden Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6eb8844bf4bea2ec05155ecd3bd78df7010dce94 Author: Antoine Ténart Date: Fri Jun 23 16:52:18 2017 +0200 Documentation/bindings: crypto: remove the dma-mask property The dma-mask property is broken and was removed in the device trees having a safexcel-eip197 node and in the safexcel cryptographic driver. This patch removes the dma-mask property from the documentation as well. Signed-off-by: Antoine Tenart Acked-by: Arnd Bergmann Signed-off-by: Herbert Xu Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt | 2 -- 1 file changed, 2 deletions(-) commit a2069aacbe58a8408a5bb0e0a722e1726456519b Author: Antoine Ténart Date: Fri Jun 23 16:05:25 2017 +0200 crypto: inside-secure - do not parse the dma mask from dt Remove the dma mask parsing from dt as this should not be encoded into the engine device tree node. Keep the fallback value for now, which should work for the boards already supported upstream. Signed-off-by: Antoine Tenart Acked-by: Arnd Bergmann Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 440bf347569b5f05db1836b1d6b5160a3c4e11d9 Author: Srikanth Jampala Date: Fri Jun 23 16:03:51 2017 +0530 crypto: cavium/nitrox - Change in firmware path. Moved the firmware to "cavium" subdirectory as suggested by Kyle McMartin. Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu drivers/crypto/cavium/nitrox/nitrox_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a7e6e5d8b221e57fed9fda6ec81153fda773c073 Author: raveendra padasalagi Date: Fri Jun 23 14:34:08 2017 +0530 crypto: brcm - Fix SHA3-512 algorithm failure In Broadcom SPU driver, due to missing break statement in spu2_hash_xlate() while mapping SPU2 equivalent SHA3-512 value, -EINVAL is chosen and hence leading to failure of SHA3-512 algorithm. This patch fixes the same. Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver") Signed-off-by: Raveendra Padasalagi Reviewed-by: Ray Jui Reviewed-by: Scott Branden Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu drivers/crypto/bcm/spu2.c | 1 + 1 file changed, 1 insertion(+) commit fa7f9189e017213bad63b93a76de5c715cd62a96 Author: Michael Ellerman Date: Fri Jul 14 16:51:22 2017 +1000 powerpc/mm/hash: Refactor hash__mark_rodata_ro() Move the core logic into a helper, so we can use it for changing other permissions. We also change the logic to align start down, and end up. This means calling the function with a range will expand that range to be at least 1 mmu_linear_psize page in size. We need that so we can use it on __init_begin ... __init_end which is not a full page in size. This should always work for _stext/__init_begin, because we align __init_begin to _stext + 16M in the linker script. Signed-off-by: Michael Ellerman Reviewed-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-hash64.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit b134bd90286dc9f2952c35a91ab405474ca9374c Author: Michael Ellerman Date: Fri Jul 14 16:51:21 2017 +1000 powerpc/mm/radix: Refactor radix__mark_rodata_ro() Move the core logic into a helper, so we can use it for changing permissions other than _PAGE_WRITE. Signed-off-by: Michael Ellerman Reviewed-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 4c07f9046e48c3126978911239e20a5622ad0ad6 Author: Roman Kagan Date: Mon Jul 17 12:49:07 2017 +0300 x86/mm, KVM: Fix warning when !CONFIG_PREEMPT_COUNT A recent commit: d6e41f1151fe ("x86/mm, KVM: Teach KVM's VMX code that CR3 isn't a constant") introduced a VM_WARN_ON(!in_atomic()) which generates false positives on every VM entry on !CONFIG_PREEMPT_COUNT kernels. Replace it with a test for preemptible(), which appears to match the original intent and works across different CONFIG_PREEMPT* variations. Signed-off-by: Roman Kagan Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Rik van Riel Cc: Thomas Gleixner Cc: kvm@vger.kernel.org Cc: linux-mm@kvack.org Fixes: d6e41f1151fe ("x86/mm, KVM: Teach KVM's VMX code that CR3 isn't a constant") Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddac9c5bfa75029ed4b58e81d8d3c49694598ff6 Author: Matt Redfearn Date: Tue Jul 18 08:39:21 2017 +0100 irqchip/mips-gic: Remove population of irq domain names Since commit d59f6617eef0f ("genirq: Allow fwnode to carry name information only") the irqdomain core sets the names of irq domains. When the name is allocated the new IRQ_DOMAIN_NAME_ALLOCATED flag is set. Replacing the allocated name with a constant one is not a good idea, since calling the new irq_domain_update_bus_token() API, added to the MIPS GIC driver by commit 96f0d93a487e1 ("irqchip/MSI: Use irq_domain_update_bus_token instead of an open coded access") will attempt to kfree the pointer, and result in a kernel OOPS. Fix this by removing the names, now that they are set by the irqdomain core. This effectively reverts commit 21c57fd13589 ("irqchip/mips-gic: Populate irq_domain names"). Fixes: d59f6617eef0f ("genirq: Allow fwnode to carry name information only") Signed-off-by: Matt Redfearn Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/1500363561-32213-1-git-send-email-matt.redfearn@imgtec.com drivers/irqchip/irq-mips-gic.c | 2 -- 1 file changed, 2 deletions(-) commit 5a1d4c5dd4eb2f1f8a9b30e61762f3b3b564df70 Author: Michael Gugino Date: Mon Jul 17 13:29:09 2017 -0400 staging: rtl8188eu: add TL-WN722N v2 support Add support for USB Device TP-Link TL-WN722N v2. VendorID: 0x2357, ProductID: 0x010c Signed-off-by: Michael Gugino Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 + 1 file changed, 1 insertion(+) commit e23a9b439ce9bd9cbd3d92e4c15db086d3e11410 Author: Okash Khawaja Date: Sun Jul 16 17:18:26 2017 +0100 staging: speakup: safely register and unregister ldisc This patch makes use of functions added in the previous patch. It registers ldisc during init of main speakup module and unregisters it during exit. It also removes the code to register ldisc every time a synth module is loaded. This way we only register the ldisc once when main speakup module is loaded. Since main speakup module is required by all synth modules, it is only unloaded when all synths have been unloaded. Therefore we unregister the ldisc once, when all speakup related references to the ldisc have returned. In unlikely scenario of something outside speakup using the ldisc, the ldisc refcount check in tty_unregister_ldisc will ensure that it is not unregistered while in use. The function to register ldisc doesn't cause speakup init function to fail. That is different from current behaviour where failure to register ldisc results in failure to load the specific synth module. This is because speakup module is also required by those synths which don't use tty and ldisc. We don't want to prevent those modules from loading when ldisc fails to register. The synth modules will correctly fail when trying to set N_SPEAKUP to tty, if ldisc registrationi had failed. Signed-off-by: Okash Khawaja Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 ++ drivers/staging/speakup/spk_ttyio.c | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) commit 9f8dced2085c33a633d2f0a1abbf13ff5a7ed8c9 Author: Okash Khawaja Date: Sun Jul 16 17:18:25 2017 +0100 staging: speakup: add functions to register and unregister ldisc This patch adds the above two functions and makes them available to main.c where they will be called during init and exit functions of main speakup module. Following patch will make use of them. Signed-off-by: Okash Khawaja Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_priv.h | 2 ++ drivers/staging/speakup/spk_ttyio.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) commit 216ce2962089b6218708bf87d96e6b1fbadba1d7 Author: Okash Khawaja Date: Sun Jul 16 10:28:21 2017 +0100 staging: speakup: safely close tty Speakup opens tty using tty_open_by_driver. When closing, it calls tty_ldisc_release but doesn't close and remove the tty itself. As a result, that tty cannot be opened from user space. This patch calls tty_release_struct which ensures that tty is safely removed and freed up. It also calls tty_ldisc_release, so speakup doesn't need to call it. Signed-off-by: Okash Khawaja Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 740c433ec35187b45abe08bb6c45a321a791be8e Author: Teddy Wang Date: Fri Jun 30 21:57:43 2017 +0100 staging: sm750fb: avoid conflicting vesafb If vesafb is enabled in the config then /dev/fb0 is created by vesa and this sm750 driver gets fb1, fb2. But we need to be fb0 and fb1 to effectively work with xorg. So if it has been alloted fb1, then try to remove the other fb0. In the previous send, why #ifdef is used was asked. https://lkml.org/lkml/2017/6/25/57 Answered at: https://lkml.org/lkml/2017/6/25/69 Also pasting here for reference. 'Did a quick research into "why". The patch d8801e4df91e ("x86/PCI: Set IORESOURCE_ROM_SHADOW only for the default VGA device") has started setting IORESOURCE_ROM_SHADOW in flags for a default VGA device and that is being done only for x86. And so, we will need that #ifdef to check IORESOURCE_ROM_SHADOW as that needs to be checked only for a x86 and not for other arch.' Cc: # v4.4+ Signed-off-by: Teddy Wang Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 76fc0cfcc5b0f520062ca6d7225b224d4a8aa828 Author: Nicholas Piggin Date: Tue Jul 18 15:32:44 2017 +1000 powerpc/64s: Fix hypercall entry clobbering r12 input A previous optimisation incorrectly assumed the PAPR hcall does not use r12, and clobbers it upon entry. In fact it is used as an input. This can result in KVM guests crashing (observed with PR KVM). Instead of using r12 to save r13, tihs patch saves r13 in ctr. This is more costly, but not as slow as using the SPRG. Fixes: acd7d8cef0153 ("powerpc/64s: Optimize hypercall/syscall entry") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 8046306fb9dedf216fc37a7dadc0e35ce37e9567 Author: Arvind Yadav Date: Sat Jul 15 12:44:53 2017 +0530 drm/vmwgfx: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 13765 800 20 14585 38f9 gpu/drm/vmwgfx/vmwgfx_drv.o File size After adding 'const': text data bss dec hex filename 13829 736 20 14585 38f9 gpu/drm/vmwgfx/vmwgfx_drv.o Signed-off-by: Arvind Yadav Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcfffdd8f98ac305285dca568b5065ef86be6458 Author: Sinclair Yeh Date: Mon Jul 17 23:28:36 2017 -0700 drm/vmwgfx: Fix gcc-7.1.1 warning The current code does not look correct, and the reason for it is probably lost. Since this now generates a compiler warning, fix it to what makes sense. Cc: Reported-by: Arnd Bergmann Reported-by: Linus Torvalds Signed-off-by: Sinclair Yeh Reviewed-by: Brian Paul drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14979adb0294f04cf6fbbb81555acff9ec1e7c9c Author: Sinclair Yeh Date: Mon Jul 17 23:26:21 2017 -0700 drm/vmwgfx: Fix cursor hotspot issue with Wayland on Fedora Parts of commit <8fbf9d92a7bc> (“drm/vmwgfx: Implement the cursor_set2 callback v2”) were not moved over when we started atomic mode set development because at that time the DRM did not support cursor hotspots in the fb struct. This patch fixes what was not moved over. Signed-off-by: Sinclair Yeh Reviewed-by: Brian Paul Tested-by: Brian Paul drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7b009e76797c82178d7a03ae0eaad5951d975277 Author: Sinclair Yeh Date: Mon Jul 17 07:49:22 2017 -0700 drm/vmwgfx: Limit max desktop dimensions to 8Kx8K This was originally chosen to be an arbitrarily large number. However, some user mode may actually try to set a 16Kx16K mode and run into other issues. Since 8Kx8K is the current texture limit for Mesa LLVM driver, we will just use this limit for now. Cc: # 4.12.x Signed-off-by: Sinclair Yeh Reviewed-by: Brian Paul drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9036f8c7cf42af2c0d50e8bbc493323239a30423 Author: Arvind Yadav Date: Mon Jul 17 07:39:53 2017 -0700 drm/vmwgfx: dma-buf: Constify ttm_place structures. ttm_place are not supposed to change at runtime. All functions working with ttm_place provided by work with const ttm_place. So mark the non-const structs as const. File size before: text data bss dec hex filename 3172 796 16 3984 f90 drivers/gpu/drm/vmwgfx/vmwgfx_buffer.o File size After adding 'const': text data bss dec hex filename 3456 512 16 3984 f90 drivers/gpu/drm/vmwgfx/vmwgfx_buffer.o Signed-off-by: Arvind Yadav Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 8bd6287ffdb95a623bdbad37e49d1c12c60970ed Author: Brian Paul Date: Mon Jul 17 07:36:10 2017 -0700 drm/vmwgfx: fix comment mistake for vmw_cmd_dx_set_index_buffer() Comment fix. Signed-off-by: Brian Paul Reviewed-by: Neha Bhende drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a02f6da66557bab10271fa5017aff29fa647e830 Author: Souptick Joarder Date: Fri Dec 2 01:25:45 2016 +0530 drm/vmwgfx: Use dma_pool_zalloc We should use dma_pool_zalloc instead of dma_pool_alloc/memset Signed-off-by: Souptick joarder Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d7f482313322892b28f3c14958177cd15c6a113d Author: Christophe JAILLET Date: Tue Nov 29 07:49:19 2016 +0100 drm/vmwgfx: Fix handling of errors returned by 'vmw_cotable_alloc()' 'vmw_cotable_alloc()' returns an error pointer on error, not NULL. Propagate the error code, instead of returning -ENOMEM unconditionally Signed-off-by: Christophe JAILLET Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1a4adb05632e902c9819af7c5eeded5243f1dc6c Author: Ravikant B Sharma Date: Tue Nov 8 17:30:31 2016 +0530 drm/vmwgfx: Fix NULL pointer comparison Replace direct comparisons to NULL i.e. 'x == NULL' with '!x'. As per coding standard. Signed-off-by: Ravikant B Sharma Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 10 +++++----- drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_shader.c | 6 +++--- 11 files changed, 26 insertions(+), 26 deletions(-) commit 566e1ce22e04426fa52328b2adcdf1df49acd98e Author: Arnd Bergmann Date: Sat Jul 15 11:32:08 2017 -0400 staging: lustre: ko2iblnd: check copy_from_iter/copy_to_iter return code We now get a helpful warning for code that calls copy_{from,to}_iter without checking the return value, introduced by commit aa28de275a24 ("iov_iter/hardening: move object size checks to inlined part"). drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_send': drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1643:2: error: ignoring return value of 'copy_from_iter', declared with attribute warn_unused_result [-Werror=unused-result] drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_recv': drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1744:3: error: ignoring return value of 'copy_to_iter', declared with attribute warn_unused_result [-Werror=unused-result] In case we get short copies here, we may get incorrect behavior. I've added failure handling for both rx and tx now, returning -EFAULT as expected. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 14e1d56cbea6c02d29da945741a35c7e90a86e17 Author: Ruslan Bilovol Date: Sun Jun 25 16:23:47 2017 +0300 usb: gadget: f_uac2: endianness fixes. As per USB spec, multiple-bytes fields are stored in little-endian order. Use CPU<->LE helpers for such fields. Signed-off-by: Ruslan Bilovol Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_uac2.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 42370b821168e6730ec4c7d988aeadc1260c7b4d Author: Ruslan Bilovol Date: Sun Jun 25 16:23:46 2017 +0300 usb: gadget: f_uac1: endianness fixes. As per USB spec, multiple-bytes fields are stored in little-endian order. Use CPU<->LE helpers for such fields. Signed-off-by: Ruslan Bilovol Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_uac1.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8bd226f9a7dc18740a916dcba3112f2bfc3ad9e8 Author: Ruslan Bilovol Date: Sun Jun 25 16:23:45 2017 +0300 include: usb: audio: specify exact endiannes of descriptors USB spec says that multiple byte fields are stored in little-endian order (see chapter 8.1 of USB2.0 spec and chapter 7.1 of USB3.0 spec), thus mark such fields as LE for UAC1 and UAC2 headers Signed-off-by: Ruslan Bilovol Signed-off-by: Felipe Balbi include/linux/usb/audio-v2.h | 14 +++++++------- include/uapi/linux/usb/audio.h | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) commit ab1d53d598be211968c5b4eeee4c5b67d6e21602 Author: kbuild test robot Date: Fri Jun 23 19:20:21 2017 +0800 usb: gadget: udc: start_udc() can be static Fixes the following Sparse warnings: >> drivers/usb/gadget/udc/snps_udc_plat.c:31:6: sparse: symbol 'start_udc' was not declared. Should it be static? >> drivers/usb/gadget/udc/snps_udc_plat.c:41:6: sparse: symbol 'stop_udc' was not declared. Should it be static? >> drivers/usb/gadget/udc/snps_udc_plat.c:79:6: sparse: symbol 'udc_drd_work' was not declared. Should it be static? Signed-off-by: Fengguang Wu Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/snps_udc_plat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 307bc11fcdf9f911a1adacf9e77fe1c490041ee3 Author: Minas Harutyunyan Date: Tue Jul 11 14:25:13 2017 +0400 usb: dwc2: gadget: On USB RESET reset device address to zero Reseted DEVADDR field in DCFG to zero on USB RESET. Device address in DCFG register does not reset to zero, which required to pass enumeration, after disconnect and reconnect. Acked-by: John Youn Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 3 +++ 1 file changed, 3 insertions(+) commit 14074aba4bcda3764c9a702b276308b89901d5b6 Author: Johannes Thumshirn Date: Mon Jul 17 15:11:42 2017 +0200 scsi: sg: fix static checker warning in sg_is_valid_dxfer dxfer_len is an unsigned int and we always assign a value > 0 to it, so it doesn't make any sense to check if it is < 0. We can't really check dxferp as well as we have both NULL and not NULL cases in the possible call paths. So just return true for SG_DXFER_FROM_DEV transfer in sg_is_valid_dxfer(). Signed-off-by: Johannes Thumshirn Reported-by: Colin Ian King Reported-by: Dan Carpenter Cc: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit eeee4107546ef24c739d72645899e50fa693e9ff Author: Yadan Fan Date: Fri Jun 23 17:40:06 2017 +0800 scsi: smartpqi: limit transfer length to 1MB The smartpqi firmware will bypass the cache for any request larger than 1MB, so we should cap the request size to avoid any performance degradation in kernels later than v4.3 This degradation is caused from d2be537c3ba3568acd79cd178327b842e60d035e, which changed max_sectors_kb to 1280k, but the hardware is able to work fine with it, so the true fix should be from smartpqi driver. Signed-off-by: Yadan Fan Reviewed-by: Johannes Thumshirn Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2c7b433f729cedb32514480af8cbdf2fe5cf264 Author: Yadan Fan Date: Fri Jun 23 17:40:05 2017 +0800 scsi: hpsa: limit transfer length to 1MB The hpsa firmware will bypass the cache for any request larger than 1MB, so we should cap the request size to avoid any performance degradation in kernels later than v4.3 This degradation is caused from d2be537c3ba3568acd79cd178327b842e60d035e, which changed max_sectors_kb to 1280k, but the hardware is able to work fine with it, so the true fix should be from hpsa driver. Signed-off-by: Yadan Fan Reviewed-by: Johannes Thumshirn Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4db08d016ccedb5b97869724a096990acad59685 Author: Jaegeuk Kim Date: Fri Jul 14 11:45:21 2017 -0700 f2fs: avoid cpu lockup Before retrying to flush data or dentry pages, we need to release cpu in order to prevent watchdog. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 299aa41a45fe21977532fbf992e4f7c5eef73bf0 Author: Jaegeuk Kim Date: Thu Jul 13 17:45:21 2017 -0700 f2fs: include seq_file.h for sysfs.c This patch includes seq_file.h to avoid compile error. Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/sysfs.c | 1 + 1 file changed, 1 insertion(+) commit 29178c1473fd4ad9c523b41bb18a047749c66d11 Author: Krzysztof Kozlowski Date: Thu Jun 8 18:10:28 2017 +0200 ARC: defconfig: Cleanup from old Kconfig options Remove old, dead Kconfig option INET_LRO. It is gone since commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Vineet Gupta arch/arc/configs/nps_defconfig | 1 - arch/arc/configs/tb10x_defconfig | 1 - 2 files changed, 2 deletions(-) commit 101dd590a7fa37954540cf3149a1c502c0acc524 Author: Nicholas Piggin Date: Mon Jul 10 16:19:38 2017 +1000 powerpc/perf: Avoid spurious PMU interrupts after idle POWER9 DD2 can see spurious PMU interrupts after state-loss idle in some conditions. A solution is to save and reload MMCR0 over state-loss idle. Signed-off-by: Nicholas Piggin Acked-by: Madhavan Srinivasan Tested-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit ebc9ca43e1d52a85c72fc2d343f353386ed6c188 Author: Tadeusz Struk Date: Mon May 29 17:20:53 2017 -0700 IB/core: Allow QP state transition from reset to error Playing with IP-O-IB interface can trigger a warning message: "ib0: Failed to modify QP to ERROR state" to be logged. This happens when the QP is in IB_QPS_RESET state and the stack is trying to transition it to IB_QPS_ERR state in ipoib_ib_dev_stop(). According to the IB spec, Table 91 - "QP State Transition Properties" it looks like the transition from reset to error is valid: Transition: Any State to Error Required Attributes: None Optional Attributes: None allowed Actions: Queue processing is stopped. Work Requests pending or in process are completed in error, when possible. This patch allows the transition and quiets the message. Reviewed-by: Dennis Dalessandro Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 1 + 1 file changed, 1 insertion(+) commit 5f110ac4bed8693adb21146067149a48c2b9bd07 Author: oulijun Date: Sat Jun 10 18:49:25 2017 +0800 IB/hns: Fix for checkpatch.pl comment style warnings This patch correct the comment style warnings caught by checkpatch.pl script. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d322f004aaa647a5dc9dcddfe5ab1bff1e92f634 Author: oulijun Date: Sat Jun 10 18:49:24 2017 +0800 IB/hns: Fix the bug with modifying the MAC address without removing the driver When modified the MAC address used hns_roce_mac function, we release and create reserved qp again, It is not necessary to use spin_lock_bh and spin_unlock_bh in handle_en_event, Otherwise, it will occur a error. This patch mainly fixes it. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_main.c | 3 --- 1 file changed, 3 deletions(-) commit 9de61d3fcdde06087f65b4022a1a966c10ab5803 Author: oulijun Date: Sat Jun 10 18:49:23 2017 +0800 IB/hns: Fix the bug with rdma operation When opcode of work request is RDMA read and write, it should use rdma_wr to get remote_addr and rkey. This patch fixes it. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 58c4f0d85f59c458074f016c13991c0a81105180 Author: oulijun Date: Sat Jun 10 18:49:22 2017 +0800 IB/hns: Fix the bug with wild pointer when destroy rc qp When destroyed rc qp, the hr_qp will be used after freed. This patch will fix it. Signed-off-by: Lijun Ou Reported-by: Dan Carpenter Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 5802883d4b7c544012a1857660f78af41f6c183a Author: oulijun Date: Sat Jun 10 18:49:21 2017 +0800 IB/hns: Fix the bug of polling cq failed for loopback Qps In hip06 SoC, RoCE driver creates 8 reserved loopback QPs to ensure zero wqe when free mr. However, if the enabled phy port number is less than 6, it will fail in polling cqe with 8 reserved loopback QPs. In order to solve this problem, the number of loopback Qps will be adjusted based on the number of enabled phy port. Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 53 +++++++++++++++++++----------- 1 file changed, 34 insertions(+), 19 deletions(-) commit 56012e1cada54460f9e456cd77276e765e06ce6c Author: yonatanc Date: Thu Jun 22 17:10:00 2017 +0300 IB/rxe: Set dma_mask and coherent_dma_mask The RXE coupled with dummy device causes to the kernel panic attached below. The panic happens when ib_register_device tries to set dma_mask by accessing a NULLed parent device. The RXE does not actually use DMA, so we can set the dma_mask to architecture value. [16240.199689] RIP: 0010:ib_register_device+0x468/0x5a0 [ib_core] [16240.205289] RSP: 0018:ffffc9000220fc10 EFLAGS: 00010246 [16240.209909] RAX: 0000000000000024 RBX: ffff880220d1a2a8 RCX: 0000000000000000 [16240.212244] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000009 [16240.214385] RBP: ffffc9000220fcb0 R08: 0000000000000000 R09: 000000000000023f [16240.254465] R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000000 [16240.259467] R13: 0000000000000000 R14: 0000000000000000 R15: ffff880220d1a2a8 [16240.263314] FS: 00007fd8ecca0740(0000) GS:ffff8802364c0000(0000) knlGS:0000000000000000 [16240.267292] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [16240.273503] CR2: 0000000000000218 CR3: 00000002253ba000 CR4: 00000000000006e0 [16240.277066] Call Trace: [16240.281836] ? __kmalloc+0x26f/0x280 [16240.286596] rxe_register_device+0x297/0x300 [rdma_rxe] [16240.291377] rxe_add+0x535/0x5b0 [rdma_rxe] [16240.297586] rxe_net_add+0x3e/0xc0 [rdma_rxe] [16240.302375] rxe_param_set_add+0x65/0x144 [rdma_rxe] [16240.307769] param_attr_store+0x68/0xd0 [16240.311640] module_attr_store+0x1d/0x30 [16240.316421] sysfs_kf_write+0x3a/0x50 [16240.317802] kernfs_fop_write+0xff/0x180 [16240.322989] __vfs_write+0x37/0x140 [16240.328164] ? handle_mm_fault+0xce/0x240 [16240.333340] vfs_write+0xb2/0x1b0 [16240.335013] SyS_write+0x55/0xc0 [16240.340632] entry_SYSCALL_64_fastpath+0x1a/0xa9 Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Reviewed-by: Johannes Thumshirn Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit fda85ce912401750e1e80757627af2784c7cc5a7 Author: Yonatan Cohen Date: Thu Jun 22 17:09:59 2017 +0300 IB/rxe: Fix kernel panic from skb destructor In the time between rxe_send has finished and skb destructor called, the QP's ref count might be 0, leading to a possible QP destruction. This will lead to a kernel panic when the destructor dereferences the QP. The operation of incrementing QP ref count at rxe_send and decrementing from skb destructor will prevent this crash. BUG: unable to handle kernel NULL pointer dereference at 000000000000072c IP: [] rxe_skb_tx_dtor+0x15/0x50 [rdma_rxe] PGD 0 [16240.211178] Oops: 0002 [#1] SMP CPU: 3 PID: 0 Comm: swapper/3 Tainted: G OE 4.9.0-mlnx #1 Hardware name: Red Hat KVM, BIOS Bochs 01/01/2011 task: ffff88042d6b1480 task.stack: ffffc90001904000 RIP: 0010:[] [] rxe_skb_tx_dtor+0x15/0x50 [rdma_rxe] RSP: 0018:ffff88043fcc3df0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff880429684700 RCX: ffff88042d248200 RDX: 00000000ffffffff RSI: 00000000fffffe01 RDI: ffff880429684700 RBP: ffff88043fcc3e00 R08: ffff88043fcda240 R09: 00000000ff2d1de6 R10: 0000000000000000 R11: 00000000f49cf6fe R12: ffff880429684700 R13: ffffffff81893f96 R14: ffffffff817d66f0 R15: ffff880427f74200 FS: 0000000000000000(0000) GS:ffff88043fcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000072c CR3: 000000041d3df000 CR4: 00000000000006e0 Stack: ffffffff817b29cf ffff880429684700 ffff88043fcc3e18 ffffffff817b42c2 ffff880429684700 ffff88043fcc3e40 ffffffff817b4332 ffff880429684700 ffff880427f74238 ffff880427f74228 ffff88043fcc3e58 ffffffff81893f96 Call Trace: [16240.336345] [] ? skb_release_head_state+0x4f/0xb0 [] skb_release_all+0x12/0x30 [] kfree_skb+0x32/0x90 [] ndisc_error_report+0x36/0x40 [] neigh_invalidate+0x81/0xf0 [] neigh_timer_handler+0x207/0x2b0 [] call_timer_fn+0x35/0x120 [] run_timer_softirq+0x1d7/0x460 [] ? kvm_sched_clock_read+0x1e/0x30 [] ? sched_clock+0x9/0x10 [] ? sched_clock_cpu+0x72/0xa0 [] __do_softirq+0xd7/0x289 [] irq_exit+0xb5/0xc0 [] smp_apic_timer_interrupt+0x42/0x50 [] apic_timer_interrupt+0x82/0x90 [16240.395776] [] ? native_safe_halt+0x6/0x10 [] default_idle+0x1e/0xd0 [] arch_cpu_idle+0xf/0x20 [] default_idle_call+0x35/0x40 [] cpu_startup_entry+0x185/0x210 [] start_secondary+0x103/0x130 RIP [] rxe_skb_tx_dtor+0x15/0x50 [rdma_rxe] Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Reviewed-by: Johannes Thumshirn Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 3 +++ 1 file changed, 3 insertions(+) commit b6c871e5875798e5ed3744c725622dcd3c92be92 Author: Erez Shitrit Date: Mon Jun 12 10:45:21 2017 +0300 IB/ipoib: Let lower driver handle get_stats64 call The driver checks if the lower level driver supports get_stats, and if so calls it to get the updated statistics, otherwise takes from the current netdevice stats object. Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 8fe8bacb92f249c91a1407b48aa1cb98067fe19d Author: Majd Dibbiny Date: Tue May 30 09:58:06 2017 +0300 IB/core: Add ordered workqueue for RoCE GID management Currently the RoCE GID management uses the ib_wq to do add and delete new GIDs according to the netdev events. The ib_wq isn't an ordered workqueue and thus two work elements can be executed concurrently which will result in unexpected behavior and inconsistency of the GIDs cache content. Example: ifconfig eth1 11.11.11.11/16 up This command will invoke the following netdev events in the following order: 1. NETDEV_UP 2. NETDEV_DOWN 3. NETDEV_UP If (2) and (3) will be executed concurrently or in reverse order, instead of having a new GID with 11.11.11.11 IP, we will end up without any new GIDs. Signed-off-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/core/roce_gid_mgmt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 12cc1a027341338f54d8d3fcf5d188ae2b39c30d Author: Leon Romanovsky Date: Tue May 30 09:44:48 2017 +0300 IB/mlx5: Clean mr_cache debugfs in case of failure The failure in creation of debugfs entries for mr_cache left entries, which were already created. It caused to mismatch and misguiding for the end users. The solution is to clean mr_cache debugfs root, so no leftovers will be in the system. In addition, let's document why the error is not needed to be forwarded to user in case of failure. Signed-off-by: Leon Romanovsky Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 7855f5842741e5835b9be073079780c444dca898 Author: Leon Romanovsky Date: Tue May 23 14:38:16 2017 +0300 IB/core: Remove NOIO QP create flag There are no users for IB_QP_CREATE_USE_GFP_NOIO flag, so let's remove it. Signed-off-by: Leon Romanovsky Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8900b894e769dd88b53e519e3502e0e3c349fe95 Author: Leon Romanovsky Date: Tue May 23 14:38:15 2017 +0300 {net, IB}/mlx4: Remove gfp flags argument The caller to the driver marks GFP_NOIO allocations with help of memalloc_noio-* calls now. This makes redundant to pass down to the driver gfp flags, which can be GFP_KERNEL only. The patch removes the gfp flags argument and updates all driver paths. Signed-off-by: Leon Romanovsky Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/cq.c | 6 ++-- drivers/infiniband/hw/mlx4/mlx4_ib.h | 1 - drivers/infiniband/hw/mlx4/qp.c | 40 +++++++++------------- drivers/infiniband/hw/mlx4/srq.c | 8 ++--- drivers/net/ethernet/mellanox/mlx4/alloc.c | 29 ++++++++-------- drivers/net/ethernet/mellanox/mlx4/cq.c | 4 +-- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 7 ++-- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 +- drivers/net/ethernet/mellanox/mlx4/icm.c | 7 ++-- drivers/net/ethernet/mellanox/mlx4/icm.h | 3 +- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 4 +-- drivers/net/ethernet/mellanox/mlx4/mr.c | 17 +++++---- drivers/net/ethernet/mellanox/mlx4/qp.c | 20 +++++------ .../net/ethernet/mellanox/mlx4/resource_tracker.c | 4 +-- drivers/net/ethernet/mellanox/mlx4/srq.c | 4 +-- include/linux/mlx4/device.h | 10 +++--- 16 files changed, 76 insertions(+), 90 deletions(-) commit 0f4d027c3b4240ecb314daa948238d459fdc3a00 Author: Leon Romanovsky Date: Tue May 23 14:38:14 2017 +0300 IB/{rdmavt, qib, hfi1}: Remove gfp flags argument The caller to the driver marks GFP_NOIO allocations with help of memalloc_noio-* calls now. This makes redundant to pass down to the driver gfp flags, which can be GFP_KERNEL only. The patch removes the gfp flags argument and updates all driver paths. Signed-off-by: Leon Romanovsky Signed-off-by: Leon Romanovsky Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 7 +++-- drivers/infiniband/hw/hfi1/qp.h | 3 +-- drivers/infiniband/hw/qib/qib_qp.c | 15 +++++------ drivers/infiniband/hw/qib/qib_verbs.h | 4 +-- drivers/infiniband/sw/rdmavt/qp.c | 48 ++++++++++------------------------- include/rdma/rdma_vt.h | 5 ++-- 6 files changed, 28 insertions(+), 54 deletions(-) commit d83187dda9b930dc268ab05da265f3d5d7eca451 Author: Leon Romanovsky Date: Tue May 23 14:38:13 2017 +0300 IB/IPoIB: Convert IPoIB to memalloc_noio_* calls Commit 21caf2fc1931 ("mm: teach mm by current context info to not do I/O during memory allocation") added the memalloc_noio_(save|restore) functions to enable people to modify the MM behavior by disabling I/O during memory allocation. This was further extended in Fixes: 934f3072c17c ("mm: clear __GFP_FS when PF_MEMALLOC_NOIO is set"). memalloc_noio_* functions prevent allocation paths recursing back into the filesystem without explicitly changing the flags for every allocation site. However the IPoIB hasn't been keeping up with the changes and missed completely these memalloc_noio_* calls. This led to update of allocation site with special QP creation flag, see commit 09b93088d750 ("IB: Add a QP creation flag to use GFP_NOIO allocations"), while this flag is supported by small number of drivers in IB stack. Let's change it by updating to memalloc_noio_* calls and allow for every driver underneath enjoy NOIO allocations. Signed-off-by: Leon Romanovsky Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_cm.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit ed7b521d8a98c3371e3c9300df8bf3cb774d8ea6 Author: Erez Shitrit Date: Tue May 23 11:42:52 2017 +0300 IB/IPoIB: Forward MTU change to driver below This patch checks if there is a driver below that needs to be updated on the new MTU and calls it accordingly. Signed-off-by: Erez Shitrit Reviewed by: Alex Vesker Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 98e77d9fd7dff05019436370e78c3ec0f9894e25 Author: Leon Romanovsky Date: Tue May 23 11:29:42 2017 +0300 IB: Convert msleep below 20ms to usleep_range The msleep(1) may do not sleep 1 ms as expected and will sleep longer. The simple conversion from msleep to usleep_range between 1ms and 2ms can solve an issue. The full and comprehensive explanation can be found at [1] and [2]. [1] https://lkml.org/lkml/2007/8/3/250 [2] Documentation/timers/timers-howto.txt Signed-off-by: Leon Romanovsky Reviewed-by: Erez Shitrit Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 3 ++- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/mcg.c | 2 +- drivers/infiniband/hw/nes/nes_hw.c | 4 ++-- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 4 ++-- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) commit f7c8f2e9ddc71db0ae344f3ffb19df03ef32b719 Author: Parav Pandit Date: Tue May 23 11:26:09 2017 +0300 IB/uverbs: Make use of ib_modify_qp variant to avoid resolving DMAC This patch makes use of IB core's ib_modify_qp_with_udata function that also resolves the DMAC and handles udata. Signed-off-by: Parav Pandit Reviewed-by: Eli Cohen Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit a512c2fbef9c700ee1ee0e045b75e140fef8f5ee Author: Parav Pandit Date: Tue May 23 11:26:08 2017 +0300 IB/core: Introduce modify QP operation with udata This patch adds new function ib_modify_qp_with_udata so that uverbs layer can avoid handling L2 mac address at verbs layer and depend on the core layer to resolve the mac address consistently for all required QPs. Signed-off-by: Parav Pandit Reviewed-by: Eli Cohen Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 32 ++++++++++++++++++++++++-------- include/rdma/ib_verbs.h | 16 ++++++++++++++++ 2 files changed, 40 insertions(+), 8 deletions(-) commit cb8c65ccff7f77d0285f1b126c72d37b2572c865 Merge: 935acd3 9d53cae Author: Linus Torvalds Date: Mon Jul 17 15:08:29 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: - Fix DMA regression in 4.13 merge window, only certain chips can do 64-bit DMA. From Dave Dushar. - Correct cpu cross-call algorithm to correctly detect stalled or stuck remote cpus, from Jane Chu. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Measure receiver forward progress to avoid send mondo timeout SPARC64: Fix sun4v DMA panic commit 32f2fea6e77e64cd4045ec2d5deb879aada3b476 Author: Sergei Shtylyov Date: Mon Jul 17 21:00:44 2017 +0300 clocksource/drivers/timer-of: Handle of_irq_get_byname() result correctly of_irq_get_byname() may return a negative error number as well as 0 on failure, while timer_irq_init() only checks for 0, blithely continuing with the call to request_[percpu_]irq() -- those functions expect *unsigned int*, so would probably fail anyway when a large IRQ number resulting from a conversion of a negative error number is passed to them... This, however, is incorrect behavior -- error number is not IRQ number. Filter out the negative error numbers, complain, and return them to the timer_irq_init()'s callers... Fixes: dc11bae78529 ("clocksource/drivers: Add timer-of common init routine") Signed-off-by: Sergei Shtylyov Signed-off-by: Thomas Gleixner Cc: Daniel Lezcano Link: http://lkml.kernel.org/r/20170717180114.678825147@cogentembedded.com drivers/clocksource/timer-of.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit df39a9f106d53532443a804352894480ca6ca5fd Author: WANG Cong Date: Mon Jul 17 11:42:55 2017 -0700 bpf: check NULL for sk_to_full_sk() return value When req->rsk_listener is NULL, sk_to_full_sk() returns NULL too, so we have to check its return value against NULL here. Fixes: 40304b2a1567 ("bpf: BPF support for sock_ops") Reported-by: David Ahern Tested-by: David Ahern Cc: Lawrence Brakmo Cc: Daniel Borkmann Signed-off-by: Cong Wang Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf-cgroup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e59e18989c68a8d7941005f81ad6abc4ca682de0 Author: Hans de Goede Date: Thu Jul 13 15:13:41 2017 +0200 iio: accel: bmc150: Always restore device to normal mode after suspend-resume After probe we would put the device in normal mode, after a runtime suspend-resume we would put it back in normal mode. But for a regular suspend-resume we would only put it back in normal mode if triggers or events have been requested. This is not consistent and breaks reading raw values after a suspend-resume. This commit changes the regular resume path to also unconditionally put the device back in normal mode, fixing reading of raw values not working after a regular suspend-resume cycle. Signed-off-by: Hans de Goede Reviewed-by: Srinivas Pandruvada Cc: Signed-off-by: Jonathan Cameron drivers/iio/accel/bmc150-accel-core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit a696712c3dd54eb58d2c5a807b4aaa27782d80d6 Author: Juergen Gross Date: Mon Jul 17 19:47:02 2017 +0200 genirq/PM: Properly pretend disabled state when force resuming interrupts Interrupts with the IRQF_FORCE_RESUME flag set have also the IRQF_NO_SUSPEND flag set. They are not disabled in the suspend path, but must be forcefully resumed. That's used by XEN to keep IPIs enabled beyond the suspension of device irqs. Force resume works by pretending that the interrupt was disabled and then calling __irq_enable(). Incrementing the disabled depth counter was enough to do that, but with the recent changes which use state flags to avoid unnecessary hardware access, this is not longer sufficient. If the state flags are not set, then the hardware callbacks are not invoked and the interrupt line stays disabled in "hardware". Set the disabled and masked state when pretending that an interrupt got disabled by suspend. Fixes: bf22ff45bed6 ("genirq: Avoid unnecessary low level irq function calls") Suggested-by: Thomas Gleixner Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: boris.ostrovsky@oracle.com Link: http://lkml.kernel.org/r/20170717174703.4603-2-jgross@suse.com kernel/irq/chip.c | 10 ---------- kernel/irq/internals.h | 10 ++++++++++ kernel/irq/pm.c | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) commit 935acd3f5ebc34984bd4de075e0f83e6ea10c28d Merge: 31ba04d 19d39a3 Author: Linus Torvalds Date: Mon Jul 17 13:00:36 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "Fix the fallout from reworking the locking and resource management in request/free_irq()" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Keep chip buslock across irq_request/release_resources() commit 31ba04d99a71e7867a27c521a8cb09a4f707ccd2 Merge: 338a57d dea1d0f Author: Linus Torvalds Date: Mon Jul 17 12:54:51 2017 -0700 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull SMP fix from Thomas Gleixner: "Replace the bogus BUG_ON in the cpu hotplug code" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp/hotplug: Replace BUG_ON and react useful commit 338a57d5cb034172d28de34bd7d122bfcd90bff2 Merge: e8e9941 5b20a43 Author: Linus Torvalds Date: Mon Jul 17 12:38:18 2017 -0700 Merge tag 'regmap-fix-w1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fix from Mark Brown: "Fix build due to w1 header refactoring The regmap support for w1 was added shortly before a reorganization of the w1 headers. While this was noticed before the merge window and efforts made to get it resolved in what was sent that managed to fall through the cracks, this cleans up and updates things so we look for the header in the new location. It didn't cause build failures as the driver that's going to be the first user got held up with other review issues" * tag 'regmap-fix-w1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: regmap-w1: Fix build troubles commit e8e9941b17ea1f2e01fcd55663d6b2b6484403e3 Merge: cb0fbbf 6f37e21 Author: Linus Torvalds Date: Mon Jul 17 12:26:12 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is actually just a small set of mainly bug fixes for the original merge window code plus a few trivial updates and qedi boot from SAN support feature patch" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: libfc: pass an error pointer to fc_disc_error() scsi: hisi_sas: make several const arrays static scsi: qla2xxx: Off by one in qlt_ctio_to_cmd() scsi: sg: fix SG_DXFER_FROM_DEV transfers scsi: virtio_scsi: always read VPD pages for multiqueue too scsi: qedf: fix spelling mistake: "offlading" -> "offloading" scsi: qedi: fix another spelling mistake: "alloction" -> "allocation" scsi: isci: fix typo in function names scsi: cxlflash: return -EFAULT if copy_from_user() fails scsi: qedi: Add support for Boot from SAN over iSCSI offload commit f905293d655cbb8be833261ef390aaba71b44307 Author: Linus Walleij Date: Tue Jul 11 14:26:01 2017 +0200 clk: gemini: Fix reset regression commit e2860e1f62f2 ("serial: 8250_of: Add reset support") introduced reset support for the 8250_of driver. However it unconditionally uses the assert/deassert pair to deassert reset on the device at probe and assert it at remove. This does not work with systems that have a self-deasserting reset controller, such as Gemini, that recently added a reset controller. As a result, the console will not probe on the Gemini with this message: Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled of_serial: probe of 42000000.serial failed with error -524 This (-ENOTSUPP) is the error code returned by the deassert() operation on self-deasserting reset controllers. To work around this, implement dummy .assert() and .deassert() operations in the Gemini combined clock and reset controller. This fixes the issue on this system. Cc: Joel Stanley Cc: Greg Kroah-Hartman Cc: linux-serial@vger.kernel.org Fixes: e2860e1f62f2 ("serial: 8250_of: Add reset support") Signed-off-by: Linus Walleij Acked-by: Philipp Zabel Signed-off-by: Stephen Boyd drivers/clk/clk-gemini.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 23b9babb50ff5ac8eb9208b978b2a630e99bf90b Author: Dan Williams Date: Mon Jul 17 09:58:51 2017 -0700 MAINTAINERS: list drivers/acpi/nfit/ files for libnvdimm sub-system Patches that update the drivers/acpi/nfit/ directory need to be copied to the nvdimm mailing list. The drivers/acpi/nfit* glob has been broken ever since the nfit driver source was refactored into multiple files under the drivers/acpi/nfit/ directory. Reported-by: Prarit Bhargava Signed-off-by: Dan Williams MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e700d2c59e5853c9126642976b4f5768f64c9b3 Author: Prarit Bhargava Date: Wed May 31 13:32:00 2017 -0400 acpi/nfit: Fix memory corruption/Unregister mce decoder on failure nfit_init() calls nfit_mce_register() on module load. When the module load fails the nfit mce decoder is not unregistered. The module's memory is freed leaving the decoder chain referencing junk. This will cause panics as future registrations will reference the free'd memory. Unregister the nfit mce decoder on module init failure. [v2]: register and then unregister mce handler to avoid losing mce events [v3]: also cleanup nfit workqueue Fixes: 6839a6d96f4e ("nfit: do an ARS scrub on hitting a latent media error") Cc: Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Vishal Verma Cc: "Lee, Chun-Yi" Cc: Linda Knippers Cc: lszubowi@redhat.com Acked-by: Jeff Moyer Signed-off-by: Prarit Bhargava Reviewed-by: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 43fe51e11c194a6576634585f81ba33e104194a5 Author: Dan Williams Date: Wed Jul 12 13:42:37 2017 -0700 device-dax: fix 'passing zero to ERR_PTR()' warning Dan Carpenter reports: The patch 7b6be8444e0f: "dax: refactor dax-fs into a generic provider of 'struct dax_device' instances" from Apr 11, 2017, leads to the following static checker warning: drivers/dax/device.c:643 devm_create_dev_dax() warn: passing zero to 'ERR_PTR' Fix the case where we inadvertently leak 0 to ERR_PTR() by setting at every error case, and make it clear that 'count' is never 0. Reported-by: Dan Carpenter Signed-off-by: Dan Williams drivers/dax/device.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4e3f0701f25ab194c5362576b1146a1e6cc6c2e7 Author: Toshi Kani Date: Fri Jul 7 17:44:26 2017 -0600 libnvdimm: fix badblock range handling of ARS range __add_badblock_range() does not account sector alignment when it sets 'num_sectors'. Therefore, an ARS error record range spanning across two sectors is set to a single sector length, which leaves the 2nd sector unprotected. Change __add_badblock_range() to set 'num_sectors' properly. Cc: Fixes: 0caeef63e6d2 ("libnvdimm: Add a poison list and export badblocks") Signed-off-by: Toshi Kani Reviewed-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit cb0fbbf22aa1e0ffcef3f4a055b75a5b17e01ca5 Author: Geert Uytterhoeven Date: Sun Jul 16 20:26:28 2017 +0200 Blackfin: flat: Use %x to format u32 Several variables had their types changed from unsigned long to u32, but the printk()-style format to print them wasn't updated, leading to: arch/blackfin/kernel/flat.c: In function 'bfin_get_addr_from_rp': arch/blackfin/kernel/flat.c:35:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'u32' [-Wformat] arch/blackfin/kernel/flat.c: In function 'bfin_put_addr_at_rp': arch/blackfin/kernel/flat.c:80:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'u32' [-Wformat] Fixes: 468138d78510688f ("binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds arch/blackfin/kernel/flat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eff793687792d3eed594d147aceef2000fb9ca3d Author: Trond Myklebust Date: Sun Jul 16 22:57:27 2017 +0000 nfsd: Fix a memory scribble in the callback channel The offset of the entry in struct rpc_version has to match the version number. Reported-by: Dave Jones Fixes: 1c5876ddbdb4 ("sunrpc: move p_count out of struct rpc_procinfo") Signed-off-by: Trond Myklebust Reported-by: Dave Jones Signed-off-by: J. Bruce Fields fs/nfsd/nfs4callback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bc240eec4b074f5dc2753f295e980e66b72c90fb Author: Logan Gunthorpe Date: Mon Jun 26 13:50:41 2017 -0600 ntb: use correct mw_count function in ntb_tool and ntb_transport After converting to the new API, both ntb_tool and ntb_transport are using ntb_mw_count to iterate through ntb_peer_get_addr when they should be using ntb_peer_mw_count. This probably isn't an issue with the Intel and AMD drivers but this will matter for any future driver with asymetric memory window counts. Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe Signed-off-by: Jon Mason Fixes: 443b9a14ecbe ("NTB: Alter MW API to support multi-ports devices") drivers/ntb/ntb_transport.c | 2 +- drivers/ntb/test/ntb_tool.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 13c401f33e19c20431d9888a91d9ea82e5133bd9 Author: Jakub Kicinski Date: Fri Jul 14 23:03:49 2017 -0700 jhash: fix -Wimplicit-fallthrough warnings GCC 7 added a new -Wimplicit-fallthrough warning. It's only enabled with W=1, but since linux/jhash.h is included in over hundred places (including other global headers) it seems worthwhile fixing this warning. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller include/linux/jhash.h | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit ef434a0c2ce765ad33026375db7d23aebd5e9532 Merge: 76250f2 1ed134e Author: Sean Paul Date: Mon Jul 17 11:43:05 2017 -0400 Merge branch 'drm-misc-next-fixes' into drm-misc-fixes Pick up 1ed134e6526b drm/vc4: Fix VBLANK handling in crtc->enable() path From drm-misc-next-fixes, it was applied after the last pull request was sent from that branch. We'll send it through drm-fixes instead. commit cbd09aebc2d62095b05797af5c9a315e3a71dcea Author: Moni Shoua Date: Tue May 23 10:48:45 2017 +0300 IB/core: Don't resolve IP address to the loopback device When resolving an IP address that is on the host of the caller the result from querying the routing table is the loopback device. This is not a valid response, because it doesn't represent the RDMA device and the port. Therefore, callers need to check the resolved device and if it is a loopback device find an alternative way to resolve it. To avoid this we make sure that the response from rdma_resolve_ip() will not be the loopback device. While that, we fix an static checker warning about dereferencing an unintitialized pointer using the same solution as in commit abeffce90c7f ("net/mlx5e: Fix a -Wmaybe-uninitialized warning") as a reference. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 40 +++++++++++++++++++++++++++++----------- drivers/infiniband/core/cma.c | 32 +++----------------------------- drivers/infiniband/core/verbs.c | 5 ----- 3 files changed, 32 insertions(+), 45 deletions(-) commit bebb2a473a43c8f84a8210687d1cbdde503046d7 Author: Moni Shoua Date: Tue May 23 10:48:44 2017 +0300 IB/core: Namespace is mandatory input for address resolution In function addr_resolve() the namespace is a required input parameter and not an output. It is passed later for searching the routing table and device addresses. Also, it shouldn't be copied back to the caller. Fixes: 565edd1d5555 ('IB/addr: Pass network namespace as a parameter') Cc: # v4.3+ Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c8c16d3bae967f1c7af541e8d016e5c51e4f010a Author: Vladimir Neyelov Date: Sun May 21 19:17:31 2017 +0300 IB/iser: Fix connection teardown race condition Under heavy iser target(scst) start/stop stress during login/logout on iser intitiator side happened trace call provided below. The function iscsi_iser_slave_alloc iser_conn pointer could be NULL, due to the fact that function iscsi_iser_conn_stop can be called before and free iser connection. Let's protect that flow by introducing global mutex. BUG: unable to handle kernel paging request at 0000000000001018 IP: [] iscsi_iser_slave_alloc+0x1e/0x50 [ib_iser] Call Trace: ? scsi_alloc_sdev+0x242/0x300 scsi_probe_and_add_lun+0x9e1/0xea0 ? kfree_const+0x21/0x30 ? kobject_set_name_vargs+0x76/0x90 ? __pm_runtime_resume+0x5b/0x70 __scsi_scan_target+0xf6/0x250 scsi_scan_target+0xea/0x100 iscsi_user_scan_session.part.13+0x101/0x130 [scsi_transport_iscsi] ? iscsi_user_scan_session.part.13+0x130/0x130 [scsi_transport_iscsi] iscsi_user_scan_session+0x1e/0x30 [scsi_transport_iscsi] device_for_each_child+0x50/0x90 iscsi_user_scan+0x44/0x60 [scsi_transport_iscsi] store_scan+0xa8/0x100 ? common_file_perm+0x5d/0x1c0 dev_attr_store+0x18/0x30 sysfs_kf_write+0x37/0x40 kernfs_fop_write+0x12c/0x1c0 __vfs_write+0x18/0x40 vfs_write+0xb5/0x1a0 SyS_write+0x55/0xc0 Fixes: 318d311e8f01 ("iser: Accept arbitrary sg lists mapping if the device supports it") Cc: # v4.5+ Signed-off-by: Vladimir Neyelov Signed-off-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iscsi_iser.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 28b5b3a23ba67970f4f534b15c4e4d687136605a Author: Gustavo A. R. Silva Date: Thu May 4 20:38:20 2017 -0500 RDMA/core: Document confusing code While looking into Coverity ID 1351047 I ran into the following piece of code at drivers/infiniband/core/verbs.c:496: ret = rdma_addr_find_l2_eth_by_grh(&dgid, &sgid,                                    ah_attr->dmac,                                    wc->wc_flags & IB_WC_WITH_VLAN ?                                    NULL : &vlan_id,                                    &if_index, &hoplimit); The issue here is that the position of arguments in the call to rdma_addr_find_l2_eth_by_grh() function do not match the order of the parameters: &dgid is passed to sgid &sgid is passed to dgid This is the function prototype: int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,  const union ib_gid *dgid,  u8 *dmac, u16 *vlan_id, int *if_index,  int *hoplimit) My question here is if this is intentional? Answer: Yes. ib_init_ah_from_wc() creates ah from the incoming packet. Incoming packet has dgid of the receiver node on which this code is getting executed and sgid contains the GID of the sender. When resolving mac address of destination, you use arrived dgid as sgid and use sgid as dgid because sgid contains destinations GID whom to respond to. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 99975cd4fda52974a767aa44fe0b1a8f74950d9d Author: Bart Van Assche Date: Mon Apr 24 15:15:28 2017 -0700 mlx5: Avoid that mlx5_ib_sg_to_klms() overflows the klms[] array ib_map_mr_sg() can pass an SG-list to .map_mr_sg() that is larger than what fits into a single MR. .map_mr_sg() must not attempt to map more SG-list elements than what fits into a single MR. Hence make sure that mlx5_ib_sg_to_klms() does not write outside the MR klms[] array. Fixes: b005d3164713 ("mlx5: Add arbitrary sg list support") Signed-off-by: Bart Van Assche Reviewed-by: Max Gurtovoy Cc: Sagi Grimberg Cc: Leon Romanovsky Cc: Israel Rukshin Cc: Acked-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91647f4c2d66e16b30524613410a638c2c4532bf Author: Dennis Dalessandro Date: Mon May 29 17:18:14 2017 -0700 IB/hfi1: Ensure dd->gi_mask can not be overflowed As the code stands today the array access in remap_intr() is OK. To future proof the code though we should explicitly check to ensure the index value is not outside of the valid range. This is not a straight forward calculation so err on the side of caution. Reviewed-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3d886aa3be15439e05784ac1cbd4acc2f13c0048 Merge: b6ea01b 5771a8c Author: Doug Ledford Date: Mon Jul 17 11:26:58 2017 -0400 Merge tag 'v4.13-rc1' into k.o/for-4.13-rc Linux v4.13-rc1 commit c6325179238f1d4683edbec53d8322575d76d7e2 Author: Gleb Fotengauer-Malinovskiy Date: Mon Jul 17 16:29:46 2017 +0300 tty: Fix TIOCGPTPEER ioctl definition This ioctl does nothing to justify an _IOC_READ or _IOC_WRITE flag because it doesn't copy anything from/to userspace to access the argument. Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl") Signed-off-by: Gleb Fotengauer-Malinovskiy Acked-by: Aleksa Sarai Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman arch/alpha/include/uapi/asm/ioctls.h | 2 +- arch/mips/include/uapi/asm/ioctls.h | 2 +- arch/parisc/include/uapi/asm/ioctls.h | 2 +- arch/powerpc/include/uapi/asm/ioctls.h | 2 +- arch/sh/include/uapi/asm/ioctls.h | 2 +- arch/sparc/include/uapi/asm/ioctls.h | 2 +- arch/xtensa/include/uapi/asm/ioctls.h | 2 +- include/uapi/asm-generic/ioctls.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 6509f3096263ca2714ec938439a832b302a3a65e Author: Arnd Bergmann Date: Tue Jun 20 22:34:13 2017 +0200 tty: hide unused pty_get_peer function TIOCGPTPEER is only used for unix98 PTYs, and we get a warning when those are disabled: drivers/tty/pty.c:466:12: error: 'pty_get_peer' defined but not used [-Werror=unused-function] This moves the respective functions inside of the existing #ifdef. Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl") Signed-off-by: Arnd Bergmann Acked-by: Aleksa Sarai Reviewed-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/pty.c | 85 +++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 43 deletions(-) commit 36ac344e16e04e3e55e8fed7446095a6458c64e6 Author: Florian Westphal Date: Mon Jul 10 13:53:53 2017 +0200 netfilter: expect: fix crash when putting uninited expectation We crash in __nf_ct_expect_check, it calls nf_ct_remove_expect on the uninitialised expectation instead of existing one, so del_timer chokes on random memory address. Fixes: ec0e3f01114ad32711243 ("netfilter: nf_ct_expect: Add nf_ct_remove_expect()") Reported-by: Sergey Kvachonok Tested-by: Sergey Kvachonok Cc: Gao Feng Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_expect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 974292defee033bc43ccfcb2fcefc3eba3905340 Author: Florian Westphal Date: Fri Jul 7 13:29:03 2017 +0200 netfilter: nf_tables: only allow in/output for arp packets arp packets cannot be forwarded. They can be bridged, but then they can be filtered using either ebtables or nftables bridge family. The bridge netfilter exposes a "call-arptables" switch which pushes packets into arptables, but lets not expose this for nftables, so better close this asap. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_tables_arp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 97772bcd56efa21d9d8976db6f205574ea602f51 Author: Florian Westphal Date: Fri Jul 7 13:07:17 2017 +0200 netfilter: nat: fix src map lookup When doing initial conversion to rhashtable I replaced the bucket walk with a single rhashtable_lookup_fast(). When moving to rhlist I failed to properly walk the list of identical tuples, but that is what is needed for this to work correctly. The table contains the original tuples, so the reply tuples are all distinct. We currently decide that mapping is (not) in range only based on the first entry, but in case its not we need to try the reply tuple of the next entry until we either find an in-range mapping or we checked all the entries. This bug makes nat core attempt collision resolution while it might be able to use the mapping as-is. Fixes: 870190a9ec90 ("netfilter: nat: convert nat bysrc hash to rhashtable") Reported-by: Jaco Kroon Tested-by: Jaco Kroon Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit cf56c2f892a8a1870a8358114ad896772da7543a Author: Florian Westphal Date: Thu Jul 6 23:17:44 2017 +0200 netfilter: remove old pre-netns era hook api no more users in the tree, remove this. The old api is racy wrt. module removal, all users have been converted to the netns-aware api. The old api pretended we still have global hooks but that has not been true for a long time. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netfilter.h | 9 --- net/netfilter/core.c | 143 ---------------------------------------------- 2 files changed, 152 deletions(-) commit 5b20a436835a3e4d0a8118594a864bc88ea53f93 Author: minimumlaw@rambler.ru Date: Thu Jul 6 16:10:17 2017 +0300 regmap: regmap-w1: Fix build troubles Fixes: cc5d0db390b0 ("regmap: Add 1-Wire bus support") Commit de0d6dbdbdb2 ("w1: Add subsystem kernel public interface") Fix place off w1.h header file Cosmetic: Fix company name (local to international) Signed-off-by: Alex A. Mihaylov Signed-off-by: Mark Brown drivers/base/regmap/regmap-w1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 651e9268fb9b9944e063d731b09c0d2ad339bedb Author: Johan Hovold Date: Wed Jul 12 17:55:30 2017 +0200 ASoC: ux500: Restore platform DAI assignments This reverts commit f1013cdeeeb9 ("ASoC: ux500: drop platform DAI assignments"), which seems to have been based on a misunderstanding and prevents the platform driver callbacks from being made (e.g. to preallocate DMA memory). The real culprit for the warnings about attempts to create duplicate procfs entries was commit 99b04f4c4051 ("ASoC: add Component level pcm_new/pcm_free" that broke PCM creation on systems that use more than one platform component. Fixes: f1013cdeeeb9 ("ASoC: ux500: drop platform DAI assignments") Signed-off-by: Johan Hovold Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Mark Brown Cc: stable # 4.11 sound/soc/ux500/mop500.c | 4 ++++ 1 file changed, 4 insertions(+) commit c641e5b207ed7dfaa692820aeb5b6dde3de3e9b0 Author: Johan Hovold Date: Wed Jul 12 17:55:29 2017 +0200 ASoC: fix pcm-creation regression This reverts commit 99b04f4c4051 ("ASoC: add Component level pcm_new/pcm_free"), which started calling the pcm_new callback for every component in a *card* when creating a new pcm, something which does not seem to make any sense. This specifically led to memory leaks in systems with more than one platform component and where DMA memory is allocated in the platform-driver callback. For example, when both mcasp devices are being used on an am335x board, DMA memory would be allocated twice for every DAI link during probe. When CONFIG_SND_VERBOSE_PROCFS was set this fortunately also led to warnings such as: WARNING: CPU: 0 PID: 565 at ../fs/proc/generic.c:346 proc_register+0x110/0x154 proc_dir_entry 'sub0/prealloc' already registered Since there seems to be no users of the new component callbacks, and the current implementation introduced a regression, let's revert the offending commit for now. Fixes: 99b04f4c4051 ("ASoC: add Component level pcm_new/pcm_free") Signed-off-by: Johan Hovold Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Mark Brown Cc: stable # 4.10 include/sound/soc.h | 6 ------ sound/soc/soc-core.c | 25 ------------------------- sound/soc/soc-pcm.c | 32 +++++++++----------------------- 3 files changed, 9 insertions(+), 54 deletions(-) commit c89876dda01841a6a485cb29b9d1843db34958a3 Author: Gustavo A. R. Silva Date: Fri Jun 30 17:44:02 2017 -0500 w1: omap-hdq: fix error return code in omap_hdq_probe() platform_get_irq() returns an error code, but the omap_hdq driver ignores it and always returns -ENXIO. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Notice that platform_get_irq() no longer returns 0 on error. Print error message and propagate the return value of platform_get_irq on failure. Signed-off-by: Gustavo A. R. Silva Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/omap_hdq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cc84b824e489ef001597ea0ba0ddcec17fb1f05d Author: Alex A. Mihaylov Date: Fri Jul 7 18:38:22 2017 +0300 regmap: regmap-w1: Fix build troubles Fixes: cc5d0db390b0 ("regmap: Add 1-Wire bus support") Commit de0d6dbdbdb2 ("w1: Add subsystem kernel public interface") Fix place off w1.h header file Cosmetic: Fix company name (local to international) Signed-off-by: Alex A. Mihaylov Reviewed-by: Sebastian Reichel Cc: Mark Brown Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/base/regmap/regmap-w1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c927c0c73fd9f6de9ff576e08cd59f13b9d0ef7 Author: Alex A. Mihaylov Date: Tue Jun 13 18:57:56 2017 +0300 w1: Fix slave count on 1-Wire bus (resend) 1-Wire bus have very fast algorith for exchange with single slave device. Fix incorrect count of slave devices on connect second slave device. This case on slave device probe() step we need use generic (multislave) functions for read/write device. Signed-off-by: Alex A. Mihaylov Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 998849967c57705b2cb013d4aea439e7e76e2d8a Author: Kuppuswamy Sathyanarayanan Date: Mon Jul 10 14:45:34 2017 +0200 mux: mux-core: unregister mux_class in mux_exit() Fixes an obvious and nasty typo. Fixes: a3b02a9c6591 ("mux: minimal mux subsystem") Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/mux/mux-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c19c0ec73241b29a12daf913d46f0c15aa33783 Author: Peter Rosin Date: Tue Jul 4 10:22:44 2017 +0200 mux: remove the Kconfig question for the subsystem The MULTIPLEXER question in the Kconfig might be confusing and is of dubious value. Remove it. This makes consumers responsible for selecting MULTIPLEXER, which they already do. Signed-off-by: Peter Rosin Reported-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman drivers/mux/Kconfig | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit b1cd2e34c69a2f3988786af451b6e17967c293a0 Author: Banajit Goswami Date: Fri Jul 14 23:15:05 2017 -0700 ASoC: do not close shared backend dailink Multiple frontend dailinks may be connected to a backend dailink at the same time. When one of frontend dailinks is closed, the associated backend dailink should not be closed if it is connected to other active frontend dailinks. Change ensures that backend dailink is closed only after all connected frontend dailinks are closed. Signed-off-by: Gopikrishnaiah Anandan Signed-off-by: Banajit Goswami Signed-off-by: Patrick Lai Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/soc-pcm.c | 4 ++++ 1 file changed, 4 insertions(+) commit a1a0a56ffc0f587161a4e2830c4afa690e497730 Author: Mauro Carvalho Chehab Date: Wed Jul 12 09:29:16 2017 -0300 media: staging: atomisp: disable warnings with cc-disable-warning Instead of directly using -Wno-foo, use cc-disable-warning, as it checks if the compiler has the warnings we want to disable. Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 9a01968c75fa46ab99564678028eea48973dfa7f Author: Mauro Carvalho Chehab Date: Mon Jun 26 09:16:39 2017 -0300 media: davinci: variable 'common' set but not used Get rid of those two warnings: drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_remove': drivers/media/platform/davinci/vpif_capture.c:1722:21: warning: variable 'common' set but not used [-Wunused-but-set-variable] struct common_obj *common; ^~~~~~ drivers/media/platform/davinci/vpif_display.c: In function 'vpif_remove': drivers/media/platform/davinci/vpif_display.c:1342:21: warning: variable 'common' set but not used [-Wunused-but-set-variable] struct common_obj *common; ^~~~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif_capture.c | 2 -- drivers/media/platform/davinci/vpif_display.c | 2 -- 2 files changed, 4 deletions(-) commit a3db9d60a118571e696b684a6e8c692a2b064941 Merge: 2748e76 5771a8c Author: Mauro Carvalho Chehab Date: Mon Jul 17 11:17:36 2017 -0300 Merge tag 'v4.13-rc1' into patchwork Linux v4.13-rc1 * tag 'v4.13-rc1': (11136 commits) Linux v4.13-rc1 random: reorder READ_ONCE() in get_random_uXX random: suppress spammy warnings about unseeded randomness replace incorrect strscpy use in FORTIFY_SOURCE kmod: throttle kmod thread limit kmod: add test driver to stress test the module loader MAINTAINERS: give kmod some maintainer love xtensa: use generic fb.h fault-inject: add /proc//fail-nth fault-inject: simplify access check for fail-nth fault-inject: make fail-nth read/write interface symmetric fault-inject: parse as natural 1-based value for fail-nth write interface fault-inject: automatically detect the number base for fail-nth write interface kernel/watchdog.c: use better pr_fmt prefix MAINTAINERS: move the befs tree to kernel.org lib/atomic64_test.c: add a test that atomic64_inc_not_zero() returns an int mm: fix overflow check in expand_upwards() ubifs: Set double hash cookie also for RENAME_EXCHANGE ubifs: Massage assert in ubifs_xattr_set() wrt. init_xattrs ubifs: Don't leak kernel memory to the MTD ... commit d6e4bd1b52bf35e7fc14b52be7dbe784896398e3 Author: Frank Wang Date: Fri Jul 14 16:38:43 2017 +0800 nvmem: rockchip-efuse: amend compatible rk322x-efuse to rk3228-efuse As the comments from Heiko Stuebner that compatible should not contain any placeholders, this patch fix it for rk3228 SoC. Note that this is a fix for v4.13, due to fixing the current non-standard binding name that should not become part of an official kernel release. Signed-off-by: Frank Wang Acked-by: Rob Herring Reviewed-by: Heiko Stuebner Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt | 2 +- drivers/nvmem/rockchip-efuse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ceb8a12ff2d4b085f7cee1ac44523ee63ce51e20 Author: Arnd Bergmann Date: Tue Jun 20 22:43:42 2017 +0200 drivers/fsi: fix fsi_slave_mode prototype gcc warns about the return type of this function: drivers/fsi/fsi-core.c:535:8: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] This removes the 'const' attribute, as suggested by the warning. Fixes: 2b37c3e285f9 ("drivers/fsi: Set slave SMODE to init communication") Signed-off-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Acked-by: Jeremy Kerr Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 496f8931b6460febac1dc91c03e86530f938483a Author: Joel Stanley Date: Tue Jul 11 17:00:39 2017 +0930 fsi: core: register with postcore_initcall When testing an i2c driver that is a fsi bus driver, I saw the following oops: kernel BUG at drivers/base/driver.c:153! Internal error: Oops - BUG: 0 [#1] ARM [<8027cb1c>] (driver_register) from [<80344e88>] (fsi_driver_register+0x2c/0x38) [<80344e88>] (fsi_driver_register) from [<805f5ebc>] (fsi_i2c_driver_init+0x1c/0x24) [<805f5ebc>] (fsi_i2c_driver_init) from [<805d1f14>] (do_one_initcall+0xb4/0x170) [<805d1f14>] (do_one_initcall) from [<805d20f0>] (kernel_init_freeable+0x120/0x1dc) [<805d20f0>] (kernel_init_freeable) from [<8043f4a8>] (kernel_init+0x18/0x104) [<8043f4a8>] (kernel_init) from [<8000a5e8>] (ret_from_fork+0x14/0x2c) This is because the fsi bus had not been registered. This fix registers the bus with postcore_initcall instead, to ensure it is registered earlier on. When the fsi core is used as a module this should not be a problem as the fsi driver will depend on the fsi bus type symbol, and will therefore load the core before the driver. Fixes: 0508ad1fff11 ("drivers/fsi: Add empty fsi bus definitions") Signed-off-by: Joel Stanley Acked-by: Jeremy Kerr Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 799ee2970485dc206c3bf347d6e6827c04d5e4f9 Author: Philipp Zabel Date: Mon Jun 12 17:54:29 2017 +0200 drm/imx: parallel-display: Accept drm_of_find_panel_or_bridge failure The parallel panel driver should continue to work without having an endpoint linking to an panel in DT for backwards compatibility. With the recent switch to drm_of_find_panel_or_bridge, an absent panel results in a failure with -ENODEV error return code. To restore the old behaviour, ignore the -ENODEV return code. Reported-by: Nikita Yushchenko Fixes: ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge") Tested-by: Chris Healy Cc: stable@vger.kernel.org Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/parallel-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2ad99fc46d5454e097692c8c8202fd5bc46c809 Author: Laurentiu Palcu Date: Wed Jun 28 12:31:34 2017 +0300 drm/imx: fix typo in ipu_plane_formats[] The BGRA8888 appears twice in the ipu_plane_formats[] list. The duplicate should be BGRX8888. The original commit is: commit 59d6b7189a96 ("drm/imx: ipuv3-plane: enable support for RGBX8888 and RGBA8888 pixel formats") Signed-off-by: Laurentiu Palcu Fixes: 59d6b7189a96 ("drm/imx: ipuv3-plane: enable support for RGBX8888 and RGBA8888 pixel") Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 800161bd0209a8db77f66af283c379ff8d58d88d Author: Mika Westerberg Date: Thu Jun 29 14:19:50 2017 +0300 thunderbolt: Correct access permissions for active NVM contents Firmware upgrade tools that decide which NVM image should be uploaded to the Thunderbolt controller need to access active parts of the NVM even if they are not run as root. The information in active NVM is not considered security critical so we can use the default permissions set by the NVMem framework. Writing the NVM image is still left as root only operation. While there mark the active NVM as read-only in the filesystem. Reported-by: Yehezkel Bernat Signed-off-by: Mika Westerberg Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/switch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 36acbd9e8377c27570b887e2332a5e1f0b140e16 Author: Faiz Abbas Date: Fri Jul 14 18:16:44 2017 +0530 mmc: host: omap_hsmmc: remove unused platform callbacks Remove unused callbacks in the omap_hsmmc_platform_data structure Signed-off-by: Faiz Abbas Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 11 ----------- include/linux/platform_data/hsmmc-omap.h | 10 ---------- 2 files changed, 21 deletions(-) commit ba64792ff9b4612ab20623118e0b616e760ecdf7 Author: Faiz Abbas Date: Fri Jul 14 18:16:43 2017 +0530 ARM: OMAP2+: hsmmc.c: Remove dead code Most platforms using OMAP hsmmc driver have switched to device tree for passing platform data to omap_hsmmc.c driver. The hsmmc.c file in mach-omap2 exists only to support pandora board which uses wl1251 driver in legacy platform data mode. Hence, remove the dead code not used by the pandora board. Signed-off-by: Faiz Abbas Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson arch/arm/mach-omap2/hsmmc.c | 239 +------------------------------------------- arch/arm/mach-omap2/hsmmc.h | 9 -- 2 files changed, 2 insertions(+), 246 deletions(-) commit 6463a4571ceefc43908df4b016d8d5d8b8e85357 Author: Stephen Hemminger Date: Sun Jun 25 12:47:46 2017 -0700 vmbus: re-enable channel tasklet This problem shows up in 4.11 when netvsc driver is removed and reloaded. The problem is that the channel is closed during module removal and the tasklet for processing responses is disabled. When module is reloaded the channel is reopened but the tasklet is marked as disabled. The fix is to re-enable tasklet at the end of close which gets it back to the initial state. The issue is less urgent in 4.12 since network driver now uses NAPI and not the tasklet; and other VMBUS devices are rarely unloaded/reloaded. Fixes: dad72a1d2844 ("vmbus: remove hv_event_tasklet_disable/enable") Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 2 ++ 1 file changed, 2 insertions(+) commit eba9718ed25b2f8a3c066bf985edd5046485a018 Author: Stephen Boyd Date: Mon Jun 26 19:17:46 2017 -0700 spmi: pmic-arb: Always allocate ppid_to_apid table After commit 7f1d4e58dabb ("spmi: pmic-arb: optimize table lookups") we always need the ppid_to_apid table regardless of the version of pmic arbiter we have. Otherwise, we will try to deref the array when we don't allocate it on v2 hardware like the msm8974 SoCs. Cc: Abhijeet Dharmapurikar Cc: Kiran Gunda Fixes: 7f1d4e58dabb ("spmi: pmic-arb: optimize table lookups") Signed-off-by: Stephen Boyd Tested-by: Luca Weiss Reviewed-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 6b71016e4b253172545e8388ff646f0dcbda18a8 Author: Stephen Boyd Date: Wed Jun 21 11:47:50 2017 -0700 MAINTAINERS: Add entry for SPMI subsystem I have the hardware and I've been reviewing SPMI patches when they come on the list. Add myself as a reviewer in this area and add the linux-arm-msm list because people subscribed there also have the hardware. Cc: Kiran Gunda Cc: Abhijeet Dharmapurikar Signed-off-by: Stephen Boyd Acked-by: Andy Gross Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit d50daa2af2618dab6d21634e65a5fbcf4ae437d6 Author: Bjorn Andersson Date: Thu Jun 29 14:46:44 2017 -0700 spmi: Include OF based modalias in device uevent Include the OF-based modalias in the uevent sent when registering SPMI devices, so that user space has a chance to autoload the kernel module for the device. Tested-by: Rob Clark Reported-by: Rob Clark Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7c40b22f6f84c98a1d36e6d0a4346e58f05e45d8 Author: Dan Carpenter Date: Mon Jul 17 11:13:35 2017 +0300 libceph: potential NULL dereference in ceph_msg_data_create() If kmem_cache_zalloc() returns NULL then the INIT_LIST_HEAD(&data->links); will Oops. The callers aren't really prepared for NULL returns so it doesn't make a lot of difference in real life. Fixes: 5240d9f95dfe ("libceph: replace message data pointer with list") Signed-off-by: Dan Carpenter Signed-off-by: Ilya Dryomov net/ceph/messenger.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 84583cfb973c4313955c6231cc9cb3772d280b15 Author: Yan, Zheng Date: Thu Jul 6 11:12:21 2017 +0800 ceph: fix race in concurrent readdir For a large directory, program needs to issue multiple readdir syscalls to get all dentries. When there are multiple programs read the directory concurrently. Following sequence of events can happen. - program calls readdir with pos = 2. ceph sends readdir request to mds. The reply contains N1 entries. ceph adds these N1 entries to readdir cache. - program calls readdir with pos = N1+2. The readdir is satisfied by the readdir cache, N2 entries are returned. (Other program calls readdir in the middle, which fills the cache) - program calls readdir with pos = N1+N2+2. ceph sends readdir request to mds. The reply contains N3 entries and it reaches directory end. ceph adds these N3 entries to the readdir cache and marks directory complete. The second readdir call does not update fi->readdir_cache_idx. ceph add the last N3 entries to wrong places. Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 5 +++++ 1 file changed, 5 insertions(+) commit 914902af4f271884968f72c4fa144c723be2a699 Author: Ilya Dryomov Date: Fri Jul 14 16:08:54 2017 +0200 libceph: don't call encode_request_finish() on MOSDBackoff messages encode_request_finish() is for MOSDOp messages. Calling it on MOSDBackoff ack-block messages corrupts them. Fixes: a02a946dfe96 ("libceph: respect RADOS_BACKOFF backoffs") Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f5cc6898650210a90669437d2d9a3fd564ff7d88 Author: Ilya Dryomov Date: Fri Jul 7 16:14:45 2017 +0200 libceph: use alloc_pg_mapping() in __decode_pg_upmap_items() ... otherwise we die in insert_pg_mapping(), which wants pg->node to be empty, i.e. initialized with RB_CLEAR_NODE. Fixes: 6f428df47dae ("libceph: pg_upmap[_items] infrastructure") Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2acfd95d0c7df0bf6826d9d1ca3796160728a42 Author: Ilya Dryomov Date: Thu Jul 13 15:57:26 2017 +0200 libceph: set -EINVAL in one place in crush_decode() No sooner than Dan had fixed this issue in commit 293dffaad8d5 ("libceph: NULL deref on crush_decode() error path"), I brought it back. Add a new label and set -EINVAL once, right before failing. Fixes: 278b1d709c6a ("libceph: ceph_decode_skip_* helpers") Reported-by: Dan Carpenter Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 00c8ebb360937bbc5da02929d62fcbf6a72801eb Author: Dan Carpenter Date: Thu Jul 13 10:45:17 2017 +0300 libceph: NULL deref on osdmap_apply_incremental() error path There are hidden gotos in the ceph_decode_* macros. We need to set the "err" variable on these error paths otherwise we end up returning ERR_PTR(0) which is NULL. It causes NULL dereferences in the callers. Fixes: 6f428df47dae ("libceph: pg_upmap[_items] infrastructure") Signed-off-by: Dan Carpenter [idryomov@gmail.com: similar bug in osdmap_decode(), changelog tweak] Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e67ae2b7b23b283e657865b498b151e6a17b919d Author: Arnd Bergmann Date: Mon Jul 10 13:17:26 2017 +0200 libceph: fix old style declaration warnings The new macros don't follow the usual style for declarations, which we get a warning for with 'make W=1': In file included from fs/ceph/mds_client.c:16:0: include/linux/ceph/ceph_features.h:74:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] This moves the 'static' keyword to the front of the declaration. Fixes: f179d3ba8cb9 ("libceph: new features macros") Signed-off-by: Arnd Bergmann Signed-off-by: Ilya Dryomov include/linux/ceph/ceph_features.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 00b40d613352c623aaae88a44e5ded7c912909d7 Author: Riley Andrews Date: Thu Jun 29 12:01:37 2017 -0700 binder: Use wake up hint for synchronous transactions. Use wake_up_interruptible_sync() to hint to the scheduler binder transactions are synchronous wakeups. Disable preemption while waking to avoid ping-ponging on the binder lock. Signed-off-by: Todd Kjos Signed-off-by: Omprakash Dhyade Cc: stable # 4.4+ Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c4ea41ba195d01c9af66fb28711a16cc97caa9c5 Author: Todd Kjos Date: Thu Jun 29 12:01:36 2017 -0700 binder: use group leader instead of open thread The binder allocator assumes that the thread that called binder_open will never die for the lifetime of that proc. That thread is normally the group_leader, however it may not be. Use the group_leader instead of current. Signed-off-by: Todd Kjos Cc: stable # 4.4+ Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2b18708ee14baec4ef9c0fba96070bba14d0081 Author: Todd Kjos Date: Wed Jul 5 13:46:01 2017 -0700 Revert "android: binder: Sanity check at binder ioctl" This reverts commit a906d6931f3ccaf7de805643190765ddd7378e27. The patch introduced a race in the binder driver. An attempt to fix the race was submitted in "[PATCH v2] android: binder: fix dangling pointer comparison", however the conclusion in the discussion for that patch was that the original patch should be reverted. The reversion is being done as part of the fine-grained locking patchset since the patch would need to be refactored when proc->vmm_vm_mm is removed from struct binder_proc and added in the binder allocator. Signed-off-by: Todd Kjos Cc: stable # 4.6+ Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 5 ----- 1 file changed, 5 deletions(-) commit 3ee5447e8cd9a65d08fbb49fa9767cbf7fef6d91 Author: Fabio Estevam Date: Tue Jul 11 08:03:43 2017 -0300 tty: serial: lpuart: Fix the logic for detecting the 32-bit type UART Commit 0d6fce904452 ("tty: serial: lpuart: introduce lpuart_soc_data to represent SoC property") introduced a buggy logic for detecting the 32-bit type UART since the condition: "if (sport->port.iotype & UPIO_MEM32BE)" is always true. Performing such bitfield AND operation is not correct, because in the case of Vybrid UART iotype is UPIO_MEM (2), so: UPIO_MEM & UPIO_MEM32BE = 010 & 110 = 010, which is true. Such logic tells the driver to always treat the UART operations as 32-bit, leading to the driver misbehavior on Vybrid. Fix the 32-bit type detection logic to avoid UART breakage on Vybrid. While at it, introduce a lpuart_is_32() function to help readability. Fixes: 0d6fce904452 ("tty: serial: lpuart: introduce lpuart_soc_data to represent SoC property") Reported-by: Vivien Didelot Signed-off-by: Fabio Estevam Reviewed-by: Dong Aisheng Tested-by: Vivien Didelot Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 514ab34dbad6c6fa824a1f56984c196e59082346 Author: Ian Jamison Date: Fri Jul 14 17:31:57 2017 +0100 serial: imx: Prevent TX buffer PIO write when a DMA has been started Function imx_transmit_buffer starts a TX DMA if DMA is enabled, since commit 91a1a909f921 ("serial: imx: Support sw flow control in DMA mode"). It also carries on and attempts to write the same TX buffer using PIO. This results in TX data corruption and double-incrementing xmit->tail with the knock-on effect of tail passing head and a page of garbage being sent out. This seems to be triggered mostly when using RS485 half duplex on SMP systems, but is probably not limited to just those. Tested locally on an i.MX6Q with an RS485 half duplex transceiver on UART3, and also by Clemens Gruber. Tested-by: Clemens Gruber Signed-off-by: Ian Jamison Reviewed-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 351ea50df545a4acaf8f61784949ceedbe923f03 Author: Greg Kroah-Hartman Date: Mon Jul 17 13:48:58 2017 +0200 Revert "serial: imx-serial - move DMA buffer configuration to DT" This reverts commit a3015affdf76ef279fbbb3710a220bab7e9ea04b as there are complaints that it is incorrect. Reported-by: Uwe Kleine-König Cc: Nandor Han Cc: Romain Perier Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org .../devicetree/bindings/serial/fsl-imx-uart.txt | 2 -- drivers/tty/serial/imx.c | 25 +++++++--------------- 2 files changed, 8 insertions(+), 19 deletions(-) commit a70b487b07cf4201bc6702e7f646fa593b23009f Author: Michael Ellerman Date: Mon Jul 17 21:19:01 2017 +1000 powerpc/powernv: Fix boot on Power8 bare metal due to opal_configure_cores() In commit 1c0eaf0f56d6 ("powerpc/powernv: Tell OPAL about our MMU mode on POWER9"), we added additional flags to the OPAL call to configure CPUs at boot. These flags only work on Power9 firmwares, and worse can cause boot failures on Power8 machines, so we check for CPU_FTR_ARCH_300 (aka POWER9) before adding the extra flags. Unfortunately we forgot that opal_configure_cores() is called before the CPU feature checks are dynamically patched, meaning the check always returns true. We definitely need to do something to make the CPU feature checks less prone to bugs like this, but for now the minimal fix is to use early_cpu_has_feature(). Reported-and-tested-by: Abdul Haleem Fixes: 1c0eaf0f56d6 ("powerpc/powernv: Tell OPAL about our MMU mode on POWER9") Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f55ce7b024090a51382ccab2730b96e2f7b4e9cf Author: Mateusz Jurczyk Date: Wed Jun 7 15:50:38 2017 +0200 netfilter: nfnetlink: Improve input length sanitization in nfnetlink_rcv Verify that the length of the socket buffer is sufficient to cover the nlmsghdr structure before accessing the nlh->nlmsg_len field for further input sanitization. If the client only supplies 1-3 bytes of data in sk_buff, then nlh->nlmsg_len remains partially uninitialized and contains leftover memory from the corresponding kernel allocation. Operating on such data may result in indeterminate evaluation of the nlmsg_len < NLMSG_HDRLEN expression. The bug was discovered by a runtime instrumentation designed to detect use of uninitialized memory in the kernel. The patch prevents this and other similar tools (e.g. KMSAN) from flagging this behavior in the future. Signed-off-by: Mateusz Jurczyk Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4ab3c51e0540ba8464fe34d84cc35821bb77ae92 Author: Dan Carpenter Date: Mon Jul 17 11:34:23 2017 +0300 serial: sh-sci: Uninitialized variables in sysfs files The kstrtol() function returns -ERANGE as well as -EINVAL so these tests are not enough. It's not a super serious bug, but my static checker correctly complains that the "r" variable might be used uninitialized. Fixes: 5d23188a473d ("serial: sh-sci: make RX FIFO parameters tunable via sysfs") Signed-off-by: Dan Carpenter Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 2b01bfaeb41e1563322448d9b392ac924cbf22ef Author: Dan Carpenter Date: Mon Jul 17 11:12:38 2017 +0300 serial: st-asc: Potential error pointer dereference It looks like we intended to return an error code here, because we dereference "ascport->pinctrl" on the next lines. Fixes: 6929cb00a501 ("serial: st-asc: Read in all Pinctrl states") Signed-off-by: Dan Carpenter Acked-by: Lee Jones Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 1 + 1 file changed, 1 insertion(+) commit 446230f52a5bef593554510302465eabab45a372 Author: Colin Ian King Date: Thu Jul 6 16:06:32 2017 +0100 usb: storage: return on error to avoid a null pointer dereference When us->extra is null the driver is not initialized, however, a later call to osd200_scsi_to_ata is made that dereferences us->extra, causing a null pointer dereference. The code currently detects and reports that the driver is not initialized; add a return to avoid the subsequent dereference issue in this check. Thanks to Alan Stern for pointing out that srb->result needs setting to DID_ERROR << 16 Detected by CoverityScan, CID#100308 ("Dereference after null check") Signed-off-by: Colin Ian King Cc: stable Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/isd200.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 86be7f7b2d940ddc18143061e77989b017d93bf8 Author: Arnd Bergmann Date: Fri Jun 30 17:46:16 2017 +0200 usb: typec: include linux/device.h in ucsi.h The new driver causes a build failure in some configurations: In file included from /git/arm-soc/drivers/usb/typec/ucsi/trace.h:9:0, from /git/arm-soc/drivers/usb/typec/ucsi/trace.c:2: drivers/usb/typec/ucsi/ucsi.h:331:39: error: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] This includes the required header file. Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") Signed-off-by: Arnd Bergmann Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.h | 1 + 1 file changed, 1 insertion(+) commit fe855789d605590e57f9cd968d85ecce46f5c3fd Author: Johan Hovold Date: Wed Jul 12 15:08:39 2017 +0200 USB: cdc-acm: add device-id for quirky printer Add device-id entry for DATECS FP-2000 fiscal printer needing the NO_UNION_NORMAL quirk. Reported-by: Anton Avramov Cc: stable Signed-off-by: Johan Hovold Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 3 +++ 1 file changed, 3 insertions(+) commit dd55d44f408419278c00887bfcb2261d0caae350 Author: Hans de Goede Date: Thu Jul 6 16:06:01 2017 +0200 staging: vboxvideo: Add vboxvideo to drivers/staging This commit adds the vboxvideo drm/kms driver for the virtual graphics card used in Virtual Box virtual machines to drivers/staging. Why drivers/staging? This driver is already being patched into the kernel by several distros, thus it is good to get this driver upstream soon, so that work on the driver can be easily shared. At the same time we want to take our time to get this driver properly cleaned up (mainly converted to the new atomic modesetting APIs) before submitting it as a normal driver under drivers/gpu/drm, putting this driver in staging for now allows both. Note this driver has already been significantly cleaned up, when I started working on this the files under /usr/src/vboxguest/vboxvideo as installed by Virtual Box 5.1.18 Guest Additions had a total linecount of 52681 lines. The version in this commit has 4874 lines. Cc: vbox-dev@virtualbox.org Cc: Michael Thayer Signed-off-by: Hans de Goede Signed-off-by: Michael Thayer Acked-by: Daniel Vetter Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/vboxvideo/Kconfig | 12 + drivers/staging/vboxvideo/Makefile | 7 + drivers/staging/vboxvideo/TODO | 9 + drivers/staging/vboxvideo/hgsmi_base.c | 246 ++++++++ drivers/staging/vboxvideo/hgsmi_ch_setup.h | 66 +++ drivers/staging/vboxvideo/hgsmi_channels.h | 53 ++ drivers/staging/vboxvideo/hgsmi_defs.h | 92 +++ drivers/staging/vboxvideo/modesetting.c | 142 +++++ drivers/staging/vboxvideo/vbox_drv.c | 286 +++++++++ drivers/staging/vboxvideo/vbox_drv.h | 296 ++++++++++ drivers/staging/vboxvideo/vbox_err.h | 50 ++ drivers/staging/vboxvideo/vbox_fb.c | 412 +++++++++++++ drivers/staging/vboxvideo/vbox_hgsmi.c | 115 ++++ drivers/staging/vboxvideo/vbox_irq.c | 197 +++++++ drivers/staging/vboxvideo/vbox_main.c | 534 +++++++++++++++++ drivers/staging/vboxvideo/vbox_mode.c | 877 ++++++++++++++++++++++++++++ drivers/staging/vboxvideo/vbox_prime.c | 74 +++ drivers/staging/vboxvideo/vbox_ttm.c | 472 +++++++++++++++ drivers/staging/vboxvideo/vboxvideo.h | 491 ++++++++++++++++ drivers/staging/vboxvideo/vboxvideo_guest.h | 95 +++ drivers/staging/vboxvideo/vboxvideo_vbe.h | 84 +++ drivers/staging/vboxvideo/vbva_base.c | 233 ++++++++ 24 files changed, 4846 insertions(+) commit 9585e340db9f6cc1c0928d82c3a23cc4460f0a3f Author: Stefan Triller Date: Fri Jun 30 14:44:03 2017 +0200 USB: serial: cp210x: add support for Qivicon USB ZigBee dongle The German Telekom offers a ZigBee USB Stick under the brand name Qivicon for their SmartHome Home Base in its 1. Generation. The productId is not known by the according kernel module, this patch adds support for it. Signed-off-by: Stefan Triller Reviewed-by: Frans Klaver Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 26cb2be4c7c42644ccd147c786edb9006300ee56 Author: Chen-Yu Tsai Date: Fri Jul 14 14:42:55 2017 +0800 mmc: sunxi: Keep default timing phase settings for new timing mode The register for the "new timing mode" also has bit fields for setting output and sample timing phases. According to comments in Allwinner's BSP kernel, the default values are good enough. Keep the default values already in the hardware when setting new timing mode, instead of overwriting the whole register. Fixes: 9a37e53e451e ("mmc: sunxi: Enable the new timings for the A64 MMC controllers") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Cc: Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8ff235fe7a8c4a5824c223b9996457174442e73a Author: Ludovic Desroches Date: Fri Jul 7 15:33:10 2017 +0200 ARM: dts: at91: sama5d2: fix EBI/NAND controllers declaration Fix HSMC interrupt ID, PMECC registers and EBI ones. Fixes: d9c41bf30cf8 ("ARM: dts: at91: Declare EBI/NAND controllers") Signed-off-by: Ludovic Desroches Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d2.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fa405fd9dd7b0a5367fb5a773e93ac59efb98f44 Author: Ludovic Desroches Date: Tue Jul 11 09:40:15 2017 +0200 ARM: dts: at91: sama5d2: use sama5d2 compatible string for SMC A new compatible string has been introduced for sama5d2 SMC to allow to manage the registers mapping change. Signed-off-by: Ludovic Desroches Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89542936df29d7104537279a6a7e583de6e15b92 Author: Kailang Yang Date: Mon Jul 17 15:03:43 2017 +0800 ALSA: hda/realtek - Update headset mode for ALC298 Dell new platform with new hardware layout. Old headset mode policy will cause headset mode check type has a chance to check fail. So, we update new headset mode to match new hardware layout. New headset mode policy also could suitable to old hardware layout. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 66 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 6 deletions(-) commit f43aa31fe7dc43b808ec619b0d407180cd3725c0 Author: fred gao Date: Mon Jul 17 14:52:05 2017 +0800 drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse Once the Windows guest is shutdown, the display pipe will be disabled and intel_gvt_check_vblank_emulation will be called to check if the vblank timer is turned off. Given the scenario of creating VM1 ,VM2, destoying VM2 in current code, VM1 has pipe enabled and continues to check VM2, the flag have_enabled_pipe is always false since all the VM2 pipes are disabled, so the vblank timer will be canceled and TDR happens in Windows VM1 guest due to the vsync timeout. In this patch the vblank timer will be never canceled once one pipe is enabled. v2: - remove have_enabled_pipe flag and check pipe enabled directly. (Zhenyu) Cc: Wang Hongbo Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit a992f2d38e4ce17b8c7d1f7f67b2de0eebdea069 Author: Jan Kara Date: Wed Jun 21 14:34:15 2017 +0200 ext2: Don't clear SGID when inheriting ACLs When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the owning group of 'DIR0'). However when 'DIR0' also has some default ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on 'DIR1' to get cleared if user is not member of the owning group. Fix the problem by creating __ext2_set_acl() function that does not call posix_acl_update_mode() and use it when inheriting ACLs. That prevents SGID bit clearing and the mode has been properly set by posix_acl_create() anyway. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: stable@vger.kernel.org CC: linux-ext4@vger.kernel.org Signed-off-by: Jan Kara fs/ext2/acl.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 6883cd7f68245e43e91e5ee583b7550abf14523f Author: Jan Kara Date: Thu Jun 22 09:32:49 2017 +0200 reiserfs: Don't clear SGID when inheriting ACLs When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the owning group of 'DIR0'). However when 'DIR0' also has some default ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on 'DIR1' to get cleared if user is not member of the owning group. Fix the problem by moving posix_acl_update_mode() out of __reiserfs_set_acl() into reiserfs_set_acl(). That way the function will not be called when inheriting ACLs which is what we want as it prevents SGID bit clearing and the mode has been properly set by posix_acl_create() anyway. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: stable@vger.kernel.org CC: reiserfs-devel@vger.kernel.org Signed-off-by: Jan Kara fs/reiserfs/xattr_acl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 4a71fcb8ac5f94c07bf47a43b13258a52e4fe3ad Author: Jack Pham Date: Thu Jun 29 00:53:31 2017 -0700 usb: dwc3: gadget: only unmap requests from DMA if mapped A recent optimization was made so that a request put on the pending_list wouldn't get mapped for DMA until just before preparing a TRB for it. However, this poses a problem in case the request is dequeued or the endpoint is disabled before the mapping is done as that would lead to dwc3_gadget_giveback() unconditionally calling usb_gadget_unmap_request_for_dev() with an invalid request->dma handle. Depending on the platform's DMA implementation the unmap operation could result in a panic. Since we know a successful mapping is a prerequisite for getting a TRB, the unmap can be conditionally called only when req->trb is non-NULL. Fixes: cdb55b39fab8 ("usb: dwc3: gadget: lazily map requests for DMA") Signed-off-by: Jack Pham Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a9ef5c47d065e3c8a6eb0e5911e95809811e6c6b Author: Geert Uytterhoeven Date: Thu Jul 6 11:48:27 2017 +0200 usb: gadget: udc: USB_SNP_CORE should depend on HAS_DMA If NO_DMA=y: ERROR: "usb_gadget_map_request" [drivers/usb/gadget/udc/snps_udc_core.ko] undefined! ERROR: "dma_pool_destroy" [drivers/usb/gadget/udc/snps_udc_core.ko] undefined! ERROR: "usb_gadget_unmap_request" [drivers/usb/gadget/udc/snps_udc_core.ko] undefined! ERROR: "dma_pool_free" [drivers/usb/gadget/udc/snps_udc_core.ko] undefined! ERROR: "dma_pool_alloc" [drivers/usb/gadget/udc/snps_udc_core.ko] undefined! ERROR: "dma_pool_create" [drivers/usb/gadget/udc/snps_udc_core.ko] undefined! As USB_SNP_CORE is selected by USB_SNP_UDC_PLAT and USB_AMD5536UDC, these should depend on HAS_DMA, too. For USB_AMD5536UDC, this is already fulfilled through the dependency on USB_PCI (PCI implies HAS_DMA). Add dependencies on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f84a31eb982950e3b999022b742424e080ff72e8 Author: Geert Uytterhoeven Date: Thu Jul 6 11:48:26 2017 +0200 usb: gadget: udc: USB_RENESAS_USB3 should depend on HAS_DMA If NO_DMA=y: ERROR: "usb_gadget_map_request" [drivers/usb/gadget/udc/renesas_usb3.ko] undefined! ERROR: "usb_gadget_unmap_request" [drivers/usb/gadget/udc/renesas_usb3.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/gadget/udc/renesas_usb3.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bee91869436dfb0e444139a52228cef0ce758cd8 Author: Axel Lin Date: Fri Jul 7 12:22:00 2017 +0800 usb: gadget: f_mass_storage: Fix the logic to iterate all common->luns It is wrong to do --i in the for loop. Fixes: dd02ea5a3305 ("usb: gadget: mass_storage: Use static array for luns") Signed-off-by: Axel Lin Reviewed-by: Krzysztof Opasiak Acked-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_mass_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee249b4554947de3be77be4e9e6077b20c0fe055 Author: Vignesh R Date: Fri Jul 7 11:52:52 2017 +0530 usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq IRQ_NOAUTOEN cannot be used with shared IRQs, since commit 04c848d39879 ("genirq: Warn when IRQ_NOAUTOEN is used with shared interrupts") and kernel now throws a warn dump. But OMAP DWC3 driver uses this flag. As per commit 12a7f17fac5b ("usb: dwc3: omap: fix race of pm runtime with irq handler in probe") that introduced this flag, PM runtime can race with IRQ handler when deferred probing happens due to extcon, therefore IRQ_NOAUTOEN needs to be set so that irq is not enabled until extcon is registered. Remove setting of IRQ_NOAUTOEN and move the registration of shared irq to a point after dwc3_omap_extcon_register() and of_platform_populate(). This avoids possibility of probe deferring and above said race condition. Reviewed-by: Grygorii Strashko Signed-off-by: Vignesh R Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-omap.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 541768b08a400d9d292cfd9c898401b8178856ac Author: Vignesh R Date: Thu Jun 29 10:55:14 2017 +0530 usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys commit f54edb539c116 ("usb: dwc3: core: initialize ULPI before trying to get the PHY") moved call to dwc3_core_get_phy() from dwc3_probe() to dwc3_core_init() after dwc3_core_soft_reset(). But dwc3_core_soft_reset() calls phy_init(), therefore dwc3_core_get_phy() needs to be called before dwc3_core_soft_reset(). Fix this by moving call to dwc3_core_get_phy() before dwc3_core_soft_reset(). This fixes the following abort seen on DRA7xx platforms [ 24.769118] usb usb2: SerialNumber: xhci-hcd.1.auto [ 24.781144] hub 2-0:1.0: USB hub found [ 24.787836] hub 2-0:1.0: 1 port detected [ 24.809939] Unhandled fault: imprecise external abort (0x1406) at 0x00000000 Reported-by: Carlos Hernandez Signed-off-by: Vignesh R Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2a596fc9d974bb040eda9ab70bf8756fcaaa6afe Author: Jonathan Liu Date: Mon Jul 10 16:55:04 2017 +1000 drm/sun4i: Implement drm_driver lastclose to restore fbdev console The drm_driver lastclose callback is called when the last userspace DRM client has closed. Call drm_fbdev_cma_restore_mode to restore the fbdev console otherwise the fbdev console will stop working. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Cc: stable@vger.kernel.org Tested-by: Olliver Schinagl Reviewed-by: Chen-Yu Tsai Signed-off-by: Jonathan Liu Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d1510a2e5ab6cb3a67f1c55ca5e7a6d2c6dec340 Author: Chris Gorman Date: Wed Jul 12 13:31:26 2017 -0400 i2c: mux: pinctrl: mention correct module name in Kconfig help text Kconfig says the resulting module is pinctrl-i2cmux, but the module when built is i2c-mux-pinctrl. Fixes: ae58d1e40698 ("i2c: Add generic I2C multiplexer using pinctrl API") Signed-off-by: Chris Gorman Signed-off-by: Peter Rosin drivers/i2c/muxes/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87b2c3fc63175bb32c96d4ec58152d4fdd5a4ae1 Author: Geert Uytterhoeven Date: Sun Jul 16 13:57:29 2017 +0200 h8300: Add missing closing parenthesis in flat_get_addr_from_rp() In file included from include/linux/flat.h:13:0, from fs/binfmt_flat.c:36: arch/h8300/include/asm/flat.h: In function 'flat_get_addr_from_rp': arch/h8300/include/asm/flat.h:28:3: error: expected ')' before 'val' val &= 0x00ffffff; ^ arch/h8300/include/asm/flat.h:31:1: error: expected expression before '}' token } ^ In file included from include/linux/flat.h:13:0, from fs/binfmt_flat.c:36: arch/h8300/include/asm/flat.h:26:6: warning: unused variable 'val' [-Wunused-variable] u32 val = get_unaligned((__force u32 *)rp); ^ In file included from include/linux/flat.h:13:0, from fs/binfmt_flat.c:36: arch/h8300/include/asm/flat.h:31:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Reported-by: kbuild test robot Fixes: 468138d78510688f ("binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds arch/h8300/include/asm/flat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f42ef4bc26b83bd33feb9a9fa55e25e5752a495 Author: Geert Uytterhoeven Date: Sun Jul 16 13:57:28 2017 +0200 blackfin, m68k: Fix flat_set_persistent() for unsigned long to u32 changes Several variables had their types changed from unsigned long to u32, but the arch-specific implementations of flat_set_persistent() weren't updated, leading to compiler warnings on blackfin and m68k: fs/binfmt_flat.c: In function ‘load_flat_file’: fs/binfmt_flat.c:799: warning: passing argument 2 of ‘flat_set_persistent’ from incompatible pointer type Fixes: 468138d78510688f ("binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds arch/blackfin/include/asm/flat.h | 3 +-- arch/m68k/include/asm/flat.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit a86054236d356b973b360c43c4d43fef6555db13 Author: Geert Uytterhoeven Date: Sun Jul 16 13:57:27 2017 +0200 binfmt_flat: Use %u to format u32 Several variables had their types changed from unsigned long to u32, but the printk()-style format to print them wasn't updated, leading to: fs/binfmt_flat.c: In function ‘load_flat_file’: fs/binfmt_flat.c:577: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘u32’ Fixes: 468138d78510688f ("binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds fs/binfmt_flat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca12437303f35b0a5b97c856d88886ce9df6a0d7 Author: Heiko Stuebner Date: Sat Jul 1 18:20:35 2017 +0200 ARM: dts: rockchip: fix mali gpu node on rk3288 The binding specifies the actual implementations only (mali-t760 for example) but not the arm,mali-midgard used in some vendor kernels. So drop that compatible property from the rk3288 where it had slipped in. Also fix the node name which should be a generic gpu@... Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 670d6303e90825f918cdcb77095706cad2df05c2 Author: Heiko Stuebner Date: Sat Jul 1 18:16:51 2017 +0200 dt-bindings: gpu: drop wrong compatible from midgard binding example The binding rightfully only specifies compatibles for actual implementations and not for the whole family. In the example an arm,mali-midgard slipped through from downstream devicetrees though. So drop that to not confuse people reading (or copying) that example. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfc1ed1caef09e6be147f9e8d72631e788ffefd9 Author: Justin Ernst Date: Thu Jul 13 13:33:23 2017 -0500 x86/platform/uv/BAU: Fix congested_response_us not taking effect Bug fix for the BAU tunable congested_cycles not being set to the user defined value. Instead of referencing a global variable when deciding on BAU shutdown, a node will reference its own tunable set value ( cong_response_us). This results in the user set tunable value congested_response_us taking effect correctly. Signed-off-by: Justin Ernst Acked-by: Andrew Banman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: mike.travis@hpe.com Cc: sivanich@hpe.com Link: http://lkml.kernel.org/r/1499970803-282432-1-git-send-email-justin.ernst@hpe.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5f8a16156aa1b2d0223eaee9dacdfb9bc096f610 Author: Mikulas Patocka Date: Tue Jul 11 07:44:05 2017 -0400 x86/cpu: Use indirect call to measure performance in init_amd_k6() This old piece of code is supposed to measure the performance of indirect calls to determine if the processor is buggy or not, however the compiler optimizer turns it into a direct call. Use the OPTIMIZER_HIDE_VAR() macro to thwart the optimization, so that a real indirect call is generated. Signed-off-by: Mikulas Patocka Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1707110737530.8746@file01.intranet.prod.int.rdu2.redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/amd.c | 1 + 1 file changed, 1 insertion(+) commit 677e6a1ab4edcf4b5c48ab68acf9d7f01555a8fb Author: Lynn Lei Date: Mon Jul 3 20:05:10 2017 +0800 staging: sm750fb: fixed a assignment typo fixed a typo issue in get_mxclk_freq() function. the original code using PLL_CTRL_M_SHIFT for shifting to set N flag. which is not right, it should be PLL_CTRL_N_SHIFT. both PLL_CTRL_M_SHIFT and PLL_CTRL_N_SHIFT defined in drivers/staging/sm750fb/ddk750_reg.h Signed-off-by: Lynn Lei Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 011ce71609e9cd0751b495e24ff8c83fa8d7c7db Author: Dan Carpenter Date: Wed Jul 12 10:51:33 2017 +0300 staging: rtl8188eu: memory leak in rtw_free_cmd_obj() We were fixing checkpatch.pl warnings and accidentally reversed this condition. Fixes: 5b29aaaa1e3c ("staging: rtl8188eu: removes comparison to null") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 397fcd12e4890624228e25468a1ab5f6fc78a1e3 Author: Dan Carpenter Date: Tue Jul 11 22:55:04 2017 +0300 staging: vchiq_arm: fix error codes in probe If vchiq_debugfs_init() fails, then we accidentally return a valid pointer casted to int on error. This code is simpler if we get rid of the "ptr_err" variable and just use "err" throughout. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 15d5193104a457d5151840247e3bce561c42e3e9 Author: Ian Abbott Date: Fri Jun 30 12:02:18 2017 +0100 staging: comedi: ni_mio_common: fix AO timer off-by-one regression As reported by Éric Piel on the Comedi mailing list (see ), the analog output asynchronous commands are running too fast with a period 50 ns shorter than it should be. This affects all boards with AO command support that are supported by the "ni_pcimio", "ni_atmio", and "ni_mio_cs" drivers. This is a regression bug introduced by commit 080e6795cba3 ("staging: comedi: ni_mio_common: Cleans up/clarifies ni_ao_cmd"), specifically, this line in `ni_ao_cmd_set_update()`: /* following line: N-1 per STC */ ni_stc_writel(dev, trigvar - 1, NISTC_AO_UI_LOADA_REG); The `trigvar` variable value comes from a call to `ni_ns_to_timer()` which converts a timer period in nanoseconds to a hardware divisor value. The function already reduces the divisor by 1 as required by the hardware, so the above line should not reduce it further by 1. Fix it by replacing `trigvar` by `trigvar - 1` in the above line, and remove the misleading comment. Reported-by: Éric Piel Fixes: 080e6795cba3 ("staging: comedi: ni_mio_common: Cleans up/clarifies ni_ao_cmd") Cc: Éric Piel Cc: Spencer E. Olson Cc: # 4.7+ Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_mio_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 533da29b584de5ae0e9dafafbe52809f59cb5300 Merge: ea6c307 f48bed1 Author: David S. Miller Date: Sat Jul 15 21:29:08 2017 -0700 Merge branch 'bcmgenet-Fragmented-SKB-corrections' Doug Berger says: ==================== bcmgenet: Fragmented SKB corrections Two issues were observed in a review of the bcmgenet driver support for fragmented SKBs which are addressed by this patch set. The first addresses a problem that could occur if the driver is not able to DMA map a fragment of the SKB. This would be a highly unusual event but it would leave the hardware descriptors in an invalid state which should be prevented. The second is a hazard that could occur if the driver is able to reclaim the first control block of a fragmented SKB before all of its fragments have completed processing by the hardware. In this case the SKB could be freed leading to reuse of memory that is still in use by hardware. ==================== Signed-off-by: David S. Miller commit f48bed16a756f5bc0244acd581f61968f7d7c2a4 Author: Doug Berger Date: Fri Jul 14 16:12:10 2017 -0700 net: bcmgenet: Free skb after last Tx frag Since the skb is attached to the first control block of a fragmented skb it is possible that the skb could be freed when reclaiming that control block before all fragments of the skb have been consumed by the hardware and unmapped. This commit introduces first_cb and last_cb pointers to the skb control block used by the driver to keep track of which transmit control blocks within a transmit ring are the first and last ones associated with the skb. It then splits the bcmgenet_free_cb() function into transmit (bcmgenet_free_tx_cb) and receive (bcmgenet_free_rx_cb) versions that can handle the unmapping of dma mapped memory and cleaning up the corresponding control block structure so that the skb is only freed after the last associated transmit control block is reclaimed. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 142 ++++++++++++++----------- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 2 + 2 files changed, 84 insertions(+), 60 deletions(-) commit 876dbadd53a7102e2a84afc84ea2bd3ee6dc5636 Author: Doug Berger Date: Fri Jul 14 16:12:09 2017 -0700 net: bcmgenet: Fix unmapping of fragments in bcmgenet_xmit() In case we fail to map a single fragment, we would be leaving the transmit ring populated with stale entries. This commit introduces the helper function bcmgenet_put_txcb() which takes care of rewinding the per-ring write pointer back to where we left. It also consolidates the functionality of bcmgenet_xmit_single() and bcmgenet_xmit_frag() into the bcmgenet_xmit() function to make the unmapping of control blocks cleaner. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Suggested-by: Florian Fainelli Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 191 +++++++++++-------------- 1 file changed, 85 insertions(+), 106 deletions(-) commit ea6c3077678f969577e0f75aecda9478c3840912 Author: Florian Fainelli Date: Sat Jul 15 10:24:47 2017 -0700 dt-bindings: net: Remove duplicate NSP Ethernet MAC binding document Commit 07d4510f5251 ("dt-bindings: net: bgmac: add bindings documentation for bgmac") added both brcm,amac-nsp.txt and brcm,bgmac-nsp.txt. The former is actually the one that got updated and is in use by the bgmac driver while the latter is duplicating the former and is not used nor updated. Fixes: 07d4510f5251 ("dt-bindings: net: bgmac: add bindings documentation for bgmac") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller .../devicetree/bindings/net/brcm,bgmac-nsp.txt | 24 ---------------------- 1 file changed, 24 deletions(-) commit 2da73d20bb8412a8eebfc6f59da3e124a731817c Merge: 3298456 65f9641 Author: David S. Miller Date: Sat Jul 15 21:25:57 2017 -0700 Merge branch 'isdn-const-pci_device_ids' Arvind Yadav says: ==================== Constify isdn pci_device_id's. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. ==================== Signed-off-by: David S. Miller commit 65f96417363148989bc5b7735b2fc4e824c9d2b9 Author: Arvind Yadav Date: Sat Jul 15 09:55:51 2017 +0530 isdn: avm: c4: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 11803 544 1 12348 303c isdn/hardware/avm/c4.o File size After adding 'const': text data bss dec hex filename 11931 416 1 12348 303c isdn/hardware/avm/c4.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hardware/avm/c4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed038e7e68ca8fc92b5cb877cd44d930ef98c52a Author: Arvind Yadav Date: Sat Jul 15 09:55:50 2017 +0530 isdn: mISDN: hfcpci: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 21656 1024 96 22776 58f8 isdn/hardware/mISDN/hfcpci.o File size After adding 'const': text data bss dec hex filename 22424 256 96 22776 58f8 isdn/hardware/mISDN/hfcpci.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/hfcpci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d9c8fa013cdea5d864f5332d0e203312de3a93d Author: Arvind Yadav Date: Sat Jul 15 09:55:49 2017 +0530 isdn: mISDN: avmfritz: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 9963 1936 16 11915 2e8b isdn/hardware/mISDN/avmfritz.o File size After adding 'const': text data bss dec hex filename 10091 1808 16 11915 2e8b isdn/hardware/mISDN/avmfritz.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/avmfritz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8336ed0b35261603871a6c5e829f69051530505 Author: Arvind Yadav Date: Sat Jul 15 09:55:48 2017 +0530 isdn: mISDN: w6692: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 13959 4080 24 18063 468f isdn/hardware/mISDN/w6692.o File size After adding 'const': text data bss dec hex filename 14087 3952 24 18063 468f isdn/hardware/mISDN/w6692.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/w6692.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3b79fcff622fb5537d40db30fc9a2632d6a8456 Author: Arvind Yadav Date: Sat Jul 15 09:55:47 2017 +0530 isdn: mISDN: hfcmulti: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 63450 1536 1492 66478 103ae isdn/hardware/mISDN/hfcmulti.o File size After adding 'const': text data bss dec hex filename 64698 288 1492 66478 103ae isdn/hardware/mISDN/hfcmulti.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/hfcmulti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d41668987f5c0df5ad5b5e1e3bf69aaf4b36c52 Author: Arvind Yadav Date: Sat Jul 15 09:55:46 2017 +0530 isdn: mISDN: netjet: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 10941 1776 16 12733 31bd isdn/hardware/mISDN/netjet.o File size After adding 'const': text data bss dec hex filename 11005 1712 16 12733 31bd isdn/hardware/mISDN/netjet.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/netjet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf46d3518934bc61d9a01eb25aaaa364f325f876 Author: Arvind Yadav Date: Sat Jul 15 09:55:45 2017 +0530 isdn: eicon: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 6224 655 8 6887 1ae7 isdn/hardware/eicon/divasmain.o File size After adding 'const': text data bss dec hex filename 6608 271 8 6887 1ae7 isdn/hardware/eicon/divasmain.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hardware/eicon/divasmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cfc3d86be2647686c8eebe41df69e5cd37dd8e6 Author: Arvind Yadav Date: Sat Jul 15 09:55:44 2017 +0530 isdn: hisax: hisax_fcpcipnp: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 5989 576 0 6565 19a5 isdn/hisax/hisax_fcpcipnp.o File size After adding 'const': text data bss dec hex filename 6085 480 0 6565 19a5 isdn/hisax/hisax_fcpcipnp.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/hisax_fcpcipnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3651003d4fd805c3a7761d1db3a7491d5547afb3 Author: Arvind Yadav Date: Sat Jul 15 09:55:43 2017 +0530 isdn: hisax: hfc4s8s_l1: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 10512 536 4 11052 2b2c drivers/isdn/hisax/hfc4s8s_l1.o File size After adding 'const': text data bss dec hex filename 10672 376 4 11052 2b2c drivers/isdn/hisax/hfc4s8s_l1.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/hfc4s8s_l1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd7b03e9cc94f249ae3b54cf5a41d4b9fb297e0b Author: Arvind Yadav Date: Sat Jul 15 09:55:42 2017 +0530 isdn: hisax: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 13686 2064 4416 20166 4ec6 drivers/isdn/hisax/config.o File size After adding 'const': text data bss dec hex filename 15030 720 4416 20166 4ec6 drivers/isdn/hisax/config.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c925dc162f770578ff4a65ec9b08270382dba9e6 Author: Jaegeuk Kim Date: Tue Jul 11 14:56:49 2017 -0700 f2fs: Don't clear SGID when inheriting ACLs This patch copies commit b7f8a09f80: "btrfs: Don't clear SGID when inheriting ACLs" written by Jan. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: stable@vger.kernel.org Signed-off-by: Jan Kara Reviewed-by: Chao Yu Reviewed-by: Jan Kara Signed-off-by: Jaegeuk Kim fs/f2fs/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ffff2854a0b88fdd279fdb9cbf053d16c8fb2d6 Author: Luis Henriques Date: Tue Jul 11 17:30:33 2017 +0100 f2fs: remove extra inode_unlock() in error path This commit removes an extra inode_unlock() that is being done in function f2fs_ioc_setflags error path. While there, get rid of a useless 'out' label as well. Fixes: 0abd675e97e6 ("f2fs: support plain user/group quota") Signed-off-by: Luis Henriques Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 05969566e6d64113a861adc6c17cbba685c640b3 Author: Fabio Estevam Date: Fri Jun 30 17:43:02 2017 -0300 ARM: dts: imx7d-sdb: Put pinctrl_spi4 in the correct location pinctrl_spi4 pin group is not part of the low power iomux controller, so move it under the normal iomuxc node. Fixes: 184f39b57cab6 ("ARM: dts: imx7d-sdb: Add GPIO expander node") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-sdb.dts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1009ccdc64ee2c8451f76b548589f6b989d13412 Author: Guenter Roeck Date: Tue Jul 11 20:53:55 2017 -0700 hwmon: (applesmc) Avoid buffer overruns gcc 7.1 complains that the driver uses sprintf() and thus does not validate the length of output buffers. drivers/hwmon/applesmc.c: In function 'applesmc_show_fan_position': drivers/hwmon/applesmc.c:82:21: warning: '%d' directive writing between 1 and 5 bytes into a region of size 4 Fix the problem by using scnprintf() instead of sprintf() throughout the driver. Also explicitly limit the number of supported fans to avoid actual buffer overruns and thus invalid keys. Signed-off-by: Guenter Roeck drivers/hwmon/applesmc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 Author: Linus Torvalds Date: Sat Jul 15 15:22:10 2017 -0700 Linux v4.13-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32984565574da7ed3afa10647bb4020d7a9e6c93 Author: Neal Cardwell Date: Fri Jul 14 17:49:25 2017 -0400 tcp_bbr: init pacing rate on first RTT sample Fixes the following behavior: for connections that had no RTT sample at the time of initializing congestion control, BBR was initializing the pacing rate to a high nominal rate (based an a guess of RTT=1ms, in case this is LAN traffic). Then BBR never adjusted the pacing rate downward upon obtaining an actual RTT sample, if the connection never filled the pipe (e.g. all sends were small app-limited writes()). This fix adjusts the pacing rate upon obtaining the first RTT sample. Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control") Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1d3648eb5d1fe9ed3d095ed8fa19ad11ca4c8bc0 Author: Neal Cardwell Date: Fri Jul 14 17:49:24 2017 -0400 tcp_bbr: remove sk_pacing_rate=0 transient during init Fix a corner case noticed by Eric Dumazet, where BBR's setting sk->sk_pacing_rate to 0 during initialization could theoretically cause packets in the sending host to hang if there were packets "in flight" in the pacing infrastructure at the time the BBR congestion control state is initialized. This could occur if the pacing infrastructure happened to race with bbr_init() in a way such that the pacer read the 0 rather than the immediately following non-zero pacing rate. Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control") Reported-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 1 - 1 file changed, 1 deletion(-) commit 79135b89b8af304456bd67916b80116ddf03d7b6 Author: Neal Cardwell Date: Fri Jul 14 17:49:23 2017 -0400 tcp_bbr: introduce bbr_init_pacing_rate_from_rtt() helper Introduce a helper to initialize the BBR pacing rate unconditionally, based on the current cwnd and RTT estimate. This is a pure refactor, but is needed for two following fixes. Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control") Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit f19fd62dafaf1ed6cf615dba655b82fa9df59074 Author: Neal Cardwell Date: Fri Jul 14 17:49:22 2017 -0400 tcp_bbr: introduce bbr_bw_to_pacing_rate() helper Introduce a helper to convert a BBR bandwidth and gain factor to a pacing rate in bytes per second. This is a pure refactor, but is needed for two following fixes. Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control") Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 4aea287e90dd61a48268ff2994b56f9799441b62 Author: Neal Cardwell Date: Fri Jul 14 17:49:21 2017 -0400 tcp_bbr: cut pacing rate only if filled pipe In bbr_set_pacing_rate(), which decides whether to cut the pacing rate, there was some code that considered exiting STARTUP to be equivalent to the notion of filling the pipe (i.e., bbr_full_bw_reached()). Specifically, as the code was structured, exiting STARTUP and going into PROBE_RTT could cause us to cut the pacing rate down to something silly and low, based on whatever bandwidth samples we've had so far, when it's possible that all of them have been small app-limited bandwidth samples that are not representative of the bandwidth available in the path. (The code was correct at the time it was written, but the state machine changed without this spot being adjusted correspondingly.) Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control") Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8b97ac5bda17cfaa257bcab6180af0f43a2e87e0 Author: Greg Rose Date: Fri Jul 14 12:42:49 2017 -0700 openvswitch: Fix for force/commit action failures When there is an established connection in direction A->B, it is possible to receive a packet on port B which then executes ct(commit,force) without first performing ct() - ie, a lookup. In this case, we would expect that this packet can delete the existing entry so that we can commit a connection with direction B->A. However, currently we only perform a check in skb_nfct_cached() for whether OVS_CS_F_TRACKED is set and OVS_CS_F_INVALID is not set, ie that a lookup previously occurred. In the above scenario, a lookup has not occurred but we should still be able to statelessly look up the existing entry and potentially delete the entry if it is in the opposite direction. This patch extends the check to also hint that if the action has the force flag set, then we will lookup the existing entry so that the force check at the end of skb_nfct_cached has the ability to delete the connection. Fixes: dd41d330b03 ("openvswitch: Add force commit.") CC: Pravin Shelar CC: dev@openvswitch.org Signed-off-by: Joe Stringer Signed-off-by: Greg Rose Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 51 ++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 15 deletions(-) commit b1f5bfc27a19f214006b9b4db7b9126df2dfdf5a Author: Alexander Potapenko Date: Fri Jul 14 18:32:45 2017 +0200 sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}() If the length field of the iterator (|pos.p| or |err|) is past the end of the chunk, we shouldn't access it. This bug has been detected by KMSAN. For the following pair of system calls: socket(PF_INET6, SOCK_STREAM, 0x84 /* IPPROTO_??? */) = 3 sendto(3, "A", 1, MSG_OOB, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 1 the tool has reported a use of uninitialized memory: ================================================================== BUG: KMSAN: use of uninitialized memory in sctp_rcv+0x17b8/0x43b0 CPU: 1 PID: 2940 Comm: probe Not tainted 4.11.0-rc5+ #2926 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 dump_stack+0x172/0x1c0 lib/dump_stack.c:52 kmsan_report+0x12a/0x180 mm/kmsan/kmsan.c:927 __msan_warning_32+0x61/0xb0 mm/kmsan/kmsan_instr.c:469 __sctp_rcv_init_lookup net/sctp/input.c:1074 __sctp_rcv_lookup_harder net/sctp/input.c:1233 __sctp_rcv_lookup net/sctp/input.c:1255 sctp_rcv+0x17b8/0x43b0 net/sctp/input.c:170 sctp6_rcv+0x32/0x70 net/sctp/ipv6.c:984 ip6_input_finish+0x82f/0x1ee0 net/ipv6/ip6_input.c:279 NF_HOOK ./include/linux/netfilter.h:257 ip6_input+0x239/0x290 net/ipv6/ip6_input.c:322 dst_input ./include/net/dst.h:492 ip6_rcv_finish net/ipv6/ip6_input.c:69 NF_HOOK ./include/linux/netfilter.h:257 ipv6_rcv+0x1dbd/0x22e0 net/ipv6/ip6_input.c:203 __netif_receive_skb_core+0x2f6f/0x3a20 net/core/dev.c:4208 __netif_receive_skb net/core/dev.c:4246 process_backlog+0x667/0xba0 net/core/dev.c:4866 napi_poll net/core/dev.c:5268 net_rx_action+0xc95/0x1590 net/core/dev.c:5333 __do_softirq+0x485/0x942 kernel/softirq.c:284 do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:902 do_softirq kernel/softirq.c:328 __local_bh_enable_ip+0x25b/0x290 kernel/softirq.c:181 local_bh_enable+0x37/0x40 ./include/linux/bottom_half.h:31 rcu_read_unlock_bh ./include/linux/rcupdate.h:931 ip6_finish_output2+0x19b2/0x1cf0 net/ipv6/ip6_output.c:124 ip6_finish_output+0x764/0x970 net/ipv6/ip6_output.c:149 NF_HOOK_COND ./include/linux/netfilter.h:246 ip6_output+0x456/0x520 net/ipv6/ip6_output.c:163 dst_output ./include/net/dst.h:486 NF_HOOK ./include/linux/netfilter.h:257 ip6_xmit+0x1841/0x1c00 net/ipv6/ip6_output.c:261 sctp_v6_xmit+0x3b7/0x470 net/sctp/ipv6.c:225 sctp_packet_transmit+0x38cb/0x3a20 net/sctp/output.c:632 sctp_outq_flush+0xeb3/0x46e0 net/sctp/outqueue.c:885 sctp_outq_uncork+0xb2/0xd0 net/sctp/outqueue.c:750 sctp_side_effects net/sctp/sm_sideeffect.c:1773 sctp_do_sm+0x6962/0x6ec0 net/sctp/sm_sideeffect.c:1147 sctp_primitive_ASSOCIATE+0x12c/0x160 net/sctp/primitive.c:88 sctp_sendmsg+0x43e5/0x4f90 net/sctp/socket.c:1954 inet_sendmsg+0x498/0x670 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 sock_sendmsg net/socket.c:643 SYSC_sendto+0x608/0x710 net/socket.c:1696 SyS_sendto+0x8a/0xb0 net/socket.c:1664 do_syscall_64+0xe6/0x130 arch/x86/entry/common.c:285 entry_SYSCALL64_slow_path+0x25/0x25 arch/x86/entry/entry_64.S:246 RIP: 0033:0x401133 RSP: 002b:00007fff6d99cd38 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00000000004002b0 RCX: 0000000000401133 RDX: 0000000000000001 RSI: 0000000000494088 RDI: 0000000000000003 RBP: 00007fff6d99cd90 R08: 00007fff6d99cd50 R09: 000000000000001c R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 R13: 00000000004063d0 R14: 0000000000406460 R15: 0000000000000000 origin: save_stack_trace+0x37/0x40 arch/x86/kernel/stacktrace.c:59 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:302 kmsan_internal_poison_shadow+0xb1/0x1a0 mm/kmsan/kmsan.c:198 kmsan_poison_shadow+0x6d/0xc0 mm/kmsan/kmsan.c:211 slab_alloc_node mm/slub.c:2743 __kmalloc_node_track_caller+0x200/0x360 mm/slub.c:4351 __kmalloc_reserve net/core/skbuff.c:138 __alloc_skb+0x26b/0x840 net/core/skbuff.c:231 alloc_skb ./include/linux/skbuff.h:933 sctp_packet_transmit+0x31e/0x3a20 net/sctp/output.c:570 sctp_outq_flush+0xeb3/0x46e0 net/sctp/outqueue.c:885 sctp_outq_uncork+0xb2/0xd0 net/sctp/outqueue.c:750 sctp_side_effects net/sctp/sm_sideeffect.c:1773 sctp_do_sm+0x6962/0x6ec0 net/sctp/sm_sideeffect.c:1147 sctp_primitive_ASSOCIATE+0x12c/0x160 net/sctp/primitive.c:88 sctp_sendmsg+0x43e5/0x4f90 net/sctp/socket.c:1954 inet_sendmsg+0x498/0x670 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 sock_sendmsg net/socket.c:643 SYSC_sendto+0x608/0x710 net/socket.c:1696 SyS_sendto+0x8a/0xb0 net/socket.c:1664 do_syscall_64+0xe6/0x130 arch/x86/entry/common.c:285 return_from_SYSCALL_64+0x0/0x6a arch/x86/entry/entry_64.S:246 ================================================================== Signed-off-by: Alexander Potapenko Signed-off-by: David S. Miller include/net/sctp/sctp.h | 4 ++++ 1 file changed, 4 insertions(+) commit 254d900b801fc04aa524ff7bafe28fdd1dbf0ed6 Author: Vasily Averin Date: Fri Jul 14 12:04:16 2017 +0300 ipv4: ip_do_fragment: fix headroom tests Some time ago David Woodhouse reported skb_under_panic when we try to push ethernet header to fragmented ipv6 skbs. It was fixed for ipv6 by Florian Westphal in commit 1d325d217c7f ("ipv6: ip6_fragment: fix headroom tests and skb leak") However similar problem still exist in ipv4. It does not trigger skb_under_panic due paranoid check in ip_finish_output2, however according to Alexey Kuznetsov current state is abnormal and ip_fragment should be fixed too. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller net/ipv4/ip_output.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e36fef66f4bbe8a51e8f8334a058a42c0f16e373 Author: Zhu Yanjun Date: Thu Jul 13 23:01:27 2017 -0400 mlx4_en: remove unnecessary returned value check The function __mlx4_zone_remove_one_entry always returns zero. So it is not necessary to check it. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/alloc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit dfcc16c9d5b9c9c38fe18a91da63ab5af05d96ca Author: Jason A. Donenfeld Date: Mon Jul 10 14:00:32 2017 +0200 ioc3-eth: store pointer to net_device for priviate area Computing the alignment manually for going from priv to pub is probably not such a good idea, and in general the assumption that going from priv to pub is possible trivially could change, so rather than relying on that, we change things to just store a pointer to pub. This was sugested by DaveM in [1]. [1] http://www.spinics.net/lists/netdev/msg443992.html Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller drivers/net/ethernet/sgi/ioc3-eth.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 521ea95225e3258feea2d725140c691588553b63 Merge: 10b3bf5 10d79f7 Author: David S. Miller Date: Sat Jul 15 14:28:28 2017 -0700 Merge branch 'bgmac-stingray-soc' Abhishek Shah says: ==================== Extend BGMAC driver for Stingray SoC The patchset extends Broadcom BGMAC driver for Broadcom Stingray SoC. This patchset is based on Linux-4.12 and tested on NS2 and Stingray. ==================== Signed-off-by: David S. Miller commit 10d79f7d3c8358f13dc23619838b0d65bcc6e2af Author: Abhishek Shah Date: Fri Jul 14 00:34:09 2017 +0530 Documentation: devicetree: net: optional idm regs for bgmac Specifying IDM register space in DT is not mendatory for SoCs where firmware takes care of IDM operations. This patch updates BGMAC driver's DT binding documentation indicating the same. Signed-off-by: Abhishek Shah Reviewed-by: Ray Jui Reviewed-by: Oza Oza Reviewed-by: Scott Branden Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/brcm,amac.txt | 1 + 1 file changed, 1 insertion(+) commit a163bdb02beb7df8b2768ce7c74a2b17803c96f9 Author: Abhishek Shah Date: Fri Jul 14 00:34:08 2017 +0530 net: ethernet: bgmac: Make IDM register space optional IDM operations are usually one time ops and should be done in firmware itself. Driver is not supposed to touch IDM registers. However, for some SoCs', driver is performing IDM read/writes. So this patch masks IDM operations in case firmware is taking care of IDM operations. Signed-off-by: Abhishek Shah Reviewed-by: Oza Oza Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-platform.c | 19 ++++--- drivers/net/ethernet/broadcom/bgmac.c | 70 +++++++++++++++----------- drivers/net/ethernet/broadcom/bgmac.h | 1 + 3 files changed, 55 insertions(+), 35 deletions(-) commit 83a5c5af26ef8005caebd50ce62383a02c5bae82 Author: Abhishek Shah Date: Fri Jul 14 00:34:07 2017 +0530 net: ethernet: bgmac: Remove unnecessary 'return' from platform_bgmac_idm_write Return type for idm register write callback should be void as 'writel' API is used for write operation. However, there no need to have 'return' in this function. Signed-off-by: Abhishek Shah Reviewed-by: Oza Oza Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 486088bc4689f826b80aa317b45ac9e42e8b25ee Merge: 52f6c58 43e5f7e Author: Linus Torvalds Date: Sat Jul 15 12:58:58 2017 -0700 Merge tag 'standardize-docs' of git://git.lwn.net/linux Pull documentation format standardization from Jonathan Corbet: "This series converts a number of top-level documents to the RST format without incorporating them into the Sphinx tree. The hope is to bring some uniformity to kernel documentation and, perhaps more importantly, have our existing docs serve as an example of the desired formatting for those that will be added later. Mauro has gone through and fixed up a lot of top-level documentation files to make them conform to the RST format, but without moving or renaming them in any way. This will help when we incorporate the ones we want to keep into the Sphinx doctree, but the real purpose is to bring a bit of uniformity to our documentation and let the top-level docs serve as examples for those writing new ones" * tag 'standardize-docs' of git://git.lwn.net/linux: (84 commits) docs: kprobes.txt: Fix whitespacing tee.txt: standardize document format cgroup-v2.txt: standardize document format dell_rbu.txt: standardize document format zorro.txt: standardize document format xz.txt: standardize document format xillybus.txt: standardize document format vfio.txt: standardize document format vfio-mediated-device.txt: standardize document format unaligned-memory-access.txt: standardize document format this_cpu_ops.txt: standardize document format svga.txt: standardize document format static-keys.txt: standardize document format smsc_ece1099.txt: standardize document format SM501.txt: standardize document format siphash.txt: standardize document format sgi-ioc4.txt: standardize document format SAK.txt: standardize document format rpmsg.txt: standardize document format robust-futexes.txt: standardize document format ... commit 52f6c588c77b76d548201470c2a28263a41b462b Merge: 78dcf73 72e5c74 Author: Linus Torvalds Date: Sat Jul 15 12:44:02 2017 -0700 Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull random updates from Ted Ts'o: "Add wait_for_random_bytes() and get_random_*_wait() functions so that callers can more safely get random bytes if they can block until the CRNG is initialized. Also print a warning if get_random_*() is called before the CRNG is initialized. By default, only one single-line warning will be printed per boot. If CONFIG_WARN_ALL_UNSEEDED_RANDOM is defined, then a warning will be printed for each function which tries to get random bytes before the CRNG is initialized. This can get spammy for certain architecture types, so it is not enabled by default" * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: reorder READ_ONCE() in get_random_uXX random: suppress spammy warnings about unseeded randomness random: warn when kernel uses unseeded randomness net/route: use get_random_int for random counter net/neighbor: use get_random_u32 for 32-bit hash random rhashtable: use get_random_u32 for hash_rnd ceph: ensure RNG is seeded before using iscsi: ensure RNG is seeded before use cifs: use get_random_u32 for 32-bit lock random random: add get_random_{bytes,u32,u64,int,long,once}_wait family random: add wait_for_random_bytes() API commit 78dcf73421a879d22319d3889119945b85954a68 Merge: 93ff818 fdb254d Author: Linus Torvalds Date: Sat Jul 15 12:00:42 2017 -0700 Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull ->s_options removal from Al Viro: "Preparations for fsmount/fsopen stuff (coming next cycle). Everything gets moved to explicit ->show_options(), killing ->s_options off + some cosmetic bits around fs/namespace.c and friends. Basically, the stuff needed to work with fsmount series with minimum of conflicts with other work. It's not strictly required for this merge window, but it would reduce the PITA during the coming cycle, so it would be nice to have those bits and pieces out of the way" * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: isofs: Fix isofs_show_options() VFS: Kill off s_options and helpers orangefs: Implement show_options 9p: Implement show_options isofs: Implement show_options afs: Implement show_options affs: Implement show_options befs: Implement show_options spufs: Implement show_options bpf: Implement show_options ramfs: Implement show_options pstore: Implement show_options omfs: Implement show_options hugetlbfs: Implement show_options VFS: Don't use save/replace_mount_options if not using generic_show_options VFS: Provide empty name qstr VFS: Make get_filesystem() return the affected filesystem VFS: Clean up whitespace in fs/namespace.c and fs/super.c Provide a function to create a NUL-terminated string from unterminated data commit 93ff81859733d9697a5a0cc4707e52fb17056abb Merge: 89cbec7 3941dae Author: Linus Torvalds Date: Sat Jul 15 11:47:27 2017 -0700 Merge branch 'work.__copy_to_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull more __copy_.._user elimination from Al Viro. * 'work.__copy_to_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: drm_dp_aux_dev: switch to read_iter/write_iter commit 89cbec71fead552fdd1fa38c57186669dfbba734 Merge: 2173bd0 3170d8d Author: Linus Torvalds Date: Sat Jul 15 11:17:52 2017 -0700 Merge branch 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull uacess-unaligned removal from Al Viro: "That stuff had just one user, and an exotic one, at that - binfmt_flat on arm and m68k" * 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: kill {__,}{get,put}_user_unaligned() binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail commit 2173bd06315109ec73e7a6077c11469bd41d400b Merge: 568d135d f8f8a72 Author: Linus Torvalds Date: Sat Jul 15 11:06:17 2017 -0700 Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull network field-by-field copy-in updates from Al Viro: "This part of the misc compat queue was held back for review from networking folks and since davem has jus ACKed those..." * 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: get_compat_bpf_fprog(): don't copyin field-by-field get_compat_msghdr(): get rid of field-by-field copyin copy_msghdr_from_user(): get rid of field-by-field copyin commit 568d135d337d3114688fef9fdbce7fb6dbbd04c7 Merge: 4ecd4ff d40e0d4 Author: Linus Torvalds Date: Sat Jul 15 10:59:54 2017 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS updates from Ralf Baechle: "Boston platform support: - Document DT bindings - Add CLK driver for board clocks CM: - Avoid per-core locking with CM3 & higher - WARN on attempt to lock invalid VP, not BUG CPS: - Select CONFIG_SYS_SUPPORTS_SCHED_SMT for MIPSr6 - Prevent multi-core with dcache aliasing - Handle cores not powering down more gracefully - Handle spurious VP starts more gracefully DSP: - Add lwx & lhx missaligned access support eBPF: - Add MIPS support along with many supporting change to add the required infrastructure Generic arch code: - Misc sysmips MIPS_ATOMIC_SET fixes - Drop duplicate HAVE_SYSCALL_TRACEPOINTS - Negate error syscall return in trace - Correct forced syscall errors - Traced negative syscalls should return -ENOSYS - Allow samples/bpf/tracex5 to access syscall arguments for sane traces - Cleanup from old Kconfig options in defconfigs - Fix PREF instruction usage by memcpy for MIPS R6 - Fix various special cases in the FPU eulation - Fix some special cases in MIPS16e2 support - Fix MIPS I ISA /proc/cpuinfo reporting - Sort MIPS Kconfig alphabetically - Fix minimum alignment requirement of IRQ stack as required by ABI / GCC - Fix special cases in the module loader - Perform post-DMA cache flushes on systems with MAARs - Probe the I6500 CPU - Cleanup cmpxchg and add support for 1 and 2 byte operations - Use queued read/write locks (qrwlock) - Use queued spinlocks (qspinlock) - Add CPU shared FTLB feature detection - Handle tlbex-tlbp race condition - Allow storing pgd in C0_CONTEXT for MIPSr6 - Use current_cpu_type() in m4kc_tlbp_war() - Support Boston in the generic kernel Generic platform: - yamon-dt: Pull YAMON DT shim code out of SEAD-3 board - yamon-dt: Support > 256MB of RAM - yamon-dt: Use serial* rather than uart* aliases - Abstract FDT fixup application - Set RTC_ALWAYS_BCD to 0 - Add a MAINTAINERS entry core kernel: - qspinlock.c: include linux/prefetch.h Loongson 3: - Add support Perf: - Add I6500 support SEAD-3: - Remove GIC timer from DT - Set interrupt-parent per-device, not at root node - Fix GIC interrupt specifiers SMP: - Skip IPI setup if we only have a single CPU VDSO: - Make comment match reality - Improvements to time code in VDSO" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (86 commits) locking/qspinlock: Include linux/prefetch.h MIPS: Fix MIPS I ISA /proc/cpuinfo reporting MIPS: Fix minimum alignment requirement of IRQ stack MIPS: generic: Support MIPS Boston development boards MIPS: DTS: img: Don't attempt to build-in all .dtb files clk: boston: Add a driver for MIPS Boston board clocks dt-bindings: Document img,boston-clock binding MIPS: Traced negative syscalls should return -ENOSYS MIPS: Correct forced syscall errors MIPS: Negate error syscall return in trace MIPS: Drop duplicate HAVE_SYSCALL_TRACEPOINTS select MIPS16e2: Provide feature overrides for non-MIPS16 systems MIPS: MIPS16e2: Report ASE presence in /proc/cpuinfo MIPS: MIPS16e2: Subdecode extended LWSP/SWSP instructions MIPS: MIPS16e2: Identify ASE presence MIPS: VDSO: Fix a mismatch between comment and preprocessor constant MIPS: VDSO: Add implementation of gettimeofday() fallback MIPS: VDSO: Add implementation of clock_gettime() fallback MIPS: VDSO: Fix conversions in do_monotonic()/do_monotonic_coarse() MIPS: Use current_cpu_type() in m4kc_tlbp_war() ... commit 4ecd4ff55ac5c7fe9e232f34a41c4d54f2d825c1 Merge: 966859b 61e8d46 Author: Linus Torvalds Date: Sat Jul 15 10:49:33 2017 -0700 Merge branch 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: "Mostly fixes for UML: - First round of fixes for PTRACE_GETRESET/SETREGSET - A printf vs printk cleanup - Minor improvements" * 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Correctly check for PTRACE_GETRESET/SETREGSET um: v2: Use generic NOTES macro um: Add kerneldoc for userspace_tramp() and start_userspace() um: Add kerneldoc for segv_handler um: stub-data.h: remove superfluous include um: userspace - be more verbose in ptrace set regs error um: add dummy ioremap and iounmap functions um: Allow building and running on older hosts um: Avoid longjmp/setjmp symbol clashes with libpthread.a um: console: Ignore console= option um: Use os_warn to print out pre-boot warning/error messages um: Add os_warn() for pre-boot warning/error messages um: Use os_info for the messages on normal path um: Add os_info() for pre-boot information messages um: Use printk instead of printf in make_uml_dir commit 966859b9f73de9bcc14dece604ced6c0c562075b Merge: e37a07e a666443 Author: Linus Torvalds Date: Sat Jul 15 10:46:14 2017 -0700 Merge tag 'upstream-4.13-rc1' of git://git.infradead.org/linux-ubifs Pull UBIFS updates from Richard Weinberger: - Updates and fixes for the file encryption mode - Minor improvements - Random fixes * tag 'upstream-4.13-rc1' of git://git.infradead.org/linux-ubifs: ubifs: Set double hash cookie also for RENAME_EXCHANGE ubifs: Massage assert in ubifs_xattr_set() wrt. init_xattrs ubifs: Don't leak kernel memory to the MTD ubifs: Change gfp flags in page allocation for bulk read ubifs: Fix oops when remounting with no_bulk_read. ubifs: Fail commit if TNC is obviously inconsistent ubifs: allow userspace to map mounts to volumes ubifs: Wire-up statx() support ubifs: Remove dead code from ubifs_get_link() ubifs: Massage debug prints wrt. fscrypt ubifs: Add assert to dent_key_init() ubifs: Fix unlink code wrt. double hash lookups ubifs: Fix data node size for truncating uncompressed nodes ubifs: Don't encrypt special files on creation ubifs: Fix memory leak in RENAME_WHITEOUT error path in do_rename ubifs: Fix inode data budget in ubifs_mknod ubifs: Correctly evict xattr inodes ubifs: Unexport ubifs_inode_slab ubifs: don't bother checking for encryption key in ->mmap() ubifs: require key for truncate(2) of encrypted file commit e37a07e0c29cd2cef4633b1e6db5579cc99ba4cd Merge: a80099a d3457c8 Author: Linus Torvalds Date: Sat Jul 15 10:18:16 2017 -0700 Merge tag 'kvm-4.13-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more KVM updates from Radim Krčmář: "Second batch of KVM updates for v4.13 Common: - add uevents for VM creation/destruction - annotate and properly access RCU-protected objects s390: - rename IOCTL added in the first v4.13 merge x86: - emulate VMLOAD VMSAVE feature in SVM - support paravirtual asynchronous page fault while nested - add Hyper-V userspace interfaces for better migration - improve master clock corner cases - extend internal error reporting after EPT misconfig - correct single-stepping of emulated instructions in SVM - handle MCE during VM entry - fix nVMX VM entry checks and nVMX VMCS shadowing" * tag 'kvm-4.13-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits) kvm: x86: hyperv: make VP_INDEX managed by userspace KVM: async_pf: Let guest support delivery of async_pf from guest mode KVM: async_pf: Force a nested vmexit if the injected #PF is async_pf KVM: async_pf: Add L1 guest async_pf #PF vmexit handler KVM: x86: Simplify kvm_x86_ops->queue_exception parameter list kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2 KVM: x86: make backwards_tsc_observed a per-VM variable KVM: trigger uevents when creating or destroying a VM KVM: SVM: Enable Virtual VMLOAD VMSAVE feature KVM: SVM: Add Virtual VMLOAD VMSAVE feature definition KVM: SVM: Rename lbr_ctl field in the vmcb control area KVM: SVM: Prepare for new bit definition in lbr_ctl KVM: SVM: handle singlestep exception when skipping emulated instructions KVM: x86: take slots_lock in kvm_free_pit KVM: s390: Fix KVM_S390_GET_CMMA_BITS ioctl definition kvm: vmx: Properly handle machine check during VM-entry KVM: x86: update master clock before computing kvmclock_offset kvm: nVMX: Shadow "high" parts of shadowed 64-bit VMCS fields kvm: nVMX: Fix nested_vmx_check_msr_bitmap_controls kvm: nVMX: Validate the I/O bitmaps on nested VM-entry ... commit 72e5c740f6335e27253b8ff64d23d00337091535 Author: Sebastian Andrzej Siewior Date: Fri Jun 30 16:37:13 2017 +0200 random: reorder READ_ONCE() in get_random_uXX Avoid the READ_ONCE in commit 4a072c71f49b ("random: silence compiler warnings and fix race") if we can leave the function after arch_get_random_XXX(). Cc: Jason A. Donenfeld Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Theodore Ts'o drivers/char/random.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit eecabf567422eda02bd179f2707d8fe24f52d888 Author: Theodore Ts'o Date: Thu Jun 8 04:16:59 2017 -0400 random: suppress spammy warnings about unseeded randomness Unfortunately, on some models of some architectures getting a fully seeded CRNG is extremely difficult, and so this can result in dmesg getting spammed for a surprisingly long time. This is really bad from a security perspective, and so architecture maintainers really need to do what they can to get the CRNG seeded sooner after the system is booted. However, users can't do anything actionble to address this, and spamming the kernel messages log will only just annoy people. For developers who want to work on improving this situation, CONFIG_WARN_UNSEEDED_RANDOM has been renamed to CONFIG_WARN_ALL_UNSEEDED_RANDOM. By default the kernel will always print the first use of unseeded randomness. This way, hopefully the security obsessed will be happy that there is _some_ indication when the kernel boots there may be a potential issue with that architecture or subarchitecture. To see all uses of unseeded randomness, developers can enable CONFIG_WARN_ALL_UNSEEDED_RANDOM. Signed-off-by: Theodore Ts'o drivers/char/random.c | 56 +++++++++++++++++++++++++++++++++++---------------- lib/Kconfig.debug | 24 ++++++++++++++++------ 2 files changed, 57 insertions(+), 23 deletions(-) commit 105967ad68d2eb1a041bc041f9cf96af2a653b65 Author: Arnd Bergmann Date: Fri Jul 14 11:31:03 2017 +0200 staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read gcc-7 points out an older regression: drivers/staging/iio/resolver/ad2s1210.c: In function 'ad2s1210_read_raw': drivers/staging/iio/resolver/ad2s1210.c:515:42: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] The original code had 'unsigned short' here, but incorrectly got converted to 'bool'. This reverts the regression and uses a normal type instead. Fixes: 29148543c521 ("staging:iio:resolver:ad2s1210 minimal chan spec conversion.") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Jonathan Cameron drivers/staging/iio/resolver/ad2s1210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ac1d1532c888b030acb3b4ac82425448cb15198 Author: Simon Horman Date: Tue Jul 11 13:44:20 2017 +0200 ata: sata_rcar: add gen[23] fallback compatibility strings Add fallback compatibility string for R-Car Gen 2 and 3. In the case of Renesas R-Car hardware we know that there are generations of SoCs, e.g. Gen 1 and 2. But beyond that its not clear what the relationship between IP blocks might be. For example, I believe that r8a7790 is older than r8a7791 but that doesn't imply that the latter is a descendant of the former or vice versa. We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation. For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme being adopted for drivers for Renesas SoCs. Signed-off-by: Simon Horman Acked-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Tejun Heo Documentation/devicetree/bindings/ata/sata_rcar.txt | 14 +++++++++++--- drivers/ata/sata_rcar.c | 8 ++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) commit ae867937009397649db2284d32ff7c9a1a2c3665 Author: Kefeng Wang Date: Thu Jul 13 16:07:58 2017 +0800 libata: remove unused rc in ata_eh_handle_port_resume Remove unused variable ‘rc’. Signed-off-by: Kefeng Wang Signed-off-by: Tejun Heo drivers/ata/libata-eh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 74ec118152ea494a25ebb677cbc83a75c982ac5f Author: Daniel Dadap Date: Thu Jul 13 19:27:39 2017 -0500 ALSA: hda - Add missing NVIDIA GPU codec IDs to patch table Add codec IDs for several recently released, pending, and historical NVIDIA GPU audio controllers to the patch table, to allow the correct patch functions to be selected for them. Signed-off-by: Daniel Dadap Reviewed-by: Andy Ritger Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit a80099a152d0719e2d8d750e07f4ffa991553d30 Merge: bc24370 d6ab17f Author: Linus Torvalds Date: Fri Jul 14 22:57:32 2017 -0700 Merge tag 'xfs-4.13-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS fixes from Darrick Wong: "Largely debugging and regression fixes. - Add some locking assertions for the _ilock helpers. - Revert the XFS_QMOPT_NOLOCK patch; after discussion with hch the online fsck patch that would have needed it has been redesigned and no longer needs it. - Fix behavioral regression of SEEK_HOLE/DATA with negative offsets to match 4.12-era XFS behavior" * tag 'xfs-4.13-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: vfs: in iomap seek_{hole,data}, return -ENXIO for negative offsets Revert "xfs: grab dquots without taking the ilock" xfs: assert locking precondition in xfs_readlink_bmap_ilocked xfs: assert locking precondіtion in xfs_attr_list_int_ilocked xfs: fixup xfs_attr_get_ilocked commit bc243704fb3c97f3631994bbe543782a09482afb Merge: 0ffff11 c3cfb65 Author: Linus Torvalds Date: Fri Jul 14 22:55:52 2017 -0700 Merge branch 'for-4.13-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "We've identified and fixed a silent corruption (introduced by code in the first pull), a fixup after the blk_status_t merge and two fixes to incremental send that Filipe has been hunting for some time" * 'for-4.13-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix unexpected return value of bio_readpage_error btrfs: btrfs_create_repair_bio never fails, skip error handling btrfs: cloned bios must not be iterated by bio_for_each_segment_all Btrfs: fix write corruption due to bio cloning on raid5/6 Btrfs: incremental send, fix invalid memory access Btrfs: incremental send, fix invalid path for link commands commit 0ffff118b16b1201801d002ff9fa2eecdb45c529 Merge: dcf903d dda5202 Author: Linus Torvalds Date: Fri Jul 14 22:53:37 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull a few more input updates from Dmitry Torokhov: - multi-touch handling for Xen - fix for long-standing bug causing crashes in i8042 on boot - change to gpio_keys to better handle key presses during system state transition * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - fix crash at boot time Input: gpio_keys - handle the missing key press event in resume phase Input: xen-kbdfront - add multi-touch support commit dcf903d0c9adf003f664446bfc392034272b3071 Merge: 96d0d83 b8fc339 Author: Linus Torvalds Date: Fri Jul 14 22:49:50 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - fix new compiler warnings in cavium - set post-op IV properly in caam (this fixes chaining) - fix potential use-after-free in atmel in case of EBUSY - fix sleeping in softirq path in chcr - disable buggy sha1-avx2 driver (may overread and page fault) - fix use-after-free on signals in caam * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: cavium - make several functions static crypto: chcr - Avoid algo allocation in softirq. crypto: caam - properly set IV after {en,de}crypt crypto: atmel - only treat EBUSY as transient if backlog crypto: af_alg - Avoid sock_graft call warning crypto: caam - fix signals handling crypto: sha1-ssse3 - Disable avx2 commit 96d0d831a50054bf3fb032fba4bc65006530e362 Merge: 1ef2740 e8158b4 Author: Linus Torvalds Date: Fri Jul 14 22:39:35 2017 -0700 Merge tag 'devprop-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework fix from Rafael Wysocki: "This fixes a problem with bool properties that could be seen as "true" when the property was not present at all by adding a special helper for bool properties with checks for all of the requisute conditions (Sakari Ailus)" * tag 'devprop-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: Introduce fwnode_call_bool_op() for ops that return bool commit 1ef27400c52bf54b34261da49968343b6cb79e32 Merge: e37720e 9636603 Author: Linus Torvalds Date: Fri Jul 14 22:27:13 2017 -0700 Merge tag 'acpi-fixes-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix the return value of an IRQ mapping routine in the ACPI core, fix an EC driver issue causing abnormal fan behavior after system resume on some systems and add quirks for ACPI device objects that need to be treated as "always present" to work around bogus implementations of the _STA control method. Specifics: - Fix the return value of acpi_gsi_to_irq() to make the GSI to IRQ mapping work on the Mustang (ARM64) platform (Mark Salter). - Fix an EC driver issue that causes fans to behave abnormally after system resume on some systems which turns out to be related to switching over the EC into the polling mode during the noirq stages of system suspend and resume (Lv Zheng). - Add quirks for ACPI device objects that need to be treated as "always present", because their _STA methods are designed to work around Windows driver bugs and return garbage from our perspective (Hans de Goede)" * tag 'acpi-fixes-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / x86: Add KIOX000A accelerometer on GPD win to always_present_ids array ACPI / x86: Add Dell Venue 11 Pro 7130 touchscreen to always_present_ids ACPI / x86: Allow matching always_present_id array entries by DMI Revert "ACPI / EC: Enable event freeze mode..." to fix a regression ACPI / EC: Drop EC noirq hooks to fix a regression ACPI / irq: Fix return code of acpi_gsi_to_irq() commit e37720e25df1cb70958a59716135385683e728b3 Merge: 867eacd 6df609b Author: Linus Torvalds Date: Fri Jul 14 22:24:25 2017 -0700 Merge tag 'pm-fixes-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a recently exposed issue in the PCI device wakeup code and one older problem related to PCI device wakeup that has been reported recently, modify one more piece of computations in intel_pstate to get rid of a rounding error, fix a possible race in the schedutil cpufreq governor, fix the device PM QoS sysfs interface to correctly handle invalid user input, fix return values of two probe routines in devfreq drivers and constify an attribute_group structure in devfreq. Specifics: - Avoid clearing the PCI PME Enable bit for devices as a result of config space restoration which confuses AML executed afterward and causes wakeup events to be lost on some systems (Rafael Wysocki). - Fix the native PCIe PME interrupts handling in the cases when the PME IRQ is set up as a system wakeup one so that runtime PM remote wakeup works as expected after system resume on systems where that happens (Rafael Wysocki). - Fix the device PM QoS sysfs interface to handle invalid user input correctly instead of using an unititialized variable value as the latency tolerance for the device at hand (Dan Carpenter). - Get rid of one more rounding error from intel_pstate computations (Srinivas Pandruvada). - Fix the schedutil cpufreq governor to prevent it from possibly accessing unititialized data structures from governor callbacks in some cases on systems when multiple CPUs share a single cpufreq policy object (Vikram Mulukutla). - Fix the return values of probe routines in two devfreq drivers (Gustavo Silva). - Constify an attribute_group structure in devfreq (Arvind Yadav)" * tag 'pm-fixes-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PCI / PM: Fix native PME handling during system suspend/resume PCI / PM: Restore PME Enable after config space restoration cpufreq: schedutil: Fix sugov_start() versus sugov_update_shared() race PM / QoS: return -EINVAL for bogus strings cpufreq: intel_pstate: Fix ratio setting for min_perf_pct PM / devfreq: constify attribute_group structures. PM / devfreq: tegra: fix error return code in tegra_devfreq_probe() PM / devfreq: rk3399_dmc: fix error return code in rk3399_dmcfreq_probe() commit 867eacd7fb975273703766f52f485f08471a1ae9 Merge: 077d2ba 6d7964a Author: Linus Torvalds Date: Fri Jul 14 21:57:25 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge even more updates from Andrew Morton: - a few leftovers - fault-injector rework - add a module loader test driver * emailed patches from Andrew Morton : kmod: throttle kmod thread limit kmod: add test driver to stress test the module loader MAINTAINERS: give kmod some maintainer love xtensa: use generic fb.h fault-inject: add /proc//fail-nth fault-inject: simplify access check for fail-nth fault-inject: make fail-nth read/write interface symmetric fault-inject: parse as natural 1-based value for fail-nth write interface fault-inject: automatically detect the number base for fail-nth write interface kernel/watchdog.c: use better pr_fmt prefix MAINTAINERS: move the befs tree to kernel.org lib/atomic64_test.c: add a test that atomic64_inc_not_zero() returns an int mm: fix overflow check in expand_upwards() commit 077d2ba519b2e8bf1abd80cbade699b1de42cafe Author: Daniel Micay Date: Fri Jul 14 17:28:12 2017 -0400 replace incorrect strscpy use in FORTIFY_SOURCE Using strscpy was wrong because FORTIFY_SOURCE is passing the maximum possible size of the outermost object, but strscpy defines the count parameter as the exact buffer size, so this could copy past the end of the source. This would still be wrong with the planned usage of __builtin_object_size(p, 1) for intra-object overflow checks since it's the maximum possible size of the specified object with no guarantee of it being that large. Reuse of the fortified functions like this currently makes the runtime error reporting less precise but that can be improved later on. Noticed by Dave Jones and KASAN. Signed-off-by: Daniel Micay Acked-by: Kees Cook Reported-by: Dave Jones Signed-off-by: Linus Torvalds include/linux/string.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 01ea9177351883f65e696e545820605474adb307 Merge: deed9de 0af0bc38 Author: Linus Torvalds Date: Fri Jul 14 21:50:50 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull arch/tile updates from Chris Metcalf: "This adds support for an to help with removing __need_xxx #defines from glibc, and removes some dead code in arch/tile/mm/init.c" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: mm, tile: drop arch_{add,remove}_memory tile: prefer to __need_int_reg_t commit deed9deb62f9121ea16f06351d1e968685a74863 Merge: ccd5d1b 01e6a61 Author: Linus Torvalds Date: Fri Jul 14 15:33:15 2017 -0700 Merge tag 'powerpc-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Nothing that really stands out, just a bunch of fixes that have come in in the last couple of weeks. None of these are actually fixes for code that is new in 4.13. It's roughly half older bugs, with fixes going to stable, and half fixes/updates for Power9. Thanks to: Aneesh Kumar K.V, Anton Blanchard, Balbir Singh, Benjamin Herrenschmidt, Madhavan Srinivasan, Michael Neuling, Nicholas Piggin, Oliver O'Halloran" * tag 'powerpc-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64: Fix atomic64_inc_not_zero() to return an int powerpc: Fix emulation of mfocrf in emulate_step() powerpc: Fix emulation of mcrf in emulate_step() powerpc/perf: Add POWER9 alternate PM_RUN_CYC and PM_RUN_INST_CMPL events powerpc/perf: Fix SDAR_MODE value for continous sampling on Power9 powerpc/asm: Mark cr0 as clobbered in mftb() powerpc/powernv: Fix local TLB flush for boot and MCE on POWER9 powerpc/mm/radix: Synchronize updates to the process table powerpc/mm/radix: Properly clear process table entry powerpc/powernv: Tell OPAL about our MMU mode on POWER9 powerpc/kexec: Fix radix to hash kexec due to IAMR/AMOR commit 6d7964a722afc8e4f880b947f174009063028c99 Author: Luis R. Rodriguez Date: Fri Jul 14 14:50:11 2017 -0700 kmod: throttle kmod thread limit If we reach the limit of modprobe_limit threads running the next request_module() call will fail. The original reason for adding a kill was to do away with possible issues with in old circumstances which would create a recursive series of request_module() calls. We can do better than just be super aggressive and reject calls once we've reached the limit by simply making pending callers wait until the threshold has been reduced, and then throttling them in, one by one. This throttling enables requests over the kmod concurrent limit to be processed once a pending request completes. Only the first item queued up to wait is woken up. The assumption here is once a task is woken it will have no other option to also kick the queue to check if there are more pending tasks -- regardless of whether or not it was successful. By throttling and processing only max kmod concurrent tasks we ensure we avoid unexpected fatal request_module() calls, and we keep memory consumption on module loading to a minimum. With x86_64 qemu, with 4 cores, 4 GiB of RAM it takes the following run time to run both tests: time ./kmod.sh -t 0008 real 0m16.366s user 0m0.883s sys 0m8.916s time ./kmod.sh -t 0009 real 0m50.803s user 0m0.791s sys 0m9.852s Link: http://lkml.kernel.org/r/20170628223155.26472-4-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Reviewed-by: Petr Mladek Cc: Jessica Yu Cc: Shuah Khan Cc: Rusty Russell Cc: Michal Marek Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kmod.c | 16 +++++++--------- tools/testing/selftests/kmod/kmod.sh | 24 ++---------------------- 2 files changed, 9 insertions(+), 31 deletions(-) commit d9c6a72d6fa29d3a7999dda726577e5d1fccafa5 Author: Luis R. Rodriguez Date: Fri Jul 14 14:50:08 2017 -0700 kmod: add test driver to stress test the module loader This adds a new stress test driver for kmod: the kernel module loader. The new stress test driver, test_kmod, is only enabled as a module right now. It should be possible to load this as built-in and load tests early (refer to the force_init_test module parameter), however since a lot of test can get a system out of memory fast we leave this disabled for now. Using a system with 1024 MiB of RAM can *easily* get your kernel OOM fast with this test driver. The test_kmod driver exposes API knobs for us to fine tune simple request_module() and get_fs_type() calls. Since these API calls only allow each one parameter a test driver for these is rather simple. Other factors that can help out test driver though are the number of calls we issue and knowing current limitations of each. This exposes configuration as much as possible through userspace to be able to build tests directly from userspace. Since it allows multiple misc devices its will eventually (once we add a knob to let us create new devices at will) also be possible to perform more tests in parallel, provided you have enough memory. We only enable tests we know work as of right now. Demo screenshots: # tools/testing/selftests/kmod/kmod.sh kmod_test_0001_driver: OK! - loading kmod test kmod_test_0001_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUND kmod_test_0001_fs: OK! - loading kmod test kmod_test_0001_fs: OK! - Return value: -22 (-EINVAL), expected -EINVAL kmod_test_0002_driver: OK! - loading kmod test kmod_test_0002_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUND kmod_test_0002_fs: OK! - loading kmod test kmod_test_0002_fs: OK! - Return value: -22 (-EINVAL), expected -EINVAL kmod_test_0003: OK! - loading kmod test kmod_test_0003: OK! - Return value: 0 (SUCCESS), expected SUCCESS kmod_test_0004: OK! - loading kmod test kmod_test_0004: OK! - Return value: 0 (SUCCESS), expected SUCCESS kmod_test_0005: OK! - loading kmod test kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS kmod_test_0006: OK! - loading kmod test kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS kmod_test_0005: OK! - loading kmod test kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS kmod_test_0006: OK! - loading kmod test kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS XXX: add test restult for 0007 Test completed You can also request for specific tests: # tools/testing/selftests/kmod/kmod.sh -t 0001 kmod_test_0001_driver: OK! - loading kmod test kmod_test_0001_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUND kmod_test_0001_fs: OK! - loading kmod test kmod_test_0001_fs: OK! - Return value: -22 (-EINVAL), expected -EINVAL Test completed Lastly, the current available number of tests: # tools/testing/selftests/kmod/kmod.sh --help Usage: tools/testing/selftests/kmod/kmod.sh [ -t <4-number-digit> ] Valid tests: 0001-0009 0001 - Simple test - 1 thread for empty string 0002 - Simple test - 1 thread for modules/filesystems that do not exist 0003 - Simple test - 1 thread for get_fs_type() only 0004 - Simple test - 2 threads for get_fs_type() only 0005 - multithreaded tests with default setup - request_module() only 0006 - multithreaded tests with default setup - get_fs_type() only 0007 - multithreaded tests with default setup test request_module() and get_fs_type() 0008 - multithreaded - push kmod_concurrent over max_modprobes for request_module() 0009 - multithreaded - push kmod_concurrent over max_modprobes for get_fs_type() The following test cases currently fail, as such they are not currently enabled by default: # tools/testing/selftests/kmod/kmod.sh -t 0008 # tools/testing/selftests/kmod/kmod.sh -t 0009 To be sure to run them as intended please unload both of the modules: o test_module o xfs And ensure they are not loaded on your system prior to testing them. If you use these paritions for your rootfs you can change the default test driver used for get_fs_type() by exporting it into your environment. For example of other test defaults you can override refer to kmod.sh allow_user_defaults(). Behind the scenes this is how we fine tune at a test case prior to hitting a trigger to run it: cat /sys/devices/virtual/misc/test_kmod0/config echo -n "2" > /sys/devices/virtual/misc/test_kmod0/config_test_case echo -n "ext4" > /sys/devices/virtual/misc/test_kmod0/config_test_fs echo -n "80" > /sys/devices/virtual/misc/test_kmod0/config_num_threads cat /sys/devices/virtual/misc/test_kmod0/config echo -n "1" > /sys/devices/virtual/misc/test_kmod0/config_num_threads Finally to trigger: echo -n "1" > /sys/devices/virtual/misc/test_kmod0/trigger_config The kmod.sh script uses the above constructs to build different test cases. A bit of interpretation of the current failures follows, first two premises: a) When request_module() is used userspace figures out an optimized version of module order for us. Once it finds the modules it needs, as per depmod symbol dep map, it will finit_module() the respective modules which are needed for the original request_module() request. b) We have an optimization in place whereby if a kernel uses request_module() on a module already loaded we never bother userspace as the module already is loaded. This is all handled by kernel/kmod.c. A few things to consider to help identify root causes of issues: 0) kmod 19 has a broken heuristic for modules being assumed to be built-in to your kernel and will return 0 even though request_module() failed. Upgrade to a newer version of kmod. 1) A get_fs_type() call for "xfs" will request_module() for "fs-xfs", not for "xfs". The optimization in kernel described in b) fails to catch if we have a lot of consecutive get_fs_type() calls. The reason is the optimization in place does not look for aliases. This means two consecutive get_fs_type() calls will bump kmod_concurrent, whereas request_module() will not. This one explanation why test case 0009 fails at least once for get_fs_type(). 2) If a module fails to load --- for whatever reason (kmod_concurrent limit reached, file not yet present due to rootfs switch, out of memory) we have a period of time during which module request for the same name either with request_module() or get_fs_type() will *also* fail to load even if the file for the module is ready. This explains why *multiple* NULLs are possible on test 0009. 3) finit_module() consumes quite a bit of memory. 4) Filesystems typically also have more dependent modules than other modules, its important to note though that even though a get_fs_type() call does not incur additional kmod_concurrent bumps, since userspace loads dependencies it finds it needs via finit_module_fd(), it *will* take much more memory to load a module with a lot of dependencies. Because of 3) and 4) we will easily run into out of memory failures with certain tests. For instance test 0006 fails on qemu with 1024 MiB of RAM. It panics a box after reaping all userspace processes and still not having enough memory to reap. [arnd@arndb.de: add dependencies for test module] Link: http://lkml.kernel.org/r/20170630154834.3689272-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20170628223155.26472-3-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Jessica Yu Cc: Shuah Khan Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 2 + lib/Kconfig.debug | 27 + lib/Makefile | 1 + lib/test_kmod.c | 1246 +++++++++++++++++++++++++++++++++ tools/testing/selftests/kmod/Makefile | 11 + tools/testing/selftests/kmod/config | 7 + tools/testing/selftests/kmod/kmod.sh | 635 +++++++++++++++++ 7 files changed, 1929 insertions(+) commit 062b87406d0d73b3894b562dc3067d9ea760bd3e Author: Luis R. Rodriguez Date: Fri Jul 14 14:50:05 2017 -0700 MAINTAINERS: give kmod some maintainer love As suggested by Jessica, I've been actively working on kmod, so might as well reflect its maintained status. Changes are expected to go through akpm's tree. Link: http://lkml.kernel.org/r/20170628223155.26472-2-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Suggested-by: Jessica Yu Cc: Shuah Khan Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 20cf0c54e641071d90c4043021217165f1499056 Author: Tobias Klauser Date: Fri Jul 14 14:50:03 2017 -0700 xtensa: use generic fb.h The arch uses a verbatim copy of the asm-generic version and does not add any own implementations to the header, so use asm-generic/fb.h instead of duplicating code. Link: http://lkml.kernel.org/r/20170517083545.2115-1-tklauser@distanz.ch Signed-off-by: Tobias Klauser Acked-by: Max Filippov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/xtensa/include/asm/Kbuild | 1 + arch/xtensa/include/asm/fb.h | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) commit 168c42bc56d8d47f67f2a5206506cd4ba3c18475 Author: Akinobu Mita Date: Fri Jul 14 14:50:00 2017 -0700 fault-inject: add /proc//fail-nth fail-nth interface is only created in /proc/self/task//. This change also adds it in /proc//. This makes shell based tool a bit simpler. $ bash -c "builtin echo 100 > /proc/self/fail-nth && exec ls /" Link: http://lkml.kernel.org/r/1491490561-10485-6-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/fault-injection/fault-injection.txt | 3 ++- fs/proc/base.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 1203c8e6fb0aa1e9c39d2323607a74c3adc34fd8 Author: Akinobu Mita Date: Fri Jul 14 14:49:57 2017 -0700 fault-inject: simplify access check for fail-nth The fail-nth file is created with 0666 and the access is permitted if and only if the task is current. This file is owned by the currnet user. So we can create it with 0644 and allow the owner to write it. This enables to watch the status of task->fail_nth from another processes. [akinobu.mita@gmail.com: don't convert unsigned type value as signed int] Link: http://lkml.kernel.org/r/1492444483-9239-1-git-send-email-akinobu.mita@gmail.com [akinobu.mita@gmail.com: avoid unwanted data race to task->fail_nth] Link: http://lkml.kernel.org/r/1499962492-8931-1-git-send-email-akinobu.mita@gmail.com Link: http://lkml.kernel.org/r/1491490561-10485-5-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Acked-by: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 25 ++++++++++--------------- lib/fault-inject.c | 7 +++++-- 2 files changed, 15 insertions(+), 17 deletions(-) commit bfc740938d151001cb1158580796f8f3be3bf0c1 Author: Akinobu Mita Date: Fri Jul 14 14:49:54 2017 -0700 fault-inject: make fail-nth read/write interface symmetric The read interface for fail-nth looks a bit odd. Read from this file returns "NYYYY..." or "YYYYY..." (this makes me surprise when cat this file). Because there is no EOF condition. The first character indicates current->fail_nth is zero or not, and then current->fail_nth is reset to zero. Just returning task->fail_nth value is more natural to understand. Link: http://lkml.kernel.org/r/1491490561-10485-4-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/fault-injection/fault-injection.txt | 13 +++++++------ fs/proc/base.c | 14 ++++++-------- 2 files changed, 13 insertions(+), 14 deletions(-) commit 9049f2f6e7bdfb5de0c63c2635bf3cdb70c4efb5 Author: Akinobu Mita Date: Fri Jul 14 14:49:52 2017 -0700 fault-inject: parse as natural 1-based value for fail-nth write interface The value written to fail-nth file is parsed as 0-based. Parsing as one-based is more natural to understand and it enables to cancel the previous setup by simply writing '0'. This change also converts task->fail_nth from signed to unsigned int. Link: http://lkml.kernel.org/r/1491490561-10485-3-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/fault-injection/fault-injection.txt | 7 +++---- fs/proc/base.c | 9 ++++----- include/linux/sched.h | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) commit ecaad81ca0dfaa5f6ab7a5a9bc16a10816e2bd27 Author: Akinobu Mita Date: Fri Jul 14 14:49:49 2017 -0700 fault-inject: automatically detect the number base for fail-nth write interface Automatically detect the number base to use when writing to fail-nth file instead of always parsing as a decimal number. Link: http://lkml.kernel.org/r/1491490561-10485-2-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f92a7b0fcd627fbd06ceb1cee3bbe5d08d13356 Author: Kefeng Wang Date: Fri Jul 14 14:49:46 2017 -0700 kernel/watchdog.c: use better pr_fmt prefix After commit 73ce0511c436 ("kernel/watchdog.c: move hardlockup detector to separate file"), 'NMI watchdog' is inappropriate in kernel/watchdog.c, using 'watchdog' only. Link: http://lkml.kernel.org/r/1499928642-48983-1-git-send-email-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Babu Moger Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5624a8b00cb206390d465e0cb5a1e5eedd23a15c Author: Luis de Bethencourt Date: Fri Jul 14 14:49:44 2017 -0700 MAINTAINERS: move the befs tree to kernel.org Update the location of the befs git tree and my email address. Link: http://lkml.kernel.org/r/20170709110012.2991-1-luisbg@kernel.org Signed-off-by: Luis de Bethencourt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ffba19ccae8d98beb0a17345a0b1ee9e415b23b8 Author: Michael Ellerman Date: Fri Jul 14 14:49:41 2017 -0700 lib/atomic64_test.c: add a test that atomic64_inc_not_zero() returns an int atomic64_inc_not_zero() returns a "truth value" which in C is traditionally an int. That means callers are likely to expect the result will fit in an int. If an implementation returns a "true" value which does not fit in an int, then there's a possibility that callers will truncate it when they store it in an int. In fact this happened in practice, see commit 966d2b04e070 ("percpu-refcount: fix reference leak during percpu-atomic transition"). So add a test that the result fits in an int, even when the input doesn't. This catches the case where an implementation just passes the non-zero input value out as the result. Link: http://lkml.kernel.org/r/1499775133-1231-1-git-send-email-mpe@ellerman.id.au Signed-off-by: Michael Ellerman Cc: Douglas Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/atomic64_test.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 37511fb5c91db93d8bd6e3f52f86e5a7ff7cfcdf Author: Helge Deller Date: Fri Jul 14 14:49:38 2017 -0700 mm: fix overflow check in expand_upwards() Jörn Engel noticed that the expand_upwards() function might not return -ENOMEM in case the requested address is (unsigned long)-PAGE_SIZE and if the architecture didn't defined TASK_SIZE as multiple of PAGE_SIZE. Affected architectures are arm, frv, m68k, blackfin, h8300 and xtensa which all define TASK_SIZE as 0xffffffff, but since none of those have an upwards-growing stack we currently have no actual issue. Nevertheless let's fix this just in case any of the architectures with an upward-growing stack (currently parisc, metag and partly ia64) define TASK_SIZE similar. Link: http://lkml.kernel.org/r/20170702192452.GA11868@p100.box Fixes: bd726c90b6b8 ("Allow stack to grow up to address space limit") Signed-off-by: Helge Deller Reported-by: Jörn Engel Cc: Hugh Dickins Cc: Oleg Nesterov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6664433d383eeb71cbdeb9aea2c66eeea76e742 Author: Richard Weinberger Date: Mon Jun 26 13:49:04 2017 +0200 ubifs: Set double hash cookie also for RENAME_EXCHANGE We developed RENAME_EXCHANGE and UBIFS_FLG_DOUBLE_HASH more or less in parallel and this case was forgotten. :-( Cc: stable@vger.kernel.org Fixes: d63d61c16972 ("ubifs: Implement UBIFS_FLG_DOUBLE_HASH") Signed-off-by: Richard Weinberger fs/ubifs/journal.c | 2 ++ 1 file changed, 2 insertions(+) commit d8db5b1ca9d4c57e49893d0f78e6d5ce81450cc8 Author: Xiaolei Li Date: Fri Jun 23 10:37:23 2017 +0800 ubifs: Massage assert in ubifs_xattr_set() wrt. init_xattrs The inode is not locked in init_xattrs when creating a new inode. Without this patch, there will occurs assert when booting or creating a new file, if the kernel config CONFIG_SECURITY_SMACK is enabled. Log likes: UBIFS assert failed in ubifs_xattr_set at 298 (pid 1156) CPU: 1 PID: 1156 Comm: ldconfig Tainted: G S 4.12.0-rc1-207440-g1e70b02 #2 Hardware name: MediaTek MT2712 evaluation board (DT) Call trace: [] dump_backtrace+0x0/0x238 [] show_stack+0x14/0x20 [] dump_stack+0x9c/0xc0 [] ubifs_xattr_set+0x374/0x5e0 [] init_xattrs+0x5c/0xb8 [] security_inode_init_security+0x110/0x190 [] ubifs_init_security+0x30/0x68 [] ubifs_mkdir+0x100/0x200 [] vfs_mkdir+0x11c/0x1b8 [] SyS_mkdirat+0x74/0xd0 [] __sys_trace_return+0x0/0x4 Signed-off-by: Xiaolei Li Signed-off-by: Richard Weinberger fs/ubifs/crypto.c | 7 ++++++- fs/ubifs/ubifs.h | 2 +- fs/ubifs/xattr.c | 17 ++++++++--------- 3 files changed, 15 insertions(+), 11 deletions(-) commit 4acadda74ff8b949c448c0282765ae747e088c87 Author: Richard Weinberger Date: Fri Jun 16 16:21:44 2017 +0200 ubifs: Don't leak kernel memory to the MTD When UBIFS prepares data structures which will be written to the MTD it ensues that their lengths are multiple of 8. Since it uses kmalloc() the padded bytes are left uninitialized and we leak a few bytes of kernel memory to the MTD. To make sure that all bytes are initialized, let's switch to kzalloc(). Kzalloc() is fine in this case because the buffers are not huge and in the IO path the performance bottleneck is anyway the MTD. Cc: stable@vger.kernel.org Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Richard Weinberger Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger fs/ubifs/journal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 480a1a6a3ef6fb6be4cd2f37b34314fbf64867dd Author: Hyunchul Lee Date: Wed Jun 14 09:31:49 2017 +0900 ubifs: Change gfp flags in page allocation for bulk read In low memory situations, page allocations for bulk read can kill applications for reclaiming memory, and print an failure message when allocations are failed. Because bulk read is just an optimization, we don't have to do these and can stop page allocations. Though this siutation happens rarely, add __GFP_NORETRY to prevent from excessive memory reclaim and killing applications, and __GFP_WARN to suppress this failure message. For this, Use readahead_gfp_mask for gfp flags when allocating pages. Signed-off-by: Hyunchul Lee Signed-off-by: Richard Weinberger fs/ubifs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07d41c3cf254a58b7ab69beb1f08a85ffce02626 Author: karam.lee Date: Mon Jun 12 10:46:31 2017 +0900 ubifs: Fix oops when remounting with no_bulk_read. When remounting with the no_bulk_read option, there is a problem accessing the "bulk_read buffer(bu.buf)" which has already been freed. If the bulk_read option is enabled, ubifs_tnc_bulk_read uses the pre-allocated bu.buf. While bu.buf is being used by ubifs_tnc_bulk_read, remounting with no_bulk_read frees bu.buf. So I added code to check the use of "bu.buf" to avoid this situation. ------ I tested as follows(kernel v3.18) : Use the script to repeat "no_bulk_read <-> bulk_read" remount.sh #!/bin/sh while true do; mount -o remount,no_bulk_read ${MOUNT_POINT}; sleep 1; mount -o remount,bulk_read ${MOUNT_POINT}; sleep 1; done Perform read operation cat ${MOUNT_POINT}/* > /dev/null The problem is reproduced immediately. [ 234.256845][kernel.0]Internal error: Oops: 17 [#1] PREEMPT ARM [ 234.258557][kernel.0]CPU: 0 PID: 2752 Comm: cat Tainted: G W O 3.18.31+ #51 [ 234.259531][kernel.0]task: cbff8580 ti: cbd66000 task.ti: cbd66000 [ 234.260306][kernel.0]PC is at validate_data_node+0x10/0x264 [ 234.260994][kernel.0]LR is at ubifs_tnc_bulk_read+0x388/0x3ec [ 234.261712][kernel.0]pc : [] lr : [] psr: 80000013 [ 234.261712][kernel.0]sp : cbd67ba0 ip : 00000001 fp : 00000000 [ 234.263337][kernel.0]r10: cd3e0260 r9 : c0df2008 r8 : 00000000 [ 234.264087][kernel.0]r7 : cd3e0000 r6 : 00000000 r5 : cd3e0278 r4 : cd3e0000 [ 234.264999][kernel.0]r3 : 00000003 r2 : cd3e0280 r1 : 00000000 r0 : cd3e0000 [ 234.265910][kernel.0]Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 234.266896][kernel.0]Control: 10c53c7d Table: 8c40c059 DAC: 00000015 [ 234.267711][kernel.0]Process cat (pid: 2752, stack limit = 0xcbd66400) [ 234.268525][kernel.0]Stack: (0xcbd67ba0 to 0xcbd68000) [ 234.269169][kernel.0]7ba0: cd7c3940 c03d8650 0001bfe0 00002ab2 00000000 cbd67c5c cbd67c58 0001bfe0 [ 234.270287][kernel.0]7bc0: cd3e0000 00002ab2 0001bfe0 00000014 cbd66000 cd3e0260 00000000 c01d6660 [ 234.271403][kernel.0]7be0: 00002ab2 00000000 c82a5800 ffffffff cd3e0298 cd3e0278 00000000 cd3e0000 [ 234.272520][kernel.0]7c00: 00000000 00000000 cd3e0260 c01dc300 00002ab2 00000000 60000013 d663affa [ 234.273639][kernel.0]7c20: cd3e01f0 cd3e01f0 60000013 c09397ec 00000000 cd3e0278 00002ab2 00000000 [ 234.274755][kernel.0]7c40: cd3e0000 c01dbf48 00000014 00000003 00000160 00000015 00000004 d663affa [ 234.275874][kernel.0]7c60: ccdaa978 cd3e0278 cd3e0000 cf32a5f4 ccdaa820 00000044 cbd66000 cd3e0260 [ 234.276992][kernel.0]7c80: 00000003 c01cec84 ccdaa8dc cbd67cc4 cbd67ec0 00000010 ccdaa978 00000000 [ 234.278108][kernel.0]7ca0: 0000015e ccdaa8dc 00000000 00000000 cf32a5d0 00000000 0000015f ccdaa8dc [ 234.279228][kernel.0]7cc0: 00000000 c8488300 0009e5a4 0000000e cbd66000 0000015e cf32a5f4 c0113c04 [ 234.280346][kernel.0]7ce0: 0000009f 0000003c c00098c4 ffffffff 00001000 00000000 000000ad 00000010 [ 234.281463][kernel.0]7d00: 00000038 cd68f580 00000150 c8488360 00000000 cbd67d30 cbd67d70 0000000e [ 234.282579][kernel.0]7d20: 00000010 00000000 c0951874 c0112a9c cf379b60 cf379b84 cf379890 cf3798b4 [ 234.283699][kernel.0]7d40: cf379578 cf37959c cf379380 cf3793a4 cf3790b0 cf3790d4 cf378fd8 cf378ffc [ 234.284814][kernel.0]7d60: cf378f48 cf378f6c cf32a5f4 cf32a5d0 00000000 00001000 00000018 00000000 [ 234.285932][kernel.0]7d80: 00001000 c0050da4 00000000 00001000 cec04c00 00000000 00001000 c0e11328 [ 234.287049][kernel.0]7da0: 00000000 00001000 cbd66000 00000000 00001000 c0012a60 00000000 00001000 [ 234.288166][kernel.0]7dc0: cbd67dd4 00000000 00001000 80000013 00000000 00001000 cd68f580 00000000 [ 234.289285][kernel.0]7de0: 00001000 c915d600 00000000 00001000 cbd67e48 00000000 00001000 00000018 [ 234.290402][kernel.0]7e00: 00000000 00001000 00000000 00000000 00001000 c915d768 c915d768 c0113550 [ 234.291522][kernel.0]7e20: cd68f580 cbd67e48 cd68f580 cb6713c0 00010000 000ac5a4 00000000 001fc5a4 [ 234.292637][kernel.0]7e40: 00000000 c8488300 cbd67ec0 00eb0000 cd68f580 c0113ee4 00000000 cbd67ec0 [ 234.293754][kernel.0]7e60: cd68f580 c8488300 cbd67ec0 00eb0000 cd68f580 00150000 c8488300 00eb0000 [ 234.294874][kernel.0]7e80: 00010000 c0112fd0 00000000 cbd67ec0 cd68f580 00150000 00000000 cd68f580 [ 234.295991][kernel.0]7ea0: cbd67ef0 c011308c 00000000 00000002 cd768850 00010000 00000000 c01133fc [ 234.297110][kernel.0]7ec0: 00150000 00000000 cbd67f50 00000000 00000000 cb6713c0 01000000 cbd67f48 [ 234.298226][kernel.0]7ee0: cbd67f50 c8488300 00000000 c0113204 00010000 01000000 00000000 cb6713c0 [ 234.299342][kernel.0]7f00: 00150000 00000000 cbd67f50 00000000 00000000 00000000 00000000 00000000 [ 234.300462][kernel.0]7f20: cbd67f50 01000000 01000000 cb6713c0 c8488300 c00ebba8 01000000 00000000 [ 234.301577][kernel.0]7f40: c8488300 cb6713c0 00000000 00000000 00000000 00000000 ccdaa820 00000000 [ 234.302697][kernel.0]7f60: 00000000 01000000 00000003 00000001 cbd66000 00000000 00000001 c00ec678 [ 234.303813][kernel.0]7f80: 00000000 00000200 00000000 01000000 01000000 00000000 00000000 000000ef [ 234.304933][kernel.0]7fa0: c000e904 c000e780 01000000 00000000 00000001 00000003 00000000 01000000 [ 234.306049][kernel.0]7fc0: 01000000 00000000 00000000 000000ef 00000001 00000003 01000000 00000001 [ 234.307165][kernel.0]7fe0: 00000000 beafb78c 0000ad08 00128d1c 60000010 00000001 00000000 00000000 [ 234.308292][kernel.0][] (validate_data_node) from [] (ubifs_tnc_bulk_read+0x388/0x3ec) [ 234.309493][kernel.0][] (ubifs_tnc_bulk_read) from [] (ubifs_readpage+0x1dc/0x46c) [ 234.310656][kernel.0][] (ubifs_readpage) from [] (__generic_file_splice_read+0x29c/0x4cc) [ 234.311890][kernel.0][] (__generic_file_splice_read) from [] (generic_file_splice_read+0xb0/0xf4) [ 234.313214][kernel.0][] (generic_file_splice_read) from [] (do_splice_to+0x68/0x7c) [ 234.314386][kernel.0][] (do_splice_to) from [] (splice_direct_to_actor+0xa8/0x190) [ 234.315544][kernel.0][] (splice_direct_to_actor) from [] (do_splice_direct+0x90/0xb8) [ 234.316741][kernel.0][] (do_splice_direct) from [] (do_sendfile+0x17c/0x2b8) [ 234.317838][kernel.0][] (do_sendfile) from [] (SyS_sendfile64+0xc4/0xcc) [ 234.318890][kernel.0][] (SyS_sendfile64) from [] (ret_fast_syscall+0x0/0x38) [ 234.319983][kernel.0]Code: e92d47f0 e24dd050 e59f9228 e1a04000 (e5d18014) Signed-off-by: karam.lee Signed-off-by: Richard Weinberger fs/ubifs/super.c | 2 ++ 1 file changed, 2 insertions(+) commit df71b09145b66e4cf6f7a1ec69d181bf2ccb0efd Author: Richard Weinberger Date: Wed Jun 7 23:33:35 2017 +0200 ubifs: Fail commit if TNC is obviously inconsistent A reference to LEB 0 or with length 0 in the TNC is never correct and could be caused by a memory corruption. Don't write such a bad index node to the MTD. Instead fail the commit which will turn UBIFS into read-only mode. This is less painful than having the bad reference on the MTD from where UBFIS has no chance to recover. Signed-off-by: Richard Weinberger fs/ubifs/tnc_commit.c | 4 ++++ 1 file changed, 4 insertions(+) commit 319c10427498620d220931189dcdba7d4244feba Author: Rabin Vincent Date: Wed May 31 11:40:27 2017 +0200 ubifs: allow userspace to map mounts to volumes There currently appears to be no way for userspace to find out the underlying volume number for a mounted ubifs file system, since ubifs uses anonymous block devices. The volume name is present in /proc/mounts but UBI volumes can be renamed after the volume has been mounted. To remedy this, show the UBI number and UBI volume number as part of the options visible under /proc/mounts. Also, accept and ignore the ubi= vol= options if they are used mounting (patch from Richard Weinberger). # mount -t ubifs ubi:baz x # mount ubi:baz on /root/x type ubifs (rw,relatime,ubi=0,vol=2) # ubirename /dev/ubi0 baz bazz # mount ubi:baz on /root/x type ubifs (rw,relatime,ubi=0,vol=2) # ubinfo -d 0 -n 2 Volume ID: 2 (on ubi0) Type: dynamic Alignment: 1 Size: 67 LEBs (1063424 bytes, 1.0 MiB) State: OK Name: bazz Character device major/minor: 254:3 Signed-off-by: Rabin Vincent Signed-off-by: Richard Weinberger fs/ubifs/super.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a02a6eba9999221b27c691330e93bb54e4b45bb0 Author: Richard Weinberger Date: Sun May 21 00:16:26 2017 +0200 ubifs: Wire-up statx() support statx() can report what flags a file has, expose flags that UBIFS supports. Especially STATX_ATTR_COMPRESSED and STATX_ATTR_ENCRYPTED can be interesting for userspace. Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d2eb85226fcd981767d1829b09ae1070cf695b98 Author: Richard Weinberger Date: Wed May 17 10:36:49 2017 +0200 ubifs: Remove dead code from ubifs_get_link() We check the length already, no need to check later again for an empty string. Signed-off-by: Richard Weinberger fs/ubifs/file.c | 6 ------ 1 file changed, 6 deletions(-) commit 35ee314c84cd4b3e3689292f82c0af2af246c343 Author: Richard Weinberger Date: Wed May 17 10:36:48 2017 +0200 ubifs: Massage debug prints wrt. fscrypt If file names are encrypted we can no longer print them. That's why we have to change these prints or remove them completely. Signed-off-by: Richard Weinberger fs/ubifs/journal.c | 10 ---------- fs/ubifs/tnc.c | 9 ++++----- 2 files changed, 4 insertions(+), 15 deletions(-) commit 8b2900c01716077a42dbb44c691849ab694fa062 Author: Richard Weinberger Date: Wed May 17 10:36:47 2017 +0200 ubifs: Add assert to dent_key_init() ...to make sure that we don't use it for double hashed lookups instead of dent_key_init_hash(). Signed-off-by: Richard Weinberger fs/ubifs/key.h | 1 + 1 file changed, 1 insertion(+) commit 781f675e2d7ec120e8c0803f88d7bf00fe3f0703 Author: Richard Weinberger Date: Wed May 17 10:36:46 2017 +0200 ubifs: Fix unlink code wrt. double hash lookups When removing an encrypted file with a long name and without having the key we have to be able to locate and remove the directory entry via a double hash. This corner case was simply forgotten. Fixes: 528e3d178f25 ("ubifs: Add full hash lookup support") Reported-by: David Oberhollenzer Signed-off-by: Richard Weinberger fs/ubifs/journal.c | 10 ++++- fs/ubifs/tnc.c | 129 ++++++++++++++++++++++++++++++++++++++++++++--------- fs/ubifs/ubifs.h | 2 + 3 files changed, 117 insertions(+), 24 deletions(-) commit 59a74990f85bb372c9117e40c6cd27693b6df670 Author: David Oberhollenzer Date: Wed May 17 10:36:45 2017 +0200 ubifs: Fix data node size for truncating uncompressed nodes Currently, the function truncate_data_node only updates the destination data node size if compression is used. For uncompressed nodes, the old length is incorrectly retained. This patch makes sure that the length is correctly set when compression is disabled. Fixes: 7799953b34d1 ("ubifs: Implement encrypt/decrypt for all IO") Signed-off-by: David Oberhollenzer Signed-off-by: Richard Weinberger fs/ubifs/journal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f34e87f58dabc31eb69f61cf4a79e951d4176743 Author: David Gstir Date: Wed May 17 13:36:16 2017 +0200 ubifs: Don't encrypt special files on creation When a new inode is created, we check if the containing folder has a encryption policy set and inherit that. This should however only be done for regular files, links and subdirectories. Not for sockes fifos etc. Fixes: d475a507457b ("ubifs: Add skeleton for fscrypto") Cc: stable@vger.kernel.org Signed-off-by: David Gstir Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 1 + 1 file changed, 1 insertion(+) commit bb50c63244687706e11c9b636a5ad3090cd783ac Author: Hyunchul Lee Date: Wed May 17 08:58:02 2017 +0900 ubifs: Fix memory leak in RENAME_WHITEOUT error path in do_rename in RENAME_WHITEOUT error path, fscrypt_name should be freed. Signed-off-by: Hyunchul Lee Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 4d35ca4f774c29ec9ed676fd5112bfc83ef9853e Author: Hyunchul Lee Date: Wed May 17 08:57:18 2017 +0900 ubifs: Fix inode data budget in ubifs_mknod Assign inode data budget to budget request correctly. Signed-off-by: Hyunchul Lee Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 272eda8298dc82eb411ece82bbb2c62911087b24 Author: Richard Weinberger Date: Wed May 17 00:20:27 2017 +0200 ubifs: Correctly evict xattr inodes UBIFS handles extended attributes just like files, as consequence of that, they also have inodes. Therefore UBIFS does all the inode machinery also for xattrs. Since new inodes have i_nlink of 1, a file or xattr inode will be evicted if i_nlink goes down to 0 after an unlink. UBIFS assumes this model also for xattrs, which is not correct. One can create a file "foo" with xattr "user.test". By reading "user.test" an inode will be created, and by deleting "user.test" it will get evicted later. The assumption breaks if the file "foo", which hosts the xattrs, will be removed. VFS nor UBIFS does not remove each xattr via ubifs_xattr_remove(), it just removes the host inode from the TNC and all underlying xattr nodes too and the inode will remain in the cache and wastes memory. To solve this problem, remove xattr inodes from the VFS inode cache in ubifs_xattr_remove() to make sure that they get evicted. Fixes: 1e51764a3c2ac05a ("UBIFS: add new flash file system") Cc: Signed-off-by: Richard Weinberger fs/ubifs/tnc.c | 2 ++ fs/ubifs/ubifs.h | 1 + fs/ubifs/xattr.c | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+) commit e996bfd4287eb7df2354764d47677af08f5867fa Author: Richard Weinberger Date: Wed May 17 00:20:26 2017 +0200 ubifs: Unexport ubifs_inode_slab This SLAB is only being used in super.c, there is no need to expose it into the global namespace. Signed-off-by: Richard Weinberger fs/ubifs/super.c | 2 +- fs/ubifs/ubifs.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit ccd5d1b91f22351b55feb6fdee504cb84d97752f Merge: 4d25ec1 854b1dd Author: Linus Torvalds Date: Fri Jul 14 13:31:52 2017 -0700 Merge tag 'ntb-4.13' of git://github.com/jonmason/ntb Pull NTB updates from Jon Mason: "The major change in the series is a rework of the NTB infrastructure to all for IDT hardware to be supported (and resulting fallout from that). There are also a few clean-ups, etc. New IDT NTB driver and changes to the NTB infrastructure to allow for this different kind of NTB HW, some style fixes (per Greg KH recommendation), and some ntb_test tweaks" * tag 'ntb-4.13' of git://github.com/jonmason/ntb: ntb_netdev: set the net_device's parent ntb: Add error path/handling to Debug FS entry creation ntb: Add more debugfs support for ntb_perf testing options ntb: Remove debug-fs variables from the context structure ntb: Add a module option to control affinity of DMA channels NTB: Add IDT 89HPESxNTx PCIe-switches support ntb_hw_intel: Style fixes: open code macros that just obfuscate code ntb_hw_amd: Style fixes: open code macros that just obfuscate code NTB: Add ntb.h comments NTB: Add PCIe Gen4 link speed NTB: Add new Memory Windows API documentation NTB: Add Messaging NTB API NTB: Alter Scratchpads API to support multi-ports devices NTB: Alter MW API to support multi-ports devices NTB: Alter link-state API to support multi-port devices NTB: Add indexed ports NTB API NTB: Make link-state API being declared first NTB: ntb_test: add parameter for doorbell bitmask NTB: ntb_test: modprobe on remote host commit 1ed134e6526b1b513a14fba938f6d96aa1c7f3dd Author: Boris Brezillon Date: Thu Jun 22 22:25:26 2017 +0200 drm/vc4: Fix VBLANK handling in crtc->enable() path When we are enabling a CRTC, drm_crtc_vblank_get() is called before drm_crtc_vblank_on(), which is not supposed to happen (hence the WARN_ON() in the code). To solve the problem, we delay the 'update display list' operation after the CRTC is actually enabled. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/1498163126-26678-1-git-send-email-boris.brezillon@free-electrons.com Fixes: 34c8ea400ff6 ("drm/vc4: Mimic drm_atomic_helper_commit() behavior") drivers/gpu/drm/vc4/vc4_crtc.c | 66 +++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 23 deletions(-) commit 4d25ec19669292a65a32498eabdabdd32b1a8747 Merge: 907afe5 5d72ed3 Author: Linus Torvalds Date: Fri Jul 14 13:12:32 2017 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: - Improve thermal cpu_cooling interaction with cpufreq core. The cpu_cooling driver is designed to use CPU frequency scaling to avoid high thermal states for a platform. But it wasn't glued really well with cpufreq core. For example clipped-cpus is copied from the policy structure and its much better to use the policy->cpus (or related_cpus) fields directly as they may have got updated. Not that things were broken before this series, but they can be optimized a bit more. This series tries to improve interactions between cpufreq core and cpu_cooling driver and does some fixes/cleanups to the cpu_cooling driver. (Viresh Kumar) - A couple of fixes and cleanups in thermal core and imx, hisilicon, bcm_2835, int340x thermal drivers. (Arvind Yadav, Dan Carpenter, Sumeet Pawnikar, Srinivas Pandruvada, Willy WOLFF) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (24 commits) thermal: bcm2835: fix an error code in probe() thermal: hisilicon: Handle return value of clk_prepare_enable thermal: imx: Handle return value of clk_prepare_enable thermal: int340x: check for sensor when PTYP is missing Thermal/int340x: Fix few typos and kernel-doc style thermal: fix source code documentation for parameters thermal: cpu_cooling: Replace kmalloc with kmalloc_array thermal: cpu_cooling: Rearrange struct cpufreq_cooling_device thermal: cpu_cooling: 'freq' can't be zero in cpufreq_state2power() thermal: cpu_cooling: don't store cpu_dev in cpufreq_cdev thermal: cpu_cooling: get_level() can't fail thermal: cpu_cooling: create structure for idle time stats thermal: cpu_cooling: merge frequency and power tables thermal: cpu_cooling: get rid of 'allowed_cpus' thermal: cpu_cooling: OPPs are registered for all CPUs thermal: cpu_cooling: store cpufreq policy cpufreq: create cpufreq_table_count_valid_entries() thermal: cpu_cooling: use cpufreq_policy to register cooling device thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state() thermal: cpu_cooling: remove cpufreq_cooling_get_level() ... commit 907afe5923b4f89b3c377e8ce3b495124321659c Merge: 0a264b6 9c284c4 Author: Linus Torvalds Date: Fri Jul 14 13:10:06 2017 -0700 Merge tag 'mmc-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "Here are a couple of mmc fixes intended for v4.13 rc1. MMC core: - Restore some behaviour of MMC_IOC_MULTI_CMD commands - Fix using un-initialized variable in mmc_blk_issue_drv_op() - Fix mmc block queue cleanup MMC host: - sdhci-acpi: Workaround conflict with PCI wifi on GPD Win handheld - tmio-mmc: Fix bad pointer math" * tag 'mmc-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: tmio-mmc: fix bad pointer math mmc: block: Prevent new req entering queue after its cleanup mmc: block: Let MMC_IOC_MULTI_CMD return zero again for zero entries mmc: block: Initialize ret in mmc_blk_issue_drv_op() for MMC_DRV_OP_IOCTL mmc: sdhci-acpi: Workaround conflict with PCI wifi on GPD Win handheld commit 43e5f7e1fa66531777c49791014c3124ea9208d8 Author: Mauro Carvalho Chehab Date: Wed Jul 12 10:03:09 2017 -0300 docs: kprobes.txt: Fix whitespacing The notes at the end of this file start with a blank space, instead of a blank line, violating ReST format. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kprobes.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4297739f2b5d4693d9b9f9e3dffeecf2ae9f8081 Author: Mauro Carvalho Chehab Date: Wed Jul 12 10:06:20 2017 -0300 tee.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - adjust identation of titles; - mark ascii artwork as a literal block; - adjust references. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/tee.txt | 53 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 22 deletions(-) commit 633b11bee40c37fed3e9384f04a889af32fb8cf1 Author: Mauro Carvalho Chehab Date: Sun May 14 08:48:40 2017 -0300 cgroup-v2.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Comment the internal index; - Use :Date: and :Author: for authorship; - Mark titles; - Mark literal blocks; - Adjust witespaces; - Mark notes; - Use table notation for the existing tables. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/cgroup-v2.txt | 460 +++++++++++++++++++++++--------------------- 1 file changed, 239 insertions(+), 221 deletions(-) commit 58ef0e5bb30b72ce3ddc59ea2a02073b03f454bc Author: Mauro Carvalho Chehab Date: Wed May 17 14:25:05 2017 -0300 dell_rbu.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx. Currently, the document is completely unformatted. Add titles, do indentation, mark literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/dell_rbu.txt | 81 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 25 deletions(-) commit 998ff0b5796d53af66a5604d6261f9385be7b6ae Author: Mauro Carvalho Chehab Date: Wed May 17 09:55:46 2017 -0300 zorro.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use right marks for titles; - Use authorship marks; - Mark literals and literal blocks; - Use autonumbered list for references. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/zorro.txt | 59 +++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 29 deletions(-) commit 29c8c4ac9525b15457266a8fb8bb59f366f5d65b Author: Mauro Carvalho Chehab Date: Wed May 17 09:54:22 2017 -0300 xz.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use marks for titles; - Adjust indentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/xz.txt | 200 ++++++++++++++++++++++++++------------------------- 1 file changed, 103 insertions(+), 97 deletions(-) commit 05a07392c30cd38b466c7d4a1ab3979ce1fe3cb2 Author: Mauro Carvalho Chehab Date: Wed May 17 09:45:31 2017 -0300 xillybus.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Adjust indentation; - Mark authorship; - Comment internal contents table; - Mark literal blocks; - Don't use all-upercase titles. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/xillybus.txt | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit c6f4d41338a78bcc3ddcc4e00f5de63c8ee2ad20 Author: Mauro Carvalho Chehab Date: Wed May 17 09:38:00 2017 -0300 vfio.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - adjust title marks; - use footnote marks; - mark literal blocks; - adjust identation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/vfio.txt | 281 +++++++++++++++++++++++++------------------------ 1 file changed, 144 insertions(+), 137 deletions(-) commit 2a26ed8e4afff2bb48c044dc3ad69da19d66debf Author: Mauro Carvalho Chehab Date: Wed May 17 09:26:06 2017 -0300 vfio-mediated-device.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! In this specific document, the title, copyright and authorship are added as if it were a C file! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - convert document preambule to the proper format; - mark literal blocks; - adjust identation; - use numbered lists for references. Reviewed by: Kirti Wankhede Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/vfio-mediated-device.txt | 266 +++++++++++++++++---------------- 1 file changed, 137 insertions(+), 129 deletions(-) commit c6ebaf6bdb10469910afdcfc6af5c26846883e98 Author: Mauro Carvalho Chehab Date: Wed May 17 09:16:19 2017 -0300 unaligned-memory-access.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - promote document title one level; - use markups for authorship and put it at the beginning; - mark literal blocks; - adjust identation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/unaligned-memory-access.txt | 57 ++++++++++++++++--------------- 1 file changed, 30 insertions(+), 27 deletions(-) commit 79ab3b0d21ea1ac48ce0e6b44997dd0a8c8f72e6 Author: Mauro Carvalho Chehab Date: Wed May 17 09:10:48 2017 -0300 this_cpu_ops.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - promote document title one level; - mark literal blocks; - move authorship to the beginning of the file and use markups. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/this_cpu_ops.txt | 49 ++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 21 deletions(-) commit aa4d520358ed03ee5c2f54ef66e42f971839e62e Author: Mauro Carvalho Chehab Date: Wed May 17 09:00:17 2017 -0300 svga.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use standard notation for titles; - Use the note mark; - mark literal blocks; - adjust identation; - mark the table. Acked-By: Martin Mares Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/svga.txt | 146 +++++++++++++++++++++++++++---------------------- 1 file changed, 80 insertions(+), 66 deletions(-) commit 603699bbfb786411f869da9a87d11fc2f3374afd Author: Mauro Carvalho Chehab Date: Wed May 17 08:19:34 2017 -0300 static-keys.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Mark titles; - Add a warning mark; - Mark literals and literal blocks; - Adjust identation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/static-keys.txt | 207 ++++++++++++++++++++++-------------------- 1 file changed, 108 insertions(+), 99 deletions(-) commit c6d289d0ccf411b82196195318888901b7828b73 Author: Mauro Carvalho Chehab Date: Wed May 17 08:03:50 2017 -0300 smsc_ece1099.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add a title for the document. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/smsc_ece1099.txt | 4 ++++ 1 file changed, 4 insertions(+) commit d1bb1d04f5c2d4e2cc03d8bc425699241ca4739e Author: Mauro Carvalho Chehab Date: Wed May 17 08:01:45 2017 -0300 SM501.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - adjust document title; - use the copyright markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/SM501.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9135bf4dcb437fa5bac908c5d3bff7894138a157 Author: Mauro Carvalho Chehab Date: Wed May 17 07:55:32 2017 -0300 siphash.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Mark titles; - Mark literal blocks; - Use :Author: for authorship; - Don't sumerate chapters; - Adjust identation. NOTE: This file has actually two documents inside it, the first one describing siphash, the second one describing halfsiphash. It is likely a good idea to split them when it gets moved to security/ (which is where it probably belongs). Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/siphash.txt | 164 +++++++++++++++++++++++++--------------------- 1 file changed, 89 insertions(+), 75 deletions(-) commit 53708b874820aeab86b90ab6deef7a6d9a8d4a3d Author: Mauro Carvalho Chehab Date: Wed May 17 07:50:05 2017 -0300 sgi-ioc4.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx. In this case, just adding a title is enough. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/sgi-ioc4.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 2273194d1e236c6a8fab5b856ece8d478937b7b2 Author: Mauro Carvalho Chehab Date: Wed May 17 07:45:57 2017 -0300 SAK.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - mark document title; - use :Author: and :Date: for authorship; - adjust notation for literals and bold; - mark literal blocks; - adjust identation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/SAK.txt | 65 +++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 31 deletions(-) commit af3137f1322b2a25ce24da131675b090fbb9fa7e Author: Mauro Carvalho Chehab Date: Wed May 17 06:53:44 2017 -0300 rpmsg.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - mark document and chapter titles; - mark notes; - mark literal blocks; - adjust identation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/rpmsg.txt | 348 ++++++++++++++++++++++++++++-------------------- 1 file changed, 204 insertions(+), 144 deletions(-) commit 773810d30e7d81b8308fea272ed2ec3d832a6018 Author: Mauro Carvalho Chehab Date: Wed May 17 06:46:19 2017 -0300 robust-futexes.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - add a title for the document; - mark literal blocks; Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/robust-futexes.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ce3a966931a45065306b9a1840f22bfccbffe590 Author: Mauro Carvalho Chehab Date: Wed May 17 06:42:36 2017 -0300 robust-futex-ABI.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - promote document title; - use :Author: for authorship; - mark literal blocks; - add blank lines. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/robust-futex-ABI.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 317a8455f18383bf339c3ff0e461c5d9fdcb0b3d Author: Mauro Carvalho Chehab Date: Wed May 17 06:38:02 2017 -0300 rfkill.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - mark titles; - comment contents index; - mark literal blocks; - adjust identation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/rfkill.txt | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit 620b470bb41c9620875f9b7e3fe2d70a7602a6b6 Author: Mauro Carvalho Chehab Date: Wed May 17 06:31:37 2017 -0300 remoteproc.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - mark document and section titles; - adjust identation; - mark literal blocks Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/remoteproc.txt | 328 +++++++++++++++++++++++++------------------ 1 file changed, 189 insertions(+), 139 deletions(-) commit ce0f95a501b201f857909738e201729048d41be7 Author: Mauro Carvalho Chehab Date: Wed May 17 06:18:13 2017 -0300 rbtree.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Mark document title; - Use :Author: for authorship; - mark a sub-section title as such; - mark literal blocks; - adjust identation where needed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/rbtree.txt | 88 +++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 42 deletions(-) commit 3b033380cb8dea6f00503d6d30c8f1e5c571f565 Author: Mauro Carvalho Chehab Date: Tue May 16 22:27:11 2017 -0300 printk-formats.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - add a title for the document; - add markups for section titles; - move authorship to the beginning and use :Author:; - use right markup for tables; - mark literals and literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/printk-formats.txt | 384 +++++++++++++++++++++++---------------- 1 file changed, 229 insertions(+), 155 deletions(-) commit 9cc07df4b548fce9f29aaf27e51b8b5ccefa2cd9 Author: Mauro Carvalho Chehab Date: Tue May 16 21:58:47 2017 -0300 preempt-locking.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - mark titles; - mark literal blocks; - adjust identation where needed; - use :Author: for authorship. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/preempt-locking.txt | 40 ++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) commit 9a4aa7bfce3764b1795ce283b52808b72aad1a66 Author: Mauro Carvalho Chehab Date: Tue May 16 11:23:58 2017 -0300 pnp.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use a markup for document title; - use :Author: and :Last updated: for authorship; - adjust whitespaces where needed; - mark literal blocks; - fix a few subtitle markups. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/pnp.txt | 343 ++++++++++++++++++++++++++++---------------------- 1 file changed, 192 insertions(+), 151 deletions(-) commit 5da98b8230fb998b0731b2ba3893461ff238a297 Author: Mauro Carvalho Chehab Date: Tue May 16 10:23:05 2017 -0300 pi-futex.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx. This document requires just minor adjustments to match the standard documentation style: - promote document name; - remove extra collons on some chapter titles; - use "-" for a bulleted list. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/pi-futex.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 5426a2cc70be499ea3bc67985c0608c7ac62fe6c Author: Mauro Carvalho Chehab Date: Tue May 16 10:20:19 2017 -0300 phy.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - mark titles; - use :Author: for authorship; - mark literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/phy.txt | 106 +++++++++++++++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 39 deletions(-) commit c437c3a405f01ceab5d0251e2cb9698edb991160 Author: Mauro Carvalho Chehab Date: Tue May 16 10:14:12 2017 -0300 percpu-rw-semaphore.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: This document is already adopting the standard format, with a single exception: we're using this convention for the document title: === foo === So, adjust the title of this document to follow the standard. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/percpu-rw-semaphore.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit be9d0411f1608ad62c2334d3a289a68e4259e48c Author: Mauro Carvalho Chehab Date: Wed May 17 11:21:45 2017 -0300 parport-lowlevel.txt: standardize document format Each text file under Documentation follows a different format. This one uses a man-page like approach. Change its representation to be closer to the adopted standard, using ReST markups for it to be parseable by Sphinx: - Mark titles; - Mark literals and literal blocks; - Adjust identation. Still, the best would be to move its contents to kernel-docs. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/parport-lowlevel.txt | 1321 +++++++++++++++++++++++------------- 1 file changed, 841 insertions(+), 480 deletions(-) commit 7576b2b98dc9aa8a3ce8921df4a5fbb354269ed8 Author: Mauro Carvalho Chehab Date: Tue May 16 10:06:48 2017 -0300 padata.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - mark document title; - mark literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/padata.txt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit e4a5c33ed2084d000b968e1847a7d341551f75ec Author: Mauro Carvalho Chehab Date: Tue May 16 10:04:34 2017 -0300 numastat.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - mark the document title; - mark the table as such. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/numastat.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e3866726ebe382815e2b5dcce1a767dac9b6c8fa Author: Mauro Carvalho Chehab Date: Tue May 16 10:00:04 2017 -0300 ntb.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx. This file is using some other markup notation (likely, markdown). Convert it to the adopted standard: - Adjust the header level markup; - Adjust identation for debugfs files and module parameters. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/ntb.txt | 55 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 18 deletions(-) commit 853afb719f6e4f3e8387390999717ca2b91862e5 Author: Mauro Carvalho Chehab Date: Tue May 16 09:54:22 2017 -0300 nommu-mmap.txt: don't use all upper case on titles This file is almost in the standard format we're adopting for other documentation text files. Yet, it use upper case on titles. So, in order to uniform how chapter names, adjust caps on titles. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/nommu-mmap.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit c49e51a531bc01469cd083a71f495171e4a3d067 Author: Mauro Carvalho Chehab Date: Tue May 16 09:48:37 2017 -0300 nommu-mmap.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Adjust identation for main title; - fix level for chapter titles; - use ".. important::" tag for an important note; - use the right notation for paragraph auto-numbering "(#)"; - Fix footnotes syntax; - fix one literal var to use the right ReST tag. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/nommu-mmap.txt | 52 +++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 30 deletions(-) commit 78b11f40d48e10292ab6c642652f25fb4c95bdcc Author: Mauro Carvalho Chehab Date: Tue May 16 09:43:52 2017 -0300 men-chameleon-bus.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Adjust identations; - Remove title numbering; - mark literal blocks; - comment its TOC. Acked-by: Johannes Thumshirn Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/men-chameleon-bus.txt | 330 +++++++++++++++++++----------------- 1 file changed, 171 insertions(+), 159 deletions(-) commit c18c1cce0c1a02a2cc197a4a4c80ac2db7492617 Author: Mauro Carvalho Chehab Date: Sun May 14 22:52:22 2017 -0300 memory-hotplug.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - use :Created: and :Updated: for the timestamps; - comment its internal index; - adjust titles and use proper markup; - Whitespace fixes; - Use cross references where needed; - Use bulleted lists where needed; - mark literal blocks; - Use the ReST notation for a table. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/memory-hotplug.txt | 355 +++++++++++++++++++++------------------ 1 file changed, 194 insertions(+), 161 deletions(-) commit ad98211ba4d9b1169a419d2bc8a2e67c8f9c9ede Author: Mauro Carvalho Chehab Date: Sun May 14 21:06:34 2017 -0300 mailbox.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add markups for section titles; - Use :Author: for authorship; - Mark literal block as such and ident it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/mailbox.txt | 185 ++++++++++++++++++++++++---------------------- 1 file changed, 97 insertions(+), 88 deletions(-) commit 7b001bff4609b80ad626b429cc069b40a1d5fab3 Author: Mauro Carvalho Chehab Date: Sun May 14 21:02:59 2017 -0300 lzo.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add markups for section titles; - mark literal blocks; - use ".. important::" for an important note. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/lzo.txt | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit c926d4d4a4c815bc43155c542a3113afb5832620 Author: Mauro Carvalho Chehab Date: Sun May 14 20:57:08 2017 -0300 lockup-watchdogs.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx. This file is almost at ReST format. Just one title needs to be adjusted, in order to follow the standard. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/lockup-watchdogs.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 793c6382026ef66edd1799d3a82e7e46a9fec94a Author: Mauro Carvalho Chehab Date: Sun May 14 17:39:55 2017 -0300 ldm.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Reformat its title; - Use :Author: and :Last Updated: for authorship - Use note markup; - Reformat table to match ReST standard; - Use bulleted lists where needed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/ldm.txt | 56 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 22 deletions(-) commit d6ac1c7e2fa3bfe20ac078cdc49104babf015ca2 Author: Mauro Carvalho Chehab Date: Sun May 14 17:13:21 2017 -0300 kref.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - add a title for the document and section titles; - move authorship information to the beginning and use :Author: - mark literal blocks as such and ident them if needed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kref.txt | 295 ++++++++++++++++++++++++++----------------------- 1 file changed, 155 insertions(+), 140 deletions(-) commit a1dac767622c001c72373534e557bd3dcb61434b Author: Mauro Carvalho Chehab Date: Sun May 14 16:51:34 2017 -0300 kprobes.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - comment the contents; - add proper markups for titles; - mark literal blocks as such; - use :Author: for authorship; - use the right markups for footnotes; - escape some literals that would otherwise cause problems; - fix identation and add blank lines where needed. Acked-by: Masami Hiramatsu Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kprobes.txt | 474 +++++++++++++++++++++++++++------------------- 1 file changed, 279 insertions(+), 195 deletions(-) commit 7472723305906f3d60e95de1ecf3e31b20c2a854 Author: Mauro Carvalho Chehab Date: Sun May 14 16:25:04 2017 -0300 kobject.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add markups for titles; - mark literal blocks as such; - add needed whitespace/blank lines; - use :Author: and :Last updated: for authorship. Acked-by: Greg Kroah-Hartman Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kobject.txt | 69 ++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 27 deletions(-) commit 7d98c21bd0257ec9f56910c758519bee71767517 Author: Mauro Carvalho Chehab Date: Sun May 14 16:07:16 2017 -0300 kernel-per-CPU-kthreads.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use title markups; - use "-" for bulletted lists; - Split Name/Purpose on two lines, in order to make visually easier to read (in text format), and to bold the title (on ReST output) - Add blank lines to split bulleted lists; - use sub-titles for the several kthread softirq types; - mark one literal var with asterisk as such, in order to avoid an error warning on Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kernel-per-CPU-kthreads.txt | 156 +++++++++++++++++++++++------- 1 file changed, 121 insertions(+), 35 deletions(-) commit 0685552f2c37531eb2f29faf7918a15b632175c5 Author: Mauro Carvalho Chehab Date: Sun May 14 15:47:07 2017 -0300 isa.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use the main title standard for this document; - replace _foo_ by **foo** for emphasis; - mark literal blocks as such. Acked-by: William Breathitt Gray Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/isa.txt | 53 ++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) commit 66b338eabef3255a2c470aa6d75a62a832c4fc4a Author: Mauro Carvalho Chehab Date: Sun May 14 15:42:12 2017 -0300 isapnp.txt: promote title level This simple document only needs to promote its title to be using the standard we're using for document texts. Yet, IMHO, it would be worth merging this file with Documentation/pnp.txt in the future. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/isapnp.txt | 1 + 1 file changed, 1 insertion(+) commit e7225dc8705a59e102ce31037e35a8cb6fe4056c Author: Mauro Carvalho Chehab Date: Sun May 14 15:40:07 2017 -0300 IRQ.txt: add a markup for its title This simple document only needs a markup for its title to be using the standard we're adopting for text documents. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/IRQ.txt | 2 ++ 1 file changed, 2 insertions(+) commit b4282c79204b086276f4278568994f7e1ee449ca Author: Mauro Carvalho Chehab Date: Sun May 14 15:35:40 2017 -0300 irqflags-tracing.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: There isn't much to be done here: just mark the document title as such and add a :Author:. While here, use upper case at the beginning of a few paragraphs that start with lower case. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/irqflags-tracing.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1642a1e68a70230c4dd0fb1523e1e886e3f5972a Author: Mauro Carvalho Chehab Date: Sun May 14 15:29:55 2017 -0300 IRQ-domain.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - use proper markups for titles; - mark literal blocks as such; - add blank lines where needed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/IRQ-domain.txt | 69 +++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 20 deletions(-) commit ae2f26aa4c31498f9bbcfd2f2798d07b4cb82728 Author: Mauro Carvalho Chehab Date: Sun May 14 15:22:54 2017 -0300 IRQ-affinity.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add a title for the document; - mark literal blocks as such; - use a bulleted list for changelog. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/IRQ-affinity.txt | 75 ++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 35 deletions(-) commit f5981a5c59a90780138ea844ba3362bb72210808 Author: Mauro Carvalho Chehab Date: Sun May 14 15:18:08 2017 -0300 IPMI.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - fix document type; - add missing markups for subitems; - mark literal blocks; - add whitespaces and blank lines where needed; - use bulleted list markups where neded. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/IPMI.txt | 76 +++++++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 32 deletions(-) commit 877b638ff814205ff256173295bb79a220f9ad0e Author: Mauro Carvalho Chehab Date: Sun May 14 15:08:22 2017 -0300 iostats.txt: update it to cover recent Kernels Everything there that it is said for 2.6 also applies on current 4.x Kernels. So, update the information there. While here, use ``foo`` for literals. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/iostats.txt | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 378012cf68f457a38a80d1efb938090ccc484e19 Author: Mauro Carvalho Chehab Date: Sun May 14 14:52:53 2017 -0300 iostats.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - promote main title level; - mark literal blocks as such; - Add blank lines to avoid Sphinx errors. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/iostats.txt | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 0e95c85341b7b5be34f999b6023e3df4d03f4977 Author: Mauro Carvalho Chehab Date: Sun May 14 14:45:35 2017 -0300 io_ordering.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add a title; - mark literal-blocks as such. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/io_ordering.txt | 62 +++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 29 deletions(-) commit 9cf5116d5b10793b5105f962fa3d899b2d6cb5f6 Author: Mauro Carvalho Chehab Date: Sun May 14 14:32:35 2017 -0300 io-mapping.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add a title for the document and for API chapter; - mark literal blocks; - Adjust whitespacing. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/io-mapping.txt | 67 +++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 26 deletions(-) commit 45d85146269f711b8fbfdda017a033676caf29ab Author: Mauro Carvalho Chehab Date: Sun May 14 14:13:14 2017 -0300 Intel-IOMMU.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: This file is almost in the right format. It only needed to convert a list to bulleted list and to use the right markup for literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/Intel-IOMMU.txt | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 7e18c07e79546cbaa114e56b409e4f860a9d49cc Author: Mauro Carvalho Chehab Date: Sun May 14 14:08:23 2017 -0300 intel_txt.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - promote main title one level; - fix the bulleted list markup; - use bulletted list markup where needed; - add whitespaces where needed; - mark literal blocks; - remove extra ":" after section titles. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/intel_txt.txt | 63 ++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 23 deletions(-) commit e2862b25dcce61e1d19bfb5cf1840415ef3664e6 Author: Mauro Carvalho Chehab Date: Sun May 14 14:23:08 2017 -0300 hwspinlock.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Adjust title markups; - remove explicit numeration from titles; - mark literal blocks as such; - replace _foo_ by **foo** for emphasis; - adjust whitespaces and add blank lines where needed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/hwspinlock.txt | 527 +++++++++++++++++++++++++------------------ 1 file changed, 307 insertions(+), 220 deletions(-) commit 440e4f6d293c5e599013a04a8e3a8ae375bbaf71 Author: Mauro Carvalho Chehab Date: Sun May 14 13:59:18 2017 -0300 hw_random.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - use proper markups for titles; - adjust section identation; - use proper markup for notes and fix it to properly show the numbered list. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/hw_random.txt | 159 ++++++++++++++++++++++++-------------------- 1 file changed, 87 insertions(+), 72 deletions(-) commit e45b082d463fea5bb1b85aff00d049cc51f593fa Author: Mauro Carvalho Chehab Date: Sun May 14 13:51:39 2017 -0300 highuid.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - use a markup for the title; - use :Author: and :Last updated: markups at the beginning with authorship info; - use proper markups for the lists. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/highuid.txt | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit ccd8d5577c17ac276388dc77c34f16b4e9c1b62e Author: Mauro Carvalho Chehab Date: Sun May 14 13:45:26 2017 -0300 gcc-plugins.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - promote main title; - use the right markup for footnotes; - use bold markup for files name; - identify literal blocks; - add blank lines to avoid Sphinx to complain; - remove numeration from titles. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/gcc-plugins.txt | 58 ++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 26 deletions(-) commit db4df4819c8c3f7e749752cf95966034d4c42ed2 Author: Mauro Carvalho Chehab Date: Sun May 14 13:35:29 2017 -0300 futex-requeue-pi.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - promote level for the document title; - mark literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/futex-requeue-pi.txt | 93 +++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 46 deletions(-) commit af7175bc21e3c2a73f85bc920852a136469c6112 Author: Mauro Carvalho Chehab Date: Sun May 14 13:32:50 2017 -0300 flexible-arrays.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - use :Author: and :Updated: markups; - use proper markup for the document title; - mark the literal-blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/flexible-arrays.txt | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 72fd15c01554694bd8d69652cc9bb77c2cda193b Author: Mauro Carvalho Chehab Date: Sun May 14 13:27:55 2017 -0300 eisa.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - use ReST notation for titles; - identify literal blocks; - use :Author: for document authorship; - use the proper notation for tables; - adjust whitespaces where needed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/eisa.txt | 273 +++++++++++++++++++++++++++---------------------- 1 file changed, 150 insertions(+), 123 deletions(-) commit ef16bcc7f72d5084f2da551c1d88374c014f76a0 Author: Mauro Carvalho Chehab Date: Sun May 14 13:19:44 2017 -0300 efi-stub.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - use proper markups for titles; - identify literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/efi-stub.txt | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 7c6a2d229dd6dab7cc7563f72b78dd5867d351b4 Author: Mauro Carvalho Chehab Date: Wed May 17 10:29:58 2017 -0300 debugging-via-ohci1394.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Mark and adjust titles; - Mark and indent literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/debugging-via-ohci1394.txt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 5d75cf6d37e5a88a702e96288dc040663ba7d915 Author: Mauro Carvalho Chehab Date: Sun May 14 13:16:36 2017 -0300 DMA-ISA-LPC.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - use proper markups for titles; - use :Author: for authorship; - identify the literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/DMA-ISA-LPC.txt | 71 ++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 35 deletions(-) commit 36c682f68e8ec56564172f82f05e42f8c1754667 Author: Mauro Carvalho Chehab Date: Sun May 14 13:08:35 2017 -0300 DMA-attributes.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: This file is almost on the standard format. All it needs to be parsed by Sphinx is to fix its main title and add a few blank lines. Yet, it is worth to replace NOTE: by the corresponding ReST markup. While here, remove the extra "---" from a subtitle. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/DMA-attributes.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 266921bdb53ca8a171b96c113e3995b231228b66 Author: Mauro Carvalho Chehab Date: Wed May 17 10:27:28 2017 -0300 DMA-API-HOWTO.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Mark titles; - Mark literal blocks; - Mark some literals that would otherwise produce warnings; - Mark authorship. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/DMA-API-HOWTO.txt | 153 +++++++++++++++++++++++----------------- 1 file changed, 88 insertions(+), 65 deletions(-) commit 03158a70adde2fd46b0f266b5d1090efe2ff6887 Author: Mauro Carvalho Chehab Date: Sun May 14 07:27:52 2017 -0300 DMA-API.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Fix some title marks to match ReST; - use :Author: for author name; - foo_ is an hyperlink. Get rid of it; - Mark literal blocks as such; - Use tables on some places that are almost using the table format. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/DMA-API.txt | 580 ++++++++++++++++++++++++++-------------------- 1 file changed, 329 insertions(+), 251 deletions(-) commit a2fbbcea7bb9b1b6d29a24b1e74a6cffd6dd44e6 Author: Mauro Carvalho Chehab Date: Sun May 14 10:04:21 2017 -0300 digsig.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - comment the internal index; - use the proper markups for titles; - mark literal blocks. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/digsig.txt | 131 ++++++++++++++++++++++++----------------------- 1 file changed, 68 insertions(+), 63 deletions(-) commit 7effa5b0e8feab19e723db4d072d8c65d4cdafa3 Author: Mauro Carvalho Chehab Date: Wed May 17 11:59:38 2017 -0300 dcdbas.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Mark titles; - Mark literal blocks; - Mark table. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/dcdbas.txt | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 2e4e6f30f7ff84632e893786fab5e8ff44ff3e03 Author: Mauro Carvalho Chehab Date: Sun May 14 09:56:02 2017 -0300 crc32.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add a title for the document; - Mark literal blocks. While here, replace a comma by a dot at the end of a paragraph. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/crc32.txt | 75 +++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 34 deletions(-) commit e8cb6f1edc57e5c729ce4e37a54a5f84fac0c6a4 Author: Mauro Carvalho Chehab Date: Sun May 14 09:52:01 2017 -0300 cputopology.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add a title for the document; - mark literals; - use table markup for existing table. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/cputopology.txt | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 09338fb0f4c333a99ccc5bf551042869e07eeec4 Author: Mauro Carvalho Chehab Date: Sun May 14 09:42:08 2017 -0300 cpu-load: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - mark literals; - Adjust document title; - Use a list for references. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/cpu-load.txt | 131 +++++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 65 deletions(-) commit f68ac62d11e760de68a55b05c8bbc2c47f275ee9 Author: Mauro Carvalho Chehab Date: Sun May 14 09:15:12 2017 -0300 clk.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use section/title markups; - Use :Author: for authorship; - Mark literals and literal blocks; - Mark tables; - Use ReST notation for footnotes. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/clk.txt | 189 ++++++++++++++++++++++++++++---------------------- 1 file changed, 106 insertions(+), 83 deletions(-) commit f1d8b71c5fefea29ef4ea856e2192c07446e0c98 Author: Mauro Carvalho Chehab Date: Sun May 14 08:55:25 2017 -0300 circular-buffers.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Mark titles with ReST notation; - comment the contents table; - Use :Author: tag for authorship; - mark literal blocks as such; - use valid numbered list markups; - Don't capitalize titles. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/circular-buffers.txt | 51 +++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 28 deletions(-) commit fdefdbca7e3295341aefa13036f1af7fd5401e1d Author: Mauro Carvalho Chehab Date: Sun May 14 08:25:51 2017 -0300 cachetlb.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Adjust the title format; - use :Author: for author's name; - mark literals as such; - use note and important notation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/cachetlb.txt | 92 ++++++++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 40 deletions(-) commit 38975e905a510349bb913f60824d2268ccbb833d Author: Mauro Carvalho Chehab Date: Sun May 14 08:13:48 2017 -0300 bus-virt-phys-mapping.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Move author info to the beginning of file and use :Author: - use warning/note annotation; - mark literal blocks as such; - Add a title for the document; - use **emphasis** instead of _emphasis_. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/bus-virt-phys-mapping.txt | 64 +++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 26 deletions(-) commit 7f4e012133644726acb7d1f912bd2a4b0b7c2205 Author: Mauro Carvalho Chehab Date: Sun May 14 08:03:53 2017 -0300 btmrvl.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use the right notation for titles; - Use a list for image names; - Use literal blocks where needed; - Whitespace fixes. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/btmrvl.txt | 65 ++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 30 deletions(-) commit b4b8af5c4eb69fb5394fb24bb82a5cb404ce86c1 Author: Mauro Carvalho Chehab Date: Sun May 14 07:55:40 2017 -0300 bt8xxgpio.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Adjust titles to match the convention; - use a literal block for ascii artwork. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/bt8xxgpio.txt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit a966ac73d7772a2b067c50fa16bbbfe418fc6374 Author: Mauro Carvalho Chehab Date: Sun May 14 07:49:15 2017 -0300 bcache.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add a title for the document; - Use a list for the listed URLs; - mark literal blocks; - adjust whitespaces; - Don't capitalize section titles. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/bcache.txt | 190 ++++++++++++++++++++++++++--------------------- 1 file changed, 107 insertions(+), 83 deletions(-) commit 0a264b6db702e0e9bdf8b037c61c951f87785bfc Merge: 1e5a2b1 b9091b1 Author: Linus Torvalds Date: Fri Jul 14 12:44:00 2017 -0700 Merge tag 'sound-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Small last-minute fixes for 4.13-rc1: a couple of PCM fixes for m68k, a cleanup work for legacy ISA msnd driver, and a few HD-audio new IDs and quirks" * tag 'sound-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Add hdmi id for a Geminilake variant ALSA: hda/realtek - New codec device ID for ALC1220 ALSA: pcm: Simplify check for dma_mmap_coherent() availability ALSA: pcm: Protect call to dma_mmap_coherent() by check for HAS_DMA ALSA: msnd: Optimize / harden DSP and MIDI loops ALSA: hda/realtek - change the location for one of two front microphones ALSA: opl4: Move inline before return type commit 1e5a2b1fbb41c619c1abbe9b853269d3d932cdf1 Merge: 1430858 7228b66 Author: Linus Torvalds Date: Fri Jul 14 12:42:07 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull key handling fixes from James Morris: "A minor fix and documentation updates" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: KEYS: Add documentation for asymmetric keyring restrictions KEYS: DH: validate __spare field modsign: add markers to endif-statements in certs/Makefile commit 1430858fa827e0c11921f26f429ccf22188d4a56 Merge: 2931dc7 3c48d86 Author: Linus Torvalds Date: Fri Jul 14 12:37:41 2017 -0700 Merge tag 'clk-bulk-get-prep-enable' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk api update from Stephen Boyd: "Small patch to add the clk_bulk_prepare_enable() and clk_bulk_disable_unprepare() API to the newly introduced clk bulk APIs. It would be good to get this into the -rc1 so that other driver trees can use it for code targeted for the next merge window" * tag 'clk-bulk-get-prep-enable' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: Provide bulk prepare_enable disable_unprepare variants commit 2931dc7d9daf7addc10a126aedf1e630a1a05b49 Merge: d3c329c7 34d5ac2 Author: Linus Torvalds Date: Fri Jul 14 12:36:20 2017 -0700 Merge tag 'pci-v4.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix a typo that broke Rockchip enumeration - fix a new memory leak in the ARM host bridge failure path * tag 'pci-v4.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: rockchip: Check for pci_scan_root_bus_bridge() failure correctly ARM/PCI: Fix pcibios_init_resource() struct pci_host_bridge leak commit d3c329c741af0a7bc338900491dfbb10422f5618 Merge: b86faee 799ce1dbb Author: Linus Torvalds Date: Fri Jul 14 12:31:09 2017 -0700 Merge tag 'befs-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/luisbg/linux-befs Pull single befs fix from Luis de Bethencourt: "Very little activity in the befs file system this time since I'm busy settling into a new job" * tag 'befs-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/luisbg/linux-befs: befs: add kernel-doc formatting for befs_bt_read_super() commit 76250f2b743b72cb685cc51ac0cdabb32957180b Author: Chris Wilson Date: Tue Feb 14 12:40:01 2017 +0000 dma-buf/fence: Avoid use of uninitialised timestamp [ 236.821534] WARNING: kmemcheck: Caught 64-bit read from uninitialized memory (ffff8802538683d0) [ 236.828642] 420000001e7f0000000000000000000000080000000000000000000000000000 [ 236.839543] i i i i u u u u i i i i i i i i u u u u u u u u u u u u u u u u [ 236.850420] ^ [ 236.854123] RIP: 0010:[] [] fence_signal+0x17/0xd0 [ 236.861313] RSP: 0018:ffff88024acd7ba0 EFLAGS: 00010282 [ 236.865027] RAX: ffffffff812f6a90 RBX: ffff8802527ca800 RCX: ffff880252cb30e0 [ 236.868801] RDX: ffff88024ac5d918 RSI: ffff880252f780e0 RDI: ffff880253868380 [ 236.872579] RBP: ffff88024acd7bc0 R08: ffff88024acd7be0 R09: 0000000000000000 [ 236.876407] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880253868380 [ 236.880185] R13: ffff8802538684d0 R14: ffff880253868380 R15: ffff88024cd48e00 [ 236.883983] FS: 00007f1646d1a740(0000) GS:ffff88025d000000(0000) knlGS:0000000000000000 [ 236.890959] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 236.894702] CR2: ffff880251360318 CR3: 000000024ad21000 CR4: 00000000001406f0 [ 236.898481] [] i915_gem_request_retire+0x1cd/0x230 [ 236.902439] [] i915_gem_request_alloc+0xa3/0x2f0 [ 236.906435] [] i915_gem_do_execbuffer.isra.41+0xb6d/0x18b0 [ 236.910434] [] i915_gem_execbuffer2+0x95/0x1e0 [ 236.914390] [] drm_ioctl+0x1e5/0x460 [ 236.918275] [] do_vfs_ioctl+0x8f/0x5c0 [ 236.922168] [] SyS_ioctl+0x3c/0x70 [ 236.926090] [] entry_SYSCALL_64_fastpath+0x17/0x93 [ 236.930045] [] 0xffffffffffffffff We only set the timestamp before we mark the fence as signaled. It is done before to avoid observers having a window in which they may see the fence as complete but no timestamp. Having it does incur a potential for the timestamp to be written twice, and even for it to be corrupted if the u64 write is not atomic. Instead use a new bit to record the presence of the timestamp, and teach the readers to wait until it is set if the fence is complete. There still remains a race where the timestamp for the signaled fence may be shown before the fence is reported as signaled, but that's a pre-existing error. Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Gustavo Padovan Cc: Daniel Vetter Reported-by: Rafael Antognolli Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170214124001.1930-1-chris@chris-wilson.co.uk drivers/dma-buf/dma-fence.c | 17 ++++++----------- drivers/dma-buf/sync_debug.c | 2 +- drivers/dma-buf/sync_file.c | 8 +++++++- include/linux/dma-fence.h | 2 ++ 4 files changed, 16 insertions(+), 13 deletions(-) commit c3cfb656307583ddfea45375c10183737593c195 Author: Liu Bo Date: Thu Jul 13 15:00:50 2017 -0700 Btrfs: fix unexpected return value of bio_readpage_error With blk_status_t conversion (that are now present in master), bio_readpage_error() may return 1 as now ->submit_bio_hook() may not set %ret if it runs without problems. This fixes that unexpected return value by changing btrfs_check_repairable() to return a bool instead of updating %ret, and patch is applicable to both codebases with and without blk_status_t. Signed-off-by: Liu Bo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 12 ++++++------ fs/btrfs/extent_io.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit e8f5b395d5332b5d720d62d33d6e06836392fd85 Author: David Sterba Date: Thu Jul 13 17:42:15 2017 +0200 btrfs: btrfs_create_repair_bio never fails, skip error handling As the function uses the non-failing bio allocation, we can remove error handling from the callers as well. Signed-off-by: David Sterba Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 4 ---- fs/btrfs/inode.c | 4 ---- 2 files changed, 8 deletions(-) commit c09abff87f90c81d74b6483837a665f97448a475 Author: David Sterba Date: Thu Jul 13 18:10:07 2017 +0200 btrfs: cloned bios must not be iterated by bio_for_each_segment_all We've started using cloned bios more in 4.13, there are some specifics regarding the iteration. Filipe found [1] that the raid56 iterated a cloned bio using bio_for_each_segment_all, which is incorrect. The cloned bios have wrong bi_vcnt and this could lead to silent corruptions. This patch adds assertions to all remaining bio_for_each_segment_all cases. [1] https://patchwork.kernel.org/patch/9838535/ Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/compression.c | 1 + fs/btrfs/disk-io.c | 1 + fs/btrfs/extent_io.c | 3 +++ fs/btrfs/inode.c | 2 ++ 4 files changed, 7 insertions(+) commit 1014f3d68fc4034966b15234dc12b81147ee83b2 Merge: 848c23b 6592e58 Author: David Sterba Date: Fri Jul 14 20:37:38 2017 +0200 Merge branch 'next/filipe' into for-4.13-part2 - incremental send fixes - raid56 corruption fix (cloned bio iteration) commit 9d53caec84c7c5700e7c1ed744ea584fff55f9ac Author: Jane Chu Date: Tue Jul 11 12:00:54 2017 -0600 sparc64: Measure receiver forward progress to avoid send mondo timeout A large sun4v SPARC system may have moments of intensive xcall activities, usually caused by unmapping many pages on many CPUs concurrently. This can flood receivers with CPU mondo interrupts for an extended period, causing some unlucky senders to hit send-mondo timeout. This problem gets worse as cpu count increases because sometimes mappings must be invalidated on all CPUs, and sometimes all CPUs may gang up on a single CPU. But a busy system is not a broken system. In the above scenario, as long as the receiver is making forward progress processing mondo interrupts, the sender should continue to retry. This patch implements the receiver's forward progress meter by introducing a per cpu counter 'cpu_mondo_counter[cpu]' where 'cpu' is in the range of 0..NR_CPUS. The receiver increments its counter as soon as it receives a mondo and the sender tracks the receiver's counter. If the receiver has stopped making forward progress when the retry limit is reached, the sender declares send-mondo-timeout and panic; otherwise, the receiver is allowed to keep making forward progress. In addition, it's been observed that PCIe hotplug events generate Correctable Errors that are handled by hypervisor and then OS. Hypervisor 'borrows' a guest cpu strand briefly to provide the service. If the cpu strand is simultaneously the only cpu targeted by a mondo, it may not be available for the mondo in 20msec, causing SUN4V mondo timeout. It appears that 1 second is the agreed wait time between hypervisor and guest OS, this patch makes the adjustment. Orabug: 25476541 Orabug: 26417466 Signed-off-by: Jane Chu Reviewed-by: Steve Sistare Reviewed-by: Anthony Yznaga Reviewed-by: Rob Gardner Reviewed-by: Thomas Tai Signed-off-by: David S. Miller arch/sparc/include/asm/trap_block.h | 1 + arch/sparc/kernel/smp_64.c | 185 ++++++++++++++++++++++-------------- arch/sparc/kernel/sun4v_ivec.S | 15 +++ arch/sparc/kernel/traps_64.c | 1 + 4 files changed, 132 insertions(+), 70 deletions(-) commit 10b3bf54406bb7f4e78da9bb2a485c5c986678ad Author: Xin Long Date: Fri Jul 14 22:07:33 2017 +0800 sctp: fix an array overflow when all ext chunks are set Marcelo noticed an array overflow caused by commit c28445c3cb07 ("sctp: add reconf_enable in asoc ep and netns"), in which sctp would add SCTP_CID_RECONF into extensions when reconf_enable is set in sctp_make_init and sctp_make_init_ack. Then now when all ext chunks are set, 4 ext chunk ids can be put into extensions array while extensions array size is 3. It would cause a kernel panic because of this overflow. This patch is to fix it by defining extensions array size is 4 in both sctp_make_init and sctp_make_init_ack. Fixes: c28445c3cb07 ("sctp: add reconf_enable in asoc ep and netns") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/sm_make_chunk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56c0da495a0b38f8ac0c0c0e3fcc750ea449daea Author: Arnd Bergmann Date: Fri Jul 14 14:07:05 2017 +0200 liquidio: fix possible eeprom format string overflow gcc reports that the temporary buffer for computing the string length may be too small here: drivers/net/ethernet/cavium/liquidio/lio_ethtool.c: In function 'lio_get_eeprom_len': /drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:345:21: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=] len = sprintf(buf, "boardname:%s serialnum:%s maj:%lld min:%lld\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:345:6: note: 'sprintf' output between 35 and 167 bytes into a destination of size 128 len = sprintf(buf, "boardname:%s serialnum:%s maj:%lld min:%lld\n", This extends it to 192 bytes, which is certainly enough. As far as I could tell, there are no other constraints that require a specific maximum size. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7673e4dea9a338e00fa26cdd42d3697e8e22319 Author: Arnd Bergmann Date: Fri Jul 14 14:07:04 2017 +0200 vmxnet3: avoid format strint overflow warning gcc-7 notices that "-event-%d" could be more than 11 characters long if we had larger 'vector' numbers: drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_activate_dev': drivers/net/vmxnet3/vmxnet3_drv.c:2095:40: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=] sprintf(intr->event_msi_vector_name, "%s-event-%d", ^~~~~~~~~~~~~ drivers/net/vmxnet3/vmxnet3_drv.c:2095:3: note: 'sprintf' output between 9 and 33 bytes into a destination of size 32 The current code is safe, but making the string a little longer is harmless and lets gcc see that it's ok. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c41626ce3113eb2d40b5aa1c4fc2b0cd2785367b Author: Arnd Bergmann Date: Fri Jul 14 14:07:03 2017 +0200 net: thunder_bgx: avoid format string overflow warning gcc warns that the temporary buffer might be too small here: drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function 'bgx_probe': drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1020:16: error: '%d' directive writing between 1 and 10 bytes into a region of size between 9 and 11 [-Werror=format-overflow=] sprintf(str, "BGX%d LMAC%d mode", bgx->bgx_id, lmacid); ^~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1020:16: note: directive argument in the range [0, 2147483647] drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1020:3: note: 'sprintf' output between 16 and 27 bytes into a destination of size 20 This probably can't happen, but it can't hurt to make it long enough for the theoretical limit. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be9cdf1b97023cf5548bd4f6920bb546272ebabc Author: Arnd Bergmann Date: Fri Jul 14 14:07:02 2017 +0200 bnx2x: fix format overflow warning gcc notices that large queue numbers would overflow the queue name string: drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c: In function 'bnx2x_get_strings': drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c:3165:25: error: '%d' directive writing between 1 and 10 bytes into a region of size 5 [-Werror=format-overflow=] drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c:3165:25: note: directive argument in the range [0, 2147483647] drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c:3165:5: note: 'sprintf' output between 2 and 11 bytes into a destination of size 5 There is a hard limit in place that makes the number at most two digits, so the code is fine. This changes it to use snprintf() to truncate instead of overflowing, which shuts up that warning. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 73066f6c53fea76f95caadd70d802d24db747303 Author: Arnd Bergmann Date: Fri Jul 14 14:07:01 2017 +0200 net: niu: fix format string overflow warning: We get a warning for the port_name string that might be longer than six characters if we had more than 10 ports: drivers/net/ethernet/sun/niu.c: In function 'niu_put_parent': drivers/net/ethernet/sun/niu.c:9563:21: error: '%d' directive writing between 1 and 3 bytes into a region of size 2 [-Werror=format-overflow=] sprintf(port_name, "port%d", port); ^~~~~~~~ drivers/net/ethernet/sun/niu.c:9563:21: note: directive argument in the range [0, 255] drivers/net/ethernet/sun/niu.c:9563:2: note: 'sprintf' output between 6 and 8 bytes into a destination of size 6 sprintf(port_name, "port%d", port); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sun/niu.c: In function 'niu_pci_init_one': drivers/net/ethernet/sun/niu.c:9538:22: error: '%d' directive writing between 1 and 3 bytes into a region of size 2 [-Werror=format-overflow=] sprintf(port_name, "port%d", port); ^~~~~~~~ drivers/net/ethernet/sun/niu.c:9538:22: note: directive argument in the range [0, 255] drivers/net/ethernet/sun/niu.c:9538:3: note: 'sprintf' output between 6 and 8 bytes into a destination of size 6 While we know that the port number is small, there is no harm in making the format string two bytes longer to avoid the warning. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/sun/niu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45e0b4b3d532ea67bf90701e6162f31855ab3c98 Author: Arnd Bergmann Date: Fri Jul 14 14:07:00 2017 +0200 isdn: divert: fix sprintf buffer overflow warning One string we pass into the cs->info buffer might be too long, as pointed out by gcc: drivers/isdn/divert/isdn_divert.c: In function 'll_callback': drivers/isdn/divert/isdn_divert.c:488:22: error: '%d' directive writing between 1 and 3 bytes into a region of size between 1 and 69 [-Werror=format-overflow=] sprintf(cs->info, "%d 0x%lx %s %s %s %s 0x%x 0x%x %d %d %s\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/isdn/divert/isdn_divert.c:488:22: note: directive argument in the range [0, 255] drivers/isdn/divert/isdn_divert.c:488:4: note: 'sprintf' output 25 or more bytes (assuming 129) into a destination of size 90 This is unlikely to actually cause problems, so let's use snprintf as a simple workaround to shut up the warning and truncate the buffer instead. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/isdn/divert/isdn_divert.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit c98b0537f0d962b46c62c27b6c2d783257f7400f Author: Timur Tabi Date: Thu Jul 13 15:45:41 2017 -0500 net: qcom/emac: fix double free of SGMII IRQ during shutdown If the interface is not up, then don't try to close it during a shutdown. This avoids possible double free of the IRQ, which can happen during a shutdown. Fixes: 03eb3eb4d4d5 ("net: qcom/emac: add shutdown function") Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a8f5cb9e79913a6918f87495d4969706f8817b8e Author: Petr Kulhavy Date: Thu Jul 13 19:40:57 2017 +0200 smsc95xx: use ethtool_op_get_ts_info() This change enables the use of SW timestamping on Raspberry PI. smsc95xx uses the usbnet transmit function usbnet_start_xmit(), which implements software timestamping. However the SOF_TIMESTAMPING_TX_SOFTWARE capability was missing and only SOF_TIMESTAMPING_RX_SOFTWARE was announced. By using ethtool_op_get_ts_info() as get_ts_info() also the SOF_TIMESTAMPING_TX_SOFTWARE is announced. Signed-off-by: Petr Kulhavy Reviewed-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 1 + 1 file changed, 1 insertion(+) commit c4c4290c17bd099b7654d683f8ab6233b4f4a364 Author: Roman Mashak Date: Thu Jul 13 13:12:18 2017 -0400 net sched actions: rename act_get_notify() to tcf_get_notify() Make name consistent with other TC event notification routines, such as tcf_add_notify() and tcf_del_notify() Signed-off-by: Roman Mashak Signed-off-by: David S. Miller net/sched/act_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ccd4eb49f3392ebf989d58bd013a7bf44cdca4d6 Author: Iván Briano Date: Thu Jul 13 09:46:58 2017 -0700 net/packet: Fix Tx queue selection for AF_PACKET When PACKET_QDISC_BYPASS is not used, Tx queue selection will be done before the packet is enqueued, taking into account any mappings set by a queuing discipline such as mqprio without hardware offloading. This selection may be affected by a previously saved queue_mapping, either on the Rx path, or done before the packet reaches the device, as it's currently the case for AF_PACKET. In order for queue selection to work as expected when using traffic control, there can't be another selection done before that point is reached, so move the call to packet_pick_tx_queue to packet_direct_xmit, leaving the default xmit path as it was before PACKET_QDISC_BYPASS was introduced. A forward declaration of packet_pick_tx_queue() is introduced to avoid the need to reorder the functions within the file. Fixes: d346a3fae3ff ("packet: introduce PACKET_QDISC_BYPASS socket option") Signed-off-by: Iván Briano Signed-off-by: David S. Miller net/packet/af_packet.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 31a4562d7408493c6377933ff2f7d7302dbdea80 Author: Nikolay Aleksandrov Date: Thu Jul 13 16:09:10 2017 +0300 net: bridge: fix dest lookup when vlan proto doesn't match With 802.1ad support the vlan_ingress code started checking for vlan protocol mismatch which causes the current tag to be inserted and the bridge vlan protocol & pvid to be set. The vlan tag insertion changes the skb mac_header and thus the lookup mac dest pointer which was loaded prior to calling br_allowed_ingress in br_handle_frame_finish is VLAN_HLEN bytes off now, pointing to the last two bytes of the destination mac and the first four of the source mac causing lookups to always fail and broadcasting all such packets to all ports. Same thing happens for locally originated packets when passing via br_dev_xmit. So load the dest pointer after the vlan checks and possible skb change. Fixes: 8580e2117c06 ("bridge: Prepare for 802.1ad vlan filtering support") Reported-by: Anitha Narasimha Murthy Signed-off-by: Nikolay Aleksandrov Acked-by: Toshiaki Makita Signed-off-by: David S. Miller net/bridge/br_device.c | 3 ++- net/bridge/br_input.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 40fbbce007cb458da4c15cbf53beacf6b755cedc Author: Ganesh Goudar Date: Thu Jul 13 18:36:50 2017 +0530 cxgb4: ptp_clock_register() returns error pointers Check ptp_clock_register() return not only for NULL but also for error pointers, and also nullify adapter->ptp_clock if ptp_clock_register() fails. Fixes: 9c33e4208bce ("cxgb4: Add PTP Hardware Clock (PHC) support") Reported-by: Dan Carpenter Cc: Richard Cochran Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1e4babee70a2e2d8f9e0da06f013563b0e26f654 Author: LiuJian Date: Thu Jul 13 18:57:54 2017 +0800 net: hns: add acpi function of xge led control The current code only support DT method to control xge led. This patch is the implementation of acpi method to control xge led. Signed-off-by: LiuJian Reviewed-by: John Garry Reviewed-by: Yunsheng Lin Reviewed-by: Daode Huang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 3 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 58 +++++++++++++++++++++- 2 files changed, 58 insertions(+), 3 deletions(-) commit 230cd1279d0019d52f9529c7d91c96d095cae755 Author: WANG Cong Date: Wed Jul 12 15:56:41 2017 -0700 netpoll: shut up a kernel warning on refcount When we convert atomic_t to refcount_t, a new kernel warning on "increment on 0" is introduced in the netpoll code, zap_completion_queue(). In fact for this special case, we know the refcount is 0 and we just have to set it to 1 to satisfy the following dev_kfree_skb_any(), so we can just use refcount_set(..., 1) instead. Fixes: 633547973ffc ("net: convert sk_buff.users from atomic_t to refcount_t") Reported-by: Dave Jones Cc: Reshetova, Elena Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/core/netpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b02c20ce0c28974b44e69a2e2f5ddc6a470ad6f Author: Enrico Mioso Date: Tue Jul 11 17:21:52 2017 +0200 cdc_ncm: Set NTB format again after altsetting switch for Huawei devices Some firmwares in Huawei E3372H devices have been observed to switch back to NTB 32-bit format after altsetting switch. This patch implements a driver flag to check for the device settings and set NTB format to 16-bit again if needed. The flag has been activated for devices controlled by the huawei_cdc_ncm.c driver. V1->V2: - fixed broken error checks - some corrections to the commit message V2->V3: - variable name changes, to clarify what's happening - check (and possibly set) the NTB format later in the common bind code path Signed-off-by: Enrico Mioso Reported-and-tested-by: Christian Panton Reviewed-by: Bjørn Mork CC: Bjørn Mork CC: Christian Panton CC: linux-usb@vger.kernel.org CC: netdev@vger.kernel.org CC: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 28 ++++++++++++++++++++++++++++ drivers/net/usb/huawei_cdc_ncm.c | 6 ++++++ include/linux/usb/cdc_ncm.h | 1 + 3 files changed, 35 insertions(+) commit 457839ed3e78618cf0354cf79a1f47fe6eb26aef Author: Martin Blumenstingl Date: Mon Jul 10 14:35:23 2017 +0200 mdio: mux: fix parsing mux registers outside of the PHY address range mdio_mux_init parses the child nodes of the MDIO mux. When using "mdio-mux-mmioreg" the child nodes are describing the register value that is written to switch between the MDIO busses. The change which makes the error messages more verbose changed the parsing of the "reg" property from a simple of_property_read_u32 call to of_mdio_parse_addr. On a Khadas VIM (based on the Meson GXL SoC, which uses mdio-mux-mmioreg) this prevents registering the MDIO mux (because the "reg" values on the MDIO mux child nodes are 0x2009087f and 0xe40908ff) and leads to the following errors: mdio-mux-mmioreg c883455c.eth-phy-mux: /soc/periphs@c8834000/eth-phy-mux/mdio@e40908ff PHY address -469169921 is too large mdio-mux-mmioreg c883455c.eth-phy-mux: Error: Failed to find reg for child /soc/periphs@c8834000/eth-phy-mux/mdio@e40908ff mdio-mux-mmioreg c883455c.eth-phy-mux: /soc/periphs@c8834000/eth-phy-mux/mdio@2009087f PHY address 537462911 is too large mdio-mux-mmioreg c883455c.eth-phy-mux: Error: Failed to find reg for child /soc/periphs@c8834000/eth-phy-mux/mdio@2009087f mdio-mux-mmioreg c883455c.eth-phy-mux: Error: No acceptable child buses found mdio-mux-mmioreg c883455c.eth-phy-mux: failed to register mdio-mux bus /soc/periphs@c8834000/eth-phy-mux (as a result of that ethernet is not working, because the PHY which is connected through the mux' child MDIO bus, which is not being registered). Fix this by reverting the change from of_mdio_parse_addr to of_mdio_parse_addr. Fixes: 342fa1964439 ("mdio: mux: make child bus walking more permissive and errors more verbose") Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3457c877b14aaee8c52923eedf05a3b78af0476 Author: Roman Kagan Date: Fri Jul 14 17:13:20 2017 +0300 kvm: x86: hyperv: make VP_INDEX managed by userspace Hyper-V identifies vCPUs by Virtual Processor Index, which can be queried via HV_X64_MSR_VP_INDEX msr. It is defined by the spec as a sequential number which can't exceed the maximum number of vCPUs per VM. APIC ids can be sparse and thus aren't a valid replacement for VP indices. Current KVM uses its internal vcpu index as VP_INDEX. However, to make it predictable and persistent across VM migrations, the userspace has to control the value of VP_INDEX. This patch achieves that, by storing vp_index explicitly on vcpu, and allowing HV_X64_MSR_VP_INDEX to be set from the host side. For compatibility it's initialized to KVM vcpu index. Also a few variables are renamed to make clear distinction betweed this Hyper-V vp_index and KVM vcpu_id (== APIC id). Besides, a new capability, KVM_CAP_HYPERV_VP_INDEX, is added to allow the userspace to skip attempting msr writes where unsupported, to avoid spamming error logs. Signed-off-by: Roman Kagan Signed-off-by: Radim Krčmář Documentation/virtual/kvm/api.txt | 9 +++++++ arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/hyperv.c | 54 +++++++++++++++++++++++++-------------- arch/x86/kvm/hyperv.h | 1 + arch/x86/kvm/x86.c | 3 +++ include/uapi/linux/kvm.h | 1 + 6 files changed, 50 insertions(+), 19 deletions(-) commit 52a5c155cf79f1f059bffebf4d06d0249573e659 Author: Wanpeng Li Date: Thu Jul 13 18:30:42 2017 -0700 KVM: async_pf: Let guest support delivery of async_pf from guest mode Adds another flag bit (bit 2) to MSR_KVM_ASYNC_PF_EN. If bit 2 is 1, async page faults are delivered to L1 as #PF vmexits; if bit 2 is 0, kvm_can_do_async_pf returns 0 if in guest mode. This is similar to what svm.c wanted to do all along, but it is only enabled for Linux as L1 hypervisor. Foreign hypervisors must never receive async page faults as vmexits, because they'd probably be very confused about that. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář Documentation/virtual/kvm/msr.txt | 5 +++-- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/uapi/asm/kvm_para.h | 1 + arch/x86/kernel/kvm.c | 7 ++++++- arch/x86/kvm/mmu.c | 2 +- arch/x86/kvm/vmx.c | 2 +- arch/x86/kvm/x86.c | 5 +++-- 7 files changed, 16 insertions(+), 7 deletions(-) commit adfe20fb48785dd73af3bf91407196eb5403c8cf Author: Wanpeng Li Date: Thu Jul 13 18:30:41 2017 -0700 KVM: async_pf: Force a nested vmexit if the injected #PF is async_pf Add an nested_apf field to vcpu->arch.exception to identify an async page fault, and constructs the expected vm-exit information fields. Force a nested VM exit from nested_vmx_check_exception() if the injected #PF is async page fault. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_emulate.h | 1 + arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/svm.c | 16 ++++++++++------ arch/x86/kvm/vmx.c | 17 ++++++++++++++--- arch/x86/kvm/x86.c | 9 ++++++++- 5 files changed, 35 insertions(+), 10 deletions(-) commit 1261bfa326f5e903166498628a1894edce0caabc Author: Wanpeng Li Date: Thu Jul 13 18:30:40 2017 -0700 KVM: async_pf: Add L1 guest async_pf #PF vmexit handler This patch adds the L1 guest async page fault #PF vmexit handler, such by L1 similar to ordinary async page fault. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li [Passed insn parameters to kvm_mmu_page_fault().] Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/mmu.c | 33 +++++++++++++++++++++++++++++++++ arch/x86/kvm/mmu.h | 3 +++ arch/x86/kvm/svm.c | 36 ++++++------------------------------ arch/x86/kvm/vmx.c | 15 ++++++++------- 5 files changed, 51 insertions(+), 37 deletions(-) commit cfcd20e5caad6ba552978c16ed8bed7edb0143cf Author: Wanpeng Li Date: Thu Jul 13 18:30:39 2017 -0700 KVM: x86: Simplify kvm_x86_ops->queue_exception parameter list This patch removes all arguments except the first in kvm_x86_ops->queue_exception since they can extract the arguments from vcpu->arch.exception themselves. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 4 +--- arch/x86/kvm/svm.c | 8 +++++--- arch/x86/kvm/vmx.c | 8 +++++--- arch/x86/kvm/x86.c | 5 +---- 4 files changed, 12 insertions(+), 13 deletions(-) commit 9636603da3c3367139b46e19a38fb2e4850e7420 Merge: 3226186 9c40f95 1dc482b 906dc28 Author: Rafael J. Wysocki Date: Fri Jul 14 13:17:53 2017 +0200 Merge branches 'acpi-ec', 'acpi-irq' and 'acpi-quirks' * acpi-ec: Revert "ACPI / EC: Enable event freeze mode..." to fix a regression ACPI / EC: Drop EC noirq hooks to fix a regression * acpi-irq: ACPI / irq: Fix return code of acpi_gsi_to_irq() * acpi-quirks: ACPI / x86: Add KIOX000A accelerometer on GPD win to always_present_ids array ACPI / x86: Add Dell Venue 11 Pro 7130 touchscreen to always_present_ids ACPI / x86: Allow matching always_present_id array entries by DMI commit 6df609b24b23845d2ad85b01814e7ad27f607e92 Merge: a252c25 2ca3033 20dd95e Author: Rafael J. Wysocki Date: Fri Jul 14 13:16:31 2017 +0200 Merge branches 'pm-qos' and 'pm-devfreq' * pm-qos: PM / QoS: return -EINVAL for bogus strings * pm-devfreq: PM / devfreq: constify attribute_group structures. PM / devfreq: tegra: fix error return code in tegra_devfreq_probe() PM / devfreq: rk3399_dmc: fix error return code in rk3399_dmcfreq_probe() commit a252c258dd0d95884e71f64877313e3f09d63860 Merge: ec4b8dd ab2f7cf d4436c0 Author: Rafael J. Wysocki Date: Fri Jul 14 13:16:16 2017 +0200 Merge branches 'pm-cpufreq-sched' and 'intel_pstate' * pm-cpufreq-sched: cpufreq: schedutil: Fix sugov_start() versus sugov_update_shared() race * intel_pstate: cpufreq: intel_pstate: Fix ratio setting for min_perf_pct commit ec4b8ddcd3b9836ae06fcf8d7f6442e7d9f0c6e6 Merge: 1633b39 c7b5a4e Author: Rafael J. Wysocki Date: Fri Jul 14 13:15:49 2017 +0200 Merge branch 'pm-pci' * pm-pci: PCI / PM: Fix native PME handling during system suspend/resume PCI / PM: Restore PME Enable after config space restoration commit 193be41e33168a3a06eb9d356d9e39c69de161d2 Author: Joel Fernandes Date: Wed Jul 12 19:24:29 2017 -0700 sched/deadline: Fix confusing comments about selection of top pi-waiter This comment in the code is incomplete, and I believe it begs a definition of dl_boosted to make sense of the condition that follows. Rewrite the comment and also rearrange the condition that follows to reflect the first condition "we have a top pi-waiter which is a SCHED_DEADLINE task" in that order. Also fix a typo that follows. Signed-off-by: Joel Fernandes Reviewed-by: Daniel Bristot de Oliveira Acked-by: Juri Lelli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170713022429.10307-1-joelaf@google.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 0e4097c3354e2f5a5ad8affd9dc7f7f7d00bb6b9 Author: Wanpeng Li Date: Sun Jul 9 00:40:28 2017 -0700 sched/cputime: Don't use smp_processor_id() in preemptible context Recent kernels trigger this warning: BUG: using smp_processor_id() in preemptible [00000000] code: 99-trinity/181 caller is debug_smp_processor_id+0x17/0x19 CPU: 0 PID: 181 Comm: 99-trinity Not tainted 4.12.0-01059-g2a42eb9 #1 Call Trace: dump_stack+0x82/0xb8 check_preemption_disabled() debug_smp_processor_id() vtime_delta() task_cputime() thread_group_cputime() thread_group_cputime_adjusted() wait_consider_task() do_wait() SYSC_wait4() do_syscall_64() entry_SYSCALL64_slow_path() As Frederic pointed out: | Although those sched_clock_cpu() things seem to only matter when the | sched_clock() is unstable. And that stability is a condition for nohz_full | to work anyway. So probably sched_clock() alone would be enough. This patch fixes it by replacing sched_clock_cpu() with sched_clock() to avoid calling smp_processor_id() in a preemptible context. Reported-by: Xiaolong Ye Signed-off-by: Wanpeng Li Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1499586028-7402-1-git-send-email-wanpeng.li@hotmail.com [ Prettified the changelog. ] Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f835edf9aec13bc8abb3dd4836151773cc359f42 Author: Jay Cornwall Date: Thu Jul 13 20:21:56 2017 -0500 drm/amdgpu: Remove unused field kgd2kfd_shared_resources.num_mec Dead code. Change-Id: I9575aa73b5741b80dc340f953cc773385c92b2be Signed-off-by: Jay Cornwall Reviewed-by: Alex Deucher Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 - drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 3 --- 2 files changed, 4 deletions(-) commit 1ff036dc391b169ff5a74ef0f0215c174c07166f Author: Jay Cornwall Date: Thu Jul 13 20:21:55 2017 -0500 drm/radeon: Remove initialization of shared_resources.num_mec Dead code. Change-Id: I2383e0b541ed55288570b6a0ec8a0d49cdd4df89 Signed-off-by: Jay Cornwall Reviewed-by: Alex Deucher Signed-off-by: Oded Gabbay drivers/gpu/drm/radeon/radeon_kfd.c | 1 - 1 file changed, 1 deletion(-) commit 13c4a2c78e7ed932cff019f54cdd4f6976dad140 Author: Jay Cornwall Date: Thu Jul 13 20:21:54 2017 -0500 drm/amdkfd: Remove unused references to shared_resources.num_mec Dead code. Change-Id: Ic0bb1bcca87e96bc5e8fa9894727b0de152e8818 Signed-off-by: Jay Cornwall Reviewed-by: Alex Deucher Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 ---- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 7 ------- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 1 - 3 files changed, 12 deletions(-) commit 3447d220155bd9f4b5435ea6e9d58b536c7e94dd Author: Jay Cornwall Date: Thu Jul 13 20:21:53 2017 -0500 drm/amdgpu: Fix KFD oversubscription by tracking queues correctly The number of compute queues available to the KFD was erroneously calculated as 64. Only the first MEC can execute compute queues and it has 32 queue slots. This caused the oversubscription limit to be calculated incorrectly, leading to a missing chained runlist command at the end of an oversubscribed runlist. v2: Remove unused num_mec field to avoid duplicate logic v3: Separate num_mec removal into separate patches Change-Id: I9e7bba2cc1928b624e3eeb1edb06fdb602e5294f Signed-off-by: Jay Cornwall Reviewed-by: Alex Deucher Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7228b66aaf723a623e578aa4db7d083bb39546c9 Author: Mat Martineau Date: Thu Jul 13 13:17:03 2017 +0100 KEYS: Add documentation for asymmetric keyring restrictions Provide more specific examples of keyring restrictions as applied to X.509 signature chain verification. Signed-off-by: Mat Martineau Signed-off-by: David Howells Signed-off-by: James Morris Documentation/crypto/asymmetric-keys.txt | 65 ++++++++++++++++++++++++++++---- Documentation/security/keys/core.rst | 6 +++ 2 files changed, 63 insertions(+), 8 deletions(-) commit 4f9dabfaf8df971f8a3b6aa324f8f817be38d538 Author: Eric Biggers Date: Thu Jul 13 13:16:56 2017 +0100 KEYS: DH: validate __spare field Syscalls must validate that their reserved arguments are zero and return EINVAL otherwise. Otherwise, it will be impossible to actually use them for anything in the future because existing programs may be passing garbage in. This is standard practice when adding new APIs. Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/compat_dh.c | 2 ++ security/keys/dh.c | 5 +++++ 2 files changed, 7 insertions(+) commit 5ccbdbf9870fe9efe78d77df23d5e7d8641c36f8 Author: Jarkko Sakkinen Date: Thu Jul 13 13:16:49 2017 +0100 modsign: add markers to endif-statements in certs/Makefile It's a bit hard for eye to track certs/Makefile if you are not accustomed to it. This commit adds comments to key endif statements in order to help to keep the context while reading this file. Signed-off-by: Jarkko Sakkinen Signed-off-by: David Howells Signed-off-by: James Morris certs/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6e34e1f23d780978da65968327cbba6d7013a73f Author: Srinivas Pandruvada Date: Thu Jul 13 15:03:51 2017 -0700 cpufreq: intel_pstate: Correct the busy calculation for KNL The busy percent calculated for the Knights Landing (KNL) platform is 1024 times smaller than the correct busy value. This causes performance to get stuck at the lowest ratio. The scaling algorithm used for KNL is performance-based, but it still looks at the CPU load to set the scaled busy factor to 0 when the load is less than 1 percent. In this case, since the computed load is 1024x smaller than it should be, the scaled busy factor will always be 0, irrespective of CPU business. This needs a fix similar to the turbostat one in commit b2b34dfe4d9a (tools/power turbostat: KNL workaround for %Busy and Avg_MHz). For this reason, add one more callback to processor-specific callbacks to specify an MPERF multiplier represented by a number of bit positions to shift the value of that register to the left to copmensate for its rate difference with respect to the TSC. This shift value is used during CPU busy calculations. Fixes: ffb810563c (intel_pstate: Avoid getting stuck in high P-states when idle) Reported-and-tested-by: Artem Bityutskiy Signed-off-by: Srinivas Pandruvada Cc: 4.6+ # 4.6+ [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit d6ab17f261919d212ec0a9e33d01f46df0ec1fde Author: Darrick J. Wong Date: Wed Jul 12 10:26:47 2017 -0700 vfs: in iomap seek_{hole,data}, return -ENXIO for negative offsets In the iomap implementations of SEEK_HOLE and SEEK_DATA, make sure we return -ENXIO for negative offsets. Inspired-by: Mateusz S Signed-off-by: Darrick J. Wong fs/iomap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0891f9971a3b00d243d5743cc78a628ad060adea Author: Christoph Hellwig Date: Thu Jul 13 12:14:34 2017 -0700 Revert "xfs: grab dquots without taking the ilock" This reverts commit 50e0bdbe9f48f98bb02eac7030d682f4716884ae. The new XFS_QMOPT_NOLOCK isn't used at all, and conditional locking based on a flag is always the wrong thing to do - we should be having helpers that can be called without the lock instead. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_quota_defs.h | 2 -- fs/xfs/xfs_dquot.c | 14 ++++---------- 2 files changed, 4 insertions(+), 12 deletions(-) commit 29db2500f6a92d63834a40c5e9eebab34c78c53a Author: Christoph Hellwig Date: Thu Jul 13 12:14:34 2017 -0700 xfs: assert locking precondition in xfs_readlink_bmap_ilocked Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_symlink.c | 2 ++ 1 file changed, 2 insertions(+) commit 5af7777e11f5a91dd90247035978bef6c95065e4 Author: Christoph Hellwig Date: Thu Jul 13 12:14:33 2017 -0700 xfs: assert locking precondіtion in xfs_attr_list_int_ilocked Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_attr_list.c | 2 ++ 1 file changed, 2 insertions(+) commit cf69f8248cc89c0a0e82f8332f9e7f13ab014c98 Author: Christoph Hellwig Date: Thu Jul 13 12:14:33 2017 -0700 xfs: fixup xfs_attr_get_ilocked The comment mentioned the wrong lock. Also add an ASSERT to assert this locking precondition. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_attr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b86faee6d111294fa95a2e89b5f771b2da3c9782 Merge: 48ea2ce b4f937c Author: Linus Torvalds Date: Thu Jul 13 14:35:37 2017 -0700 Merge tag 'nfs-for-4.13-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "Stable bugfixes: - Fix -EACCESS on commit to DS handling - Fix initialization of nfs_page_array->npages - Only invalidate dentries that are actually invalid Features: - Enable NFSoRDMA transparent state migration - Add support for lookup-by-filehandle - Add support for nfs re-exporting Other bugfixes and cleanups: - Christoph cleaned up the way we declare NFS operations - Clean up various internal structures - Various cleanups to commits - Various improvements to error handling - Set the dt_type of . and .. entries in NFS v4 - Make slot allocation more reliable - Fix fscache stat printing - Fix uninitialized variable warnings - Fix potential list overrun in nfs_atomic_open() - Fix a race in NFSoRDMA RPC reply handler - Fix return size for nfs42_proc_copy() - Fix against MAC forgery timing attacks" * tag 'nfs-for-4.13-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (68 commits) NFS: Don't run wake_up_bit() when nobody is waiting... nfs: add export operations nfs4: add NFSv4 LOOKUPP handlers nfs: add a nfs_ilookup helper nfs: replace d_add with d_splice_alias in atomic_open sunrpc: use constant time memory comparison for mac NFSv4.2 fix size storage for nfs42_proc_copy xprtrdma: Fix documenting comments in frwr_ops.c xprtrdma: Replace PAGE_MASK with offset_in_page() xprtrdma: FMR does not need list_del_init() xprtrdma: Demote "connect" log messages NFSv4.1: Use seqid returned by EXCHANGE_ID after state migration NFSv4.1: Handle EXCHGID4_FLAG_CONFIRMED_R during NFSv4.1 migration xprtrdma: Don't defer MR recovery if ro_map fails xprtrdma: Fix FRWR invalidation error recovery xprtrdma: Fix client lock-up after application signal fires xprtrdma: Rename rpcrdma_req::rl_free xprtrdma: Pass only the list of registered MRs to ro_unmap_sync xprtrdma: Pre-mark remotely invalidated MRs xprtrdma: On invalidation failure, remove MWs from rl_registered ... commit 48ea2cedde3507941f4549b0d27ed46ed29e39ff Merge: 6240300 138d351 Author: Linus Torvalds Date: Thu Jul 13 14:27:32 2017 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target updates from Nicholas Bellinger: "It's been usually busy for summer, with most of the efforts centered around TCMU developments and various target-core + fabric driver bug fixing activities. Not particularly large in terms of LoC, but lots of smaller patches from many different folks. The highlights include: - ibmvscsis logical partition manager support (Michael Cyr + Bryant Ly) - Convert target/iblock WRITE_SAME to blkdev_issue_zeroout (hch + nab) - Add support for TMR percpu LUN reference counting (nab) - Fix a potential deadlock between EXTENDED_COPY and iscsi shutdown (Bart) - Fix COMPARE_AND_WRITE caw_sem leak during se_cmd quiesce (Jiang Yi) - Fix TMCU module removal (Xiubo Li) - Fix iser-target OOPs during login failure (Andrea Righi + Sagi) - Breakup target-core free_device backend driver callback (mnc) - Perform TCMU add/delete/reconfig synchronously (mnc) - Fix TCMU multiple UIO open/close sequences (mnc) - Fix TCMU CHECK_CONDITION sense handling (mnc) - Fix target-core SAM_STAT_BUSY + TASK_SET_FULL handling (mnc + nab) - Introduce TYPE_ZBC support in PSCSI (Damien Le Moal) - Fix possible TCMU memory leak + OOPs when recalculating cmd base size (Xiubo Li + Bryant Ly + Damien Le Moal + mnc) - Add login_keys_workaround attribute for non RFC initiators (Robert LeBlanc + Arun Easi + nab)" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (68 commits) iscsi-target: Add login_keys_workaround attribute for non RFC initiators Revert "qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT" tcmu: clean up the code and with one small fix tcmu: Fix possbile memory leak / OOPs when recalculating cmd base size target: export lio pgr/alua support as device attr target: Fix return sense reason in target_scsi3_emulate_pr_out target: Fix cmd size for PR-OUT in passthrough_parse_cdb tcmu: Fix dev_config_store target: pscsi: Introduce TYPE_ZBC support target: Use macro for WRITE_VERIFY_32 operation codes target: fix SAM_STAT_BUSY/TASK_SET_FULL handling target: remove transport_complete pscsi: finish cmd processing from pscsi_req_done tcmu: fix sense handling during completion target: add helper to copy sense to se_cmd buffer target: do not require a transport_complete for SCF_TRANSPORT_TASK_SENSE target: make device_mutex and device_list static tcmu: Fix flushing cmd entry dcache page tcmu: fix multiple uio open/close sequences tcmu: drop configured check in destroy ... commit b4f937cffa66b3d56eb8f586e620d0b223a281a3 Author: Trond Myklebust Date: Tue Jul 11 17:53:48 2017 -0400 NFS: Don't run wake_up_bit() when nobody is waiting... "perf lock" shows fairly heavy contention for the bit waitqueue locks when doing an I/O heavy workload. Use a bit to tell whether or not there has been contention for a lock so that we can optimise away the bit waitqueue options in those cases. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/pagelist.c | 17 ++++++++++++++++- include/linux/nfs_page.h | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 20fa19027286983ab2734b5910c4a687436e0c31 Author: Peng Tao Date: Thu Jun 29 06:34:53 2017 -0700 nfs: add export operations This support for opening files on NFS by file handle, both through the open_by_handle syscall, and for re-exporting NFS (for example using a different version). The support is very basic for now, as each open by handle will have to do an NFSv4 open operation on the wire. In the future this will hopefully be mitigated by an open file cache, as well as various optimizations in NFS for this specific case. Signed-off-by: Peng Tao [hch: incorporated various changes, resplit the patches, new changelog] Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker fs/nfs/Makefile | 2 +- fs/nfs/export.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfs/internal.h | 2 + fs/nfs/super.c | 2 + 4 files changed, 182 insertions(+), 1 deletion(-) commit 301bfa483016d48b7fb9cbad87c0a04a15c25b90 Author: Trond Myklebust Date: Tue Jul 11 17:53:48 2017 -0400 NFS: Don't run wake_up_bit() when nobody is waiting... "perf lock" shows fairly heavy contention for the bit waitqueue locks when doing an I/O heavy workload. Use a bit to tell whether or not there has been contention for a lock so that we can optimise away the bit waitqueue options in those cases. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/pagelist.c | 17 ++++++++++++++++- include/linux/nfs_page.h | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 62403005975c678ba7594a36670ae3bf0273d7c4 Merge: 19c6e12 b20dae7 Author: Linus Torvalds Date: Thu Jul 13 13:56:24 2017 -0700 Merge tag 'nfsd-4.13' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Chuck's RDMA update overhauls the "call receive" side of the RPC-over-RDMA transport to use the new rdma_rw API. Christoph cleaned the way nfs operations are declared, removing a bunch of function-pointer casts and declaring the operation vectors as const. Christoph's changes touch both client and server, and both client and server pulls this time around should be based on the same commits from Christoph" * tag 'nfsd-4.13' of git://linux-nfs.org/~bfields/linux: (53 commits) svcrdma: fix an incorrect check on -E2BIG and -EINVAL nfsd4: factor ctime into change attribute svcrdma: Remove svc_rdma_chunk_ctxt::cc_dir field svcrdma: use offset_in_page() macro svcrdma: Clean up after converting svc_rdma_recvfrom to rdma_rw API svcrdma: Clean-up svc_rdma_unmap_dma svcrdma: Remove frmr cache svcrdma: Remove unused Read completion handlers svcrdma: Properly compute .len and .buflen for received RPC Calls svcrdma: Use generic RDMA R/W API in RPC Call path svcrdma: Add recvfrom helpers to svc_rdma_rw.c sunrpc: Allocate up to RPCSVC_MAXPAGES per svc_rqst svcrdma: Don't account for Receive queue "starvation" svcrdma: Improve Reply chunk sanity checking svcrdma: Improve Write chunk sanity checking svcrdma: Improve Read chunk sanity checking svcrdma: Remove svc_rdma_marshal.c svcrdma: Avoid Send Queue overflow svcrdma: Squelch disconnection messages sunrpc: Disable splice for krb5i ... commit 19c6e12c07ceab2ff5d5ec97354b893ab386c41c Merge: 954e6e0 4d9bcad Author: Linus Torvalds Date: Thu Jul 13 13:53:54 2017 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2, udf, reiserfs fixes from Jan Kara: "Several ext2, udf, and reiserfs fixes" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: Fix memory leak when truncate races ext2_get_blocks reiserfs: fix race in prealloc discard reiserfs: don't preallocate blocks for extended attributes udf: Convert udf_disk_stamp_to_time() to use mktime64() udf: Use time64_to_tm for timestamp conversion udf: Fix deadlock between writeback and udf_setsize() udf: Use i_size_read() in udf_adinicb_writepage() udf: Fix races with i_size changes during readpage udf: Remove unused UDF_DEFAULT_BLOCKSIZE commit 954e6e03c61d233eae810f8da65270c224fe2fa4 Merge: 80fc623 51e988f Author: Linus Torvalds Date: Thu Jul 13 13:44:54 2017 -0700 Merge tag '4.13-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A set of fixes for various warnings, including the one caused by the removal of kernel/rcu/srcu.c. Also correct a stray pointer in memory-barriers.txt" * tag '4.13-fixes' of git://git.lwn.net/linux: kokr/memory-barriers.txt: Fix obsolete link to atomic_ops.txt memory-barriers.txt: Fix broken link to atomic_ops.txt docs: Turn off section numbering for the input docs docs: Include uaccess docs from the right file docs: Do not include from kernel/rcu/srcu.c commit 5d89fb33223e0be32e4100623b915048b02beeec Author: David Ahern Date: Thu Jul 13 13:36:40 2017 -0700 net: set fib rule refcount after malloc The configure callback of fib_rules_ops can change the refcnt of a fib rule. For instance, mlxsw takes a refcnt when adding the processing of the rule to a work queue. Thus the rule refcnt can not be reset to to 1 afterwards. Move the refcnt setting to after the allocation. Fixes: 5361e209dd30 ("net: avoid one splat in fib_nl_delrule()") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/fib_rules.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 80fc62380995b02492245a9971944e4713a5eb63 Merge: bc0f51d d7f14c6 Author: Linus Torvalds Date: Thu Jul 13 13:37:57 2017 -0700 Merge tag 'kbuild-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild updates from Masahiro Yamada: - Move generic-y of exported headers to uapi/asm/Kbuild for complete de-coupling of UAPI - Clean up scripts/Makefile.headersinst - Fix host programs for 32 bit machine with XFS file system * tag 'kbuild-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (29 commits) kbuild: Enable Large File Support for hostprogs kbuild: remove wrapper files handling from Makefile.headersinst kbuild: split exported generic header creation into uapi-asm-generic kbuild: do not include old-kbuild-file from Makefile.headersinst xtensa: move generic-y of exported headers to uapi/asm/Kbuild unicore32: move generic-y of exported headers to uapi/asm/Kbuild tile: move generic-y of exported headers to uapi/asm/Kbuild sparc: move generic-y of exported headers to uapi/asm/Kbuild sh: move generic-y of exported headers to uapi/asm/Kbuild parisc: move generic-y of exported headers to uapi/asm/Kbuild openrisc: move generic-y of exported headers to uapi/asm/Kbuild nios2: move generic-y of exported headers to uapi/asm/Kbuild nios2: remove unneeded arch/nios2/include/(generated/)asm/signal.h microblaze: move generic-y of exported headers to uapi/asm/Kbuild metag: move generic-y of exported headers to uapi/asm/Kbuild m68k: move generic-y of exported headers to uapi/asm/Kbuild m32r: move generic-y of exported headers to uapi/asm/Kbuild ia64: remove redundant generic-y += kvm_para.h from asm/Kbuild hexagon: move generic-y of exported headers to uapi/asm/Kbuild h8300: move generic-y of exported headers to uapi/asm/Kbuild ... commit bc0f51d35994bc14ae9bebadc9523399711fedf8 Merge: ad51271 2e028c4 Author: Linus Torvalds Date: Thu Jul 13 13:17:19 2017 -0700 Merge tag 'trace-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull more tracing updates from Steven Rostedt: "A few more minor updates: - Show the tgid mappings for user space trace tools to use - Fix and optimize the comm and tgid cache recording - Sanitize derived kprobe names - Ftrace selftest updates - trace file header fix - Update of Documentation/trace/ftrace.txt - Compiler warning fixes - Fix possible uninitialized variable" * tag 'trace-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Fix uninitialized variable in match_records() ftrace: Remove an unneeded NULL check ftrace: Hide cached module code for !CONFIG_MODULES tracing: Do note expose stack_trace_filter without DYNAMIC_FTRACE tracing: Update Documentation/trace/ftrace.txt tracing: Fixup trace file header alignment selftests/ftrace: Add a testcase for kprobe event naming selftests/ftrace: Add a test to probe module functions selftests/ftrace: Update multiple kprobes test for powerpc trace/kprobes: Sanitize derived event names tracing: Attempt to record other information even if some fail tracing: Treat recording tgid for idle task as a success tracing: Treat recording comm for idle task as a success tracing: Add saved_tgids file to show cached pid to tgid mappings commit a59f97ff66f0058702ed6f6e26dd8fa3c34caf62 Author: Amir Goldstein Date: Tue Jul 11 15:58:37 2017 +0300 ovl: remove unneeded check for IS_ERR() ovl_workdir_create() returns a valid index dentry or NULL. Reported-by: Dan Carpenter Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 4 ---- 1 file changed, 4 deletions(-) commit 961af647fc9ebcdb3e98c8f11b399ebe01169fb1 Author: Amir Goldstein Date: Tue Jul 11 15:58:36 2017 +0300 ovl: fix origin verification of index dir Commit 54fb347e836f ("ovl: verify index dir matches upper dir") introduced a new ovl_fh flag OVL_FH_FLAG_PATH_UPPER to indicate an upper file handle, but forgot to add the flag to the mask of valid flags, so index dir origin verification always discards existing origin and stores a new one. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ea3dad18dc5f778cfd931311a91a9315aa0065a3 Author: Amir Goldstein Date: Tue Jul 11 15:58:34 2017 +0300 ovl: mark parent impure on ovl_link() When linking a file with copy up origin into a new parent, mark the new parent dir "impure". Fixes: ee1d6d37b6b8 ("ovl: mark upper dir with type origin entries "impure"") Cc: # v4.12 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 8fc646b44385ff0a9853f6590497e43049eeb311 Author: Amir Goldstein Date: Tue Jul 11 15:58:35 2017 +0300 ovl: fix random return value on mount On failure to prepare_creds(), mount fails with a random return value, as err was last set to an integer cast of a valid lower mnt pointer or set to 0 if inodes index feature is enabled. Reported-by: Dan Carpenter Fixes: 3fe6e52f0626 ("ovl: override creds with the ones from ...") Cc: # v4.7 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 1 + 1 file changed, 1 insertion(+) commit 5b5faaf6df73412af0278997db36dbcb51011d9d Author: Jeff Layton Date: Thu Jun 29 06:34:52 2017 -0700 nfs4: add NFSv4 LOOKUPP handlers This will be needed in order to implement the get_parent export op for nfsd. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 49 ++++++++++++++++++++++++++++++++ fs/nfs/nfs4trace.h | 29 +++++++++++++++++++ fs/nfs/nfs4xdr.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/nfs4.h | 1 + include/linux/nfs_xdr.h | 17 ++++++++++- 5 files changed, 170 insertions(+), 1 deletion(-) commit 00422483ad415d6267d36711f0e51f4bbbd653ed Author: Peng Tao Date: Thu Jun 29 06:34:53 2017 -0700 nfs: add export operations This support for opening files on NFS by file handle, both through the open_by_handle syscall, and for re-exporting NFS (for example using a different version). The support is very basic for now, as each open by handle will have to do an NFSv4 open operation on the wire. In the future this will hopefully be mitigated by an open file cache, as well as various optimizations in NFS for this specific case. Signed-off-by: Peng Tao [hch: incorporated various changes, resplit the patches, new changelog] Signed-off-by: Christoph Hellwig fs/nfs/Makefile | 2 +- fs/nfs/export.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfs/internal.h | 2 + fs/nfs/super.c | 2 + 4 files changed, 182 insertions(+), 1 deletion(-) commit f174ff7a0ab6a097455a94abfc99517940041c07 Author: Peng Tao Date: Thu Jun 29 06:34:51 2017 -0700 nfs: add a nfs_ilookup helper This helper will allow to find an existing NFS inode by the file handle and fattr. Signed-off-by: Peng Tao [hch: split from a larger patch] Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker fs/nfs/inode.c | 22 ++++++++++++++++++++++ include/linux/nfs_fs.h | 1 + 2 files changed, 23 insertions(+) commit 774d9513a3f29048cce3ed5df3b0a0da9897678c Author: Peng Tao Date: Thu Jun 29 06:34:50 2017 -0700 nfs: replace d_add with d_splice_alias in atomic_open It's a trival change but follows knfsd export document that asks for d_splice_alias during lookup. Signed-off-by: Peng Tao Signed-off-by: Anna Schumaker fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15a8b93fd5690de017ce665382ea45e5d61811a4 Author: Jason A. Donenfeld Date: Sat Jun 10 04:59:07 2017 +0200 sunrpc: use constant time memory comparison for mac Otherwise, we enable a MAC forgery via timing attack. Signed-off-by: Jason A. Donenfeld Cc: "J. Bruce Fields" Cc: Jeff Layton Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Anna Schumaker net/sunrpc/auth_gss/gss_krb5_crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ee48bdd22440c0b45f215fc41e16032383c1c81 Author: Olga Kornievskaia Date: Thu Jul 6 09:43:02 2017 -0400 NFSv4.2 fix size storage for nfs42_proc_copy Return size of COPY is u64 but it was assigned to an "int" status. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker fs/nfs/nfs42proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6afafa7799cf6fa3c0efb6887704506d21965ad6 Author: Chuck Lever Date: Thu Jun 8 11:53:24 2017 -0400 xprtrdma: Fix documenting comments in frwr_ops.c Clean up. FASTREG and LOCAL_INV WRs are typically not signaled. localinv_wake is used for the last LOCAL_INV WR in a chain, which is always signaled. The documenting comments should reflect that. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d933cc32019063fc4beb8b20528ca724bd1b7a52 Author: Chuck Lever Date: Thu Jun 8 11:53:16 2017 -0400 xprtrdma: Replace PAGE_MASK with offset_in_page() Clean up. Reported by: Geliang Tang Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e2f6ef09156284e35f780be47559809753d4b499 Author: Chuck Lever Date: Thu Jun 8 11:53:08 2017 -0400 xprtrdma: FMR does not need list_del_init() Clean up. Commit 38f1932e60ba ("xprtrdma: Remove FMRs from the unmap list after unmapping") utilized list_del_init() to try to prevent some list corruption. The corruption was actually caused by the reply handler racing with a signal. Now that MR invalidation is properly serialized, list_del_init() can safely be replaced. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 173b8f49b3af3d5102168793436dc17b94476b74 Author: Chuck Lever Date: Thu Jun 8 11:53:00 2017 -0400 xprtrdma: Demote "connect" log messages Some have complained about the log messages generated when xprtrdma opens or closes a connection to a server. When an NFS mount is mostly idle these can appear every few minutes as the client idles out the connection and reconnects. Connection and disconnection is a normal part of operation, and not exceptional, so change these to dprintk's for now. At some point all of these will be converted to tracepoints, but that's for another day. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 44 ++++++++------------------------------------ 1 file changed, 8 insertions(+), 36 deletions(-) commit 838edb94977b96f191800d7ce39b2505419aac4a Author: Chuck Lever Date: Thu Jun 8 11:52:52 2017 -0400 NFSv4.1: Use seqid returned by EXCHANGE_ID after state migration Transparent State Migration copies a client's lease state from the server where a filesystem used to reside to the server where it now resides. When an NFSv4.1 client first contacts that destination server, it uses EXCHANGE_ID to detect trunking relationships. The lease that was copied there is returned to that client, but the destination server sets EXCHGID4_FLAG_CONFIRMED_R when replying to the client. This is because the lease was confirmed on the source server (before it was copied). When CONFIRMED_R is set, the client throws away the sequence ID returned by the server. During a Transparent State Migration, however there's no other way for the client to know what sequence ID to use with a lease that's been migrated. Therefore, the client must save and use the contrived slot sequence value returned by the destination server even when CONFIRMED_R is set. Note that some servers always return a seqid of 1 after a migration. Reported-by: Xuan Qi Signed-off-by: Chuck Lever Tested-by: Xuan Qi Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8dcbec6d20eb881ba368d0aebc3a8a678aebb1da Author: Chuck Lever Date: Thu Jun 8 11:52:44 2017 -0400 NFSv4.1: Handle EXCHGID4_FLAG_CONFIRMED_R during NFSv4.1 migration Transparent State Migration copies a client's lease state from the server where a filesystem used to reside to the server where it now resides. When an NFSv4.1 client first contacts that destination server, it uses EXCHANGE_ID to detect trunking relationships. The lease that was copied there is returned to that client, but the destination server sets EXCHGID4_FLAG_CONFIRMED_R when replying to the client. This is because the lease was confirmed on the source server (before it was copied). Normally, when CONFIRMED_R is set, a client purges the lease and creates a new one. However, that throws away the entire benefit of Transparent State Migration. Therefore, the client must not purge that lease when it is possible that Transparent State Migration has occurred. Reported-by: Xuan Qi Signed-off-by: Chuck Lever Tested-by: Xuan Qi Signed-off-by: Anna Schumaker fs/nfs/nfs4client.c | 5 +++++ fs/nfs/nfs4state.c | 16 +++++++++++----- include/linux/nfs_fs_sb.h | 2 ++ 3 files changed, 18 insertions(+), 5 deletions(-) commit 1f541895dae956df0be14a3190f507b601ac3fcc Author: Chuck Lever Date: Thu Jun 8 11:52:36 2017 -0400 xprtrdma: Don't defer MR recovery if ro_map fails Deferred MR recovery does a DMA-unmapping of the MW. However, ro_map invokes rpcrdma_defer_mr_recovery in some error cases where the MW has not even been DMA-mapped yet. Avoid a DMA-unmapping error replacing rpcrdma_defer_mr_recovery. Also note that if ib_dma_map_sg is asked to map 0 nents, it will return 0. So the extra "if (i == 0)" check is no longer needed. Fixes: 42fe28f60763 ("xprtrdma: Do not leak an MW during a DMA ...") Fixes: 505bbe64dd04 ("xprtrdma: Refactor MR recovery work queues") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 18 +++++++++--------- net/sunrpc/xprtrdma/frwr_ops.c | 19 ++++++++----------- 2 files changed, 17 insertions(+), 20 deletions(-) commit 8d75483a232aea9c3224b8146edf45b3bbb552fd Author: Chuck Lever Date: Thu Jun 8 11:52:28 2017 -0400 xprtrdma: Fix FRWR invalidation error recovery When ib_post_send() fails, all LOCAL_INV WRs past @bad_wr have to be examined, and the MRs reset by hand. I'm not sure how the existing code can work by comparing R_keys. Restructure the logic so that instead it walks the chain of WRs, starting from the first bad one. Make sure to wait for completion if at least one WR was actually posted. Otherwise, if the ib_post_send fails, we can end up DMA-unmapping the MR while LOCAL_INV operations are in flight. Commit 7a89f9c626e3 ("xprtrdma: Honor ->send_request API contract") added the rdma_disconnect() call site. The disconnect actually causes more problems than it solves, and SQ overruns happen only as a result of software bugs. So remove it. Fixes: d7a21c1bed54 ("xprtrdma: Reset MRs in frwr_op_unmap_sync()") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 431af645cf662652bc43c7a26f87cb40aedb01d9 Author: Chuck Lever Date: Thu Jun 8 11:52:20 2017 -0400 xprtrdma: Fix client lock-up after application signal fires After a signal, the RPC client aborts synchronous RPCs running on behalf of the signaled application. The server is still executing those RPCs, and will write the results back into the client's memory when it's done. By the time the server writes the results, that memory is likely being used for other purposes. Therefore xprtrdma has to immediately invalidate all memory regions used by those aborted RPCs to prevent the server's writes from clobbering that re-used memory. With FMR memory registration, invalidation takes a relatively long time. In fact, the invalidation is often still running when the server tries to write the results into the memory regions that are being invalidated. This sets up a race between two processes: 1. After the signal, xprt_rdma_free calls ro_unmap_safe. 2. While ro_unmap_safe is still running, the server replies and rpcrdma_reply_handler runs, calling ro_unmap_sync. Both processes invoke ib_unmap_fmr on the same FMR. The mlx4 driver allows two ib_unmap_fmr calls on the same FMR at the same time, but HCAs generally don't tolerate this. Sometimes this can result in a system crash. If the HCA happens to survive, rpcrdma_reply_handler continues. It removes the rpc_rqst from rq_list and releases the transport_lock. This enables xprt_rdma_free to run in another process, and the rpc_rqst is released while rpcrdma_reply_handler is still waiting for the ib_unmap_fmr call to finish. But further down in rpcrdma_reply_handler, the transport_lock is taken again, and "rqst" is dereferenced. If "rqst" has already been released, this triggers a general protection fault. Since bottom- halves are disabled, the system locks up. Address both issues by reversing the order of the xprt_lookup_rqst call and the ro_unmap_sync call. Introduce a separate lookup mechanism for rpcrdma_req's to enable calling ro_unmap_sync before xprt_lookup_rqst. Now the handler takes the transport_lock once and holds it for the XID lookup and RPC completion. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=305 Fixes: 68791649a725 ('xprtrdma: Invalidate in the RPC reply ... ') Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 79 ++++++++++++++++++++++++++--------------- net/sunrpc/xprtrdma/transport.c | 3 +- net/sunrpc/xprtrdma/verbs.c | 3 +- net/sunrpc/xprtrdma/xprt_rdma.h | 30 ++++++++++++++++ 4 files changed, 84 insertions(+), 31 deletions(-) commit a80d66c9e0d1ac31fa3427340efa0bf79b338023 Author: Chuck Lever Date: Thu Jun 8 11:52:12 2017 -0400 xprtrdma: Rename rpcrdma_req::rl_free Clean up: I'm about to use the rl_free field for purposes other than a free list. So use a more generic name. This is a refactoring change only. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=305 Fixes: 68791649a725 ('xprtrdma: Invalidate in the RPC reply ... ') Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 9 ++++----- net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) commit 451d26e151f0792601d10378a608c52304b6a357 Author: Chuck Lever Date: Thu Jun 8 11:52:04 2017 -0400 xprtrdma: Pass only the list of registered MRs to ro_unmap_sync There are rare cases where an rpcrdma_req can be re-used (via rpcrdma_buffer_put) while the RPC reply handler is still running. This is due to a signal firing at just the wrong instant. Since commit 9d6b04097882 ("xprtrdma: Place registered MWs on a per-req list"), rpcrdma_mws are self-contained; ie., they fully describe an MR and scatterlist, and no part of that information is stored in struct rpcrdma_req. As part of closing the above race window, pass only the req's list of registered MRs to ro_unmap_sync, rather than the rpcrdma_req itself. Some extra transport header sanity checking is removed. Since the client depends on its own recollection of what memory had been registered, there doesn't seem to be a way to abuse this change. And, the check was not terribly effective. If the client had sent Read chunks, the "list_empty" test is negative in both of the removed cases, which are actually looking for Write or Reply chunks. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=305 Fixes: 68791649a725 ('xprtrdma: Invalidate in the RPC reply ... ') Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 16 +++++++++------- net/sunrpc/xprtrdma/frwr_ops.c | 19 +++++++++---------- net/sunrpc/xprtrdma/rpc_rdma.c | 16 +++++++--------- net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 4 files changed, 26 insertions(+), 27 deletions(-) commit 4b196dc6fee9ba838ebabf824e294a429c79b27d Author: Chuck Lever Date: Thu Jun 8 11:51:56 2017 -0400 xprtrdma: Pre-mark remotely invalidated MRs There are rare cases where an rpcrdma_req and its matched rpcrdma_rep can be re-used, via rpcrdma_buffer_put, while the RPC reply handler is still using that req. This is typically due to a signal firing at just the wrong instant. As part of closing this race window, avoid using the wrong rpcrdma_rep to detect remotely invalidated MRs. Mark MRs as invalidated while we are sure the rep is still OK to use. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=305 Fixes: 68791649a725 ('xprtrdma: Invalidate in the RPC reply ... ') Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 4 +--- net/sunrpc/xprtrdma/rpc_rdma.c | 22 ++++++++++++++++++++-- net/sunrpc/xprtrdma/verbs.c | 1 + net/sunrpc/xprtrdma/xprt_rdma.h | 6 ++++++ 4 files changed, 28 insertions(+), 5 deletions(-) commit 04d25b7d5d1b43fbaffe4ad4bb21288f0f305338 Author: Chuck Lever Date: Thu Jun 8 11:51:48 2017 -0400 xprtrdma: On invalidation failure, remove MWs from rl_registered Callers assume the ro_unmap_sync and ro_unmap_safe methods empty the list of registered MRs. Ensure that all paths through fmr_op_unmap_sync() remove MWs from that list. Fixes: 9d6b04097882 ("xprtrdma: Place registered MWs on a ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 1 + 1 file changed, 1 insertion(+) commit 26fde4dfcbdcbbac394bb35de0c0f842de6972b5 Author: NeilBrown Date: Mon Jul 3 15:27:26 2017 +1000 NFS: check for nfs_refresh_inode() errors in nfs_fhget() If an NFS server returns a filehandle that we have previously seen, and reports a different type, then nfs_refresh_inode() will log a warning and return an error. nfs_fhget() does not check for this error and may return an inode with a different type than the one that the server reported. This is likely to cause confusion, and is one way that ->open_context() could return a directory inode as discussed in the previous patch. So if nfs_refresh_inode() returns and error, return that error from nfs_fhget() to avoid the confusion propagating. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker fs/nfs/inode.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit eaa2b82c3b3c938ab4635f8967d33f3e581da836 Author: NeilBrown Date: Mon Jul 3 15:27:26 2017 +1000 NFS: guard against confused server in nfs_atomic_open() A confused server could return a filehandle for an NFSv4 OPEN request, which it previously returned for a directory. So the inode returned by ->open_context() in nfs_atomic_open() could conceivably be a directory inode. This has particular implications for the call to nfs_file_set_open_context() in nfs_finish_open(). If that is called on a directory inode, then the nfs_open_context that gets stored in the filp->private_data will be linked to nfs_inode->open_files. When the directory is closed, nfs_closedir() will (ultimately) free the ->private_data, but not unlink it from nfs_inode->open_files (because it doesn't expect an nfs_open_context there). Subsequently the memory could get used for something else and eventually if the ->open_files list is walked, the walker will fall off the end and crash. So: change nfs_finish_open() to only call nfs_file_set_open_context() for regular-file inodes. This failure mode has been seen in a production setting (unknown NFS server implementation). The kernel was v3.0 and the specific sequence seen would not affect more recent kernels, but I think a risk is still present, and caution is wise. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker fs/nfs/dir.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cc89684c9a265828ce061037f1f79f4a68ccd3f7 Author: NeilBrown Date: Wed Jul 5 12:22:20 2017 +1000 NFS: only invalidate dentrys that are clearly invalid. Since commit bafc9b754f75 ("vfs: More precise tests in d_invalidate") in v3.18, a return of '0' from ->d_revalidate() will cause the dentry to be invalidated even if it has filesystems mounted on or it or on a descendant. The mounted filesystem is unmounted. This means we need to be careful not to return 0 unless the directory referred to truly is invalid. So -ESTALE or -ENOENT should invalidate the directory. Other errors such a -EPERM or -ERESTARTSYS should be returned from ->d_revalidate() so they are propagated to the caller. A particular problem can be demonstrated by: 1/ mount an NFS filesystem using NFSv3 on /mnt 2/ mount any other filesystem on /mnt/foo 3/ ls /mnt/foo 4/ turn off network, or otherwise make the server unable to respond 5/ ls /mnt/foo & 6/ cat /proc/$!/stack # note that nfs_lookup_revalidate is in the call stack 7/ kill -9 $! # this results in -ERESTARTSYS being returned 8/ observe that /mnt/foo has been unmounted. This patch changes nfs_lookup_revalidate() to only treat -ESTALE from nfs_lookup_verify_inode() and -ESTALE or -ENOENT from ->lookup() as indicating an invalid inode. Other errors are returned. Also nfs_check_inode_attributes() is changed to return -ESTALE rather than -EIO. This is consistent with the error returned in similar circumstances from nfs_update_inode(). As this bug allows any user to unmount a filesystem mounted on an NFS filesystem, this fix is suitable for stable kernels. Fixes: bafc9b754f75 ("vfs: More precise tests in d_invalidate") Cc: stable@vger.kernel.org (v3.18+) Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker fs/nfs/dir.c | 12 ++++++++---- fs/nfs/inode.c | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) commit 22368ff11d72eb06051f9b51abbc6842496c2d3a Author: Olga Kornievskaia Date: Fri Jun 23 10:26:59 2017 -0400 PNFS for stateid errors retry against MDS first Upon receiving a stateid error such as BAD_STATEID, the client should retry the operation against the MDS before deciding to do stateid recovery. Previously, the code would initiate state recovery and it could lead to a race in a state manager that could chose an incorrect recovery method which would lead to the EIO failure for the application. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker fs/nfs/filelayout/filelayout.c | 28 ---------------------------- fs/nfs/flexfilelayout/flexfilelayout.c | 33 --------------------------------- 2 files changed, 61 deletions(-) commit a0bc01e0f1fa39702b5244b3bac699bea0d4f413 Author: Olga Kornievskaia Date: Fri Jun 23 10:26:58 2017 -0400 PNFS fix EACCESS on commit to DS handling Commit fabbbee0eb0f "PNFS fix fallback to MDS if got error on commit to DS" moved the pnfs_set_lo_fail() to unhandled errors which was not correct and lead to a kernel oops on umount. Instead, fix the original EACCESS on commit to DS error by getting the new layout and re-doing the IO. Fixes: fabbbee0eb0f ("PNFS fix fallback to MDS if got error on commit to DS") Signed-off-by: Olga Kornievskaia Cc: stable@vger.kernel.org # v4.12 Signed-off-by: Anna Schumaker fs/nfs/filelayout/filelayout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4cd1ec95bdec8aedb280ca0f244ededb76f747ab Author: Dan Carpenter Date: Fri Jun 23 18:16:25 2017 +0300 NFS: silence a uninitialized variable warning Static checkers have gotten clever enough to complain that "id_long" is uninitialized on the failure path. It's harmless, but simple to fix. Signed-off-by: Dan Carpenter Signed-off-by: Anna Schumaker fs/nfs/nfs4idmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ce85bd29210f2cd84dc1f762c3992d8e6db822c2 Author: Tuo Chen Peng Date: Tue Jun 6 23:42:44 2017 -0700 nfs: Fix fscache stat printing in nfs_show_stats() nfs_show_stats() was incorrectly reading statistics for bytes when printing that for fsc. It caused files like /proc/self/mountstats to report incorrect fsc statistics for NFS mounts. Signed-off-by: Tuo Chen Peng Signed-off-by: Anna Schumaker fs/nfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2eb3aea7d9c43325a12df312adfc7fb25bbd636b Author: Benjamin Coddington Date: Fri Jun 9 11:03:23 2017 -0400 NFS: Fix initialization of nfs_page_array->npages Commit 8ef9b0b9e1c0 open-coded nfs_pgarray_set(), and left out the initialization of the nfs_page_array's npages. This mistake didn't show up until testing with block layouts, and there shows that all pNFS reads return -EIO. Fixes: 8ef9b0b9e1c0 ("NFS: move nfs_pgarray_set() to open code") Signed-off-by: Benjamin Coddington Cc: stable@vger.kernel.org # 4.12 Signed-off-by: Anna Schumaker fs/nfs/pagelist.c | 1 + 1 file changed, 1 insertion(+) commit 1a4edf0f46b0cb87dd5020481d355cd5cc456c47 Author: Trond Myklebust Date: Tue Jun 20 19:35:38 2017 -0400 NFS: Fix commit policy for non-blocking calls to nfs_write_inode() Now that the writes will schedule a commit on their own, we don't need nfs_write_inode() to schedule one if there are outstanding writes, and we're being called in non-blocking mode. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 919e3bd9a87593520a2c5dfda27bd3e6599852ed Author: Trond Myklebust Date: Tue Jun 20 19:35:37 2017 -0400 NFS: Ensure we commit after writeback is complete If the page cache is being flushed, then we want to ensure that we do start a commit once the pages are done being flushed. If we just wait until all I/O is done to that file, we can end up livelocking until the balance_dirty_pages() mechanism puts its foot down and forces I/O to stop. So instead we do more or less the same thing that O_DIRECT does, and set up a counter to tell us when the flush is done, Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/pagelist.c | 3 +++ fs/nfs/write.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/nfs_page.h | 1 + include/linux/nfs_xdr.h | 2 ++ 4 files changed, 63 insertions(+) commit b5973a8c1ccf375c9ab9e2428e1185e3f799af06 Author: Trond Myklebust Date: Tue Jun 20 19:35:36 2017 -0400 NFS: Remove unused fields in the page I/O structures Remove the 'layout_private' fields that were only used by the pNFS OSD layout driver. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/pagelist.c | 2 -- include/linux/nfs_page.h | 1 - include/linux/nfs_xdr.h | 1 - 3 files changed, 4 deletions(-) commit 92ea011f7cbade821ebd56a1f70d20331c0320c8 Author: Trond Myklebust Date: Tue Jun 20 19:35:39 2017 -0400 SUNRPC: Make slot allocation more reliable In xprt_alloc_slot(), the spin lock is only needed to provide atomicity between the atomic_add_unless() failure and the call to xprt_add_backlog(). We do not actually need to hold it across the memory allocation itself. By dropping the lock, we can use a more resilient GFP_NOFS allocation, just as we now do in the rest of the RPC client code. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker net/sunrpc/xprt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 818a8dbe83fddff534b814a7d4e0c75b511dff2e Author: Benjamin Coddington Date: Fri Jun 16 11:13:00 2017 -0400 NFS: nfs_rename() - revalidate directories on -ERESTARTSYS An interrupted rename will leave the old dentry behind if the rename succeeds. Fix this by forcing a lookup the next time through ->d_revalidate. A previous attempt at solving this problem took the approach to complete the work of the rename asynchronously, however that approach was wrong since it would allow the d_move() to occur after the directory's i_mutex had been dropped by the original process. Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/dir.c | 6 +++++- fs/nfs/unlink.c | 13 +++++++++++++ include/linux/nfs_xdr.h | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) commit a7a3b1e971cd806b81ecea3a234d8dae9de0add0 Author: Benjamin Coddington Date: Tue Jun 20 08:33:44 2017 -0400 NFS: convert flags to bool NFS uses some int, and unsigned int :1, and bool as flags in structs and args. Assert the preference for uniformly replacing these with the bool type. Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker fs/nfs/dir.c | 16 ++++++++-------- fs/nfs/internal.h | 6 +++--- fs/nfs/nfs2xdr.c | 2 +- fs/nfs/nfs3proc.c | 2 +- fs/nfs/nfs3xdr.c | 2 +- fs/nfs/nfs4proc.c | 42 +++++++++++++++++++++--------------------- fs/nfs/nfs4xdr.c | 2 +- fs/nfs/proc.c | 2 +- include/linux/nfs_xdr.h | 10 +++++----- 9 files changed, 42 insertions(+), 42 deletions(-) commit 18fe6a23e3114a6737471570753b708ff293b9de Author: Anna Schumaker Date: Fri Jun 16 12:06:59 2017 -0400 NFS: Set FATTR4_WORD0_TYPE for . and .. entries The current code worked okay for getdents(), but getdents64() expects the d_type field to get filled out properly in the stat structure. Setting this field fixes xfstests generic/401. Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 800222f80fedca63baf05d28028a0d18e9b8d7a5 Author: Christoph Hellwig Date: Mon May 8 23:46:47 2017 +0200 nfsd4: const-ify nfsd4_ops nfsd4_ops contains function pointers, and marking it as constant avoids it being able to be used as an attach vector for code injections. Signed-off-by: Christoph Hellwig fs/nfsd/nfs4proc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit aa8217d5dcb1db594d816794ef6ab434ebf3e127 Author: Christoph Hellwig Date: Fri May 12 16:21:37 2017 +0200 sunrpc: mark all struct svc_version instances as const Signed-off-by: Christoph Hellwig Acked-by: Trond Myklebust fs/lockd/svc.c | 38 +++++++++++++++++++------------------- fs/nfs/callback.c | 2 +- fs/nfs/callback_xdr.c | 4 ++-- fs/nfs/internal.h | 4 ++-- fs/nfs/nfs4_fs.h | 4 ++-- fs/nfsd/nfs2acl.c | 14 +++++++------- fs/nfsd/nfs3acl.c | 14 +++++++------- fs/nfsd/nfs3proc.c | 14 +++++++------- fs/nfsd/nfs4proc.c | 2 +- fs/nfsd/nfsd.h | 6 +++--- fs/nfsd/nfsproc.c | 14 +++++++------- fs/nfsd/nfssvc.c | 8 ++++---- include/linux/sunrpc/svc.h | 2 +- net/sunrpc/svc.c | 4 ++-- 14 files changed, 65 insertions(+), 65 deletions(-) commit b9c744c19c441f306239ac3e60a2a95b40d698f8 Author: Christoph Hellwig Date: Fri May 12 16:11:49 2017 +0200 sunrpc: mark all struct svc_procinfo instances as const struct svc_procinfo contains function pointers, and marking it as constant avoids it being able to be used as an attach vector for code injections. Signed-off-by: Christoph Hellwig fs/lockd/svc4proc.c | 2 +- fs/lockd/svcproc.c | 2 +- fs/nfs/callback_xdr.c | 2 +- fs/nfsd/nfs2acl.c | 2 +- fs/nfsd/nfs3acl.c | 2 +- fs/nfsd/nfs3proc.c | 2 +- fs/nfsd/nfs4proc.c | 2 +- fs/nfsd/nfsproc.c | 2 +- fs/nfsd/nfssvc.c | 4 ++-- include/linux/lockd/lockd.h | 4 ++-- include/linux/sunrpc/svc.h | 4 ++-- net/sunrpc/svc.c | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) commit 0becc1181cdba562730be4d4b8a5fcb4368ef527 Author: Christoph Hellwig Date: Mon May 8 23:40:27 2017 +0200 sunrpc: move pc_count out of struct svc_procinfo pc_count is the only writeable memeber of struct svc_procinfo, which is a good candidate to be const-ified as it contains function pointers. This patch moves it into out out struct svc_procinfo, and into a separate writable array that is pointed to by struct svc_version. Signed-off-by: Christoph Hellwig fs/lockd/svc.c | 6 ++++++ fs/nfs/callback_xdr.c | 4 ++++ fs/nfsd/nfs2acl.c | 2 ++ fs/nfsd/nfs3acl.c | 2 ++ fs/nfsd/nfs3proc.c | 2 ++ fs/nfsd/nfs4proc.c | 2 ++ fs/nfsd/nfsproc.c | 2 ++ include/linux/sunrpc/svc.h | 2 +- net/sunrpc/stats.c | 11 ++++++----- net/sunrpc/svc.c | 2 +- 10 files changed, 28 insertions(+), 7 deletions(-) commit 72edc37a2c7a30a4bc64889a4eaa8bfd3d308a3a Author: Christoph Hellwig Date: Mon May 8 20:58:35 2017 +0200 nfsd4: properly type op_func callbacks Pass union nfsd4_op_u to the op_func callbacks instead of using unsafe function pointer casts. It also adds two missing structures to struct nfsd4_op.u to facilitate this. Signed-off-by: Christoph Hellwig fs/nfsd/nfs4proc.c | 234 ++++++++++++++++++++++++++++------------------------ fs/nfsd/nfs4state.c | 82 +++++++++++------- fs/nfsd/xdr4.h | 66 +++++++-------- 3 files changed, 209 insertions(+), 173 deletions(-) commit 62bbf8bbb2fa3aba16e29585b3396264c1a2b2f4 Author: Christoph Hellwig Date: Mon May 8 20:42:10 2017 +0200 nfsd4: remove nfsd4op_rsize Except for a lot of unnecessary casts this typedef only has one user, so remove the casts and expand it in struct nfsd4_operation. Signed-off-by: Christoph Hellwig fs/nfsd/nfs4proc.c | 109 ++++++++++++++++++++++++++--------------------------- 1 file changed, 54 insertions(+), 55 deletions(-) commit c2a1102aa2add2f6757586541fc9c22d9b71bdf3 Author: Christoph Hellwig Date: Mon May 8 20:37:33 2017 +0200 nfsd4: properly type op_get_currentstateid callbacks Pass union nfsd4_op_u to the op_set_currentstateid callbacks instead of using unsafe function pointer casts. Signed-off-by: Christoph Hellwig fs/nfsd/current_stateid.h | 24 ++++++++++++++++-------- fs/nfsd/nfs4proc.c | 21 ++++++++++----------- fs/nfsd/nfs4state.c | 40 ++++++++++++++++++++++++---------------- 3 files changed, 50 insertions(+), 35 deletions(-) commit 6c9600a71d9c00a49e6a915b228f3f0b542a6067 Author: Christoph Hellwig Date: Mon May 8 20:03:15 2017 +0200 nfsd4: properly type op_set_currentstateid callbacks Given the args union in struct nfsd4_op a name, and pass it to the op_set_currentstateid callbacks instead of using unsafe function pointer casts. Signed-off-by: Christoph Hellwig fs/nfsd/current_stateid.h | 12 ++++++++---- fs/nfsd/nfs4proc.c | 12 ++++++------ fs/nfsd/nfs4state.c | 20 ++++++++++++-------- fs/nfsd/xdr4.h | 2 +- 4 files changed, 27 insertions(+), 19 deletions(-) commit 408b3d46ae06e1d219f31cbe629789a5e5c862aa Author: Christoph Hellwig Date: Mon May 8 19:56:10 2017 +0200 sunrpc: remove kxdrproc_t Remove the now unused typedef. Signed-off-by: Christoph Hellwig include/linux/sunrpc/xdr.h | 7 ------- 1 file changed, 7 deletions(-) commit d16d1867215663907f3212590d1a9d32398a0f47 Author: Christoph Hellwig Date: Mon May 8 19:42:02 2017 +0200 sunrpc: properly type pc_encode callbacks Drop the resp argument as it can trivially be derived from the rqstp argument. With that all functions now have the same prototype, and we can remove the unsafe casting to kxdrproc_t. Signed-off-by: Christoph Hellwig Acked-by: Trond Myklebust fs/lockd/svc4proc.c | 2 +- fs/lockd/svcproc.c | 2 +- fs/lockd/xdr.c | 14 ++++++--- fs/lockd/xdr4.c | 14 ++++++--- fs/nfs/callback_xdr.c | 6 ++-- fs/nfsd/nfs2acl.c | 18 ++++++----- fs/nfsd/nfs3acl.c | 11 +++---- fs/nfsd/nfs3proc.c | 44 +++++++++++++-------------- fs/nfsd/nfs3xdr.c | 74 +++++++++++++++++++++++++++------------------- fs/nfsd/nfs4proc.c | 4 +-- fs/nfsd/nfs4xdr.c | 5 ++-- fs/nfsd/nfsproc.c | 36 +++++++++++----------- fs/nfsd/nfssvc.c | 5 +--- fs/nfsd/nfsxdr.c | 31 +++++++++++-------- fs/nfsd/xdr.h | 14 ++++----- fs/nfsd/xdr3.h | 45 ++++++++++------------------ fs/nfsd/xdr4.h | 5 ++-- include/linux/lockd/xdr.h | 8 ++--- include/linux/lockd/xdr4.h | 8 ++--- include/linux/sunrpc/svc.h | 3 +- net/sunrpc/svc.c | 6 ++-- 21 files changed, 185 insertions(+), 170 deletions(-) commit cc6acc20a606f9ca65a6338af8204b7ae9e67b1a Author: Christoph Hellwig Date: Mon May 8 19:01:48 2017 +0200 sunrpc: properly type pc_decode callbacks Drop the argp argument as it can trivially be derived from the rqstp argument. With that all functions now have the same prototype, and we can remove the unsafe casting to kxdrproc_t. Signed-off-by: Christoph Hellwig fs/lockd/svc4proc.c | 2 +- fs/lockd/svcproc.c | 2 +- fs/lockd/xdr.c | 29 ++++++++++++------ fs/lockd/xdr4.c | 29 ++++++++++++------ fs/nfs/callback_xdr.c | 4 +-- fs/nfsd/nfs2acl.c | 21 +++++++------ fs/nfsd/nfs3acl.c | 11 +++---- fs/nfsd/nfs3proc.c | 42 +++++++++++++------------- fs/nfsd/nfs3xdr.c | 74 +++++++++++++++++++++++++++------------------- fs/nfsd/nfs4proc.c | 2 +- fs/nfsd/nfs4xdr.c | 4 ++- fs/nfsd/nfsproc.c | 36 +++++++++++----------- fs/nfsd/nfssvc.c | 5 ++-- fs/nfsd/nfsxdr.c | 53 ++++++++++++++++++++------------- fs/nfsd/xdr.h | 34 ++++++++------------- fs/nfsd/xdr3.h | 47 ++++++++++------------------- fs/nfsd/xdr4.h | 3 +- include/linux/lockd/xdr.h | 18 +++++------ include/linux/lockd/xdr4.h | 18 +++++------ include/linux/sunrpc/svc.h | 3 +- net/sunrpc/svc.c | 9 ++++-- 21 files changed, 237 insertions(+), 209 deletions(-) commit 1150ded804c2be6d02efef3e39e39e570c9cea21 Author: Christoph Hellwig Date: Mon May 8 18:48:24 2017 +0200 sunrpc: properly type pc_release callbacks Drop the p and resp arguments as they are always NULL or can trivially be derived from the rqstp argument. With that all functions now have the same prototype, and we can remove the unsafe casting to kxdrproc_t. Signed-off-by: Christoph Hellwig fs/nfsd/nfs2acl.c | 22 +++++++++++----------- fs/nfsd/nfs3acl.c | 8 ++++---- fs/nfsd/nfs3proc.c | 36 ++++++++++++++++++------------------ fs/nfsd/nfs3xdr.c | 16 ++++++++-------- fs/nfsd/nfs4xdr.c | 4 +--- fs/nfsd/nfsproc.c | 14 +++++++------- fs/nfsd/nfsxdr.c | 8 ++++---- fs/nfsd/xdr.h | 2 +- fs/nfsd/xdr3.h | 6 ++---- fs/nfsd/xdr4.h | 2 +- include/linux/sunrpc/svc.h | 3 ++- net/sunrpc/svc.c | 8 ++++---- 12 files changed, 63 insertions(+), 66 deletions(-) commit 1c8a5409f3c4748ff42c1721d9578dd03091f378 Author: Christoph Hellwig Date: Mon May 8 17:35:49 2017 +0200 sunrpc: properly type pc_func callbacks Drop the argp and resp arguments as they can trivially be derived from the rqstp argument. With that all functions now have the same prototype, and we can remove the unsafe casting to svc_procfunc as well as the svc_procfunc typedef itself. Signed-off-by: Christoph Hellwig fs/lockd/svc4proc.c | 118 ++++++++++++++++++++++------------- fs/lockd/svcproc.c | 118 ++++++++++++++++++++++------------- fs/nfs/callback_xdr.c | 7 ++- fs/nfsd/nfs2acl.c | 25 ++++---- fs/nfsd/nfs3acl.c | 15 ++--- fs/nfsd/nfs3proc.c | 151 ++++++++++++++++++++++++++------------------- fs/nfsd/nfs4proc.c | 9 +-- fs/nfsd/nfsproc.c | 104 +++++++++++++++++-------------- fs/nfsd/nfssvc.c | 2 +- include/linux/sunrpc/svc.h | 4 +- net/sunrpc/svc.c | 2 +- 11 files changed, 328 insertions(+), 227 deletions(-) commit 36ba89c2a40fe138898b394106205a3853ef2a4d Author: Christoph Hellwig Date: Mon May 8 18:03:06 2017 +0200 nfsd: remove the unused PROC() macro in nfs3proc.c Signed-off-by: Christoph Hellwig fs/nfsd/nfs3proc.c | 12 ------------ 1 file changed, 12 deletions(-) commit ec7e8caec9cf4f3cef5245220d0129380355d938 Author: Christoph Hellwig Date: Mon May 8 17:59:13 2017 +0200 nfsd: use named initializers in PROC() Signed-off-by: Christoph Hellwig fs/nfsd/nfs2acl.c | 22 +++++++++++----------- fs/nfsd/nfs3acl.c | 22 +++++++++++----------- fs/nfsd/nfs4proc.c | 10 +++++----- 3 files changed, 27 insertions(+), 27 deletions(-) commit 39d43f75c6a1c214e035c143628cd8a985484bad Author: Christoph Hellwig Date: Fri May 12 15:58:06 2017 +0200 nfsd4: const-ify nfs_cb_version4 Signed-off-by: Christoph Hellwig fs/nfsd/nfs4callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 511e936bf2b3e8be2a3160ace3d86be07962a7a8 Author: Christoph Hellwig Date: Fri May 12 15:36:49 2017 +0200 sunrpc: mark all struct rpc_procinfo instances as const struct rpc_procinfo contains function pointers, and marking it as constant avoids it being able to be used as an attach vector for code injections. Signed-off-by: Christoph Hellwig Acked-by: Trond Myklebust fs/lockd/clnt4xdr.c | 2 +- fs/lockd/clntxdr.c | 2 +- fs/lockd/mon.c | 2 +- fs/nfs/internal.h | 6 +++--- fs/nfs/mount_clnt.c | 4 ++-- fs/nfs/nfs2xdr.c | 2 +- fs/nfs/nfs3xdr.c | 4 ++-- fs/nfs/nfs4_fs.h | 2 +- fs/nfs/nfs4xdr.c | 2 +- fs/nfsd/nfs4callback.c | 2 +- include/linux/sunrpc/clnt.h | 4 ++-- include/linux/sunrpc/sched.h | 2 +- net/sunrpc/auth_gss/gss_rpc_upcall.c | 2 +- net/sunrpc/clnt.c | 4 ++-- net/sunrpc/rpcb_clnt.c | 19 ++++++++++--------- net/sunrpc/stats.c | 2 +- 16 files changed, 31 insertions(+), 30 deletions(-) commit 9ae7d8ff2948c4514b9a6bfef7f1a548ea6ab190 Author: Christoph Hellwig Date: Fri May 12 15:51:24 2017 +0200 nfs: use ARRAY_SIZE() in the nfsacl_version3 declaration Signed-off-by: Christoph Hellwig fs/nfs/nfs3xdr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c551858a884b6d81def3d1528a9002ba97f5d4ad Author: Christoph Hellwig Date: Mon May 8 23:27:10 2017 +0200 sunrpc: move p_count out of struct rpc_procinfo p_count is the only writeable memeber of struct rpc_procinfo, which is a good candidate to be const-ified as it contains function pointers. This patch moves it into out out struct rpc_procinfo, and into a separate writable array that is pointed to by struct rpc_version and indexed by p_statidx. Signed-off-by: Christoph Hellwig fs/lockd/clnt4xdr.c | 2 ++ fs/lockd/clntxdr.c | 4 ++++ fs/lockd/mon.c | 4 +++- fs/nfs/mount_clnt.c | 5 ++++- fs/nfs/nfs2xdr.c | 4 +++- fs/nfs/nfs3xdr.c | 6 +++++- fs/nfs/nfs4xdr.c | 4 +++- fs/nfsd/nfs4callback.c | 4 +++- include/linux/sunrpc/clnt.h | 2 +- net/sunrpc/auth_gss/gss_rpc_upcall.c | 3 ++- net/sunrpc/clnt.c | 6 ++++-- net/sunrpc/rpcb_clnt.c | 12 +++++++++--- net/sunrpc/stats.c | 3 +-- 13 files changed, 44 insertions(+), 15 deletions(-) commit e91ff8e3c4cf0e4227fddabec87683401fc657ac Author: Christoph Hellwig Date: Mon May 8 23:32:18 2017 +0200 lockd: fix some weird indentation Remove double indentation of a few struct rpc_version and struct rpc_program instance. Signed-off-by: Christoph Hellwig Acked-by: Trond Myklebust fs/lockd/clntxdr.c | 22 +++++++++++----------- fs/lockd/mon.c | 16 ++++++++-------- 2 files changed, 19 insertions(+), 19 deletions(-) commit 947c6e431d1feb0bb62397cbb03d6e7292a35425 Author: Christoph Hellwig Date: Thu May 11 09:22:18 2017 +0200 nfs: don't cast callback decode/proc/encode routines Instead declare all functions with the proper methods signature. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Acked-by: Trond Myklebust fs/nfs/callback.h | 27 ++++++---------- fs/nfs/callback_proc.c | 33 ++++++++++++------- fs/nfs/callback_xdr.c | 86 +++++++++++++++++++++++++++----------------------- 3 files changed, 77 insertions(+), 69 deletions(-) commit fc016483eb0b2a19ef1e84ef8f8753c8ec9ac7f8 Author: Christoph Hellwig Date: Mon May 8 15:09:02 2017 +0200 nfs: fix decoder callback prototypes Declare the p_decode callbacks with the proper prototype instead of casting to kxdrdproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Acked-by: Trond Myklebust fs/nfs/mount_clnt.c | 10 ++-- fs/nfs/nfs2xdr.c | 15 +++--- fs/nfs/nfs3xdr.c | 55 +++++++++++++-------- fs/nfs/nfs42xdr.c | 18 ++++--- fs/nfs/nfs4xdr.c | 137 ++++++++++++++++++++++++++++++++++------------------ 5 files changed, 151 insertions(+), 84 deletions(-) commit 04000564c1fc72770e4946cc3adb3ea9cd544bb2 Author: Christoph Hellwig Date: Mon May 8 15:06:20 2017 +0200 lockd: fix decoder callback prototypes Declare the p_decode callbacks with the proper prototype instead of casting to kxdrdproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Acked-by: Trond Myklebust fs/lockd/clnt4xdr.c | 8 +++++--- fs/lockd/clntxdr.c | 8 +++++--- fs/lockd/mon.c | 10 ++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) commit 5362a4ec830e0b5f4db59ad05fc32b10268abe91 Author: Christoph Hellwig Date: Mon May 8 15:04:45 2017 +0200 nfsd: fix decoder callback prototypes Declare the p_decode callbacks with the proper prototype instead of casting to kxdrdproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton fs/nfsd/nfs4callback.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c56c620b3e48feb5a6444707a05f9baeae1af9ef Author: Christoph Hellwig Date: Mon May 8 15:03:02 2017 +0200 sunrpc/auth_gss: fix decoder callback prototypes Declare the p_decode callbacks with the proper prototype instead of casting to kxdrdproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Acked-by: Trond Myklebust net/sunrpc/auth_gss/gss_rpc_upcall.c | 2 +- net/sunrpc/auth_gss/gss_rpc_xdr.c | 3 ++- net/sunrpc/auth_gss/gss_rpc_xdr.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) commit 555966beff70ed612728521f0c12298a5127b7e5 Author: Christoph Hellwig Date: Mon May 8 15:00:29 2017 +0200 sunrpc: fix decoder callback prototypes Declare the p_decode callbacks with the proper prototype instead of casting to kxdrdproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton net/sunrpc/rpcb_clnt.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 993328e2b31fedc35276a4828039ad7af6d519cb Author: Christoph Hellwig Date: Mon May 8 14:58:11 2017 +0200 sunrpc: properly type argument to kxdrdproc_t Pass struct rpc_request as the first argument instead of an untyped blob. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Acked-by: Trond Myklebust include/linux/sunrpc/xdr.h | 3 ++- net/sunrpc/clnt.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit df179381223f299b6c16ae134b5853aeee94b09e Author: Christoph Hellwig Date: Mon May 8 14:54:06 2017 +0200 sunrpc/auth_gss: nfsd: fix encoder callback prototypes Declare the p_encode callbacks with the proper prototype instead of casting to kxdreproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Acked-by: Trond Myklebust net/sunrpc/auth_gss/gss_rpc_upcall.c | 2 +- net/sunrpc/auth_gss/gss_rpc_xdr.c | 11 ++++++----- net/sunrpc/auth_gss/gss_rpc_xdr.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) commit 843efb7d7d98364645a7f23eaa13a0649075815f Author: Christoph Hellwig Date: Mon May 8 14:47:53 2017 +0200 nfsd: fix encoder callback prototypes Declare the p_encode callbacks with the proper prototype instead of casting to kxdreproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton fs/nfsd/nfs4callback.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit fcc85819ee4826f52b0d6c959c759329e6d87bfc Author: Christoph Hellwig Date: Mon May 8 10:01:49 2017 +0200 nfs: fix encoder callback prototypes Declare the p_encode callbacks with the proper prototype instead of casting to kxdreproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Acked-by: Trond Myklebust fs/nfs/mount_clnt.c | 10 +-- fs/nfs/nfs2xdr.c | 49 ++++++++++---- fs/nfs/nfs3xdr.c | 83 ++++++++++++++++------- fs/nfs/nfs42xdr.c | 34 ++++++---- fs/nfs/nfs4xdr.c | 188 +++++++++++++++++++++++++++++++++------------------- 5 files changed, 242 insertions(+), 122 deletions(-) commit d16073389bb48a2caf7c62cd7089a2009c8717b8 Author: Christoph Hellwig Date: Mon May 8 09:34:04 2017 +0200 lockd: fix encoder callback prototypes Declare the p_encode callbacks with the proper prototype instead of casting to kxdreproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Acked-by: Trond Myklebust fs/lockd/clnt4xdr.c | 22 +++++++++++++++------- fs/lockd/clntxdr.c | 22 +++++++++++++++------- fs/lockd/mon.c | 8 ++++---- 3 files changed, 34 insertions(+), 18 deletions(-) commit 8be9d07f0ca68a188ab448e5fad8ea5d7420f535 Author: Christoph Hellwig Date: Mon May 8 09:59:45 2017 +0200 sunrpc: fix encoder callback prototypes Declare the p_encode callbacks with the proper prototype instead of casting to kxdreproc_t and losing all type safety. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Acked-by: Trond Myklebust net/sunrpc/rpcb_clnt.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 0aebdc52ca824c38837a652548028e45da72628f Author: Christoph Hellwig Date: Mon May 8 09:31:19 2017 +0200 sunrpc: properly type argument to kxdreproc_t Pass struct rpc_request as the first argument instead of an untyped blob, and mark the data object as const. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton include/linux/sunrpc/xdr.h | 5 ++++- net/sunrpc/clnt.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) commit ad51271afc21a72479974713abb40ca4b96d1f6b Merge: 6735a19 3e8f399 Author: Linus Torvalds Date: Thu Jul 13 12:38:49 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge yet more updates from Andrew Morton: - various misc things - kexec updates - sysctl core updates - scripts/gdb udpates - checkpoint-restart updates - ipc updates - kernel/watchdog updates - Kees's "rough equivalent to the glibc _FORTIFY_SOURCE=1 feature" - "stackprotector: ascii armor the stack canary" - more MM bits - checkpatch updates * emailed patches from Andrew Morton : (96 commits) writeback: rework wb_[dec|inc]_stat family of functions ARM: samsung: usb-ohci: move inline before return type video: fbdev: omap: move inline before return type video: fbdev: intelfb: move inline before return type USB: serial: safe_serial: move __inline__ before return type drivers: tty: serial: move inline before return type drivers: s390: move static and inline before return type x86/efi: move asmlinkage before return type sh: move inline before return type MIPS: SMP: move asmlinkage before return type m68k: coldfire: move inline before return type ia64: sn: pci: move inline before type ia64: move inline before return type FRV: tlbflush: move asmlinkage before return type CRIS: gpio: move inline before return type ARM: HP Jornada 7XX: move inline before return type ARM: KVM: move asmlinkage before type checkpatch: improve the STORAGE_CLASS test mm, migration: do not trigger OOM killer when migrating memory drm/i915: use __GFP_RETRY_MAYFAIL ... commit 6735a1971a00a29a96aa3ea5dc08912bfee95c51 Merge: 8c6f5e7 c3a73ed Author: Linus Torvalds Date: Thu Jul 13 12:28:06 2017 -0700 Merge tag 'platform-drivers-x86-v4.13-2' of git://git.infradead.org/linux-platform-drivers-x86 Pull more x86 platform driver updates from Darren Hart: "Add new platform matches for silead_dmi and ideapad-laptop. Several constify patches for attribute_group structures. Fixes for peaq-wmi and intel_telemetry. silead_dmi: - Add entry for Ployer Momo7w tablet touchscreen - Add touchscreen info for I.T.Works TW891 2-in-1 toshiba_acpi: - constify attribute_group structures. asus-wmi: - constify attribute_group structures. panasonic-laptop: - constify attribute_group structures. alienware-wmi: - constify attribute_group structures. samsung-laptop: - constify attribute_group structures. compal-laptop: - constify attribute_group structures. fujitsu-laptop: - constify attribute_group structures. - add NULL check on devm_kzalloc() return value peaq-wmi: - Fix peaq_ignore_events_counter handling off by 1 ideapad-laptop: - Fix indentation in DMI table - Add several models to no_hw_rfkill - Add IdeaPad V510-15IKB to no_hw_rfkill intel_telemetry: - Add debugfs entry for S0ix residency intel_telemetry_debugfs: - fix some error codes in init - fix oops when load/unload module" * tag 'platform-drivers-x86-v4.13-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: silead_dmi: Add entry for Ployer Momo7w tablet touchscreen platform/x86: toshiba_acpi: constify attribute_group structures. platform/x86: asus-wmi: constify attribute_group structures. platform/x86: panasonic-laptop: constify attribute_group structures. platform/x86: alienware-wmi: constify attribute_group structures. platform/x86: samsung-laptop: constify attribute_group structures. platform/x86: compal-laptop: constify attribute_group structures. platform/x86: fujitsu-laptop: constify attribute_group structures. platform/x86: peaq-wmi: Fix peaq_ignore_events_counter handling off by 1 platform/x86: fujitsu-laptop: add NULL check on devm_kzalloc() return value platform/x86: silead_dmi: Add touchscreen info for I.T.Works TW891 2-in-1 platform/x86: ideapad-laptop: Fix indentation in DMI table platform/x86: ideapad-laptop: Add several models to no_hw_rfkill platform/x86: ideapad-laptop: Add IdeaPad V510-15IKB to no_hw_rfkill platform/x86: intel_telemetry: Add debugfs entry for S0ix residency platform/x86: intel_telemetry_debugfs: fix some error codes in init platform/x86: intel_telemetry_debugfs: fix oops when load/unload module commit 8c6f5e7359e5bd0616b686dd5e14b99a34103b32 Merge: 3a00be1 7f56c30 Author: Linus Torvalds Date: Thu Jul 13 12:23:54 2017 -0700 Merge tag 'vfio-v4.13-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Include Intel XXV710 in INTx workaround (Alex Williamson) - Make use of ERR_CAST() for error return (Dan Carpenter) - Fix vfio_group release deadlock from iommu notifier (Alex Williamson) - Unset KVM-VFIO attributes only on group match (Alex Williamson) - Fix release path group/file matching with KVM-VFIO (Alex Williamson) - Remove unnecessary lock uses triggering lockdep splat (Alex Williamson) * tag 'vfio-v4.13-rc1' of git://github.com/awilliam/linux-vfio: vfio: Remove unnecessary uses of vfio_container.group_lock vfio: New external user group/file match kvm-vfio: Decouple only when we match a group vfio: Fix group release deadlock vfio: Use ERR_CAST() instead of open coding it vfio/pci: Add Intel XXV710 to hidden INTx devices commit 3a00be19238ca330ce43abd33caac8eff343800c Merge: b5e1617 40bf6a3 Author: Linus Torvalds Date: Thu Jul 13 12:15:06 2017 -0700 Merge tag 'rtc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Here is the pull-request for the RTC subsystem for 4.13. Subsystem: - expose non volatile RAM using nvmem instead of open coding in many drivers. Unfortunately, this option has to be enabled by default to not break existing users. - rtctest can now test for cutoff dates, showing when an RTC will start failing to properly save time and date. - new RTC registration functions to remove race conditions in drivers Newly supported RTCs: - Broadcom STB wake-timer - Epson RX8130CE - Maxim IC DS1308 - STMicroelectronics STM32H7 Drivers: - ds1307: use regmap, use nvmem, more cleanups - ds3232: temperature reading support - gemini: renamed to ftrtc010 - m41t80: use CCF to expose the clock - rv8803: use nvmem - s3c: many cleanups - st-lpc: fix y2106 bug" * tag 'rtc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (51 commits) rtc: Remove wrong deprecation comment nvmem: include linux/err.h from header rtc: st-lpc: make it robust against y2038/2106 bug rtc: rtctest: add check for problematic dates tools: timer: add rtctest_setdate rtc: ds1307: remove ds1307_remove rtc: ds1307: use generic nvmem rtc: ds1307: switch to rtc_register_device rtc: rv8803: remove rv8803_remove rtc: rv8803: use generic nvmem support rtc: rv8803: switch to rtc_register_device rtc: add generic nvmem support rtc: at91rm9200: remove race condition rtc: introduce new registration method rtc: class separate id allocation from registration rtc: class separate device allocation from registration rtc: stm32: add STM32H7 RTC support dt-bindings: rtc: stm32: add support for STM32H7 rtc: ds1307: add ds1308 variant rtc: ds3232: add temperature support ... commit b5e16170f59b4ae38937b795a56a356fb95cca56 Merge: da16dd9 7d84120 Author: Linus Torvalds Date: Thu Jul 13 12:07:44 2017 -0700 Merge tag 'for-linus-20170713' of git://git.infradead.org/linux-mtd Pull MTD updates from Brian Norris: "General updates: - Cleanups and additional flash support for "dataflash" driver - new driver for mchp23k256 SPI SRAM device - improve handling of MTDs without eraseblocks (i.e., MTD_NO_ERASE) - refactor and improve "sub-partition" handling with TRX partition parser; partitions can now be created as sub-partitions of another partition SPINOR updates, from Cyrille Pitchen and Marek Vasut: - introduce support to the SPI 1-2-2 and 1-4-4 protocols. - introduce support to the Double Data Rate (DDR) mode. - introduce support to the Octo SPI protocols. - add support to new memory parts for Spansion, Macronix and Winbond. - add fixes for the Aspeed, STM32 and Cadence QSPI controler drivers. - clean up the st_spi_fsm driver. NAND updates, from Boris Brezillon: - addition of on-die ECC support to Micron driver - addition of helpers to help drivers choose most appropriate ECC settings - deletion of dead-code (cached programming and ->errstat() hook) - make sure drivers that do not support the SET/GET FEATURES command return ENOTSUPP use a dummy ->set/get_features implementation returning -ENOTSUPP (required for Micron on-die ECC) - change the semantic of ecc->write_page() for drivers setting the NAND_ECC_CUSTOM_PAGE_ACCESS flag - support exiting 'GET STATUS' command in default ->cmdfunc() implementations - change the prototype of ->setup_data_interface() A bunch of driver related changes: - various cleanup, fixes and improvements of the MTK driver - OMAP DT bindings fixes - support for ->setup_data_interface() in the fsmc driver - support for imx7 in the gpmi driver - finalization of the denali driver rework (thanks to Masahiro for the work he's done on this driver) - fix "bitflips in erased pages" handling in the ifc driver - addition of PM ops and dynamic timing configuration to the atmel driver" * tag 'for-linus-20170713' of git://git.infradead.org/linux-mtd: (118 commits) Documentation: ABI: mtd: describe "offset" more precisely mtd: Fix check in mtd_unpoint() mtd: nand: mtk: release lock on error path mtd: st_spi_fsm: remove SPINOR_OP_RDSR2 and use SPINOR_OP_RDCR instead mtd: spi-nor: cqspi: remove duplicate const mtd: spi-nor: Add support for Spansion S25FL064L mtd: spi-nor: Add support for mx66u51235f mtd: nand: mtk: add ->setup_data_interface() hook mtd: nand: mtk: remove unneeded mtk_ecc_hw_init from mtk_ecc_resume mtd: nand: mtk: remove unneeded mtk_nfc_hw_init from mtk_nfc_resume mtd: nand: mtk: disable ecc irq when writing page with hwecc mtd: nand: mtk: fix incorrect register setting order about ecc irq mtd: partitions: fixup some allocate_partition() whitespace mtd: parsers: trx: fix pr_err format for printing offset MAINTAINERS: Update SPI NOR subsystem git repositories mtd: extract TRX parser out of bcm47xxpart into a separated module mtd: partitions: add support for partition parsers mtd: partitions: add support for subpartitions mtd: partitions: rename "master" to the "parent" where appropriate mtd: partitions: remove sysfs files when deleting all master's partitions ... commit da16dd9785f88680c4affe176c07e85067d4fdd7 Merge: 38f7d2d 4c99ced Author: Linus Torvalds Date: Thu Jul 13 11:52:00 2017 -0700 Merge tag 'fbdev-v4.13' of git://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: "There is nothing really major here, just a couple of small bugfixes, improvements and cleanups. - fix get_fb_unmapped_area() helper handling (Benjamin Gaignard) - check return value of clk_prepare_enable() in pxafb driver (Arvind Yadav) - fix error path handling in vmlfb driver (Alexey Khoroshilov) - printks fixes/cleanups for uvesafb driver (Joe Perches) - fix unusued variable warning in atyfb driver (Arnd Bergmann) - constifications for sh_mobile_lcdcfb, fsl-diu-fb, omapfb (Arvind Yadav) - mdacon driver cleanups (Jiri Slaby) - misc cleanups (Andy Shevchenko, Karim Eshapa, Gustavo A. R. Silva, Dan Carpenter)" * tag 'fbdev-v4.13' of git://github.com/bzolnier/linux: fbdev: make get_fb_unmapped_area depends of !MMU atyfb: hide unused variable video: fbdev: matrox: the list iterator can't be NULL video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc() fbdev: omapfb: constify ctrl_caps, color_caps, panel_attr_grp and ctrl_attr_grp omapfb: panel-dsi-cm: constify dsicm_attr_group vmlfb: Fix error handling in cr_pll_init() video: fbdev: fsl-diu-fb: constify mfb_template and fsl_diu_match. uvesafb: Fix continuation printks without KERN_LEVEL to pr_cont, neatening video: fbdev: sh_mobile_lcdcfb: constify sh_mobile_lcdc_bl_ops. omapfb: Use sysfs_match_string() helper video: fbdev: pxafb: Handle return value of clk_prepare_enable video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro. mdacon: replace MDA_ADDR macro by inline function mdacon: make mda_vram_base u16 * mdacon: align code in mda_detect properly commit 38f7d2da4e39d454f2cb3e7c1ae35afde3d61123 Merge: dc087d1 5ec8c48 Author: Linus Torvalds Date: Thu Jul 13 11:49:52 2017 -0700 Merge tag 'pwm/for-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This release cycle's changes include mostly updates and cleanups to existing drivers along with a few cleanups to the core, documentation and device tree bindings" * tag 'pwm/for-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: cros-ec: Fix transposed param settings pwm: meson: Improve PWM calculation precision dt-bindings: pwm: meson: Add compatible for gxbb ao PWMs pwm: meson: Add compatible for the gxbb ao PWMs pwm: sun4i: Drop legacy callbacks pwm: sun4i: Switch to atomic PWM pwm: sun4i: Improve hardware read out pwm: hibvt: Constify hibvt_pwm_ops pwm: Silently error out on EPROBE_DEFER pwm: Standardize document format pwm: bfin: Remove unneeded error message dt-bindings: pwm: Update STM32 timers clock names dt-bindings: pwm: Add R-Car M3-W device tree bindings pwm: tegra: Set maximum pwm clock source per SoC tapeout commit dc087d1ef1485363c21b8d781869eb8076342adf Merge: 311ac00 7bb5a65 Author: Linus Torvalds Date: Thu Jul 13 11:47:59 2017 -0700 Merge tag 'for-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Reichel: "I have two more fixes for the power-supply subsystem: - two fixes for twl4030-charger" * tag 'for-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: twl4030-charger: add deferred probing for phy and iio power: supply: twl4030-charger: move irq allocation to just before irqs are enabled commit 311ac00deff520820d198cda141109f2a5655d4a Merge: 266530b 6419ec7 Author: Linus Torvalds Date: Thu Jul 13 11:26:18 2017 -0700 Merge tag 'drm-fixes-for-v4.13-rc1' of git://people.freedesktop.org/~airlied/linux Pull more drm updates from Dave Airlie: "i915, amd and some core fixes + mediatek color support. Some fixes tree came in since the main pull request for rc1, primarily i915 and drm-misc and one amd fix. The drm core vblank regression fix is probably the most important thing. I've also added the mediatek feature pull, it wasn't that big and didn't look like it would have any impact outside of mediatek, in fact it looks to just be a single feature, and some cleanups" * tag 'drm-fixes-for-v4.13-rc1' of git://people.freedesktop.org/~airlied/linux: (31 commits) drm/i915: Make DP-MST connector info work drm/i915/gvt: Use fence error from GVT request for workload status drm/i915/gvt: remove scheduler_mutex in per-engine workload_thread drm/i915/gvt: Revert "drm/i915/gvt: Fix possible recursive locking issue" drm/i915/gvt: Audit the command buffer address drm/i915/gvt: Fix a memory leak in intel_gvt_init_gtt() drm/rockchip: fix NULL check on devm_kzalloc() return value drm/i915/fbdev: Check for existence of ifbdev->vma before operations drm/radeon: Fix eDP for single-display iMac10,1 (v2) drm/i915: Hold RPM wakelock while initializing OA buffer drm/i915/cnl: Fix the CURSOR_COEFF_MASK used in DDI Vswing Programming drm/i915/cfl: Fix Workarounds. drm/i915: Avoid undefined behaviour of "u32 >> 32" drm/i915: reintroduce VLV/CHV PFI programming power domain workaround drm/i915: Fix an error checking test drm/i915: Disable MSI for all pre-gen5 drm/atomic: Add missing drm_atomic_state_clear to atomic_remove_fb drm: vblank: Fix vblank timestamp update drm/i915/gvt: Make function dpy_reg_mmio_readx safe drm/mediatek: separate color module to fixup error memory reallocation ... commit 6592e58c6b68e61f003a01ba29a3716e7e2e9484 Author: Filipe Manana Date: Wed Jul 12 23:36:02 2017 +0100 Btrfs: fix write corruption due to bio cloning on raid5/6 The recent changes to make bio cloning faster (added in the 4.13 merge window) by using the bio_clone_fast() API introduced a regression on raid5/6 modes, because cloned bios have an invalid bi_vcnt field (therefore it can not be used) and the raid5/6 code uses the bio_for_each_segment_all() API to iterate the segments of a bio, and this API uses a bio's bi_vcnt field. The issue is very simple to trigger by doing for example a direct IO write against a raid5 or raid6 filesystem and then attempting to read what we wrote before: $ mkfs.btrfs -m raid5 -d raid5 -f /dev/sdc /dev/sdd /dev/sde /dev/sdf $ mount /dev/sdc /mnt $ xfs_io -f -d -c "pwrite -S 0xab 0 1M" /mnt/foobar $ od -t x1 /mnt/foobar od: /mnt/foobar: read error: Input/output error For that example, the following is also reported in dmesg/syslog: [18274.985557] btrfs_print_data_csum_error: 18 callbacks suppressed [18274.995277] BTRFS warning (device sdf): csum failed root 5 ino 257 off 0 csum 0x98f94189 expected csum 0x94374193 mirror 1 [18274.997205] BTRFS warning (device sdf): csum failed root 5 ino 257 off 4096 csum 0x98f94189 expected csum 0x94374193 mirror 1 [18275.025221] BTRFS warning (device sdf): csum failed root 5 ino 257 off 8192 csum 0x98f94189 expected csum 0x94374193 mirror 1 [18275.047422] BTRFS warning (device sdf): csum failed root 5 ino 257 off 12288 csum 0x98f94189 expected csum 0x94374193 mirror 1 [18275.054818] BTRFS warning (device sdf): csum failed root 5 ino 257 off 4096 csum 0x98f94189 expected csum 0x94374193 mirror 1 [18275.054834] BTRFS warning (device sdf): csum failed root 5 ino 257 off 8192 csum 0x98f94189 expected csum 0x94374193 mirror 1 [18275.054943] BTRFS warning (device sdf): csum failed root 5 ino 257 off 8192 csum 0x98f94189 expected csum 0x94374193 mirror 2 [18275.055207] BTRFS warning (device sdf): csum failed root 5 ino 257 off 8192 csum 0x98f94189 expected csum 0x94374193 mirror 3 [18275.055571] BTRFS warning (device sdf): csum failed root 5 ino 257 off 0 csum 0x98f94189 expected csum 0x94374193 mirror 1 [18275.062171] BTRFS warning (device sdf): csum failed root 5 ino 257 off 12288 csum 0x98f94189 expected csum 0x94374193 mirror 1 A scrub will also fail correcting bad copies, mentioning the following in dmesg/syslog: [18276.128696] scrub_handle_errored_block: 498 callbacks suppressed [18276.129617] BTRFS warning (device sdf): checksum error at logical 2186346496 on dev /dev/sde, sector 2116608, root 5, inode 257, offset 65536, length 4096, links $ [18276.149235] btrfs_dev_stat_print_on_error: 498 callbacks suppressed [18276.157897] BTRFS error (device sdf): bdev /dev/sde errs: wr 0, rd 0, flush 0, corrupt 1, gen 0 [18276.206059] BTRFS warning (device sdf): checksum error at logical 2186477568 on dev /dev/sdd, sector 2116736, root 5, inode 257, offset 196608, length 4096, links$ [18276.206059] BTRFS error (device sdf): bdev /dev/sdd errs: wr 0, rd 0, flush 0, corrupt 1, gen 0 [18276.306552] BTRFS warning (device sdf): checksum error at logical 2186543104 on dev /dev/sdd, sector 2116864, root 5, inode 257, offset 262144, length 4096, links$ [18276.319152] BTRFS error (device sdf): bdev /dev/sdd errs: wr 0, rd 0, flush 0, corrupt 2, gen 0 [18276.394316] BTRFS warning (device sdf): checksum error at logical 2186739712 on dev /dev/sdf, sector 2116992, root 5, inode 257, offset 458752, length 4096, links$ [18276.396348] BTRFS error (device sdf): bdev /dev/sdf errs: wr 0, rd 0, flush 0, corrupt 1, gen 0 [18276.434127] BTRFS warning (device sdf): checksum error at logical 2186870784 on dev /dev/sde, sector 2117120, root 5, inode 257, offset 589824, length 4096, links$ [18276.434127] BTRFS error (device sdf): bdev /dev/sde errs: wr 0, rd 0, flush 0, corrupt 2, gen 0 [18276.500504] BTRFS error (device sdf): unable to fixup (regular) error at logical 2186477568 on dev /dev/sdd [18276.538400] BTRFS warning (device sdf): checksum error at logical 2186481664 on dev /dev/sdd, sector 2116744, root 5, inode 257, offset 200704, length 4096, links$ [18276.540452] BTRFS error (device sdf): bdev /dev/sdd errs: wr 0, rd 0, flush 0, corrupt 3, gen 0 [18276.542012] BTRFS error (device sdf): unable to fixup (regular) error at logical 2186481664 on dev /dev/sdd [18276.585030] BTRFS error (device sdf): unable to fixup (regular) error at logical 2186346496 on dev /dev/sde [18276.598306] BTRFS warning (device sdf): checksum error at logical 2186412032 on dev /dev/sde, sector 2116736, root 5, inode 257, offset 131072, length 4096, links$ [18276.598310] BTRFS error (device sdf): bdev /dev/sde errs: wr 0, rd 0, flush 0, corrupt 3, gen 0 [18276.598582] BTRFS error (device sdf): unable to fixup (regular) error at logical 2186350592 on dev /dev/sde [18276.603455] BTRFS error (device sdf): bdev /dev/sde errs: wr 0, rd 0, flush 0, corrupt 4, gen 0 [18276.638362] BTRFS warning (device sdf): checksum error at logical 2186354688 on dev /dev/sde, sector 2116624, root 5, inode 257, offset 73728, length 4096, links $ [18276.640445] BTRFS error (device sdf): bdev /dev/sde errs: wr 0, rd 0, flush 0, corrupt 5, gen 0 [18276.645942] BTRFS error (device sdf): unable to fixup (regular) error at logical 2186354688 on dev /dev/sde [18276.657204] BTRFS error (device sdf): unable to fixup (regular) error at logical 2186412032 on dev /dev/sde [18276.660563] BTRFS warning (device sdf): checksum error at logical 2186416128 on dev /dev/sde, sector 2116744, root 5, inode 257, offset 135168, length 4096, links$ [18276.664609] BTRFS error (device sdf): bdev /dev/sde errs: wr 0, rd 0, flush 0, corrupt 6, gen 0 [18276.664609] BTRFS error (device sdf): unable to fixup (regular) error at logical 2186358784 on dev /dev/sde So fix this by using the bio_for_each_segment() API and setting before the bio's bi_iter field to the value of the corresponding btrfs bio container's saved iterator if we are processing a cloned bio in the raid5/6 code (the same code processes both cloned and non-cloned bios). This incorrect iteration of cloned bios was also causing some occasional BUG_ONs when running fstest btrfs/064, which have a trace like the following: [ 6674.416156] ------------[ cut here ]------------ [ 6674.416157] kernel BUG at fs/btrfs/raid56.c:1897! [ 6674.416159] invalid opcode: 0000 [#1] PREEMPT SMP [ 6674.416160] Modules linked in: dm_flakey dm_mod dax ppdev tpm_tis parport_pc tpm_tis_core evdev tpm psmouse sg i2c_piix4 pcspkr parport i2c_core serio_raw button s [ 6674.416184] CPU: 3 PID: 19236 Comm: kworker/u32:10 Not tainted 4.12.0-rc6-btrfs-next-44+ #1 [ 6674.416185] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [ 6674.416210] Workqueue: btrfs-endio btrfs_endio_helper [btrfs] [ 6674.416211] task: ffff880147f6c740 task.stack: ffffc90001fb8000 [ 6674.416229] RIP: 0010:__raid_recover_end_io+0x1ac/0x370 [btrfs] [ 6674.416230] RSP: 0018:ffffc90001fbbb90 EFLAGS: 00010217 [ 6674.416231] RAX: ffff8801ff4b4f00 RBX: 0000000000000002 RCX: 0000000000000001 [ 6674.416232] RDX: ffff880099b045d8 RSI: ffffffff81a5f6e0 RDI: 0000000000000004 [ 6674.416232] RBP: ffffc90001fbbbc8 R08: 0000000000000001 R09: 0000000000000001 [ 6674.416233] R10: ffffc90001fbbac8 R11: 0000000000001000 R12: 0000000000000002 [ 6674.416234] R13: ffff880099b045c0 R14: 0000000000000004 R15: ffff88012bff2000 [ 6674.416235] FS: 0000000000000000(0000) GS:ffff88023f2c0000(0000) knlGS:0000000000000000 [ 6674.416235] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 6674.416236] CR2: 00007f28cf282000 CR3: 00000001000c6000 CR4: 00000000000006e0 [ 6674.416239] Call Trace: [ 6674.416259] __raid56_parity_recover+0xfc/0x16e [btrfs] [ 6674.416276] raid56_parity_recover+0x157/0x16b [btrfs] [ 6674.416293] btrfs_map_bio+0xe0/0x259 [btrfs] [ 6674.416310] btrfs_submit_bio_hook+0xbf/0x147 [btrfs] [ 6674.416327] end_bio_extent_readpage+0x27b/0x4a0 [btrfs] [ 6674.416331] bio_endio+0x17d/0x1b3 [ 6674.416346] end_workqueue_fn+0x3c/0x3f [btrfs] [ 6674.416362] btrfs_scrubparity_helper+0x1aa/0x3b8 [btrfs] [ 6674.416379] btrfs_endio_helper+0xe/0x10 [btrfs] [ 6674.416381] process_one_work+0x276/0x4b6 [ 6674.416384] worker_thread+0x1ac/0x266 [ 6674.416386] ? rescuer_thread+0x278/0x278 [ 6674.416387] kthread+0x106/0x10e [ 6674.416389] ? __list_del_entry+0x22/0x22 [ 6674.416391] ret_from_fork+0x27/0x40 [ 6674.416395] Code: 44 89 e2 be 00 10 00 00 ff 15 b0 ab ef ff eb 72 4d 89 e8 89 d9 44 89 e2 be 00 10 00 00 ff 15 a3 ab ef ff eb 5d 41 83 fc ff 74 02 <0f> 0b 49 63 97 [ 6674.416432] RIP: __raid_recover_end_io+0x1ac/0x370 [btrfs] RSP: ffffc90001fbbb90 [ 6674.416434] ---[ end trace 74d56ebe7489dd6a ]--- Signed-off-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/raid56.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 266530b34cb679188d5b2bd6e580b8105f4cb593 Author: Jeffy Chen Date: Wed Jul 12 14:18:32 2017 +0800 drm: Add missing field copy in compat_drm_version DRM_IOCTL_VERSION is supposed to update the name_len/date_len/desc_len fields to user. Fixes: 012c6741c6aa ("switch compat_drm_version() to drm_ioctl_kernel()") Signed-off-by: Jeffy Chen Reviewed-by: Daniel Vetter Signed-off-by: Linus Torvalds drivers/gpu/drm/drm_ioc32.c | 3 +++ 1 file changed, 3 insertions(+) commit b20dae70bfa5014fdf201d0a8589271b888e4927 Author: Colin Ian King Date: Thu Jul 13 18:51:15 2017 +0100 svcrdma: fix an incorrect check on -E2BIG and -EINVAL The current check will always be true and will always jump to err1, this looks dubious to me. I believe && should be used instead of ||. Detected by CoverityScan, CID#1450120 ("Logically Dead Code") Fixes: 107c1d0a991a ("svcrdma: Avoid Send Queue overflow") Signed-off-by: Colin Ian King Reviewed-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_sendto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d84120b5ba61912a5333f5fe2c4e8f35ef9514f Author: Rafał Miłecki Date: Sun Jun 25 13:11:54 2017 +0200 Documentation: ABI: mtd: describe "offset" more precisely So far Linux supported only two levels of MTD devices so we didn't need a very precise description for this sysfs file. With commit 97519dc52b44a ("mtd: partitions: add support for subpartitions") there is support for a tree structure so we should have more precise description. Using "parent" and "flash device" makes it more accurate. Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris Documentation/ABI/testing/sysfs-class-mtd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fdb254db21bb4aed44a0bc7fe993e58d3848c926 Author: David Howells Date: Tue Jul 11 16:22:59 2017 +0100 isofs: Fix isofs_show_options() The isofs patch needs a small fix to handle a signed/unsigned comparison that the compiler didn't flag - thanks to Dan for catching it. It should be noted, however, the session number handing appears to be incorrect between where it is parsed and where it is used. Signed-off-by: David Howells Signed-off-by: Al Viro fs/isofs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2683701201ddb9a2a4d0fda5d950ab50ca8e77e4 Author: Rolf Eike Beer Date: Thu Jul 13 16:46:43 2017 +0200 netlink: correctly document nla_put_u64_64bit() Signed-off-by: Rolf Eike Beer Signed-off-by: David S. Miller include/net/netlink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 803d5b6ebfb06a0d2ee3699fea4f1c7593958566 Author: Ganesh Goudar Date: Thu Jul 13 18:45:07 2017 +0530 cxgb4: add new T5 pci device id's Add 0x50a3 and 0x50a4 T5 device id's Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 2 ++ 1 file changed, 2 insertions(+) commit 5e349fc03cdd44c670aaf3affaa6f0426c5e553f Author: Colin Ian King Date: Thu Jul 13 12:22:24 2017 +0100 dccp: make const array error_code static Don't populate array error_code on the stack but make it static. Makes the object code smaller by almost 250 bytes: Before: text data bss dec hex filename 10366 983 0 11349 2c55 net/dccp/input.o After: text data bss dec hex filename 10161 1039 0 11200 2bc0 net/dccp/input.o Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/dccp/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf98bd0be1ba509c5e6d77524ffac192f1edb2dd Author: Colin Ian King Date: Tue Jul 11 12:47:33 2017 +0100 rt2x00: make const array glrt_table static Don't populate array glrt_table on the stack but make it static. Makes the object code a smaller by over 670 bytes: Before: text data bss dec hex filename 131772 4733 0 136505 21539 rt2800lib.o After: text data bss dec hex filename 131043 4789 0 135832 21298 rt2800lib.o Signed-off-by: Colin Ian King Acked-by: Stanislaw Gruszka Signed-off-by: David S. Miller drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f56ff774871d95f60c3f858419cf7424e6c361cf Author: Colin Ian King Date: Tue Jul 11 12:18:48 2017 +0100 net: stmmac: make const array route_possibilities static Don't populate array route_possibilities on the stack but make it static const. Makes the object code a little smaller by 85 bytes: Before: text data bss dec hex filename 9901 2448 0 12349 303d dwmac4_core.o After: text data bss dec hex filename 9760 2504 0 12264 2fe8 dwmac4_core.o Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22c608919bd4f0fae8e70e1284c83e0f1d507f34 Author: Colin Ian King Date: Tue Jul 11 11:52:23 2017 +0100 net: broadcom: bnx2x: make a couple of const arrays static Don't populate various tables on the stack but make them static const. Makes the object code smaller by nearly 200 bytes: Before: text data bss dec hex filename 113468 11200 0 124668 1e6fc bnx2x_ethtool.o After: text data bss dec hex filename 113129 11344 0 124473 1e639 bnx2x_ethtool.o Signed-off-by: Colin Ian King Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0db01097cabd97897d123b4c5d805d1a7b061d82 Author: Thomas Bogendoerfer Date: Thu Jul 13 10:57:40 2017 +0200 xgene: Don't fail probe, if there is no clk resource for SGMII interfaces This change fixes following problem [ 1.827940] xgene-enet: probe of 1f210030.ethernet failed with error -2 which leads to a missing ethernet interface (reproducable at least on Gigabyte MP30-AR0 and APM Mustang systems). The check for a valid clk resource fails, because DT doesn't provide a clock for sgenet1. But the driver doesn't use this clk, if the ethernet port is connected via SGMII. Therefore this patch avoids probing for clk on SGMII interfaces. Fixes: 9aea7779b764 ("drivers: net: xgene: Fix crash on DT systems") Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit e4a6a3424b75f23f6bb1cc479974fc305a4b9f78 Author: Kefeng Wang Date: Thu Jul 13 14:27:58 2017 +0800 bpf: fix return in bpf_skb_adjust_net The bpf_skb_adjust_net() ignores the return value of bpf_skb_net_shrink/grow, and always return 0, fix it by return 'ret'. Signed-off-by: Kefeng Wang Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efc479e6900c22bad9a2b649d13405ed9cde2d53 Author: Roman Kagan Date: Thu Jun 22 16:51:01 2017 +0300 kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2 There is a flaw in the Hyper-V SynIC implementation in KVM: when message page or event flags page is enabled by setting the corresponding msr, KVM zeroes it out. This is problematic because on migration the corresponding MSRs are loaded on the destination, so the content of those pages is lost. This went unnoticed so far because the only user of those pages was in-KVM hyperv synic timers, which could continue working despite that zeroing. Newer QEMU uses those pages for Hyper-V VMBus implementation, and zeroing them breaks the migration. Besides, in newer QEMU the content of those pages is fully managed by QEMU, so zeroing them is undesirable even when writing the MSRs from the guest side. To support this new scheme, introduce a new capability, KVM_CAP_HYPERV_SYNIC2, which, when enabled, makes sure that the synic pages aren't zeroed out in KVM. Signed-off-by: Roman Kagan Signed-off-by: Radim Krčmář Documentation/virtual/kvm/api.txt | 9 +++++++++ arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/hyperv.c | 13 +++++++++---- arch/x86/kvm/hyperv.h | 2 +- arch/x86/kvm/x86.c | 7 ++++++- include/uapi/linux/kvm.h | 1 + 6 files changed, 27 insertions(+), 6 deletions(-) commit a826faf108e2d855929342268e68c43ba667379a Author: Ladi Prosek Date: Mon Jun 26 09:56:43 2017 +0200 KVM: x86: make backwards_tsc_observed a per-VM variable The backwards_tsc_observed global introduced in commit 16a9602 is never reset to false. If a VM happens to be running while the host is suspended (a common source of the TSC jumping backwards), master clock will never be enabled again for any VM. In contrast, if no VM is running while the host is suspended, master clock is unaffected. This is inconsistent and unnecessarily strict. Let's track the backwards_tsc_observed variable separately and let each VM start with a clean slate. Real world impact: My Windows VMs get slower after my laptop undergoes a suspend/resume cycle. The only way to get the perf back is unloading and reloading the kvm module. Signed-off-by: Ladi Prosek Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) commit 4cf56a89c696e66d10612b43b7e95852611e76c2 Author: Dmitry Torokhov Date: Tue Jul 11 10:02:18 2017 -0700 HID: multitouch: do not blindly set EV_KEY or EV_ABS bits Now that input core insists on having dev->absinfo when device claims to generate EV_ABS in its dev->evbit, we should not be blindly setting that bit. The code in question might have been needed before input_set_abs_params() started setting EV_ABS in device's evbit, but not anymore, and is now breaking devices such as SMART SPNL-6075 Touchscreen. Fixes: 6ecfe51b4082 ("Input: refuse to register absolute devices ...") Reported-by: Matthias Fend Tested-by: Matthias Fend Cc: stable@vger.kernel.org Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 768516894fb2a0addee6b802af0f8789c0b4c322 Author: Kefeng Wang Date: Thu Jul 13 19:20:44 2017 +0800 nbd: kill unused ret in recv_work No need to return value in queue work, kill ret variable. Signed-off-by: Kefeng Wang Signed-off-by: Jens Axboe drivers/block/nbd.c | 2 -- 1 file changed, 2 deletions(-) commit 4d9bcaddacf23861c5ee088b0c03e7034c3d59d6 Author: Ernesto A. Fernández Date: Fri Jun 23 21:37:21 2017 -0300 ext2: Fix memory leak when truncate races ext2_get_blocks Buffer heads referencing indirect blocks may not be released if the file is truncated at the right time. This happens because ext2_get_branch() returns NULL when it finds the whole chain of indirect blocks already set, and when truncate alters the chain this value of NULL is treated as the address of the last head to be released. Handle this in the same way as it's done after the got_it label. Signed-off-by: Ernesto A. Fernández Signed-off-by: Jan Kara fs/ext2/inode.c | 1 + 1 file changed, 1 insertion(+) commit 9c284c41c0886f09e75c323a16278b6d353b0b4a Author: Chris Brandt Date: Wed Jul 12 08:40:01 2017 -0700 mmc: tmio-mmc: fix bad pointer math The existing code gives an incorrect pointer value. The buffer pointer 'buf' was of type unsigned short *, and 'count' was a number in bytes. A cast of buf should have been used. However, instead of casting, just change the code to use u32 pointers. Reported-by: Dan Carpenter Fixes: 8185e51f358a: ("mmc: tmio-mmc: add support for 32bit data port") Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Acked-by: Wolfram Sang Cc: Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 69f0d429c413fe96db2c187475cebcc6e3a8c7f5 Author: Alex Shi Date: Thu Jul 13 14:18:24 2017 +0800 locking/rtmutex: Remove unnecessary priority adjustment We don't need to adjust priority before adding a new pi_waiter, the priority only needs to be updated after pi_waiter change or task priority change. Steven Rostedt pointed out: "Interesting, I did some git mining and this was added with the original entry of the rtmutex.c (23f78d4a03c5). Looking at even that version, I don't see the purpose of adjusting the task prio here. It is done before anything changes in the task." Signed-off-by: Alex Shi Reviewed-by: Steven Rostedt (VMware) Acked-by: Peter Zijlstra (Intel) Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Sebastian Siewior Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1499926704-28841-1-git-send-email-alex.shi@linaro.org [ Enhance the changelog. ] Signed-off-by: Ingo Molnar kernel/locking/rtmutex.c | 1 - 1 file changed, 1 deletion(-) commit bbdc74dc19e09ac4e71bfb219596b3d5bc786720 Author: Grzegorz Sluja Date: Thu Jul 13 11:17:58 2017 +0200 mmc: block: Prevent new req entering queue after its cleanup The commit 304419d8a7e9 ("mmc: core: Allocate per-request data using the block layer core"), refactored the mechanism of queue handling, but also made mmc_init_request() to be called after mmc_cleanup_queue(). This triggers a null pointer dereference: [ 683.123791] BUG: unable to handle kernel NULL pointer dereference at (null) [ 683.123801] IP: mmc_init_request+0x2c/0xf0 [mmc_block] ... [ 683.123905] Call Trace: [ 683.123913] alloc_request_size+0x4f/0x70 [ 683.123919] mempool_alloc+0x5f/0x150 [ 683.123925] ? __enqueue_entity+0x6c/0x70 [ 683.123928] get_request+0x3ad/0x720 [ 683.123933] ? prepare_to_wait_event+0x110/0x110 [ 683.123937] blk_queue_bio+0xc1/0x3a0 [ 683.123940] generic_make_request+0xf8/0x2a0 [ 683.123942] submit_bio+0x75/0x150 [ 683.123947] submit_bio_wait+0x51/0x70 [ 683.123951] blkdev_issue_flush+0x5c/0x90 [ 683.123956] ext4_sync_fs+0x171/0x1b0 [ 683.123961] sync_filesystem+0x73/0x90 [ 683.123965] fsync_bdev+0x24/0x50 [ 683.123971] invalidate_partition+0x24/0x50 [ 683.123973] del_gendisk+0xb2/0x2a0 [ 683.123977] mmc_blk_remove_req.part.38+0x71/0xa0 [mmc_block] [ 683.123980] mmc_blk_remove+0xba/0x190 [mmc_block] [ 683.123990] mmc_bus_remove+0x1a/0x20 [mmc_core] [ 683.123995] device_release_driver_internal+0x141/0x200 [ 683.123999] device_release_driver+0x12/0x20 [ 683.124001] bus_remove_device+0xfd/0x170 [ 683.124004] device_del+0x1e8/0x330 [ 683.124012] mmc_remove_card+0x60/0xc0 [mmc_core] [ 683.124019] mmc_remove+0x19/0x30 [mmc_core] [ 683.124025] mmc_stop_host+0xfb/0x1a0 [mmc_core] [ 683.124032] mmc_remove_host+0x1a/0x40 [mmc_core] [ 683.124037] sdhci_remove_host+0x2e/0x1c0 [mmc_sdhci] [ 683.124042] sdhci_pci_remove_slot+0x3f/0x80 [sdhci_pci] [ 683.124045] sdhci_pci_remove+0x39/0x70 [sdhci_pci] [ 683.124049] pci_device_remove+0x39/0xc0 [ 683.124052] device_release_driver_internal+0x141/0x200 [ 683.124056] driver_detach+0x3f/0x80 [ 683.124059] bus_remove_driver+0x55/0xd0 [ 683.124062] driver_unregister+0x2c/0x50 [ 683.124065] pci_unregister_driver+0x29/0x90 [ 683.124069] sdhci_driver_exit+0x10/0x4f3 [sdhci_pci] [ 683.124073] SyS_delete_module+0x171/0x250 [ 683.124078] entry_SYSCALL_64_fastpath+0x1e/0xa9 Fix this by setting the queue DYING flag before cleanup the queue, as it prevents new reqs from entering the queue. Signed-off-by: Grzegorz Sluja Signed-off-by: Linus Walleij Fixes: 304419d8a7e9 ("mmc: core: Allocate per-request data using the...") [Ulf: Updated the changelog] Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 1 + 1 file changed, 1 insertion(+) commit fc5d7e5bf4180eaaa4202659c2c9c3010d7490b6 Merge: 6a8a75f 4b1303d Author: Ingo Molnar Date: Thu Jul 13 11:35:48 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.13-20170712' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fix from Arnaldo Carvalho de Melo: - Accept zero as the kernel base address, to resolve symbols on architectures that don't partition the virtual address space in kernel/user, S/390, is one of such architectures and was where this problem was noticed. (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 97ca7bfc19605bc08e9183441b8b8545e84032d6 Author: Christian Borntraeger Date: Thu Jul 6 10:12:58 2017 +0200 s390/mm: set change and reference bit on lazy key enablement When we enable storage keys for a guest lazily, we reset the ACC and F values. That is correct assuming that these are 0 on a clear reset and the guest obviously has not used any key setting instruction. We also zero out the change and reference bit. This is not correct as the architecture prefers over-indication instead of under-indication for the keyless->keyed transition. This patch fixes the behaviour and always sets guest change and guest reference for all guest storage keys on the keyless -> keyed switch. Signed-off-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Signed-off-by: Martin Schwidefsky arch/s390/mm/pgtable.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2daace78a8c94e2cd20164b8efc18171c56e92ec Author: Dong Jia Shi Date: Thu Jul 6 04:00:45 2017 +0200 s390: chp: handle CRW_ERC_INIT for channel-path status change When channel path is identified as the report source code (RSC) of a CRW, and initialized (CRW_ERC_INIT) is recognized as the error recovery code (ERC) by the channel subsystem, it indicates a "path has come" event. Let's handle this case in chp_process_crw(). Reviewed-by: Sebastian Ott Signed-off-by: Dong Jia Shi Signed-off-by: Martin Schwidefsky drivers/s390/cio/chp.c | 1 + 1 file changed, 1 insertion(+) commit b855629b9a4107c37999723c09cc9fd357b53caf Author: Christian Borntraeger Date: Thu Jul 6 14:08:25 2017 +0200 s390/perf: fix problem state detection The P sample bit indicates problem state and not PER. Fixes: commit a752598254 ("s390: rename struct psw_bits members") Cc: Heiko Carstens Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_sf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6194923237f3952b955c343b65b211f36bce01c Author: Steffen Klassert Date: Thu Jul 13 09:13:30 2017 +0200 esp: Fix memleaks on error paths. We leak the temporary allocated resources in error paths, fix this by freeing them. Fixes: fca11ebde3f ("esp4: Reorganize esp_output") Fixes: 383d0350f2c ("esp6: Reorganize esp_output") Fixes: 3f29770723f ("ipsec: check return value of skb_to_sgvec always") Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 13 ++++++++----- net/ipv6/esp6.c | 9 +++++---- 2 files changed, 13 insertions(+), 9 deletions(-) commit 3c48d86cc959309ee168fb87737a8cb3f97c5224 Author: Bjorn Andersson Date: Wed Jul 12 15:04:16 2017 -0700 clk: Provide bulk prepare_enable disable_unprepare variants This extends the existing set of bulk helpers with prepare_enable and disable_unprepare variants. Cc: Russell King , Cc: Dong Aisheng Signed-off-by: Bjorn Andersson Signed-off-by: Stephen Boyd include/linux/clk.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 6419ec78c6726aa54ff103aceffbf19d546d3d1b Merge: 0355e22 564d8a2 Author: Dave Airlie Date: Thu Jul 13 13:38:22 2017 +1000 Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next single r700 fix. * 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: Fix eDP for single-display iMac10,1 (v2) commit 4ca6df134847a6349620b485a3e63f00fb3bfad8 Merge: edaf382 2fd1d2c Author: Linus Torvalds Date: Wed Jul 12 19:43:20 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull sysctl fix from Eric Biederman: "A rather embarassing and hard to hit bug was merged into 4.11-rc1. Andrei Vagin tracked this bug now and after some staring at the code I came up with a fix" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: proc: Fix proc_sys_prune_dcache to hold a sb reference commit edaf3825182958a1fd5e39708fcb6ea48eca2060 Merge: bd664f6 d93b07f Author: Linus Torvalds Date: Wed Jul 12 19:30:57 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix 64-bit division in mlx5 IPSEC offload support, from Ilan Tayari and Arnd Bergmann. 2) Fix race in statistics gathering in bnxt_en driver, from Michael Chan. 3) Can't use a mutex in RCU reader protected section on tap driver, from Cong WANG. 4) Fix mdb leak in bridging code, from Eduardo Valentin. 5) Fix free of wrong pointer variable in nfp driver, from Dan Carpenter. 6) Buffer overflow in brcmfmac driver, from Arend van SPriel. 7) ioremap_nocache() return value needs to be checked in smsc911x driver, from Alexey Khoroshilov. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits) net: stmmac: revert "support future possible different internal phy mode" sfc: don't read beyond unicast address list datagram: fix kernel-doc comments socket: add documentation for missing elements smsc911x: Add check for ioremap_nocache() return code brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx() net: hns: Bugfix for Tx timeout handling in hns driver net: ipmr: ipmr_get_table() returns NULL nfp: freeing the wrong variable mlxsw: spectrum_switchdev: Check status of memory allocation mlxsw: spectrum_switchdev: Remove unused variable mlxsw: spectrum_router: Fix use-after-free in route replace mlxsw: spectrum_router: Add missing rollback samples/bpf: fix a build issue bridge: mdb: fix leak on complete_info ptr on fail path tap: convert a mutex to a spinlock cxgb4: fix BUG() on interrupt deallocating path of ULD qed: Fix printk option passed when printing ipv6 addresses net: Fix minor code bug in timestamping.txt net: stmmac: Make 'alloc_dma_[rt]x_desc_resources()' look even closer ... commit bd664f6b3e376a8ef4990f87d08271cc2d01ba9a Author: Linus Torvalds Date: Wed Jul 12 19:25:47 2017 -0700 disable new gcc-7.1.1 warnings for now I made the mistake of upgrading my desktop to the new Fedora 26 that comes with gcc-7.1.1. There's nothing wrong per se that I've noticed, but I now have 1500 lines of warnings, mostly from the new format-truncation warning triggering all over the tree. We use 'snprintf()' and friends in a lot of places, and often know that the numbers are fairly small (ie a controller index or similar), but gcc doesn't know that, and sees an 'int', and thinks that it could be some huge number. And then complains when our buffers are not able to fit the name for the ten millionth controller. These warnings aren't necessarily bad per se, and we probably want to look through them subsystem by subsystem, but at least during the merge window they just mean that I can't even see if somebody is introducing any *real* problems when I pull. So warnings disabled for now. Signed-off-by: Linus Torvalds Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 0355e22a4b4a36d982178ecea2676ee9e480b20f Merge: caa164e 6f6e0b2 Author: Dave Airlie Date: Thu Jul 13 11:22:34 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-07-10' of git://anongit.freedesktop.org/git/drm-misc into drm-next Core Changes: - Fix empty timestamps on hw without vlbank counter (Laurent) - Clear atomic state before retrying ww/mutex acquisition in remove_fb (Maarten) Driver Changes: - rockchip: Fix incorrect NULL pointer check after allocation (Gustavo) Cc: Gustavo A. R. Silva Cc: Maarten Lankhorst Cc: Laurent Pinchart * tag 'drm-misc-next-fixes-2017-07-10' of git://anongit.freedesktop.org/git/drm-misc: drm/rockchip: fix NULL check on devm_kzalloc() return value drm/atomic: Add missing drm_atomic_state_clear to atomic_remove_fb drm: vblank: Fix vblank timestamp update DRM: Fix an incorrectly formatted table bridge: Fix panel-bridge error return on !panel. drm/rockchip: gem: add the lacks lock and trivial changes commit caa164e37374609056c4d25255a6c7bef7a7f43b Merge: 39bf0bf eafbc20 Author: Dave Airlie Date: Thu Jul 13 11:21:16 2017 +1000 Merge tag 'drm-intel-next-fixes-2017-07-11' of git://anongit.freedesktop.org/git/drm-intel into drm-next drm/i915 fixes for v4.13-rc1 * tag 'drm-intel-next-fixes-2017-07-11' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Make DP-MST connector info work drm/i915/gvt: Use fence error from GVT request for workload status drm/i915/gvt: remove scheduler_mutex in per-engine workload_thread drm/i915/gvt: Revert "drm/i915/gvt: Fix possible recursive locking issue" drm/i915/gvt: Audit the command buffer address drm/i915/gvt: Fix a memory leak in intel_gvt_init_gtt() drm/i915/fbdev: Check for existence of ifbdev->vma before operations drm/i915: Hold RPM wakelock while initializing OA buffer drm/i915/cnl: Fix the CURSOR_COEFF_MASK used in DDI Vswing Programming drm/i915/cfl: Fix Workarounds. drm/i915: Avoid undefined behaviour of "u32 >> 32" drm/i915: reintroduce VLV/CHV PFI programming power domain workaround drm/i915: Fix an error checking test drm/i915: Disable MSI for all pre-gen5 drm/i915/gvt: Make function dpy_reg_mmio_readx safe drm/i915/gvt: Don't read ADPA_CRT_HOTPLUG_MONITOR from host drm/i915/gvt: Set initial PORT_CLK_SEL vreg for BDW drm/i915/gvt: Fix inconsistent locks holding sequence drm/i915/gvt: Fix possible recursive locking issue commit 39bf0bff4f179f109305433f83bdea5d1ca350ea Merge: 00fc2c2 5ac5895 Author: Dave Airlie Date: Thu Jul 13 11:00:20 2017 +1000 Merge branch 'mediatek-drm-next-4.13' of https://github.com/ckhu-mediatek/linux.git-tags into drm-next This include new color format support and some fixups. * 'mediatek-drm-next-4.13' of https://github.com/ckhu-mediatek/linux.git-tags: drm/mediatek: separate color module to fixup error memory reallocation drm/mediatek: check for memory allocation failure drm/mediatek: re-phrase DRM_INFO error message drm/mediatek: use platform_register_drivers drm/mediatek: Support UYVY and YUYV format for overlay commit 3a75ad1457d9cd84bc17d5b9cffb4d73b52be20b Merge: 235b84f 96b5b19 Author: Linus Torvalds Date: Wed Jul 12 17:22:01 2017 -0700 Merge tag 'modules-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull modules updates from Jessica Yu: "Summary of modules changes for the 4.13 merge window: - Minor code cleanups - Avoid accessing mod struct prior to checking module struct version, from Kees - Fix racy atomic inc/dec logic of kmod_concurrent_max in kmod, from Luis" * tag 'modules-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: make the modinfo name const kmod: reduce atomic operations on kmod_concurrent and simplify module: use list_for_each_entry_rcu() on find_module_all() kernel/module.c: suppress warning about unused nowarn variable module: Add module name to modinfo module: Pass struct load_info into symbol checks commit c7b5a4e6e8fbef8fdf2c529f953000d24c561339 Author: Rafael J. Wysocki Date: Thu Jul 6 02:32:02 2017 +0200 PCI / PM: Fix native PME handling during system suspend/resume Commit 76cde7e49590 (PCI / PM: Make PCIe PME interrupts wake up from suspend-to-idle) went too far with preventing pcie_pme_work_fn() from clearing the root port's PME Status and re-enabling the PME interrupt which should be done for PMEs to work correctly after system resume. The failing scenario is as follows: 1. pcie_pme_suspend() finds that the PME IRQ should be designated for system wakeup, so it calls enable_irq_wake() and then sets data->suspend_level to PME_SUSPEND_WAKEUP. 2. PME interrupt happens at this point. 3. pcie_pme_irq() runs, disables the PME interrupt and queues up the execution of pcie_pme_work_fn(). 4. pcie_pme_work_fn() runs before pcie_pme_resume() and breaks out of the loop right away, because data->suspend_level is not PME_SUSPEND_NONE, and it doesn't re-enable the PME interrupt for the same reason. 5. pcie_pme_resume() runs and simply calls disable_irq_wake() without re-enabling the PME interrupt (because data->suspend_level is not PME_SUSPEND_NONE), so the PME interrupt remains disabled and the PME Status remains set. To fix this notice that there is no reason why pcie_pme_work_fn() should behave in a special way during system resume if the PME interrupt is not disabled by pcie_pme_suspend() and partially revert commit 76cde7e49590 and restore the previous (and correct) behavior of pcie_pme_work_fn(). Fixes: 76cde7e49590 (PCI / PM: Make PCIe PME interrupts wake up from suspend-to-idle) Reported-and-tested-by: Naresh Solanki Signed-off-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas drivers/pci/pcie/pme.c | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit 3e8f399da490e6ac20a3cfd6aa404c9aa961a9a2 Author: Nikolay Borisov Date: Wed Jul 12 14:37:51 2017 -0700 writeback: rework wb_[dec|inc]_stat family of functions Currently the writeback statistics code uses a percpu counters to hold various statistics. Furthermore we have 2 families of functions - those which disable local irq and those which doesn't and whose names begin with double underscore. However, they both end up calling __add_wb_stats which in turn calls percpu_counter_add_batch which is already irq-safe. Exploiting this fact allows to eliminated the __wb_* functions since they don't add any further protection than we already have. Furthermore, refactor the wb_* function to call __add_wb_stat directly without the irq-disabling dance. This will likely result in better runtime of code which deals with modifying the stat counters. While at it also document why percpu_counter_add_batch is in fact preempt and irq-safe since at least 3 people got confused. Link: http://lkml.kernel.org/r/1498029937-27293-1-git-send-email-nborisov@suse.com Signed-off-by: Nikolay Borisov Acked-by: Tejun Heo Reviewed-by: Jan Kara Cc: Josef Bacik Cc: Mel Gorman Cc: Jeff Layton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fs-writeback.c | 8 ++++---- include/linux/backing-dev.h | 24 ++---------------------- lib/percpu_counter.c | 7 +++++++ mm/page-writeback.c | 10 +++++----- 4 files changed, 18 insertions(+), 31 deletions(-) commit c945dccc80856107f109c36a7d0e29a371b5d1b5 Author: Joe Perches Date: Wed Jul 12 14:37:48 2017 -0700 ARM: samsung: usb-ohci: move inline before return type Make the code like the rest of the kernel. Link: http://lkml.kernel.org/r/667a515b8d0f10f2465d519f8595edd91552fc5e.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/platform_data/usb-ohci-s3c2410.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba168a46b0b9e06f38f63ef9adf182950c82d6e0 Author: Joe Perches Date: Wed Jul 12 14:37:46 2017 -0700 video: fbdev: omap: move inline before return type Make the code like the rest of the kernel. Link: http://lkml.kernel.org/r/bc5927726abc70d7c066df7ab4cb7cfce4a7b577.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Tomi Valkeinen Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/video/fbdev/omap/lcdc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dce3944717523bfe65e2b3cbd1d3af0ccc27ace9 Author: Joe Perches Date: Wed Jul 12 14:37:43 2017 -0700 video: fbdev: intelfb: move inline before return type Make the code like the rest of the kernel. But there is an oddity here because the inline should probably be removed. It's an extern function in intelfb.h and it is used in intelfbdrv.c and intelfbhw.c. The inline is kept here as I suppose it's possible for some compiler to make the uses inline in intelfbdrv and and also create an external function for intelfbhw. Link: http://lkml.kernel.org/r/8ba151a1fdc84e42cbf4aafc798513c0158edee1.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Maik Broemme Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/video/fbdev/intelfb/intelfbdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4abf87f41a6cedf7a780af63991d6bebec303be0 Author: Joe Perches Date: Wed Jul 12 14:37:40 2017 -0700 USB: serial: safe_serial: move __inline__ before return type Make the code like the rest of the kernel. Also use inline instead of __inline__. Link: http://lkml.kernel.org/r/a5072b74b6c293e6ec93c4900482e9d3267f15b2.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Johan Hovold Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/usb/serial/safe_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9e5bfdb9d786efbc6995edfe6902788527457ad Author: Joe Perches Date: Wed Jul 12 14:37:37 2017 -0700 drivers: tty: serial: move inline before return type Make the code like the rest of the kernel. Link: http://lkml.kernel.org/r/55d3e89d50bb03d603bfb28019fab07f48bdc714.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Pat Gefre Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/tty/serial/ioc3_serial.c | 4 ++-- drivers/tty/serial/ioc4_serial.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit e0710e510c59602e4fa80d784c946e02e8968523 Author: Joe Perches Date: Wed Jul 12 14:37:34 2017 -0700 drivers: s390: move static and inline before return type Make the code like the rest of the kernel. Link: http://lkml.kernel.org/r/3f980cd89084ae09716353aba3171e4b3815e690.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Julian Wiedmann Cc: Ursula Braun Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/s390/net/ctcm_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0825f49f225bd24c3ae46ff2bb716067e3684fc3 Author: Joe Perches Date: Wed Jul 12 14:37:31 2017 -0700 x86/efi: move asmlinkage before return type Make the code like the rest of the kernel. Link: http://lkml.kernel.org/r/1cd3d401626e51ea0e2333a860e76e80bc560a4c.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Matt Fleming Cc: Ard Biesheuvel Cc: Thomas Gleixner Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/efi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0cef25c1d89fb617683fc76645bb27ab297f2a1e Author: Joe Perches Date: Wed Jul 12 14:37:28 2017 -0700 sh: move inline before return type Make the code like the rest of the kernel. Link: http://lkml.kernel.org/r/f81bb2a67a97b1fd8b6ea99bd350d8a0f6864fb1.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/mm/cache-sh5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b745fcb949f90762e7e126737683e2a26a4e8035 Author: Joe Perches Date: Wed Jul 12 14:37:25 2017 -0700 MIPS: SMP: move asmlinkage before return type Make the code like the rest of the kernel. Link: http://lkml.kernel.org/r/756d3fb543e981b9284e756fa27616725a354b28.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/include/asm/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d8a9ae2818fa44099195146a7fa85963409a2e9 Author: Joe Perches Date: Wed Jul 12 14:37:22 2017 -0700 m68k: coldfire: move inline before return type Make the code like the rest of the kernel. Link: http://lkml.kernel.org/r/14db9c166d5b68efa77e337cfe49bb9b29bca3f7.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Acked-by: Greg Ungerer Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m68k/coldfire/intc-simr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c02f2a911f2bb833f982d869e3a4ae67e1468969 Author: Joe Perches Date: Wed Jul 12 14:37:19 2017 -0700 ia64: sn: pci: move inline before type Make the use of inline like the rest of the kernel. Link: http://lkml.kernel.org/r/f42b2202bd0d4e7ccf79ce5348bb255a035e67bb.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Tony Luck Cc: Fenghua Yu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/sn/pci/pcibr/pcibr_ate.c | 2 +- arch/ia64/sn/pci/tioce_provider.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit d778931d7b32ada39de0a45267b0c4af0600e277 Author: Joe Perches Date: Wed Jul 12 14:37:16 2017 -0700 ia64: move inline before return type Make the use of inline like the rest of the kernel. Link: http://lkml.kernel.org/r/d47074493af80ce12590340294bc49618165c30d.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Tony Luck Cc: Fenghua Yu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/kernel/mca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d731bb77247b9456680f379c31c30f9774473ce Author: Joe Perches Date: Wed Jul 12 14:37:13 2017 -0700 FRV: tlbflush: move asmlinkage before return type Make the use of asmlinkage like the rest of the kernel. Link: http://lkml.kernel.org/r/efb2dfed4d9315bf68ec0334c81b65af176a0174.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/include/asm/tlbflush.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8d95a3dca060b09ddafa4cd1c82f27ab19490fad Author: Joe Perches Date: Wed Jul 12 14:37:10 2017 -0700 CRIS: gpio: move inline before return type Move inline to be like the rest of the kernel. Link: http://lkml.kernel.org/r/6bf1bec049897c4158f698b866810f47c728f233.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Mikael Starvik Cc: Jesper Nilsson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/cris/arch-v10/drivers/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e90d0ed327a289c6fee4f36b25f67d3d7864a43 Author: Joe Perches Date: Wed Jul 12 14:37:08 2017 -0700 ARM: HP Jornada 7XX: move inline before return type Convert 'u8 inline' to 'inline u8' to be the same style used by the rest of the kernel. Miscellanea: jornada_ssp_reverse is an odd function. It is declared inline but is also EXPORT_SYMBOL. It is also apparently only used by jornada720_ssp.c Likely the EXPORT_SYMBOL could be removed and the function converted to static. The addition of static and removal of EXPORT_SYMBOL was not done. Link: http://lkml.kernel.org/r/5bd3b2bf39c6c9caf773949f18158f8f5ec08582.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mach-sa1100/jornada720_ssp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ead9fba6b8e9a81107807f5a221576cb01206a6e Author: Joe Perches Date: Wed Jul 12 14:37:05 2017 -0700 ARM: KVM: move asmlinkage before type asmlinkage is either 'extern "C"' or blank. Move the uses of asmlinkage before the return types to be similar to the rest of the kernel. Link: http://lkml.kernel.org/r/005b8e120650c6a13b541e420f4e3605603fe9e6.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Cc: Christoffer Dall Cc: Marc Zyngier Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/kvm_hyp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 596ed45b5b5b7e4624c813ddeffe0e100f8b13ba Author: Joe Perches Date: Wed Jul 12 14:37:02 2017 -0700 checkpatch: improve the STORAGE_CLASS test Make sure static, extern, and asmlinkage appear before a specific type. e.g.: int asmlinkage foo(void) is better written asmlinkage int foo(void) Link: http://lkml.kernel.org/r/31704c96df2d5fd9df0b41165940a7a4feb16a63.1499284835.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 0f55685627d6dd2beda55a82abc02297f0f8e5c2 Author: Michal Hocko Date: Wed Jul 12 14:36:58 2017 -0700 mm, migration: do not trigger OOM killer when migrating memory Page migration (for memory hotplug, soft_offline_page or mbind) needs to allocate a new memory. This can trigger an oom killer if the target memory is depleated. Although quite unlikely, still possible, especially for the memory hotplug (offlining of memoery). Up to now we didn't really have reasonable means to back off. __GFP_NORETRY can fail just too easily and __GFP_THISNODE sticks to a single node and that is not suitable for all callers. But now that we have __GFP_RETRY_MAYFAIL we should use it. It is preferable to fail the migration than disrupt the system by killing some processes. Link: http://lkml.kernel.org/r/20170623085345.11304-7-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Alex Belits Cc: Chris Wilson Cc: Christoph Hellwig Cc: Darrick J. Wong Cc: David Daney Cc: Johannes Weiner Cc: Mel Gorman Cc: NeilBrown Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 2 +- mm/mempolicy.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit dbb329561ae9ccfb942b6ba330030a4654e8908e Author: Michal Hocko Date: Wed Jul 12 14:36:55 2017 -0700 drm/i915: use __GFP_RETRY_MAYFAIL Commit 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") has tried to remove disruptive OOM killer because the userspace should be able to cope with allocation failures. At the time only __GFP_NORETRY could achieve that and it turned out that this would fail the allocations just too easily. So "drm/i915: Remove __GFP_NORETRY from our buffer allocator" removed it and hoped for a better solution. __GFP_RETRY_MAYFAIL is that solution. It will keep retrying the allocation until there is no more progress and we would go OOM. Instead we fail the allocation and let the caller to deal with it. Link: http://lkml.kernel.org/r/20170623085345.11304-6-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Chris Wilson Cc: Alex Belits Cc: Christoph Hellwig Cc: Darrick J. Wong Cc: David Daney Cc: Johannes Weiner Cc: Mel Gorman Cc: NeilBrown Cc: Ralf Baechle Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/i915/i915_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cc965a29db172c28e25b9742db86a85766a08bf5 Author: Michal Hocko Date: Wed Jul 12 14:36:52 2017 -0700 mm: kvmalloc support __GFP_RETRY_MAYFAIL for all sizes Now that __GFP_RETRY_MAYFAIL has a reasonable semantic regardless of the request size we can drop the hackish implementation for !costly orders. __GFP_RETRY_MAYFAIL retries as long as the reclaim makes a forward progress and backs of when we are out of memory for the requested size. Therefore we do not need to enforce__GFP_NORETRY for !costly orders just to silent the oom killer anymore. Link: http://lkml.kernel.org/r/20170623085345.11304-5-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Alex Belits Cc: Chris Wilson Cc: Christoph Hellwig Cc: Darrick J. Wong Cc: David Daney Cc: Johannes Weiner Cc: Mel Gorman Cc: NeilBrown Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/util.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 91c63ecda75d3004da8ffd5d2590383e0ba47722 Author: Michal Hocko Date: Wed Jul 12 14:36:49 2017 -0700 xfs: map KM_MAYFAIL to __GFP_RETRY_MAYFAIL KM_MAYFAIL didn't have any suitable GFP_FOO counterpart until recently so it relied on the default page allocator behavior for the given set of flags. This means that small allocations actually never failed. Now that we have __GFP_RETRY_MAYFAIL flag which works independently on the allocation request size we can map KM_MAYFAIL to it. The allocator will try as hard as it can to fulfill the request but fails eventually if the progress cannot be made. It does so without triggering the OOM killer which can be seen as an improvement because KM_MAYFAIL users should be able to deal with allocation failures. Link: http://lkml.kernel.org/r/20170623085345.11304-4-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Darrick J. Wong Cc: Christoph Hellwig Cc: Alex Belits Cc: Chris Wilson Cc: David Daney Cc: Johannes Weiner Cc: Mel Gorman Cc: NeilBrown Cc: Ralf Baechle Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/xfs/kmem.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit dcda9b04713c3f6ff0875652924844fae28286ea Author: Michal Hocko Date: Wed Jul 12 14:36:45 2017 -0700 mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic __GFP_REPEAT was designed to allow retry-but-eventually-fail semantic to the page allocator. This has been true but only for allocations requests larger than PAGE_ALLOC_COSTLY_ORDER. It has been always ignored for smaller sizes. This is a bit unfortunate because there is no way to express the same semantic for those requests and they are considered too important to fail so they might end up looping in the page allocator for ever, similarly to GFP_NOFAIL requests. Now that the whole tree has been cleaned up and accidental or misled usage of __GFP_REPEAT flag has been removed for !costly requests we can give the original flag a better name and more importantly a more useful semantic. Let's rename it to __GFP_RETRY_MAYFAIL which tells the user that the allocator would try really hard but there is no promise of a success. This will work independent of the order and overrides the default allocator behavior. Page allocator users have several levels of guarantee vs. cost options (take GFP_KERNEL as an example) - GFP_KERNEL & ~__GFP_RECLAIM - optimistic allocation without _any_ attempt to free memory at all. The most light weight mode which even doesn't kick the background reclaim. Should be used carefully because it might deplete the memory and the next user might hit the more aggressive reclaim - GFP_KERNEL & ~__GFP_DIRECT_RECLAIM (or GFP_NOWAIT)- optimistic allocation without any attempt to free memory from the current context but can wake kswapd to reclaim memory if the zone is below the low watermark. Can be used from either atomic contexts or when the request is a performance optimization and there is another fallback for a slow path. - (GFP_KERNEL|__GFP_HIGH) & ~__GFP_DIRECT_RECLAIM (aka GFP_ATOMIC) - non sleeping allocation with an expensive fallback so it can access some portion of memory reserves. Usually used from interrupt/bh context with an expensive slow path fallback. - GFP_KERNEL - both background and direct reclaim are allowed and the _default_ page allocator behavior is used. That means that !costly allocation requests are basically nofail but there is no guarantee of that behavior so failures have to be checked properly by callers (e.g. OOM killer victim is allowed to fail currently). - GFP_KERNEL | __GFP_NORETRY - overrides the default allocator behavior and all allocation requests fail early rather than cause disruptive reclaim (one round of reclaim in this implementation). The OOM killer is not invoked. - GFP_KERNEL | __GFP_RETRY_MAYFAIL - overrides the default allocator behavior and all allocation requests try really hard. The request will fail if the reclaim cannot make any progress. The OOM killer won't be triggered. - GFP_KERNEL | __GFP_NOFAIL - overrides the default allocator behavior and all allocation requests will loop endlessly until they succeed. This might be really dangerous especially for larger orders. Existing users of __GFP_REPEAT are changed to __GFP_RETRY_MAYFAIL because they already had their semantic. No new users are added. __alloc_pages_slowpath is changed to bail out for __GFP_RETRY_MAYFAIL if there is no progress and we have already passed the OOM point. This means that all the reclaim opportunities have been exhausted except the most disruptive one (the OOM killer) and a user defined fallback behavior is more sensible than keep retrying in the page allocator. [akpm@linux-foundation.org: fix arch/sparc/kernel/mdesc.c] [mhocko@suse.com: semantic fix] Link: http://lkml.kernel.org/r/20170626123847.GM11534@dhcp22.suse.cz [mhocko@kernel.org: address other thing spotted by Vlastimil] Link: http://lkml.kernel.org/r/20170626124233.GN11534@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20170623085345.11304-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Alex Belits Cc: Chris Wilson Cc: Christoph Hellwig Cc: Darrick J. Wong Cc: David Daney Cc: Johannes Weiner Cc: Mel Gorman Cc: NeilBrown Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/DMA-ISA-LPC.txt | 2 +- arch/powerpc/include/asm/book3s/64/pgalloc.h | 2 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +- arch/sparc/kernel/mdesc.c | 2 +- drivers/mmc/host/wbsd.c | 2 +- drivers/s390/char/vmcp.c | 2 +- drivers/target/target_core_transport.c | 2 +- drivers/vhost/net.c | 2 +- drivers/vhost/scsi.c | 2 +- drivers/vhost/vsock.c | 2 +- include/linux/gfp.h | 56 +++++++++++++++++++++------- include/linux/slab.h | 3 +- include/trace/events/mmflags.h | 2 +- mm/hugetlb.c | 4 +- mm/internal.h | 2 +- mm/page_alloc.c | 14 +++++-- mm/sparse-vmemmap.c | 4 +- mm/util.c | 6 +-- mm/vmalloc.c | 2 +- mm/vmscan.c | 8 ++-- net/core/dev.c | 6 +-- net/core/skbuff.c | 2 +- net/sched/sch_fq.c | 2 +- tools/perf/builtin-kmem.c | 2 +- 24 files changed, 86 insertions(+), 47 deletions(-) commit 473738eb78c3e379d682fb8a3cf7e1d17beded9f Author: Michal Hocko Date: Wed Jul 12 14:36:42 2017 -0700 MIPS: do not use __GFP_REPEAT for order-0 request Patch series "mm: give __GFP_REPEAT a better semantic". The main motivation for the change is that the current implementation of __GFP_REPEAT is not very much useful. The documentation says: * __GFP_REPEAT: Try hard to allocate the memory, but the allocation attempt * _might_ fail. This depends upon the particular VM implementation. It just fails to mention that this is true only for large (costly) high order which has been the case since the flag was introduced. A similar semantic would be really helpful for smal orders as well, though, because we have places where a failure with a specific fallback error handling is preferred to a potential endless loop inside the page allocator. The earlier cleanup dropped __GFP_REPEAT usage for low (!costly) order users so only those which might use larger orders have stayed. One new user added in the meantime is addressed in patch 1. Let's rename the flag to something more verbose and use it for existing users. Semantic for those will not change. Then implement low (!costly) orders failure path which is hit after the page allocator is about to invoke the oom killer. With that we have a good counterpart for __GFP_NORETRY and finally can tell try as hard as possible without the OOM killer. Xfs code already has an existing annotation for allocations which are allowed to fail and we can trivially map them to the new gfp flag because it will provide the semantic KM_MAYFAIL wants. Christoph didn't consider the new flag really necessary but didn't respond to the OOM killer aspect of the change so I have kept the patch. If this is still seen as not really needed I can drop the patch. kvmalloc will allow also !costly high order allocations to retry hard before falling back to the vmalloc. drm/i915 asked for the new semantic explicitly. Memory migration code, especially for the memory hotplug, should back off rather than invoking the OOM killer as well. This patch (of 6): Commit 3377e227af44 ("MIPS: Add 48-bit VA space (and 4-level page tables) for 4K pages.") has added a new __GFP_REPEAT user but using this flag doesn't really make any sense for order-0 request which is the case here because PUD_ORDER is 0. __GFP_REPEAT has historically effect only on allocation requests with order > PAGE_ALLOC_COSTLY_ORDER. This doesn't introduce any functional change. This is a preparatory patch for later work which renames the flag and redefines its semantic. Link: http://lkml.kernel.org/r/20170623085345.11304-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Alex Belits Cc: David Daney Cc: Ralf Baechle Cc: Johannes Weiner Cc: Mel Gorman Cc: NeilBrown Cc: Christoph Hellwig Cc: Chris Wilson Cc: Darrick J. Wong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/include/asm/pgalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a782dc31f4d867921eb7caf1f4bb1222e45bb0e Author: Rik van Riel Date: Wed Jul 12 14:36:39 2017 -0700 powerpc,mmap: properly account for stack randomization in mmap_base When RLIMIT_STACK is, for example, 256MB, the current code results in a gap between the top of the task and mmap_base of 256MB, failing to take into account the amount by which the stack address was randomized. In other words, the stack gets less than RLIMIT_STACK space. Ensure that the gap between the stack and mmap_base always takes stack randomization and the stack guard gap into account. Inspired by Daniel Micay's linux-hardened tree. Link: http://lkml.kernel.org/r/20170622200033.25714-4-riel@redhat.com Signed-off-by: Rik van Riel Reported-by: Florian Weimer Cc: Ingo Molnar Cc: Will Deacon Cc: Daniel Micay Cc: Benjamin Herrenschmidt Cc: Hugh Dickins Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/mm/mmap.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit cf92251dc52d2dfae6c6adaeae8b12ea50686946 Author: Rik van Riel Date: Wed Jul 12 14:36:36 2017 -0700 arm64/mmap: properly account for stack randomization in mmap_base When RLIMIT_STACK is, for example, 256MB, the current code results in a gap between the top of the task and mmap_base of 256MB, failing to take into account the amount by which the stack address was randomized. In other words, the stack gets less than RLIMIT_STACK space. Ensure that the gap between the stack and mmap_base always takes stack randomization and the stack guard gap into account. Obtained from Daniel Micay's linux-hardened tree. Link: http://lkml.kernel.org/r/20170622200033.25714-3-riel@redhat.com Signed-off-by: Daniel Micay Signed-off-by: Rik van Riel Reported-by: Florian Weimer Cc: Ingo Molnar Cc: Will Deacon Cc: Daniel Micay Cc: Benjamin Herrenschmidt Cc: Hugh Dickins Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/mm/mmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c204d21f2232d875e36b8774c36ffd027dc1d606 Author: Rik van Riel Date: Wed Jul 12 14:36:33 2017 -0700 x86/mmap: properly account for stack randomization in mmap_base When RLIMIT_STACK is, for example, 256MB, the current code results in a gap between the top of the task and mmap_base of 256MB, failing to take into account the amount by which the stack address was randomized. In other words, the stack gets less than RLIMIT_STACK space. Ensure that the gap between the stack and mmap_base always takes stack randomization and the stack guard gap into account. Obtained from Daniel Micay's linux-hardened tree. Link: http://lkml.kernel.org/r/20170622200033.25714-2-riel@redhat.com Signed-off-by: Daniel Micay Signed-off-by: Rik van Riel Reported-by: Florian Weimer Acked-by: Ingo Molnar Cc: Will Deacon Cc: Daniel Micay Cc: Benjamin Herrenschmidt Cc: Hugh Dickins Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/mmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2c8340eda45cee1784f7b29e6d7dcc740ea3d02a Author: Rik van Riel Date: Wed Jul 12 14:36:29 2017 -0700 sh64: ascii armor the sh64 boot init stack canary Use the ascii-armor canary to prevent unterminated C string overflows from being able to successfully overwrite the canary, even if they somehow obtain the canary value. Inspired by execshield ascii-armor and Daniel Micay's linux-hardened tree. Link: http://lkml.kernel.org/r/20170524123446.78510066@annuminas.surriel.com Signed-off-by: Rik van Riel Acked-by: Kees Cook Cc: Daniel Micay Cc: "Theodore Ts'o" Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Catalin Marinas Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/include/asm/stackprotector.h | 1 + 1 file changed, 1 insertion(+) commit d21f54988bb2927341757d42152440c3abcae4eb Author: Rik van Riel Date: Wed Jul 12 14:36:26 2017 -0700 arm64: ascii armor the arm64 boot init stack canary Use the ascii-armor canary to prevent unterminated C string overflows from being able to successfully overwrite the canary, even if they somehow obtain the canary value. Inspired by execshield ascii-armor and Daniel Micay's linux-hardened tree. Link: http://lkml.kernel.org/r/20170524155751.424-5-riel@redhat.com Signed-off-by: Rik van Riel Acked-by: Kees Cook Cc: Daniel Micay Cc: "Theodore Ts'o" Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Catalin Marinas Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/include/asm/stackprotector.h | 1 + 1 file changed, 1 insertion(+) commit bf9eb5443844e288b73f7963dfc67a0d2fbc3849 Author: Rik van Riel Date: Wed Jul 12 14:36:23 2017 -0700 x86: ascii armor the x86_64 boot init stack canary Use the ascii-armor canary to prevent unterminated C string overflows from being able to successfully overwrite the canary, even if they somehow obtain the canary value. Inspired by execshield ascii-armor and Daniel Micay's linux-hardened tree. Link: http://lkml.kernel.org/r/20170524155751.424-4-riel@redhat.com Signed-off-by: Rik van Riel Acked-by: Kees Cook Cc: Daniel Micay Cc: "Theodore Ts'o" Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Catalin Marinas Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/stackprotector.h | 1 + 1 file changed, 1 insertion(+) commit 7cd815bce828220deffd1654265f0ef891567774 Author: Rik van Riel Date: Wed Jul 12 14:36:20 2017 -0700 fork,random: use get_random_canary() to set tsk->stack_canary Use the ascii-armor canary to prevent unterminated C string overflows from being able to successfully overwrite the canary, even if they somehow obtain the canary value. Inspired by execshield ascii-armor and Daniel Micay's linux-hardened tree. Link: http://lkml.kernel.org/r/20170524155751.424-3-riel@redhat.com Signed-off-by: Rik van Riel Acked-by: Kees Cook Cc: Daniel Micay Cc: "Theodore Ts'o" Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Catalin Marinas Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 022c204040f3fd22d6445bc35517786195b7ae80 Author: Rik van Riel Date: Wed Jul 12 14:36:17 2017 -0700 random,stackprotect: introduce get_random_canary function Patch series "stackprotector: ascii armor the stack canary", v2. Zero out the first byte of the stack canary value on 64 bit systems, in order to mitigate unterminated C string overflows. The null byte both prevents C string functions from reading the canary, and from writing it if the canary value were guessed or obtained through some other means. Reducing the entropy by 8 bits is acceptable on 64-bit systems, which will still have 56 bits of entropy left, but not on 32 bit systems, so the "ascii armor" canary is only implemented on 64-bit systems. Inspired by the "ascii armor" code in execshield and Daniel Micay's linux-hardened tree. Also see https://github.com/thestinger/linux-hardened/ This patch (of 5): Introduce get_random_canary(), which provides a random unsigned long canary value with the first byte zeroed out on 64 bit architectures, in order to mitigate non-terminated C string overflows. The null byte both prevents C string functions from reading the canary, and from writing it if the canary value were guessed or obtained through some other means. Reducing the entropy by 8 bits is acceptable on 64-bit systems, which will still have 56 bits of entropy left, but not on 32 bit systems, so the "ascii armor" canary is only implemented on 64-bit systems. Inspired by the "ascii armor" code in the old execshield patches, and Daniel Micay's linux-hardened tree. Link: http://lkml.kernel.org/r/20170524155751.424-2-riel@redhat.com Signed-off-by: Rik van Riel Acked-by: Kees Cook Cc: Daniel Micay Cc: "Theodore Ts'o" Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Catalin Marinas Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/random.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 579e14524c6593cb651a806a6563e14b263c00e2 Author: Kees Cook Date: Wed Jul 12 14:36:13 2017 -0700 sh: mark end of BUG() implementation as unreachable When building the sh architecture, the compiler doesn't realize that BUG() doesn't return, so it will complain about functions using BUG() that are marked with the noreturn attribute: lib/string.c: In function 'fortify_panic': >> lib/string.c:986:1: warning: 'noreturn' function does return } ^ Link: http://lkml.kernel.org/r/20170627192050.GA66784@beast Signed-off-by: Kees Cook Cc: Yoshinori Sato Cc: Rich Felker Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/include/asm/bug.h | 1 + 1 file changed, 1 insertion(+) commit 6974f0c4555e285ab217cee58b6e874f776ff409 Author: Daniel Micay Date: Wed Jul 12 14:36:10 2017 -0700 include/linux/string.h: add the option of fortified string.h functions This adds support for compiling with a rough equivalent to the glibc _FORTIFY_SOURCE=1 feature, providing compile-time and runtime buffer overflow checks for string.h functions when the compiler determines the size of the source or destination buffer at compile-time. Unlike glibc, it covers buffer reads in addition to writes. GNU C __builtin_*_chk intrinsics are avoided because they would force a much more complex implementation. They aren't designed to detect read overflows and offer no real benefit when using an implementation based on inline checks. Inline checks don't add up to much code size and allow full use of the regular string intrinsics while avoiding the need for a bunch of _chk functions and per-arch assembly to avoid wrapper overhead. This detects various overflows at compile-time in various drivers and some non-x86 core kernel code. There will likely be issues caught in regular use at runtime too. Future improvements left out of initial implementation for simplicity, as it's all quite optional and can be done incrementally: * Some of the fortified string functions (strncpy, strcat), don't yet place a limit on reads from the source based on __builtin_object_size of the source buffer. * Extending coverage to more string functions like strlcat. * It should be possible to optionally use __builtin_object_size(x, 1) for some functions (C strings) to detect intra-object overflows (like glibc's _FORTIFY_SOURCE=2), but for now this takes the conservative approach to avoid likely compatibility issues. * The compile-time checks should be made available via a separate config option which can be enabled by default (or always enabled) once enough time has passed to get the issues it catches fixed. Kees said: "This is great to have. While it was out-of-tree code, it would have blocked at least CVE-2016-3858 from being exploitable (improper size argument to strlcpy()). I've sent a number of fixes for out-of-bounds-reads that this detected upstream already" [arnd@arndb.de: x86: fix fortified memcpy] Link: http://lkml.kernel.org/r/20170627150047.660360-1-arnd@arndb.de [keescook@chromium.org: avoid panic() in favor of BUG()] Link: http://lkml.kernel.org/r/20170626235122.GA25261@beast [keescook@chromium.org: move from -mm, add ARCH_HAS_FORTIFY_SOURCE, tweak Kconfig help] Link: http://lkml.kernel.org/r/20170526095404.20439-1-danielmicay@gmail.com Link: http://lkml.kernel.org/r/1497903987-21002-8-git-send-email-keescook@chromium.org Signed-off-by: Daniel Micay Signed-off-by: Kees Cook Signed-off-by: Arnd Bergmann Acked-by: Kees Cook Cc: Mark Rutland Cc: Daniel Axtens Cc: Rasmus Villemoes Cc: Andy Shevchenko Cc: Chris Metcalf Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/Kconfig | 6 ++ arch/arm64/Kconfig | 1 + arch/arm64/include/asm/string.h | 5 + arch/powerpc/Kconfig | 1 + arch/x86/Kconfig | 1 + arch/x86/boot/compressed/misc.c | 5 + arch/x86/include/asm/string_32.h | 9 ++ arch/x86/include/asm/string_64.h | 7 ++ arch/x86/lib/memcpy_32.c | 2 +- include/linux/string.h | 200 +++++++++++++++++++++++++++++++++++++++ lib/string.c | 7 ++ security/Kconfig | 7 ++ 12 files changed, 250 insertions(+), 1 deletion(-) commit c69a48cdb301a18697bc8c9935baf4f32861cf9e Author: Daniel Axtens Date: Wed Jul 12 14:36:07 2017 -0700 powerpc: make feature-fixup tests fortify-safe Testing the fortified string functions[1] would cause a kernel panic on boot in test_feature_fixups() due to a buffer overflow in memcmp. This boils down to things like this: extern unsigned int ftr_fixup_test1; extern unsigned int ftr_fixup_test1_orig; check(memcmp(&ftr_fixup_test1, &ftr_fixup_test1_orig, size) == 0); We know that these are asm labels so it is safe to read up to 'size' bytes at those addresses. However, because we have passed the address of a single unsigned int to memcmp, the compiler believes the underlying object is in fact a single unsigned int. So if size > sizeof(unsigned int), there will be a panic at runtime. We can fix this by changing the types: instead of calling the asm labels unsigned ints, call them unsigned int[]s. Therefore the size isn't incorrectly determined at compile time and we get a regular unsafe memcmp and no panic. [1] http://openwall.com/lists/kernel-hardening/2017/05/09/2 Link: http://lkml.kernel.org/r/1497903987-21002-7-git-send-email-keescook@chromium.org Signed-off-by: Daniel Axtens Signed-off-by: Kees Cook Suggested-by: Michael Ellerman Tested-by: Andrew Donnellan Reviewed-by: Andrew Donnellan Cc: Kees Cook Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/lib/feature-fixups.c | 180 +++++++++++++++++++------------------- 1 file changed, 90 insertions(+), 90 deletions(-) commit 054f367a32381b5640c5d150fe0b7ba285564998 Author: Daniel Axtens Date: Wed Jul 12 14:36:04 2017 -0700 powerpc: don't fortify prom_init prom_init is a bit special; in theory it should be able to be linked separately to the kernel. To keep this from getting too complex, the symbols that prom_init.c uses are checked. Fortification adds symbols, and it gets quite messy as it includes things like panic(). So just don't fortify prom_init.c for now. Link: http://lkml.kernel.org/r/1497903987-21002-6-git-send-email-keescook@chromium.org Signed-off-by: Daniel Axtens Signed-off-by: Kees Cook Acked-by: Michael Ellerman Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kernel/prom_init.c | 3 +++ 1 file changed, 3 insertions(+) commit 4c93496f18ce5044d78e4f7f9e018682a4f44b3d Author: Kees Cook Date: Wed Jul 12 14:36:01 2017 -0700 IB/rxe: do not copy extra stack memory to skb This fixes a over-read condition detected by FORTIFY_SOURCE for this line: memcpy(SKB_TO_PKT(skb), &ack_pkt, sizeof(skb->cb)); The error was: In file included from ./include/linux/bitmap.h:8:0, from ./include/linux/cpumask.h:11, from ./include/linux/mm_types_task.h:13, from ./include/linux/mm_types.h:4, from ./include/linux/kmemcheck.h:4, from ./include/linux/skbuff.h:18, from drivers/infiniband/sw/rxe/rxe_resp.c:34: In function 'memcpy', inlined from 'send_atomic_ack.constprop' at drivers/infiniband/sw/rxe/rxe_resp.c:998:2, inlined from 'acknowledge' at drivers/infiniband/sw/rxe/rxe_resp.c:1026:3, inlined from 'rxe_responder' at drivers/infiniband/sw/rxe/rxe_resp.c:1286:10: ./include/linux/string.h:309:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter __read_overflow2(); Daniel Micay noted that struct rxe_pkt_info is 32 bytes on 32-bit architectures, but skb->cb is still 64. The memcpy() over-reads 32 bytes. This fixes it by zeroing the unused bytes in skb->cb. Link: http://lkml.kernel.org/r/1497903987-21002-5-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Cc: Moni Shoua Cc: Doug Ledford Cc: Sean Hefty Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/infiniband/sw/rxe/rxe_resp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e2ae8ab4b571e2e4094a28acb60649bc2732c67f Author: Kees Cook Date: Wed Jul 12 14:35:58 2017 -0700 kexec_file: adjust declaration of kexec_purgatory Defining kexec_purgatory as a zero-length char array upsets compile time size checking. Since this is built on a per-arch basis, define it as an unsized char array (like is done for other similar things, e.g. linker sections). This silences the warning generated by the future CONFIG_FORTIFY_SOURCE, which did not like the memcmp() of a "0 byte" array. This drops the __weak and uses an extern instead, since both users define kexec_purgatory. Link: http://lkml.kernel.org/r/1497903987-21002-4-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Acked-by: "Eric W. Biederman" Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec_file.c | 7 ------- kernel/kexec_internal.h | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) commit 3e2c044a54e6b6373606f8ffad42a4a0759fcf3d Author: Kees Cook Date: Wed Jul 12 14:35:55 2017 -0700 efi: avoid fortify checks in EFI stub This avoids CONFIG_FORTIFY_SOURCE from being enabled during the EFI stub build, as adding a panic() implementation may not work well. This can be adjusted in the future. Link: http://lkml.kernel.org/r/1497903987-21002-2-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Suggested-by: Daniel Micay Reviewed-by: Ard Biesheuvel Acked-by: Mark Rutland Cc: Matt Fleming Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/firmware/efi/libstub/Makefile | 1 + 1 file changed, 1 insertion(+) commit 2104180a53698df5aec35aed5f840a26ade0551d Author: Nicholas Piggin Date: Wed Jul 12 14:35:52 2017 -0700 powerpc/64s: implement arch-specific hardlockup watchdog Implement an arch-speicfic watchdog rather than use the perf-based hardlockup detector. The new watchdog takes the soft-NMI directly, rather than going through perf. Perf interrupts are to be made maskable in future, so that would prevent the perf detector from working in those regions. Additionally, implement a SMP based detector where all CPUs watch one another by pinging a shared cpumask. This is because powerpc Book3S does not have a true periodic local NMI, but some platforms do implement a true NMI IPI. If a CPU is stuck with interrupts hard disabled, the soft-NMI watchdog does not work, but the SMP watchdog will. Even on platforms without a true NMI IPI to get a good trace from the stuck CPU, other CPUs will notice the lockup sufficiently to report it and panic. [npiggin@gmail.com: honor watchdog disable at boot/hotplug] Link: http://lkml.kernel.org/r/20170621001346.5bb337c9@roar.ozlabs.ibm.com [npiggin@gmail.com: fix false positive warning at CPU unplug] Link: http://lkml.kernel.org/r/20170630080740.20766-1-npiggin@gmail.com [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170616065715.18390-6-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Don Zickus Tested-by: Babu Moger [sparc] Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/Kconfig | 7 +- arch/powerpc/include/asm/nmi.h | 11 + arch/powerpc/include/asm/smp.h | 2 + arch/powerpc/kernel/Makefile | 1 + arch/powerpc/kernel/exceptions-64s.S | 30 ++- arch/powerpc/kernel/kvm.c | 7 + arch/powerpc/kernel/setup_64.c | 19 -- arch/powerpc/kernel/smp.c | 20 +- arch/powerpc/kernel/watchdog.c | 386 +++++++++++++++++++++++++++++++++++ 9 files changed, 458 insertions(+), 25 deletions(-) commit a10a842ff81a7e3810817b3b04e4c432b6191e21 Author: Nicholas Piggin Date: Wed Jul 12 14:35:49 2017 -0700 kernel/watchdog: provide watchdog_nmi_reconfigure() for arch watchdogs After reconfiguring watchdog sysctls etc., architecture specific watchdogs may not get all their parameters updated. watchdog_nmi_reconfigure() can be implemented to pull the new values in and set the arch NMI watchdog. [npiggin@gmail.com: add code comments] Link: http://lkml.kernel.org/r/20170617125933.774d3858@roar.ozlabs.ibm.com [arnd@arndb.de: hide unused function] Link: http://lkml.kernel.org/r/20170620204854.966601-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20170616065715.18390-5-npiggin@gmail.com Signed-off-by: Nicholas Piggin Signed-off-by: Arnd Bergmann Reviewed-by: Don Zickus Tested-by: Babu Moger [sparc] Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/watchdog.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) commit 05a4a95279311c3a4633b4277a5d21cfd616c6c7 Author: Nicholas Piggin Date: Wed Jul 12 14:35:46 2017 -0700 kernel/watchdog: split up config options Split SOFTLOCKUP_DETECTOR from LOCKUP_DETECTOR, and split HARDLOCKUP_DETECTOR_PERF from HARDLOCKUP_DETECTOR. LOCKUP_DETECTOR implies the general boot, sysctl, and programming interfaces for the lockup detectors. An architecture that wants to use a hard lockup detector must define HAVE_HARDLOCKUP_DETECTOR_PERF or HAVE_HARDLOCKUP_DETECTOR_ARCH. Alternatively an arch can define HAVE_NMI_WATCHDOG, which provides the minimum arch_touch_nmi_watchdog, and it otherwise does its own thing and does not implement the LOCKUP_DETECTOR interfaces. sparc is unusual in that it has started to implement some of the interfaces, but not fully yet. It should probably be converted to a full HAVE_HARDLOCKUP_DETECTOR_ARCH. [npiggin@gmail.com: fix] Link: http://lkml.kernel.org/r/20170617223522.66c0ad88@roar.ozlabs.ibm.com Link: http://lkml.kernel.org/r/20170616065715.18390-4-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Don Zickus Reviewed-by: Babu Moger Tested-by: Babu Moger [sparc] Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/Kconfig | 25 ++++- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/setup_64.c | 2 +- arch/x86/Kconfig | 1 + arch/x86/kernel/apic/hw_nmi.c | 2 +- include/linux/nmi.h | 29 +++-- kernel/Makefile | 2 +- kernel/sysctl.c | 31 +++--- kernel/watchdog.c | 243 +++++++++++++++++++++++++++-------------- kernel/watchdog_hld.c | 32 ------ lib/Kconfig.debug | 45 +++++--- 11 files changed, 251 insertions(+), 162 deletions(-) commit f2e0cff85ed111a3cf24d894c3fa11697dfae628 Author: Nicholas Piggin Date: Wed Jul 12 14:35:43 2017 -0700 kernel/watchdog: introduce arch_touch_nmi_watchdog() For architectures that define HAVE_NMI_WATCHDOG, instead of having them provide the complete touch_nmi_watchdog() function, just have them provide arch_touch_nmi_watchdog(). This gives the generic code more flexibility in implementing this function, and arch implementations don't miss out on touching the softlockup watchdog or other generic details. Link: http://lkml.kernel.org/r/20170616065715.18390-3-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Don Zickus Reviewed-by: Babu Moger Tested-by: Babu Moger [sparc] Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/blackfin/include/asm/nmi.h | 2 ++ arch/blackfin/kernel/nmi.c | 2 +- arch/mn10300/include/asm/nmi.h | 2 ++ arch/mn10300/kernel/mn10300-watchdog-low.S | 8 ++++---- arch/mn10300/kernel/mn10300-watchdog.c | 2 +- arch/sparc/include/asm/nmi.h | 1 + arch/sparc/kernel/nmi.c | 6 ++---- include/linux/nmi.h | 27 ++++++++++++++++----------- kernel/watchdog_hld.c | 5 ++--- 9 files changed, 31 insertions(+), 24 deletions(-) commit 24bb44612c5f93a1dff1f7e71b7b7b109a988791 Author: Nicholas Piggin Date: Wed Jul 12 14:35:40 2017 -0700 kernel/watchdog: remove unused declaration Patch series "Improve watchdog config for arch watchdogs", v4. A series to make the hardlockup watchdog more easily replaceable by arch code. The last patch provides some justification for why we want to do this (existing sparc watchdog is another that could benefit). This patch (of 5): Remove unused declaration. Link: http://lkml.kernel.org/r/20170616065715.18390-2-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Don Zickus Reviewed-by: Babu Moger Tested-by: Babu Moger [sparc] Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/nmi.h | 3 --- 1 file changed, 3 deletions(-) commit eacd86ca3b036e55e172b7279f101cef4a6ff3a4 Author: Michal Hocko Date: Wed Jul 12 14:35:37 2017 -0700 net/netfilter/x_tables.c: use kvmalloc() in xt_alloc_table_info() xt_alloc_table_info() basically opencodes kvmalloc() so use the library function instead. Link: http://lkml.kernel.org/r/20170531155145.17111-4-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds net/netfilter/x_tables.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 62b49c9908bcee88347efe8b4ed1b4f53c60ee66 Author: Manfred Spraul Date: Wed Jul 12 14:35:34 2017 -0700 ipc/util.h: update documentation for ipc_getref() and ipc_putref() Now that ipc_rcu_alloc() and ipc_rcu_free() are removed, document when it is valid to use ipc_getref() and ipc_putref(). Link: http://lkml.kernel.org/r/20170525185107.12869-21-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/util.h | 3 +++ 1 file changed, 3 insertions(+) commit e2029dfeef7b09f08ac8572e8be3d4c624d1f79a Author: Kees Cook Date: Wed Jul 12 14:35:31 2017 -0700 ipc/sem: drop __sem_free() The remaining users of __sem_free() can simply call kvfree() instead for better readability. [manfred@colorfullife.com: Rediff to keep rcu protection for security_sem_alloc()] Link: http://lkml.kernel.org/r/20170525185107.12869-20-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit fb259c310f79d295c2da2934ff2282e1b7c30529 Author: Kees Cook Date: Wed Jul 12 14:35:28 2017 -0700 ipc/msg: remove special msg_alloc/free There is nothing special about the msg_alloc/free routines any more, so remove them to make code more readable. [manfred@colorfullife.com: Rediff to keep rcu protection for security_msg_queue_alloc()] Link: http://lkml.kernel.org/r/20170525185107.12869-19-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 42e618f77dabc82c697915c193d729e9d16e2a75 Author: Kees Cook Date: Wed Jul 12 14:35:25 2017 -0700 ipc/shm: remove special shm_alloc/free There is nothing special about the shm_alloc/free routines any more, so remove them to make code more readable. [manfred@colorfullife.com: Rediff, to continue to keep rcu for free calls after a successful security_shm_alloc()] Link: http://lkml.kernel.org/r/20170525185107.12869-18-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 3d3653f9732c73feb8c4addfc1cbdaa292a399fa Author: Kees Cook Date: Wed Jul 12 14:35:22 2017 -0700 ipc: move atomic_set() to where it is needed Only after ipc_addid() has succeeded will refcounting be used, so move initialization into ipc_addid() and remove from open-coded *_alloc() routines. Link: http://lkml.kernel.org/r/20170525185107.12869-17-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 2 -- ipc/sem.c | 1 - ipc/shm.c | 2 -- ipc/util.c | 1 + 4 files changed, 1 insertion(+), 5 deletions(-) commit 51c23b7b7db52493d4fc869cec8c3e8fe27bfcd3 Author: Manfred Spraul Date: Wed Jul 12 14:35:19 2017 -0700 ipc/msg.c: avoid ipc_rcu_putref for failed ipc_addid() Loosely based on a patch from Kees Cook : - id and retval can be merged - if ipc_addid() fails, then use call_rcu() directly. The difference is that call_rcu is used for failed ipc_addid() calls, to continue to guaranteed an rcu delay for security_msg_queue_free(). Link: http://lkml.kernel.org/r/20170525185107.12869-16-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Kees Cook Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a2642f8770993a1598500bb6a8082b7c32faff8b Author: Manfred Spraul Date: Wed Jul 12 14:35:16 2017 -0700 ipc/shm.c: avoid ipc_rcu_putref for failed ipc_addid() Loosely based on a patch from Kees Cook : - id and error can be merged - if operations before ipc_addid() fail, then use call_rcu() directly. The difference is that call_rcu is used for failures after security_shm_alloc(), to continue to guaranteed an rcu delay for security_sem_free(). Link: http://lkml.kernel.org/r/20170525185107.12869-15-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Kees Cook Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 2ec55f8024db859d70f14c26e91ca044328dd50d Author: Manfred Spraul Date: Wed Jul 12 14:35:13 2017 -0700 ipc/sem.c: avoid ipc_rcu_putref for failed ipc_addid() Loosely based on a patch from Kees Cook : - id and retval can be merged - if ipc_addid() fails, then use call_rcu() directly. The difference is that call_rcu is used for failed ipc_addid() calls, to continue to guaranteed an rcu delay for security_sem_free(). Link: http://lkml.kernel.org/r/20170525185107.12869-14-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Kees Cook Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c3f6fb6fe4e638a58eae558cb209c463cd46c2fc Author: Kees Cook Date: Wed Jul 12 14:35:10 2017 -0700 ipc/util: drop ipc_rcu_alloc() No callers remain for ipc_rcu_alloc(). Drop the function. [manfred@colorfullife.com: Rediff because the memset was temporarily inside ipc_rcu_free()] Link: http://lkml.kernel.org/r/20170525185107.12869-13-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/util.c | 21 --------------------- ipc/util.h | 3 --- 2 files changed, 24 deletions(-) commit 52f908904e7e05b6300162faa48152df073be645 Author: Kees Cook Date: Wed Jul 12 14:35:07 2017 -0700 ipc/msg: avoid ipc_rcu_alloc() Instead of using ipc_rcu_alloc() which only performs the refcount bump, open code it. This also allows for msg_queue structure layout to be randomized in the future. Link: http://lkml.kernel.org/r/20170525185107.12869-12-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 3e0c24042e5aa55eee817caeca67246df69931e1 Author: Kees Cook Date: Wed Jul 12 14:35:05 2017 -0700 ipc/shm: avoid ipc_rcu_alloc() Instead of using ipc_rcu_alloc() which only performs the refcount bump, open code it. This also allows for shmid_kernel structure layout to be randomized in the future. Link: http://lkml.kernel.org/r/20170525185107.12869-11-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 101ede01dfd5072651965e974bc6e30c8d0748e2 Author: Kees Cook Date: Wed Jul 12 14:35:02 2017 -0700 ipc/sem: avoid ipc_rcu_alloc() Instead of using ipc_rcu_alloc() which only performs the refcount bump, open code it to perform better sem-specific checks. This also allows for sem_array structure layout to be randomized in the future. [manfred@colorfullife.com: Rediff, because the memset was temporarily inside ipc_rcu_alloc()] Link: http://lkml.kernel.org/r/20170525185107.12869-10-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 5ccc8fb54f1c083f1dc7e073150ec18d43457872 Author: Kees Cook Date: Wed Jul 12 14:34:59 2017 -0700 ipc/util: drop ipc_rcu_free() There are no more callers of ipc_rcu_free(), so remove it. Link: http://lkml.kernel.org/r/20170525185107.12869-9-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/util.c | 7 ------- ipc/util.h | 1 - 2 files changed, 8 deletions(-) commit 9ef5932f8a1134b9d93676ee26701b2be90c7a95 Author: Kees Cook Date: Wed Jul 12 14:34:56 2017 -0700 ipc/msg: do not use ipc_rcu_free() Avoid using ipc_rcu_free, since it just re-finds the original structure pointer. For the pre-list-init failure path, there is no RCU needed, since it was just allocated. It can be directly freed. Link: http://lkml.kernel.org/r/20170525185107.12869-8-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 66470b18179f8839a62b4c20ffd3903a4025fe90 Author: Kees Cook Date: Wed Jul 12 14:34:53 2017 -0700 ipc/shm: do not use ipc_rcu_free() Avoid using ipc_rcu_free, since it just re-finds the original structure pointer. For the pre-list-init failure path, there is no RCU needed, since it was just allocated. It can be directly freed. Link: http://lkml.kernel.org/r/20170525185107.12869-7-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1b4654ef72f61c84704b3c79b50fdeed8747fc56 Author: Kees Cook Date: Wed Jul 12 14:34:50 2017 -0700 ipc/sem: do not use ipc_rcu_free() Avoid using ipc_rcu_free, since it just re-finds the original structure pointer. For the pre-list-init failure path, there is no RCU needed, since it was just allocated. It can be directly freed. Link: http://lkml.kernel.org/r/20170525185107.12869-6-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f8dbe8d290637ac3f68600e30d092393fe9b40a5 Author: Kees Cook Date: Wed Jul 12 14:34:47 2017 -0700 ipc: drop non-RCU allocation The only users of ipc_alloc() were ipc_rcu_alloc() and the on-heap sem_io fall-back memory. Better to just open-code these to make things easier to read. [manfred@colorfullife.com: Rediff due to inclusion of memset() into ipc_rcu_alloc()] Link: http://lkml.kernel.org/r/20170525185107.12869-5-manfred@colorfullife.com Signed-off-by: Kees Cook Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 8 +++++--- ipc/util.c | 25 +------------------------ ipc/util.h | 6 ------ 3 files changed, 6 insertions(+), 33 deletions(-) commit 2cd648c110b5570c3280bd645797658cabbe5f5c Author: Manfred Spraul Date: Wed Jul 12 14:34:44 2017 -0700 include/linux/sem.h: correctly document sem_ctime sem_ctime is initialized to the semget() time and then updated at every semctl() that changes the array. Thus it does not represent the time of the last change. Especially, semop() calls are only stored in sem_otime, not in sem_ctime. This is already described in ipc/sem.c, I just overlooked that there is a comment in include/linux/sem.h and man semctl(2) as well. So: Correct wrong comments. Link: http://lkml.kernel.org/r/20170515171912.6298-4-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Kees Cook Cc: <1vier1@web.de> Cc: Davidlohr Bueso Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Fabian Frederick Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sem.h | 2 +- include/uapi/linux/sem.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dba4cdd39e698d8dcdad0656825423052ac90ccd Author: Manfred Spraul Date: Wed Jul 12 14:34:41 2017 -0700 ipc: merge ipc_rcu and kern_ipc_perm ipc has two management structures that exist for every id: - struct kern_ipc_perm, it contains e.g. the permissions. - struct ipc_rcu, it contains the rcu head for rcu handling and the refcount. The patch merges both structures. As a bonus, we may save one cacheline, because both structures are cacheline aligned. In addition, it reduces the number of casts, instead most codepaths can use container_of. To simplify code, the ipc_rcu_alloc initializes the allocation to 0. [manfred@colorfullife.com: really include the memset() into ipc_alloc_rcu()] Link: http://lkml.kernel.org/r/564f8612-0601-b267-514f-a9f650ec9b32@colorfullife.com Link: http://lkml.kernel.org/r/20170525185107.12869-3-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Davidlohr Bueso Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/ipc.h | 3 +++ ipc/msg.c | 19 +++++++++++-------- ipc/sem.c | 34 +++++++++++++++++----------------- ipc/shm.c | 18 +++++++++++------- ipc/util.c | 35 +++++++++++++++++------------------ ipc/util.h | 18 +++++++----------- 6 files changed, 66 insertions(+), 61 deletions(-) commit 1a23395672658969a4035dcc518ea6cab835c579 Author: Manfred Spraul Date: Wed Jul 12 14:34:38 2017 -0700 ipc/sem.c: remove sem_base, embed struct sem sma->sem_base is initialized with sma->sem_base = (struct sem *) &sma[1]; The current code has four problems: - There is an unnecessary pointer dereference - sem_base is not needed. - Alignment for struct sem only works by chance. - The current code causes false positive for static code analysis. - This is a cast between different non-void types, which the future randstruct GCC plugin warns on. And, as bonus, the code size gets smaller: Before: 0 .text 00003770 After: 0 .text 0000374e [manfred@colorfullife.com: s/[0]/[]/, per hch] Link: http://lkml.kernel.org/r/20170525185107.12869-2-manfred@colorfullife.com Link: http://lkml.kernel.org/r/20170515171912.6298-2-manfred@colorfullife.com Signed-off-by: Manfred Spraul Acked-by: Kees Cook Cc: Kees Cook Cc: <1vier1@web.de> Cc: Davidlohr Bueso Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Fabian Frederick Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sem.h | 22 +++++++++++++- ipc/sem.c | 88 +++++++++++++++++++++-------------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) commit e41d58185f1444368873d4d7422f7664a68be61d Author: Dmitry Vyukov Date: Wed Jul 12 14:34:35 2017 -0700 fault-inject: support systematic fault injection Add /proc/self/task//fail-nth file that allows failing 0-th, 1-st, 2-nd and so on calls systematically. Excerpt from the added documentation: "Write to this file of integer N makes N-th call in the current task fail (N is 0-based). Read from this file returns a single char 'Y' or 'N' that says if the fault setup with a previous write to this file was injected or not, and disables the fault if it wasn't yet injected. Note that this file enables all types of faults (slab, futex, etc). This setting takes precedence over all other generic settings like probability, interval, times, etc. But per-capability settings (e.g. fail_futex/ignore-private) take precedence over it. This feature is intended for systematic testing of faults in a single system call. See an example below" Why add a new setting: 1. Existing settings are global rather than per-task. So parallel testing is not possible. 2. attr->interval is close but it depends on attr->count which is non reset to 0, so interval does not work as expected. 3. Trying to model this with existing settings requires manipulations of all of probability, interval, times, space, task-filter and unexposed count and per-task make-it-fail files. 4. Existing settings are per-failure-type, and the set of failure types is potentially expanding. 5. make-it-fail can't be changed by unprivileged user and aggressive stress testing better be done from an unprivileged user. Similarly, this would require opening the debugfs files to the unprivileged user, as he would need to reopen at least times file (not possible to pre-open before dropping privs). The proposed interface solves all of the above (see the example). We want to integrate this into syzkaller fuzzer. A prototype has found 10 bugs in kernel in first day of usage: https://groups.google.com/forum/#!searchin/syzkaller/%22FAULT_INJECTION%22%7Csort:relevance I've made the current interface work with all types of our sandboxes. For setuid the secret sauce was prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) to make /proc entries non-root owned. So I am fine with the current version of the code. [akpm@linux-foundation.org: fix build] Link: http://lkml.kernel.org/r/20170328130128.101773-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Cc: Akinobu Mita Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/fault-injection/fault-injection.txt | 78 +++++++++++++++++++++++ fs/proc/base.c | 52 +++++++++++++++ include/linux/sched.h | 1 + kernel/fork.c | 4 ++ lib/fault-inject.c | 7 ++ 5 files changed, 142 insertions(+) commit 92ef6da3d06ff551a86de41ae37df9cc4b58d7a0 Author: Cyrill Gorcunov Date: Wed Jul 12 14:34:31 2017 -0700 kcmp: fs/epoll: wrap kcmp code with CONFIG_CHECKPOINT_RESTORE kcmp syscall is build iif CONFIG_CHECKPOINT_RESTORE is selected, so wrap appropriate helpers in epoll code with the config to build it conditionally. Link: http://lkml.kernel.org/r/20170513083456.GG1881@uranus.lan Signed-off-by: Cyrill Gorcunov Reported-by: Andrew Morton Cc: Andrey Vagin Cc: Al Viro Cc: Pavel Emelyanov Cc: Michael Kerrisk Cc: Jason Baron Cc: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 2 ++ include/linux/eventpoll.h | 2 ++ 2 files changed, 4 insertions(+) commit 0791e3644e5ef21646fe565b9061788d05ec71d4 Author: Cyrill Gorcunov Date: Wed Jul 12 14:34:28 2017 -0700 kcmp: add KCMP_EPOLL_TFD mode to compare epoll target files With current epoll architecture target files are addressed with file_struct and file descriptor number, where the last is not unique. Moreover files can be transferred from another process via unix socket, added into queue and closed then so we won't find this descriptor in the task fdinfo list. Thus to checkpoint and restore such processes CRIU needs to find out where exactly the target file is present to add it into epoll queue. For this sake one can use kcmp call where some particular target file from the queue is compared with arbitrary file passed as an argument. Because epoll target files can have same file descriptor number but different file_struct a caller should explicitly specify the offset within. To test if some particular file is matching entry inside epoll one have to - fill kcmp_epoll_slot structure with epoll file descriptor, target file number and target file offset (in case if only one target is present then it should be 0) - call kcmp as kcmp(pid1, pid2, KCMP_EPOLL_TFD, fd, &kcmp_epoll_slot) - the kernel fetch file pointer matching file descriptor @fd of pid1 - lookups for file struct in epoll queue of pid2 and returns traditional 0,1,2 result for sorting purpose Link: http://lkml.kernel.org/r/20170424154423.511592110@gmail.com Signed-off-by: Cyrill Gorcunov Acked-by: Andrey Vagin Cc: Al Viro Cc: Pavel Emelyanov Cc: Michael Kerrisk Cc: Jason Baron Cc: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 42 ++++++++++++++++++++++++++++++++++ include/linux/eventpoll.h | 3 +++ include/uapi/linux/kcmp.h | 10 +++++++++ kernel/kcmp.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 112 insertions(+) commit 77493f04b74cdff3a61fb3fb14b1f5a71d88fd5f Author: Cyrill Gorcunov Date: Wed Jul 12 14:34:25 2017 -0700 procfs: fdinfo: extend information about epoll target files Since it is possbile to have same number in tfd field (say file added, closed, then nother file dup'ed to same number and added back) it is imposible to distinguish such target files solely by their numbers. Strictly speaking regular applications don't need to recognize these targets at all but for checkpoint/restore sake we need to collect targets to be able to push them back on restore stage in a proper order. Thus lets add file position, inode and device number where this target lays. This three fields can be used as a primary key for sorting, and together with kcmp help CRIU can find out an exact file target (from the whole set of processes being checkpointed). Link: http://lkml.kernel.org/r/20170424154423.436491881@gmail.com Signed-off-by: Cyrill Gorcunov Acked-by: Andrei Vagin Cc: Al Viro Cc: Pavel Emelyanov Cc: Michael Kerrisk Cc: Jason Baron Cc: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 6 +++++- fs/eventpoll.c | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) commit 9263969a46fc899092ba4f8c4206fa2340c9a64e Author: Logan Gunthorpe Date: Wed Jul 12 14:34:22 2017 -0700 kfifo: clean up example to not use page_link This is a layering violation so we replace the uses with calls to sg_page(). This is a prep patch for replacing page_link and this is one of the very few uses outside of scatterlist.h. Link: http://lkml.kernel.org/r/1495663199-22234-1-git-send-email-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Acked-by: Stefani Seibold Cc: Stefani Seibold Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds samples/kfifo/dma-example.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 46d10a094353c05144f3b0530516bdac3ce7c435 Author: Leonard Crestez Date: Wed Jul 12 14:34:19 2017 -0700 scripts/gdb: lx-dmesg: use explicit encoding=utf8 errors=replace Use errors=replace because it is never desirable for lx-dmesg to fail on string decoding errors, not even if the log buffer is corrupt and we show incorrect info. The kernel will sometimes print utf8, for example the copyright symbol from jffs2. In order to make this work specify 'utf8' everywhere because python2 otherwise defaults to 'ascii'. In theory the second errors='replace' is not be required because everything that can be decoded as utf8 should also be encodable back to utf8. But it's better to be extra safe here. It's worth noting that this is definitely not true for encoding='ascii', unknown characters are replaced with U+FFFD REPLACEMENT CHARACTER and they fail to encode back to ascii. Link: http://lkml.kernel.org/r/acee067f3345954ed41efb77b80eebdc038619c6.1498481469.git.leonard.crestez@nxp.com Signed-off-by: Leonard Crestez Acked-by: Jan Kiszka Cc: Jason Wessel Cc: Kieran Bingham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/dmesg.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit c454756f47277b651ad41a5a163499294529e35d Author: Leonard Crestez Date: Wed Jul 12 14:34:16 2017 -0700 scripts/gdb: lx-dmesg: cast log_buf to void* for addr fetch In some cases it is possible for the str() conversion here to throw encoding errors because log_buf might not point to valid ascii. For example: (gdb) python print str(gdb.parse_and_eval("log_buf")) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\u0303' in position 24: ordinal not in range(128) Avoid this by explicitly casting to (void *) inside the gdb expression. Link: http://lkml.kernel.org/r/ba6f85dbb02ca980ebd0e2399b0649423399b565.1498481469.git.leonard.crestez@nxp.com Signed-off-by: Leonard Crestez Reviewed-by: Jan Kiszka Cc: Jason Wessel Cc: Kieran Bingham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/dmesg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 821f74402a4c67de63cb6bab5bae7c7a3b298ac2 Author: Peter Griffin Date: Wed Jul 12 14:34:13 2017 -0700 scripts/gdb: add lx-fdtdump command lx-fdtdump dumps the flattened device tree passed to the kernel from the bootloader to the filename specified as the command argument. If no argument is provided it defaults to fdtdump.dtb. This then allows further post processing on the machine running GDB. The fdt header is also also printed in the GDB console. For example: (gdb) lx-fdtdump fdt_magic: 0xD00DFEED fdt_totalsize: 0xC108 off_dt_struct: 0x38 off_dt_strings: 0x3804 off_mem_rsvmap: 0x28 version: 17 last_comp_version: 16 Dumped fdt to fdtdump.dtb >fdtdump fdtdump.dtb | less This command is useful as the bootloader can often re-write parts of the device tree, and this can sometimes cause the kernel to not boot. Link: http://lkml.kernel.org/r/1481280065-5336-2-git-send-email-kbingham@kernel.org Signed-off-by: Peter Griffin Signed-off-by: Kieran Bingham Cc: Jason Wessel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/constants.py.in | 7 ++++ scripts/gdb/linux/proc.py | 73 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) commit 59224ac1cf9cacf76a82266854921ca6c9887f20 Author: Davidlohr Bueso Date: Wed Jul 12 14:34:10 2017 -0700 fs/Kconfig: kill CONFIG_PERCPU_RWSEM some more As of commit bf3eac84c42d ("percpu-rwsem: kill CONFIG_PERCPU_RWSEM") we unconditionally build pcpu-rwsems. Remove a leftover in for FILE_LOCKING. Link: http://lkml.kernel.org/r/20170518180115.2794-1-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 5f9f48f5b385457426b4b8f3f4a604019a8e7350 Author: Rakesh Pandit Date: Wed Jul 12 14:34:07 2017 -0700 bfs: fix sanity checks for empty files Mount fails if file system image has empty files because of sanity check while reading superblock. For empty files disk offset to end of file (i_eoffset) is cpu_to_le32(-1). Sanity check comparison, which compares disk offset with file system size isn't valid for this value and hence is ignored with this patch. Steps to reproduce: $ dd if=/dev/zero of=bfs-image count=204800 $ mkfs.bfs bfs-image $ mkdir bfs-mount-point $ sudo mount -t bfs -o loop bfs-image bfs-mount-point/ $ cd bfs-mount-point/ $ sudo touch a $ cd .. $ sudo umount bfs-mount-point/ $ sudo mount -t bfs -o loop bfs-image bfs-mount-point/ mount: /dev/loop0: can't read superblock $ dmesg [25526.689580] BFS-fs: bfs_fill_super(): Inode 0x00000003 corrupted Tigran said: "If you had created the filesystem with the proper mkfs under SCO UnixWare 7 you (probably) wouldn't encounter this issue. But since commercial Unix-es are now part of history and the only proper way is the Linux mkfs.bfs utility, your patch is fine" Link: http://lkml.kernel.org/r/20170505201625.GA3097@hercules.tuxera.com Signed-off-by: Rakesh Pandit Acked-by: Tigran Aivazian Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/bfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee7998c50c2697737c6530431709f77c852bf0d6 Author: Kees Cook Date: Wed Jul 12 14:34:04 2017 -0700 random: do not ignore early device randomness The add_device_randomness() function would ignore incoming bytes if the crng wasn't ready. This additionally makes sure to make an early enough call to add_latent_entropy() to influence the initial stack canary, which is especially important on non-x86 systems where it stays the same through the life of the boot. Link: http://lkml.kernel.org/r/20170626233038.GA48751@beast Signed-off-by: Kees Cook Cc: "Theodore Ts'o" Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: Jessica Yu Cc: Steven Rostedt (VMware) Cc: Viresh Kumar Cc: Tejun Heo Cc: Prarit Bhargava Cc: Lokesh Vutla Cc: Nicholas Piggin Cc: AKASHI Takahiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/char/random.c | 5 +++++ init/main.c | 1 + 2 files changed, 6 insertions(+) commit 9380fa60b10ebd6ee7c3fcdb2cf162f4d7cf9fc5 Author: Mateusz Jurczyk Date: Wed Jul 12 14:34:01 2017 -0700 kernel/sysctl_binary.c: check name array length in deprecated_sysctl_warning() Prevent use of uninitialized memory (originating from the stack frame of do_sysctl()) by verifying that the name array is filled with sufficient input data before comparing its specific entries with integer constants. Through timing measurement or analyzing the kernel debug logs, a user-mode program could potentially infer the results of comparisons against the uninitialized memory, and acquire some (very limited) information about the state of the kernel stack. The change also eliminates possible future warnings by tools such as KMSAN and other code checkers / instrumentations. Link: http://lkml.kernel.org/r/20170524122139.21333-1-mjurczyk@google.com Signed-off-by: Mateusz Jurczyk Acked-by: Kees Cook Cc: "David S. Miller" Cc: Matthew Whitehead Cc: "Eric W. Biederman" Cc: Tetsuo Handa Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl_binary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c43a657a4beadeb6d2fe1a00732261e313a807f Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:58 2017 -0700 test_sysctl: test against int proc_dointvec() array support Add a few initial respective tests for an array: o Echoing values separated by spaces works o Echoing only first elements will set first elements o Confirm PAGE_SIZE limit still applies even if an array is used Link: http://lkml.kernel.org/r/20170630224431.17374-7-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Kees Cook Cc: "Eric W. Biederman" Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_sysctl.c | 13 +++++ tools/testing/selftests/sysctl/sysctl.sh | 89 ++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) commit 2920fad3a5d394b66011c7f35c7b05278354055e Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:55 2017 -0700 test_sysctl: add simple proc_douintvec() case Test against a simple proc_douintvec() case. While at it, add a test against UINT_MAX. Make sure UINT_MAX works, and UINT_MAX+1 will fail and that negative values are not accepted. Link: http://lkml.kernel.org/r/20170630224431.17374-6-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Kees Cook Cc: "Eric W. Biederman" Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_sysctl.c | 11 ++++++ tools/testing/selftests/sysctl/sysctl.sh | 63 ++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) commit eb965eda1cabf26e62afc07a06cdf2fd5aaa2906 Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:52 2017 -0700 test_sysctl: add simple proc_dointvec() case Test against a simple proc_dointvec() case. While at it, add a test against INT_MAX. Make sure INT_MAX works, and INT_MAX+1 will fail. Also test negative values work. Link: http://lkml.kernel.org/r/20170630224431.17374-5-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Kees Cook Cc: "Eric W. Biederman" Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_sysctl.c | 11 ++++++ tools/testing/selftests/sysctl/sysctl.sh | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) commit 1c0357c846452add7c2c863ec372010e3d2ca943 Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:49 2017 -0700 test_sysctl: test against PAGE_SIZE for int Add the following tests to ensure we do not regress: o Test using a buffer full of space (PAGE_SIZE-1) followed by a single digit works o Test using a buffer full of spaces (PAGE_SIZE or over) will fail As tests increase instead of unloading the module and reloading it we can just do a shell reset_vals() with a reset to values we know are set at init on the driver. Link: http://lkml.kernel.org/r/20170630224431.17374-4-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Kees Cook Cc: "Eric W. Biederman" Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/sysctl/sysctl.sh | 66 ++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 64b671204afd71591e774e7237b7c862ac5bbd97 Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:46 2017 -0700 test_sysctl: add generic script to expand on tests This adds a generic script to let us more easily add more tests cases. Since we really have only two types of tests cases just fold them into the one file. Each test unit is now identified into its separate function: # ./sysctl.sh -l Test ID list: TEST_ID x NUM_TEST TEST_ID: Test ID NUM_TESTS: Number of recommended times to run the test 0001 x 1 - tests proc_dointvec_minmax() 0002 x 1 - tests proc_dostring() For now we start off with what we had before, and run only each test once. We can now watch a test case until it fails: ./sysctl.sh -w 0002 We can also run a test case x number of times, say we want to run a test case 100 times: ./sysctl.sh -c 0001 100 To run a test case only once, for example: ./sysctl.sh -s 0002 The default settings are specified at the top of sysctl.sh. Link: http://lkml.kernel.org/r/20170630224431.17374-3-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Kees Cook Cc: "Eric W. Biederman" Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/sysctl/Makefile | 3 +- tools/testing/selftests/sysctl/common_tests | 131 ------- tools/testing/selftests/sysctl/run_numerictests | 10 - tools/testing/selftests/sysctl/run_stringtests | 77 ---- tools/testing/selftests/sysctl/sysctl.sh | 494 ++++++++++++++++++++++++ 5 files changed, 495 insertions(+), 220 deletions(-) commit 9308f2f9e7f055cf3934645ec622bb5259dc1c14 Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:43 2017 -0700 test_sysctl: add dedicated proc sysctl test driver The existing tools/testing/selftests/sysctl/ tests include two test cases, but these use existing production kernel sysctl interfaces. We want to expand test coverage but we can't just be looking for random safe production values to poke at, that's just insane! Instead just dedicate a test driver for debugging purposes and port the existing scripts to use it. This will make it easier for further tests to be added. Subsequent patches will extend our test coverage for sysctl. The stress test driver uses a new license (GPL on Linux, copyleft-next outside of Linux). Linus was fine with this [0] and later due to Ted's and Alans's request ironed out an "or" language clause to use [1] which is already present upstream. [0] https://lkml.kernel.org/r/CA+55aFyhxcvD+q7tp+-yrSFDKfR0mOHgyEAe=f_94aKLsOu0Og@mail.gmail.com [1] https://lkml.kernel.org/r/1495234558.7848.122.camel@linux.intel.com Link: http://lkml.kernel.org/r/20170630224431.17374-2-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Acked-by: Kees Cook Cc: "Eric W. Biederman" Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 11 +++ lib/Makefile | 1 + lib/test_sysctl.c | 113 ++++++++++++++++++++++++ tools/testing/selftests/sysctl/config | 1 + tools/testing/selftests/sysctl/run_numerictests | 4 +- tools/testing/selftests/sysctl/run_stringtests | 4 +- 6 files changed, 130 insertions(+), 4 deletions(-) commit 61d9b56a89208d8cccd0b4cfec7e6959717e16e3 Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:40 2017 -0700 sysctl: add unsigned int range support To keep parity with regular int interfaces provide the an unsigned int proc_douintvec_minmax() which allows you to specify a range of allowed valid numbers. Adding proc_douintvec_minmax_sysadmin() is easy but we can wait for an actual user for that. Link: http://lkml.kernel.org/r/20170519033554.18592-6-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Acked-by: Kees Cook Cc: Subash Abhinov Kasiviswanathan Cc: Heinrich Schuchardt Cc: Kees Cook Cc: "David S. Miller" Cc: Ingo Molnar Cc: Al Viro Cc: "Eric W. Biederman" Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/proc_sysctl.c | 4 ++- include/linux/sysctl.h | 3 +++ kernel/sysctl.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) commit 4f2fec00afa60aa8e5d1b7f2a8e0526900f55623 Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:36 2017 -0700 sysctl: simplify unsigned int support Commit e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields") added proc_douintvec() to start help adding support for unsigned int, this however was only half the work needed. Two fixes have come in since then for the following issues: o Printing the values shows a negative value, this happens since do_proc_dointvec() and this uses proc_put_long() This was fixed by commit 5380e5644afbba9 ("sysctl: don't print negative flag for proc_douintvec"). o We can easily wrap around the int values: UINT_MAX is 4294967295, if we echo in 4294967295 + 1 we end up with 0, using 4294967295 + 2 we end up with 1. o We echo negative values in and they are accepted This was fixed by commit 425fffd886ba ("sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec"). It still also failed to be added to sysctl_check_table()... instead of adding it with the current implementation just provide a proper and simplified unsigned int support without any array unsigned int support with no negative support at all. Historically sysctl proc helpers have supported arrays, due to the complexity this adds though we've taken a step back to evaluate array users to determine if its worth upkeeping for unsigned int. An evaluation using Coccinelle has been done to perform a grammatical search to ask ourselves: o How many sysctl proc_dointvec() (int) users exist which likely should be moved over to proc_douintvec() (unsigned int) ? Answer: about 8 - Of these how many are array users ? Answer: Probably only 1 o How many sysctl array users exist ? Answer: about 12 This last question gives us an idea just how popular arrays: they are not. Array support should probably just be kept for strings. The identified uint ports are: drivers/infiniband/core/ucma.c - max_backlog drivers/infiniband/core/iwcm.c - default_backlog net/core/sysctl_net_core.c - rps_sock_flow_sysctl() net/netfilter/nf_conntrack_timestamp.c - nf_conntrack_timestamp -- bool net/netfilter/nf_conntrack_acct.c nf_conntrack_acct -- bool net/netfilter/nf_conntrack_ecache.c - nf_conntrack_events -- bool net/netfilter/nf_conntrack_helper.c - nf_conntrack_helper -- bool net/phonet/sysctl.c proc_local_port_range() The only possible array users is proc_local_port_range() but it does not seem worth it to add array support just for this given the range support works just as well. Unsigned int support should be desirable more for when you *need* more than INT_MAX or using int min/max support then does not suffice for your ranges. If you forget and by mistake happen to register an unsigned int proc entry with an array, the driver will fail and you will get something as follows: sysctl table check failed: debug/test_sysctl//uint_0002 array now allowed CPU: 2 PID: 1342 Comm: modprobe Tainted: G W E Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Call Trace: dump_stack+0x63/0x81 __register_sysctl_table+0x350/0x650 ? kmem_cache_alloc_trace+0x107/0x240 __register_sysctl_paths+0x1b3/0x1e0 ? 0xffffffffc005f000 register_sysctl_table+0x1f/0x30 test_sysctl_init+0x10/0x1000 [test_sysctl] do_one_initcall+0x52/0x1a0 ? kmem_cache_alloc_trace+0x107/0x240 do_init_module+0x5f/0x200 load_module+0x1867/0x1bd0 ? __symbol_put+0x60/0x60 SYSC_finit_module+0xdf/0x110 SyS_finit_module+0xe/0x10 entry_SYSCALL_64_fastpath+0x1e/0xad RIP: 0033:0x7f042b22d119 Fixes: e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields") Link: http://lkml.kernel.org/r/20170519033554.18592-5-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Suggested-by: Alexey Dobriyan Cc: Subash Abhinov Kasiviswanathan Cc: Liping Zhang Cc: Alexey Dobriyan Cc: Heinrich Schuchardt Cc: Kees Cook Cc: "David S. Miller" Cc: Ingo Molnar Cc: Al Viro Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/proc_sysctl.c | 14 +++++ kernel/sysctl.c | 153 +++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 160 insertions(+), 7 deletions(-) commit d383d48470819e86fe30eb72f0e9494e1ee0e2af Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:33 2017 -0700 sysctl: fold sysctl_writes_strict checks into helper The mode sysctl_writes_strict positional checks keep being copy and pasted as we add new proc handlers. Just add a helper to avoid code duplication. Link: http://lkml.kernel.org/r/20170519033554.18592-4-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Suggested-by: Kees Cook Cc: Al Viro Cc: "Eric W. Biederman" Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl.c | 56 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 24 deletions(-) commit a19ac3374995382a994653ff372b98ea7cbad548 Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:30 2017 -0700 sysctl: kdoc'ify sysctl_writes_strict Document the different sysctl_writes_strict modes in code. Link: http://lkml.kernel.org/r/20170519033554.18592-3-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Al Viro Cc: "Eric W. Biederman" Cc: Alexey Dobriyan Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 89c5b53b16bf577079d4f0311406dbea3c71202c Author: Luis R. Rodriguez Date: Wed Jul 12 14:33:27 2017 -0700 sysctl: fix lax sysctl_check_table() sanity check Patch series "sysctl: few fixes", v5. I've been working on making kmod more deterministic, and as I did that I couldn't help but notice a few issues with sysctl. My end goal was just to fix unsigned int support, which back then was completely broken. Liping Zhang has sent up small atomic fixes, however it still missed yet one more fix and Alexey Dobriyan had also suggested to just drop array support given its complexity. I have inspected array support using Coccinelle and indeed its not that popular, so if in fact we can avoid it for new interfaces, I agree its best. I did develop a sysctl stress driver but will hold that off for another series. This patch (of 5): Commit 7c60c48f58a7 ("sysctl: Improve the sysctl sanity checks") improved sanity checks considerbly, however the enhancements on sysctl_check_table() meant adding a functional change so that only the last table entry's sanity error is propagated. It also changed the way errors were propagated so that each new check reset the err value, this means only last sanity check computed is used for an error. This has been in the kernel since v3.4 days. Fix this by carrying on errors from previous checks and iterations as we traverse the table and ensuring we keep any error from previous checks. We keep iterating on the table even if an error is found so we can complain for all errors found in one shot. This works as -EINVAL is always returned on error anyway, and the check for error is any non-zero value. Fixes: 7c60c48f58a7 ("sysctl: Improve the sysctl sanity checks") Link: http://lkml.kernel.org/r/20170519033554.18592-2-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Al Viro Cc: "Eric W. Biederman" Cc: Alexey Dobriyan Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/proc_sysctl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a711bdc095d2c9b6ad15e737d1cdc46409b09538 Author: Bharat Bhushan Date: Wed Jul 12 14:33:24 2017 -0700 kexec/kdump: minor Documentation updates for arm64 and Image Minor updates in Documentation for arm64 as relocatable kernel. Also this patch updates documentation for using uncompressed image "Image" which is used for ARM64. Link: http://lkml.kernel.org/r/1495104793-6563-1-git-send-email-Bharat.Bhushan@nxp.com Signed-off-by: Bharat Bhushan Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: Jonathan Corbet Cc: AKASHI Takahiro Cc: Pratyush Anand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/kdump/kdump.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 1229384f5b856d83698c38f9dedfd836e26711cb Author: Xunlei Pang Date: Wed Jul 12 14:33:21 2017 -0700 kdump: protect vmcoreinfo data under the crash memory Currently vmcoreinfo data is updated at boot time subsys_initcall(), it has the risk of being modified by some wrong code during system is running. As a result, vmcore dumped may contain the wrong vmcoreinfo. Later on, when using "crash", "makedumpfile", etc utility to parse this vmcore, we probably will get "Segmentation fault" or other unexpected errors. E.g. 1) wrong code overwrites vmcoreinfo_data; 2) further crashes the system; 3) trigger kdump, then we obviously will fail to recognize the crash context correctly due to the corrupted vmcoreinfo. Now except for vmcoreinfo, all the crash data is well protected(including the cpu note which is fully updated in the crash path, thus its correctness is guaranteed). Given that vmcoreinfo data is a large chunk prepared for kdump, we better protect it as well. To solve this, we relocate and copy vmcoreinfo_data to the crash memory when kdump is loading via kexec syscalls. Because the whole crash memory will be protected by existing arch_kexec_protect_crashkres() mechanism, we naturally protect vmcoreinfo_data from write(even read) access under kernel direct mapping after kdump is loaded. Since kdump is usually loaded at the very early stage after boot, we can trust the correctness of the vmcoreinfo data copied. On the other hand, we still need to operate the vmcoreinfo safe copy when crash happens to generate vmcoreinfo_note again, we rely on vmap() to map out a new kernel virtual address and update to use this new one instead in the following crash_save_vmcoreinfo(). BTW, we do not touch vmcoreinfo_note, because it will be fully updated using the protected vmcoreinfo_data after crash which is surely correct just like the cpu crash note. Link: http://lkml.kernel.org/r/1493281021-20737-3-git-send-email-xlpang@redhat.com Signed-off-by: Xunlei Pang Tested-by: Michael Holzheu Cc: Benjamin Herrenschmidt Cc: Dave Young Cc: Eric Biederman Cc: Hari Bathini Cc: Juergen Gross Cc: Mahesh Salgaonkar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/crash_core.h | 2 +- include/linux/kexec.h | 2 ++ kernel/crash_core.c | 17 ++++++++++++++++- kernel/kexec.c | 8 ++++++++ kernel/kexec_core.c | 39 +++++++++++++++++++++++++++++++++++++++ kernel/kexec_file.c | 8 ++++++++ 6 files changed, 74 insertions(+), 2 deletions(-) commit 5203f4995d9a87952a83c2ce7866adbbe8f97bb5 Author: Xunlei Pang Date: Wed Jul 12 14:33:17 2017 -0700 powerpc/fadump: use the correct VMCOREINFO_NOTE_SIZE for phdr vmcoreinfo_max_size stands for the vmcoreinfo_data, the correct one we should use is vmcoreinfo_note whose total size is VMCOREINFO_NOTE_SIZE. Like explained in commit 77019967f06b ("kdump: fix exported size of vmcoreinfo note"), it should not affect the actual function, but we better fix it, also this change should be safe and backward compatible. After this, we can get rid of variable vmcoreinfo_max_size, let's use the corresponding macros directly, fewer variables means more safety for vmcoreinfo operation. [xlpang@redhat.com: fix build warning] Link: http://lkml.kernel.org/r/1494830606-27736-1-git-send-email-xlpang@redhat.com Link: http://lkml.kernel.org/r/1493281021-20737-2-git-send-email-xlpang@redhat.com Signed-off-by: Xunlei Pang Reviewed-by: Mahesh Salgaonkar Reviewed-by: Dave Young Cc: Hari Bathini Cc: Benjamin Herrenschmidt Cc: Eric Biederman Cc: Juergen Gross Cc: Michael Holzheu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kernel/fadump.c | 3 +-- include/linux/crash_core.h | 1 - kernel/crash_core.c | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) commit 203e9e41219b4e7357104e525e91ac609fba2c6c Author: Xunlei Pang Date: Wed Jul 12 14:33:14 2017 -0700 kexec: move vmcoreinfo out of the kernel's .bss section As Eric said, "what we need to do is move the variable vmcoreinfo_note out of the kernel's .bss section. And modify the code to regenerate and keep this information in something like the control page. Definitely something like this needs a page all to itself, and ideally far away from any other kernel data structures. I clearly was not watching closely the data someone decided to keep this silly thing in the kernel's .bss section." This patch allocates extra pages for these vmcoreinfo_XXX variables, one advantage is that it enhances some safety of vmcoreinfo, because vmcoreinfo now is kept far away from other kernel data structures. Link: http://lkml.kernel.org/r/1493281021-20737-1-git-send-email-xlpang@redhat.com Signed-off-by: Xunlei Pang Tested-by: Michael Holzheu Reviewed-by: Juergen Gross Suggested-by: Eric Biederman Cc: Benjamin Herrenschmidt Cc: Dave Young Cc: Hari Bathini Cc: Mahesh Salgaonkar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/kernel/machine_kexec.c | 5 ----- arch/s390/kernel/machine_kexec.c | 1 + arch/s390/kernel/setup.c | 6 ------ arch/x86/kernel/crash.c | 2 +- arch/x86/xen/mmu_pv.c | 4 ++-- include/linux/crash_core.h | 4 ++-- kernel/crash_core.c | 26 ++++++++++++++++++++++---- kernel/ksysfs.c | 2 +- 8 files changed, 29 insertions(+), 21 deletions(-) commit 112166f88cf83dd11486cf1818672d42b540865b Author: Christoph Lameter Date: Wed Jul 12 14:33:11 2017 -0700 kernel/fork.c: virtually mapped stacks: do not disable interrupts The reason to disable interrupts seems to be to avoid switching to a different processor while handling per cpu data using individual loads and stores. If we use per cpu RMV primitives we will not have to disable interrupts. Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1705171055130.5898@east.gentwo.org Signed-off-by: Christoph Lameter Cc: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/fork.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 91a90140f9987101d730b7dad8c6406321285da8 Author: Geert Uytterhoeven Date: Wed Jul 12 14:33:08 2017 -0700 mm/memory.c: mark create_huge_pmd() inline to prevent build failure With gcc 4.1.2: mm/memory.o: In function `create_huge_pmd': memory.c:(.text+0x93e): undefined reference to `do_huge_pmd_anonymous_page' Interestingly, create_huge_pmd() is emitted in the assembler output, but never called. Converting transparent_hugepage_enabled() from a macro to a static inline function reduced the ability of the compiler to remove unused code. Fix this by marking create_huge_pmd() inline. Fixes: 16981d763501c0e0 ("mm: improve readability of transparent_hugepage_enabled()") Link: http://lkml.kernel.org/r/1499842660-10665-1-git-send-email-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7acec713d14c6ce8a20154f9dfda258d6bcad3b Author: Ian Abbott Date: Wed Jul 12 14:33:04 2017 -0700 kernel.h: handle pointers to arrays better in container_of() If the first parameter of container_of() is a pointer to a non-const-qualified array type (and the third parameter names a non-const-qualified array member), the local variable __mptr will be defined with a const-qualified array type. In ISO C, these types are incompatible. They work as expected in GNU C, but some versions will issue warnings. For example, GCC 4.9 produces the warning "initialization from incompatible pointer type". Here is an example of where the problem occurs: ------------------------------------------------------- #include #include MODULE_LICENSE("GPL"); struct st { int a; char b[16]; }; static int __init example_init(void) { struct st t = { .a = 101, .b = "hello" }; char (*p)[16] = &t.b; struct st *x = container_of(p, struct st, b); printk(KERN_DEBUG "%p %p\n", (void *)&t, (void *)x); return 0; } static void __exit example_exit(void) { } module_init(example_init); module_exit(example_exit); ------------------------------------------------------- Building the module with gcc-4.9 results in these warnings (where '{m}' is the module source and '{k}' is the kernel source): ------------------------------------------------------- In file included from {m}/example.c:1:0: {m}/example.c: In function `example_init': {k}/include/linux/kernel.h:854:48: warning: initialization from incompatible pointer type const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ {m}/example.c:14:17: note: in expansion of macro `container_of' struct st *x = container_of(p, struct st, b); ^ {k}/include/linux/kernel.h:854:48: warning: (near initialization for `x') const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ {m}/example.c:14:17: note: in expansion of macro `container_of' struct st *x = container_of(p, struct st, b); ^ ------------------------------------------------------- Replace the type checking performed by the macro to avoid these warnings. Make sure `*(ptr)` either has type compatible with the member, or has type compatible with `void`, ignoring qualifiers. Raise compiler errors if this is not true. This is stronger than the previous behaviour, which only resulted in compiler warnings for a type mismatch. [arnd@arndb.de: fix new warnings for container_of()] Link: http://lkml.kernel.org/r/20170620200940.90557-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20170525120316.24473-7-abbotti@mev.co.uk Signed-off-by: Ian Abbott Signed-off-by: Arnd Bergmann Acked-by: Michal Nazarewicz Acked-by: Kees Cook Cc: Hidehiro Kawai Cc: Borislav Petkov Cc: Rasmus Villemoes Cc: Johannes Berg Cc: Peter Zijlstra Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kernel.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 0a2c13d9cd76c84f2520f573ff83f777eb7464aa Author: Stephen Rothwell Date: Wed Jul 12 14:33:01 2017 -0700 include/linux/dcache.h: use unsigned chars in struct name_snapshot "kernel.h: handle pointers to arrays better in container_of()" triggers: In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/syscalls.h:71, from fs/dcache.c:17: fs/dcache.c: In function 'release_dentry_name_snapshot': include/linux/compiler.h:542:38: error: call to '__compiletime_assert_305' declared with attribute error: pointer type mismatch in container_of() _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^ include/linux/compiler.h:525:4: note: in definition of macro '__compiletime_assert' prefix ## suffix(); \ ^ include/linux/compiler.h:542:2: note: in expansion of macro '_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^ include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ include/linux/kernel.h:860:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ fs/dcache.c:305:7: note: in expansion of macro 'container_of' p = container_of(name->name, struct external_name, name[0]); Switch name_snapshot to use unsigned chars, matching struct qstr and struct external_name. Link: http://lkml.kernel.org/r/20170710152134.0f78c1e6@canb.auug.org.au Signed-off-by: Stephen Rothwell Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/dcache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51e988f4092428e3d2c9f141fba9f86583bc82f3 Author: SeongJae Park Date: Fri Jul 7 03:21:18 2017 +0900 kokr/memory-barriers.txt: Fix obsolete link to atomic_ops.txt Obsolete links to atomic_ops.txt exist in ko_KR/memory-barriers.txt though the file has moved to core-api/atomic_ops.rst. This commit fixes the obsolete links. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Documentation/translations/ko_KR/memory-barriers.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3afadfd902a7477db0b121a3fcbd964d3606c29f Author: SeongJae Park Date: Fri Jul 7 03:21:17 2017 +0900 memory-barriers.txt: Fix broken link to atomic_ops.txt Few obsolete links to atomic_ops.txt exist in memory-barriers.txt though the file has moved to core-api/atomic_ops.rst. This commit fixes the obsolete links. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Documentation/memory-barriers.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6d16e9143e9ef7e4c3f497f1111dfd48eaf2bab6 Author: Jonathan Corbet Date: Wed Jul 12 16:44:38 2017 -0600 docs: Turn off section numbering for the input docs The input docs enable section numbering at multiple levels, leading to a lot of bright-red "nested numbered toctree" warnings in newer Sphinx versions. Just take that directive out for now to help alleviate the global red-pixel shortage. Signed-off-by: Jonathan Corbet Documentation/input/index.rst | 1 - 1 file changed, 1 deletion(-) commit 7d2b39ab9b0d67c3e6c66e3b68644522d4e15392 Author: Jonathan Corbet Date: Wed Jul 12 16:39:31 2017 -0600 docs: Include uaccess docs from the right file Documentation/core-api/kernel-api.rst was including kerneldoc comments from arch/x86/include/asm/uaccess_32.h, but the relevant comments moved to .../uaccess.h some time ago. Correct the include to pick up the comments and eliminate a warning. Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d93b07f8a689cde962d4f97668a74ab76f55734d Author: LABBE Corentin Date: Wed Jul 12 09:32:34 2017 +0200 net: stmmac: revert "support future possible different internal phy mode" Since internal phy-mode is reserved for non-xMII protocol we cannot use it with dwmac-sun8i. Furthermore, all DT patchs which comes with this patch were cleaned, so the current state is broken. This reverts commit 1c2fa5f84683 ("net: stmmac: support future possible different internal phy mode") Fixes: 1c2fa5f84683 ("net: stmmac: support future possible different internal phy mode") Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit c70d68150f71b84cea6997a53493e17bf18a54db Author: Bert Kenward Date: Wed Jul 12 17:19:41 2017 +0100 sfc: don't read beyond unicast address list If we have more than 32 unicast MAC addresses assigned to an interface we will read beyond the end of the address table in the driver when adding filters. The next 256 entries store multicast addresses, so we will end up attempting to insert duplicate filters, which is mostly harmless. If we add more than 288 unicast addresses we will then read past the multicast address table, which is likely to be more exciting. Fixes: 12fb0da45c9a ("sfc: clean fallbacks between promisc/normal in efx_ef10_filter_sync_rx_mode") Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 07b8a7cf9ab58920e0744c74365654ed317c5dfe Merge: 57fe147 d3f6cd9 Author: David S. Miller Date: Wed Jul 12 14:39:44 2017 -0700 Merge branch 'net-doc-fixes' Stephen Hemminger says: ==================== minor net kernel-doc fixes Fix a couple of small errors in kernel-doc for networking ==================== Signed-off-by: David S. Miller commit d3f6cd9e6018db6c468238d902561c92d92cdffd Author: stephen hemminger Date: Wed Jul 12 09:29:07 2017 -0700 datagram: fix kernel-doc comments An underscore in the kernel-doc comment section has special meaning and mis-use generates an errors. ./net/core/datagram.c:207: ERROR: Unknown target name: "msg". ./net/core/datagram.c:379: ERROR: Unknown target name: "msg". ./net/core/datagram.c:816: ERROR: Unknown target name: "t". Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/core/datagram.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 771edcafa753aad304babd3bab8e413574d5db3b Author: stephen hemminger Date: Wed Jul 12 09:29:06 2017 -0700 socket: add documentation for missing elements Fill in missing kernel-doc for missing elements in struct sock. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller include/net/sock.h | 3 +++ 1 file changed, 3 insertions(+) commit 57fe14790b88122fb34b68308b9aa9a643457ea7 Author: Alexey Khoroshilov Date: Wed Jul 12 23:58:56 2017 +0300 smsc911x: Add check for ioremap_nocache() return code There is no check for return code of smsc911x_drv_probe() in smsc911x_drv_probe(). The patch adds one. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smsc911x.c | 5 +++++ 1 file changed, 5 insertions(+) commit 20dd95ef0e1a30e1fc294fa357c3d5cfac735cc8 Merge: 6f7da29 37d644a Author: Rafael J. Wysocki Date: Wed Jul 12 23:34:39 2017 +0200 Merge branch 'for-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq Pull devfreq changes for v4.13 from MyungJoo Ham. * 'for-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: constify attribute_group structures. PM / devfreq: tegra: fix error return code in tegra_devfreq_probe() PM / devfreq: rk3399_dmc: fix error return code in rk3399_dmcfreq_probe() commit 6f37e2102778d3437a416684680cc5ce295f2042 Author: Dan Carpenter Date: Wed Jul 12 10:30:22 2017 +0300 scsi: libfc: pass an error pointer to fc_disc_error() This patch is basically to silence a static checker warning. drivers/scsi/libfc/fc_disc.c:326 fc_disc_error() warn: passing a valid pointer to 'PTR_ERR' It doesn't affect runtime because it treats -ENOMEM and a valid pointer the same. But the documentation says we should be passing an error pointer. Signed-off-by: Dan Carpenter Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_disc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89b203e9d07d4079367120a6fe271ad9e9b751c0 Author: Colin Ian King Date: Tue Jul 11 13:11:44 2017 +0100 scsi: hisi_sas: make several const arrays static Don't populate various tables on the stack but make them static const. Makes the object code smaller by over 280 bytes: Before: text data bss dec hex filename 39887 5080 64 45031 afe7 hisi_sas_v2_hw.o After: text data bss dec hex filename 39318 5368 64 44750 aece hisi_sas_v2_hw.o Signed-off-by: Colin Ian King Acked-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fb2028a0b24e0823bbc0a28e6f0f1bd9fbbf733c Author: Dan Carpenter Date: Mon Jul 10 11:47:40 2017 +0300 scsi: qla2xxx: Off by one in qlt_ctio_to_cmd() There are "req->num_outstanding_cmds" elements in the req->outstanding_cmds[] array so the > here should be >=. Signed-off-by: Dan Carpenter Reviewed-by: Nicholas Bellinger Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68c59fcea1f2c6a54c62aa896cc623c1b5bc9b47 Author: Johannes Thumshirn Date: Fri Jul 7 10:56:38 2017 +0200 scsi: sg: fix SG_DXFER_FROM_DEV transfers SG_DXFER_FROM_DEV transfers do not necessarily have a dxferp as we set it to NULL for the old sg_io read/write interface, but must have a length bigger than 0. This fixes a regression introduced by commit 28676d869bbb ("scsi: sg: check for valid direction before starting the request") Signed-off-by: Johannes Thumshirn Fixes: 28676d869bbb ("scsi: sg: check for valid direction before starting the request") Reported-by: Chris Clayton Tested-by: Chris Clayton Cc: Douglas Gilbert Reviewed-by: Hannes Reinecke Tested-by: Chris Clayton Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit dda5202b001cb59b16a1d20d063edd71e12905b3 Merge: ede2e7c 340d394 Author: Dmitry Torokhov Date: Wed Jul 12 14:17:17 2017 -0700 Merge branch 'next' into for-linus Prepare second round of input updates for 4.13 merge window. commit a680f1d463aeaeb00d22af257a56e111967c2f18 Author: Paolo Bonzini Date: Wed Jul 5 10:30:56 2017 +0200 scsi: virtio_scsi: always read VPD pages for multiqueue too Multi-queue virtio-scsi uses a different scsi_host_template struct. Add the .device_alloc field there, too. Fixes: 25d1d50e23275e141e3a3fe06c25a99f4c4bf4e0 Cc: stable@vger.kernel.org Cc: David Gibson Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Martin K. Petersen drivers/scsi/virtio_scsi.c | 1 + 1 file changed, 1 insertion(+) commit acef2690d16f38a0687552b391674201ad7c5783 Author: Colin Ian King Date: Mon Jul 3 20:21:39 2017 +0100 scsi: qedf: fix spelling mistake: "offlading" -> "offloading" Trivial fix to spelling mistake in QEDF_INFO message and remove duplicated "since" (thanks to Tyrel Datwyler for spotting the latter issue). Signed-off-by: Colin Ian King Acked-by: Chad Dupuis Reviewed-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40bf6a35483ee25271ce2a90d8976cf1409a033a Author: Alexandre Belloni Date: Wed Jul 12 10:23:13 2017 +0200 rtc: Remove wrong deprecation comment rtc_time_to_tm and rtc_tm_to_time are not deprecated and make perfect sense for RTCs that are simple 32bit counters. Signed-off-by: Alexandre Belloni include/linux/rtc.h | 6 ------ 1 file changed, 6 deletions(-) commit 4feca6a52b9812f53bc5c20829fd4e37e710db34 Author: Colin Ian King Date: Mon Jul 3 11:24:02 2017 +0100 scsi: qedi: fix another spelling mistake: "alloction" -> "allocation" Trivial fix to spelling mistake in QEDF_ERR message. I should have also included this in a previous fix, but I only just spotted this one. Signed-off-by: Colin Ian King Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5f44c6ffe0b39ee37e1d2963ee0d48cbc1ec038 Author: Colin Ian King Date: Mon Jul 3 11:17:27 2017 +0100 scsi: isci: fix typo in function names There are a couple of typos in function names and spelling of request where the letters u and e are swapped: scu_ssp_reqeust_construct_task_context scu_sata_reqeust_construct_task_context Fix the spelling of request. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/isci/request.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 0ce3fcaff92908c370334ce3b9111aeea71159d6 Author: Rafael J. Wysocki Date: Wed Jul 12 03:05:39 2017 +0200 PCI / PM: Restore PME Enable after config space restoration Commit dc15e71eefc7 (PCI / PM: Restore PME Enable if skipping wakeup setup) introduced a mechanism by which the PME Enable bit can be restored by pci_enable_wake() if dev->wakeup_prepared is set in case it has been overwritten by PCI config space restoration. However, that commit overlooked the fact that on some systems (Dell XPS13 9360 in particular) the AML handling wakeup events checks PME Status and PME Enable and it won't trigger a Notify() for devices where those bits are not set while it is running. That happens during resume from suspend-to-idle when pci_restore_state() invoked by pci_pm_default_resume_early() clears PME Enable before the wakeup events are processed by AML, effectively causing those wakeup events to be ignored. Fix this issue by restoring the PME Enable configuration right after pci_restore_state() has been called instead of doing that in pci_enable_wake(). Fixes: dc15e71eefc7 (PCI / PM: Restore PME Enable if skipping wakeup setup) Signed-off-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas drivers/pci/pci-driver.c | 2 ++ drivers/pci/pci.c | 16 ++++++++-------- drivers/pci/pci.h | 1 + 3 files changed, 11 insertions(+), 8 deletions(-) commit eeac8cda2c957e156093933b860eec09e488fe15 Author: Dan Carpenter Date: Fri Jun 30 11:01:06 2017 +0300 scsi: cxlflash: return -EFAULT if copy_from_user() fails The copy_from/to_user() functions return the number of bytes remaining to be copied but we had intended to return -EFAULT here. Fixes: bc88ac47d5cb ("scsi: cxlflash: Support AFU debug") Signed-off-by: Dan Carpenter Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c3a73ed8a82b666ac01466d3badd7824eae89c44 Author: Hans de Goede Date: Wed Jul 12 13:15:11 2017 +0200 platform/x86: silead_dmi: Add entry for Ployer Momo7w tablet touchscreen This Ployer Momo7w revision has the same hardware as the Trekstor ST70416-6, so we re-use the surftab_wintron70_st70416_6_data. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/silead_dmi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c57ec8fb7c025322f25a077afc94e0ef18cc3d89 Author: Nilesh Javali Date: Tue Jun 27 02:26:56 2017 -0700 scsi: qedi: Add support for Boot from SAN over iSCSI offload This patch adds support for Boot from SAN over iSCSI offload. The iSCSI boot information in the NVRAM is populated under /sys/firmware/iscsi_bootX/ using qed NVM-image reading API and further exported to open-iscsi to perform iSCSI login enabling boot over offload iSCSI interface in a Boot from SAN environment. Signed-off-by: Arun Easi Signed-off-by: Andrew Vasquez Signed-off-by: Manish Rangankar Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi.h | 17 ++ drivers/scsi/qedi/qedi_main.c | 419 +++++++++++++++++++++++++++++++++ drivers/scsi/qedi/qedi_nvm_iscsi_cfg.h | 210 +++++++++++++++++ 3 files changed, 646 insertions(+) commit 286de8f6ac9202f1c9012784639156c6ec386eb8 Author: Claudio Imbrenda Date: Wed Jul 12 17:56:44 2017 +0200 KVM: trigger uevents when creating or destroying a VM This patch adds a few lines to the KVM common code to fire a KOBJ_CHANGE uevent whenever a KVM VM is created or destroyed. The event carries five environment variables: CREATED indicates how many times a new VM has been created. It is useful for example to trigger specific actions when the first VM is started COUNT indicates how many VMs are currently active. This can be used for logging or monitoring purposes PID has the pid of the KVM process that has been started or stopped. This can be used to perform process-specific tuning. STATS_PATH contains the path in debugfs to the directory with all the runtime statistics for this VM. This is useful for performance monitoring and profiling. EVENT described the type of event, its value can be either "create" or "destroy" Specific udev rules can be then set up in userspace to deal with the creation or destruction of VMs as needed. Signed-off-by: Claudio Imbrenda Signed-off-by: Radim Krčmář virt/kvm/kvm_main.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 89c8a4984fc98e625517bfe5083342d77ee35811 Author: Janakarajan Natarajan Date: Thu Jul 6 15:50:47 2017 -0500 KVM: SVM: Enable Virtual VMLOAD VMSAVE feature Enable the Virtual VMLOAD VMSAVE feature. This is done by setting bit 1 at position B8h in the vmcb. The processor must have nested paging enabled, be in 64-bit mode and have support for the Virtual VMLOAD VMSAVE feature for the bit to be set in the vmcb. Signed-off-by: Janakarajan Natarajan Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/include/asm/svm.h | 1 + arch/x86/kvm/svm.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit 76ff359249f1e80ff0d6ced3b52b1088c4e61b9b Author: Janakarajan Natarajan Date: Thu Jul 6 15:50:46 2017 -0500 KVM: SVM: Add Virtual VMLOAD VMSAVE feature definition Define a new cpufeature definition for Virtual VMLOAD VMSAVE. Signed-off-by: Janakarajan Natarajan Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) commit 0dc92119b50be539a5480d72a00ae8098bdba2fc Author: Janakarajan Natarajan Date: Thu Jul 6 15:50:45 2017 -0500 KVM: SVM: Rename lbr_ctl field in the vmcb control area Rename the lbr_ctl variable to better reflect the purpose of the field - provide support for virtualization extensions. Signed-off-by: Janakarajan Natarajan Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/include/asm/svm.h | 2 +- arch/x86/kvm/svm.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 8a77e90966e92759f94087f9845d413290be0d70 Author: Janakarajan Natarajan Date: Thu Jul 6 15:50:44 2017 -0500 KVM: SVM: Prepare for new bit definition in lbr_ctl The lbr_ctl variable in the vmcb control area is used to enable or disable Last Branch Record (LBR) virtualization. However, this is to be done using only bit 0 of the variable. To correct this and to prepare for a new feature, change the current usage to work only on a particular bit. Signed-off-by: Janakarajan Natarajan Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/include/asm/svm.h | 2 ++ arch/x86/kvm/svm.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit b742c1e6e79ddf4192d76336da2407c65ca7242f Author: Ladi Prosek Date: Thu Jun 22 09:05:26 2017 +0200 KVM: SVM: handle singlestep exception when skipping emulated instructions kvm_skip_emulated_instruction handles the singlestep debug exception which is something we almost always want. This commit (specifically the change in rdmsr_interception) makes the debug.flat KVM unit test pass on AMD. Two call sites still call skip_emulated_instruction directly: * In svm_queue_exception where it's used only for moving the rip forward * In task_switch_interception which is analogous to handle_task_switch in VMX Signed-off-by: Ladi Prosek Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 59 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 26 deletions(-) commit fb5307298e49ec1668c3a9ec888c1b9da4347395 Author: Radim Krčmář Date: Mon Jul 10 20:53:28 2017 +0200 KVM: x86: take slots_lock in kvm_free_pit kvm_vm_release() did not have slots_lock when calling kvm_io_bus_unregister_dev() and this went unnoticed until 4a12f9517728 ("KVM: mark kvm->busses as rcu protected") added dynamic checks. Luckily, there should be no race at that point: ============================= WARNING: suspicious RCU usage 4.12.0.kvm+ #0 Not tainted ----------------------------- ./include/linux/kvm_host.h:479 suspicious rcu_dereference_check() usage! lockdep_rcu_suspicious+0xc5/0x100 kvm_io_bus_unregister_dev+0x173/0x190 [kvm] kvm_free_pit+0x28/0x80 [kvm] kvm_arch_sync_events+0x2d/0x30 [kvm] kvm_put_kvm+0xa7/0x2a0 [kvm] kvm_vm_release+0x21/0x30 [kvm] Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/i8254.c | 2 ++ 1 file changed, 2 insertions(+) commit 949c033694864082db9b3f5304723a6d7407f8e2 Author: Gleb Fotengauer-Malinovskiy Date: Tue Jul 11 00:22:33 2017 +0300 KVM: s390: Fix KVM_S390_GET_CMMA_BITS ioctl definition In case of KVM_S390_GET_CMMA_BITS, the kernel does not only read struct kvm_s390_cmma_log passed from userspace (which constitutes _IOC_WRITE), it also writes back a return value (which constitutes _IOC_READ) making this an _IOWR ioctl instead of _IOW. Fixes: 4036e387 ("KVM: s390: ioctls to get and set guest storage attributes") Signed-off-by: Gleb Fotengauer-Malinovskiy Acked-by: Christian Borntraeger Signed-off-by: Radim Krčmář include/uapi/linux/kvm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48ae0fb49b2e8380e60c5072f18005c8a98c6520 Author: Jim Mattson Date: Mon May 22 09:48:33 2017 -0700 kvm: vmx: Properly handle machine check during VM-entry vmx_complete_atomic_exit should call kvm_machine_check for any VM-entry failure due to a machine-check event. Such an exit should be recognized solely by its basic exit reason (i.e. the low 16 bits of the VMCS exit reason field). None of the other VMCS exit information fields contain valid information when the VM-exit is due to "VM-entry failure due to machine-check event". Signed-off-by: Jim Mattson Reviewed-by: Xiao Guangrong [Changed VM_EXIT_INTR_INFO condition to better describe its reason.] Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 0bc48bea36d178aea9d7f83f66a1b397cec9db5c Author: Radim Krčmář Date: Tue May 16 22:50:00 2017 +0200 KVM: x86: update master clock before computing kvmclock_offset kvm master clock usually has a different frequency than the kernel boot clock. This is not a problem until the master clock is updated; update uses the current kernel boot clock to compute new kvm clock, which erases any kvm clock cycles that might have built up due to frequency difference over a long period. KVM_SET_CLOCK is one of places where we can safely update master clock as the guest-visible clock is going to be shifted anyway. The problem with current code is that it updates the kvm master clock after updating the offset. If the master clock was enabled before calling KVM_SET_CLOCK, then it might have built up a significant delta from kernel boot clock. In the worst case, the time set by userspace would be shifted by so much that it couldn't have been set at any point during KVM_SET_CLOCK. To fix this, move kvm_gen_update_masterclock() before computing kvmclock_offset, which means that the master clock and kernel boot clock will be sufficiently close together. Another solution would be to replace get_kvmclock_ns() with "ktime_get_boot_ns() + ka->kvmclock_offset", which is marginally more accurate, but would break symmetry with KVM_GET_CLOCK. Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 630458e730b82efe1f6eb90e6bcabad02fe76e20 Author: J. Bruce Fields Date: Thu May 11 14:45:06 2017 -0400 nfsd4: factor ctime into change attribute Factoring ctime into the nfsv4 change attribute gives us better properties than just i_version alone. Eventually we'll likely also expose this (as opposed to raw i_version) to userspace, at which point we'll want to move it to a common helper, called from either userspace or individual filesystems. For now, nfsd is the only user. Signed-off-by: J. Bruce Fields fs/nfsd/nfs3xdr.c | 2 +- fs/nfsd/nfs4xdr.c | 2 +- fs/nfsd/nfsfh.h | 24 +++++++++++++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) commit 35a30fc389b5961b42bb73ef751f3bc85190a118 Author: Chuck Lever Date: Fri Jun 23 17:19:29 2017 -0400 svcrdma: Remove svc_rdma_chunk_ctxt::cc_dir field Clean up: No need to save the I/O direction. The functions that release svc_rdma_chunk_ctxt already know what direction to use. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_rw.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 91b022ec8b1214d0fdfc503be305a19e6f7c5164 Author: Chuck Lever Date: Fri Jun 23 17:19:21 2017 -0400 svcrdma: use offset_in_page() macro Clean up: Use offset_in_page() macro instead of open-coding. Reported-by: Geliang Tang Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_rw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9450ca8e2febb0000a5efd4f5870915d59ae62bc Author: Chuck Lever Date: Fri Jun 23 17:19:13 2017 -0400 svcrdma: Clean up after converting svc_rdma_recvfrom to rdma_rw API Clean up: Registration mode details are now handled by the rdma_rw API, and thus can be removed from svcrdma. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 4 ---- net/sunrpc/xprtrdma/svc_rdma_transport.c | 39 ++++---------------------------- 2 files changed, 4 insertions(+), 39 deletions(-) commit 0d956e694ad2d4b8fb3940dc19e738e1fc158353 Author: Chuck Lever Date: Fri Jun 23 17:19:05 2017 -0400 svcrdma: Clean-up svc_rdma_unmap_dma There's no longer a need to compare each SGE's lkey with the PD's local_dma_lkey. Now that FRWR is gone, all DMA mappings are for pages that were registered with this key. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_transport.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 463e63d7014442002399903af027b63ae38f6e77 Author: Chuck Lever Date: Fri Jun 23 17:18:57 2017 -0400 svcrdma: Remove frmr cache Clean up: Now that the svc_rdma_recvfrom path uses the rdma_rw API, the details of Read sink buffer registration are dealt with by the kernel's RDMA core. This cache is no longer used, and can be removed. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 18 ------- net/sunrpc/xprtrdma/svc_rdma_transport.c | 86 -------------------------------- 2 files changed, 104 deletions(-) commit c84dc900d737a8d8f08768622226980ee863403b Author: Chuck Lever Date: Fri Jun 23 17:18:49 2017 -0400 svcrdma: Remove unused Read completion handlers Clean up: The generic RDMA R/W API conversion of svc_rdma_recvfrom replaced the Register, Read, and Invalidate completion handlers. Remove the old ones, which are no longer used. These handlers shared some helper code with svc_rdma_wc_send. Fold the wc_common helper back into the one remaining completion handler. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 4 +- net/sunrpc/xprtrdma/svc_rdma_transport.c | 93 ++++---------------------------- 2 files changed, 10 insertions(+), 87 deletions(-) commit 71641d99ce037ea226f94d5e08f2a8f71eba08f4 Author: Chuck Lever Date: Fri Jun 23 17:18:41 2017 -0400 svcrdma: Properly compute .len and .buflen for received RPC Calls When an RPC-over-RDMA request is received, the Receive buffer contains a Transport Header possibly followed by an RPC message. Even though rq_arg.head[0] (as passed to NFSD) does not contain the Transport Header header, currently rq_arg.len includes the size of the Transport Header. That violates the intent of the xdr_buf API contract. .buflen should include everything, but .len should be exactly the length of the RPC message in the buffer. The rq_arg fields are summed together at the end of svc_rdma_recvfrom to obtain the correct return value. rq_arg.len really ought to contain the correct number of bytes already, but it currently doesn't due to the above misbehavior. Let's instead ensure that .buflen includes the length of the transport header, and that .len is always equal to head.iov_len + .page_len + tail.iov_len . Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 14 ++++---------- net/sunrpc/xprtrdma/svc_rdma_rw.c | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) commit cafc739892f34b9090413179ca259409fc43bfae Author: Chuck Lever Date: Fri Jun 23 17:18:33 2017 -0400 svcrdma: Use generic RDMA R/W API in RPC Call path The current svcrdma recvfrom code path has a lot of detail about registration mode and the type of port (iWARP, IB, etc). Instead, use the RDMA core's generic R/W API. This shares code with other RDMA-enabled ULPs that manages the gory details of buffer registration and the posting of RDMA Read Work Requests. Since the Read list marshaling code is being replaced, I took the opportunity to replace C structure-based XDR encoding code with more portable code that uses pointer arithmetic. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 14 - net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 547 ++++++------------------------- net/sunrpc/xprtrdma/svc_rdma_transport.c | 13 - 3 files changed, 106 insertions(+), 468 deletions(-) commit 026d958b38c628a1b4ced534808945365e2747a5 Author: Chuck Lever Date: Fri Jun 23 17:18:24 2017 -0400 svcrdma: Add recvfrom helpers to svc_rdma_rw.c svc_rdma_rw.c already contains helpers for the sendto path. Introduce helpers for the recvfrom path. The plan is to replace the local NFSD bespoke code that constructs and posts RDMA Read Work Requests with calls to the rdma_rw API. This shares code with other RDMA-enabled ULPs that manages the gory details of buffer registration and posting Work Requests. This new code also puts all RDMA_NOMSG-specific logic in one place. Lastly, the use of rqstp->rq_arg.pages is deprecated in favor of using rqstp->rq_pages directly, for clarity. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 3 + net/sunrpc/xprtrdma/svc_rdma_rw.c | 425 +++++++++++++++++++++++++++++++++++++- 2 files changed, 427 insertions(+), 1 deletion(-) commit 8c6ae4980e70395cbdfdf605c29673c5a6a89d9a Author: Chuck Lever Date: Fri Jun 30 12:03:54 2017 -0400 sunrpc: Allocate up to RPCSVC_MAXPAGES per svc_rqst svcrdma needs 259 pages allocated to receive 1MB NFSv4.0 WRITE requests: - 1 page for the transport header and head iovec - 256 pages for the data payload - 1 page for the trailing GETATTR request (since NFSD XDR decoding does not look for a tail iovec, the GETATTR is stuck at the end of the rqstp->rq_arg.pages list) - 1 page for building the reply xdr_buf But RPCSVC_MAXPAGES is already 259 (on x86_64). The problem is that svc_alloc_arg never allocates that many pages. To address this: 1. The final element of rq_pages always points to NULL. To accommodate up to 259 pages in rq_pages, add an extra element to rq_pages for the array termination sentinel. 2. Adjust the calculation of "pages" to match how RPCSVC_MAXPAGES is calculated, so it can go up to 259. Bruce noted that the calculation assumes sv_max_mesg is a multiple of PAGE_SIZE, which might not always be true. I didn't change this assumption. 3. Change the loop boundaries to allow 259 pages to be allocated. Additional clean-up: WARN_ON_ONCE adds an extra conditional branch, which is basically never taken. And there's no need to dump the stack here because svc_alloc_arg has only one caller. Keeping that NULL "array termination sentinel"; there doesn't appear to be any code that depends on it, only code in nfsd_splice_actor() which needs the 259th element to be initialized to *something*. So it's possible we could just keep the array at 259 elements and drop that final NULL, but we're being conservative for now. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc.h | 2 +- net/sunrpc/svc_xprt.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) commit 340d394a789518018f834ff70f7534fc463d3226 Author: Chen Hong Date: Sun Jul 2 15:11:10 2017 -0700 Input: i8042 - fix crash at boot time The driver checks port->exists twice in i8042_interrupt(), first when trying to assign temporary "serio" variable, and second time when deciding whether it should call serio_interrupt(). The value of port->exists may change between the 2 checks, and we may end up calling serio_interrupt() with a NULL pointer: BUG: unable to handle kernel NULL pointer dereference at 0000000000000050 IP: [] _spin_lock_irqsave+0x1f/0x40 PGD 0 Oops: 0002 [#1] SMP last sysfs file: CPU 0 Modules linked in: Pid: 1, comm: swapper Not tainted 2.6.32-358.el6.x86_64 #1 QEMU Standard PC (i440FX + PIIX, 1996) RIP: 0010:[] [] _spin_lock_irqsave+0x1f/0x40 RSP: 0018:ffff880028203cc0 EFLAGS: 00010082 RAX: 0000000000010000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000282 RSI: 0000000000000098 RDI: 0000000000000050 RBP: ffff880028203cc0 R08: ffff88013e79c000 R09: ffff880028203ee0 R10: 0000000000000298 R11: 0000000000000282 R12: 0000000000000050 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000098 FS: 0000000000000000(0000) GS:ffff880028200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 0000000000000050 CR3: 0000000001a85000 CR4: 00000000001407f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper (pid: 1, threadinfo ffff88013e79c000, task ffff88013e79b500) Stack: ffff880028203d00 ffffffff813de186 ffffffffffffff02 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000098 ffff880028203d70 ffffffff813e0162 ffff880028203d20 ffffffff8103b8ac Call Trace: [] serio_interrupt+0x36/0xa0 [] i8042_interrupt+0x132/0x3a0 [] ? kvm_clock_read+0x1c/0x20 [] ? kvm_clock_get_cycles+0x9/0x10 [] handle_IRQ_event+0x60/0x170 [] ? kvm_guest_apic_eoi_write+0x44/0x50 [] handle_edge_irq+0xde/0x180 [] handle_irq+0x49/0xa0 [] do_IRQ+0x6c/0xf0 [] ret_from_intr+0x0/0x11 [] ? __do_softirq+0x73/0x1e0 [] ? hrtimer_interrupt+0x14b/0x260 [] ? call_softirq+0x1c/0x30 [] ? do_softirq+0x65/0xa0 [] ? irq_exit+0x85/0x90 [] ? smp_apic_timer_interrupt+0x70/0x9b [] ? apic_timer_interrupt+0x13/0x20 To avoid the issue let's change the second check to test whether serio is NULL or not. Also, let's take i8042_lock in i8042_start() and i8042_stop() instead of trying to be overly smart and using memory barriers. Signed-off-by: Chen Hong [dtor: take lock in i8042_start()/i8042_stop()] Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 34d5ac2af644a10958e144b7bb937d289dfd158d Author: Shawn Lin Date: Tue Jul 11 18:15:08 2017 +0800 PCI: rockchip: Check for pci_scan_root_bus_bridge() failure correctly pci_scan_root_bus_bridge() returns zero for success, or a negative errno. A typo in ae13cb9b1926 ("PCI: rockchip: Convert PCI scan API to pci_scan_root_bus_bridge()") treated zero as a failure. Fix the typo. Fixes: ae13cb9b1926 ("PCI: rockchip: Convert PCI scan API to pci_scan_root_bus_bridge()") Signed-off-by: Shawn Lin [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Acked-by: Lorenzo Pieralisi drivers/pci/host/pcie-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9091b1c654953cc9615f282704a6df8e31549cf Author: Subhransu S. Prusty Date: Wed Jul 12 20:12:04 2017 +0530 ALSA: hda - Add hdmi id for a Geminilake variant Few GLK platform variants report a different vendor id. Add it. Also add the missing check for GLK in is_haswell_plus(). Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 235b84fc862ae2637dc0dabada18d97f1bfc18e1 Merge: fb4e3be 8f1a357 Author: Linus Torvalds Date: Wed Jul 12 10:04:56 2017 -0700 Merge branch 'i2c/for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "This pull request contains: - i2c core reorganization. One source file became too monolithic. It is now split up, yet we still have the same named object as the final output. This should ease maintenance. - new drivers: ZTE ZX2967 family, ASPEED 24XX/25XX - designware driver gained slave mode support - xgene-slimpro driver gained ACPI support - bigger overhaul for pca-platform driver - the algo-bit module now supports messages with enforced STOP - slightly bigger than usual set of driver updates and improvements and with much appreciated quality assurance from Andy Shevchenko" * 'i2c/for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (51 commits) i2c: Provide a stub for i2c_detect_slave_mode() i2c: designware: Let slave adapter support be optional i2c: designware: Make HW init functions static i2c: designware: fix spelling mistakes i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus i2c: pca-platform: correctly set algo_data.reset_chip i2c: acpi: Do not create i2c-clients for LNXVIDEO ACPI devices i2c: designware: enable SLAVE in platform module i2c: designware: add SLAVE mode functions i2c: zx2967: drop COMPILE_TEST dependency i2c: zx2967: always use the same device when printing errors i2c: pca-platform: use dev_warn/dev_info instead of printk i2c: pca-platform: use device managed allocations i2c: pca-platform: add devicetree awareness i2c: pca-platform: switch to struct gpio_desc dt-bindings: add bindings for i2c-pca-platform i2c: cadance: fix ctrl/addr reg write order i2c: zx2967: add i2c controller driver for ZTE's zx2967 family dt: bindings: add documentation for zx2967 family i2c controller i2c: algo-bit: add support for I2C_M_STOP ... commit fb4e3beeffa47619985f190663c6ef424f063a22 Merge: 6b1c776 6a70864 Author: Linus Torvalds Date: Wed Jul 12 10:00:04 2017 -0700 Merge tag 'iommu-updates-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: "This update comes with: - Support for lockless operation in the ARM io-pgtable code. This is an important step to solve the scalability problems in the common dma-iommu code for ARM - Some Errata workarounds for ARM SMMU implemenations - Rewrite of the deferred IO/TLB flush code in the AMD IOMMU driver. The code suffered from very high flush rates, with the new implementation the flush rate is down to ~1% of what it was before - Support for amd_iommu=off when booting with kexec. The problem here was that the IOMMU driver bailed out early without disabling the iommu hardware, if it was enabled in the old kernel - The Rockchip IOMMU driver is now available on ARM64 - Align the return value of the iommu_ops->device_group call-backs to not miss error values - Preempt-disable optimizations in the Intel VT-d and common IOVA code to help Linux-RT - Various other small cleanups and fixes" * tag 'iommu-updates-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (60 commits) iommu/vt-d: Constify intel_dma_ops iommu: Warn once when device_group callback returns NULL iommu/omap: Return ERR_PTR in device_group call-back iommu: Return ERR_PTR() values from device_group call-backs iommu/s390: Use iommu_group_get_for_dev() in s390_iommu_add_device() iommu/vt-d: Don't disable preemption while accessing deferred_flush() iommu/iova: Don't disable preempt around this_cpu_ptr() iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #126 iommu/arm-smmu-v3: Enable ACPI based HiSilicon CMD_PREFETCH quirk(erratum 161010701) iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #74 ACPI/IORT: Fixup SMMUv3 resource size for Cavium ThunderX2 SMMUv3 model iommu/arm-smmu-v3, acpi: Add temporary Cavium SMMU-V3 IORT model number definitions iommu/io-pgtable-arm: Use dma_wmb() instead of wmb() when publishing table iommu/io-pgtable: depend on !GENERIC_ATOMIC64 when using COMPILE_TEST with LPAE iommu/arm-smmu-v3: Remove io-pgtable spinlock iommu/arm-smmu: Remove io-pgtable spinlock iommu/io-pgtable-arm-v7s: Support lockless operation iommu/io-pgtable-arm: Support lockless operation iommu/io-pgtable: Introduce explicit coherency iommu/io-pgtable-arm-v7s: Refactor split_blk_unmap ... commit 85fd514e24238a633c971332aa96a2e5c4ddd502 Author: Jim Mattson Date: Fri Jul 7 12:51:41 2017 -0700 kvm: nVMX: Shadow "high" parts of shadowed 64-bit VMCS fields Inconsistencies result from shadowing only accesses to the full 64-bits of a 64-bit VMCS field, but not shadowing accesses to the high 32-bits of the field. The "high" part of a 64-bit field should be shadowed whenever the full 64-bit field is shadowed. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 60 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 26 deletions(-) commit 5fa99cbe7b666dce6dd8ac55b253778893b9c5df Author: Jim Mattson Date: Thu Jul 6 16:33:07 2017 -0700 kvm: nVMX: Fix nested_vmx_check_msr_bitmap_controls Allow the L1 guest to specify the last page of addressable guest physical memory for an L2 MSR permission bitmap. Also remove the vmcs12_read_any() check that should never fail. Fixes: 3af18d9c5fe95 ("KVM: nVMX: Prepare for using hardware MSR bitmap") Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 56a205100d3933f785ca970c58aecedd94ff90b2 Author: Jim Mattson Date: Thu Jul 6 16:33:06 2017 -0700 kvm: nVMX: Validate the I/O bitmaps on nested VM-entry According to the SDM, if the "use I/O bitmaps" VM-execution control is 1, bits 11:0 of each I/O-bitmap address must be 0. Neither address should set any bits beyond the processor's physical-address width. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7cdc2d62f9cce8a02eb2a5fbfca6813f04189487 Author: Jim Mattson Date: Thu Jul 6 16:33:05 2017 -0700 kvm: nVMX: Don't set vmcs12 to "launched" when VMLAUNCH fails The VMCS launch state is not set to "launched" unless the VMLAUNCH actually succeeds. VMLAUNCH failure includes VM-exits with bit 31 set. Note that this change does not address the general problem that a failure to launch/resume vmcs02 (i.e. vmx->fail) is not handled correctly. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b1c776d3efbda31085b6a9f3bc7f774511fafd9 Merge: 58c7ffc f4439de Author: Linus Torvalds Date: Wed Jul 12 09:28:55 2017 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: "This work from Amir introduces the inodes index feature, which provides: - hardlinks are not broken on copy up - infrastructure for overlayfs NFS export This also fixes constant st_ino for samefs case for lower hardlinks" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: (33 commits) ovl: mark parent impure and restore timestamp on ovl_link_up() ovl: document copying layers restrictions with inodes index ovl: cleanup orphan index entries ovl: persistent overlay inode nlink for indexed inodes ovl: implement index dir copy up ovl: move copy up lock out ovl: rearrange copy up ovl: add flag for upper in ovl_entry ovl: use struct copy_up_ctx as function argument ovl: base tmpfile in workdir too ovl: factor out ovl_copy_up_inode() helper ovl: extract helper to get temp file in copy up ovl: defer upper dir lock to tempfile link ovl: hash overlay non-dir inodes by copy up origin ovl: cleanup bad and stale index entries on mount ovl: lookup index entry for copy up origin ovl: verify index dir matches upper dir ovl: verify upper root dir matches lower root dir ovl: introduce the inodes index dir feature ovl: generalize ovl_create_workdir() ... commit 4c99ceda0d067c06f228a27b6870f548d3218cc6 Author: Benjamin Gaignard Date: Wed Jul 12 18:28:11 2017 +0200 fbdev: make get_fb_unmapped_area depends of !MMU Even if CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA flag is selected do not compile and use get_fb_unmapped_area() if CONFIG_MMU is also set. This will avoid mmap errors when compiling multi architectures at same time. Signed-off-by: Benjamin Gaignard Reviewed-by: Daniel Vetter Cc: Noralf Trønnes Cc: Emil Velikov Cc: Yannick Fertre Cc: Eric Engestrom Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/core/fbmem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fa43bc2a5a041c8935c1f6f5f8ab2d57efdd9644 Author: Arnd Bergmann Date: Wed Jul 12 18:28:10 2017 +0200 atyfb: hide unused variable The vdisplay variable is now only accessed inside of an #ifdef, producing a harmless warning: drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_var_to_crtc': drivers/video/fbdev/aty/atyfb_base.c:805:19: error: unused variable 'vdisplay' [-Werror=unused-variable] This moves the declaration into the ifdef as well. Fixes: dd7d958ae912 ("video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()") Signed-off-by: Arnd Bergmann Cc: "Gustavo A. R. Silva" Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/atyfb_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6409e84ec58fc4c0085d8921f8e01815dc871971 Author: Artur Paszkiewicz Date: Tue Jul 11 16:16:24 2017 +0200 raid5-ppl: use BIOSET_NEED_BVECS when creating bioset This bioset is used for allocating bios with nr_iovecs > 0 so this flag must be set. Fixes: 011067b05668 ("blk: replace bioset_create_nobvec() with a flags arg to bioset_create()") Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-ppl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58c7ffc0747a3a9145629d4966291f0586703767 Author: Al Viro Date: Wed Jul 12 04:59:45 2017 +0100 fix a braino in compat_sys_getrlimit() Reported-and-tested-by: Meelis Roos Fixes: commit d9e968cb9f84 "getrlimit()/setrlimit(): move compat to native" Signed-off-by: Al Viro Acked-by: David S. Miller Signed-off-by: Linus Torvalds kernel/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f44c9a41386729fea410e688959ddaa9d51be7c Author: Arend van Spriel Date: Fri Jul 7 21:09:06 2017 +0100 brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx() The lower level nl80211 code in cfg80211 ensures that "len" is between 25 and NL80211_ATTR_FRAME (2304). We subtract DOT11_MGMT_HDR_LEN (24) from "len" so thats's max of 2280. However, the action_frame->data[] buffer is only BRCMF_FIL_ACTION_FRAME_SIZE (1800) bytes long so this memcpy() can overflow. memcpy(action_frame->data, &buf[DOT11_MGMT_HDR_LEN], le16_to_cpu(action_frame->len)); Cc: stable@vger.kernel.org # 3.9.x Fixes: 18e2f61db3b70 ("brcmfmac: P2P action frame tx.") Reported-by: "freenerguo(郭大兴)" Signed-off-by: Arend van Spriel Signed-off-by: David S. Miller drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 +++++ 1 file changed, 5 insertions(+) commit 76b825ab870be3281edac4ae8a414da6e54b0d3a Author: Lin Yun Sheng Date: Wed Jul 12 19:09:59 2017 +0800 net: hns: Bugfix for Tx timeout handling in hns driver When hns port type is not debug mode, netif_tx_disable is called when there is a tx timeout, which requires system reboot to return to normal state. This patch fix this problem by resetting the net dev. Fixes: b5996f11ea54 ("net: add Hisilicon Network Subsystem basic ethernet support") Signed-off-by: Lin Yun Sheng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 2e3d232e139a7128e2494a840a8a00fb9ab65f45 Author: Dan Carpenter Date: Wed Jul 12 10:56:47 2017 +0300 net: ipmr: ipmr_get_table() returns NULL The ipmr_get_table() function doesn't return error pointers it returns NULL on error. Fixes: 4f75ba6982bc ("net: ipmr: Add ipmr_rtm_getroute") Signed-off-by: Dan Carpenter Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/ipmr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88f0f09b3ab7d817b897cedbd7a05a565ff4f75a Author: Dan Carpenter Date: Wed Jul 12 10:42:06 2017 +0300 nfp: freeing the wrong variable We accidentally free a NULL pointer and leak the pointer we want to free. Also you can tell from the label name what was intended. :) Fixes: abfcdc1de9bf ("nfp: add a stats handler for flower offloads") Signed-off-by: Dan Carpenter Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da29676993ff500714142b1f76db07db170934a3 Merge: 5333502 6f49793 Author: David S. Miller Date: Wed Jul 12 08:15:52 2017 -0700 Merge branch 'mlxsw-spectrum-Various-fixes' Jiri Pirko says: ==================== mlxsw: spectrum: Various fixes First patch adds a missing rollback in error path. Second patch prevents a use-after-free during IPv4 route replace. Last two patches fix warnings from static checkers. ==================== Signed-off-by: David S. Miller commit 6f497930af73863b32e8c73947a52d1003af31e2 Author: Ido Schimmel Date: Wed Jul 12 09:12:55 2017 +0200 mlxsw: spectrum_switchdev: Check status of memory allocation We can't rely on kzalloc() always succeeding, so check its return value. Suppresses the following smatch error: mlxsw_sp_switchdev_event() error: potential null dereference 'switchdev_work->fdb_info.addr'. (kzalloc returns null) Fixes: af061378924f ("mlxsw: spectrum_switchdev: Add support for learning FDB through notification") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a9265b804dfdfca4e2ce3730fe0528da9c01dbf7 Author: Ido Schimmel Date: Wed Jul 12 09:12:54 2017 +0200 mlxsw: spectrum_switchdev: Remove unused variable Commit 10e23eb299fa ("mlxsw: spectrum: Remove support for bypass bridge port attributes/vlan set") removed statements that used 'bridge_vlan', but didn't remove the variable itself resulting in the following warning with W=1: warning: variable ‘bridge_vlan’ set but not used [-Wunused-but-set-variable] Remove the variable and suppress the warning. Fixes: 10e23eb299fa ("mlxsw: spectrum: Remove support for bypass bridge port attributes/vlan set") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 3 --- 1 file changed, 3 deletions(-) commit 7387dbbcdb2404e189591435527dcc65463819d7 Author: Ido Schimmel Date: Wed Jul 12 09:12:53 2017 +0200 mlxsw: spectrum_router: Fix use-after-free in route replace While working on IPv6 route replace I realized we can have a use-after-free in IPv4 in case the replaced route is offloaded and the only one using its FIB info. The problem is that fib_table_insert() drops the reference on the FIB info of the replaced routes which is eventually freed via call_rcu(). Since the driver doesn't hold a reference on this FIB info it can cause a use-after-free when it tries to clear the RTNH_F_OFFLOAD flag stored in fi->fib_flags. After running the following commands in a loop for enough time with a KASAN enabled kernel I finally got the below trace. $ ip route add 192.168.50.0/24 via 192.168.200.1 dev enp3s0np3 $ ip route replace 192.168.50.0/24 dev enp3s0np5 $ ip route del 192.168.50.0/24 dev enp3s0np5 BUG: KASAN: use-after-free in mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum] Read of size 4 at addr ffff8803717d9820 by task kworker/u4:2/55 [...] ? mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum] ? mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum] ? mlxsw_sp_router_neighs_update_work+0x1cd0/0x1ce0 [mlxsw_spectrum] ? mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum] __asan_load4+0x61/0x80 mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum] mlxsw_sp_fib_entry_offload_refresh+0xb6/0x370 [mlxsw_spectrum] mlxsw_sp_router_fib_event_work+0xd1c/0x2780 [mlxsw_spectrum] [...] Freed by task 5131: save_stack_trace+0x16/0x20 save_stack+0x46/0xd0 kasan_slab_free+0x70/0xc0 kfree+0x144/0x570 free_fib_info_rcu+0x2e7/0x410 rcu_process_callbacks+0x4f8/0xe30 __do_softirq+0x1d3/0x9e2 Fix this by taking a reference on the FIB info when creating the nexthop group it represents and drop it when the group is destroyed. Fixes: 599cf8f95f22 ("mlxsw: spectrum_router: Add support for route replace") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 +++ 1 file changed, 3 insertions(+) commit a4e75b76b2ce47e3d964c87689962abb83cc4958 Author: Ido Schimmel Date: Wed Jul 12 09:12:52 2017 +0200 mlxsw: spectrum_router: Add missing rollback With this patch the error path of mlxsw_sp_nexthop_init() is symmetric with mlxsw_sp_nexthop_fini(). Noticed during code review. Fixes: a8c970142798 ("mlxsw: spectrum_router: Refactor nexthop init routine") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 1 + 1 file changed, 1 insertion(+) commit 2ad67141f1e47dc063b202993835361a06239aaa Author: Tushar Dave Date: Tue Jul 11 14:34:47 2017 -0700 SPARC64: Fix sun4v DMA panic 64bit DMA only supported on sun4v equipped with ATU IOMMU HW. 'Commit b02c2b0bfd7ae ("sparc: remove arch specific dma_supported implementations")' introduced a code that incorrectly allow dma_supported() to succeed for 64bit dma mask even if system doesn't have ATU IOMMU. This results into panic. Fix it. Reported-by: Meelis Roos Signed-off-by: Tushar Dave Reviewed-by: Christoph Hellwig Signed-off-by: David S. Miller arch/sparc/kernel/pci_sun4v.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 4b1303d0b01440f224cf81493b7e8e43d9b4965e Author: Arnaldo Carvalho de Melo Date: Tue Jul 11 16:21:40 2017 -0300 perf symbols: Accept zero as the kernel base address Which is the case in S/390, where symbols were not being resolved because machine__get_kernel_start was only setting machine->kernel_start when the just successfully loaded kernel symtab had its map->start set to !0, when it was left at (1ULL << 63) assuming a partitioning of the address space for user/kernel, which is not the case in S/390 nor in Sparc. So just check if map__load() was successfull and set machine->kernel_start to zero, fixing kernel symbol resolution on S/390. Test performed by Thomas: ---- I like this patch. I have done a new build and removed all my debug output to start from scratch. Without your patch I get this: # Samples: 4 of event 'cpu-clock' # Event count (approx.): 1000000 # # Children Self Command Shared Object Symbol # ........ ........ ....... ................ ........................ 75.00% 0.00% true [unknown] [k] 0x00000000004bedda | ---0x4bedda | |--50.00%--0x42693a | | | --25.00%--0x2a72e0 | 0x2af0ca | 0x3d1003fe4c0 | --25.00%--0x4272bc 0x26fa84 and with your patch (I just rebuilt the perf tool, nothing else and used the same perf.data file as input): # Samples: 4 of event 'cpu-clock' # Event count (approx.): 1000000 # # Children Self Command Shared Object Symbol # ........ ........ ....... .......................... .................................. 75.00% 0.00% true [kernel.vmlinux] [k] pgm_check_handler | ---pgm_check_handler do_dat_exception handle_mm_fault __handle_mm_fault filemap_map_pages | |--25.00%--rcu_read_lock_held | rcu_lockdep_current_cpu_online | 0x3d1003ff4c0 | --25.00%--lock_release Looks good to me.... ---- Reported-and-Tested-by: Thomas-Mich Richter Cc: Adrian Hunter Cc: David Ahern Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Zvonko Kosic Link: http://lkml.kernel.org/n/tip-dk0n1uzmbe0tbthrpfqlx6bz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f7cb4f4130ca5693f0698211bf1e42945efbb8c Author: Hou Tao Date: Tue Jul 11 21:58:15 2017 +0800 bfq: dispatch request to prevent queue stalling after the request completion There are mq devices (eg., virtio-blk, nbd and loopback) which don't invoke blk_mq_run_hw_queues() after the completion of a request. If bfq is enabled on these devices and the slice_idle attribute or strict_guarantees attribute is set as zero, it is possible that after a request completion the remaining requests of busy bfq queue will stalled in the bfq schedule until a new request arrives. To fix the scheduler latency problem, we need to check whether or not all issued requests have completed and dispatch more requests to driver if there is no request in driver. The problem can be reproduced by running the following script on a virtio-blk device with nr_hw_queues as 1: #!/bin/sh dev=vdb # mount point for dev mp=/tmp/mnt cd $mp job=strict.job cat < $job [global] direct=1 bs=4k size=256M rw=write ioengine=libaio iodepth=128 runtime=5 time_based [1] filename=1.data [2] new_group filename=2.data EOF echo bfq > /sys/block/$dev/queue/scheduler echo 1 > /sys/block/$dev/queue/iosched/strict_guarantees fio $job Signed-off-by: Hou Tao Reviewed-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 3 +++ 1 file changed, 3 insertions(+) commit 38c9140740eb0993924b676a111c164903163b1e Author: Hou Tao Date: Wed Jul 12 15:25:01 2017 +0800 bfq: fix typos in comments about B-WF2Q+ algorithm The start time of eligible entity should be less than or equal to the current virtual time, and the entity in idle tree has a finish time being greater than the current virtual time. Signed-off-by: Hou Tao Reviewed-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.h | 2 +- block/bfq-wf2q.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2e028c4fe12907f226b8221815f16c2486ad3aa7 Author: Dan Carpenter Date: Wed Jul 12 10:35:57 2017 +0300 ftrace: Fix uninitialized variable in match_records() My static checker complains that if "func" is NULL then "clear_filter" is uninitialized. This seems like it could be true, although it's possible something subtle is happening that I haven't seen. kernel/trace/ftrace.c:3844 match_records() error: uninitialized symbol 'clear_filter'. Link: http://lkml.kernel.org/r/20170712073556.h6tkpjcdzjaozozs@mwanda Cc: stable@vger.kernel.org Fixes: f0a3b154bd7 ("ftrace: Clarify code for mod command") Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44925dfff05fd1a897992d278b15a6b6b55e79a7 Author: Dan Carpenter Date: Wed Jul 12 10:33:40 2017 +0300 ftrace: Remove an unneeded NULL check "func" can't be NULL and it doesn't make sense to check because we've already derefenced it. Link: http://lkml.kernel.org/r/20170712073340.4enzeojeoupuds5a@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab2f7cf141aa6734c4ca7525132d8cc236efee77 Author: Vikram Mulukutla Date: Thu Jul 6 10:53:20 2017 -0700 cpufreq: schedutil: Fix sugov_start() versus sugov_update_shared() race With a shared policy in place, when one of the CPUs in the policy is hotplugged out and then brought back online, sugov_stop() and sugov_start() are called in order. sugov_stop() removes utilization hooks for each CPU in the policy and does nothing else in the for_each_cpu() loop. sugov_start() on the other hand iterates through the CPUs in the policy and re-initializes the per-cpu structure _and_ adds the utilization hook. This implies that the scheduler is allowed to invoke a CPU's utilization update hook when the rest of the per-cpu structures have yet to be re-inited. Apart from some strange values in tracepoints this doesn't cause a problem, but if we do end up accessing a pointer from the per-cpu sugov_cpu structure somewhere in the sugov_update_shared() path, we will likely see crashes since the memset for another CPU in the policy is free to race with sugov_update_shared from the CPU that is ready to go. So let's fix this now to first init all per-cpu structures, and then add the per-cpu utilization update hooks all at once. Signed-off-by: Vikram Mulukutla Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2ca30331c156ca9e97643ad05dd8930b8fe78b01 Author: Dan Carpenter Date: Mon Jul 10 10:21:40 2017 +0300 PM / QoS: return -EINVAL for bogus strings In the current code, if the user accidentally writes a bogus command to this sysfs file, then we set the latency tolerance to an uninitialized variable. Fixes: 2d984ad132a8 (PM / QoS: Introcuce latency tolerance device PM QoS type) Signed-off-by: Dan Carpenter Acked-by: Pavel Machek Cc: 3.15+ # 3.15+ Signed-off-by: Rafael J. Wysocki drivers/base/power/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) commit d4436c0dba8d4d780588179a2e192a867d266a10 Author: Srinivas Pandruvada Date: Mon Jul 10 16:23:52 2017 -0700 cpufreq: intel_pstate: Fix ratio setting for min_perf_pct When the minimum performance limit percentage is set to the power-up default, it is possible that minimum performance ratio is off by one. In the set_policy() callback the minimum ratio is calculated by applying global.min_perf_pct to turbo_ratio and rounding up, but the power-up default global.min_perf_pct is already rounded up to the next percent in min_perf_pct_min(). That results in two round up operations, so for the default min_perf_pct one of them is not required. It is better to remove rounding up in min_perf_pct_min() as this matches the displayed min_perf_pct prior to commit c5a2ee7dde89 (cpufreq: intel_pstate: Active mode P-state limits rework) in 4.12. For example on a platform with max turbo ratio of 37 and minimum ratio of 10, the min_perf_pct resulted in 28 with the above commit. Before this commit it was 27 and it will be the same after this change. Fixes: 1a4fe38add8b (cpufreq: intel_pstate: Remove max/min fractions to limit performance) Reported-by: Artem Bityutskiy Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01e6a61aceb82e13bec29502a8eb70d9574f97ad Author: Michael Ellerman Date: Tue Jul 11 22:10:54 2017 +1000 powerpc/64: Fix atomic64_inc_not_zero() to return an int Although it's not documented anywhere, there is an expectation that atomic64_inc_not_zero() returns a result which fits in an int. This is the behaviour implemented on all arches except powerpc. This has caused at least one bug in practice, in the percpu-refcount code, where the long result from our atomic64_inc_not_zero() was truncated to an int leading to lost references and stuck systems. That was worked around in that code in commit 966d2b04e070 ("percpu-refcount: fix reference leak during percpu-atomic transition"). To the best of my grepping abilities there are no other callers in-tree which truncate the value, but we should fix it anyway. Because the breakage is subtle and potentially very harmful I'm also tagging it for stable. Code generation is largely unaffected because in most cases the callers are just using the result for a test anyway. In particular the case of fget() that was mentioned in commit a6cf7ed5119f ("powerpc/atomic: Implement atomic*_inc_not_zero") generates exactly the same code. Fixes: a6cf7ed5119f ("powerpc/atomic: Implement atomic*_inc_not_zero") Cc: stable@vger.kernel.org # v3.4 Noticed-by: Linus Torvalds Signed-off-by: Michael Ellerman arch/powerpc/include/asm/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8158b486d5f3f55cf372c5a32b42f263bf7f123 Author: Sakari Ailus Date: Tue Jul 11 18:20:20 2017 +0300 device property: Introduce fwnode_call_bool_op() for ops that return bool fwnode_call_int_op() isn't suitable for calling ops that return bool since it effectively causes the result returned to the user to be true when an op hasn't been defined or the fwnode is NULL. Address this by introducing fwnode_call_bool_op() for calling ops that return bool. Fixes: 3708184afc77 "device property: Move FW type specific functionality to FW specific files" Fixes: 2294b3af05e9 "device property: Introduce fwnode_device_is_available()" Reported-by: Dan Carpenter Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 6 +++--- include/linux/fwnode.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) commit 906dc284d00c8aa8e2ad3f71182cf9fa3107e35a Author: Hans de Goede Date: Sun Jul 9 21:05:14 2017 +0200 ACPI / x86: Add KIOX000A accelerometer on GPD win to always_present_ids array The GPD win BIOS dated 20170320 has disabled the accelerometer, the drivers sometimes cause crashes under Windows and this is how the manufacturer has solved this :| I see no other way to keep the accelerometer working under Windows then adding it to the always_present_ids array. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/utils.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b5cc1699191829cda2dd9447210e1e801e2082c9 Author: Hans de Goede Date: Sun Jul 9 21:05:13 2017 +0200 ACPI / x86: Add Dell Venue 11 Pro 7130 touchscreen to always_present_ids The _STA method of the Venue 11 Pro 7130 touchscreen has this ugliness: Method (_STA, 0, NotSerialized) // _STA: Status { If ((SDS1 & One) == One) { If (RST1 == Zero) { Return (0x0F) } ElseIf (RST2 == Zero) { RST2 = One TMRV = Timer } Else { Local0 = ((Timer - TMRV) / 0x2710) If (Local0 > TMRI) { RST2 = Zero RST1 = Zero } } } Else { Return (Zero) } } Whereby RST1 gets set by _SB.PCI0.GFX0.LCD.LCD1._ON, this means that after RST1 has been set first _STA must be called to set TIMER and then after enough time has elapsed _STA must be called twice more, once to clear RST1 and once to finally return 0xf before the touchscreen will show up. Which is just crazy. This commit adds an always_present_ids entry for the SYNA7500 touchscreen ACPI node, together with a DMI match for the Venue 11 Pro 7130, fixing the touchscreen not working on this device. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3b6a70be5ac81673af1ca8b4dae84743cb9fcc87 Author: Hans de Goede Date: Sun Jul 9 21:05:12 2017 +0200 ACPI / x86: Allow matching always_present_id array entries by DMI On some x86 systems the DSDT hides APCI devices to work around Windows driver bugs. On one such system the device is even hidden until a certain time after _SB.PCI0.GFX0.LCD.LCD1._ON gets called has passed *and* _STA has been called at least 3 times since. TL;DR: it is a mess. Until now the always_present_id matching was used to force status for a whole class of devices, e.g. always enable PWM1 on CHerry Trail devices. This commit extends the always_present_id matching code to optionally also check for a DMI match so that we can also add system specific quirks to the always_present_id array. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/utils.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 9c40f956ce9b331493347d1b3cb7e384f7dc0581 Author: Lv Zheng Date: Wed Jul 12 11:09:17 2017 +0800 Revert "ACPI / EC: Enable event freeze mode..." to fix a regression On Lenovo ThinkPad X1 Carbon - the 5th Generation, enabling an earlier EC event freezing timing causes acpitz-virtual-0 to report a stuck 48C temparature. And with EC firmware revisioned as 1.14, without reverting back to old EC event freezing timing, the fan still blows up after a system resume. This reverts the culprit change so that the regression can be fixed without upgrading the EC firmware. Fixes: d30283057ecd (ACPI / EC: Enable event freeze mode to improve event handling) Link: https://bugzilla.kernel.org/show_bug.cgi?id=191181#c168 Tested-by: Damjan Georgievski Signed-off-by: Lv Zheng Cc: 4.9+ # 4.9+ Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 662591461c4b9a1e3b9b159dbf37648a585ebaae Author: Lv Zheng Date: Wed Jul 12 11:09:09 2017 +0800 ACPI / EC: Drop EC noirq hooks to fix a regression According to bug reports, although the busy polling mode can make noirq stages execute faster, it causes abnormal fan blowing up after system resume (see the first link below for a video demonstration) on Lenovo ThinkPad X1 Carbon - the 5th Generation. The problem can be fixed by upgrading the EC firmware on that machine. However, many reporters confirm that the problem can be fixed by stopping busy polling during suspend/resume and for some of them upgrading the EC firmware is not an option. For this reason, drop the noirq stage hooks from the EC driver to fix the regression. Fixes: c3a696b6e8f8 (ACPI / EC: Use busy polling mode when GPE is not enabled) Link: https://youtu.be/9NQ9x-Jm99Q Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Reported-by: Andreas Lindhe Tested-by: Gjorgji Jankovski Tested-by: Damjan Georgievski Tested-by: Fernando Chaves Tested-by: Tomislav Ivek Tested-by: Denis P. Signed-off-by: Lv Zheng Cc: All applicable Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 1dc482b6578e2869e51c35276017178503d5ac81 Author: Mark Salter Date: Tue Jul 11 12:45:43 2017 -0400 ACPI / irq: Fix return code of acpi_gsi_to_irq() The function acpi_gsi_to_irq() must return 0 on success as the caller ghes_probe expects an 0 for success. This change also matches x86 implementation. This patch was submitted around 4.5 timeframe but wasn't pushed because it didn't fix a real problem. Now that RAS/GHES patches are in kernel, this fixes an error seen on a Mustang (arm64) platform: GHES: Failed to map GSI to IRQ for generic hardware error source: 2 GHES: probe of GHES.2 failed with error 81 Signed-off-by: Tuan Phan Signed-off-by: Loc Ho Signed-off-by: Mark Salter Acked-by: Lorenzo Pieralisi Signed-off-by: Rafael J. Wysocki drivers/acpi/irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8fc3397c9e88dc7889b56395d04c1f3d65d186f Author: Colin Ian King Date: Tue Jun 20 11:35:50 2017 +0100 crypto: cavium - make several functions static The functions cvm_encrypt, cvm_decrypt, cvm_xts_setkey and cvm_enc_dec_init does not need to be in global scope, so make them static. Signed-off-by: Colin Ian King Acked-by: David S. Miller Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptvf_algs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d3f1d2f7863137c5d71e64041b48968db29b149e Author: Harsh Jain Date: Fri Jun 23 19:45:11 2017 +0530 crypto: chcr - Avoid algo allocation in softirq. Thsi patch fixes calling "crypto_alloc_cipher" call in bottom halves. Pre allocate aes cipher required to update Tweak value for XTS. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 23 +++++++++++++++-------- drivers/crypto/chelsio/chcr_crypto.h | 1 + 2 files changed, 16 insertions(+), 8 deletions(-) commit 854b06f768794cd664886ec3ba3a5b1c58d42167 Author: David Gstir Date: Wed Jun 28 15:27:10 2017 +0200 crypto: caam - properly set IV after {en,de}crypt Certain cipher modes like CTS expect the IV (req->info) of ablkcipher_request (or equivalently req->iv of skcipher_request) to contain the last ciphertext block when the {en,de}crypt operation is done. This is currently not the case for the CAAM driver which in turn breaks e.g. cts(cbc(aes)) when the CAAM driver is enabled. This patch fixes the CAAM driver to properly set the IV after the {en,de}crypt operation of ablkcipher finishes. This issue was revealed by the changes in the SW CTS mode in commit 0605c41cc53ca ("crypto: cts - Convert to skcipher") Cc: # 4.8+ Signed-off-by: David Gstir Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 1606043f214f912a52195293614935811a6e3e53 Author: Gilad Ben-Yossef Date: Wed Jun 28 10:22:03 2017 +0300 crypto: atmel - only treat EBUSY as transient if backlog The Atmel SHA driver was treating -EBUSY as indication of queueing to backlog without checking that backlog is enabled for the request. Fix it by checking request flags. Cc: Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2acce6aa9f6569d4e135b2c4cfb56acce95efaeb Author: Herbert Xu Date: Mon Jul 10 22:00:48 2017 +0800 Networking crypto: af_alg - Avoid sock_graft call warning The newly added sock_graft warning triggers in af_alg_accept. It's harmless as we're essentially doing sock->sk = sock->sk. The sock_graft call is actually redundant because all the work it does is subsumed by sock_init_data. However, it was added to placate SELinux as it uses it to initialise its internal state. This patch avoisd the warning by making the SELinux call directly. Reported-by: Linus Torvalds Signed-off-by: Herbert Xu Acked-by: David S. Miller crypto/af_alg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7459e1d25ffefa2b1be799477fcc1f6c62f6cec7 Author: Horia Geantă Date: Fri Jul 7 16:57:06 2017 +0300 crypto: caam - fix signals handling Driver does not properly handle the case when signals interrupt wait_for_completion_interruptible(): -it does not check for return value -completion structure is allocated on stack; in case a signal interrupts the sleep, it will go out of scope, causing the worker thread (caam_jr_dequeue) to fail when it accesses it wait_for_completion_interruptible() is replaced with uninterruptable wait_for_completion(). We choose to block all signals while waiting for I/O (device executing the split key generation job descriptor) since the alternative - in order to have a deterministic device state - would be to flush the job ring (aborting *all* in-progress jobs). Cc: Fixes: 045e36780f115 ("crypto: caam - ahash hmac support") Fixes: 4c1ec1f930154 ("crypto: caam - refactor key_gen, sg") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 2 +- drivers/crypto/caam/key_gen.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 19d39a3810e7032f311ef83effdac40339b9d022 Author: Thomas Gleixner Date: Tue Jul 11 23:41:52 2017 +0200 genirq: Keep chip buslock across irq_request/release_resources() Moving the irq_request/release_resources() callbacks out of the spinlocked, irq disabled and bus locked region, unearthed an interesting abuse of the irq_bus_lock/irq_bus_sync_unlock() callbacks. The OMAP GPIO driver does merily power management inside of them. The irq_request_resources() callback of this GPIO irqchip calls a function which reads a GPIO register. That read aborts now because the clock of the GPIO block is not magically enabled via the irq_bus_lock() callback. Move the callbacks under the bus lock again to prevent this. In the free_irq() path this requires to drop the bus_lock before calling synchronize_irq() and reaquiring it before calling the irq_release_resources() callback. The bus lock can't be held because: 1) The data which has been changed between bus_lock/un_lock is cached in the irq chip driver private data and needs to go out to the irq chip via the slow bus (usually SPI or I2C) before calling synchronize_irq(). That's the reason why this bus_lock/unlock magic exists in the first place, as you cannot do SPI/I2C transactions while holding desc->lock with interrupts disabled. 2) synchronize_irq() will actually deadlock, if there is a handler on flight. These chips use threaded handlers for obvious reasons, as they allow to do SPI/I2C communication. When the threaded handler returns then bus_lock needs to be taken in irq_finalize_oneshot() as we need to talk to the actual irq chip once more. After that the threaded handler is marked done, which makes synchronize_irq() return. So if we hold bus_lock accross the synchronize_irq() call, the handler cannot mark itself done because it blocks on the bus lock. That in turn makes synchronize_irq() wait forever on the threaded handler to complete.... Add the missing unlock of desc->request_mutex in the error path of __free_irq() and add a bunch of comments to explain the locking and protection rules. Fixes: 46e48e257360 ("genirq: Move irq resource handling out of spinlocked region") Reported-and-tested-by: Sebastian Reichel Reported-and-tested-by: Tony Lindgren Reported-by: Pavel Machek Signed-off-by: Thomas Gleixner Not-longer-ranted-at-by: Linus Torvalds Cc: Linus Walleij Cc: Grygorii Strashko Cc: Marc Zyngier kernel/irq/manage.c | 63 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 10 deletions(-) commit 64e756c55aa46fc18fd53e8f3598b73b528d8637 Author: Anton Blanchard Date: Thu Jun 15 09:46:39 2017 +1000 powerpc: Fix emulation of mfocrf in emulate_step() From POWER4 onwards, mfocrf() only places the specified CR field into the destination GPR, and the rest of it is set to 0. The PowerPC AS from version 3.0 now requires this behaviour. The emulation code currently puts the entire CR into the destination GPR. Fix it. Fixes: 6888199f7fe5 ("[POWERPC] Emulate more instructions in software") Cc: stable@vger.kernel.org # v2.6.22+ Signed-off-by: Anton Blanchard Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 87c4b83e0fe234a1f0eed131ab6fa232036860d5 Author: Anton Blanchard Date: Thu Jun 15 09:46:38 2017 +1000 powerpc: Fix emulation of mcrf in emulate_step() The mcrf emulation code was using the CR field number directly as the shift value, without taking into account that CR fields are numbered from 0-7 starting at the high bits. That meant it was looking at the CR fields in the reverse order. Fixes: cf87c3f6b647 ("powerpc: Emulate icbi, mcrf and conditional-trap instructions") Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Anton Blanchard Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3b06b1a7448ee4e8e51dae3938774735404e51fb Merge: 130568d dbd2667 Author: Linus Torvalds Date: Tue Jul 11 21:34:24 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: - Fix symbol version generation for assembler on sparc, from Nagarathnam Muthusamy. - Fix compound page handling in gup_huge_pmd(), from Nitin Gupta. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix gup_huge_pmd Adding the type of exported symbols sed regex in Makefile.build requires line break between exported symbols Adding asm-prototypes.h for genksyms to generate crc commit 533350227d95937703aaa16414701eadd67f3ac3 Author: Yonghong Song Date: Mon Jul 10 14:04:28 2017 -0700 samples/bpf: fix a build issue With latest net-next: ==== clang -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -Isamples/bpf \ -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ -Wno-compare-distinct-pointer-types \ -Wno-gnu-variable-sized-type-not-at-end \ -Wno-address-of-packed-member -Wno-tautological-compare \ -Wno-unknown-warning-option \ -O2 -emit-llvm -c samples/bpf/tcp_synrto_kern.c -o -| llc -march=bpf -filetype=obj -o samples/bpf/tcp_synrto_kern.o samples/bpf/tcp_synrto_kern.c:20:10: fatal error: 'bpf_endian.h' file not found ^~~~~~~~~~~~~~ 1 error generated. ==== net has the same issue. Add support for ntohl and htonl in tools/testing/selftests/bpf/bpf_endian.h. Also move bpf_helpers.h from samples/bpf to selftests/bpf and change compiler include logic so that programs in samples/bpf can access the headers in selftests/bpf, but not the other way around. Signed-off-by: Yonghong Song Acked-by: Daniel Borkmann Acked-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + samples/bpf/bpf_helpers.h | 198 ------------------------------ tools/testing/selftests/bpf/Makefile | 1 - tools/testing/selftests/bpf/bpf_endian.h | 14 +++ tools/testing/selftests/bpf/bpf_helpers.h | 198 ++++++++++++++++++++++++++++++ 5 files changed, 213 insertions(+), 199 deletions(-) commit 1bfb159673957644951ab0a8d2aec44b93ddb1ae Author: Eduardo Valentin Date: Tue Jul 11 14:55:12 2017 -0700 bridge: mdb: fix leak on complete_info ptr on fail path We currently get the following kmemleak report: unreferenced object 0xffff8800039d9820 (size 32): comm "softirq", pid 0, jiffies 4295212383 (age 792.416s) hex dump (first 32 bytes): 00 0c e0 03 00 88 ff ff ff 02 00 00 00 00 00 00 ................ 00 00 00 01 ff 11 00 02 86 dd 00 00 ff ff ff ff ................ backtrace: [] kmemleak_alloc+0x4a/0xa0 [] kmem_cache_alloc_trace+0xb8/0x1c0 [] __br_mdb_notify+0x2a3/0x300 [bridge] [] br_mdb_notify+0x6e/0x70 [bridge] [] br_multicast_add_group+0x109/0x150 [bridge] [] br_ip6_multicast_add_group+0x58/0x60 [bridge] [] br_multicast_rcv+0x1d5/0xdb0 [bridge] [] br_handle_frame_finish+0xcf/0x510 [bridge] [] br_nf_hook_thresh.part.27+0xb/0x10 [br_netfilter] [] br_nf_hook_thresh+0x48/0xb0 [br_netfilter] [] br_nf_pre_routing_finish_ipv6+0x109/0x1d0 [br_netfilter] [] br_nf_pre_routing_ipv6+0xd0/0x14c [br_netfilter] [] br_nf_pre_routing+0x197/0x3d0 [br_netfilter] [] nf_iterate+0x52/0x60 [] nf_hook_slow+0x5c/0xb0 [] br_handle_frame+0x1a4/0x2c0 [bridge] This happens when switchdev_port_obj_add() fails. This patch frees complete_info object in the fail path. Reviewed-by: Vallish Vaidyeshwara Signed-off-by: Eduardo Valentin Signed-off-by: David S. Miller net/bridge/br_mdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3f0bd8dad0db73f5d71b355aec5ab33b374260ba Author: Anton Blanchard Date: Mon Jun 19 09:51:28 2017 +1000 powerpc/perf: Add POWER9 alternate PM_RUN_CYC and PM_RUN_INST_CMPL events Similar to POWER8, POWER9 can count run cycles and run instructions completed on more than one PMU. Signed-off-by: Anton Blanchard Acked-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/power9-events-list.h | 4 ++++ arch/powerpc/perf/power9-pmu.c | 2 ++ 2 files changed, 6 insertions(+) commit 69449bbd65687e8e5fb968a5a0c46089f6af6001 Author: Arnd Bergmann Date: Mon Jul 10 10:44:03 2017 +0200 ftrace: Hide cached module code for !CONFIG_MODULES When modules are disabled, we get a harmless build warning: kernel/trace/ftrace.c:4051:13: error: 'process_cached_mods' defined but not used [-Werror=unused-function] This adds the same #ifdef around the new code that exists around its caller. Link: http://lkml.kernel.org/r/20170710084413.1820568-1-arnd@arndb.de Fixes: d7fbf8df7ca0 ("ftrace: Implement cached modules tracing on module load") Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 2 ++ 1 file changed, 2 insertions(+) commit bbd1d27d863d5c0acee65ecd0c2e34035e1df5ea Author: Steven Rostedt (VMware) Date: Tue Jul 11 19:21:04 2017 -0400 tracing: Do note expose stack_trace_filter without DYNAMIC_FTRACE The "stack_trace_filter" file only makes sense if DYNAMIC_FTRACE is configured in. If it is not, then the user can not filter any functions. Not only that, the open function causes warnings when DYNAMIC_FTRACE is not set. Link: http://lkml.kernel.org/r/20170710110521.600806-1-arnd@arndb.de Reported-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_stack.c | 6 ++++++ 1 file changed, 6 insertions(+) commit dc8d387210e3e2ab294031e8f6542329bc9141c4 Author: Steven Rostedt (VMware) Date: Tue Jul 11 18:41:12 2017 -0400 tracing: Update Documentation/trace/ftrace.txt The documentation of ftrace.txt has become rather outdated. Bring it closer to reality of todays kernel. Signed-off-by: Steven Rostedt (VMware) Documentation/trace/ftrace.txt | 508 ++++++++++++++++++++++++++++++++--------- 1 file changed, 396 insertions(+), 112 deletions(-) commit 130568d5eac5537cbd64cfb12103550af90edb79 Merge: 908b852 b222dd2 Author: Linus Torvalds Date: Tue Jul 11 15:36:52 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull more block updates from Jens Axboe: "This is a followup for block changes, that didn't make the initial pull request. It's a bit of a mixed bag, this contains: - A followup pull request from Sagi for NVMe. Outside of fixups for NVMe, it also includes a series for ensuring that we properly quiesce hardware queues when browsing live tags. - Set of integrity fixes from Dmitry (mostly), fixing various issues for folks using DIF/DIX. - Fix for a bug introduced in cciss, with the req init changes. From Christoph. - Fix for a bug in BFQ, from Paolo. - Two followup fixes for lightnvm/pblk from Javier. - Depth fix from Ming for blk-mq-sched. - Also from Ming, performance fix for mtip32xx that was introduced with the dynamic initialization of commands" * 'for-linus' of git://git.kernel.dk/linux-block: (44 commits) block: call bio_uninit in bio_endio nvmet: avoid unneeded assignment of submit_bio return value nvme-pci: add module parameter for io queue depth nvme-pci: compile warnings in nvme_alloc_host_mem() nvmet_fc: Accept variable pad lengths on Create Association LS nvme_fc/nvmet_fc: revise Create Association descriptor length lightnvm: pblk: remove unnecessary checks lightnvm: pblk: control I/O flow also on tear down cciss: initialize struct scsi_req null_blk: fix error flow for shared tags during module_init block: Fix __blkdev_issue_zeroout loop nvme-rdma: unconditionally recycle the request mr nvme: split nvme_uninit_ctrl into stop and uninit virtio_blk: quiesce/unquiesce live IO when entering PM states mtip32xx: quiesce request queues to make sure no submissions are inflight nbd: quiesce request queues to make sure no submissions are inflight nvme: kick requeue list when requeueing a request instead of when starting the queues nvme-pci: quiesce/unquiesce admin_q instead of start/stop its hw queues nvme-loop: quiesce/unquiesce admin_q instead of start/stop its hw queues nvme-fc: quiesce/unquiesce admin_q instead of start/stop its hw queues ... commit 908b852df1d5d27d289e915fea7bfc16d38b8a76 Merge: 3bf7878 68a6afa Author: Linus Torvalds Date: Tue Jul 11 14:04:48 2017 -0700 Merge tag 'smb3-security-fixes-for-4.13' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes and sane default from Steve French: "Upgrade default dialect to more secure SMB3 from older cifs dialect" * tag 'smb3-security-fixes-for-4.13' of git://git.samba.org/sfrench/cifs-2.6: cifs: Clean up unused variables in smb2pdu.c [SMB3] Improve security, move default dialect to SMB3 from old CIFS [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred CIFS: Reconnect expired SMB sessions CIFS: Display SMB2 error codes in the hex format cifs: Use smb 2 - 3 and cifsacl mount options setacl function cifs: prototype declaration and definition to set acl for smb 2 - 3 and cifsacl mount options commit b11fb73743fc406204e0749ead18560aeda8b136 Author: Steven Rostedt (VMware) Date: Tue Jul 11 15:43:24 2017 -0400 tracing: Fixup trace file header alignment The addition of TGID to the tracing header added a check to see if TGID shoudl be displayed or not, and updated the header accordingly. Unfortunately, it broke the default header. Also add constant strings to use for spacing. This does remove the visibility of the header a bit, but cuts it down from the extended lines much greater than 80 characters. Before this change: # tracer: function # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU#|||| TIMESTAMP FUNCTION # | | | |||| | | swapper/0-1 [000] .... 0.277830: migration_init <-do_one_initcall swapper/0-1 [002] d... 13.861967: Unknown type 1201 swapper/0-1 [002] d..1 13.861970: Unknown type 1202 After this change: # tracer: function # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | swapper/0-1 [000] .... 0.278245: migration_init <-do_one_initcall swapper/0-1 [003] d... 13.861189: Unknown type 1201 swapper/0-1 [003] d..1 13.861192: Unknown type 1202 Cc: Joel Fernandes Fixes: 441dae8f2f29 ("tracing: Add support for display of tgid in trace output") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit ffa423fb3251f8737303ffc3b0659e86e501808e Author: WANG Cong Date: Mon Jul 10 10:05:50 2017 -0700 tap: convert a mutex to a spinlock We are not allowed to block on the RCU reader side, so can't just hold the mutex as before. As a quick fix, convert it to a spinlock. Fixes: d9f1f61c0801 ("tap: Extending tap device create/destroy APIs") Reported-by: Christian Borntraeger Tested-by: Christian Borntraeger Cc: Sainath Grandhi Signed-off-by: Cong Wang Signed-off-by: David S. Miller drivers/net/tap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 6a146f3a5894b751cef16feb3d7903e45e3c445c Author: Guilherme G. Piccoli Date: Mon Jul 10 10:55:46 2017 -0300 cxgb4: fix BUG() on interrupt deallocating path of ULD Since the introduction of ULD (Upper-Layer Drivers), the MSI-X deallocating path changed in cxgb4: the driver frees the interrupts of ULD when unregistering it or on shutdown PCI handler. Problem is that if a MSI-X is not freed before deallocated in the PCI layer, it will trigger a BUG() due to still "alive" interrupt being tentatively quiesced. The below trace was observed when doing a simple unbind of Chelsio's adapter PCI function, like: "echo 001e:80:00.4 > /sys/bus/pci/drivers/cxgb4/unbind" Trace: kernel BUG at drivers/pci/msi.c:352! Oops: Exception in kernel mode, sig: 5 [#1] ... NIP [c0000000005a5e60] free_msi_irqs+0xa0/0x250 LR [c0000000005a5e50] free_msi_irqs+0x90/0x250 Call Trace: [c0000000005a5e50] free_msi_irqs+0x90/0x250 (unreliable) [c0000000005a72c4] pci_disable_msix+0x124/0x180 [d000000011e06708] disable_msi+0x88/0xb0 [cxgb4] [d000000011e06948] free_some_resources+0xa8/0x160 [cxgb4] [d000000011e06d60] remove_one+0x170/0x3c0 [cxgb4] [c00000000058a910] pci_device_remove+0x70/0x110 [c00000000064ef04] device_release_driver_internal+0x1f4/0x2c0 ... This patch fixes the issue by refactoring the shutdown path of ULD on cxgb4 driver, by properly freeing and disabling interrupts on PCI remove handler too. Fixes: 0fbc81b3ad51 ("Allocate resources dynamically for all cxgb4 ULD's") Reported-by: Harsha Thyagaraja Signed-off-by: Guilherme G. Piccoli Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 16 +++++++--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 42 +++++++++++++++---------- 2 files changed, 36 insertions(+), 22 deletions(-) commit 91d1ae475b9833097e078c2581c9265d033cdbe4 Author: Kalderon, Michal Date: Sun Jul 9 13:00:16 2017 +0300 qed: Fix printk option passed when printing ipv6 addresses The option "h" (host order ) exists for ipv4 only. Remove the h when printing ipv6 addresses. Lead to the following smatch warning: drivers/net/ethernet/qlogic/qed/qed_iwarp.c:585 qed_iwarp_print_tcp_ramrod() warn: '%pI6' can only be followed by c drivers/net/ethernet/qlogic/qed/qed_iwarp.c:1521 qed_iwarp_print_cm_info() warn: '%pI6' can only be followed by c Fixes commit 456a584947d5 ("qed: iWARP CM add passive side connect") Reported-by: Dan Carpenter Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5e34fa23ced16f03fe163d3f31fddcae91c3f2fc Author: Ahmad Fatoum Date: Sat Jul 8 21:28:44 2017 +0200 net: Fix minor code bug in timestamping.txt Passing (void*)val instead of &val would make a pointer out of an integer and cause sock_setsockopt to -EFAULT. See tools/testing/selftests/networking/timestamping/timestamping.c for a working example. Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Ahmad Fatoum Signed-off-by: David S. Miller Documentation/networking/timestamping.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f4e27944f9cf9a94dd9b37a834512586c1f1a5d2 Merge: fdf99b3 6224226 Author: David S. Miller Date: Tue Jul 11 13:33:54 2017 -0700 Merge branch 'stmmac-dma-resources-fixes' Christophe JAILLET says: ==================== net: stmmac: Fixes and cleanups in 'alloc_dma_[rt]x_desc_resources()' These patchs are all related to 'alloc_dma_[rt]x_desc_resources()' functions. The 2 first fix an error path where some resources are leaking. I've separated them into 2 patches because the issues have been introduced by 2 deferent commits. The 3rd patch is just a clean-up. ==================== Signed-off-by: David S. Miller commit 6224226030da93c062621527fd0070be3f718a88 Author: Christophe Jaillet Date: Sat Jul 8 09:46:54 2017 +0200 net: stmmac: Make 'alloc_dma_[rt]x_desc_resources()' look even closer 'alloc_dma_[rt]x_desc_resources()' functions look very close. Remove a useless initialization and use the same label name for error handling path in order to get them even closer. Signed-off-by: Christophe JAILLET Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6941f7cc71a719089f7add4afc82bb80fc5a281d Author: Christophe Jaillet Date: Sat Jul 8 09:46:43 2017 +0200 net: stmmac: Fix error handling path in 'alloc_dma_tx_desc_resources()' If the first 'kmalloc_array' within the loop fails, we should free what as already been allocated, as done in all other error handling path. Fixes: ce736788e8a9 ("net: stmmac: adding multiple buffers for TX") Signed-off-by: Christophe JAILLET Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63c3aa6b68782ee5ddb6588d95aacf1ab33e528b Author: Christophe Jaillet Date: Sat Jul 8 09:46:33 2017 +0200 net: stmmac: Fix error handling path in 'alloc_dma_rx_desc_resources()' If the first 'kmalloc_array' within the loop fails, we should free what as already been allocated, as done in all other error handling path. Fixes: 54139cf3bb33 ("net: stmmac: adding multiple buffers for rx") Signed-off-by: Christophe JAILLET Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dea1d0f5f1284e3defee4b8484d9fc230686cd42 Author: Thomas Gleixner Date: Tue Jul 11 22:06:24 2017 +0200 smp/hotplug: Replace BUG_ON and react useful The move of the unpark functions to the control thread moved the BUG_ON() there as well. While it made some sense in the idle thread of the upcoming CPU, it's bogus to crash the control thread on the already online CPU, especially as the function has a return value and the callsite is prepared to handle an error return. Replace it with a WARN_ON_ONCE() and return a proper error code. Fixes: 9cd4f1a4e7a8 ("smp/hotplug: Move unparking of percpu threads to the control CPU") Rightfully-ranted-at-by: Linux Torvalds Signed-off-by: Thomas Gleixner kernel/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3bf7878f0f7d60c394f6d6631bb179e86f09f73c Merge: 07d306c 33e9c8d Author: Linus Torvalds Date: Tue Jul 11 12:12:28 2017 -0700 Merge tag 'ceph-for-4.13-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "The main item here is support for v12.y.z ("Luminous") clusters: RESEND_ON_SPLIT, RADOS_BACKOFF, OSDMAP_PG_UPMAP and CRUSH_CHOOSE_ARGS feature bits, and various other changes in the RADOS client protocol. On top of that we have a new fsc mount option to allow supplying fscache uniquifier (similar to NFS) and the usual pile of filesystem fixes from Zheng" * tag 'ceph-for-4.13-rc1' of git://github.com/ceph/ceph-client: (44 commits) libceph: advertise support for NEW_OSDOP_ENCODING and SERVER_LUMINOUS libceph: osd_state is 32 bits wide in luminous crush: remove an obsolete comment crush: crush_init_workspace starts with struct crush_work libceph, crush: per-pool crush_choose_arg_map for crush_do_rule() crush: implement weight and id overrides for straw2 libceph: apply_upmap() libceph: compute actual pgid in ceph_pg_to_up_acting_osds() libceph: pg_upmap[_items] infrastructure libceph: ceph_decode_skip_* helpers libceph: kill __{insert,lookup,remove}_pg_mapping() libceph: introduce and switch to decode_pg_mapping() libceph: don't pass pgid by value libceph: respect RADOS_BACKOFF backoffs libceph: make DEFINE_RB_* helpers more general libceph: avoid unnecessary pi lookups in calc_target() libceph: use target pi for calc_target() calculations libceph: always populate t->target_{oid,oloc} in calc_target() libceph: make sure need_resend targets reflect latest map libceph: delete from need_resend_linger before check_linger_pool_dne() ... commit 138d351eefb727ab9e41a3dc5f112ceb4f6e59f2 Author: Nicholas Bellinger Date: Fri Jul 7 14:45:49 2017 -0700 iscsi-target: Add login_keys_workaround attribute for non RFC initiators This patch re-introduces part of a long standing login workaround that was recently dropped by: commit 1c99de981f30b3e7868b8d20ce5479fa1c0fea46 Author: Nicholas Bellinger Date: Sun Apr 2 13:36:44 2017 -0700 iscsi-target: Drop work-around for legacy GlobalSAN initiator Namely, the workaround for FirstBurstLength ended up being required by Mellanox Flexboot PXE boot ROMs as reported by Robert. So this patch re-adds the work-around for FirstBurstLength within iscsi_check_proposer_for_optional_reply(), and makes the key optional to respond when the initiator does not propose, nor respond to it. Also as requested by Arun, this patch introduces a new TPG attribute named 'login_keys_workaround' that controls the use of both the FirstBurstLength workaround, as well as the two other existing workarounds for gPXE iSCSI boot client. By default, the workaround is enabled with login_keys_workaround=1, since Mellanox FlexBoot requires it, and Arun has verified the Qlogic MSFT initiator already proposes FirstBurstLength, so it's uneffected by this re-adding this part of the original work-around. Reported-by: Robert LeBlanc Cc: Robert LeBlanc Reviewed-by: Arun Easi Cc: # 3.1+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_configfs.c | 2 ++ drivers/target/iscsi/iscsi_target_nego.c | 6 ++-- drivers/target/iscsi/iscsi_target_parameters.c | 41 ++++++++++++++++++-------- drivers/target/iscsi/iscsi_target_parameters.h | 2 +- drivers/target/iscsi/iscsi_target_tpg.c | 19 ++++++++++++ drivers/target/iscsi/iscsi_target_tpg.h | 1 + include/target/iscsi/iscsi_target_core.h | 9 ++++++ 7 files changed, 64 insertions(+), 16 deletions(-) commit 55dd8cf2163e1866d9497c4f361d6ed42b3a192b Author: Nicholas Bellinger Date: Tue Jul 11 10:50:00 2017 -0700 Revert "qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT" This reverts commit 5f572526a18418258bfa137e3353656c25439500. As reported by Pascal here: http://www.spinics.net/lists/target-devel/msg15808.html there still appears to be another issue related to this change to drop the original bogus tcm_qla2xxx_free_cmd() usage from tcm_qla2xxx_handle_data_work() and tcm_qla2xxx_aborted_task(). So revert this for now, until Pascal can verify with further debug in place to understand what's going on. Reported-by: Pascal de Bruijn Cc: Pascal de Bruijn Cc: Himanshu Madhani Cc: Quinn Tran Cc: # 3.10+ Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 4 ---- drivers/scsi/qla2xxx/qla_target.h | 1 - drivers/scsi/qla2xxx/tcm_qla2xxx.c | 36 +++++++++++++++++++++++++++++++++--- 3 files changed, 33 insertions(+), 8 deletions(-) commit fdf99b3ffcdd8471ee3104512198a178b7351a02 Author: Christophe Jaillet Date: Sat Jul 8 06:51:35 2017 +0200 cisco: enic: Fic an error handling path in 'vnic_dev_init_devcmd2()' if 'ioread32()' returns 0xFFFFFFF, we have to go through the error handling path as done everywhere else in this function. Move the 'err_free_wq' label to better match its name and its location and add a new label 'err_disable_wq'. Update the code accordingly. Fixes: 373fb0873d43 ("enic: add devcmd2") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/vnic_dev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit daf78c305148c5a52f75a7fd88461ffa7066aec6 Author: Xiubo Li Date: Tue Jul 11 18:06:41 2017 +0800 tcmu: clean up the code and with one small fix Remove useless blank line and code and at the same time add one error path to catch the errors. Reviewed-by: Mike Christie Signed-off-by: Xiubo Li Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit b3743c71b7c33a126d6d8942bb268775987400ec Author: Xiubo Li Date: Tue Jul 11 17:59:43 2017 +0800 tcmu: Fix possbile memory leak / OOPs when recalculating cmd base size For all the entries allocated from the ring cmd area, the memory is something like the stack memory, which will always reserve the old data, so the entry->req.iov_bidi_cnt maybe none zero. On some environments, the crash could be reproduce very easy and some not. The following is the crash core trace as reported by Damien: [ 240.143969] CPU: 0 PID: 1285 Comm: iscsi_trx Not tainted 4.12.0-rc1+ #3 [ 240.150607] Hardware name: ASUS All Series/H87-PRO, BIOS 2104 10/28/2014 [ 240.157331] task: ffff8807de4f5800 task.stack: ffffc900047dc000 [ 240.163270] RIP: 0010:memcpy_erms+0x6/0x10 [ 240.167377] RSP: 0018:ffffc900047dfc68 EFLAGS: 00010202 [ 240.172621] RAX: ffffc9065db85540 RBX: ffff8807f7980000 RCX: 0000000000000010 [ 240.179771] RDX: 0000000000000010 RSI: ffff8807de574fe0 RDI: ffffc9065db85540 [ 240.186930] RBP: ffffc900047dfd30 R08: ffff8807de41b000 R09: 0000000000000000 [ 240.194088] R10: 0000000000000040 R11: ffff8807e9b726f0 R12: 00000006565726b0 [ 240.201246] R13: ffffc90007612ea0 R14: 000000065657d540 R15: 0000000000000000 [ 240.208397] FS: 0000000000000000(0000) GS:ffff88081fa00000(0000) knlGS:0000000000000000 [ 240.216510] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 240.222280] CR2: ffffc9065db85540 CR3: 0000000001c0f000 CR4: 00000000001406f0 [ 240.229430] Call Trace: [ 240.231887] ? tcmu_queue_cmd+0x83c/0xa80 [ 240.235916] ? target_check_reservation+0xcd/0x6f0 [ 240.240725] __target_execute_cmd+0x27/0xa0 [ 240.244918] target_execute_cmd+0x232/0x2c0 [ 240.249124] ? __local_bh_enable_ip+0x64/0xa0 [ 240.253499] iscsit_execute_cmd+0x20d/0x270 [ 240.257693] iscsit_sequence_cmd+0x110/0x190 [ 240.261985] iscsit_get_rx_pdu+0x360/0xc80 [ 240.267565] ? iscsi_target_rx_thread+0x54/0xd0 [ 240.273571] iscsi_target_rx_thread+0x9a/0xd0 [ 240.279413] kthread+0x113/0x150 [ 240.284120] ? iscsi_target_tx_thread+0x1e0/0x1e0 [ 240.290297] ? kthread_create_on_node+0x40/0x40 [ 240.296297] ret_from_fork+0x2e/0x40 [ 240.301332] Code: 90 90 90 90 90 eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 [ 240.321751] RIP: memcpy_erms+0x6/0x10 RSP: ffffc900047dfc68 [ 240.328838] CR2: ffffc9065db85540 [ 240.333667] ---[ end trace b7e5354cfb54d08b ]--- To fix this, just memset all the entry memory before using it, and also to be more readable we adjust the bidi code. Fixed: fe25cc34795(tcmu: Recalculate the tcmu_cmd size to save cmd area memories) Reported-by: Bryant G. Ly Tested-by: Bryant G. Ly Reported-by: Damien Le Moal Tested-by: Damien Le Moal Reviewed-by: Mike Christie Signed-off-by: Xiubo Li Cc: # 4.12+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 4c17e1febd73c3b2467fd9f67e0017a82805196a Merge: de92cd6 9b0436c Author: David S. Miller Date: Tue Jul 11 10:32:12 2017 -0700 Merge branch 'bnxt_en-Bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. 3 bug fixes in this series. Fix a crash in bnxt_get_stats64() that can happen if the device is closing and freeing the statistics block at the same time. The 2nd one fixes ethtool -L failing when changing from combined to non-combined mode or vice versa. The last one fixes SRIOV failure on big-endian systems because we were setting a bitmap wrong in a firmware message. ==================== Signed-off-by: David S. Miller commit 9b0436c3f29483ca91d890b0072c0c02e2e535ed Author: Michael Chan Date: Tue Jul 11 13:05:36 2017 -0400 bnxt_en: Fix SRIOV on big-endian architecture. The PF driver sets up a list of firmware commands from the VF driver that needs to be forwarded to the PF for approval. This list is a 256-bit bitmap. The code that sets up the bitmap falls apart on big-endian architecture. __set_bit() does not work because it operates on long types whereas the firmware interface is defined in u32 types, causing bits in the wrong 32-bit word to be set. Fix it by setting the proper bits on an array of u32. Fixes: de68f5de5651 ("bnxt_en: Fix bitmap declaration to work on 32-bit arches.") Reported-by: Shannon Nelson Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 3b6b34df342553a7522561e34288f5bb803aa9aa Author: Michael Chan Date: Tue Jul 11 13:05:35 2017 -0400 bnxt_en: Fix bug in ethtool -L. When changing channels from combined to rx/tx or vice versa, the code uses the wrong "sh" parameter to determine if we are reserving rings for shared or non-shared mode. It should be using the ethtool requested "sh" parameter instead of the current "sh" parameter. Fix it by passing the "sh" parameter to bnxt_reserve_rings(). For ethtool, we will pass in the requested "sh" parameter. Fixes: 391be5c27364 ("bnxt_en: Implement new scheme to reserve tx rings.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++------ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) commit f9b76ebd49f97458857568918c305a17fa7c6567 Author: Michael Chan Date: Tue Jul 11 13:05:34 2017 -0400 bnxt_en: Fix race conditions in .ndo_get_stats64(). .ndo_get_stats64() may not be protected by RTNL and can race with .ndo_stop() or other ethtool operations that can free the statistics memory. Fix it by setting a new flag BNXT_STATE_READ_STATS and then proceeding to read statistics memory only if the state is OPEN. The close path that frees the memory clears the OPEN state and then waits for the BNXT_STATE_READ_STATS to clear before proceeding to free the statistics memory. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 18 ++++++++++++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) commit 07d306c838c5c30196619baae36107d0615e459b Merge: a3ddacb c013b65 Author: Linus Torvalds Date: Tue Jul 11 09:59:37 2017 -0700 Merge git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add Renesas RZ/A WDT Watchdog driver - STM32 Independent WatchDoG (IWDG) support - UniPhier watchdog support - Add F71868 support - Add support for NCT6793D and NCT6795D - dw_wdt: add reset lines support - core: add option to avoid early handling of watchdog - core: introduce watchdog_worker_should_ping helper - Cleanups and improvements for sama5d4, intel-mid_wdt, s3c2410_wdt, orion_wdt, gpio_wdt, it87_wdt, meson_wdt, davinci_wdt, bcm47xx_wdt, zx2967_wdt, cadence_wdt * git://www.linux-watchdog.org/linux-watchdog: (32 commits) watchdog: introduce watchdog_worker_should_ping helper watchdog: uniphier: add UniPhier watchdog driver dt-bindings: watchdog: add description for UniPhier WDT controller watchdog: cadence_wdt: make of_device_ids const. watchdog: zx2967: constify zx2967_wdt_ops. watchdog: bcm47xx_wdt: constify bcm47xx_wdt_hard_ops and bcm47xx_wdt_soft_ops watchdog: davinci: Add missing clk_disable_unprepare(). watchdog: davinci: Handle return value of clk_prepare_enable watchdog: meson: Handle return value of clk_prepare_enable watchdog: it87: Add support for various Super-IO chips watchdog: it87: Use infrastructure to stop watchdog on reboot watchdog: it87: Drop support for resetting watchdog though CIR and Game port watchdog: it87: Convert to use watchdog core infrastructure watchdog: it87: Drop FSF mailing address watchdog: dw_wdt: get reset lines from dt watchdog: bindings: dw_wdt: add reset lines watchdog: w83627hf: Add support for NCT6793D and NCT6795D watchdog: core: add option to avoid early handling of watchdog watchdog: f71808e_wdt: Add F71868 support watchdog: Add STM32 IWDG driver ... commit a3ddacbae5abc0a5aabb1e75b655e8cd6dc83888 Merge: a018817 3c778a7 Author: Linus Torvalds Date: Tue Jul 11 09:55:47 2017 -0700 Merge tag 'chrome-platform-for-linus-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform Pull chrome platform updates from Benson Leung: "Changes in this pull request are around catching up cros_ec with the internal chromeos-kernel versions of cros_ec, cros_ec_lpc, and cros_ec_lightbar. Also, switching maintainership from olof to bleung" * tag 'chrome-platform-for-linus-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform: platform/chrome : Add myself as Maintainer platform/chrome: cros_ec_lightbar - hide unused PM functions cros_ec: Don't signal wake event for non-wake host events cros_ec: Fix deadlock when EC is not responsive at probe cros_ec: Don't return error when checking command version platform/chrome: cros_ec_lightbar - Avoid I2C xfer to EC during suspend platform/chrome: cros_ec_lightbar - Add userspace lightbar control bit to EC platform/chrome: cros_ec_lightbar - Control of suspend/resume lightbar sequence platform/chrome: cros_ec_lightbar - Add lightbar program feature to sysfs platform/chrome: cros_ec_lpc: Add MKBP events support over ACPI platform/chrome: cros_ec_lpc: Add power management ops platform/chrome: cros_ec_lpc: Add support for GOOG004 ACPI device platform/chrome: cros_ec_lpc: Add support for mec1322 EC platform/chrome: cros_ec_lpc: Add R/W helpers to LPC protocol variants mfd: cros_ec: Add support for dumping panic information cros_ec_debugfs: Pass proper struct sizes to cros_ec_cmd_xfer() mfd: cros_ec: add debugfs, console log file mfd: cros_ec: Add EC console read structures definitions mfd: cros_ec: Add helper for event notifier. commit a0188177344c8efdb1467889a0ec148554869e15 Merge: 9967468 354b638 Author: Linus Torvalds Date: Tue Jul 11 09:52:56 2017 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull x86nommu update from Greg Ungerer: "Only a single change, to remove old Kconfig options from defconfigs" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: defconfig: Cleanup from old Kconfig options commit 44bd76d0a3ff1901b66a739c4a9e68e6fdc0463c Author: Arvind Yadav Date: Tue Jul 11 16:18:20 2017 +0530 platform/x86: toshiba_acpi: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 26360 1072 24 27456 6b40 drivers/platform/x86/toshiba_acpi.o File size After adding 'const': text data bss dec hex filename 26424 1008 24 27456 6b40 drivers/platform/x86/toshiba_acpi.o Signed-off-by: Arvind Yadav Signed-off-by: Darren Hart (VMware) drivers/platform/x86/toshiba_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e90d9ba837b3b779644613a3b9e4845a0cd302f2 Author: Arvind Yadav Date: Tue Jul 11 16:18:19 2017 +0530 platform/x86: asus-wmi: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 13140 840 1 13981 369d drivers/platform/x86/asus-wmi.o File size After adding 'const': text data bss dec hex filename 13268 712 1 13981 368d drivers/platform/x86/asus-wmi.o Signed-off-by: Arvind Yadav Signed-off-by: Darren Hart (VMware) drivers/platform/x86/asus-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 24f584055c360d39cb55e91a7a1c53ddeb4a6147 Author: Arvind Yadav Date: Tue Jul 11 16:18:18 2017 +0530 platform/x86: panasonic-laptop: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 2505 600 4 3109 c25 drivers/platform/x86/panasonic-laptop.o File size After adding 'const': text data bss dec hex filename 2569 536 4 3109 c25 drivers/platform/x86/panasonic-laptop.o Signed-off-by: Arvind Yadav Signed-off-by: Darren Hart (VMware) drivers/platform/x86/panasonic-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b7942d8d1ced3c82495953cb0bb90e7de6dbba6 Author: Arvind Yadav Date: Tue Jul 11 16:18:17 2017 +0530 platform/x86: alienware-wmi: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 6932 1016 48 7996 1f3c drivers/platform/x86/alienware-wmi.o File size After adding 'const': text data bss dec hex filename 7060 888 48 7996 1f64 drivers/platform/x86/alienware-wmi.o Signed-off-by: Arvind Yadav Signed-off-by: Darren Hart (VMware) drivers/platform/x86/alienware-wmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8546268e1177bd84157c7dc5bad82a2433fb5fea Author: Arvind Yadav Date: Tue Jul 11 16:18:16 2017 +0530 platform/x86: samsung-laptop: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 8710 5452 23 14185 3769 drivers/platform/x86/samsung-laptop.o File size After adding 'const': text data bss dec hex filename 8774 5388 23 14185 3769 drivers/platform/x86/samsung-laptop.o Signed-off-by: Arvind Yadav Signed-off-by: Darren Hart (VMware) drivers/platform/x86/samsung-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab56246bee36b7226355d10f817ef8c27f56ef4b Author: Arvind Yadav Date: Tue Jul 11 16:18:15 2017 +0530 platform/x86: compal-laptop: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 6781 6144 34 12959 329f drivers/platform/x86/compal-laptop.o File size After adding 'const': text data bss dec hex filename 6845 6080 34 12959 329f drivers/platform/x86/compal-laptop.o Signed-off-by: Arvind Yadav Signed-off-by: Darren Hart (VMware) drivers/platform/x86/compal-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee56ff71bbc405d841415809cb5ece079e7dd785 Author: Arvind Yadav Date: Tue Jul 11 16:18:14 2017 +0530 platform/x86: fujitsu-laptop: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 7474 1205 24 8703 21ff drivers/platform/x86/fujitsu-laptop.o File size After adding 'const': text data bss dec hex filename 7538 1141 24 8703 21ff drivers/platform/x86/fujitsu-laptop.o Signed-off-by: Arvind Yadav Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1bda752fdaead0c154c13a72a83faabc7dffc82 Author: Hans de Goede Date: Tue Jul 11 13:41:34 2017 +0200 platform/x86: peaq-wmi: Fix peaq_ignore_events_counter handling off by 1 If peaq_ignore_events_counter gets set to 1 we should skip polling 1 time, rather then ignoring it. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/peaq-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fd1d2c4ceb2248a727696962cf3370dc9f5a0a4 Author: Eric W. Biederman Date: Thu Jul 6 08:41:06 2017 -0500 proc: Fix proc_sys_prune_dcache to hold a sb reference Andrei Vagin writes: FYI: This bug has been reproduced on 4.11.7 > BUG: Dentry ffff895a3dd01240{i=4e7c09a,n=lo} still in use (1) [unmount of proc proc] > ------------[ cut here ]------------ > WARNING: CPU: 1 PID: 13588 at fs/dcache.c:1445 umount_check+0x6e/0x80 > CPU: 1 PID: 13588 Comm: kworker/1:1 Not tainted 4.11.7-200.fc25.x86_64 #1 > Hardware name: CompuLab sbc-flt1/fitlet, BIOS SBCFLT_0.08.04 06/27/2015 > Workqueue: events proc_cleanup_work > Call Trace: > dump_stack+0x63/0x86 > __warn+0xcb/0xf0 > warn_slowpath_null+0x1d/0x20 > umount_check+0x6e/0x80 > d_walk+0xc6/0x270 > ? dentry_free+0x80/0x80 > do_one_tree+0x26/0x40 > shrink_dcache_for_umount+0x2d/0x90 > generic_shutdown_super+0x1f/0xf0 > kill_anon_super+0x12/0x20 > proc_kill_sb+0x40/0x50 > deactivate_locked_super+0x43/0x70 > deactivate_super+0x5a/0x60 > cleanup_mnt+0x3f/0x90 > mntput_no_expire+0x13b/0x190 > kern_unmount+0x3e/0x50 > pid_ns_release_proc+0x15/0x20 > proc_cleanup_work+0x15/0x20 > process_one_work+0x197/0x450 > worker_thread+0x4e/0x4a0 > kthread+0x109/0x140 > ? process_one_work+0x450/0x450 > ? kthread_park+0x90/0x90 > ret_from_fork+0x2c/0x40 > ---[ end trace e1c109611e5d0b41 ]--- > VFS: Busy inodes after unmount of proc. Self-destruct in 5 seconds. Have a nice day... > BUG: unable to handle kernel NULL pointer dereference at (null) > IP: _raw_spin_lock+0xc/0x30 > PGD 0 Fix this by taking a reference to the super block in proc_sys_prune_dcache. The superblock reference is the core of the fix however the sysctl_inodes list is converted to a hlist so that hlist_del_init_rcu may be used. This allows proc_sys_prune_dache to remove inodes the sysctl_inodes list, while not causing problems for proc_sys_evict_inode when if it later choses to remove the inode from the sysctl_inodes list. Removing inodes from the sysctl_inodes list allows proc_sys_prune_dcache to have a progress guarantee, while still being able to drop all locks. The fact that head->unregistering is set in start_unregistering ensures that no more inodes will be added to the the sysctl_inodes list. Previously the code did a dance where it delayed calling iput until the next entry in the list was being considered to ensure the inode remained on the sysctl_inodes list until the next entry was walked to. The structure of the loop in this patch does not need that so is much easier to understand and maintain. Cc: stable@vger.kernel.org Reported-by: Andrei Vagin Tested-by: Andrei Vagin Fixes: ace0c791e6c3 ("proc/sysctl: Don't grab i_lock under sysctl_lock.") Fixes: d6cffbbe9a7e ("proc/sysctl: prune stale dentries during unregistering") Signed-off-by: "Eric W. Biederman" fs/proc/internal.h | 2 +- fs/proc/proc_sysctl.c | 43 ++++++++++++++++++++++++++++++------------- include/linux/sysctl.h | 2 +- 3 files changed, 32 insertions(+), 15 deletions(-) commit b6ea01ba3fe9dcb5e08bbd9ed482845582a1e80b Author: Amrani, Ram Date: Mon May 29 11:18:54 2017 +0300 RDMA/qedr: Add qedr to MAINTAINERS file Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit e7d80c830489f67b1d0257e6919840100085dea9 Author: Mike Marciniszyn Date: Thu Jun 22 15:01:10 2017 -0400 IB/iser: Handle lack of memory management extentions correctly max_fast_reg_page_list_len is only valid when the memory management extentions are signaled by the underlying driver. Fix by adjusting iser_calc_scsi_params() to use ISCSI_ISER_MAX_SG_TABLESIZE when the extentions are not indicated. Reported-by: Thomas Rosenstein Fixes: Commit df749cdc45d9 ("IB/iser: Support up to 8MB data transfer in a single command") Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Acked-by: Sagi Grimberg Tested-by: Thomas Rosenstein Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iser_verbs.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit aab2ee03912be6e12bb5f4810be0b80a82168d3e Author: Geert Uytterhoeven Date: Wed Jul 5 17:09:42 2017 +0200 mmc: block: Let MMC_IOC_MULTI_CMD return zero again for zero entries With gcc 4.1.2: drivers/mmc/core/block.c: In function ‘mmc_blk_ioctl_cmd_issue’: drivers/mmc/core/block.c:630: warning: ‘ioc_err’ may be used uninitialized in this function Indeed, if mq_rq->ioc_count is zero, an uninitialized value will be stored in mq_rq->drv_op_result and passed to blk_end_request_all(). Can mq_rq->ioc_count be zero? - mmc_blk_ioctl_cmd() sets ioc_count to 1, so this is safe, - mmc_blk_ioctl_multi_cmd() obtains ioc_count from user space in response to the MMC_IOC_MULTI_CMD ioctl, and does allow zero. To avoid returning an uninitialized value, and as it is pointless to do all this work when the MMC_IOC_MULTI_CMD ioctl is used with zero entries, check for this early in mmc_blk_ioctl_multi_cmd(), and return zero, like was returned before. Fixes: 3ecd8cf23f88d5df ("mmc: block: move multi-ioctl() to use block layer") Signed-off-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 3 +++ 1 file changed, 3 insertions(+) commit 7432b49b54cd931743f0b6e9f652bc329e4a242a Author: Geert Uytterhoeven Date: Wed Jul 5 17:09:41 2017 +0200 mmc: block: Initialize ret in mmc_blk_issue_drv_op() for MMC_DRV_OP_IOCTL With gcc 4.1.2: drivers/mmc/core/block.c: In function ‘mmc_blk_issue_drv_op’: drivers/mmc/core/block.c:1178: warning: ‘ret’ may be used uninitialized in this function Indeed, for MMC_DRV_OP_IOCTL, if mq_rq->ioc_count is zero, an uninitialized value will be stored in mq_rq->drv_op_result and passed to blk_end_request_all(). Can mq_rq->ioc_count be zero? - mmc_blk_ioctl_cmd() sets ioc_count to 1, so this is safe, - mmc_blk_ioctl_multi_cmd() obtains ioc_count from user space in response to the MMC_IOC_MULTI_CMD ioctl, and does allow zero. Initialize ret to zero to fix this for current and future callers. Fixes: 0493f6fe5bdee8ac ("mmc: block: Move boot partition locking into a driver op") Signed-off-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d40e0d4fb5613099a58c95a9403f51b03e40e861 Author: Paul Burton Date: Wed Jul 5 09:59:05 2017 -0700 locking/qspinlock: Include linux/prefetch.h kernel/locking/qspinlock.c makes use of prefetchw() but hasn't included linux/prefetch.h up until now, instead relying upon indirect inclusion of some header that defines prefetchw(). In the case of MIPS we generally obtain a definition of prefetchw() from asm/processor.h, included by way of linux/mutex.h, but only for configurations which select CONFIG_CPU_HAS_PREFETCH. For configurations which don't this leaves prefetchw() undefined leading to the following build failure: CC kernel/locking/qspinlock.o kernel/locking/qspinlock.c: In function ‘queued_spin_lock_slowpath’: kernel/locking/qspinlock.c:549:4: error: implicit declaration of function ‘prefetchw’ [-Werror=implicit-function-declaration] prefetchw(next); ^~~~~~~~~ Fix this by including linux/prefetch.h in order to ensure that we get a definition of prefetchw(). Signed-off-by: Paul Burton Cc: Ingo Molnar Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Ralf Baechle kernel/locking/qspinlock.c | 1 + 1 file changed, 1 insertion(+) commit d7f14c66c273b00aaa626f419d3155773a88d460 Author: Uwe Kleine-König Date: Sun Jul 9 20:02:36 2017 +0200 kbuild: Enable Large File Support for hostprogs This fixes the following build error for me when building on an 32 bit machine using an XFS file system: $ make scripts/basic/fixdep HOSTCC scripts/basic/fixdep fixdep: error fstat'ing depfile: scripts/basic/.fixdep.d: Value too large for defined data type Signed-off-by: Uwe Kleine-König Acked-by: Ben Hutchings Signed-off-by: Masahiro Yamada Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 09c3776c5472f2bc73b29b13d5947cec6103a99c Author: Masahiro Yamada Date: Mon Jul 10 03:33:00 2017 +0900 kbuild: remove wrapper files handling from Makefile.headersinst scripts/Makefike.headersinst creates asm-generic wrappers by itself because scripts/Makefile.asm-generic created some of exported wrappers outside uapi directories. Now this distortion has been fixed. scripts/Makefile.headersinst can simply copy wrappers created by scripts/Makefile.asm-generic. Signed-off-by: Masahiro Yamada scripts/Makefile.headersinst | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit a9d9a400e0753491e3eacc9f4dbc60547ea1de45 Author: Masahiro Yamada Date: Mon Jul 10 03:32:59 2017 +0900 kbuild: split exported generic header creation into uapi-asm-generic When we install headers, we are interested only in headers under uapi directories. Split out uapi-asm-generic target and make headers_install depend on it. It will avoid generating unneeded asm-generic wrappers. Signed-off-by: Masahiro Yamada Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d1b32bacffe189a0cdc2c36905a753535638cb1c Author: Masahiro Yamada Date: Mon Jul 10 03:32:58 2017 +0900 kbuild: do not include old-kbuild-file from Makefile.headersinst Now asm-generic wrappers to be exported are all listed in arch/*/include/uapi/asm/Kbuild. "make headers_install" no longer depends on any Kbuild files outside uapi directories. Signed-off-by: Masahiro Yamada scripts/Makefile.headersinst | 5 ----- 1 file changed, 5 deletions(-) commit 22c92aee6f95d9c82d33f04c90c6903a6a94df80 Author: Masahiro Yamada Date: Mon Jul 10 03:32:57 2017 +0900 xtensa: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/xtensa/include/asm/Kbuild | 10 +--------- arch/xtensa/include/uapi/asm/Kbuild | 9 +++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) commit ee73056bee8ed47ba12de56ab83bcbe1a0618926 Author: Masahiro Yamada Date: Mon Jul 10 03:32:56 2017 +0900 unicore32: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/unicore32/include/asm/Kbuild | 30 +----------------------------- arch/unicore32/include/uapi/asm/Kbuild | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 29 deletions(-) commit c44e27181f8217bdab6f8ad25d34c68c26fbabb4 Author: Masahiro Yamada Date: Mon Jul 10 03:32:55 2017 +0900 tile: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Signed-off-by: Masahiro Yamada arch/tile/include/asm/Kbuild | 19 ------------------- arch/tile/include/uapi/asm/Kbuild | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) commit b6744e04143dfe99f00b98367bc7e9e3449d7c07 Author: Masahiro Yamada Date: Mon Jul 10 03:32:54 2017 +0900 sparc: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Signed-off-by: Masahiro Yamada arch/sparc/include/asm/Kbuild | 1 - arch/sparc/include/uapi/asm/Kbuild | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) commit 895931232d9358e0016f580f26b336c29c9528cc Author: Masahiro Yamada Date: Mon Jul 10 03:32:53 2017 +0900 sh: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Signed-off-by: Masahiro Yamada arch/sh/include/asm/Kbuild | 19 ------------------- arch/sh/include/uapi/asm/Kbuild | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 19 deletions(-) commit bd78acad8e866e1167f9de97c9b090ee6c2c96a7 Author: Masahiro Yamada Date: Mon Jul 10 03:32:52 2017 +0900 parisc: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/parisc/include/asm/Kbuild | 7 +------ arch/parisc/include/uapi/asm/Kbuild | 4 ++++ 2 files changed, 5 insertions(+), 6 deletions(-) commit c23504c60ebbc27f9418e01a45e5d4111c4d5f8b Author: Masahiro Yamada Date: Mon Jul 10 03:32:51 2017 +0900 openrisc: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada Acked-by: Stafford Horne arch/openrisc/include/asm/Kbuild | 29 +---------------------------- arch/openrisc/include/uapi/asm/Kbuild | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 28 deletions(-) commit 3beb4256f922733330938eac70c9218ec3f0b5c5 Author: Masahiro Yamada Date: Mon Jul 10 03:32:50 2017 +0900 nios2: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada Reviewed-by: Tobias Klauser arch/nios2/include/asm/Kbuild | 25 +------------------------ arch/nios2/include/uapi/asm/Kbuild | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 24 deletions(-) commit 770c0d86013e22647b15af8df2707f81ee1d5cd0 Author: Masahiro Yamada Date: Mon Jul 10 03:32:49 2017 +0900 nios2: remove unneeded arch/nios2/include/(generated/)asm/signal.h Currently, NIOS2 has three signal.h files under arch/nios2/include: [1] arch/nios2/include/asm/signal.h [2] arch/nios2/include/uapi/asm/signal.h [3] arch/nios2/include/generated/asm/signal.h [3] is build-time generated by scripts/Makefile.asm-generic. However, -I$(srctree)/arch/$(hdr-arch)/include search path is listed before -I$(objtree)/arch/$(hdr-arch)/include/generated in LINUXINCLUDE. Therefore [1] is always included instead of [3]. Remove [3] which is never included. If we look at [1], it just includes [2]. So, [1] can be removed as well. Signed-off-by: Masahiro Yamada Reviewed-by: Tobias Klauser arch/nios2/include/asm/Kbuild | 1 - arch/nios2/include/asm/signal.h | 22 ---------------------- 2 files changed, 23 deletions(-) commit 20dd4c624d25156d5ec3345bbb690b98175ef879 Author: Madhavan Srinivasan Date: Tue Jul 11 16:27:49 2017 +0530 powerpc/perf: Fix SDAR_MODE value for continous sampling on Power9 In case of continous sampling (non-marked), the code currently sets MMCRA[SDAR_MODE] to 0b01 (Update on TLB miss) for Power9 DD1. On DD2 and later it copies the sdar_mode value from the event code, which for most events is 0b00 (No updates). However we must set a non-zero value for SDAR_MODE when doing continuous sampling, so honor the event code, unless it's zero, in which case we use use 0b01 (Update on TLB miss). Fixes: 78b4416aa249 ("powerpc/perf: Handle sdar_mode for marked event in power9") Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/isa207-common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e5f5a5b06e51a36f6ddf31a4a485358263953a3d Author: Maciej W. Rozycki Date: Sat Jul 8 23:24:44 2017 +0100 MIPS: Fix MIPS I ISA /proc/cpuinfo reporting Correct a commit 515a6393dbac ("MIPS: kernel: proc: Add MIPS R6 support to /proc/cpuinfo") regression that caused MIPS I systems to show no ISA levels supported in /proc/cpuinfo, e.g.: system type : Digital DECstation 2100/3100 machine : Unknown processor : 0 cpu model : R3000 V2.0 FPU V2.0 BogoMIPS : 10.69 wait instruction : no microsecond timers : no tlb_entries : 64 extra interrupt vector : no hardware watchpoint : no isa : ASEs implemented : shadow register sets : 1 kscratch registers : 0 package : 0 core : 0 VCED exceptions : not available VCEI exceptions : not available and similarly exclude `mips1' from the ISA list for any processors below MIPSr1. This is because the condition to show `mips1' on has been made `cpu_has_mips_r1' rather than newly-introduced `cpu_has_mips_1'. Use the correct condition then. Fixes: 515a6393dbac ("MIPS: kernel: proc: Add MIPS R6 support to /proc/cpuinfo") Signed-off-by: Maciej W. Rozycki Reviewed-by: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 3.19+ Patchwork: https://patchwork.linux-mips.org/patch/16758/ Signed-off-by: Ralf Baechle arch/mips/kernel/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fdc66e046206306bf61ff2d626bfa52ca087f7b Author: Matt Redfearn Date: Mon Jul 10 09:43:31 2017 +0100 MIPS: Fix minimum alignment requirement of IRQ stack Commit db8466c581cc ("MIPS: IRQ Stack: Unwind IRQ stack onto task stack") erroneously set the initial stack pointer of the IRQ stack to a value with a 4 byte alignment. The MIPS32 ABI requires that the minimum stack alignment is 8 byte, and the MIPS64 ABIs(n32/n64) require 16 byte minimum alignment. Fix IRQ_STACK_START such that it leaves space for the dummy stack frame (containing interrupted task kernel stack pointer) while also meeting minimum alignment requirements. Fixes: db8466c581cc ("MIPS: IRQ Stack: Unwind IRQ stack onto task stack") Reported-by: Darius Ivanauskas Signed-off-by: Matt Redfearn Cc: Chris Metcalf Cc: Petr Mladek Cc: Aaron Tomlin Cc: Jason A. Donenfeld Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16760/ Signed-off-by: Ralf Baechle arch/mips/include/asm/irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e62a888029b4adbbc55894eaa8b929221113948 Author: Paul Burton Date: Sat Jun 17 13:52:49 2017 -0700 MIPS: generic: Support MIPS Boston development boards Add support for the MIPS Boston development board to generic kernels, which essentially amounts to: - Adding the device tree source for the MIPS Boston board. - Adding a Kconfig fragment which enables the appropriate drivers for the MIPS Boston board. With these changes in place generic kernels will support the board by default, and kernels with only the drivers needed for Boston enabled can be configured by setting BOARDS=boston during configuration. For example: $ make ARCH=mips 64r6el_defconfig BOARDS=boston Signed-off-by: Paul Burton Reviewed-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16485/ Signed-off-by: Ralf Baechle MAINTAINERS | 2 + arch/mips/boot/dts/img/Makefile | 2 + arch/mips/boot/dts/img/boston.dts | 224 ++++++++++++++++++++++++++ arch/mips/configs/generic/board-boston.config | 48 ++++++ arch/mips/generic/Kconfig | 12 ++ arch/mips/generic/vmlinux.its.S | 25 +++ 6 files changed, 313 insertions(+) commit 4d2804b7d76ef6e6cd85be74999548276d23067f Author: Paul Burton Date: Sat Jun 17 13:52:48 2017 -0700 MIPS: DTS: img: Don't attempt to build-in all .dtb files When building a FIT image we may want the kernel to build multiple .dtb files, but we don't want to build them all into the kernel binary as object files since they'll instead be included in the FIT image. Commit daa10170da27 ("MIPS: DTS: img: add device tree for Marduk board") however created arch/mips/boot/dts/img/Makefile with a line that builds any enabled .dtb files into the kernel. Remove this & build the pistachio object specifically, in preparation for adding .dtb targets which we don't want to build into the kernel. Signed-off-by: Paul Burton Cc: Rahul Bedarkar Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16484/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/img/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6b0fd6c1a22da18a00f8ce12014d55ce0a316651 Author: Paul Burton Date: Sat Jun 17 13:52:47 2017 -0700 clk: boston: Add a driver for MIPS Boston board clocks Add a driver for the clocks provided by the MIPS Boston board from Imagination Technologies. 2 clocks are provided - the system clock & the CPU clock - and each is a simple fixed rate clock whose frequency can be determined by reading a register provided by the board. Signed-off-by: Paul Burton Acked-by: Stephen Boyd Reviewed-by: James Hogan Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16483/ Signed-off-by: Ralf Baechle MAINTAINERS | 1 + drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/imgtec/Kconfig | 9 ++++ drivers/clk/imgtec/Makefile | 1 + drivers/clk/imgtec/clk-boston.c | 103 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+) commit 7461279bba4a62d192eda6dd10de68ac0543bfcd Author: Paul Burton Date: Sat Jun 17 13:52:46 2017 -0700 dt-bindings: Document img,boston-clock binding Add device tree binding documentation for the clocks provided by the MIPS Boston development board from Imagination Technologies, and a header file describing the available clocks for use by device trees & driver. Signed-off-by: Paul Burton Acked-by: Stephen Boyd Cc: Frank Rowand Cc: Michael Turquette Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16482/ Signed-off-by: Ralf Baechle .../devicetree/bindings/clock/img,boston-clock.txt | 31 ++++++++++++++++++++++ MAINTAINERS | 7 +++++ include/dt-bindings/clock/boston-clock.h | 14 ++++++++++ 3 files changed, 52 insertions(+) commit 828db212bf4b63c68c51f6519435c48e8d79bd00 Author: James Hogan Date: Thu Jun 29 10:12:36 2017 +0100 MIPS: Traced negative syscalls should return -ENOSYS If a negative system call number is used when system call tracing is enabled, syscall_trace_enter() will return that negative system call number without having written the return value and error flag into the pt_regs. The caller then treats it as a cancelled system call and assumes that the return value and error flag are already written, leaving the negative system call number in the return register ($v0), and the 4th system call argument in the error register ($a3). Add a special case to detect this at the end of syscall_trace_enter(), to set the return value to error -ENOSYS when this happens. Fixes: d218af78492a ("MIPS: scall: Always run the seccomp syscall filters") Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16653/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 7 +++++++ 1 file changed, 7 insertions(+) commit becddba9f80f26a2b9ebe9bad2806304ed5e00e1 Author: James Hogan Date: Thu Jun 29 10:12:35 2017 +0100 MIPS: Correct forced syscall errors When the system call return value is forced to be an error (for example due to SECCOMP_RET_ERRNO), syscall_set_return_value() puts the error code in the return register $v0 and -1 in the error register $a3. However normally executed system calls put 1 in the error register rather than -1, so fix syscall_set_return_value() to be consistent with that. I don't anticipate that anything would have been broken by this, since the most natural way to check the error register on MIPS would be a conditional branch if error register is [not] equal to zero (bnez or beqz). Fixes: 1d7bf993e073 ("MIPS: ftrace: Add support for syscall tracepoints.") Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16652/ Signed-off-by: Ralf Baechle arch/mips/include/asm/syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f32a39d49b25eaa66d2420f1f03d371ea4cd906 Author: James Hogan Date: Thu Jun 29 10:12:34 2017 +0100 MIPS: Negate error syscall return in trace The sys_exit trace event takes a single return value for the system call, which MIPS passes the value of the $v0 (result) register, however MIPS returns positive error codes in $v0 with $a3 specifying that $v0 contains an error code. As a result erroring system calls are traced returning positive error numbers that can't always be distinguished from success. Use regs_return_value() to negate the error code if $a3 is set. Fixes: 1d7bf993e073 ("MIPS: ftrace: Add support for syscall tracepoints.") Signed-off-by: James Hogan Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-mips@linux-mips.org Cc: # 3.13+ Patchwork: https://patchwork.linux-mips.org/patch/16651/ Acked-by: Steven Rostedt (VMware) Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54eca7eccc5e149825f831859123b692a565bca9 Author: James Hogan Date: Thu Jun 29 10:12:33 2017 +0100 MIPS: Drop duplicate HAVE_SYSCALL_TRACEPOINTS select MIPS selects HAVE_SYSCALL_TRACEPOINTS twice. The first was added back in v3.13 by commit 2d7bf993e073 ("MIPS: ftrace: Add support for syscall tracepoints."), but then a second redundant one was added in v4.2 by commit fb59e394c30c ("MIPS: ftrace: Enable support for syscall tracepoints."). Drop the duplicate select. Fixes: fb59e394c30c ("MIPS: ftrace: Enable support for syscall tracepoints.") Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16654/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 65ae8d2621a9fb20b53348311984ea79fee42a55 Author: Maciej W. Rozycki Date: Tue May 23 13:40:23 2017 +0100 MIPS16e2: Provide feature overrides for non-MIPS16 systems Hardcode the absence of the MIPS16e2 ASE for all the systems that do so for the MIPS16 ASE already, providing for code to be optimized away. Signed-off-by: Maciej W. Rozycki Reviewed-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16097/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-ath25/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-dec/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-jz4740/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-netlogic/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-rc32434/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-rm/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-sibyte/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-tx49xx/cpu-feature-overrides.h | 1 + 16 files changed, 16 insertions(+) commit 17753d16251837125014caa6b49406f52aef8916 Author: Adrian Hunter Date: Wed Jun 21 15:08:39 2017 +0300 mmc: sdhci-acpi: Workaround conflict with PCI wifi on GPD Win handheld GPDwin uses PCI wifi which conflicts with SDIO's use of acpi_device_fix_up_power() on child device nodes. Specifically acpi_device_fix_up_power() causes the wifi module to get turned off. Identifying GPDwin is problematic, but since SDIO is only used for wifi, the presence of the PCI wifi card in the expected slot with an ACPI companion node, is used to indicate that acpi_device_fix_up_power() should be avoided. Signed-off-by: Adrian Hunter Acked-by: Hans de Goede Tested-by: Hans de Goede Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 70 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 6 deletions(-) commit 92ecd19a7e1dc1c928707835c28cb65f0740be2d Author: Maciej W. Rozycki Date: Sat Jul 8 16:00:09 2017 +0100 MIPS: MIPS16e2: Report ASE presence in /proc/cpuinfo Only now that both feature determination and unaligned emulation is in place add reporting to /proc/cpuinfo, so that the presence of "mips16e2" there not only indicates our recognition of the hardware feature, but correct unaligned emulation as well. Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16757/ Signed-off-by: Ralf Baechle arch/mips/kernel/proc.c | 1 + 1 file changed, 1 insertion(+) commit 1d278a879081ddc40286500e58868aaee47de257 Author: David Howells Date: Wed Jul 5 16:25:53 2017 +0100 VFS: Kill off s_options and helpers Kill off s_options, save/replace_mount_options() and generic_show_options() as all filesystems now implement ->show_options() for themselves. This should make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells Signed-off-by: Al Viro Documentation/filesystems/vfs.txt | 6 ---- fs/efivarfs/super.c | 1 - fs/namespace.c | 59 --------------------------------------- fs/super.c | 1 - include/linux/fs.h | 9 ------ 5 files changed, 76 deletions(-) commit 4dfdb71307675b19a54723a556371dad5e3b0083 Author: David Howells Date: Wed Jul 5 16:25:45 2017 +0100 orangefs: Implement show_options Implement the show_options superblock op for orangefs as part of a bid to rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells cc: Mike Marshall cc: pvfs2-developers@beowulf-underground.org Signed-off-by: Al Viro fs/orangefs/super.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit c4fac9100456995c10b65c13be84554258ed7fc8 Author: David Howells Date: Wed Jul 5 16:25:37 2017 +0100 9p: Implement show_options Implement the show_options superblock op for 9p as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells cc: Eric Van Hensbergen cc: Ron Minnich cc: Latchesar Ionkov cc: v9fs-developer@lists.sourceforge.net Signed-off-by: Al Viro fs/9p/v9fs.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++ fs/9p/v9fs.h | 3 +++ fs/9p/vfs_super.c | 6 ++--- include/net/9p/client.h | 13 ++++++++++ include/net/9p/transport.h | 1 + net/9p/client.c | 25 +++++++++++++++++++ net/9p/trans_fd.c | 31 ++++++++++++++++++++--- net/9p/trans_rdma.c | 31 ++++++++++++++++++++--- 8 files changed, 161 insertions(+), 10 deletions(-) commit 86a1da6d30ad727c2a9cc5d6a51bff6d830036b5 Author: David Howells Date: Wed Jul 5 16:25:30 2017 +0100 isofs: Implement show_options Implement the show_options superblock op for omfs as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells cc: Jan Kara Signed-off-by: Al Viro fs/isofs/inode.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++--- fs/isofs/isofs.h | 3 +++ 2 files changed, 51 insertions(+), 3 deletions(-) commit 677018a6ce620c8ca85abae1a07a41d66247d420 Author: David Howells Date: Wed Jul 5 16:25:23 2017 +0100 afs: Implement show_options Implement the show_options superblock op for afs as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Also implement the show_devname op to display the correct device name and thus avoid the need to display the cell= and volume= options. Signed-off-by: David Howells cc: linux-afs@lists.infradead.org Signed-off-by: Al Viro fs/afs/super.c | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit 26a7655e6a55768a082336dac8a4563344e890a2 Author: David Howells Date: Wed Jul 5 16:25:16 2017 +0100 affs: Implement show_options Implement the show_options superblock op for affs as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells Signed-off-by: Al Viro fs/affs/super.c | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) commit 3ab7947ac3b5cd625c186bb608678bffd881e472 Author: David Howells Date: Wed Jul 5 16:25:03 2017 +0100 befs: Implement show_options Implement the show_options superblock op for befs as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells cc: Luis de Bethencourt cc: Salah Triki Signed-off-by: Al Viro fs/befs/linuxvfs.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit a66ca4146f3f736ff968c099926ccb1c1761b1a4 Author: David Howells Date: Wed Jul 5 16:24:56 2017 +0100 spufs: Implement show_options Implement the show_options superblock op for spufs as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells cc: Jeremy Kerr cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Al Viro arch/powerpc/platforms/cell/spufs/inode.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit eafbc20701243d21989c9c9aff5e5d9488e1890a Merge: 5074002 0cf5ec4 Author: Jani Nikula Date: Tue Jul 11 12:52:14 2017 +0300 Merge tag 'gvt-fixes-2017-07-11' of https://github.com/01org/gvt-linux into drm-intel-next-fixes gvt-fixes-2017-07-11 - Revert "drm/i915/gvt: Fix possible recursive locking issue" (Chuanxiao), which is incomplete fix and it's actually VFIO issue, so revert. - remove unneeded scheduler mutex for performance fix (Weinan) - other misc error handling fix and cmd address audit Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170711055333.jhrmvx6ilvg2qlnn@zhen-hp.sh.intel.com commit 50740024bc393b608f7e391ac35e70f33938dd24 Author: Maarten Lankhorst Date: Mon Jun 26 10:33:49 2017 +0200 drm/i915: Make DP-MST connector info work Commit 9a148a96fc3a ("drm/i915/debugfs: add dp mst info") adds support for DP-MST to intel_connector_info, but forgot to remove the early return for DP-MST. Remove it, and print out MST connectors directly. Fixes: 9a148a96fc3a ("drm/i915/debugfs: add dp mst info") Cc: # v4.11+ Cc: Dhinakaran Pandiyan Cc: Libin Yang Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170626083349.24389-1-maarten.lankhorst@linux.intel.com Reviewed-by: Dhinakaran Pandiyan (cherry picked from commit 77d1f615c78a73a04254fa2bff07ee9fa27145d9) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a8a75f3235724c5941a33e287b2f98966ad14c5 Author: Ingo Molnar Date: Tue Jul 11 10:56:54 2017 +0200 Revert "perf/core: Drop kernel samples even though :u is specified" This reverts commit cc1582c231ea041fbc68861dfaf957eaf902b829. This commit introduced a regression that broke rr-project, which uses sampling events to receive a signal on overflow (but does not care about the contents of the sample). These signals are critical to the correct operation of rr. There's been some back and forth about how to fix it - but to not keep applications in limbo queue up a revert. Reported-by: Kyle Huey Acked-by: Kyle Huey Acked-by: Peter Zijlstra Cc: Jin Yao Cc: Vince Weaver Cc: Linus Torvalds Cc: Will Deacon Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Stephane Eranian Cc: Namhyung Kim Cc: Jiri Olsa Cc: Link: http://lkml.kernel.org/r/20170628105600.GC5981@leverpostej Signed-off-by: Ingo Molnar kernel/events/core.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 095f6d76221dd4b99d004e4c826ac4382c6ce5e3 Author: Ingo Molnar Date: Wed Jul 5 10:41:05 2017 +0200 MAINTAINERS: Update the PTRACE entry Document the status quo: Roland has been busy with other projects for years, so list Oleg as the de-facto maintainer. Also update the file patterns. Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Roland McGrath Signed-off-by: Ingo Molnar MAINTAINERS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1922eec4b5e2d8d6e92f87592b88477a2dbdcf16 Merge: dbf5806 80f6258 Author: Ingo Molnar Date: Tue Jul 11 10:17:04 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.13-20170710' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fix attr.exclude_kernel setting for default cycles:p (Arnaldo Carvalho de Melo) - Fix broken arrow at row 0 connecting jmp instruction to its target in the annotate TUI (Jin Yao) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 65553b12e8fd3730b07e486c15dd6574563ddc58 Author: Kailang Yang Date: Tue Jul 11 15:15:47 2017 +0800 ALSA: hda/realtek - New codec device ID for ALC1220 Codec ID is 0x1168. It is another ALC1220 codec. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit 0cf5ec41839d82ee7f8fbb47f137b7afc562b9f1 Author: Chuanxiao Dong Date: Fri Jun 23 13:01:11 2017 +0800 drm/i915/gvt: Use fence error from GVT request for workload status The req->fence.error will be set if this request caused GPU hang so we can use this value to workload->status to indicate whether this GVT request caused any problem. If it caused GPU hang, we shouldn't trigger any context switch back to the guest. v2: - only take -EIO from fence->error. (Zhenyu) Fixes: 8f1117abb408 (drm/i915/gvt: handle workload lifecycle properly) Signed-off-by: Chuanxiao Dong Cc: Zhenyu Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 4cc74389a551dc95fce72d58c11e55a93b6ecd19 Author: Weinan Li Date: Mon Jun 19 08:49:17 2017 +0800 drm/i915/gvt: remove scheduler_mutex in per-engine workload_thread For the vGPU workloads, now GVT-g use per vGPU scheduler, the per-ring work_thread only pick workload belongs to the current vGPU. And with time slice based scheduler, it waits all the engines become idle before do vGPU switch. So we can run free dispatch in per-ring work_thread, different ring running in different 'vGPU' won't happen. For the workloads between vGPU and Host, this scheduler_mutex can't block host to dispatch workload into other ring engines. Here remove this mutex since it impacts the performance when applications use more than 1 ring engines in 1 vgpu. ring0 running in vGPU1, ring1 running in Host. Will happen. ring0 running in vGPU1, ring1 running in vGPU2. Won't happen. Signed-off-by: Weinan Li Signed-off-by: Ping Gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 7 ------- 1 file changed, 7 deletions(-) commit 08673c3e27aa4407899e4fbb4738dac25370f706 Author: Chuanxiao Dong Date: Fri Jul 7 13:21:52 2017 +0800 drm/i915/gvt: Revert "drm/i915/gvt: Fix possible recursive locking issue" This reverts commit 62d02fd1f807bf5a259a242c483c9fb98a242630. The rwsem recursive trace should not be fixed from kvmgt side by using a workqueue and it is an issue should be fixed in VFIO. So this one should be reverted. Signed-off-by: Chuanxiao Dong Cc: Zhenyu Wang Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 3 --- drivers/gpu/drm/i915/gvt/kvmgt.c | 55 ++++++++-------------------------------- 2 files changed, 10 insertions(+), 48 deletions(-) commit 3364bf5fd00f0391ad090f547932a5c4b2068dbc Author: Ping Gao Date: Tue Jul 4 16:09:58 2017 +0800 drm/i915/gvt: Audit the command buffer address The command buffer address in context like ring buffer base address and wa_ctx address need to be audit to make sure they are in the valid GGTT range. Signed-off-by: Ping Gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0de98709896d9c02ce3121ec3afb524253a5853f Author: Zhou, Wenjia Date: Tue Jul 4 15:47:00 2017 +0800 drm/i915/gvt: Fix a memory leak in intel_gvt_init_gtt() It will causes memory leak, if the function setup_spt_oos() fail, in the function intel_gvt_init_gtt(), which allocated by get_zeroed_page() and mapped by dma_map_page(). Unmap and free the page, after STP oos initialize fail, it will fix this issue. Signed-off-by: Zhou, Wenjia Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 2 ++ 1 file changed, 2 insertions(+) commit c17d5d5f51f72f24e0e17a4450ae5010bf6962d9 Author: Mike Christie Date: Mon Jul 10 14:53:31 2017 -0500 target: export lio pgr/alua support as device attr Older kernels could crash or hang if the user write/read some ALUA files with pscsi and tcmu backends. This patch exports if LIO supports executing PGR and ALUA scsi commands/checks for the se_device, so userspace can easily test. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 2400fd822f467cb4c886c879d8ad99feac9cf319 Author: Oliver O'Halloran Date: Thu Jul 6 18:46:43 2017 +1000 powerpc/asm: Mark cr0 as clobbered in mftb() The workaround for the CELL timebase bug does not correctly mark cr0 as being clobbered. This means GCC doesn't know that the asm block changes cr0 and might leave the result of an unrelated comparison in cr0 across the block, which we then trash, leading to basically random behaviour. Fixes: 859deea949c3 ("[POWERPC] Cell timebase bug workaround") Cc: stable@vger.kernel.org # v2.6.19+ Signed-off-by: Oliver O'Halloran [mpe: Tweak change log and flag for stable] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41d0c2ecde19cfe93071ed7b979a53ba60b12840 Author: Nicholas Piggin Date: Thu Jul 6 20:51:28 2017 +1000 powerpc/powernv: Fix local TLB flush for boot and MCE on POWER9 There are two cases outside the normal address space management where a CPU's local TLB is to be flushed: 1. Host boot; in case something has left stale entries in the TLB (e.g., kexec). 2. Machine check; to clean corrupted TLB entries. CPU state restore from deep idle states also flushes the TLB. However this seems to be a side effect of reusing the boot code to set CPU state, rather than a requirement itself. The current flushing has a number of problems with ISA v3.0B: - The current radix mode of the MMU is not taken into account. tlbiel is undefined if the R field does not match the current radix mode. - ISA v3.0B hash must flush the partition and process table caches. - ISA v3.0B radix must flush partition and process scoped translations, partition and process table caches, and also the page walk cache. Add POWER9 cases to handle these, with radix vs hash determined by the host MMU mode. Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/kernel/cpu_setup_power.S | 13 ++++++-- arch/powerpc/kernel/dt_cpu_ftrs.c | 16 ++-------- arch/powerpc/kernel/mce_power.c | 56 ++++++++++++++++++++++++++++++++++- 3 files changed, 67 insertions(+), 18 deletions(-) commit 9967468c0a109644e4a1f5b39b39bf86fe7507a7 Merge: 548aa0e dd83c16 Author: Linus Torvalds Date: Mon Jul 10 16:58:42 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - most of the rest of MM - KASAN updates - lib/ updates - checkpatch updates - some binfmt_elf changes - various misc bits * emailed patches from Andrew Morton : (115 commits) kernel/exit.c: avoid undefined behaviour when calling wait4() kernel/signal.c: avoid undefined behaviour in kill_something_info binfmt_elf: safely increment argv pointers s390: reduce ELF_ET_DYN_BASE powerpc: move ELF_ET_DYN_BASE to 4GB / 4MB arm64: move ELF_ET_DYN_BASE to 4GB / 4MB arm: move ELF_ET_DYN_BASE to 4MB binfmt_elf: use ELF_ET_DYN_BASE only for PIE fs, epoll: short circuit fetching events if thread has been killed checkpatch: improve multi-line alignment test checkpatch: improve macro reuse test checkpatch: change format of --color argument to --color[=WHEN] checkpatch: silence perl 5.26.0 unescaped left brace warnings checkpatch: improve tests for multiple line function definitions checkpatch: remove false warning for commit reference checkpatch: fix stepping through statements with $stat and ctx_statement_block checkpatch: [HLP]LIST_HEAD is also declaration checkpatch: warn when a MAINTAINERS entry isn't [A-Z]:\t checkpatch: improve the unnecessary OOM message test lib/bsearch.c: micro-optimize pivot position calculation ... commit dd83c161fbcc5d8be637ab159c0de015cbff5ba4 Author: zhongjiang Date: Mon Jul 10 15:53:01 2017 -0700 kernel/exit.c: avoid undefined behaviour when calling wait4() wait4(-2147483648, 0x20, 0, 0xdd0000) triggers: UBSAN: Undefined behaviour in kernel/exit.c:1651:9 The related calltrace is as follows: negation of -2147483648 cannot be represented in type 'int': CPU: 9 PID: 16482 Comm: zj Tainted: G B ---- ------- 3.10.0-327.53.58.71.x86_64+ #66 Hardware name: Huawei Technologies Co., Ltd. Tecal RH2285 /BC11BTSA , BIOS CTSAV036 04/27/2011 Call Trace: dump_stack+0x19/0x1b ubsan_epilogue+0xd/0x50 __ubsan_handle_negate_overflow+0x109/0x14e SyS_wait4+0x1cb/0x1e0 system_call_fastpath+0x16/0x1b Exclude the overflow to avoid the UBSAN warning. Link: http://lkml.kernel.org/r/1497264618-20212-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhongjiang Cc: Oleg Nesterov Cc: David Rientjes Cc: Aneesh Kumar K.V Cc: Kirill A. Shutemov Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/exit.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4ea77014af0d6205b05503d1c7aac6eace11d473 Author: zhongjiang Date: Mon Jul 10 15:52:57 2017 -0700 kernel/signal.c: avoid undefined behaviour in kill_something_info When running kill(72057458746458112, 0) in userspace I hit the following issue. UBSAN: Undefined behaviour in kernel/signal.c:1462:11 negation of -2147483648 cannot be represented in type 'int': CPU: 226 PID: 9849 Comm: test Tainted: G B ---- ------- 3.10.0-327.53.58.70.x86_64_ubsan+ #116 Hardware name: Huawei Technologies Co., Ltd. RH8100 V3/BC61PBIA, BIOS BLHSV028 11/11/2014 Call Trace: dump_stack+0x19/0x1b ubsan_epilogue+0xd/0x50 __ubsan_handle_negate_overflow+0x109/0x14e SYSC_kill+0x43e/0x4d0 SyS_kill+0xe/0x10 system_call_fastpath+0x16/0x1b Add code to avoid the UBSAN detection. [akpm@linux-foundation.org: tweak comment] Link: http://lkml.kernel.org/r/1496670008-59084-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhongjiang Cc: Oleg Nesterov Cc: Michal Hocko Cc: Vlastimil Babka Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/signal.c | 4 ++++ 1 file changed, 4 insertions(+) commit 67c6777a5d331dda32a4c4a1bf0cac85bdaaaed8 Author: Kees Cook Date: Mon Jul 10 15:52:54 2017 -0700 binfmt_elf: safely increment argv pointers When building the argv/envp pointers, the envp is needlessly pre-incremented instead of just continuing after the argv pointers are finished. In some (likely impossible) race where the strings could be changed from userspace between copy_strings() and here, it might be possible to confuse the envp position. Instead, just use sp like everything else. Link: http://lkml.kernel.org/r/20170622173838.GA43308@beast Signed-off-by: Kees Cook Cc: Rik van Riel Cc: Daniel Micay Cc: Qualys Security Advisory Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Alexander Viro Cc: Dmitry Safonov Cc: Andy Lutomirski Cc: Grzegorz Andrejczuk Cc: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_elf.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit a73dc5370e153ac63718d850bddf0c9aa9d871e6 Author: Kees Cook Date: Mon Jul 10 15:52:51 2017 -0700 s390: reduce ELF_ET_DYN_BASE Now that explicitly executed loaders are loaded in the mmap region, we have more freedom to decide where we position PIE binaries in the address space to avoid possible collisions with mmap or stack regions. For 64-bit, align to 4GB to allow runtimes to use the entire 32-bit address space for 32-bit pointers. On 32-bit use 4MB, which is the traditional x86 minimum load location, likely to avoid historically requiring a 4MB page table entry when only a portion of the first 4MB would be used (since the NULL address is avoided). For s390 the position could be 0x10000, but that is needlessly close to the NULL address. Link: http://lkml.kernel.org/r/1498154792-49952-5-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: James Hogan Cc: Pratyush Anand Cc: Ingo Molnar Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/include/asm/elf.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 47ebb09d54856500c5a5e14824781902b3bb738e Author: Kees Cook Date: Mon Jul 10 15:52:47 2017 -0700 powerpc: move ELF_ET_DYN_BASE to 4GB / 4MB Now that explicitly executed loaders are loaded in the mmap region, we have more freedom to decide where we position PIE binaries in the address space to avoid possible collisions with mmap or stack regions. For 64-bit, align to 4GB to allow runtimes to use the entire 32-bit address space for 32-bit pointers. On 32-bit use 4MB, which is the traditional x86 minimum load location, likely to avoid historically requiring a 4MB page table entry when only a portion of the first 4MB would be used (since the NULL address is avoided). Link: http://lkml.kernel.org/r/1498154792-49952-4-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Tested-by: Michael Ellerman Acked-by: Michael Ellerman Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: James Hogan Cc: Pratyush Anand Cc: Ingo Molnar Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/elf.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 02445990a96e60a67526510d8b00f7e3d14101c3 Author: Kees Cook Date: Mon Jul 10 15:52:44 2017 -0700 arm64: move ELF_ET_DYN_BASE to 4GB / 4MB Now that explicitly executed loaders are loaded in the mmap region, we have more freedom to decide where we position PIE binaries in the address space to avoid possible collisions with mmap or stack regions. For 64-bit, align to 4GB to allow runtimes to use the entire 32-bit address space for 32-bit pointers. On 32-bit use 4MB, to match ARM. This could be 0x8000, the standard ET_EXEC load address, but that is needlessly close to the NULL address, and anyone running arm compat PIE will have an MMU, so the tight mapping is not needed. Link: http://lkml.kernel.org/r/1498251600-132458-4-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Mark Rutland Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/include/asm/elf.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6a9af90a3bcde217a1c053e135f5f43e5d5fafbd Author: Kees Cook Date: Mon Jul 10 15:52:40 2017 -0700 arm: move ELF_ET_DYN_BASE to 4MB Now that explicitly executed loaders are loaded in the mmap region, we have more freedom to decide where we position PIE binaries in the address space to avoid possible collisions with mmap or stack regions. 4MB is chosen here mainly to have parity with x86, where this is the traditional minimum load location, likely to avoid historically requiring a 4MB page table entry when only a portion of the first 4MB would be used (since the NULL address is avoided). For ARM the position could be 0x8000, the standard ET_EXEC load address, but that is needlessly close to the NULL address, and anyone running PIE on 32-bit ARM will have an MMU, so the tight mapping is not needed. Link: http://lkml.kernel.org/r/1498154792-49952-2-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: James Hogan Cc: Pratyush Anand Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Alexander Viro Cc: Andy Lutomirski Cc: Daniel Micay Cc: Dmitry Safonov Cc: Grzegorz Andrejczuk Cc: Kees Cook Cc: Masahiro Yamada Cc: Qualys Security Advisory Cc: Rik van Riel Cc: Thomas Gleixner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/elf.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit eab09532d40090698b05a07c1c87f39fdbc5fab5 Author: Kees Cook Date: Mon Jul 10 15:52:37 2017 -0700 binfmt_elf: use ELF_ET_DYN_BASE only for PIE The ELF_ET_DYN_BASE position was originally intended to keep loaders away from ET_EXEC binaries. (For example, running "/lib/ld-linux.so.2 /bin/cat" might cause the subsequent load of /bin/cat into where the loader had been loaded.) With the advent of PIE (ET_DYN binaries with an INTERP Program Header), ELF_ET_DYN_BASE continued to be used since the kernel was only looking at ET_DYN. However, since ELF_ET_DYN_BASE is traditionally set at the top 1/3rd of the TASK_SIZE, a substantial portion of the address space is unused. For 32-bit tasks when RLIMIT_STACK is set to RLIM_INFINITY, programs are loaded above the mmap region. This means they can be made to collide (CVE-2017-1000370) or nearly collide (CVE-2017-1000371) with pathological stack regions. Lowering ELF_ET_DYN_BASE solves both by moving programs below the mmap region in all cases, and will now additionally avoid programs falling back to the mmap region by enforcing MAP_FIXED for program loads (i.e. if it would have collided with the stack, now it will fail to load instead of falling back to the mmap region). To allow for a lower ELF_ET_DYN_BASE, loaders (ET_DYN without INTERP) are loaded into the mmap region, leaving space available for either an ET_EXEC binary with a fixed location or PIE being loaded into mmap by the loader. Only PIE programs are loaded offset from ELF_ET_DYN_BASE, which means architectures can now safely lower their values without risk of loaders colliding with their subsequently loaded programs. For 64-bit, ELF_ET_DYN_BASE is best set to 4GB to allow runtimes to use the entire 32-bit address space for 32-bit pointers. Thanks to PaX Team, Daniel Micay, and Rik van Riel for inspiration and suggestions on how to implement this solution. Fixes: d1fd836dcf00 ("mm: split ET_DYN ASLR from mmap ASLR") Link: http://lkml.kernel.org/r/20170621173201.GA114489@beast Signed-off-by: Kees Cook Acked-by: Rik van Riel Cc: Daniel Micay Cc: Qualys Security Advisory Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Alexander Viro Cc: Dmitry Safonov Cc: Andy Lutomirski Cc: Grzegorz Andrejczuk Cc: Masahiro Yamada Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Heiko Carstens Cc: James Hogan Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Pratyush Anand Cc: Russell King Cc: Will Deacon Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/elf.h | 13 +++++----- fs/binfmt_elf.c | 59 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 58 insertions(+), 14 deletions(-) commit c257a340ede0104e902807f0f001799850343ae9 Author: David Rientjes Date: Mon Jul 10 15:52:33 2017 -0700 fs, epoll: short circuit fetching events if thread has been killed We've encountered zombies that are waiting for a thread to exit that are looping in ep_poll() almost endlessly although there is a pending SIGKILL as a result of a group exit. This happens because we always find ep_events_available() and fetch more events and never are able to check for signal_pending() that would break from the loop and return -EINTR. Special case fatal signals and break immediately to guarantee that we loop to fetch more events and delay making a timely exit. It would also be possible to simply move the check for signal_pending() higher than checking for ep_events_available(), but there have been no reports of delayed signal handling other than SIGKILL preventing zombies from exiting that would be fixed by this. It fixes an issue for us where we have witnessed zombies sticking around for at least O(minutes), but considering the code has been like this forever and nobody else has complained that I have found, I would simply queue it up for 4.12. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1705031722350.76784@chino.kir.corp.google.com Signed-off-by: David Rientjes Cc: Alexander Viro Cc: Jan Kara Cc: Davide Libenzi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fd71f6326844efac98d99c0c34e7ca7419506b15 Author: Joe Perches Date: Mon Jul 10 15:52:30 2017 -0700 checkpatch: improve multi-line alignment test The current test fails to warn about improper alignment with code like foo->bar = func(arg1, arg2); because foo->bar is not a single identifier. Convert the $Ident to $Lval which allows for multiple dereferences. Link: http://lkml.kernel.org/r/01c35b9b6a12a415e57746d45d589bfaad39952a.1498841563.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fe528a27dee5fcab3bc093ee6f311080f799e29 Author: Joe Perches Date: Mon Jul 10 15:52:27 2017 -0700 checkpatch: improve macro reuse test checkpatch reports a false positive when using token pasting argument multiple times in a macro. Fix it. Miscellanea: o Make the $tmp variable name used in the macro argument tests a bit more descriptive Link: http://lkml.kernel.org/r/cf434ae7602838388c7cb49d42bca93ab88527e7.1498483044.git.joe@perches.com Signed-off-by: Joe Perches Reported-by: Johannes Berg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 737c0767758bbd65cf95c44ccc09bca970e2ef8e Author: John Brooks Date: Mon Jul 10 15:52:24 2017 -0700 checkpatch: change format of --color argument to --color[=WHEN] The boolean --color argument did not offer the ability to force colourized output even if stdout is not a terminal. Change the format of the argument to the familiar --color[=WHEN] construct as seen in common Linux utilities such as git, ls and dmesg, which allows the user to specify whether to colourize output "always", "never", or "auto" when the output is a terminal. The default is "auto". The old command-line uses of --color and --no-color are unchanged. Link: http://lkml.kernel.org/r/efe43bdbad400f39ba691ae663044462493b0773.1496799721.git.joe@perches.com Signed-off-by: John Brooks Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit 8d81ae05d0176da1c54aeaed697fa34be5c5575e Author: Cyril Bur Date: Mon Jul 10 15:52:21 2017 -0700 checkpatch: silence perl 5.26.0 unescaped left brace warnings As of perl 5, version 26, subversion 0 (v5.26.0) some new warnings have occurred when running checkpatch. Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.\s*){ <-- HERE \s*/ at scripts/checkpatch.pl line 3544. Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.\s*){ <-- HERE \s*/ at scripts/checkpatch.pl line 3885. Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(\+.*(?:do|\))){ <-- HERE / at scripts/checkpatch.pl line 4374. It seems perfectly reasonable to do as the warning suggests and simply escape the left brace in these three locations. Link: http://lkml.kernel.org/r/20170607060135.17384-1-cyrilbur@gmail.com Signed-off-by: Cyril Bur Acked-by: Joe Perches Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a0ad75964e58cd7d9b6910e2bbb8a7e8656c0f51 Author: Joe Perches Date: Mon Jul 10 15:52:19 2017 -0700 checkpatch: improve tests for multiple line function definitions Add a block that identifies multiple line function definitions. Save the function name into $context_function to improve the embedded function name test. Look for misplaced open brace on the function definition. Emit an OPEN_BRACE error when the function definition is similar to void foo(int arg1, int arg2) { Miscellanea: o Remove the $realfile test in function declaration w/o named arguments test o Comment the function declaration w/o named arguments test Link: http://lkml.kernel.org/r/de620ed6ebab75fdfa323741ada2134a0f545892.1496835238.git.joe@perches.com Signed-off-by: Joe Perches Tested-by: David Kershner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 948b133a1b62441bd2ae98b866f409017191fdd3 Author: Heinrich Schuchardt Date: Mon Jul 10 15:52:16 2017 -0700 checkpatch: remove false warning for commit reference Checkpatch warns of an incorrect commit reference style for any hexadecimal number of 12 digits and more. Numbers of 12 digits are not necessarily commit ids. For an example provoking the problem see https://patchwork.kernel.org/patch/9170897/ Checkpatch should only warn if the number refers to an existing commit. Link: http://lkml.kernel.org/r/20170607184008.5869-1-xypron.glpk@gmx.de Signed-off-by: Heinrich Schuchardt Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ca8198640fa9aeea71ae61b02fee6ee5e097f243 Author: Joe Perches Date: Mon Jul 10 15:52:13 2017 -0700 checkpatch: fix stepping through statements with $stat and ctx_statement_block Fix the off-by-one in the suppression of lines in a statement block. This means that for multiple line statements like foo(bar, baz, qux); $stat has been inspected first correctly for the entire statement, and subsequently incorrectly just for qux); This fix will help make tracking appropriate indentation a little easier. Link: http://lkml.kernel.org/r/71b25979c90412133c717084036c9851cd2b7bcb.1496862585.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe658f94b2c911729afbffeeb1f5f03f0a26d9e6 Author: Steffen Maier Date: Mon Jul 10 15:52:10 2017 -0700 checkpatch: [HLP]LIST_HEAD is also declaration Fixes the following false warning among others for LLIST_HEAD and PLIST_HEAD: WARNING: Missing a blank line after declarations #71: FILE: drivers/s390/scsi/zfcp_fsf.c:422: + struct hlist_node *tmp; + HLIST_HEAD(remove_queue); Link: http://lkml.kernel.org/r/20170614133512.89425-1-maier@linux.vnet.ibm.com Signed-off-by: Steffen Maier Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 628f91a28649d063a048629d9d15b3e5c4dcaa37 Author: Joe Perches Date: Mon Jul 10 15:52:07 2017 -0700 checkpatch: warn when a MAINTAINERS entry isn't [A-Z]:\t For consistency, MAINTAINERS entries should be an upper case letter, then a colon, then a tab, then the value. Warn when an entry doesn't have this form. --fix it too. Link: http://lkml.kernel.org/r/9aaaf03ec10adf3888b5e98dd2176b7fe9b5fad8.1496343345.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) commit fb0d0e088e194e7d966c9a1b3c58900664e5d7db Author: Joe Perches Date: Mon Jul 10 15:52:04 2017 -0700 checkpatch: improve the unnecessary OOM message test Use the context around a patch to avoid missing some candidates. Link: http://lkml.kernel.org/r/865e874fbae5decc331a849bd8d71c325db6bc80.1496343345.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 166a0f780a8fdb67f232c85e9905ba84f7247da9 Author: Sergey Senozhatsky Date: Mon Jul 10 15:52:01 2017 -0700 lib/bsearch.c: micro-optimize pivot position calculation There is a slightly faster way (in terms of the number of instructions being used) to calculate the position of a middle element, preserving integer overflow safeness. ./scripts/bloat-o-meter lib/bsearch.o.old lib/bsearch.o.new add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-24 (-24) function old new delta bsearch 122 98 -24 TEST INT array of size 100001, elements [0..100000]. gcc 7.1, Os, x86_64. a) bsearch() of existing key "100001 - 2": BASE ==== $ perf stat ./a.out Performance counter stats for './a.out': 619.445196 task-clock:u (msec) # 0.999 CPUs utilized 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 133 page-faults:u # 0.215 K/sec 1,949,517,279 cycles:u # 3.147 GHz (83.06%) 181,017,938 stalled-cycles-frontend:u # 9.29% frontend cycles idle (83.05%) 82,959,265 stalled-cycles-backend:u # 4.26% backend cycles idle (67.02%) 4,355,706,383 instructions:u # 2.23 insn per cycle # 0.04 stalled cycles per insn (83.54%) 1,051,539,242 branches:u # 1697.550 M/sec (83.54%) 15,263,381 branch-misses:u # 1.45% of all branches (83.43%) 0.620082548 seconds time elapsed PATCHED ======= $ perf stat ./a.out Performance counter stats for './a.out': 475.097316 task-clock:u (msec) # 0.999 CPUs utilized 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 135 page-faults:u # 0.284 K/sec 1,487,467,717 cycles:u # 3.131 GHz (82.95%) 186,537,162 stalled-cycles-frontend:u # 12.54% frontend cycles idle (82.93%) 28,797,869 stalled-cycles-backend:u # 1.94% backend cycles idle (67.10%) 3,807,564,203 instructions:u # 2.56 insn per cycle # 0.05 stalled cycles per insn (83.57%) 1,049,344,291 branches:u # 2208.693 M/sec (83.60%) 5,485 branch-misses:u # 0.00% of all branches (83.58%) 0.475760235 seconds time elapsed b) bsearch() of un-existing key "100001 + 2": BASE ==== $ perf stat ./a.out Performance counter stats for './a.out': 499.244480 task-clock:u (msec) # 0.999 CPUs utilized 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 132 page-faults:u # 0.264 K/sec 1,571,194,855 cycles:u # 3.147 GHz (83.18%) 13,450,980 stalled-cycles-frontend:u # 0.86% frontend cycles idle (83.18%) 21,256,072 stalled-cycles-backend:u # 1.35% backend cycles idle (66.78%) 4,171,197,909 instructions:u # 2.65 insn per cycle # 0.01 stalled cycles per insn (83.68%) 1,009,175,281 branches:u # 2021.405 M/sec (83.79%) 3,122 branch-misses:u # 0.00% of all branches (83.37%) 0.499871144 seconds time elapsed PATCHED ======= $ perf stat ./a.out Performance counter stats for './a.out': 399.023499 task-clock:u (msec) # 0.998 CPUs utilized 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 134 page-faults:u # 0.336 K/sec 1,245,793,991 cycles:u # 3.122 GHz (83.39%) 11,529,273 stalled-cycles-frontend:u # 0.93% frontend cycles idle (83.46%) 12,116,311 stalled-cycles-backend:u # 0.97% backend cycles idle (66.92%) 3,679,710,005 instructions:u # 2.95 insn per cycle # 0.00 stalled cycles per insn (83.47%) 1,009,792,625 branches:u # 2530.660 M/sec (83.46%) 2,590 branch-misses:u # 0.00% of all branches (83.12%) 0.399733539 seconds time elapsed Link: http://lkml.kernel.org/r/20170607150457.5905-1-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/bsearch.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit a94c33dd1f677d16c4f1a162b4b3e9eba1b07c24 Author: Thomas Meyer Date: Mon Jul 10 15:51:58 2017 -0700 lib/extable.c: use bsearch() library function in search_extable() [thomas@m3y3r.de: v3: fix arch specific implementations] Link: http://lkml.kernel.org/r/1497890858.12931.7.camel@m3y3r.de Signed-off-by: Thomas Meyer Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/kernel/module.c | 3 ++- arch/mips/kernel/traps.c | 3 ++- arch/sh/mm/extable_64.c | 34 ++++++++++++++++++---------------- arch/sparc/mm/extable.c | 28 ++++++++++++++-------------- include/linux/extable.h | 5 +++-- kernel/extable.c | 3 ++- kernel/module.c | 2 +- lib/extable.c | 41 +++++++++++++++++++++-------------------- 8 files changed, 63 insertions(+), 56 deletions(-) commit 12e8fd6fd380261fd200d2e8f7a519ade73ea05b Author: Michal Hocko Date: Mon Jul 10 15:51:55 2017 -0700 lib/rhashtable.c: use kvzalloc() in bucket_table_alloc() when possible bucket_table_alloc() can be currently called with GFP_KERNEL or GFP_ATOMIC. For the former we basically have an open coded kvzalloc() while the later only uses kzalloc(). Let's simplify the code a bit by the dropping the open coded path and replace it with kvzalloc(). Link: http://lkml.kernel.org/r/20170531155145.17111-3-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Thomas Graf Cc: Herbert Xu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/rhashtable.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c46ecce431ebe6b1a9551d1f530eb432dae5c39b Author: Davidlohr Bueso Date: Mon Jul 10 15:51:52 2017 -0700 lib/interval_tree_test.c: allow full tree search ... such that a user can specify visiting all the nodes in the tree (intersects with the world). This is a nice opposite from the very basic default query which is a single point. Link: http://lkml.kernel.org/r/20170518174936.20265-5-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/interval_tree_test.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit a8ec14d4f6aa8e245efacc992c8ee6ea0464ce2a Author: Davidlohr Bueso Date: Mon Jul 10 15:51:49 2017 -0700 lib/interval_tree_test.c: allow users to limit scope of endpoint Add a 'max_endpoint' parameter such that users may easily limit the size of the intervals that are randomly generated. Link: http://lkml.kernel.org/r/20170518174936.20265-4-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/interval_tree_test.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit a54dae0338b7f01eb0f9c7571fb9b74f791d1c6b Author: Davidlohr Bueso Date: Mon Jul 10 15:51:46 2017 -0700 lib/interval_tree_test.c: make test options module parameters Allows for more flexible debugging. Link: http://lkml.kernel.org/r/20170518174936.20265-3-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/interval_tree_test.c | 57 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 17 deletions(-) commit 0f789b67647205b77dee56fcc27a7d8de3fcd52e Author: Davidlohr Bueso Date: Mon Jul 10 15:51:43 2017 -0700 lib/interval_tree_test.c: allow the module to be compiled-in Patch series "lib/interval_tree_test: some debugging improvements". Here are some patches that update the interval_tree_test module allowing users to pass finer grained options to run the actual test. This patch (of 4): It is a tristate after all, and also serves well for quick debugging. Link: http://lkml.kernel.org/r/20170518174936.20265-2-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be5f3c7774a158c5bd08de22d54b0612f954dfa8 Author: Alexey Dobriyan Date: Mon Jul 10 15:51:41 2017 -0700 lib/kstrtox.c: use "unsigned int" more gcc does generates stupid code sign extending data back and forth. Help by using "unsigned int". add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-61 (-61) function old new delta _parse_integer 128 123 -5 It _still_ does generate useless MOVSX but I don't know how to delete it: 0000000000000070 <_parse_integer>: ... a0: 89 c2 mov edx,eax a2: 83 e8 30 sub eax,0x30 a5: 83 f8 09 cmp eax,0x9 a8: 76 11 jbe bb <_parse_integer+0x4b> aa: 83 ca 20 or edx,0x20 ad: 0f be c2 ===> movsx eax,dl <=== useless b0: 8d 50 9f lea edx,[rax-0x61] b3: 83 fa 05 cmp edx,0x5 Patch also helps on embedded archs which generally only like "int". On arm "and 0xff" is generated which is waste because all values used in comparisons are positive. Link: http://lkml.kernel.org/r/20170514194720.GB32563@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/kstrtox.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 512750ef8b06290a55d749239f956f9c21d7daca Author: Alexey Dobriyan Date: Mon Jul 10 15:51:38 2017 -0700 lib/kstrtox.c: delete end-of-string test Standard "while (*s)" test is unnecessary because NUL won't pass valid-digit test anyway. Save one branch per parsed character. Link: http://lkml.kernel.org/r/20170514193756.GA32563@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/kstrtox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c6deb01525ac11cc03c44fe31e3f45ce2cadaf9 Author: Matthew Wilcox Date: Mon Jul 10 15:51:35 2017 -0700 bitmap: use memcmp optimisation in more situations Commit 7dd968163f7c ("bitmap: bitmap_equal memcmp optimization") was rather more restrictive than necessary; we can use memcmp() to implement bitmap_equal() as long as the number of bits can be proved to be a multiple of 8. And architectures other than s390 may be able to make good use of this optimisation. [arnd@arndb.de: fix build: add a memcmp() declaration] Link: http://lkml.kernel.org/r/20170630153908.3439707-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20170628153221.11322-5-willy@infradead.org Signed-off-by: Matthew Wilcox Signed-off-by: Arnd Bergmann Acked-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/boot/compressed/decompress.c | 1 + include/linux/bitmap.h | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) commit 2a98dc028f911a7c59c87d11d4eed6626be1605b Author: Matthew Wilcox Date: Mon Jul 10 15:51:32 2017 -0700 include/linux/bitmap.h: turn bitmap_set and bitmap_clear into memset when possible Several callers have constant 'start' and an 'nbits' that is a multiple of 8, so we can turn them into calls to memset. We don't need the entirety of 'start' and 'nbits' to be constant, we just need to know whether they're divisible by 8. Link: http://lkml.kernel.org/r/20170628153221.11322-4-willy@infradead.org Signed-off-by: Matthew Wilcox Acked-by: Rasmus Villemoes Cc: Martin Schwidefsky Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bitmap.h | 6 ++++++ 1 file changed, 6 insertions(+) commit e5af323c9badd5dc09af7ccf9d45616ebffc623c Author: Matthew Wilcox Date: Mon Jul 10 15:51:29 2017 -0700 bitmap: optimise bitmap_set and bitmap_clear of a single bit We have eight users calling bitmap_clear for a single bit and seventeen calling bitmap_set for a single bit. Rather than fix all of them to call __clear_bit or __set_bit, turn bitmap_clear and bitmap_set into inline functions and make this special case efficient. Link: http://lkml.kernel.org/r/20170628153221.11322-3-willy@infradead.org Signed-off-by: Matthew Wilcox Acked-by: Rasmus Villemoes Cc: Martin Schwidefsky Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bitmap.h | 23 ++++++++++++++++++++--- lib/bitmap.c | 8 ++++---- lib/test_bitmap.c | 3 --- 3 files changed, 24 insertions(+), 10 deletions(-) commit 3cc78125a081bb79eb38f3e9a585e5a81bb81cb1 Author: Matthew Wilcox Date: Mon Jul 10 15:51:26 2017 -0700 lib/test_bitmap.c: add optimisation tests Patch series "Bitmap optimisations", v2. These three bitmap patches use more efficient specialisations when the compiler can figure out that it's safe to do so. Thanks to Rasmus's eagle eyes, a nasty bug in v1 was avoided, and I've added a test case which would have caught it. This patch (of 4): This version of the test is actually a no-op; the next patch will enable it. Link: http://lkml.kernel.org/r/20170628153221.11322-2-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: Rasmus Villemoes Cc: Martin Schwidefsky Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_bitmap.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit b689d4a72fae7a8c4f4d097ef2f6e56643933bfd Author: Luis R. Rodriguez Date: Mon Jul 10 15:51:23 2017 -0700 MAINTAINERS: give proc sysctl some maintainer love We poke at proc sysctl enough that really we should declare it maintained. We'll just be Cc'd and sending updates / ACK'ing changes through akpm's tree. Link: http://lkml.kernel.org/r/20170524231305.8649-1-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Acked-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 63b23e2cbc8e80de3e40184ecb2c3bfb705776fa Author: Masahiro Yamada Date: Mon Jul 10 15:51:20 2017 -0700 kernel/kallsyms.c: replace all_var with IS_ENABLED(CONFIG_KALLSYMS_ALL) 'all_var' looks like a variable, but is actually a macro. Use IS_ENABLED(CONFIG_KALLSYMS_ALL) for clarification. Link: http://lkml.kernel.org/r/1497577591-3434-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kallsyms.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit b7b2562f7252878e18de60c24f320052076f9de8 Author: Rasmus Villemoes Date: Mon Jul 10 15:51:17 2017 -0700 kernel/groups.c: use sort library function setgroups is not exactly a hot path, so we might as well use the library function instead of open-coding the sorting. Saves ~150 bytes. Link: http://lkml.kernel.org/r/1497301378-22739-1-git-send-email-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Cc: Matthew Wilcox Cc: Michal Hocko Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/groups.c | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) commit 9dcdcea11491f6eee65bd1b352293ca01e4b7997 Author: Arvind Yadav Date: Mon Jul 10 15:51:14 2017 -0700 kernel/ksysfs.c: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 1120 544 16 1680 690 kernel/ksysfs.o File size After adding 'const': text data bss dec hex filename 1160 480 16 1656 678 kernel/ksysfs.o Link: http://lkml.kernel.org/r/aa224b3cc923fdbb3edd0c41b2c639c85408c9e8.1498737347.git.arvind.yadav.cs@gmail.com Signed-off-by: Arvind Yadav Acked-by: Kees Cook Cc: Russell King Cc: Dave Young Cc: Hari Bathini Cc: Petr Tesarik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/ksysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 287f3ca563d8ba0ede4ac0cec84218a1ea5e848f Author: Bart Van Assche Date: Mon Jul 10 15:51:10 2017 -0700 ARM: fix rd_size declaration The global variable 'rd_size' is declared as 'int' in source file arch/arm/kernel/atags_parse.c and as 'unsigned long' in drivers/block/brd.c. Fix this inconsistency. Additionally, remove the declarations of rd_image_start, rd_prompt and rd_doload from parse_tag_ramdisk() since these duplicate existing declarations in . Link: http://lkml.kernel.org/r/20170627065024.12347-1-bart.vanassche@wdc.com Signed-off-by: Bart Van Assche Acked-by: Russell King Cc: Jens Axboe Cc: Jan Kara Cc: Jason Yan Cc: Zhaohongjiang Cc: Miao Xie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/kernel/atags_parse.c | 3 +-- drivers/block/brd.c | 1 + include/linux/initrd.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) commit bc6245e5efd70c41eaf9334b1b5e646745cb0fb3 Author: Ian Abbott Date: Mon Jul 10 15:51:07 2017 -0700 bug: split BUILD_BUG stuff out into Including pulls in a lot of bloat from and that is not needed to call the BUILD_BUG() family of macros. Split them out into their own header, . Also correct some checkpatch.pl errors for the BUILD_BUG_ON_ZERO() and BUILD_BUG_ON_NULL() macros by adding parentheses around the bitfield widths that begin with a minus sign. Link: http://lkml.kernel.org/r/20170525120316.24473-6-abbotti@mev.co.uk Signed-off-by: Ian Abbott Acked-by: Michal Nazarewicz Acked-by: Kees Cook Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Jakub Kicinski Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bug.h | 74 +---------------------------------------- include/linux/build_bug.h | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 73 deletions(-) commit 47e81e59d98b90727a02ceb486407eeed5eb8727 Author: Ian Abbott Date: Mon Jul 10 15:51:04 2017 -0700 linux/bug.h: correct "space required before that '-'" Correct these checkpatch.pl errors: |ERROR: space required before that '-' (ctx:OxO) |#37: FILE: include/linux/bug.h:37: |+#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) |ERROR: space required before that '-' (ctx:OxO) |#38: FILE: include/linux/bug.h:38: |+#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) I decided to wrap the bitfield expressions that begin with minus signs in parentheses rather than insert spaces before the minus signs. Link: http://lkml.kernel.org/r/20170525120316.24473-5-abbotti@mev.co.uk Signed-off-by: Ian Abbott Acked-by: Michal Nazarewicz Cc: Kees Cook Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Jakub Kicinski Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8cdd7cca9287abf4c849c01e2a4e8207ad3e3a82 Author: Ian Abbott Date: Mon Jul 10 15:51:01 2017 -0700 linux/bug.h: correct "(foo*)" should be "(foo *)" Correct this checkpatch.pl error: |ERROR: "(foo*)" should be "(foo *)" |#19: FILE: include/linux/bug.h:19: |+#define BUILD_BUG_ON_NULL(e) ((void*)0) Link: http://lkml.kernel.org/r/20170525120316.24473-4-abbotti@mev.co.uk Signed-off-by: Ian Abbott Acked-by: Michal Nazarewicz Cc: Kees Cook Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Jakub Kicinski Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9d5a48499391fe5b0615610858665ba8149e255 Author: Ian Abbott Date: Mon Jul 10 15:50:58 2017 -0700 linux/bug.h: correct formatting of block comment Correct these checkpatch.pl warnings: |WARNING: Block comments use * on subsequent lines |#34: FILE: include/linux/bug.h:34: |+/* Force a compilation error if condition is true, but also produce a |+ result (of value 0 and type size_t), so the expression can be used |WARNING: Block comments use a trailing */ on a separate line |#36: FILE: include/linux/bug.h:36: |+ aren't permitted). */ Link: http://lkml.kernel.org/r/20170525120316.24473-3-abbotti@mev.co.uk Signed-off-by: Ian Abbott Acked-by: Michal Nazarewicz Cc: Kees Cook Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Jakub Kicinski Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bug.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 0b396923ee9bdcb4a208df2148712b79b6dee73e Author: Ian Abbott Date: Mon Jul 10 15:50:55 2017 -0700 asm-generic/bug.h: declare struct pt_regs; before function prototype This series of patches splits BUILD_BUG related macros out of "include/linux/bug.h" into new file "include/linux/build_bug.h" (patch 5), and changes the pointer type checking in the `container_of()` macro to deal with pointers of array type better (patch 6). Patches 1 to 4 are prerequisites. Patches 2, 3, 4, and 5 have been inserted since the previous version of this patch series. Patch 6 here corresponds to v3 and v4's patch 2. Patch 1 was a prerequisite in v3 of this series to avoid a lot of warnings when was included by . That is no longer relevant for v5 of the series, but I left it in because it was acked by a Arnd Bergmann and Michal Nazarewicz. Patches 2, 3, and 4 are some checkpatch clean-ups on "include/linux/bug.h" before splitting out the BUILD_BUG stuff in patch 5. Patch 5 splits the BUILD_BUG related macros out of "include/linux/bug.h" into new file "include/linux/build_bug.h" because including in "include/linux/kernel.h" would result in build failures due to circular dependencies. Patch 6 changes the pointer type checking by `container_of()` to avoid some incompatible pointer warnings when the dereferenced pointer has array type. 1) asm-generic/bug.h: declare struct pt_regs; before function prototype 2) linux/bug.h: correct formatting of block comment 3) linux/bug.h: correct "(foo*)" should be "(foo *)" 4) linux/bug.h: correct "space required before that '-'" 5) bug: split BUILD_BUG stuff out into 6) kernel.h: handle pointers to arrays better in container_of() This patch (of 6): The declaration of `__warn()` has `struct pt_regs *regs` as one of its parameters. This can result in compiler warnings if `struct regs` is not already declared. Add an empty declaration of `struct pt_regs` to avoid the warnings. Link: http://lkml.kernel.org/r/20170525120316.24473-2-abbotti@mev.co.uk Signed-off-by: Ian Abbott Acked-by: Arnd Bergmann Acked-by: Michal Nazarewicz Cc: Arnd Bergmann Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/bug.h | 1 + 1 file changed, 1 insertion(+) commit cde1b69389772ca8855fabdfe5d9ae9ba1d7d33a Author: Heiner Kallweit Date: Mon Jul 10 15:50:52 2017 -0700 fs/proc/generic.c: switch to ida_simple_get/remove The code can be much simplified by switching to ida_simple_get/remove. Link: http://lkml.kernel.org/r/8d1cc9f7-5115-c9dc-028e-c0770b6bfe1f@gmail.com Signed-off-by: Heiner Kallweit Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/generic.c | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) commit b6d0f14abb7c1d9d522c064633c820aaeb9bbfbf Author: Will Deacon Date: Mon Jul 10 15:50:49 2017 -0700 frv: cmpxchg: implement cmpxchg64() FRV supports 64-bit cmpxchg, which is provided by the arch code as __cmpxchg_64 and subsequently used to implement atomic64_cmpxchg. This patch hooks up the generic cmpxchg64 API using the same function, which also provides default definitions of the relaxed, acquire and release variants. This fixes the build when COMPILE_TEST=y and IOMMU_IO_PGTABLE_LPAE=y. Link: http://lkml.kernel.org/r/1499084670-6996-1-git-send-email-will.deacon@arm.com Signed-off-by: Will Deacon Reported-by: kbuild test robot Cc: Joerg Roedel Cc: Robin Murphy Cc: Peter Zijlstra Cc: Ingo Molnar Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/include/asm/cmpxchg.h | 1 + 1 file changed, 1 insertion(+) commit 31b7fb448c2bda757f3386c3eb50c2718bf6d776 Author: Tobias Klauser Date: Mon Jul 10 15:50:46 2017 -0700 frv: use generic fb.h The arch uses a verbatim copy of the asm-generic version and does not add any own implementations to the header, so use asm-generic/fb.h instead of duplicating code. Link: http://lkml.kernel.org/r/20170517083307.1697-1-tklauser@distanz.ch Signed-off-by: Tobias Klauser Reviewed-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/include/asm/Kbuild | 1 + arch/frv/include/asm/fb.h | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) commit a371e2fa3ab993c915eaa713333d8981823dffe8 Author: Tobias Klauser Date: Mon Jul 10 15:50:43 2017 -0700 frv: remove wrapper header for asm/device.h frv's asm/device.h is merely including asm-generic/device.h. Thus, the arch specific header can be omitted and the generic header can be used directly. Link: http://lkml.kernel.org/r/20170517124915.26904-1-tklauser@distanz.ch Signed-off-by: Tobias Klauser Reviewed-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/include/asm/Kbuild | 1 + arch/frv/include/asm/device.h | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) commit 822d5ec25884b4e4436c819d03035fc0dd689309 Author: Colin Ian King Date: Mon Jul 10 15:50:40 2017 -0700 kasan: make get_wild_bug_type() static The helper function get_wild_bug_type() does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'get_wild_bug_type' was not declared. Should it be static?" Link: http://lkml.kernel.org/r/20170622090049.10658-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5bd62cd44119a11a30976f6a97f4aab2c35a097 Author: Joonsoo Kim Date: Mon Jul 10 15:50:37 2017 -0700 mm/kasan/kasan.c: rename XXX_is_zero to XXX_is_nonzero They return positive value, that is, true, if non-zero value is found. Rename them to reduce confusion. Link: http://lkml.kernel.org/r/20170516012350.GA16015@js1304-desktop Signed-off-by: Joonsoo Kim Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fa69b5989bb0031efa96f2f4ff49caf6532a0970 Author: Andrey Ryabinin Date: Mon Jul 10 15:50:34 2017 -0700 mm/kasan: add support for memory hotplug KASAN doesn't happen work with memory hotplug because hotplugged memory doesn't have any shadow memory. So any access to hotplugged memory would cause a crash on shadow check. Use memory hotplug notifier to allocate and map shadow memory when the hotplugged memory is going online and free shadow after the memory offlined. Link: http://lkml.kernel.org/r/20170601162338.23540-4-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Cc: "H. Peter Anvin" Cc: Alexander Potapenko Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Ingo Molnar Cc: Mark Rutland Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig | 1 - mm/kasan/kasan.c | 40 +++++++++++++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 6 deletions(-) commit 3f9ec80f7b22ec46272a32408c5cd91ae2f8c4c0 Author: Andrey Ryabinin Date: Mon Jul 10 15:50:31 2017 -0700 arm64/kasan: don't allocate extra shadow memory We used to read several bytes of the shadow memory in advance. Therefore additional shadow memory mapped to prevent crash if speculative load would happen near the end of the mapped shadow memory. Now we don't have such speculative loads, so we no longer need to map additional shadow memory. Link: http://lkml.kernel.org/r/20170601162338.23540-3-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Acked-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: "H. Peter Anvin" Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/mm/kasan_init.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 4d461333f144456b80d9eabd7cee7ac02fa5d0ee Author: Andrey Ryabinin Date: Mon Jul 10 15:50:27 2017 -0700 x86/kasan: don't allocate extra shadow memory We used to read several bytes of the shadow memory in advance. Therefore additional shadow memory mapped to prevent crash if speculative load would happen near the end of the mapped shadow memory. Now we don't have such speculative loads, so we no longer need to map additional shadow memory. Link: http://lkml.kernel.org/r/20170601162338.23540-2-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Cc: Mark Rutland Cc: "H. Peter Anvin" Cc: Alexander Potapenko Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/kasan_init_64.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit c634d807d98e3e7def43e72d28528c84c612ab98 Author: Andrey Ryabinin Date: Mon Jul 10 15:50:24 2017 -0700 mm/kasan: get rid of speculative shadow checks For some unaligned memory accesses we have to check additional byte of the shadow memory. Currently we load that byte speculatively to have only single load + branch on the optimistic fast path. However, this approach has some downsides: - It's unaligned access, so this prevents porting KASAN on architectures which doesn't support unaligned accesses. - We have to map additional shadow page to prevent crash if speculative load happens near the end of the mapped memory. This would significantly complicate upcoming memory hotplug support. I wasn't able to notice any performance degradation with this patch. So these speculative loads is just a pain with no gain, let's remove them. Link: http://lkml.kernel.org/r/20170601162338.23540-1-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Acked-by: Dmitry Vyukov Cc: Alexander Potapenko Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.c | 98 +++++++++----------------------------------------------- 1 file changed, 16 insertions(+), 82 deletions(-) commit 458f7920f9b1e6c313944d498c440f8599b8a136 Author: Joonsoo Kim Date: Mon Jul 10 15:50:21 2017 -0700 mm/kasan/kasan_init.c: use kasan_zero_pud for p4d table There is missing optimization in zero_p4d_populate() that can save some memory when mapping zero shadow. Implement it like as others. Link: http://lkml.kernel.org/r/1494829255-23946-1-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Acked-by: Andrey Ryabinin Cc: "Kirill A . Shutemov" Cc: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan_init.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit cf8e0fedf0784ef4bc1889380b09eda295e3d109 Author: Jerome Marchand Date: Mon Jul 10 15:50:18 2017 -0700 mm/zsmalloc: simplify zs_max_alloc_size handling Commit 40f9fb8cffc6 ("mm/zsmalloc: support allocating obj with size of ZS_MAX_ALLOC_SIZE") fixes a size calculation error that prevented zsmalloc to allocate an object of the maximal size (ZS_MAX_ALLOC_SIZE). I think however the fix is unneededly complicated. This patch replaces the dynamic calculation of zs_size_classes at init time by a compile time calculation that uses the DIV_ROUND_UP() macro already used in get_size_class_index(). [akpm@linux-foundation.org: use min_t] Link: http://lkml.kernel.org/r/20170630114859.1979-1-jmarchan@redhat.com Signed-off-by: Jerome Marchand Acked-by: Minchan Kim Cc: Sergey Senozhatsky Cc: Mahendran Ganesh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 52 +++++++++++++++------------------------------------- 1 file changed, 15 insertions(+), 37 deletions(-) commit bc1bb362334ebc4c65dd4301f10fb70902b3db7d Author: Arvind Yadav Date: Mon Jul 10 15:50:15 2017 -0700 zram: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 8293 841 4 9138 23b2 drivers/block/zram/zram_drv.o File size After adding 'const': text data bss dec hex filename 8357 777 4 9138 23b2 drivers/block/zram/zram_drv.o Link: http://lkml.kernel.org/r/65680c1c4d85818f7094cbfa31c91bf28185ba1b.1499061182.git.arvind.yadav.cs@gmail.com Signed-off-by: Arvind Yadav Acked-by: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d1f4b3f5b29bea431525e528a3ff2dc806ad904 Author: Michal Hocko Date: Mon Jul 10 15:50:12 2017 -0700 mm: disallow early_pfn_to_nid on configurations which do not implement it early_pfn_to_nid will return node 0 if both HAVE_ARCH_EARLY_PFN_TO_NID and HAVE_MEMBLOCK_NODE_MAP are disabled. It seems we are safe now because all architectures which support NUMA define one of them (with an exception of alpha which however has CONFIG_NUMA marked as broken) so this works as expected. It can get silently and subtly broken too easily, though. Make sure we fail the compilation if NUMA is enabled and there is no proper implementation for this function. If that ever happens we know that either the specific configuration is invalid and the fix should either disable NUMA or enable one of the above configs. Link: http://lkml.kernel.org/r/20170704075803.15979-1-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Joonsoo Kim Cc: Yang Shi Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 1 + 1 file changed, 1 insertion(+) commit 3f906ba23689a3f824424c50f3ae937c2c70f676 Author: Thomas Gleixner Date: Mon Jul 10 15:50:09 2017 -0700 mm/memory-hotplug: switch locking to a percpu rwsem Andrey reported a potential deadlock with the memory hotplug lock and the cpu hotplug lock. The reason is that memory hotplug takes the memory hotplug lock and then calls stop_machine() which calls get_online_cpus(). That's the reverse lock order to get_online_cpus(); get_online_mems(); in mm/slub_common.c The problem has been there forever. The reason why this was never reported is that the cpu hotplug locking had this homebrewn recursive reader writer semaphore construct which due to the recursion evaded the full lock dep coverage. The memory hotplug code copied that construct verbatim and therefor has similar issues. Three steps to fix this: 1) Convert the memory hotplug locking to a per cpu rwsem so the potential issues get reported proper by lockdep. 2) Lock the online cpus in mem_hotplug_begin() before taking the memory hotplug rwsem and use stop_machine_cpuslocked() in the page_alloc code to avoid recursive locking. 3) The cpu hotpluck locking in #2 causes a recursive locking of the cpu hotplug lock via __offline_pages() -> lru_add_drain_all(). Solve this by invoking lru_add_drain_all_cpuslocked() instead. Link: http://lkml.kernel.org/r/20170704093421.506836322@linutronix.de Reported-by: Andrey Ryabinin Signed-off-by: Thomas Gleixner Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Vladimir Davydov Cc: Peter Zijlstra Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 89 +++++++++-------------------------------------------- mm/page_alloc.c | 2 +- 2 files changed, 16 insertions(+), 75 deletions(-) commit a47fed5b5b014f5a13878b90ef2c3a7dc294189f Author: Thomas Gleixner Date: Mon Jul 10 15:50:06 2017 -0700 mm: swap: provide lru_add_drain_all_cpuslocked() The rework of the cpu hotplug locking unearthed potential deadlocks with the memory hotplug locking code. The solution for these is to rework the memory hotplug locking code as well and take the cpu hotplug lock before the memory hotplug lock in mem_hotplug_begin(), but this will cause a recursive locking of the cpu hotplug lock when the memory hotplug code calls lru_add_drain_all(). Split out the inner workings of lru_add_drain_all() into lru_add_drain_all_cpuslocked() so this function can be invoked from the memory hotplug code with the cpu hotplug lock held. Link: http://lkml.kernel.org/r/20170704093421.419329357@linutronix.de Signed-off-by: Thomas Gleixner Reported-by: Andrey Ryabinin Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Vladimir Davydov Cc: Peter Zijlstra Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 1 + mm/swap.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 24c79d8e0a46bbd010ca9e0dc988a23981bcd423 Author: Krzysztof Opasiak Date: Mon Jul 10 15:50:03 2017 -0700 mm: use dedicated helper to access rlimit value Use rlimit() helper instead of manually writing whole chain from current task to rlim_cur. Link: http://lkml.kernel.org/r/20170705172811.8027-1-k.opasiak@samsung.com Signed-off-by: Krzysztof Opasiak Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b17c070fb624cf10162cf92ea5e1ec25cd8ac176 Author: Sahitya Tummala Date: Mon Jul 10 15:50:00 2017 -0700 fs/dcache.c: fix spin lockup issue on nlru->lock __list_lru_walk_one() acquires nlru spin lock (nlru->lock) for longer duration if there are more number of items in the lru list. As per the current code, it can hold the spin lock for upto maximum UINT_MAX entries at a time. So if there are more number of items in the lru list, then "BUG: spinlock lockup suspected" is observed in the below path: spin_bug+0x90 do_raw_spin_lock+0xfc _raw_spin_lock+0x28 list_lru_add+0x28 dput+0x1c8 path_put+0x20 terminate_walk+0x3c path_lookupat+0x100 filename_lookup+0x6c user_path_at_empty+0x54 SyS_faccessat+0xd0 el0_svc_naked+0x24 This nlru->lock is acquired by another CPU in this path - d_lru_shrink_move+0x34 dentry_lru_isolate_shrink+0x48 __list_lru_walk_one.isra.10+0x94 list_lru_walk_node+0x40 shrink_dcache_sb+0x60 do_remount_sb+0xbc do_emergency_remount+0xb0 process_one_work+0x228 worker_thread+0x2e0 kthread+0xf4 ret_from_fork+0x10 Fix this lockup by reducing the number of entries to be shrinked from the lru list to 1024 at once. Also, add cond_resched() before processing the lru list again. Link: http://marc.info/?t=149722864900001&r=1&w=2 Link: http://lkml.kernel.org/r/1498707575-2472-1-git-send-email-stummala@codeaurora.org Signed-off-by: Sahitya Tummala Suggested-by: Jan Kara Suggested-by: Vladimir Davydov Acked-by: Vladimir Davydov Cc: Alexander Polakov Cc: Al Viro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dcache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2c80cd57c74339889a8752b20862a16c28929c3a Author: Sahitya Tummala Date: Mon Jul 10 15:49:57 2017 -0700 mm/list_lru.c: fix list_lru_count_node() to be race free list_lru_count_node() iterates over all memcgs to get the total number of entries on the node but it can race with memcg_drain_all_list_lrus(), which migrates the entries from a dead cgroup to another. This can return incorrect number of entries from list_lru_count_node(). Fix this by keeping track of entries per node and simply return it in list_lru_count_node(). Link: http://lkml.kernel.org/r/1498707555-30525-1-git-send-email-stummala@codeaurora.org Signed-off-by: Sahitya Tummala Acked-by: Vladimir Davydov Cc: Jan Kara Cc: Alexander Polakov Cc: Al Viro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/list_lru.h | 1 + mm/list_lru.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) commit 32e4e6d5cbb0c0e427391635991fe65e17797af8 Author: Oleg Nesterov Date: Mon Jul 10 15:49:54 2017 -0700 mm/mmap.c: expand_downwards: don't require the gap if !vm_prev expand_stack(vma) fails if address < stack_guard_gap even if there is no vma->vm_prev. I don't think this makes sense, and we didn't do this before the recent commit 1be7107fbe18 ("mm: larger stack guard gap, between vmas"). We do not need a gap in this case, any address is fine as long as security_mmap_addr() doesn't object. This also simplifies the code, we know that address >= prev->vm_end and thus underflow is not possible. Link: http://lkml.kernel.org/r/20170628175258.GA24881@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Michal Hocko Cc: Hugh Dickins Cc: Larry Woodman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 561b5e0709e4a248c67d024d4d94b6e31e3edf2f Author: Michal Hocko Date: Mon Jul 10 15:49:51 2017 -0700 mm/mmap.c: do not blow on PROT_NONE MAP_FIXED holes in the stack Commit 1be7107fbe18 ("mm: larger stack guard gap, between vmas") has introduced a regression in some rust and Java environments which are trying to implement their own stack guard page. They are punching a new MAP_FIXED mapping inside the existing stack Vma. This will confuse expand_{downwards,upwards} into thinking that the stack expansion would in fact get us too close to an existing non-stack vma which is a correct behavior wrt safety. It is a real regression on the other hand. Let's work around the problem by considering PROT_NONE mapping as a part of the stack. This is a gros hack but overflowing to such a mapping would trap anyway an we only can hope that usespace knows what it is doing and handle it propely. Fixes: 1be7107fbe18 ("mm: larger stack guard gap, between vmas") Link: http://lkml.kernel.org/r/20170705182849.GA18027@dhcp22.suse.cz Signed-off-by: Michal Hocko Debugged-by: Vlastimil Babka Cc: Ben Hutchings Cc: Willy Tarreau Cc: Oleg Nesterov Cc: Rik van Riel Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bb01b64cfab7c22f3848cb73dc0c2b46b8d38499 Author: zhenwei.pi Date: Mon Jul 10 15:49:47 2017 -0700 mm/balloon_compaction.c: enqueue zero page to balloon device presently pages in the balloon device have random value, and these pages will be scanned by ksmd on the host. They usually cannot be merged. Enqueue zero pages will resolve this problem. Link: http://lkml.kernel.org/r/1498698637-26389-1-git-send-email-zhenwei.pi@youruncloud.com Signed-off-by: zhenwei.pi Cc: Gioh Kim Cc: Vlastimil Babka Cc: Minchan Kim Cc: Konstantin Khlebnikov Cc: Rafael Aquini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/balloon_compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e048cb32f69038aa1c8f11e5c1b331be4181659d Author: Doug Berger Date: Mon Jul 10 15:49:44 2017 -0700 cma: fix calculation of aligned offset The align_offset parameter is used by bitmap_find_next_zero_area_off() to represent the offset of map's base from the previous alignment boundary; the function ensures that the returned index, plus the align_offset, honors the specified align_mask. The logic introduced by commit b5be83e308f7 ("mm: cma: align to physical address, not CMA region position") has the cma driver calculate the offset to the *next* alignment boundary. In most cases, the base alignment is greater than that specified when making allocations, resulting in a zero offset whether we align up or down. In the example given with the commit, the base alignment (8MB) was half the requested alignment (16MB) so the math also happened to work since the offset is 8MB in both directions. However, when requesting allocations with an alignment greater than twice that of the base, the returned index would not be correctly aligned. Also, the align_order arguments of cma_bitmap_aligned_mask() and cma_bitmap_aligned_offset() should not be negative so the argument type was made unsigned. Fixes: b5be83e308f7 ("mm: cma: align to physical address, not CMA region position") Link: http://lkml.kernel.org/r/20170628170742.2895-1-opendmb@gmail.com Signed-off-by: Angus Clark Signed-off-by: Doug Berger Acked-by: Gregory Fong Cc: Doug Berger Cc: Angus Clark Cc: Laura Abbott Cc: Vlastimil Babka Cc: Greg Kroah-Hartman Cc: Lucas Stach Cc: Catalin Marinas Cc: Shiraz Hashim Cc: Jaewon Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/cma.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit a52149f129bd161818fd7a0b6450aaa30a2cbd77 Author: John Hubbard Date: Mon Jul 10 15:49:41 2017 -0700 mm/memory_hotplug.c: remove unused local zone_type from __remove_zone() __remove_zone() sets up up zone_type, but never uses it for anything. This does not cause a warning, due to the (necessary) use of -Wno-unused-but-set-variable. However, it's noise, so just delete it. Link: http://lkml.kernel.org/r/20170624043421.24465-2-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 3 --- 1 file changed, 3 deletions(-) commit d09b6468824d9e41dc30708475f954e455cf7146 Author: Michal Hocko Date: Mon Jul 10 15:49:38 2017 -0700 mm: document highmem_is_dirtyable sysctl It seems that there are still people using 32b kernels which a lot of memory and the IO tend to suck a lot for them by default. Mostly because writers are throttled too when the lowmem is used. We have highmem_is_dirtyable to work around that issue but it seems we never bothered to document it. Let's do it now, finally. Link: http://lkml.kernel.org/r/20170626093200.18958-1-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Johannes Weiner Cc: Alkis Georgopoulos Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit e3d3910a57ab9c70cddb2522ae711ff9bff89e7c Author: Nikolay Borisov Date: Mon Jul 10 15:49:35 2017 -0700 include/linux/backing-dev.h: simplify wb_stat_sum wb_stat_sum() disables interrupts and calls __wb_stat_sum() which eventually calls __percpu_counter_sum(). However, the percpu routine is already irq-safe. Simplify the code a bit by making wb_stat_sum() directly call percpu_counter_sum_positive() and not disable interrupts. Also remove the now-uneeded __wb_stat_sum() which was just a wrapper over percpu_counter_sum_positive(). Link: http://lkml.kernel.org/r/1498230681-29103-1-git-send-email-nborisov@suse.com Signed-off-by: Nikolay Borisov Acked-by: Peter Zijlstra Cc: Tejun Heo Cc: Jan Kara Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/backing-dev.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 618b8c20d03c9ea06711bd36d906322ba35c0add Author: Nikolay Borisov Date: Mon Jul 10 15:49:32 2017 -0700 include/linux/mmzone.h: remove ancient/ambiguous comment Currently pg_data_t is just a struct which describes a NUMA node memory layout. Let's keep the comment simple and remove ambiguity. Link: http://lkml.kernel.org/r/1498220534-22717-1-git-send-email-nborisov@suse.com Signed-off-by: Nikolay Borisov Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f07e0f849a921ec8c0b509c8b8030455a2b21f7f Author: Sebastian Andrzej Siewior Date: Mon Jul 10 15:49:29 2017 -0700 mm/swap_slots.c: don't disable preemption while taking the per-CPU cache get_cpu_var() disables preemption and returns the per-CPU version of the variable. Disabling preemption is useful to ensure atomic access to the variable within the critical section. In this case however, after the per-CPU version of the variable is obtained the ->free_lock is acquired. For that reason it seems the raw accessor could be used. It only seems that ->slots_ret should be retested (because with disabled preemption this variable can not be set to NULL otherwise). This popped up during PREEMPT-RT testing because it tries to take spinlocks in a preempt disabled section. In RT, spinlocks can sleep. Link: http://lkml.kernel.org/r/20170623114755.2ebxdysacvgxzott@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Acked-by: Michal Hocko Cc: Tim Chen Cc: Thomas Gleixner Cc: Ying Huang Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_slots.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b002529d256307602c669d1886c0b953b52b8700 Author: Rasmus Villemoes Date: Mon Jul 10 15:49:26 2017 -0700 mm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback Since current_order starts as MAX_ORDER-1 and is then only decremented, the second half of the loop condition seems superfluous. However, if order is 0, we may decrement current_order past 0, making it UINT_MAX. This is obviously too subtle ([1], [2]). Since we need to add some comment anyway, change the two variables to signed, making the counting-down for loop look more familiar, and apparently also making gcc generate slightly smaller code. [1] https://lkml.org/lkml/2016/6/20/493 [2] https://lkml.org/lkml/2017/6/19/345 [akpm@linux-foundation.org: fix up reject fixupping] Link: http://lkml.kernel.org/r/20170621185529.2265-1-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reported-by: Hao Lee Acked-by: Wei Yang Acked-by: Michal Hocko Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 8c03cc85a035ae7a208c28c4382ecfeb6adf79a6 Author: Vasily Averin Date: Mon Jul 10 15:49:23 2017 -0700 fs/proc/task_mmu.c: remove obsolete comment in show_map_vma() After commit 1be7107fbe18 ("mm: larger stack guard gap, between vmas") we do not hide stack guard page in /proc//maps Link: http://lkml.kernel.org/r/211f3c2a-f7ef-7c13-82bf-46fd426f6e1b@virtuozzo.com Signed-off-by: Vasily Averin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 1 - 1 file changed, 1 deletion(-) commit a7be6e5a7f8da433065b23f98ff68f445113080a Author: Dou Liyang Date: Mon Jul 10 15:49:20 2017 -0700 mm: drop useless local parameters of __register_one_node() __register_one_node() initializes local parameters "p_node" & "parent" for register_node(). But, register_node() does not use them. Remove the related code of "parent" node, cleanup __register_one_node() and register_node(). Link: http://lkml.kernel.org/r/1498013846-20149-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Acked-by: David Rientjes Acked-by: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 727c080f03e7e2e20e868efd461d4f1022b61d9b Author: Vinayak Menon Date: Mon Jul 10 15:49:17 2017 -0700 mm: avoid taking zone lock in pagetypeinfo_showmixed() pagetypeinfo_showmixedcount_print is found to take a lot of time to complete and it does this holding the zone lock and disabling interrupts. In some cases it is found to take more than a second (On a 2.4GHz,8Gb RAM,arm64 cpu). Avoid taking the zone lock similar to what is done by read_page_owner, which means possibility of inaccurate results. Link: http://lkml.kernel.org/r/1498045643-12257-1-git-send-email-vinmenon@codeaurora.org Signed-off-by: Vinayak Menon Acked-by: Vlastimil Babka Cc: Joonsoo Kim Cc: zhongjiang Cc: Sergey Senozhatsky Cc: Sudip Mukherjee Cc: Johannes Weiner Cc: Mel Gorman Cc: Michal Hocko Cc: Sebastian Andrzej Siewior Cc: David Rientjes Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_owner.c | 6 +++++- mm/vmstat.c | 24 ++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) commit ef77ba5ce6b0e6b657036ee9fc455fc164b215f8 Author: Michal Hocko Date: Mon Jul 10 15:49:14 2017 -0700 mm, hugetlb, soft_offline: use new_page_nodemask for soft offline migration new_page is yet another duplication of the migration callback which has to handle hugetlb migration specially. We can safely use the generic new_page_nodemask for the same purpose. Please note that gigantic hugetlb pages do not need any special handling because alloc_huge_page_nodemask will make sure to check pages in all per node pools. The reason this was done previously was that alloc_huge_page_node treated NO_NUMA_NODE and a specific node differently and so alloc_huge_page_node(nid) would check on this specific node. Link: http://lkml.kernel.org/r/20170622193034.28972-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Reported-by: Vlastimil Babka Reviewed-by: Mike Kravetz Tested-by: Mike Kravetz Cc: Naoya Horiguchi Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 3e59fcb0e8c1c40aecb60fa4c2d1543d6a097184 Author: Michal Hocko Date: Mon Jul 10 15:49:11 2017 -0700 hugetlb: add support for preferred node to alloc_huge_page_nodemask alloc_huge_page_nodemask tries to allocate from any numa node in the allowed node mask starting from lower numa nodes. This might lead to filling up those low NUMA nodes while others are not used. We can reduce this risk by introducing a concept of the preferred node similar to what we have in the regular page allocator. We will start allocating from the preferred nid and then iterate over all allowed nodes in the zonelist order until we try them all. This is mimicing the page allocator logic except it operates on per-node mempools. dequeue_huge_page_vma already does this so distill the zonelist logic into a more generic dequeue_huge_page_nodemask and use it in alloc_huge_page_nodemask. This will allow us to use proper per numa distance fallback also for alloc_huge_page_node which can use alloc_huge_page_nodemask now and we can get rid of alloc_huge_page_node helper which doesn't have any user anymore. Link: http://lkml.kernel.org/r/20170622193034.28972-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Reviewed-by: Mike Kravetz Tested-by: Mike Kravetz Cc: Naoya Horiguchi Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 5 +-- include/linux/migrate.h | 2 +- mm/hugetlb.c | 88 ++++++++++++++++++++++++------------------------- 3 files changed, 48 insertions(+), 47 deletions(-) commit aaf14e40a33a2c9350471387031ca40c00f5a006 Author: Michal Hocko Date: Mon Jul 10 15:49:08 2017 -0700 mm, hugetlb: unclutter hugetlb allocation layers Patch series "mm, hugetlb: allow proper node fallback dequeue". While working on a hugetlb migration issue addressed in a separate patchset[1] I have noticed that the hugetlb allocations from the preallocated pool are quite subotimal. [1] //lkml.kernel.org/r/20170608074553.22152-1-mhocko@kernel.org There is no fallback mechanism implemented and no notion of preferred node. I have tried to work around it but Vlastimil was right to push back for a more robust solution. It seems that such a solution is to reuse zonelist approach we use for the page alloctor. This series has 3 patches. The first one tries to make hugetlb allocation layers more clear. The second one implements the zonelist hugetlb pool allocation and introduces a preferred node semantic which is used by the migration callbacks. The last patch is a clean up. This patch (of 3): Hugetlb allocation path for fresh huge pages is unnecessarily complex and it mixes different interfaces between layers. __alloc_buddy_huge_page is the central place to perform a new allocation. It checks for the hugetlb overcommit and then relies on __hugetlb_alloc_buddy_huge_page to invoke the page allocator. This is all good except that __alloc_buddy_huge_page pushes vma and address down the callchain and so __hugetlb_alloc_buddy_huge_page has to deal with two different allocation modes - one for memory policy and other node specific (or to make it more obscure node non-specific) requests. This just screams for a reorganization. This patch pulls out all the vma specific handling up to __alloc_buddy_huge_page_with_mpol where it belongs. __alloc_buddy_huge_page will get nodemask argument and __hugetlb_alloc_buddy_huge_page will become a trivial wrapper over the page allocator. In short: __alloc_buddy_huge_page_with_mpol - memory policy handling __alloc_buddy_huge_page - overcommit handling and accounting __hugetlb_alloc_buddy_huge_page - page allocator layer Also note that __hugetlb_alloc_buddy_huge_page and its cpuset retry loop is not really needed because the page allocator already handles the cpusets update. Finally __hugetlb_alloc_buddy_huge_page had a special case for node specific allocations (when no policy is applied and there is a node given). This has relied on __GFP_THISNODE to not fallback to a different node. alloc_huge_page_node is the only caller which relies on this behavior so move the __GFP_THISNODE there. Not only does this remove quite some code it also should make those layers easier to follow and clear wrt responsibilities. Link: http://lkml.kernel.org/r/20170622193034.28972-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Reviewed-by: Mike Kravetz Tested-by: Mike Kravetz Cc: Naoya Horiguchi Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 2 +- mm/hugetlb.c | 133 +++++++++++------------------------------------- 2 files changed, 30 insertions(+), 105 deletions(-) commit 422580c3cea7faaca67f6199375b79565d3d8ebd Author: Roman Gushchin Date: Mon Jul 10 15:49:05 2017 -0700 mm/oom_kill.c: add tracepoints for oom reaper-related events During the debugging of the problem described in https://lkml.org/lkml/2017/5/17/542 and fixed by Tetsuo Handa in https://lkml.org/lkml/2017/5/19/383 , I've found that the existing debug output is not really useful to understand issues related to the oom reaper. So, I assume, that adding some tracepoints might help with debugging of similar issues. Trace the following events: 1) a process is marked as an oom victim, 2) a process is added to the oom reaper list, 3) the oom reaper starts reaping process's mm, 4) the oom reaper finished reaping, 5) the oom reaper skips reaping. How it works in practice? Below is an example which show how the problem mentioned above can be found: one process is added twice to the oom_reaper list: $ cd /sys/kernel/debug/tracing $ echo "oom:mark_victim" > set_event $ echo "oom:wake_reaper" >> set_event $ echo "oom:skip_task_reaping" >> set_event $ echo "oom:start_task_reaping" >> set_event $ echo "oom:finish_task_reaping" >> set_event $ cat trace_pipe allocate-502 [001] .... 91.836405: mark_victim: pid=502 allocate-502 [001] .N.. 91.837356: wake_reaper: pid=502 allocate-502 [000] .N.. 91.871149: wake_reaper: pid=502 oom_reaper-23 [000] .... 91.871177: start_task_reaping: pid=502 oom_reaper-23 [000] .N.. 91.879511: finish_task_reaping: pid=502 oom_reaper-23 [000] .... 91.879580: skip_task_reaping: pid=502 Link: http://lkml.kernel.org/r/20170530185231.GA13412@castle Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Cc: Tetsuo Handa Cc: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/oom.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++ mm/oom_kill.c | 7 ++++ 2 files changed, 87 insertions(+) commit 230ca982ba69ae63294017a3800800ad79d5f003 Author: Mike Rapoport Date: Mon Jul 10 15:49:02 2017 -0700 userfaultfd: non-cooperative: add madvise() event for MADV_FREE request MADV_FREE is identical to MADV_DONTNEED from the point of view of uffd monitor. The monitor has to stop handling #PF events in the range being freed. We are reusing userfaultfd_remove callback along with the logic required to re-get and re-validate the VMA which may change or disappear because userfaultfd_remove releases mmap_sem. Link: http://lkml.kernel.org/r/1497876311-18615-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 76b6f9b7edccdfcc7ad1588f24ba01e19db725f3 Author: Jan Kara Date: Mon Jul 10 15:48:59 2017 -0700 mm/truncate.c: fix THP handling in invalidate_mapping_pages() The condition checking for THP straddling end of invalidated range is wrong - it checks 'index' against 'end' but 'index' has been already advanced to point to the end of THP and thus the condition can never be true. As a result THP straddling 'end' has been fully invalidated. Given the nature of invalidate_mapping_pages(), this could be only performance issue. In fact, we are lucky the condition is wrong because if it was ever true, we'd leave locked page behind. Fix the condition checking for THP straddling 'end' and also properly unlock the page. Also update the comment before the condition to explain why we decide not to invalidate the page as it was not clear to me and I had to ask Kirill. Link: http://lkml.kernel.org/r/20170619124723.21656-1-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/truncate.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit c6247f72d46457408d98969c4dfb78adc95053e4 Author: Matthew Wilcox Date: Mon Jul 10 15:48:56 2017 -0700 mm/hugetlb.c: replace memfmt with string_get_size The hugetlb code has its own function to report human-readable sizes. Convert it to use the shared string_get_size() function. This will lead to a minor difference in user visible output (MiB/GiB instead of MB/GB), but some would argue that's desirable anyway. Link: http://lkml.kernel.org/r/20170606190350.GA20010@bombadil.infradead.org Signed-off-by: Matthew Wilcox Cc: Liam R. Howlett Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Aneesh Kumar K.V Cc: Gerald Schaefer Cc: zhong jiang Cc: Andrea Arcangeli Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 6a1a8b80728c3ae327a82a6cd772e0d554eebf2e Author: Michal Hocko Date: Mon Jul 10 15:48:53 2017 -0700 mm, memcg: fix potential undefined behavior in mem_cgroup_event_ratelimit() Alice has reported the following UBSAN splat: UBSAN: Undefined behaviour in mm/memcontrol.c:661:17 signed integer overflow: -2147483644 - 2147483525 cannot be represented in type 'long int' CPU: 1 PID: 11758 Comm: mybibtex2filena Tainted: P O 4.9.25-gentoo #4 Hardware name: XXXXXX, BIOS YYYYYY Call Trace: dump_stack+0x59/0x87 ubsan_epilogue+0xe/0x40 handle_overflow+0xbb/0xf0 __ubsan_handle_sub_overflow+0x12/0x20 memcg_check_events.isra.36+0x223/0x360 mem_cgroup_commit_charge+0x55/0x140 wp_page_copy+0x34e/0xb80 do_wp_page+0x1e6/0x1300 handle_mm_fault+0x88b/0x1990 __do_page_fault+0x2de/0x8a0 do_page_fault+0x1a/0x20 error_code+0x67/0x6c The reason is that we subtract two signed types. Let's fix this by truly mimicing time_after and cast the result of the subtraction. Link: http://lkml.kernel.org/r/20170616150057.GQ30580@dhcp22.suse.cz Signed-off-by: Michal Hocko Reported-by: Alice Ferrazzi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69ed779a1454d9a57ba3738135eec9be550e0613 Author: David Rientjes Date: Mon Jul 10 15:48:50 2017 -0700 mm, hugetlb: schedule when potentially allocating many hugepages A few hugetlb allocators loop while calling the page allocator and can potentially prevent rescheduling if the page allocator slowpath is not utilized. Conditionally schedule when large numbers of hugepages can be allocated. Anshuman: "Fixes a task which was getting hung while writing like 10000 hugepages (16MB on POWER8) into /proc/sys/vm/nr_hugepages." Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1706091535300.66176@chino.kir.corp.google.com Signed-off-by: David Rientjes Reviewed-by: Mike Kravetz Tested-by: Anshuman Khandual Cc: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 2 ++ 1 file changed, 2 insertions(+) commit 8b9132388964df2cfe151a88fd1dd8219dabf23c Author: Michal Hocko Date: Mon Jul 10 15:48:47 2017 -0700 mm: unify new_node_page and alloc_migrate_target Commit 394e31d2ceb4 ("mem-hotplug: alloc new page from a nearest neighbor node when mem-offline") has duplicated a large part of alloc_migrate_target with some hotplug specific special casing. To be more precise it tried to enfore the allocation from a different node than the original page. As a result the two function diverged in their shared logic, e.g. the hugetlb allocation strategy. Let's unify the two and express different NUMA requirements by the given nodemask. new_node_page will simply exclude the node it doesn't care about and alloc_migrate_target will use all the available nodes. alloc_migrate_target will then learn to migrate hugetlb pages more sanely and use preallocated pool when possible. Please note that alloc_migrate_target used to call alloc_page resp. alloc_pages_current so the memory policy of the current context which is quite strange when we consider that it is used in the context of alloc_contig_range which just tries to migrate pages which stand in the way. Link: http://lkml.kernel.org/r/20170608074553.22152-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Naoya Horiguchi Cc: Xishi Qiu Cc: zhong jiang Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 16 ++++++++++++++++ mm/memory_hotplug.c | 11 +---------- mm/page_isolation.c | 18 ++---------------- 3 files changed, 19 insertions(+), 26 deletions(-) commit 4db9b2efe94967be34e3b136a93251a3c1736dd5 Author: Michal Hocko Date: Mon Jul 10 15:48:44 2017 -0700 hugetlb, memory_hotplug: prefer to use reserved pages for migration new_node_page will try to use the origin's next NUMA node as the migration destination for hugetlb pages. If such a node doesn't have any preallocated pool it falls back to __alloc_buddy_huge_page_no_mpol to allocate a surplus page instead. This is quite subotpimal for any configuration when hugetlb pages are no distributed to all NUMA nodes evenly. Say we have a hotplugable node 4 and spare hugetlb pages are node 0 /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages:10000 /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages:0 /sys/devices/system/node/node2/hugepages/hugepages-2048kB/nr_hugepages:0 /sys/devices/system/node/node3/hugepages/hugepages-2048kB/nr_hugepages:0 /sys/devices/system/node/node4/hugepages/hugepages-2048kB/nr_hugepages:10000 /sys/devices/system/node/node5/hugepages/hugepages-2048kB/nr_hugepages:0 /sys/devices/system/node/node6/hugepages/hugepages-2048kB/nr_hugepages:0 /sys/devices/system/node/node7/hugepages/hugepages-2048kB/nr_hugepages:0 Now we consume the whole pool on node 4 and try to offline this node. All the allocated pages should be moved to node0 which has enough preallocated pages to hold them. With the current implementation offlining very likely fails because hugetlb allocations during runtime are much less reliable. Fix this by reusing the nodemask which excludes migration source and try to find a first node which has a page in the preallocated pool first and fall back to __alloc_buddy_huge_page_no_mpol only when the whole pool is consumed. [akpm@linux-foundation.org: remove bogus arg from alloc_huge_page_nodemask() stub] Link: http://lkml.kernel.org/r/20170608074553.22152-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Naoya Horiguchi Cc: Xishi Qiu Cc: zhong jiang Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 2 ++ mm/hugetlb.c | 27 +++++++++++++++++++++++++++ mm/memory_hotplug.c | 9 ++------- 3 files changed, 31 insertions(+), 7 deletions(-) commit 7f252f277b66854c61d3abdd4c196d6dc64fa333 Author: Michal Hocko Date: Mon Jul 10 15:48:41 2017 -0700 mm, memory_hotplug: simplify empty node mask handling in new_node_page new_node_page tries to allocate the target page on a different NUMA node than the source page. This makes sense in most cases during the hotplug because we are likely to offline the whole numa node. But there are cases where there are no other nodes to fallback (e.g. when offlining parts of the only existing node) and we have to fallback to allocating from the source node. The current code does that but it can be simplified by checking the nmask and updating it before we even try to allocate rather than special casing it. This patch shouldn't introduce any functional change. Link: http://lkml.kernel.org/r/20170608074553.22152-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Naoya Horiguchi Cc: Xishi Qiu Cc: zhong jiang Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 9f123ab544df1c92acd6a029067e8bde44780740 Author: Michal Hocko Date: Mon Jul 10 15:48:37 2017 -0700 mm, memory_hotplug: support movable_node for hotpluggable nodes movable_node kernel parameter allows making hotpluggable NUMA nodes to put all the hotplugable memory into movable zone which allows more or less reliable memory hotremove. At least this is the case for the NUMA nodes present during the boot (see find_zone_movable_pfns_for_nodes). This is not the case for the memory hotplug, though. echo online > /sys/devices/system/memory/memoryXYZ/state will default to a kernel zone (usually ZONE_NORMAL) unless the particular memblock is already in the movable zone range which is not the case normally when onlining the memory from the udev rule context for a freshly hotadded NUMA node. The only option currently is to have a special udev rule to echo online_movable to all memblocks belonging to such a node which is rather clumsy. Not to mention this is inconsistent as well because what ended up in the movable zone during the boot will end up in a kernel zone after hotremove & hotadd without special care. It would be nice to reuse memblock_is_hotpluggable but the runtime hotplug doesn't have that information available because the boot and hotplug paths are not shared and it would be really non trivial to make them use the same code path because the runtime hotplug doesn't play with the memblock allocator at all. Teach move_pfn_range that MMOP_ONLINE_KEEP can use the movable zone if movable_node is enabled and the range doesn't overlap with the existing normal zone. This should provide a reasonable default onlining strategy. Strictly speaking the semantic is not identical with the boot time initialization because find_zone_movable_pfns_for_nodes covers only the hotplugable range as described by the BIOS/FW. From my experience this is usually a full node though (except for Node0 which is special and never goes away completely). If this turns out to be a problem in the real life we can tweak the code to store hotplug flag into memblocks but let's keep this simple now. Link: http://lkml.kernel.org/r/20170612111227.GI7476@dhcp22.suse.cz Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Acked-by: Reza Arbab Cc: Mel Gorman Cc: Andrea Arcangeli Cc: Yasuaki Ishimatsu Cc: Cc: Kani Toshimitsu Cc: Cc: Joonsoo Kim Cc: Andi Kleen Cc: David Rientjes Cc: Daniel Kiper Cc: Igor Mammedov Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/memory-hotplug.txt | 12 +++++++++--- mm/memory_hotplug.c | 19 ++++++++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) commit ed8a555323a6fddadfd9e259fc4e9c41c191ca6c Author: Andy Shevchenko Date: Mon Jul 10 15:48:34 2017 -0700 zram: use __sysfs_match_string() helper Use __sysfs_match_string() helper instead of open coded variant. Link: http://lkml.kernel.org/r/20170609120835.22156-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Nitin Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zcomp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f4e177d12686bf98b5a047b5187121a71ee0dd8c Author: Will Deacon Date: Mon Jul 10 15:48:31 2017 -0700 mm/migrate.c: stabilise page count when migrating transparent hugepages When migrating a transparent hugepage, migrate_misplaced_transhuge_page guards itself against a concurrent fastgup of the page by checking that the page count is equal to 2 before and after installing the new pmd. If the page count changes, then the pmd is reverted back to the original entry, however there is a small window where the new (possibly writable) pmd is installed and the underlying page could be written by userspace. Restoring the old pmd could therefore result in loss of data. This patch fixes the problem by freezing the page count whilst updating the page tables, which protects against a concurrent fastgup without the need to restore the old pmd in the failure case (since the page count can no longer change under our feet). Link: http://lkml.kernel.org/r/1497349722-6731-4-git-send-email-will.deacon@arm.com Signed-off-by: Will Deacon Acked-by: Kirill A. Shutemov Cc: Mel Gorman Cc: Mark Rutland Cc: Steve Capper Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 108a7ac448caff8e35e8c3f92f65faad893e5aca Author: Will Deacon Date: Mon Jul 10 15:48:28 2017 -0700 include/linux/page_ref.h: ensure page_ref_unfreeze is ordered against prior accesses page_ref_freeze and page_ref_unfreeze are designed to be used as a pair, wrapping a critical section where struct pages can be modified without having to worry about consistency for a concurrent fast-GUP. Whilst page_ref_freeze has full barrier semantics due to its use of atomic_cmpxchg, page_ref_unfreeze is implemented using atomic_set, which doesn't provide any barrier semantics and allows the operation to be reordered with respect to page modifications in the critical section. This patch ensures that page_ref_unfreeze is ordered after any critical section updates, by invoking smp_mb() prior to the atomic_set. Link: http://lkml.kernel.org/r/1497349722-6731-3-git-send-email-will.deacon@arm.com Signed-off-by: Will Deacon Acked-by: Steve Capper Acked-by: Kirill A. Shutemov Cc: Mark Rutland Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page_ref.h | 1 + 1 file changed, 1 insertion(+) commit baabda261424517110ea98c6651f632ebf2561e3 Author: Dan Williams Date: Mon Jul 10 15:48:25 2017 -0700 mm: always enable thp for dax mappings The madvise policy for transparent huge pages is meant to avoid unwanted allocations of transparent huge pages. It allows a policy of disabling the extra memory pressure and effort to arrange for a huge page when it is not needed. DAX by definition never incurs this overhead since it is statically allocated. The policy choice makes even less sense for device-dax which tries to guarantee a given tlb-fault size. Specifically, the following setting: echo never > /sys/kernel/mm/transparent_hugepage/enabled ...violates that guarantee and silently disables all device-dax instances with a 2M or 1G alignment. So, let's avoid that non-obvious side effect by force enabling thp for dax mappings in all cases. It is worth noting that the reason this uses vma_is_dax(), and the resulting header include changes, is that previous attempts to add a VM_DAX flag were NAKd. Link: http://lkml.kernel.org/r/149739531127.20686.15813586620597484283.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Ross Zwisler Cc: Jan Kara Cc: Christoph Hellwig Cc: "Kirill A. Shutemov" Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/dax.h | 5 ----- include/linux/fs.h | 6 ++++++ include/linux/huge_mm.h | 5 +++++ 3 files changed, 11 insertions(+), 5 deletions(-) commit 16981d763501c0e06e434cf6b59f964c520e0ccc Author: Dan Williams Date: Mon Jul 10 15:48:22 2017 -0700 mm: improve readability of transparent_hugepage_enabled() Turn the macro into a static inline and rewrite the condition checks for better readability in preparation for adding another condition. [ross.zwisler@linux.intel.com: fix logic to make conversion equivalent] [akpm@linux-foundation.org: resolve vs mm-make-pr_set_thp_disable-immediately-active.patch] [akpm@linux-foundation.org: include coredump.h for MMF_DISABLE_THP] Link: http://lkml.kernel.org/r/149739530612.20686.14760671150202647861.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Ross Zwisler Acked-by: "Kirill A. Shutemov" Acked-by: Michal Hocko Cc: Christoph Hellwig Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) commit 7ab0e50ad0831e714dcdc3de44a7fe3887732b7c Author: Steven Rostedt (VMware) Date: Mon Jul 10 15:48:18 2017 -0700 oom, trace: remove ENUM evaluation of COMPACTION_FEEDBACK After enabling CONFIG_TRACE_ENUM_MAP_FILE (which will soon be renamed to CONFIG_TRACE_EVAL_MAP_FILE), I am able to examine the enums that have been evaluated: # cat /sys/kernel/debug/tracing/enum_map (which will soon be renamed to eval_map) And it showed some interesting results: [..] ZONE_MOVABLE 3 (oom) ZONE_NORMAL 2 (oom) ZONE_DMA32 1 (oom) ZONE_DMA 0 (oom) 3 3 (oom) 2 2 (oom) 1 1 (oom) COMPACT_PRIO_ASYNC 2 (oom) COMPACT_PRIO_SYNC_LIGHT 1 (oom) COMPACT_PRIO_SYNC_FULL 0 (oom) [..] ZONE_DMA 0 (vmscan) 3 3 (vmscan) 2 2 (vmscan) 1 1 (vmscan) COMPACT_PRIO_ASYNC 2 (vmscan) [..] ZONE_DMA 0 (kmem) 3 3 (kmem) 2 2 (kmem) 1 1 (kmem) COMPACT_PRIO_ASYNC 2 (kmem) [..] ZONE_DMA 0 (compaction) 3 3 (compaction) 2 2 (compaction) 1 1 (compaction) COMPACT_PRIO_ASYNC 2 (compaction) [..] The name within the parenthesis are the trace systems that the enum/eval maps are associated with. When there's a number evaluated to another number, that tells me that the TRACE_DEFINE_ENUM() was used on a #define and not an enum. As #defines get converted normally, they are not needed to be evaluated. Each of the above trace systems with the number to number evaluation included the file include/trace/events/mmflags.h which has: /* High-level compaction status feedback */ #define COMPACTION_FAILED 1 #define COMPACTION_WITHDRAWN 2 #define COMPACTION_PROGRESS 3 [..] #define COMPACTION_FEEDBACK \ EM(COMPACTION_FAILED, "failed") \ EM(COMPACTION_WITHDRAWN, "withdrawn") \ EMe(COMPACTION_PROGRESS, "progress") Which is still needed for the __print_symbolic() usage in the trace_event. But it is not needed to be evaluated. Removing the evaluation part removes the unnecessary evaluations of numbers to numbers. Link: http://lkml.kernel.org/r/20170615074944.7be9a647@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) Cc: Michal Hocko Cc: Vlastimil Babka Cc: David Rientjes Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/mmflags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d715cf804a0318e83c75c0a7abd1a4b9ce13e8da Author: Liam R. Howlett Date: Mon Jul 10 15:48:15 2017 -0700 mm/hugetlb.c: warn the user when issues arise on boot due to hugepages When the user specifies too many hugepages or an invalid default_hugepagesz the communication to the user is implicit in the allocation message. This patch adds a warning when the desired page count is not allocated and prints an error when the default_hugepagesz is invalid on boot. During boot hugepages will allocate until there is a fraction of the hugepage size left. That is, we allocate until either the request is satisfied or memory for the pages is exhausted. When memory for the pages is exhausted, it will most likely lead to the system failing with the OOM manager not finding enough (or anything) to kill (unless you're using really big hugepages in the order of 100s of MB or in the GBs). The user will most likely see the OOM messages much later in the boot sequence than the implicitly stated message. Worse yet, you may even get an OOM for each processor which causes many pages of OOMs on modern systems. Although these messages will be printed earlier than the OOM messages, at least giving the user errors and warnings will highlight the configuration as an issue. I'm trying to point the user in the right direction by providing a more robust statement of what is failing. During the sysctl or echo command, the user can check the results much easier than if the system hangs during boot and the scenario of having nothing to OOM for kernel memory is highly unlikely. Mike said: "Before sending out this patch, I asked Liam off list why he was doing it. Was it something he just thought would be useful? Or, was there some type of user situation/need. He said that he had been called in to assist on several occasions when a system OOMed during boot. In almost all of these situations, the user had grossly misconfigured huge pages. DB users want to pre-allocate just the right amount of huge pages, but sometimes they can be really off. In such situations, the huge page init code just allocates as many huge pages as it can and reports the number allocated. There is no indication that it quit allocating because it ran out of memory. Of course, a user could compare the number in the message to what they requested on the command line to determine if they got all the huge pages they requested. The thought was that it would be useful to at least flag this situation. That way, the user might be able to better relate the huge page allocation failure to the OOM. I'm not sure if the e-mail discussion made it obvious that this is something he has seen on several occasions. I see Michal's point that this will only flag the situation where someone configures huge pages very badly. And, a more extensive look at the situation of misconfiguring huge pages might be in order. But, this has happened on several occasions which led to the creation of this patch" [akpm@linux-foundation.org: reposition memfmt() to avoid forward declaration] Link: http://lkml.kernel.org/r/20170603005413.10380-1-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Aneesh Kumar K.V Cc: Gerald Schaefer Cc: zhongjiang Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit e35ef6397b8273a0059a2b837c26f92b0ecf8596 Author: Anshuman Khandual Date: Mon Jul 10 15:48:12 2017 -0700 mm/cma.c: warn if the CMA area could not be activated While activating a CMA area we check to make sure that all the PFNs in the range are inside the same zone. This is a requirement for alloc_contig_range() to work. Any CMA area failing the check is disabled for good. This happens silently right now making all future cma_alloc() allocations failure inevitable. Here we add an error message stating that the CMA area could not be activated which makes it easier to explain any future cma_alloc() failures on it. While in there, change the bail out goto label from 'err' to 'not_in_zone' which makes more sense. Link: http://lkml.kernel.org/r/20170605023729.26303-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Cc: "Aneesh Kumar K.V" Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/cma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 78c72746f56b212ecf768a7e67cee3b7cf89238c Author: Yisheng Xie Date: Mon Jul 10 15:48:09 2017 -0700 vmalloc: show lazy-purged vma info in vmallocinfo When ioremap a 67112960 bytes vm_area with the vmallocinfo: [..] 0xec79b000-0xec7fa000 389120 ftl_add_mtd+0x4d0/0x754 pages=94 vmalloc 0xec800000-0xecbe1000 4067328 kbox_proc_mem_write+0x104/0x1c4 phys=8b520000 ioremap we get the result: 0xf1000000-0xf5001000 67112960 devm_ioremap+0x38/0x7c phys=40000000 ioremap For the align for ioremap must be less than '1 << IOREMAP_MAX_ORDER': if (flags & VM_IOREMAP) align = 1ul << clamp_t(int, get_count_order_long(size), PAGE_SHIFT, IOREMAP_MAX_ORDER); So it makes idiot like me a litte puzzled why this was a jump the vm_area from 0xec800000-0xecbe1000 to 0xf1000000-0xf5001000, and leaving 0xed000000-0xf1000000 as a big hole. This patch is to show all of vm_area, including vmas which are freeing but still in the vmap_area_list, to make it more clear about why we will get 0xf1000000-0xf5001000 in the above case. And we will get a vmallocinfo like: [..] 0xec79b000-0xec7fa000 389120 ftl_add_mtd+0x4d0/0x754 pages=94 vmalloc 0xec800000-0xecbe1000 4067328 kbox_proc_mem_write+0x104/0x1c4 phys=8b520000 ioremap [..] 0xece7c000-0xece7e000 8192 unpurged vm_area 0xece7e000-0xece83000 20480 vm_map_ram 0xf0099000-0xf00aa000 69632 vm_map_ram after this patch. Link: http://lkml.kernel.org/r/1496649682-20710-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Cc: Michal Hocko Cc: zijun_hu Cc: "Kirill A . Shutemov" Cc: Tim Chen Cc: Hanjun Guo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 34c8105792731118b69582562e1178417493e65a Author: Sean Christopherson Date: Mon Jul 10 15:48:05 2017 -0700 mm/memcontrol: exclude @root from checks in mem_cgroup_low Make @root exclusive in mem_cgroup_low; it is never considered low when looked at directly and is not checked when traversing the tree. In effect, @root is handled identically to how root_mem_cgroup was previously handled by mem_cgroup_low. If @root is not excluded from the checks, a cgroup underneath @root will never be considered low during targeted reclaim of @root, e.g. due to memory.current > memory.high, unless @root is misconfigured to have memory.low > memory.high. Excluding @root enables using memory.low to prioritize memory usage between cgroups within a subtree of the hierarchy that is limited by memory.high or memory.max, e.g. when ROOT owns @root's controls but delegates the @root directory to a USER so that USER can create and administer children of @root. For example, given cgroup A with children B and C: A / \ B C and 1. A/memory.current > A/memory.high 2. A/B/memory.current < A/B/memory.low 3. A/C/memory.current >= A/C/memory.low As 'A' is high, i.e. triggers reclaim from 'A', and 'B' is low, we should reclaim from 'C' until 'A' is no longer high or until we can no longer reclaim from 'C'. If 'A', i.e. @root, isn't excluded by mem_cgroup_low when reclaming from 'A', then 'B' won't be considered low and we will reclaim indiscriminately from both 'B' and 'C'. Here is the test I used to confirm the bug and the patch. 20:00:55@sjchrist-vm ? ~ $ cat ~/.bin/memcg_low_test #!/bin/bash x62mb=$((62<<20)) x66mb=$((66<<20)) x94mb=$((94<<20)) x98mb=$((98<<20)) setup() { set -e if [[ -n $DEBUG ]]; then set -x fi trap teardown EXIT HUP INT TERM if [[ ! -e /mnt/1gb.swap ]]; then sudo fallocate -l 1G /mnt/1gb.swap > /dev/null sudo mkswap /mnt/1gb.swap > /dev/null fi if ! swapon --show=NAME | grep -q "/mnt/1gb.swap"; then sudo swapon /mnt/1gb.swap fi if [[ ! -e /cgroup/cgroup.controllers ]]; then sudo mount -t cgroup2 none /cgroup fi grep -q memory /cgroup/cgroup.controllers sudo sh -c "echo '+memory' > /cgroup/cgroup.subtree_control" sudo mkdir /cgroup/A && sudo chown $USER:$USER /cgroup/A sudo sh -c "echo '+memory' > /cgroup/A/cgroup.subtree_control" sudo sh -c "echo '96m' > /cgroup/A/memory.high" mkdir /cgroup/A/0 mkdir /cgroup/A/1 echo 64m > /cgroup/A/0/memory.low } teardown() { set +e trap - EXIT HUP INT TERM if [[ -z $1 ]]; then printf "\n" printf "%0.s*" {1..35} printf "\nFAILED!\n\n" tail /cgroup/A/**/memory.current printf "%0.s*" {1..35} printf "\n\n" fi ps | grep stress | tr -s ' ' | cut -f 2 -d ' ' | xargs -I % kill % sleep 2 if [[ -e /cgroup/A/0 ]]; then rmdir /cgroup/A/0 fi if [[ -e /cgroup/A/1 ]]; then rmdir /cgroup/A/1 fi if [[ -e /cgroup/A ]]; then sudo rmdir /cgroup/A fi } stress_test() { sudo sh -c "echo $$ > /cgroup/A/$1/cgroup.procs" stress --vm 1 --vm-bytes 64M --vm-keep > /dev/null & sudo sh -c "echo $$ > /cgroup/A/$2/cgroup.procs" stress --vm 1 --vm-bytes 64M --vm-keep > /dev/null & sudo sh -c "echo $$ > /cgroup/cgroup.procs" sleep 1 # A/0 should be consuming more memory than A/1 [[ $(cat /cgroup/A/0/memory.current) -ge $(cat /cgroup/A/1/memory.current) ]] # A/0 should be consuming ~64mb [[ $(cat /cgroup/A/0/memory.current) -ge $x62mb ]] && [[ $(cat /cgroup/A/0/memory.current) -le $x66mb ]] # A should cumulatively be consuming ~96mb [[ $(cat /cgroup/A/memory.current) -ge $x94mb ]] && [[ $(cat /cgroup/A/memory.current) -le $x98mb ]] # Stop the stressors ps | grep stress | tr -s ' ' | cut -f 2 -d ' ' | xargs -I % kill % } teardown 1 setup for ((i=1;i<=$1;i++)); do printf "ITERATION $i of $1 - stress_test 0 1" stress_test 0 1 printf "\x1b[2K\r" printf "ITERATION $i of $1 - stress_test 1 0" stress_test 1 0 printf "\x1b[2K\r" printf "ITERATION $i of $1 - PASSED\n" done teardown 1 echo PASSED! 20:11:26@sjchrist-vm ? ~ $ memcg_low_test 10 Link: http://lkml.kernel.org/r/1496434412-21005-1-git-send-email-sean.j.christopherson@intel.com Signed-off-by: Sean Christopherson Acked-by: Vladimir Davydov Acked-by: Balbir Singh Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 50 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) commit 1860033237d4be09c5d7382585f0c7229367a534 Author: Michal Hocko Date: Mon Jul 10 15:48:02 2017 -0700 mm: make PR_SET_THP_DISABLE immediately active PR_SET_THP_DISABLE has a rather subtle semantic. It doesn't affect any existing mapping because it only updated mm->def_flags which is a template for new mappings. The mappings created after prctl(PR_SET_THP_DISABLE) have VM_NOHUGEPAGE flag set. This can be quite surprising for all those applications which do not do prctl(); fork() & exec() and want to control their own THP behavior. Another usecase when the immediate semantic of the prctl might be useful is a combination of pre- and post-copy migration of containers with CRIU. In this case CRIU populates a part of a memory region with data that was saved during the pre-copy stage. Afterwards, the region is registered with userfaultfd and CRIU expects to get page faults for the parts of the region that were not yet populated. However, khugepaged collapses the pages and the expected page faults do not occur. In more general case, the prctl(PR_SET_THP_DISABLE) could be used as a temporary mechanism for enabling/disabling THP process wide. Implementation wise, a new MMF_DISABLE_THP flag is added. This flag is tested when decision whether to use huge pages is taken either during page fault of at the time of THP collapse. It should be noted, that the new implementation makes PR_SET_THP_DISABLE master override to any per-VMA setting, which was not the case previously. Fixes: a0715cc22601 ("mm, thp: add VM_INIT_DEF_MASK and PRCTL_THP_DISABLE") Link: http://lkml.kernel.org/r/1496415802-30944-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Michal Hocko Signed-off-by: Mike Rapoport Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Arnd Bergmann Cc: "Kirill A. Shutemov" Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 1 + include/linux/khugepaged.h | 3 ++- include/linux/sched/coredump.h | 5 ++++- kernel/sys.c | 6 +++--- mm/khugepaged.c | 3 ++- mm/shmem.c | 8 +++++--- 6 files changed, 17 insertions(+), 9 deletions(-) commit b6bb9811496d26744c5a91a14c851face8b9f1e7 Author: David Rientjes Date: Mon Jul 10 15:47:59 2017 -0700 mm, vmpressure: pass-through notification support By default, vmpressure events are not pass-through, i.e. they propagate up through the memcg hierarchy until an event notifier is found for any threshold level. This presents a difficulty when a thread waiting on a read(2) for a vmpressure event cannot distinguish between local memory pressure and memory pressure in a descendant memcg, especially when that thread may not control the memcg hierarchy. Consider a user-controlled child memcg with a smaller limit than a top-level memcg controlled by the "Activity Manager" specified in Documentation/cgroup-v1/memory.txt. It may register for memory pressure notification for descendant memcgs to make a policy decision: oom kill a low priority job, increase the limit, decrease other limits, etc. If it registers for memory pressure notification on the top-level memcg, it currently cannot distinguish between memory pressure in its own memcg or a descendant memcg, which is user-controlled. Conversely, if a user registers for memory pressure notification on their own descendant memcg, the Activity Manager does not receive any pressure notification for that child memcg hierarchy. Vmpressure events are not received for ancestor memcgs if the memcg experiencing pressure have notifiers registered, perhaps outside the knowledge of the thread waiting on read(2) at the top level. Both of these are consequences of vmpressure notification not being pass-through. This implements a pass-through behavior for vmpressure events. When writing to control.event_control, vmpressure event handlers may optionally specify a mode. There are two new modes: - "hierarchy": always propagate memory pressure events up the hierarchy regardless if descendant memcgs have their own notifiers registered, and - "local": only receive notifications when the memcg for which the event is registered experiences memory pressure. Of course, processes may register for one notification of "low,local", for example, and another for "low". If no mode is specified, the current behavior is maintained for backwards compatibility. See the change to Documentation/cgroup-v1/memory.txt for full specification. [dan.carpenter@oracle.com: free the same pointer we allocated] Link: http://lkml.kernel.org/r/20170613191820.GA20003@elgon.mountain Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1705311421320.8946@chino.kir.corp.google.com Signed-off-by: David Rientjes Signed-off-by: Dan Carpenter Cc: Johannes Weiner Cc: Vlastimil Babka Cc: Minchan Kim Cc: Jonathan Corbet Cc: Anton Vorontsov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v1/memory.txt | 47 ++++++++++---- mm/vmpressure.c | 122 ++++++++++++++++++++++++++++--------- 2 files changed, 128 insertions(+), 41 deletions(-) commit 0348d2ebec9b00ea87b42dffdb3f393007303b82 Author: Naoya Horiguchi Date: Mon Jul 10 15:47:56 2017 -0700 mm: hwpoison: introduce idenfity_page_state Factoring duplicate code into a function. Link: http://lkml.kernel.org/r/1496305019-5493-10-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 57 +++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 32 deletions(-) commit ddd40d8a2c4ef8f2152ea6d227e11475cf7e5bfa Author: Naoya Horiguchi Date: Mon Jul 10 15:47:53 2017 -0700 mm: hugetlb: delete dequeue_hwpoisoned_huge_page() dequeue_hwpoisoned_huge_page() is no longer used, so let's remove it. Link: http://lkml.kernel.org/r/1496305019-5493-9-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 5 ----- mm/hugetlb.c | 34 ---------------------------------- mm/memory-failure.c | 11 ----------- 3 files changed, 50 deletions(-) commit 78bb920344b8a6f04b79a7c254041723b931c94f Author: Naoya Horiguchi Date: Mon Jul 10 15:47:50 2017 -0700 mm: hwpoison: dissolve in-use hugepage in unrecoverable memory error Currently me_huge_page() relies on dequeue_hwpoisoned_huge_page() to keep the error hugepage away from the system, which is OK but not good enough because the hugepage still has a refcount and unpoison doesn't work on the error hugepage (PageHWPoison flags are cleared but pages are still leaked.) And there's "wasting health subpages" issue too. This patch reworks on me_huge_page() to solve these issues. For hugetlb file, recently we have truncating code so let's use it in hugetlbfs specific ->error_remove_page(). For anonymous hugepage, it's helpful to dissolve the error page after freeing it into free hugepage list. Migration entry and PageHWPoison in the head page prevent the access to it. TODO: dissolve_free_huge_page() can fail but we don't considered it yet. It's not critical (and at least no worse that now) because in such case the error hugepage just stays in free hugepage list without being dissolved. By virtue of PageHWPoison in head page, it's never allocated to processes. [akpm@linux-foundation.org: fix unused var warnings] Fixes: 23a003bfd23ea9ea0b7756b920e51f64b284b468 ("mm/madvise: pass return code of memory_failure() to userspace") Link: http://lkml.kernel.org/r/20170417055948.GM31394@yexl-desktop Link: http://lkml.kernel.org/r/1496305019-5493-8-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Reported-by: kernel test robot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 11 +++++++ mm/memory-failure.c | 93 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 64 insertions(+), 40 deletions(-) commit 761ad8d7c7b5485bb66fd5bccb58a891fe784544 Author: Naoya Horiguchi Date: Mon Jul 10 15:47:47 2017 -0700 mm: hwpoison: introduce memory_failure_hugetlb() memory_failure() is a big function and hard to maintain. Handling hugetlb- and non-hugetlb- case in a single function is not good, so this patch separates PageHuge() branch into a new function, which saves many PageHuge() check. Link: http://lkml.kernel.org/r/1496305019-5493-7-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 134 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 52 deletions(-) commit d4a3a60b37bf4609f9b17961a0db2f6e7ec746cd Author: Naoya Horiguchi Date: Mon Jul 10 15:47:44 2017 -0700 mm: soft-offline: dissolve free hugepage if soft-offlined Now we have code to rescue most of healthy pages from a hwpoisoned hugepage. So let's apply it to soft_offline_free_page too. Link: http://lkml.kernel.org/r/1496305019-5493-6-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3114a84f7f96c9d5c73c8bfa7e21ff42fda97e2 Author: Anshuman Khandual Date: Mon Jul 10 15:47:41 2017 -0700 mm: hugetlb: soft-offline: dissolve source hugepage after successful migration Currently hugepage migrated by soft-offline (i.e. due to correctable memory errors) is contained as a hugepage, which means many non-error pages in it are unreusable, i.e. wasted. This patch solves this issue by dissolving source hugepages into buddy. As done in previous patch, PageHWPoison is set only on a head page of the error hugepage. Then in dissoliving we move the PageHWPoison flag to the raw error page so that all healthy subpages return back to buddy. [arnd@arndb.de: fix warnings: replace some macros with inline functions] Link: http://lkml.kernel.org/r/20170609102544.2947326-1-arnd@arndb.de Link: http://lkml.kernel.org/r/1496305019-5493-5-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Anshuman Khandual Signed-off-by: Naoya Horiguchi Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 31 +++++++++++++++++++++++++++---- mm/hugetlb.c | 10 +++++++++- mm/memory-failure.c | 5 +---- mm/migrate.c | 2 ++ 4 files changed, 39 insertions(+), 9 deletions(-) commit b37ff71cc626a0c1b5e098ff9a0b723815f6aaeb Author: Naoya Horiguchi Date: Mon Jul 10 15:47:38 2017 -0700 mm: hwpoison: change PageHWPoison behavior on hugetlb pages We'd like to narrow down the error region in memory error on hugetlb pages. However, currently we set PageHWPoison flags on all subpages in the error hugepage and add # of subpages to num_hwpoison_pages, which doesn't fit our purpose. So this patch changes the behavior and we only set PageHWPoison on the head page then increase num_hwpoison_pages only by 1. This is a preparation for narrow-down part which comes in later patches. Link: http://lkml.kernel.org/r/1496305019-5493-4-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Cc: Michal Hocko Cc: "Aneesh Kumar K.V" Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swapops.h | 9 ----- mm/memory-failure.c | 87 ++++++++++++++----------------------------------- 2 files changed, 24 insertions(+), 72 deletions(-) commit 09612fa6532a838e159d3b3aacfa8641698a89d2 Author: Naoya Horiguchi Date: Mon Jul 10 15:47:35 2017 -0700 mm: hugetlb: return immediately for hugetlb page in __delete_from_page_cache() We avoid calling __mod_node_page_state(NR_FILE_PAGES) for hugetlb page now, but it's not enough because later code doesn't handle hugetlb properly. Actually in our testing, WARN_ON_ONCE(PageDirty(page)) at the end of this function fires for hugetlb, which makes no sense. So we should return immediately for hugetlb pages. Link: http://lkml.kernel.org/r/1496305019-5493-3-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Cc: Michal Hocko Cc: "Aneesh Kumar K.V" Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 243abd5b7803d540280f029bc5224a4a2892579a Author: Naoya Horiguchi Date: Mon Jul 10 15:47:32 2017 -0700 mm: hugetlb: prevent reuse of hwpoisoned free hugepages Patch series "mm: hwpoison: fixlet for hugetlb migration". This patchset updates the hwpoison/hugetlb code to address 2 reported issues. One is madvise(MADV_HWPOISON) failure reported by Intel's lkp robot (see http://lkml.kernel.org/r/20170417055948.GM31394@yexl-desktop.) First half was already fixed in mainline, and another half about hugetlb cases are solved in this series. Another issue is "narrow-down error affected region into a single 4kB page instead of a whole hugetlb page" issue, which was tried by Anshuman (http://lkml.kernel.org/r/20170420110627.12307-1-khandual@linux.vnet.ibm.com) and I updated it to apply it more widely. This patch (of 9): We no longer use MIGRATE_ISOLATE to prevent reuse of hwpoison hugepages as we did before. So current dequeue_huge_page_node() doesn't work as intended because it still uses is_migrate_isolate_page() for this check. This patch fixes it with PageHWPoison flag. Link: http://lkml.kernel.org/r/1496305019-5493-2-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Cc: Michal Hocko Cc: "Aneesh Kumar K.V" Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 3 +-- mm/memory-failure.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 241f01fbeda2521f802eeef4de0261387e6e9c1d Author: Eric Biggers Date: Mon Jul 10 15:47:29 2017 -0700 fs/buffer.c: make bh_lru_install() more efficient To install a buffer_head into the cpu's LRU queue, bh_lru_install() would construct a new copy of the queue and then memcpy it over the real queue. But it's easily possible to do the update in-place, which is faster and simpler. Some work can also be skipped if the buffer_head was already in the queue. As a microbenchmark I timed how long it takes to run sb_getblk() 10,000,000 times alternating between BH_LRU_SIZE + 1 blocks. Effectively, this benchmarks looking up buffer_heads that are in the page cache but not in the LRU: Before this patch: 1.758s After this patch: 1.653s This patch also removes about 350 bytes of compiled code (on x86_64), partly due to removal of the memcpy() which was being inlined+unrolled. Link: http://lkml.kernel.org/r/20161229193445.1913-1-ebiggers3@gmail.com Signed-off-by: Eric Biggers Cc: Alexander Viro Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/buffer.c | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) commit 3457f4147675108aa83f9f33c136f06bb9f8518f Author: Nick Desaulniers Date: Mon Jul 10 15:47:26 2017 -0700 mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning is_first_page() is only called from the macro VM_BUG_ON_PAGE() which is only compiled in as a runtime check when CONFIG_DEBUG_VM is set, otherwise is checked at compile time and not actually compiled in. Fixes the following warning, found with Clang: mm/zsmalloc.c:472:12: warning: function 'is_first_page' is not needed and will not be emitted [-Wunneeded-internal-declaration] static int is_first_page(struct page *page) ^ Link: http://lkml.kernel.org/r/20170524053859.29059-1-nick.desaulniers@gmail.com Signed-off-by: Nick Desaulniers Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbac61a3f2afac562efa51b0a196ed71b6b8d109 Author: Gustavo A. R. Silva Date: Mon Jul 10 15:47:23 2017 -0700 mm/memory_hotplug.c: add NULL check to avoid potential NULL pointer dereference The NULL check at line 1226: if (!pgdat), implies that pointer pgdat might be NULL. rollback_node_hotadd() dereferences this pointer. Add NULL check to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1369133 Link: http://lkml.kernel.org/r/20170530212436.GA6195@embeddedgus Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06226226773d56685de6ee9eb3f5d668e9f772ee Author: David Rientjes Date: Mon Jul 10 15:47:20 2017 -0700 mm, vmscan: avoid thrashing anon lru when free + file is low The purpose of the code that commit 623762517e23 ("revert 'mm: vmscan: do not swap anon pages just because free+file is low'") reintroduces is to prefer swapping anonymous memory rather than trashing the file lru. If the anonymous inactive lru for the set of eligible zones is considered low, however, or the length of the list for the given reclaim priority does not allow for effective anonymous-only reclaiming, then avoid forcing SCAN_ANON. Forcing SCAN_ANON will end up thrashing the small list and leave unreclaimed memory on the file lrus. If the inactive list is insufficient, fallback to balanced reclaim so the file lru doesn't remain untouched. [akpm@linux-foundation.org: fix build] Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1705011432220.137835@chino.kir.corp.google.com Signed-off-by: David Rientjes Suggested-by: Minchan Kim Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 0a1345f8fed962958047dc0148f94d9bed160824 Author: Yevgen Pronenko Date: Mon Jul 10 15:47:17 2017 -0700 mm/memory.c: convert to DEFINE_DEBUGFS_ATTRIBUTE The preferred strategy to define debugfs attributes is to use the DEFINE_DEBUGFS_ATTRIBUTE() macro and to use debugfs_create_file_unsafe(). Link: http://lkml.kernel.org/r/20170528145948.32127-1-y.pronenko@gmail.com Signed-off-by: Yevgen Pronenko Cc: "Kirill A . Shutemov" Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a8f58f3918869dda0d71b2e9245baedbbe7bc5e Author: Vlastimil Babka Date: Mon Jul 10 15:47:14 2017 -0700 mm, page_alloc: fallback to smallest page when not stealing whole pageblock Since commit 3bc48f96cf11 ("mm, page_alloc: split smallest stolen page in fallback") we pick the smallest (but sufficient) page of all that have been stolen from a pageblock of different migratetype. However, there are cases when we decide not to steal the whole pageblock. Practically in the current implementation it means that we are trying to fallback for a MIGRATE_MOVABLE allocation of order X, go through the freelists from MAX_ORDER-1 down to X, and find free page of order Y. If Y is less than pageblock_order / 2, we decide not to steal all pages from the pageblock. When Y > X, it means we are potentially splitting a larger page than we need, as there might be other pages of order Z, where X <= Z < Y. Since Y is already too small to steal whole pageblock, picking smallest available Z will result in the same decision and we avoid splitting a higher-order page in a MIGRATE_UNMOVABLE or MIGRATE_RECLAIMABLE pageblock. This patch therefore changes the fallback algorithm so that in the situation described above, we switch the fallback search strategy to go from order X upwards to find the smallest suitable fallback. In theory there shouldn't be a downside of this change wrt fragmentation. This has been tested with mmtests' stress-highalloc performing GFP_KERNEL order-4 allocations, here is the relevant extfrag tracepoint statistics: 4.12.0-rc2 4.12.0-rc2 1-kernel4 2-kernel4 Page alloc extfrag event 25640976 69680977 Extfrag fragmenting 25621086 69661364 Extfrag fragmenting for unmovable 74409 73204 Extfrag fragmenting unmovable placed with movable 69003 67684 Extfrag fragmenting unmovable placed with reclaim. 5406 5520 Extfrag fragmenting for reclaimable 6398 8467 Extfrag fragmenting reclaimable placed with movable 869 884 Extfrag fragmenting reclaimable placed with unmov. 5529 7583 Extfrag fragmenting for movable 25540279 69579693 Since we force movable allocations to steal the smallest available page (which we then practially always split), we steal less per fallback, so the number of fallbacks increases and steals potentially happen from different pageblocks. This is however not an issue for movable pages that can be compacted. Importantly, the "unmovable placed with movable" statistics is lower, which is the result of less fragmentation in the unmovable pageblocks. The effect on reclaimable allocation is a bit unclear. Link: http://lkml.kernel.org/r/20170529093947.22618-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Johannes Weiner Cc: Joonsoo Kim Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 53 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 9 deletions(-) commit 23955622ff8d231bcc9650b3d06583f117a6e3ba Author: Shaohua Li Date: Mon Jul 10 15:47:11 2017 -0700 swap: add block io poll in swapin path For fast flash disk, async IO could introduce overhead because of context switch. block-mq now supports IO poll, which improves performance and latency a lot. swapin is a good place to use this technique, because the task is waiting for the swapin page to continue execution. In my virtual machine, directly read 4k data from a NVMe with iopoll is about 60% better than that without poll. With iopoll support in swapin patch, my microbenchmark (a task does random memory write) is about 10%~25% faster. CPU utilization increases a lot though, 2x and even 3x CPU utilization. This will depend on disk speed. While iopoll in swapin isn't intended for all usage cases, it's a win for latency sensistive workloads with high speed swap disk. block layer has knob to control poll in runtime. If poll isn't enabled in block layer, there should be no noticeable change in swapin. I got a chance to run the same test in a NVMe with DRAM as the media. In simple fio IO test, blkpoll boosts 50% performance in single thread test and ~20% in 8 threads test. So this is the base line. In above swap test, blkpoll boosts ~27% performance in single thread test. blkpoll uses 2x CPU time though. If we enable hybid polling, the performance gain has very slight drop but CPU time is only 50% worse than that without blkpoll. Also we can adjust parameter of hybid poll, with it, the CPU time penality is reduced further. In 8 threads test, blkpoll doesn't help though. The performance is similar to that without blkpoll, but cpu utilization is similar too. There is lock contention in swap path. The cpu time spending on blkpoll isn't high. So overall, blkpoll swapin isn't worse than that without it. The swapin readahead might read several pages in in the same time and form a big IO request. Since the IO will take longer time, it doesn't make sense to do poll, so the patch only does iopoll for single page swapin. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/070c3c3e40b711e7b1390002c991e86a-b5408f0@7511894063d3764ff01ea8111f5a004d7dd700ed078797c204a24e620ddb965c Signed-off-by: Shaohua Li Cc: Tim Chen Cc: Huang Ying Cc: Jens Axboe Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 5 +++-- mm/madvise.c | 4 ++-- mm/page_io.c | 23 +++++++++++++++++++++-- mm/swap_state.c | 10 ++++++---- mm/swapfile.c | 2 +- 5 files changed, 33 insertions(+), 11 deletions(-) commit 3c778a7fcfaa4bb51aefb4f2c7364a5e2c4d0b66 Author: Benson Leung Date: Wed Nov 16 10:19:25 2016 -0800 platform/chrome : Add myself as Maintainer I'll be taking over maintainership of platform/chrome from Olof, so let's add me to the list of maintainers. Signed-off-by: Benson Leung Acked-by: Guenter Roeck Acked-by: Olof Johansson MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 548aa0e3c516d906dae5edb1fc9a1ad2e490120a Merge: 3226186 6a71d8d Author: Linus Torvalds Date: Mon Jul 10 15:23:45 2017 -0700 Merge tag 'devprop-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework updates from Rafael Wysocki: "These mostly rearrange the device properties core code and add a few helper functions to it as a foundation for future work. Specifics: - Rearrange the core device properties code by moving the code specific to each supported platform configuration framework (ACPI, DT and build-in) into a separate file (Sakari Ailus). - Add helper functions for accessing device properties in a firmware-agnostic way (Sakari Ailus, Kieran Bingham)" * tag 'devprop-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: Add fwnode_graph_get_port_parent device property: Add FW type agnostic fwnode_graph_get_remote_node device property: Introduce fwnode_device_is_available() device property: Move fwnode graph ops to firmware specific locations device property: Move FW type specific functionality to FW specific files ACPI: Constify argument to acpi_device_is_present() commit 322618684353315e14f586b33d8a016286ffa700 Merge: 1633b39 f19e80b Author: Linus Torvalds Date: Mon Jul 10 15:19:40 2017 -0700 Merge tag 'acpi-extra-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These fix the ACPI SPCR table handling and add a workaround for APM X-Gene 8250 UART on top of that, fix two ACPI hotplug issues related to hot-remove failures, add a missing "static" to one function and constify some attribute_group structures. Specifics: - Fix the ACPI code handling the SPCR table to check access width of MMIO regions and add a workaround for APM X-Gene 8250 UART to use 32-bit MMIO accesses with its register (Loc Ho). - Fix two ACPI-based hotplug issues related to the handling of hot-remove failures on the OS side (Chun-Yi Lee). - Constify attribute_group structures in a few places (Arvind Yadav). - Make one local function static (Colin Ian King)" * tag 'acpi-extra-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / DPTF: constify attribute_group structures ACPI / LPSS: constify attribute_group structures ACPI: BGRT: constify attribute_group structures ACPI / power: constify attribute_group structures ACPI / scan: Indicate to platform when hot remove returns busy ACPI / bus: handle ACPI hotplug schedule errors completely ACPI / osi: Make local function acpi_osi_dmi_linux() static ACPI: SPCR: Workaround for APM X-Gene 8250 UART 32-alignment errata ACPI: SPCR: Use access width to determine mmio usage commit 1633b396105b69efe8bfc83e33662276cc8a7675 Merge: 5cdd4c0 15d56b3 Author: Linus Torvalds Date: Mon Jul 10 15:16:21 2017 -0700 Merge tag 'pm-extra-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These revert one recent change in the generic power domains framework, fix a recently introduced build issue in there and constify attribute_group structures in some places. Specifics: - Revert a recent change in the generic power domains (genpd) framework that led to regressions and turned out the be misguided (Rafael Wysocki). - Fix a recently introduced build issue in the generic power domains (genpd) framework (Arnd Bergmann). - Constify attribute_group structures in the PM core, the cpufreq stats code and in intel_pstate (Arvind Yadav)" * tag 'pm-extra-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: constify attribute_group structures cpufreq: cpufreq_stats: constify attribute_group structures PM / sleep: constify attribute_group structures PM / Domains: provide pm_genpd_poweroff_noirq() stub Revert "PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device" commit 5cdd4c046864827e7ac140eed081c6768a4dbb16 Merge: 7cee938 0abd675 Author: Linus Torvalds Date: Mon Jul 10 14:29:45 2017 -0700 Merge tag 'for-f2fs-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've added new features such as disk quota and statx, and modified internal bio management flow to merge more IOs depending on block types. We've also made internal threads freezeable for Android battery life. In addition to them, there are some patches to avoid lock contention as well as a couple of deadlock conditions. Enhancements: - support usrquota, grpquota, and statx - manage DATA/NODE typed bios separately to serialize more IOs - modify f2fs_lock_op/wio_mutex to avoid lock contention - prevent lock contention in migratepage Bug fixes: - fix missing load of written inode flag - fix worst case victim selection in GC - freezeable GC and discard threads for Android battery life - sanitize f2fs metadata to deal with security hole - clean up sysfs-related code and docs" * tag 'for-f2fs-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (59 commits) f2fs: support plain user/group quota f2fs: avoid deadlock caused by lock order of page and lock_op f2fs: use spin_{,un}lock_irq{save,restore} f2fs: relax migratepage for atomic written page f2fs: don't count inode block in in-memory inode.i_blocks Revert "f2fs: fix to clean previous mount option when remount_fs" f2fs: do not set LOST_PINO for renamed dir f2fs: do not set LOST_PINO for newly created dir f2fs: skip ->writepages for {mete,node}_inode during recovery f2fs: introduce __check_sit_bitmap f2fs: stop gc/discard thread in prior during umount f2fs: introduce reserved_blocks in sysfs f2fs: avoid redundant f2fs_flush after remount f2fs: report # of free inodes more precisely f2fs: add ioctl to do gc with target block address f2fs: don't need to check encrypted inode for partial truncation f2fs: measure inode.i_blocks as generic filesystem f2fs: set CP_TRIMMED_FLAG correctly f2fs: require key for truncate(2) of encrypted file f2fs: move sysfs code from super.c to fs/f2fs/sysfs.c ... commit 61e8d462457f202bf0c6393133425ad387825e22 Author: Richard Weinberger Date: Thu Jul 6 09:35:27 2017 +0200 um: Correctly check for PTRACE_GETRESET/SETREGSET When checking for PTRACE_GETRESET/SETREGSET, make sure that the correct header file is included. We need linux/ptrace.h which contains all ptrace UAPI related defines. Otherwise #if defined(PTRACE_GETRESET) is always false. Cc: Florian Fainelli Signed-off-by: Richard Weinberger arch/x86/um/user-offsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94df7fe0d3e6418113783ff646507287c233e1e3 Author: Thomas Meyer Date: Fri Jul 7 11:17:31 2017 +0200 um: v2: Use generic NOTES macro Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger arch/um/include/asm/common.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f19e80b394808ed763e2669b08aea480adcc46be Merge: eceeae4 79a6483 5438bc5 9a4d8d6 d429e5c 9e4de6a Author: Rafael J. Wysocki Date: Mon Jul 10 22:46:21 2017 +0200 Merge branches 'acpi-spcr', 'acpi-osi', 'acpi-bus', 'acpi-scan' and 'acpi-misc' * acpi-spcr: ACPI: SPCR: Workaround for APM X-Gene 8250 UART 32-alignment errata ACPI: SPCR: Use access width to determine mmio usage * acpi-osi: ACPI / osi: Make local function acpi_osi_dmi_linux() static * acpi-bus: ACPI / bus: handle ACPI hotplug schedule errors completely * acpi-scan: ACPI / scan: Indicate to platform when hot remove returns busy * acpi-misc: ACPI / DPTF: constify attribute_group structures ACPI / LPSS: constify attribute_group structures ACPI: BGRT: constify attribute_group structures ACPI / power: constify attribute_group structures commit 15d56b3921d2e52c7747af21fcdf04e940aeb09b Merge: 408c986 af3eb27 1d0c6e5 106c9c7 Author: Rafael J. Wysocki Date: Mon Jul 10 22:45:16 2017 +0200 Merge branches 'pm-domains', 'pm-sleep' and 'pm-cpufreq' * pm-domains: PM / Domains: provide pm_genpd_poweroff_noirq() stub Revert "PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device" * pm-sleep: PM / sleep: constify attribute_group structures * pm-cpufreq: cpufreq: intel_pstate: constify attribute_group structures cpufreq: cpufreq_stats: constify attribute_group structures commit 80f62589fa52f530cffc50e78c0b5a2ae572d61e Author: Jin Yao Date: Thu Jun 8 14:01:44 2017 +0800 perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target When the jump instruction is displayed at the row 0 in annotate view, the arrow is broken. An example: 16.86 │ ┌──je 82 0.01 │ movsd (%rsp),%xmm0 │ movsd 0x8(%rsp),%xmm4 │ movsd 0x8(%rsp),%xmm1 │ movsd (%rsp),%xmm3 │ divsd %xmm4,%xmm0 │ divsd %xmm3,%xmm1 │ movsd (%rsp),%xmm2 │ addsd %xmm1,%xmm0 │ addsd %xmm2,%xmm0 │ movsd %xmm0,(%rsp) │82: sub $0x1,%ebx 83.03 │ ↑ jne 38 │ add $0x10,%rsp │ xor %eax,%eax │ pop %rbx │ ← retq The patch increments the row number before checking with 0. Signed-off-by: Yao Jin Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: stable@vger.kernel.org Fixes: 944e1abed9e1 ("perf ui browser: Add method to draw up/down arrow line") Link: http://lkml.kernel.org/r/1496901704-30275-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ede5626d303b721dd02246a3850380943c24e380 Author: Arnaldo Carvalho de Melo Date: Mon Jul 10 16:19:25 2017 -0300 perf evsel: State in the default event name if attr.exclude_kernel is set When no event is specified perf will use the "cycles" hardware event with the highest precision available in the processor, and excluding kernel events for non-root users, so make that clear in the event name by setting the "u" event modifier, i.e. "cycles:upp". E.g.: The default for root: # perf record usleep 1 # perf evlist -v cycles:ppp: ..., precise_ip: 3, exclude_kernel: 0, ... # And for !root: $ perf record usleep 1 $ perf evlist -v cycles:uppp: ... , precise_ip: 3, exclude_kernel: 1, ... $ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-lf29zcdl422i9knrgde0uwy3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d37a369790774af66a4aee61a188384d21b17a43 Author: Arnaldo Carvalho de Melo Date: Mon Jul 10 16:08:07 2017 -0300 perf evsel: Fix attr.exclude_kernel setting for default cycles:p To allow probing the max attr.precise_ip setting for non-root users we unconditionally set attr.exclude_kernel, which makes the detection work but should be done only for !root, fix it. Cc: Adrian Hunter Cc: Andy Lutomirski Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 97365e81366f ("perf evsel: Set attr.exclude_kernel when probing max attr.precise_ip") Link: http://lkml.kernel.org/n/tip-bl6bbxzxloonzvm4nvt7oqgj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac1ca3ba9faae7e32f189edda14f6f147053d719 Author: Geert Uytterhoeven Date: Sun Jul 9 21:30:32 2017 +0200 ASoC: pxa: SND_PXA2XX_SOC should depend on HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [sound/soc/pxa/snd-soc-pxa2xx.ko] undefined! ERROR: "bad_dma_ops" [sound/arm/snd-pxa2xx-lib.ko] undefined! ERROR: "dma_common_mmap" [sound/arm/snd-pxa2xx-lib.ko] undefined! Add a dependency on HAS_DMA to fix this. Fixes: 73d7ee2e831f106c ("ASoC: pxa: add COMPILE_TEST on SND_PXA2XX_SOC") Signed-off-by: Geert Uytterhoeven Acked-by: Robert Jarzmik Signed-off-by: Mark Brown sound/soc/pxa/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b222dd2fdd53a40dd8f1d3082ae98e52883cce0d Author: Shaohua Li Date: Mon Jul 10 11:40:17 2017 -0700 block: call bio_uninit in bio_endio bio_free isn't a good place to free cgroup info. There are a lot of cases bio is allocated in special way (for example, in stack) and never gets called by bio_put hence bio_free, we are leaking memory. This patch moves the free to bio endio, which should be called anyway. The bio_uninit call in bio_free is kept, in case the bio never gets called bio endio. This assumes ->bi_end_io() doesn't access cgroup info, which seems true in my audit. This along with Christoph's integrity patch should fix the memory leak issue. Cc: Christoph Hellwig Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/bio.c | 2 ++ 1 file changed, 2 insertions(+) commit 7cee9384cb3e25de33d75ecdbf08bb15b4ea9fa5 Author: Linus Torvalds Date: Mon Jul 10 11:40:19 2017 -0700 Fix up over-eager 'wait_queue_t' renaming Commit ac6424b981bc ("sched/wait: Rename wait_queue_t => wait_queue_entry_t") had scripted the renaming incorrectly, and didn't actually check that the 'wait_queue_t' was a full token. As a result, it also triggered on 'wait_queue_token', and renamed that to 'wait_queue_entry_token' entry in the autofs4 packet structure definition too. That was entirely incorrect, and not intended. The end result built fine when building just the kernel - because everything had been renamed consistently there - but caused problems in user space because the "struct autofs_packet_missing" type is exported as part of the uapi. This scripts it all back again: git grep -lw wait_queue_entry_token | xargs sed -i 's/wait_queue_entry_token/wait_queue_token/g' and checks the end result. Reported-by: Florian Fainelli Acked-by: Ingo Molnar Fixes: ac6424b981bc ("sched/wait: Rename wait_queue_t => wait_queue_entry_t") Signed-off-by: Linus Torvalds Documentation/filesystems/autofs4.txt | 12 ++++++------ fs/autofs4/autofs_i.h | 2 +- fs/autofs4/waitq.c | 18 +++++++++--------- include/uapi/linux/auto_fs.h | 4 ++-- include/uapi/linux/auto_fs4.h | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) commit de92cd6cf4899c0876a8f5519769a786ad7cdeea Author: Arnd Bergmann Date: Mon Jul 10 11:37:51 2017 +0200 net/mlx5: IPSec, fix 64-bit division correctly The new IPSec offload code introduced a build error: drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.o: In function `mlx5e_ipsec_build_inverse_table': ipsec_rxtx.c:(.text+0x556): undefined reference Another patch was added on top to fix the build error, but that introduced a new bug, as we now use the remainder of the division rather than the result. This makes it use the correct helper function instead. Fixes: 5dfd87b67cd9 ("net/mlx5: IPSec, Fix 64-bit division on 32-bit builds") Fixes: 2ac9cfe78223 ("net/mlx5e: IPSec, Add Innova IPSec offload TX data path") Signed-off-by: Arnd Bergmann Reviewed-by: Ilan Tayari Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5b43af6d25461d7de293e0704d3b4631dda9b1e8 Author: Subhransu S. Prusty Date: Fri Jun 30 18:38:44 2017 +0530 ASoC: Intel: Skylake: Fix default dma_buffer_size If the dma_buffer_size is not defined in topology, fix it to 2ms default value to make backward compatible. Fixes: f6e6ab1d16ec ("ASoC: Intel: Skylake: Fix dma buffer size calculation") Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6f6e0b217a93011f8e11b9a2d5521a08fcf36990 Author: Gustavo A. R. Silva Date: Thu Jul 6 16:58:33 2017 -0500 drm/rockchip: fix NULL check on devm_kzalloc() return value The right variable to check here is port, not dp. This issue was detected using Coccinelle and the following semantic patch: @@ expression x; identifier fld; @@ * x = devm_kzalloc(...); ... when != x == NULL x->fld Signed-off-by: Gustavo A. R. Silva Acked-by: Mark Yao Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170706215833.GA25411@embeddedgus drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eb788800510ae1a6bc419636a66071ee4deafd5 Merge: 642338b 4495ec6 Author: Linus Torvalds Date: Mon Jul 10 10:59:29 2017 -0700 Merge tag 'for-linus-4.13-v2' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Some small fixes for IPMI, and one medium sized changed. The medium sized change is adding a platform device for IPMI entries in the DMI table. Otherwise there is no auto loading for IPMI devices if they are only in the DMI table" * tag 'for-linus-4.13-v2' of git://github.com/cminyard/linux-ipmi: ipmi:ssif: Add missing unlock in error branch char: ipmi: constify bmc_dev_attr_group and bmc_device_type ipmi:ssif: Check dev before setting drvdata ipmi: Convert DMI handling over to a platform device ipmi: Create a platform device for a DMI-specified IPMI interface ipmi: use rcu lock around call to intf->handlers->sender() ipmi:ssif: Use i2c_adapter_id instead of adapter->nr ipmi: Use the proper default value for register size in ACPI ipmi_ssif: remove redundant null check on array client->adapter->name ipmi/watchdog: fix watchdog timeout set on reboot ipmi_ssif: unlock on allocation failure commit 642338ba33c5331f2b94ca3944845741fbbf8b89 Merge: 6618a24 cd87d86 Author: Linus Torvalds Date: Mon Jul 10 10:51:53 2017 -0700 Merge tag 'xfs-4.13-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS updates from Darrick Wong: "Here are some changes for you for 4.13. For the most part it's fixes for bugs and deadlock problems, and preparation for online fsck in some future merge window. - Avoid quotacheck deadlocks - Fix transaction overflows when bunmapping fragmented files - Refactor directory readahead - Allow admin to configure if ASSERT is fatal - Improve transaction usage detail logging during overflows - Minor cleanups - Don't leak log items when the log shuts down - Remove double-underscore typedefs - Various preparation for online scrubbing - Introduce new error injection configuration sysfs knobs - Refactor dq_get_next to use extent map directly - Fix problems with iterating the page cache for unwritten data - Implement SEEK_{HOLE,DATA} via iomap - Refactor XFS to use iomap SEEK_HOLE and SEEK_DATA - Don't use MAXPATHLEN to check on-disk symlink target lengths" * tag 'xfs-4.13-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (48 commits) xfs: don't crash on unexpected holes in dir/attr btrees xfs: rename MAXPATHLEN to XFS_SYMLINK_MAXLEN xfs: fix contiguous dquot chunk iteration livelock xfs: Switch to iomap for SEEK_HOLE / SEEK_DATA vfs: Add iomap_seek_hole and iomap_seek_data helpers vfs: Add page_cache_seek_hole_data helper xfs: remove a whitespace-only line from xfs_fs_get_nextdqblk xfs: rewrite xfs_dq_get_next_id using xfs_iext_lookup_extent xfs: Check for m_errortag initialization in xfs_errortag_test xfs: grab dquots without taking the ilock xfs: fix semicolon.cocci warnings xfs: Don't clear SGID when inheriting ACLs xfs: free cowblocks and retry on buffered write ENOSPC xfs: replace log_badcrc_factor knob with error injection tag xfs: convert drop_writes to use the errortag mechanism xfs: remove unneeded parameter from XFS_TEST_ERROR xfs: expose errortag knobs via sysfs xfs: make errortag a per-mountpoint structure xfs: free uncommitted transactions during log recovery xfs: don't allow bmap on rt files ... commit 459bd0dc3935d5bb04a7bc92c1a6b1a24897e0f7 Merge: 56c7641 c2f30f0 Author: Jens Axboe Date: Mon Jul 10 11:44:34 2017 -0600 Merge branch 'nvme-4.13' of git://git.infradead.org/nvme into for-linus Pull followup NVMe (mostly) changes from Sagi: I added the quiesce/unquiesce patches in here as it's easy for me easily apply changes on top. It has accumulated reviews and includes mostly nvme anyway, please tell me if you don't want to take them with this. This includes: - quiesce/unquiesce fixes in nvme and others from me - nvme-fc add create association padding spec updates from James - some more quirking from MKP - nvmet nit cleanup from Max - Fix nvme-rdma racy RDMA completion signalling from Marta - some centralization patches from me - add tagset nr_hw_queues updates on controller resets in nvme drivers from me - nvme-rdma fix resources recycling when doing error recovery from me - minor cleanups in nvme-fc from me commit b5d27718f38843a74552e9a93d32e2391fd3999f Author: Xiao Ni Date: Wed Jul 5 17:34:04 2017 +0800 Raid5 should update rdev->sectors after reshape The raid5 md device is created by the disks which we don't use the total size. For example, the size of the device is 5G and it just uses 3G of the devices to create one raid5 device. Then change the chunksize and wait reshape to finish. After reshape finishing stop the raid and assemble it again. It fails. mdadm -CR /dev/md0 -l5 -n3 /dev/loop[0-2] --size=3G --chunk=32 --assume-clean mdadm /dev/md0 --grow --chunk=64 wait reshape to finish mdadm -S /dev/md0 mdadm -As The error messages: [197519.814302] md: loop1 does not have a valid v1.2 superblock, not importing! [197519.821686] md: md_import_device returned -22 After reshape the data offset is changed. It selects backwards direction in this condition. In function super_1_load it compares the available space of the underlying device with sb->data_size. The new data offset gets bigger after reshape. So super_1_load returns -EINVAL. rdev->sectors is updated in md_finish_reshape. Then sb->data_size is set in super_1_sync based on rdev->sectors. So add md_finish_reshape in end_reshape. Signed-off-by: Xiao Ni Acked-by: Guoqing Jiang Cc: stable@vger.kernel.org Signed-off-by: Shaohua Li drivers/md/raid5.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7cfdfdc82a467c78af9132cb9c98e84415df34bc Author: Damien Le Moal Date: Mon Jul 10 14:45:20 2017 +0900 libata: Cleanup ata_read_log_page() The warning message "READ LOG DMA EXT failed, trying unqueued" in ata_read_log_page() as well as the macro name ATA_HORKAGE_NO_NCQ_LOG are confusing: the command READ LOG DMA EXT is not an queued NCQ command unless it is encapsulated in a RECEIVE FPDMA QUEUED command. From ACS-4 READ LOG DMA EXT description: "The device processes the READ LOG DMA EXT command in the NCQ feature set environment (see 4.13.6) if the READ LOG DMA EXT command is encapsulated in a RECEIVE FPDMA QUEUED command (see 7.30) with the inputs encapsulated as shown in 7.23.6." To avoid confusion, fix the warning messsage to mention switching to PIO and not "unqueued" and rename the macro ATA_HORKAGE_NO_NCQ_LOG to ATA_HORKAGE_NO_DMA_LOG. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 6 +++--- include/linux/libata.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit accd04738f90c02c537378124de7c3cb5a511027 Author: Arnd Bergmann Date: Mon Jul 10 10:51:02 2017 +0200 ata: fix gemini Kconfig dependencies We cannot build the new ftide010 code without also building the faraday sata bridge driver: drivers/ata/pata_ftide010.o: In function `pata_ftide010_probe': pata_ftide010.c:(.text+0x2b8): undefined reference to `gemini_sata_bridge_get' pata_ftide010.c:(.text+0x32c): undefined reference to `gemini_sata_get_muxmode' pata_ftide010.c:(.text+0x358): undefined reference to `gemini_sata_bridge_enabled' drivers/ata/pata_ftide010.o: In function `pata_ftide010_gemini_port_stop': pata_ftide010.c:(.text+0x520): undefined reference to `gemini_sata_stop_bridge' drivers/ata/pata_ftide010.o: In function `pata_ftide010_gemini_port_start': pata_ftide010.c:(.text+0x5bc): undefined reference to `gemini_sata_start_bridge' This adjusts the Kconfig dependencies accordingly. Fixes: be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010") Signed-off-by: Arnd Bergmann Signed-off-by: Tejun Heo drivers/ata/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4aaf7694f841edc96fe0f72958aabe59204b3611 Author: Guoqing Jiang Date: Tue Jul 4 11:20:30 2017 +0800 md/bitmap: don't read page from device with Bitmap_sync The device owns Bitmap_sync flag needs recovery to become in sync, and read page from this type device could get stale status. Also add comments for Bitmap_sync bit per the suggestion from Shaohua and Neil. Previous disscussion can be found here: https://marc.info/?t=149760428900004&r=1&w=2 Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/bitmap.c | 3 ++- drivers/md/md.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 6618a24ab2313309e9df1cc06cc1f6786a6b6a9c Merge: 1d07b6c ff0fa73 Author: Linus Torvalds Date: Mon Jul 10 10:27:48 2017 -0700 Merge branch 'nowait-aio-btrfs-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "This fixes a user-visible bug introduced by the nowait-aio patches merged in this cycle" * 'nowait-aio-btrfs-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: nowait aio: Correct assignment of pos commit 1d07b6cb96bc17f844a0218ec783f017cc2d29ee Merge: a91ab91 c43aeb1 Author: Linus Torvalds Date: Mon Jul 10 10:13:45 2017 -0700 Merge branch 'fix-uio' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull copy*_iter fix from Al Viro. [ Al used entirely the wrong return value. Oopsie. ] * 'fix-uio' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix brown paperbag bug in inlined copy_..._iter() commit 9f8f5b5f6c515e0c9d9bc14996fa8b9414c5ce1a Author: oder_chiou@realtek.com Date: Mon Jul 10 11:14:57 2017 +0800 ASoC: rt5663: Update the HW default values based on the shipping version The patch update the HW default values based on the shipping version. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit a91ab911df51ac364e594d5950ed508d91091498 Merge: af3c8d9 837c194 Author: Linus Torvalds Date: Mon Jul 10 09:22:48 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - open/close tracking improvements from Dmitry Torokhov - battery support improvements in Wacom driver from Jason Gerecke - Win8 support fixes from Benjamin Tissories and Hans de Geode - misc fixes to Intel-ISH driver from Arnd Bergmann - support for quite a few new devices and small assorted fixes here and there * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (35 commits) HID: intel-ish-hid: Enable Gemini Lake ish driver HID: intel-ish-hid: Enable Cannon Lake ish driver HID: wacom: fix mistake in printk HID: multitouch: optimize the sticky fingers timer HID: multitouch: fix rare Win 8 cases when the touch up event gets missing HID: multitouch: use BIT macro HID: Add driver for Retrode2 joypad adapter HID: multitouch: Add support for Google Rose Touchpad HID: multitouch: Support PTP Stick and Touchpad device HID: core: don't use negative operands when shift HID: apple: Use country code to detect ISO keyboards HID: remove no longer used hid->open field greybus: hid: remove custom locking from gb_hid_open/close HID: usbhid: remove custom locking from usbhid_open/close HID: i2c-hid: remove custom locking from i2c_hid_open/close HID: serialize hid_hw_open and hid_hw_close HID: usbhid: do not rely on hid->open when deciding to do IO HID: hiddev: use hid_hw_power instead of usbhid_get/put_power HID: hiddev: use hid_hw_open/close instead of usbhid_open/close HID: asus: Add support for Zen AiO MD-5110 keyboard ... commit c2f30f08c115a6bb9061afb4ba314f7e41f20686 Author: Max Gurtovoy Date: Mon Jul 10 17:24:02 2017 +0300 nvmet: avoid unneeded assignment of submit_bio return value We actually using the cookie returned from the last submit_bio call. Signed-off-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/io-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f01fc4177352614743ce3fe289687387fcf9e6c6 Author: Lorenzo Pieralisi Date: Mon Jul 10 13:34:08 2017 +0100 ARM/PCI: Fix pcibios_init_resource() struct pci_host_bridge leak Since commit 97ad2bdcbe85 ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") the space for struct pci_sys_data is allocated by pci_alloc_host_bridge() as part of the struct pci_host_bridge. Therefore, failure paths must deallocate the entire pci_host_bridge by using pci_free_host_bridge(). Fixes: 97ad2bdcbe85 ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") Signed-off-by: Lorenzo Pieralisi [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Cc: Jason Cooper Cc: Russell King Cc: Andrew Lunn arch/arm/kernel/bios32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85dc0f8554fa024b02eb50dcca71fa9881a45ea5 Author: Takashi Iwai Date: Mon Jul 10 16:05:58 2017 +0200 ALSA: pcm: Simplify check for dma_mmap_coherent() availability We check the availability of dma_mmap_coherent() in hw_support_mmap() but with an ugly ifdef of lots of arch-checks. Now we have a nice CONFIG_ARCH_NO_COHERENT_DMA_MMAP kconfig, and this can be used together with CONFIG_HAS_DMA check for a cleaner and more comprehensive check. Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit abe594c2cf55b46d4feb61c01fe9063afff2e50c Author: Geert Uytterhoeven Date: Sun Jul 9 21:31:02 2017 +0200 ALSA: pcm: Protect call to dma_mmap_coherent() by check for HAS_DMA If NO_DMA=y: sound/core/pcm_native.o: In function `snd_pcm_lib_default_mmap': pcm_native.c:(.text+0x144c): undefined reference to `bad_dma_ops' pcm_native.c:(.text+0x1474): undefined reference to `dma_common_mmap' Add a check for HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff0fa73247e442518936baa43c3f037b17f10fa7 Author: Goldwyn Rodrigues Date: Tue Jul 4 22:33:07 2017 -0500 btrfs: nowait aio: Correct assignment of pos Assigning pos for usage early messes up in append mode, where the pos is re-assigned in generic_write_checks(). Assign pos later to get the correct position to write from iocb->ki_pos. Since check_can_nocow also uses the value of pos, we shift generic_write_checks() before check_can_nocow(). Checks with IOCB_DIRECT are present in generic_write_checks(), so checking for IOCB_NOWAIT is enough. Also, put locking sequence in the fast path. This fixes a user visible bug, as reported: "apparently breaks several shell related features on my system. In zsh history stopped working, because no new entries are added anymore. I fist noticed the issue when I tried to build mplayer. It uses a shell script to generate a help_mp.h file: [...] Here is a simple testcase: % echo "foo" >> test % echo "foo" >> test % cat test foo % " Fixes: edf064e7c6fe ("btrfs: nowait aio support") CC: Jens Axboe Reported-by: Markus Trippelsdorf Link: https://lkml.kernel.org/r/20170704042306.GA274@x4 Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 8c61af9ebc016180507b246c875217e188be6eca Merge: 70bcd70 7e988b1 Author: Paolo Bonzini Date: Mon Jul 10 14:44:24 2017 +0200 Merge branch 'annotations' of git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux into kvm-master commit 70bcd708dfd1de453905212c9c5c755b1844772b Author: Paolo Bonzini Date: Wed Jul 5 12:38:06 2017 +0200 KVM: vmx: expose more information for KVM_INTERNAL_ERROR_DELIVERY_EV exits This exit ended up being reported, but the currently exposed data does not provide much of a starting point for debugging. In the reported case, the vmexit was an EPT misconfiguration (MMIO access). Let userspace report ethe exit qualification and, if relevant, the GPA. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b49defe83659cefbb1763d541e779da32594ab10 Author: Paolo Bonzini Date: Fri Jun 30 13:25:45 2017 +0200 kvm: avoid unused variable warning for UP builds The uniprocessor version of smp_call_function_many does not evaluate all of its argument, and the compiler emits a warning about "wait" being unused. This breaks the build on architectures for which "-Werror" is enabled by default. Work around it by moving the invocation of smp_call_function_many to its own inline function. Reported-by: Paul Mackerras Cc: stable@vger.kernel.org Fixes: 7a97cec26b94c909f4cbad2dc3186af3e457a522 Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 42a6e0996084972574e0a2b23e7326b78b0f64c5 Author: Arnd Bergmann Date: Mon Jul 10 13:22:50 2017 +0200 nvmem: include linux/err.h from header The new support for nvmem devices from the rtc layer caused a build error in some configurations: include/linux/nvmem-provider.h: In function 'nvmem_register': include/linux/nvmem-provider.h:51:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration] This adds the missing include to ensure we can always include the header. Fixes: 697e5a47aa12 ("rtc: add generic nvmem support") Signed-off-by: Arnd Bergmann Acked-by: Srinivas Kandagatla Signed-off-by: Alexandre Belloni include/linux/nvmem-provider.h | 3 +++ 1 file changed, 3 insertions(+) commit c43aeb198048f64abda8655fdcdebe71cf1877ba Author: Al Viro Date: Mon Jul 10 07:40:49 2017 -0400 fix brown paperbag bug in inlined copy_..._iter() "copied nothing" == "return 0", not "return full size". Fixes: aa28de275a24 "iov_iter/hardening: move object size checks to inlined part" Spotted-by: Arnd Bergmann Signed-off-by: Al Viro include/linux/uio.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3a6a04706fd08eb5677fdfc086e26fcd5eb154f4 Author: Benjamin Herrenschmidt Date: Fri Jul 7 16:12:16 2017 -0500 powerpc/mm/radix: Synchronize updates to the process table When writing to the process table, we need to ensure the store is visible to a subsequent access by the MMU. We assume we never have the PID active while doing the update, so a ptesync/isync pair should hopefully be a big enough hammer for our purpose. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/mm/mmu_context_book3s64.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c6bb0b8d426a8cf865ca9c8a532cc3a2927cfceb Author: Benjamin Herrenschmidt Date: Sat Jul 8 07:45:32 2017 -0500 powerpc/mm/radix: Properly clear process table entry On radix, the process table entry we want to clear when destroying a context is entry 0, not entry 1. This has no *immediate* consequence on Power9, but it can cause other bugs to become worse. Fixes: 7e381c0ff618 ("powerpc/mm/radix: Add mmu context handling callback for radix") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/mmu_context_book3s64.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 1c0eaf0f56d6128af7f0f252855173fcee85d202 Author: Benjamin Herrenschmidt Date: Fri Jun 30 17:37:32 2017 -0500 powerpc/powernv: Tell OPAL about our MMU mode on POWER9 That will allow OPAL to configure the CPU in an optimal way. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal-api.h | 9 +++++++++ arch/powerpc/platforms/powernv/opal.c | 19 +++++++++++++++++-- arch/powerpc/platforms/powernv/setup.c | 11 ++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) commit 1e2a516e89fc412a754327522ab271b42f99c6b4 Author: Balbir Singh Date: Thu Jun 29 21:57:26 2017 +1000 powerpc/kexec: Fix radix to hash kexec due to IAMR/AMOR This patch fixes a crash seen while doing a kexec from radix mode to hash mode. Key 0 is special in hash and used in the RPN by default, we set the key values to 0 today. In radix mode key 0 is used to control supervisor<->user access. In hash key 0 is used by default, so the first instruction after the switch causes a crash on kexec. Commit 3b10d0095a1e ("powerpc/mm/radix: Prevent kernel execution of user space") introduced the setting of IAMR and AMOR values to prevent execution of user mode instructions from supervisor mode. We need to clean up these SPR's on kexec. Fixes: 3b10d0095a1e ("powerpc/mm/radix: Prevent kernel execution of user space") Cc: stable@vger.kernel.org # v4.10+ Reported-by: Benjamin Herrenschmidt Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/misc_64.S | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7e988b103d0d52190244517edc76e649071284bb Author: Christian Borntraeger Date: Fri Jul 7 15:49:00 2017 +0200 KVM: use correct accessor function for __kvm_memslots kvm memslots are protected by srcu and not by rcu. We must use srcu_dereference_check instead of rcu_dereference_check. Signed-off-by: Christian Borntraeger Suggested-by: Paolo Bonzini include/linux/kvm_host.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b27c1e683d2c8cd666a042b02096d18237911a37 Author: weiping zhang Date: Mon Jul 10 16:46:59 2017 +0800 nvme-pci: add module parameter for io queue depth Adjust io queue depth more easily, and make sure io queue depth >= 2. Signed-off-by: weiping zhang Signed-off-by: Sagi Grimberg drivers/nvme/host/pci.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 837c194a4dfedd69ddbd5a586401380190776f48 Merge: 604250d 9609827 13b2e1b 283a21da 08585e4 75a5f3a Author: Jiri Kosina Date: Mon Jul 10 11:11:25 2017 +0200 Merge branches 'for-4.13/multitouch', 'for-4.13/retrode', 'for-4.13/transport-open-close-consolidation', 'for-4.13/upstream' and 'for-4.13/wacom' into for-linus commit 604250ddcf874c4ee4137bf754f57fa903a3c1c1 Merge: 4f94ff4 1694130 6e7edab Author: Jiri Kosina Date: Mon Jul 10 11:11:05 2017 +0200 Merge branches 'for-4.13/ish' and 'for-4.13/ite' into for-linus Conflicts: drivers/hid/hid-core.c commit 4f94ff4e9c52b40250b8f5a54c9f99101de31e9d Merge: 900a88e bd77a0f 38b2d78 Author: Jiri Kosina Date: Mon Jul 10 10:56:59 2017 +0200 Merge branches 'for-4.13/apple' and 'for-4.13/asus' into for-linus Conflicts: drivers/hid/hid-core.c commit 2752660a37aed65b1e00fd4563d9f152eefb8200 Author: Vladimir Barinov Date: Fri Jul 7 05:09:33 2017 +0300 arm64: dts: renesas: ulcb: sound clock-frequency needs descending order Correct order of sound clock frequencies for ULCB boards used with r8a7795 and r8a7796 SoCs. These sounds clock frequencies are used as the ADG clock (output clocks for audio module) initial setting and sound codec's initial system clock which needs the maximum clock frequency. Thus, descending order is required. Fixes: 9f22774c214ada7b ("arm64: dts: ulcb: add 12288000 for sound ADG") Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven [simon: rewrote changelog] Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7581d5ca2bb269cfc2ce2d0cb489aac513167f6b Author: Chris Wilson Date: Thu Jun 22 17:02:11 2017 +0100 drm/i915/fbdev: Check for existence of ifbdev->vma before operations Commit fabef825626d ("drm/i915: Drop struct_mutex around frontbuffer flushes") adds a dependency to ifbdev->vma when flushing the framebufer, but the checks are only against the existence of the ifbdev->fb and not against ifbdev->vma. This leaves a window of opportunity where we may try to operate on the fbdev prior to it being probed (thanks to asynchronous booting). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101534 Fixes: fabef825626d ("drm/i915: Drop struct_mutex around frontbuffer flushes") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170622160211.783-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin Cc: stable@vger.kernel.org (cherry picked from commit 15727ed0d944ce1dec8b9e1082dd3df29a0fdf44) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_fbdev.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2ee0e4ed5ca24c0642a7b72d75b4fe6dfc0a8db8 Author: Dan Carpenter Date: Thu Jul 6 12:26:52 2017 +0300 nvme-pci: compile warnings in nvme_alloc_host_mem() "i" should be signed or it could cause a forever loop on the cleanup path. "size" can be used uninitialized. Fixes: 87ad72a59a38 ("nvme-pci: implement host memory buffer support") Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4cb7ca8073e1f226487168155c9a887079d605e4 Author: James Smart Date: Fri Jul 7 18:08:26 2017 -0700 nvmet_fc: Accept variable pad lengths on Create Association LS Target validation of the Create Association LS revised to accept any LS as long as all non-pad data has been received. This allows a (newer) target to accept the LS from older initiators with varying pad lengths. Signed-off-by: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/target/fc.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit d1438ad8f3eec7207618b8e01f9f3eec7b6f67c4 Author: James Smart Date: Fri Jul 7 18:08:25 2017 -0700 nvme_fc/nvmet_fc: revise Create Association descriptor length Revises the Create Association LS for the amount of pad expected in 1.16. Add defines for the minimum lengths that a target can accept (e.g. variable pad lengths) Signed-off-by: James Smart Signed-off-by: Sagi Grimberg include/linux/nvme-fc.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 68a6afa7fad2644e6b575aba2f2fbda81e730e5b Author: Christos Gkekas Date: Sun Jul 9 11:45:04 2017 +0100 cifs: Clean up unused variables in smb2pdu.c There are multiple unused variables struct TCP_Server_Info *server defined in many methods in smb2pdu.c. They should be removed and related logic simplified. Signed-off-by: Christos Gkekas Signed-off-by: Steve French fs/cifs/smb2pdu.c | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) commit 7ee0031786dc3762f61d0ec9171bb75d56a5ac76 Author: Tang Wenji Date: Sat Jul 8 11:28:25 2017 +0800 target: Fix return sense reason in target_scsi3_emulate_pr_out The sense reason should be TCM_PARAMETER_LIST_LENGTH_ERROR when parmeter length error. Also the cdb[1] & 0x1f has been assigned to local variable sa, so use sa instead of it. Signed-off-by: Tang Wenji Signed-off-by: Nicholas Bellinger drivers/target/target_core_pr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 388fe6996bf658146e70c0df986981eae4be0385 Author: Tang Wenji Date: Sat Jul 8 11:15:44 2017 +0800 target: Fix cmd size for PR-OUT in passthrough_parse_cdb The cmd size should be 4bytes form byte5 to byte8 when CDB opcode is PERSISTENT_RESERVE_OUT in SPC3 and SPC4 (Also fix up the same in spc_parse_cdb - MNC) Signed-off-by: Tang Wenji Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 2 +- drivers/target/target_core_spc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit de8c5221aa003935d6d31becf5850b247dff14a1 Author: Bryant G. Ly Date: Fri Jul 7 14:20:00 2017 -0500 tcmu: Fix dev_config_store Currently when there is a reconfig, the uio_info->name does not get updated to reflect the change in the dev_config name change. On restart tcmu-runner there will be a mismatch between the dev_config string in uio and the tcmu structure that contains the string. When this occurs it'll reload the one in uio and you lose the reconfigured device path. v2: Created a helper function for the updating of uio_info Signed-off-by: Bryant G. Ly Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit af3c8d98508d37541d4bf57f13a984a7f73a328c Merge: d3e3b7ea 00fc2c2 Author: Linus Torvalds Date: Sun Jul 9 18:48:37 2017 -0700 Merge tag 'drm-for-v4.13' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "This is the main pull request for the drm, I think I've got one later driver pull for mediatek SoC driver, I'm undecided on if it needs to go to you yet. Otherwise summary below: Core drm: - Atomic add driver private objects - Deprecate preclose hook in modern drivers - MST bandwidth tracking - Use kvmalloc in more places - Add mode_valid hook for crtc/encoder/bridge - Reduce sync_file construction time - Documentation updates - New DRM synchronisation object support New drivers: - pl111 - pl111 CLCD display controller Panel: - Innolux P079ZCA panel driver - Add NL12880B20-05, NL192108AC18-02D, P320HVN03 panels - panel-samsung-s6e3ha2: Add s6e3hf2 panel support i915: - SKL+ watermark fixes - G4x/G33 reset improvements - DP AUX backlight improvements - Buffer based GuC/host communication - New getparam for (sub)slice infomation - Cannonlake and Coffeelake initial patches - Execbuf optimisations radeon/amdgpu: - Lots of Vega10 bug fixes - Preliminary raven support - KIQ support for compute rings - MEC queue management rework - DCE6 Audio support - SR-IOV improvements - Better radeon/amdgpu selection support nouveau: - HDMI stereoscopic support - Display code rework for >= GM20x GPUs msm: - GEM rework for fine-grained locking - Per-process pagetable work - HDMI fixes for Snapdragon 820. vc4: - Remove 256MB CMA limit from vc4 - Add out-fence support - Add support for cygnus - Get/set tiling ioctls support - Add T-format tiling support for scanout zte: - add VGA support. etnaviv: - Thermal throttle support for newer GPUs - Restore userspace buffer cache performance - dma-buf sync fix stm: - add stm32f429 display support exynos: - Rework vblank handling - Fixup sw-trigger code sun4i: - V3s display engine support - HDMI support for older SoCs - Preliminary work on dual-pipeline SoCs. rcar-du: - VSP work imx-drm: - Remove counter load enable from PRE - Double read/write reduction flag support tegra: - Documentation for the host1x and drm driver. - Lots of staging ioctl fixes due to grate project work. omapdrm: - dma-buf fence support - TILER rotation fixes" * tag 'drm-for-v4.13' of git://people.freedesktop.org/~airlied/linux: (1270 commits) drm: Remove unused drm_file parameter to drm_syncobj_replace_fence() drm/amd/powerplay: fix bug fail to remove sysfs when rmmod amdgpu. amdgpu: Set cik/si_support to 1 by default if radeon isn't built drm/amdgpu/gfx9: fix driver reload with KIQ drm/amdgpu/gfx8: fix driver reload with KIQ drm/amdgpu: Don't call amd_powerplay_destroy() if we don't have powerplay drm/ttm: Fix use-after-free in ttm_bo_clean_mm drm/amd/amdgpu: move get memory type function from early init to sw init drm/amdgpu/cgs: always set reference clock in mode_info drm/amdgpu: fix vblank_time when displays are off drm/amd/powerplay: power value format change for Vega10 drm/amdgpu/gfx9: support the amdgpu.disable_cu option drm/amd/powerplay: change PPSMC_MSG_GetCurrPkgPwr for Vega10 drm/amdgpu: Make amdgpu_cs_parser_init static (v2) drm/amdgpu/cs: fix a typo in a comment drm/amdgpu: Fix the exported always on CU bitmap drm/amdgpu/gfx9: gfx_v9_0_enable_gfx_static_mg_power_gating() can be static drm/amdgpu/psp: upper_32_bits/lower_32_bits for address setup drm/amd/powerplay/cz: print message if smc message fails drm/amdgpu: fix typo in amdgpu_debugfs_test_ib_init ... commit 0f107573da417c7f5c6d3a0160ebacc3adb019c4 Author: Joseph Lo Date: Sun Jul 2 13:38:31 2017 -0700 Input: gpio_keys - handle the missing key press event in resume phase The GPIO key press event might be missed in the resume phase, if the key had been released before the system had been resumed to the stage that it could capture the press event. So we simulate the wakeup key press event in case the key had been released by the time we got interrupt handler to run. Signed-off-by: Joseph Lo Signed-off-by: Enric Balletbo i Serra Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 49aac8204da5f344f52ed9b3eb8736ca7a60c4a8 Author: Oleksandr Andrushchenko Date: Thu Jun 29 00:20:19 2017 -0700 Input: xen-kbdfront - add multi-touch support Extend xen_kbdfront to provide multi-touch support to unprivileged domains. Signed-off-by: Oleksandr Andrushchenko [dtor: factor out various sub-protocols - multitouch, single touch, keys] Signed-off-by: Dmitry Torokhov drivers/input/misc/xen-kbdfront.c | 219 +++++++++++++++++++++++++++++++------- 1 file changed, 179 insertions(+), 40 deletions(-) commit d3e3b7eac886fb1383db2f22b81550fa6d87f62f Author: David Howells Date: Thu Jul 6 15:50:27 2017 +0100 afs: Add metadata xattrs Add xattrs to allow the user to get/set metadata in lieu of having pioctl() available. The following xattrs are now available: - "afs.cell" The name of the cell in which the vnode's volume resides. - "afs.fid" The volume ID, vnode ID and vnode uniquifier of the file as three hex numbers separated by colons. - "afs.volume" The name of the volume in which the vnode resides. For example: # getfattr -d -m ".*" /mnt/scratch getfattr: Removing leading '/' from absolute path names # file: mnt/scratch afs.cell="mycell.myorg.org" afs.fid="10000b:1:1" afs.volume="scratch" Signed-off-by: David Howells Signed-off-by: Linus Torvalds fs/afs/Makefile | 3 +- fs/afs/dir.c | 1 + fs/afs/file.c | 1 + fs/afs/inode.c | 7 +++- fs/afs/internal.h | 5 +++ fs/afs/mntpt.c | 1 + fs/afs/super.c | 1 + fs/afs/xattr.c | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 138 insertions(+), 2 deletions(-) commit fd2498211a551fd42b2d6b9050d649d43536e75c Author: Marc Dionne Date: Thu Jul 6 15:50:18 2017 +0100 afs: Ignore AFS_ACE_READ and AFS_ACE_WRITE for directories The AFS_ACE_READ and AFS_ACE_WRITE permission bits should not be used to make access decisions for the directory itself. They are meant to control access for the objects contained in that directory. Reading a directory is allowed if the AFS_ACE_LOOKUP bit is set. This would cause an incorrect access denied error for a directory with AFS_ACE_LOOKUP but not AFS_ACE_READ. The AFS_ACE_WRITE bit does not allow operations that modify the directory. For a directory with AFS_ACE_WRITE but neither AFS_ACE_INSERT nor AFS_ACE_DELETE, this would result in trying operations that would ultimately be denied by the server. Signed-off-by: Marc Dionne Signed-off-by: David Howells Signed-off-by: Linus Torvalds fs/afs/security.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f991af3daabaecff34684fd51fac80319d1baad1 Author: Cong Wang Date: Sun Jul 9 13:19:55 2017 -0700 mqueue: fix a use-after-free in sys_mq_notify() The retry logic for netlink_attachskb() inside sys_mq_notify() is nasty and vulnerable: 1) The sock refcnt is already released when retry is needed 2) The fd is controllable by user-space because we already release the file refcnt so we when retry but the fd has been just closed by user-space during this small window, we end up calling netlink_detachskb() on the error path which releases the sock again, later when the user-space closes this socket a use-after-free could be triggered. Setting 'sock' to NULL here should be sufficient to fix it. Reported-by: GeneBlue Signed-off-by: Cong Wang Cc: Andrew Morton Cc: Manfred Spraul Cc: stable@kernel.org Signed-off-by: Linus Torvalds ipc/mqueue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f4b82d39e40fc9c3493826abb49c64c37c7025b9 Author: Benjamin Gaignard Date: Mon Jun 19 11:36:22 2017 +0200 rtc: st-lpc: make it robust against y2038/2106 bug Make driver use u64 variables and functions to be sure that it will support dates after year 2038. Signed-off-by: Benjamin Gaignard Acked-by: Patrice Chotard Signed-off-by: Alexandre Belloni drivers/rtc/rtc-st-lpc.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 69c31226fc9f887dcd5c27a91f5cc0f244a6953e Author: Benjamin Gaignard Date: Mon Jun 19 11:36:21 2017 +0200 rtc: rtctest: add check for problematic dates Some dates could be problematic because they reach the limits of RTC hardware capabilities. This patch add various of them but since it will change RTC date it will be activated only when 'd' args is set. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Belloni tools/testing/selftests/timers/rtctest.c | 128 ++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 4 deletions(-) commit 3091141d7803608950adc001518ffb544a4e3308 Author: Hans de Goede Date: Sat Jul 8 15:11:57 2017 +0200 iio: adc: axp288: Fix the GPADC pin reading often wrongly returning 0 I noticed in its DSDT that one of my tablets actually is using the GPADC pin for temperature monitoring. The whole axp288_adc_set_ts() function is a bit weird, in the past it was removed because it seems to make no sense, then this was reverted because of regressions. So I decided to test the special GPADC pin handling on this tablet. Conclusion: not only is axp288_adc_set_ts() necessary, we need to sleep a bit after making the AXP288_ADC_TS_PIN_CTRL changes before sampling the GPADC, otherwise it will often (about 80% of the time) read 0 instead of its actual value. It seems that there is only 1 bias current source and to be able to use it for the GPIO0 pin in GPADC mode it must be temporarily turned off for the TS pin, but the datasheet does not mention this. This commit adds a sleep after disabling the TS pin bias current, fixing the GPADC more often then not wrongly returning 0. Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron drivers/iio/adc/axp288_adc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit c96396f0780e3b217f5194538e6dcd3c22d00122 Author: Benjamin Gaignard Date: Mon Jun 19 11:36:20 2017 +0200 tools: timer: add rtctest_setdate This tool allow to set directly the time and date to a RTC device. Unlike other tools isn't doens't use "struct timeval" or "time_t" so it is safe for 32bits platforms when testing for y2038/2106 bug. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Belloni tools/testing/selftests/timers/Makefile | 2 +- tools/testing/selftests/timers/rtctest_setdate.c | 86 ++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) commit 9ffd93852fc66f2bdf61a574db107f106e9fb2ff Author: Masahiro Yamada Date: Mon Jul 10 03:32:48 2017 +0900 microblaze: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. For microblaze, "generic-y += siginfo.h" is doubled in asm/Kbuild and uapi/asm/Kbuild. So, the one in the former can be simply removed. Signed-off-by: Masahiro Yamada arch/microblaze/include/asm/Kbuild | 25 ------------------------- arch/microblaze/include/uapi/asm/Kbuild | 25 ++++++++++++++++++++++++- 2 files changed, 24 insertions(+), 26 deletions(-) commit d4442e42e5de2314084d0cca0d0eab08daac21af Author: Masahiro Yamada Date: Mon Jul 10 03:32:47 2017 +0900 metag: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/metag/include/asm/Kbuild | 26 +------------------------- arch/metag/include/uapi/asm/Kbuild | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) commit 5608e72dfde31a6c2e051092f7aac026794971b8 Author: Masahiro Yamada Date: Mon Jul 10 03:32:46 2017 +0900 m68k: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. For m68k, "generic-y += termios.h" is doubled in asm/Kbuild and uapi/asm/Kbuild. So, the one in the former can be simply removed. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada Acked-by: Geert Uytterhoeven arch/m68k/include/asm/Kbuild | 13 +------------ arch/m68k/include/uapi/asm/Kbuild | 10 ++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) commit e64f6ead4b8a0d096ca47cf3e3f4ace070476c2b Author: Masahiro Yamada Date: Mon Jul 10 03:32:45 2017 +0900 m32r: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/m32r/include/asm/Kbuild | 4 +--- arch/m32r/include/uapi/asm/Kbuild | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) commit e18e340fd171fbb9bd38125c3d0ba5d3fd3ddfb9 Author: Masahiro Yamada Date: Mon Jul 10 03:32:44 2017 +0900 ia64: remove redundant generic-y += kvm_para.h from asm/Kbuild "generic-y += kvm_para.h" is doubled in asm/Kbuild and uapi/asm/Kbuild. The one in the former should be simply removed because kvm_para.h is exported. Signed-off-by: Masahiro Yamada arch/ia64/include/asm/Kbuild | 2 -- 1 file changed, 2 deletions(-) commit e4c694a3b07de1f193387121c7cae717ff7f4483 Author: Masahiro Yamada Date: Mon Jul 10 03:32:43 2017 +0900 hexagon: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/hexagon/include/asm/Kbuild | 24 +----------------------- arch/hexagon/include/uapi/asm/Kbuild | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) commit c26e2c0c6d2728377d7219095676dc372a421c1c Author: Masahiro Yamada Date: Mon Jul 10 03:32:42 2017 +0900 h8300: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" and "generic-y += trace_clock.h" in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/h8300/include/asm/Kbuild | 30 ++---------------------------- arch/h8300/include/uapi/asm/Kbuild | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 28 deletions(-) commit c6ec85cefb476e4ab914d18951fa4c04d96b3bb6 Author: Masahiro Yamada Date: Mon Jul 10 03:32:41 2017 +0900 cris: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h", "generic-y += emergency-restart.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/cris/include/asm/Kbuild | 21 ++------------------- arch/cris/include/uapi/asm/Kbuild | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) commit 97b81556f656594b343d516158ea305d4e0dcae5 Author: Masahiro Yamada Date: Mon Jul 10 03:32:40 2017 +0900 c6x: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/c6x/include/asm/Kbuild | 28 +--------------------------- arch/c6x/include/uapi/asm/Kbuild | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 27 deletions(-) commit 6b4be36250b7fd14f717a61ae3e72f4ba6bdfe04 Author: Masahiro Yamada Date: Mon Jul 10 03:32:39 2017 +0900 blackfin: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Also, move "generic-y += kprobes.h" up in order to keep the entries sorted. Signed-off-by: Masahiro Yamada arch/blackfin/include/asm/Kbuild | 24 +----------------------- arch/blackfin/include/uapi/asm/Kbuild | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) commit 3e4f9376659d8646302a317848ffb3a12101aa89 Author: Masahiro Yamada Date: Mon Jul 10 03:32:38 2017 +0900 arc: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Signed-off-by: Masahiro Yamada arch/arc/include/asm/Kbuild | 24 ------------------------ arch/arc/include/uapi/asm/Kbuild | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 24 deletions(-) commit ae884913ac1a76366f84561a5e89f483365c0fb7 Author: Masahiro Yamada Date: Mon Jul 10 03:32:37 2017 +0900 ARM: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. Signed-off-by: Masahiro Yamada arch/arm/include/asm/Kbuild | 16 ---------------- arch/arm/include/uapi/asm/Kbuild | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 16 deletions(-) commit 7a7e98f4b341fc56cb352fd2bacfaecbc3f988fc Author: Masahiro Yamada Date: Mon Jul 10 03:32:36 2017 +0900 arm64: move generic-y of exported headers to uapi/asm/Kbuild Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), all (and only) headers under uapi directories are exported, but asm-generic wrappers are still exceptions. To complete de-coupling the uapi from kernel headers, move generic-y of exported headers to uapi/asm/Kbuild. With this change, "make headers_install" will just need to parse uapi/asm/Kbuild to build up exported headers. For arm64, "generic-y += kvm_para.h" is doubled in asm/Kbuild and uapi/asm/Kbuild. So, the one in the former can be simply removed. Signed-off-by: Masahiro Yamada Acked-by: Catalin Marinas arch/arm64/include/asm/Kbuild | 17 ----------------- arch/arm64/include/uapi/asm/Kbuild | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 17 deletions(-) commit a8ff49a1d92da4eb566d026adc43946852975129 Author: Masahiro Yamada Date: Mon Jul 10 03:32:35 2017 +0900 kbuild: pass dst= to Makefile.headersinst from top Makefile We can always pass dst= from the top Makefile. This will simplify the logic in Makefile.headersinst. Signed-off-by: Masahiro Yamada Makefile | 4 ++-- scripts/Makefile.headersinst | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) commit 0f042eea0a4a4fb1b1999784d745a47c0bb2c2f9 Author: Masahiro Yamada Date: Mon Jul 10 03:32:34 2017 +0900 kbuild: fix comment about dst of headers_{install, check}_all Commit 61562f981e92 ("uapi: export all arch specifics directories") changed the dst from asm- to arch- for headers_install_all or headers_check_all. Update the comment. Signed-off-by: Masahiro Yamada Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87ebb94e28ccac00bacba0d6a0dac0aac5b9c63b Author: Masahiro Yamada Date: Mon Jul 10 03:32:33 2017 +0900 kbuild: remove useless $(gen) variable in Makefile.headersinst We have no true case for the $(if $(gen), ...) conditional. Drop it to simplify the gendir calculation. Signed-off-by: Masahiro Yamada scripts/Makefile.headersinst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2b976203417cf033079e0be30cae5f41d88e385e Merge: 8d97a6c 12df216 Author: Linus Torvalds Date: Sun Jul 9 11:21:31 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "The x86 updates contain: - A fix for a longstanding PAT bug, where PAT was reported on CPUs that do not support it, which leads to wrong caching attributes and missing MTRR updates - Prevent overwriting of the e820 firmware table, which causes kexec kernels to lose the fake mptable which is stored there. - Cleanup of the UV/BAU code, removing unused code and making local functions static" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot/e820: Introduce the bootloader provided e820_table_firmware[] table x86/boot/e820: Rename the e820_table_firmware to e820_table_kexec x86/boot/e820: Avoid overwriting e820_table_firmware x86/mm/pat: Don't report PAT on CPUs that don't support it x86/platform/uv/BAU: Minor cleanup, make some local functions static commit 8d97a6c32955103000872663db181b050245eb4d Merge: 4d3c4a4 86d35af Author: Linus Torvalds Date: Sun Jul 9 11:18:59 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timers fixlet from Thomas Gleixner: "Add Frederic Weisbecker as NOHZ/dyntick maintainer" [ And an unmentioned and unrelated typo fix in the same commit? Hmm.. ] * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MAINTAINERS: Add Frederic Weisbecker as nohz/dyntics maintainer commit 4d3c4a42938a23cc826e6e191aaff3567541ad05 Merge: 4fde846 9cd4f1a Author: Linus Torvalds Date: Sun Jul 9 11:16:19 2017 -0700 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull smp/hotplug fix from Thomas Gleixner: "A single fix for a brown paperbag bug: The unparking of the initial percpu threads of an upcoming CPU happens right now on the idle task, but that's wrong as the unpark function might sleep. Move it to the control CPU." * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp/hotplug: Move unparking of percpu threads to the control CPU commit 4fde846ac0f019b7c877da35e1c1517d79e17ffc Merge: c3931a8 242fc35 Author: Linus Torvalds Date: Sun Jul 9 10:52:16 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "This scheduler update provides: - The (hopefully) final fix for the vtime accounting issues which were around for quite some time - Use types known to user space in UAPI headers to unbreak user space builds - Make load balancing respect the current scheduling domain again instead of evaluating unrelated CPUs" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/headers/uapi: Fix linux/sched/types.h userspace compilation errors sched/fair: Fix load_balance() affinity redo path sched/cputime: Accumulate vtime on top of nsec clocksource sched/cputime: Move the vtime task fields to their own struct sched/cputime: Rename vtime fields sched/cputime: Always set tsk->vtime_snap_whence after accounting vtime vtime, sched/cputime: Remove vtime_account_user() Revert "sched/cputime: Refactor the cputime_adjust() code" commit c3931a87db9e840dc20f3b962668d477eaeb2f75 Merge: c8b2ba8 dbf5806 Author: Linus Torvalds Date: Sun Jul 9 10:49:47 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A couple of fixes for perf and kprobes: - Add he missing exclude_kernel attribute for the precise_ip level so !CAP_SYS_ADMIN users get the proper results. - Warn instead of failing completely when perf has no unwind support for a particular architectiure built in. - Ensure that jprobes are at function entry and not at some random place" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kprobes: Ensure that jprobe probepoints are at function entry kprobes: Simplify register_jprobes() kprobes: Rename [arch_]function_offset_within_entry() to [arch_]kprobe_on_func_entry() perf unwind: Do not fail due to missing unwind support perf evsel: Set attr.exclude_kernel when probing max attr.precise_ip commit c8b2ba83fb01336f094226895087b644df0ec397 Merge: 7cb328c 5671360 Author: Linus Torvalds Date: Sun Jul 9 10:47:50 2017 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: - Fix the EINTR logic in rwsem-spinlock to avoid double locking by a writer and a reader - Add a missing include to qspinlocks * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/qspinlock: Explicitly include asm/prefetch.h locking/rwsem-spinlock: Fix EINTR branch in __down_write_common() commit 7cb328c30a71a450278031f932d2134c11165f4c Merge: 19bf2e0 c5c601c Author: Linus Torvalds Date: Sun Jul 9 10:24:46 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: - A few fixes mopping up the fallout of the big irq overhaul - Move the interrupt resource management logic out of the spin locked, irq disabled region to avoid unnecessary restrictions of the resource callbacks - Preparation for reworking the per cpu irq request function. * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqdomain: Allow ACPI device nodes to be used as irqdomain identifiers genirq/debugfs: Remove redundant NULL pointer check genirq: Allow to pass the IRQF_TIMER flag with percpu irq request genirq/timings: Move free timings out of spinlocked region genirq: Move irq resource handling out of spinlocked region genirq: Add mutex to irq desc to serialize request/free_irq() genirq: Move bus locking into __setup_irq() genirq: Force inlining of __irq_startup_managed to prevent build failure genirq/debugfs: Fix build for !CONFIG_IRQ_DOMAIN commit 19bf2e0ef18ec8a7284ecc83459a2664cb885cd5 Merge: bc2c642 4855022 Author: Linus Torvalds Date: Sun Jul 9 09:58:44 2017 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Thomas Gleixner: "A fix to the objtool sibling call detection logic to distinguish normal jumps inside a function from a real sibling call" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix sibling call detection logic commit bc2c6421cbb420677c4bb56adaf434414770ce8a Merge: 58f587c ff95015 Author: Linus Torvalds Date: Sun Jul 9 09:31:22 2017 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "The first major feature for ext4 this merge window is the largedir feature, which allows ext4 directories to support over 2 billion directory entries (assuming ~64 byte file names; in practice, users will run into practical performance limits first.) This feature was originally written by the Lustre team, and credit goes to Artem Blagodarenko from Seagate for getting this feature upstream. The second major major feature allows ext4 to support extended attribute values up to 64k. This feature was also originally from Lustre, and has been enhanced by Tahsin Erdogan from Google with a deduplication feature so that if multiple files have the same xattr value (for example, Windows ACL's stored by Samba), only one copy will be stored on disk for encoding and caching efficiency. We also have the usual set of bug fixes, cleanups, and optimizations" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (47 commits) ext4: fix spelling mistake: "prellocated" -> "preallocated" ext4: fix __ext4_new_inode() journal credits calculation ext4: skip ext4_init_security() and encryption on ea_inodes fs: generic_block_bmap(): initialize all of the fields in the temp bh ext4: change fast symlink test to not rely on i_blocks ext4: require key for truncate(2) of encrypted file ext4: don't bother checking for encryption key in ->mmap() ext4: check return value of kstrtoull correctly in reserved_clusters_store ext4: fix off-by-one fsmap error on 1k block filesystems ext4: return EFSBADCRC if a bad checksum error is found in ext4_find_entry() ext4: return EIO on read error in ext4_find_entry ext4: forbid encrypting root directory ext4: send parallel discards on commit completions ext4: avoid unnecessary stalls in ext4_evict_inode() ext4: add nombcache mount option ext4: strong binding of xattr inode references ext4: eliminate xattr entry e_hash recalculation for removes ext4: reserve space for xattr entries/names quota: add get_inode_usage callback to transfer multi-inode charges ext4: xattr inode deduplication ... commit 58f587cb0b603de3d8869e021d4fa704e065afa8 Merge: e28e9e3 c250b7d Author: Linus Torvalds Date: Sun Jul 9 09:03:31 2017 -0700 Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt Pull fscrypt updates from Ted Ts'o: "Add support for 128-bit AES and some cleanups to fscrypt" * tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt: fscrypt: make ->dummy_context() return bool fscrypt: add support for AES-128-CBC fscrypt: inline fscrypt_free_filename() commit e28e9e3ec016a4850f3169ae3e7ec02f90a259fe Merge: f263fbb 634a816 Author: Linus Torvalds Date: Sun Jul 9 08:58:50 2017 -0700 Merge branch 'waitid-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull waitid fix from Al Viro. * 'waitid-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix waitid(2) breakage commit b36c20244af3cc09b7d38fcd12d8d97c95a96a8e Merge: f263fbb d968f0f Author: David S. Miller Date: Sun Jul 9 16:05:41 2017 +0100 Merge tag 'mlx5-fixes-2017-07-09' of https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-fixes-2017-07-09 This series includes fixes to mlx5 driver: - Compilation warnings and issues introduced on v4.12 - Initialize CEE's getpermhwaddr address buffer to 0xff ==================== Signed-off-by: David S. Miller commit 8cb0bc9e3f863f3e77522d02443a75c0e45a6ed0 Author: Masami Hiramatsu Date: Sat Jul 8 00:27:33 2017 +0530 selftests/ftrace: Add a testcase for kprobe event naming Add a testcase for kprobe event naming. This testcase checks whether the kprobe events can automatically ganerate its event name on normal function and dot-suffixed function. Also it checks whether the kprobe events can correctly define new event with given event name and group name. Link: http://lkml.kernel.org/r/61ae96fd1fcd14ee652c8b6525c218b8661bb0d2.1499453040.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Masami Hiramatsu [Updated tests to use vfs_read and symbols with '.isra.', added check for kprobe_events and a command to clear it on exit, various additional checks and tests] Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) .../ftrace/test.d/kprobe/kprobe_eventname.tc | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit ff431b1390cbf8764f8550b8e427eb28d4a6328e Author: Naveen N. Rao Date: Sat Jul 8 00:27:32 2017 +0530 selftests/ftrace: Add a test to probe module functions Add a kprobes test to ensure that we are able to add a probe on a module function using 'p :' format, with/without having to specify a probe name. Link: http://lkml.kernel.org/r/2d8087e25a7ad9206f3e2b7b4bb0c3c86eaa38af.1499453040.git.naveen.n.rao@linux.vnet.ibm.com Suggested-by: Masami Hiramatsu Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) .../ftrace/test.d/kprobe/kprobe_module.tc | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit f7181e5aaab58d81c5453887e39a1e1041f6bb1a Author: Naveen N. Rao Date: Sat Jul 8 00:27:31 2017 +0530 selftests/ftrace: Update multiple kprobes test for powerpc KPROBES_ON_FTRACE is only available on powerpc64le. Update comment to clarify this. Also, we should use an offset of 8 to ensure that the probe does not fall on ftrace location. The current offset of 4 will fall before the function local entry point and won't fire, while an offset of 12 or 16 will fall on ftrace location. Offset 8 is currently guaranteed to not be the ftrace location. Link: http://lkml.kernel.org/r/3d32e8fa076070e83527476fdfa3a747bb9a1a3a.1499453040.git.naveen.n.rao@linux.vnet.ibm.com Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fca18a47cf3eb8425ec19c2dfc374f3d04f5219f Author: Naveen N. Rao Date: Sat Jul 8 00:27:30 2017 +0530 trace/kprobes: Sanitize derived event names When we derive event names, convert some expected symbols (such as ':' used to specify module:name and '.' present in some symbols) into underscores so that the event name is not rejected. Before this patch: # echo 'p kobject_example:foo_store' > kprobe_events trace_kprobe: Failed to allocate trace_probe.(-22) -sh: write error: Invalid argument After this patch: # echo 'p kobject_example:foo_store' > kprobe_events # cat kprobe_events p:kprobes/p_kobject_example_foo_store_0 kobject_example:foo_store Link: http://lkml.kernel.org/r/66c189e09e71361aba91dd4a5bd146a1b62a7a51.1499453040.git.naveen.n.rao@linux.vnet.ibm.com Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 799ce1dbb9bba56ff21733838a05070787fdcde5 Author: Tommy Nguyen Date: Sun Jul 9 10:25:43 2017 +0100 befs: add kernel-doc formatting for befs_bt_read_super() fs/befs/TODO mentions some comments needing conversion to Kernel-Doc formatting. This patch changes the comment describing befs_bt_read_super(). Signed-off-by: Tommy Nguyen Signed-off-by: Luis de Bethencourt fs/befs/btree.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 0abd675e97e60d40e61d59532f8118b0e439034e Author: Chao Yu Date: Sun Jul 9 00:13:07 2017 +0800 f2fs: support plain user/group quota This patch adds to support plain user/group quota. Change Note by Jaegeuk Kim. - Use f2fs page cache for quota files in order to consider garbage collection. so, quota files are not tolerable for sudden power-cuts, so user needs to do quotacheck. - setattr() calls dquot_transfer which will transfer inode->i_blocks. We can't reclaim that during f2fs_evict_inode(). So, we need to count node blocks as well in order to match i_blocks with dquot's space. Note that, Chao wrote a patch to count inode->i_blocks without inode block. (f2fs: don't count inode block in in-memory inode.i_blocks) - in f2fs_remount, we need to make RW in prior to dquot_resume. - handle fault_injection case during f2fs_quota_off_umount - TODO: Project quota Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 2 + fs/f2fs/data.c | 10 +- fs/f2fs/f2fs.h | 88 +++++++++--- fs/f2fs/file.c | 34 ++++- fs/f2fs/inode.c | 5 + fs/f2fs/namei.c | 66 ++++++++- fs/f2fs/node.c | 9 +- fs/f2fs/super.c | 280 +++++++++++++++++++++++++++++++++++++ 8 files changed, 454 insertions(+), 40 deletions(-) commit 3941dae15ed90437396389e8bb7d2d5b3e63ba4a Author: Al Viro Date: Thu Apr 20 16:43:12 2017 -0400 drm_dp_aux_dev: switch to read_iter/write_iter Signed-off-by: Al Viro drivers/gpu/drm/drm_dp_aux_dev.c | 109 +++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 63 deletions(-) commit eef914a9eb5eb83e60eb498315a491cd1edc13a1 Author: Steve French Date: Sat Jul 8 17:30:41 2017 -0500 [SMB3] Improve security, move default dialect to SMB3 from old CIFS Due to recent publicity about security vulnerabilities in the much older CIFS dialect, move the default dialect to the widely accepted (and quite secure) SMB3.0 dialect from the old default of the CIFS dialect. We do not want to be encouraging use of less secure dialects, and both Microsoft and CERT now strongly recommend not using the older CIFS dialect (SMB Security Best Practices "recommends disabling SMBv1"). SMB3 is both secure and widely available: in Windows 8 and later, Samba and Macs. Users can still choose to explicitly mount with the less secure dialect (for old servers) by choosing "vers=1.0" on the cifs mount Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/connect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2a38e12053b760a8f5e85030eb89512660077c15 Author: Steve French Date: Sat Jul 8 18:48:15 2017 -0500 [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred Remove the CONFIG_CIFS_SMB2 ifdef and Kconfig option since they must always be on now. For various security reasons, SMB3 and later are STRONGLY preferred over CIFS and older dialects, and SMB3 (and later) will now be the default dialects so we do not want to allow them to be ifdeffed out. In the longer term, we may be able to make older CIFS support disableable in Kconfig with a new set of #ifdef, but we always want SMB3 and later support enabled. Signed-off-by: Steven French Reviewed-by: Pavel Shilovsky fs/cifs/Kconfig | 83 +++++++++++++++++++------------------------------- fs/cifs/Makefile | 7 ++--- fs/cifs/cifs_unicode.c | 2 -- fs/cifs/cifs_unicode.h | 2 -- fs/cifs/cifsfs.c | 13 ++------ fs/cifs/cifsglob.h | 18 ----------- fs/cifs/connect.c | 28 ----------------- fs/cifs/ioctl.c | 2 -- fs/cifs/link.c | 4 --- fs/cifs/misc.c | 11 ++----- 10 files changed, 39 insertions(+), 131 deletions(-) commit f263fbb8d60824993c1b64385056a3cfdbb21d45 Merge: 026d15f 6aed468 Author: Linus Torvalds Date: Sat Jul 8 15:51:57 2017 -0700 Merge tag 'pci-v4.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: - add sysfs max_link_speed/width, current_link_speed/width (Wong Vee Khee) - make host bridge IRQ mapping much more generic (Matthew Minter, Lorenzo Pieralisi) - convert most drivers to pci_scan_root_bus_bridge() (Lorenzo Pieralisi) - mutex sriov_configure() (Jakub Kicinski) - mutex pci_error_handlers callbacks (Christoph Hellwig) - split ->reset_notify() into ->reset_prepare()/reset_done() (Christoph Hellwig) - support multiple PCIe portdrv interrupts for MSI as well as MSI-X (Gabriele Paoloni) - allocate MSI/MSI-X vector for Downstream Port Containment (Gabriele Paoloni) - fix MSI IRQ affinity pre/post/min_vecs issue (Michael Hernandez) - test INTx masking during enumeration, not at run-time (Piotr Gregor) - avoid using device_may_wakeup() for runtime PM (Rafael J. Wysocki) - restore the status of PCI devices across hibernation (Chen Yu) - keep parent resources that start at 0x0 (Ard Biesheuvel) - enable ECRC only if device supports it (Bjorn Helgaas) - restore PRI and PASID state after Function-Level Reset (CQ Tang) - skip DPC event if device is not present (Keith Busch) - check domain when matching SMBIOS info (Sujith Pandel) - mark Intel XXV710 NIC INTx masking as broken (Alex Williamson) - avoid AMD SB7xx EHCI USB wakeup defect (Kai-Heng Feng) - work around long-standing Macbook Pro poweroff issue (Bjorn Helgaas) - add Switchtec "running" status flag (Logan Gunthorpe) - fix dra7xx incorrect RW1C IRQ register usage (Arvind Yadav) - modify xilinx-nwl IRQ chip for legacy interrupts (Bharat Kumar Gogada) - move VMD SRCU cleanup after bus, child device removal (Jon Derrick) - add Faraday clock handling (Linus Walleij) - configure Rockchip MPS and reorganize (Shawn Lin) - limit Qualcomm TLP size to 2K (hardware issue) (Srinivas Kandagatla) - support Tegra MSI 64-bit addressing (Thierry Reding) - use Rockchip normal (not privileged) register bank (Shawn Lin) - add HiSilicon Kirin SoC PCIe controller driver (Xiaowei Song) - add Sigma Designs Tango SMP8759 PCIe controller driver (Marc Gonzalez) - add MediaTek PCIe host controller support (Ryder Lee) - add Qualcomm IPQ4019 support (John Crispin) - add HyperV vPCI protocol v1.2 support (Jork Loeser) - add i.MX6 regulator support (Quentin Schulz) * tag 'pci-v4.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (113 commits) PCI: tango: Add Sigma Designs Tango SMP8759 PCIe host bridge support PCI: Add DT binding for Sigma Designs Tango PCIe controller PCI: rockchip: Use normal register bank for config accessors dt-bindings: PCI: Add documentation for MediaTek PCIe PCI: Remove __pci_dev_reset() and pci_dev_reset() PCI: Split ->reset_notify() method into ->reset_prepare() and ->reset_done() PCI: xilinx: Make of_device_ids const PCI: xilinx-nwl: Modify IRQ chip for legacy interrupts PCI: vmd: Move SRCU cleanup after bus, child device removal PCI: vmd: Correct comment: VMD domains start at 0x10000, not 0x1000 PCI: versatile: Add local struct device pointers PCI: tegra: Do not allocate MSI target memory PCI: tegra: Support MSI 64-bit addressing PCI: rockchip: Use local struct device pointer consistently PCI: rockchip: Check for clk_prepare_enable() errors during resume MAINTAINERS: Remove Wenrui Li as Rockchip PCIe driver maintainer PCI: rockchip: Configure RC's MPS setting PCI: rockchip: Reconfigure configuration space header type PCI: rockchip: Split out rockchip_pcie_cfg_configuration_accesses() PCI: rockchip: Move configuration accesses into rockchip_pcie_cfg_atu() ... commit 511c54a2f69195b28afb9dd119f03787b1625bb4 Author: Pavel Shilovsky Date: Sat Jul 8 14:32:00 2017 -0700 CIFS: Reconnect expired SMB sessions According to the MS-SMB2 spec (3.2.5.1.6) once the client receives STATUS_NETWORK_SESSION_EXPIRED error code from a server it should reconnect the current SMB session. Currently the client doesn't do that. This can result in subsequent client requests failing by the server. The patch adds an additional logic to the demultiplex thread to identify expired sessions and reconnect them. Cc: Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/cifsglob.h | 2 ++ fs/cifs/cifssmb.c | 7 +++++++ fs/cifs/connect.c | 7 +++++++ fs/cifs/smb2ops.c | 23 +++++++++++++++++++++++ 4 files changed, 39 insertions(+) commit 4395d484b98154b28f895b722681710bdd40376c Author: Pavel Shilovsky Date: Sat Jul 8 14:17:37 2017 -0700 CIFS: Display SMB2 error codes in the hex format Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2maperror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 366ed846df607a79b4d9b52b097c01f9d53b9d2a Author: Shirish Pargaonkar Date: Wed Jun 28 22:37:32 2017 -0500 cifs: Use smb 2 - 3 and cifsacl mount options setacl function Added set acl function. Very similar to set cifs acl function for smb1. Signed-off-by: Shirish Pargaonkar Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2ops.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 3 deletions(-) commit dac953401c9722cca04a4a884e82e32fe82c0dad Author: Shirish Pargaonkar Date: Wed Jun 28 22:37:00 2017 -0500 cifs: prototype declaration and definition to set acl for smb 2 - 3 and cifsacl mount options Modified current set info function to accommodate multiple info types and additional information. Added cifs acl specific function to invoke set info functionality. Signed-off-by: Shirish Pargaonkar Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2pdu.c | 39 +++++++++++++++++++++++++++------------ fs/cifs/smb2proto.h | 3 +++ 2 files changed, 30 insertions(+), 12 deletions(-) commit 8f1a357d41a22009150cf404b5aa5876efdb59b1 Author: Andy Shevchenko Date: Thu Jul 6 20:26:17 2017 +0300 i2c: Provide a stub for i2c_detect_slave_mode() Drivers would like to call i2c_detect_slave_mode() even if !I2C_SLAVE. Give them what they want to, Otherwise kernel will not compile: drivers/i2c/busses/i2c-designware-platdrv.c: In function ‘dw_i2c_plat_probe’: drivers/i2c/busses/i2c-designware-platdrv.c:331:6: error: implicit declaration of function ‘i2c_detect_slave_mode’ [-Werror=implicit-function-declaration] if (i2c_detect_slave_mode(&pdev->dev)) ^~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors Fixes: 6e38cf3b4421 ("i2c: designware: Let slave adapter support be optional") Reported-by: Abdul Haleem Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang include/linux/i2c.h | 2 ++ 1 file changed, 2 insertions(+) commit 026d15f6b9878794fae1f794cae881ccd65052e5 Merge: 43d0120 7184ef8 Author: Linus Torvalds Date: Sat Jul 8 12:50:18 2017 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD update from Shaohua Li: - fixed deadlock in MD suspend and a potential bug in bio allocation (Neil Brown) - fixed signal issue (Mikulas Patocka) - fixed typo in FailFast test (Guoqing Jiang) - other trival fixes * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: MD: fix sleep in atomic MD: fix a null dereference md: use a separate bio_set for synchronous IO. md: change the initialization value for a spare device spot to MD_DISK_ROLE_SPARE md/raid1: remove unused bio in sync_request_write md/raid10: fix FailFast test for wrong device md: don't use flush_signals in userspace processes md: fix deadlock between mddev_suspend() and md_write_start() commit 43d012099f5479eb057145f273280ff097f0e73d Merge: 2ceedf9 ede2e7c Author: Linus Torvalds Date: Sat Jul 8 12:39:37 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a new driver for STM FingerTip touchscreen - a new driver for D-Link DIR-685 touch keys - updated list of supported devices in xpad driver - other assorted updates and fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (23 commits) MAINTAINERS: update input subsystem patterns Input: introduce KEY_ASSISTANT Input: xpad - sync supported devices with XBCD Input: xpad - sync supported devices with 360Controller Input: xen-kbdfront - use string constants from PV protocol Input: stmfts - mark all PM functions as __maybe_unused Input: add support for the STMicroelectronics FingerTip touchscreen Input: add D-Link DIR-685 touchkeys driver Input: s3c2410_ts - handle return value of clk_prepare_enable Input: axp20x-pek - add wakeup support Input: synaptics-rmi4 - use %phN to form F34 configuration ID Input: synaptics-rmi4 - change a char type to u8 Input: sparse-keymap - remove sparse_keymap_free() Input: tsc2007 - move header file out of I2C realm Input: mms114 - move header file out of I2C realm Input: mcs - move header file out of I2C realm Input: lm8323 - move header file out of I2C realm Input: elantech - force relative mode on a certain module Input: elan_i2c - add support for fetching chip type on newer hardware Input: elan_i2c - check if device is there before really probing ... commit 2ceedf97aef41d071d897a6e6aec8c05fb707ec4 Merge: 09b56d5 3edc850 Author: Linus Torvalds Date: Sat Jul 8 12:36:50 2017 -0700 Merge tag 'dmaengine-4.13-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: - removal of AVR32 support in dw driver as AVR32 is gone - new driver for Broadcom stream buffer accelerator (SBA) RAID driver - add support for Faraday Technology FTDMAC020 in amba-pl08x driver - IOMMU support in pl330 driver - updates to bunch of drivers * tag 'dmaengine-4.13-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (36 commits) dmaengine: qcom_hidma: correct API violation for submit dmaengine: zynqmp_dma: Remove max len check in zynqmp_dma_prep_memcpy dmaengine: tegra-apb: Really fix runtime-pm usage dmaengine: fsl_raid: make of_device_ids const. dmaengine: qcom_hidma: allow ACPI/DT parameters to be overridden dmaengine: fsldma: set BWC, DAHTS and SAHTS values correctly dmaengine: Kconfig: Simplify the help text for MXS_DMA dmaengine: pl330: Delete unused functions dmaengine: Replace WARN_TAINT_ONCE() with pr_warn_once() dmaengine: Kconfig: Extend the dependency for MXS_DMA dmaengine: mxs: Use %zu for printing a size_t variable dmaengine: ste_dma40: Cleanup scatterlist layering violations dmaengine: imx-dma: cleanup scatterlist layering violations dmaengine: use proper name for the R-Car SoC dmaengine: imx-sdma: Fix compilation warning. dmaengine: imx-sdma: Handle return value of clk_prepare_enable dmaengine: pl330: Add IOMMU support to slave tranfers dmaengine: DW DMAC: Handle return value of clk_prepare_enable dmaengine: pl08x: use GENMASK() to create bitmasks dmaengine: pl08x: Add support for Faraday Technology FTDMAC020 ... commit 09b56d5a418b7ced4ca427c7cf8faf11df72364c Merge: fe1b518 98becb7 Author: Linus Torvalds Date: Sat Jul 8 12:17:25 2017 -0700 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - add support for ftrace-with-registers, which is needed for kgraft and other ftrace tools - support for mremap() for the sigpage/vDSO so that checkpoint/restore can work - add timestamps to each line of the register dump output - remove the unused KTHREAD_SIZE from nommu - align the ARM bitops APIs with the generic API (using unsigned long pointers rather than void pointers) - make the configuration of userspace Thumb support an expert option so that we can default it on, and avoid some hard to debug userspace crashes * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8684/1: NOMMU: Remove unused KTHREAD_SIZE definition ARM: 8683/1: ARM32: Support mremap() for sigpage/vDSO ARM: 8679/1: bitops: Align prototypes to generic API ARM: 8678/1: ftrace: Adds support for CONFIG_DYNAMIC_FTRACE_WITH_REGS ARM: make configuration of userspace Thumb support an expert option ARM: 8673/1: Fix __show_regs output timestamps commit fe1b518075d86976db3a93e7e8b640d24d477519 Merge: 8b6b317 0cd52df Author: Linus Torvalds Date: Sat Jul 8 12:14:14 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next Pull sparc updates from David Miller: 1) Queued spinlocks and rwlocks for sparc64, from Babu Moger. 2) Some const'ification from Arvind Yadav. 3) LDC/VIO driver infrastructure changes to facilitate future upcoming drivers, from Jag Raman. 4) Initialize sched_clock() et al. early so that the initial printk timestamps are all done while the implementation is available and functioning. From Pavel Tatashin. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: (38 commits) sparc: kernel: pmc: make of_device_ids const. sparc64: fix typo in property sparc64: add port_id to VIO device metadata sparc64: Enhance search for VIO device in MDESC sparc64: enhance VIO device probing sparc64: check if a client is allowed to register for MDESC notifications sparc64: remove restriction on VIO device name size sparc64: refactor code to obtain cfg_handle property from MDESC sparc64: add MDESC node name property to VIO device metadata sparc64: mdesc: use __GFP_REPEAT action modifier for VM allocation sparc64: expand MDESC interface sparc64: skip handshake for LDC channels in RAW mode sparc64: specify the device class in VIO version info. packet sparc64: ensure VIO operations are defined while being used sparc: kernel: apc: make of_device_ids const sparc/time: make of_device_ids const sparc64: broken %tick frequency on spitfire cpus sparc64: use prom interface to get %stick frequency sparc64: optimize functions that access tick sparc64: add hot-patched and inlined get_tick() ... commit 8b6b3172ce02aef147f74b32ea11796c580f795c Merge: b8d4c1f e8df760 Author: Linus Torvalds Date: Sat Jul 8 12:01:22 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Mostly fixing some light fallout from the changes that went into the merge window. 1) Fix memory leaks on network namespace teardown in netfilter, from Liping Zhang. 2) When comparing ipv6 nexthops, we have to take the lightweight tunnel state into account as well. From David Ahern. 3) Fix socket option object length check in the new TLS code, from Matthias Rosenfelder. 4) Fix memory leak in nfp driver flower support, from Jakub Kicinski. 5) Several netlink attribute validation fixes in cfg80211, from Srinivas Dasari. 6) Fix context array leak in virtio_net, from Jason Wang. 7) SKB use after free in hns driver, from Yusheng Lin. 8) Fix socket leak on accept() in RDS, from Sowmini Varadhan. Also add a WARN_ON() to sock_graft() so other protocol stacks don't trip over this as well" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits) net: ethernet: mediatek: remove useless code in mtk_probe() mpls: fix uninitialized in_label var warning in mpls_getroute doc: SKB_GSO_[IPIP|SIT] have been replaced bonding: avoid NETDEV_CHANGEMTU event when unregistering slave net/sock: add WARN_ON(parent->sk) in sock_graft() rds: tcp: use sock_create_lite() to create the accept socket net: hns: Fix a skb used after free bug net: hns: Fix a wrong op phy C45 code net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3 net: Update networking MAINTAINERS entry. virtio-net: fix leaking of ctx array cfg80211: Validate frequencies nested in NL80211_ATTR_SCAN_FREQUENCIES cfg80211: Define nla_policy for NL80211_ATTR_LOCAL_MESH_POWER_MODE cfg80211: Check if NAN service ID is of expected size cfg80211: Check if PMKID attribute is of expected size arcnet: com20020-pci: Fix an error handling path in 'com20020pci_probe()' nfp: flower: add missing clean up call to avoid memory leaks vrf: fix bug_on triggered by rx when destroying a vrf ptp: dte: Use LL suffix for 64-bit constants sctp: set the value of flowi6_oif to sk_bound_dev_if to make sctp_v6_get_dst to find the correct route entry. ... commit b8d4c1f9f48e344fe1d6e6ffae01d4b31bf0aac0 Merge: 090a81d 49d31c2 Author: Linus Torvalds Date: Sat Jul 8 10:50:54 2017 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc filesystem updates from Al Viro: "Assorted normal VFS / filesystems stuff..." * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: dentry name snapshots Make statfs properly return read-only state after emergency remount fs/dcache: init in_lookup_hashtable minix: Deinline get_block, save 2691 bytes fs: Reorder inode_owner_or_capable() to avoid needless fs: warn in case userspace lied about modprobe return commit 090a81d8766e21d33ab3e4d24e6c8e5eedf086dd Merge: 46ace66 251d595 Author: Linus Torvalds Date: Sat Jul 8 10:41:53 2017 -0700 Merge branch 'for-spi' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull spi uaccess delousing from Al Viro: "Getting rid of pointless __get_user() and friends in drivers/spi. [ the only reason it's on a separate branch is that I hoped it would be picked by spi folks; looks like mail asking them to grab it got lost and I hadn't followed up on that ]" * 'for-spi' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: spidev: quit messing with access_ok() commit 46ace66b3b34c80341c6290cd608aae4d2de9879 Merge: cee37d8 119d031 Author: Linus Torvalds Date: Sat Jul 8 10:15:02 2017 -0700 Merge branch 'work.__copy_in_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull __copy_in_user removal from Al Viro: "There used to be 6 places in the entire tree calling __copy_in_user(), all of them bogus. Four got killed off in work.drm branch, this takes care of the remaining ones and kills the definition of that sucker" * 'work.__copy_in_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: kill __copy_in_user() sanitize do_i2c_smbus_ioctl() commit 634a81609561f05266e1f625b6f2567c2e0b0419 Author: Al Viro Date: Sat Jul 8 11:26:39 2017 -0400 fix waitid(2) breakage We lose the distinction between "found a PID" and "nothing, but that's not an error" a bit too early in waitid(). Easily fixed, fortunately... Reported-by: Markus Trippelsdorf Fixes: 67d7ddded322 ("waitid(2): leave copyout of siginfo to syscall itself") Tested-by: Markus Trippelsdorf Signed-off-by: Al Viro kernel/exit.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 610467270fb368584b74567edd21c8cc5104490f Author: Tejun Heo Date: Sat Jul 8 07:17:02 2017 -0400 cgroup: don't call migration methods if there are no tasks to migrate Subsystem migration methods shouldn't be called for empty migrations. cgroup_migrate_execute() implements this guarantee by bailing early if there are no source css_sets. This used to be correct before a79a908fd2b0 ("cgroup: introduce cgroup namespaces"), but no longer since the commit because css_sets can stay pinned without tasks in them. This caused cgroup_migrate_execute() call into cpuset migration methods with an empty cgroup_taskset. cpuset migration methods correctly assume that cgroup_taskset_first() never returns NULL; however, due to the bug, it can, leading to the following oops. Unable to handle kernel paging request for data at address 0x00000960 Faulting instruction address: 0xc0000000001d6868 Oops: Kernel access of bad area, sig: 11 [#1] ... CPU: 14 PID: 16947 Comm: kworker/14:0 Tainted: G W 4.12.0-rc4-next-20170609 #2 Workqueue: events cpuset_hotplug_workfn task: c00000000ca60580 task.stack: c00000000c728000 NIP: c0000000001d6868 LR: c0000000001d6858 CTR: c0000000001d6810 REGS: c00000000c72b720 TRAP: 0300 Tainted: GW (4.12.0-rc4-next-20170609) MSR: 8000000000009033 CR: 44722422 XER: 20000000 CFAR: c000000000008710 DAR: 0000000000000960 DSISR: 40000000 SOFTE: 1 GPR00: c0000000001d6858 c00000000c72b9a0 c000000001536e00 0000000000000000 GPR04: c00000000c72b9c0 0000000000000000 c00000000c72bad0 c000000766367678 GPR08: c000000766366d10 c00000000c72b958 c000000001736e00 0000000000000000 GPR12: c0000000001d6810 c00000000e749300 c000000000123ef8 c000000775af4180 GPR16: 0000000000000000 0000000000000000 c00000075480e9c0 c00000075480e9e0 GPR20: c00000075480e8c0 0000000000000001 0000000000000000 c00000000c72ba20 GPR24: c00000000c72baa0 c00000000c72bac0 c000000001407248 c00000000c72ba20 GPR28: c00000000141fc80 c00000000c72bac0 c00000000c6bc790 0000000000000000 NIP [c0000000001d6868] cpuset_can_attach+0x58/0x1b0 LR [c0000000001d6858] cpuset_can_attach+0x48/0x1b0 Call Trace: [c00000000c72b9a0] [c0000000001d6858] cpuset_can_attach+0x48/0x1b0 (unreliable) [c00000000c72ba00] [c0000000001cbe80] cgroup_migrate_execute+0xb0/0x450 [c00000000c72ba80] [c0000000001d3754] cgroup_transfer_tasks+0x1c4/0x360 [c00000000c72bba0] [c0000000001d923c] cpuset_hotplug_workfn+0x86c/0xa20 [c00000000c72bca0] [c00000000011aa44] process_one_work+0x1e4/0x580 [c00000000c72bd30] [c00000000011ae78] worker_thread+0x98/0x5c0 [c00000000c72bdc0] [c000000000124058] kthread+0x168/0x1b0 [c00000000c72be30] [c00000000000b2e8] ret_from_kernel_thread+0x5c/0x74 Instruction dump: f821ffa1 7c7d1b78 60000000 60000000 38810020 7fa3eb78 3f42ffed 4bff4c25 60000000 3b5a0448 3d420020 eb610020 7f43d378 e9290000 f92af200 ---[ end trace dcaaf98fb36d9e64 ]--- This patch fixes the bug by adding an explicit nr_tasks counter to cgroup_taskset and skipping calling the migration methods if the counter is zero. While at it, remove the now spurious check on no source css_sets. Signed-off-by: Tejun Heo Reported-and-tested-by: Abdul Haleem Cc: Roman Gushchin Cc: stable@vger.kernel.org # v4.6+ Fixes: a79a908fd2b0 ("cgroup: introduce cgroup namespaces") Link: http://lkml.kernel.org/r/1497266622.15415.39.camel@abdul.in.ibm.com kernel/cgroup/cgroup-internal.h | 3 +++ kernel/cgroup/cgroup.c | 58 ++++++++++++++++++++++------------------- 2 files changed, 34 insertions(+), 27 deletions(-) commit e8df760307830ca26cf380a9a4b36468a0352fa5 Author: Gustavo A. R. Silva Date: Fri Jul 7 15:23:34 2017 -0500 net: ethernet: mediatek: remove useless code in mtk_probe() Remove useless local variables _match_, _soc_ and the code related. Notice that const struct of_device_id of_mtk_match[] = { { .compatible = "mediatek,mt2701-eth" }, {}, }; So match->data is NULL. Suggested-by: Andrew Lunn Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 ----- 1 file changed, 5 deletions(-) commit a906c1aa43fa9f3785240fda03269d4283635df2 Author: Roopa Prabhu Date: Fri Jul 7 11:21:49 2017 -0700 mpls: fix uninitialized in_label var warning in mpls_getroute Fix the below warning generated by static checker: net/mpls/af_mpls.c:2111 mpls_getroute() error: uninitialized symbol 'in_label'." Fixes: 397fc9e5cefe ("mpls: route get support") Reported-by: Dan Carpenter Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/mpls/af_mpls.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 11bafd547712ebff79636d0cc008e9335d8ec75b Author: Nicolas Dichtel Date: Fri Jul 7 14:08:25 2017 +0200 doc: SKB_GSO_[IPIP|SIT] have been replaced Those enum values don't exist anymore. Fixes: 7e13318daa4a ("net: define gso types for IPx over IPv4 and IPv6") CC: Tom Herbert Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller Documentation/networking/segmentation-offloads.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f51048c3e07b68c90b21a77541fc4b208f9244d7 Author: WANG Cong Date: Thu Jul 6 15:01:57 2017 -0700 bonding: avoid NETDEV_CHANGEMTU event when unregistering slave As Hongjun/Nicolas summarized in their original patch: " When a device changes from one netns to another, it's first unregistered, then the netns reference is updated and the dev is registered in the new netns. Thus, when a slave moves to another netns, it is first unregistered. This triggers a NETDEV_UNREGISTER event which is caught by the bonding driver. The driver calls bond_release(), which calls dev_set_mtu() and thus triggers NETDEV_CHANGEMTU (the device is still in the old netns). " This is a very special case, because the device is being unregistered no one should still care about the NETDEV_CHANGEMTU event triggered at this point, we can avoid broadcasting this event on this path, and avoid touching inetdev_event()/addrconf_notify() path. It requires to export __dev_set_mtu() to bonding driver. Reported-by: Hongjun Li Reported-by: Nicolas Dichtel Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: Cong Wang Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 15 +++++++++------ include/linux/netdevice.h | 1 + net/core/dev.c | 3 ++- 3 files changed, 12 insertions(+), 7 deletions(-) commit 5dc314f8ded18e2b0ffce55a5f253c8aa759d51a Merge: 9dc351d 0ffdaf5 Author: David S. Miller Date: Sat Jul 8 11:16:16 2017 +0100 Merge branch 'rds-tcp-sock_graft-leak' Sowmini Varadhan says: ==================== rds-tcp: sock_graft() leak Following up on the discussion at https://www.spinics.net/lists/netdev/msg442859.html - make rds_tcp_accept_one() call sock_create_lite() - add a WARN_ON() to sock_graft() Tested by running an infinite while() loop that does (module-load; rds-stress; module-unload) and monitors TCP slabinfo while the test is running. ==================== Signed-off-by: David S. Miller commit 0ffdaf5b41cf4435ece14d1d3e977ce69012a20d Author: Sowmini Varadhan Date: Thu Jul 6 08:15:07 2017 -0700 net/sock: add WARN_ON(parent->sk) in sock_graft() sock_graft() unilaterally sets up parent->sk based on the assumption that the existing parent->sk is null. If this condition is not true, then the existing parent->sk would be leaked, so add a WARN_ON() to alert callers who may fall in this category. Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller include/net/sock.h | 1 + 1 file changed, 1 insertion(+) commit 0933a578cd55b02dc80f219dc8f2efb17ec61c9a Author: Sowmini Varadhan Date: Thu Jul 6 08:15:06 2017 -0700 rds: tcp: use sock_create_lite() to create the accept socket There are two problems with calling sock_create_kern() from rds_tcp_accept_one() 1. it sets up a new_sock->sk that is wasteful, because this ->sk is going to get replaced by inet_accept() in the subsequent ->accept() 2. The new_sock->sk is a leaked reference in sock_graft() which expects to find a null parent->sk Avoid these problems by calling sock_create_lite(). Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/tcp_listen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dc351da7503b568fb877ad02688b29ad95c32af Merge: 233a158 27463ad Author: David S. Miller Date: Sat Jul 8 11:05:21 2017 +0100 Merge branch 'hns-fixes' Lin Yun Sheng says: ==================== Bugfixs for hns ethernet driver This patchset fix skb used after free and C45 op code issues in hns driver. Patch V2: 1. Remove ndev->feature checking in TX description patch. 2. Add Fixes: Tag in patch description. ==================== Signed-off-by: David S. Miller commit 27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2 Author: Yunsheng Lin Date: Thu Jul 6 10:22:00 2017 +0800 net: hns: Fix a skb used after free bug skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x560 [17659.120909] kmem_cache_alloc_node+0xac/0x2c0 [17659.125309] __alloc_skb+0x6c/0x260 [17659.128837] tcp_send_ack+0x8c/0x280 [17659.132449] __tcp_ack_snd_check+0x9c/0xf0 [17659.136587] tcp_rcv_established+0x5a4/0xa70 [17659.140899] tcp_v4_do_rcv+0x27c/0x620 [17659.144687] tcp_prequeue_process+0x108/0x170 [17659.149085] tcp_recvmsg+0x940/0x1020 [17659.152787] inet_recvmsg+0x124/0x180 [17659.156488] sock_recvmsg+0x64/0x80 [17659.160012] SyS_recvfrom+0xd8/0x180 [17659.163626] __sys_trace_return+0x0/0x4 [17659.167506] INFO: Freed in kfree_skbmem+0xa0/0xb0 age=23 cpu=1 pid=13 [17659.174000] free_debug_processing+0x1d4/0x2c0 [17659.178486] __slab_free+0x240/0x390 [17659.182100] kmem_cache_free+0x24c/0x270 [17659.186062] kfree_skbmem+0xa0/0xb0 [17659.189587] __kfree_skb+0x28/0x40 [17659.193025] napi_gro_receive+0x168/0x1c0 [17659.197074] hns_nic_rx_up_pro+0x58/0x90 [17659.201038] hns_nic_rx_poll_one+0x518/0xbc0 [17659.205352] hns_nic_common_poll+0x94/0x140 [17659.209576] net_rx_action+0x458/0x5e0 [17659.213363] __do_softirq+0x1b8/0x480 [17659.217062] run_ksoftirqd+0x64/0x80 [17659.220679] smpboot_thread_fn+0x224/0x310 [17659.224821] kthread+0x150/0x170 [17659.228084] ret_from_fork+0x10/0x40 BUG: KASAN: use-after-free in hns_nic_net_xmit+0x8c/0xc0... [17751.080490] __slab_alloc+0x52c/0x560 [17751.084188] kmem_cache_alloc+0x244/0x280 [17751.088238] __build_skb+0x40/0x150 [17751.091764] build_skb+0x28/0x100 [17751.095115] __alloc_rx_skb+0x94/0x150 [17751.098900] __napi_alloc_skb+0x34/0x90 [17751.102776] hns_nic_rx_poll_one+0x180/0xbc0 [17751.107097] hns_nic_common_poll+0x94/0x140 [17751.111333] net_rx_action+0x458/0x5e0 [17751.115123] __do_softirq+0x1b8/0x480 [17751.118823] run_ksoftirqd+0x64/0x80 [17751.122437] smpboot_thread_fn+0x224/0x310 [17751.126575] kthread+0x150/0x170 [17751.129838] ret_from_fork+0x10/0x40 [17751.133454] INFO: Freed in kfree_skbmem+0xa0/0xb0 age=19 cpu=7 pid=43 [17751.139951] free_debug_processing+0x1d4/0x2c0 [17751.144436] __slab_free+0x240/0x390 [17751.148051] kmem_cache_free+0x24c/0x270 [17751.152014] kfree_skbmem+0xa0/0xb0 [17751.155543] __kfree_skb+0x28/0x40 [17751.159022] napi_gro_receive+0x168/0x1c0 [17751.163074] hns_nic_rx_up_pro+0x58/0x90 [17751.167041] hns_nic_rx_poll_one+0x518/0xbc0 [17751.171358] hns_nic_common_poll+0x94/0x140 [17751.175585] net_rx_action+0x458/0x5e0 [17751.179373] __do_softirq+0x1b8/0x480 [17751.183076] run_ksoftirqd+0x64/0x80 [17751.186691] smpboot_thread_fn+0x224/0x310 [17751.190826] kthread+0x150/0x170 [17751.194093] ret_from_fork+0x10/0x40 Fixes: 13ac695e7ea1 ("net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem") Signed-off-by: Yunsheng Lin Signed-off-by: lipeng Reported-by: Jun He Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 22 ++++++++++------------ drivers/net/ethernet/hisilicon/hns/hns_enet.h | 6 +++--- 2 files changed, 13 insertions(+), 15 deletions(-) commit ebe8d359c90d6e237527f4d0544b62bdcc0ff286 Author: Yunsheng Lin Date: Thu Jul 6 10:21:59 2017 +0800 net: hns: Fix a wrong op phy C45 code As the user manual described, the second step to write to C45 phy by mdio should be data, but not address. Here we should fix this issue. Fixes: 5b904d39406a ("net: add Hisilicon Network Subsystem MDIO support") Signed-off-by: Yunsheng Lin Reviewed-by: lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 233a15875396fd88203644fd9fba8d179aa40119 Author: vishnuvardhan Date: Wed Jul 5 17:36:16 2017 +0200 net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3 As per the SAMA5D3 device specification it supports Jumbo frames. But the suggested flag and length of bytes it supports was not updated in this driver config_structure. The maximum jumbo frames the device supports : 10240 bytes as per the device spec. While changing the MTU value greater than 1500, it threw error: sudo ifconfig eth1 mtu 9000 SIOCSIFMTU: Invalid argument Add this support to driver so that it works as expected and designed. Signed-off-by: vishnuvardhan [nicolas.ferre@microchip.com: modify slightly commit msg] Signed-off-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 242fc35290bd8cf0effc6e3474e3a417985de2f3 Author: Dmitry V. Levin Date: Wed Jul 5 19:23:28 2017 +0300 sched/headers/uapi: Fix linux/sched/types.h userspace compilation errors Consistently use types provided by to fix the following linux/sched/types.h userspace compilation errors: /usr/include/linux/sched/types.h:57:2: error: unknown type name 'u32' u32 size; ... u64 sched_period; Signed-off-by: Dmitry V. Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org # v4.12 Fixes: e2d1e2aec572 ("sched/headers: Move various ABI definitions to ") Link: http://lkml.kernel.org/r/20170705162328.GA11026@altlinux.org Signed-off-by: Ingo Molnar include/uapi/linux/sched/types.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit dbf580623d5fee785218d1a47a2bcdf36d85c0e9 Author: Naveen N. Rao Date: Fri Jul 7 22:37:26 2017 +0530 kprobes: Ensure that jprobe probepoints are at function entry Similar to commit 90ec5e89e393c ("kretprobes: Ensure probe location is at function entry"), ensure that the jprobe probepoint is at function entry. Signed-off-by: Naveen N. Rao Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a4525af6c5a42df385efa31251246cf7cca73598.1499443367.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Ingo Molnar kernel/kprobes.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0f73ff80b751b39ff539a550e65c5bd131ff0316 Author: Naveen N. Rao Date: Fri Jul 7 22:37:25 2017 +0530 kprobes: Simplify register_jprobes() Re-factor jprobe registration functions as the current version is getting too unwieldy. Move the actual jprobe registration to register_jprobe() and re-organize code accordingly. Suggested-by: Ingo Molnar Signed-off-by: Naveen N. Rao Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/089cae4bfe73767f765291ee0e6fb0c3d240e5f1.1499443367.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Ingo Molnar kernel/kprobes.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 659b957f20c78fd470083c80af5e79eedfb39e5b Author: Naveen N. Rao Date: Fri Jul 7 22:37:24 2017 +0530 kprobes: Rename [arch_]function_offset_within_entry() to [arch_]kprobe_on_func_entry() Rename function_offset_within_entry() to scope it to kprobe namespace by using kprobe_ prefix, and to also simplify it. Suggested-by: Ingo Molnar Suggested-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3aa6c7e2e4fb6e00f3c24fa306496a66edb558ea.1499443367.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Ingo Molnar arch/powerpc/kernel/kprobes.c | 2 +- include/linux/kprobes.h | 4 ++-- kernel/kprobes.c | 8 ++++---- kernel/trace/trace_kprobe.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) commit 5671360f29c68d9079914438f6a0109ef62f82a8 Author: Stafford Horne Date: Sat Jul 8 04:56:58 2017 +0900 locking/qspinlock: Explicitly include asm/prefetch.h In architectures that use qspinlock, like x86, prefetch is loaded indirectly via the asm/qspinlock.h include. On other architectures, like OpenRISC, which may want to use asm-generic/qspinlock.h the built will fail without the asm/prefetch.h include. Fix this by including directly. Signed-off-by: Stafford Horne Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170707195658.23840-1-shorne@gmail.com Signed-off-by: Ingo Molnar kernel/locking/qspinlock.c | 1 + 1 file changed, 1 insertion(+) commit 4855022a52262411ce38c93dec4cb1470705c0a0 Author: Josh Poimboeuf Date: Fri Jul 7 09:19:42 2017 -0500 objtool: Fix sibling call detection logic With some configs, objtool reports the following warning: arch/x86/kernel/ftrace.o: warning: objtool: ftrace_modify_code_direct()+0x2d: sibling call from callable instruction with modified stack frame The instruction it's complaining about isn't actually a sibling call. It's just a normal jump to an address inside the function. Objtool thought it was a sibling call because the instruction's jump_dest wasn't initialized because the function was supposed to be ignored due to its use of sync_core(). Objtool ended up validating the function instead of ignoring it because it didn't properly recognize a sibling call to the function. So fix the sibling call logic. Also add a warning to catch ignored functions being validated so we'll get a more useful error message next time. Reported-by: Mike Galbraith Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/96cc8ecbcdd8cb29ddd783817b4af918a6a171b0.1499437107.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/check.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit cee37d83e6d9ada1c2254c73bac7955f9e048d22 Merge: 6a37e94 62473a2 Author: Linus Torvalds Date: Fri Jul 7 21:48:15 2017 -0700 Merge branch 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull read/write fix from Al Viro: "file_start_write()/file_end_write() got mixed into vfs_iter_write() by accident; that's a deadlock for all existing callers - they already do that, some - quite a bit outside. Easily fixed, fortunately" * 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: move file_{start,end}_write() out of do_iter_write() commit 6a37e94009b1a76d415b2759755f5cc7854c4ff6 Merge: da029c1 09fc68d Author: Linus Torvalds Date: Fri Jul 7 20:39:20 2017 -0700 Merge branch 'uaccess-work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull iov_iter hardening from Al Viro: "This is the iov_iter/uaccess/hardening pile. For one thing, it trims the inline part of copy_to_user/copy_from_user to the minimum that *does* need to be inlined - object size checks, basically. For another, it sanitizes the checks for iov_iter primitives. There are 4 groups of checks: access_ok(), might_fault(), object size and KASAN. - access_ok() had been verified by whoever had set the iov_iter up. However, that has happened in a function far away, so proving that there's no path to actual copying bypassing those checks is hard and proving that iov_iter has not been buggered in the meanwhile is also not pleasant. So we want those redone in actual copyin/copyout. - might_fault() is better off consolidated - we know whether it needs to be checked as soon as we enter iov_iter primitive and observe the iov_iter flavour. No need to wait until the copyin/copyout. The call chains are short enough to make sure we won't miss anything - in fact, it's more robust that way, since there are cases where we do e.g. forced fault-in before getting to copyin/copyout. It's not quite what we need to check (in particular, combination of iovec-backed and set_fs(KERNEL_DS) is almost certainly a bug, not a cause to skip checks), but that's for later series. For now let's keep might_fault(). - KASAN checks belong in copyin/copyout - at the same level where other iov_iter flavours would've hit them in memcpy(). - object size checks should apply to *all* iov_iter flavours, not just iovec-backed ones. There are two groups of primitives - one gets the kernel object described as pointer + size (copy_to_iter(), etc.) while another gets it as page + offset + size (copy_page_to_iter(), etc.) For the first group the checks are best done where we actually have a chance to find the object size. In other words, those belong in inline wrappers in uio.h, before calling into iov_iter.c. Same kind as we have for inlined part of copy_to_user(). For the second group there is no object to look at - offset in page is just a number, it bears no type information. So we do them in the common helper called by iov_iter.c primitives of that kind. All it currently does is checking that we are not trying to access outside of the compound page; eventually we might want to add some sanity checks on the page involved. So the things we need in copyin/copyout part of iov_iter.c do not quite match anything in uaccess.h (we want no zeroing, we *do* want access_ok() and KASAN and we want no might_fault() or object size checks done on that level). OTOH, these needs are simple enough to provide a couple of helpers (static in iov_iter.c) doing just what we need..." * 'uaccess-work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: iov_iter: saner checks on copyin/copyout iov_iter: sanity checks for copy to/from page primitives iov_iter/hardening: move object size checks to inlined part copy_{to,from}_user(): consolidate object size checks copy_{from,to}_user(): move kasan checks and might_fault() out-of-line commit da029c11e6b12f321f36dac8771e833b65cec962 Author: Kees Cook Date: Fri Jul 7 11:57:29 2017 -0700 exec: Limit arg stack to at most 75% of _STK_LIM To avoid pathological stack usage or the need to special-case setuid execs, just limit all arg stack usage to at most 75% of _STK_LIM (6MB). Signed-off-by: Kees Cook Signed-off-by: Linus Torvalds fs/exec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 088737f44bbf6378745f5b57b035e57ee3dc4750 Merge: 33198c1 333427a Author: Linus Torvalds Date: Fri Jul 7 19:38:17 2017 -0700 Merge tag 'for-linus-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull Writeback error handling updates from Jeff Layton: "This pile represents the bulk of the writeback error handling fixes that I have for this cycle. Some of the earlier patches in this pile may look trivial but they are prerequisites for later patches in the series. The aim of this set is to improve how we track and report writeback errors to userland. Most applications that care about data integrity will periodically call fsync/fdatasync/msync to ensure that their writes have made it to the backing store. For a very long time, we have tracked writeback errors using two flags in the address_space: AS_EIO and AS_ENOSPC. Those flags are set when a writeback error occurs (via mapping_set_error) and are cleared as a side-effect of filemap_check_errors (as you noted yesterday). This model really sucks for userland. Only the first task to call fsync (or msync or fdatasync) will see the error. Any subsequent task calling fsync on a file will get back 0 (unless another writeback error occurs in the interim). If I have several tasks writing to a file and calling fsync to ensure that their writes got stored, then I need to have them coordinate with one another. That's difficult enough, but in a world of containerized setups that coordination may even not be possible. But wait...it gets worse! The calls to filemap_check_errors can be buried pretty far down in the call stack, and there are internal callers of filemap_write_and_wait and the like that also end up clearing those errors. Many of those callers ignore the error return from that function or return it to userland at nonsensical times (e.g. truncate() or stat()). If I get back -EIO on a truncate, there is no reason to think that it was because some previous writeback failed, and a subsequent fsync() will (incorrectly) return 0. This pile aims to do three things: 1) ensure that when a writeback error occurs that that error will be reported to userland on a subsequent fsync/fdatasync/msync call, regardless of what internal callers are doing 2) report writeback errors on all file descriptions that were open at the time that the error occurred. This is a user-visible change, but I think most applications are written to assume this behavior anyway. Those that aren't are unlikely to be hurt by it. 3) document what filesystems should do when there is a writeback error. Today, there is very little consistency between them, and a lot of cargo-cult copying. We need to make it very clear what filesystems should do in this situation. To achieve this, the set adds a new data type (errseq_t) and then builds new writeback error tracking infrastructure around that. Once all of that is in place, we change the filesystems to use the new infrastructure for reporting wb errors to userland. Note that this is just the initial foray into cleaning up this mess. There is a lot of work remaining here: 1) convert the rest of the filesystems in a similar fashion. Once the initial set is in, then I think most other fs' will be fairly simple to convert. Hopefully most of those can in via individual filesystem trees. 2) convert internal waiters on writeback to use errseq_t for detecting errors instead of relying on the AS_* flags. I have some draft patches for this for ext4, but they are not quite ready for prime time yet. This was a discussion topic this year at LSF/MM too. If you're interested in the gory details, LWN has some good articles about this: https://lwn.net/Articles/718734/ https://lwn.net/Articles/724307/" * tag 'for-linus-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: btrfs: minimal conversion to errseq_t writeback error reporting on fsync xfs: minimal conversion to errseq_t writeback error reporting ext4: use errseq_t based error handling for reporting data writeback errors fs: convert __generic_file_fsync to use errseq_t based reporting block: convert to errseq_t based writeback error tracking dax: set errors in mapping when writeback fails Documentation: flesh out the section in vfs.txt on storing and reporting writeback errors mm: set both AS_EIO/AS_ENOSPC and errseq_t in mapping_set_error fs: new infrastructure for writeback error handling and reporting lib: add errseq_t type and infrastructure for handling it mm: don't TestClearPageError in __filemap_fdatawait_range mm: clear AS_EIO/AS_ENOSPC when writeback initiation fails jbd2: don't clear and reset errors after waiting on writeback buffer: set errors in mapping at the time that the error occurs fs: check for writeback errors after syncing out buffers in generic_file_fsync buffer: use mapping_set_error instead of setting the flag mm: fix mapping_set_error call in me_pagecache_dirty commit cd87d867920155911d0d2e6485b769d853547750 Author: Darrick J. Wong Date: Fri Jul 7 18:55:17 2017 -0700 xfs: don't crash on unexpected holes in dir/attr btrees In quite a few places we call xfs_da_read_buf with a mappedbno that we don't control, then assume that the function passes back either an error code or a buffer pointer. Unfortunately, if mappedbno == -2 and bno maps to a hole, we get a return code of zero and a NULL buffer, which means that we crash if we actually try to use that buffer pointer. This happens immediately when we set the buffer type for transaction context. Therefore, check that we have no error code and a non-NULL bp before trying to use bp. This patch is a follow-up to an incomplete fix in 96a3aefb8ffde231 ("xfs: don't crash if reading a directory results in an unexpected hole"). Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_attr_leaf.c | 2 +- fs/xfs/libxfs/xfs_da_btree.c | 2 +- fs/xfs/libxfs/xfs_dir2_block.c | 2 +- fs/xfs/libxfs/xfs_dir2_leaf.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 33198c165b7afd500f7b6b7680ef994296805ef0 Merge: 3ea4fcc 0f41074 Author: Linus Torvalds Date: Fri Jul 7 18:39:15 2017 -0700 Merge tag 'for-linus-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull Writeback error handling fixes from Jeff Layton: "The main rationale for all of these changes is to tighten up writeback error reporting to userland. There are many ways now that writeback errors can be lost, such that fsync/fdatasync/msync return 0 when writeback actually failed. This pile contains a small set of cleanups and writeback error handling fixes that I was able to break off from the main pile (#2). Two of the patches in this pile are trivial. The exceptions are the patch to fix up error handling in write_one_page, and the patch to make JFS pay attention to write_one_page errors" * tag 'for-linus-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: fs: remove call_fsync helper function mm: clean up error handling in write_one_page JFS: do not ignore return code from write_one_page() mm: drop "wait" parameter from write_one_page() commit ef32476f268c321c101d3e09e05c7fd9a77177cb Merge: 8b9ef8f 81667e9 Author: Brian Norris Date: Fri Jul 7 18:03:11 2017 -0700 Merge tag 'nand/for-4.13' into MTD From Boris: """ This pull request contains the following core changes: * addition of on-ecc support to Micron driver * addition of helpers to help drivers choose most appropriate ECC settings * deletion of dead-code (cached programming and ->errstat() hook) * make sure drivers that do not support the SET/GET FEATURES command return ENOTSUPP use a dummy ->set/get_features implementation returning -ENOTSUPP (required for Micron on-die ECC) * change the semantic of ecc->write_page() for drivers setting the NAND_ECC_CUSTOM_PAGE_ACCESS flag * support exiting 'GET STATUS' command in default ->cmdfunc() implementations * change the prototype of ->setup_data_interface() A bunch of driver related changes: * various cleanup, fixes and improvements of the MTK driver * OMAP DT bindings fixes * support for ->setup_data_interface() in the fsmc driver * support for imx7 in the gpmi driver * finalization of the denali driver rework (thanks to Masahiro for the work he's done on this driver) * fix "bitflips in erased pages" handling in the ifc driver * addition of PM ops and dynamic timing configuration to the atmel driver And as usual we also have a few minor cleanup/fixes/improvements patches across the subsystem. """ commit 8b9ef8f955e37966f6614648cbd139bec02f1bc6 Merge: b950424 9447332 Author: Brian Norris Date: Fri Jul 7 18:00:06 2017 -0700 Merge tag 'spi-nor/for-4.13' into MTD From Cyrille: """ This pull request contains the following notable changes: - introduce support to the SPI 1-2-2 and 1-4-4 protocols. - introduce support to the Double Data Rate (DDR) mode. - introduce support to the Octo SPI protocols. - add support to new memory parts for Spansion, Macronix and Winbond. - add fixes for the Aspeed, STM32 and Cadence QSPI controler drivers. - clean up the st_spi_fsm driver. """ commit b9504247a6eb2bd68e3f620ca1f3fbe7309123ea Author: Boris Brezillon Date: Sun Jun 25 20:22:57 2017 +0200 mtd: Fix check in mtd_unpoint() The code checks that ->_point is not NULL, but we should actually check ->_unpoint value which is dereferenced a few lines after the check. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/mtdcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ea4fcc5fe7f990266ddd3139ef5ae66d625bd13 Merge: 1a86fc7 966681c Author: Linus Torvalds Date: Fri Jul 7 17:44:36 2017 -0700 Merge tag 'cifs-bug-fixes-for-4.13' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "First set of CIFS/SMB3 fixes for the merge window. Also improves POSIX character mapping for SMB3" * tag 'cifs-bug-fixes-for-4.13' of git://git.samba.org/sfrench/cifs-2.6: CIFS: fix circular locking dependency cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT cifs: Do not modify mid entry after submitting I/O in cifs_call_async CIFS: add SFM mapping for 0x01-0x1F cifs: hide unused functions cifs: Use smb 2 - 3 and cifsacl mount options getacl functions cifs: prototype declaration and definition for smb 2 - 3 and cifsacl mount options CIFS: add CONFIG_CIFS_DEBUG_KEYS to dump encryption keys cifs: set mapping error when page writeback fails in writepage or launder_pages SMB3: Enable encryption for SMB3.1.1 commit 1a86fc754fc2bae3be5fe00c1b553b91ba20e089 Merge: a7d4026 961ae1d Author: Linus Torvalds Date: Fri Jul 7 17:38:17 2017 -0700 Merge tag 'gfs2-4.13.fixes.addendum' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 fix from Bob Peterson: "Sorry for the additional merge request, but Andreas discovered this problem soon after you processed our last gfs2 merge. This fixes a regression introduced by a patch we did in mid-2015 (commit 88ffbf3e037e: "GFS2: Use resizable hash table for glocks"), so best to get it fixed. Some code was reverted that should not have been. The patch from Andreas Gruenbacher just re-adds code that had been there originally" * tag 'gfs2-4.13.fixes.addendum' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix glock rhashtable rcu bug commit 49d31c2f389acfe83417083e1208422b4091cd9e Author: Al Viro Date: Fri Jul 7 14:51:19 2017 -0400 dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same structure. dentry must be held by the caller of take_dentry_name_snapshot(), but may be freely dropped afterwards - the snapshot will stay until destroyed by release_dentry_name_snapshot(). Intended use: struct name_snapshot s; take_dentry_name_snapshot(&s, dentry); ... access s.name ... release_dentry_name_snapshot(&s); Replaces fsnotify_oldname_...(), gets used in fsnotify to obtain the name to pass down with event. Signed-off-by: Al Viro fs/dcache.c | 27 +++++++++++++++++++++++++++ fs/debugfs/inode.c | 10 +++++----- fs/namei.c | 8 ++++---- fs/notify/fsnotify.c | 8 ++++++-- include/linux/dcache.h | 6 ++++++ include/linux/fsnotify.h | 31 ------------------------------- 6 files changed, 48 insertions(+), 42 deletions(-) commit a7d4026834f8263a8a4eabeb753e3747988ef0d2 Merge: 98ced88 a750cfd Author: Linus Torvalds Date: Fri Jul 7 17:06:28 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security layer fixes from James Morris: "Bugfixes for TPM and SELinux" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: IB/core: Fix static analysis warning in ib_policy_change_task IB/core: Fix uninitialized variable use in check_qp_port_pkey_settings tpm: do not suspend/resume if power stays on tpm: use tpm2_pcr_read() in tpm2_do_selftest() tpm: use tpm_buf functions in tpm2_pcr_read() tpm_tis: make ilb_base_addr static tpm: consolidate the TPM startup code tpm: Enable CLKRUN protocol for Braswell systems tpm/tpm_crb: fix priv->cmd_size initialisation tpm: fix a kernel memory leak in tpm-sysfs.c tpm: Issue a TPM2_Shutdown for TPM2 devices. Add "shutdown" to "struct class". commit 6d03d67a86cfd0afe2aa9f50911bc6929ce4bf15 Author: David S. Miller Date: Sat Jul 8 00:18:29 2017 +0100 net: Update networking MAINTAINERS entry. James and Patrick haven't been active in years. Signed-off-by: David S. Miller MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit 98ced886dd79a7028d203ed8adea8452bbfb47b6 Merge: 16ffc4c3 42317ea Author: Linus Torvalds Date: Fri Jul 7 15:11:12 2017 -0700 Merge tag 'kbuild-thinar-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild thin archives updates from Masahiro Yamada: "Thin archives migration by Nicholas Piggin. THIN_ARCHIVES has been available for a while as an optional feature only for PowerPC architecture, but we do not need two different intermediate-artifact schemes. Using thin archives instead of conventional incremental linking has various advantages: - save disk space for builds - speed-up building a little - fix some link issues (for example, allyesconfig on ARM) due to more flexibility for the final linking - work better with dead code elimination we are planning As discussed before, this migration has been done unconditionally so that any problems caused by this will show up with "git bisect". With testing with 0-day and linux-next, some architectures actually showed up problems, but they were trivial and all fixed now" * tag 'kbuild-thinar-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: tile: remove unneeded extra-y in Makefile kbuild: thin archives make default for all archs x86/um: thin archives build fix tile: thin archives fix linking ia64: thin archives fix linking sh: thin archives fix linking kbuild: handle libs-y archives separately from built-in.o archives kbuild: thin archives use P option to ar kbuild: thin archives final link close --whole-archives option ia64: remove unneeded extra-y in Makefile.gate tile: fix dependency and .*.cmd inclusion for incremental build sparc64: Use indirect calls in hamming weight stubs commit 16ffc4c39415e62c1d027d1bc59ee28e267d59f2 Merge: 58f051f 9e6e0d5 Author: Linus Torvalds Date: Fri Jul 7 15:09:09 2017 -0700 Merge tag 'kbuild-misc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull misc Kbuild updates from Masahiro Yamada: - Use more portable shebang for Perl scripts - Remove trailing spaces from GCC version in kernel log - Make initramfs generation deterministic * tag 'kbuild-misc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: create deterministic initramfs directory listings scripts/mkcompile_h: Remove trailing spaces from compiler version scripts: Switch to more portable Perl shebang commit 7f56c30bd0a232822aca38d288da475613bdff9b Author: Alex Williamson Date: Fri Jul 7 15:37:38 2017 -0600 vfio: Remove unnecessary uses of vfio_container.group_lock The original intent of vfio_container.group_lock is to protect vfio_container.group_list, however over time it's become a crutch to prevent changes in container composition any time we call into the iommu driver backend. This introduces problems when we start to have more complex interactions, for example when a user's DMA unmap request triggers a notification to an mdev vendor driver, who responds by attempting to unpin mappings within that request, re-entering the iommu backend. We incorrectly assume that the use of read-locks here allow for this nested locking behavior, but a poorly timed write-lock could in fact trigger a deadlock. The current use of group_lock seems to fall into the trap of locking code, not data. Correct that by removing uses of group_lock that are not directly related to group_list. Note that the vfio type1 iommu backend has its own mutex, vfio_iommu.lock, which it uses to protect itself for each of these interfaces anyway. The group_lock appears to be a redundancy for these interfaces and type1 even goes so far as to release its mutex to allow for exactly the re-entrant code path above. Reported-by: Chuanxiao Dong Signed-off-by: Alex Williamson Acked-by: Alexey Kardashevskiy Cc: stable@vger.kernel.org # v4.10+ drivers/vfio/vfio.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) commit 58f051fc9828709e6c55803510761413d92c4e57 Merge: ef3ad08 c4e6fff Author: Linus Torvalds Date: Fri Jul 7 14:09:24 2017 -0700 Merge tag 'kbuild-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Clean up Makefiles and scripts - Improve clang support - Remove unneeded genhdr-y syntax - Remove unneeded cc-option-align macro - Introduce __cc-option macro and use it to fix x86 boot code compiler flags * tag 'kbuild-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: improve comments on KBUILD_SRC x86/build: Specify stack alignment for clang x86/build: Use __cc-option for boot code compiler options kbuild: Add __cc-option macro kbuild: remove cc-option-align kbuild: replace genhdr-y with generated-y kbuild: clang: Disable 'address-of-packed-member' warning kbuild: remove duplicated arch/*/include/generated/uapi include path kbuild: speed up checksyscalls.sh kbuild: simplify silent build (-s) detection commit ef3ad0898a60d30da7f170032992914998c366e5 Merge: 3794907 e67f85f Author: Linus Torvalds Date: Fri Jul 7 14:04:47 2017 -0700 Merge tag 'linux-kselftest-4.13-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest updates from Shuah Khan: "This update consists of: - TAP13 framework and changes to some tests to convert to TAP13. Converting kselftest output to standard format will help identify run to run differences and pin point failures easily. TAP13 format has been in use for several years and the output is human friendly. Please find the specification: https://testanything.org/tap-version-13-specification.html Credit goes to Tim Bird for recommending TAP13 as a suitable format, and to Grag KH for kick starting the work with help from Paul Elder and Alice Ferrazzi The first phase of the TAp13 conversion is included in this update. Future updates will include updates to rest of the tests. - Masami Hiramatsu fixed ftrace to run on 4.9 stable kernels. - Kselftest documnetation has been converted to ReST format. Document now has a new home under Documentation/dev-tools. - kselftest_harness.h is now available for general use as a result of Mickaël Salaün's work. - Several fixes to skip and/or fail tests gracefully on older releases" * tag 'linux-kselftest-4.13-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (48 commits) selftests: membarrier: use ksft_* var arg msg api selftests: breakpoints: breakpoint_test_arm64: convert test to use TAP13 selftests: breakpoints: step_after_suspend_test use ksft_* var arg msg api selftests: breakpoint_test: use ksft_* var arg msg api kselftest: add ksft_print_msg() function to output general information kselftest: make ksft_* output functions variadic selftests/capabilities: Fix the test_execve test selftests: intel_pstate: add .gitignore selftests: fix memory-hotplug test selftests: add missing test name in memory-hotplug test selftests: check percentage range for memory-hotplug test selftests: check hot-pluggagble memory for memory-hotplug test selftests: typo correction for memory-hotplug test selftests: ftrace: Use md5sum to take less time of checking logs tools/testing/selftests/sysctl: Add pre-check to the value of writes_strict kselftest.rst: do some adjustments after ReST conversion selftest/net/Makefile: Specify output with $(OUTPUT) selftest/intel_pstate/aperf: Use LDLIBS instead of LDFLAGS selftest/memfd/Makefile: Fix build error selftests: lib: Skip tests on missing test modules ... commit 37949075ab628e8ef36a877108c2d95b13221cc5 Merge: d691b7e 2e08a0e Author: Linus Torvalds Date: Fri Jul 7 13:58:49 2017 -0700 Merge tag 'openrisc-for-linus' of git://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: "Openrisc fixes for this 4.13 merge window, there is not really much here: - include cleanups, one with should reduce build time slightly - switch to new toolchain to new (>2 year old) toolchain prefix" * tag 'openrisc-for-linus' of git://github.com/openrisc/linux: openrisc: defconfig: Cleanup from old Kconfig options openrisc: explicitly include linux/bug.h in asm/fixmap.h openrisc: Switch to use export.h instead of module.h openrisc: Change toolchain from or32- to or1k- commit d691b7e7d1b5186eae62fd32adee65d3316bfdf6 Merge: b59eea5 1e0fc9d Author: Linus Torvalds Date: Fri Jul 7 13:55:45 2017 -0700 Merge tag 'powerpc-4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Highlights include: - Support for STRICT_KERNEL_RWX on 64-bit server CPUs. - Platform support for FSP2 (476fpe) board - Enable ZONE_DEVICE on 64-bit server CPUs. - Generic & powerpc spin loop primitives to optimise busy waiting - Convert VDSO update function to use new update_vsyscall() interface - Optimisations to hypercall/syscall/context-switch paths - Improvements to the CPU idle code on Power8 and Power9. As well as many other fixes and improvements. Thanks to: Akshay Adiga, Andrew Donnellan, Andrew Jeffery, Anshuman Khandual, Anton Blanchard, Balbir Singh, Benjamin Herrenschmidt, Christophe Leroy, Christophe Lombard, Colin Ian King, Dan Carpenter, Gautham R. Shenoy, Hari Bathini, Ian Munsie, Ivan Mikhaylov, Javier Martinez Canillas, Madhavan Srinivasan, Masahiro Yamada, Matt Brown, Michael Neuling, Michal Suchanek, Murilo Opsfelder Araujo, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran, Paul Mackerras, Pavel Machek, Russell Currey, Santosh Sivaraj, Stephen Rothwell, Thiago Jung Bauermann, Yang Li" * tag 'powerpc-4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (158 commits) powerpc/Kconfig: Enable STRICT_KERNEL_RWX for some configs powerpc/mm/radix: Implement STRICT_RWX/mark_rodata_ro() for Radix powerpc/mm/hash: Implement mark_rodata_ro() for hash powerpc/vmlinux.lds: Align __init_begin to 16M powerpc/lib/code-patching: Use alternate map for patch_instruction() powerpc/xmon: Add patch_instruction() support for xmon powerpc/kprobes/optprobes: Use patch_instruction() powerpc/kprobes: Move kprobes over to patch_instruction() powerpc/mm/radix: Fix execute permissions for interrupt_vectors powerpc/pseries: Fix passing of pp0 in updatepp() and updateboltedpp() powerpc/64s: Blacklist rtas entry/exit from kprobes powerpc/64s: Blacklist functions invoked on a trap powerpc/64s: Un-blacklist system_call() from kprobes powerpc/64s: Move system_call() symbol to just after setting MSR_EE powerpc/64s: Blacklist system_call() and system_call_common() from kprobes powerpc/64s: Convert .L__replay_interrupt_return to a local label powerpc64/elfv1: Only dereference function descriptor for non-text symbols cxl: Export library to support IBM XSL powerpc/dts: Use #include "..." to include local DT powerpc/perf/hv-24x7: Aggregate result elements on POWER9 SMT8 ... commit b59eea554f57befa2aa3172fcb63e521bdd850dd Author: Linus Torvalds Date: Fri Jul 7 13:48:18 2017 -0700 vfs: fix flock compat thinko Michael Ellerman reported that commit 8c6657cb50cb ("Switch flock copyin/copyout primitives to copy_{from,to}_user()") broke his networking on a bunch of PPC machines (64-bit kernel, 32-bit userspace). The reason is a brown-paper bug by that commit, which had the arguments to "copy_flock_fields()" in the wrong order, breaking the compat handling for file locking. Apparently very few people run 32-bit user space on x86 any more, so the PPC people got the honor of noticing this "feature". Michael also sent a minimal diff that just changed the order of the arguments in that macro. This is not that minimal diff. This not only changes the order of the arguments in the macro, it also changes them to be pointers (to be consistent with all the other uses of those pointers), and makes the functions that do all of this also have the proper "const" attribution on the source pointers in order to make issues like that (using the source as a destination) be really obvious. Reported-by: Michael Ellerman Acked-by: Al Viro Signed-off-by: Linus Torvalds fs/fcntl.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 6481352082e8c373a005387c4fc7258b197f0bc9 Merge: df7cb18 dec0819 Author: Linus Torvalds Date: Fri Jul 7 13:42:04 2017 -0700 Merge tag 'usb-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some remaining USB fixes for 4.13-rc1. They were originally scheduled for 4.12-final, but I didn't send them to you in time. Because of that, they were in a separate branch from the larger USB set of patches, so here they are in a separate pull request. Nothing major here a all, just three small patches: - some usb-serial new device ids - xhci bugfix for some crazy AMD hardware All of these have been in linux-next for a long time with no reported issues" * tag 'usb-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: xhci: Limit USB2 port wake support for AMD Promontory hosts USB: serial: qcserial: new Sierra Wireless EM7305 device ID USB: serial: option: add two Longcheer device ids commit df7cb187edc726fe78f2c9818fb8eb534a61541c Merge: 6972b00 056d6ff Author: Linus Torvalds Date: Fri Jul 7 13:38:26 2017 -0700 Merge tag 'backlight-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Core Framework: - Report correct error status to user Fix-ups: - Move Backlight headers out of I2C (adp8860, adp8870)" * tag 'backlight-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: video: adp8870: move header file out of I2C realm backlight: adp8860: Move header file out of I2C realm backlight: Report error on failure commit 6972b007ca771e33dec992ccd104c95a97a186e5 Merge: c7d28ec 1e34960 Author: Linus Torvalds Date: Fri Jul 7 13:30:05 2017 -0700 Merge (most of) tag 'mfd-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Intel Cherry Trail Whiskey Cove PMIC - TI LP87565 PMIC New Device Support: - Add support for Cannonlake to intel-lpss-pci - Add support for Simatic IOT2000 to intel_quark_i2c_gpio New Functionality: - Add Regulator support (axp20x) Fix-ups: - Rework IRQ handling (intel_soc_pmic_bxtwc, rtsx_pcr, cros_ec) - Remove unused/unwelcome code (ipaq-micro, wm831x-core, da9062-core) - Provide deregistration on unbind (rn5t618) - Rework DT code/documentation (arizona) - Constify things (fsl-imx25-tsadc) - MAINTAINERS updates (DA9062/61) - Kconfig configuration adaptions (INTEL_SOC_PMIC, MFD_AXP20X_I2C) - Switch to DMI matching (intel_quark_i2c_gpio) - Provide an appropriate level of error checking (wm831x-{i2c,spi}, twl4030-irq, tc6393xb) - Make use of devm_* (resource handling) calls (intel_soc_pmic_bxtwc, stm32-timers, atmel-flexcom, cros_ec, fsl-imx25-tsadc, exynos-lpass, palmas, qcom-spmi-pmic, smsc-ece1099, motorola-cpcap)" [ Skipped the last commit in that series that added eight thousand lines of pointless repeated register definitions. - Linus ] * tag 'mfd-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (38 commits) mfd: Add LP87565 PMIC support mfd: cros_ec: Free IRQ on exit dt-bindings: vendor-prefixes: Add arctic to vendor prefix mfd: da9061: Fix to remove BBAT_CONT register from chip model mfd: da9061: Fix to remove BBAT_CONT register from chip model mfd: axp20x-i2c: Document that this must be builtin on x86 mfd: Add Cherry Trail Whiskey Cove PMIC driver mfd: tc6393xb: Handle return value of clk_prepare_enable mfd: intel_quark_i2c_gpio: Add support for SIMATIC IOT2000 platform mfd: intel_quark_i2c_gpio: Use dmi_system_id table for retrieving frequency mfd: motorola-cpcap: Use devm_of_platform_populate() mfd: smsc-ece: Use devm_of_platform_populate() mfd: qcom-spmi-pmic: Use devm_of_platform_populate() mfd: palmas: Use devm_of_platform_populate() mfd: exynos: Use devm_of_platform_populate() mfd: fsl-imx25: Use devm_of_platform_populate() mfd: cros_ec: Use devm_of_platform_populate() mfd: atmel: Use devm_of_platform_populate() mfd: stm32-timers: Use devm_of_platform_populate() mfd: intel_soc_pmic: Select designware i2c-bus driver ... commit c7d28eca1d58d335ff8de6f33559b221bdd029f9 Merge: dddd564 413058d Author: Linus Torvalds Date: Fri Jul 7 12:40:27 2017 -0700 Merge tag 'gpio-v4.13-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 v4.13 series. Some administrativa: I have a slew of 8250 serial patches and the new IOT2040 serial+GPIO driver coming in through this tree, along with a whole bunch of Exar 8250 fixes. These are ACKed by Greg and also hit drivers/platform/* where they are ACKed by Andy Shevchenko. Speaking about drivers/platform/* there is also a bunch of ACPI stuff coming through that route, again ACKed by Andy. The MCP23S08 changes are coming in here as well. You already have the commits in your tree, so this is just a result of sharing an immutable branch between pin control and GPIO. Core: - Export add/remove for lookup tables so that modules can export GPIO descriptor tables. - Handle GPIO sleep states: it is now possible to flag that a GPIO line may loose its state during suspend/resume of the system to save power. This is used in the Wolfson Micro Arizona driver. - ACPI-based GPIO was tightened up a lot around the edges. - Use bitmap_fill() to speed up a loop. New drivers: - Exar XRA1403 SPI-based GPIO. - MVEBU driver now supports Armada 7K and 8K. - LP87565 PMIC GPIO. - Renesas R-CAR R8A7743 (RZ/G1M). - The new IOT2040 8250 serial/GPIO also comes in through this changeset. Substantial driver changes: - Seriously fix the Exar 8250 GPIO portions to work. - The MCP23S08 was moved out to a pin control driver. - Convert MEVEBU to use regmap for register access. - Drop Vulcan support from the Broadcom driver. - Serious cleanup and improvement of the mockup driver, giving us a better test coverage. Misc: - Lots of janitorial clean up. - A bunch of documentation fixes" * tag 'gpio-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (70 commits) serial: exar: Add support for IOT2040 device gpio-exar/8250-exar: Make set of exported GPIOs configurable platform: Accept const properties serial: exar: Factor out platform hooks gpio-exar/8250-exar: Rearrange gpiochip parenthood gpio: exar: Fix iomap request gpio-exar/8250-exar: Do not even instantiate a GPIO device for Commtech cards serial: uapi: Add support for bus termination gpio: rcar: Add R8A7743 (RZ/G1M) support gpio: gpio-wcove: Fix GPIO control register offset calculation gpio: lp87565: Add support for GPIO gpio: dwapb: fix missing first irq for edgeboth irq type MAINTAINERS: Take maintainership for GPIO ACPI support gpio: exar: Fix reading of directions and values gpio: exar: Allocate resources on behalf of the platform device gpio-exar/8250-exar: Fix passing in of parent PCI device gpio: mockup: use devm_kcalloc() where applicable gpio: mockup: add myself as author gpio: mockup: improve the error message gpio: mockup: don't return magic numbers from probe() ... commit 2e08a0ef7627c1c1619442494d753de0c5b22091 Author: Krzysztof Kozlowski Date: Thu Jun 8 18:10:31 2017 +0200 openrisc: defconfig: Cleanup from old Kconfig options Remove old, dead Kconfig option INET_LRO. It is gone since commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Stafford Horne arch/openrisc/configs/or1ksim_defconfig | 1 - 1 file changed, 1 deletion(-) commit e687448ca892d73b3932bcce3183da2cd95593fe Author: Tobias Klauser Date: Mon May 15 12:14:51 2017 +0200 openrisc: explicitly include linux/bug.h in asm/fixmap.h openrisc's asm/fixmap.h uses the BUG() and BUG_ON() macros but relies on implict inclusion of linux/bug.h which means that changes in other headers could break the build. Thus, add an explicit include. Signed-off-by: Tobias Klauser Signed-off-by: Stafford Horne arch/openrisc/include/asm/fixmap.h | 1 + 1 file changed, 1 insertion(+) commit dddd564dbb5934c9a0c401491cafb98ab1c82fc6 Merge: dd6ec12 3cf50f6 Author: Linus Torvalds Date: Fri Jul 7 12:26:13 2017 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This time we've got one core change to introduce a bulk clk_get API, some new clk drivers and updates for old ones. The diff is pretty spread out across a handful of different SoC clk drivers for Broadcom, TI, Qualcomm, Renesas, Rockchip, Samsung, and Allwinner, mostly due to the introduction of new drivers. Core: - New clk bulk get APIs - Clk divider APIs gained the ability to consider a different parent than the current one New Drivers: - Renesas r8a779{0,1,2,4} CPG/MSSR - TI Keystone SCI firmware controlled clks and OMAP4 clkctrl - Qualcomm IPQ8074 SoCs - Cortina Systems Gemini (SL3516/CS3516) - Rockchip rk3128 SoCs - Allwinner A83T clk control units - Broadcom Stingray SoCs - CPU clks for Mediatek MT8173/MT2701/MT7623 SoCs Removed Drivers: - Old non-DT version of the Realview clk driver Updates: - Renesas Kconfig/Makefile cleanups - Amlogic CEC EE clk support - Improved Armada 7K/8K cp110 clk support - Rockchip clk id exposing, critical clk markings - Samsung converted to clk_hw registration APIs - Fixes for Samsung exynos5420 audio clks - USB2 clks for Hisilicon hi3798cv200 SoC and video/camera clks for hi3660" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (147 commits) clk: gemini: Read status before using the value clk: scpi: error when clock fails to register clk: at91: Add sama5d2 suspend/resume gpio: dt-bindings: Add documentation for gpio controllers on Armada 7K/8K clk: keystone: TI_SCI_PROTOCOL is needed for clk driver clk: samsung: audss: Fix silent hang on Exynos4412 due to disabled EPLL clk: uniphier: provide NAND controller clock rate clk: hisilicon: add usb2 clocks for hi3798cv200 SoC clk: Add Gemini SoC clock controller clk: iproc: Remove __init marking on iproc_pll_clk_setup() clk: bcm: Add clocks for Stingray SOC dt-bindings: clk: Extend binding doc for Stingray SOC clk: mediatek: export cpu multiplexer clock for MT8173 SoCs clk: mediatek: export cpu multiplexer clock for MT2701/MT7623 SoCs clk: mediatek: add missing cpu mux causing Mediatek cpufreq can't work clk: renesas: cpg-mssr: Use of_device_get_match_data() helper clk: hi6220: add acpu clock clk: zx296718: export I2S mux clocks clk: imx7d: create clocks behind rawnand clock gate clk: hi3660: Set PPLL2 to 2880M ... commit 56c76417ad310a060252a13f88001c35b73d241d Author: Javier González Date: Fri Jul 7 21:08:53 2017 +0200 lightnvm: pblk: remove unnecessary checks Remove unnecessary checks when freeing dma memory in the completion path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-write.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3eaa11e2780dc38350c133bd998cac1df488d040 Author: Javier González Date: Fri Jul 7 21:08:52 2017 +0200 lightnvm: pblk: control I/O flow also on tear down When removing a pblk instance, control the write I/O flow to the controller as we do in the fast path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 61 +++++++++++++++++++++++++++++++--------- drivers/lightnvm/pblk-recovery.c | 31 +++++++++++++------- drivers/lightnvm/pblk-write.c | 19 +++++-------- drivers/lightnvm/pblk.h | 2 ++ 4 files changed, 78 insertions(+), 35 deletions(-) commit 55281621b6047d2ffb934a0b984ab0cdb1ad1d76 Author: Jason Wang Date: Fri Jul 7 19:56:09 2017 +0800 virtio-net: fix leaking of ctx array Fixes: commit d45b897b11ea ("virtio_net: allow specifying context for rx") Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+) commit 6aed468480e8b03ece5a395fe8013e66348a2547 Merge: 7542a046 5e14e9f Author: Bjorn Helgaas Date: Fri Jul 7 13:42:25 2017 -0500 Merge branch 'pci/host-tango' into next * pci/host-tango: PCI: tango: Add Sigma Designs Tango SMP8759 PCIe host bridge support PCI: Add DT binding for Sigma Designs Tango PCIe controller Conflicts: drivers/pci/host/Kconfig drivers/pci/host/Makefile commit 5e14e9fac308daf5607362f879e6de67e0b8dd5b Author: Marc Gonzalez Date: Tue Jun 20 10:17:40 2017 +0200 PCI: tango: Add Sigma Designs Tango SMP8759 PCIe host bridge support This driver is required to work around several hardware bugs in the PCIe controller. The SMP8759 does not support legacy interrupts or IO space. Signed-off-by: Marc Gonzalez [bhelgaas: add CONFIG_BROKEN dependency, various cleanups] Signed-off-by: Bjorn Helgaas drivers/pci/host/Kconfig | 14 +++++ drivers/pci/host/Makefile | 1 + drivers/pci/host/pcie-tango.c | 141 ++++++++++++++++++++++++++++++++++++++++++ include/linux/pci_ids.h | 2 + 4 files changed, 158 insertions(+) commit 961ae1d83d055a4b9ebbfb4cc8ca62ec1a7a3b74 Author: Andreas Gruenbacher Date: Fri Jul 7 13:22:05 2017 -0500 gfs2: Fix glock rhashtable rcu bug Before commit 88ffbf3e03 "GFS2: Use resizable hash table for glocks", glocks were freed via call_rcu to allow reading the glock hashtable locklessly using rcu. This was then changed to free glocks immediately, which made reading the glock hashtable unsafe. Bring back the original code for freeing glocks via call_rcu. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Cc: stable@vger.kernel.org # 4.3+ fs/gfs2/glock.c | 11 +++++++++-- fs/gfs2/incore.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) commit d29460e5cfc9bc2241886f9f60d0650ad745cf10 Author: Jaegeuk Kim Date: Wed Jun 21 17:52:39 2017 -0700 f2fs: avoid deadlock caused by lock order of page and lock_op - punch_hole - fill_zero - f2fs_lock_op - get_new_data_page - lock_page - f2fs_write_data_pages - lock_page - do_write_data_page - f2fs_lock_op Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit dd6ec12f3bf83ca3c4e712a9f35960aec779f6f9 Merge: 21c19bc a4485b5 Author: Linus Torvalds Date: Fri Jul 7 10:37:54 2017 -0700 Merge tag 'devicetree-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: - vsprintf format specifier %pOF for device_node's. This will enable us to stop storing the full node names. Conversion of users will happen next cycle. - Update documentation to point to DT specification instead of ePAPR. - Split out graph and property functions to a separate file. - New of-graph functions for ALSA - Add vendor prefixes for RISC-V, Linksys, iWave Systems, Roofull, Itead, and BananaPi. - Improve dtx_diff utility filename printing. * tag 'devicetree-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (32 commits) of: document /sys/firmware/fdt dt-bindings: Add RISC-V vendor prefix vsprintf: Add %p extension "%pOF" for device tree of: find_node_by_full_name rewrite to compare each level of: use kbasename instead of open coding dt-bindings: thermal: add file extension to brcm,ns-thermal of: update ePAPR references to point to Devicetree Specification scripts/dtc: dtx_diff - Show real file names in diff header of: detect invalid phandle in overlay of: be consistent in form of file mode of: make __of_attach_node() static of: address.c header comment typo of: fdt.c header comment typo of: make of_fdt_is_compatible() static dt-bindings: display-timing.txt convert non-ascii characters to ascii Documentation: remove overlay-notes reference to non-existent file dt-bindings: usb: exynos-usb: Add missing required VDD properties dt-bindings: Add vendor prefix for Linksys MAINTAINERS: add device tree ABI documentation file of: Add vendor prefix for iWave Systems Technologies Pvt. Ltd ... commit d1aa245354ae4605d1183f542ed8d45811c439f6 Author: Chao Yu Date: Fri Jul 7 14:10:15 2017 +0800 f2fs: use spin_{,un}lock_irq{save,restore} generic/361 reports below warning, this is because: once, there is someone entering into critical region of sbi.cp_lock, if write_end_io. f2fs_stop_checkpoint is invoked from an triggered IRQ, we will encounter deadlock. So this patch changes to use spin_{,un}lock_irq{save,restore} to create critical region without IRQ enabled to avoid potential deadlock. irq event stamp: 83391573 loop: Write error at byte offset 438729728, length 1024. hardirqs last enabled at (83391573): [] restore_all+0xf/0x65 hardirqs last disabled at (83391572): [] reschedule_interrupt+0x30/0x3c loop: Write error at byte offset 438860288, length 1536. softirqs last enabled at (83389244): [] __do_softirq+0x1ae/0x476 softirqs last disabled at (83389237): [] do_softirq_own_stack+0x2c/0x40 loop: Write error at byte offset 438990848, length 2048. ================================ WARNING: inconsistent lock state 4.12.0-rc2+ #30 Tainted: G O -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. xfs_io/7959 [HC1[1]:SC0[0]:HE0:SE1] takes: (&(&sbi->cp_lock)->rlock){?.+...}, at: [] f2fs_stop_checkpoint+0x1c/0x50 [f2fs] {HARDIRQ-ON-W} state was registered at: __lock_acquire+0x527/0x7b0 lock_acquire+0xae/0x220 _raw_spin_lock+0x42/0x50 do_checkpoint+0x165/0x9e0 [f2fs] write_checkpoint+0x33f/0x740 [f2fs] __f2fs_sync_fs+0x92/0x1f0 [f2fs] f2fs_sync_fs+0x12/0x20 [f2fs] sync_filesystem+0x67/0x80 generic_shutdown_super+0x27/0x100 kill_block_super+0x22/0x50 kill_f2fs_super+0x3a/0x40 [f2fs] deactivate_locked_super+0x3d/0x70 deactivate_super+0x40/0x60 cleanup_mnt+0x39/0x70 __cleanup_mnt+0x10/0x20 task_work_run+0x69/0x80 exit_to_usermode_loop+0x57/0x85 do_fast_syscall_32+0x18c/0x1b0 entry_SYSENTER_32+0x4c/0x7b irq event stamp: 1957420 hardirqs last enabled at (1957419): [] _raw_spin_unlock_irq+0x27/0x50 hardirqs last disabled at (1957420): [] call_function_single_interrupt+0x30/0x3c softirqs last enabled at (1953784): [] __do_softirq+0x1ae/0x476 softirqs last disabled at (1953773): [] do_softirq_own_stack+0x2c/0x40 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&sbi->cp_lock)->rlock); lock(&(&sbi->cp_lock)->rlock); *** DEADLOCK *** 2 locks held by xfs_io/7959: #0: (sb_writers#13){.+.+.+}, at: [] vfs_write+0x16a/0x190 #1: (&sb->s_type->i_mutex_key#16){+.+.+.}, at: [] f2fs_file_write_iter+0x25/0x140 [f2fs] stack backtrace: CPU: 2 PID: 7959 Comm: xfs_io Tainted: G O 4.12.0-rc2+ #30 Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 Call Trace: dump_stack+0x5f/0x92 print_usage_bug+0x1d3/0x1dd ? check_usage_backwards+0xe0/0xe0 mark_lock+0x23d/0x280 __lock_acquire+0x699/0x7b0 ? __this_cpu_preempt_check+0xf/0x20 ? trace_hardirqs_off_caller+0x91/0xe0 lock_acquire+0xae/0x220 ? f2fs_stop_checkpoint+0x1c/0x50 [f2fs] _raw_spin_lock+0x42/0x50 ? f2fs_stop_checkpoint+0x1c/0x50 [f2fs] f2fs_stop_checkpoint+0x1c/0x50 [f2fs] f2fs_write_end_io+0x147/0x150 [f2fs] bio_endio+0x7a/0x1e0 blk_update_request+0xad/0x410 blk_mq_end_request+0x16/0x60 lo_complete_rq+0x3c/0x70 __blk_mq_complete_request_remote+0x11/0x20 flush_smp_call_function_queue+0x6d/0x120 ? debug_smp_processor_id+0x12/0x20 generic_smp_call_function_single_interrupt+0x12/0x30 smp_call_function_single_interrupt+0x25/0x40 call_function_single_interrupt+0x37/0x3c EIP: _raw_spin_unlock_irq+0x2d/0x50 EFLAGS: 00000296 CPU: 2 EAX: 00000001 EBX: d2ccc51c ECX: 00000001 EDX: c1aacebd ESI: 00000000 EDI: 00000000 EBP: c96c9d1c ESP: c96c9d18 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 ? inherit_task_group.isra.98.part.99+0x6b/0xb0 __add_to_page_cache_locked+0x1d4/0x290 add_to_page_cache_lru+0x38/0xb0 pagecache_get_page+0x8e/0x200 f2fs_write_begin+0x96/0xf00 [f2fs] ? trace_hardirqs_on_caller+0xdd/0x1c0 ? current_time+0x17/0x50 ? trace_hardirqs_on+0xb/0x10 generic_perform_write+0xa9/0x170 __generic_file_write_iter+0x1a2/0x1f0 ? f2fs_preallocate_blocks+0x137/0x160 [f2fs] f2fs_file_write_iter+0x6e/0x140 [f2fs] ? __lock_acquire+0x429/0x7b0 __vfs_write+0xc1/0x140 vfs_write+0x9b/0x190 SyS_pwrite64+0x63/0xa0 do_fast_syscall_32+0xa1/0x1b0 entry_SYSENTER_32+0x4c/0x7b EIP: 0xb7786c61 EFLAGS: 00000293 CPU: 2 EAX: ffffffda EBX: 00000003 ECX: 08416000 EDX: 00001000 ESI: 18b24000 EDI: 00000000 EBP: 00000003 ESP: bf9b36b0 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b Fixes: aaec2b1d1879 ("f2fs: introduce cp_lock to protect updating of ckpt_flags") Cc: stable@vger.kernel.org Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 11 ++++++----- fs/f2fs/f2fs.h | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 11 deletions(-) commit ff1048e7dffe0582a50e2eaf90e13fc76ea8493d Author: Jaegeuk Kim Date: Thu Jul 6 14:46:01 2017 -0700 f2fs: relax migratepage for atomic written page In order to avoid lock contention for atomic written pages, we'd better give EBUSY in f2fs_migrate_page when mode is asynchronous. We expect it will be released soon as transaction commits. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 000519f27866afdfde020d097b76cf2c4038595e Author: Chao Yu Date: Thu Jul 6 01:11:31 2017 +0800 f2fs: don't count inode block in in-memory inode.i_blocks Previously, we count all inode consumed blocks including inode block, xattr block, index block, data block into i_blocks, for other generic filesystems, they won't count inode block into i_blocks, so for userspace applications or quota system, they may detect incorrect block count according to i_blocks value in inode. This patch changes to count all blocks into inode.i_blocks excluding inode block, for on-disk i_blocks, we keep counting inode block for backward compatibility. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 22 ++++++++++++---------- fs/f2fs/inode.c | 4 ++-- fs/f2fs/node.c | 16 ++++++---------- 3 files changed, 20 insertions(+), 22 deletions(-) commit 6ac851ba895dce4b85b7adfa8ddb1fd25637e70a Author: Chao Yu Date: Wed Jul 5 12:17:24 2017 +0800 Revert "f2fs: fix to clean previous mount option when remount_fs" Don't clear old mount option before parse new option during ->remount_fs like other generic filesystems. This reverts commit 26666c8a4366debae30ae37d0688b2bec92d196a. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 1 - 1 file changed, 1 deletion(-) commit b855bf0e1640aa4cf2d1eef056eebcd43e0d1f5e Author: Sheng Yong Date: Mon Jun 26 10:41:36 2017 +0800 f2fs: do not set LOST_PINO for renamed dir After renaming a directory, fsck could detect unmatched pino. The scenario can be reproduced as the following: $ mkdir /bar/subbar /foo $ rename /bar/subbar /foo Then fsck will report: [ASSERT] (__chk_dots_dentries:1182) --> Bad inode number[0x3] for '..', parent parent ino is [0x4] Rename sets LOST_PINO for old_inode. However, the flag cannot be cleared, since dir is written back with CP. So, let's get rid of LOST_PINO for a renamed dir and fix the pino directly at the end of rename. Signed-off-by: Sheng Yong Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d58dfb75056c5f732a0b83c54d22c99b4edc947a Author: Sheng Yong Date: Mon Jun 26 10:41:35 2017 +0800 f2fs: do not set LOST_PINO for newly created dir Since directories will be written back with checkpoint and fsync a directory will always write CP, there is no need to set LOST_PINO after creating a directory. Signed-off-by: Sheng Yong Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0771fcc71c0c28bf31ac5c2c863b9f0de0fdf00d Author: Chao Yu Date: Thu Jun 29 23:20:45 2017 +0800 f2fs: skip ->writepages for {mete,node}_inode during recovery Skip ->writepages in prior to ->writepage for {meta,node}_inode during recovery, hence unneeded loop in ->writepages can be avoided. Moreover, check SBI_POR_DOING earlier while writebacking pages. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 +++ fs/f2fs/data.c | 13 +++++++------ fs/f2fs/node.c | 3 +++ 3 files changed, 13 insertions(+), 6 deletions(-) commit 6915ea9d8dd8690570fe4a9864b898447a4f3da0 Author: Chao Yu Date: Fri Jun 30 17:19:02 2017 +0800 f2fs: introduce __check_sit_bitmap After we introduce discard thread, discard command can be issued concurrently with data allocating, this patch adds new function to heck sit bitmap to ensure that userdata was invalid in which on-going discard command covered. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit cce1325247b9faafc520c5789fe60feef1fd7092 Author: Chao Yu Date: Thu Jun 29 23:17:45 2017 +0800 f2fs: stop gc/discard thread in prior during umount This patch resolves kernel panic for xfstests/081, caused by recent f2fs_bug_on f2fs: add f2fs_bug_on in __remove_discard_cmd For fixing, we will stop gc/discard thread in prior in ->kill_sb in order to avoid referring and releasing race among them. Signed-off-by: Jaegeuk Kim Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 19 +++++++++++++------ fs/f2fs/super.c | 7 ++++--- 3 files changed, 18 insertions(+), 9 deletions(-) commit daeb433e42de97c79622f58681972200eec1d8da Author: Chao Yu Date: Mon Jun 26 16:24:41 2017 +0800 f2fs: introduce reserved_blocks in sysfs In this patch, we add a new sysfs interface, with it, we can control number of reserved blocks in system which could not be used by user, it enable f2fs to let user to configure for adjusting over-provision ratio dynamically instead of changing it by mkfs. So we can expect it will help to reserve more free space for relieving GC in both filesystem and flash device. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++++++ fs/f2fs/f2fs.h | 13 +++++++++---- fs/f2fs/super.c | 4 +++- fs/f2fs/sysfs.c | 16 +++++++++++++++- 4 files changed, 33 insertions(+), 6 deletions(-) commit d871cd046f1a5ae816c836cf114d57288bcb00b2 Author: Yunlong Song Date: Sat Jun 24 15:57:19 2017 +0800 f2fs: avoid redundant f2fs_flush after remount create_flush_cmd_control will create redundant issue_flush_thread after each remount with flush_merge option. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) commit 0cc091d0c8c34092c471fb5ae7335d075d08c324 Author: Jaegeuk Kim Date: Wed Jun 21 20:55:55 2017 -0700 f2fs: report # of free inodes more precisely If the partition is small, we don't need to report total # of inodes including hidden free nodes. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 21c19bc7ee256094aba74af8d91a824da4bc36af Merge: b6ffe9b 25bfee1 Author: Linus Torvalds Date: Fri Jul 7 10:24:07 2017 -0700 Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - Minor improvement : avoid requiring unnecessary startup/shutdown callback that many drivers seem to not need - New controller driver for Qualcomm's APCS IPC * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: Introduce Qualcomm APCS IPC driver dt-bindings: mailbox: Introduce Qualcomm APCS global binding mailbox: Make startup and shutdown ops optional commit b77a5372076984d33731a8da0fd52fc718f62a23 Author: Gustavo A. R. Silva Date: Thu Jul 6 17:19:02 2017 -0500 platform/x86: fujitsu-laptop: add NULL check on devm_kzalloc() return value Check return value from call to devm_kzalloc() in order to prevent a NULL pointer dereference. This issue was detected using Coccinelle and the following semantic patch: @@ expression x; identifier fld; @@ * x = devm_kzalloc(...); ... when != x == NULL x->fld Signed-off-by: Gustavo A. R. Silva Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b6ffe9ba46016f8351896ccee33bebcd0e5ea7c0 Merge: 9f45efb 9d92573 Author: Linus Torvalds Date: Fri Jul 7 09:44:06 2017 -0700 Merge tag 'libnvdimm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "libnvdimm updates for the latest ACPI and UEFI specifications. This pull request also includes new 'struct dax_operations' enabling to undo the abuse of copy_user_nocache() for copy operations to pmem. The dax work originally missed 4.12 to address concerns raised by Al. Summary: - Introduce the _flushcache() family of memory copy helpers and use them for persistent memory write operations on x86. The _flushcache() semantic indicates that the cache is either bypassed for the copy operation (movnt) or any lines dirtied by the copy operation are written back (clwb, clflushopt, or clflush). - Extend dax_operations with ->copy_from_iter() and ->flush() operations. These operations and other infrastructure updates allow all persistent memory specific dax functionality to be pushed into libnvdimm and the pmem driver directly. It also allows dax-specific sysfs attributes to be linked to a host device, for example: /sys/block/pmem0/dax/write_cache - Add support for the new NVDIMM platform/firmware mechanisms introduced in ACPI 6.2 and UEFI 2.7. This support includes the v1.2 namespace label format, extensions to the address-range-scrub command set, new error injection commands, and a new BTT (block-translation-table) layout. These updates support inter-OS and pre-OS compatibility. - Fix a longstanding memory corruption bug in nfit_test. - Make the pmem and nvdimm-region 'badblocks' sysfs files poll(2) capable. - Miscellaneous fixes and small updates across libnvdimm and the nfit driver. Acknowledgements that came after the branch was pushed: commit 6aa734a2f38e ("libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime") was reviewed by Toshi Kani " * tag 'libnvdimm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (42 commits) libnvdimm, namespace: record 'lbasize' for pmem namespaces acpi/nfit: Issue Start ARS to retrieve existing records libnvdimm: New ACPI 6.2 DSM functions acpi, nfit: Show bus_dsm_mask in sysfs libnvdimm, acpi, nfit: Add bus level dsm mask for pass thru. acpi, nfit: Enable DSM pass thru for root functions. libnvdimm: passthru functions clear to send libnvdimm, btt: convert some info messages to warn/err libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime libnvdimm: fix the clear-error check in nsio_rw_bytes libnvdimm, btt: fix btt_rw_page not returning errors acpi, nfit: quiet invalid block-aperture-region warnings libnvdimm, btt: BTT updates for UEFI 2.7 format acpi, nfit: constify *_attribute_group libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region libnvdimm, pmem, dax: export a cache control attribute dax: convert to bitmask for flags dax: remove default copy_from_iter fallback libnvdimm, nfit: enable support for volatile ranges libnvdimm, pmem: fix persistence warning ... commit 6eb0b8df9f74f33d1a69100117630a7a87a9cc96 Author: Darrick J. Wong Date: Fri Jul 7 08:37:26 2017 -0700 xfs: rename MAXPATHLEN to XFS_SYMLINK_MAXLEN XFS has a maximum symlink target length of 1024 bytes; this is a holdover from the Irix days. Unfortunately, the constant establishing this is 'MAXPATHLEN' and is /not/ the same as the Linux MAXPATHLEN, which is 4096. The kernel enforces its 1024 byte MAXPATHLEN on symlink targets, but xfsprogs picks up the (Linux) system 4096 byte MAXPATHLEN, which means that xfs_repair doesn't complain about oversized symlinks. Since this is an on-disk format constraint, put the define in the XFS namespace and move everything over to use the new name. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_format.h | 1 + fs/xfs/libxfs/xfs_symlink_remote.c | 2 +- fs/xfs/libxfs/xfs_trans_resv.c | 4 ++-- fs/xfs/xfs_iops.c | 2 +- fs/xfs/xfs_linux.h | 1 - fs/xfs/xfs_symlink.c | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) commit 33e9c8dbfbcef8e4cda8e43a445e692ab7e0d8c0 Author: Ilya Dryomov Date: Mon Jun 26 12:05:55 2017 +0200 libceph: advertise support for NEW_OSDOP_ENCODING and SERVER_LUMINOUS All four SERVER_LUMINOUS feature bits are implemented, switch it on! NEW_OSDOP_ENCODING doesn't mean much for the client (it signifies support for MOSDOp v6) but needs to be enabled in order to get the latest (currently v25) pg_pool_t. Signed-off-by: Ilya Dryomov Acked-by: Sage Weil include/linux/ceph/ceph_features.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 0bb05da2ec57163b7a25efef001ed8f52b18b070 Author: Ilya Dryomov Date: Thu Jun 22 19:44:06 2017 +0200 libceph: osd_state is 32 bits wide in luminous Signed-off-by: Ilya Dryomov include/linux/ceph/osdmap.h | 4 ++-- net/ceph/debugfs.c | 2 +- net/ceph/osdmap.c | 29 ++++++++++++++++++++--------- 3 files changed, 23 insertions(+), 12 deletions(-) commit 9eebe45c091e2dff22d4bd87360a624303148ed1 Author: Ilya Dryomov Date: Thu Jun 22 19:44:05 2017 +0200 crush: remove an obsolete comment Reflects ceph.git commit dca1ae1e0a6b02029c3a7f9dec4114972be26d50. Signed-off-by: Ilya Dryomov net/ceph/crush/mapper.c | 5 ----- 1 file changed, 5 deletions(-) commit b88ed8d84fbd1e652cc7a1f6e03550d2b4edf653 Author: Ilya Dryomov Date: Thu Jun 22 19:44:05 2017 +0200 crush: crush_init_workspace starts with struct crush_work It is not just a pointer to crush_work, it is the whole structure. That is not a problem since it only contains a pointer. But it will be a problem if new data members are added to crush_work. Reflects ceph.git commit ee957dd431bfbeb6dadaf77764db8e0757417328. Signed-off-by: Ilya Dryomov net/ceph/crush/mapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cf9c4a9959b6273675310d14a834ef14fbca37c Author: Ilya Dryomov Date: Thu Jun 22 19:44:05 2017 +0200 libceph, crush: per-pool crush_choose_arg_map for crush_do_rule() If there is no crush_choose_arg_map for a given pool, a NULL pointer is passed to preserve existing crush_do_rule() behavior. Reflects ceph.git commits 55fb91d64071552ea1bc65ab4ea84d3c8b73ab4b, dbe36e08be00c6519a8c89718dd47b0219c20516. Signed-off-by: Ilya Dryomov include/linux/crush/crush.h | 8 ++ net/ceph/crush/crush.c | 3 + net/ceph/osdmap.c | 200 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 208 insertions(+), 3 deletions(-) commit 069f3222ca96acfe8c59937e98c401bda5475b48 Author: Ilya Dryomov Date: Thu Jun 22 19:44:05 2017 +0200 crush: implement weight and id overrides for straw2 bucket_straw2_choose needs to use weights that may be different from weight_items. For instance to compensate for an uneven distribution caused by a low number of values. Or to fix the probability biais introduced by conditional probabilities (see http://tracker.ceph.com/issues/15653 for more information). We introduce a weight_set for each straw2 bucket to set the desired weight for a given item at a given position. The weight of a given item when picking the first replica (first position) may be different from the weight the second replica (second position). For instance the weight matrix for a given bucket containing items 3, 7 and 13 could be as follows: position 0 position 1 item 3 0x10000 0x100000 item 7 0x40000 0x10000 item 13 0x40000 0x10000 When crush_do_rule picks the first of two replicas (position 0), item 7, 3 are four times more likely to be choosen by bucket_straw2_choose than item 13. When choosing the second replica (position 1), item 3 is ten times more likely to be choosen than item 7, 13. By default the weight_set of each bucket exactly matches the content of item_weights for each position to ensure backward compatibility. bucket_straw2_choose compares items by using their id. The same ids are also used to index buckets and they must be unique. For each item in a bucket an array of ids can be provided for placement purposes and they are used instead of the ids. If no replacement ids are provided, the legacy behavior is preserved. Reflects ceph.git commit 19537a450fd5c5a0bb8b7830947507a76db2ceca. Signed-off-by: Ilya Dryomov include/linux/crush/crush.h | 58 ++++++++++++++++++++++++++++++++++ include/linux/crush/mapper.h | 9 +++--- net/ceph/crush/mapper.c | 74 +++++++++++++++++++++++++++++++++----------- net/ceph/osdmap.c | 2 +- 4 files changed, 119 insertions(+), 24 deletions(-) commit 1c2e7b451b889bead46cef410a737d1767cd6f0b Author: Ilya Dryomov Date: Wed Jun 21 17:27:18 2017 +0200 libceph: apply_upmap() Previously, pg_to_raw_osds() didn't filter for existent OSDs because raw_to_up_osds() would filter for "up" ("up" is predicated on "exists") and raw_to_up_osds() was called directly after pg_to_raw_osds(). Now, with apply_upmap() call in there, nonexistent OSDs in pg_to_raw_osds() output can affect apply_upmap(). Introduce remove_nonexistent_osds() to deal with that. Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 2 deletions(-) commit 463bb8da5042c165bf50ae2688d251c5af26f3cf Author: Ilya Dryomov Date: Wed Jun 21 17:27:18 2017 +0200 libceph: compute actual pgid in ceph_pg_to_up_acting_osds() Move raw_pg_to_pg() call out of get_temp_osds() and into ceph_pg_to_up_acting_osds(), for upcoming apply_upmap(). Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6f428df47dae2c8ea31fd4c0c74a12a8a5ac2d1d Author: Ilya Dryomov Date: Wed Jun 21 17:27:18 2017 +0200 libceph: pg_upmap[_items] infrastructure pg_temp and pg_upmap encodings are the same (PG -> array of osds), except for the incremental remove: it's an empty mapping in new_pg_temp for pg_temp and a separate old_pg_upmap set for pg_upmap. (This isn't to allow for empty pg_upmap mappings -- apparently, pg_temp just wasn't looked at as an example for pg_upmap encoding.) Reuse __decode_pg_temp() for decoding pg_upmap and new_pg_upmap. __decode_pg_temp() stores into pg_temp union member, but since pg_upmap union member is identical, reading through pg_upmap later is OK. Signed-off-by: Ilya Dryomov include/linux/ceph/osdmap.h | 10 +++- net/ceph/debugfs.c | 23 ++++++++ net/ceph/osdmap.c | 135 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 164 insertions(+), 4 deletions(-) commit 278b1d709c6acc6f7d138fed775c76695b068e43 Author: Ilya Dryomov Date: Wed Jun 21 17:27:17 2017 +0200 libceph: ceph_decode_skip_* helpers Some of these won't be as efficient as they could be (e.g. ceph_decode_skip_set(... 32 ...) could advance by len * sizeof(u32) once instead of advancing by sizeof(u32) len times), but that's fine and not worth a bunch of extra macro code. Replace skip_name_map() with ceph_decode_skip_map as an example. Signed-off-by: Ilya Dryomov include/linux/ceph/decode.h | 60 +++++++++++++++++++++++++++++++++++++++++++++ net/ceph/osdmap.c | 25 +++---------------- 2 files changed, 63 insertions(+), 22 deletions(-) commit ab75144be08cfc1d80f49e9c37970fcadb1215a2 Author: Ilya Dryomov Date: Wed Jun 21 17:27:17 2017 +0200 libceph: kill __{insert,lookup,remove}_pg_mapping() Switch to DEFINE_RB_FUNCS2-generated {insert,lookup,erase}_pg_mapping(). Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 87 ++++++++++--------------------------------------------- 1 file changed, 15 insertions(+), 72 deletions(-) commit a303bb0e58345fe9f7ab2f82b90266f2b5036058 Author: Ilya Dryomov Date: Wed Jun 21 17:27:17 2017 +0200 libceph: introduce and switch to decode_pg_mapping() Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 150 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 83 insertions(+), 67 deletions(-) commit 33333d107112be4d822234deb8820ec6eeb0831d Author: Ilya Dryomov Date: Wed Jun 21 17:27:17 2017 +0200 libceph: don't pass pgid by value Make __{lookup,remove}_pg_mapping() look like their ceph_spg_mapping counterparts: take const struct ceph_pg *. Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit a02a946dfe9633d7e0202359836f6b5217a62824 Author: Ilya Dryomov Date: Mon Jun 19 12:18:05 2017 +0200 libceph: respect RADOS_BACKOFF backoffs Signed-off-by: Ilya Dryomov include/linux/ceph/ceph_fs.h | 1 + include/linux/ceph/osd_client.h | 45 +++ include/linux/ceph/osdmap.h | 1 + include/linux/ceph/rados.h | 6 + net/ceph/ceph_common.c | 1 + net/ceph/debugfs.c | 74 +++++ net/ceph/osd_client.c | 593 ++++++++++++++++++++++++++++++++++++++++ net/ceph/osdmap.c | 16 ++ 8 files changed, 737 insertions(+) commit 76f827a7b1faaaebc53f89d184e95ea3a0b8dd71 Author: Ilya Dryomov Date: Mon Jun 19 12:18:05 2017 +0200 libceph: make DEFINE_RB_* helpers more general Initially for ceph_pg_mapping, ceph_spg_mapping and ceph_hobject_id, compared with ceph_pg_compare(), ceph_spg_compare() and hoid_compare() respectively. Signed-off-by: Ilya Dryomov include/linux/ceph/libceph.h | 49 +++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 12 deletions(-) commit df28152d53b449a72258000f592472215fc9371e Author: Ilya Dryomov Date: Thu Jun 15 16:30:56 2017 +0200 libceph: avoid unnecessary pi lookups in calc_target() Signed-off-by: Ilya Dryomov include/linux/ceph/osdmap.h | 10 +++++++-- net/ceph/osd_client.c | 8 +++---- net/ceph/osdmap.c | 54 +++++++++++++++++++++++++-------------------- 3 files changed, 42 insertions(+), 30 deletions(-) commit 6d637a540e6f87b9c926d45a507ff143640517cf Author: Ilya Dryomov Date: Thu Jun 15 16:30:55 2017 +0200 libceph: use target pi for calc_target() calculations For luminous and beyond we are encoding the actual spgid, which requires operating with the correct pg_num, i.e. that of the target pool. Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit db098ec4e41a6ad8f5b248b1287bb583754e944e Author: Ilya Dryomov Date: Thu Jun 15 16:30:55 2017 +0200 libceph: always populate t->target_{oid,oloc} in calc_target() need_check_tiering logic doesn't make a whole lot of sense. Drop it and apply tiering unconditionally on every calc_target() call instead. Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 04c7d789e269c2b82bbd08106049a5a979cdb3fd Author: Ilya Dryomov Date: Thu Jun 15 16:30:55 2017 +0200 libceph: make sure need_resend targets reflect latest map Otherwise we may miss events like PG splits, pool deletions, etc when we get multiple incremental maps at once. Because check_pool_dne() can now be fed an unlinked request, finish_request() needed to be taught to handle unlinked requests. Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 1 + net/ceph/debugfs.c | 2 +- net/ceph/osd_client.c | 33 +++++++++++++++++++++++++-------- 3 files changed, 27 insertions(+), 9 deletions(-) commit a10bcb19ae02cea7d5e6650fbc2de3ced46b4e5d Author: Ilya Dryomov Date: Thu Jun 15 16:30:55 2017 +0200 libceph: delete from need_resend_linger before check_linger_pool_dne() When processing a map update consisting of multiple incrementals, we may end up running check_linger_pool_dne() on a lingering request that was previously added to need_resend_linger list. If it is concluded that the target pool doesn't exist, the request is killed off while still on need_resend_linger list, which leads to a crash on a NULL lreq->osd in kick_requests(): libceph: linger_id 18446462598732840961 pool does not exist BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: ceph_osdc_handle_map+0x4ae/0x870 Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 1 + 1 file changed, 1 insertion(+) commit 7de030d6b10a56e991312a978ace6be3c090097c Author: Ilya Dryomov Date: Thu Jun 15 16:30:54 2017 +0200 libceph: resend on PG splits if OSD has RESEND_ON_SPLIT Note that ceph_osd_request_target fields are updated regardless of RESEND_ON_SPLIT. Signed-off-by: Ilya Dryomov include/linux/ceph/osdmap.h | 2 ++ net/ceph/osd_client.c | 21 ++++++++++++++------- net/ceph/osdmap.c | 7 +++---- 3 files changed, 19 insertions(+), 11 deletions(-) commit 84ed45df4604ae9b1065b5fe2f250f57f7c69baf Author: Ilya Dryomov Date: Thu Jun 15 16:30:54 2017 +0200 libceph: drop need_resend from calc_target() Replace it with more fine-grained bools to separate updating ceph_osd_request_target fields and the decision to resend. Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 8cb441c0545dfd4dafeedc1e2d7157e1072413ac Author: Ilya Dryomov Date: Thu Jun 15 16:30:54 2017 +0200 libceph: MOSDOp v8 encoding (actual spgid + full hash) Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 17 +++++ include/linux/ceph/osdmap.h | 4 +- net/ceph/osd_client.c | 153 +++++++++++++++++++++++++++++++++++----- 3 files changed, 154 insertions(+), 20 deletions(-) commit 98ad5ebd1505eb903ae8bc27e94c1ab0d1c3e651 Author: Ilya Dryomov Date: Thu Jun 15 16:30:54 2017 +0200 libceph: ceph_connection_operations::reencode_message() method Give upper layers a chance to reencode the message after the connection is negotiated and ->peer_features is set. OSD client will use this to support both luminous and pre-luminous OSDs (in a single cluster): the former need MOSDOp v8; the latter will continue to be sent MOSDOp v4. Signed-off-by: Ilya Dryomov include/linux/ceph/messenger.h | 2 ++ net/ceph/messenger.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 2e59ffd1df4aba5289f04d362efc8432fac14949 Author: Ilya Dryomov Date: Thu Jun 15 16:30:53 2017 +0200 libceph: encode_{pgid,oloc}() helpers Factor out encode_{pgid,oloc}() and use ceph_encode_string() for oid. Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) commit dc98ff7230e5ccf11c621dff0d590e83574a7184 Author: Ilya Dryomov Date: Thu Jun 15 16:30:53 2017 +0200 libceph: introduce ceph_spg, ceph_pg_to_primary_shard() Store both raw pgid and actual spgid in ceph_osd_request_target. Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 3 ++- include/linux/ceph/osdmap.h | 10 ++++++++++ net/ceph/debugfs.c | 11 ++++++++++- net/ceph/osd_client.c | 7 +++++-- net/ceph/osdmap.c | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 4 deletions(-) commit 8e48cf00c48fdefb01f70db81f31438cd0c29dcc Author: Ilya Dryomov Date: Mon Jun 5 14:45:00 2017 +0200 libceph: new pi->last_force_request_resend The old (v15) pi->last_force_request_resend has been repurposed to make pre-RESEND_ON_SPLIT clients that don't check for PG splits but do obey pi->last_force_request_resend resend on splits. See ceph.git commit 189ca7ec6420 ("mon/OSDMonitor: make pre-luminous clients resend ops on split"). Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit dc93e0e2831de2f80817b89aae4864b88332fcce Author: Ilya Dryomov Date: Mon Jun 5 14:45:00 2017 +0200 libceph: fold [l]req->last_force_resend into ceph_osd_request_target Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 4 ++-- net/ceph/osd_client.c | 21 ++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) commit 220abf5aa7ba5f544f1b589bde33761c60bbf9a0 Author: Ilya Dryomov Date: Mon Jun 5 14:45:00 2017 +0200 libceph: support SERVER_JEWEL feature bits Only MON_STATEFUL_SUB, really. MON_ROUTE_OSDMAP and OSDSUBOP_NO_SNAPCONTEXT are irrelevant. Signed-off-by: Ilya Dryomov include/linux/ceph/ceph_features.h | 2 ++ net/ceph/mon_client.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 2d7522e0bda17eb3c7af0ffe74f03dd6c3cca443 Author: Ilya Dryomov Date: Mon Jun 5 14:45:00 2017 +0200 libceph: advertise support for OSD_POOLRESEND The code has been in place since commit 63244fa123a7 ("libceph: introduce ceph_osd_request_target, calc_target()"), and, with the ceph_{oloc,oid}_copy() issue fixed in the previous commit, is now in working order. Signed-off-by: Ilya Dryomov include/linux/ceph/ceph_features.h | 1 + 1 file changed, 1 insertion(+) commit ca35ffea898d2cae67820202bd9a494742726b41 Author: Ilya Dryomov Date: Mon Jun 5 14:44:59 2017 +0200 libceph: handle non-empty dest in ceph_{oloc,oid}_copy() Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f179d3ba8cb9073c2d96315b79ff7bc658a1feee Author: Ilya Dryomov Date: Mon Jun 5 14:44:59 2017 +0200 libceph: new features macros Signed-off-by: Ilya Dryomov include/linux/ceph/ceph_features.h | 242 +++++++++++++++++++++++++------------ 1 file changed, 167 insertions(+), 75 deletions(-) commit dcbbd97ccb9c6f4dad39875c1404d2643eaf110b Author: Ilya Dryomov Date: Mon Jun 5 14:44:59 2017 +0200 libceph: remove ceph_sanitize_features() workaround Reflects ceph.git commit ff1959282826ae6acd7134e1b1ede74ffd1cc04a. Signed-off-by: Ilya Dryomov include/linux/ceph/ceph_features.h | 21 --------------------- net/ceph/messenger.c | 3 +-- 2 files changed, 1 insertion(+), 23 deletions(-) commit 481f001ffa5d8e9d72f8206e92f73ded076eeb30 Author: Yan, Zheng Date: Mon Jul 3 09:09:10 2017 +0800 ceph: update ceph_dentry_info::lease_session when necessary Current code does not update ceph_dentry_info::lease_session once it is set. If auth mds of corresponding dentry changes, dentry lease keeps in an invalid state. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1d8f83604c4244d93c5a49f5107624769df6248f Author: Yan, Zheng Date: Tue Jun 27 11:57:56 2017 +0800 ceph: new mount option that specifies fscache uniquifier Current ceph uses FSID as primary index key of fscache data. This allows ceph to retain cached data across remount. But this causes problem (kernel opps, fscache does not support sharing data) when a filesystem get mounted several times (with fscache enabled, with different mount options). The fix is adding a new mount option, which specifies uniquifier for fscache. Signed-off-by: "Yan, Zheng" Acked-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/cache.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++------ fs/ceph/super.c | 41 +++++++++++++++++-------- fs/ceph/super.h | 1 + 3 files changed, 113 insertions(+), 21 deletions(-) commit 4b9f2042fd2a9da7e6c7b4dd49eff19dc3754e4f Author: Yan, Zheng Date: Tue Jun 27 17:17:24 2017 +0800 ceph: avoid accessing freeing inode in ceph_check_delayed_caps() Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 62a65f36d016fff32179acdbfcb8b2d8d9e54757 Author: Yan, Zheng Date: Thu Jun 22 16:26:34 2017 +0800 ceph: avoid invalid memory dereference in the middle of umount extra_mon_dispatch() and debugfs' foo_show functions dereference fsc->mdsc. we should clean up fsc->client->extra_mon_dispatch and debugfs before destroying fsc->mds. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 4 ++-- fs/ceph/super.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 1684dd03e9f59212775cafa50ea77b9ef5b263db Author: Yan, Zheng Date: Wed Jun 14 15:54:56 2017 +0800 ceph: getattr before read on ceph.* xattrs Previously we were returning values for quota, layout xattrs without any kind of update -- the user just got whatever happened to be in our cache. Clearly this extra round trip has a cost, but reads of these xattrs are fairly rare, happening on admin intervention rather than in normal operation. Link: http://tracker.ceph.com/issues/17939 Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 3 +++ 1 file changed, 3 insertions(+) commit 92e57e6287cc7402487edf3eb09c8a7b36dad63f Author: Yan, Zheng Date: Mon Jun 5 11:07:28 2017 +0800 ceph: don't re-send interrupted flock request Don't re-send interrupted flock request in cases of mds failover and receiving request forward. Because corresponding 'lock intr' request may have been finished, it won't get re-sent. Link: http://tracker.ceph.com/issues/20170 Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/locks.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 439868812aac01ec5d1b133a51e768280f3fc8d5 Author: Yan, Zheng Date: Tue May 23 17:48:28 2017 +0800 ceph: cleanup writepage_nounlock() Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fa71fefb308532eb5b2e4b38d914d19fc836f73e Author: Yan, Zheng Date: Tue May 23 17:18:53 2017 +0800 ceph: redirty page when writepage_nounlock() skips unwritable page Ceph needs to flush dirty page in the order in which in which snap context they belong to. Dirty pages belong to older snap context should be flushed earlier. if writepage_nounlock() can not flush a page, it should redirty the page. Reported-by: Dan Carpenter Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f2b0c45f09796f87723a1225c919035457f72b7a Author: Yan, Zheng Date: Tue May 23 17:03:12 2017 +0800 ceph: remove useless page->mapping check in writepage_nounlock() Callers of writepage_nounlock() have already ensured non-null page->mapping. Reported-by: Dan Carpenter Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 4 ---- 1 file changed, 4 deletions(-) commit efb0ca765ac6f4985b57ef215e8d55e746b083f4 Author: Yan, Zheng Date: Mon May 22 12:03:32 2017 +0800 ceph: update the 'approaching max_size' code The old 'approaching max_size' code expects MDS set max_size to '2 * reported_size'. This is no longer true. The new code reports file size when half of previous max_size increment has been used. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 2 +- fs/ceph/caps.c | 18 ++++++++++++++++-- fs/ceph/file.c | 2 +- fs/ceph/inode.c | 9 +++------ fs/ceph/super.h | 3 ++- 5 files changed, 23 insertions(+), 11 deletions(-) commit 84eea8c79090c44564877cd47c73455e32ec4846 Author: Yan, Zheng Date: Tue May 16 08:55:34 2017 +0800 ceph: re-request max size after importing caps The 'wanted max size' could be sent to inode's old auth mds, re-send it to inode's new auth mds if necessary. Otherwise write syscall may hang. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 564d8a2cf3abf16575af48bdc3e86e92ee8a617d Author: Mario Kleiner Date: Fri Jul 7 04:57:04 2017 +0200 drm/radeon: Fix eDP for single-display iMac10,1 (v2) The late 2009, 27 inch Apple iMac10,1 has an internal eDP display and an external Mini- Displayport output, driven by a DCE-3.2, RV730 Radeon Mobility HD-4670. The machine worked fine in a dual-display setup with eDP panel + externally connected HDMI or DVI-D digital display sink, connected via MiniDP to DVI or HDMI adapter. However, booting the machine single-display with only eDP panel results in a completely black display - even backlight powering off, as soon as the radeon modesetting driver loads. This patch fixes the single dispay eDP case by assigning encoders based on dig->linkb, similar to DCE-4+. While this should not be generally necessary (Alex: "...atom on normal boards should be able to handle any mapping."), Apple seems to use some special routing here. One remaining problem not solved by this patch is that an external Minidisplayport->DP sink does still not work on iMac10,1, whereas external DVI and HDMI sinks continue to work. The problem affects at least all tested kernels since Linux 3.13 - didn't test earlier kernels, so backporting to stable probably makes sense. v2: With the original patch from 2016, Alex was worried it will break other DCE3.2 systems. Use dmi_match() to apply this special encoder assignment only for the Apple iMac 10,1 from late 2009. Signed-off-by: Mario Kleiner Cc: Alex Deucher Cc: Michel Dänzer Cc: Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios_encoders.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 20e2b791796bd68816fa115f12be5320de2b8021 Author: Takashi Iwai Date: Thu Jul 6 12:34:40 2017 +0200 ALSA: msnd: Optimize / harden DSP and MIDI loops The ISA msnd drivers have loops fetching the ring-buffer head, tail and size values inside the loops. Such codes are inefficient and fragile. This patch optimizes it, and also adds the sanity check to avoid the endless loops. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196131 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196133 Signed-off-by: Takashi Iwai sound/isa/msnd/msnd_midi.c | 30 +++++++++++++++--------------- sound/isa/msnd/msnd_pinnacle.c | 23 ++++++++++++----------- 2 files changed, 27 insertions(+), 26 deletions(-) commit a80cf7b5f4149753d5f19c872a47e66195b167d4 Author: Christian Borntraeger Date: Thu Jul 6 16:17:14 2017 +0200 KVM: mark memory slots as rcu we access the memslots array via srcu. Mark it as such and use the right access functions also for the freeing of memory slots. Found by sparse: ./include/linux/kvm_host.h:565:16: error: incompatible types in comparison expression (different address spaces) Signed-off-by: Christian Borntraeger Reviewed-by: Paolo Bonzini include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 4a12f95177280a660bda99e81838919b1cc6a91a Author: Christian Borntraeger Date: Fri Jul 7 10:51:38 2017 +0200 KVM: mark kvm->busses as rcu protected mark kvm->busses as rcu protected and use the correct access function everywhere. found by sparse virt/kvm/kvm_main.c:3490:15: error: incompatible types in comparison expression (different address spaces) virt/kvm/kvm_main.c:3509:15: error: incompatible types in comparison expression (different address spaces) virt/kvm/kvm_main.c:3561:15: error: incompatible types in comparison expression (different address spaces) virt/kvm/kvm_main.c:3644:15: error: incompatible types in comparison expression (different address spaces) Signed-off-by: Christian Borntraeger include/linux/kvm_host.h | 8 +++++++- virt/kvm/eventfd.c | 8 +++++--- virt/kvm/kvm_main.c | 17 ++++++++++------- 3 files changed, 22 insertions(+), 11 deletions(-) commit 5535f800b0e1533e5f3a1428f6ef25eb29eccc0f Author: Christian Borntraeger Date: Thu Jul 6 20:31:11 2017 +0200 KVM: use rcu access function for irq routing irq routing is rcu protected. Use the proper access functions. Found by sparse virt/kvm/irqchip.c:233:13: warning: incorrect type in assignment (different address spaces) virt/kvm/irqchip.c:233:13: expected struct kvm_irq_routing_table *old virt/kvm/irqchip.c:233:13: got struct kvm_irq_routing_table [noderef] *irq_routing Signed-off-by: Christian Borntraeger Reviewed-by: Paolo Bonzini virt/kvm/irqchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29b1a8ad7df4528b862a79e3d5fb0936f4d199c7 Author: Joel Fernandes Date: Thu Jul 6 16:00:23 2017 -0700 tracing: Attempt to record other information even if some fail In recent patches where we record comm and tgid at the same time, we skip continuing to record if any fail. Fix that by trying to record as many things as we can even if some couldn't be recorded. If any information isn't recorded, then we don't set trace_taskinfo_save as before. Link: http://lkml.kernel.org/r/20170706230023.17942-3-joelaf@google.com Cc: kernel-team@android.com Cc: Ingo Molnar Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit bd45d34d25720a820021c8ea45de5cd607eace64 Author: Joel Fernandes Date: Thu Jul 6 16:00:22 2017 -0700 tracing: Treat recording tgid for idle task as a success Currently we stop recording tgid for non-idle tasks when switching from/to idle task since we treat that as a record failure. Fix that by treat recording of tgid for idle task as a success. Link: http://lkml.kernel.org/r/20170706230023.17942-2-joelaf@google.com Cc: kernel-team@android.com Cc: Ingo Molnar Reported-by: Michael Sartain Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit eaf260ac04d9b4cf9f458d5c97555bfff2da526e Author: Joel Fernandes Date: Thu Jul 6 16:00:21 2017 -0700 tracing: Treat recording comm for idle task as a success Currently we stop recording comm for non-idle tasks when switching from/to idle task since we treat that as a record failure. Fix that by treat recording of comm for idle task as a success. Link: http://lkml.kernel.org/r/20170706230023.17942-1-joelaf@google.com Cc: kernel-team@android.com Cc: Ingo Molnar Reported-by: Michael Sartain Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ae1fbdff6dbcdfee9daee69fa1e7d26d1f31d1c7 Author: Gustavo A. R. Silva Date: Fri Jun 30 17:17:35 2017 -0500 ASoC: imx-ssi: add check on platform_get_irq return value Check return value from call to platform_get_irq(), so in case of failure print error message and propagate the return value. Signed-off-by: Gustavo A. R. Silva Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/imx-ssi.c | 4 ++++ 1 file changed, 4 insertions(+) commit bed8e280476fc8652f4105fe430e10fcf4032392 Author: Alexandre Belloni Date: Thu Jul 6 11:42:08 2017 +0200 rtc: ds1307: remove ds1307_remove ds1307_remove() is now empty, remove it Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 6 ------ 1 file changed, 6 deletions(-) commit abc925f72c666042bf49fbf590bed01e5dbc2c97 Author: Alexandre Belloni Date: Thu Jul 6 11:42:07 2017 +0200 rtc: ds1307: use generic nvmem Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 88 ++++++++++++------------------------------------ 1 file changed, 22 insertions(+), 66 deletions(-) commit 69b119a642b7e143be08f9cbabca7bc910f5720d Author: Alexandre Belloni Date: Thu Jul 6 11:42:06 2017 +0200 rtc: ds1307: switch to rtc_register_device This removes a possible race condition and crash and allows for further improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2a52482ffb1a65249049eaec9e3560a1e79abf3d Author: Alexandre Belloni Date: Thu Jul 6 11:42:05 2017 +0200 rtc: rv8803: remove rv8803_remove rv8803_remove() is now empty, remove it. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 6 ------ 1 file changed, 6 deletions(-) commit 16d70a78b45a65c88a3c614ebadbf2589f6f8efe Author: Alexandre Belloni Date: Thu Jul 6 11:42:04 2017 +0200 rtc: rv8803: use generic nvmem support Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 51 +++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 31 deletions(-) commit 7133eca19505defed19b1337f46b2cd5f7608814 Author: Alexandre Belloni Date: Thu Jul 6 11:42:03 2017 +0200 rtc: rv8803: switch to rtc_register_device This removes a possible race condition and allows for further improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 697e5a47aa12cdab6f2a8b284cc923cdf704eafc Author: Alexandre Belloni Date: Thu Jul 6 11:42:02 2017 +0200 rtc: add generic nvmem support Many RTCs have an on board non volatile storage. It can be battery backed RAM or an EEPROM. Use the nvmem subsystem to export it to both userspace and in-kernel consumers. This stays compatible with the previous (non documented) ABI that was using /sys/class/rtc/rtcx/device/nvram to export that memory. But will warn about the deprecation. Signed-off-by: Alexandre Belloni Documentation/rtc.txt | 2 + drivers/rtc/Kconfig | 8 ++++ drivers/rtc/Makefile | 1 + drivers/rtc/class.c | 4 ++ drivers/rtc/nvmem.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/rtc/rtc-core.h | 8 ++++ include/linux/rtc.h | 7 +++ 7 files changed, 143 insertions(+) commit 735ae2056b3c7296bb188d079c020f606a679c4a Author: Alexandre Belloni Date: Thu Jul 6 11:42:01 2017 +0200 rtc: at91rm9200: remove race condition While highly unlikely, it is possible to get an interrupt as soon as it is requested. In that case, at91_rtc_interrupt() will be called with rtc == NULL. Solve that by using devm_rtc_allocate_device/rtc_register_device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-at91rm9200.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 3068a254d5519cd5116f61297462da6d1aa84c20 Author: Alexandre Belloni Date: Thu Jul 6 11:42:00 2017 +0200 rtc: introduce new registration method Introduce rtc_register_device() to register an already allocated and initialized struct rtc_device. It automatically sets up the owner and the two steps allocation/registration will allow to remove race conditions in the IRQ handling of some driver. It also allows to properly extend the core without adding more arguments to rtc_device_register(). Signed-off-by: Alexandre Belloni drivers/rtc/class.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/rtc.h | 7 +++++ 2 files changed, 91 insertions(+) commit b91336df8ac2f5d15a2132074ba596580526db1d Author: Alexandre Belloni Date: Thu Jul 6 11:41:59 2017 +0200 rtc: class separate id allocation from registration Create rtc_device_get_id to allocate the id for an RTC. Signed-off-by: Alexandre Belloni drivers/rtc/class.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) commit d1bec20facd6eae17cb2f39ebbf443c95c650490 Author: Alexandre Belloni Date: Thu Jul 6 11:41:58 2017 +0200 rtc: class separate device allocation from registration Create rtc_allocate_device to allocate memory for a struct rtc_device and initialize it. Signed-off-by: Alexandre Belloni drivers/rtc/class.c | 63 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 26 deletions(-) commit 0e4524a5d341e719e8ee9ee7db5d58e2c5a4c10e Author: Christian Borntraeger Date: Thu Jul 6 14:44:28 2017 +0200 KVM: mark vcpu->pid pointer as rcu protected We do use rcu to protect the pid pointer. Mark it as such and adopt all code to use the proper access methods. This was detected by sparse. "virt/kvm/kvm_main.c:2248:15: error: incompatible types in comparison expression (different address spaces)" Signed-off-by: Christian Borntraeger Reviewed-by: Paolo Bonzini include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) commit 0eaf83de7ce201706f4fa38cf93d9dd20c2a9d24 Merge: 01c3521 d7f13f7 Author: David S. Miller Date: Fri Jul 7 11:35:55 2017 +0100 Merge tag 'mac80211-for-davem-2017-07-07' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== pull-request: mac80211 2017-07-07 Just got a set of fixes in from Jouni/QCA, all netlink validation fixes. I assume they ran some kind of checker, but I don't know what kind :) Please pull and let me know if there's any problem. ==================== Signed-off-by: David S. Miller commit c5c601c4295f89368f4a304cb3ae4aebdf80db22 Author: Marc Zyngier Date: Fri Jul 7 09:39:59 2017 +0100 irqdomain: Allow ACPI device nodes to be used as irqdomain identifiers A number of irqchip implementations are (ab)using the irqdomain allocator by passing a fwnode that is neither a FWNODE_OF or a FWNODE_IRQCHIP. This is pretty bad, but it also feels pretty crap to force these drivers to allocate their own irqchip_fwid when they already have a proper fwnode. Instead, let's teach the irqdomain allocator about ACPI device nodes, and add some lovely name generation code... Tested on an arm64 D05 system. Reported-and-tested-by: John Garry Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Cc: Agustin Vega-Frias Cc: Ma Jun Cc: Hanjun Guo Link: http://lkml.kernel.org/r/20170707083959.10349-1-marc.zyngier@arm.com kernel/irq/irqdomain.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit d7f13f7450369281a5d0ea463cc69890a15923ae Author: Srinivas Dasari Date: Fri Jul 7 01:43:42 2017 +0300 cfg80211: Validate frequencies nested in NL80211_ATTR_SCAN_FREQUENCIES validate_scan_freqs() retrieves frequencies from attributes nested in the attribute NL80211_ATTR_SCAN_FREQUENCIES with nla_get_u32(), which reads 4 bytes from each attribute without validating the size of data received. Attributes nested in NL80211_ATTR_SCAN_FREQUENCIES don't have an nla policy. Validate size of each attribute before parsing to avoid potential buffer overread. Fixes: 2a519311926 ("cfg80211/nl80211: scanning (and mac80211 update to use it)") Cc: stable@vger.kernel.org Signed-off-by: Srinivas Dasari Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg net/wireless/nl80211.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8feb69c7bd89513be80eb19198d48f154b254021 Author: Srinivas Dasari Date: Fri Jul 7 01:43:41 2017 +0300 cfg80211: Define nla_policy for NL80211_ATTR_LOCAL_MESH_POWER_MODE Buffer overread may happen as nl80211_set_station() reads 4 bytes from the attribute NL80211_ATTR_LOCAL_MESH_POWER_MODE without validating the size of data received when userspace sends less than 4 bytes of data with NL80211_ATTR_LOCAL_MESH_POWER_MODE. Define nla_policy for NL80211_ATTR_LOCAL_MESH_POWER_MODE to avoid the buffer overread. Fixes: 3b1c5a5307f ("{cfg,nl}80211: mesh power mode primitives and userspace access") Cc: stable@vger.kernel.org Signed-off-by: Srinivas Dasari Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg net/wireless/nl80211.c | 1 + 1 file changed, 1 insertion(+) commit 0a27844ce86d039d74221dd56cd8c0349b146b63 Author: Srinivas Dasari Date: Fri Jul 7 01:43:40 2017 +0300 cfg80211: Check if NAN service ID is of expected size nla policy checks for only maximum length of the attribute data when the attribute type is NLA_BINARY. If userspace sends less data than specified, cfg80211 may access illegal memory. When type is NLA_UNSPEC, nla policy check ensures that userspace sends minimum specified length number of bytes. Remove type assignment to NLA_BINARY from nla_policy of NL80211_NAN_FUNC_SERVICE_ID to make these NLA_UNSPEC and to make sure minimum NL80211_NAN_FUNC_SERVICE_ID_LEN bytes are received from userspace with NL80211_NAN_FUNC_SERVICE_ID. Fixes: a442b761b24 ("cfg80211: add add_nan_func / del_nan_func") Cc: stable@vger.kernel.org Signed-off-by: Srinivas Dasari Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9361df14d1cbf966409d5d6f48bb334384fbe138 Author: Srinivas Dasari Date: Fri Jul 7 01:43:39 2017 +0300 cfg80211: Check if PMKID attribute is of expected size nla policy checks for only maximum length of the attribute data when the attribute type is NLA_BINARY. If userspace sends less data than specified, the wireless drivers may access illegal memory. When type is NLA_UNSPEC, nla policy check ensures that userspace sends minimum specified length number of bytes. Remove type assignment to NLA_BINARY from nla_policy of NL80211_ATTR_PMKID to make this NLA_UNSPEC and to make sure minimum WLAN_PMKID_LEN bytes are received from userspace with NL80211_ATTR_PMKID. Fixes: 67fbb16be69d ("nl80211: PMKSA caching support") Cc: stable@vger.kernel.org Signed-off-by: Srinivas Dasari Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 09fc68dc66f7597bdc8898c991609a48f061bed5 Author: Al Viro Date: Thu Jun 29 22:25:14 2017 -0400 iov_iter: saner checks on copyin/copyout * might_fault() is better checked in caller (and e.g. fault-in + kmap_atomic codepath also needs might_fault() coverage) * we have already done object size checks * we have *NOT* done access_ok() recently enough; we rely upon the iovec array having passed sanity checks back when it had been created and not nothing having buggered it since. However, that's very much non-local, so we'd better recheck that. So the thing we want does not match anything in uaccess - we need access_ok + kasan checks + raw copy without any zeroing. Just define such helpers and use them here. Signed-off-by: Al Viro lib/iov_iter.c | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 16 deletions(-) commit e90998302682c41df4813da1ae019c8db79775f5 Author: Thomas Meyer Date: Thu Jul 6 00:34:05 2017 +0200 um: Add kerneldoc for userspace_tramp() and start_userspace() Also use correct function name spelling (stub_segv_handler) for better grepping Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger arch/um/os-Linux/skas/process.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 88af23381ac3a04e35974d9ece422c2b6ebe7775 Author: Thomas Meyer Date: Thu Jul 6 00:34:04 2017 +0200 um: Add kerneldoc for segv_handler Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger arch/um/kernel/trap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 171fa6928bcdf72372f98884b0abb93ad9b2e673 Author: Thomas Meyer Date: Thu Jul 6 00:32:33 2017 +0200 um: stub-data.h: remove superfluous include Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger arch/um/include/shared/skas/stub-data.h | 2 -- 1 file changed, 2 deletions(-) commit 22e19c8d062cc19832cde13225cbc6e5283cd969 Author: Thomas Meyer Date: Thu Jul 6 00:31:14 2017 +0200 um: userspace - be more verbose in ptrace set regs error When ptrace fails to set GP/FP regs for the target process, log the error before crashing the UML kernel. Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger arch/um/os-Linux/skas/process.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 01c3521f794ce945c586f99e93058df97358a8b6 Author: Christophe Jaillet Date: Fri Jul 7 06:56:16 2017 +0200 arcnet: com20020-pci: Fix an error handling path in 'com20020pci_probe()' If this memory allocation fails, we should go through the error handling path as done everywhere else in this function before returning. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/arcnet/com20020-pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit df7c7dd2509f5f8e1f230ac71dfbf2846cc1dc0f Author: Jakub Kicinski Date: Thu Jul 6 17:29:05 2017 -0700 nfp: flower: add missing clean up call to avoid memory leaks nfp_flower_metadata_cleanup() is defined but never invoked, not calling it will cause us to leak mask and statistics queue memory on the host. Fixes: 43f84b72c50d ("nfp: add metadata to each flow offload") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 1 + 1 file changed, 1 insertion(+) commit f610c9d68b1a47f539b7764f4b5ce07d32fb9ae1 Author: Thomas Gleixner Date: Fri Jul 7 08:57:57 2017 +0200 genirq/debugfs: Remove redundant NULL pointer check debugfs_remove() can be called with a NULL pointer. Fixes: 087cdfb662ae5 ("genirq/debugfs: Add proper debugfs interface") Reported-by: Fengguang Wu Signed-off-by: Thomas Gleixner kernel/irq/irqdomain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 016a5fec19e191ed1d45f75d8bfbefdec3f2dada Author: Damien Le Moal Date: Wed Jun 28 14:58:57 2017 +0900 target: pscsi: Introduce TYPE_ZBC support TYPE_ZBC host managed zoned block devices are also block devices despite the non-standard device type (14h). Handle them similarly to regular TYPE_DISK devices. Signed-off-by: Damien Le Moal Signed-off-by: Nicholas Bellinger drivers/target/target_core_pscsi.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit e5dc9a7055c98bcd7b03f9735d5f2ec2b7f0d897 Author: Damien Le Moal Date: Wed Jun 28 14:58:56 2017 +0900 target: Use macro for WRITE_VERIFY_32 operation codes Add WRITE_VERIFY_32 definition to scsi prototypes and use this macro definition isntead of the hard coded value. (Drop WRITE_VERIFY_16 that's already part of another patch - nab) Signed-off-by: Damien Le Moal Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 2 +- include/scsi/scsi_proto.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 402242c904432207515e3ccb4126ff0dcfba89ca Author: Mike Christie Date: Wed May 31 15:52:43 2017 -0500 target: fix SAM_STAT_BUSY/TASK_SET_FULL handling If the scsi status was not SAM_STAT_GOOD or there was no transport sense, we would ignore the scsi status and do a generic not ready LUN communication failure check condition failure. The problem is that LUN COMM failure is treated as a hard error sometimes and will cause apps to get IO errors instead of the OS's SCSI layer retrying. For example, the tcmu daemon will return SAM_STAT_QUEUE_FULL when memory runs low and can still make progress but wants the initiator to reduce the work load. Windows will fail this error directly the app instead of retrying. This patch is based on Nick's "target/iblock: Use -EAGAIN/-ENOMEM to propigate SAM BUSY/TASK_SET_FULL" patch here: http://comments.gmane.org/gmane.linux.scsi.target.devel/11301 but instead of only setting SAM_STAT_GOOD, SAM_STAT_TASK_SET_FULL and SAM_STAT_BUSY as success, it sets all non check condition status as success so they are passed back to the initiator, so passthrough type backends can return all SCSI status codes. Since only passthrough uses this, I was not sure if we wanted to add checks for non-passthrough and specific codes. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 1a444175486026c1a280507f8d82094909acddd2 Author: Mike Christie Date: Wed May 31 15:52:42 2017 -0500 target: remove transport_complete transport_complete is no longer used, so drop the code. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 6 ------ include/target/target_core_backend.h | 4 ---- 2 files changed, 10 deletions(-) commit dce6ce8cfb842c333094c3eb2e3ea66b1edb02ad Author: Mike Christie Date: Wed May 31 15:52:41 2017 -0500 pscsi: finish cmd processing from pscsi_req_done This patch performs the pscsi_transport_complete operations from pscsi_req_done. It looks like the only difference the transport_complete callout provides is that it is called under t_state_lock which seems to only be needed for the SCF_TRANSPORT_TASK_SENSE bit handling. We can now use transport_copy_sense_to_cmd to handle the se_cmd sense bits, and we can then drop the code where we have to copy the request info to the pscsi_plugin_task for transport_complete use. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_pscsi.c | 38 ++++++++++++++++---------------------- drivers/target/target_core_pscsi.h | 4 ---- 2 files changed, 16 insertions(+), 26 deletions(-) commit 406f74c20dc258f8258b64d16d159c3fff06a506 Author: Mike Christie Date: Wed May 31 15:52:40 2017 -0500 tcmu: fix sense handling during completion We were just copying the sense to the cmd sense_buffer and did not implement a transport_complete or set the SCF_TRANSPORT_TASK_SENSE, so the sense was ignored. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c6d66aba98a39cfed206c5c61f0a604ba09b26ce Author: Mike Christie Date: Wed May 31 15:52:39 2017 -0500 target: add helper to copy sense to se_cmd buffer This adds a helper to copy sense from backend module buffer to the se_cmd's sense buffer. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 18 ++++++++++++++++++ include/target/target_core_backend.h | 2 ++ 2 files changed, 20 insertions(+) commit 9fe36984501035f2878aa10d83e79bfc07b7ad7e Author: Mike Christie Date: Wed May 31 15:52:38 2017 -0500 target: do not require a transport_complete for SCF_TRANSPORT_TASK_SENSE tcmu needs to pass raw sense to target_complete_cmd, but a a transport_complete callout is akward to implement for it. This moves the check for SCF_TRANSPORT_TASK_SENSE so any backend can pass sense. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c82ff239ecf27dd5eddc91540f50321547a2d311 Author: Colin Ian King Date: Tue Jul 4 09:44:19 2017 +0100 target: make device_mutex and device_list static Variables device_mutex and device_list static are local to the source, so make them static. Cleans up sparse warnings: "symbol 'device_list' was not declared. Should it be static?" "symbol 'device_mutex' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d62bc0e6d79b11e3298e831358155930fb8f5e3 Author: Xiubo Li Date: Fri Jun 30 16:14:16 2017 +0800 tcmu: Fix flushing cmd entry dcache page When feeding the tcmu's cmd ring, we need to flush the dcache page for the cmd entry to make sure these kernel stores are visible to user space mappings of that page. For the none PAD cmd entry, this will be flushed at the end of the tcmu_queue_cmd_ring(). Signed-off-by: Xiubo Li Reviewed-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9260695d65590f4711d1166eadbfcb0acfa0625a Author: Mike Christie Date: Fri Jun 23 01:18:20 2017 -0500 tcmu: fix multiple uio open/close sequences If the uio device is open and closed multiple times, the kref count will be off due to tcmu_release getting called multiple times for each close. This patch integrates Wenji Tang's patch to add a kref_get on open that now matches the kref_put done on tcmu_release and adds a kref_put in tcmu_destroy_device to match the kref_get done in succesful tcmu_configure_device calls. Signed-off-by: Mike Christie Cc: Wenji Tang Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 531283ff7593f7059ced43c725d90cec3e5af549 Author: Mike Christie Date: Fri Jun 23 01:18:19 2017 -0500 tcmu: drop configured check in destroy destroy_device is only called if we have successfully run configure_device, so drop the duplicate tcmu_dev_configured check. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit be50f538e9a5081c61a78faf58c5591c94064633 Author: Mike Christie Date: Fri Jun 23 01:18:18 2017 -0500 target: remove g_device_list g_device_list is no longer needed because we now use the idr code for lookups and seaches. Signed-off-by: Mike Christie Reviewed-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 30 ++++++++++++------------------ drivers/target/target_core_internal.h | 3 --- include/target/target_core_base.h | 1 - 3 files changed, 12 insertions(+), 22 deletions(-) commit 6906d008b4b06e42cad393ac25bec76fbf31fabd Author: Mike Christie Date: Fri Jun 23 01:18:17 2017 -0500 xcopy: loop over devices using idr helper This converts the xcopy code to use the idr helper. The next patch will drop the g_device_list and make g_device_mutex local to the target_core_device.c file. Signed-off-by: Mike Christie Reviewed-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/target_core_xcopy.c | 70 ++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 29 deletions(-) commit b1943fd454d1a2e2c8018a2f79a7023893619439 Author: Mike Christie Date: Fri Jun 23 01:18:16 2017 -0500 target: add helper to iterate over devices This adds a wrapper around idr_for_each so the xcopy code can loop over the devices in the next patch. Signed-off-by: Mike Christie Reviewed-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 45 +++++++++++++++++++++++++++++++++++ drivers/target/target_core_internal.h | 2 ++ 2 files changed, 47 insertions(+) commit b3af66e24393f03ef81db17a11387d9e6174bd01 Author: Mike Christie Date: Fri Jun 23 01:18:15 2017 -0500 tcmu: perfom device add, del and reconfig synchronously This makes the device add, del reconfig operations sync. It fixes the issue where for add and reconfig, we do not know if userspace successfully completely the operation, so we leave invalid kernel structs or report incorrect status for the config/reconfig operations. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 213 ++++++++++++++++++++++++++++++---- include/uapi/linux/target_core_user.h | 7 ++ 2 files changed, 200 insertions(+), 20 deletions(-) commit 85441e6b8c97964a6da72135dc21f708adbdc4d8 Author: Mike Christie Date: Fri Jun 23 01:18:14 2017 -0500 target: add helper to find se_device by dev_index This adds a helper to find a se_device by dev_index. It will be used in the next patches so tcmu's netlink interface can execute commands on specific devices. Signed-off-by: Mike Christie Reviewed-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 24 ++++++++++++++++++++++++ include/target/target_core_backend.h | 2 ++ 2 files changed, 26 insertions(+) commit 0a5eee647b78e53da05e081362f42a11b4b674eb Author: Mike Christie Date: Fri Jun 23 01:18:13 2017 -0500 target: use idr for se_device dev index In the next patches we will add tcmu netlink support that allows userspace to send commands to target_core_user. To execute operations on a se_device/tcmu_dev we need to be able to look up a dev by any old id. This patch replaces the se_device->dev_index with a idr created id. The next patches will also remove the g_device_list and replace it with the idr. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 30 ++++++++++++++++++++++++++---- include/target/target_core_base.h | 1 - 2 files changed, 26 insertions(+), 5 deletions(-) commit 926347061ef1f4d3873829fd1960c6e4b965aa9f Author: Mike Christie Date: Fri Jun 23 01:18:12 2017 -0500 target: break up free_device callback With this patch free_device is now used to free what is allocated in the alloc_device callback and destroy_device tears down the resources that are setup in the configure_device callback. This patch will be needed in the next patch where tcmu needs to be able to look up the device in the destroy callback. Signed-off-by: Mike Christie Reviewed-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 2 ++ drivers/target/target_core_file.c | 7 ++++++- drivers/target/target_core_iblock.c | 8 ++++++-- drivers/target/target_core_pscsi.c | 7 ++++++- drivers/target/target_core_rd.c | 7 ++++++- drivers/target/target_core_user.c | 12 +++++++++--- include/target/target_core_backend.h | 1 + 7 files changed, 36 insertions(+), 8 deletions(-) commit 2d76443e02f260d7a5bd0ede1851ae5534f0c68d Author: Mike Christie Date: Mon Jun 12 01:34:28 2017 -0500 tcmu: reconfigure netlink attr changes 1. TCMU_ATTR_TYPE is too generic when it describes only the reconfiguration type, so rename to TCMU_ATTR_RECONFIG_TYPE. 2. Only return the reconfig type when it is a TCMU_CMD_RECONFIG_DEVICE command. 3. CONFIG_* type is not needed. We can pass the value along with an ATTR to userspace, so it does not need to read sysfs/configfs. 4. Fix leak in tcmu_dev_path_store and rename to dev_config to reflect it is more than just a path that can be changed. 6. Don't update kernel struct value if netlink sending fails. Signed-off-by: Mike Christie Reviewed-by: "Bryant G. Ly" Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 73 +++++++++++++++++++++-------------- include/uapi/linux/target_core_user.h | 12 ++---- 2 files changed, 48 insertions(+), 37 deletions(-) commit 5f572526a18418258bfa137e3353656c25439500 Author: Nicholas Bellinger Date: Fri Jun 30 00:08:13 2017 -0700 qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT This patch drops two incorrect usages of tcm_qla2xxx_free_cmd() during TMR ABORT within tcm_qla2xxx_handle_data_work() and tcm_qla2xxx_aborted_task(), which where attempting to dispatch into workqueue context to do tcm_qla2xxx_complete_free() and subsequently invoke transport_generic_free_cmd(). This is incorrect because during TMR ABORT target-core will drop the outstanding se_cmd->cmd_kref references once it has quiesced the se_cmd via transport_wait_for_tasks(), and in the case of qla2xxx it should not attempt to do it's own transport_generic_free_cmd() once the abort has occured. As reported by Pascal, this was originally manifesting as a BUG_ON(cmd->cmd_in_wq) in qlt_free_cmd() during TMR ABORT, with a LIO backend that had sufficently high enough WRITE latency to trigger a host side TMR ABORT_TASK. In addition, for the case in tcm_qla2xxx_write_pending_status() and tcm_qla2xxx_handle_data_work() that waits for outstanding FCP WRITE data transfer to complete before preceeding with a TMR ABORT, avoid se_cmd->t_transport_stop_comp that is already used by transport_wait_for_tasks() and use a qla2xxx internal struct completion instead. Reported-by: Pascal de Bruijn Tested-by: Pascal de Bruijn Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: # 3.10+ Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 4 ++++ drivers/scsi/qla2xxx/qla_target.h | 1 + drivers/scsi/qla2xxx/tcm_qla2xxx.c | 36 +++--------------------------------- 3 files changed, 8 insertions(+), 33 deletions(-) commit fce50a2fa4e9c6e103915c351b6d4a98661341d6 Author: Nicholas Bellinger Date: Thu Jun 29 22:21:31 2017 -0700 iser-target: Avoid isert_conn->cm_id dereference in isert_login_recv_done This patch fixes a NULL pointer dereference in isert_login_recv_done() of isert_conn->cm_id due to isert_cma_handler() -> isert_connect_error() resetting isert_conn->cm_id = NULL during a failed login attempt. As per Sagi, we will always see the completion of all recv wrs posted on the qp (given that we assigned a ->done handler), this is a FLUSH error completion, we just don't get to verify that because we deref NULL before. The issue here, was the assumption that dereferencing the connection cm_id is always safe, which is not true since: commit 4a579da2586bd3b79b025947ea24ede2bbfede62 Author: Sagi Grimberg Date: Sun Mar 29 15:52:04 2015 +0300 iser-target: Fix possible deadlock in RDMA_CM connection error As I see it, we have a direct reference to the isert_device from isert_conn which is the one-liner fix that we actually need like we do in isert_rdma_read_done() and isert_rdma_write_done(). Reported-by: Andrea Righi Tested-by: Andrea Righi Reviewed-by: Sagi Grimberg Cc: # 3.10+ Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5821783bcaa94f4a00d65effb3fb8937b08cb2ae Author: Colin Ian King Date: Tue Jun 13 14:29:09 2017 +0100 tcmu: make array tcmu_attrib_attrs static const The array tcmu_attrib_attrs does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'tcmu_attrib_attrs' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07932a023af3cd728390ffdaeffb78e357123181 Author: Xiubo Li Date: Thu Jun 15 15:05:31 2017 +0800 tcmu: Fix module removal due to stuck unmap_thread thread again Because the unmap code just after the schdule() returned may take a long time and if the kthread_stop() is fired just when in this routine, the module removal maybe stuck too. Signed-off-by: Xiubo Li Reviewed-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d6ef276594a781686058802996e09c8550fd767 Author: Jiang Yi Date: Sun Jun 25 12:28:50 2017 -0700 target: Fix COMPARE_AND_WRITE caw_sem leak during se_cmd quiesce This patch addresses a COMPARE_AND_WRITE se_device->caw_sem leak, that would be triggered during normal se_cmd shutdown or abort via __transport_wait_for_tasks(). This would occur because target_complete_cmd() would catch this early and do complete_all(&cmd->t_transport_stop_comp), but since target_complete_ok_work() or target_complete_failure_work() are never called to invoke se_cmd->transport_complete_callback(), the COMPARE_AND_WRITE specific callbacks never release caw_sem. To address this special case, go ahead and release caw_sem directly from target_complete_cmd(). (Remove '&& success' from check, to release caw_sem regardless of scsi_status - nab) Signed-off-by: Jiang Yi Cc: # 3.14+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8a45885c1514cdae2ee64b5ac03ffc00a1a8a9d7 Author: Bryant G. Ly Date: Tue Jun 6 09:28:52 2017 -0500 tcmu: Add Type of reconfig into netlink This patch adds more info about the attribute being changed, so that usersapce can easily figure out what is happening. Signed-off-by: Bryant G. Ly Reviewed-By: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 20 ++++++++++++++------ include/uapi/linux/target_core_user.h | 8 ++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) commit ee01825220f01c0befea25f08325962fa9374ee2 Author: Bryant G. Ly Date: Tue Jun 6 09:28:51 2017 -0500 tcmu: Make dev_config configurable This allows for userspace to change the device path after it has been created. Thus giving the user the ability to change the path. The use case for this is to allow for virtual optical to have media change. Signed-off-by: Bryant G. Ly Reviewed-By: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 801fc54d5d943e8a6a6bc26bc94fb9b90938ff68 Author: Bryant G. Ly Date: Tue Jun 6 09:28:50 2017 -0500 tcmu: Make dev_size configurable via userspace Allow tcmu backstores to be able to set the device size after it has been configured via set attribute. Part of support in userspace to support certain backstores changing device size. Signed-off-by: Bryant G. Ly Reviewed-By: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 59 +++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 5 deletions(-) commit 1068be7bd4b05ca41a6a8de724f52a9c87861412 Author: Bryant G. Ly Date: Tue Jun 6 09:28:49 2017 -0500 tcmu: Add netlink for device reconfiguration This gives tcmu the ability to handle events that can cause reconfiguration, such as resize, path changes, write_cache, etc... Signed-off-by: Bryant G. Ly Reviewed-By: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 12 ++++++++++++ include/uapi/linux/target_core_user.h | 1 + 2 files changed, 13 insertions(+) commit 9a8bb60650b3d6994bd19a3200941f029c95a7a0 Author: Bryant G. Ly Date: Tue Jun 6 09:28:48 2017 -0500 tcmu: Support emulate_write_cache This will enable the toggling of write_cache in tcmu through targetcli-fb Signed-off-by: Bryant G. Ly Reviewed-By: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit e9447a46e9fba006ff9b0f4e40a4e38bf2d788db Author: Bryant G. Ly Date: Tue Jun 6 15:45:49 2017 -0500 ibmvscsis: Use tpgt passed in by user ibmvscsis always returned 0 for the tpg/tag, since it did not parse the value passed in by the user. When functions like ALUA members exports the value, it will be incorrect because targetcli/rtslib starts the tpg numbering at 1. Signed-off-by: Bryant G. Ly Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8fa4011e0dd9423f1226f2f9769a1cf25c264468 Author: Bart Van Assche Date: Tue May 23 16:48:45 2017 -0700 target/iscsi: Remove dead code from iscsit_process_scsi_cmd() If an iSCSI command is rejected before iscsit_process_scsi_cmd() is called, .reject_reason is set but iscsit_process_scsi_cmd() is not called. This means that the "if (cmd->reject_reason) ..." code in this function can be removed without changing the behavior of this function. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d1c26857cdec3e3bdb5cf7179411f6ce8cc0834c Author: Bart Van Assche Date: Tue May 23 16:48:44 2017 -0700 target/iscsi: Simplify iscsit_free_cmd() Since .se_tfo is only set if a command has been submitted to the LIO core, check .se_tfo instead of .iscsi_opcode. Since __iscsit_free_cmd() only affects SCSI commands but not TMFs, calling that function for TMFs does not change behavior. This patch does not change the behavior of iscsit_free_cmd(). Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_util.c | 39 ++++---------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) commit 4412a67131a037fa1d032bcd50270e9d336a775d Author: Bart Van Assche Date: Tue May 23 16:48:43 2017 -0700 target/iscsi: Remove second argument of __iscsit_free_cmd() Initialize .data_direction to DMA_NONE in iscsit_allocate_cmd() such that the second argument of __iscsit_free_cmd() can be left out. Note: this patch causes the first part of __iscsit_free_cmd() no longer to be skipped for TMFs. That's fine since no data segments are associated with TMFs. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 4 +--- drivers/target/iscsi/iscsi_target_util.c | 29 +++++++++++++---------------- drivers/target/iscsi/iscsi_target_util.h | 2 +- 3 files changed, 15 insertions(+), 20 deletions(-) commit 4c1f0e65397f4e5768b955c32489d5b4b6b92a90 Author: Bart Van Assche Date: Tue May 23 16:48:42 2017 -0700 target/tcm_loop: Make TMF processing slightly faster Target drivers must guarantee that struct se_cmd and struct se_tmr_req exist as long as target_tmr_work() is in progress. This is why the tcm_loop driver today passes 1 as second argument to transport_generic_free_cmd() from inside the TMF code. Instead of making the TMF code wait, make the TMF code obtain two references (SCF_ACK_KREF) and drop one reference from inside the .check_stop_free() callback. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/loopback/tcm_loop.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 75f141aaf48e13812b4fee914a66f6fce28b543f Author: Bart Van Assche Date: Tue May 23 16:48:41 2017 -0700 target/tcm_loop: Use target_submit_tmr() instead of open-coding this function Use target_submit_tmr() instead of open-coding this function. The only functional change is that TMFs are now added to sess_cmd_list, something the current code does not do. This behavior change is a bug fix because it makes LUN RESETs wait for other TMFs that are in progress for the same LUN. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/loopback/tcm_loop.c | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) commit d17203c41185a05ecd4d1fc647f16b17ab1b27ae Author: Bart Van Assche Date: Tue May 23 16:48:40 2017 -0700 target/tcm_loop: Replace a waitqueue and a counter by a completion This patch simplifies the implementation of the tcm_loop driver but does not change its behavior. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/loopback/tcm_loop.c | 12 ++++-------- drivers/target/loopback/tcm_loop.h | 3 +-- 2 files changed, 5 insertions(+), 10 deletions(-) commit 4d3895d5ea43cf40fd707692263c6f0988fe8d70 Author: Bart Van Assche Date: Tue May 23 16:48:39 2017 -0700 target/tcm_loop: Merge struct tcm_loop_cmd and struct tcm_loop_tmr This patch simplifies the tcm_loop implementation but does not change any functionality. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/loopback/tcm_loop.c | 22 ++++++++-------------- drivers/target/loopback/tcm_loop.h | 7 ++----- 2 files changed, 10 insertions(+), 19 deletions(-) commit f33f79f3d0e5caf04dd889cd7cf636261970f009 Author: Hui Wang Date: Fri Jul 7 12:08:29 2017 +0800 ALSA: hda/realtek - change the location for one of two front microphones On this Lenovo machine, there are two front mics, and both of them are assigned the same name "Mic", but pulseaudio can't support two mics with the same name, as a workaround, we change the location for one of them, then the driver will assign "Front Mic" and "Mic" for them. Cc: stable@vger.kernel.org Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c00e6220231542c6409780a3e9bfa44be7d94f3a Author: Bart Van Assche Date: Tue May 23 16:48:28 2017 -0700 target: Introduce a function that shows the command state Introduce target_show_cmd() and use it where appropriate. If transport_wait_for_tasks() takes too long, make it show the state of the command it is waiting for. (Add missing brackets around multi-line conditions - nab) Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 18 ++--- drivers/target/target_core_transport.c | 122 +++++++++++++++++++++++++++++---- include/target/target_core_fabric.h | 1 + 3 files changed, 114 insertions(+), 27 deletions(-) commit 03db016a1bf2d35f41c08aad2ca4f4f18eeda4be Author: Nicholas Bellinger Date: Fri Jun 2 23:33:56 2017 -0700 iscsi-target: Kill left-over iscsi_target_do_cleanup With commit 25cdda95fda7 in place to address the initial login PDU asynchronous socket close OOPs, go ahead and kill off the left-over iscsi_target_do_cleanup() and ->login_cleanup_work. Reported-by: Mike Christie Cc: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_nego.c | 24 ------------------------ include/target/iscsi/iscsi_target_core.h | 1 - 2 files changed, 25 deletions(-) commit af90e84d1f535827f4c593436a807b1efa9f6f2b Author: Bart Van Assche Date: Tue May 23 16:48:38 2017 -0700 xen/scsiback: Make TMF processing slightly faster Target drivers must guarantee that struct se_cmd and struct se_tmr_req exist as long as target_tmr_work() is in progress. Since the last access by the LIO core is a call to .check_stop_free() and since the Xen scsiback .check_stop_free() drops a reference to the TMF, it is already guaranteed that the struct se_cmd that corresponds to the TMF exists as long as target_tmr_work() is in progress. Hence change the second argument of transport_generic_free_cmd() from 1 into 0. Signed-off-by: Bart Van Assche Reviewed-by: Juergen Gross Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp Cc: xen-devel@lists.xenproject.org Signed-off-by: Nicholas Bellinger drivers/xen/xen-scsiback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3eac12442c2678d64b655e9768bda1be65e0b68 Author: Bart Van Assche Date: Tue May 23 16:48:37 2017 -0700 xen/scsiback: Replace a waitqueue and a counter by a completion This patch simplifies the implementation of the scsiback driver but does not change its behavior. Signed-off-by: Bart Van Assche Reviewed-by: Juergen Gross Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp Cc: xen-devel@lists.xenproject.org Signed-off-by: Nicholas Bellinger drivers/xen/xen-scsiback.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 9f4ab18ac51dc87345a9cbd2527e6acf7a0a9335 Author: Bart Van Assche Date: Tue May 23 16:48:36 2017 -0700 xen/scsiback: Fix a TMR related use-after-free scsiback_release_cmd() must not dereference se_cmd->se_tmr_req because that memory is freed by target_free_cmd_mem() before scsiback_release_cmd() is called. Fix this use-after-free by inlining struct scsiback_tmr into struct vscsibk_pend. Signed-off-by: Bart Van Assche Reviewed-by: Juergen Gross Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp Cc: xen-devel@lists.xenproject.org Cc: # 3.18+ Signed-off-by: Nicholas Bellinger drivers/xen/xen-scsiback.c | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) commit 13fdd4458ed1b808946fd7baba657b6a51d3c72b Author: Bart Van Assche Date: Tue May 23 16:48:35 2017 -0700 IB/srpt: Make a debug statement in srpt_abort_cmd() more informative Do not only report the state of the I/O context before srpt_abort_cmd() was called but also the new state assigned by srpt_abort_cmd() Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Doug Ledford Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/srpt/ib_srpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d877d7275be34ad70ce92bcbb4bb36cec77ed004 Author: Bart Van Assche Date: Tue May 23 16:48:29 2017 -0700 target: Fix a deadlock between the XCOPY code and iSCSI session shutdown Move the code for parsing an XCOPY command from the context of the iSCSI receiver thread to the context of the XCOPY workqueue. Keep the simple XCOPY checks in the context of the iSCSI receiver thread. Move the code for allocating and freeing struct xcopy_op from the code that parses an XCOPY command to its caller. This patch fixes the following deadlock: ====================================================== [ INFO: possible circular locking dependency detected ] 4.10.0-rc7-dbg+ #1 Not tainted ------------------------------------------------------- rmdir/13321 is trying to acquire lock: (&sess->cmdsn_mutex){+.+.+.}, at: [] iscsit_free_all_ooo_cmdsns+0x2d/0xb0 [iscsi_target_mod] but task is already holding lock: (&sb->s_type->i_mutex_key#14){++++++}, at: [] vfs_rmdir+0x50/0x140 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sb->s_type->i_mutex_key#14){++++++}: lock_acquire+0x71/0x90 down_write+0x3f/0x70 configfs_depend_item+0x3a/0xb0 [configfs] target_depend_item+0x13/0x20 [target_core_mod] target_xcopy_locate_se_dev_e4+0xdd/0x1a0 [target_core_mod] target_do_xcopy+0x34b/0x970 [target_core_mod] __target_execute_cmd+0x22/0xa0 [target_core_mod] target_execute_cmd+0x233/0x2c0 [target_core_mod] iscsit_execute_cmd+0x208/0x270 [iscsi_target_mod] iscsit_sequence_cmd+0x10b/0x190 [iscsi_target_mod] iscsit_get_rx_pdu+0x37d/0xcd0 [iscsi_target_mod] iscsi_target_rx_thread+0x6e/0xa0 [iscsi_target_mod] kthread+0x102/0x140 ret_from_fork+0x31/0x40 -> #0 (&sess->cmdsn_mutex){+.+.+.}: __lock_acquire+0x10e6/0x1260 lock_acquire+0x71/0x90 mutex_lock_nested+0x5f/0x670 iscsit_free_all_ooo_cmdsns+0x2d/0xb0 [iscsi_target_mod] iscsit_close_session+0xac/0x200 [iscsi_target_mod] lio_tpg_close_session+0x9f/0xb0 [iscsi_target_mod] target_shutdown_sessions+0xc3/0xd0 [target_core_mod] core_tpg_del_initiator_node_acl+0x91/0x140 [target_core_mod] target_fabric_nacl_base_release+0x20/0x30 [target_core_mod] config_item_release+0x5a/0xc0 [configfs] config_item_put+0x1d/0x1f [configfs] configfs_rmdir+0x1a6/0x300 [configfs] vfs_rmdir+0xb7/0x140 do_rmdir+0x1f4/0x200 SyS_rmdir+0x11/0x20 entry_SYSCALL_64_fastpath+0x23/0xc6 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#14); lock(&sess->cmdsn_mutex); lock(&sb->s_type->i_mutex_key#14); lock(&sess->cmdsn_mutex); *** DEADLOCK *** 3 locks held by rmdir/13321: #0: (sb_writers#10){.+.+.+}, at: [] mnt_want_write+0x1f/0x50 #1: (&default_group_class[depth - 1]#2/1){+.+.+.}, at: [] do_rmdir+0x15e/0x200 #2: (&sb->s_type->i_mutex_key#14){++++++}, at: [] vfs_rmdir+0x50/0x140 stack backtrace: CPU: 2 PID: 13321 Comm: rmdir Not tainted 4.10.0-rc7-dbg+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 Call Trace: dump_stack+0x86/0xc3 print_circular_bug+0x1c7/0x220 __lock_acquire+0x10e6/0x1260 lock_acquire+0x71/0x90 mutex_lock_nested+0x5f/0x670 iscsit_free_all_ooo_cmdsns+0x2d/0xb0 [iscsi_target_mod] iscsit_close_session+0xac/0x200 [iscsi_target_mod] lio_tpg_close_session+0x9f/0xb0 [iscsi_target_mod] target_shutdown_sessions+0xc3/0xd0 [target_core_mod] core_tpg_del_initiator_node_acl+0x91/0x140 [target_core_mod] target_fabric_nacl_base_release+0x20/0x30 [target_core_mod] config_item_release+0x5a/0xc0 [configfs] config_item_put+0x1d/0x1f [configfs] configfs_rmdir+0x1a6/0x300 [configfs] vfs_rmdir+0xb7/0x140 do_rmdir+0x1f4/0x200 SyS_rmdir+0x11/0x20 entry_SYSCALL_64_fastpath+0x23/0xc6 Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_xcopy.c | 110 +++++++++++++++++++++++-------------- 1 file changed, 69 insertions(+), 41 deletions(-) commit a85d667e58bddf73be84d1981b41eaac985ed216 Author: Bart Van Assche Date: Tue May 23 16:48:27 2017 -0700 target: Use {get,put}_unaligned_be*() instead of open coding these functions Introduce the function get_unaligned_be24(). Use {get,put}_unaligned_be*() where appropriate. This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_alua.c | 8 +-- drivers/target/target_core_device.c | 8 +-- drivers/target/target_core_fabric_lib.c | 6 +- drivers/target/target_core_pr.c | 99 +++++++-------------------------- drivers/target/target_core_pscsi.c | 20 +++---- drivers/target/target_core_sbc.c | 59 +++++--------------- drivers/target/target_core_spc.c | 42 +++++++------- drivers/target/target_core_xcopy.c | 4 +- include/target/target_core_backend.h | 8 +++ 9 files changed, 83 insertions(+), 171 deletions(-) commit f2b72d6a8eed0eb02e6346886514a27df1efe827 Author: Bart Van Assche Date: Tue May 23 16:48:24 2017 -0700 target: Fix transport_init_se_cmd() Avoid that aborting a command before it has been submitted onto a workqueue triggers the following warning: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 3 PID: 46 Comm: kworker/u8:1 Not tainted 4.12.0-rc2-dbg+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 Workqueue: tmr-iblock target_tmr_work [target_core_mod] Call Trace: dump_stack+0x86/0xcf register_lock_class+0xe8/0x570 __lock_acquire+0xa1/0x11d0 lock_acquire+0x59/0x80 flush_work+0x42/0x2b0 __cancel_work_timer+0x10c/0x180 cancel_work_sync+0xb/0x10 core_tmr_lun_reset+0x352/0x740 [target_core_mod] target_tmr_work+0xd6/0x130 [target_core_mod] process_one_work+0x1ca/0x3f0 worker_thread+0x49/0x3b0 kthread+0x109/0x140 ret_from_fork+0x31/0x40 Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 1 + 1 file changed, 1 insertion(+) commit 9f2f342892e15f8600939ec8d06caf963ccff880 Author: Bart Van Assche Date: Tue May 23 16:48:23 2017 -0700 target: Remove se_device.dev_list The last user of se_device.dev_list was removed through commit 0fd97ccf45be ("target: kill struct se_subsystem_dev"). Hence also remove se_device.dev_list. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 1 - include/target/target_core_base.h | 2 -- 2 files changed, 3 deletions(-) commit 3e182db787714b373d4b1a1fd7dba4a581e8e406 Author: Bart Van Assche Date: Tue May 23 16:48:22 2017 -0700 target: Use symbolic value for WRITE_VERIFY_16 Now that a symbolic value has been introduced for WRITE_VERIFY_16, use it. This patch does not change any functionality. References: commit c2d26f18dcbc ("target: Add WRITE_VERIFY_16") Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Bryant G. Ly Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb5ae2335a84cccf45ec01602bc300c3e70486d0 Author: Nicholas Bellinger Date: Sat Jun 3 07:07:21 2017 -0700 qla2xxx: Convert QLA_TGT_ABTS to TARGET_SCF_LOOKUP_LUN_FROM_TAG Following Himanshu's earlier patch to drop the redundant tag lookup within __qlt_24xx_handle_abts(), go ahead and drop this now QLA_TGT_ABTS can use TARGET_SCF_LOOKUP_LUN_FROM_TAG and have target_submit_tmr() do this from common code. Reviewed-by: Himanshu Madhani Acked-by: Himanshu Madhani Reviewed-by: Quinn Tran Cc: Mike Christie Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 39 +++++++++----------------------------- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 +++- 2 files changed, 12 insertions(+), 31 deletions(-) commit 5465e7d3b99bbaa823ae4f8e538543e7d6cdc530 Author: Nicholas Bellinger Date: Sat Jun 3 06:55:50 2017 -0700 target: Add TARGET_SCF_LOOKUP_LUN_FROM_TAG support for ABORT_TASK This patch introduces support in target_submit_tmr() for locating a unpacked_lun from an existing se_cmd->tag during ABORT_TASK. When TARGET_SCF_LOOKUP_LUN_FROM_TAG is set, target_submit_tmr() will do the extra lookup via target_lookup_lun_from_tag() and subsequently invoke transport_lookup_tmr_lun() so a proper percpu se_lun->lun_ref is taken before workqueue dispatch into se_device->tmr_wq happens. Aside from the extra target_lookup_lun_from_tag(), the existing code-path remains unchanged. Reviewed-by: Himanshu Madhani Reviewed-by: Quinn Tran Cc: Mike Christie Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 53 ++++++++++++++++++++++++++++------ include/target/target_core_base.h | 3 +- 2 files changed, 46 insertions(+), 10 deletions(-) commit eeb64d239ea664592ff8f1bce5546209a6593df5 Author: Nicholas Bellinger Date: Sat Jun 3 06:41:03 2017 -0700 target: Add support for TMR percpu reference counting This patch introduces TMR percpu reference counting using se_lun->lun_ref in transport_lookup_tmr_lun(), following how existing non TMR per se_lun reference counting works within transport_lookup_cmd_lun(). It also adds explicit transport_lun_remove_cmd() calls to drop the reference in the three tmr related locations that invoke transport_cmd_check_stop_to_fabric(); - target_tmr_work() during normal ->queue_tm_rsp() - target_complete_tmr_failure() during error ->queue_tm_rsp() - transport_generic_handle_tmr() during early failure Also, note the exception paths in transport_generic_free_cmd() and transport_cmd_finish_abort() already check SCF_SE_LUN_CMD, and will invoke transport_lun_remove_cmd() when necessary. Reviewed-by: Himanshu Madhani Reviewed-by: Quinn Tran Cc: Mike Christie Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 14 ++++++++++---- drivers/target/target_core_transport.c | 3 +++ 2 files changed, 13 insertions(+), 4 deletions(-) commit 12f66e4a0f7b5624901ba4301210e026c9ddf78d Author: Jiang Yi Date: Fri Jun 2 11:45:09 2017 +0800 target: reject COMPARE_AND_WRITE if emulate_caw is not set In struct se_dev_attrib, there is a field emulate_caw exposed as a /sys/kernel/config/target/core/$HBA/$DEV/attrib/. If this field is set zero, it means the corresponding struct se_device does not support the scsi cmd COMPARE_AND_WRITE In function sbc_parse_cdb(), go ahead and reject scsi COMPARE_AND_WRITE if emulate_caw is not set, because it has been explicitly disabled from user-space. (Make pr_err ratelimited - nab) Signed-off-by: Jiang Yi Signed-off-by: Nicholas Bellinger drivers/target/target_core_sbc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9f45efb9286268e01d5022d34a58a68f53ca3072 Merge: dc50214 4932381 Author: Linus Torvalds Date: Thu Jul 6 22:27:08 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc updates from Andrew Morton: - a few hotfixes - various misc updates - ocfs2 updates - most of MM * emailed patches from Andrew Morton : (108 commits) mm, memory_hotplug: move movable_node to the hotplug proper mm, memory_hotplug: drop CONFIG_MOVABLE_NODE mm, memory_hotplug: drop artificial restriction on online/offline mm: memcontrol: account slab stats per lruvec mm: memcontrol: per-lruvec stats infrastructure mm: memcontrol: use generic mod_memcg_page_state for kmem pages mm: memcontrol: use the node-native slab memory counters mm: vmstat: move slab statistics from zone to node counters mm/zswap.c: delete an error message for a failed memory allocation in zswap_dstmem_prepare() mm/zswap.c: improve a size determination in zswap_frontswap_init() mm/zswap.c: delete an error message for a failed memory allocation in zswap_pool_create() mm/swapfile.c: sort swap entries before free mm/oom_kill: count global and memory cgroup oom kills mm: per-cgroup memory reclaim stats mm: kmemleak: treat vm_struct as alternative reference to vmalloc'ed objects mm: kmemleak: factor object reference updating out of scan_block() mm: kmemleak: slightly reduce the size of some structures on 64-bit architectures mm, mempolicy: don't check cpuset seqlock where it doesn't matter mm, cpuset: always use seqlock when changing task's nodemask mm, mempolicy: simplify rebinding mempolicies when updating cpusets ... commit dc502142b65b9e31eb90ab4344b3acadb2698317 Merge: 90880b5 b731010 Author: Linus Torvalds Date: Thu Jul 6 22:07:44 2017 -0700 Merge branch 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull user access str* updates from Al Viro: "uaccess str...() dead code removal" * 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: s390 keyboard.c: don't open-code strndup_user() mips: get rid of unused __strnlen_user() get rid of unused __strncpy_from_user() instances kill strlen_user() commit 90880b532a7ebd13a052d6c410807b33809a3efb Merge: 1c91d2c c02205e Author: Linus Torvalds Date: Thu Jul 6 22:06:11 2017 -0700 Merge branch 'work.probe_kernel_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull probe_kernel_read() uses from Al Viro: "Several open-coded probe_kernel_read()..." * 'work.probe_kernel_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: dio: use probe_kernel_read() hp_sdc: use probe_kernel_read() hpfb: use probe_kernel_read() commit 1c91d2c6915b288bc8595b21d37e1bb662a40e55 Merge: c856863 8d2fd30 Author: Linus Torvalds Date: Thu Jul 6 22:04:27 2017 -0700 Merge branch 'misc.alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull alpha user access updates from Al Viro: "Several alpha osf_sys.c uaccess cleanups - getdomainname() had insane byte-by-byte copying of string to userland (instead of strnlen + copy_to_user) plus yet another compat variant of timeval/itimerval with associated copyin/copyout primitives" * 'misc.alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: osf_sigstack(): switch to put_user() osf_sys.c: switch handling of timeval32/itimerval32 to copy_{to,from}_user() osf_getdomainname(): use copy_to_user() commit c856863988ebf612d159e55eeddbcd27de63b40d Merge: 771d3fe 0d06060 Author: Linus Torvalds Date: Thu Jul 6 20:57:13 2017 -0700 Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc compat stuff updates from Al Viro: "This part is basically untangling various compat stuff. Compat syscalls moved to their native counterparts, getting rid of quite a bit of double-copying and/or set_fs() uses. A lot of field-by-field copyin/copyout killed off. - kernel/compat.c is much closer to containing just the copyin/copyout of compat structs. Not all compat syscalls are gone from it yet, but it's getting there. - ipc/compat_mq.c killed off completely. - block/compat_ioctl.c cleaned up; floppy compat ioctls moved to drivers/block/floppy.c where they belong. Yes, there are several drivers that implement some of the same ioctls. Some are m68k and one is 32bit-only pmac. drivers/block/floppy.c is the only one in that bunch that can be built on biarch" * 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: mqueue: move compat syscalls to native ones usbdevfs: get rid of field-by-field copyin compat_hdio_ioctl: get rid of set_fs() take floppy compat ioctls to sodding floppy.c ipmi: get rid of field-by-field __get_user() ipmi: get COMPAT_IPMICTL_RECEIVE_MSG in sync with the native one rt_sigtimedwait(): move compat to native select: switch compat_{get,put}_fd_set() to compat_{get,put}_bitmap() put_compat_rusage(): switch to copy_to_user() sigpending(): move compat to native getrlimit()/setrlimit(): move compat to native times(2): move compat to native compat_{get,put}_bitmap(): use unsafe_{get,put}_user() fb_get_fscreeninfo(): don't bother with do_fb_ioctl() do_sigaltstack(): lift copying to/from userland into callers take compat_sys_old_getrlimit() to native syscall trim __ARCH_WANT_SYS_OLD_GETRLIMIT commit 771d3feb4b79f8569bf0033b9075a434d0365fa2 Merge: 2074006 b87b786 Author: Linus Torvalds Date: Thu Jul 6 20:32:13 2017 -0700 Merge branch 'work.drm' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull DRM compat ioctl handling updates from Al Viro: "This kills the double-copies in there and tons of field-by-field copyin/copyout. Several dead ioctls put to rest, while we are at it - the native counterparts had been gone for a decade, so we can bloody well fail early on the compat side. No point rearranging the 32bit structure into 64bit one (and back) only to be told "piss off, I don't know that ioctl" by the native code..." * 'work.drm' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (29 commits) Fix trivial misannotations mga: switch compat ioctls to drm_ioctl_kernel() radeon: take out dead compat ioctls drm compat: ia64 is not biarch drm_compat_ioctl(): tidy up a bit switch compat_drm_mapbufs() to drm_ioctl_kernel() switch compat_drm_rmmap() to drm_ioctl_kernel() switch compat_drm_mode_addfb2() to drm_ioctl_kernel() switch compat_drm_wait_vblank() to drm_ioctl_kernel() switch compat_drm_update_draw() compat_drm: switch sg ioctls compat_drm: switch AGP compat ioctls to drm_ioctl_kernel() switch compat_drm_dma() to drm_ioctl_kernel() switch compat_drm_resctx() to drm_ioctl_kernel() switch compat_drm_getsareactx() to drm_ioctl_kernel() switch compat_drm_setsareactx() to drm_ioctl_kernel() switch compat_drm_freebufs() to drm_ioctl_kernel() switch compat_drm_markbufs() to drm_ioctl_kernel() switch compat_drm_addmap() to drm_ioctl_kernel() switch compat_drm_getstats() to drm_ioctl_kernel() ... commit 2074006dace5d289d90f2bd31ae1e4bc94965f55 Merge: f72e24a 69d7187 Author: Linus Torvalds Date: Thu Jul 6 19:45:45 2017 -0700 Merge tag 'trace-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "The new features of this release: - Added TRACE_DEFINE_SIZEOF() which allows trace events that use sizeof() it the TP_printk() to be converted to the actual size such that trace-cmd and perf can parse them correctly. - Some rework of the TRACE_DEFINE_ENUM() such that the above TRACE_DEFINE_SIZEOF() could reuse the same code. - Recording of tgid (Thread Group ID). This is similar to how task COMMs are recorded (cached at sched_switch), where it is in a table and used on output of the trace and trace_pipe files. - Have ":mod:" be cached when written into set_ftrace_filter. Then the functions of the module will be traced at module load. - Some random clean ups and small fixes" * tag 'trace-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (26 commits) ftrace: Test for NULL iter->tr in regex for stack_trace_filter changes ftrace: Decrement count for dyn_ftrace_total_info for init functions ftrace: Unlock hash mutex on failed allocation in process_mod_list() tracing: Add support for display of tgid in trace output tracing: Add support for recording tgid of tasks ftrace: Decrement count for dyn_ftrace_total_info file ftrace: Remove unused function ftrace_arch_read_dyn_info() sh/ftrace: Remove only user of ftrace_arch_read_dyn_info() ftrace: Have cached module filters be an active filter ftrace: Implement cached modules tracing on module load ftrace: Have the cached module list show in set_ftrace_filter ftrace: Add :mod: caching infrastructure to trace_array tracing: Show address when function names are not found ftrace: Add missing comment for FTRACE_OPS_FL_RCU tracing: Rename update the enum_map file tracing: Add TRACE_DEFINE_SIZEOF() macros tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeof's to their values tracing: Rename enum_replace to eval_replace trace: rename enum_map functions trace: rename trace.c enum functions ... commit f72e24a1240b78f421649c4d88f5c24ab1c896a1 Merge: 2c66927 1655cf8 Author: Linus Torvalds Date: Thu Jul 6 19:20:54 2017 -0700 Merge tag 'dma-mapping-4.13' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping infrastructure from Christoph Hellwig: "This is the first pull request for the new dma-mapping subsystem In this new subsystem we'll try to properly maintain all the generic code related to dma-mapping, and will further consolidate arch code into common helpers. This pull request contains: - removal of the DMA_ERROR_CODE macro, replacing it with calls to ->mapping_error so that the dma_map_ops instances are more self contained and can be shared across architectures (me) - removal of the ->set_dma_mask method, which duplicates the ->dma_capable one in terms of functionality, but requires more duplicate code. - various updates for the coherent dma pool and related arm code (Vladimir) - various smaller cleanups (me)" * tag 'dma-mapping-4.13' of git://git.infradead.org/users/hch/dma-mapping: (56 commits) ARM: dma-mapping: Remove traces of NOMMU code ARM: NOMMU: Set ARM_DMA_MEM_BUFFERABLE for M-class cpus ARM: NOMMU: Introduce dma operations for noMMU drivers: dma-mapping: allow dma_common_mmap() for NOMMU drivers: dma-coherent: Introduce default DMA pool drivers: dma-coherent: Account dma_pfn_offset when used with device tree dma: Take into account dma_pfn_offset dma-mapping: replace dmam_alloc_noncoherent with dmam_alloc_attrs dma-mapping: remove dmam_free_noncoherent crypto: qat - avoid an uninitialized variable warning au1100fb: remove a bogus dma_free_nonconsistent call MAINTAINERS: add entry for dma mapping helpers powerpc: merge __dma_set_mask into dma_set_mask dma-mapping: remove the set_dma_mask method powerpc/cell: use the dma_supported method for ops switching powerpc/cell: clean up fixed mapping dma_ops initialization tile: remove dma_supported and mapping_error methods xen-swiotlb: remove xen_swiotlb_set_dma_mask arm: implement ->dma_supported instead of ->set_dma_mask mips/loongson64: implement ->dma_supported instead of ->set_dma_mask ... commit 2c669275dc3245e2866a0eea15bda8ec8d1ab8db Merge: 6e6c5b9 0c6b297 Author: Linus Torvalds Date: Thu Jul 6 19:15:23 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Martin Schwidefsky: - The fixup for the blk-mq clash with the scm driver - An improvement for the dasd driver in regard to raw I/O - Bug fixes and cleanup * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: Update my email address s390/syscalls: Fix out of bounds arguments access s390/vfio_ccw: remove unused variable s390/dasd: remove unneeded code s390/crash: Remove unused KEXEC_NOTE_BYTES s390/zcrypt: Fix missing newlines at some debug feature messages. s390/dasd: Make raw I/O usable without prefix support s390/dasd: Rename dasd_raw_build_cp() s390/dasd: Refactor prefix_LRE() and related functions s390: fix up for "blk-mq: switch ->queue_rq return value to blk_status_t" commit 6e6c5b960644125b6f2fc2cd04e62bff0771923e Merge: c136b84 c54590c Author: Linus Torvalds Date: Thu Jul 6 19:11:24 2017 -0700 Merge tag 'for-linus-4.13-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "Other than fixes and cleanups it contains: - support > 32 VCPUs at domain restore - support for new sysfs nodes related to Xen - some performance tuning for Linux running as Xen guest" * tag 'for-linus-4.13-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: allow userspace access during hypercalls x86: xen: remove unnecessary variable in xen_foreach_remap_area() xen: allocate page for shared info page from low memory xen: avoid deadlock in xenbus driver xen: add sysfs node for hypervisor build id xen: sync include/xen/interface/version.h xen: add sysfs node for guest type doc,xen: document hypervisor sysfs nodes for xen xen/vcpu: Handle xen_vcpu_setup() failure at boot xen/vcpu: Handle xen_vcpu_setup() failure in hotplug xen/pv: Fix OOPS on restore for a PV, !SMP domain xen/pvh*: Support > 32 VCPUs at domain restore xen/vcpu: Simplify xen_vcpu related code xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU xen: avoid type warning in xchg_xen_ulong xen: fix HYPERVISOR_dm_op() prototype xen: don't print error message in case of missing Xenstore entry arm/xen: Adjust one function call together with a variable assignment arm/xen: Delete an error message for a failed memory allocation in __set_phys_to_machine_multi() arm/xen: Improve a size determination in __set_phys_to_machine_multi() commit c136b84393d4e340e1b53fc7f737dd5827b19ee5 Merge: e0f25a3 1372324 Author: Linus Torvalds Date: Thu Jul 6 18:38:31 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "PPC: - Better machine check handling for HV KVM - Ability to support guests with threads=2, 4 or 8 on POWER9 - Fix for a race that could cause delayed recognition of signals - Fix for a bug where POWER9 guests could sleep with interrupts pending. ARM: - VCPU request overhaul - allow timer and PMU to have their interrupt number selected from userspace - workaround for Cavium erratum 30115 - handling of memory poisonning - the usual crop of fixes and cleanups s390: - initial machine check forwarding - migration support for the CMMA page hinting information - cleanups and fixes x86: - nested VMX bugfixes and improvements - more reliable NMI window detection on AMD - APIC timer optimizations Generic: - VCPU request overhaul + documentation of common code patterns - kvm_stat improvements" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (124 commits) Update my email address kvm: vmx: allow host to access guest MSR_IA32_BNDCFGS x86: kvm: mmu: use ept a/d in vmcs02 iff used in vmcs12 kvm: x86: mmu: allow A/D bits to be disabled in an mmu x86: kvm: mmu: make spte mmio mask more explicit x86: kvm: mmu: dead code thanks to access tracking KVM: PPC: Book3S: Fix typo in XICS-on-XIVE state saving code KVM: PPC: Book3S HV: Close race with testing for signals on guest entry KVM: PPC: Book3S HV: Simplify dynamic micro-threading code KVM: x86: remove ignored type attribute KVM: LAPIC: Fix lapic timer injection delay KVM: lapic: reorganize restart_apic_timer KVM: lapic: reorganize start_hv_timer kvm: nVMX: Check memory operand to INVVPID KVM: s390: Inject machine check into the nested guest KVM: s390: Inject machine check into the guest tools/kvm_stat: add new interactive command 'b' tools/kvm_stat: add new command line switch '-i' tools/kvm_stat: fix error on interactive command 'g' KVM: SVM: suppress unnecessary NMI singlestep on GIF=0 and nested exit ... commit a750cfde1397dbbee1efe7737c2e952d6fc2d878 Author: Daniel Jurgens Date: Wed Jul 5 16:15:21 2017 +0300 IB/core: Fix static analysis warning in ib_policy_change_task ib_get_cached_subnet_prefix can technically fail, but the only way it could is not possible based on the loop conditions. Check the return value before using the variable sp to resolve a static analysis warning. -v1: - Fix check to !ret. Paul Moore Fixes: 8f408ab64be6 ("selinux lsm IB/core: Implement LSM notification system") Signed-off-by: Daniel Jurgens Reported-by: Dan Carpenter Signed-off-by: Paul Moore Signed-off-by: James Morris drivers/infiniband/core/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 79d0636ac7f839d57680305a462f0d8ff9bb13ec Author: Daniel Jurgens Date: Fri Jun 30 17:35:35 2017 +0300 IB/core: Fix uninitialized variable use in check_qp_port_pkey_settings Check the return value from get_pkey_and_subnet_prefix to prevent using uninitialized variables. Fixes: d291f1a65232 ("IB/core: Enforce PKey security on QPs") Signed-off-by: Daniel Jurgens Reported-by: Dan Carpenter Signed-off-by: Paul Moore Signed-off-by: James Morris drivers/infiniband/core/security.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit b5d0ebc99bf5d0801a5ecbe958caa3d68b8eaee8 Author: Enric Balletbo i Serra Date: Tue Jun 27 12:27:24 2017 +0200 tpm: do not suspend/resume if power stays on The suspend/resume behavior of the TPM can be controlled by setting "powered-while-suspended" in the DTS. This is useful for the cases when hardware does not power-off the TPM. Signed-off-by: Sonny Rao Signed-off-by: Enric Balletbo i Serra Reviewed-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm-interface.c | 3 +++ drivers/char/tpm/tpm.h | 1 + drivers/char/tpm/tpm_of.c | 3 +++ 3 files changed, 7 insertions(+) commit 28707bf221ce6914a3e414637c8ffc4d27e9648d Author: Roberto Sassu Date: Fri Jun 23 15:41:57 2017 +0200 tpm: use tpm2_pcr_read() in tpm2_do_selftest() tpm2_do_selftest() performs a PCR read during the TPM initialization phase. This patch replaces the PCR read code with a call to tpm2_pcr_read(). Signed-off-by: Roberto Sassu Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm2-cmd.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) commit 91f7f3d773a469deeab3808d422363138295346e Author: Roberto Sassu Date: Fri Jun 23 15:41:56 2017 +0200 tpm: use tpm_buf functions in tpm2_pcr_read() tpm2_pcr_read() now builds the PCR read command buffer with tpm_buf functions. This solution is preferred to using a tpm2_cmd structure, as tpm_buf functions provide protection against buffer overflow. Signed-off-by: Roberto Sassu Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm2-cmd.c | 60 ++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit bc397085ca975d685c7a0b3a2984932eea4f6af0 Author: Colin Ian King Date: Tue Jun 20 11:22:02 2017 +0100 tpm_tis: make ilb_base_addr static The pointer ilb_base_addr does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'ilb_base_addr' was not declared. Should it be static?" Signed-off-by: Colin Ian King Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19cbe4f680b48f950246815b891a66eeb67f7410 Author: Jarkko Sakkinen Date: Wed Jun 21 09:31:34 2017 +0200 tpm: consolidate the TPM startup code Consolidated all the "manual" TPM startup code to a single function in order to make code flows a bit cleaner and migrate to tpm_buf. Tested-by: Stefan Berger Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm-interface.c | 67 +++++++++++++++++++++++++--------------- drivers/char/tpm/tpm.h | 6 +--- drivers/char/tpm/tpm2-cmd.c | 32 +------------------ 3 files changed, 44 insertions(+), 61 deletions(-) commit 5e572cab92f0bb56ca1e6e5ee4d807663a7ccbad Author: Azhar Shaikh Date: Sun Jun 18 19:17:59 2017 -0700 tpm: Enable CLKRUN protocol for Braswell systems To overcome a hardware limitation on Intel Braswell systems, disable CLKRUN protocol during TPM transactions and re-enable once the transaction is completed. Signed-off-by: Azhar Shaikh Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm.h | 4 ++ drivers/char/tpm/tpm_tis.c | 113 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) commit f128480f39166c0a4475b6937e7e3e148b1caecc Author: Manuel Lauss Date: Mon Jun 19 08:27:17 2017 +0200 tpm/tpm_crb: fix priv->cmd_size initialisation priv->cmd_size is never initialised if the cmd and rsp buffers reside at different addresses. Initialise it in the exit path of the function when rsp buffer has also been successfully allocated. Fixes: aa77ea0e43dc ("tpm/tpm_crb: cache cmd_size register value."). Signed-off-by: Manuel Lauss Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm_crb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 13b47cfcfc60495cde216eef4c01040d76174cbe Author: Jarkko Sakkinen Date: Tue Jun 20 11:38:02 2017 +0200 tpm: fix a kernel memory leak in tpm-sysfs.c While cleaning up sysfs callback that prints EK we discovered a kernel memory leak. This commit fixes the issue by zeroing the buffer used for TPM command/response. The leak happen when we use either tpm_vtpm_proxy, tpm_ibmvtpm or xen-tpmfront. Cc: stable@vger.kernel.org Fixes: 0883743825e3 ("TPM: sysfs functions consolidation") Reported-by: Jason Gunthorpe Tested-by: Stefan Berger Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm-sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d1bd4a792d3961a04e6154118816b00167aad91a Author: Josh Zimmerman Date: Sun Jun 25 14:53:24 2017 -0700 tpm: Issue a TPM2_Shutdown for TPM2 devices. If a TPM2 loses power without a TPM2_Shutdown command being issued (a "disorderly reboot"), it may lose some state that has yet to be persisted to NVRam, and will increment the DA counter. After the DA counter gets sufficiently large, the TPM will lock the user out. NOTE: This only changes behavior on TPM2 devices. Since TPM1 uses sysfs, and sysfs relies on implicit locking on chip->ops, it is not safe to allow this code to run in TPM1, or to add sysfs support to TPM2, until that locking is made explicit. Signed-off-by: Josh Zimmerman Cc: stable@vger.kernel.org Fixes: 74d6b3ceaa17 ("tpm: fix suspend/resume paths for TPM 2.0") Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm-chip.c | 34 ++++++++++++++++++++++++++++++++++ drivers/char/tpm/tpm-sysfs.c | 3 +++ 2 files changed, 37 insertions(+) commit f77af15165847406b15d8f70c382c4cb15846b2a Author: Josh Zimmerman Date: Sun Jun 25 14:53:23 2017 -0700 Add "shutdown" to "struct class". The TPM class has some common shutdown code that must be executed for all drivers. This adds some needed functionality for that. Signed-off-by: Josh Zimmerman Acked-by: Greg Kroah-Hartman Cc: stable@vger.kernel.org Fixes: 74d6b3ceaa17 ("tpm: fix suspend/resume paths for TPM 2.0") Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/base/core.c | 6 +++++- include/linux/device.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 4932381ee2a77a21641009149722e1bb92bd99e2 Author: Michal Hocko Date: Thu Jul 6 15:41:05 2017 -0700 mm, memory_hotplug: move movable_node to the hotplug proper movable_node_is_enabled is defined in memblock proper while it is initialized from the memory hotplug proper. This is quite messy and it makes a dependency between the two so move movable_node along with the helper functions to memory_hotplug. To make it more entertaining the kernel parameter is ignored unless CONFIG_HAVE_MEMBLOCK_NODE_MAP=y because we do not have the node information for each memblock otherwise. So let's warn when the option is disabled. Link: http://lkml.kernel.org/r/20170529114141.536-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Reza Arbab Acked-by: Vlastimil Babka Cc: Mel Gorman Cc: Andrea Arcangeli Cc: Jerome Glisse Cc: Yasuaki Ishimatsu Cc: Xishi Qiu Cc: Kani Toshimitsu Cc: Chen Yucong Cc: Joonsoo Kim Cc: Andi Kleen Cc: David Rientjes Cc: Daniel Kiper Cc: Igor Mammedov Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 7 ------- include/linux/memory_hotplug.h | 10 ++++++++++ mm/memblock.c | 1 - mm/memory_hotplug.c | 6 ++++++ 4 files changed, 16 insertions(+), 8 deletions(-) commit f70029bbaacbfa8f082d2b4988717cba4e269f17 Author: Michal Hocko Date: Thu Jul 6 15:41:02 2017 -0700 mm, memory_hotplug: drop CONFIG_MOVABLE_NODE Commit 20b2f52b73fe ("numa: add CONFIG_MOVABLE_NODE for movable-dedicated node") has introduced CONFIG_MOVABLE_NODE without a good explanation on why it is actually useful. It makes a lot of sense to make movable node semantic opt in but we already have that because the feature has to be explicitly enabled on the kernel command line. A config option on top only makes the configuration space larger without a good reason. It also adds an additional ifdefery that pollutes the code. Just drop the config option and make it de-facto always enabled. This shouldn't introduce any change to the semantic. Link: http://lkml.kernel.org/r/20170529114141.536-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Reza Arbab Acked-by: Vlastimil Babka Cc: Mel Gorman Cc: Andrea Arcangeli Cc: Jerome Glisse Cc: Yasuaki Ishimatsu Cc: Xishi Qiu Cc: Kani Toshimitsu Cc: Chen Yucong Cc: Joonsoo Kim Cc: Andi Kleen Cc: David Rientjes Cc: Daniel Kiper Cc: Igor Mammedov Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 7 +++++-- drivers/base/node.c | 4 ---- include/linux/memblock.h | 18 ----------------- include/linux/nodemask.h | 4 ---- mm/Kconfig | 26 ------------------------- mm/memblock.c | 2 -- mm/memory_hotplug.c | 4 ---- mm/page_alloc.c | 2 -- 8 files changed, 5 insertions(+), 62 deletions(-) commit 57c0a17238e22395428248c53f8e390c051c88b8 Author: Michal Hocko Date: Thu Jul 6 15:40:58 2017 -0700 mm, memory_hotplug: drop artificial restriction on online/offline Patch series "remove CONFIG_MOVABLE_NODE". I am continuing to clean up the memory hotplug code and CONFIG_MOVABLE_NODE seems dubious at best. The following two patches simply removes the flag and make it de-facto always enabled. The current semantic of the config option is twofold 1) it automatically binds hotplugable nodes to have memory in zone_movable by default when movable_node is enabled 2) forbids memory hotplug to online all the memory as movable when !CONFIG_MOVABLE_NODE. The later restriction is quite dubious because there is no clear cut of how much normal memory do we need for a reasonable system operation. A single memory block which is sufficient to allow further movable onlines is far from sufficient (e.g a node with >2GB and memblocks 128MB will fill up this zone with struct pages leaving nothing for other allocations). Removing the config option will not only reduce the configuration space it also removes quite some code. The semantic of the movable_node command line parameter is preserved. The first patch removes the restriction mentioned above and the second one simply removes all the CONFIG_MOVABLE_NODE related stuff. The last patch moves movable_node flag handling to memory_hotplug proper where it belongs. [1] http://lkml.kernel.org/r/20170524122411.25212-1-mhocko@kernel.org This patch (of 3): Commit 74d42d8fe146 ("memory_hotplug: ensure every online node has NORMAL memory") has introduced a restriction that every numa node has to have at least some memory in !movable zones before a first movable memory can be onlined if !CONFIG_MOVABLE_NODE. Likewise can_offline_normal checks the amount of normal memory in !movable zones and it disallows to offline memory if there is no normal memory left with a justification that "memory-management acts bad when we have nodes which is online but don't have any normal memory". While it is true that not having _any_ memory for kernel allocations on a NUMA node is far from great and such a node would be quite subotimal because all kernel allocations will have to fallback to another NUMA node but there is no reason to disallow such a configuration in principle. Besides that there is not really a big difference to have one memblock for ZONE_NORMAL available or none. With 128MB size memblocks the system might trash on the kernel allocations requests anyway. It is really hard to draw a line on how much normal memory is really sufficient so we have to rely on administrator to configure system sanely therefore drop the artificial restriction and remove can_offline_normal and can_online_high_movable altogether. Link: http://lkml.kernel.org/r/20170529114141.536-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Acked-by: Reza Arbab Cc: Mel Gorman Cc: Andrea Arcangeli Cc: Jerome Glisse Cc: Yasuaki Ishimatsu Cc: Xishi Qiu Cc: Kani Toshimitsu Cc: Chen Yucong Cc: Joonsoo Kim Cc: Andi Kleen Cc: David Rientjes Cc: Daniel Kiper Cc: Igor Mammedov Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 58 ----------------------------------------------------- 1 file changed, 58 deletions(-) commit 7779f21236549ab3b66fcfadc4c91fdc9f6fc26d Author: Johannes Weiner Date: Thu Jul 6 15:40:55 2017 -0700 mm: memcontrol: account slab stats per lruvec Josef's redesign of the balancing between slab caches and the page cache requires slab cache statistics at the lruvec level. Link: http://lkml.kernel.org/r/20170530181724.27197-7-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Cc: Josef Bacik Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 12 ++++-------- mm/slab.h | 18 +----------------- mm/slub.c | 4 ++-- 3 files changed, 7 insertions(+), 27 deletions(-) commit 00f3ca2c2d6635d85108571c4dd9a29088668662 Author: Johannes Weiner Date: Thu Jul 6 15:40:52 2017 -0700 mm: memcontrol: per-lruvec stats infrastructure lruvecs are at the intersection of the NUMA node and memcg, which is the scope for most paging activity. Introduce a convenient accounting infrastructure that maintains statistics per node, per memcg, and the lruvec itself. Then convert over accounting sites for statistics that are already tracked in both nodes and memcgs and can be easily switched. [hannes@cmpxchg.org: fix crash in the new cgroup stat keeping code] Link: http://lkml.kernel.org/r/20170531171450.GA10481@cmpxchg.org [hannes@cmpxchg.org: don't track uncharged pages at all Link: http://lkml.kernel.org/r/20170605175254.GA8547@cmpxchg.org [hannes@cmpxchg.org: add missing free_percpu()] Link: http://lkml.kernel.org/r/20170605175354.GB8547@cmpxchg.org [linux@roeck-us.net: hexagon: fix build error caused by include file order] Link: http://lkml.kernel.org/r/20170617153721.GA4382@roeck-us.net Link: http://lkml.kernel.org/r/20170530181724.27197-6-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Signed-off-by: Guenter Roeck Acked-by: Vladimir Davydov Cc: Josef Bacik Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/hexagon/include/asm/pgtable.h | 1 - arch/hexagon/kernel/asm-offsets.c | 1 - arch/hexagon/mm/vm_tlb.c | 1 + include/linux/memcontrol.h | 246 ++++++++++++++++++++++++++++++++----- include/linux/vmstat.h | 1 - mm/memcontrol.c | 11 +- mm/page-writeback.c | 15 +-- mm/rmap.c | 8 +- mm/workingset.c | 9 +- 9 files changed, 238 insertions(+), 55 deletions(-) commit ed52be7bfd45533b194b429f43361493d24599a7 Author: Johannes Weiner Date: Thu Jul 6 15:40:49 2017 -0700 mm: memcontrol: use generic mod_memcg_page_state for kmem pages The kmem-specific functions do the same thing. Switch and drop. Link: http://lkml.kernel.org/r/20170530181724.27197-5-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Cc: Josef Bacik Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 17 ----------------- kernel/fork.c | 8 ++++---- mm/slab.h | 16 ++++++++-------- 3 files changed, 12 insertions(+), 29 deletions(-) commit 320492961c1cf21da5547b00c23e525851c1d16f Author: Johannes Weiner Date: Thu Jul 6 15:40:46 2017 -0700 mm: memcontrol: use the node-native slab memory counters Now that the slab counters are moved from the zone to the node level we can drop the private memcg node stats and use the official ones. Link: http://lkml.kernel.org/r/20170530181724.27197-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Cc: Josef Bacik Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 2 -- mm/memcontrol.c | 8 ++++---- mm/slab.h | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) commit 385386cff4c6f047907655e05791d88198c4c523 Author: Johannes Weiner Date: Thu Jul 6 15:40:43 2017 -0700 mm: vmstat: move slab statistics from zone to node counters Patch series "mm: per-lruvec slab stats" Josef is working on a new approach to balancing slab caches and the page cache. For this to work, he needs slab cache statistics on the lruvec level. These patches implement that by adding infrastructure that allows updating and reading generic VM stat items per lruvec, then switches some existing VM accounting sites, including the slab accounting ones, to this new cgroup-aware API. I'll follow up with more patches on this, because there is actually substantial simplification that can be done to the memory controller when we replace private memcg accounting with making the existing VM accounting sites cgroup-aware. But this is enough for Josef to base his slab reclaim work on, so here goes. This patch (of 5): To re-implement slab cache vs. page cache balancing, we'll need the slab counters at the lruvec level, which, ever since lru reclaim was moved from the zone to the node, is the intersection of the node, not the zone, and the memcg. We could retain the per-zone counters for when the page allocator dumps its memory information on failures, and have counters on both levels - which on all but NUMA node 0 is usually redundant. But let's keep it simple for now and just move them. If anybody complains we can restore the per-zone counters. [hannes@cmpxchg.org: fix oops] Link: http://lkml.kernel.org/r/20170605183511.GA8915@cmpxchg.org Link: http://lkml.kernel.org/r/20170530181724.27197-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Cc: Josef Bacik Cc: Michal Hocko Cc: Vladimir Davydov Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 10 +++++----- include/linux/mmzone.h | 4 ++-- mm/page_alloc.c | 7 +++---- mm/slab.c | 8 ++++---- mm/slub.c | 4 ++-- mm/vmscan.c | 2 +- mm/vmstat.c | 4 ++-- 7 files changed, 19 insertions(+), 20 deletions(-) commit 2b2695f5fdf185092a72c81ca2c09ed1b9b37416 Author: Markus Elfring Date: Thu Jul 6 15:40:40 2017 -0700 mm/zswap.c: delete an error message for a failed memory allocation in zswap_dstmem_prepare() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Link: http://lkml.kernel.org/r/bae25b04-2ce2-7137-a71c-50d7b4f06431@users.sourceforge.net Signed-off-by: Markus Elfring Cc: Dan Streetman Cc: Seth Jennings Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zswap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9cd1f701ce47599ddfb589afeb88b5513b6915bc Author: Markus Elfring Date: Thu Jul 6 15:40:37 2017 -0700 mm/zswap.c: improve a size determination in zswap_frontswap_init() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Link: http://lkml.kernel.org/r/19f9da22-092b-f867-bdf6-f4dbad7ccf1f@users.sourceforge.net Signed-off-by: Markus Elfring Cc: Dan Streetman Cc: Seth Jennings Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4ae0ce0fde0de70acb48d825c1f40b0dfe8e6b8 Author: Markus Elfring Date: Thu Jul 6 15:40:34 2017 -0700 mm/zswap.c: delete an error message for a failed memory allocation in zswap_pool_create() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Link: http://lkml.kernel.org/r/2345aabc-ae98-1d31-afba-40a02c5baf3d@users.sourceforge.net Signed-off-by: Markus Elfring Cc: Dan Streetman Cc: Seth Jennings Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zswap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 155b5f88e734e56997b3fe89e176571c53754fed Author: Huang Ying Date: Thu Jul 6 15:40:31 2017 -0700 mm/swapfile.c: sort swap entries before free To reduce the lock contention of swap_info_struct->lock when freeing swap entry. The freed swap entries will be collected in a per-CPU buffer firstly, and be really freed later in batch. During the batch freeing, if the consecutive swap entries in the per-CPU buffer belongs to same swap device, the swap_info_struct->lock needs to be acquired/released only once, so that the lock contention could be reduced greatly. But if there are multiple swap devices, it is possible that the lock may be unnecessarily released/acquired because the swap entries belong to the same swap device are non-consecutive in the per-CPU buffer. To solve the issue, the per-CPU buffer is sorted according to the swap device before freeing the swap entries. With the patch, the memory (some swapped out) free time reduced 11.6% (from 2.65s to 2.35s) in the vm-scalability swap-w-rand test case with 16 processes. The test is done on a Xeon E5 v3 system. The swap device used is a RAM simulated PMEM (persistent memory) device. To test swapping, the test case creates 16 processes, which allocate and write to the anonymous pages until the RAM and part of the swap device is used up, finally the memory (some swapped out) is freed before exit. [akpm@linux-foundation.org: tweak comment] Link: http://lkml.kernel.org/r/20170525005916.25249-1-ying.huang@intel.com Signed-off-by: Huang Ying Acked-by: Tim Chen Cc: Hugh Dickins Cc: Shaohua Li Cc: Minchan Kim Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 8e675f7af50747e1e9e96538e8706767e4f80e2c Author: Konstantin Khlebnikov Date: Thu Jul 6 15:40:28 2017 -0700 mm/oom_kill: count global and memory cgroup oom kills Show count of oom killer invocations in /proc/vmstat and count of processes killed in memory cgroup in knob "memory.events" (in memory.oom_control for v1 cgroup). Also describe difference between "oom" and "oom_kill" in memory cgroup documentation. Currently oom in memory cgroup kills tasks iff shortage has happened inside page fault. These counters helps in monitoring oom kills - for now the only way is grepping for magic words in kernel log. [akpm@linux-foundation.org: fix for mem_cgroup_count_vm_event() rename] [akpm@linux-foundation.org: fix comment, per Konstantin] Link: http://lkml.kernel.org/r/149570810989.203600.9492483715840752937.stgit@buzz Signed-off-by: Konstantin Khlebnikov Cc: Michal Hocko Cc: Tetsuo Handa Cc: Roman Guschin Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 20 ++++++++++++++++---- include/linux/memcontrol.h | 5 ++++- include/linux/vm_event_item.h | 1 + mm/memcontrol.c | 2 ++ mm/oom_kill.c | 5 +++++ mm/vmstat.c | 1 + 6 files changed, 29 insertions(+), 5 deletions(-) commit 2262185c5b287f2758afda79c149b7cf6bee165c Author: Roman Gushchin Date: Thu Jul 6 15:40:25 2017 -0700 mm: per-cgroup memory reclaim stats Track the following reclaim counters for every memory cgroup: PGREFILL, PGSCAN, PGSTEAL, PGACTIVATE, PGDEACTIVATE, PGLAZYFREE and PGLAZYFREED. These values are exposed using the memory.stats interface of cgroup v2. The meaning of each value is the same as for global counters, available using /proc/vmstat. Also, for consistency, rename mem_cgroup_count_vm_event() to count_memcg_event_mm(). Link: http://lkml.kernel.org/r/1494530183-30808-1-git-send-email-guro@fb.com Signed-off-by: Roman Gushchin Suggested-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Tejun Heo Cc: Li Zefan Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 28 ++++++++++++++++++++++++++ fs/dax.c | 2 +- fs/ncpfs/mmap.c | 2 +- include/linux/memcontrol.h | 48 ++++++++++++++++++++++++++++++++++++++++++--- mm/filemap.c | 2 +- mm/memcontrol.c | 10 ++++++++++ mm/memory.c | 4 ++-- mm/shmem.c | 3 +-- mm/swap.c | 1 + mm/vmscan.c | 30 +++++++++++++++++++++------- 10 files changed, 113 insertions(+), 17 deletions(-) commit 94f4a1618b4c2b268f9e70bd1516932927782293 Author: Catalin Marinas Date: Thu Jul 6 15:40:22 2017 -0700 mm: kmemleak: treat vm_struct as alternative reference to vmalloc'ed objects Kmemleak requires that vmalloc'ed objects have a minimum reference count of 2: one in the corresponding vm_struct object and the other owned by the vmalloc() caller. There are cases, however, where the original vmalloc() returned pointer is lost and, instead, a pointer to vm_struct is stored (see free_thread_stack()). Kmemleak currently reports such objects as leaks. This patch adds support for treating any surplus references to an object as additional references to a specified object. It introduces the kmemleak_vmalloc() API function which takes a vm_struct pointer and sets its surplus reference passing to the actual vmalloc() returned pointer. The __vmalloc_node_range() calling site has been modified accordingly. Link: http://lkml.kernel.org/r/1495726937-23557-4-git-send-email-catalin.marinas@arm.com Signed-off-by: Catalin Marinas Reported-by: "Luis R. Rodriguez" Cc: Michal Hocko Cc: Andy Lutomirski Cc: "Luis R. Rodriguez" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/dev-tools/kmemleak.rst | 1 + include/linux/kmemleak.h | 7 +++ mm/kmemleak.c | 93 ++++++++++++++++++++++++++++++++++-- mm/vmalloc.c | 7 +-- 4 files changed, 98 insertions(+), 10 deletions(-) commit 04f70d13ca274d62a347815ca01fea871f9b9a40 Author: Catalin Marinas Date: Thu Jul 6 15:40:19 2017 -0700 mm: kmemleak: factor object reference updating out of scan_block() scan_block() updates the number of references (pointers) to objects, adding them to the gray_list when object->min_count is reached. The patch factors out this functionality into a separate update_refs() function. Link: http://lkml.kernel.org/r/1495726937-23557-3-git-send-email-catalin.marinas@arm.com Signed-off-by: Catalin Marinas Cc: Michal Hocko Cc: Andy Lutomirski Cc: "Luis R. Rodriguez" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) commit f66abf09e092fde88fec3c93d0b0c704e18224b8 Author: Catalin Marinas Date: Thu Jul 6 15:40:16 2017 -0700 mm: kmemleak: slightly reduce the size of some structures on 64-bit architectures Change the kmemleak_object.flags type to unsigned int and moves the early_log.min_count (int) near early_log.op_type (int) to slightly reduce the size of these structures on 64-bit architectures. Link: http://lkml.kernel.org/r/1495726937-23557-2-git-send-email-catalin.marinas@arm.com Signed-off-by: Catalin Marinas Cc: Michal Hocko Cc: Andy Lutomirski Cc: "Luis R. Rodriguez" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e0dd7d53a6d2788f9616e6d7e3e725f8f84e4636 Author: Vlastimil Babka Date: Thu Jul 6 15:40:13 2017 -0700 mm, mempolicy: don't check cpuset seqlock where it doesn't matter Two wrappers of __alloc_pages_nodemask() are checking task->mems_allowed_seq themselves to retry allocation that has raced with a cpuset update. This has been shown to be ineffective in preventing premature OOM's which can happen in __alloc_pages_slowpath() long before it returns back to the wrappers to detect the race at that level. Previous patches have made __alloc_pages_slowpath() more robust, so we can now simply remove the seqlock checking in the wrappers to prevent further wrong impression that it can actually help. Link: http://lkml.kernel.org/r/20170517081140.30654-7-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Christoph Lameter Cc: David Rientjes Cc: Dimitri Sivanich Cc: Hugh Dickins Cc: Li Zefan Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 5f155f27cb7f0670429e2b8bb954094fa4110df9 Author: Vlastimil Babka Date: Thu Jul 6 15:40:09 2017 -0700 mm, cpuset: always use seqlock when changing task's nodemask When updating task's mems_allowed and rebinding its mempolicy due to cpuset's mems being changed, we currently only take the seqlock for writing when either the task has a mempolicy, or the new mems has no intersection with the old mems. This should be enough to prevent a parallel allocation seeing no available nodes, but the optimization is IMHO unnecessary (cpuset updates should not be frequent), and we still potentially risk issues if the intersection of new and old nodes has limited amount of free/reclaimable memory. Let's just use the seqlock for all tasks. Link: http://lkml.kernel.org/r/20170517081140.30654-6-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Christoph Lameter Cc: David Rientjes Cc: Dimitri Sivanich Cc: Hugh Dickins Cc: Li Zefan Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/cgroup/cpuset.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit 213980c0f23b6c4932fd5516da7e8443b2a615ea Author: Vlastimil Babka Date: Thu Jul 6 15:40:06 2017 -0700 mm, mempolicy: simplify rebinding mempolicies when updating cpusets Commit c0ff7453bb5c ("cpuset,mm: fix no node to alloc memory when changing cpuset's mems") has introduced a two-step protocol when rebinding task's mempolicy due to cpuset update, in order to avoid a parallel allocation seeing an empty effective nodemask and failing. Later, commit cc9a6c877661 ("cpuset: mm: reduce large amounts of memory barrier related damage v3") introduced a seqlock protection and removed the synchronization point between the two update steps. At that point (or perhaps later), the two-step rebinding became unnecessary. Currently it only makes sure that the update first adds new nodes in step 1 and then removes nodes in step 2. Without memory barriers the effects are questionable, and even then this cannot prevent a parallel zonelist iteration checking the nodemask at each step to observe all nodes as unusable for allocation. We now fully rely on the seqlock to prevent premature OOMs and allocation failures. We can thus remove the two-step update parts and simplify the code. Link: http://lkml.kernel.org/r/20170517081140.30654-5-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Christoph Lameter Cc: David Rientjes Cc: Dimitri Sivanich Cc: Hugh Dickins Cc: Li Zefan Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mempolicy.h | 6 +-- include/uapi/linux/mempolicy.h | 8 ---- kernel/cgroup/cpuset.c | 4 +- mm/mempolicy.c | 102 ++++++++--------------------------------- 4 files changed, 21 insertions(+), 99 deletions(-) commit 04ec6264f28793e56114d0a367bb4d3af667ab6a Author: Vlastimil Babka Date: Thu Jul 6 15:40:03 2017 -0700 mm, page_alloc: pass preferred nid instead of zonelist to allocator The main allocator function __alloc_pages_nodemask() takes a zonelist pointer as one of its parameters. All of its callers directly or indirectly obtain the zonelist via node_zonelist() using a preferred node id and gfp_mask. We can make the code a bit simpler by doing the zonelist lookup in __alloc_pages_nodemask(), passing it a preferred node id instead (gfp_mask is already another parameter). There are some code size benefits thanks to removal of inlined node_zonelist(): bloat-o-meter add/remove: 2/2 grow/shrink: 4/36 up/down: 399/-1351 (-952) This will also make things simpler if we proceed with converting cpusets to zonelists. Link: http://lkml.kernel.org/r/20170517081140.30654-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Christoph Lameter Acked-by: Michal Hocko Cc: Dimitri Sivanich Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: David Rientjes Cc: Hugh Dickins Cc: Li Zefan Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 11 +++++------ include/linux/mempolicy.h | 6 +++--- mm/hugetlb.c | 15 +++++++++------ mm/memory_hotplug.c | 6 ++---- mm/mempolicy.c | 41 +++++++++++++++++++---------------------- mm/page_alloc.c | 10 +++++----- 6 files changed, 43 insertions(+), 46 deletions(-) commit 45816682b2cd6771cf63cb7dc7dbebdd827a0132 Author: Vlastimil Babka Date: Thu Jul 6 15:39:59 2017 -0700 mm, mempolicy: stop adjusting current->il_next in mpol_rebind_nodemask() The task->il_next variable stores the next allocation node id for task's MPOL_INTERLEAVE policy. mpol_rebind_nodemask() updates interleave and bind mempolicies due to changing cpuset mems. Currently it also tries to make sure that current->il_next is valid within the updated nodemask. This is bogus, because 1) we are updating potentially any task's mempolicy, not just current, and 2) we might be updating a per-vma mempolicy, not task one. The interleave_nodes() function that uses il_next can cope fine with the value not being within the currently allowed nodes, so this hasn't manifested as an actual issue. We can remove the need for updating il_next completely by changing it to il_prev and store the node id of the previous interleave allocation instead of the next id. Then interleave_nodes() can calculate the next id using the current nodemask and also store it as il_prev, except when querying the next node via do_get_mempolicy(). Link: http://lkml.kernel.org/r/20170517081140.30654-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Christoph Lameter Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: David Rientjes Cc: Dimitri Sivanich Cc: Hugh Dickins Cc: Li Zefan Cc: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched.h | 2 +- mm/mempolicy.c | 22 +++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) commit 902b62810a57ba75422f509afaf30e876e2aadfd Author: Vlastimil Babka Date: Thu Jul 6 15:39:56 2017 -0700 mm, page_alloc: fix more premature OOM due to race with cpuset update I would like to stress that this patchset aims to fix issues and cleanup the code *within the existing documented semantics*, i.e. patch 1 ignores mempolicy restrictions if the set of allowed nodes has no intersection with set of nodes allowed by cpuset. I believe discussing potential changes of the semantics can be better done once we have a baseline with no known bugs of the current semantics. I've recently summarized the cpuset/mempolicy issues in a LSF/MM proposal [1] and the discussion itself [2]. I've been trying to rewrite the handling as proposed, with the idea that changing semantics to make all mempolicies static wrt cpuset updates (and discarding the relative and default modes) can be tried on top, as there's a high risk of being rejected/reverted because somebody might still care about the removed modes. However I haven't yet figured out how to properly: 1) make mempolicies swappable instead of rebinding in place. I thought mbind() already works that way and uses refcounting to avoid use-after-free of the old policy by a parallel allocation, but turns out true refcounting is only done for shared (shmem) mempolicies, and the actual protection for mbind() comes from mmap_sem. Extending the refcounting means more overhead in allocator hot path. Also swapping whole mempolicies means that we have to allocate the new ones, which can fail, and reverting of the partially done work also means allocating (note that mbind() doesn't care and will just leave part of the range updated and part not updated when returning -ENOMEM...). 2) make cpuset's task->mems_allowed also swappable (after converting it from nodemask to zonelist, which is the easy part) for mostly the same reasons. The good news is that while trying to do the above, I've at least figured out how to hopefully close the remaining premature OOM's, and do a buch of cleanups on top, removing quite some of the code that was also supposed to prevent the cpuset update races, but doesn't work anymore nowadays. This should fix the most pressing concerns with this topic and give us a better baseline before either proceeding with the original proposal, or pushing a change of semantics that removes the problem 1) above. I'd be then fine with trying to change the semantic first and rewrite later. Patchset has been tested with the LTP cpuset01 stress test. [1] https://lkml.kernel.org/r/4c44a589-5fd8-08d0-892c-e893bb525b71@suse.cz [2] https://lwn.net/Articles/717797/ [3] https://marc.info/?l=linux-mm&m=149191957922828&w=2 This patch (of 6): Commit e47483bca2cc ("mm, page_alloc: fix premature OOM when racing with cpuset mems update") has fixed known recent regressions found by LTP's cpuset01 testcase. I have however found that by modifying the testcase to use per-vma mempolicies via bind(2) instead of per-task mempolicies via set_mempolicy(2), the premature OOM still happens and the issue is much older. The root of the problem is that the cpuset's mems_allowed and mempolicy's nodemask can temporarily have no intersection, thus get_page_from_freelist() cannot find any usable zone. The current semantic for empty intersection is to ignore mempolicy's nodemask and honour cpuset restrictions. This is checked in node_zonelist(), but the racy update can happen after we already passed the check. Such races should be protected by the seqlock task->mems_allowed_seq, but it doesn't work here, because 1) mpol_rebind_mm() does not happen under seqlock for write, and doing so would lead to deadlock, as it takes mmap_sem for write, while the allocation can have mmap_sem for read when it's taking the seqlock for read. And 2) the seqlock cookie of callers of node_zonelist() (alloc_pages_vma() and alloc_pages_current()) is different than the one of __alloc_pages_slowpath(), so there's still a potential race window. This patch fixes the issue by having __alloc_pages_slowpath() check for empty intersection of cpuset and ac->nodemask before OOM or allocation failure. If it's indeed empty, the nodemask is ignored and allocation retried, which mimics node_zonelist(). This works fine, because almost all callers of __alloc_pages_nodemask are obtaining the nodemask via node_zonelist(). The only exception is new_node_page() from hotplug, where the potential violation of nodemask isn't an issue, as there's already a fallback allocation attempt without any nodemask. If there's a future caller that needs to have its specific nodemask honoured over task's cpuset restrictions, we'll have to e.g. add a gfp flag for that. Link: http://lkml.kernel.org/r/20170517081140.30654-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Li Zefan Cc: Mel Gorman Cc: David Rientjes Cc: Christoph Lameter Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: "Kirill A. Shutemov" Cc: Dimitri Sivanich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) commit 5fd27b8e7dbcab0dc5a1346305679ba4bcc20977 Author: Punit Agrawal Date: Thu Jul 6 15:39:53 2017 -0700 mm: rmap: use correct helper when poisoning hugepages Using set_pte_at() does not do the right thing when putting down HWPOISON swap entries for hugepages on architectures that support contiguous ptes. Fix this problem by using set_huge_swap_pte_at() which was introduced to fix exactly this problem. Link: http://lkml.kernel.org/r/20170522133604.11392-7-punit.agrawal@arm.com Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: "Kirill A. Shutemov" Cc: Catalin Marinas Cc: Will Deacon Cc: Naoya Horiguchi Cc: Mike Kravetz Cc: Mark Rutland Cc: Hillf Danton Cc: Aneesh Kumar K.V Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e5251fd43007f9e1155331f0fa30685604a8e3a1 Author: Punit Agrawal Date: Thu Jul 6 15:39:50 2017 -0700 mm/hugetlb: introduce set_huge_swap_pte_at() helper set_huge_pte_at(), an architecture callback to populate hugepage ptes, does not provide the range of virtual memory that is targeted. This leads to ambiguity when dealing with swap entries on architectures that support hugepages consisting of contiguous ptes. Fix the problem by introducing an overridable helper that is called when populating the page tables with swap entries. The size of the targeted region is provided to the helper to help determine the number of entries to be updated. Provide a default implementation that maintains the current behaviour. [punit.agrawal@arm.com: v4] Link: http://lkml.kernel.org/r/20170524115409.31309-8-punit.agrawal@arm.com [punit.agrawal@arm.com: add an empty definition for set_huge_swap_pte_at()] Link: http://lkml.kernel.org/r/20170525171331.31469-1-punit.agrawal@arm.com Link: http://lkml.kernel.org/r/20170522133604.11392-6-punit.agrawal@arm.com Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: Mike Kravetz Cc: "Aneesh Kumar K.V" Cc: Catalin Marinas Cc: Will Deacon Cc: Naoya Horiguchi Cc: "Kirill A. Shutemov" Cc: Mark Rutland Cc: Hillf Danton Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 13 +++++++++++++ mm/hugetlb.c | 8 +++++--- 2 files changed, 18 insertions(+), 3 deletions(-) commit 9386fac34c7cbe39013410b01348e284652ca1cf Author: Punit Agrawal Date: Thu Jul 6 15:39:46 2017 -0700 mm/hugetlb: allow architectures to override huge_pte_clear() When unmapping a hugepage range, huge_pte_clear() is used to clear the page table entries that are marked as not present. huge_pte_clear() internally just ends up calling pte_clear() which does not correctly deal with hugepages consisting of contiguous page table entries. Add a size argument to address this issue and allow architectures to override huge_pte_clear() by wrapping it in a #ifndef block. Update s390 implementation with the size parameter as well. Note that the change only affects huge_pte_clear() - the other generic hugetlb functions don't need any change. Link: http://lkml.kernel.org/r/20170522162555.4313-1-punit.agrawal@arm.com Signed-off-by: Punit Agrawal Acked-by: Martin Schwidefsky [s390 bits] Cc: Heiko Carstens Cc: Arnd Bergmann Cc: "Aneesh Kumar K.V" Cc: Mike Kravetz Cc: Catalin Marinas Cc: Will Deacon Cc: Naoya Horiguchi Cc: "Kirill A. Shutemov" Cc: Steve Capper Cc: Mark Rutland Cc: Hillf Danton Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/include/asm/hugetlb.h | 2 +- include/asm-generic/hugetlb.h | 4 +++- mm/hugetlb.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit 7868a2087ec13ec4a5df0c5e00999863be132ba8 Author: Punit Agrawal Date: Thu Jul 6 15:39:42 2017 -0700 mm/hugetlb: add size parameter to huge_pte_offset() A poisoned or migrated hugepage is stored as a swap entry in the page tables. On architectures that support hugepages consisting of contiguous page table entries (such as on arm64) this leads to ambiguity in determining the page table entry to return in huge_pte_offset() when a poisoned entry is encountered. Let's remove the ambiguity by adding a size parameter to convey additional information about the requested address. Also fixup the definition/usage of huge_pte_offset() throughout the tree. Link: http://lkml.kernel.org/r/20170522133604.11392-4-punit.agrawal@arm.com Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: Catalin Marinas Cc: Will Deacon Cc: Tony Luck Cc: Fenghua Yu Cc: James Hogan (odd fixer:METAG ARCHITECTURE) Cc: Ralf Baechle (supporter:MIPS) Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Yoshinori Sato Cc: Rich Felker Cc: "David S. Miller" Cc: Chris Metcalf Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Alexander Viro Cc: Michal Hocko Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: "Kirill A. Shutemov" Cc: Hillf Danton Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/mm/hugetlbpage.c | 3 ++- arch/ia64/mm/hugetlbpage.c | 4 ++-- arch/metag/mm/hugetlbpage.c | 3 ++- arch/mips/mm/hugetlbpage.c | 3 ++- arch/parisc/mm/hugetlbpage.c | 3 ++- arch/powerpc/mm/hugetlbpage.c | 2 +- arch/s390/mm/hugetlbpage.c | 3 ++- arch/sh/mm/hugetlbpage.c | 3 ++- arch/sparc/mm/hugetlbpage.c | 3 ++- arch/tile/mm/hugetlbpage.c | 3 ++- arch/x86/mm/hugetlbpage.c | 2 +- fs/userfaultfd.c | 7 +++++-- include/linux/hugetlb.h | 5 +++-- mm/hugetlb.c | 23 ++++++++++++++--------- mm/page_vma_mapped.c | 3 ++- mm/pagewalk.c | 3 ++- 16 files changed, 46 insertions(+), 27 deletions(-) commit d63206ee32b6e64b0e12d46e5d6004afd9913713 Author: Punit Agrawal Date: Thu Jul 6 15:39:39 2017 -0700 mm, gup: ensure real head page is ref-counted when using hugepages When speculatively taking references to a hugepage using page_cache_add_speculative() in gup_huge_pmd(), it is assumed that the page returned by pmd_page() is the head page. Although normally true, this assumption doesn't hold when the hugepage comprises of successive page table entries such as when using contiguous bit on arm64 at PTE or PMD levels. This can be addressed by ensuring that the page passed to page_cache_add_speculative() is the real head or by de-referencing the head page within the function. We take the first approach to keep the usage pattern aligned with page_cache_get_speculative() where users already pass the appropriate page, i.e., the de-referenced head. Apply the same logic to fix gup_huge_[pud|pgd]() as well. [punit.agrawal@arm.com: fix arm64 ltp failure] Link: http://lkml.kernel.org/r/20170619170145.25577-5-punit.agrawal@arm.com Link: http://lkml.kernel.org/r/20170522133604.11392-3-punit.agrawal@arm.com Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Aneesh Kumar K.V Cc: Catalin Marinas Cc: Will Deacon Cc: Naoya Horiguchi Cc: Mark Rutland Cc: Hillf Danton Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a3e328556d41bb61c55f9dfcc62d6a826ea97b85 Author: Will Deacon Date: Thu Jul 6 15:39:36 2017 -0700 mm, gup: remove broken VM_BUG_ON_PAGE compound check for hugepages When operating on hugepages with DEBUG_VM enabled, the GUP code checks the compound head for each tail page prior to calling page_cache_add_speculative. This is broken, because on the fast-GUP path (where we don't hold any page table locks) we can be racing with a concurrent invocation of split_huge_page_to_list. split_huge_page_to_list deals with this race by using page_ref_freeze to freeze the page and force concurrent GUPs to fail whilst the component pages are modified. This modification includes clearing the compound_head field for the tail pages, so checking this prior to a successful call to page_cache_add_speculative can lead to false positives: In fact, page_cache_add_speculative *already* has this check once the page refcount has been successfully updated, so we can simply remove the broken calls to VM_BUG_ON_PAGE. Link: http://lkml.kernel.org/r/20170522133604.11392-2-punit.agrawal@arm.com Signed-off-by: Will Deacon Signed-off-by: Punit Agrawal Acked-by: Steve Capper Acked-by: Kirill A. Shutemov Cc: Aneesh Kumar K.V Cc: Catalin Marinas Cc: Naoya Horiguchi Cc: Mark Rutland Cc: Hillf Danton Cc: Michal Hocko Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 3 --- 1 file changed, 3 deletions(-) commit f0b38d65c9d0b42f3e6d861a18906d49441bf78e Author: Steve Capper Date: Thu Jul 6 15:39:33 2017 -0700 arm64: hugetlb: remove spurious calls to huge_ptep_offset() We don't need to call huge_ptep_offset as our accessors are already supplied with the pte_t *. This patch removes those spurious calls. [punit.agrawal@arm.com: resolve rebase conflicts due to patch re-ordering] Link: http://lkml.kernel.org/r/20170524115409.31309-3-punit.agrawal@arm.com Signed-off-by: Steve Capper Signed-off-by: Punit Agrawal Cc: David Woods Cc: Kirill A. Shutemov Cc: Aneesh Kumar K.V Cc: Catalin Marinas Cc: Naoya Horiguchi Cc: Mark Rutland Cc: Hillf Danton Cc: Michal Hocko Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/mm/hugetlbpage.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit bb9dd3df8ee9a0995da4c35251e6a8e2eefe0b41 Author: Steve Capper Date: Thu Jul 6 15:39:29 2017 -0700 arm64: hugetlb: refactor find_num_contig() Patch series "Support for contiguous pte hugepages", v4. This patchset updates the hugetlb code to fix issues arising from contiguous pte hugepages (such as on arm64). Compared to v3, This version addresses a build failure on arm64 by including two cleanup patches. Other than the arm64 cleanups, the rest are generic code changes. The remaining arm64 support based on these patches will be posted separately. The patches are based on v4.12-rc2. Previous related postings can be found at [0], [1], [2], and [3]. The patches fall into three categories - * Patch 1-2 - arm64 cleanups required to greatly simplify changing huge_pte_offset() prototype in Patch 5. Catalin, Will - are you happy for these patches to go via mm? * Patches 3-4 address issues with gup * Patches 5-8 relate to passing a size argument to hugepage helpers to disambiguate the size of the referred page. These changes are required to enable arch code to properly handle swap entries for contiguous pte hugepages. The changes to huge_pte_offset() (patch 5) touch multiple architectures but I've managed to minimise these changes for the other affected functions - huge_pte_clear() and set_huge_pte_at(). These patches gate the enabling of contiguous hugepages support on arm64 which has been requested for systems using !4k page granule. The ARM64 architecture supports two flavours of hugepages - * Block mappings at the pud/pmd level These are regular hugepages where a pmd or a pud page table entry points to a block of memory. Depending on the PAGE_SIZE in use the following size of block mappings are supported - PMD PUD --- --- 4K: 2M 1G 16K: 32M 64K: 512M For certain applications/usecases such as HPC and large enterprise workloads, folks are using 64k page size but the minimum hugepage size of 512MB isn't very practical. To overcome this ... * Using the Contiguous bit The architecture provides a contiguous bit in the translation table entry which acts as a hint to the mmu to indicate that it is one of a contiguous set of entries that can be cached in a single TLB entry. We use the contiguous bit in Linux to increase the mapping size at the pmd and pte (last) level. The number of supported contiguous entries varies by page size and level of the page table. Using the contiguous bit allows additional hugepage sizes - CONT PTE PMD CONT PMD PUD -------- --- -------- --- 4K: 64K 2M 32M 1G 16K: 2M 32M 1G 64K: 2M 512M 16G Of these, 64K with 4K and 2M with 64K pages have been explicitly requested by a few different users. Entries with the contiguous bit set are required to be modified all together - which makes things like memory poisoning and migration impossible to do correctly without knowing the size of hugepage being dealt with - the reason for adding size parameter to a few of the hugepage helpers in this series. This patch (of 8): As we regularly check for contiguous pte's in the huge accessors, remove this extra check from find_num_contig. [punit.agrawal@arm.com: resolve rebase conflicts due to patch re-ordering] Link: http://lkml.kernel.org/r/20170524115409.31309-2-punit.agrawal@arm.com Signed-off-by: Steve Capper Signed-off-by: Punit Agrawal Cc: David Woods Cc: Kirill A. Shutemov Cc: Aneesh Kumar K.V Cc: Catalin Marinas Cc: Naoya Horiguchi Cc: Mark Rutland Cc: Hillf Danton Cc: Michal Hocko Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/mm/hugetlbpage.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 8bc3c3fe4f3483374fed4254e47a14ec8c555909 Author: Naoya Horiguchi Date: Thu Jul 6 15:39:26 2017 -0700 mm: drop NULL return check of pte_offset_map_lock() pte_offset_map_lock() finds and takes ptl, and returns pte. But some callers return without unlocking the ptl when pte == NULL, which seems weird. Git history said that !pte check in change_pte_range() was introduced in commit 1ad9f620c3a2 ("mm: numa: recheck for transhuge pages under lock during protection changes") and still remains after commit 175ad4f1e7a2 ("mm: mprotect: use pmd_trans_unstable instead of taking the pmd_lock") which partially reverts 1ad9f620c3a2. So I think that it's just dead code. Many other caller of pte_offset_map_lock() never check NULL return, so let's do likewise. Link: http://lkml.kernel.org/r/1495089737-1292-1-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Acked-by: Vlastimil Babka Cc: Mel Gorman Cc: Johannes Weiner Cc: Andrea Arcangeli Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 2 -- mm/mprotect.c | 2 -- 2 files changed, 4 deletions(-) commit d73d3c9f698c5e474e58acbaba87a1f134772747 Author: Matthias Kaehlcke Date: Thu Jul 6 15:39:23 2017 -0700 mm/page_alloc.c: mark bad_range() and meminit_pfn_in_nid() as __maybe_unused The functions are not used in some configurations. Adding the attribute fixes the following warnings when building with clang: mm/page_alloc.c:409:19: error: function 'bad_range' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] mm/page_alloc.c:1106:30: error: unused function 'meminit_pfn_in_nid' [-Werror,-Wunused-function] Link: http://lkml.kernel.org/r/20170518182030.165633-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Cc: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 40692eb5eea209c2dd55857f44b4e1d7206e91d6 Author: Aneesh Kumar K.V Date: Thu Jul 6 15:39:20 2017 -0700 powerpc/mm/hugetlb: add support for 1G huge pages POWER9 supports hugepages of size 2M and 1G in radix MMU mode. This patch enables the usage of 1G page size for hugetlbfs. This also update the helper such we can do 1G page allocation at runtime. We still don't enable 1G page size on DD1 version. This is to avoid doing workaround mentioned in commit 6d3a0379ebdc ("powerpc/mm: Add radix__tlb_flush_pte_p9_dd1()"). Link: http://lkml.kernel.org/r/1494995292-4443-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Michael Ellerman (powerpc) Cc: Anshuman Khandual Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/book3s/64/hugetlb.h | 10 ++++++++++ arch/powerpc/mm/hugetlbpage.c | 7 +++++-- arch/powerpc/platforms/Kconfig.cputype | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) commit e1073d1e7920946ac4776a619cc40668b9e1401b Author: Aneesh Kumar K.V Date: Thu Jul 6 15:39:17 2017 -0700 mm/hugetlb: clean up ARCH_HAS_GIGANTIC_PAGE This moves the #ifdef in C code to a Kconfig dependency. Also we move the gigantic_page_supported() function to be arch specific. This allows architectures to conditionally enable runtime allocation of gigantic huge page. Architectures like ppc64 supports different gigantic huge page size (16G and 1G) based on the translation mode selected. This provides an opportunity for ppc64 to enable runtime allocation only w.r.t 1G hugepage. No functional change in this patch. Link: http://lkml.kernel.org/r/1494995292-4443-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Michael Ellerman (powerpc) Cc: Anshuman Khandual Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/Kconfig | 2 +- arch/arm64/include/asm/hugetlb.h | 4 ++++ arch/s390/Kconfig | 2 +- arch/s390/include/asm/hugetlb.h | 3 +++ arch/x86/Kconfig | 2 +- arch/x86/include/asm/hugetlb.h | 4 ++++ mm/hugetlb.c | 7 ++----- 7 files changed, 16 insertions(+), 8 deletions(-) commit 9017217b6f45e9045b2621b02cbc5605a566b803 Author: Pavel Tatashin Date: Thu Jul 6 15:39:14 2017 -0700 mm: adaptive hash table scaling Allow hash tables to scale with memory but at slower pace, when HASH_ADAPT is provided every time memory quadruples the sizes of hash tables will only double instead of quadrupling as well. This algorithm starts working only when memory size reaches a certain point, currently set to 64G. This is example of dentry hash table size, before and after four various memory configurations: MEMORY SCALE HASH_SIZE old new old new 8G 13 13 8M 8M 16G 13 13 16M 16M 32G 13 13 32M 32M 64G 13 13 64M 64M 128G 13 14 128M 64M 256G 13 14 256M 128M 512G 13 15 512M 128M 1024G 13 15 1024M 256M 2048G 13 16 2048M 256M 4096G 13 16 4096M 512M 8192G 13 17 8192M 512M 16384G 13 17 16384M 1024M 32768G 13 18 32768M 1024M 65536G 13 18 65536M 2048M The effect of this change on runtime is undetectable as filesystem growth is not proportional to machine memory size as is currently assumed. The change effects only large memory machine. Additional tuning might be needed, but that can be done by the clients of the kmem_cache_create interface, not the generic cache allocator itself. The adaptive hashing is disabled on 32 bit systems to avoid confusion of whether base should be different for smaller systems, and to avoid overflows. [mhocko@suse.com: drop HASH_ADAPT] Link: http://lkml.kernel.org/r/20170509094607.GG6481@dhcp22.suse.cz [pasha.tatashin@oracle.com: UL -> ULL fix] Link: http://lkml.kernel.org/r/1495300013-653283-2-git-send-email-pasha.tatashin@oracle.com [pasha.tatashin@oracle.com: disable adaptive hash on 32 bit systems] Link: http://lkml.kernel.org/r/1495469329-755807-2-git-send-email-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/1488432825-92126-5-git-send-email-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Signed-off-by: Michal Hocko Acked-by: Michal Hocko Cc: David Miller Cc: Al Viro Cc: Babu Moger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 3d375d78593cd5daeead34ed3279c4ff63dd04f2 Author: Pavel Tatashin Date: Thu Jul 6 15:39:11 2017 -0700 mm: update callers to use HASH_ZERO flag Update dcache, inode, pid, mountpoint, and mount hash tables to use HASH_ZERO, and remove initialization after allocations. In case of places where HASH_EARLY was used such as in __pv_init_lock_hash the zeroed hash table was already assumed, because memblock zeroes the memory. CPU: SPARC M6, Memory: 7T Before fix: Dentry cache hash table entries: 1073741824 Inode-cache hash table entries: 536870912 Mount-cache hash table entries: 16777216 Mountpoint-cache hash table entries: 16777216 ftrace: allocating 20414 entries in 40 pages Total time: 11.798s After fix: Dentry cache hash table entries: 1073741824 Inode-cache hash table entries: 536870912 Mount-cache hash table entries: 16777216 Mountpoint-cache hash table entries: 16777216 ftrace: allocating 20414 entries in 40 pages Total time: 3.198s CPU: Intel Xeon E5-2630, Memory: 2.2T: Before fix: Dentry cache hash table entries: 536870912 Inode-cache hash table entries: 268435456 Mount-cache hash table entries: 8388608 Mountpoint-cache hash table entries: 8388608 CPU: Physical Processor ID: 0 Total time: 3.245s After fix: Dentry cache hash table entries: 536870912 Inode-cache hash table entries: 268435456 Mount-cache hash table entries: 8388608 Mountpoint-cache hash table entries: 8388608 CPU: Physical Processor ID: 0 Total time: 3.244s Link: http://lkml.kernel.org/r/1488432825-92126-4-git-send-email-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Babu Moger Cc: David Miller Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dcache.c | 18 ++++-------------- fs/inode.c | 14 ++------------ fs/namespace.c | 10 ++-------- kernel/locking/qspinlock_paravirt.h | 3 ++- kernel/pid.c | 7 ++----- 5 files changed, 12 insertions(+), 40 deletions(-) commit 3749a8f008eac3355a9e50b366ba08317a7e9cf8 Author: Pavel Tatashin Date: Thu Jul 6 15:39:08 2017 -0700 mm: zero hash tables in allocator Add a new flag HASH_ZERO which when provided grantees that the hash table that is returned by alloc_large_system_hash() is zeroed. In most cases that is what is needed by the caller. Use page level allocator's __GFP_ZERO flags to zero the memory. It is using memset() which is efficient method to zero memory and is optimized for most platforms. Link: http://lkml.kernel.org/r/1488432825-92126-3-git-send-email-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Babu Moger Cc: David Miller Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bootmem.h | 1 + mm/page_alloc.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit f7fb506fef6e8701bdb0ea7bb4f01148efd7416c Author: Aneesh Kumar K.V Date: Thu Jul 6 15:39:05 2017 -0700 powerpc/hugetlb: enable hugetlb migration for ppc64 Link: http://lkml.kernel.org/r/1494926612-23928-10-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Naoya Horiguchi Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/platforms/Kconfig.cputype | 5 +++++ 1 file changed, 5 insertions(+) commit 28c057160e8ae7538e5237744e6ec845d134975a Author: Aneesh Kumar K.V Date: Thu Jul 6 15:39:02 2017 -0700 powerpc/mm/hugetlb: remove follow_huge_addr for powerpc With generic code now handling hugetlb entries at pgd level and also supporting hugepage directory format, we can now remove the powerpc sepcific follow_huge_addr implementation. Link: http://lkml.kernel.org/r/1494926612-23928-9-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Naoya Horiguchi Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/mm/hugetlbpage.c | 64 ------------------------------------------- 1 file changed, 64 deletions(-) commit 50791e6de0b5f2fa74b1a5211edd4d2a8354cc53 Author: Aneesh Kumar K.V Date: Thu Jul 6 15:38:59 2017 -0700 powerpc/hugetlb: add follow_huge_pd implementation for ppc64 Link: http://lkml.kernel.org/r/1494926612-23928-8-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Naoya Horiguchi Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/mm/hugetlbpage.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 4dc71451a2078efcad2f66bd6ef130d2296827b1 Author: Aneesh Kumar K.V Date: Thu Jul 6 15:38:56 2017 -0700 mm/follow_page_mask: add support for hugepage directory entry Architectures like ppc64 supports hugepage size that is not mapped to any of of the page table levels. Instead they add an alternate page table entry format called hugepage directory (hugepd). hugepd indicates that the page table entry maps to a set of hugetlb pages. Add support for this in generic follow_page_mask code. We already support this format in the generic gup code. The default implementation prints warning and returns NULL. We will add ppc64 support in later patches Link: http://lkml.kernel.org/r/1494926612-23928-7-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Naoya Horiguchi Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 4 ++++ mm/gup.c | 33 +++++++++++++++++++++++++++++++++ mm/hugetlb.c | 8 ++++++++ 3 files changed, 45 insertions(+) commit e22992923f741c951b830121655b58342fce202e Author: Aneesh Kumar K.V Date: Thu Jul 6 15:38:53 2017 -0700 mm/hugetlb: move default definition of hugepd_t earlier in the header This enable to use the hugepd_t type early. No functional change in this patch. Link: http://lkml.kernel.org/r/1494926612-23928-6-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Naoya Horiguchi Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) commit faaa5b62d3f7907e217b179556038f9f8e157ee0 Author: Anshuman Khandual Date: Thu Jul 6 15:38:50 2017 -0700 mm/follow_page_mask: add support for hugetlb pgd entries ppc64 supports pgd hugetlb entries. Add code to handle hugetlb pgd entries to follow_page_mask so that ppc64 can switch to it to handle hugetlbe entries. Link: http://lkml.kernel.org/r/1494926612-23928-5-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Signed-off-by: Aneesh Kumar K.V Cc: Naoya Horiguchi Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 4 ++++ mm/gup.c | 7 +++++++ mm/hugetlb.c | 9 +++++++++ 3 files changed, 20 insertions(+) commit d5ed7444dafb94b6877410d1b66a846eb7184a09 Author: Aneesh Kumar K.V Date: Thu Jul 6 15:38:47 2017 -0700 mm/hugetlb: export hugetlb_entry_migration helper We will be using this later from the ppc64 code. Change the return type to bool. Link: http://lkml.kernel.org/r/1494926612-23928-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Naoya Horiguchi Cc: Anshuman Khandual Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 1 + mm/hugetlb.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 080dbb618b4bc25883a7654c1e92b2c49e3d6d63 Author: Aneesh Kumar K.V Date: Thu Jul 6 15:38:44 2017 -0700 mm/follow_page_mask: split follow_page_mask to smaller functions. Makes code reading easy. No functional changes in this patch. In a followup patch, we will be updating the follow_page_mask to handle hugetlb hugepd format so that archs like ppc64 can switch to the generic version. This split helps in doing that nicely. Link: http://lkml.kernel.org/r/1494926612-23928-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Naoya Horiguchi Cc: Anshuman Khandual Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 148 +++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 91 insertions(+), 57 deletions(-) commit 383321ab8578dfe3bbcc0bc5604c0f8ae08a5c98 Author: Aneesh Kumar K.V Date: Thu Jul 6 15:38:41 2017 -0700 mm/hugetlb/migration: use set_huge_pte_at instead of set_pte_at Patch series "HugeTLB migration support for PPC64", v2. This patch (of 9): The right interface to use to set a hugetlb pte entry is set_huge_pte_at. Use that instead of set_pte_at. Link: http://lkml.kernel.org/r/1494926612-23928-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Naoya Horiguchi Cc: Anshuman Khandual Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 94310cbcaa3c2bc1b790ba997270f28dc173d8ce Author: Anshuman Khandual Date: Thu Jul 6 15:38:38 2017 -0700 mm/madvise: enable (soft|hard) offline of HugeTLB pages at PGD level Though migrating gigantic HugeTLB pages does not sound much like real world use case, they can be affected by memory errors. Hence migration at the PGD level HugeTLB pages should be supported just to enable soft and hard offline use cases. While allocating the new gigantic HugeTLB page, it should not matter whether new page comes from the same node or not. There would be very few gigantic pages on the system afterall, we should not be bothered about node locality when trying to save a big page from crashing. This change renames dequeu_huge_page_node() function as dequeue_huge _page_node_exact() preserving it's original functionality. Now the new dequeue_huge_page_node() function scans through all available online nodes to allocate a huge page for the NUMA_NO_NODE case and just falls back calling dequeu_huge_page_node_exact() for all other cases. [arnd@arndb.de: make hstate_is_gigantic() inline] Link: http://lkml.kernel.org/r/20170522124748.3911296-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20170516100509.20122-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Signed-off-by: Arnd Bergmann Cc: "Aneesh Kumar K.V" Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 11 ++++++++++- mm/hugetlb.c | 18 +++++++++++++++++- mm/memory-failure.c | 13 +++++++++---- 3 files changed, 36 insertions(+), 6 deletions(-) commit f93ae36462091eca8c8d70ced64b97056a8ecbd6 Author: Mike Rapoport Date: Thu Jul 6 15:38:35 2017 -0700 fs/userfaultfd.c: drop dead code Calculation of start end end in __wake_userfault function are not used and can be removed. Link: http://lkml.kernel.org/r/1494930917-3134-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 5 ----- 1 file changed, 5 deletions(-) commit 57ecbd3831ee3ad43914d5c9dddbff7ce30e3d42 Author: Mike Rapoport Date: Thu Jul 6 15:38:32 2017 -0700 kernel/exit.c: don't include unused userfaultfd_k.h Commit dd0db88d8094 ("userfaultfd: non-cooperative: rollback userfaultfd_exit") removed userfaultfd callback from exit() which makes the include of unnecessary. Link: http://lkml.kernel.org/r/1494930907-3060-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/exit.c | 1 - 1 file changed, 1 deletion(-) commit 559bfc7d1beff814a8e9999d102bf1157ef1f010 Author: Michal Hocko Date: Thu Jul 6 15:38:28 2017 -0700 mm, memory_hotplug: remove unused cruft after memory hotplug rework zone_for_memory doesn't have any user anymore as well as the whole zone shifting infrastructure so drop them all. This shouldn't introduce any functional changes. Link: http://lkml.kernel.org/r/20170515085827.16474-15-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memory_hotplug.h | 2 - mm/memory_hotplug.c | 207 ----------------------------------------- 2 files changed, 209 deletions(-) commit cdf72f2504e968fd2ac6e4741516de6399c22a20 Author: Michal Hocko Date: Thu Jul 6 15:38:25 2017 -0700 mm, memory_hotplug: fix the section mismatch warning Tobias has reported following section mismatches introduced by "mm, memory_hotplug: do not associate hotadded memory to zones until online". WARNING: mm/built-in.o(.text+0x5a1c2): Section mismatch in reference from the function move_pfn_range_to_zone() to the function .meminit.text:memmap_init_zone() The function move_pfn_range_to_zone() references the function __meminit memmap_init_zone(). This is often because move_pfn_range_to_zone lacks a __meminit annotation or the annotation of memmap_init_zone is wrong. WARNING: mm/built-in.o(.text+0x5a25b): Section mismatch in reference from the function move_pfn_range_to_zone() to the function .meminit.text:init_currently_empty_zone() The function move_pfn_range_to_zone() references the function __meminit init_currently_empty_zone(). This is often because move_pfn_range_to_zone lacks a __meminit annotation or the annotation of init_currently_empty_zone is wrong. WARNING: vmlinux.o(.text+0x188aa2): Section mismatch in reference from the function move_pfn_range_to_zone() to the function .meminit.text:memmap_init_zone() The function move_pfn_range_to_zone() references the function __meminit memmap_init_zone(). This is often because move_pfn_range_to_zone lacks a __meminit annotation or the annotation of memmap_init_zone is wrong. WARNING: vmlinux.o(.text+0x188b3b): Section mismatch in reference from the function move_pfn_range_to_zone() to the function .meminit.text:init_currently_empty_zone() The function move_pfn_range_to_zone() references the function __meminit init_currently_empty_zone(). This is often because move_pfn_range_to_zone lacks a __meminit annotation or the annotation of init_currently_empty_zone is wrong. Both memmap_init_zone and init_currently_empty_zone are marked __meminit but move_pfn_range_to_zone is used outside of __meminit sections (e.g. devm_memremap_pages) so we have to hide it from the checker by __ref annotation. Link: http://lkml.kernel.org/r/20170515085827.16474-14-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Tobias Regnery Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Vlastimil Babka Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d79a728f9b2e6ddcce4e02c91c4de1076548a4c Author: Michal Hocko Date: Thu Jul 6 15:38:21 2017 -0700 mm, memory_hotplug: replace for_device by want_memblock in arch_add_memory arch_add_memory gets for_device argument which then controls whether we want to create memblocks for created memory sections. Simplify the logic by telling whether we want memblocks directly rather than going through pointless negation. This also makes the api easier to understand because it is clear what we want rather than nothing telling for_device which can mean anything. This shouldn't introduce any functional change. Link: http://lkml.kernel.org/r/20170515085827.16474-13-mhocko@kernel.org Signed-off-by: Michal Hocko Tested-by: Dan Williams Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/mm/init.c | 4 ++-- arch/powerpc/mm/mem.c | 4 ++-- arch/s390/mm/init.c | 4 ++-- arch/sh/mm/init.c | 4 ++-- arch/x86/mm/init_32.c | 4 ++-- arch/x86/mm/init_64.c | 4 ++-- include/linux/memory_hotplug.h | 2 +- kernel/memremap.c | 2 +- mm/memory_hotplug.c | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) commit c246a213f5bad687c6c2cea27d7265eaf8f6f5d7 Author: Michal Hocko Date: Thu Jul 6 15:38:18 2017 -0700 mm, memory_hotplug: do not assume ZONE_NORMAL is default kernel zone Heiko Carstens has noticed that he can generate overlapping zones for ZONE_DMA and ZONE_NORMAL: DMA [mem 0x0000000000000000-0x000000007fffffff] Normal [mem 0x0000000080000000-0x000000017fffffff] $ cat /sys/devices/system/memory/block_size_bytes 10000000 $ cat /sys/devices/system/memory/memory5/valid_zones DMA $ echo 0 > /sys/devices/system/memory/memory5/online $ cat /sys/devices/system/memory/memory5/valid_zones Normal $ echo 1 > /sys/devices/system/memory/memory5/online Normal $ cat /proc/zoneinfo Node 0, zone DMA spanned 524288 <----- present 458752 managed 455078 start_pfn: 0 <----- Node 0, zone Normal spanned 720896 present 589824 managed 571648 start_pfn: 327680 <----- The reason is that we assume that the default zone for kernel onlining is ZONE_NORMAL. This was a simplification introduced by the memory hotplug rework and it is easily fixable by checking the range overlap in the zone order and considering the first matching zone as the default one. If there is no such zone then assume ZONE_NORMAL as we have been doing so far. Fixes: "mm, memory_hotplug: do not associate hotadded memory to zones until online" Link: http://lkml.kernel.org/r/20170601083746.4924-3-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Heiko Carstens Tested-by: Heiko Carstens Acked-by: Vlastimil Babka Cc: Dan Williams Cc: Reza Arbab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 2 +- include/linux/memory_hotplug.h | 2 ++ mm/memory_hotplug.c | 27 ++++++++++++++++++++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) commit a69578a154ee1c00b572171f5bb5da7a83f9cd77 Author: Michal Hocko Date: Thu Jul 6 15:38:15 2017 -0700 mm, memory_hotplug: fix MMOP_ONLINE_KEEP behavior Heiko Carstens has noticed that the MMOP_ONLINE_KEEP is broken currently $ grep . memory3?/valid_zones memory34/valid_zones:Normal Movable memory35/valid_zones:Normal Movable memory36/valid_zones:Normal Movable memory37/valid_zones:Normal Movable $ echo online_movable > memory34/state $ grep . memory3?/valid_zones memory34/valid_zones:Movable memory35/valid_zones:Movable memory36/valid_zones:Movable memory37/valid_zones:Movable $ echo online > memory36/state $ grep . memory3?/valid_zones memory34/valid_zones:Movable memory36/valid_zones:Normal memory37/valid_zones:Movable so we have effectively punched a hole into the movable zone. The problem is that move_pfn_range() check for MMOP_ONLINE_KEEP is wrong. It only checks whether the given range is already part of the movable zone which is not the case here as only memory34 is in the zone. Fix this by using allow_online_pfn_range(..., MMOP_ONLINE_KERNEL) if that is false then we can be sure that movable onlining is the right thing to do. Fixes: "mm, memory_hotplug: do not associate hotadded memory to zones until online" Link: http://lkml.kernel.org/r/20170601083746.4924-2-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Heiko Carstens Tested-by: Heiko Carstens Acked-by: Vlastimil Babka Cc: Dan Williams Cc: Reza Arbab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f1dd2cd13c4bbbc9a7c4617b3b034fa643de98fe Author: Michal Hocko Date: Thu Jul 6 15:38:11 2017 -0700 mm, memory_hotplug: do not associate hotadded memory to zones until online The current memory hotplug implementation relies on having all the struct pages associate with a zone/node during the physical hotplug phase (arch_add_memory->__add_pages->__add_section->__add_zone). In the vast majority of cases this means that they are added to ZONE_NORMAL. This has been so since 9d99aaa31f59 ("[PATCH] x86_64: Support memory hotadd without sparsemem") and it wasn't a big deal back then because movable onlining didn't exist yet. Much later memory hotplug wanted to (ab)use ZONE_MOVABLE for movable onlining 511c2aba8f07 ("mm, memory-hotplug: dynamic configure movable memory and portion memory") and then things got more complicated. Rather than reconsidering the zone association which was no longer needed (because the memory hotplug already depended on SPARSEMEM) a convoluted semantic of zone shifting has been developed. Only the currently last memblock or the one adjacent to the zone_movable can be onlined movable. This essentially means that the online type changes as the new memblocks are added. Let's simulate memory hot online manually $ echo 0x100000000 > /sys/devices/system/memory/probe $ grep . /sys/devices/system/memory/memory32/valid_zones Normal Movable $ echo $((0x100000000+(128<<20))) > /sys/devices/system/memory/probe $ grep . /sys/devices/system/memory/memory3?/valid_zones /sys/devices/system/memory/memory32/valid_zones:Normal /sys/devices/system/memory/memory33/valid_zones:Normal Movable $ echo $((0x100000000+2*(128<<20))) > /sys/devices/system/memory/probe $ grep . /sys/devices/system/memory/memory3?/valid_zones /sys/devices/system/memory/memory32/valid_zones:Normal /sys/devices/system/memory/memory33/valid_zones:Normal /sys/devices/system/memory/memory34/valid_zones:Normal Movable $ echo online_movable > /sys/devices/system/memory/memory34/state $ grep . /sys/devices/system/memory/memory3?/valid_zones /sys/devices/system/memory/memory32/valid_zones:Normal /sys/devices/system/memory/memory33/valid_zones:Normal Movable /sys/devices/system/memory/memory34/valid_zones:Movable Normal This is an awkward semantic because an udev event is sent as soon as the block is onlined and an udev handler might want to online it based on some policy (e.g. association with a node) but it will inherently race with new blocks showing up. This patch changes the physical online phase to not associate pages with any zone at all. All the pages are just marked reserved and wait for the onlining phase to be associated with the zone as per the online request. There are only two requirements - existing ZONE_NORMAL and ZONE_MOVABLE cannot overlap - ZONE_NORMAL precedes ZONE_MOVABLE in physical addresses the latter one is not an inherent requirement and can be changed in the future. It preserves the current behavior and made the code slightly simpler. This is subject to change in future. This means that the same physical online steps as above will lead to the following state: Normal Movable /sys/devices/system/memory/memory32/valid_zones:Normal Movable /sys/devices/system/memory/memory33/valid_zones:Normal Movable /sys/devices/system/memory/memory32/valid_zones:Normal Movable /sys/devices/system/memory/memory33/valid_zones:Normal Movable /sys/devices/system/memory/memory34/valid_zones:Normal Movable /sys/devices/system/memory/memory32/valid_zones:Normal Movable /sys/devices/system/memory/memory33/valid_zones:Normal Movable /sys/devices/system/memory/memory34/valid_zones:Movable Implementation: The current move_pfn_range is reimplemented to check the above requirements (allow_online_pfn_range) and then updates the respective zone (move_pfn_range_to_zone), the pgdat and links all the pages in the pfn range with the zone/node. __add_pages is updated to not require the zone and only initializes sections in the range. This allowed to simplify the arch_add_memory code (s390 could get rid of quite some of code). devm_memremap_pages is the only user of arch_add_memory which relies on the zone association because it only hooks into the memory hotplug only half way. It uses it to associate the new memory with ZONE_DEVICE but doesn't allow it to be {on,off}lined via sysfs. This means that this particular code path has to call move_pfn_range_to_zone explicitly. The original zone shifting code is kept in place and will be removed in the follow up patch for an easier review. Please note that this patch also changes the original behavior when offlining a memory block adjacent to another zone (Normal vs. Movable) used to allow to change its movable type. This will be handled later. [richard.weiyang@gmail.com: simplify zone_intersects()] Link: http://lkml.kernel.org/r/20170616092335.5177-1-richard.weiyang@gmail.com [richard.weiyang@gmail.com: remove duplicate call for set_page_links] Link: http://lkml.kernel.org/r/20170616092335.5177-2-richard.weiyang@gmail.com [akpm@linux-foundation.org: remove unused local `i'] Link: http://lkml.kernel.org/r/20170515085827.16474-12-mhocko@kernel.org Signed-off-by: Michal Hocko Signed-off-by: Wei Yang Tested-by: Dan Williams Tested-by: Reza Arbab Acked-by: Heiko Carstens # For s390 bits Acked-by: Vlastimil Babka Cc: Martin Schwidefsky Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Daniel Kiper Cc: David Rientjes Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Mel Gorman Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/mm/init.c | 9 +- arch/powerpc/mm/mem.c | 10 +- arch/s390/mm/init.c | 30 +----- arch/sh/mm/init.c | 8 +- arch/x86/mm/init_32.c | 5 +- arch/x86/mm/init_64.c | 9 +- drivers/base/memory.c | 52 ++++++----- include/linux/memory_hotplug.h | 13 +-- include/linux/mmzone.h | 16 ++++ kernel/memremap.c | 4 + mm/memory_hotplug.c | 201 +++++++++++++++++++++++++---------------- mm/sparse.c | 3 +- 12 files changed, 185 insertions(+), 175 deletions(-) commit d336e94e448a514607551026f0624329b6af52c5 Author: Michal Hocko Date: Thu Jul 6 15:38:07 2017 -0700 mm, vmstat: skip reporting offline pages in pagetypeinfo pagetypeinfo_showblockcount_print skips over invalid pfns but it would report pages which are offline because those have a valid pfn. Their migrate type is misleading at best. Now that we have pfn_to_online_page() we can use it instead of pfn_valid() and fix this. [mhocko@suse.com: fix build] Link: http://lkml.kernel.org/r/20170519072225.GA13041@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20170515085827.16474-11-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Joonsoo Kim Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Vlastimil Babka Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2ce13640b3f4c8721e6820476cb380fbbfaedc18 Author: Michal Hocko Date: Thu Jul 6 15:38:04 2017 -0700 mm: __first_valid_page skip over offline pages __first_valid_page skips over invalid pfns in the range but it might still stumble over offline pages. At least start_isolate_page_range will mark those set_migratetype_isolate. This doesn't represent any immediate AFAICS because alloc_contig_range will fail to isolate those pages but it relies on not fully initialized page which will become a problem later when we stop associating offline pages to zones. Use pfn_to_online_page to handle this. This is more a preparatory patch than a fix. Link: http://lkml.kernel.org/r/20170515085827.16474-10-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_isolation.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit ccbe1e4ddece5ef9d83f2af7f28733efe6ae806a Author: Michal Hocko Date: Thu Jul 6 15:38:00 2017 -0700 mm, compaction: skip over holes in __reset_isolation_suitable __reset_isolation_suitable walks the whole zone pfn range and it tries to jump over holes by checking the zone for each page. It might still stumble over offline pages, though. Skip those by checking pfn_to_online_page() Link: http://lkml.kernel.org/r/20170515085827.16474-9-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2d070eab2e8270c8a84d480bb91e4f739315f03d Author: Michal Hocko Date: Thu Jul 6 15:37:56 2017 -0700 mm: consider zone which is not fully populated to have holes __pageblock_pfn_to_page has two users currently, set_zone_contiguous which checks whether the given zone contains holes and pageblock_pfn_to_page which then carefully returns a first valid page from the given pfn range for the given zone. This doesn't handle zones which are not fully populated though. Memory pageblocks can be offlined or might not have been onlined yet. In such a case the zone should be considered to have holes otherwise pfn walkers can touch and play with offline pages. Current callers of pageblock_pfn_to_page in compaction seem to work properly right now because they only isolate PageBuddy (isolate_freepages_block) or PageLRU resp. __PageMovable (isolate_migratepages_block) which will be always false for these pages. It would be safer to skip these pages altogether, though. In order to do this patch adds a new memory section state (SECTION_IS_ONLINE) which is set in memory_present (during boot time) or in online_pages_range during the memory hotplug. Similarly offline_mem_sections clears the bit and it is called when the memory range is offlined. pfn_to_online_page helper is then added which check the mem section and only returns a page if it is onlined already. Use the new helper in __pageblock_pfn_to_page and skip the whole page block in such a case. [mhocko@suse.com: check valid section number in pfn_to_online_page (Vlastimil), mark sections online after all struct pages are initialized in online_pages_range (Vlastimil)] Link: http://lkml.kernel.org/r/20170518164210.GD18333@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20170515085827.16474-8-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memory_hotplug.h | 22 +++++++++++++++++++++ include/linux/mmzone.h | 35 ++++++++++++++++++++++++++------ mm/memory_hotplug.c | 4 ++++ mm/page_alloc.c | 5 ++++- mm/sparse.c | 45 +++++++++++++++++++++++++++++++++++++++++- 5 files changed, 103 insertions(+), 8 deletions(-) commit 8b0662f245a328df8873be949b0087760420f40c Author: Michal Hocko Date: Thu Jul 6 15:37:53 2017 -0700 mm, memory_hotplug: consider offline memblocks removable is_pageblock_removable_nolock() relies on having zone association to examine all the page blocks to check whether they are movable or free. This is just wasting of cycles when the memblock is offline. Later patch in the series will also change the time when the page is associated with a zone so we let's bail out early if the memblock is offline. Link: http://lkml.kernel.org/r/20170515085827.16474-7-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Igor Mammedov Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9037a9934349b0e180896fc8cacaf1819418ba03 Author: Michal Hocko Date: Thu Jul 6 15:37:49 2017 -0700 mm, memory_hotplug: split up register_one_node() Memory hotplug (add_memory_resource) has to reinitialize node infrastructure if the node is offline (one which went through the complete add_memory(); remove_memory() cycle). That involves node registration to the kobj infrastructure (register_node), the proper association with cpus (register_cpu_under_node) and finally creation of node<->memblock symlinks (link_mem_sections). The last part requires to know node_start_pfn and node_spanned_pages which we currently have but a leter patch will postpone this initialization to the onlining phase which happens later. In fact we do not need to rely on the early pgdat initialization even now because the currently hot added pfn range is currently known. Split register_one_node into core which does all the common work for the boot time NUMA initialization and the hotplug (__register_one_node). register_one_node keeps the full initialization while hotplug calls __register_one_node and manually calls link_mem_sections for the proper range. This shouldn't introduce any functional change. Link: http://lkml.kernel.org/r/20170515085827.16474-6-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 51 ++++++++++++++++++++------------------------------- include/linux/node.h | 35 ++++++++++++++++++++++++++++++++++- mm/memory_hotplug.c | 17 ++++++++++++++++- 3 files changed, 70 insertions(+), 33 deletions(-) commit 1b862aecfbd419cdc4553645bf86d07554279bed Author: Michal Hocko Date: Thu Jul 6 15:37:45 2017 -0700 mm, memory_hotplug: get rid of is_zone_device_section Device memory hotplug hooks into regular memory hotplug only half way. It needs memory sections to track struct pages but there is no need/desire to associate those sections with memory blocks and export them to the userspace via sysfs because they cannot be onlined anyway. This is currently expressed by for_device argument to arch_add_memory which then makes sure to associate the given memory range with ZONE_DEVICE. register_new_memory then relies on is_zone_device_section to distinguish special memory hotplug from the regular one. While this works now, later patches in this series want to move __add_zone outside of arch_add_memory path so we have to come up with something else. Add want_memblock down the __add_pages path and use it to control whether the section->memblock association should be done. arch_add_memory then just trivially want memblock for everything but for_device hotplug. remove_memory_section doesn't need is_zone_device_section either. We can simply skip all the memblock specific cleanup if there is no memblock for the given section. This shouldn't introduce any functional change. Link: http://lkml.kernel.org/r/20170515085827.16474-5-mhocko@kernel.org Signed-off-by: Michal Hocko Tested-by: Dan Williams Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/mm/init.c | 2 +- arch/powerpc/mm/mem.c | 2 +- arch/s390/mm/init.c | 2 +- arch/sh/mm/init.c | 2 +- arch/x86/mm/init_32.c | 2 +- arch/x86/mm/init_64.c | 2 +- drivers/base/memory.c | 23 +++++++++-------------- include/linux/memory_hotplug.h | 2 +- mm/memory_hotplug.c | 9 ++++++--- 9 files changed, 22 insertions(+), 24 deletions(-) commit bfe63d3beabfac93521c8b7ccd40befd7a90148e Author: Michal Hocko Date: Thu Jul 6 15:37:42 2017 -0700 mm: drop page_initialized check from get_nid_for_pfn Commit c04fc586c1a4 ("mm: show node to memory section relationship with symlinks in sysfs") has added means to export memblock<->node association into the sysfs. It has also introduced get_nid_for_pfn which is a rather confusing counterpart of pfn_to_nid which checks also whether the pfn page is already initialized (page_initialized). This is done by checking page::lru != NULL which doesn't make any sense at all. Nothing in this path really relies on the lru list being used or initialized. Just remove it because this will become a problem with later patches. Thanks to Reza Arbab for testing which revealed this to be a problem (http://lkml.kernel.org/r/20170403202337.GA12482@dhcp22.suse.cz) Link: http://lkml.kernel.org/r/20170515085827.16474-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Reza Arbab Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 7 ------- 1 file changed, 7 deletions(-) commit c8f9565716e37fe764a3007d90cecb35b3b4a77a Author: Michal Hocko Date: Thu Jul 6 15:37:38 2017 -0700 mm, memory_hotplug: use node instead of zone in can_online_high_movable The primary purpose of this helper is to query the node state so use the node id directly. This is a preparatory patch for later changes. This shouldn't introduce any functional change Link: http://lkml.kernel.org/r/20170515085827.16474-3-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Yasuaki Ishimatsu Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dc0bbf3b7fb9ed2246f62bba4379070589e2135c Author: Michal Hocko Date: Thu Jul 6 15:37:35 2017 -0700 mm: remove return value from init_currently_empty_zone Patch series "mm: make movable onlining suck less", v4. Movable onlining is a real hack with many downsides - mainly reintroduction of lowmem/highmem issues we used to have on 32b systems - but it is the only way to make the memory hotremove more reliable which is something that people are asking for. The current semantic of memory movable onlinening is really cumbersome, however. The main reason for this is that the udev driven approach is basically unusable because udev races with the memory probing while only the last memory block or the one adjacent to the existing zone_movable are allowed to be onlined movable. In short the criterion for the successful online_movable changes under udev's feet. A reliable udev approach would require a 2 phase approach where the first successful movable online would have to check all the previous blocks and online them in descending order. This is hard to be considered sane. This patchset aims at making the onlining semantic more usable. First of all it allows to online memory movable as long as it doesn't clash with the existing ZONE_NORMAL. That means that ZONE_NORMAL and ZONE_MOVABLE cannot overlap. Currently I preserve the original ordering semantic so the zone always precedes the movable zone but I have plans to remove this restriction in future because it is not really necessary. First 3 patches are cleanups which should be ready to be merged right away (unless I have missed something subtle of course). Patch 4 deals with ZONE_DEVICE dependencies down the __add_pages path. Patch 5 deals with implicit assumptions of register_one_node on pgdat initialization. Patches 6-10 deal with offline holes in the zone for pfn walkers. I hope I got all of them right but people familiar with compaction should double check this. Patch 11 is the core of the change. In order to make it easier to review I have tried it to be as minimalistic as possible and the large code removal is moved to patch 14. Patch 12 is a trivial follow up cleanup. Patch 13 fixes sparse warnings and finally patch 14 removes the unused code. I have tested the patches in kvm: # qemu-system-x86_64 -enable-kvm -monitor pty -m 2G,slots=4,maxmem=4G -numa node,mem=1G -numa node,mem=1G ... and then probed the additional memory by (qemu) object_add memory-backend-ram,id=mem1,size=1G (qemu) device_add pc-dimm,id=dimm1,memdev=mem1 Then I have used this simple script to probe the memory block by hand # cat probe_memblock.sh #!/bin/sh BLOCK_NR=$1 # echo $((0x100000000+$BLOCK_NR*(128<<20))) > /sys/devices/system/memory/probe # for i in $(seq 10); do sh probe_memblock.sh $i; done # grep . /sys/devices/system/memory/memory3?/valid_zones 2>/dev/null /sys/devices/system/memory/memory33/valid_zones:Normal Movable /sys/devices/system/memory/memory34/valid_zones:Normal Movable /sys/devices/system/memory/memory35/valid_zones:Normal Movable /sys/devices/system/memory/memory36/valid_zones:Normal Movable /sys/devices/system/memory/memory37/valid_zones:Normal Movable /sys/devices/system/memory/memory38/valid_zones:Normal Movable /sys/devices/system/memory/memory39/valid_zones:Normal Movable The main difference to the original implementation is that all new memblocks can be both online_kernel and online_movable initially because there is no clash obviously. For the comparison the original implementation would have /sys/devices/system/memory/memory33/valid_zones:Normal /sys/devices/system/memory/memory34/valid_zones:Normal /sys/devices/system/memory/memory35/valid_zones:Normal /sys/devices/system/memory/memory36/valid_zones:Normal /sys/devices/system/memory/memory37/valid_zones:Normal /sys/devices/system/memory/memory38/valid_zones:Normal /sys/devices/system/memory/memory39/valid_zones:Normal Movable Now # echo online_movable > /sys/devices/system/memory/memory34/state # grep . /sys/devices/system/memory/memory3?/valid_zones 2>/dev/null /sys/devices/system/memory/memory33/valid_zones:Normal Movable /sys/devices/system/memory/memory34/valid_zones:Movable /sys/devices/system/memory/memory35/valid_zones:Movable /sys/devices/system/memory/memory36/valid_zones:Movable /sys/devices/system/memory/memory37/valid_zones:Movable /sys/devices/system/memory/memory38/valid_zones:Movable /sys/devices/system/memory/memory39/valid_zones:Movable Block 33 can still be online both kernel and movable while all the remaining can be only movable. /proc/zonelist says Node 0, zone Normal pages free 0 min 0 low 0 high 0 spanned 0 present 0 -- Node 0, zone Movable pages free 32753 min 85 low 117 high 149 spanned 32768 present 32768 A new memblock at a lower address will result in a new memblock (32) which will still allow both Normal and Movable. # sh probe_memblock.sh 0 # grep . /sys/devices/system/memory/memory3[2-5]/valid_zones 2>/dev/null /sys/devices/system/memory/memory32/valid_zones:Normal Movable /sys/devices/system/memory/memory33/valid_zones:Normal Movable /sys/devices/system/memory/memory34/valid_zones:Movable /sys/devices/system/memory/memory35/valid_zones:Movable and online_kernel will convert it to the zone normal properly while 33 can be still onlined both ways. # echo online_kernel > /sys/devices/system/memory/memory32/state # grep . /sys/devices/system/memory/memory3[2-5]/valid_zones 2>/dev/null /sys/devices/system/memory/memory32/valid_zones:Normal /sys/devices/system/memory/memory33/valid_zones:Normal Movable /sys/devices/system/memory/memory34/valid_zones:Movable /sys/devices/system/memory/memory35/valid_zones:Movable /proc/zoneinfo will now tell Node 0, zone Normal pages free 65441 min 165 low 230 high 295 spanned 65536 present 65536 -- Node 0, zone Movable pages free 32740 min 82 low 114 high 146 spanned 32768 present 32768 so both zones have one memblock spanned and present. Onlining 39 should associate this block to the movable zone # echo online > /sys/devices/system/memory/memory39/state /proc/zoneinfo will now tell Node 0, zone Normal pages free 32765 min 80 low 112 high 144 spanned 32768 present 32768 -- Node 0, zone Movable pages free 65501 min 160 low 225 high 290 spanned 196608 present 65536 so we will have a movable zone which spans 6 memblocks, 2 present and 4 representing a hole. Offlining both movable blocks will lead to the zone with no present pages which is the expected behavior I believe. # echo offline > /sys/devices/system/memory/memory39/state # echo offline > /sys/devices/system/memory/memory34/state # grep -A6 "Movable\|Normal" /proc/zoneinfo Node 0, zone Normal pages free 32735 min 90 low 122 high 154 spanned 32768 present 32768 -- Node 0, zone Movable pages free 0 min 0 low 0 high 0 spanned 196608 present 0 As a bonus we will get a nice cleanup in the memory hotplug codebase. This patch (of 16): init_currently_empty_zone doesn't have any error to return yet it is still an int and callers try to be defensive and try to handle potential error. Remove this nonsense and simplify all callers. This patch shouldn't have any visible effect Link: http://lkml.kernel.org/r/20170515085827.16474-2-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Yasuaki Ishimatsu Acked-by: Balbir Singh Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Dan Williams Cc: Daniel Kiper Cc: David Rientjes Cc: Heiko Carstens Cc: Igor Mammedov Cc: Jerome Glisse Cc: Joonsoo Kim Cc: Martin Schwidefsky Cc: Mel Gorman Cc: Reza Arbab Cc: Tobias Regnery Cc: Toshi Kani Cc: Vitaly Kuznetsov Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 2 +- mm/memory_hotplug.c | 23 +++++------------------ mm/page_alloc.c | 8 ++------ 3 files changed, 8 insertions(+), 25 deletions(-) commit 747552b1e71b400fa32a221e072be2c0b7661f14 Author: Huang Ying Date: Thu Jul 6 15:37:31 2017 -0700 mm, THP, swap: enable THP swap optimization only if has compound map If there is no compound map for a THP (Transparent Huge Page), it is possible that the map count of some sub-pages of the THP is 0. So it is better to split the THP before swapping out. In this way, the sub-pages not mapped will be freed, and we can avoid the unnecessary swap out operations for these sub-pages. Link: http://lkml.kernel.org/r/20170515112522.32457-6-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Andrea Arcangeli Cc: Ebru Akagunduz Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit b8f593cd0896b8b14c2b494a9776531b5cd54d98 Author: Huang Ying Date: Thu Jul 6 15:37:28 2017 -0700 mm, THP, swap: check whether THP can be split firstly To swap out THP (Transparent Huage Page), before splitting the THP, the swap cluster will be allocated and the THP will be added into the swap cache. But it is possible that the THP cannot be split, so that we must delete the THP from the swap cache and free the swap cluster. To avoid that, in this patch, whether the THP can be split is checked firstly. The check can only be done racy, but it is good enough for most cases. With the patch, the swap out throughput improves 3.6% (from about 4.16GB/s to about 4.31GB/s) in the vm-scalability swap-w-seq test case with 8 processes. The test is done on a Xeon E5 v3 system. The swap device used is a RAM simulated PMEM (persistent memory) device. To test the sequential swapping out, the test case creates 8 processes, which sequentially allocate and write to the anonymous pages until the RAM and part of the swap device is used up. Link: http://lkml.kernel.org/r/20170515112522.32457-5-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Kirill A. Shutemov [for can_split_huge_page()] Cc: Johannes Weiner Cc: Andrea Arcangeli Cc: Ebru Akagunduz Cc: Hugh Dickins Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 7 +++++++ mm/huge_memory.c | 20 ++++++++++++++++---- mm/vmscan.c | 4 ++++ 3 files changed, 27 insertions(+), 4 deletions(-) commit 0f0746589e4be071a8f890b2035c97c30c7a4e16 Author: Minchan Kim Date: Thu Jul 6 15:37:24 2017 -0700 mm, THP, swap: move anonymous THP split logic to vmscan The add_to_swap aims to allocate swap_space(ie, swap slot and swapcache) so if it fails due to lack of space in case of THP or something(hdd swap but tries THP swapout) *caller* rather than add_to_swap itself should split the THP page and retry it with base page which is more natural. Link: http://lkml.kernel.org/r/20170515112522.32457-4-ying.huang@intel.com Signed-off-by: Minchan Kim Signed-off-by: "Huang, Ying" Acked-by: Johannes Weiner Cc: Andrea Arcangeli Cc: Ebru Akagunduz Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Rik van Riel Cc: Shaohua Li Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 4 ++-- mm/swap_state.c | 23 ++++++----------------- mm/vmscan.c | 17 ++++++++++++++++- 3 files changed, 24 insertions(+), 20 deletions(-) commit 75f6d6d29a40b5541f0f107201cf7dec134ad210 Author: Minchan Kim Date: Thu Jul 6 15:37:21 2017 -0700 mm, THP, swap: unify swap slot free functions to put_swap_page Now, get_swap_page takes struct page and allocates swap space according to page size(ie, normal or THP) so it would be more cleaner to introduce put_swap_page which is a counter function of get_swap_page. Then, it calls right swap slot free function depending on page's size. [ying.huang@intel.com: minor cleanup and fix] Link: http://lkml.kernel.org/r/20170515112522.32457-3-ying.huang@intel.com Signed-off-by: Minchan Kim Signed-off-by: "Huang, Ying" Acked-by: Johannes Weiner Cc: Andrea Arcangeli Cc: Ebru Akagunduz Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Rik van Riel Cc: Shaohua Li Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 12 ++---------- mm/shmem.c | 2 +- mm/swap_state.c | 13 +++---------- mm/swapfile.c | 16 ++++++++++++++-- mm/vmscan.c | 2 +- 5 files changed, 21 insertions(+), 24 deletions(-) commit 38d8b4e6bdc872f07a3149309ab01719c96f3894 Author: Huang Ying Date: Thu Jul 6 15:37:18 2017 -0700 mm, THP, swap: delay splitting THP during swap out Patch series "THP swap: Delay splitting THP during swapping out", v11. This patchset is to optimize the performance of Transparent Huge Page (THP) swap. Recently, the performance of the storage devices improved so fast that we cannot saturate the disk bandwidth with single logical CPU when do page swap out even on a high-end server machine. Because the performance of the storage device improved faster than that of single logical CPU. And it seems that the trend will not change in the near future. On the other hand, the THP becomes more and more popular because of increased memory size. So it becomes necessary to optimize THP swap performance. The advantages of the THP swap support include: - Batch the swap operations for the THP to reduce lock acquiring/releasing, including allocating/freeing the swap space, adding/deleting to/from the swap cache, and writing/reading the swap space, etc. This will help improve the performance of the THP swap. - The THP swap space read/write will be 2M sequential IO. It is particularly helpful for the swap read, which are usually 4k random IO. This will improve the performance of the THP swap too. - It will help the memory fragmentation, especially when the THP is heavily used by the applications. The 2M continuous pages will be free up after THP swapping out. - It will improve the THP utilization on the system with the swap turned on. Because the speed for khugepaged to collapse the normal pages into the THP is quite slow. After the THP is split during the swapping out, it will take quite long time for the normal pages to collapse back into the THP after being swapped in. The high THP utilization helps the efficiency of the page based memory management too. There are some concerns regarding THP swap in, mainly because possible enlarged read/write IO size (for swap in/out) may put more overhead on the storage device. To deal with that, the THP swap in should be turned on only when necessary. For example, it can be selected via "always/never/madvise" logic, to be turned on globally, turned off globally, or turned on only for VMA with MADV_HUGEPAGE, etc. This patchset is the first step for the THP swap support. The plan is to delay splitting THP step by step, finally avoid splitting THP during the THP swapping out and swap out/in the THP as a whole. As the first step, in this patchset, the splitting huge page is delayed from almost the first step of swapping out to after allocating the swap space for the THP and adding the THP into the swap cache. This will reduce lock acquiring/releasing for the locks used for the swap cache management. With the patchset, the swap out throughput improves 15.5% (from about 3.73GB/s to about 4.31GB/s) in the vm-scalability swap-w-seq test case with 8 processes. The test is done on a Xeon E5 v3 system. The swap device used is a RAM simulated PMEM (persistent memory) device. To test the sequential swapping out, the test case creates 8 processes, which sequentially allocate and write to the anonymous pages until the RAM and part of the swap device is used up. This patch (of 5): In this patch, splitting huge page is delayed from almost the first step of swapping out to after allocating the swap space for the THP (Transparent Huge Page) and adding the THP into the swap cache. This will batch the corresponding operation, thus improve THP swap out throughput. This is the first step for the THP swap optimization. The plan is to delay splitting the THP step by step and avoid splitting the THP finally. In this patch, one swap cluster is used to hold the contents of each THP swapped out. So, the size of the swap cluster is changed to that of the THP (Transparent Huge Page) on x86_64 architecture (512). For other architectures which want such THP swap optimization, ARCH_USES_THP_SWAP_CLUSTER needs to be selected in the Kconfig file for the architecture. In effect, this will enlarge swap cluster size by 2 times on x86_64. Which may make it harder to find a free cluster when the swap space becomes fragmented. So that, this may reduce the continuous swap space allocation and sequential write in theory. The performance test in 0day shows no regressions caused by this. In the future of THP swap optimization, some information of the swapped out THP (such as compound map count) will be recorded in the swap_cluster_info data structure. The mem cgroup swap accounting functions are enhanced to support charge or uncharge a swap cluster backing a THP as a whole. The swap cluster allocate/free functions are added to allocate/free a swap cluster for a THP. A fair simple algorithm is used for swap cluster allocation, that is, only the first swap device in priority list will be tried to allocate the swap cluster. The function will fail if the trying is not successful, and the caller will fallback to allocate a single swap slot instead. This works good enough for normal cases. If the difference of the number of the free swap clusters among multiple swap devices is significant, it is possible that some THPs are split earlier than necessary. For example, this could be caused by big size difference among multiple swap devices. The swap cache functions is enhanced to support add/delete THP to/from the swap cache as a set of (HPAGE_PMD_NR) sub-pages. This may be enhanced in the future with multi-order radix tree. But because we will split the THP soon during swapping out, that optimization doesn't make much sense for this first step. The THP splitting functions are enhanced to support to split THP in swap cache during swapping out. The page lock will be held during allocating the swap cluster, adding the THP into the swap cache and splitting the THP. So in the code path other than swapping out, if the THP need to be split, the PageSwapCache(THP) will be always false. The swap cluster is only available for SSD, so the THP swap optimization in this patchset has no effect for HDD. [ying.huang@intel.com: fix two issues in THP optimize patch] Link: http://lkml.kernel.org/r/87k25ed8zo.fsf@yhuang-dev.intel.com [hannes@cmpxchg.org: extensive cleanups and simplifications, reduce code size] Link: http://lkml.kernel.org/r/20170515112522.32457-2-ying.huang@intel.com Signed-off-by: "Huang, Ying" Signed-off-by: Johannes Weiner Suggested-by: Andrew Morton [for config option] Acked-by: Kirill A. Shutemov [for changes in huge_memory.c and huge_mm.h] Cc: Andrea Arcangeli Cc: Ebru Akagunduz Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Cc: Hugh Dickins Cc: Shaohua Li Cc: Minchan Kim Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/Kconfig | 1 + include/linux/page-flags.h | 7 +- include/linux/swap.h | 19 +++- include/linux/swap_cgroup.h | 6 +- mm/Kconfig | 12 ++ mm/huge_memory.c | 11 +- mm/memcontrol.c | 50 +++++---- mm/shmem.c | 2 +- mm/swap_cgroup.c | 40 +++++-- mm/swap_slots.c | 16 ++- mm/swap_state.c | 114 +++++++++++-------- mm/swapfile.c | 259 ++++++++++++++++++++++++++++++++------------ 12 files changed, 373 insertions(+), 164 deletions(-) commit 9d85e15f1d552653c989dbecf051d8eea5937be8 Author: Anshuman Khandual Date: Thu Jul 6 15:37:15 2017 -0700 mm/vmstat.c: standardize file operations variable names Standardize the file operation variable names related to all four memory management /proc interface files. Also change all the symbol permissions (S_IRUGO) into octal permissions (0444) as it got complaints from checkpatch.pl. This does not create any functional change to the interface. Link: http://lkml.kernel.org/r/20170427030632.8588-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 51f9f82c855d65ef14c2af10e0d2c86ec332a182 Author: Minchan Kim Date: Thu Jul 6 15:37:12 2017 -0700 zram: count same page write as page_stored Regardless of whether it is same page or not, it's surely write and stored to zram so we should increase pages_stored stat. Otherwise, user can see zero value via mm_stats although he writes a lot of pages to zram. Link: http://lkml.kernel.org/r/1494834068-27004-1-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 80b18dfa53bbb03085eba6401f5d29dad49205b7 Author: Andrea Arcangeli Date: Thu Jul 6 15:37:08 2017 -0700 ksm: optimize refile of stable_node_dup at the head of the chain If a candidate stable_node_dup has been found and it can accept further merges it can be refiled to the head of the list to speedup next searches without altering which dup is found and how the dups accumulate in the chain. We already refiled it back to the head in the prune_stale_stable_nodes case, but we didn't refile it if not pruning (which is more common). And we also refiled it when it was already at the head which is unnecessary (in the prune_stale_stable_nodes case, nr > 1 means there's more than one dup in the chain, it doesn't mean it's not already at the head of the chain). The stable_node_chain list is single threaded and there's no SMP locking contention so it should be faster to refile it to the head of the list also if prune_stale_stable_nodes is false. Profiling shows the refile happens 1.9% of the time when a dup is found with a max_page_sharing limit setting of 3 (with max_page_sharing of 2 the refile never happens of course as there's never space for one more merge) which is reasonably low. At higher max_page_sharing values it should be much less frequent. This is just an optimization. Link: http://lkml.kernel.org/r/20170518173721.22316-4-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: Evgheni Dereveanchin Cc: Andrey Ryabinin Cc: Petr Holasek Cc: Hugh Dickins Cc: Arjan van de Ven Cc: Davidlohr Bueso Cc: Gavin Guo Cc: Jay Vosburgh Cc: Mel Gorman Cc: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) commit 8dc5ffcd5a74da39ed2c533d786a3f78671a38b8 Author: Andrea Arcangeli Date: Thu Jul 6 15:37:05 2017 -0700 ksm: swap the two output parameters of chain/chain_prune Some static checker complains if chain/chain_prune returns a potentially stale pointer. There are two output parameters to chain/chain_prune, one is tree_page the other is stable_node_dup. Like in get_ksm_page the caller has to check tree_page is NULL before touching the stable_node. Similarly in chain/chain_prune the caller has to check tree_page before touching the stable_node_dup returned or the original stable_node passed as parameter. Because the tree_page is never returned as a stale pointer, it may be more intuitive to return tree_page and to pass stable_node_dup for reference instead of the reverse. This patch purely swaps the two output parameters of chain/chain_prune as a cleanup for the static checker and to mimic the get_ksm_page behavior more closely. There's no change to the caller at all except the swap, it's purely a cleanup and it is a noop from the caller point of view. Link: http://lkml.kernel.org/r/20170518173721.22316-3-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Dan Carpenter Tested-by: Dan Carpenter Cc: Evgheni Dereveanchin Cc: Andrey Ryabinin Cc: Petr Holasek Cc: Hugh Dickins Cc: Arjan van de Ven Cc: Davidlohr Bueso Cc: Gavin Guo Cc: Jay Vosburgh Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 78 ++++++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 26 deletions(-) commit 0ba1d0f7c41cdab306a3d30e036bc393c3ebba7e Author: Andrea Arcangeli Date: Thu Jul 6 15:37:02 2017 -0700 ksm: cleanup stable_node chain collapse case Patch series "KSMscale cleanup/optimizations". There are no fixes here it's just minor cleanups and optimizations. 1/3 removes makes the "fix" for the stale stable_node fall in the standard case without introducing new cases. Setting stable_node to NULL was marginally safer, but stale pointer is still wiped from the caller, this looks cleaner. 2/3 should fix the false positive from Dan's static checker. 3/3 is a microoptimization to apply the the refile of future merge candidate dups at the head of the chain in all cases and to skip it in one case where we did it and but it was a noop (to avoid checking if it was already at the head but now we've to check it anyway so it got optimized away). This patch (of 3): When the stable_node chain is collapsed we can as well set the caller stable_node to match the returned stable_node_dup in chain_prune(). This way the collapse case becomes indistinguishable from the regular stable_node case and we can remove two branches from the KSM page migration handling slow paths. While it was all correct this looks cleaner (and faster) as the caller has to deal with fewer special cases. Link: http://lkml.kernel.org/r/20170518173721.22316-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: Evgheni Dereveanchin Cc: Andrey Ryabinin Cc: Petr Holasek Cc: Hugh Dickins Cc: Arjan van de Ven Cc: Davidlohr Bueso Cc: Gavin Guo Cc: Jay Vosburgh Cc: Mel Gorman Cc: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) commit b4fecc67cc569b14301f5a1111363d5818b8da5e Author: Andrea Arcangeli Date: Thu Jul 6 15:36:59 2017 -0700 ksm: fix use after free with merge_across_nodes = 0 If merge_across_nodes was manually set to 0 (not the default value) by the admin or a tuned profile on NUMA systems triggering cross-NODE page migrations, a stable_node use after free could materialize. If the chain is collapsed stable_node would point to the old chain that was already freed. stable_node_dup would be the stable_node dup now converted to a regular stable_node and indexed in the rbtree in replacement of the freed stable_node chain (not anymore a dup). This special case where the chain is collapsed in the NUMA replacement path, is now detected by setting stable_node to NULL by the chain_prune callee if it decides to collapse the chain. This tells the NUMA replacement code that even if stable_node and stable_node_dup are different, this is not a chain if stable_node is NULL, as the stable_node_dup was converted to a regular stable_node and the chain was collapsed. It is generally safer for the callee to force the caller stable_node to NULL the moment it become stale so any other mistake like this would result in an instant Oops easier to debug than an use after free. Otherwise the replace logic would act like if stable_node was a valid chain, when in fact it was freed. Notably stable_node_chain_add_dup(page_node, stable_node) would run on a stable stable_node. Andrey Ryabinin found the source of the use after free in chain_prune(). Link: http://lkml.kernel.org/r/20170512193805.8807-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Andrey Ryabinin Reported-by: Evgheni Dereveanchin Tested-by: Andrey Ryabinin Cc: Petr Holasek Cc: Hugh Dickins Cc: Davidlohr Bueso Cc: Arjan van de Ven Cc: Gavin Guo Cc: Jay Vosburgh Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 11 deletions(-) commit 2c653d0ee2ae78ff3a174cc877a057c8afac7069 Author: Andrea Arcangeli Date: Thu Jul 6 15:36:55 2017 -0700 ksm: introduce ksm_max_page_sharing per page deduplication limit Without a max deduplication limit for each KSM page, the list of the rmap_items associated to each stable_node can grow infinitely large. During the rmap walk each entry can take up to ~10usec to process because of IPIs for the TLB flushing (both for the primary MMU and the secondary MMUs with the MMU notifier). With only 16GB of address space shared in the same KSM page, that would amount to dozens of seconds of kernel runtime. A ~256 max deduplication factor will reduce the latencies of the rmap walks on KSM pages to order of a few msec. Just doing the cond_resched() during the rmap walks is not enough, the list size must have a limit too, otherwise the caller could get blocked in (schedule friendly) kernel computations for seconds, unexpectedly. There's room for optimization to significantly reduce the IPI delivery cost during the page_referenced(), but at least for page_migration in the KSM case (used by hard NUMA bindings, compaction and NUMA balancing) it may be inevitable to send lots of IPIs if each rmap_item->mm is active on a different CPU and there are lots of CPUs. Even if we ignore the IPI delivery cost, we've still to walk the whole KSM rmap list, so we can't allow millions or billions (ulimited) number of entries in the KSM stable_node rmap_item lists. The limit is enforced efficiently by adding a second dimension to the stable rbtree. So there are three types of stable_nodes: the regular ones (identical as before, living in the first flat dimension of the stable rbtree), the "chains" and the "dups". Every "chain" and all "dups" linked into a "chain" enforce the invariant that they represent the same write protected memory content, even if each "dup" will be pointed by a different KSM page copy of that content. This way the stable rbtree lookup computational complexity is unaffected if compared to an unlimited max_sharing_limit. It is still enforced that there cannot be KSM page content duplicates in the stable rbtree itself. Adding the second dimension to the stable rbtree only after the max_page_sharing limit hits, provides for a zero memory footprint increase on 64bit archs. The memory overhead of the per-KSM page stable_tree and per virtual mapping rmap_item is unchanged. Only after the max_page_sharing limit hits, we need to allocate a stable_tree "chain" and rb_replace() the "regular" stable_node with the newly allocated stable_node "chain". After that we simply add the "regular" stable_node to the chain as a stable_node "dup" by linking hlist_dup in the stable_node_chain->hlist. This way the "regular" (flat) stable_node is converted to a stable_node "dup" living in the second dimension of the stable rbtree. During stable rbtree lookups the stable_node "chain" is identified as stable_node->rmap_hlist_len == STABLE_NODE_CHAIN (aka is_stable_node_chain()). When dropping stable_nodes, the stable_node "dup" is identified as stable_node->head == STABLE_NODE_DUP_HEAD (aka is_stable_node_dup()). The STABLE_NODE_DUP_HEAD must be an unique valid pointer never used elsewhere in any stable_node->head/node to avoid a clashes with the stable_node->node.rb_parent_color pointer, and different from &migrate_nodes. So the second field of &migrate_nodes is picked and verified as always safe with a BUILD_BUG_ON in case the list_head implementation changes in the future. The STABLE_NODE_DUP is picked as a random negative value in stable_node->rmap_hlist_len. rmap_hlist_len cannot become negative when it's a "regular" stable_node or a stable_node "dup". The stable_node_chain->nid is irrelevant. The stable_node_chain->kpfn is aliased in a union with a time field used to rate limit the stable_node_chain->hlist prunes. The garbage collection of the stable_node_chain happens lazily during stable rbtree lookups (as for all other kind of stable_nodes), or while disabling KSM with "echo 2 >/sys/kernel/mm/ksm/run" while collecting the entire stable rbtree. While the "regular" stable_nodes and the stable_node "dups" must wait for their underlying tree_page to be freed before they can be freed themselves, the stable_node "chains" can be freed immediately if the stable_node->hlist turns empty. This is because the "chains" are never pointed by any page->mapping and they're effectively stable rbtree KSM self contained metadata. [akpm@linux-foundation.org: fix non-NUMA build] Signed-off-by: Andrea Arcangeli Tested-by: Petr Holasek Cc: Hugh Dickins Cc: Davidlohr Bueso Cc: Arjan van de Ven Cc: Evgheni Dereveanchin Cc: Andrey Ryabinin Cc: Gavin Guo Cc: Jay Vosburgh Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/ksm.txt | 63 ++++ mm/ksm.c | 733 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 730 insertions(+), 66 deletions(-) commit 172ffeb9b9c284c6676ce03721cccf9b4ec6680b Author: Wei Yang Date: Thu Jul 6 15:36:53 2017 -0700 mm/nobootmem.c: return 0 when start_pfn equals end_pfn When start_pfn equals end_pfn, __free_pages_memory() has no effect and __free_memory_core() will finally return (end_pfn - start_pfn) = 0. This patch returns 0 directly when start_pfn equals end_pfn. Link: http://lkml.kernel.org/r/20170502131115.6650-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/nobootmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2f43e566a02a3bdde0a65e6a2e88d707c212a29 Author: Nick Desaulniers Date: Thu Jul 6 15:36:50 2017 -0700 mm/vmscan.c: fix unsequenced modification and access warning Clang and its -Wunsequenced emits a warning mm/vmscan.c:2961:25: error: unsequenced modification and access to 'gfp_mask' [-Wunsequenced] .gfp_mask = (gfp_mask = current_gfp_context(gfp_mask)), ^ While it is not clear to me whether the initialization code violates the specification (6.7.8 par 19 (ISO/IEC 9899) looks like it disagrees) the code is quite confusing and worth cleaning up anyway. Fix this by reusing sc.gfp_mask rather than the updated input gfp_mask parameter. Link: http://lkml.kernel.org/r/20170510154030.10720-1-nick.desaulniers@gmail.com Signed-off-by: Nick Desaulniers Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit ac34ceaf1cdb34e8c34c0873ee562e9df6087cbc Author: Daniel Micay Date: Thu Jul 6 15:36:47 2017 -0700 mm/mmap.c: mark protection_map as __ro_after_init The protection map is only modified by per-arch init code so it can be protected from writes after the init code runs. This change was extracted from PaX where it's part of KERNEXEC. Link: http://lkml.kernel.org/r/20170510174441.26163-1-danielmicay@gmail.com Signed-off-by: Daniel Micay Acked-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4e1be9ec1130fff4d691cdc0e0f9d666009f9ae Author: Dave Hansen Date: Thu Jul 6 15:36:44 2017 -0700 mm, sparsemem: break out of loops early There are a number of times that we loop over NR_MEM_SECTIONS, looking for section_present() on each section. But, when we have very large physical address spaces (large MAX_PHYSMEM_BITS), NR_MEM_SECTIONS becomes very large, making the loops quite long. With MAX_PHYSMEM_BITS=46 and a section size of 128MB, the current loops are 512k iterations, which we barely notice on modern hardware. But, raising MAX_PHYSMEM_BITS higher (like we will see on systems that support 5-level paging) makes this 64x longer and we start to notice, especially on slower systems like simulators. A 10-second delay for 512k iterations is annoying. But, a 640- second delay is crippling. This does not help if we have extremely sparse physical address spaces, but those are quite rare. We expect that most of the "slow" systems where this matters will also be quite small and non-sparse. To fix this, we track the highest section we've ever encountered. This lets us know when we will *never* see another section_present(), and lets us break out of the loops earlier. Doing the whole for_each_present_section_nr() macro is probably overkill, but it will ensure that any future loop iterations that we grow are more likely to be correct. Kirrill said "It shaved almost 40 seconds from boot time in qemu with 5-level paging enabled for me". Link: http://lkml.kernel.org/r/20170504174434.C45A4735@viggo.jf.intel.com Signed-off-by: Dave Hansen Tested-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 4 ++++ include/linux/mmzone.h | 2 ++ mm/sparse.c | 60 ++++++++++++++++++++++++++++++++++++++------------ 3 files changed, 52 insertions(+), 14 deletions(-) commit 7660a6fddcbae344de8583aa4092071312f110c3 Author: Kees Cook Date: Thu Jul 6 15:36:40 2017 -0700 mm: allow slab_nomerge to be set at build time Some hardened environments want to build kernels with slab_nomerge already set (so that they do not depend on remembering to set the kernel command line option). This is desired to reduce the risk of kernel heap overflows being able to overwrite objects from merged caches and changes the requirements for cache layout control, increasing the difficulty of these attacks. By keeping caches unmerged, these kinds of exploits can usually only damage objects in the same cache (though the risk to metadata exploitation is unchanged). Link: http://lkml.kernel.org/r/20170620230911.GA25238@beast Signed-off-by: Kees Cook Cc: Daniel Micay Cc: David Windsor Cc: Eric Biggers Cc: Christoph Lameter Cc: Jonathan Corbet Cc: Daniel Micay Cc: David Windsor Cc: Eric Biggers Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Mauro Carvalho Chehab Cc: "Paul E. McKenney" Cc: Arnd Bergmann Cc: Andy Lutomirski Cc: Nicolas Pitre Cc: Tejun Heo Cc: Daniel Mack Cc: Sebastian Andrzej Siewior Cc: Sergey Senozhatsky Cc: Helge Deller Cc: Rik van Riel Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 10 ++++++++-- init/Kconfig | 14 ++++++++++++++ mm/slab_common.c | 5 ++--- 3 files changed, 24 insertions(+), 5 deletions(-) commit e07719502916a675023d9d31b9fd4370c7413b68 Author: Canjiang Lu Date: Thu Jul 6 15:36:37 2017 -0700 mm/slab.c: replace open-coded round-up code with ALIGN Link: http://lkml.kernel.org/r/20170616072918epcms5p4ff16c24ef8472b4c3b4371823cd87856@epcms5p4 Signed-off-by: Canjiang Lu Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e6d0e1dcf5f07fb04704b87ffab749589d29cb02 Author: Wei Yang Date: Thu Jul 6 15:36:34 2017 -0700 mm/slub.c: wrap kmem_cache->cpu_partial in config CONFIG_SLUB_CPU_PARTIAL kmem_cache->cpu_partial is just used when CONFIG_SLUB_CPU_PARTIAL is set, so wrap it with config CONFIG_SLUB_CPU_PARTIAL will save some space on 32bit arch. This patch wraps kmem_cache->cpu_partial in config CONFIG_SLUB_CPU_PARTIAL and wraps its sysfs too. Link: http://lkml.kernel.org/r/20170502144533.10729-4-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 13 +++++++++ mm/slub.c | 69 ++++++++++++++++++++++++++---------------------- 2 files changed, 51 insertions(+), 31 deletions(-) commit a93cf07bc3fb4e7bc924d33c387dabc85086ea38 Author: Wei Yang Date: Thu Jul 6 15:36:31 2017 -0700 mm/slub.c: wrap cpu_slab->partial in CONFIG_SLUB_CPU_PARTIAL cpu_slab's field partial is used when CONFIG_SLUB_CPU_PARTIAL is set, which means we can save a pointer's space on each cpu for every slub item. This patch wraps cpu_slab->partial in CONFIG_SLUB_CPU_PARTIAL and wraps its sysfs use too. [akpm@linux-foundation.org: avoid strange 80-col tricks] Link: http://lkml.kernel.org/r/20170502144533.10729-3-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 19 +++++++++++++++++++ mm/slub.c | 18 +++++++++++------- 2 files changed, 30 insertions(+), 7 deletions(-) commit d3111e6cce6001e71ddc4737d0d412c2300043a2 Author: Wei Yang Date: Thu Jul 6 15:36:28 2017 -0700 mm/slub.c: pack red_left_pad with another int to save a word Patch series "try to save some memory for kmem_cache in some cases", v2. kmem_cache is a frequently used data in kernel. During the code reading, I found maybe we could save some space in some cases. 1. On 64bit arch, type int will occupy a word if it doesn't sit well. 2. cpu_slab->partial is just used when CONFIG_SLUB_CPU_PARTIAL is set 3. cpu_partial is just used when CONFIG_SLUB_CPU_PARTIAL is set, while just save some space on 32bit arch. This patch (of 3): On 64bit arch, struct is 8-bytes aligned, so int will occupy a word if it doesn't sit well. This patch pack red_left_pad with reserved to save 8 bytes for struct kmem_cache on a 64bit arch. Link: http://lkml.kernel.org/r/20170502144533.10729-2-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4ff6d35f618023f7b2edc5ce1a2f84362f1e7fe Author: Wei Yang Date: Thu Jul 6 15:36:25 2017 -0700 mm/slub: reset cpu_slab's pointer in deactivate_slab() Each time a slab is deactivated, the page and freelist pointer should be reset. This patch just merges these two options into deactivate_slab(). Link: http://lkml.kernel.org/r/20170507031215.3130-2-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 66fdbe520315ee2ec0dbc8da5af4003d3911c534 Author: Wei Yang Date: Thu Jul 6 15:36:22 2017 -0700 mm/slub.c: remove a redundant assignment in ___slab_alloc() When the code comes to this point, there are two cases: 1. cpu_slab is deactivated 2. cpu_slab is empty In both cased, cpu_slab->freelist is NULL at this moment. This patch removes the redundant assignment of cpu_slab->freelist. Link: http://lkml.kernel.org/r/20170507031215.3130-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 1 - 1 file changed, 1 deletion(-) commit c823bd9244337aef3699c546eb521c71fd60012e Author: Michal Hocko Date: Thu Jul 6 15:36:19 2017 -0700 fs/file.c: replace alloc_fdmem() with kvmalloc() alternative There is no real reason to duplicate kvmalloc* helpers so drop alloc_fdmem and replace it with the appropriate library function. Link: http://lkml.kernel.org/r/20170531155145.17111-2-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/file.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit b74271e40e5de75c4316a68ebbb43150b509e708 Author: Arvind Yadav Date: Thu Jul 6 15:36:16 2017 -0700 ocfs2: constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 4402 1088 38 5528 1598 fs/ocfs2/stackglue.o File size After adding 'const': text data bss dec hex filename 4442 1024 38 5504 1580 fs/ocfs2/stackglue.o Link: http://lkml.kernel.org/r/cab4e59b4918db3ed2ec77073a4cb310c4429ef5.1498808026.git.arvind.yadav.cs@gmail.com Signed-off-by: Arvind Yadav Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/stackglue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25b1c72e15b89bfcdcce11c5f61d729d87afe8c5 Author: piaojun Date: Thu Jul 6 15:36:13 2017 -0700 ocfs2: free 'dummy_sc' in sc_fop_release() to prevent memory leak 'sd->dbg_sock' is malloced in sc_common_open(), but not freed at the end of sc_fop_release(). Link: http://lkml.kernel.org/r/594FB0A4.2050105@huawei.com Signed-off-by: Jun Piao Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/netdebug.c | 1 + 1 file changed, 1 insertion(+) commit 62aa81d7c4c24b90fdb61da70ac0dbbc414f9939 Author: Fabian Frederick Date: Thu Jul 6 15:36:10 2017 -0700 ocfs2: use magic.h Filesystems generally use SUPER_MAGIC values from magic.h instead of a local definition. Link: http://lkml.kernel.org/r/20170521154217.27917-1-fabf@skynet.be Signed-off-by: Fabian Frederick Reviewed-by: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/ocfs2_fs.h | 5 ++--- include/uapi/linux/magic.h | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) commit 8c4d5a4387161c58a0f3d4c6c849b59bbb6c098a Author: Gang He Date: Thu Jul 6 15:36:07 2017 -0700 ocfs2: fix a static checker warning Fix a static code checker warning: fs/ocfs2/inode.c:179 ocfs2_iget() warn: passing zero to 'ERR_PTR' Fixes: d56a8f32e4c6 ("ocfs2: check/fix inode block for online file check") Link: http://lkml.kernel.org/r/1495516634-1952-1-git-send-email-ghe@suse.com Signed-off-by: Gang He Reviewed-by: Joseph Qi Reviewed-by: Eric Ren Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c509e05fc175a1ebafd7e1ee445dbe32c403a9ba Author: SF Markus Elfring Date: Thu Jul 6 15:36:04 2017 -0700 drivers/sh/intc/virq.c: delete an error message for a failed memory allocation in add_virq_to_pirq() This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Link: http://lkml.kernel.org/r/54e30d61-5183-9911-cf35-1410fb78da5a@users.sourceforge.net Signed-off-by: Markus Elfring Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/sh/intc/virq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 820a0b24b261c650cb07ea0f60aea9191f658f25 Author: Michael Ellerman Date: Thu Jul 6 15:36:01 2017 -0700 include/linux/filter.h: use linux/set_memory.h This header always exists, so doesn't require an ifdef around its inclusion. When CONFIG_ARCH_HAS_SET_MEMORY=y it includes the asm header, otherwise it provides empty versions of the set_memory_xx() routines. Link: http://lkml.kernel.org/r/1498717781-29151-4-git-send-email-mpe@ellerman.id.au Signed-off-by: Michael Ellerman Acked-by: Daniel Borkmann Acked-by: Kees Cook Acked-by: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/filter.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 563ec5cbc615698239c3a63511b939a7a7e38870 Author: Michael Ellerman Date: Thu Jul 6 15:35:58 2017 -0700 kernel/module.c: use linux/set_memory.h This header always exists, so doesn't require an ifdef around its inclusion. When CONFIG_ARCH_HAS_SET_MEMORY=y it includes the asm header, otherwise it provides empty versions of the set_memory_xx() routines. The usages of set_memory_xx() are still guarded by CONFIG_STRICT_MODULE_RWX. Link: http://lkml.kernel.org/r/1498717781-29151-3-git-send-email-mpe@ellerman.id.au Signed-off-by: Michael Ellerman Acked-by: Kees Cook Acked-by: Laura Abbott Cc: Daniel Borkmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/module.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 61f6d09a931c3ab216f43e00505073088d387d05 Author: Michael Ellerman Date: Thu Jul 6 15:35:55 2017 -0700 kernel/power/snapshot.c: use linux/set_memory.h This header always exists, so doesn't require an ifdef around its inclusion. When CONFIG_ARCH_HAS_SET_MEMORY=y it includes the asm header, otherwise it provides empty versions of the set_memory_xx() routines. Link: http://lkml.kernel.org/r/1498717781-29151-2-git-send-email-mpe@ellerman.id.au Signed-off-by: Michael Ellerman Acked-by: Kees Cook Acked-by: Laura Abbott Cc: Daniel Borkmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/power/snapshot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 938f846492d6682584cbe4f3f19c4ebffec46311 Author: Michael Ellerman Date: Thu Jul 6 15:35:52 2017 -0700 provide linux/set_memory.h Currently code that wants to use set_memory_ro() etc, needs to include asm/set_memory.h, which doesn't exist on all arches. Some code knows it only builds on arches which have the header, other code guards the inclusion with an #ifdef, neither is ideal. So create linux/set_memory.h. This always exists, so users don't need an #ifdef just to include the header. When CONFIG_ARCH_HAS_SET_MEMORY=y it includes asm/set_memory.h, otherwise it provides empty non-failing implementations. Link: http://lkml.kernel.org/r/1498717781-29151-1-git-send-email-mpe@ellerman.id.au Signed-off-by: Michael Ellerman Acked-by: Daniel Borkmann Acked-by: Kees Cook Acked-by: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/set_memory.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d9f91f844c42e07bbde1c348a8c96a040fc3dddb Author: Colin Ian King Date: Thu Jul 6 15:35:49 2017 -0700 scripts/spelling.txt: add a bunch more spelling mistakes Here are some of the more spelling mistakes and typos that I've found while fixing up spelling mistakes in kernel error message text over the past several weeks. Link: http://lkml.kernel.org/r/20170621142614.12529-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Kees Cook Cc: Joe Perches Cc: Stephen Boyd Cc: Ross Zwisler Cc: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/spelling.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit f2e8954b0d72f6abdef5c9535ffb744965093f14 Author: Rob Landley Date: Thu Jul 6 15:35:46 2017 -0700 ramfs: clarify help text that compression applies to ramfs as well as legacy ramdisk. Clarify help text that compression applies to ramfs as well as legacy ramdisk. Link: http://lkml.kernel.org/r/f206a960-5a61-cf59-f27c-e9f34872063c@landley.net Signed-off-by: Rob Landley Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds usr/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 595a22acee264b5b710897993f3736f57d89bc41 Author: Rob Landley Date: Thu Jul 6 15:35:43 2017 -0700 scripts/gen_initramfs_list.sh: teach INITRAMFS_ROOT_UID and INITRAMFS_ROOT_GID that -1 means "current user". Teach INITRAMFS_ROOT_UID and INITRAMFS_ROOT_GID that -1 means "current user". Link: http://lkml.kernel.org/r/2df3a9fb-4378-fa16-679d-99e788926c05@landley.net Signed-off-by: Rob Landley Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gen_initramfs_list.sh | 2 ++ usr/Kconfig | 12 ++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) commit 3922920026c0242d752e62a3c88b758715c5c42f Author: Logan Gunthorpe Date: Thu Jul 6 15:35:40 2017 -0700 tile: provide default ioremap declaration Add a default ioremap function which was not provided in all circumstances. (Only when CONFIG_PCI and CONFIG_TILEGX was set). I have designs to use them in scatterlist.c where they'd likely never be called with this architecture, but it is needed to compile. Thus, if the function is ever hit it returns NULL. Link: http://lkml.kernel.org/r/1495726904-27380-1-git-send-email-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Cc: Chris Metcalf Cc: Mel Gorman Cc: Michal Hocko Cc: Johannes Weiner Cc: Vlastimil Babka Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/tile/mm/pgtable.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9cfc5e0454701cd3be65fe94fbf18eee41378782 Author: Tobias Klauser Date: Thu Jul 6 15:35:37 2017 -0700 mn10300: use generic fb.h The mn10300 arch uses a verbatim copy of the asm-generic version and does not add any own implementations to the header, so use asm-generic/fb.h instead of duplicating code. Link: http://lkml.kernel.org/r/20170517083348.1815-1-tklauser@distanz.ch Signed-off-by: Tobias Klauser Reviewed-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mn10300/include/asm/Kbuild | 1 + arch/mn10300/include/asm/fb.h | 23 ----------------------- 2 files changed, 1 insertion(+), 23 deletions(-) commit dc5131641dcbaeb79ce9f4fecb368305e010fc28 Author: Tobias Klauser Date: Thu Jul 6 15:35:34 2017 -0700 mn10300: remove wrapper header for asm/device.h mn10300's asm/device.h is merely including asm-generic/device.h. Thus, the arch specific header can be omitted and the generic header can be used directly. Link: http://lkml.kernel.org/r/20170517124857.26834-1-tklauser@distanz.ch Signed-off-by: Tobias Klauser Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mn10300/include/asm/Kbuild | 1 + arch/mn10300/include/asm/device.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit c0d80ddab89916273cb97114889d3f337bc370ae Author: Marcin Nowakowski Date: Thu Jul 6 15:35:31 2017 -0700 kernel/extable.c: mark core_kernel_text notrace core_kernel_text is used by MIPS in its function graph trace processing, so having this method traced leads to an infinite set of recursive calls such as: Call Trace: ftrace_return_to_handler+0x50/0x128 core_kernel_text+0x10/0x1b8 prepare_ftrace_return+0x6c/0x114 ftrace_graph_caller+0x20/0x44 return_to_handler+0x10/0x30 return_to_handler+0x0/0x30 return_to_handler+0x0/0x30 ftrace_ops_no_ops+0x114/0x1bc core_kernel_text+0x10/0x1b8 core_kernel_text+0x10/0x1b8 core_kernel_text+0x10/0x1b8 ftrace_ops_no_ops+0x114/0x1bc core_kernel_text+0x10/0x1b8 prepare_ftrace_return+0x6c/0x114 ftrace_graph_caller+0x20/0x44 (...) Mark the function notrace to avoid it being traced. Link: http://lkml.kernel.org/r/1498028607-6765-1-git-send-email-marcin.nowakowski@imgtec.com Signed-off-by: Marcin Nowakowski Reviewed-by: Masami Hiramatsu Cc: Peter Zijlstra Cc: Thomas Meyer Cc: Ingo Molnar Cc: Steven Rostedt Cc: Daniel Borkmann Cc: Paul Gortmaker Cc: Thomas Gleixner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/extable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbf29ffc7f963bb894f84f0580c70cfea01c3892 Author: Kirill A. Shutemov Date: Thu Jul 6 15:35:28 2017 -0700 thp, mm: fix crash due race in MADV_FREE handling Reinette reported the following crash: BUG: Bad page state in process log2exe pfn:57600 page:ffffea00015d8000 count:0 mapcount:0 mapping: (null) index:0x20200 flags: 0x4000000000040019(locked|uptodate|dirty|swapbacked) raw: 4000000000040019 0000000000000000 0000000000020200 00000000ffffffff raw: ffffea00015d8020 ffffea00015d8020 0000000000000000 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set bad because of flags: 0x1(locked) Modules linked in: rfcomm 8021q bnep intel_rapl x86_pkg_temp_thermal coretemp efivars btusb btrtl btbcm pwm_lpss_pci snd_hda_codec_hdmi btintel pwm_lpss snd_hda_codec_realtek snd_soc_skl snd_hda_codec_generic snd_soc_skl_ipc spi_pxa2xx_platform snd_soc_sst_ipc snd_soc_sst_dsp i2c_designware_platform i2c_designware_core snd_hda_ext_core snd_soc_sst_match snd_hda_intel snd_hda_codec mei_me snd_hda_core mei snd_soc_rt286 snd_soc_rl6347a snd_soc_core efivarfs CPU: 1 PID: 354 Comm: log2exe Not tainted 4.12.0-rc7-test-test #19 Hardware name: Intel corporation NUC6CAYS/NUC6CAYB, BIOS AYAPLCEL.86A.0027.2016.1108.1529 11/08/2016 Call Trace: bad_page+0x16a/0x1f0 free_pages_check_bad+0x117/0x190 free_hot_cold_page+0x7b1/0xad0 __put_page+0x70/0xa0 madvise_free_huge_pmd+0x627/0x7b0 madvise_free_pte_range+0x6f8/0x1150 __walk_page_range+0x6b5/0xe30 walk_page_range+0x13b/0x310 madvise_free_page_range.isra.16+0xad/0xd0 madvise_free_single_vma+0x2e4/0x470 SyS_madvise+0x8ce/0x1450 If somebody frees the page under us and we hold the last reference to it, put_page() would attempt to free the page before unlocking it. The fix is trivial reorder of operations. Dave said: "I came up with the exact same patch. For posterity, here's the test case, generated by syzkaller and trimmed down by Reinette: https://www.sr71.net/~dave/intel/log2.c And the config that helps detect this: https://www.sr71.net/~dave/intel/config-log2" Fixes: b8d3c4c3009d ("mm/huge_memory.c: don't split THP page when MADV_FREE syscall is called") Link: http://lkml.kernel.org/r/20170628101249.17879-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reported-by: Reinette Chatre Acked-by: Dave Hansen Acked-by: Michal Hocko Acked-by: Minchan Kim Cc: Huang Ying Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a04dbcfb33b4012d0ce8c0282f1e3ca694675b1 Author: David Rientjes Date: Thu Jul 6 15:35:24 2017 -0700 compiler, clang: always inline when CONFIG_OPTIMIZE_INLINING is disabled The motivation for commit abb2ea7dfd82 ("compiler, clang: suppress warning for unused static inline functions") was to suppress clang's warnings about unused static inline functions. For configs without CONFIG_OPTIMIZE_INLINING enabled, such as any non-x86 architecture, `inline' in the kernel implies that __attribute__((always_inline)) is used. Some code depends on that behavior, see https://lkml.org/lkml/2017/6/13/918: net/built-in.o: In function `__xchg_mb': arch/arm64/include/asm/cmpxchg.h:99: undefined reference to `__compiletime_assert_99' arch/arm64/include/asm/cmpxchg.h:99: undefined reference to `__compiletime_assert_99 The full fix would be to identify these breakages and annotate the functions with __always_inline instead of `inline'. But since we are late in the 4.12-rc cycle, simply carry forward the forced inlining behavior and work toward moving arm64, and other architectures, toward CONFIG_OPTIMIZE_INLINING behavior. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1706261552200.1075@chino.kir.corp.google.com Signed-off-by: David Rientjes Reported-by: Sodagudi Prasad Tested-by: Sodagudi Prasad Tested-by: Matthias Kaehlcke Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compiler-clang.h | 8 -------- include/linux/compiler-gcc.h | 18 +++++++++++------- 2 files changed, 11 insertions(+), 15 deletions(-) commit e0f25a3f2d052e36ff67a9b4db835c3e27e950d8 Merge: 9a6293c 93f66ed Author: Linus Torvalds Date: Thu Jul 6 15:41:33 2017 -0700 Merge tag 'hwlock-v4.13' of git://github.com/andersson/remoteproc Pull hwspinlock updates from Bjorn Andersson: "This introduces a driver for the Spreadtrum hardware spinlock device and cleans up the Kconfig file" * tag 'hwlock-v4.13' of git://github.com/andersson/remoteproc: DT: hwspinlock: Add binding documentation for Spreadtrum hwspinlock hwspinlock: sprd: Add hardware spinlock driver Make HWSPINLOCK a menuconfig to ease disabling commit 9a6293c321f6d3a6762f803bfb0a2e9275438bd1 Merge: 426b8ee b0af7b7 Author: Linus Torvalds Date: Thu Jul 6 15:40:14 2017 -0700 Merge tag 'rproc-v4.13' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This introduces the Keystone 2 DSP driver and refactors the start/stop code in recovery. The Davinci DSP driver gets a few fixes and the Kconfig gets cleaned up" * tag 'rproc-v4.13' of git://github.com/andersson/remoteproc: remoteproc/keystone: Fix circular dependencies for ARM configs remoteproc: Drop redundant REMOTEPROC dependency from driver Kconfigs remoteproc: Drop VIRTUALIZATION dependency from REMOTEPROC remoteproc/keystone: Ensure the DSPs are in reset in probe remoteproc/keystone: Add a remoteproc driver for Keystone 2 DSPs dt-bindings: remoteproc: Add Keystone DSP remoteproc binding remoteproc/davinci: fix unbalanced reset between start and stop ops remoteproc/davinci: simplify the reset function remoteproc/davinci: Update Kconfig to depend on DMA_CMA remoteproc: fix spelling mistake: "Resouce" -> "Resource" remoteproc: Modify recovery path to use rproc_{start,stop}() remoteproc: Introduce rproc_{start,stop}() functions commit 426b8eeb058a16c63759b3f48394601e1ed74e31 Merge: 0dfaeb6 f4ce852 Author: Linus Torvalds Date: Thu Jul 6 15:38:31 2017 -0700 Merge tag 'rpmsg-v4.13' of git://github.com/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "This introduces the Qualcomm GLINK protocol driver and DeviceTree-based modalias support, as well as a number of smaller fixes" * tag 'rpmsg-v4.13' of git://github.com/andersson/remoteproc: rpmsg: Make modalias work for DeviceTree based devices rpmsg: Drop VIRTUALIZATION dependency from RPMSG_VIRTIO rpmsg: Don't overwrite release op of rpdev rpmsg: virtio_rpmsg_bus: cleanup multiple assignment to ops rpmsg: virtio_rpmsg_bus: fix nameservice address rpmsg: cleanup incorrect function in dev_err message rpmsg: virtio_rpmsg_bus: fix announce for devices without endpoint rpmsg: Introduce Qualcomm RPM glink driver soc: qcom: Add device tree binding for GLINK RPM rpmsg: Release rpmsg devices in backends commit 4edfc5406ac9d3b59f770dd7436fdcfd5d593216 Author: Hans de Goede Date: Sat Jul 1 12:15:22 2017 +0200 platform/x86: silead_dmi: Add touchscreen info for I.T.Works TW891 2-in-1 Add touchscreen info for I.T.Works TW891 2-in-1. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/silead_dmi.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 0dfaeb618f6cd2010b23e8b2be3c892c35d39633 Merge: 9031114 d791db9 Author: Linus Torvalds Date: Thu Jul 6 15:33:27 2017 -0700 Merge tag 'platform-drivers-x86-v4.13-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Introduce new bus architecture for WMI and expose BMOF data through sysfs. Correct several assumptions about WMI instance number from 1 to 0. Further fujitsu-laptop cleanups, continuing to prepare for separation into two modules. Add support for several new ideapad laptops and silead-based tablets. Various minor fixes and const cleanups. Detail summary: sony-laptop: - constify attribute_group and input index array fujitsu-laptop: - rework debugging - do not evaluate ACPI _INI methods - do not update ACPI device power status - sanitize hotkey input device identification - use strcpy to set ACPI device names and classes - remove redundant safety checks - use device-specific data in remaining module code - use device-specific data in LED-related code - explicitly pass ACPI device to call_fext_func() - track the last instantiated FUJ02E3 ACPI device - allocate fujitsu_laptop in acpi_fujitsu_laptop_add() - use device-specific data in backlight code - allocate fujitsu_bl in acpi_fujitsu_bl_add() - distinguish current uses of device-specific data msi-laptop: - constify msipf*_attribute_group eeepc-laptop: - constify platform_attribute_group toshiba_haps: - constify haps_attr_group dell-wmi-led: - Adjust instance of wmi_evaluate_method calls to 0 alienware-wmi: - Adjust instance of wmi_evaluate_method calls to 0 intel_menlow: - Add const to thermal_cooling_device_ops structure acerhdf: - Add const to thermal_cooling_device_ops structure dell-laptop: - Fix bogus keyboard backlight sysfs interface acer-wmi: - Using zero as first WMI instance number - Detect RF Button capability ideapad-laptop: - Add Y720-15IKBN to no_hw_rfkill - Add Y520-15IKBN to no_hw_rfkill - constify rfkill_ops structure - Squelch ACPI event 1 - hide unused 'touchpad_store' - Switch touchpad attribute to be RO - Add sysfs interface for touchpad state silead_dmi: - Add touchscreen info for PoV mobii wintab p800w - Add touchscreen info for Pipo W2S tablet - Add touchscreen info for GP-electronic T701 dell-rbtn: - constify rfkill_ops structures - Improve explanation about DELLABC6 samsung-laptop: - constify rfkill_ops structures panasonic-laptop: - remove unused code samsung-laptop: - Initialize loca variable dell-wmi: - Convert to the WMI bus infrastructure - Add a better description for "stealth mode" - Add a comment explaining the 0xb2 magic number wmi-bmof: - New driver to expose embedded Binary WMI MOF metadata wmi*: - Fix printing info about WDG structure - Add recent copyright statements - Require query for data blocks, rename writable to setable - Add an interface for subdrivers to access sibling devices - Bind the platform device, not the ACPI node - Add a new interface to read block data - Incorporate acpi_install_notify_handler - Instantiate all devices before adding them - Probe data objects for read and write capabilities - Split devices into types and add basic sysfs attributes - Fix error handling when creating devices - Turn WMI into a bus driver - Track wmi devices per ACPI device - Clean up acpi_wmi_add - Pass the acpi_device through to parse_wdg - Drop "Mapper (un)loaded" messages intel_cht_int33fe: - Set supplied-from property on max17047 dev intel_pmc_ipc: - Mark ipc_data_readb() as __maybe_unused topstar-laptop: - Add new device id peaq-wmi: - Add new peaq-wmi driver thinkpad_acpi: - Add a comment about 0 in module_param_call() - Join string literals back toshiba_acpi: - use memdup_user_nul" * tag 'platform-drivers-x86-v4.13-1' of git://git.infradead.org/linux-platform-drivers-x86: (67 commits) platform/x86: sony-laptop: constify attribute_group and input index array platform/x86: fujitsu-laptop: rework debugging platform/x86: fujitsu-laptop: do not evaluate ACPI _INI methods platform/x86: fujitsu-laptop: do not update ACPI device power status platform/x86: fujitsu-laptop: sanitize hotkey input device identification platform/x86: fujitsu-laptop: use strcpy to set ACPI device names and classes platform/x86: fujitsu-laptop: remove redundant safety checks platform/x86: msi-laptop: constify msipf*_attribute_group platform/x86: eeepc-laptop: constify platform_attribute_group platform/x86: toshiba_haps: constify haps_attr_group platform/x86: dell-wmi-led: Adjust instance of wmi_evaluate_method calls to 0 platform/x86: alienware-wmi: Adjust instance of wmi_evaluate_method calls to 0 platform/x86: intel_menlow: Add const to thermal_cooling_device_ops structure platform/x86: acerhdf: Add const to thermal_cooling_device_ops structure platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface platform/x86: acer-wmi: Using zero as first WMI instance number platform/x86: ideapad-laptop: Add Y720-15IKBN to no_hw_rfkill platform/x86: ideapad-laptop: Add Y520-15IKBN to no_hw_rfkill platform/x86: silead_dmi: Add touchscreen info for PoV mobii wintab p800w platform/x86: silead_dmi: Add touchscreen info for Pipo W2S tablet ... commit 24e52b11e0ca788513b945a87b57cc0522a92933 Author: Filipe Manana Date: Thu Jul 6 15:31:46 2017 +0100 Btrfs: incremental send, fix invalid memory access When doing an incremental send, while processing an extent that changed between the parent and send snapshots and that extent was an inline extent in the parent snapshot, it's possible to access a memory region beyond the end of leaf if the inline extent is very small and it is the first item in a leaf. An example scenario is described below. The send snapshot has the following leaf: leaf 33865728 items 33 free space 773 generation 46 owner 5 fs uuid ab7090d8-dafd-4fb9-9246-723b6d2e2fb7 chunk uuid 2d16478c-c704-4ab9-b574-68bff2281b1f (...) item 14 key (335 EXTENT_DATA 0) itemoff 3052 itemsize 53 generation 36 type 1 (regular) extent data disk byte 12791808 nr 4096 extent data offset 0 nr 4096 ram 4096 extent compression 0 (none) item 15 key (335 EXTENT_DATA 8192) itemoff 2999 itemsize 53 generation 36 type 1 (regular) extent data disk byte 138170368 nr 225280 extent data offset 0 nr 225280 ram 225280 extent compression 0 (none) (...) And the parent snapshot has the following leaf: leaf 31272960 items 17 free space 17 generation 31 owner 5 fs uuid ab7090d8-dafd-4fb9-9246-723b6d2e2fb7 chunk uuid 2d16478c-c704-4ab9-b574-68bff2281b1f item 0 key (335 EXTENT_DATA 0) itemoff 3951 itemsize 44 generation 31 type 0 (inline) inline extent data size 23 ram_bytes 613 compression 1 (zlib) (...) When computing the send stream, it is detected that the extent of inode 335, at file offset 0, and at fs/btrfs/send.c:is_extent_unchanged() we grab the leaf from the parent snapshot and access the inline extent item. However, before jumping to the 'out' label, we access the 'offset' and 'disk_bytenr' fields of the extent item, which should not be done for inline extents since the inlined data starts at the offset of the 'disk_bytenr' field and can be very small. For example accessing the 'offset' field of the file extent item results in the following trace: [ 599.705368] general protection fault: 0000 [#1] PREEMPT SMP [ 599.706296] Modules linked in: btrfs psmouse i2c_piix4 ppdev acpi_cpufreq serio_raw parport_pc i2c_core evdev tpm_tis tpm_tis_core sg pcspkr parport tpm button su$ [ 599.709340] CPU: 7 PID: 5283 Comm: btrfs Not tainted 4.10.0-rc8-btrfs-next-46+ #1 [ 599.709340] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [ 599.709340] task: ffff88023eedd040 task.stack: ffffc90006658000 [ 599.709340] RIP: 0010:read_extent_buffer+0xdb/0xf4 [btrfs] [ 599.709340] RSP: 0018:ffffc9000665ba00 EFLAGS: 00010286 [ 599.709340] RAX: db73880000000000 RBX: 0000000000000000 RCX: 0000000000000001 [ 599.709340] RDX: ffffc9000665ba60 RSI: db73880000000000 RDI: ffffc9000665ba5f [ 599.709340] RBP: ffffc9000665ba30 R08: 0000000000000001 R09: ffff88020dc5e098 [ 599.709340] R10: 0000000000001000 R11: 0000160000000000 R12: 6db6db6db6db6db7 [ 599.709340] R13: ffff880000000000 R14: 0000000000000000 R15: ffff88020dc5e088 [ 599.709340] FS: 00007f519555a8c0(0000) GS:ffff88023f3c0000(0000) knlGS:0000000000000000 [ 599.709340] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 599.709340] CR2: 00007f1411afd000 CR3: 0000000235f8e000 CR4: 00000000000006e0 [ 599.709340] Call Trace: [ 599.709340] btrfs_get_token_64+0x93/0xce [btrfs] [ 599.709340] ? printk+0x48/0x50 [ 599.709340] btrfs_get_64+0xb/0xd [btrfs] [ 599.709340] process_extent+0x3a1/0x1106 [btrfs] [ 599.709340] ? btree_read_extent_buffer_pages+0x5/0xef [btrfs] [ 599.709340] changed_cb+0xb03/0xb3d [btrfs] [ 599.709340] ? btrfs_get_token_32+0x7a/0xcc [btrfs] [ 599.709340] btrfs_compare_trees+0x432/0x53d [btrfs] [ 599.709340] ? process_extent+0x1106/0x1106 [btrfs] [ 599.709340] btrfs_ioctl_send+0x960/0xe26 [btrfs] [ 599.709340] btrfs_ioctl+0x181b/0x1fed [btrfs] [ 599.709340] ? trace_hardirqs_on_caller+0x150/0x1ac [ 599.709340] vfs_ioctl+0x21/0x38 [ 599.709340] ? vfs_ioctl+0x21/0x38 [ 599.709340] do_vfs_ioctl+0x611/0x645 [ 599.709340] ? rcu_read_unlock+0x5b/0x5d [ 599.709340] ? __fget+0x6d/0x79 [ 599.709340] SyS_ioctl+0x57/0x7b [ 599.709340] entry_SYSCALL_64_fastpath+0x18/0xad [ 599.709340] RIP: 0033:0x7f51945eec47 [ 599.709340] RSP: 002b:00007ffc21c13e98 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 599.709340] RAX: ffffffffffffffda RBX: ffffffff81096459 RCX: 00007f51945eec47 [ 599.709340] RDX: 00007ffc21c13f20 RSI: 0000000040489426 RDI: 0000000000000004 [ 599.709340] RBP: ffffc9000665bf98 R08: 00007f519450d700 R09: 00007f519450d700 [ 599.709340] R10: 00007f519450d9d0 R11: 0000000000000202 R12: 0000000000000046 [ 599.709340] R13: ffffc9000665bf78 R14: 0000000000000000 R15: 00007f5195574040 [ 599.709340] ? trace_hardirqs_off_caller+0x43/0xb1 [ 599.709340] Code: 29 f0 49 39 d8 4c 0f 47 c3 49 03 81 58 01 00 00 44 89 c1 4c 01 c2 4c 29 c3 48 c1 f8 03 49 0f af c4 48 c1 e0 0c 4c 01 e8 48 01 c6 a4 31 f6 4$ [ 599.709340] RIP: read_extent_buffer+0xdb/0xf4 [btrfs] RSP: ffffc9000665ba00 [ 599.762057] ---[ end trace fe00d7af61b9f49e ]--- This is because the 'offset' field starts at an offset of 37 bytes (offsetof(struct btrfs_file_extent_item, offset)), has a length of 8 bytes and therefore attemping to read it causes a 1 byte access beyond the end of the leaf, as the first item's content in a leaf is located at the tail of the leaf, the item size is 44 bytes and the offset of that field plus its length (37 + 8 = 45) goes beyond the item's size by 1 byte. So fix this by accessing the 'offset' and 'disk_bytenr' fields after jumping to the 'out' label if we are processing an inline extent. We move the reading operation of the 'disk_bytenr' field too because we have the same problem as for the 'offset' field explained above when the inline data is less then 8 bytes. The access to the 'generation' field is also moved but just for the sake of grouping access to all the fields. Fixes: e1cbfd7bf6da ("Btrfs: send, fix file hole not being preserved due to inline extent") Cc: # v4.12+ Signed-off-by: Filipe Manana fs/btrfs/send.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f59627810e18d4435051d982b5d05cab18c6e653 Author: Filipe Manana Date: Thu Jun 22 20:03:51 2017 +0100 Btrfs: incremental send, fix invalid path for link commands In some scenarios an incremental send stream can contain link commands with an invalid target path. Such scenarios happen after moving some directory inode A, renaming a regular file inode B into the old name of inode A and finally creating a new hard link for inode B at directory inode A. Consider the following example scenario where this issue happens. Parent snapshot: . (ino 256) | |--- dir1/ (ino 257) | |--- dir2/ (ino 258) | |--- dir3/ (ino 259) | |--- file1 (ino 261) | |--- dir4/ (ino 262) | |--- dir5/ (ino 260) Send snapshot: . (ino 256) | |--- dir1/ (ino 257) |--- dir2/ (ino 258) | |--- dir3/ (ino 259) | |--- dir4 (ino 261) | |--- dir6/ (ino 263) |--- dir44/ (ino 262) |--- file11 (ino 261) |--- dir55/ (ino 260) When attempting to apply the corresponding incremental send stream, a link command contains an invalid target path which makes the receiver fail. The following is the verbose output of the btrfs receive command: receiving snapshot mysnap2 uuid=90076fe6-5ba6-e64a-9321-9279670ed16b (...) utimes utimes dir1 utimes dir1/dir2/dir3 utimes rename dir1/dir2/dir3/dir4 -> o262-7-0 link dir1/dir2/dir3/dir4 -> dir1/dir2/dir3/file1 link dir1/dir2/dir3/dir4/file11 -> dir1/dir2/dir3/file1 ERROR: link dir1/dir2/dir3/dir4/file11 -> dir1/dir2/dir3/file1 failed: Not a directory The following steps happen during the computation of the incremental send stream the lead to this issue: 1) When processing inode 261, we orphanize inode 262 due to a name/location collision with one of the new hard links for inode 261 (created in the second step below). 2) We create one of the 2 new hard links for inode 261, the one whose location is at "dir1/dir2/dir3/dir4". 3) We then attempt to create the other new hard link for inode 261, which has inode 262 as its parent directory. Because the path for this new hard link was computed before we started processing the new references (hard links), it reflects the old name/location of inode 262, that is, it does not account for the orphanization step that happened when we started processing the new references for inode 261, whence it is no longer valid, causing the receiver to fail. So fix this issue by recomputing the full path of new references if we ended up orphanizing other inodes which are directories. A test case for fstests follows soon. Signed-off-by: Filipe Manana fs/btrfs/send.c | 81 ++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 30 deletions(-) commit c80081b9209713e0fe86d3def395a9fc66503c58 Author: Daniel Lezcano Date: Thu Jul 6 14:29:04 2017 +0200 genirq: Allow to pass the IRQF_TIMER flag with percpu irq request The irq timings infrastructure tracks when interrupts occur in order to statistically predict te next interrupt event. There is no point to track timer interrupts and try to predict them because the next expiration time is already known. This can be avoided via the IRQF_TIMER flag which is passed by timer drivers in request_irq(). It marks the interrupt as timer based which alloes to ignore these interrupts in the timings code. Per CPU interrupts which are requested via request_percpu_+irq() have no flag argument, so marking per cpu timer interrupts is not possible and they get tracked pointlessly. Add __request_percpu_irq() as a variant of request_percpu_irq() with a flags argument and make request_percpu_irq() an inline wrapper passing flags = 0. The flag parameter is restricted to IRQF_TIMER as all other IRQF_ flags make no sense for per cpu interrupts. The next step is to convert all existing users of request_percpu_irq() and then remove the wrapper and the underscores. [ tglx: Massaged changelog ] Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: nicolas.pitre@linaro.org Cc: vincent.guittot@linaro.org Cc: rafael@kernel.org Link: http://lkml.kernel.org/r/1499344144-3964-1-git-send-email-daniel.lezcano@linaro.org include/linux/interrupt.h | 11 ++++++++++- kernel/irq/manage.c | 15 ++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) commit dd242a080d178c36442a0bb28b6acf6f126d0569 Author: Hans de Goede Date: Thu Jul 6 18:49:27 2017 +0200 ACPI / LPSS: Only call pwm_add_table() for the first PWM controller At least on the UP board SBC both PWMs are enabled leading to us trying to add the same pwm_lookup twice, which leads to the following: [ 0.902224] list_add double add: new=ffffffffb8efd400, prev=ffffffffb8efd400, next=ffffffffb8eeede0. [ 0.912466] ------------[ cut here ]------------ [ 0.917624] kernel BUG at lib/list_debug.c:31! [ 0.922588] invalid opcode: 0000 [#1] SMP ... [ 1.027450] Call Trace: [ 1.030185] pwm_add_table+0x4c/0x90 [ 1.034181] bsw_pwm_setup+0x1a/0x20 [ 1.038175] acpi_lpss_create_device+0xfe/0x420 ... This commit fixes this by only calling pwm_add_table() for the first PWM controller (which is the one used for the backlight). Link: https://bugzilla.redhat.com/show_bug.cgi?id=1458599 Fixes: bf7696a12071 (acpi: lpss: call pwm_add_table() for BSW...) Fixes: 04434ab5120a (ACPI / LPSS: Call pwm_add_table() for Bay Trail...) Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Cc: 4.11+ # 4.11+ Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpss.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9a6757eadc14f01385fd41fe3906dc22dcdb919e Author: Amelie Delaunay Date: Thu Jul 6 10:47:45 2017 +0200 rtc: stm32: add STM32H7 RTC support This patch adds support for STM32H7 RTC. On STM32H7, the RTC bus interface clock (APB clock) needs to be enabled. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stm32.c | 82 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 65 insertions(+), 17 deletions(-) commit d2be279bcd8055ddfd92cc5f5d305eb3651e059b Author: Amelie Delaunay Date: Thu Jul 6 10:47:44 2017 +0200 dt-bindings: rtc: stm32: add support for STM32H7 This patch documents support for STM32H7 Real Time Clock. It introduces a new compatible and rework clock definitions. On STM32H7 we have a 'pclk' clock for register access, in addition to the 'rtc_ck' clock. Acked-by: Rob Herring Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/st,stm32-rtc.txt | 32 ++++++++++++++++++---- 1 file changed, 27 insertions(+), 5 deletions(-) commit ede2e7cdc58e1847cc73bd26b88a634631a43112 Merge: 9768935 6593813 Author: Dmitry Torokhov Date: Thu Jul 6 13:51:43 2017 -0700 Merge branch 'next' into for-linus Prepare input updates for 4.13 merge window. commit 300a7735becf55f7fd18f8cd3dc3b945a0cab712 Author: Sean Nyekjaer Date: Thu Jun 8 12:36:54 2017 +0200 rtc: ds1307: add ds1308 variant The ds1308 variant is very similar to the already supported ds1338 variant, it have more debug registers and a square wave clock output. Signed-off-by: Sean Nyekjaer Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c35c4195f919a077ce106ec84cfcecbb0b67db30 Author: Kirill Esipov Date: Wed Jun 28 14:29:09 2017 +0300 rtc: ds3232: add temperature support DS3232/DS3234 has the temperature registers with a resolution of 0.25 degree celsius. This enables to get the value through hwmon. # cat /sys/class/hwmon/hwmon0/temp1_input 37250 Signed-off-by: Kirill Esipov Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 8 ++++ drivers/rtc/rtc-ds3232.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) commit d0a67c372df410b579197ea818596001fe20070d Author: Dan Carpenter Date: Fri Jun 23 11:29:00 2017 +0300 rtc: rtc-nuc900: fix loop timeout test We should change this post-op to a pre-op because we want the loop to exit with "timeout" set to zero. Fixes: 0a89b55364e0 ("nuc900/rtc: change the waiting for device ready implement") Signed-off-by: Dan Carpenter Signed-off-by: Alexandre Belloni drivers/rtc/rtc-nuc900.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d61d2592c1f70d74112ed1ee8f182694dc43c48 Author: Linus Walleij Date: Tue May 30 09:53:32 2017 +0200 rtc: gemini/ftrtc010: rename driver and symbols The Gemini RTC is actually a generic IP block from Faraday Technology names FTRTC010. Rename the driver file and all symbols to match this IP name. The relationship can be clearly seen in the U-Boot driver posted by Po-Yu Chuang for the Faraday A320 board: https://lists.denx.de/pipermail/u-boot/2009-September/061326.html Remove the dependency on ARCH_GEMINI but select the driver for ARCH_GEMINI so we get a smooth transition. The IP block is synthsized on different silicon and architectures. Cc: Po-Yu Chuang Acked-by: Hans Ulli Kroll Signed-off-by: Linus Walleij Signed-off-by: Alexandre Belloni MAINTAINERS | 2 +- drivers/rtc/Kconfig | 10 +-- drivers/rtc/Makefile | 2 +- drivers/rtc/rtc-ftrtc010.c | 208 +++++++++++++++++++++++++++++++++++++++++++++ drivers/rtc/rtc-gemini.c | 207 -------------------------------------------- 5 files changed, 215 insertions(+), 214 deletions(-) commit 7f1e988dffbd808ad17f22b6b88a9aa42ebe739a Author: Linus Walleij Date: Tue May 30 09:53:31 2017 +0200 rtc: gemini: Augment DT bindings for Faraday The Gemini RTC is actually a standard IP block from Faraday Technology called FTRTC010. Rename the bindings, add the generic compatible string and add definitions for the two available clocks. Cc: devicetree@vger.kernel.org Cc: Po-Yu Chuang Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/cortina,gemini.txt | 14 ----------- .../devicetree/bindings/rtc/faraday,ftrtc010.txt | 28 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 14 deletions(-) commit ac05fba39cc5a959e5d9ca24a059d884db0118a5 Author: Linus Walleij Date: Tue May 30 09:53:30 2017 +0200 rtc: gemini: Add optional clock handling This makes the Gemini optionally take two clock references to the PCLK and EXTCLK. As we are adding a clock framework to the Gemini platform we need to make sure that we get the right references. Acked-by: Hans Ulli Kroll Signed-off-by: Linus Walleij Signed-off-by: Alexandre Belloni drivers/rtc/rtc-gemini.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit e48585dec2bd0183436437995e30d20dfa92f6aa Author: Heiner Kallweit Date: Mon Jun 5 17:57:33 2017 +0200 rtc: ds1307: factor out century bit handling The driver has lots of places with chip-specific code what doesn't necessarily facilitate maintenance. Let's describe chip-specific differences in century bit handling in struct chip_desc to improve this. Signed-off-by: Heiner Kallweit Reviewed-by: Linus Walleij Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 73 ++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 46 deletions(-) commit ff95015648df445999c8483270905f7d3dec51e1 Author: Colin Ian King Date: Thu Jul 6 15:28:45 2017 -0400 ext4: fix spelling mistake: "prellocated" -> "preallocated" Trivial fix to spelling mistake in mb_debug debug message Signed-off-by: Colin Ian King Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90311148415ab23f5767fbb577a012d4405f12e5 Merge: 3a564bb c345c6c Author: Linus Torvalds Date: Thu Jul 6 12:10:33 2017 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This is mostly updates of the usual suspects: lpfc, qla2xxx, bnx2fc, qedf, hpsa, hisi_sas, smartpqi, cxlflash, aacraid, csiostor along with a host of minor and miscellaneous changes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (276 commits) qla2xxx: Fix NVMe entry_type for iocb packet on BE system scsi: qla2xxx: avoid unused-function warning scsi: snic: fix a couple of spelling mistakes/typos scsi: qla2xxx: fix a bunch of typos and spelling mistakes scsi: lpfc: don't double count abort errors scsi: lpfc: spin_lock_irq() is not nestable scsi: hisi_sas: optimise DMA slot memory scsi: ibmvfc: constify dev_pm_ops structures. scsi: ibmvscsi: constify dev_pm_ops structures. scsi: cxlflash: Update debug prints in reset handlers scsi: cxlflash: Update send_tmf() parameters scsi: cxlflash: Avoid double free of character device scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails. scsi: ufs: flush eh_work when eh_work scheduled. scsi: qla2xxx: Protect access to qpair members with qpair->qp_lock scsi: sun_esp: fix device reference leaks scsi: fnic: changing queue command to return result DID_IMM_RETRY when rport is init scsi: fnic: correct speed display and add support for 25,40 and 100G scsi: fnic: added timestamp reporting in fnic debug stats ... commit 3a564bb3a8a6950e18b1f5d209bda39fc3831074 Merge: 9871ab2 3908c98 Author: Linus Torvalds Date: Thu Jul 6 11:54:56 2017 -0700 Merge tag 'for-4.13/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Add the ability to use select or poll /dev/mapper/control to wait for events from multiple DM devices. - Convert DM's printk macros over to using pr_ macros. - Add a big-endian variant of plain64 IV to dm-crypt. - Add support for zoned (aka SMR) devices to DM core. DM kcopyd was also improved to provide a sequential write feature needed by zoned devices. - Introduce DM zoned target that provides support for host-managed zoned devices, the result dm-zoned device acts as a drive-managed interface to the underlying host-managed device. - A DM raid fix to avoid using BUG() for error handling. * tag 'for-4.13/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm zoned: fix overflow when converting zone ID to sectors dm raid: stop using BUG() in __rdev_sectors() dm zoned: drive-managed zoned block device target dm kcopyd: add sequential write feature dm linear: add support for zoned block devices dm flakey: add support for zoned block devices dm: introduce dm_remap_zone_report() dm: fix REQ_OP_ZONE_REPORT bio handling dm: fix REQ_OP_ZONE_RESET bio handling dm table: add zoned block devices validation dm: convert DM printk macros to pr_ macros dm crypt: add big-endian variant of plain64 IV dm bio prison: use rb_entry() rather than container_of() dm ioctl: report event number in DM_LIST_DEVICES dm ioctl: add a new DM_DEV_ARM_POLL ioctl dm: add basic support for using the select or poll function commit 9871ab22f2784b2823b01522772a72ee4fc9d1fa Merge: ac7b759 8e95960 Author: Linus Torvalds Date: Thu Jul 6 11:45:08 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma update from Doug Ledford: "This includes two bugs against the newly added opa vnic that were found by turning on the debug kernel options: - sleeping while holding a lock, so a one line fix where they switched it from GFP_KERNEL allocation to a GFP_ATOMIC allocation - a case where they had an isolated caller of their code that could call them in an atomic context so they had to switch their use of a mutex to a spinlock to be safe, so this was considerably more lines of diff because all uses of that lock had to be switched In addition, the bug that was discussed with you already about an out of bounds array access in ib_uverbs_modify_qp and ib_uverbs_create_ah and is only seven lines of diff. And finally, one fix to an earlier fix in the -rc cycle that broke hfi1 and qib in regards to IPoIB (this one is, unfortunately, larger than I would like for a -rc7 submission, but fixing the problem required that we not treat all devices as though they had allocated a netdev universally because it isn't true, and it took 70 lines of diff to resolve the issue, but the final patch has been vetted by Intel and Mellanox and they've both given their approval to the fix). Summary: - Two fixes for OPA found by debug kernel - Fix for user supplied input causing kernel problems - Fix for the IPoIB fixes submitted around -rc4" [ Doug sent this having not noticed the 4.12 release, so I guess I'll be getting another rdma pull request with the actuakl merge window updates and not just fixes. Oh well - it would have been nice if this small update had been the merge window one. - Linus ] * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/core, opa_vnic, hfi1, mlx5: Properly free rdma_netdev RDMA/uverbs: Check port number supplied by user verbs cmds IB/opa_vnic: Use spinlock instead of mutex for stats_lock IB/opa_vnic: Use GFP_ATOMIC while sending trap commit d466d3c1217406b14b834335b5b4b33c0d45bd09 Author: Stefan-Gabriel Mirea Date: Thu Jul 6 10:06:41 2017 +0100 iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits In order to select the alternate voltage reference pair (VALTH/VALTL), the right value for the REFSEL field in the ADCx_CFG register is "01", leading to 0x800 as register mask. See section 8.2.6.4 in the reference manual[1]. [1] http://www.nxp.com/docs/en/reference-manual/VFXXXRM.pdf Fixes: a775427632fd ("iio:adc:imx: add Freescale Vybrid vf610 adc driver") Signed-off-by: Stefan-Gabriel Mirea Signed-off-by: Jonathan Cameron drivers/iio/adc/vf610_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac7b75966c9c86426b55fe1c50ae148aa4571075 Merge: 4f5dfdd 3fa53ec Author: Linus Torvalds Date: Thu Jul 6 11:38:59 2017 -0700 Merge tag 'pinctrl-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the big bulk of pin control changes for the v4.13 series: Core: - The documentation is moved over to RST. - We now have agreed bindings for enabling input and output buffers without actually enabling input and/or output on a pin. We are chiseling out some details of pin control electronics. New drivers: - ZTE ZX - Renesas RZA1 - MIPS Ingenic JZ47xx: also switch over existing drivers in the tree to use this pin controller and consolidate earlier spread out code. - Microschip MCP23S08: this driver is migrated from the GPIO subsystem and totally rewritten to use proper pin control. All users are switched over. New subdrivers: - Renesas R8A7743 and R8A7745. - Allwinner Sunxi A83T R_PIO. - Marvell MVEBU Armada CP110 and AP806. - Intel Cannon Lake PCH. - Qualcomm IPQ8074. Notable improvements: - IRQ support on the Marvell MVEBU Armada 37xx. - Meson driver supports HDMI CEC, AO, I2S, SPDIF and PWM. - Rockchip driver now supports iomux-route switching for RK3228, RK3328 and RK3399. - Rockchip A10 and A20 are merged into a single driver. - STM32 has improved GPIO support. - Samsung Exynos drivers are split per ARMv7 and ARMv8. - Marvell MVEBU is converted to use regmap for register access. Maintenance: - Several Renesas SH-PFC refactorings and updates. - Serious code size cut for Mediatek MT7623. - Misc janitorial and MAINTAINERS fixes" * tag 'pinctrl-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (137 commits) pinctrl: samsung: Remove bogus irq_[un]mask from resource management pinctrl: rza1: make structures rza1_gpiochip_template and rza1_pinmux_ops static pinctrl: rza1: Remove unneeded wrong check for wrong variable pinctrl: qcom: Add ipq8074 pinctrl driver pinctrl: freescale: imx7d: make of_device_ids const. pinctrl: DT: extend the pinmux property to support integers array pinctrl: generic: Add output-enable property pinctrl: armada-37xx: Fix number of pin in sdio_sb pinctrl: armada-37xx: Fix uart2 group selection register mask pinctrl: bcm2835: Avoid warning from __irq_do_set_handler pinctrl: sh-pfc: r8a7795: Add PWM support MAINTAINERS: Add Qualcomm pinctrl drivers section arm: dts: dt-bindings: Add Renesas RZ/A1 pinctrl header dt-bindings: pinctrl: Add RZ/A1 bindings doc pinctrl: Renesas RZ/A1 pin and gpio controller pinctrl: sh-pfc: r8a7792: Add SCIF1 and SCIF2 pin groups pinctrl.txt: move it to the driver-api book pinctrl: ingenic: checking for NULL instead of IS_ERR() pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD20 pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD11 ... commit 4f5dfdd29065a0d1d0e61d9744e14d1d852518be Merge: 0b49ce5 4d1707c Author: Linus Torvalds Date: Thu Jul 6 11:32:40 2017 -0700 Merge tag 'leds_for_4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "This time we're removing more than adding: Removed drivers: leds-versatile: - all users of the Versatile LED driver are deleted and replaced with the very generic leds-syscon leds-sead3: - SEAD3 is using the generic leds-syscon & regmap based register-bit-led driver LED class drivers improvements: ledtrig-gpio: - use threaded IRQ, which both simplifies the code because we can drop the workqueue indirection, and it enables using the trigger for GPIOs that work with threaded IRQs themselves - refresh LED state after GPIO change since the new GPIO may have a different state than the old one leds-lp55xx: - make various arrays static const leds-pca963x: - add bindings to invert polarity" * tag 'leds_for_4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: lp55xx: make various arrays static const leds: Remove SEAD-3 driver leds: trigger: gpio: Use threaded IRQ leds: trigger: gpio: Refresh LED state after GPIO change leds: Delete obsolete Versatile driver leds: pca963x: Add bindings to invert polarity commit a7b8829d242b1a58107e9c02b09e93aec446d55c Author: Lorenzo Bianconi Date: Wed Jul 5 20:30:01 2017 +0200 iio: accel: st_accel: add SPI-3wire support Add SPI Serial Interface Mode (SIM) register information in st_sensor_settings look up table to support devices (like LSM303AGR accel sensor) that allow just SPI-3wire communication mode. SIM mode has to be configured before any other operation since it is not enabled by default and the driver is not able to read without that configuration Whilst a fairly substantial patch, the actual logic is simple and it is better to have the generic fix than a band aid. Fixes: ddc05fa28606 (iio: st-accel: add support for lsm303agr accel) Signed-off-by: Lorenzo Bianconi Cc: Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel_core.c | 32 +++++++++++++++++++++++++ drivers/iio/common/st_sensors/st_sensors_core.c | 29 ++++++++++++++++++++++ include/linux/iio/common/st_sensors.h | 7 ++++++ include/linux/platform_data/st_sensors_pdata.h | 2 ++ 4 files changed, 70 insertions(+) commit 0e2ff11311d1d4c85dd9ad9ba4347775f628e94a Author: Christoph Hellwig Date: Thu Jul 6 10:32:20 2017 -0700 cciss: initialize struct scsi_req The changes in "block: Make most scsi_req_init() calls implicit" mean that every driver that supports the generic scsi ioctls needs to call scsi_req_init on newly allocated requests, but that commit didn't add the call to the ccіss driver. Fix that to avoid crashes when udev issues SG_IO commands. Fixes: ca18d6f7 ("block: Make most scsi_req_init() calls implicit") Signed-off-by: Christoph Hellwig Reported-by: Meelis Roos Signed-off-by: Jens Axboe drivers/block/cciss.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0b49ce5a40702bf78a5f80076312b244785e9a2f Merge: 920f2ec 2a2599c Author: Linus Torvalds Date: Thu Jul 6 11:15:19 2017 -0700 Merge tag 'media/v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - addition of fwnode support at V4L2 core - addition of a few more SDR formats - new imx driver to support i.MX6 cameras - new driver for Qualcon venus codecs - new I2C sensor drivers: dw9714, max2175, ov13858, ov5640 - new CEC driver: stm32-cec - some improvements to DVB frontend documentation and a few fixups - several driver improvements and fixups * tag 'media/v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (361 commits) [media] media: entity: Catch unbalanced media_pipeline_stop calls [media] media/uapi/v4l: clarify cropcap/crop/selection behavior [media] v4l2-ioctl/exynos: fix G/S_SELECTION's type handling [media] vimc: sen: Declare vimc_sen_video_ops as static [media] vimc: sca: Add scaler [media] vimc: deb: Add debayer filter [media] vimc: Subdevices as modules [media] vimc: cap: Support several image formats [media] vimc: sen: Support several image formats [media] vimc: common: Add vimc_colorimetry_clamp [media] vimc: common: Add vimc_link_validate [media] vimc: common: Add vimc_pipeline_s_stream helper [media] vimc: common: Add vimc_ent_sd_* helper [media] vimc: Move common code from the core [media] vimc: sen: Integrate the tpg on the sensor [media] media: i2c: ov772x: Force use of SCCB protocol [media] dvb uapi docs: enums are passed by value, not reference [media] dvb: don't use 'time_t' in event ioctl [media] media: venus: enable building with COMPILE_TEST [media] af9013: refactor power control ... commit 920f2ecdf6c3b3526f60fbd38c68597953cad3ee Merge: 9ced560 fc18282 Author: Linus Torvalds Date: Thu Jul 6 10:56:51 2017 -0700 Merge tag 'sound-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This development cycle resulted in a fair amount of changes in both core and driver sides. The most significant change in ALSA core is about PCM. Also the support of of-graph card and the new DAPM widget for DSP are noteworthy changes in ASoC core. And there're lots of small changes splat over the tree, as you can see in diffstat. Below are a few highlights: ALSA core: - Removal of set_fs() hackery from PCM core stuff, and the code reorganization / optimization thereafter - Improved support of PCM ack ops, and a new ABI for improved control/status mmap handling - Lots of constifications in various codes ASoC core: - The support of of-graph card, which may work as a better generic device for a replacement of simple-card - New widget types intended mainly for use with DSPs ASoC drivers: - New drivers for Allwinner V3s SoCs - Ensonic ES8316 codec support - More Intel SKL and KBL works - More device support for Intel SST Atom (mostly for cheap tablets and 2-in-1 devices) - Support for Rockchip PDM controllers - Support for STM32 I2S and S/PDIF controllers - Support for ZTE AUD96P22 codecs HD-audio: - Support of new Realtek codecs (ALC215/ALC285/ALC289), more quirks for HP and Dell machines - A few more fixes for i915 component binding" * tag 'sound-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (418 commits) ALSA: hda - Fix unbalance of i915 module refcount ASoC: Intel: Skylake: Remove driver debugfs exit ASoC: Intel: Skylake: explicitly add the headers sst-dsp.h ALSA: hda/realtek - Remove GPIO_MASK ALSA: hda/realtek - Fix typo of pincfg for Dell quirk ALSA: pcm: add a documentation for tracepoints ALSA: atmel: ac97c: fix error return code in atmel_ac97c_probe() ALSA: x86: fix error return code in hdmi_lpe_audio_probe() ASoC: Intel: Skylake: Add support to read firmware registers ASoC: Intel: Skylake: Add sram address to sst_addr structure ASoC: Intel: Skylake: Debugfs facility to dump module config ASoC: Intel: Skylake: Add debugfs support ASoC: fix semicolon.cocci warnings ASoC: rt5645: Add quirk override by module option ASoC: rsnd: make arrays path and cmd_case static const ASoC: audio-graph-card: add widgets and routing for external amplifier support ASoC: audio-graph-card: update bindings for amplifier support ASoC: rt5665: calibration should be done before jack detection ASoC: rsnd: constify dev_pm_ops structures. ASoC: nau8825: change crosstalk-bypass property to bool type ... commit 9ced560b82606b35adb33a27012a148d418a4c1f Merge: 109a5db 5136f63 Author: Linus Torvalds Date: Thu Jul 6 09:52:09 2017 -0700 Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup changes from Tejun Heo: - Waiman made the debug controller work and a lot more useful on cgroup2 - There were a couple issues with cgroup subtree delegation. The documentation on delegating to a non-root user was missing some part and cgroup namespace support wasn't factoring in delegation at all. The documentation is updated and the now there is a mount option to make cgroup namespace fit for delegation * 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: implement "nsdelegate" mount option cgroup: restructure cgroup_procs_write_permission() cgroup: "cgroup.subtree_control" should be writeable by delegatee cgroup: fix lockdep warning in debug controller cgroup: refactor cgroup_masks_read() in the debug controller cgroup: make debug an implicit controller on cgroup2 cgroup: Make debug cgroup support v2 and thread mode cgroup: Make Kconfig prompt of debug cgroup more accurate cgroup: Move debug cgroup to its own file cgroup: Keep accurate count of tasks in each css_set commit 109a5db5042c035ded330b948a710b9a0c20934d Merge: a4c20b9 d80210f Author: Linus Torvalds Date: Thu Jul 6 09:41:58 2017 -0700 Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: - Christoph added support for TCG OPAL self encrypting disks - Minwoo added support for ATA PASS-THROUGH(32) - Linus Walleij removed spurious drvdata assignments in some drivers - Support for a few new device and other fixes * 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (33 commits) sd: add support for TCG OPAL self encrypting disks libata: fix build warning from unused goto label libata: Support for an ATA PASS-THROUGH(32) command. ahci: Add Device ID for ASMedia 1061R and 1062R sata_via: Enable optional hotplug on VT6420 ata: ahci_brcm: Avoid writing to read-only registers libata: Add the AHCI_HFLAG_NO_WRITE_TO_RO flag libata: Add the AHCI_HFLAG_YES_ALPM flag ata: ftide010: fix resource printing libata: make the function name in comment match the actual function ata: sata_rcar: make of_device_ids const. ata: pata_octeon_cf: make of_device_ids const. libata: Convert bare printks to pr_cont libahci: wrong comments in ahci_do_softreset() ata: declare ata_port_info structures as const ata: Add driver for Faraday Technology FTIDE010 ata: Add DT bindings for the Gemini SATA bridge ata: Add DT bindings for Faraday Technology FTIDE010 libata: implement SECURITY PROTOCOL IN/OUT libata: factor out a ata_identify_page_supported helper ... commit a4c20b9a574b9720acf6c647eaff5e7e1e688086 Merge: 9b51f04 e3efe3d Author: Linus Torvalds Date: Thu Jul 6 08:59:41 2017 -0700 Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu updates from Tejun Heo: "These are the percpu changes for the v4.13-rc1 merge window. There are a couple visibility related changes - tracepoints and allocator stats through debugfs, along with __ro_after_init markings and a cosmetic rename in percpu_counter. Please note that the simple O(#elements_in_the_chunk) area allocator used by percpu allocator is again showing scalability issues, primarily with bpf allocating and freeing large number of counters. Dennis is working on the replacement allocator and the percpu allocator will be seeing increased churns in the coming cycles" * 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: fix static checker warnings in pcpu_destroy_chunk percpu: fix early calls for spinlock in pcpu_stats percpu: resolve err may not be initialized in pcpu_alloc percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch percpu: add tracepoint support for percpu memory percpu: expose statistics about percpu memory via debugfs percpu: migrate percpu data structures to internal header percpu: add missing lockdep_assert_held to func pcpu_free_area mark most percpu globals as __ro_after_init commit db2d153d7a3d64618659f19e645a3351d3a732f3 Author: Max Gurtovoy Date: Thu Jul 6 18:00:07 2017 +0300 null_blk: fix error flow for shared tags during module_init In case we use shared tags feature, blk_mq_alloc_tag_set might fail during module initialization. In that case, fail the load with a suitable error code. Also move the tagset initialization process after defining the amount of submission queues. Signed-off-by: Max Gurtovoy Signed-off-by: Jens Axboe drivers/block/null_blk.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit f630c38ef0d785101363a8992bbd4f302180f86f Author: Nikolay Aleksandrov Date: Thu Jul 6 15:24:40 2017 +0300 vrf: fix bug_on triggered by rx when destroying a vrf When destroying a VRF device we cleanup the slaves in its ndo_uninit() function, but that causes packets to be switched (skb->dev == vrf being destroyed) even though we're pass the point where the VRF should be receiving any packets while it is being dismantled. This causes a BUG_ON to trigger if we have raw sockets (trace below). The reason is that the inetdev of the VRF has been destroyed but we're still sending packets up the stack with it, so let's free the slaves in the dellink callback as David Ahern suggested. Note that this fix doesn't prevent packets from going up when the VRF device is admin down. [ 35.631371] ------------[ cut here ]------------ [ 35.631603] kernel BUG at net/ipv4/fib_frontend.c:285! [ 35.631854] invalid opcode: 0000 [#1] SMP [ 35.631977] Modules linked in: [ 35.632081] CPU: 2 PID: 22 Comm: ksoftirqd/2 Not tainted 4.12.0-rc7+ #45 [ 35.632247] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 35.632477] task: ffff88005ad68000 task.stack: ffff88005ad64000 [ 35.632632] RIP: 0010:fib_compute_spec_dst+0xfc/0x1ee [ 35.632769] RSP: 0018:ffff88005ad67978 EFLAGS: 00010202 [ 35.632910] RAX: 0000000000000001 RBX: ffff880059a7f200 RCX: 0000000000000000 [ 35.633084] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffff82274af0 [ 35.633256] RBP: ffff88005ad679f8 R08: 000000000001ef70 R09: 0000000000000046 [ 35.633430] R10: ffff88005ad679f8 R11: ffff880037731cb0 R12: 0000000000000001 [ 35.633603] R13: ffff8800599e3000 R14: 0000000000000000 R15: ffff8800599cb852 [ 35.634114] FS: 0000000000000000(0000) GS:ffff88005d900000(0000) knlGS:0000000000000000 [ 35.634306] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 35.634456] CR2: 00007f3563227095 CR3: 000000000201d000 CR4: 00000000000406e0 [ 35.634632] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 35.634865] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 35.635055] Call Trace: [ 35.635271] ? __lock_acquire+0xf0d/0x1117 [ 35.635522] ipv4_pktinfo_prepare+0x82/0x151 [ 35.635831] raw_rcv_skb+0x17/0x3c [ 35.636062] raw_rcv+0xe5/0xf7 [ 35.636287] raw_local_deliver+0x169/0x1d9 [ 35.636534] ip_local_deliver_finish+0x87/0x1c4 [ 35.636820] ip_local_deliver+0x63/0x7f [ 35.637058] ip_rcv_finish+0x340/0x3a1 [ 35.637295] ip_rcv+0x314/0x34a [ 35.637525] __netif_receive_skb_core+0x49f/0x7c5 [ 35.637780] ? lock_acquire+0x13f/0x1d7 [ 35.638018] ? lock_acquire+0x15e/0x1d7 [ 35.638259] __netif_receive_skb+0x1e/0x94 [ 35.638502] ? __netif_receive_skb+0x1e/0x94 [ 35.638748] netif_receive_skb_internal+0x74/0x300 [ 35.639002] ? dev_gro_receive+0x2ed/0x411 [ 35.639246] ? lock_is_held_type+0xc4/0xd2 [ 35.639491] napi_gro_receive+0x105/0x1a0 [ 35.639736] receive_buf+0xc32/0xc74 [ 35.639965] ? detach_buf+0x67/0x153 [ 35.640201] ? virtqueue_get_buf_ctx+0x120/0x176 [ 35.640453] virtnet_poll+0x128/0x1c5 [ 35.640690] net_rx_action+0x103/0x343 [ 35.640932] __do_softirq+0x1c7/0x4b7 [ 35.641171] run_ksoftirqd+0x23/0x5c [ 35.641403] smpboot_thread_fn+0x24f/0x26d [ 35.641646] ? sort_range+0x22/0x22 [ 35.641878] kthread+0x129/0x131 [ 35.642104] ? __list_add+0x31/0x31 [ 35.642335] ? __list_add+0x31/0x31 [ 35.642568] ret_from_fork+0x2a/0x40 [ 35.642804] Code: 05 bd 87 a3 00 01 e8 1f ef 98 ff 4d 85 f6 48 c7 c7 f0 4a 27 82 41 0f 94 c4 31 c9 31 d2 41 0f b6 f4 e8 04 71 a1 ff 45 84 e4 74 02 <0f> 0b 0f b7 93 c4 00 00 00 4d 8b a5 80 05 00 00 48 03 93 d0 00 [ 35.644342] RIP: fib_compute_spec_dst+0xfc/0x1ee RSP: ffff88005ad67978 Fixes: 193125dbd8eb ("net: Introduce VRF device driver") Reported-by: Chris Cormier Signed-off-by: Nikolay Aleksandrov Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 615d22a51c04856efe62af6e1d5b450aaf5cc2c0 Author: Damien Le Moal Date: Thu Jul 6 20:21:15 2017 +0900 block: Fix __blkdev_issue_zeroout loop The BIO issuing loop in __blkdev_issue_zeroout() is allocating BIOs with a maximum number of bvec (pages) equal to min(nr_sects, (sector_t)BIO_MAX_PAGES) This works since the requested number of bvecs will always be limited to the absolute maximum number supported (BIO_MAX_PAGES), but this is ineficient as too many bvec entries may be requested due to the different units being used in the min() operation (number of sectors vs number of pages). To fix this, introduce the helper __blkdev_sectors_to_bio_pages() to correctly calculate the number of bvecs for zeroout BIOs as the issuing loop progresses. The calculation is done using consistent units and makes sure that the number of pages return is at least 1 (for cases where the number of sectors is less that the number of sectors in a page). Also remove a trailing space after the bit shift in the internal loop min() call. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-lib.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 854b1dd9c39d8c8c8647a44de47ef18506ae11f9 Author: Logan Gunthorpe Date: Mon Jun 5 14:00:51 2017 -0600 ntb_netdev: set the net_device's parent At present, ntb_netdev devices end up under /sys/devices/virtual/net completely unconnected to the ntb trees below them. This patch sets the parent of the net_device (using SET_NETDEV_DEV) to the client_dev device. This results in a better connected sysfs path for the network device: /sys/devices/pci0000:00/0000:00:03.0/0000:03:00.1/0000:03:00.1/ntb_netdev0/net/eth2 Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/net/ntb_netdev.c | 2 ++ 1 file changed, 2 insertions(+) commit 32e0f5bfa5aa2a74264160e0990df3af125ca6e2 Author: Gary R Hook Date: Mon May 15 10:33:27 2017 -0500 ntb: Add error path/handling to Debug FS entry creation If a failure occurs when creating Debug FS entries, unroll all of the work that's been done. Signed-off-by: Gary R Hook Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 8407dd6c16c0d92432323c0ce8daecd13e424703 Author: Gary R Hook Date: Tue May 9 09:33:36 2017 -0500 ntb: Add more debugfs support for ntb_perf testing options The ntb_perf tool uses module parameters to control the characteristics of its test. Enable the changing of these options through debugfs, and eliminating the need to unload and reload the module to make changes and run additional tests. Add a new module parameter that forces the DMA channel selection onto the same node as the NTB device (default: true). - seg_order: Size of the NTB memory window; power of 2. - run_order: Size of the data buffer; power of 2. - use_dma: Use DMA or memcpy? Default: 0. - on_node: Only use DMA channel(s) on the NTB node. Default: true. Signed-off-by: Gary R Hook Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 0b93a6dbec96be880a3d58a683669b4a75beee1d Author: Gary R Hook Date: Tue May 9 09:33:28 2017 -0500 ntb: Remove debug-fs variables from the context structure The Debug FS entries manage themselves; we don't need to hang onto them in the context structure. Signed-off-by: Gary R Hook Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit e9410ff810f330d41dd69aecdd46fd7d4bb9c983 Author: Gary R Hook Date: Tue May 9 09:33:17 2017 -0500 ntb: Add a module option to control affinity of DMA channels The DMA channel(s)/memory used to transfer data to an NTB device may not be required to be on the same node as the device. Add a module parameter that allows any candidate channel (aside from node assocation) and allocated memory to be used. Signed-off-by: Gary R Hook Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit bf2a952d31d2cd28bb3454f15645a76fda70addd Author: Serge Semin Date: Wed Apr 12 15:44:45 2017 +0300 NTB: Add IDT 89HPESxNTx PCIe-switches support IDT 89HPESxNTx device series is PCIe-switches, which support Non-Transparent bridging between domains connected to the device ports. Since new NTB API exposes multi-port interface and messaging API, the IDT NT-functions can be now supported in the kernel. This driver adds the following functionality: 1) Multi-port NTB API to have information of possible NT-functions activated in compliance with available device ports. 2) Memory windows of direct and look up table based address translation with all possible combinations of BARs setup. 3) Traditional doorbell NTB API. 4) One-on-one messaging NTB API. There are some IDT PCIe-switch setups, which must be done before any of the NTB peers started. It can be performed either by system BIOS via IDT SMBus-slave interface or by pre-initialized IDT PCIe-switch EEPROM: 1) NT-functions of corresponding ports must be activated using SWPARTxCTL and SWPORTxCTL registers. 2) BAR0 must be configured to expose NT-function configuration registers map. 3) The rest of the BARs must have at least one memory window configured, otherwise the driver will just return an error. Temperature sensor of IDT PCIe-switches can be also optionally activated by BIOS or EEPROM. (See IDT documentations for details of how the pre-initialization can be done) Signed-off-by: Serge Semin Acked-by: Allen Hubbe Signed-off-by: Jon Mason MAINTAINERS | 6 + drivers/ntb/hw/Kconfig | 1 + drivers/ntb/hw/Makefile | 1 + drivers/ntb/hw/idt/Kconfig | 31 + drivers/ntb/hw/idt/Makefile | 1 + drivers/ntb/hw/idt/ntb_hw_idt.c | 2712 +++++++++++++++++++++++++++++++++++++++ drivers/ntb/hw/idt/ntb_hw_idt.h | 1149 +++++++++++++++++ 7 files changed, 3901 insertions(+) commit 48ea02184a9d000f877f901951d37843b26d26ad Author: Logan Gunthorpe Date: Tue Jan 10 17:33:37 2017 -0700 ntb_hw_intel: Style fixes: open code macros that just obfuscate code As per a comments in [1] by Greg Kroah-Hartman, the ndev_* macros should be cleaned up. This makes it more clear what's actually going on when reading the code. [1] http://www.spinics.net/lists/linux-pci/msg56904.html Signed-off-by: Logan Gunthorpe Signed-off-by: Jon Mason drivers/ntb/hw/intel/ntb_hw_intel.c | 192 ++++++++++++++++++------------------ drivers/ntb/hw/intel/ntb_hw_intel.h | 3 - 2 files changed, 95 insertions(+), 100 deletions(-) commit 0f9bfb979a5fae2936afa128c04f29ab5e07a9ad Author: Logan Gunthorpe Date: Tue Jan 10 17:33:36 2017 -0700 ntb_hw_amd: Style fixes: open code macros that just obfuscate code As per a comments in [1] by Greg Kroah-Hartman, the ndev_* macros should be cleaned up. This makes it more clear what's actually going on when reading the code. [1] http://www.spinics.net/lists/linux-pci/msg56904.html Signed-off-by: Logan Gunthorpe Signed-off-by: Jon Mason drivers/ntb/hw/amd/ntb_hw_amd.c | 55 ++++++++++++++++++++++------------------- drivers/ntb/hw/amd/ntb_hw_amd.h | 3 --- 2 files changed, 29 insertions(+), 29 deletions(-) commit 3c69f5d6731c43a5b6b9e78b385948e8d76460be Author: Serge Semin Date: Tue Dec 20 12:50:09 2016 +0300 NTB: Add ntb.h comments Signed-off-by: Serge Semin Acked-by: Allen Hubbe Signed-off-by: Jon Mason include/linux/ntb.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 85dce3aaae98a8440f4a1a2404bcbab890574b46 Author: Serge Semin Date: Wed Dec 14 02:49:20 2016 +0300 NTB: Add PCIe Gen4 link speed Signed-off-by: Serge Semin Acked-by: Allen Hubbe Signed-off-by: Jon Mason include/linux/ntb.h | 2 ++ 1 file changed, 2 insertions(+) commit cdcca896aee19e338adf3000512cade4befa5c69 Author: Serge Semin Date: Wed Dec 14 02:49:19 2016 +0300 NTB: Add new Memory Windows API documentation Since the new API slightly changes the way a typical NTB client driver works, the documentation file needs to be appropriately updated. Signed-off-by: Serge Semin Acked-by: Allen Hubbe Signed-off-by: Jon Mason Documentation/ntb.txt | 99 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 91 insertions(+), 8 deletions(-) commit bc3e49adc279c5505d6df8dd8c7fca45d6d3d21a Author: Serge Semin Date: Tue Dec 20 12:48:20 2016 +0300 NTB: Add Messaging NTB API Some IDT NTB-capable PCIe-switches have message registers to communicate with peer devices. This patch adds new NTB API callback methods, which can be used to utilize these registers functionality: ntb_msg_count(); - get number of message registers ntb_msg_inbits(); - get bitfield of inbound message registers status ntb_msg_outbits(); - get bitfield of outbound message registers status ntb_msg_read_sts(); - read the inbound and outbound message registers status ntb_msg_clear_sts(); - clear status bits of message registers ntb_msg_set_mask(); - mask interrupts raised by status bits of message registers. ntb_msg_clear_mask(); - clear interrupts mask bits of message registers ntb_msg_read(midx, *pidx); - read message register with specified index, additionally getting peer port index which data received from ntb_msg_write(midx, pidx); - write data to the specified message register sending it to the passed peer device connected over a pidx port ntb_msg_event(); - notify driver context of a new message event Of course there is hardware which doesn't support Message registers, so this API is made optional. Signed-off-by: Serge Semin Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/ntb.c | 13 ++++ include/linux/ntb.h | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 218 insertions(+) commit d67288a39584daad11edee9b03d53264ba147453 Author: Serge Semin Date: Wed Jan 11 03:13:20 2017 +0300 NTB: Alter Scratchpads API to support multi-ports devices Even though there is no any real NTB hardware, which would have both more than two ports and Scratchpad registers, it is logically correct to have Scratchpad API accepting a peer port index as well. Intel/AMD drivers utilize Primary and Secondary topology to split Scratchpad between connected root devices. Since port-index API introduced, Intel/AMD NTB hardware drivers can use device port to determine which Scratchpad registers actually belong to local and peer devices. The same approach can be used if some potential hardware in future will be multi-port and have some set of Scratchpads. Here are the brief of changes in the API: ntb_spad_count() - return number of Scratchpads per each port ntb_peer_spad_addr(pidx, sidx) - address of Scratchpad register of the peer device with pidx-index ntb_peer_spad_read(pidx, sidx) - read specified Scratchpad register of the peer with pidx-index ntb_peer_spad_write(pidx, sidx) - write data to Scratchpad register of the peer with pidx-index Since there is hardware which doesn't support Scratchpad registers, the corresponding API methods are now made optional. Signed-off-by: Serge Semin Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/amd/ntb_hw_amd.c | 14 +++---- drivers/ntb/hw/intel/ntb_hw_intel.c | 14 +++---- drivers/ntb/ntb_transport.c | 15 ++++---- drivers/ntb/test/ntb_perf.c | 6 +-- drivers/ntb/test/ntb_pingpong.c | 8 +++- drivers/ntb/test/ntb_tool.c | 21 +++++++++-- include/linux/ntb.h | 73 +++++++++++++++++++++++-------------- 7 files changed, 94 insertions(+), 57 deletions(-) commit 443b9a14ecbe811071467d54d6f2f1182835cc4d Author: Serge Semin Date: Wed Jan 11 03:11:33 2017 +0300 NTB: Alter MW API to support multi-ports devices Multi-port NTB devices permit to share a memory between all accessible peers. Memory Windows API is altered to correspondingly initialize and map memory windows for such devices: ntb_mw_count(pidx); - number of inbound memory windows, which can be allocated for shared buffer with specified peer device. ntb_mw_get_align(pidx, widx); - get alignment and size restriction parameters to properly allocate inbound memory region. ntb_peer_mw_count(); - get number of outbound memory windows. ntb_peer_mw_get_addr(widx); - get mapping address of an outbound memory window If hardware supports inbound translation configured on the local ntb port: ntb_mw_set_trans(pidx, widx); - set translation address of allocated inbound memory window so a peer device could access it. ntb_mw_clear_trans(pidx, widx); - clear the translation address of an inbound memory window. If hardware supports outbound translation configured on the peer ntb port: ntb_peer_mw_set_trans(pidx, widx); - set translation address of a memory window retrieved from a peer device ntb_peer_mw_clear_trans(pidx, widx); - clear the translation address of an outbound memory window Signed-off-by: Serge Semin Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/amd/ntb_hw_amd.c | 68 +++++++++--- drivers/ntb/hw/intel/ntb_hw_intel.c | 90 ++++++++++++---- drivers/ntb/ntb.c | 2 + drivers/ntb/ntb_transport.c | 21 +++- drivers/ntb/test/ntb_perf.c | 17 ++- drivers/ntb/test/ntb_tool.c | 43 +++++--- include/linux/ntb.h | 208 ++++++++++++++++++++++++++++-------- 7 files changed, 342 insertions(+), 107 deletions(-) commit 4e8c11b7fd29f70eb7af43bae908297689f2c3da Author: Serge Semin Date: Wed Dec 14 02:49:15 2016 +0300 NTB: Alter link-state API to support multi-port devices Multi-port devices permit the NTB connections between multiple domains, so a local device can have NTB link being up with one peer and being down with another. NTB link-state API is appropriately altered to return a bitfield of the link-states between the local device and possible peers. Signed-off-by: Serge Semin Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/amd/ntb_hw_amd.c | 2 +- drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +- include/linux/ntb.h | 31 ++++++++++++++++--------------- 3 files changed, 18 insertions(+), 17 deletions(-) commit 1e5301196a88961b02fe43c73a952f78b2c84712 Author: Serge Semin Date: Wed Dec 14 02:49:14 2016 +0300 NTB: Add indexed ports NTB API There is some NTB hardware, which can combine more than just two domains over NTB. For instance, some IDT PCIe-switches can have NTB-functions activated on more than two-ports. The different domains are distinguished by ports they are connected to. So the new port-related methods are added to the NTB API: ntb_port_number() - return local port ntb_peer_port_count() - return number of peers local port can connect to ntb_peer_port_number(pdix) - return port number by it index ntb_peer_port_idx(port) - return port index by it number Current test-drivers aren't changed much. They still support two-ports devices for the time being while multi-ports hardware drivers aren't added. By default port-related API is declared for two-ports hardware. So corresponding hardware drivers won't need to implement it. Signed-off-by: Serge Semin Signed-off-by: Jon Mason drivers/ntb/ntb.c | 54 ++++++++++++++ drivers/ntb/ntb_transport.c | 6 ++ drivers/ntb/test/ntb_perf.c | 4 ++ drivers/ntb/test/ntb_pingpong.c | 6 ++ drivers/ntb/test/ntb_tool.c | 5 ++ include/linux/ntb.h | 156 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 231 insertions(+) commit 60934b200ddd62187b149a7f32cc0f160c08a7ed Author: Serge Semin Date: Wed Dec 14 02:49:13 2016 +0300 NTB: Make link-state API being declared first Since link operations are usually performed before memory window access operations, it's logically better to declare link-related API before any of MW/Doorbell/Scratchpad methods. Signed-off-by: Serge Semin Signed-off-by: Jon Mason include/linux/ntb.h | 137 ++++++++++++++++++++++++++-------------------------- 1 file changed, 69 insertions(+), 68 deletions(-) commit 7c49c9855a890ce32ea08f01366ecb221a027ad8 Author: Allen Hubbe Date: Tue Dec 27 19:12:28 2016 -0500 NTB: ntb_test: add parameter for doorbell bitmask If the test attempts to clear doorbell bits that are invalid for the hardware, then the test will fail. Provide a parameter to specify the doorbell bits to clear. Set default doorbell bits that work for XEON. Signed-off-by: Allen Hubbe Acked-by: Logan Gunthorpe Signed-off-by: Jon Mason tools/testing/selftests/ntb/ntb_test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c2d42edb528af75890cf73658e86e6dc9ac2b22b Author: Allen Hubbe Date: Tue Dec 27 19:12:27 2016 -0500 NTB: ntb_test: modprobe on remote host Signed-off-by: Allen Hubbe Acked-by: Logan Gunthorpe Signed-off-by: Jon Mason tools/testing/selftests/ntb/ntb_test.sh | 4 ++++ 1 file changed, 4 insertions(+) commit 5ec8c48a6235175f7ff59ed1acbe91d4d0398026 Merge: 72f2ebb e47866a Author: Thierry Reding Date: Thu Jul 6 17:16:47 2017 +0200 Merge branch 'for-4.13/drivers' into for-next commit 72f2ebbdf432fa617e70bc3b3219ce1166a4e09d Merge: d007a00 8517bb1 Author: Thierry Reding Date: Thu Jul 6 17:16:46 2017 +0200 Merge branch 'for-4.13/dt' into for-next commit d007a00b566b9062a2a91d5ea391bd13fb44c606 Merge: 2ea659a 93c292e Author: Thierry Reding Date: Thu Jul 6 17:16:45 2017 +0200 Merge branch 'for-4.13/core' into for-next commit e47866a177cf0baba1d714fa93cb762f25bd6cef Author: Nick Vaccaro Date: Fri Jun 23 14:52:47 2017 -0700 pwm: cros-ec: Fix transposed param settings The __cros_ec_pwm_get_duty() routine was transposing the insize and outsize fields when calling cros_ec_cmd_xfer_status(). The original code worked without error due to size of the two particular parameter blocks passed to cros_ec_cmd_xfer_status(), so this change is not fixing an actual runtime problem, just correcting the calling usage. Signed-off-by: Nick Vaccaro Reviewed-by: Brian Norris Signed-off-by: Thierry Reding drivers/pwm/pwm-cros-ec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd7b2be8cbcf6cd6d9c9e843ffff36fb91388e51 Author: Jerome Brunet Date: Thu Jun 8 14:24:16 2017 +0200 pwm: meson: Improve PWM calculation precision When using input clocks with high rates, such as clk81 (166MHz), the fin_ns = NSEC_PER_SEC / fin_freq can introduce a significant error. Ex: fin_freq = 166666667, NSEC_PER_SEC = 1000000000 fin_ns = 5,9999999 which is, of course, rounded down to 5. This introduces an error of ~20% on the period requested from the PWM. This patch uses ps instead of ns (and 64 bit integers) to perform the calculation. This should give a good enough precision. Fixes: 211ed630753d ("pwm: Add support for Meson PWM Controller") Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Thierry Reding squash! pwm: meson: Improve pwm calculation precision drivers/pwm/pwm-meson.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 99c621d704cf1c4eb74c3c42e674edf3df64f92d Author: Michael Sartain Date: Wed Jul 5 22:07:15 2017 -0600 tracing: Add saved_tgids file to show cached pid to tgid mappings Export the cached pid / tgid mappings in debugfs tracing saved_tgids file. This allows user apps to translate the pids from a trace to their respective thread group. Example saved_tgids file with pid / tgid values separated by ' ': # cat saved_tgids 1048 1048 1047 1047 7 7 1049 1047 1054 1047 1053 1047 Link: http://lkml.kernel.org/r/20170630004023.064965233@goodmis.org Link: http://lkml.kernel.org/r/20170706040713.unwkumbta5menygi@mikesart-cos Reviewed-by: Joel Fernandes Signed-off-by: Michael Sartain Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 62473a2d6f513296e896b64ccfd7ceb7b963795e Author: Al Viro Date: Thu Jul 6 09:15:47 2017 -0400 move file_{start,end}_write() out of do_iter_write() ... and do *not* grab it in vfs_write_iter(). Fixes: "fs: implement vfs_iter_read using do_iter_read" Signed-off-by: Al Viro fs/read_write.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c644bd79c0a782045f58d3dffebaf3d3154e32bf Merge: 3d05035 91af6ba7 Author: David S. Miller Date: Thu Jul 6 14:02:22 2017 +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 two Netfilter fixes for your net tree, they are: 1) Fix memleak from netns release path of conntrack protocol trackers, patch from Liping Zhang. 2) Uninitialized flags field in ebt_log, that results in unpredictable logging format in ebtables, also from Liping. ==================== Signed-off-by: David S. Miller commit d968f0f2e4404152f37ed2384b4a2269dd2dae5a Author: Huy Nguyen Date: Thu Jun 29 16:50:01 2017 -0500 net/mlx5e: Initialize CEE's getpermhwaddr address buffer to 0xff Latest change in open-lldp code uses bytes 6-11 of perm_addr buffer as the Ethernet source address for the host TLV packet. Since our driver does not fill these bytes, they stay at zero and the open-lldp code ends up sending the TLV packet with zero source address and the switch drops this packet. The fix is to initialize these bytes to 0xff. The open-lldp code considers 0xff:ff:ff:ff:ff:ff as the invalid address and falls back to use the host's mac address as the Ethernet source address. Fixes: 3a6a931dfb8e ("net/mlx5e: Support DCBX CEE API") Signed-off-by: Huy Nguyen Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 2 ++ 1 file changed, 2 insertions(+) commit fb000f781783867ab442971c63f0005c2547c72b Author: Ilan Tayari Date: Mon Jul 3 10:46:00 2017 +0300 net/mlx5: Add Makefiles for subdirectories Currently it is not possible to build just one .o file inside a subdirectory, because the subdirectories lack a Makefile. Add a Makefile to the mlx5 subdirectories. Fixes: e29341fb3a5b ("net/mlx5: FPGA, Add basic support for Innova") Signed-off-by: Ilan Tayari Reported-by: David Miller Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/accel/Makefile | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_accel/Makefile | 1 + drivers/net/ethernet/mellanox/mlx5/core/fpga/Makefile | 1 + drivers/net/ethernet/mellanox/mlx5/core/ipoib/Makefile | 1 + drivers/net/ethernet/mellanox/mlx5/core/lib/Makefile | 1 + 5 files changed, 5 insertions(+) commit 111a676367699dc8e3bc567ab17ab573ade54f0d Author: Ilan Tayari Date: Mon Jul 3 10:01:19 2017 +0300 net/mlx5: Build wq.o even if MLX5_CORE_EN is not selected Both the ethernet and FPGA portions of MLX5 now require the wq functions, and we get a link error when CONFIG_MLX5_CORE_EN is disabled: drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.o: In function `mlx5_fpga_conn_create_cq': conn.c:(.text+0x10b3): undefined reference to `mlx5_cqwq_create' conn.c:(.text+0x10c6): undefined reference to `mlx5_cqwq_get_size' conn.c:(.text+0x12bc): undefined reference to `mlx5_cqwq_destroy' Build wq.o even if MLX5_CORE_EN is not selected. Fixes: 537a50574175 ("net/mlx5: FPGA, Add high-speed connection routines") Reported-by: Arnd Bergmann Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a41d15b7906e8f749d3656e1bdc2a5ee7dd65ff Author: Ilan Tayari Date: Sun Jul 2 14:38:14 2017 +0300 net/mlx5: FPGA, Fix datatype mismatch Fix warnings when building with -Wall: drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:313:36: warning: cast to restricted __be32 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:314:37: warning: cast to restricted __be32 Fixes: bebb23e6cb02 ("net/mlx5: Accel, Add IPSec acceleration interface") Reported-by: Or Gerlitz Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c8af01692e4950504fb2e5c65ca87acbe73027cb Author: Ilan Tayari Date: Sun Jul 2 14:36:57 2017 +0300 net/mlx5: FPGA, make mlx5_fpga_device_brb static Fix warning when building with -Wall: drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c:105:5: warning: symbol 'mlx5_fpga_device_brb' was not declared. Should it be static? Fixes: c43051d72a8d ("net/mlx5: FPGA, Add SBU bypass and reset flows") Reported-by: Or Gerlitz Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5dfd87b67cd98375896890e01437edefeb45a707 Author: Ilan Tayari Date: Sun Jul 2 10:57:56 2017 +0300 net/mlx5: IPSec, Fix 64-bit division on 32-bit builds Fix warnings when building 386 kernel: >> ERROR: "__udivdi3" [drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko] undefined! Fixes: 2ac9cfe78223 ("net/mlx5e: IPSec, Add Innova IPSec offload TX data path") Reported-by: kbuild test robot Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aa07b633846db4192e6bb35675fbdaf6e78c98c7 Author: Ilan Tayari Date: Thu Jun 29 15:06:08 2017 +0300 net/mlx5: Add missing include in lib/gid.c Fix warnings when building with -Wall: drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c:38:6: warning: symbol 'mlx5_init_reserved_gids' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c:47:6: warning: symbol 'mlx5_cleanup_reserved_gids' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c:55:5: warning: symbol 'mlx5_core_reserve_gids' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c:79:6: warning: symbol 'mlx5_core_unreserve_gids' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c:92:5: warning: symbol 'mlx5_core_reserved_gid_alloc' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c:109:6: warning: symbol 'mlx5_core_reserved_gid_free' was not declared. Should it be static? Fixes: 52ec462eca9b ("net/mlx5: Add reserved-gids support") Reported-by: Or Gerlitz Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c | 1 + 1 file changed, 1 insertion(+) commit 333427a505be1e10d8da13427dc0c33ec1976b99 Author: Jeff Layton Date: Thu Jul 6 07:02:31 2017 -0400 btrfs: minimal conversion to errseq_t writeback error reporting on fsync Just check and advance the errseq_t in the file before returning, and use an errseq_t based check for writeback errors. Other internal callers of filemap_* functions are left as-is. Signed-off-by: Jeff Layton fs/btrfs/file.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 1b180274f5bfa0b8b05f7e55d9962f77f387be9c Author: Jeff Layton Date: Thu Jul 6 07:02:30 2017 -0400 xfs: minimal conversion to errseq_t writeback error reporting Just check and advance the data errseq_t in struct file before before returning from fsync on normal files. Internal filemap_* callers are left as-is. Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/xfs/xfs_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6acec592c6bc9a4c3136e46430e14767b07f9f1a Author: Jeff Layton Date: Thu Jul 6 07:02:30 2017 -0400 ext4: use errseq_t based error handling for reporting data writeback errors Add a call to filemap_report_wb_err at the end of ext4_sync_file. This will ensure that we check and advance the errseq_t in the file, which allows us to track and report errors on all open fds when they occur. Signed-off-by: Jeff Layton fs/ext4/fsync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 383aa543c2f46f245d652c0e5c77390f07ece657 Author: Jeff Layton Date: Thu Jul 6 07:02:29 2017 -0400 fs: convert __generic_file_fsync to use errseq_t based reporting Many simple, block-based filesystems use generic_file_fsync as their fsync operation. Some others (ext* and fat) also call this function to handle syncing out data. Switch this code over to use errseq_t based error reporting so that all of these filesystems get reliable error reporting via fsync, fdatasync and msync. Signed-off-by: Jeff Layton fs/libfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 372cf243ea9a36d88ff67ae44f4512f64a6bca81 Author: Jeff Layton Date: Thu Jul 6 07:02:28 2017 -0400 block: convert to errseq_t based writeback error tracking This is a very minimal conversion to errseq_t based error tracking for raw block device access. Just have it use the standard file_write_and_wait_range call. Note that there are internal callers that call sync_blockdev and the like that are not affected by this. They'll continue to use the AS_EIO/AS_ENOSPC flags for error reporting like they always have for now. Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/block_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 819ec6b91d5ba1ca313066a306461774eff6b567 Author: Jeff Layton Date: Thu Jul 6 07:02:27 2017 -0400 dax: set errors in mapping when writeback fails Jan Kara's description for this patch is much better than mine, so I'm quoting it verbatim here: DAX currently doesn't set errors in the mapping when cache flushing fails in dax_writeback_mapping_range(). Since this function can get called only from fsync(2) or sync(2), this is actually as good as it can currently get since we correctly propagate the error up from dax_writeback_mapping_range() to filemap_fdatawrite() However, in the future better writeback error handling will enable us to properly report these errors on fsync(2) even if there are multiple file descriptors open against the file or if sync(2) gets called before fsync(2). So convert DAX to using standard error reporting through the mapping. Signed-off-by: Jeff Layton Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Reviewed-and-tested-by: Ross Zwisler fs/dax.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit acbf3c3452c3729829fdb0e5a52fed3cce556eb2 Author: Jeff Layton Date: Thu Jul 6 07:02:27 2017 -0400 Documentation: flesh out the section in vfs.txt on storing and reporting writeback errors Let's try to make this extra clear for fs authors. Cc: Jan Kara Signed-off-by: Jeff Layton Documentation/filesystems/vfs.txt | 44 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) commit 8ed1e46aaf1bec6a12f4c89637f2c3ef4c70f18e Author: Jeff Layton Date: Thu Jul 6 07:02:26 2017 -0400 mm: set both AS_EIO/AS_ENOSPC and errseq_t in mapping_set_error When a writeback error occurs, we want later callers to be able to pick up that fact when they go to wait on that writeback to complete. Traditionally, we've used AS_EIO/AS_ENOSPC flags to track that, but that's problematic since only one "checker" will be informed when an error occurs. In later patches, we're going to want to convert many of these callers to check for errors since a well-defined point in time. For now, ensure that we can handle both sorts of checks by both setting errors in both places when there is a writeback failure. Signed-off-by: Jeff Layton include/linux/pagemap.h | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit 5660e13d2fd6af1903d4b0b98020af95ca2d638a Author: Jeff Layton Date: Thu Jul 6 07:02:25 2017 -0400 fs: new infrastructure for writeback error handling and reporting Most filesystems currently use mapping_set_error and filemap_check_errors for setting and reporting/clearing writeback errors at the mapping level. filemap_check_errors is indirectly called from most of the filemap_fdatawait_* functions and from filemap_write_and_wait*. These functions are called from all sorts of contexts to wait on writeback to finish -- e.g. mostly in fsync, but also in truncate calls, getattr, etc. The non-fsync callers are problematic. We should be reporting writeback errors during fsync, but many places spread over the tree clear out errors before they can be properly reported, or report errors at nonsensical times. If I get -EIO on a stat() call, there is no reason for me to assume that it is because some previous writeback failed. The fact that it also clears out the error such that a subsequent fsync returns 0 is a bug, and a nasty one since that's potentially silent data corruption. This patch adds a small bit of new infrastructure for setting and reporting errors during address_space writeback. While the above was my original impetus for adding this, I think it's also the case that current fsync semantics are just problematic for userland. Most applications that call fsync do so to ensure that the data they wrote has hit the backing store. In the case where there are multiple writers to the file at the same time, this is really hard to determine. The first one to call fsync will see any stored error, and the rest get back 0. The processes with open fds may not be associated with one another in any way. They could even be in different containers, so ensuring coordination between all fsync callers is not really an option. One way to remedy this would be to track what file descriptor was used to dirty the file, but that's rather cumbersome and would likely be slow. However, there is a simpler way to improve the semantics here without incurring too much overhead. This set adds an errseq_t to struct address_space, and a corresponding one is added to struct file. Writeback errors are recorded in the mapping's errseq_t, and the one in struct file is used as the "since" value. This changes the semantics of the Linux fsync implementation such that applications can now use it to determine whether there were any writeback errors since fsync(fd) was last called (or since the file was opened in the case of fsync having never been called). Note that those writeback errors may have occurred when writing data that was dirtied via an entirely different fd, but that's the case now with the current mapping_set_error/filemap_check_error infrastructure. This will at least prevent you from getting a false report of success. The new behavior is still consistent with the POSIX spec, and is more reliable for application developers. This patch just adds some basic infrastructure for doing this, and ensures that the f_wb_err "cursor" is properly set when a file is opened. Later patches will change the existing code to use this new infrastructure for reporting errors at fsync time. Signed-off-by: Jeff Layton Reviewed-by: Jan Kara drivers/dax/device.c | 1 + fs/block_dev.c | 1 + fs/file_table.c | 1 + fs/open.c | 3 ++ include/linux/fs.h | 60 +++++++++++++++++++++++++++++- include/trace/events/filemap.h | 57 ++++++++++++++++++++++++++++ mm/filemap.c | 84 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 206 insertions(+), 1 deletion(-) commit 84cbadadc6eafc4798513773a2c8fce37dcd2fb8 Author: Jeff Layton Date: Thu Jul 6 07:02:24 2017 -0400 lib: add errseq_t type and infrastructure for handling it An errseq_t is a way of recording errors in one place, and allowing any number of "subscribers" to tell whether an error has been set again since a previous time. It's implemented as an unsigned 32-bit value that is managed with atomic operations. The low order bits are designated to hold an error code (max size of MAX_ERRNO). The upper bits are used as a counter. The API works with consumers sampling an errseq_t value at a particular point in time. Later, that value can be used to tell whether new errors have been set since that time. Note that there is a 1 in 512k risk of collisions here if new errors are being recorded frequently, since we have so few bits to use as a counter. To mitigate this, one bit is used as a flag to tell whether the value has been sampled since a new value was recorded. That allows us to avoid bumping the counter if no one has sampled it since it was last bumped. Later patches will build on this infrastructure to change how writeback errors are tracked in the kernel. Signed-off-by: Jeff Layton Reviewed-by: NeilBrown Reviewed-by: Jan Kara MAINTAINERS | 6 ++ include/linux/errseq.h | 19 +++++ lib/Makefile | 2 +- lib/errseq.c | 208 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 234 insertions(+), 1 deletion(-) commit 5e8fcc1a0ffa0fb794b3c0efa2c3c7612a771c36 Author: Jeff Layton Date: Thu Jul 6 07:02:24 2017 -0400 mm: don't TestClearPageError in __filemap_fdatawait_range The -EIO returned here can end up overriding whatever error is marked in the address space, and be returned at fsync time, even when there is a more appropriate error stored in the mapping. Read errors are also sometimes tracked on a per-page level using PG_error. Suppose we have a read error on a page, and then that page is subsequently dirtied by overwriting the whole page. Writeback doesn't clear PG_error, so we can then end up successfully writing back that page and still return -EIO on fsync. Worse yet, PG_error is cleared during a sync() syscall, but the -EIO return from that is silently discarded. Any subsystem that is relying on PG_error to report errors during fsync can easily lose writeback errors due to this. All you need is a stray sync() call to wait for writeback to complete and you've lost the error. Since the handling of the PG_error flag is somewhat inconsistent across subsystems, let's just rely on marking the address space when there are writeback errors. Change the TestClearPageError call to ClearPageError, and make __filemap_fdatawait_range a void return function. Signed-off-by: Jeff Layton mm/filemap.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit cbeaf9510a8631e9bb0077a95fd8b0db0b3be200 Author: Jeff Layton Date: Thu Jul 6 07:02:23 2017 -0400 mm: clear AS_EIO/AS_ENOSPC when writeback initiation fails filemap_write_and_wait{_range} will return an error if writeback initiation fails, but won't clear errors in the address_space. This is particularly problematic on DAX, as filemap_fdatawrite* is effectively synchronous there. Ensure that we clear the AS_EIO/AS_ENOSPC flags when filemap_fdatawrite* returns an error. Signed-off-by: Jeff Layton mm/filemap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 76341cabbdad65c10a4162e9dfa82a6342afc02f Author: Jeff Layton Date: Thu Jul 6 07:02:22 2017 -0400 jbd2: don't clear and reset errors after waiting on writeback Resetting this flag is almost certainly racy, and will be problematic with some coming changes. Make filemap_fdatawait_keep_errors return int, but not clear the flag(s). Have jbd2 call it instead of filemap_fdatawait and don't attempt to re-set the error flag if it fails. Reviewed-by: Jan Kara Reviewed-by: Carlos Maiolino Signed-off-by: Jeff Layton fs/jbd2/commit.c | 16 ++++------------ include/linux/fs.h | 2 +- mm/filemap.c | 16 ++++++++++++++-- 3 files changed, 19 insertions(+), 15 deletions(-) commit 87354e5de04fe727227ff619af164202adcfa4d4 Author: Jeff Layton Date: Thu Jul 6 07:02:21 2017 -0400 buffer: set errors in mapping at the time that the error occurs I noticed on xfs that I could still sometimes get back an error on fsync on a fd that was opened after the error condition had been cleared. The problem is that the buffer code sets the write_io_error flag and then later checks that flag to set the error in the mapping. That flag perisists for quite a while however. If the file is later opened with O_TRUNC, the buffers will then be invalidated and the mapping's error set such that a subsequent fsync will return error. I think this is incorrect, as there was no writeback between the open and fsync. Add a new mark_buffer_write_io_error operation that sets the flag and the error in the mapping at the same time. Replace all calls to set_buffer_write_io_error with mark_buffer_write_io_error, and remove the places that check this flag in order to set the error in the mapping. This sets the error in the mapping earlier, at the time that it's first detected. Signed-off-by: Jeff Layton Reviewed-by: Jan Kara Reviewed-by: Carlos Maiolino fs/buffer.c | 20 +++++++++++++------- fs/gfs2/lops.c | 2 +- include/linux/buffer_head.h | 1 + 3 files changed, 15 insertions(+), 8 deletions(-) commit dac257f7419c732be3e491bbbb568a82df60208a Author: Jeff Layton Date: Thu Jul 6 07:02:21 2017 -0400 fs: check for writeback errors after syncing out buffers in generic_file_fsync ext2 currently does a test+clear of the AS_EIO flag, which is is problematic for some coming changes. What we really need to do instead is call filemap_check_errors in __generic_file_fsync after syncing out the buffers. That will be sufficient for this case, and help other callers detect these errors properly as well. With that, we don't need to twiddle it in ext2. Suggested-by: Jan Kara Signed-off-by: Jeff Layton Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Matthew Wilcox fs/ext2/file.c | 5 +---- fs/libfs.c | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) commit d945b59db8449ab8323995391c6a63525b3666f6 Author: Jeff Layton Date: Thu Jul 6 07:02:20 2017 -0400 buffer: use mapping_set_error instead of setting the flag Signed-off-by: Jeff Layton Reviewed-by: Jan Kara Reviewed-by: Matthew Wilcox Reviewed-by: Christoph Hellwig fs/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af21bfaf70a1358f306588232f741b292d9be5a7 Author: Jeff Layton Date: Thu Jul 6 07:02:19 2017 -0400 mm: fix mapping_set_error call in me_pagecache_dirty The error code should be negative. Since this ends up in the default case anyway, this is harmless, but it's less confusing to negate it. Also, later patches will require a negative error code here. Link: http://lkml.kernel.org/r/20170525103355.6760-1-jlayton@redhat.com Signed-off-by: Jeff Layton Reviewed-by: Ross Zwisler Reviewed-by: Jan Kara Reviewed-by: Matthew Wilcox Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d05035efaac1e9a4583b62cd70ecb8541399c0f Author: Geert Uytterhoeven Date: Thu Jul 6 10:34:54 2017 +0200 ptp: dte: Use LL suffix for 64-bit constants With gcc 4.1.2: drivers/ptp/ptp_dte.c: In function ‘dte_write_nco_delta’: drivers/ptp/ptp_dte.c:105: warning: integer constant is too large for ‘long’ type drivers/ptp/ptp_dte.c:112: warning: integer constant is too large for ‘long’ type drivers/ptp/ptp_dte.c:114: warning: integer constant is too large for ‘long’ type Add the missing "LL" suffix to fix this. Fixes: 8a56aa107f1e8123 ("ptp: Add a ptp clock driver for Broadcom DTE") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/ptp/ptp_dte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25e7f2de96588890536c4032b703e4568495b212 Author: Zheng Li Date: Thu Jul 6 15:00:09 2017 +0800 sctp: set the value of flowi6_oif to sk_bound_dev_if to make sctp_v6_get_dst to find the correct route entry. if there are several same route entries with different outgoing net device, application's socket specifies the oif through setsockopt with SO_BINDTODEVICE, sctpv6 should choose the route entry whose outgoing net device is the oif which was specified by socket, set the value of flowi6_oif to sk->sk_bound_dev_if to make sctp_v6_get_dst to find the correct route entry. Signed-off-by: Zheng Li Signed-off-by: David S. Miller net/sctp/ipv6.c | 2 ++ 1 file changed, 2 insertions(+) commit 5a3b886c3cc5de1b9ec618bf27e1b31c6624f3ca Author: Matthias Rosenfelder Date: Thu Jul 6 00:56:36 2017 -0400 TLS: Fix length check in do_tls_getsockopt_tx() copy_to_user() copies the struct the pointer is pointing to, but the length check compares against sizeof(pointer) and not sizeof(struct). On 32-bit the size is probably the same, so it might have worked accidentally. Signed-off-by: Matthias Rosenfelder Signed-off-by: David S. Miller net/tls/tls_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8f37d57dff20a455abb36942e326073dd47738d Author: Wu Fengguang Date: Thu Jul 6 07:58:53 2017 +0800 tcp: md5: tcp_md5_do_lookup_exact() can be static Fixes: 6797318e623d ("tcp: md5: add an address prefix for key lookup") Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f06b7549b79e29a672336d4e134524373fb7a232 Author: David Ahern Date: Wed Jul 5 14:41:46 2017 -0600 net: ipv6: Compare lwstate in detecting duplicate nexthops Lennert reported a failure to add different mpls encaps in a multipath route: $ ip -6 route add 1234::/16 \ nexthop encap mpls 10 via fe80::1 dev ens3 \ nexthop encap mpls 20 via fe80::1 dev ens3 RTNETLINK answers: File exists The problem is that the duplicate nexthop detection does not compare lwtunnel configuration. Add it. Fixes: 19e42e451506 ("ipv6: support for fib route lwtunnel encap attributes") Signed-off-by: David Ahern Reported-by: João Taveira Araújo Reported-by: Lennert Buytenhek Acked-by: Roopa Prabhu Tested-by: Lennert Buytenhek Signed-off-by: David S. Miller include/net/ip6_route.h | 8 ++++++++ net/ipv6/ip6_fib.c | 5 +---- net/ipv6/route.c | 8 +------- 3 files changed, 10 insertions(+), 11 deletions(-) commit 05a6b4cae8c0cc1680c9dd33a97a49a13c0f01bc Author: Derek Chickles Date: Wed Jul 5 11:59:27 2017 -0700 liquidio: fix bug in soft reset failure detection The code that detects a failed soft reset of Octeon is comparing the wrong value against the reset value of the Octeon SLI_SCRATCH_1 register, resulting in an inability to detect a soft reset failure. Fix it by using the correct value in the comparison, which is any non-zero value. Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters") Fixes: c0eab5b3580a ("liquidio: CN23XX firmware download") Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Raghu Vatsavayi Signed-off-by: Felix Manlunas Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 2 +- drivers/net/ethernet/cavium/liquidio/cn66xx_device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8517bb1f19679bf2bf6c29a98b7a4f3a78629554 Author: Jerome Brunet Date: Thu Jun 8 14:24:14 2017 +0200 dt-bindings: pwm: meson: Add compatible for gxbb ao PWMs Add compatible string to properly handle the PWMs found in the AO domain of the gxbb (and gxl) family. Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-meson.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9cd4f1a4e7a858849e889a081a99adff83e08e4c Author: Thomas Gleixner Date: Tue Jul 4 22:20:23 2017 +0200 smp/hotplug: Move unparking of percpu threads to the control CPU Vikram reported the following backtrace: BUG: scheduling while atomic: swapper/7/0/0x00000002 CPU: 7 PID: 0 Comm: swapper/7 Not tainted 4.9.32-perf+ #680 schedule schedule_hrtimeout_range_clock schedule_hrtimeout wait_task_inactive __kthread_bind_mask __kthread_bind __kthread_unpark kthread_unpark cpuhp_online_idle cpu_startup_entry secondary_start_kernel He analyzed correctly that a parked cpu hotplug thread of an offlined CPU was still on the runqueue when the CPU came back online and tried to unpark it. This causes the thread which invoked kthread_unpark() to call wait_task_inactive() and subsequently schedule() with preemption disabled. His proposed workaround was to "make sure" that a parked thread has scheduled out when the CPU goes offline, so the situation cannot happen. But that's still wrong because the root cause is not the fact that the percpu thread is still on the runqueue and neither that preemption is disabled, which could be simply solved by enabling preemption before calling kthread_unpark(). The real issue is that the calling thread is the idle task of the upcoming CPU, which is not supposed to call anything which might sleep. The moron, who wrote that code, missed completely that kthread_unpark() might end up in schedule(). The solution is simpler than expected. The thread which controls the hotplug operation is waiting for the CPU to call complete() on the hotplug state completion. So the idle task of the upcoming CPU can set its state to CPUHP_AP_ONLINE_IDLE and invoke complete(). This in turn wakes the control task on a different CPU, which then can safely do the unpark and kick the now unparked hotplug thread of the upcoming CPU to complete the bringup to the final target state. Control CPU AP bringup_cpu(); __cpu_up() ------------> bringup_ap(); bringup_wait_for_ap() wait_for_completion(); cpuhp_online_idle(); <------------ complete(); unpark(AP->stopper); unpark(AP->hotplugthread); while(1) do_idle(); kick(AP->hotplugthread); wait_for_completion(); hotplug_thread() run_online_callbacks(); complete(); Fixes: 8df3e07e7f21 ("cpu/hotplug: Let upcoming cpu bring itself fully up") Reported-by: Vikram Mulukutla Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra Cc: Sebastian Sewior Cc: Rusty Russell Cc: Tejun Heo Cc: Andrew Morton Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1707042218020.2131@nanos Signed-off-by: Thomas Gleixner kernel/cpu.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 056d6ff470a8e782648fd020940c04d0d4a0d761 Author: Wolfram Sang Date: Mon May 22 00:09:53 2017 +0200 video: adp8870: move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Acked-by: Daniel Thompson Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Lee Jones arch/blackfin/mach-bf537/boards/stamp.c | 2 +- drivers/video/backlight/adp8870_bl.c | 2 +- include/linux/i2c/adp8870.h | 153 -------------------------------- include/linux/platform_data/adp8870.h | 153 ++++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+), 155 deletions(-) commit 8476d6cde2cd11a2cb87bd7392fc318eec25c8a0 Author: Wolfram Sang Date: Mon May 22 00:09:52 2017 +0200 backlight: adp8860: Move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Acked-by: Daniel Thompson Acked-by: Michael Hennerich Signed-off-by: Lee Jones arch/blackfin/mach-bf537/boards/stamp.c | 2 +- drivers/video/backlight/adp8860_bl.c | 2 +- include/linux/i2c/adp8860.h | 154 -------------------------------- include/linux/platform_data/adp8860.h | 154 ++++++++++++++++++++++++++++++++ 4 files changed, 156 insertions(+), 156 deletions(-) commit 4cc7c1864bbd4cf80f6bdc8ba3217de5aa5f4688 Author: David Howells Date: Wed Jul 5 16:24:49 2017 +0100 bpf: Implement show_options Implement the show_options superblock op for bpf as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells cc: Alexei Starovoitov cc: Daniel Borkmann cc: netdev@vger.kernel.org Signed-off-by: Al Viro kernel/bpf/inode.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 604ecf4288933dec3c235ed1ee575a154670c882 Author: David Howells Date: Wed Jul 5 16:24:42 2017 +0100 ramfs: Implement show_options Implement the show_options superblock op for ramfs as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells Signed-off-by: Al Viro fs/ramfs/inode.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit 349d743895e2371bda9a02a5b465b50cc24d2825 Author: David Howells Date: Wed Jul 5 16:24:34 2017 +0100 pstore: Implement show_options Implement the show_options superblock op for pstore as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells cc: Kees Cook cc: Anton Vorontsov cc: Colin Cross cc: Tony Luck Signed-off-by: Al Viro fs/pstore/inode.c | 14 +++++++++++--- fs/pstore/internal.h | 3 +++ fs/pstore/platform.c | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) commit d86efb0df98afe0acdda7ed94963684c3fa7cccd Author: David Howells Date: Wed Jul 5 16:24:27 2017 +0100 omfs: Implement show_options Implement the show_options superblock op for omfs as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Note that the uid and gid should possibly be displayed relative to the viewer's user namespace. Signed-off-by: David Howells cc: Bob Copeland cc: linux-karma-devel@lists.sourceforge.net Signed-off-by: Al Viro fs/omfs/inode.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) commit 4a25220d4e43bb2461823dbc7eb1502a34087958 Author: David Howells Date: Wed Jul 5 16:24:18 2017 +0100 hugetlbfs: Implement show_options Implement the show_options superblock op for hugetlbfs as part of a bid to get rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Note that the uid and gid should possibly be displayed relative to the viewer's user namespace. Signed-off-by: David Howells cc: Nadia Yvette Chambers Signed-off-by: Al Viro fs/hugetlbfs/inode.c | 70 +++++++++++++++++++++++++++++++++++++++---------- include/linux/hugetlb.h | 3 +++ 2 files changed, 59 insertions(+), 14 deletions(-) commit c3d98ea08291ca26144780f601e1fd39e4f20f7e Author: David Howells Date: Wed Jul 5 16:24:09 2017 +0100 VFS: Don't use save/replace_mount_options if not using generic_show_options btrfs, debugfs, reiserfs and tracefs call save_mount_options() and reiserfs calls replace_mount_options(), but they then implement their own ->show_options() methods and don't touch s_options, rendering the saved options unnecessary. I'm trying to eliminate s_options to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Remove the calls to save/replace_mount_options() call in these cases. Signed-off-by: David Howells cc: Chris Mason cc: Greg Kroah-Hartman cc: Steven Rostedt cc: linux-btrfs@vger.kernel.org cc: reiserfs-devel@vger.kernel.org Signed-off-by: Al Viro fs/btrfs/super.c | 1 - fs/debugfs/inode.c | 2 -- fs/reiserfs/super.c | 4 ---- fs/tracefs/inode.c | 2 -- 4 files changed, 9 deletions(-) commit 1e3496000c11ec1ec56cf664b6a01d66de423507 Author: Keerthy Date: Tue Jun 13 10:28:40 2017 +0530 mfd: Add LP87565 PMIC support The LP87565 chip is a power management IC for Portable Navigation Systems and Tablet Computing devices. It contains the following components: - Configurable Bucks(Single and multi-phase). - Configurable General Purpose Output Signals (GPO). The LP87565-Q1 variant device uses two 2-phase outputs configuration, Buck0 is master for Buck0/1 output and Buck2 is master for Buck2/3 output. Signed-off-by: Keerthy Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/lp87565.txt | 43 ++++ drivers/mfd/Kconfig | 14 ++ drivers/mfd/Makefile | 1 + drivers/mfd/lp87565.c | 100 ++++++++ include/linux/mfd/lp87565.h | 270 ++++++++++++++++++++++ 5 files changed, 428 insertions(+) commit f58b14e6632a07ea1eb89aedb5e27cc55d251826 Author: Jeffy Chen Date: Mon Jun 12 16:42:46 2017 +0800 mfd: cros_ec: Free IRQ on exit Currently we request the irq when probing, but never free it. So after unbind ec driver, this irq will be left requested, which would break the next bind: [ 2683.338437] genirq: Flags mismatch irq 64. 00002008 (chromeos-ec) vs. 00002008 (chromeos-ec) [ 2683.338591] cros-ec-spi spi5.0: request irq 64: error -16 [ 2683.338610] cros-ec-spi spi5.0: cannot register EC [ 2683.338656] cros-ec-spi: probe of spi5.0 failed with error -16 Signed-off-by: Jeffy Chen Signed-off-by: Lee Jones drivers/mfd/cros_ec.c | 3 +++ 1 file changed, 3 insertions(+) commit 91ab076e3a2f092254fe5231bbfa92b37fd52e38 Author: Olimpiu Dejeu Date: Thu Jun 8 10:12:02 2017 -0400 dt-bindings: vendor-prefixes: Add arctic to vendor prefix Acked-by: Rob Herring Reviewed-by: Jingoo Han Signed-off-by: Olimpiu Dejeu Signed-off-by: Lee Jones Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit b77eb79acca3203883e8d8dbc7f2b842def1bff8 Author: Steve Twiss Date: Mon Jun 5 15:35:10 2017 +0100 mfd: da9061: Fix to remove BBAT_CONT register from chip model Remove the register DA9062AA_BBAT_CONT (0x0C5) from the DA9061 chip model regmap access ranges. This applies to both da9061_aa_readable_ranges[] and da9061_aa_writeable_ranges[]. This change is to correct the DA9061 chip model and align it with the latest DA9061 Datasheet. This register previously appeared in the DA9061 Datasheet, Revision 3.2, 01-Mar-2016 and has been removed from later DA9061 datasheet from Dialog, Revision 3.3, 04-Apr-2017. Signed-off-by: Steve Twiss Signed-off-by: Lee Jones drivers/mfd/da9062-core.c | 6 ------ 1 file changed, 6 deletions(-) commit 2cd6496d81fbaa36d1c9387505000c05bf16e1c6 Author: Steve Twiss Date: Mon Jun 5 15:35:10 2017 +0100 mfd: da9061: Fix to remove BBAT_CONT register from chip model Remove the register DA9062AA_BBAT_CONT (0x0C5) from the DA9061 chip model regmap access ranges. This applies to both da9061_aa_readable_ranges[] and da9061_aa_writeable_ranges[]. This change is to correct the DA9061 chip model and align it with the latest DA9061 Datasheet. This register previously appeared in the DA9061 Datasheet, Revision 3.2, 01-Mar-2016 and has been removed from later DA9061 datasheet from Dialog, Revision 3.3, 04-Apr-2017. Signed-off-by: Steve Twiss Signed-off-by: Lee Jones drivers/mfd/da9062-core.c | 6 ------ 1 file changed, 6 deletions(-) commit aaac4a2eadaa6474a347ee4b07d4ea8bb6908c8e Author: Hans de Goede Date: Sun Jun 4 13:31:28 2017 +0200 mfd: axp20x-i2c: Document that this must be builtin on x86 On x86 the AXP288 PMIC provides an ACPI OpRegion handler, which must be available before other drivers using it are loaded, which can only be ensured if the MFD, OpRegion and i2c-bus drivers are built-in. Since the AXP20x MFD code is used on non x86 too we cannot simply change this into a bool, I've tried some Kconfig magic with if x86 but I could not get this working correctly, so this commit just documents that this should be built-in on x86, which fixes errors like these during boot: mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA ACPI Error: No handler for Region [REGS] (ffff93543b0cc3a8) [UserDefinedRegion] ACPI Error: Region UserDefinedRegion (ID=143) has no handler (20170119/exfldio-2 ACPI Error: Method parse/execution failed [\_SB.PCI0.I2C7.PMI5.GET] (Node ffff93 ACPI Error: Method parse/execution failed [\_SB.PCI0.SHC1._PS0] (Node ffff93543b acpi 80860F14:02: Failed to change power state to D0 Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Tested-by: russianneuromancer Signed-off-by: Lee Jones drivers/mfd/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit de85d79f4aab67fe0537dd6e2c5d545b88239cc4 Author: Hans de Goede Date: Sun Jun 4 14:59:20 2017 +0200 mfd: Add Cherry Trail Whiskey Cove PMIC driver Add mfd driver for Intel CHT Whiskey Cove PMIC, based on various non upstreamed CHT Whiskey Cove PMIC patches. This is a somewhat minimal version which adds irqchip support and cells for: ACPI PMIC opregion support, the i2c-controller driving the external charger irc and the pwrsrc/extcon block. Further cells can be added in the future if/when drivers are upstreamed for them. [The above patch caused a build error on some archetectures] From: Arnd Bergmann I ran into a build error on ARM with a platform that has a non-standard clk implementation: drivers/clk/clk.o: In function `clk_disable': clk.c:(.text.clk_disable+0x0): multiple definition of `clk_disable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_disable+0x0): first defined here drivers/clk/clk.o: In function `clk_enable': clk.c:(.text.clk_enable+0x0): multiple definition of `clk_enable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_enable+0x0): first defined here The problem is a device driver that uses 'select COMMON_CLK', which is generally a bad idea: selecting a subsystem should only be done from a platform, otherwise we run into circular dependencies. The same driver also selects 'GPIOLIB' and 'I2C', which has a similar effect. This turns all three into 'depends on', as it should be. Finally, we can limit the build to x86, unless we are compile testing. First patch: Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones Fix for first patch (squashed): Signed-off-by: Arnd Bergmann Signed-off-by: Hans de Goede Signed-off-by: Lee Jones drivers/mfd/Kconfig | 16 +++ drivers/mfd/Makefile | 1 + drivers/mfd/intel_soc_pmic_chtwc.c | 230 +++++++++++++++++++++++++++++++++++++ 3 files changed, 247 insertions(+) commit b6678050a1d9ce971bbb343607d3920efe7131a7 Author: Arvind Yadav Date: Thu Jun 1 12:44:50 2017 +0530 mfd: tc6393xb: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Lee Jones drivers/mfd/tc6393xb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 842086d2b5a6cec23d598edffb5137c72b265c50 Author: Jan Kiszka Date: Tue May 30 10:17:41 2017 +0200 mfd: intel_quark_i2c_gpio: Add support for SIMATIC IOT2000 platform The SIMATIC IOT2020 and IOT2040 are derived from the Galileo Gen2 board and share its I2C frequency. Signed-off-by: Sascha Weisenberger Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel_quark_i2c_gpio.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b518d4adb83e3e139d3de96d172d9b4dec6def09 Author: Jan Kiszka Date: Tue May 30 10:17:40 2017 +0200 mfd: intel_quark_i2c_gpio: Use dmi_system_id table for retrieving frequency Avoids reimplementation of DMI matching in intel_quark_i2c_setup. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel_quark_i2c_gpio.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit 9bf2db7834993b776707618ab5828265100bf3fd Author: Benjamin Gaignard Date: Mon May 29 17:45:58 2017 +0200 mfd: motorola-cpcap: Use devm_of_platform_populate() Usage of devm_of_platform_populate() simplify driver code by allowing to delete cpcap_remove(). Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/motorola-cpcap.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 66002163f047884b8f245eb85249144e43168b92 Author: Benjamin Gaignard Date: Mon May 29 17:46:01 2017 +0200 mfd: smsc-ece: Use devm_of_platform_populate() Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/smsc-ece1099.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6f00f8c8635f79b470eab6496265d63c1e1db3ed Author: Benjamin Gaignard Date: Mon May 29 17:46:00 2017 +0200 mfd: qcom-spmi-pmic: Use devm_of_platform_populate() Usage of devm_of_platform_populate() simplify driver code by allowing to delete pmic_spmi_remove(). Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/qcom-spmi-pmic.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 124e9deb1c40cc8c6fdf56bcb851500423eb9f13 Author: Benjamin Gaignard Date: Mon May 29 17:45:59 2017 +0200 mfd: palmas: Use devm_of_platform_populate() Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/palmas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11ee55d94e628a9931564372df23ae054834c38f Author: Benjamin Gaignard Date: Mon May 29 17:45:56 2017 +0200 mfd: exynos: Use devm_of_platform_populate() Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/exynos-lpass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a55196eff6d63be4c439d707ce3b68ee82794ee9 Author: Benjamin Gaignard Date: Mon May 29 17:45:57 2017 +0200 mfd: fsl-imx25: Use devm_of_platform_populate() Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/fsl-imx25-tsadc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2eb131efb13d1fb98c08fccfe25908a5a3ad04f6 Author: Benjamin Gaignard Date: Mon May 29 17:45:55 2017 +0200 mfd: cros_ec: Use devm_of_platform_populate() Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/cros_ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad56b2a4da907741236c612be913f28657962382 Author: Benjamin Gaignard Date: Mon May 29 17:45:54 2017 +0200 mfd: atmel: Use devm_of_platform_populate() Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/atmel-flexcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c42a8edbe95db8106a68d7680c8379c4f80d9845 Author: Benjamin Gaignard Date: Mon May 29 17:45:53 2017 +0200 mfd: stm32-timers: Use devm_of_platform_populate() Use devm_of_platform_populate() instead of of_platform_populate() and suppress stm32_timers_remove() which become useless. Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/stm32-timers.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit acebcff9eda8c38fd78acbfb9fab555b3a2ba5eb Author: Hans de Goede Date: Fri May 26 13:15:30 2017 +0200 mfd: intel_soc_pmic: Select designware i2c-bus driver The Crystal Cove PMIC provides an ACPI OPRegion handler, which must be available before other drivers using it are loaded, which is why INTEL_SOC_PMIC is a bool. Just having the driver is not enough, the driver for the i2c-bus must also be built in, to ensure this, this patch adds a select for it. This fixes errors like these during boot: mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA ACPI Error: No handler for Region [REGS] (ffff93543b0cc3a8) [UserDefinedRegion] (20170119/evregion-166) ACPI Error: Region UserDefinedRegion (ID=143) has no handler (20170119/exfldio-299) ACPI Error: Method parse/execution failed [\_SB.PCI0.I2C7.PMI5.GET] (Node ffff93543b0cde10), AE_NOT_EXIST (20170119/psparse-543) ACPI Error: Method parse/execution failed [\_SB.PCI0.SHC1._PS0] (Node ffff93543b0b5cd0), AE_NOT_EXIST (20170119/psparse-543) acpi 80860F14:02: Failed to change power state to D0 While at it this patch also changes the human readable name of the Kconfig option to make clear the INTEL_SOC_PMIC option selects support for the Intel Crystal Cove PMIC and documents why this is a bool. [The above patch caused a build error on some archetectures] From: Arnd Bergmann I ran into a build error on ARM with a platform that has a non-standard clk implementation: drivers/clk/clk.o: In function `clk_disable': clk.c:(.text.clk_disable+0x0): multiple definition of `clk_disable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_disable+0x0): first defined here drivers/clk/clk.o: In function `clk_enable': clk.c:(.text.clk_enable+0x0): multiple definition of `clk_enable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_enable+0x0): first defined here The problem is a device driver that uses 'select COMMON_CLK', which is generally a bad idea: selecting a subsystem should only be done from a platform, otherwise we run into circular dependencies. The same driver also selects 'GPIOLIB' and 'I2C', which has a similar effect. This turns all three into 'depends on', as it should be. Finally, we can limit the build to x86, unless we are compile testing. First patch: Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones Fix for first patch (squashed): Signed-off-by: Arnd Bergmann Signed-off-by: Hans de Goede Signed-off-by: Lee Jones drivers/mfd/Kconfig | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 340267640d769d3b3af9dccee0d29a0060b18094 Author: Steve Twiss Date: Tue May 23 14:40:45 2017 +0100 MAINTAINERS: da9062/61 updates to the Dialog Semiconductor search terms Additions to search terms for files supported by Dialog Semiconductor. This update will allow Dialog support to follow files for device tree bindings (onkey, thermal and watchdog) and source code for chip thermal monitoring drivers. Signed-off-by: Steve Twiss Signed-off-by: Lee Jones MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit 54698c2d0a5a4e8c19e98388019c2c0ae1b51745 Author: Tobias Klauser Date: Wed May 24 18:08:16 2017 +0200 mfd: fsl-imx25-tsadc: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Signed-off-by: Lee Jones drivers/mfd/fsl-imx25-tsadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 485857390927ee359a47f1c528ed6ca5725ddbc9 Author: Uwe Kleine-König Date: Thu May 25 22:26:21 2017 +0200 mfd: twl4030-irq: Log an error in twl4030_sih_setup if the module cannot be found As silently failing isn't that nice, emit an error message at a place that was silent on failure up to now. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones drivers/mfd/twl4030-irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7a456cba37a265fbbc91504218125ead2c8b6cc7 Author: Charles Keepax Date: Tue May 23 15:47:32 2017 +0100 mfd: arizona: Update GPIO binding for newly supported specifiers Link to the generic GPIO specifier bindings now that the second cell of the binding has some support in the driver. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/arizona.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7b55033fbed07bad695ba744db3070c1cc351dc4 Author: Gustavo A. R. Silva Date: Wed May 24 04:18:52 2017 -0500 mfd: wm831x-spi: Add NULL check before pointer dereference Add NULL check before dereferencing pointer of_id in order to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1408830 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Lee Jones drivers/mfd/wm831x-spi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 800e54558b0f1444e480ad4eb8d4a774899875d8 Author: Gustavo A. R. Silva Date: Wed May 24 04:26:23 2017 -0500 mfd: wm831x-i2c: Add NULL check before pointer dereference Add NULL check before dereferencing pointer of_id in order to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1408829 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Lee Jones drivers/mfd/wm831x-i2c.c | 4 ++++ 1 file changed, 4 insertions(+) commit 87d284443d071dc70344dda4b2fb43723686acdb Author: Steven Feng Date: Tue May 23 15:13:24 2017 +0800 mfd: rtsx: Do retry when DMA transfer error The request should be resent when DMA transfer error occurred. For rts5227, the clock rate needs to be reduced when error occurred. Signed-off-by: Steven Feng Signed-off-by: Lee Jones drivers/mfd/rtsx_pcr.c | 17 +++++++++++++++-- include/linux/mfd/rtsx_pci.h | 5 +++++ 2 files changed, 20 insertions(+), 2 deletions(-) commit 9b79ff104f73de63efc958cc0dec3c826aee3ffd Author: Icenowy Zheng Date: Thu May 18 15:16:50 2017 +0800 mfd: axp20x: Add axp20x-regulator cell for AXP803 As axp20x-regulator now supports AXP803, add a cell for it. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ecca790a1aabd4a0e6fcdf7c3a0c81f3a4f38b6a Author: Stefan Agner Date: Mon May 15 23:24:11 2017 -0700 mfd: rn5t618: Unregister restart handler on remove Remove the restart handler registered in probe on device remove. Fixes: a370f60a58ec ("mfd: rn5t618: Register restart handler") Signed-off-by: Stefan Agner Signed-off-by: Lee Jones drivers/mfd/rn5t618.c | 2 ++ 1 file changed, 2 insertions(+) commit dcb0574b4b15e197e4ab2b503efcfa5eb172083d Author: Charles Keepax Date: Mon May 15 13:51:24 2017 +0100 mfd: wm831x: Remove redundant !pdata checks Since a copy of the pdata was added into the core struct in commit f6dd8449cd50 ("mfd: wm831x: Add basic device tree binding") the pdata pointer in probe can no longer be NULL. As such remove the redundant checks for this case. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm831x-core.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 6ae0cc90d9e7c026d0a342403f0cd559f743edab Author: Linus Walleij Date: Mon May 15 11:44:05 2017 +0200 mfd: ipaq-micro: Dump debugging hexdumps These hexdumps get printed no matter if CONFIG_DEBUG is set or not. Just get rid of them. Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ipaq-micro.c | 5 ----- 1 file changed, 5 deletions(-) commit b418bbff36dd25dc49ed6abbb1e1deedd0d7cff5 Author: Andy Shevchenko Date: Mon May 15 11:23:14 2017 +0300 mfd: intel-lpss: Add Intel Cannonlake PCI IDs Intel Cannonlake PCH has the same LPSS than Intel Kabylake. Add the new IDs to the list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel-lpss-pci.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit cdf01226b26e98c79c13b335fbe0cbbbe850cf44 Author: David Howells Date: Tue Jul 4 17:25:22 2017 +0100 VFS: Provide empty name qstr Provide an empty name (ie. "") qstr for general use. Signed-off-by: David Howells Signed-off-by: Al Viro fs/dcache.c | 8 ++++++-- fs/gfs2/dir.c | 3 +-- fs/namei.c | 3 +-- fs/nsfs.c | 3 +-- fs/pipe.c | 3 +-- include/linux/dcache.h | 5 +++++ 6 files changed, 15 insertions(+), 10 deletions(-) commit ee416bcdba9975065de571e09de1f7ebfde2156a Author: David Howells Date: Tue Jul 4 17:25:16 2017 +0100 VFS: Make get_filesystem() return the affected filesystem Make get_filesystem() return a pointer to the filesystem on which it just got a ref. Suggested-by: Rasmus Villemoes Signed-off-by: David Howells Signed-off-by: Al Viro fs/filesystems.c | 3 ++- include/linux/fs.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit dd111b31e951c4ffb3a525b51b11d240118693c1 Author: David Howells Date: Tue Jul 4 17:25:09 2017 +0100 VFS: Clean up whitespace in fs/namespace.c and fs/super.c Clean up line terminal whitespace in fs/namespace.c and fs/super.c. Signed-off-by: David Howells Signed-off-by: Al Viro fs/namespace.c | 4 ++-- fs/super.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit f35157417215ec138c920320c746fdb3e04ef1d5 Author: David Howells Date: Tue Jul 4 17:25:02 2017 +0100 Provide a function to create a NUL-terminated string from unterminated data Provide a function, kmemdup_nul(), that will create a NUL-terminated string from an unterminated character array where the length is known in advance. This is better than kstrndup() in situations where we already know the string length as the strnlen() in kstrndup() is superfluous. Signed-off-by: David Howells Signed-off-by: Al Viro include/linux/string.h | 1 + mm/util.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit 6ede2b7df92f4f8da1abfa831a038688fcf409ea Author: Joe Perches Date: Wed Jul 5 13:02:27 2017 -0700 ALSA: opl4: Move inline before return type Make the code like the rest of the kernel. Signed-off-by: Joe Perches Acked-by: Clemens Ladisch Signed-off-by: Takashi Iwai sound/drivers/opl4/opl4_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d396b20a1e88ca2cabf7ec99c6c2138902aff1f3 Author: Jerome Brunet Date: Thu Jun 8 14:24:15 2017 +0200 pwm: meson: Add compatible for the gxbb ao PWMs On the gxbb (and gxl) family, the PWMs of the AO domain require a specific compatible because the possible input clocks are different from the EE PWMs input clocks. Since the number of possible input clocks is also different, the 'num_parents' field is added to all the Meson PWM data. Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet Reviewed-by: Kevin Hilman Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) commit a054c4d68408cdbb260ba9384415fb53edb29d7a Author: Alexandre Belloni Date: Tue May 30 21:32:09 2017 +0200 pwm: sun4i: Drop legacy callbacks Remove the legacy callbacks .enable(), .disable(), .set_polarity() and .config(). Signed-off-by: Alexandre Belloni Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Thierry Reding drivers/pwm/pwm-sun4i.c | 160 ------------------------------------------------ 1 file changed, 160 deletions(-) commit c32c5c50d4fe156da1ecd32f2a16c1b8fcfba392 Author: Alexandre Belloni Date: Tue May 30 21:32:08 2017 +0200 pwm: sun4i: Switch to atomic PWM Switch the driver to atomic PWM. This makes it easier to wait a proper amount of time when changing the duty cycle before disabling the channel (main use case is switching the duty cycle to 0 before disabling). Signed-off-by: Alexandre Belloni Acked-by: Maxime Ripard Signed-off-by: Thierry Reding drivers/pwm/pwm-sun4i.c | 166 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) commit 93e0dfb2c52f9cb7a7899156475b4e7b0bee7de3 Author: Alexandre Belloni Date: Tue May 30 21:32:07 2017 +0200 pwm: sun4i: Improve hardware read out Implement .get_state instead of only reading the polarity at probe time. This allows to get the proper state, period and duty cycle. Signed-off-by: Alexandre Belloni Reviewed-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Thierry Reding drivers/pwm/pwm-sun4i.c | 65 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 19 deletions(-) commit 842594c8775b585c58459e044708c0335b6aa6b7 Author: Sagi Grimberg Date: Wed Jul 5 09:56:13 2017 +0300 nvme-rdma: unconditionally recycle the request mr When our RDMA queue-pair is torn down with high load of I/O traffic, we have no way of knowing if the memory region was actually registered by the reg_mr work request as it completion flushes with error (hw might have done it or not). So in order to not deal with all this uncertanty, we simply recycle the MR in reinit_request. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/rdma.c | 3 --- 1 file changed, 3 deletions(-) commit d09f2b45f346f0a9e5e1b5fcea531b1b393671dc Author: Sagi Grimberg Date: Sun Jul 2 10:56:43 2017 +0300 nvme: split nvme_uninit_ctrl into stop and uninit Usually before we teardown the controller we want to: 1. complete/cancel any ctrl inflight works 2. remove ctrl namespaces (only for removal though, resets shouldn't remove any namespaces). but we do not want to destroy the controller device as we might use it for logging during the teardown stage. This patch adds nvme_start_ctrl() which queues inflight controller works (aen, ns scan, queue start and keep-alive if kato is set) and nvme_stop_ctrl() which cancels the works namespace removal is left to the callers to handle. Move nvme_uninit_ctrl after we are done with the controller device. Reviewed-by: Keith Busch Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/core.c | 21 +++++++++++++++++++-- drivers/nvme/host/fc.c | 16 ++++------------ drivers/nvme/host/nvme.h | 2 ++ drivers/nvme/host/pci.c | 16 ++++------------ drivers/nvme/host/rdma.c | 29 ++++++++--------------------- drivers/nvme/target/loop.c | 19 ++++++------------- 6 files changed, 43 insertions(+), 60 deletions(-) commit 9b3e99058453399b506087b3ac99d67a80343333 Author: Sagi Grimberg Date: Tue Jul 4 10:03:03 2017 +0300 virtio_blk: quiesce/unquiesce live IO when entering PM states Without it its not guaranteed that no .queue_rq is inflight. Reviewed-by: Ming Lei Acked-by: Michael S. Tsirkin Cc: virtio-dev@lists.oasis-open.org Cc: Jason Wang Signed-off-by: Sagi Grimberg drivers/block/virtio_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 436c15ab6596b12cfee7618ecaa69a4341ac3c51 Author: Sagi Grimberg Date: Tue Jul 4 10:00:41 2017 +0300 mtip32xx: quiesce request queues to make sure no submissions are inflight Unlike blk_mq_stop_hw_queues, blk_mq_quiesce_queue respects the submission path rcu grace. quiesce the queue before iterating on live tags, or performing device io quiescing. While were at it, verify that the request started in mtip_abort_cmd amd mtip_queue_cmd tag iteration calls. Reviewed-by: Ming Lei Signed-off-by: Sagi Grimberg drivers/block/mtip32xx/mtip32xx.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit b52c2e92546ee794a5bbab4d8ea435c1de85a8cb Author: Sagi Grimberg Date: Tue Jul 4 09:57:09 2017 +0300 nbd: quiesce request queues to make sure no submissions are inflight Unlike blk_mq_stop_hw_queues, blk_mq_quiesce_queue respects the submission path rcu grace. quiesce the queue before iterating on live tags. Reviewed-by: Ming Lei Acked-by: Josef Bacik Signed-off-by: Sagi Grimberg drivers/block/nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d7b8fafad87c3404f72ce2d36c79c48be1129a6 Author: Sagi Grimberg Date: Tue Jul 4 18:16:58 2017 +0300 nvme: kick requeue list when requeueing a request instead of when starting the queues When we requeue a request, we can always insert the request back to the scheduler instead of doing it when restarting the queues and kicking the requeue work, so get rid of the requeue kick in nvme (core and drivers). Also, now there is no need start hw queues in nvme_kill_queues We don't stop the hw queues anymore, so no need to start them. Reviewed-by: Ming Lei Signed-off-by: Sagi Grimberg drivers/nvme/host/core.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit c81545f991a6612d3bdab18a71b3487023ec6b69 Author: Sagi Grimberg Date: Sun Jul 2 15:53:27 2017 +0300 nvme-pci: quiesce/unquiesce admin_q instead of start/stop its hw queues unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Reviewed-by: Ming Lei Signed-off-by: Sagi Grimberg drivers/nvme/host/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c1c0ffff3a99caf40c3bd21447135db459194123 Author: Sagi Grimberg Date: Sun Jul 2 15:40:17 2017 +0300 nvme-loop: quiesce/unquiesce admin_q instead of start/stop its hw queues unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Reviewed-by: Ming Lei Signed-off-by: Sagi Grimberg drivers/nvme/target/loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f9c5af5f8ff14a31468546b9b1a876d537019e9a Author: Sagi Grimberg Date: Sun Jul 2 15:39:34 2017 +0300 nvme-fc: quiesce/unquiesce admin_q instead of start/stop its hw queues unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Also, make sure to unquiesce before cleanup the admin queue. Reviewed-by: Ming Lei Reviewed-By: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/host/fc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fb051339727cd8134dd6ef0305a120e6e265dded Author: Sagi Grimberg Date: Sun Jul 2 15:33:32 2017 +0300 nvme-rdma: quiesce/unquiesce admin_q instead of start/stop its hw queues unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Also make sure to kick the requeue list when appropriate. Reviewed-by: Ming Lei Signed-off-by: Sagi Grimberg drivers/nvme/host/rdma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5e599d73c1c1816af07f94ddba879499aa39b43c Author: Marta Rybczynska Date: Tue Jun 6 13:27:21 2017 +0200 nvme-rdma: remove race conditions from IB signalling This patch improves the way the RDMA IB signalling is done by using atomic operations for the signalling variable. This avoids race conditions on sig_count. The signalling interval changes slightly and is now the largest power of two not larger than queue depth / 2. ilog() usage idea by Bart Van Assche. Signed-off-by: Marta Rybczynska Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org drivers/nvme/host/rdma.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c034a6fda0179a85cd571c386ed6748188b0a79c Author: Arvind Yadav Date: Tue Jun 13 15:26:41 2017 +0530 pwm: hibvt: Constify hibvt_pwm_ops File size before: text data bss dec hex filename 1510 296 0 1806 70e drivers/pwm/pwm-hibvt.o File size After adding 'const': text data bss dec hex filename 1606 192 0 1798 706 drivers/pwm/pwm-hibvt.o Signed-off-by: Arvind Yadav Signed-off-by: Thierry Reding drivers/pwm/pwm-hibvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93c292ef3cbb46db78853763fc4d9a5b9dfb97d5 Author: Jerome Brunet Date: Tue May 23 18:05:03 2017 +0200 pwm: Silently error out on EPROBE_DEFER In of_pwm_get(), if we fail to get the PWM chip due to probe deferal, we shouldn't print an error message. Just be silent in this case. Signed-off-by: Jerome Brunet Reviewed-by: Andreas Färber Signed-off-by: Thierry Reding drivers/pwm/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c571123c8a94cfbc88e70be4e8883529181417ce Author: Mauro Carvalho Chehab Date: Sat Jun 17 12:26:44 2017 -0300 pwm: Standardize document format Each text file under Documentation follows a different format. Some don't even have titles! Change its representation to follow the adopted standard, using ReST markup for it to be parseable by Sphinx: - mark document title; - mark literal blocks; - better format the parameters. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Thierry Reding Documentation/pwm.txt | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) commit b87b786b1fa1aa1bba33da22c8bb6b3ec7b608d2 Author: Al Viro Date: Thu Jul 6 02:00:00 2017 -0400 Fix trivial misannotations Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 4 ++-- drivers/gpu/drm/mga/mga_ioc32.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0e1921dcd825004551bd4dd2df99697641434a52 Author: Markus Elfring Date: Tue May 16 11:40:09 2017 +0200 pwm: bfin: Remove unneeded error message Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Thierry Reding drivers/pwm/pwm-bfin.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 00fc2c26bc46a64545cdf95a1511461ea9acecb4 Author: Chris Wilson Date: Wed Jul 5 21:12:44 2017 +0100 drm: Remove unused drm_file parameter to drm_syncobj_replace_fence() the drm_file parameter is unused, so remove it. Signed-off-by: Chris Wilson Cc: Dave Airlie Reviewed-by: Jason Ekstrand Signed-off-by: Dave Airlie drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++---- drivers/gpu/drm/drm_syncobj.c | 8 +++----- include/drm/drm_syncobj.h | 3 +-- 3 files changed, 6 insertions(+), 11 deletions(-) commit d7f673d8a0776f3f791fd795b409060ba808b62a Author: Fabrice GASNIER Date: Wed Jun 14 17:13:16 2017 +0200 dt-bindings: pwm: Update STM32 timers clock names Clock name has been updated during driver/DT binding review: https://lkml.org/lkml/2016/12/13/718 Update DT binding doc to reflect this. Fixes: cd9a99c2f8e8 (dt-bindings: pwm: Add STM32 bindings) Signed-off-by: Fabrice Gasnier Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-stm32.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df8f4c6c0275216498340a64c7d2674377bd3e78 Author: Ulrich Hecht Date: Thu Apr 27 16:37:43 2017 +0200 dt-bindings: pwm: Add R-Car M3-W device tree bindings Add device tree bindings for the PWM controller found on R-Car M3-W SoCs. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt | 1 + 1 file changed, 1 insertion(+) commit af65207c76ce8e6263a3b097ea35365dde9913d0 Author: Tahsin Erdogan Date: Thu Jul 6 00:01:59 2017 -0400 ext4: fix __ext4_new_inode() journal credits calculation ea_inode feature allows creating extended attributes that are up to 64k in size. Update __ext4_new_inode() to pick increased credit limits. To avoid overallocating too many journal credits, update __ext4_xattr_set_credits() to make a distinction between xattr create vs update. This helps __ext4_new_inode() because all attributes are known to be new, so we can save credits that are normally needed to delete old values. Also, have fscrypt specify its maximum context size so that we don't end up allocating credits for 64k size. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/crypto/policy.c | 1 + fs/ext4/acl.c | 13 ++++++----- fs/ext4/ialloc.c | 52 ++++++++++++++++++++++++++++++++++++------ fs/ext4/super.c | 3 ++- fs/ext4/xattr.c | 46 ++++++++++++++++++++++--------------- fs/ext4/xattr.h | 5 +++- include/linux/fscrypt_common.h | 3 +++ 7 files changed, 89 insertions(+), 34 deletions(-) commit ad47f9533994d7e3d2dbfa4fffe85934a1627edc Author: Tahsin Erdogan Date: Thu Jul 6 00:00:59 2017 -0400 ext4: skip ext4_init_security() and encryption on ea_inodes Extended attribute inodes are internal to ext4. Adding encryption/security related attributes on them would mean dealing with nested calls into ea code. Since they have no direct exposure to user mode, just avoid creating ea entries for them. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/ialloc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 37d644aa01c092686af8a96f34df93c74e55b480 Author: Arvind Yadav Date: Mon Jul 3 15:40:04 2017 +0530 PM / devfreq: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 621 176 0 797 31d drivers/devfreq/governor_userspace.o File size After adding 'const': text data bss dec hex filename 670 144 0 814 32e drivers/devfreq/governor_userspace.o Signed-off-by: Arvind Yadav Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/governor_userspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e578b37505018622dfafc40eed7cd78ff2af221 Author: Gustavo A. R. Silva Date: Mon Jul 3 07:47:38 2017 -0500 PM / devfreq: tegra: fix error return code in tegra_devfreq_probe() platform_get_irq() returns an error code, but the tegra-devfreq driver ignores it and always returns -ENODEV. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. Reviewed-by: Chanwoo Choi Signed-off-by: Gustavo A. R. Silva Signed-off-by: MyungJoo Ham drivers/devfreq/tegra-devfreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit da55b1ad4b29b6ab44d5dc8ea8306260246d2699 Author: Gustavo A. R. Silva Date: Mon Jul 3 07:59:26 2017 -0500 PM / devfreq: rk3399_dmc: fix error return code in rk3399_dmcfreq_probe() platform_get_irq() returns an error code, but the rk3399_dmc driver ignores it and always returns -EINVAL. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. Reviewed-by: Chanwoo Choi Signed-off-by: Gustavo A. R. Silva Signed-off-by: MyungJoo Ham drivers/devfreq/rk3399_dmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 97eaf7533859013cc4a81dcddf94ef3dcac418e4 Merge: 4d79ce4 593f546 Author: Dave Airlie Date: Thu Jul 6 11:10:29 2017 +1000 Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next Fixes for 4.13: - Various fixes for Raven - Various fixes for Vega10 - Stability fixes for KIQ - Fix reloading the driver - Fix S3 on vega10 - Misc other fixes * 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux: (26 commits) drm/amd/powerplay: fix bug fail to remove sysfs when rmmod amdgpu. amdgpu: Set cik/si_support to 1 by default if radeon isn't built drm/amdgpu/gfx9: fix driver reload with KIQ drm/amdgpu/gfx8: fix driver reload with KIQ drm/amdgpu: Don't call amd_powerplay_destroy() if we don't have powerplay drm/ttm: Fix use-after-free in ttm_bo_clean_mm drm/amd/amdgpu: move get memory type function from early init to sw init drm/amdgpu/cgs: always set reference clock in mode_info drm/amdgpu: fix vblank_time when displays are off drm/amd/powerplay: power value format change for Vega10 drm/amdgpu/gfx9: support the amdgpu.disable_cu option drm/amd/powerplay: change PPSMC_MSG_GetCurrPkgPwr for Vega10 drm/amdgpu: Make amdgpu_cs_parser_init static (v2) drm/amdgpu/cs: fix a typo in a comment drm/amdgpu: Fix the exported always on CU bitmap drm/amdgpu/gfx9: gfx_v9_0_enable_gfx_static_mg_power_gating() can be static drm/amdgpu/psp: upper_32_bits/lower_32_bits for address setup drm/amd/powerplay/cz: print message if smc message fails drm/amdgpu: fix typo in amdgpu_debugfs_test_ib_init drm/amdgpu: enable mmhub pg on raven ... commit 966681c9f029afd5decee069b7658bb58ad0a863 Author: Rabin Vincent Date: Thu Jun 29 16:01:42 2017 +0200 CIFS: fix circular locking dependency When a CIFS filesystem is mounted with the forcemand option and the following command is run on it, lockdep warns about a circular locking dependency between CifsInodeInfo::lock_sem and the inode lock. while echo foo > hello; do :; done & while touch -c hello; do :; done cifs_writev() takes the locks in the wrong order, but note that we can't only flip the order around because it releases the inode lock before the call to generic_write_sync() while it holds the lock_sem across that call. But, AFAICS, there is no need to hold the CifsInodeInfo::lock_sem across the generic_write_sync() call either, so we can release both the locks before generic_write_sync(), and change the order. ====================================================== WARNING: possible circular locking dependency detected 4.12.0-rc7+ #9 Not tainted ------------------------------------------------------ touch/487 is trying to acquire lock: (&cifsi->lock_sem){++++..}, at: cifsFileInfo_put+0x88f/0x16a0 but task is already holding lock: (&sb->s_type->i_mutex_key#11){+.+.+.}, at: utimes_common+0x3ad/0x870 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sb->s_type->i_mutex_key#11){+.+.+.}: __lock_acquire+0x1f74/0x38f0 lock_acquire+0x1cc/0x600 down_write+0x74/0x110 cifs_strict_writev+0x3cb/0x8c0 __vfs_write+0x4c1/0x930 vfs_write+0x14c/0x2d0 SyS_write+0xf7/0x240 entry_SYSCALL_64_fastpath+0x1f/0xbe -> #0 (&cifsi->lock_sem){++++..}: check_prevs_add+0xfa0/0x1d10 __lock_acquire+0x1f74/0x38f0 lock_acquire+0x1cc/0x600 down_write+0x74/0x110 cifsFileInfo_put+0x88f/0x16a0 cifs_setattr+0x992/0x1680 notify_change+0x61a/0xa80 utimes_common+0x3d4/0x870 do_utimes+0x1c1/0x220 SyS_utimensat+0x84/0x1a0 entry_SYSCALL_64_fastpath+0x1f/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#11); lock(&cifsi->lock_sem); lock(&sb->s_type->i_mutex_key#11); lock(&cifsi->lock_sem); *** DEADLOCK *** 2 locks held by touch/487: #0: (sb_writers#10){.+.+.+}, at: mnt_want_write+0x41/0xb0 #1: (&sb->s_type->i_mutex_key#11){+.+.+.}, at: utimes_common+0x3ad/0x870 stack backtrace: CPU: 0 PID: 487 Comm: touch Not tainted 4.12.0-rc7+ #9 Call Trace: dump_stack+0xdb/0x185 print_circular_bug+0x45b/0x790 __lock_acquire+0x1f74/0x38f0 lock_acquire+0x1cc/0x600 down_write+0x74/0x110 cifsFileInfo_put+0x88f/0x16a0 cifs_setattr+0x992/0x1680 notify_change+0x61a/0xa80 utimes_common+0x3d4/0x870 do_utimes+0x1c1/0x220 SyS_utimensat+0x84/0x1a0 entry_SYSCALL_64_fastpath+0x1f/0xbe Fixes: 19dfc1f5f2ef03a52 ("cifs: fix the race in cifs_writev()") Signed-off-by: Rabin Vincent Signed-off-by: Steve French Acked-by: Pavel Shilovsky fs/cifs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 709340a00ad67aea081916582846248e3b18b463 Author: Colin Ian King Date: Wed Jul 5 13:47:34 2017 +0100 cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT Currently oparms.create_options is uninitialized and the code is logically or'ing in CREATE_OPEN_BACKUP_INTENT onto a garbage value of oparms.create_options from the stack. Fix this by just setting the value rather than or'ing in the setting. Detected by CoverityScan, CID#1447220 ("Unitialized scale value") Signed-off-by: Colin Ian King Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93d2cb6c82f4d50a1b35b9de379ebb1d022801ac Author: Long Li Date: Wed Jun 28 15:55:55 2017 -0700 cifs: Do not modify mid entry after submitting I/O in cifs_call_async In cifs_call_async, server may respond as soon as I/O is submitted. Because mid entry is freed on the return path, it should not be modified after I/O is submitted. cifs_save_when_sent modifies the sent timestamp in mid entry, and should not be called after I/O. Call it before I/O. Signed-off-by: Long Li Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/transport.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7e46f0900acdd8cc26588d8f6abdf2ed75dfbcd8 Author: Björn JACKE Date: Thu Jun 1 11:00:06 2017 +0200 CIFS: add SFM mapping for 0x01-0x1F Hi, attached patch adds more missing mappings for the 0x01-0x1f range. Please review, if you're fine with it, considere it also for stable. Björn >From a97720c26db2ee77d4e798e3d383fcb6a348bd29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Wed, 31 May 2017 22:48:41 +0200 Subject: [PATCH] cifs: add SFM mapping for 0x01-0x1F 0x1-0x1F has to be mapped to 0xF001-0xF01F Signed-off-by: Bjoern Jacke Signed-off-by: Steve French fs/cifs/cifs_unicode.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 84908426f2097d5c6e254c73ffcb6923a355dbda Author: Arnd Bergmann Date: Tue Jun 27 17:06:13 2017 +0200 cifs: hide unused functions Some functions are only referenced under an #ifdef, causing a harmless warning: fs/cifs/smb2ops.c:1374:1: error: 'get_smb2_acl' defined but not used [-Werror=unused-function] We could mark them __maybe_unused or add another #ifdef, I picked the second approach here. Fixes: b3fdda4d1e1b ("cifs: Use smb 2 - 3 and cifsacl mount options getacl functions") Signed-off-by: Arnd Bergmann Signed-off-by: Steve French fs/cifs/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2f1afe25997fc28027ae95d89ccf03e1eef2dca1 Author: Shirish Pargaonkar Date: Thu Jun 22 22:52:05 2017 -0500 cifs: Use smb 2 - 3 and cifsacl mount options getacl functions Fill in smb2/3 query acl functions in ops structures and use them. Signed-off-by: Shirish Pargaonkar Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2ops.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) commit 42c493c16f0d8d88e081560cc6375a683807c5ea Author: Shirish Pargaonkar Date: Thu Jun 22 22:51:31 2017 -0500 cifs: prototype declaration and definition for smb 2 - 3 and cifsacl mount options Add definition and declaration of function to get cifs acls when mounting with smb version 2 onwards to 3. Extend/Alter query info function to allocate and return security descriptors within the response. Not yet handling the error case when the size of security descriptors in response to query exceeds SMB2_MAX_BUFFER_SIZE. Signed-off-by: Shirish Pargaonkar Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2pdu.c | 52 +++++++++++++++++++++++++++++++++++++++++----------- fs/cifs/smb2proto.h | 3 +++ 2 files changed, 44 insertions(+), 11 deletions(-) commit d38de3c6156b97e4900a345124d06b6ead2d6bee Author: Aurélien Aptel Date: Wed May 24 16:13:25 2017 +0200 CIFS: add CONFIG_CIFS_DEBUG_KEYS to dump encryption keys Add new config option that dumps AES keys to the console when they are generated. This is obviously for debugging purposes only, and should not be enabled otherwise. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French fs/cifs/Kconfig | 9 +++++++++ fs/cifs/smb2transport.c | 28 +++++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) commit 97b37f241672c6b369486ac270de5ab14eb354ea Author: Jeff Layton Date: Thu May 25 06:59:52 2017 -0400 cifs: set mapping error when page writeback fails in writepage or launder_pages Signed-off-by: Jeff Layton Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Steve French fs/cifs/file.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 9b51f04424e17051a89ab32d892ca66b2a104825 Merge: 55a7b21 227145e Author: Linus Torvalds Date: Wed Jul 5 17:41:31 2017 -0700 Merge branch 'parisc-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull another parisc update from Helge Deller: "Christoph Hellwig provided one patch for the parisc architecture to drop the DMA_ERROR_CODE define from the parisc architecture" * 'parisc-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: ->mapping_error commit 55a7b2125cf4739a8478d2d7223310ae7393408c Merge: e5f76a2 425e1ed Author: Linus Torvalds Date: Wed Jul 5 17:09:27 2017 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: - RAS reporting via GHES/APEI (ACPI) - Indirect ftrace trampolines for modules - Improvements to kernel fault reporting - Page poisoning - Sigframe cleanups and preparation for SVE context - Core dump fixes - Sparse fixes (mainly relating to endianness) - xgene SoC PMU v3 driver - Misc cleanups and non-critical fixes * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (75 commits) arm64: fix endianness annotation for 'struct jit_ctx' and friends arm64: cpuinfo: constify attribute_group structures. arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set() arm64: ptrace: Remove redundant overrun check from compat_vfp_set() arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails arm64: fix endianness annotation for __apply_alternatives()/get_alt_insn() arm64: fix endianness annotation in get_kaslr_seed() arm64: add missing conversion to __wsum in ip_fast_csum() arm64: fix endianness annotation in acpi_parking_protocol.c arm64: use readq() instead of readl() to read 64bit entry_point arm64: fix endianness annotation for reloc_insn_movw() & reloc_insn_imm() arm64: fix endianness annotation for aarch64_insn_write() arm64: fix endianness annotation in aarch64_insn_read() arm64: fix endianness annotation in call_undef_hook() arm64: fix endianness annotation for debug-monitors.c ras: mark stub functions as 'inline' arm64: pass endianness info to sparse arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels arm64: signal: Allow expansion of the signal frame acpi: apei: check for pending errors when probing GHES entries ... commit e5f76a2e0e84ca2a215ecbf6feae88780d055c56 Merge: c96e6da 296990d Author: Linus Torvalds Date: Wed Jul 5 17:00:56 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull mnt namespace updates from Eric Biederman: "A big break-through came during this development cycle as a way was found to maintain the existing umount -l semantics while allowing for optimizations that improve the performance. That is represented by the first change in this series moving the reparenting of mounts into their own pass. This has allowed addressing the horrific performance of umount -l on a carefully crafted tree of mounts with locks held (0.06s vs 60s in my testing). What allowed this was not changing where umounts propagate to while propgating umounts. The next change fixes the case where the order of the mount whose umount are being progated visits a tree where the mounts are stacked upon each other in another order. This is weird but not hard to implement. The final change takes advantage of the unchanging mount propgation tree to skip parts of the mount propgation tree that have already been visited. Yielding a very nice speed up in the worst case. There remains one outstanding question about the semantics of umount -l that I am still discussiong with Ram Pai. In practice that area of the semantics was changed by 1064f874abc0 ("mnt: Tuck mounts under others instead of creating shadow/side mounts.") and no regressions have been reported. Still I intend to finish talking that out with him to ensure there is not something a more intense use of mount propagation in the future will not cause to become significant" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: mnt: Make propagate_umount less slow for overlapping mount propagation trees mnt: In propgate_umount handle visiting mounts in any order mnt: In umount propagation reparent in a separate pass commit c96e6dabfbdb241e32b3c588dbfa1ccb87d2c95a Merge: 8c27cb3 2969525 Author: Linus Torvalds Date: Wed Jul 5 16:57:08 2017 -0700 Merge tag 'gfs2-4.13.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 updates from Bob Peterson: "We've got eight GFS2 patches for this merge window: - Andreas Gruenbacher has four patches related to cleaning up the GFS2 inode evict process. This is about half of his patches designed to fix a long-standing GFS2 hang related to the inode shrinker: Shrinker calls gfs2 evict, evict calls DLM, DLM requires memory and blocks on the shrinker. These four patches have been well tested. His second set of patches are still being tested, so I plan to hold them until the next merge window, after we have more weeks of testing. The first patch eliminates the flush_delayed_work, which can block. - Andreas's second patch protects setting of gl_object for rgrps with a spin_lock to prevent proven races. - His third patch introduces a centralized mechanism for queueing glock work with better reference counting, to prevent more races. -His fourth patch retains a reference to inode glocks when an error occurs while creating an inode. This keeps the subsequent evict from needing to reacquire the glock, which might call into DLM and block in low memory conditions. - Arvind Yadav has a patch to add const to attribute_group structures. - I have a patch to detect directory entry inconsistencies and withdraw the file system if any are found. Better that than silent corruption. - I have a patch to remove a vestigial variable from glock structures, saving some slab space. - I have another patch to remove a vestigial variable from the GFS2 in-core superblock structure" * tag 'gfs2-4.13.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: GFS2: constify attribute_group structures. gfs2: gfs2_create_inode: Keep glock across iput gfs2: Clean up glock work enqueuing gfs2: Protect gl->gl_object by spin lock gfs2: Get rid of flush_delayed_work in gfs2_evict_inode GFS2: Eliminate vestigial sd_log_flush_wrapped GFS2: Remove gl_list from glock structure GFS2: Withdraw when directory entry inconsistencies are detected commit 8c27cb3566762613a23c080e3db7d0501af9a787 Merge: 7114f51 848c23b Author: Linus Torvalds Date: Wed Jul 5 16:41:23 2017 -0700 Merge branch 'for-4.13-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "The core updates improve error handling (mostly related to bios), with the usual incremental work on the GFP_NOFS (mis)use removal, refactoring or cleanups. Except the two top patches, all have been in for-next for an extensive amount of time. User visible changes: - statx support - quota override tunable - improved compression thresholds - obsoleted mount option alloc_start Core updates: - bio-related updates: - faster bio cloning - no allocation failures - preallocated flush bios - more kvzalloc use, memalloc_nofs protections, GFP_NOFS updates - prep work for btree_inode removal - dir-item validation - qgoup fixes and updates - cleanups: - removed unused struct members, unused code, refactoring - argument refactoring (fs_info/root, caller -> callee sink) - SEARCH_TREE ioctl docs" * 'for-4.13-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (115 commits) btrfs: Remove false alert when fiemap range is smaller than on-disk extent btrfs: Don't clear SGID when inheriting ACLs btrfs: fix integer overflow in calc_reclaim_items_nr btrfs: scrub: fix target device intialization while setting up scrub context btrfs: qgroup: Fix qgroup reserved space underflow by only freeing reserved ranges btrfs: qgroup: Introduce extent changeset for qgroup reserve functions btrfs: qgroup: Fix qgroup reserved space underflow caused by buffered write and quotas being enabled btrfs: qgroup: Return actually freed bytes for qgroup release or free data btrfs: qgroup: Cleanup btrfs_qgroup_prepare_account_extents function btrfs: qgroup: Add quick exit for non-fs extents Btrfs: rework delayed ref total_bytes_pinned accounting Btrfs: return old and new total ref mods when adding delayed refs Btrfs: always account pinned bytes when dropping a tree block ref Btrfs: update total_bytes_pinned when pinning down extents Btrfs: make BUG_ON() in add_pinned_bytes() an ASSERT() Btrfs: make add_pinned_bytes() take an s64 num_bytes instead of u64 btrfs: fix validation of XATTR_ITEM dir items btrfs: Verify dir_item in iterate_object_props btrfs: Check name_len before in btrfs_del_root_ref btrfs: Check name_len before reading btrfs_get_name ... commit 7114f51fcb979f167ab5f625ac74059dcb1afc28 Merge: ea3b25e e4448ed Author: Linus Torvalds Date: Wed Jul 5 16:05:24 2017 -0700 Merge branch 'work.memdup_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull memdup_user() conversions from Al Viro: "A fairly self-contained series - hunting down open-coded memdup_user() and memdup_user_nul() instances" * 'work.memdup_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: bpf: don't open-code memdup_user() kimage_file_prepare_segments(): don't open-code memdup_user() ethtool: don't open-code memdup_user() do_ip_setsockopt(): don't open-code memdup_user() do_ipv6_setsockopt(): don't open-code memdup_user() irda: don't open-code memdup_user() xfrm_user_policy(): don't open-code memdup_user() ima_write_policy(): don't open-code memdup_user_nul() sel_write_validatetrans(): don't open-code memdup_user_nul() commit 0f41074a65757b46acbdd4293f0de8a70b147406 Author: Jeff Layton Date: Wed Jul 5 15:26:50 2017 -0400 fs: remove call_fsync helper function Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Carlos Maiolino Signed-off-by: Jeff Layton fs/sync.c | 2 +- include/linux/fs.h | 6 ------ ipc/shm.c | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) commit 37e51a7640c275999ea0c35410c42e6d896ff7fa Author: Jeff Layton Date: Wed Jul 5 15:17:19 2017 -0400 mm: clean up error handling in write_one_page Don't try to check PageError since that's potentially racy and not necessarily going to be set after writepage errors out. Instead, check the mapping for an error after writepage returns. That should also help us detect errors that occurred if the VM tried to clean the page earlier due to memory pressure. Signed-off-by: Jeff Layton Reviewed-by: Jan Kara mm/page-writeback.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 11ab83190828cb7b2cbb26467f2eecf74f0214c3 Author: Dave Kleikamp Date: Wed Jul 5 15:26:49 2017 -0400 JFS: do not ignore return code from write_one_page() There are a couple places where jfs calls write_one_page() where clean recovery is not possible. In these cases, the file system should be marked dirty. To do this, it is now necessary to store the superblock in the metapage structure. Link: http://lkml.kernel.org/r/db45ab67-55c7-08ff-6776-f76b3bf5cbf5@oracle.com Signed-off-by: Dave Kleikamp Cc: Jeff Layton Cc: Ross Zwisler Cc: Jan Kara Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Jeff Layton fs/jfs/jfs_metapage.c | 7 +++++-- fs/jfs/jfs_metapage.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) commit 2b69c8280c8b29cdeb78b8e92e20ed35f730d319 Author: Jeff Layton Date: Wed Jul 5 15:26:48 2017 -0400 mm: drop "wait" parameter from write_one_page() The callers all set it to 1. Also, make it clear that this function will not set any sort of AS_* error, and that the caller must do so if necessary. No existing caller uses this on normal files, so none of them need it. Also, add __must_check here since, in general, the callers need to handle an error here in some fashion. Link: http://lkml.kernel.org/r/20170525103303.6524-1-jlayton@redhat.com Signed-off-by: Jeff Layton Reviewed-by: Ross Zwisler Reviewed-by: Jan Kara Reviewed-by: Matthew Wilcox Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton fs/exofs/dir.c | 2 +- fs/ext2/dir.c | 2 +- fs/jfs/jfs_metapage.c | 4 ++-- fs/minix/dir.c | 2 +- fs/sysv/dir.c | 2 +- fs/ufs/dir.c | 2 +- include/linux/mm.h | 2 +- mm/page-writeback.c | 14 +++++++------- 8 files changed, 15 insertions(+), 15 deletions(-) commit ea3b25e1320df4e575c323b6ab22a5fc79976fbe Merge: 89fbf53 725816e Author: Linus Torvalds Date: Wed Jul 5 15:34:35 2017 -0700 Merge branch 'timers-compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull timer-related user access updates from Al Viro: "Continuation of timers-related stuff (there had been more, but my parts of that series are already merged via timers/core). This is more of y2038 work by Deepa Dinamani, partially disrupted by the unification of native and compat timers-related syscalls" * 'timers-compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: posix_clocks: Use get_itimerspec64() and put_itimerspec64() timerfd: Use get_itimerspec64() and put_itimerspec64() nanosleep: Use get_timespec64() and put_timespec64() posix-timers: Use get_timespec64() and put_timespec64() posix-stubs: Conditionally include COMPAT_SYS_NI defines time: introduce {get,put}_itimerspec64 time: add get_timespec64 and put_timespec64 commit af65936a7a5bb8ec1d05b2a7670f84ca2014628d Author: Eric Biggers Date: Mon May 22 17:39:44 2017 -0700 ubifs: don't bother checking for encryption key in ->mmap() Since only an open file can be mmap'ed, and we only allow open()ing an encrypted file when its key is available, there is no need to check for the key again before permitting each mmap(). Signed-off-by: Eric Biggers Acked-by: Richard Weinberger Signed-off-by: Richard Weinberger fs/ubifs/file.c | 9 --------- 1 file changed, 9 deletions(-) commit 4afb9996a254a8ec33801f4b33992d45670164b2 Author: Eric Biggers Date: Tue Jun 13 16:47:55 2017 -0700 ubifs: require key for truncate(2) of encrypted file Currently, filesystems allow truncate(2) on an encrypted file without the encryption key. However, it's impossible to correctly handle the case where the size being truncated to is not a multiple of the filesystem block size, because that would require decrypting the final block, zeroing the part beyond i_size, then encrypting the block. As other modifications to encrypted file contents are prohibited without the key, just prohibit truncate(2) as well, making it fail with ENOKEY. Signed-off-by: Eric Biggers Signed-off-by: Richard Weinberger fs/ubifs/file.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1bcbfbfdeb0091036db7a32e1cd31b49cce5983a Author: Logan Gunthorpe Date: Wed May 24 15:42:15 2017 -0600 um: add dummy ioremap and iounmap functions The user mode architecture does not provide ioremap or iounmap, and because of this, the arch won't build when the functions are used in some core libraries. I have designs to use these functions in scatterlist.c where they'd almost certainly never be called on the um architecture but it does need to compile. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Signed-off-by: Richard Weinberger arch/um/include/asm/io.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 89fbf5384ddf666a595eb6562dc63fcbfeb8f6a5 Merge: 4be9513 a4058c5 Author: Linus Torvalds Date: Wed Jul 5 14:35:57 2017 -0700 Merge branch 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull read/write updates from Al Viro: "Christoph's fs/read_write.c series - consolidation and cleanups" * 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: nfsd: remove nfsd_vfs_read nfsd: use vfs_iter_read/write fs: implement vfs_iter_write using do_iter_write fs: implement vfs_iter_read using do_iter_read fs: move more code into do_iter_read/do_iter_write fs: remove __do_readv_writev fs: remove do_compat_readv_writev fs: remove do_readv_writev commit 0a987645672ebde7844a9c0732a5a25f3d4bb6c6 Author: Florian Fainelli Date: Thu May 25 11:36:26 2017 -0700 um: Allow building and running on older hosts Commit a78ff1112263 ("um: add extended processor state save/restore support") and b6024b21fec8 ("um: extend fpstate to _xstate to support YMM registers") forced the use of the x86 FP _xstate and PTRACE_GETREGSET/SETREGSET. On older hosts, we would neither be able to build UML nor run it anymore with these two commits applied because we don't have definitions for struct _xstate nor these two ptrace requests. We can determine at build time which fp context structure to check against, just like we can keep using the old i387 fp save/restore if PTRACE_GETRESET/SETREGSET are not defined. Fixes: a78ff1112263 ("um: add extended processor state save/restore support") Fixes: b6024b21fec8 ("um: extend fpstate to _xstate to support YMM registers") Signed-off-by: Florian Fainelli Signed-off-by: Richard Weinberger arch/x86/um/os-Linux/registers.c | 12 ++++++++---- arch/x86/um/user-offsets.c | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) commit f44f1e7da7c8e3f4575d5d61c4df978496903fcc Author: Florian Fainelli Date: Tue May 23 17:32:31 2017 -0700 um: Avoid longjmp/setjmp symbol clashes with libpthread.a Building a statically linked UML kernel on a Centos 6.9 host resulted in the following linking failure (GCC 4.4, glibc-2.12): /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libpthread.a(libpthread.o): In function `siglongjmp': (.text+0x8490): multiple definition of `longjmp' arch/x86/um/built-in.o:/local/users/fainelli/openwrt/trunk/build_dir/target-x86_64_musl/linux-uml/linux-4.4.69/arch/x86/um/setjmp_64.S:44: first defined here /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libpthread.a(libpthread.o): In function `sem_open': (.text+0x77cd): warning: the use of `mktemp' is dangerous, better use `mkstemp' collect2: ld returned 1 exit status make[4]: *** [vmlinux] Error 1 Adopt a solution similar to the one done for vmap where we define longjmp/setjmp to be kernel_longjmp/setjmp. In the process, make sure we do rename the functions in arch/x86/um/setjmp_*.S accordingly. Fixes: a7df4716d195 ("um: link with -lpthread") Signed-off-by: Florian Fainelli Signed-off-by: Richard Weinberger arch/um/Makefile | 4 ++++ arch/x86/um/setjmp_32.S | 16 ++++++++-------- arch/x86/um/setjmp_64.S | 16 ++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) commit 745a600cf1a6230f5e3910c340dcb312b718e114 Author: Masami Hiramatsu Date: Thu May 18 02:20:39 2017 +0900 um: console: Ignore console= option Ignore linux kernel's console= option at uml's console option handler. Since uml's con= option is only for setting up new console, and Linux kernel's console= option specify to which console kernel output its message, we can use both option for different purpose. Signed-off-by: Masami Hiramatsu Signed-off-by: Richard Weinberger arch/um/drivers/stdio_console.c | 3 +++ 1 file changed, 3 insertions(+) commit 0936d4f3d5a3d5daf453bc341f02ba4e68cfe40e Author: Masami Hiramatsu Date: Thu May 18 02:19:31 2017 +0900 um: Use os_warn to print out pre-boot warning/error messages Use os_warn() instead of printf/fprintf to print out pre-boot warning/error messages to stderr. Note that the help message and version message are kept to print out to stdout, because user explicitly specifies those options to get such information. Signed-off-by: Masami Hiramatsu Signed-off-by: Richard Weinberger arch/um/kernel/physmem.c | 10 +++++----- arch/um/kernel/um_arch.c | 8 +++++--- arch/um/kernel/umid.c | 4 ++-- arch/um/os-Linux/execvp.c | 2 +- arch/um/os-Linux/main.c | 6 +++--- arch/um/os-Linux/mem.c | 10 +++++----- arch/um/os-Linux/start_up.c | 2 +- arch/um/os-Linux/umid.c | 8 ++++---- 8 files changed, 26 insertions(+), 24 deletions(-) commit 721ccae88d04f7e9334fde4cbb3eecfaa70a31ac Author: Masami Hiramatsu Date: Thu May 18 02:18:22 2017 +0900 um: Add os_warn() for pre-boot warning/error messages Add os_warn() for printing out pre-boot warning/error messages in stderr. The messages via os_warn() are not suppressed by quiet option. Signed-off-by: Masami Hiramatsu Signed-off-by: Richard Weinberger arch/um/include/shared/os.h | 2 ++ arch/um/os-Linux/util.c | 9 +++++++++ 2 files changed, 11 insertions(+) commit d3878bb8003009d148cd787e1a2d74cff914a7b2 Author: Masami Hiramatsu Date: Thu May 18 02:17:14 2017 +0900 um: Use os_info for the messages on normal path Use os_info() for printing out the messages on the normal execution path. Signed-off-by: Masami Hiramatsu Signed-off-by: Richard Weinberger arch/um/kernel/um_arch.c | 8 ++++---- arch/um/os-Linux/main.c | 3 +-- arch/um/os-Linux/mem.c | 18 +++++++++--------- arch/um/os-Linux/start_up.c | 26 ++++++++++++++------------ 4 files changed, 28 insertions(+), 27 deletions(-) commit f7887ee11082b468517f31ae315b474eaa48b843 Author: Masami Hiramatsu Date: Thu May 18 02:16:05 2017 +0900 um: Add os_info() for pre-boot information messages Add os_info() for printing out pre-boot information level messages in stderr. The messages via os_info() are suppressed by "quiet" kernel command line. Signed-off-by: Masami Hiramatsu Signed-off-by: Richard Weinberger arch/um/include/shared/os.h | 2 ++ arch/um/os-Linux/util.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) commit e03c78ac2d7709b7556a9b8dd584e2969c6fce67 Author: Masami Hiramatsu Date: Thu May 18 02:14:57 2017 +0900 um: Use printk instead of printf in make_uml_dir Since this function will be called after printk buffer initialized, use printk as other functions do. Signed-off-by: Masami Hiramatsu Signed-off-by: Richard Weinberger arch/um/os-Linux/umid.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 078f3f6452c8be74fd406733f99f2cb0d9c50efc Author: Heiner Kallweit Date: Mon Jun 5 17:57:29 2017 +0200 rtc: ds1307: use regmap_update_bits where applicable After the switch to regmap we can now make use of regmap_update_bits to simplify read/modify/write ops. Signed-off-by: Heiner Kallweit Reviewed-by: Linus Walleij Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 82 ++++++++++++------------------------------------ 1 file changed, 20 insertions(+), 62 deletions(-) commit c4f07ecee22ec720936eb58e7c63b89a1e86bf32 Author: Brian Norris Date: Mon Jun 26 14:15:03 2017 -0700 rtc: brcmstb-waketimer: Add Broadcom STB wake-timer This adds support for the Broadcom STB wake-timer which is a timer in the chip's 27Mhz clock domain that offers the ability to wake the system (wake-up source) from suspend states (S2, S3, S5). It is supported using the rtc framework allowing us to configure alarms for system wake-up. Signed-off-by: Brian Norris Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 11 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-brcmstb-waketimer.c | 330 ++++++++++++++++++++++++++++++++++++ 3 files changed, 342 insertions(+) commit 8e959601996dc645f4ed7004482a1667c27deb39 Author: Niranjana Vishwanathapura Date: Fri Jun 30 13:14:46 2017 -0700 IB/core, opa_vnic, hfi1, mlx5: Properly free rdma_netdev IPOIB is calling free_rdma_netdev even though alloc_rdma_netdev has returned -EOPNOTSUPP. Move free_rdma_netdev from ib_device structure to rdma_netdev structure thus ensuring proper cleanup function is called for the rdma net device. Fix the following trace: ib0: Failed to modify QP to ERROR state BUG: unable to handle kernel paging request at 0000000000001d20 IP: hfi1_vnic_free_rn+0x26/0xb0 [hfi1] Call Trace: ipoib_remove_one+0xbe/0x160 [ib_ipoib] ib_unregister_device+0xd0/0x170 [ib_core] rvt_unregister_device+0x29/0x90 [rdmavt] hfi1_unregister_ib_device+0x1a/0x100 [hfi1] remove_one+0x4b/0x220 [hfi1] pci_device_remove+0x39/0xc0 device_release_driver_internal+0x141/0x200 driver_detach+0x3f/0x80 bus_remove_driver+0x55/0xd0 driver_unregister+0x2c/0x50 pci_unregister_driver+0x2a/0xa0 hfi1_mod_cleanup+0x10/0xf65 [hfi1] SyS_delete_module+0x171/0x250 do_syscall_64+0x67/0x150 entry_SYSCALL64_slow_path+0x25/0x25 Reviewed-by: Dennis Dalessandro Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/verbs.c | 1 - drivers/infiniband/hw/hfi1/vnic.h | 1 - drivers/infiniband/hw/hfi1/vnic_main.c | 19 ++++++++-------- drivers/infiniband/hw/mlx5/main.c | 27 ++++++++++++++--------- drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 +++---- drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 8 +++---- include/rdma/ib_verbs.h | 6 +++-- 7 files changed, 39 insertions(+), 31 deletions(-) commit 4be95131bf3bca97b6a7db9c6fb63db2cb94da06 Merge: 3bad2f1 92ebce5 Author: Linus Torvalds Date: Wed Jul 5 14:10:19 2017 -0700 Merge branch 'work.sys_wait' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull wait syscall updates from Al Viro: "Consolidating sys_wait* and compat counterparts. Gets rid of set_fs()/double-copy mess, simplifies the whole thing (lifting the copyouts to the syscalls means less headache in the part that does actual work - fewer failure exits, to start with), gets rid of the overhead of field-by-field __put_user()" * 'work.sys_wait' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: osf_wait4: switch to kernel_wait4() waitid(): switch copyout of siginfo to unsafe_put_user() wait_task_zombie: consolidate info logics kill wait_noreap_copyout() lift getrusage() from wait_noreap_copyout() waitid(2): leave copyout of siginfo to syscall itself kernel_wait4()/kernel_waitid(): delay copying status to userland wait4(2)/waitid(2): separate copying rusage to userland move compat wait4 and waitid next to native variants commit 3bad2f1c676581d01e7645eb03e9b27e28b0a92e Merge: b4b8cbf 8c6657c Author: Linus Torvalds Date: Wed Jul 5 13:13:32 2017 -0700 Merge branch 'work.misc-set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc user access cleanups from Al Viro: "The first pile is assorted getting rid of cargo-culted access_ok(), cargo-culted set_fs() and field-by-field copyouts. The same description applies to a lot of stuff in other branches - this is just the stuff that didn't fit into a more specific topical branch" * 'work.misc-set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Switch flock copyin/copyout primitives to copy_{from,to}_user() fs/fcntl: return -ESRCH in f_setown when pid/pgid can't be found fs/fcntl: f_setown, avoid undefined behaviour fs/fcntl: f_setown, allow returning error lpfc debugfs: get rid of pointless access_ok() adb: get rid of pointless access_ok() isdn: get rid of pointless access_ok() compat statfs: switch to copy_to_user() fs/locks: don't mess with the address limit in compat_fcntl64 nfsd_readlink(): switch to vfs_get_link() drbd: ->sendpage() never needed set_fs() fs/locks: pass kernel struct flock to fcntl_getlk/setlk fs: locks: Fix some troubles at kernel-doc comments commit 3908c9839b1077e677ef9e92d2bce7f224519c59 Author: Damien Le Moal Date: Mon Jul 3 15:44:58 2017 +0900 dm zoned: fix overflow when converting zone ID to sectors A zone ID is a 32 bits unsigned int which can overflow when doing the bit shifts in dmz_start_sect(). With a 256 MB zone size drive, the overflow happens for a zone ID >= 8192. Fix this by casting the zone ID to a sector_t before doing the bit shift. While at it, similarly fix dmz_start_block(). Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-zoned-metadata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b4b8cbf679c4866a523a35d1454884a31bd5d8dc Author: Linus Torvalds Date: Wed Jul 5 13:03:05 2017 -0700 Cavium CNN55XX: fix broken default Kconfig entry Every developer always thinks that _their_ code is so special and magical that it should be enabled by default. And most of them are completely and utterly wrong. That's definitely the case when you write a specialty driver for a very unsual "security processor". It does *not* get to mark itself as "default m". If you solve world hunger, and make a driver that cures people of cancer, by all means enable it by default. But afaik, the Cavium CNN55XX does neither. Signed-off-by: Linus Torvalds drivers/crypto/cavium/nitrox/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 227145eb38fbee9d88a570954b3de836c4280134 Author: Christoph Hellwig Date: Tue Jul 4 19:55:06 2017 -0700 parisc: ->mapping_error DMA_ERROR_CODE already went away in linux-next, but parisc unfortunately added a new instance of it without any review as far as I can tell. Move the two iommu drivers to report errors through ->mapping_error. Signed-off-by: Christoph Hellwig Signed-off-by: Helge Deller arch/parisc/include/asm/dma-mapping.h | 2 -- drivers/parisc/ccio-dma.c | 10 +++++++++- drivers/parisc/sba_iommu.c | 10 +++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) commit 5518b69b76680a4f2df96b1deca260059db0c2de Merge: 8ad06e5 0e72582 Author: Linus Torvalds Date: Wed Jul 5 12:31:59 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: "Reasonably busy this cycle, but perhaps not as busy as in the 4.12 merge window: 1) Several optimizations for UDP processing under high load from Paolo Abeni. 2) Support pacing internally in TCP when using the sch_fq packet scheduler for this is not practical. From Eric Dumazet. 3) Support mutliple filter chains per qdisc, from Jiri Pirko. 4) Move to 1ms TCP timestamp clock, from Eric Dumazet. 5) Add batch dequeueing to vhost_net, from Jason Wang. 6) Flesh out more completely SCTP checksum offload support, from Davide Caratti. 7) More plumbing of extended netlink ACKs, from David Ahern, Pablo Neira Ayuso, and Matthias Schiffer. 8) Add devlink support to nfp driver, from Simon Horman. 9) Add RTM_F_FIB_MATCH flag to RTM_GETROUTE queries, from Roopa Prabhu. 10) Add stack depth tracking to BPF verifier and use this information in the various eBPF JITs. From Alexei Starovoitov. 11) Support XDP on qed device VFs, from Yuval Mintz. 12) Introduce BPF PROG ID for better introspection of installed BPF programs. From Martin KaFai Lau. 13) Add bpf_set_hash helper for TC bpf programs, from Daniel Borkmann. 14) For loads, allow narrower accesses in bpf verifier checking, from Yonghong Song. 15) Support MIPS in the BPF selftests and samples infrastructure, the MIPS eBPF JIT will be merged in via the MIPS GIT tree. From David Daney. 16) Support kernel based TLS, from Dave Watson and others. 17) Remove completely DST garbage collection, from Wei Wang. 18) Allow installing TCP MD5 rules using prefixes, from Ivan Delalande. 19) Add XDP support to Intel i40e driver, from Björn Töpel 20) Add support for TC flower offload in nfp driver, from Simon Horman, Pieter Jansen van Vuuren, Benjamin LaHaise, Jakub Kicinski, and Bert van Leeuwen. 21) IPSEC offloading support in mlx5, from Ilan Tayari. 22) Add HW PTP support to macb driver, from Rafal Ozieblo. 23) Networking refcount_t conversions, From Elena Reshetova. 24) Add sock_ops support to BPF, from Lawrence Brako. This is useful for tuning the TCP sockopt settings of a group of applications, currently via CGROUPs" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1899 commits) net: phy: dp83867: add workaround for incorrect RX_CTRL pin strap dt-bindings: phy: dp83867: provide a workaround for incorrect RX_CTRL pin strap cxgb4: Support for get_ts_info ethtool method cxgb4: Add PTP Hardware Clock (PHC) support cxgb4: time stamping interface for PTP nfp: default to chained metadata prepend format nfp: remove legacy MAC address lookup nfp: improve order of interfaces in breakout mode net: macb: remove extraneous return when MACB_EXT_DESC is defined bpf: add missing break in for the TCP_BPF_SNDCWND_CLAMP case bpf: fix return in load_bpf_file mpls: fix rtm policy in mpls_getroute net, ax25: convert ax25_cb.refcount from atomic_t to refcount_t net, ax25: convert ax25_route.refcount from atomic_t to refcount_t net, ax25: convert ax25_uid_assoc.refcount from atomic_t to refcount_t net, sctp: convert sctp_ep_common.refcnt from atomic_t to refcount_t net, sctp: convert sctp_transport.refcnt from atomic_t to refcount_t net, sctp: convert sctp_chunk.refcnt from atomic_t to refcount_t net, sctp: convert sctp_datamsg.refcnt from atomic_t to refcount_t net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t ... commit 8ad06e56dcbc1984ef0ff8f6e3c19982c5809f73 Merge: 59005b0 035f901 Author: Linus Torvalds Date: Wed Jul 5 12:22:23 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "Algorithms: - add private key generation to ecdh Drivers: - add generic gcm(aes) to aesni-intel - add SafeXcel EIP197 crypto engine driver - add ecb(aes), cfb(aes) and ecb(des3_ede) to cavium - add support for CNN55XX adapters in cavium - add ctr mode to chcr - add support for gcm(aes) to omap" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (140 commits) crypto: testmgr - Reenable sha1/aes in FIPS mode crypto: ccp - Release locks before returning crypto: cavium/nitrox - dma_mapping_error() returns bool crypto: doc - fix typo in docs Documentation/bindings: Document the SafeXel cryptographic engine driver crypto: caam - fix gfp allocation flags (part II) crypto: caam - fix gfp allocation flags (part I) crypto: drbg - Fixes panic in wait_for_completion call crypto: caam - make of_device_ids const. crypto: vmx - remove unnecessary check crypto: n2 - make of_device_ids const crypto: inside-secure - use the base_end pointer in ring rollback crypto: inside-secure - increase the batch size crypto: inside-secure - only dequeue when needed crypto: inside-secure - get the backlog before dequeueing the request crypto: inside-secure - stop requeueing failed requests crypto: inside-secure - use one queue per hw ring crypto: inside-secure - update the context and request later crypto: inside-secure - align the cipher and hash send functions crypto: inside-secure - optimize DSE bufferability control ... commit 2192b0baea395274ffcd38ec70e284389e3c243d Author: Brian Foster Date: Wed Jul 5 12:07:52 2017 -0700 xfs: fix contiguous dquot chunk iteration livelock The patch below updated xfs_dq_get_next_id() to use the XFS iext lookup helpers to locate the next quota id rather than to seek for data in the quota file. The updated code fails to correctly handle the case where the quota inode might have contiguous chunks part of the same extent. In this case, the start block offset is calculated based on the next expected id but the extent lookup returns the same start offset as for the previous chunk. This causes the returned id to go backwards and livelocks the quota iteration. This problem is reproduced intermittently by generic/232. To handle this case, check whether the startoff from the extent lookup is behind the startoff calculated from the next quota id. If so, bump up got.br_startoff to the specific file offset that is expected to hold the next dquot chunk. Fixes: bda250dbaf39 ("xfs: rewrite xfs_dq_get_next_id using xfs_iext_lookup_extent") Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_dquot.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 59005b0c59a164101b0273e4bda212c809dc2246 Merge: 2cc7b4c d1185a8 Author: Linus Torvalds Date: Wed Jul 5 11:46:59 2017 -0700 Merge tag 'gcc-plugins-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull GCC plugin updates from Kees Cook: "The big part is the randstruct plugin infrastructure. This is the first of two expected pull requests for randstruct since there are dependencies in other trees that would be easier to merge once those have landed. Notably, the IPC allocation refactoring in -mm, and many trivial merge conflicts across several trees when applying the __randomize_layout annotation. As a result, it seemed like I should send this now since it is relatively self-contained, and once the rest of the trees have landed, send the annotation patches. I'm expecting the final phase of randstruct (automatic struct selection) will land for v4.14, but if its other tree dependencies actually make it for v4.13, I can send that merge request too. Summary: - typo fix in Kconfig (Jean Delvare) - randstruct infrastructure" * tag 'gcc-plugins-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: ARM: Prepare for randomized task_struct randstruct: Whitelist NIU struct page overloading randstruct: Whitelist big_key path struct overloading randstruct: Whitelist UNIXCB cast randstruct: Whitelist struct security_hook_heads cast gcc-plugins: Add the randstruct plugin Fix English in description of GCC_PLUGIN_STRUCTLEAK compiler: Add __designated_init annotation gcc-plugins: Detail c-common.h location for GCC 4.6 commit 2cc7b4ca7d01a844651d34b79ff8d778c7e9a875 Merge: e24dd9e 0752e40 Author: Linus Torvalds Date: Wed Jul 5 11:43:47 2017 -0700 Merge tag 'pstore-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: "Various fixes and tweaks for the pstore subsystem. Highlights: - use memdup_user() instead of open-coded copies (Geliang Tang) - fix record memory leak during initialization (Douglas Anderson) - avoid confused compressed record warning (Ankit Kumar) - prepopulate record timestamp and remove redundant logic from backends" * tag 'pstore-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: powerpc/nvram: use memdup_user pstore: use memdup_user pstore: Fix format string to use %u for record id pstore: Populate pstore record->time field pstore: Create common record initializer efi-pstore: Refactor erase routine pstore: Avoid potential infinite loop pstore: Fix leaked pstore_record in pstore_get_backend_records() pstore: Don't warn if data is uncompressed and type is not PSTORE_TYPE_DMESG commit 5e8f42aa49d9c8686f5ca56a1734767c476c62d5 Author: Andy Shevchenko Date: Tue Jul 4 18:34:39 2017 +0300 platform/x86: ideapad-laptop: Fix indentation in DMI table There are couple of places where 8 spaces are used instead of tabs. Replace former by latter. No functional change intended. Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 710c059c248a24609051f5a3dd1d8468cdc675b0 Author: Yang Jiaxun Date: Tue Jul 4 14:39:19 2017 +0000 platform/x86: ideapad-laptop: Add several models to no_hw_rfkill Some Lenovo ideapad models do not have hardware rfkill switches, but trying to read the rfkill switches through the ideapad-laptop module. It caused to always reported blocking breaking wifi. Fix it by adding those models to no_hw_rfkill_list. Signed-off-by: Yang Jiaxun Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 70 +++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 0df4b805cbccbe3f8378f49c415adb2fcffdd3dc Author: Sven Eckelmann Date: Sat Jul 1 08:20:18 2017 +0200 platform/x86: ideapad-laptop: Add IdeaPad V510-15IKB to no_hw_rfkill Like other Lenovo models the IdeaPad V510-15IKB does not have an hw rfkill switch. This results in hard-blocked radios after boot, resulting in always blocked radios rendering them unusable. Add the IdeaPad V510-15IKB to the no_hw_rfkill DMI list and allows using the built-in radios. Signed-off-by: Sven Eckelmann Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e24dd9ee5399747b71c1d982a484fc7601795f31 Merge: 7391786 c4758fa Author: Linus Torvalds Date: Wed Jul 5 11:26:35 2017 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security layer updates from James Morris: - a major update for AppArmor. From JJ: * several bug fixes and cleanups * the patch to add symlink support to securityfs that was floated on the list earlier and the apparmorfs changes that make use of securityfs symlinks * it introduces the domain labeling base code that Ubuntu has been carrying for several years, with several cleanups applied. And it converts the current mediation over to using the domain labeling base, which brings domain stacking support with it. This finally will bring the base upstream code in line with Ubuntu and provide a base to upstream the new feature work that Ubuntu carries. * This does _not_ contain any of the newer apparmor mediation features/controls (mount, signals, network, keys, ...) that Ubuntu is currently carrying, all of which will be RFC'd on top of this. - Notable also is the Infiniband work in SELinux, and the new file:map permission. From Paul: "While we're down to 21 patches for v4.13 (it was 31 for v4.12), the diffstat jumps up tremendously with over 2k of line changes. Almost all of these changes are the SELinux/IB work done by Daniel Jurgens; some other noteworthy changes include a NFS v4.2 labeling fix, a new file:map permission, and reporting of policy capabilities on policy load" There's also now genfscon labeling support for tracefs, which was lost in v4.1 with the separation from debugfs. - Smack incorporates a safer socket check in file_receive, and adds a cap_capable call in privilege check. - TPM as usual has a bunch of fixes and enhancements. - Multiple calls to security_add_hooks() can now be made for the same LSM, to allow LSMs to have hook declarations across multiple files. - IMA now supports different "ima_appraise=" modes (eg. log, fix) from the boot command line. * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (126 commits) apparmor: put back designators in struct initialisers seccomp: Switch from atomic_t to recount_t seccomp: Adjust selftests to avoid double-join seccomp: Clean up core dump logic IMA: update IMA policy documentation to include pcr= option ima: Log the same audit cause whenever a file has no signature ima: Simplify policy_func_show. integrity: Small code improvements ima: fix get_binary_runtime_size() ima: use ima_parse_buf() to parse template data ima: use ima_parse_buf() to parse measurements headers ima: introduce ima_parse_buf() ima: Add cgroups2 to the defaults list ima: use memdup_user_nul ima: fix up #endif comments IMA: Correct Kconfig dependencies for hash selection ima: define is_ima_appraise_enabled() ima: define Kconfig IMA_APPRAISE_BOOTPARAM option ima: define a set of appraisal rules requiring file signatures ima: extend the "ima_policy" boot command line to support multiple policies ... commit bc8c47abd486014aae543ecdea59554f098df9df Author: Rajneesh Bhardwaj Date: Fri Jun 23 22:22:35 2017 +0530 platform/x86: intel_telemetry: Add debugfs entry for S0ix residency This adds a debugfs consumer for the exported kernel API intel_pmc_read_s0ix_residency. This debugfs entry reads S0ix residency directly from the PMC hardware counters. TEST: - echo freeze > /sys/power/state - Wake the system, read the S0ix residency i.e. cat /sys/kernel/debug/telemetry/s0ix_residency_usec Signed-off-by: Shanth Murthy Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_telemetry_debugfs.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 7a3a51ab9467fb634dcfcd18eade61f418f540dd Author: Dan Carpenter Date: Fri Jun 30 10:52:18 2017 +0300 platform/x86: intel_telemetry_debugfs: fix some error codes in init There are bunch of "goto out;" paths where we don't set the error code. Signed-off-by: Dan Carpenter Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_telemetry_debugfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 74a1eb565c3f4ca55af2db8dc42c31ae311a79c0 Author: Priyalee Kushwaha Date: Sat Jun 3 10:21:24 2017 -0700 platform/x86: intel_telemetry_debugfs: fix oops when load/unload module This fixes an oops found while testing load/unload of the intel_telemetry_debugfs module. module_init uses register_pm_notifier for PM callbacks, but unregister_pm_notifier was missing from module_exit. [ 97.481860] BUG: unable to handle kernel paging request at ffffffffa006f010 [ 97.489742] IP: blocking_notifier_chain_register+0x3a/0xa0 [ 97.495898] PGD 2e0a067 [ 97.495899] PUD 2e0b063 [ 97.498737] PMD 179e29067 [ 97.501573] PTE 0 [ 97.508423] Oops: 0000 1 PREEMPT SMP [ 97.512724] Modules linked in: intel_telemetry_debugfs intel_rapl gpio_keys dwc3 udc_core intel_telemetry_pltdrv intel_punit_ipc intel_telemetry_core rtc_cmos efivars x86_pkg_temp_thermal iwlwifi snd_hda_codec_hdmi soc_button_array btusb cfg80211 btrtl mei_me hci_uart btbcm mei btintel i915 bluetooth intel_pmc_ipc snd_hda_intel spi_pxa2xx_platform snd_hda_codec dwc3_pci snd_hda_core tpm_tis tpm_tis_core tpm efivarfs [ 97.558453] CPU: 0 PID: 889 Comm: modprobe Not tainted 4.11.0-rc6-intel-dev-bkc #1 [ 97.566950] Hardware name: Intel Corp. Joule DVT3/SDS, BIOS GTPP181A.X64.0143.B30.1701132137 01/13/2017 [ 97.577518] task: ffff8801793a21c0 task.stack: ffff8801793f0000 [ 97.584162] RIP: 0010:blocking_notifier_chain_register+0x3a/0xa0 [ 97.590903] RSP: 0018:ffff8801793f3c58 EFLAGS: 00010286 [ 97.596802] RAX: ffffffffa006f000 RBX: ffffffff81e3ea20 RCX: 0000000000000000 [ 97.604812] RDX: ffff880179eaf210 RSI: ffffffffa0131000 RDI: ffffffff81e3ea20 [ 97.612821] RBP: ffff8801793f3c68 R08: 0000000000000006 R09: 000000000000005c [ 97.620847] R10: 0000000000000000 R11: 0000000000000006 R12: ffffffffa0131000 [ 97.628855] R13: 0000000000000000 R14: ffff880176e35f48 R15: ffff8801793f3ea8 [ 97.636865] FS: 00007f7eeba07700(0000) GS:ffff88017fc00000(0000) knlGS:0000000000000000 [ 97.645948] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 97.652423] CR2: ffffffffa006f010 CR3: 00000001775ef000 CR4: 00000000003406f0 [ 97.660423] Call Trace: [ 97.663166] ? 0xffffffffa0031000 [ 97.666885] register_pm_notifier+0x18/0x20 [ 97.671581] telemetry_debugfs_init+0x92/0x1000 Signed-off-by: Priyalee Kushwaha Signed-off-by: Andy Shevchenko Signed-off-by: Darren Hart (VMware) drivers/platform/x86/intel_telemetry_debugfs.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 7391786a64dcfe9c609a1f8e2204c1abf42ded23 Merge: eed1fc8 cd33f5f Author: Linus Torvalds Date: Wed Jul 5 11:24:05 2017 -0700 Merge branch 'stable-4.13' of git://git.infradead.org/users/pcmoore/audit Pull audit updates from Paul Moore: "Things are relatively quiet on the audit front for v4.13, just five patches for a total diffstat of 102 lines. There are two patches from Richard to consistently record the POSIX capabilities and add the ambient capability information as well. I also chipped in two patches to fix a race condition with the auditd tracking code and ensure we don't skip sending any records to the audit multicast group. Finally a single style fix that I accepted because I must have been in a good mood that day. Everything passes our test suite, and should be relatively harmless, please merge for v4.13" * 'stable-4.13' of git://git.infradead.org/users/pcmoore/audit: audit: make sure we never skip the multicast broadcast audit: fix a race condition with the auditd tracking code audit: style fix audit: add ambient capabilities to CAPSET and BPRM_FCAPS records audit: unswing cap_* fields in PATH records commit 8a05aa4ce3bf767b7bd72851da89c23d084d1ecb Author: Ming Lei Date: Wed Jul 5 12:14:27 2017 +0800 mtip32xx: avoid to read HOST_CAP from HW in .queue_rq() It is observed reading the register from HW takes a bit long, for example in my box, the following difference of 'perf report --no-children fio ...' can be seen when running I/O: 1) V4.12 without patch + 9.28% fio [mtip32xx] [k] mtip_irq_handler + 8.48% fio [mtip32xx] [k] mtip_init_cmd_header 2) V4.12 with the following patch + 9.14% fio [mtip32xx] [k] mtip_irq_handler ...... + 1.14% fio [mtip32xx] [k] mtip_init_cmd_header IOPS can be increased by ~5% with this patch too. Fixes: a4e84aae8139(mtip32xx: use runtime tag to initialize command header) Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 4 ++-- drivers/block/mtip32xx/mtip32xx.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit eed1fc87795362fd868bdc960d7b96d25f81eae3 Merge: 1996454 a5707ee Author: Linus Torvalds Date: Wed Jul 5 11:11:26 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - Store printk() messages into the main log buffer directly even in NMI when the lock is available. It is the best effort to print even large chunk of text. It is handy, for example, when all ftrace messages are printed during the system panic in NMI. - Add missing annotations to calm down compiler warnings * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: printk: add __printf attributes to internal functions printk: Use the main logbuf in NMI when logbuf_lock is available commit 593f546eee2fdbe055380ee82de568c0a1775551 Author: Rex Zhu Date: Tue Jul 4 16:35:59 2017 +0800 drm/amd/powerplay: fix bug fail to remove sysfs when rmmod amdgpu. when hw_fini, pp will disable dpm.so remove sysfs before disable dpm. Signed-off-by: Rex Zhu Tested-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 65a4433aebe36c8c6abeb69b99ef00274b971c6c Author: Jeffrey Hugo Date: Wed Jun 7 13:18:57 2017 -0600 sched/fair: Fix load_balance() affinity redo path If load_balance() fails to migrate any tasks because all tasks were affined, load_balance() removes the source CPU from consideration and attempts to redo and balance among the new subset of CPUs. There is a bug in this code path where the algorithm considers all active CPUs in the system (minus the source that was just masked out). This is not valid for two reasons: some active CPUs may not be in the current scheduling domain and one of the active CPUs is dst_cpu. These CPUs should not be considered, as we cannot pull load from them. Instead of failing out of load_balance(), we may end up redoing the search with no valid CPUs and incorrectly concluding the domain is balanced. Additionally, if the group_imbalance flag was just set, it may also be incorrectly unset, thus the flag will not be seen by other CPUs in future load_balance() runs as that algorithm intends. Fix the check by removing CPUs not in the current domain and the dst_cpu from considertation, thus limiting the evaluation to valid remaining CPUs from which load might be migrated. Co-authored-by: Austin Christ Co-authored-by: Dietmar Eggemann Tested-by: Tyler Baicar Signed-off-by: Jeffrey Hugo Acked-by: Peter Zijlstra Cc: Austin Christ Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Timur Tabi Link: http://lkml.kernel.org/r/1496863138-11322-2-git-send-email-jhugo@codeaurora.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 86d35afb8e07d99f8bfba4eadf93d918b4741f66 Author: Ingo Molnar Date: Wed Jul 5 10:14:38 2017 +0200 MAINTAINERS: Add Frederic Weisbecker as nohz/dyntics maintainer Frederic has been improving and maintaining the nohz/dynticks kernel features for years, so make his de facto maintainership official. Acked-by: Thomas Gleixner Acked-by: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar MAINTAINERS | 14 ++++++++++++-- include/linux/sched/nohz.h | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) commit 69d71879d2cf67a381055f698a1d7def00dc4ed7 Author: Steven Rostedt (VMware) Date: Wed Jul 5 09:45:43 2017 -0400 ftrace: Test for NULL iter->tr in regex for stack_trace_filter changes As writing into stack_trace_filter, the iter-tr is not set and is NULL. Check if it is NULL before dereferencing it in ftrace_regex_release(). Fixes: 8c08f0d5c6fb ("ftrace: Have cached module filters be an active filter") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4dce17b26b6ac3bf29aa0eae1d28e14debe37747 Merge: 4ec7846 0f17976 Author: Steven Rostedt (VMware) Date: Wed Jul 5 09:51:24 2017 -0400 Merge commit '0f17976568b3f72e676450af0c0db6f8752253d6' into trace/ftrace/core Need to get the changes from 0f17976568b3 ("ftrace: Fix regression with module command in stack_trace_filter") as it is required to fix some other changes with stack_trace_filter and the new development code. Signed-off-by: Steven Rostedt (VMware) commit a4485b545e2fad4d65732cb7c60089bf4246de5c Merge: 5e1743c b8ba92b Author: Rob Herring Date: Wed Jul 5 08:31:52 2017 -0500 Merge branch 'dt/property-move' into dt/next commit b8ba92b101e82b82a5359dc2dfbd772eb46780d4 Merge: d20dc14 ac1e695 Author: Rob Herring Date: Wed Jul 5 08:24:05 2017 -0500 Merge branch 'topic/of-graph-base' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into dt/property-move OF graph changes for ALSA conflict with the move of graph functions into property.c. commit b82ce24426a4071da9529d726057e4e642948667 Author: Herbert Xu Date: Tue Jul 4 12:21:12 2017 +0800 crypto: sha1-ssse3 - Disable avx2 It has been reported that sha1-avx2 can cause page faults by reading beyond the end of the input. This patch disables it until it can be fixed. Cc: Fixes: 7c1da8d0d046 ("crypto: sha - SHA1 transform x86_64 AVX2") Reported-by: Jan Stancek Signed-off-by: Herbert Xu arch/x86/crypto/sha1_ssse3_glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29695254ec51506d97b2a90ac27baabb438c70dd Author: Arvind Yadav Date: Fri Jun 30 08:33:54 2017 -0500 GFS2: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 5259 1344 8 6611 19d3 fs/gfs2/sys.o File size After adding 'const': text data bss dec hex filename 5371 1216 8 6595 19c3 fs/gfs2/sys.o Signed-off-by: Arvind Yadav Signed-off-by: Bob Peterson fs/gfs2/sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0b62e21b71bbe6d1015fe3e891cd9f50d04e660 Author: Andreas Gruenbacher Date: Fri Jun 30 08:16:46 2017 -0500 gfs2: gfs2_create_inode: Keep glock across iput On failure, keep the inode glock across the final iput of the new inode so that gfs2_evict_inode doesn't have to re-acquire the glock. That way, gfs2_evict_inode won't need to revalidate the block type. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/inode.c | 4 +++- fs/gfs2/super.c | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) commit 6b0c7440bcb4b7e5a64836132caf56bf19a33f6e Author: Andreas Gruenbacher Date: Fri Jun 30 08:10:01 2017 -0500 gfs2: Clean up glock work enqueuing This patch adds a standardized queueing mechanism for glock work with spin_lock protection to prevent races. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/glock.c | 124 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 74 insertions(+), 50 deletions(-) commit 6f6597baae206c544c49ad7f1129d5adc1e9019d Author: Andreas Gruenbacher Date: Fri Jun 30 07:55:08 2017 -0500 gfs2: Protect gl->gl_object by spin lock Put all remaining accesses to gl->gl_object under the gl->gl_lockref.lock spinlock to prevent races. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/bmap.c | 2 +- fs/gfs2/dir.c | 4 ++-- fs/gfs2/glops.c | 17 ++++++++++++++--- fs/gfs2/incore.h | 2 ++ fs/gfs2/inode.c | 8 ++++---- fs/gfs2/lops.c | 2 +- fs/gfs2/rgrp.c | 6 ++---- fs/gfs2/super.c | 11 +++++++---- fs/gfs2/xattr.c | 4 ++-- 9 files changed, 35 insertions(+), 21 deletions(-) commit 4fd1a5795214bc6405f14691c1344ae8c3f17215 Author: Andreas Gruenbacher Date: Fri Jun 30 07:47:15 2017 -0500 gfs2: Get rid of flush_delayed_work in gfs2_evict_inode So far, gfs2_evict_inode clears gl->gl_object and then flushes the glock work queue to make sure that inode glops which dereference gl->gl_object have finished running before the inode is destroyed. However, flushing the work queue may do more work than needed, and in particular, it may call into DLM, which we want to avoid here. Use a bit lock (GIF_GLOP_PENDING) to synchronize between the inode glops and gfs2_evict_inode instead to get rid of the flushing. In addition, flush the work queues of existing glocks before reusing them for new inodes to get those glocks into a known state: the glock state engine currently doesn't handle glock re-appropriation correctly. (We may be able to fix the glock state engine instead later.) Based on a patch by Steven Whitehouse . Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/glock.h | 7 +++++++ fs/gfs2/glops.c | 39 ++++++++++++++++++++++++++++++++------- fs/gfs2/incore.h | 1 + fs/gfs2/inode.c | 7 ++++--- fs/gfs2/super.c | 4 ++-- 5 files changed, 46 insertions(+), 12 deletions(-) commit f3235d32075137e277a2e4ea0d7cef2b59480f4a Author: Maciej W. Rozycki Date: Tue May 23 13:38:19 2017 +0100 MIPS: MIPS16e2: Subdecode extended LWSP/SWSP instructions Implement extended LWSP/SWSP instruction subdecoding for the purpose of unaligned GP-relative memory access emulation. With the introduction of the MIPS16e2 ASE[1] the previously must-be-zero 3-bit field at bits 7..5 of the extended encodings of the instructions selected with the LWSP and SWSP major opcodes has become a `sel' field, acting as an opcode extension for additional operations. In both cases the `sel' value of 0 has retained the original operation, that is: LW rx, offset(sp) and: SW rx, offset(sp) for LWSP and SWSP respectively. In hardware predating the MIPS16e2 ASE other values may or may not have been decoded, architecturally yielding unpredictable results, and in our unaligned memory access emulation we have treated the 3-bit field as a don't-care, that is effectively making all the possible encodings of the field alias to the architecturally defined encoding of 0. For the non-zero values of the `sel' field the MIPS16e2 ASE has in particular defined these GP-relative operations: LW rx, offset(gp) # sel = 1 LH rx, offset(gp) # sel = 2 LHU rx, offset(gp) # sel = 4 and SW rx, offset(gp) # sel = 1 SH rx, offset(gp) # sel = 2 for LWSP and SWSP respectively, which will trap with an Address Error exception if the effective address calculated is not naturally-aligned for the operation requested. These operations have been selected for unaligned access emulation, for consistency with the corresponding regular MIPS and microMIPS operations. For other non-zero values of the `sel' field the MIPS16e2 ASE has defined further operations, which however either never trap with an Address Error exception, such as LWL or GP-relative SB, or are not supposed to be emulated, such as LL or SC. These operations have been selected to exclude from unaligned access emulation, should an Address Error exception ever happen with them. Subdecode the `sel' field in unaligned access emulation then for the extended encodings of the instructions selected with the LWSP and SWSP major opcodes, whenever support for the MIPS16e2 ASE has been detected in hardware, and either emulate the operation requested or send SIGBUS to the originating process, according to the selection described above. For hardware implementing the MIPS16 ASE, however lacking MIPS16e2 ASE support retain the original interpretation of the `sel' field. The effects of this change are illustrated with the following user program: $ cat mips16e2-test.c #include #include int main(void) { int64_t scratch[16] = { 0 }; int32_t *tmp0, *tmp1, *tmp2; int i; scratch[0] = 0xc8c7c6c5c4c3c2c1; scratch[1] = 0xd0cfcecdcccbcac9; asm volatile( "move %0, $sp\n\t" "move %1, $gp\n\t" "move $sp, %4\n\t" "addiu %2, %4, 8\n\t" "move $gp, %2\n\t" "lw %2, 2($sp)\n\t" "sw %2, 16(%4)\n\t" "lw %2, 2($gp)\n\t" "sw %2, 24(%4)\n\t" "lw %2, 1($sp)\n\t" "sw %2, 32(%4)\n\t" "lh %2, 1($gp)\n\t" "sw %2, 40(%4)\n\t" "lw %2, 3($sp)\n\t" "sw %2, 48(%4)\n\t" "lhu %2, 3($gp)\n\t" "sw %2, 56(%4)\n\t" "lw %2, 0(%4)\n\t" "sw %2, 66($sp)\n\t" "lw %2, 8(%4)\n\t" "sw %2, 82($gp)\n\t" "lw %2, 0(%4)\n\t" "sw %2, 97($sp)\n\t" "lw %2, 8(%4)\n\t" "sh %2, 113($gp)\n\t" "move $gp, %1\n\t" "move $sp, %0" : "=&d" (tmp0), "=&d" (tmp1), "=&d" (tmp2), "=m" (scratch) : "d" (scratch)); for (i = 0; i < sizeof(scratch) / sizeof(*scratch); i += 2) printf("%016" PRIx64 "\t%016" PRIx64 "\n", scratch[i], scratch[i + 1]); return 0; } $ to be compiled with: $ gcc -mips16 -mips32r2 -Wa,-mmips16e2 -o mips16e2-test mips16e2-test.c $ With 74Kf hardware, which does not implement the MIPS16e2 ASE, this program produces the following output: $ ./mips16e2-test c8c7c6c5c4c3c2c1 d0cfcecdcccbcac9 00000000c6c5c4c3 00000000c6c5c4c3 00000000c5c4c3c2 00000000c5c4c3c2 00000000c7c6c5c4 00000000c7c6c5c4 0000c4c3c2c10000 0000000000000000 0000cccbcac90000 0000000000000000 000000c4c3c2c100 0000000000000000 000000cccbcac900 0000000000000000 $ regardless of whether the change has been applied or not. With the change not applied and interAptive MR2 hardware[2], which does implement the MIPS16e2 ASE, it produces the following output: $ ./mips16e2-test c8c7c6c5c4c3c2c1 d0cfcecdcccbcac9 00000000c6c5c4c3 00000000cecdcccb 00000000c5c4c3c2 00000000cdcccbca 00000000c7c6c5c4 00000000cfcecdcc 0000c4c3c2c10000 0000000000000000 0000000000000000 0000cccbcac90000 000000c4c3c2c100 0000000000000000 0000000000000000 000000cccbcac900 $ which shows that for GP-relative operations the correct trapping address calculated from $gp has been obtained from the CP0 BadVAddr register and so has data from the source operand, however masking and extension has not been applied for halfword operations. With the change applied and interAptive MR2 hardware the program produces the following output: $ ./mips16e2-test c8c7c6c5c4c3c2c1 d0cfcecdcccbcac9 00000000c6c5c4c3 00000000cecdcccb 00000000c5c4c3c2 00000000ffffcbca 00000000c7c6c5c4 000000000000cdcc 0000c4c3c2c10000 0000000000000000 0000000000000000 0000cccbcac90000 000000c4c3c2c100 0000000000000000 0000000000000000 0000000000cac900 $ as expected. References: [1] "MIPS32 Architecture for Programmers: MIPS16e2 Application-Specific Extension Technical Reference Manual", Imagination Technologies Ltd., Document Number: MD01172, Revision 01.00, April 26, 2016 [2] "MIPS32 interAptiv Multiprocessing System Software User's Manual", Imagination Technologies Ltd., Document Number: MD00904, Revision 02.01, June 15, 2016, Chapter 24 "MIPS16e Application-Specific Extension to the MIPS32 Instruction Set", pp. 871-883 Signed-off-by: Maciej W. Rozycki Reviewed-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16095/ Signed-off-by: Ralf Baechle arch/mips/kernel/unaligned.c | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) commit 8d1630f13754f1435d3ea7078829121c52f38d15 Author: Maciej W. Rozycki Date: Tue May 23 13:37:05 2017 +0100 MIPS: MIPS16e2: Identify ASE presence Identify the presence of the MIPS16e2 ASE as per the architecture specification[1], by checking for CP0 Config5.CA2 bit being 1[2]. References: [1] "MIPS32 Architecture for Programmers: MIPS16e2 Application-Specific Extension Technical Reference Manual", Imagination Technologies Ltd., Document Number: MD01172, Revision 01.00, April 26, 2016, Section 1.2 "Software Detection of the ASE", p. 5 [2] "MIPS32 interAptiv Multiprocessing System Software User's Manual", Imagination Technologies Ltd., Document Number: MD00904, Revision 02.01, June 15, 2016, Section 2.2.1.6 "Device Configuration 5 -- Config5 (CP0 Register 16, Select 5)", pp. 71-72 Signed-off-by: Maciej W. Rozycki Reviewed-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16094/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-features.h | 3 +++ arch/mips/include/asm/cpu.h | 1 + arch/mips/include/asm/mipsregs.h | 1 + arch/mips/kernel/cpu-probe.c | 2 ++ 4 files changed, 7 insertions(+) commit a0c4acd2c220376b4e9690e75782d0c0afdaab9f Author: Kirill Tkhai Date: Fri Jun 16 16:44:34 2017 +0300 locking/rwsem-spinlock: Fix EINTR branch in __down_write_common() If a writer could been woken up, the above branch if (sem->count == 0) break; would have moved us to taking the sem. So, it's not the time to wake a writer now, and only readers are allowed now. Thus, 0 must be passed to __rwsem_do_wake(). Next, __rwsem_do_wake() wakes readers unconditionally. But we mustn't do that if the sem is owned by writer in the moment. Otherwise, writer and reader own the sem the same time, which leads to memory corruption in callers. rwsem-xadd.c does not need that, as: 1) the similar check is made lockless there, 2) in __rwsem_mark_wake::try_reader_grant we test, that sem is not owned by writer. Signed-off-by: Kirill Tkhai Acked-by: Peter Zijlstra Cc: Cc: Linus Torvalds Cc: Niklas Cassel Cc: Peter Zijlstra (Intel) Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 17fcbd590d0c "locking/rwsem: Fix down_write_killable() for CONFIG_RWSEM_GENERIC_SPINLOCK=y" Link: http://lkml.kernel.org/r/149762063282.19811.9129615532201147826.stgit@localhost.localdomain Signed-off-by: Ingo Molnar kernel/locking/rwsem-spinlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98becb781e3e27d74efe5f3653b948d39f694cfb Merge: 9e25ebf cd83935 Author: Russell King Date: Wed Jul 5 11:06:59 2017 +0100 Merge branches 'fixes' and 'misc' into for-linus commit 0e72582270c07850b92cac351c8b97d4f9c123b9 Merge: a778427 3714447 Author: David S. Miller Date: Wed Jul 5 09:23:53 2017 +0100 Merge branch 'phy-dp83867-workaround-incorrect-RX_CTRL-pin-strap' Sekhar Nori says: ==================== net: phy: dp83867: workaround incorrect RX_CTRL pin strap This patch series adds workaround for incorrect RX_CTRL pin strap setting that can be found on some TI boards. This is required to be complaint to PHY datamanual specification. ==================== Signed-off-by: David S. Miller commit 371444764b9882d754d1e67dd212c932359a2293 Author: Murali Karicheri Date: Tue Jul 4 16:23:24 2017 +0530 net: phy: dp83867: add workaround for incorrect RX_CTRL pin strap The data manual for DP83867IR/CR, SNLS484E[1], revised march 2017, advises that strapping RX_DV/RX_CTRL pin in mode 1 and 2 is not supported (see note below Table 5 (4-Level Strap Pins)). There are some boards which have the pin strapped this way and need software workaround suggested by the data manual. Bit[7] of Configuration Register 4 (address 0x0031) must be cleared to 0. This ensures proper operation of the PHY. Implement driver support for device-tree property meant to advertise the wrong strapping. [1] http://www.ti.com/lit/ds/snls484e/snls484e.pdf Signed-off-by: Murali Karicheri [nsekhar@ti.com: rebase to mainline, code simplification] Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 908a7733250a2ebcacfafb2ebe0f25c853ac7fdc Author: Murali Karicheri Date: Tue Jul 4 16:23:23 2017 +0530 dt-bindings: phy: dp83867: provide a workaround for incorrect RX_CTRL pin strap The data manual for DP83867IR/CR, SNLS484E[1], revised march 2017, advises that strapping RX_DV/RX_CTRL pin in mode 1 and 2 is not supported (see note below Table 5 (4-Level Strap Pins)). It further advises that if a board has this pin strapped in mode 1 and mode 2, then to ensure proper operation of the PHY, a software workaround must be implemented. Since it is not possible to detect in software if RX_DV/RX_CTRL pin is incorrectly strapped, add a device-tree property for the board to advertise this and allow corrective action in software. [1] http://www.ti.com/lit/ds/snls484e/snls484e.pdf Signed-off-by: Murali Karicheri [nsekhar@ti.com: rebase to mainline, split documentation into separate patch] Signed-off-by: Sekhar Nori Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ti,dp83867.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit a778427efc67490b6ee7ea4593065dede4445fb6 Merge: 97d731d c3ff08e Author: David S. Miller Date: Wed Jul 5 09:21:54 2017 +0100 Merge branch 'cxgb4-ptp' Atul Gupta says: ==================== cxgb4: Add PTP Hardware Clock (PHC) support V4: Splitting the patch again V3: Releasing lock in the exit paths V2: Splitting the patch ==================== Signed-off-by: David S. Miller commit c3ff08eba94ec92417bd78c0d0ad567c483eca85 Author: Atul Gupta Date: Tue Jul 4 16:46:22 2017 +0530 cxgb4: Support for get_ts_info ethtool method Cc: Richard Cochran Signed-off-by: Atul Gupta Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 9c33e4208bce512e1708781711b2846f463d2eb4 Author: Atul Gupta Date: Tue Jul 4 16:46:21 2017 +0530 cxgb4: Add PTP Hardware Clock (PHC) support Add PTP IEEE-1588 support and make it accessible via PHC subsystem. The functionality is enabled for T5/T6 adapters. Driver interfaces with Firmware to program and adjust the clock offset. Cc: Richard Cochran Signed-off-by: Atul Gupta Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 6 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c | 281 ++++++++++++++++++++++++ 2 files changed, 287 insertions(+) commit a456950445a075f5c28a331474dc71e4133ccd3b Author: Atul Gupta Date: Tue Jul 4 16:46:20 2017 +0530 cxgb4: time stamping interface for PTP Supports hardware and software time stamping via the Linux SO_TIMESTAMPING socket option. Cc: Richard Cochran Signed-off-by: Atul Gupta Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 9 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 76 +++++++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c | 194 ++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.h | 74 +++++++++ drivers/net/ethernet/chelsio/cxgb4/sge.c | 173 ++++++++++++++++++++- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 28 ++++ drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 2 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 50 ++++++ 9 files changed, 595 insertions(+), 13 deletions(-) commit 97d731d81053e896ead376fd726ed8aee5932bdd Merge: 42af627 64a919a Author: David S. Miller Date: Wed Jul 5 09:13:08 2017 +0100 Merge branch 'nfp-port-enumeration-change-and-FW-ABI-adjustment' Jakub Kicinski says: ==================== nfp: port enumeration change and FW ABI adjustment This set changes the way ports are numbered internally to avoid MAC address changes and invalid link information when breakout is configured. Second patch gets rid of old way of looking up MAC addresses in device information which caused all this confusion. Patch 3 is a small adjustment to the new FW ABI version we introduced in this release cycle. ==================== Signed-off-by: David S. Miller commit 64a919a9440fe080b0ad1814ce86366010d4a9ef Author: Jakub Kicinski Date: Tue Jul 4 02:27:21 2017 -0700 nfp: default to chained metadata prepend format ABI 4.x introduced the chained metadata format and made it the only one possible. There are cases, however, where the old format is preferred - mostly to make interoperation with VFs using ABI 3.x easier for the datapath. In ABI 5.x we allowed for more flexibility by selecting the metadata format based on capabilities. The default was left to non-chained. In case of fallback traffic, there is no capability telling the driver there may be chained metadata. With a very stripped- -down FW the default old metadata format would be selected making the driver drop all fallback traffic. This patch changes the default selection in the driver. It should not hurt with old firmwares, because if they don't advertise RSS they will not produce metadata anyway. New firmwares advertising ABI 5.x, however, can depend on the driver defaulting to chained format. Fixes: f9380629fafc ("nfp: advertise support for NFD ABI 0.5") Suggested-by: Michael Rapson Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cb2cda484840730f0f7683286fa2a25dc1dbecf0 Author: Jakub Kicinski Date: Tue Jul 4 02:27:20 2017 -0700 nfp: remove legacy MAC address lookup The legacy MAC address lookup doesn't work well with breakout cables. We are probably better off picking random addresses than the wrong ones in the theoretical scenario where management FW didn't tell us what the port config is. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 3 +- drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_main.h | 3 +- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 34 ++++------------------- 4 files changed, 8 insertions(+), 34 deletions(-) commit 2eb333c4b442c4bcab79ada53019d4a47f252e46 Author: Jakub Kicinski Date: Tue Jul 4 02:27:19 2017 -0700 nfp: improve order of interfaces in breakout mode For historical reasons we enumerate the vNICs in order. This means that if user configures breakout on a multiport card, the first interface of the second port will have its MAC address changed. What's worse, when moved from static information (HWInfo) to using management FW (NSP), more features started depending on the port ids. Right now in case of breakout first subport of the second port and second subport of the first port will have their link info swapped. Revise the ordering scheme so that first subport maintains its address. Side effect of this change is that we will use base lane ids in devlink (i.e. 40G ports will be 4 ids apart), e.g.: pci/0000:04:00.0/0: type eth netdev p6p1 pci/0000:04:00.0/4: type eth netdev p6p2 Note that behaviour of phys_port_id is not changed since there is a separate id number for the subport there. Fixes: ec8b1fbe682d ("nfp: support port splitting via devlink") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.h | 2 -- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 10 +++++----- drivers/net/ethernet/netronome/nfp/nfp_port.c | 14 +++++++------- 3 files changed, 12 insertions(+), 14 deletions(-) commit 42af627b400f32e5b17023f39c4fc24107ca8c3d Author: Colin Ian King Date: Tue Jul 4 16:09:59 2017 +0100 net: macb: remove extraneous return when MACB_EXT_DESC is defined When macro MACB_EXT_DESC is defined we end up with two identical return statements and just one is sufficient. Remove the extra return. Detected by CoverityScan, CID#1449361 ("Structurally dead code") Signed-off-by: Colin Ian King Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 1 - 1 file changed, 1 deletion(-) commit 12df216c61c89e31e27e74146115a9728880ca6f Author: Chen Yu Date: Mon Jul 3 01:07:32 2017 +0800 x86/boot/e820: Introduce the bootloader provided e820_table_firmware[] table Add the real e820_tabel_firmware[] that will not be modified by the kernel or the EFI boot stub under any circumstance. In addition to that modify the code so that e820_table_firmwarep[] is exposed via sysfs to represent the real firmware memory layout, rather than exposing the e820_table_kexec[] table. This fixes a hibernation bug/warning, which uses e820_table_kexec[] to check RAM layout consistency across hibernation/resume: The suspend kernel: [ 0.000000] e820: update [mem 0x76671018-0x76679457] usable ==> usable The resume kernel: [ 0.000000] e820: update [mem 0x7666f018-0x76677457] usable ==> usable ... [ 15.752088] PM: Using 3 thread(s) for decompression. [ 15.752088] PM: Loading and decompressing image data (471870 pages)... [ 15.764971] Hibernate inconsistent memory map detected! [ 15.770833] PM: Image mismatch: architecture specific data Actually it is safe to restore these pages because E820_TYPE_RAM and E820_TYPE_RESERVED_KERN are treated the same during hibernation, so the original e820 table provided by the bootloader is used for hibernation MD5 fingerprint checking. The side effect is that, this newly introduced variable might increase the kernel size at compile time. Suggested-by: Ingo Molnar Signed-off-by: Chen Yu Cc: Dave Young Cc: Len Brown Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Xunlei Pang Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 1 + arch/x86/kernel/e820.c | 31 ++++++++++++++++++++++++++----- arch/x86/power/hibernate_64.c | 4 ++-- 3 files changed, 29 insertions(+), 7 deletions(-) commit a09bae0f8aa08d4d76d0ebece26062a49ec51ac9 Author: Chen Yu Date: Mon Jul 3 01:07:12 2017 +0800 x86/boot/e820: Rename the e820_table_firmware to e820_table_kexec Currently the e820_table_firmware[] table is mainly used by the kexec, and it is not what it's supposed to be - despite its name it might be modified by the kernel. So change its name to e820_table_kexec[]. In the next patch we will introduce the real e820_table_firmware[] table. No functional change. Signed-off-by: Chen Yu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Xunlei Pang Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/kernel/e820.c | 42 +++++++++++++++++++-------------------- arch/x86/kernel/kexec-bzimage64.c | 4 ++-- arch/x86/power/hibernate_64.c | 4 ++-- 4 files changed, 26 insertions(+), 26 deletions(-) commit b7a67e02cd2b0d632114dcfb4bfb9b1d85dee325 Author: Chen Yu Date: Mon Jul 3 01:06:28 2017 +0800 x86/boot/e820: Avoid overwriting e820_table_firmware The following commit in 2013: 77ea8c948953 ("x86: Reserve setup_data ranges late after parsing memmap cmdline") has fixed the issue of losing setup_data information by deferring the e820_reserve_setup_data() call until the early params have been parsed. But this also introduced a new problem that, during early params parsing, the kexec kernel might fake a mptable and saves it into the e820_table_firmware[] table (without saving the mptable to the e820_table[]), however the subsequent invoking of e820_reserve_setup_data() will overwrite the e820_table_firmware[] according to the e820_table[], thus the fake mptable information is lost. Fix this issue by updating the e820_table_firmware[] according to the setup_data information, but without overwriting it. Signed-off-by: Chen Yu Cc: Dave Young Cc: Len Brown Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Xunlei Pang Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6d3f06a0042ebd59a5e9d4ba6e8a85596901e140 Author: Colin Ian King Date: Tue Jul 4 16:21:12 2017 +0100 bpf: add missing break in for the TCP_BPF_SNDCWND_CLAMP case There appears to be a missing break in the TCP_BPF_SNDCWND_CLAMP case. Currently the non-error path where val is greater than zero falls through to the default case that sets the error return to -EINVAL. Add in the missing break. Detected by CoverityScan, CID#1449376 ("Missing break in switch") Fixes: 13bf96411ad2 ("bpf: Adds support for setting sndcwnd clamp") Signed-off-by: Colin Ian King Acked-by: Daniel Borkmann Acked-by: Lawrence Brakmo Signed-off-by: David S. Miller net/core/filter.c | 1 + 1 file changed, 1 insertion(+) commit f856e46978b8cfaa62cf13738ebab38684b96222 Author: Lawrence Brakmo Date: Tue Jul 4 15:57:50 2017 -0700 bpf: fix return in load_bpf_file The function load_bpf_file ignores the return value of load_and_attach(), so even if load_and_attach() returns an error, load_bpf_file() will return 0. Now, load_bpf_file() can call load_and_attach() multiple times and some can succeed and some could fail. I think the correct behavor is to return error on the first failed load_and_attach(). v2: Added missing SOB Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ca4a1cd930d74370cc64a8dd4491fba365986bb1 Author: Roopa Prabhu Date: Tue Jul 4 17:03:02 2017 -0700 mpls: fix rtm policy in mpls_getroute fix rtm policy name typo in mpls_getroute and also remove export of rtm_ipv4_policy Fixes: 397fc9e5cefe ("mpls: route get support") Reported-by: David S. Miller Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 1 - net/mpls/af_mpls.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit ff570a01b1bd15cf8a87c9ea774fc9c52ea07f15 Author: Lokesh Vutla Date: Wed Jul 5 00:54:52 2017 -0700 ARM: dts: dra71-evm: mdio: Fix impedance values v1 series[1] for dp83867 phy impedance-control support, specifies to use ti,impedance-control with a value. These properties got updated iduring review to specify whether min or max impedance. But the DT still uses the old values which never takes effect. Update the DT node by using the proper DT properties. [1] https://patchwork.kernel.org/patch/9239729/ Fixes: 9868bc585ae2c ("ARM: dts: Add support for dra718-evm") Signed-off-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra71-evm.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5601ca471f0892acc36e0316844fa6bd774bfc7e Author: Mihail Grigorov Date: Wed Jul 5 00:54:45 2017 -0700 ARM: dts: dm816x: Correct the state of the write protect pin Commit 599c376c4932 ("ARM: dts: Fix gpio interrupts for dm816x") corrected some problems with the MMC. However, it gets the write protect pin backwards. It needs to be ACTIVE_HIGH not ACTIVE_LOW. Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: Tony Lindgren Signed-off-by: Mihail Grigorov Signed-off-by: Tom Rini Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm8168-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c88e963a3090099725a5edd3b65afb4c9cf7858 Author: Tom Rini Date: Wed Jul 5 00:54:36 2017 -0700 ARM: dts: dm816x: Correct NAND support nodes The ELM node in dm816x.dtsi needs to declare the correct compatible value here as per the binding only one value is correct, and the current driver handles it correctly. We then add pinmux information for the NAND found on the EVM so that we do not rely on the ROM to do this for us, and also so that we do not try and probe NAND before we probe the ELM. Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: Roger Quadros Cc: Tony Lindgren Cc: Mihail Grigorov Signed-off-by: Tom Rini Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm8168-evm.dts | 32 ++++++++++++++++++++++++++++++++ arch/arm/boot/dts/dm816x.dtsi | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) commit 2a42eb9594a1480b4ead9e036e06ee1290e5fa6d Author: Wanpeng Li Date: Thu Jun 29 19:15:11 2017 +0200 sched/cputime: Accumulate vtime on top of nsec clocksource Currently the cputime source used by vtime is jiffies. When we cross a context boundary and jiffies have changed since the last snapshot, the pending cputime is accounted to the switching out context. This system works ok if the ticks are not aligned across CPUs. If they instead are aligned (ie: all fire at the same time) and the CPUs run in userspace, the jiffies change is only observed on tick exit and therefore the user cputime is accounted as system cputime. This is because the CPU that maintains timekeeping fires its tick at the same time as the others. It updates jiffies in the middle of the tick and the other CPUs see that update on IRQ exit: CPU 0 (timekeeper) CPU 1 ------------------- ------------- jiffies = N ... run in userspace for a jiffy tick entry tick entry (sees jiffies = N) set jiffies = N + 1 tick exit tick exit (sees jiffies = N + 1) account 1 jiffy as stime Fix this with using a nanosec clock source instead of jiffies. The cputime is then accumulated and flushed everytime the pending delta reaches a jiffy in order to mitigate the accounting overhead. [ fweisbec: changelog, rebase on struct vtime, field renames, add delta on cputime readers, keep idle vtime as-is (low overhead accounting), harmonize clock sources. ] Suggested-by: Thomas Gleixner Reported-by: Luiz Capitulino Tested-by: Luiz Capitulino Signed-off-by: Wanpeng Li Signed-off-by: Frederic Weisbecker Reviewed-by: Thomas Gleixner Acked-by: Rik van Riel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1498756511-11714-6-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/sched.h | 3 +++ kernel/sched/cputime.c | 64 +++++++++++++++++++++++++++++++++----------------- 2 files changed, 45 insertions(+), 22 deletions(-) commit bac5b6b6b11560f323e71d0ebac4061cfe5f56c0 Author: Frederic Weisbecker Date: Thu Jun 29 19:15:10 2017 +0200 sched/cputime: Move the vtime task fields to their own struct We are about to add vtime accumulation fields to the task struct. Let's avoid more bloatification and gather vtime information to their own struct. Tested-by: Luiz Capitulino Signed-off-by: Frederic Weisbecker Reviewed-by: Thomas Gleixner Acked-by: Rik van Riel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1498756511-11714-5-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/init_task.h | 6 +-- include/linux/sched.h | 26 ++++++----- kernel/fork.c | 6 +-- kernel/sched/cputime.c | 112 ++++++++++++++++++++++++++-------------------- 4 files changed, 86 insertions(+), 64 deletions(-) commit 60a9ce57e7c5ac1df3a39fb941022bbfa40c0862 Author: Frederic Weisbecker Date: Thu Jun 29 19:15:09 2017 +0200 sched/cputime: Rename vtime fields The current "snapshot" based naming on vtime fields suggests we record some past event but that's a low level picture of their actual purpose which comes out blurry. The real point of these fields is to run a basic state machine that tracks down cputime entry while switching between contexts. So lets reflect that with more meaningful names. Tested-by: Luiz Capitulino Signed-off-by: Frederic Weisbecker Reviewed-by: Thomas Gleixner Acked-by: Rik van Riel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1498756511-11714-4-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/init_task.h | 4 ++-- include/linux/sched.h | 4 ++-- kernel/fork.c | 4 ++-- kernel/sched/cputime.c | 30 +++++++++++++++--------------- 4 files changed, 21 insertions(+), 21 deletions(-) commit 9fa57cf5a5c4aed1e45879b335fe433048709327 Author: Frederic Weisbecker Date: Thu Jun 29 19:15:08 2017 +0200 sched/cputime: Always set tsk->vtime_snap_whence after accounting vtime Even though it doesn't have functional consequences, setting the task's new context state after we actually accounted the pending vtime from the old context state makes more sense from a review perspective. vtime_user_exit() is the only function that doesn't follow that rule and that can bug the reviewer for a little while until he realizes there is no reason for this special case. Tested-by: Luiz Capitulino Signed-off-by: Frederic Weisbecker Reviewed-by: Thomas Gleixner Acked-by: Rik van Riel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1498756511-11714-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c3eda01a79b8e9237d91c52c5a75b20983f47c6 Author: Frederic Weisbecker Date: Thu Jun 29 19:15:07 2017 +0200 vtime, sched/cputime: Remove vtime_account_user() It's an unnecessary function between vtime_user_exit() and account_user_time(). Tested-by: Luiz Capitulino Signed-off-by: Frederic Weisbecker Reviewed-by: Thomas Gleixner Acked-by: Rik van Riel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1498756511-11714-2-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/vtime.h | 9 +-------- kernel/sched/cputime.c | 12 ++++++------ 2 files changed, 7 insertions(+), 14 deletions(-) commit 035f901eac4d2d0fd40f3055026355d55d46949f Merge: bcf741c 019d62d Author: Herbert Xu Date: Wed Jul 5 15:17:26 2017 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge the crypto tree to pull in fixes for the next merge window. commit 524b62fdbef54e8afa37ec8bcdf3ff5723ea160f Merge: 4422d80 1934adf Author: Ingo Molnar Date: Wed Jul 5 09:10:37 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.12-20170704' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: User visible changes: - Fix max attr.precise_ip probing to make perf use the best cycles:p available in the processor for non root users (Arnaldo Carvalho de Melo) - Fix processing of MMAP events for 32-bit binaries on 64-bit systems when unwind support is not fully integrated, fixing DSO and symbol resolution (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 99c13b8c8896d7bcb92753bf0c63a8de4326e78d Author: Mikulas Patocka Date: Tue Jul 4 19:04:23 2017 -0400 x86/mm/pat: Don't report PAT on CPUs that don't support it The pat_enabled() logic is broken on CPUs which do not support PAT and where the initialization code fails to call pat_init(). Due to that the enabled flag stays true and pat_enabled() returns true wrongfully. As a consequence the mappings, e.g. for Xorg, are set up with the wrong caching mode and the required MTRR setups are omitted. To cure this the following changes are required: 1) Make pat_enabled() return true only if PAT initialization was invoked and successful. 2) Invoke init_cache_modes() unconditionally in setup_arch() and remove the extra callsites in pat_disable() and the pat disabled code path in pat_init(). Also rename __pat_enabled to pat_disabled to reflect the real purpose of this variable. Fixes: 9cd25aac1f44 ("x86/mm/pat: Emulate PAT when it is disabled") Signed-off-by: Mikulas Patocka Signed-off-by: Thomas Gleixner Cc: Bernhard Held Cc: Denys Vlasenko Cc: Peter Zijlstra Cc: Brian Gerst Cc: "Luis R. Rodriguez" Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Andrew Morton Cc: Linus Torvalds Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1707041749300.3456@file01.intranet.prod.int.rdu2.redhat.com arch/x86/include/asm/pat.h | 1 + arch/x86/kernel/setup.c | 7 +++++++ arch/x86/mm/pat.c | 28 ++++++++++++---------------- 3 files changed, 20 insertions(+), 16 deletions(-) commit 5d72ed35678a351a1aed4b454c25d583f8bccb28 Merge: 0d76d6e1 4ca0e75 467aebe Author: Zhang Rui Date: Wed Jul 5 15:01:06 2017 +0800 Merge branches 'thermal-core', 'thermal-intel' and 'thermal-soc' into next commit 467aebee872af7f5e703809e19a66de633a1aa2c Merge: c0bc126 1fe3854 Author: Zhang Rui Date: Wed Jul 5 14:51:32 2017 +0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc commit 0c6b2975a9a7a86cbdce0054b0b9690ed6afc0fe Author: Cornelia Huck Date: Tue Jul 4 11:30:38 2017 +0200 Update my email address Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c46fc0424ced3fb71208e72bd597d91b9169a781 Author: Jiri Olsa Date: Thu Jun 29 11:38:11 2017 +0200 s390/syscalls: Fix out of bounds arguments access Zorro reported following crash while having enabled syscall tracing (CONFIG_FTRACE_SYSCALLS): Unable to handle kernel pointer dereference at virtual ... Oops: 0011 [#1] SMP DEBUG_PAGEALLOC SNIP Call Trace: ([<000000000024d79c>] ftrace_syscall_enter+0xec/0x1d8) [<00000000001099c6>] do_syscall_trace_enter+0x236/0x2f8 [<0000000000730f1c>] sysc_tracesys+0x1a/0x32 [<000003fffcf946a2>] 0x3fffcf946a2 INFO: lockdep is turned off. Last Breaking-Event-Address: [<000000000022dd44>] rb_event_data+0x34/0x40 ---[ end trace 8c795f86b1b3f7b9 ]--- The crash happens in syscall_get_arguments function for syscalls with zero arguments, that will try to access first argument (args[0]) in event entry, but it's not allocated. Bail out of there are no arguments. Cc: stable@vger.kernel.org Reported-by: Zorro Lang Signed-off-by: Jiri Olsa Signed-off-by: Martin Schwidefsky arch/s390/include/asm/syscall.h | 6 ++++++ 1 file changed, 6 insertions(+) commit c14b7a85be8f9f2c3faba45ddf47e851feb1c27c Author: Sebastian Ott Date: Mon Jun 26 19:47:16 2017 +0200 s390/vfio_ccw: remove unused variable Fix this set but not used warning: drivers/s390/cio/vfio_ccw_drv.c: In function 'vfio_ccw_sch_io_todo': drivers/s390/cio/vfio_ccw_drv.c:72:21: warning: variable 'sch' set but not used [-Wunused-but-set-variable] struct subchannel *sch; ^ Signed-off-by: Sebastian Ott Reviewed-by: Dong Jia Shi Acked-by: Cornelia Huck Signed-off-by: Martin Schwidefsky drivers/s390/cio/vfio_ccw_drv.c | 2 -- 1 file changed, 2 deletions(-) commit 4bca698ffe7e511e79b3f2cc5e7293c046549154 Author: Sebastian Ott Date: Mon Jun 26 19:26:55 2017 +0200 s390/dasd: remove unneeded code Fix these set but not used warnings: drivers/s390/block/dasd.c:3933:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable] drivers/s390/block/dasd_alias.c:757:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable] In addition to that remove the test if an unsigned is < 0: drivers/s390/block/dasd_devmap.c:153:11: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 3 +-- drivers/s390/block/dasd_alias.c | 3 +-- drivers/s390/block/dasd_devmap.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) commit cd0ae1d395a8bfc208437ce612413e58f5137499 Author: Michael Holzheu Date: Wed Jun 21 19:23:18 2017 +0200 s390/crash: Remove unused KEXEC_NOTE_BYTES After commmit 692f66f26a4c19 ("crash: move crashkernel parsing and vmcore related code under CONFIG_CRASH_CORE") the KEXEC_NOTE_BYTES macro is not used anymore and for s390 we create the ELF header in the new kernel anyway. Therefore remove the macro. Reported-by: Xunlei Pang Reviewed-by: Mikhail Zaslonko Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/include/asm/kexec.h | 18 ------------------ include/linux/crash_core.h | 5 +++++ include/linux/kexec.h | 9 --------- 3 files changed, 5 insertions(+), 27 deletions(-) commit 792e0e002298df01df14c704bee045f3b3be0436 Author: Harald Freudenberger Date: Thu Jun 29 09:44:11 2017 +0200 s390/zcrypt: Fix missing newlines at some debug feature messages. On some debug feature invocations the newline was missing. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_api.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9d2be0c1d461520578a7634f09527515f51e2267 Author: Jan Höppner Date: Wed Mar 22 09:57:56 2017 +0100 s390/dasd: Make raw I/O usable without prefix support The Prefix CCW is not mandatory and raw I/O can also be issued without it. Check whether the Prefix CCW is supported and if not use the combination of Define Extent and Locate Record Extended instead. While at it, sort the variable declarations, replace the gotos with early exits, and remove an error check at the end which is irrelevant. Also, remove the XRC check as it is not relevant for raw I/O. Reviewed-by: Stefan Haberland Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 85 ++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 40 deletions(-) commit bbc7f7ea18fca796cb276a2981a970cd2384dfa7 Author: Jan Höppner Date: Fri May 5 14:09:09 2017 +0200 s390/dasd: Rename dasd_raw_build_cp() Rename dasd_raw_build_cp() to dasd_eckd_build_cp_raw() to fit the scheme. Reviewed-by: Stefan Haberland Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 45f186becfcfa12a98acdfa2af513018d8b086e0 Author: Jan Höppner Date: Tue Mar 14 11:10:16 2017 +0100 s390/dasd: Refactor prefix_LRE() and related functions We already have define_extent() that prepares necessary data for the Define Extent CCW. The exact same thing is done in prefix_LRE(). Remove the duplicate code and move commands that were only used in combination with the Prefix command to define_extent(). One of these commands needs the blocksize to be specified. Add the blksize parameter to define_extent() to account for that. In addition, the check_XRC() function can be made more generic. Do this and remove the Prefix-specific check_XRC_on_prefix() function. Furthermore, prefix_LRE() uses fill_LRE_data() to prepare Locate Record Extended data. Rename the function to fit the scheme better and make it usable outside of the Prefix context by adding the corresponding CCW command. Reviewed-by: Stefan Haberland Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 217 +++++++++++++++-------------------------- drivers/s390/block/dasd_eckd.h | 1 + 2 files changed, 78 insertions(+), 140 deletions(-) commit dd1023c89ec47e2abc7ba26b07251e92211e76bb Author: Stephen Rothwell Date: Tue Jul 4 17:58:18 2017 +1000 s390: fix up for "blk-mq: switch ->queue_rq return value to blk_status_t" Signed-off-by: Stephen Rothwell Signed-off-by: Martin Schwidefsky drivers/s390/block/scm_blk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2a527d6858c246db8afc3d576dbcbff0902f933b Author: Alexander Potapenko Date: Wed Jul 5 00:56:21 2017 -0400 fs: generic_block_bmap(): initialize all of the fields in the temp bh KMSAN (KernelMemorySanitizer, a new error detection tool) reports the use of uninitialized memory in ext4_update_bh_state(): ================================================================== BUG: KMSAN: use of unitialized memory CPU: 3 PID: 1 Comm: swapper/0 Tainted: G B 4.8.0-rc6+ #597 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 0000000000000282 ffff88003cc96f68 ffffffff81f30856 0000003000000008 ffff88003cc96f78 0000000000000096 ffffffff8169742a ffff88003cc96ff8 ffffffff812fc1fc 0000000000000008 ffff88003a1980e8 0000000100000000 Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0xa6/0xc0 lib/dump_stack.c:51 [] kmsan_report+0x1ec/0x300 mm/kmsan/kmsan.c:? [] __msan_warning+0x2b/0x40 ??:? [< inline >] ext4_update_bh_state fs/ext4/inode.c:727 [] _ext4_get_block+0x6ca/0x8a0 fs/ext4/inode.c:759 [] ext4_get_block+0x8c/0xa0 fs/ext4/inode.c:769 [] generic_block_bmap+0x246/0x2b0 fs/buffer.c:2991 [] ext4_bmap+0x5ee/0x660 fs/ext4/inode.c:3177 ... origin description: ----tmp@generic_block_bmap ================================================================== (the line numbers are relative to 4.8-rc6, but the bug persists upstream) The local |tmp| is created in generic_block_bmap() and then passed into ext4_bmap() => ext4_get_block() => _ext4_get_block() => ext4_update_bh_state(). Along the way tmp.b_page is never initialized before ext4_update_bh_state() checks its value. [ Use the approach suggested by Kees Cook of initializing the whole bh structure.] Signed-off-by: Alexander Potapenko Signed-off-by: Theodore Ts'o fs/buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d1185a8c5dd21182012e6dd531b00fd72f4d30cb Merge: 6f7da29 03232e0 Author: Kees Cook Date: Tue Jul 4 21:41:31 2017 -0700 Merge branch 'merge/randstruct' into for-next/gcc-plugins commit 03232e0ddebdc2c9d088e6748075704885f039a5 Merge: ffa47aa f136e09 Author: Kees Cook Date: Tue Jul 4 21:40:47 2017 -0700 Merge branch 'for-next/gcc-plugin-infrastructure' into merge/randstruct commit ea4d12dabf872b496218cdc8e7874feef8676cdd Author: kbuild test robot Date: Wed Jul 5 02:14:10 2017 +0800 bio-integrity: fix boolreturn.cocci warnings block/bio-integrity.c:318:10-11: WARNING: return of 0/1 in function 'bio_integrity_prep' 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: e23947bd76f0 ("bio-integrity: fold bio_integrity_enabled to bio_integrity_prep") CC: Dmitry Monakhov Signed-off-by: Fengguang Wu Signed-off-by: Jens Axboe block/bio-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19964541c23156cc8f814a2137df6b833ccdbf12 Merge: a9ceea2 96f6302 Author: Linus Torvalds Date: Tue Jul 4 14:53:26 2017 -0700 Merge tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC 64-bit updates from Arnd Bergmann: "Changes to platform code for 64-bit ARM platforms. Andreas Färber adds two new platforms with initial code: Realtek RTD1295 and Action Semi S900. Both are fairly similar chips, used mainly in set-top-boxes, but with other possible applications, and additional members in the respective product families that could be added in the future. The code here is fairly minimal, as all the interesting parts are in device drivers and dts files. The Broadcom Vulcan platform gets dropped, as no products ever became available, and Cavium integrated the platform under a new name. Among some other defconfig changes, Timur Tabi enables a number of options that are typically required for server platforms" * tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: defconfig: remove duplicate entry arm64: defconfig: enable Qualcomm Technologies EMAC and some PHY drivers arm64: defconfig: enable QCOM_L2_PMU and QCOM_L3_PMU arm64: defconfig: enable EDAC options arm64: defconfig: enable APEI and GHES features arm64: defconfig: enable support for PCIe hotplug arm64: defconfig: enable EFI_CAPSULE_LOADER arm64: defconfig: enable BLK_DEV_NVME arm64: defconfig: enable ACPI_CPPC_CPUFREQ arm64: marvell: enable ICU and GICP drivers arm64: marvell: enable the Armada 7K/8K pinctrl driver arm64: Prepare Actions Semi S900 ARM64: defconfig: enable meson SPICC as module ARM64: defconfig: enable IR core, decoders and Meson IR device arm64: defconfig: enable Simple Sound Card support arm64: defconfig: Enable ARCH_BRCMSTB arm64: defconfig: drop ARCH_VULCAN arm64: disable Broadcom Vulcan platform MAINTAINERS: Add Realtek section ARM64: Prepare Realtek RTD1295 commit a9ceea26747dfd1879e7d836c5ce40bb8d6fc7e9 Merge: e854711 ac548ad Author: Linus Torvalds Date: Tue Jul 4 14:50:59 2017 -0700 Merge tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM 64-bit DT updates from Arnd Bergmann: "Device-tree updates for arm64 platforms. For the first time I can remember, this is actually larger than the corresponding branch for 32-bit platforms overall, though that has more individual changes. A significant portion this time is due to added machine support: - Initial support for the Realtek RTD1295 SoC, along with the Zidoo X9S set-top-box - Initial support for Actions Semi S900 and the Bubblegum-96 single-board-cёmputer. - Rockchips support for the rk3399-Firefly single-board-computer gets added, this one stands out for being relatively fast, affordable and well₋supported, compared to many boards that only fall into one or two of the above categories. - Mediatek gains support for the mt6797 mobile-phone SoC platform and corresponding evaluation board. - Amlogic board support gets added for the NanoPi K2 and S905x LibreTech CC single-board computers and the R-Box Pro set-top-box - Allwinner board support gets added for the OrangePi Win, Orangepi Zero Plus 2, NanoPi NEO2 and Orange Pi Prime single board computers and the SoPine system-on-module. - Renesas board support for Salvator-XS and H3ULCB automotive development systems. - Socionext Uniphier board support for LD11-global and LD20-global, whatever those may be. - Broadcom adds support for the new Stingray communication processor in its iProc family, along with two reference boards. Other updates include: - For the hisicon platform, support for Hi3660-Hikey960 gets extended significantly. - Lots of smaller updates for Renesas, Amlogic, Rockchip, UniPhier, Broadcom, Allwinner, Hisilicon, Qualcomm, Marvell, and NXP" * tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (243 commits) ARM64: dts: marvell: armada37xx: Fix timer interrupt specifiers Revert "arm64: dts: marvell: add dma-mask in crypto nodes for 7k/8k" arm64: dts: mediatek: don't include missing file ARM64: dts: meson-gxl: Add Libre Technology CC support dt-bindings: arm: amlogic: Add Libre Technology CC board dt-bindings: add Libre Technology vendor prefix arm64: dts: marvell: enable GICP and ICU on Armada 7K/8K arm64: dts: zte: Use - instead of @ for DT OPP entries arm64: dts: marvell: add gpio support for Armada 7K/8K arm64: dts: marvell: add pinctrl support for Armada 7K/8K arm64: dts: marvell: use new binding for the system controller on cp110 arm64: dts: marvell: remove *-clock-output-names on cp110 arm64: dts: marvell: use new bindings for xor clocks on ap806 arm64: dts: marvell: mcbin: enable the mdio node arm64: dts: Add Actions Semi S900 and Bubblegum-96 dt-bindings: Add vendor prefix for uCRobotics arm64: dts: marvell: add xmdio nodes for 7k/8k arm64: dts: marvell: add a comment on the cp110 slave node status arm64: dts: marvell: remove cpm crypto nodes from dts files arm64: dts: marvell: cp110: enable the crypto engine at the SoC level ... commit e8547112910540afb71589ee807ae6a4259f9755 Merge: 9ce32ac ffe3744 Author: Linus Torvalds Date: Tue Jul 4 14:47:47 2017 -0700 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Arnd Bergmann: "New SoC specific drivers: - NVIDIA Tegra PM Domain support for newer SoCs (Tegra186 and later) based on the "BPMP" firmware - Clocksource and system controller drivers for the newly added Action Semi platforms (both arm and arm64). Reset subsystem, merged through arm-soc by tradition: - New drivers for Altera Stratix10, TI Keystone and Cortina Gemini SoCs - Various subsystem-wide cleanups Updates for existing SoC-specific drivers - TI GPMC (General Purpose Memory Controller) - Mediatek "scpsys" system controller support for MT6797 - Broadcom "brcmstb_gisb" bus arbitrer - ARM SCPI firmware - Renesas "SYSC" system controller One more driver update was submitted for the Freescale/NXP DPAA data path acceleration that has previously been used on PowerPC chips. I ended up postponing the merge until some API questions for its unusual MMIO access are resolved" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (35 commits) clocksource: owl: Add S900 support clocksource: Add Owl timer soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON firmware: tegra: Fix locking bugs in BPMP soc/tegra: flowctrl: Fix error handling soc/tegra: bpmp: Implement generic PM domains soc/tegra: bpmp: Update ABI header PM / Domains: Allow overriding the ->xlate() callback soc: brcmstb: enable drivers for ARM64 and BMIPS soc: renesas: Rework Kconfig and Makefile logic reset: Add the TI SCI reset driver dt-bindings: reset: Add TI SCI reset binding reset: use kref for reference counting soc: qcom: smsm: Improve error handling, quiesce probe deferral cpufreq: scpi: use new scpi_ops functions to remove duplicate code firmware: arm_scpi: add support to populate OPPs and get transition latency dt-bindings: reset: Add reset manager offsets for Stratix10 memory: omap-gpmc: add error message if bank-width property is absent memory: omap-gpmc: make dts snippet include semicolon reset: Add a Gemini reset controller ... commit 9ce32ac8f83729aca9f45ce9598dbc5451d1044b Merge: 1849f80 a3cc999 Author: Linus Torvalds Date: Tue Jul 4 14:40:29 2017 -0700 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC defconfig updates from Arnd Bergmann: "The main changes this time are from a cleanup series that Krzysztof Kozłowski did, looking for config options in the defconfig files that got removed or renamed. He tracked them down to make sure we don't lose information unintentionally after an update. Aside from that, there is the usual driver enablement, this time for davinci, samsung, stm32, bcm2835, qualcomm, at91, imx, mvebu, and omap" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits) multi_v7_defconfig: Enable OMAP MTD and DM816 AHCI ARM: qcom_defconfig: enable RPMSG_QCOM_SMD ARM: imx_v6_v7_defconfig: Select CONFIG_IMX7D_ADC ARM: mvebu: Enable SENSORS_PWM_FAN in defconfig ARM: davinci_all_defconfig: enable USB CDC NCM gadget ARM: davinci_all_defconfig: enable mtdtests ARM: imx_v6_v7_defconfig: Set THERMAL_WRITABLE_TRIPS=y for testing ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support ARM: tct_hammer_defconfig: Save defconfig ARM: s5pv210_defconfig: Save defconfig ARM: s3c6400_defconfig: Save defconfig ARM: mini2440_defconfig: Save defconfig ARM: s3c2410_defconfig: Save defconfig ARM: exynos_defconfig: Save defconfig ARM: s5pv210_defconfig: Bring back lost (but wanted) options ARM: s3c6400_defconfig: Bring back lost (but wanted) options ARM: s3c2410_defconfig: Bring back lost (but wanted) options ARM: tct_hammer_defconfig: Bring back lost (but wanted) options ARM: mini2440_defconfig: Bring back lost (but wanted) options ARM: defconfig: samsung: Re-order entries to match savedefconfig ... commit 1849f800fba32cd5a0b647f824f11426b85310d8 Merge: 8ca302e 0c6cda5 Author: Linus Torvalds Date: Tue Jul 4 14:37:25 2017 -0700 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM device-tree updates from Arnd Bergmann: "Device-tree continues to see lots of updates. The majority of patches here are smaller changes for new hardware on existing platforms, and there are a few larger changes worth pointing out. New machines: - The new Action Semi S500 platform is added along with initial support for the LeMaker Guitar board. - STM32 gains support for three new boards: stm32h743-disco, stm32f746-disco, and stm32f769-disco, along with new device support for the existing stm32f429 boards. - Renesas adds two new boards, the tiny GR-Peach based on RZ/A1H with 10MB on-chip SRAM, and the iWave G20D-Q7 System-on-Module plus board. - On Marvell "mvebu", we gain support for the Linksys WRT3200ACM wireless router. - For NXP i.MX, we gain support for the Gateworks Ventana GW5600 and the Technexion Pico i.MX7D single-board computers. - The BeagleBone Blue is added for OMAP, it's the latest variation of the popular Beaglebone Black single-board computer. - The Allwinner based Lichee Pi Zero and NanoPi M1 Plus boards are added, these are the latest variations of a seemingly endless supply of similar single-board computers. Other updates: - Linus Walleij improves support for the "Faraday" based SoC platforms from various SoC makers (Moxart, Aspeed, Gemini) - The ARM Mali GPU is now describe on Rockchips SoCs - Mediatek MT7623 is extended significantly, making it much more useful. - Lots of individual updates on Renesas, OMAP, Rockchips, Broadcom, Allwinner, Qualcomm, iMX - For Amlogic, the clock support is extended a lot on meson8b. - We now build the devicetree file for the Raspberry Pi 3 on 32-bit ARM, in addition to the existing ARM64 support, to help users wanting to run a 32-bit system on it" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (345 commits) ARM: dts: socfpga: set the i2c frequency ARM: dts: socfpga: Add second ethernet alias to VINING FPGA ARM: dts: socfpga: Drop LED node from VINING FPGA ARM: dts: socfpga: Remove I2C EEPROMs from VINING FPGA ARM: dts: socfpga: Enable QSPI support on VINING FPGA ARM: dts: socfpga: Fix the ethernet clock phandle ARM: pxa: Use - instead of @ for DT OPP entries ARM: dts: owl-s500: Add SPS node ARM: dts: owl-s500: Set CPU enable-method dt-bindings: arm: cpus: Add S500 enable-method ARM: dts: Add Actions Semi S500 and LeMaker Guitar dt-bindings: arm: Document Actions Semi S900 dt-bindings: timer: Document Owl timer ARM: dts: imx6q-cm-fx6: add sdio wifi/bt nodes dt-bindings: arm: Document Actions Semi S500 dt-bindings: Add vendor prefix for Actions Semi ARM: dts: turris-omnia: Add generic compatible string for I2C EEPROM ARM: dts: mvebu: add support for Linksys WRT3200ACM (Rango) ARM: dts: armada-385-linksys: fixup button node names ARM: dts: armada-385-linksys: group pins in pinctrl ... commit dcc13ee85f15325c1c28d6e8214f2884cca25b75 Merge: bf72ace b6d52ed Author: David S. Miller Date: Tue Jul 4 22:35:20 2017 +0100 Merge branch 'net-subsystem-misc-refcounter-conversions' Elena Reshetova says: ==================== v2 net subsystem misc refcounter conversions Changes in v2: * rebase on top of net-next * currently by default refcount_t = atomic_t (*) and uses all atomic standard operations unless CONFIG_REFCOUNT_FULL is enabled. This is a compromise for the systems that are critical on performance (such as net) and cannot accept even slight delay on the refcounter operations. This series, for various misc network components, replaces atomic_t reference counters with the new refcount_t type and API (see include/linux/refcount.h). By doing this we prevent intentional or accidental underflows or overflows that can led to use-after-free vulnerabilities. These are the last networking-related conversions with the exception of network drivers (to be send separately). Please excuse the long patch set, but seems like breaking it up won't save that much on CC list and most of the changes are trivial. The patches are fully independent and can be cherry-picked separately. In order to try with refcount functionality enabled in run-time, CONFIG_REFCOUNT_FULL must be enabled. NOTE: automatic kernel builder for some reason doesn't like all my network branches and regularly times out the builds on these branches. Suggestion for "waiting a day for a good coverage" doesn't work, as we have seen with generic network conversions. So please wait for the full report from kernel test rebot before merging further up. This has been compile-tested in 116 configs, but 71 timed out (including all s390-related configs again). I am trying to see if they can fix build coverage for me in meanwhile. * The respective change is currently merged into -next as "locking/refcount: Create unchecked atomic_t implementation". ==================== Signed-off-by: David S. Miller commit b6d52ede224836f74dff50666b6a3076a5b8c92d Author: Reshetova, Elena Date: Tue Jul 4 15:53:31 2017 +0300 net, ax25: convert ax25_cb.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/ax25.h | 6 +++--- net/ax25/af_ax25.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 39f25d42c04959f0ddb5b14b01b27ea221736509 Author: Reshetova, Elena Date: Tue Jul 4 15:53:30 2017 +0300 net, ax25: convert ax25_route.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/ax25.h | 6 +++--- net/ax25/ax25_route.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 07f2282fc6a169980b08cedf3beaf8334b7b9dde Author: Reshetova, Elena Date: Tue Jul 4 15:53:29 2017 +0300 net, ax25: convert ax25_uid_assoc.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/ax25.h | 8 ++++---- net/ax25/ax25_uid.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit c638457a7c6b8931cd4586d6a13a33887185342d Author: Reshetova, Elena Date: Tue Jul 4 15:53:28 2017 +0300 net, sctp: convert sctp_ep_common.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 +- net/sctp/associola.c | 6 +++--- net/sctp/endpointola.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit a4b2b58efd44db68358e1a6b71cf205c795d7ada Author: Reshetova, Elena Date: Tue Jul 4 15:53:27 2017 +0300 net, sctp: convert sctp_transport.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 +- net/sctp/transport.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit e7f027961759f334bcc939980ec35480faa7ef17 Author: Reshetova, Elena Date: Tue Jul 4 15:53:26 2017 +0300 net, sctp: convert sctp_chunk.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 +- net/sctp/sm_make_chunk.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit c0acdfb409c82047853df1e5f3dbdbe4005c78ae Author: Reshetova, Elena Date: Tue Jul 4 15:53:25 2017 +0300 net, sctp: convert sctp_datamsg.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 +- net/sctp/chunk.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6871584a5e493a9fa3ad330a73966908b082deac Author: Reshetova, Elena Date: Tue Jul 4 15:53:24 2017 +0300 net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/sctp/auth.h | 5 +++-- net/sctp/auth.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit 55eabed60a68e918abc44f6beb64f38cc008b29d Author: Reshetova, Elena Date: Tue Jul 4 15:53:23 2017 +0300 net, xfrm: convert sec_path.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/xfrm.h | 6 +++--- net/xfrm/xfrm_input.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 850a6212c6fa151076dca045821c75025723bc46 Author: Reshetova, Elena Date: Tue Jul 4 15:53:22 2017 +0300 net, xfrm: convert xfrm_policy.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/xfrm.h | 6 +++--- net/key/af_key.c | 2 +- net/xfrm/xfrm_policy.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 88755e9c7c0027fb432ac808326103bc9438d5ea Author: Reshetova, Elena Date: Tue Jul 4 15:53:21 2017 +0300 net, xfrm: convert xfrm_state.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/xfrm.h | 9 +++++---- net/xfrm/xfrm_state.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) commit 5534a51ab79f8925ee33d9830646f5e6df27eb54 Author: Reshetova, Elena Date: Tue Jul 4 15:53:20 2017 +0300 net, x25: convert x25_neigh.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/x25.h | 6 +++--- net/x25/x25_link.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5f9ccf6f38a1cfbaf6920b843c09d4e847a89e98 Author: Reshetova, Elena Date: Tue Jul 4 15:53:19 2017 +0300 net, x25: convert x25_route.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/x25.h | 7 ++++--- net/x25/x25_route.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) commit 6c5a1c4a2afdcc21434b86996b49460f07ee69a3 Author: Reshetova, Elena Date: Tue Jul 4 15:53:18 2017 +0300 net, rds: convert rds_message.m_refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/rds/message.c | 12 ++++++------ net/rds/rds.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 803ea85053b75d35f9ebb3aa7a28db35d82c6d82 Author: Reshetova, Elena Date: Tue Jul 4 15:53:17 2017 +0300 net, rds: convert rds_mr.r_refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/rds/rdma.c | 10 +++++----- net/rds/rds.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit b7f0292094cbe31f82f2cd9623c8356cc7cf9566 Author: Reshetova, Elena Date: Tue Jul 4 15:53:16 2017 +0300 net, rds: convert rds_incoming.i_refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/rds/rds.h | 3 ++- net/rds/recv.c | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) commit 50d61ff789d728a9b6624582ce28441dc0bf5b42 Author: Reshetova, Elena Date: Tue Jul 4 15:53:15 2017 +0300 net, rds: convert rds_ib_device.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/rds/ib.c | 12 ++++++------ net/rds/ib.h | 2 +- net/rds/ib_rdma.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) commit 7ff139696d74d0d4917bd259347d00e3a4fcc410 Author: Reshetova, Elena Date: Tue Jul 4 15:53:14 2017 +0300 net, sunrpc: convert gss_upcall_msg.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/sunrpc/auth_gss/auth_gss.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 0fa104726b6cc7b1ebb4c60d55cb6abda745f4b6 Author: Reshetova, Elena Date: Tue Jul 4 15:53:13 2017 +0300 net, sunrpc: convert gss_cl_ctx.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/linux/sunrpc/auth_gss.h | 3 ++- net/sunrpc/auth_gss/auth_gss.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 156be7edc85b4aeb0f31029f4d60c3de0c997f27 Author: Reshetova, Elena Date: Tue Jul 4 15:53:12 2017 +0300 net, netrom: convert nr_node.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/netrom.h | 6 +++--- net/netrom/nr_route.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit af4207494d9c8e089df80e9c1ceac44f2b3e7b53 Author: Reshetova, Elena Date: Tue Jul 4 15:53:11 2017 +0300 net, netrom: convert nr_neigh.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/netrom.h | 7 ++++--- net/netrom/nr_route.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit 16f73c964956e0f78669f1681191093dd030c9ee Author: Reshetova, Elena Date: Tue Jul 4 15:53:10 2017 +0300 net, ipx: convert ipx_route.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/ipx.h | 6 +++--- net/ipx/ipx_route.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit d25189ca8665e3ed493c7bc0607e62c2fcb314ad Author: Reshetova, Elena Date: Tue Jul 4 15:53:09 2017 +0300 net, ipx: convert ipx_interface.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/ipx.h | 7 ++++--- net/ipx/af_ipx.c | 6 +++--- net/ipx/ipx_proc.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) commit 0408c58be5a475c99b271f08d85859f7b59ec767 Author: Reshetova, Elena Date: Tue Jul 4 15:53:08 2017 +0300 net, lapb: convert lapb_cb.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/lapb.h | 3 ++- net/lapb/lapb_iface.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 7b9364050246bd4c24b36b71c8990b2922dcc027 Author: Reshetova, Elena Date: Tue Jul 4 15:53:07 2017 +0300 net, sched: convert Qdisc.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/sch_generic.h | 3 ++- net/sched/sch_api.c | 8 ++++---- net/sched/sch_generic.c | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) commit edcd9270be1ba9c80cd0789ffbae7a7d204b7b05 Author: Reshetova, Elena Date: Tue Jul 4 15:53:06 2017 +0300 net, calipso: convert calipso_doi.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/calipso.h | 4 ++-- net/ipv6/calipso.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit 2512775985969a3dadb09670701f0c16499ee784 Author: Reshetova, Elena Date: Tue Jul 4 15:53:05 2017 +0300 net, bridge: convert net_bridge_vlan.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/bridge/br_private.h | 3 ++- net/bridge/br_vlan.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit e00bdbefab731638c0764cf1b9b7398bfbf2bd99 Author: Reshetova, Elena Date: Tue Jul 4 15:53:04 2017 +0300 net, atm: convert eg_cache_entry.use from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/atm/mpoa_caches.c | 14 +++++++------- net/atm/mpoa_caches.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit 937149125448290c5d60da2816556409287750ea Author: Reshetova, Elena Date: Tue Jul 4 15:53:03 2017 +0300 net, atm: convert in_cache_entry.use from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/atm/mpoa_caches.c | 12 ++++++------ net/atm/mpoa_caches.h | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) commit 788936641ac8bc92c531f09b79bf44775fac1350 Author: Reshetova, Elena Date: Tue Jul 4 15:53:02 2017 +0300 net, atm: convert lec_arp_table.usage from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/atm/lec.c | 6 +++--- net/atm/lec_arpc.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 458bc30cec26c2716746ae215ed23773257e417d Author: Reshetova, Elena Date: Tue Jul 4 15:53:01 2017 +0300 net, atm: convert atm_dev.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/linux/atmdev.h | 7 ++++--- net/atm/proc.c | 2 +- net/atm/resources.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit e0542dd5185e68247b08c3418bdba14644b4c414 Author: Reshetova, Elena Date: Tue Jul 4 15:53:00 2017 +0300 net, decnet: convert dn_fib_info.fib_clntref from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/dn_fib.h | 5 +++-- net/decnet/dn_fib.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit 66af846fe54b780f8f5bd9a62aee081bd2ace582 Author: Reshetova, Elena Date: Tue Jul 4 15:52:59 2017 +0300 net, vxlan: convert vxlan_sock.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller drivers/net/vxlan.c | 10 +++++----- include/net/vxlan.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit f00c854c965fd7197c9ac0f59d823ca0a909e33b Author: Reshetova, Elena Date: Tue Jul 4 15:52:58 2017 +0300 net, l2tp: convert l2tp_session.ref_count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 2 +- net/l2tp/l2tp_core.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit fbea9e0760bf17e681b9bfc25b97b408708b9ff2 Author: Reshetova, Elena Date: Tue Jul 4 15:52:57 2017 +0300 net, l2tp: convert l2tp_tunnel.ref_count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 14 +++++++------- net/l2tp/l2tp_core.h | 3 ++- net/l2tp/l2tp_debugfs.c | 4 ++-- net/l2tp/l2tp_ppp.c | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) commit 58951dde05fdac96a9d30805d8fa5d124dd4f92c Author: Reshetova, Elena Date: Tue Jul 4 15:52:56 2017 +0300 net, llc: convert llc_sap.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/llc.h | 6 +++--- net/llc/llc_core.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 8ca302e9c61a1b8852f4bd4def8e7ff59f4c729a Merge: 612341b 18cfd94 Author: Linus Torvalds Date: Tue Jul 4 14:34:51 2017 -0700 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Arnd Bergmann: "SoC platform changes (arch/arm/mach-*). This merge window, the bulk is for a few platforms: - Andres Färber adds initial support for the Actions Semi S500 (aka 'owl') platform, a close relative of the S900 platform he adds for arm64. - in mach-omap2, we remove more legacy code - Rockchips gains support for the RV1108 SoC designed for camera applications. - For Atmel, we gain support for MMU-less SoCs (SAME70/V71/S70/V70) - Minor updates for other platforms, including davinci, s3c64xx, prima2, stm32, broadcom nsp, amlogic, pxa, imx and renesas" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (74 commits) ARM: owl: smp: Drop bogus holding pen ARM: owl: Drop custom machine ARM: owl: smp: Implement SPS power-gating for CPU2 and CPU3 soc: actions: owl-sps: Factor out owl_sps_set_pg() for power-gating soc: actions: Add Owl SPS dt-bindings: power: Add Owl SPS power domains MAINTAINERS: Update Actions Semi section with SPS ARM: owl: Implement CPU enable-method for S500 MAINTAINERS: Add Actions Semi Owl section ARM: Prepare Actions Semi S500 ARM: socfpga: Increase max number of GPIOs ARM: stm32: Introduce MACH_STM32F469 flag ARM: prima2: remove redundant select CPU_V7 ARM: davinci: fix const warnings ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ALWAYS_ON ARM: OMAP4: hwmod_data: add SHAM crypto accelerator ARM: OMAP4: hwmod data: add des ARM: OMAP4: hwmod data: add aes2 ARM: OMAP4: hwmod data: add aes1 ARM: pxa: Delete an error message for a failed memory allocation in pxa3xx_u2d_probe() ... commit 612341bda6ada2bfb2f606e0ce894fca5b6468d9 Merge: c9946d0 ff9e0e3 Author: Linus Torvalds Date: Tue Jul 4 14:30:31 2017 -0700 Merge tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull non-urgent ARM SoC fixes from Arnd Bergmann: "Smaller patches that didn't seem to find a home in other branches, and low-priority fixes from late in the merge window. - Lee Jones retires as bcm2835 (raspberry pi) co-maintainer. - a couple of bugfixes for the ARM CCN bus driver that were regarded not important enough - minor device tree fixes for the Renesas and Marvell platforms, that came a little late or did not justify have another pull request after the last -rc" * tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: bus: arm-ccn: Enable stats for CCN-502 interconnect dt-bindings: arm-ccn: Add bindings info for CCN-502 compatible string bus: arm-ccn: Use devm_kcalloc() in arm_ccn_probe() bus: arm-ccn: Fix module autoload MAINTAINERS: add RV1108 Rockchip soc to maintained files ARM: dts: kirkwood: Fix Openblock A6 nand partition overlap ARM: dts: armadillo800eva: Split LCD mux and gpio MAINTAINERS: Remove Lee Jones from bcm2835. commit c9946d014fe8da95257a118ba946bd4bd44a0c86 Merge: a897a10 67ddd75 Author: Linus Torvalds Date: Tue Jul 4 14:28:22 2017 -0700 Merge tag 'hsi-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: "Misc cleanups" * tag 'hsi-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: core: Use kcalloc() in two functions HSI: Use kcalloc() in hsi_register_board_info() HSI: omap_ssi: Delete an error message for a failed memory allocation in ssi_add_controller() HSI: omap_ssi: Fix a typo in a comment line HSI: omap_ssi: Use devm_kcalloc() in ssi_add_controller() HSI: nokia-modem: Add a space character for better code readability in nokia_modem_probe() HSI: nokia-modem: Delete error messages for a failed memory allocation in two functions HSI: nokia-modem: Use devm_kcalloc() in nokia_modem_gpio_probe() commit a897a10141ae4deb43346fbf2ae2a5149bd7fd5a Merge: eceeae4 bfa953d Author: Linus Torvalds Date: Tue Jul 4 14:25:14 2017 -0700 Merge tag 'for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "New drivers: - Linear ltc3651 charger driver - Motorola CPCAP battery fuel-gauge driver New chip/feature support: - bq27xxx: prepare for chip data setup - axp20x_battery: support max charge current setup New core features: - add Apple Brick ID type - support "supplied-from" device property for generic ACPI/pdata support - support strings for sysfs properties representing enums - introduce battery-info (backend is DT only for now) - provide reboot-mode header globally .. and misc fixes" * tag 'for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (39 commits) power: supply: sbs-battery: Don't needlessly set CAPACITY_MODE power: supply: sbs-battery: Prevent CAPACITY_MODE races power: supply: bq24735: remove incorrect le16_to_cpu calls power: supply: sbs-battery: remove incorrect le16_to_cpu calls power: supply: cpcap-charger: Add missing power_supply_config power: supply: twl4030-charger: move allocation of iio channel to the beginning power: supply: twl4030-charger: allocate iio by devm_iio_channel_get() and fix error path power: supply: core: constify psy_tcd_ops. dt-bindings: power: supply: cpcap-battery: Add power-supplies property dt-bindings: power: supply: move max8903-charger.txt to proper location dt-bindings: power: supply: move maxim,max14656.txt to proper location power: supply: twl4030_charger: Use sysfs_match_string() helper power: reset: reboot-mode: Make include file global power: supply: axp20x_battery: add DT support for battery max constant charge current power: supply: axp20x_battery: add support for DT battery power: supply: bq27xxx: Add power_supply_battery_info support power: supply: bq27xxx: Add chip data memory read/write support power: supply: bq27xxx: Add bulk transfer bus methods dt-bindings: power: supply: bq27xxx: Add monitored-battery documentation power: supply: core: Add power_supply_prop_precharge ... commit eceeae414edccb07fad683011c0c65abe8a3a554 Merge: 408c986 03471c06 Author: Linus Torvalds Date: Tue Jul 4 14:16:49 2017 -0700 Merge tag 'acpi-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These mostly update the ACPICA code in the kernel to upstream revision 20170531 which covers all of the new material from ACPI 6.2, including new tables (WSMT, HMAT, PPTT), new subtables and definition changes for some existing tables (BGRT, HEST, SRAT, TPM2, PCCT), new resource descriptor macros for pin control, support for new predefined methods (_LSI, _LSR, _LSW, _HMA), fixes and cleanups. On top of that, an additional ACPICA change from Kees (which also is upstream already) switches all of the definitions of function pointer structures in ACPICA to use designated initializers so as to make the structure layout randomization GCC plugin work with it. The rest is a few fixes and cleanups in the EC driver, an xpower PMIC driver update, a new backlight blacklist entry, and update of the tables configfs interface and a messages formatting cleanup. Specifics: - Update the ACPICA code in the kernel to upstream revision revision 20170531 (which covers all of the new material from ACPI 6.2) including: * Support for the PinFunction(), PinConfig(), PinGroup(), PinGroupFunction(), and PinGroupConfig() resource descriptors (Mika Westerberg). * Support for new subtables in HEST and SRAT, new notify value for HEST, header support for TPM2 table changes, and BGRT Status field update (Bob Moore). * Support for new PCCT subtables (David Box). * Support for _LSI, _LSR, _LSW, and _HMA as predefined methods (Erik Schmauss). * Support for the new WSMT, HMAT, and PPTT tables (Lv Zheng). * New UUID values for Processor Properties (Bob Moore). * New notify values for memory attributes and graceful shutdown (Bob Moore). * Fix related to the PCAT_COMPAT MADT flag (Janosch Hildebrand). * Resource to AML conversion fix for resources containing GPIOs (Mika Westerberg). * Disassembler-related updates (Bob Moore, David Box, Erik Schmauss). * Assorted fixes and cleanups (Bob Moore, Erik Schmauss, Lv Zheng, Cao Jin). - Modify ACPICA to always use designated initializers for function pointer structures to make the structure layout randomization GCC plugin work with it (Kees Cook). - Update the tables configfs interface to unload SSDTs on configfs entry removal (Jan Kiszka). - Add support for the GPI1 regulator to the xpower PMIC Operation Region handler (Hans de Goede). - Fix ACPI EC issues related to conflicting EC definitions in the ECDT and in the ACPI namespace (Lv Zheng, Carlo Caione, Chris Chiu). - Fix an interrupt storm issue in the EC driver and make its debug output work with dynamic debug as expected (Lv Zheng). - Add ACPI backlight quirk for Dell Precision 7510 (Shih-Yuan Lee). - Fix whitespace in pr_fmt() to align log entries properly in some places in the ACPI subsystem (Vincent Legoll)" * tag 'acpi-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (63 commits) ACPI / EC: Add quirk for GL720VMK ACPI / EC: Fix media keys not working problem on some Asus laptops ACPI / EC: Add support to skip boot stage DSDT probe ACPI / EC: Enhance boot EC sanity check ACPI / video: Add quirks for the Dell Precision 7510 ACPI: EC: Fix EC command visibility for dynamic debug ACPI: EC: Fix an EC event IRQ storming issue ACPICA: Use designated initializers ACPICA: Update version to 20170531 ACPICA: Update a couple of debug output messages ACPICA: acpiexec: enhance local signal handler ACPICA: Simplify output for the ACPI Debug Object ACPICA: Unix application OSL: Correctly handle control-c (EINTR) ACPICA: Improvements for debug output only ACPICA: Disassembler: allow conflicting external declarations to be emitted. ACPICA: Disassembler: add external op to namespace on first pass ACPICA: Disassembler: prevent external op's from opening a new scope ACPICA: Changed Gbl_disasm_flag to acpi_gbl_disasm_flag ACPICA: Changing External to a named object ACPICA: Update two error messages to emit control method name ... commit 408c9861c6979db974455b9e7a9bcadd60e0934c Merge: b39de27 8f8e5c3 Author: Linus Torvalds Date: Tue Jul 4 13:39:41 2017 -0700 Merge tag 'pm-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "The big ticket items here are the rework of suspend-to-idle in order to add proper support for power button wakeup from it on recent Dell laptops and the rework of interfaces exporting the current CPU frequency on x86. In addition to that, support for a few new pieces of hardware is added, the PCI/ACPI device wakeup infrastructure is simplified significantly and the wakeup IRQ framework is fixed to unbreak the IRQ bus locking infrastructure. Also, there are some functional improvements for intel_pstate, tools updates and small fixes and cleanups all over. Specifics: - Rework suspend-to-idle to allow it to take wakeup events signaled by the EC into account on ACPI-based platforms in order to properly support power button wakeup from suspend-to-idle on recent Dell laptops (Rafael Wysocki). That includes the core suspend-to-idle code rework, support for the Low Power S0 _DSM interface, and support for the ACPI INT0002 Virtual GPIO device from Hans de Goede (required for USB keyboard wakeup from suspend-to-idle to work on some machines). - Stop trying to export the current CPU frequency via /proc/cpuinfo on x86 as that is inaccurate and confusing (Len Brown). - Rework the way in which the current CPU frequency is exported by the kernel (over the cpufreq sysfs interface) on x86 systems with the APERF and MPERF registers by always using values read from these registers, when available, to compute the current frequency regardless of which cpufreq driver is in use (Len Brown). - Rework the PCI/ACPI device wakeup infrastructure to remove the questionable and artificial distinction between "devices that can wake up the system from sleep states" and "devices that can generate wakeup signals in the working state" from it, which allows the code to be simplified quite a bit (Rafael Wysocki). - Fix the wakeup IRQ framework by making it use SRCU instead of RCU which doesn't allow sleeping in the read-side critical sections, but which in turn is expected to be allowed by the IRQ bus locking infrastructure (Thomas Gleixner). - Modify some computations in the intel_pstate driver to avoid rounding errors resulting from them (Srinivas Pandruvada). - Reduce the overhead of the intel_pstate driver in the HWP (hardware-managed P-states) mode and when the "performance" P-state selection algorithm is in use by making it avoid registering scheduler callbacks in those cases (Len Brown). - Rework the energy_performance_preference sysfs knob in intel_pstate by changing the values that correspond to different symbolic hint names used by it (Len Brown). - Make it possible to use more than one cpuidle driver at the same time on ARM (Daniel Lezcano). - Make it possible to prevent the cpuidle menu governor from using the 0 state by disabling it via sysfs (Nicholas Piggin). - Add support for FFH (Fixed Functional Hardware) MWAIT in ACPI C1 on AMD systems (Yazen Ghannam). - Make the CPPC cpufreq driver take the lowest nonlinear performance information into account (Prashanth Prakash). - Add support for hi3660 to the cpufreq-dt driver, fix the imx6q driver and clean up the sfi, exynos5440 and intel_pstate drivers (Colin Ian King, Krzysztof Kozlowski, Octavian Purdila, Rafael Wysocki, Tao Wang). - Fix a few minor issues in the generic power domains (genpd) framework and clean it up somewhat (Krzysztof Kozlowski, Mikko Perttunen, Viresh Kumar). - Fix a couple of minor issues in the operating performance points (OPP) framework and clean it up somewhat (Viresh Kumar). - Fix a CONFIG dependency in the hibernation core and clean it up slightly (Balbir Singh, Arvind Yadav, BaoJun Luo). - Add rk3228 support to the rockchip-io adaptive voltage scaling (AVS) driver (David Wu). - Fix an incorrect bit shift operation in the RAPL power capping driver (Adam Lessnau). - Add support for the EPP field in the HWP (hardware managed P-states) control register, HWP.EPP, to the x86_energy_perf_policy tool and update msr-index.h with HWP.EPP values (Len Brown). - Fix some minor issues in the turbostat tool (Len Brown). - Add support for AMD family 0x17 CPUs to the cpupower tool and fix a minor issue in it (Sherry Hurwitz). - Assorted cleanups, mostly related to the constification of some data structures (Arvind Yadav, Joe Perches, Kees Cook, Krzysztof Kozlowski)" * tag 'pm-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (69 commits) cpufreq: Update scaling_cur_freq documentation cpufreq: intel_pstate: Clean up after performance governor changes PM: hibernate: constify attribute_group structures. cpuidle: menu: allow state 0 to be disabled intel_idle: Use more common logging style PM / Domains: Fix missing default_power_down_ok comment PM / Domains: Fix unsafe iteration over modified list of domains PM / Domains: Fix unsafe iteration over modified list of domain providers PM / Domains: Fix unsafe iteration over modified list of device links PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device PM / Domains: Call driver's noirq callbacks PM / core: Drop run_wake flag from struct dev_pm_info PCI / PM: Simplify device wakeup settings code PCI / PM: Drop pme_interrupt flag from struct pci_dev ACPI / PM: Consolidate device wakeup settings code ACPI / PM: Drop run_wake from struct acpi_device_wakeup_flags PM / QoS: constify *_attribute_group. PM / AVS: rockchip-io: add io selectors and supplies for rk3228 powercap/RAPL: prevent overridding bits outside of the mask PM / sysfs: Constify attribute groups ... commit 9e4de6a8eee204af51d9e6a4d87f54c7b8b94f11 Author: Arvind Yadav Date: Fri Jun 30 18:32:49 2017 +0530 ACPI / DPTF: constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 904 496 0 1400 578 drivers/acpi/dptf/dptf_power.o File size After adding 'const': text data bss dec hex filename 944 432 0 1376 560 drivers/acpi/dptf/dptf_power.o Signed-off-by: Arvind Yadav Signed-off-by: Rafael J. Wysocki drivers/acpi/dptf/dptf_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31945d0eb400f793feff61423db71cb6d866715a Author: Arvind Yadav Date: Fri Jun 30 18:23:50 2017 +0530 ACPI / LPSS: constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e53626995d44c58ca148bf56e792d1bdd982e0b Author: Arvind Yadav Date: Fri Jun 30 18:06:34 2017 +0530 ACPI: BGRT: constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Rafael J. Wysocki drivers/acpi/bgrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26408b24345b1afbc08727e7a899d59db0d6f21d Author: Arvind Yadav Date: Fri Jun 30 17:39:05 2017 +0530 ACPI / power: constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 4622 304 8 4934 1346 drivers/acpi/power.o File size After adding 'const': text data bss dec hex filename 4846 80 8 4934 1346 drivers/acpi/power.o Signed-off-by: Arvind Yadav Signed-off-by: Rafael J. Wysocki drivers/acpi/power.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fdd620bd05e08572601bb89116727bb23cf7ce4e Author: Marc Gonzalez Date: Tue Jun 20 10:14:33 2017 +0200 PCI: Add DT binding for Sigma Designs Tango PCIe controller Binding for the Sigma Designs SMP8759 SoC. Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../devicetree/bindings/pci/tango-pcie.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit f4439de118283159ff165e52036134a278ebf990 Author: Amir Goldstein Date: Tue Jul 4 22:04:06 2017 +0300 ovl: mark parent impure and restore timestamp on ovl_link_up() Signed-off-by: Amir Goldstein fs/overlayfs/copy_up.c | 57 +++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 24 deletions(-) commit 9412812ef54861081904f24ddaf176b957b98d40 Author: Amir Goldstein Date: Thu May 25 15:08:24 2017 +0300 ovl: document copying layers restrictions with inodes index The inodes index feature introduces a behavior change - on mount, upper root origin file handle is verified to match the lower root dir. This implies that copied layers cannot be mounted with the inodes index feature enabled, without explicitly removing the upper dir origin xattr and the index dir. The inodes index feature is required to support: - Prevent breaking hardlinks on copy up - NFS export support (upcoming) - Overlayfs snapshots (POC) Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi Documentation/filesystems/overlayfs.txt | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit caf70cb2ba5dff85ea90f494a30075af92df13b0 Author: Amir Goldstein Date: Wed Jun 21 13:46:12 2017 +0300 ovl: cleanup orphan index entries index entry should live only as long as there are upper or lower hardlinks. Cleanup orphan index entries on mount and when dropping the last overlay inode nlink. When about to cleanup or link up to orphan index and the index inode nlink > 1, admit that something went wrong and adjust overlay nlink to index inode nlink - 1 to prevent it from dropping below zero. This could happen when adding lower hardlinks underneath a mounted overlay and then trying to unlink them. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 6 ++--- fs/overlayfs/namei.c | 5 ++++ fs/overlayfs/overlayfs.h | 3 +++ fs/overlayfs/super.c | 2 +- fs/overlayfs/util.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 77 insertions(+), 5 deletions(-) commit 5f8415d6b87ecb4ebf1bbd02c538694ebb7fb57c Author: Amir Goldstein Date: Tue Jun 20 15:35:14 2017 +0300 ovl: persistent overlay inode nlink for indexed inodes With inodes index enabled, an overlay inode nlink counts the union of upper and non-covered lower hardlinks. During the lifetime of a non-pure upper inode, the following nlink modifying operations can happen: 1. Lower hardlink copy up 2. Upper hardlink created, unlinked or renamed over 3. Lower hardlink whiteout or renamed over For the first, copy up case, the union nlink does not change, whether the operation succeeds or fails, but the upper inode nlink may change. Therefore, before copy up, we store the union nlink value relative to the lower inode nlink in the index inode xattr trusted.overlay.nlink. For the second, upper hardlink case, the union nlink should be incremented or decremented IFF the operation succeeds, aligned with nlink change of the upper inode. Therefore, before link/unlink/rename, we store the union nlink value relative to the upper inode nlink in the index inode. For the last, lower cover up case, we simplify things by preceding the whiteout or cover up with copy up. This makes sure that there is an index upper inode where the nlink xattr can be stored before the copied up upper entry is unlink. Return the overlay inode nlinks for indexed upper inodes on stat(2). Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 5 +++ fs/overlayfs/dir.c | 19 +++++++- fs/overlayfs/inode.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++- fs/overlayfs/overlayfs.h | 5 +++ fs/overlayfs/util.c | 66 ++++++++++++++++++++++++++++ 5 files changed, 204 insertions(+), 3 deletions(-) commit 59be09712ab98a3060f13e31343c7abb9bc4583d Author: Amir Goldstein Date: Tue Jun 20 15:25:46 2017 +0300 ovl: implement index dir copy up Implement a copy up method for non-dir objects using index dir to prevent breaking lower hardlinks on copy up. This method requires that the inodes index dir feature was enabled and that all underlying fs support file handle encoding/decoding. On the first lower hardlink copy up, upper file is created in index dir, named after the hex representation of the lower origin inode file handle. On the second lower hardlink copy up, upper file is found in index dir, by the same lower handle key. On either case, the upper indexed inode is then linked to the copy up upper path. The index entry remains linked for future lower hardlink copy up and for lower to upper inode map, that is needed for exporting overlayfs to NFS. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 125 ++++++++++++++++++++++++++++++++++++++----------- fs/overlayfs/inode.c | 13 ++--- fs/overlayfs/util.c | 2 +- 3 files changed, 103 insertions(+), 37 deletions(-) commit fd210b7d67ee3768bf1ad3e07d55797d4b45fcc1 Author: Miklos Szeredi Date: Tue Jul 4 22:03:18 2017 +0200 ovl: move copy up lock out Move ovl_copy_up_start()/ovl_copy_up_end() out so that it's used for both tempfile and workdir copy ups. Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) commit a6fb235a448b8eb731fd6d4de2c5c6269677cf5b Author: Miklos Szeredi Date: Tue Jul 4 22:03:18 2017 +0200 ovl: rearrange copy up Split up and rearrange copy up functions to make them better readable. Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 86 +++++++++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 36 deletions(-) commit 55acc6618259c8ff0a400a131f0f4b613e96010a Author: Miklos Szeredi Date: Tue Jul 4 22:03:18 2017 +0200 ovl: add flag for upper in ovl_entry For rename, we need to ensure that an upper alias exists for hard links before attempting the operation. Introduce a flag in ovl_entry to track the state of the upper alias. Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 1 + fs/overlayfs/dir.c | 1 + fs/overlayfs/namei.c | 4 +++- fs/overlayfs/overlayfs.h | 2 ++ fs/overlayfs/ovl_entry.h | 5 ++++- fs/overlayfs/super.c | 1 + fs/overlayfs/util.c | 19 +++++++++++++++++++ 7 files changed, 31 insertions(+), 2 deletions(-) commit 23f0ab13eaa69b4a351184cbec448be2aad3a3a9 Author: Miklos Szeredi Date: Tue Jul 4 22:03:18 2017 +0200 ovl: use struct copy_up_ctx as function argument This cleans up functions with too many arguments. Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 160 ++++++++++++++++++++++++------------------------- 1 file changed, 78 insertions(+), 82 deletions(-) commit 7ab8b1763fd84ff4e7263ed7f5c728e4cb3f364a Author: Miklos Szeredi Date: Tue Jul 4 22:03:18 2017 +0200 ovl: base tmpfile in workdir too Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 02209d10709c18d552c2494df74117db09a18e05 Author: Amir Goldstein Date: Fri May 19 15:16:21 2017 +0300 ovl: factor out ovl_copy_up_inode() helper Factor out helper for copying lower inode data and metadata to temp upper inode, that is common to copy up using O_TMPFILE and workdir. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit 7d90b853f932874f0b348858fddbd41f022179ee Author: Miklos Szeredi Date: Tue Jul 4 22:03:18 2017 +0200 ovl: extract helper to get temp file in copy up Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 59 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 18 deletions(-) commit 15932c415b3ed20bd1c1e05d071b4ad498656280 Author: Amir Goldstein Date: Tue May 16 01:26:49 2017 +0300 ovl: defer upper dir lock to tempfile link On copy up of regular file using an O_TMPFILE, lock upper dir only before linking the tempfile in place. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 67 ++++++++++++++++++++++++++++---------------------- fs/overlayfs/util.c | 1 - 2 files changed, 38 insertions(+), 30 deletions(-) commit b9ac5c274b8c9d642567022c0e319bca4db31956 Author: Miklos Szeredi Date: Tue Jul 4 22:03:17 2017 +0200 ovl: hash overlay non-dir inodes by copy up origin Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 46 +++++++++++++++++++++++++++++++++++++++++----- fs/overlayfs/namei.c | 4 ++-- fs/overlayfs/util.c | 3 +-- 3 files changed, 44 insertions(+), 9 deletions(-) commit 415543d5c64fe490b4b6a7e21c3ea2f1310c442f Author: Amir Goldstein Date: Wed Jun 21 15:28:42 2017 +0300 ovl: cleanup bad and stale index entries on mount Bad index entries are entries whose name does not match the origin file handle stored in trusted.overlay.origin xattr. Bad index entries could be a result of a system power off in the middle of copy up. Stale index entries are entries whose origin file handle is stale. Stale index entries could be a result of copying layers or removing lower entries while the overlay is not mounted. The case of copying layers should be detected earlier by the verification of upper root dir origin and index dir origin. Both bad and stale index entries are detected and removed on mount. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 4 ++- fs/overlayfs/namei.c | 74 ++++++++++++++++++++++++++++++++++++++++++------ fs/overlayfs/overlayfs.h | 6 +++- fs/overlayfs/readdir.c | 50 ++++++++++++++++++++++++++++++++ fs/overlayfs/super.c | 6 ++++ 5 files changed, 130 insertions(+), 10 deletions(-) commit 359f392ca53e9122cafa5fc103545558b0b85d54 Author: Amir Goldstein Date: Wed Jun 21 15:28:41 2017 +0300 ovl: lookup index entry for copy up origin When inodes index feature is enabled, lookup in indexdir for the index entry of lower real inode or copy up origin inode. The index entry name is the hex representation of the lower inode file handle. If the index dentry in negative, then either no lower aliases have been copied up yet, or aliases have been copied up in older kernels and are not indexed. If the index dentry for a copy up origin inode is positive, but points to an inode different than the upper inode, then either the upper inode has been copied up and not indexed or it was indexed, but since then index dir was cleared. Either way, that index cannot be used to indentify the overlay inode. If a positive dentry that matches the upper inode was found, then it is safe to use the copy up origin st_ino for upper hardlinks, because all indexed upper hardlinks are represented by the same overlay inode as the copy up origin. Set the INDEX type flag on an indexed upper dentry. A non-upper dentry may also have a positive index from copy up of another lower hardlink. This situation will be handled by following patches. Index lookup is going to be used to prevent breaking hardlinks on copy up. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 8 +++- fs/overlayfs/namei.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++ fs/overlayfs/overlayfs.h | 2 + 3 files changed, 116 insertions(+), 2 deletions(-) commit 54fb347e836faadaed2a5617fb4dd4a4597d0490 Author: Amir Goldstein Date: Wed Jun 21 15:28:38 2017 +0300 ovl: verify index dir matches upper dir An index dir contains persistent hardlinks to files in upper dir. Therefore, we must never mount an existing index dir with a differnt upper dir. Store the upper root dir file handle in index dir inode when index dir is created and verify the file handle before using an existing index dir on mount. Add an 'is_upper' flag to the overlay file handle encoding and set it when encoding the upper root file handle. This is not critical for index dir verification, but it is good practice towards a standard overlayfs file handle format for NFS export. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 12 ++++++++++-- fs/overlayfs/namei.c | 4 ++-- fs/overlayfs/overlayfs.h | 6 ++++-- fs/overlayfs/super.c | 13 +++++++++++-- 4 files changed, 27 insertions(+), 8 deletions(-) commit 8b88a2e6403638b56556ed5b1c60d9318eefea9c Author: Amir Goldstein Date: Wed Jun 21 15:28:37 2017 +0300 ovl: verify upper root dir matches lower root dir When inodes index feature is enabled, verify that the file handle stored in upper root dir matches the lower root dir or fail to mount. If upper root dir has no stored file handle, encode and store the lower root dir file handle in overlay.origin xattr. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/namei.c | 103 ++++++++++++++++++++++++++++++++++++++++------- fs/overlayfs/overlayfs.h | 3 ++ fs/overlayfs/super.c | 8 ++++ 4 files changed, 101 insertions(+), 15 deletions(-) commit 02bcd1577400b0b2eab806ccb9f72d6b5ec7bcca Author: Amir Goldstein Date: Wed Jun 21 15:28:36 2017 +0300 ovl: introduce the inodes index dir feature Create the index dir on mount. The index dir will contain hardlinks to upper inodes, named after the hex representation of their origin lower inodes. The index dir is going to be used to prevent breaking lower hardlinks on copy up and to implement overlayfs NFS export. Because the feature is not fully backward compat, enabling the feature is opt-in by config/module/mount option. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/Kconfig | 20 +++++++++++++++ fs/overlayfs/copy_up.c | 9 +++---- fs/overlayfs/overlayfs.h | 2 ++ fs/overlayfs/ovl_entry.h | 3 +++ fs/overlayfs/super.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++-- fs/overlayfs/util.c | 15 +++++++++++ 6 files changed, 108 insertions(+), 7 deletions(-) commit 6b8aa129dcbe0e9825109b35c4b967f984e8fb13 Author: Amir Goldstein Date: Wed Jun 21 15:28:35 2017 +0300 ovl: generalize ovl_create_workdir() Pass in the subdir name to create and specify if subdir is persistent or if it should be cleaned up on every mount. Move fallback to readonly mount on failure to create dir and print of error message into the helper. This function is going to be used for creating the persistent 'index' dir under workbasedir. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit f7d3daca7c79d9b77e61f50f718b257b71d07498 Author: Amir Goldstein Date: Wed Jun 21 15:28:34 2017 +0300 ovl: relax same fs constrain for ovl_check_origin() For the case of all layers not on the same fs, try to decode the copy up origin file handle on any of the lower layers. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit 2cac0c00a6cdcc9121de150ed531f652396d1544 Author: Amir Goldstein Date: Wed Jun 21 15:28:33 2017 +0300 ovl: get exclusive ownership on upper/work dirs Bad things can happen if several concurrent overlay mounts try to use the same upperdir/workdir path. Try to get the 'inuse' advisory lock on upperdir and workdir. Fail mount if another overlay mount instance or another user holds the 'inuse' lock on these directories. Note that this provides no protection for concurrent overlay mount that use overlapping (i.e. descendant) upper/work dirs. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/ovl_entry.h | 3 +++ fs/overlayfs/super.c | 29 ++++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) commit ad0af7104dadccd55cd2b390271677fac142650f Author: Amir Goldstein Date: Wed Jun 21 15:28:32 2017 +0300 vfs: introduce inode 'inuse' lock Added an i_state flag I_INUSE and helpers to set/clear/test the bit. The 'inuse' lock is an 'advisory' inode lock, that can be used to extend exclusive create protection beyond parent->i_mutex lock among cooperating users. This is going to be used by overlayfs to get exclusive ownership on upper and work dirs among overlayfs mounts. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 2 ++ fs/overlayfs/util.c | 31 +++++++++++++++++++++++++++++++ include/linux/fs.h | 4 ++++ 3 files changed, 37 insertions(+) commit 04a01ac7ed3c5cd718713ef6341249a143c96b10 Author: Miklos Szeredi Date: Tue Jul 4 22:03:16 2017 +0200 ovl: move cache and version to ovl_inode Signed-off-by: Miklos Szeredi fs/overlayfs/ovl_entry.h | 8 +++----- fs/overlayfs/super.c | 2 ++ fs/overlayfs/util.c | 20 ++++++++------------ 3 files changed, 13 insertions(+), 17 deletions(-) commit a015dafcaf5b0316654a39bc598a76804595af90 Author: Amir Goldstein Date: Wed Jun 21 15:28:51 2017 +0300 ovl: use ovl_inode mutex to synchronize concurrent copy up Use the new ovl_inode mutex to synchonize concurrent copy up instead of the super block copy up workqueue. Moving the synchronization object from the overlay dentry to the overlay inode is needed for synchonizing concurrent copy up of lower hardlinks to the same upper inode. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/ovl_entry.h | 5 +++-- fs/overlayfs/super.c | 3 ++- fs/overlayfs/util.c | 23 ++++++----------------- 3 files changed, 11 insertions(+), 20 deletions(-) commit 13c72075ac9f5a5cf3f61c85adaafffe48a6f797 Author: Miklos Szeredi Date: Tue Jul 4 22:03:16 2017 +0200 ovl: move impure to ovl_inode Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 4 ++++ fs/overlayfs/namei.c | 4 ---- fs/overlayfs/overlayfs.h | 7 ++++++- fs/overlayfs/ovl_entry.h | 2 +- fs/overlayfs/super.c | 4 +++- fs/overlayfs/util.c | 22 ++++++++++++---------- 6 files changed, 26 insertions(+), 17 deletions(-) commit cf31c46347e8e54cb53d66255ae3eea045b0a60c Author: Miklos Szeredi Date: Tue Jul 4 22:03:16 2017 +0200 ovl: move redirect to ovl_inode Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 3 ++- fs/overlayfs/ovl_entry.h | 2 +- fs/overlayfs/super.c | 3 ++- fs/overlayfs/util.c | 10 ++++------ 4 files changed, 9 insertions(+), 9 deletions(-) commit 09d8b586731bf589655c2ac971532c14cf272b63 Author: Miklos Szeredi Date: Tue Jul 4 22:03:16 2017 +0200 ovl: move __upperdentry to ovl_inode Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 3 +- fs/overlayfs/dir.c | 8 ++--- fs/overlayfs/inode.c | 26 +++++++++----- fs/overlayfs/namei.c | 7 ++-- fs/overlayfs/overlayfs.h | 12 ++++--- fs/overlayfs/ovl_entry.h | 13 ++++--- fs/overlayfs/super.c | 15 ++++---- fs/overlayfs/util.c | 89 +++++++++++++++++------------------------------- 8 files changed, 79 insertions(+), 94 deletions(-) commit 9020df37207867272e590a416c2fb3da0e5383c6 Author: Miklos Szeredi Date: Tue Jul 4 22:03:16 2017 +0200 ovl: compare inodes When checking for consistency in directory operations (unlink, rename, etc.) match inodes not dentries. Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 25b7713afe50963e70f98c1c964f60baf1e7e373 Author: Miklos Szeredi Date: Tue Jul 4 22:03:16 2017 +0200 ovl: use i_private only as a key Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 4 ++-- fs/overlayfs/overlayfs.h | 13 +------------ fs/overlayfs/ovl_entry.h | 2 ++ fs/overlayfs/super.c | 3 +++ fs/overlayfs/util.c | 35 +++++++++++++++++++++++++++++------ 5 files changed, 37 insertions(+), 20 deletions(-) commit e6d2ebddbc5205635a021a910f2f0e93bc2aa534 Author: Miklos Szeredi Date: Tue Jul 4 22:03:16 2017 +0200 ovl: simplify getting inode Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 26 ++++++++++++++++++-------- fs/overlayfs/namei.c | 30 +++++++++--------------------- fs/overlayfs/overlayfs.h | 5 ++--- fs/overlayfs/super.c | 5 +---- fs/overlayfs/util.c | 7 ++++++- 5 files changed, 36 insertions(+), 37 deletions(-) commit 13cf199d0088b77ab08a9594df2e73e775317ed2 Author: Amir Goldstein Date: Mon Jun 12 09:54:40 2017 +0300 ovl: allocate an ovl_inode struct We need some more space to store overlay inode data in memory, so allocate overlay inodes from a slab of struct ovl_inode. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/ovl_entry.h | 9 ++++++++ fs/overlayfs/super.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 63 insertions(+), 2 deletions(-) commit f681eb1d5c02c9e79775e10363057d034c720efc Author: Amir Goldstein Date: Mon Jun 5 22:44:49 2017 +0300 ovl: fix nlink leak in ovl_rename() This patch fixes an overlay inode nlink leak in the case where ovl_rename() renames over a non-dir. This is not so critical, because overlay inode doesn't rely on nlink dropping to zero for inode deletion. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 106c9c77edfba86812def8cbd12cf5f60b94ec30 Author: Arvind Yadav Date: Mon Jul 3 13:40:33 2017 +0530 cpufreq: intel_pstate: constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 15197 2552 40 17789 457d drivers/cpufreq/intel_pstate.o File size After adding 'const': text data bss dec hex filename 15261 2488 40 17789 457d drivers/cpufreq/intel_pstate.o Signed-off-by: Arvind Yadav Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 402202e8deac760aec1b54d96183f37047a51a45 Author: Arvind Yadav Date: Mon Jul 3 13:29:04 2017 +0530 cpufreq: cpufreq_stats: constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 1655 256 4 1915 77b drivers/cpufreq/cpufreq_stats.o File size After adding 'const': text data bss dec hex filename 1695 192 4 1891 763 drivers/cpufreq/cpufreq_stats.o Signed-off-by: Arvind Yadav Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d0c6e593023ac5dafc2ea2b3f23d96f1c1f2fa2 Author: Arvind Yadav Date: Fri Jun 30 10:22:14 2017 +0530 PM / sleep: constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 3802 624 32 4458 116a kernel/power/main.o File size After adding 'const': text data bss dec hex filename 3866 560 32 4458 116a kernel/power/main.o Signed-off-by: Arvind Yadav Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki kernel/power/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af3eb27433356ed4b6e124fd446a425a0ccf4e49 Author: Arnd Bergmann Date: Fri Jun 30 18:06:57 2017 +0200 PM / Domains: provide pm_genpd_poweroff_noirq() stub When CONFIG_PM_SLEEP is disabled, we don't have a pm_genpd_poweroff_noirq function definition: drivers/base/power/domain.c: In function 'pm_genpd_init': drivers/base/power/domain.c:1549:37: error: 'pm_genpd_poweroff_noirq' undeclared (first use in this function); did you mean 'genpd_power_off_unused'? This adds another NULL definition for it, just like we already have for the other _noirq handlers. Fixes: 10da65423fdb (PM / Domains: Call driver's noirq callbacks) Signed-off-by: Arnd Bergmann Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 1 + 1 file changed, 1 insertion(+) commit 23c6d2c73f4c7b1074e21fb3be8220fd677b1f7e Author: Rafael J. Wysocki Date: Tue Jul 4 21:55:13 2017 +0200 Revert "PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device" Revert commit 8b55e55ee443 (PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device) which was misguided (the change made by it was not necessary) and it introduced a call to a function that may sleep into an atomic context code path. Reported-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d429e5c12269a930b81d8b57b788bbe3cf12e815 Author: Lee, Chun-Yi Date: Mon Jul 3 21:26:10 2017 +0800 ACPI / scan: Indicate to platform when hot remove returns busy In hotplug logic, it always indicates non-specific failure to platform through _OST when handing ACPI hot-remove event failed. Then platform terminates the hot-remove process but it can not identify the reason. Base on current hot-remove code, there have two situations that it returns busy: - OSPM try to offline an individual device, but the device offline function returns "busy". - When the ejection event is applied to an "not offlined yet" container. OSPM sends a kobject change event to userspace and returns "busy". Both of them will returns -EBUSY to ACPI device hotplug function. Then, the hotplug function indicates non-specific failure to platform just like for any other error, e.g. -ENODEV or -EIO. The benefit to the platform for identifying the OS "busy" state is that it can use a different approach to handle the "busy" instead of simply terminating the hot-remove operation for an unknown reason. For example, the platform can wait for a while and then re-trigger hot-remove. Signed-off-by: "Lee, Chun-Yi" Reviewed-by: Andy Shevchenko [ rjw: Changelog massage ] Signed-off-by: Rafael J. Wysocki drivers/acpi/scan.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 9a4d8d60df3bc26236fa9cc3bc806ff99e5e5625 Author: Lee, Chun-Yi Date: Fri Jun 30 15:25:38 2017 +0800 ACPI / bus: handle ACPI hotplug schedule errors completely Kernel should decrements the reference count of ACPI device when the scheduling of ACPI hotplug work failed, and evaluates _OST to notify BIOS the failure. Reviewed-by: Andy Shevchenko Signed-off-by: "Lee, Chun-Yi" Signed-off-by: Rafael J. Wysocki drivers/acpi/bus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5438bc573a2cd93f9e28acc71db50d89ce72eb64 Author: Colin Ian King Date: Thu Jun 29 10:49:25 2017 +0100 ACPI / osi: Make local function acpi_osi_dmi_linux() static The function acpi_osi_dmi_linux() is local and does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'acpi_osi_dmi_linux' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/osi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 631b010abc5b57009c6a8328f51492665f6ef310 Author: Hans de Goede Date: Fri Jun 30 19:42:54 2017 +0200 iio: adc: Revert "axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications" Inheriting the ADC BIAS current settings from the BIOS instead of hardcoding then causes the AXP288 to disable charging (I think it mis-detects an overheated battery) on at least one model tablet. So lets go back to hard coding the values, this reverts commit fa2849e9649b ("iio: adc: axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications"), fixing charging not working on the model tablet in question. The exact cause is not fully understood, hence the revert to a known working state. Cc: stable@vger.kernel.org Reported-by: Umberto Ixxo Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron drivers/iio/adc/axp288_adc.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 79a648328d2a604524a30523ca763fbeca0f70e3 Author: Loc Ho Date: Mon Jul 3 14:33:09 2017 -0700 ACPI: SPCR: Workaround for APM X-Gene 8250 UART 32-alignment errata APM X-Gene verion 1 and 2 have an 8250 UART with its register aligned to 32-bit. In addition, the latest released BIOS encodes the access field as 8-bit access instead 32-bit access. This causes no console with ACPI boot as the console will not match X-Gene UART port due to the lack of mmio32 option. Signed-off-by: Loc Ho Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki drivers/acpi/spcr.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 2bece49394872d36bbc5767fd643deac05920c55 Author: Loc Ho Date: Mon Jul 3 14:33:08 2017 -0700 ACPI: SPCR: Use access width to determine mmio usage The current SPCR code does not check the access width of the MMIO, and uses a default of 8bit register accesses. This prevents devices that only do 16 or 32bit register accesses from working. By simply checking this field and setting the MMIO string appropriately, this issue can be corrected. To prevent any legacy issues, the code will default to 8bit accesses if the value is anything but 16 or 32. Signed-off-by: Jon Mason Signed-off-by: Loc Ho Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki drivers/acpi/spcr.c | 18 ++++++++++++++++-- include/acpi/acrestyp.h | 7 +++++++ 2 files changed, 23 insertions(+), 2 deletions(-) commit be2ea53330f1865ac5b00377f2074f8e255bf74c Author: Quentin Schulz Date: Mon Jul 3 15:09:26 2017 +0200 iio: adc: sun4i-gpadc-iio: fix unbalanced irq enable/disable When initializing interrupts, the devm_request_any_context_irq will enable them right away. An atomic flag was set in sun4i_irq_init and read in the interrupt handler to make sure no unwanted interrupts were handled. If an unwanted interrupt occurred, the handler would disable the irq and return IRQ_HANDLED. However, at the end of sun4i_irq_init, the irq would be disabled as well, resulting in an unbalanced enable (since there are more disables than enables, the code enabling the interrupt would never be called). When reading the ADC or the temperature, the respective irq would be enabled in the read function and disabled in the irq handler. In the read function, we would wait for a completion (with a timeout) that will be set in the irq handler. However, if the completion is never set or if the wait for completion times out, the irq would not be disabled in the read function resulting in an unbalanced enable once the read function is called again (since there are 2+ enables for no disable). Moving disable_irq from the irq handler to the read function get rid of these two cases of unbalanced enable. Fixes: d1caa9905538 ("iio: adc: add support for Allwinner SoCs ADC") Reported-by: Andreas Färber Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Signed-off-by: Jonathan Cameron drivers/iio/adc/sun4i-gpadc-iio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ecebcd4da6cde7bfcde62d06488faba164b70b37 Author: Jonathan Corbet Date: Tue Jul 4 13:16:41 2017 -0600 docs: Do not include from kernel/rcu/srcu.c That file went away with commit bd8cc5a062f4 (srcu: Remove Classic SRCU) during the 4.13 merge window, leading to errors like: Error: Cannot open file ./kernel/rcu/srcu.c during the docs build. Reported-by: Linus Torvalds Signed-off-by: Jonathan Corbet Documentation/driver-api/basics.rst | 3 --- 1 file changed, 3 deletions(-) commit b39de277b02ffd8e3dccb01e9159bd45cb07b95d Merge: d62eb5e 082f696 Author: Linus Torvalds Date: Tue Jul 4 12:01:07 2017 -0700 Merge tag 'spi-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "There's only one big change in this release but it's a very big change: Geert Uytterhoeven has implemented support for SPI slave mode. This feature has been on the cards since the subsystem was originally merged back in the mists of time so it's great that Geert stepped up and finally implemented it. - SPI slave support, together with wholesale renaming of SPI controllers from master to controller which went surprisingly smoothly. This is already used with Renesas SoCs and support is in the works for i.MX too. - New drivers for Meson SPICC and ST STM32" * tag 'spi-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (57 commits) spi: loopback-test: Fix kfree() NULL pointer error. spi: loopback-test: fix spelling mistake: "reruning" -> "rerunning" spi: sirf: fix spelling mistake: "registerred" -> "registered" spi: stm32: fix potential dereference null return value spi: stm32: enhance DMA error management spi: stm32: add runtime PM support spi: stm32: use normal conditional statements instead of ternary operator spi: stm32: replace st, spi-midi with st, spi-midi-ns to fit bindings spi: stm32: fix example with st, spi-midi-ns property spi: stm32: fix compatible to fit with new bindings spi: stm32: use SoC specific compatible spi: rockchip: Disable Runtime PM when chip select is asserted spi: rockchip: Set GPIO_SS flag to enable Slave Select with GPIO CS spi: atmel: fix corrupted data issue on SAM9 family SoCs spi: stm32: fix error check on mbr being -ve spi: add driver for STM32 SPI controller spi: Document the STM32 SPI bindings spi/bcm63xx: Fix checkpatch warnings spi: imx: Check for allocation failure earlier spi: mediatek: add spi support for mt2712 IC ... commit d62eb5edf6643ede7e48b4d03ba972c0e8949acc Merge: 36b8042 8d67f64 Author: Linus Torvalds Date: Tue Jul 4 11:55:21 2017 -0700 Merge tag 'regulator-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "A quiet release for the regulator API, a series of fairly small fixes plus one new feature and a few new drivers: - Support for regulators with different settling times for rising and falling voltage changes. - New drivers for Allwinner AXP803, HiSilicon HI6421V530 and TI LP87565" * tag 'regulator-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (21 commits) regulator: core: Fix size limit of supply_map regulator: core: Fix voltage change propagations to supply regulators regulator: lp87565: Fix the initial voltage range regulator: tps65910: wire up sleep control configuration regulator: hi6421v530: Describe consumed platform device regulator: tps65910: check TPS65910_NUM_REGS at build time regulator: core: Prioritise consumer mappings over regulator name regulator: lp87565: Fix the GPL header regulator: hi6421: Describe consumed platform device regulator: hi6421v530: add driver for hi6421v530 voltage regulator regulator: da9061: BUCK and LDO regulator driver regulator: bd9571mwv: Statize local symbols regulator: tps65917: Add support for SMPS12 regulator: lp87565: Add support for lp87565 PMIC regulators regulator: axp20x-regulator: add support for AXP803 regulator: lp8755: fix spelling mistake "acceess" -> "access" regulator: Allow for asymmetric settling times regulator: DT: Add properties for asymmetric settling times regulator: palmas: Drop unnecessary static MAINTAINERS: Update MAX77802 PMIC entry ... commit 36b8042262e7fbabf62ab300361399bec6499b6f Merge: 24d734a 2a40f94 Author: Linus Torvalds Date: Tue Jul 4 11:50:07 2017 -0700 Merge tag 'regmap-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "The usual small smattering of activity for regmap this time round: - Addition of support for the 1-Wire bus standard. - Options that allow support for more interrupt controllers with regmap-irq. - Only build LZO cache support if it's actually being used" * tag 'regmap-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: irq: add chip option mask_writeonly regmap: irq: allow to register one cell interrupt controllers regmap: Fix typo in IS_ENABLED() check regmap: Add 1-Wire bus support regmap: make LZO cache optional commit 24d734a2ba5133f55feb7f7df7530d4f5aa6518f Merge: 17ece34 44b4136 Author: Linus Torvalds Date: Tue Jul 4 11:48:27 2017 -0700 Merge tag 'hwmon-for-linus-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - Add PMBus client driver for IR35221 - Add support for NCT6795D to nct6775 driver - Functional improvements to adt7475, aspeed-pwm-tacho, and ibmpowernv drivers - Minor fixes and cleanups in various drivers * tag 'hwmon-for-linus-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (22 commits) hwmon: (aspeed-pwm-tacho) Poll with short sleeps. hwmon: (aspeed-pwm-tacho) reduce fan_tach period hwmon: (ibmpowernv) Add current(A) sensor hwmon: (ibmpowernv) introduce a legacy_compatibles array hwmon: (pwm-fan) Switch to new atomic PWM API hwmon: (scpi) Fix the scale of SCP sensor readings hwmon: (aspeed-pwm-tacho) Enable both edge measurement. hwmon: (ibmpowernv) Add highest/lowest attributes to sensors hwmon: (pmbus) move header file out of I2C realm hwmon: (max6639) move header file out of I2C realm hwmon: (ltc4245) move header file out of I2C realm hwmon: (ds620) move header file out of I2C realm hwmon: (ads1015) move header file out of I2C realm hwmon: (adt7475) temperature smoothing hwmon: (adt7475) add high frequency support hwmon: (adt7475) fan stall prevention hwmon: (adt7475) replace find_nearest() with find_closest() hwmon: (pmbus) Add client driver for IR35221 hwmon: (nct6775) Add support for NCT6795D hwmon: (nct6775) Improve fan detection ... commit 17ece345a042347224e50032e959ad3959638b21 Merge: 650fc87 e47c0b9 Author: Linus Torvalds Date: Tue Jul 4 11:11:56 2017 -0700 Merge tag 'mmc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Add support to enable irq wake for slot gpio - Remove MMC_CAP2_HC_ERASE_SZ and make it the default behaviour - Improve R1 response error checks for stop commands - Cleanup and clarify some MMC specific code - Keep card runtime resumed while adding SDIO function devices - Use device_property_read instead of of_property_read in mmc_of_parse() - Move boot partition locking into a driver op to enable proper I/O scheduling - Move multi/single-ioctl() to use block layer to enable proper I/O scheduling - Delete bounce buffer Kconfig option - Improve the eMMC HW reset support provided via the eMMC pwrseq - Add host API to manage SDIO IRQs from a workqueue MMC host: - dw_mmc: Drop support for multiple slots - dw_mmc: Use device_property_read instead of of_property_read - dw_mmc-rockchip: Optional improved tuning to greatly decrease tuning time - dw_mmc: Prevent rpm suspend for SDIO IRQs instead of always for SDIO cards - dw_mmc: Convert to use MMC_CAP2_SDIO_IRQ_NOTHREAD for SDIO IRQs - omap_hsmmc: Convert to mmc regulator APIs to consolidate code - omap_hsmmc: Deprecate "vmmc_aux" in DT and use "vqmmc" instead - tmio: make sure SDIO gets reinitialized after resume - sdhi: add CMD23 support to R-Car Gen2 & Gen3 - tmio: add CMD23 support - sdhi/tmio: Refactor code and rename files to simplify Kconfig options - sdhci-pci: Enable card detect wake for Intel BYT-related SD controllers - sdhci-pci: Add support for Intel CNP - sdhci-esdhc-imx: Remove ENGcm07207 workaround - allow multi block transfers - sdhci-esdhc-imx: Allow all supported prescaler values - sdhci-esdhc-imx: Fix DAT line software reset - sdhci-esdhc: Add SDHCI_QUIRK_32BIT_DMA_ADDR - atmel-mci: Drop AVR32 support" * tag 'mmc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (86 commits) mmc: dw_mmc: remove the unnecessary slot variable mmc: dw_mmc: use the 'slot' instead of 'cur_slot' mmc: dw_mmc: remove the 'id' arguments about functions relevant to slot mmc: dw_mmc: change the array of slots mmc: dw_mmc: remove the loop about finding slots mmc: dw_mmc: deprecated the "num-slots" property mmc: dw_mmc-rockchip: parse rockchip, desired-num-phases from DT dt-bindings: rockchip-dw-mshc: add optional rockchip, desired-num-phases mmc: renesas-sdhi: improve checkpatch cleanness mmc: tmio: improve checkpatch cleanness mmc: sdhci-pci: Enable card detect wake for Intel BYT-related SD controllers mmc: slot-gpio: Add support to enable irq wake on cd_irq mmc: core: Remove MMC_CAP2_HC_ERASE_SZ mmc: core: for data errors, take response of stop cmd into account mmc: core: check also R1 response for stop commands mmc: core: Clarify code for sending CSD mmc: core: Drop mmc_all_send_cid() and use mmc_send_cxd_native() instead mmc: core: Re-factor code for sending CID mmc: core: Remove redundant code in mmc_send_cid() mmc: core: Make mmc_can_reset() static ... commit 119d0312c766773ca3238b9d926077664eed22be Author: Al Viro Date: Thu May 25 16:28:49 2017 -0400 kill __copy_in_user() no users left Signed-off-by: Al Viro include/linux/uaccess.h | 6 ------ 1 file changed, 6 deletions(-) commit f2cffa223afaca0c8297793581bb857dc364542c Merge: 8d1a81a aeba039 Author: Al Viro Date: Tue Jul 4 13:31:18 2017 -0400 Merge branch 'work.drm' into work.__copy_in_user commit aeba03903063e9fea885d32318e1546d9b7e83a8 Author: Al Viro Date: Sat Jun 3 21:33:26 2017 -0400 mga: switch compat ioctls to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioctl.c | 1 + drivers/gpu/drm/mga/mga_drv.h | 2 + drivers/gpu/drm/mga/mga_ioc32.c | 149 ++++++++++++++++------------------------ drivers/gpu/drm/mga/mga_state.c | 2 +- 4 files changed, 64 insertions(+), 90 deletions(-) commit ff32d39b158a27b6a0f1bd6207ad31946c7043e0 Author: Al Viro Date: Sat Jun 3 16:19:18 2017 -0400 radeon: take out dead compat ioctls Compat wrappers in radeon_ioc32.c had been unreachable since "drm/radeon: remove UMS support" has removed radeon_driver_old_fops. Signed-off-by: Al Viro drivers/gpu/drm/radeon/Makefile | 1 - drivers/gpu/drm/radeon/radeon_drv.c | 18 +- drivers/gpu/drm/radeon/radeon_ioc32.c | 424 ---------------------------------- 3 files changed, 16 insertions(+), 427 deletions(-) commit 9cc73ce287c9de21f7ecd5c2b7952227528b8e28 Author: Al Viro Date: Thu May 25 23:25:07 2017 -0400 drm compat: ia64 is not biarch Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88e3cb07857584a20f66dce5e4a21b43ebbc967e Author: Al Viro Date: Thu May 25 16:27:27 2017 -0400 drm_compat_ioctl(): tidy up a bit Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 87d3ce1169d329bc4cab41996fccb68c06b5725b Author: Al Viro Date: Thu May 25 16:24:20 2017 -0400 switch compat_drm_mapbufs() to drm_ioctl_kernel() Another horror like addbufs; this one is even uglier. With that done, drm_ioc32.c should be sane. Signed-off-by: Al Viro drivers/gpu/drm/drm_bufs.c | 68 ++++++++++++++++++++++++------------------ drivers/gpu/drm/drm_ioc32.c | 70 +++++++++++++++++++++----------------------- drivers/gpu/drm/drm_legacy.h | 4 +++ 3 files changed, 77 insertions(+), 65 deletions(-) commit 6113252dd0c70486f67e1e3c5cac643828d238d6 Author: Al Viro Date: Thu May 25 15:47:44 2017 -0400 switch compat_drm_rmmap() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit d6c5661321fc1ec33b37dbf115834250ff542325 Author: Al Viro Date: Thu May 25 15:45:04 2017 -0400 switch compat_drm_mode_addfb2() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) commit d5288c88c67c388091fa0281640b586b4941e3d5 Author: Al Viro Date: Thu May 25 13:33:11 2017 -0400 switch compat_drm_wait_vblank() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 1a36bf1da632670f9b0a1fc0d63dd65e0ad2483d Author: Al Viro Date: Thu May 25 13:28:51 2017 -0400 switch compat_drm_update_draw() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 314ed7368cfcdf7936f2fa35dc48840344371847 Author: Al Viro Date: Thu May 25 13:24:59 2017 -0400 compat_drm: switch sg ioctls Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit e92673eddeadfa599b57e13fc0c26b03ed939479 Author: Al Viro Date: Thu May 25 13:17:17 2017 -0400 compat_drm: switch AGP compat ioctls to drm_ioctl_kernel() [folded a fix from Colin King] Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 109 ++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 65 deletions(-) commit f8f8a727eab1c5b78c3703a461565b042979cc79 Author: Al Viro Date: Tue Jun 27 18:34:53 2017 -0400 get_compat_bpf_fprog(): don't copyin field-by-field Signed-off-by: Al Viro net/compat.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 5da028a8af38eced330332d5ae51c212e9e86242 Author: Al Viro Date: Tue Jun 27 18:24:21 2017 -0400 get_compat_msghdr(): get rid of field-by-field copyin Signed-off-by: Al Viro net/compat.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit ffb07550c76f70b8fa5e57352e7e299f4811f0a0 Author: Al Viro Date: Tue Jun 27 19:32:04 2017 -0400 copy_msghdr_from_user(): get rid of field-by-field copyin Signed-off-by: Al Viro net/socket.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit 0d0606060baefdb13d3d80dba1b4c816b0676e16 Author: Al Viro Date: Tue Jun 27 21:32:36 2017 -0400 mqueue: move compat syscalls to native ones ... and stop messing with compat_alloc_user_space() and friends [braino fix from Colin King folded in] Signed-off-by: Al Viro ipc/Makefile | 3 +- ipc/compat_mq.c | 138 ---------------------- ipc/mqueue.c | 349 ++++++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 262 insertions(+), 228 deletions(-) commit 53efaf562af31142d57c3c56b10f2c88ebb215f7 Author: Michel Dänzer Date: Fri Jun 30 17:36:07 2017 +0900 amdgpu: Set cik/si_support to 1 by default if radeon isn't built It was required to explicitly set these parameters to 1, even if the radeon driver isn't built at all, which is not intuitive. Reported-by: Shawn Starr Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7542a046bfddbaadc15f5f3e1845fd333604a5b8 Merge: b51cb82 fdc71ce Author: Bjorn Helgaas Date: Tue Jul 4 11:01:01 2017 -0500 Merge branch 'pci/host-xilinx' into next * pci/host-xilinx: PCI: xilinx: Make of_device_ids const PCI: xilinx-nwl: Modify IRQ chip for legacy interrupts commit b51cb82c49f3be56a54939fba917bcf005b23692 Merge: 10fc139 0cb259c4 Author: Bjorn Helgaas Date: Tue Jul 4 11:01:00 2017 -0500 Merge branch 'pci/host-vmd' into next * pci/host-vmd: PCI: vmd: Move SRCU cleanup after bus, child device removal PCI: vmd: Correct comment: VMD domains start at 0x10000, not 0x1000 commit 10fc139f2d6a37f6e7d8fb68b6e497b1fdf4e00d Merge: 1fb3d7d 7d630aa Author: Bjorn Helgaas Date: Tue Jul 4 11:01:00 2017 -0500 Merge branch 'pci/host-versatile' into next * pci/host-versatile: PCI: versatile: Add local struct device pointers commit 1fb3d7d5e19573cdf0fa980178bea96ac737fcd0 Merge: 01a9259 d7bd554 Author: Bjorn Helgaas Date: Tue Jul 4 11:00:59 2017 -0500 Merge branch 'pci/host-tegra' into next * pci/host-tegra: PCI: tegra: Do not allocate MSI target memory PCI: tegra: Support MSI 64-bit addressing commit 01a9259bc554f1e450016f36bdb832328a17257b Merge: 66a63e1 dc8cca5 Author: Bjorn Helgaas Date: Tue Jul 4 11:00:59 2017 -0500 Merge branch 'pci/host-rockchip' into next * pci/host-rockchip: PCI: rockchip: Use normal register bank for config accessors PCI: rockchip: Use local struct device pointer consistently PCI: rockchip: Check for clk_prepare_enable() errors during resume MAINTAINERS: Remove Wenrui Li as Rockchip PCIe driver maintainer PCI: rockchip: Configure RC's MPS setting PCI: rockchip: Reconfigure configuration space header type PCI: rockchip: Split out rockchip_pcie_cfg_configuration_accesses() PCI: rockchip: Move configuration accesses into rockchip_pcie_cfg_atu() PCI: rockchip: Rename rockchip_cfg_atu() to rockchip_pcie_cfg_atu() PCI: rockchip: Control vpcie0v9 for system PM commit 66a63e15bf7482c1de5cc906cbc473943ed8e898 Merge: bec36cf bf44167 Author: Bjorn Helgaas Date: Tue Jul 4 11:00:58 2017 -0500 Merge branch 'pci/host-rcar' into next * pci/host-rcar: PCI: rcar-gen2: Make of_device_ids const PCI: rcar: Use proper name for the R-Car SoC commit bec36cfa7bd43a1e4484b14ff6144855f3446c4c Merge: 097d057 b8f2a85 Author: Bjorn Helgaas Date: Tue Jul 4 11:00:57 2017 -0500 Merge branch 'pci/host-qcom' into next * pci/host-qcom: PCI: qcom: Limit TLP size to 2K to work around hardware issue PCI: qcom: Fix spelling mistake: "asser" -> "assert" PCI: qcom: Reorder to put v0 functions together, v1 functions together, etc PCI: qcom: Add support for IPQ4019 PCIe controller commit 097d05704e5952307b86ffef310a2a1e04f814b2 Merge: 8a08e7e ea7f449 Author: Bjorn Helgaas Date: Tue Jul 4 11:00:57 2017 -0500 Merge branch 'pci/host-mediatek' into next * pci/host-mediatek: dt-bindings: PCI: Add documentation for MediaTek PCIe PCI: mediatek: Add MediaTek PCIe host controller support commit 8a08e7eada357e853ff448482208a5ee7b94201a Merge: beaba77 fc5165d Author: Bjorn Helgaas Date: Tue Jul 4 11:00:56 2017 -0500 Merge branch 'pci/host-kirin' into next * pci/host-kirin: PCI: kirin: Add HiSilicon Kirin SoC PCIe controller driver commit 360772f26407b759ec3a91dda81fdbc74b7f7f2c Author: Dan Carpenter Date: Tue Jul 4 17:47:23 2017 +0200 video: fbdev: matrox: the list iterator can't be NULL My static checker is complaining because we check "drv" for NULL and then we dereference it to get the next item in the list. It can't be NULL so we can remove this check. Signed-off-by: Dan Carpenter Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/matrox/matroxfb_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd7d958ae9126b2d4a96e41340579049afebd2bf Author: Gustavo A. R. Silva Date: Tue Jul 4 17:47:23 2017 +0200 video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc() Value assigned to variable vdisplay at line 990 is overwritten at line 1039 before it can be used. Also, variable assignment at line 987 is the same as at line 1039. This makes such variable assignments useless. Remove these variable assignments and the code related. Addresses-Covertity-ID: 1226900 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/atyfb_base.c | 6 ------ 1 file changed, 6 deletions(-) commit 62bffe325f08517eb57963bf0907701fffaab57c Author: Arvind Yadav Date: Tue Jul 4 17:47:23 2017 +0200 fbdev: omapfb: constify ctrl_caps, color_caps, panel_attr_grp and ctrl_attr_grp File size before: text data bss dec hex filename 13007 1536 156 14699 396b drivers/video/fbdev/omap/omapfb_main.o File size after adding 'const': text data bss dec hex filename 13135 1408 156 14699 396b drivers/video/fbdev/omap/omapfb_main.o Signed-off-by: Arvind Yadav Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap/omapfb_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5ffe80c1fa1ac5b0b5c47503452d2f155fcc2702 Author: Arvind Yadav Date: Tue Jul 4 17:47:23 2017 +0200 omapfb: panel-dsi-cm: constify dsicm_attr_group File size before: text data bss dec hex filename 4657 464 0 5121 1401 drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.o File size after adding 'const': text data bss dec hex filename 4713 400 0 5113 13f9 drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.o Signed-off-by: Arvind Yadav Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6af574e826740bf17663b48ba3f8fadb81d2113f Author: Alexey Khoroshilov Date: Tue Jul 4 17:47:23 2017 +0200 vmlfb: Fix error handling in cr_pll_init() There is an error path, where iomemory is left mapped. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Cc: Alan Hourihane Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/vermilion/cr_pll.c | 1 + 1 file changed, 1 insertion(+) commit 526c9e971f4fdec4cab41b531405e211afb1d82a Author: Arvind Yadav Date: Tue Jul 4 17:47:22 2017 +0200 video: fbdev: fsl-diu-fb: constify mfb_template and fsl_diu_match. File size before: text data bss dec hex filename 2469 1552 24 4045 fcd drivers/video/fbdev/fsl-diu-fb.o File size after adding 'const': text data bss dec hex filename 3821 200 24 4045 fcd drivers/video/fbdev/fsl-diu-fb.o Signed-off-by: Arvind Yadav Cc: Timur Tabi Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/fsl-diu-fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1934adf78e33fa69570a763c7ac5353212416bb0 Author: Jiri Olsa Date: Tue Jul 4 15:11:31 2017 +0200 perf unwind: Do not fail due to missing unwind support We currently fail the MMAP event processing if we don't have the MMAP event's specific arch unwind support compiled in. That's wrong and can lead to unresolved mmaps in report output for 32bit binaries on 64bit server, like in this example on x86_64 server: $ cat ex.c int main(int argc, char **argv) { while (1) {} } $ gcc -o ex -m32 ex.c $ perf record ./ex ^C[ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.371 MB perf.data (9322 samples) ] Before: $ perf report --stdio SNIP # Overhead Command Shared Object Symbol # ........ ....... ................ ...................... # 100.00% ex [unknown] [.] 0x00000000080483de 0.00% ex [unknown] [.] 0x00000000f76dba4f 0.00% ex [unknown] [.] 0x00000000f76e4c11 0.00% ex [unknown] [.] 0x00000000f76daa30 After: $ perf report --stdio SNIP # Overhead Command Shared Object Symbol # ........ ....... ............. ............... # 100.00% ex ex [.] main 0.00% ex ld-2.24.so [.] _dl_start 0.00% ex ld-2.24.so [.] do_lookup_x 0.00% ex ld-2.24.so [.] _start The fix is not to fail, just warn if there's not unwind support compiled in. Reported-by: Michael Lyle Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: He Kuang Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170704131131.27508-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind-libunwind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97365e81366f5ca16a9ce66cff4dd4c5b0d9f4db Author: Arnaldo Carvalho de Melo Date: Mon Jul 3 17:01:41 2017 -0300 perf evsel: Set attr.exclude_kernel when probing max attr.precise_ip We should set attr.exclude_kernel when probing for attr.precise_ip level, otherwise !CAP_SYS_ADMIN users will not default to skidless samples in capable hardware. The increase in the paranoid level in commit 0161028b7c8a ("perf/core: Change the default paranoia level to 2") broke this, fix it by excluding kernel samples when probing. Before: $ perf record usleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.018 MB perf.data (6 samples) ] $ perf evlist -v cycles:u: sample_freq: 4000, sample_type: IP|TID|TIME|PERIOD, exclude_kernel: 1 After: $ perf record usleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.018 MB perf.data (8 samples) ] $ perf evlist -v cycles:ppp: sample_freq: 4000, sample_type: IP|TID|TIME|PERIOD, exclude_kernel: 1, precise_ip: 3 ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ $ To further clarify: we always set .exclude_kernel when non !CAP_SYS_ADMIN users profile, its just on the attr.precise_ip probing that we weren't doing so, fix it. Cc: Adrian Hunter Cc: Andy Lutomirski Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 7f8d1ade1b19 ("perf tools: By default use the most precise "cycles" hw counter available") Link: http://lkml.kernel.org/n/tip-t2qttwhbnua62o5gt75cueml@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 1 + 1 file changed, 1 insertion(+) commit 7b8d925d5cd3c3497a041d514de1739e2a2d24ef Author: Alex Deucher Date: Tue Jul 4 01:57:33 2017 -0400 drm/amdgpu/gfx9: fix driver reload with KIQ Drop the KCQ disabling via KIQ. We disable the MEC shortly after anyway, so there is no need to wait for all of this. Doing so seems to leave the MEC in a bad way. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 51 ----------------------------------- 1 file changed, 51 deletions(-) commit dcf75843c0f7b654c327c140293ba53bb4b3da85 Author: Alex Deucher Date: Tue Jul 4 01:47:00 2017 -0400 drm/amdgpu/gfx8: fix driver reload with KIQ Drop the deactivation in KIQ init and drop the KCQ disabling via KIQ. We disable the MEC shortly after anyway, so there is no need to wait for all of this. Doing so seems to leave the MEC in a bad way. Tested-by: Michel Dänzer Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 69 +---------------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) commit bf72acefebb459af3c805a386cd7e5456e3ad6ee Author: David S. Miller Date: Tue Jul 4 15:17:30 2017 +0100 ipv4: Export rtm_ipv4_policy. The MPLS code now needs it. Fixes: 397fc9e5cefe ("mpls: route get support") Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 1 + 1 file changed, 1 insertion(+) commit 6e38cf3b442120a84e69faf1ac9a7b4cd79d1ad6 Author: Jarkko Nikula Date: Wed Jun 28 17:23:29 2017 +0300 i2c: designware: Let slave adapter support be optional Only certain system configurations may use the I2C slave mode so let the support be optional. This allow reducing module size if needed: text data bss dec hex filename 10328 1336 16 11680 2da0 drivers/i2c/busses/i2c-designware-core.ko 7222 1136 8 8366 20ae drivers/i2c/busses/i2c-designware-core.ko Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Tested-by: Luis Oliveira Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 1 - drivers/i2c/busses/i2c-designware-core.h | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 21bf440ce18e49b24601c3d1d25f691ef0334c4b Author: Jarkko Nikula Date: Wed Jun 28 17:23:28 2017 +0300 i2c: designware: Make HW init functions static Recent i2c-designware slave support patches use master or slave HW init functions through the function pointer so we can declare them static. While at it, rename i2c_dw_init() as i2c_dw_init_master(). Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Tested-by: Luis Oliveira Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 2 -- drivers/i2c/busses/i2c-designware-master.c | 7 +++---- drivers/i2c/busses/i2c-designware-slave.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) commit 9809cb831c9645d61ee9501c308045bb3d8afd31 Author: Colin Ian King Date: Thu Jun 29 09:22:15 2017 +0100 i2c: designware: fix spelling mistakes Trivial fixes to spelling mistakes in dev_dbg message "STAUTS" -> "STATUS" "SLAVE_ACTTVITY" -> "SLAVE_ACTIVITY" Signed-off-by: Colin Ian King Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc18282cdcba984ab89c74d7e844c10114ae0795 Author: Takashi Iwai Date: Tue Jul 4 16:04:38 2017 +0200 ALSA: hda - Fix unbalance of i915 module refcount The commit dba9b7b6ca1a ("ALSA: hda - Fix doubly initialization of i915 component") contained a typo that leads to the unbalance of i915 module reference. The value to be checked is not chip->driver_type but chip->driver_caps. Fixes: dba9b7b6ca1a ("ALSA: hda - Fix doubly initialization of i915 component") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196219 Reported-by: Martin Peres Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78e6c5abeb4ad895867fc0ff7f61c858d4deb7c0 Author: Chris Packham Date: Fri Jun 30 12:54:05 2017 +1200 i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails, propagate the error to aid debugging. Suggested-by: Andy Shevchenko Signed-off-by: Chris Packham Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pca-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2ec4d8831b9644a080302ce10868afff8d135fc3 Author: Chris Packham Date: Fri Jun 30 12:54:04 2017 +1200 i2c: pca-platform: correctly set algo_data.reset_chip When device tree support was added the setting of algo_data.reset_chip was moved. There were two problems with this. The first being that i2c_pca_pf_resetchip was only used if platform data was provided. The second that it was unconditionally overridden with i2c_pca_pf_dummyreset. Ensure that however the reset gpio is defined the correct reset_chip function is used. Fixes: commit 4cc7229daa46 ("i2c: pca-platform: switch to struct gpio_desc") Signed-off-by: Chris Packham Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pca-platform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3a4991a9864cb6b98bb9c7cf47854ffe2a79805a Author: Hans de Goede Date: Tue Jul 4 15:04:48 2017 +0200 i2c: acpi: Do not create i2c-clients for LNXVIDEO ACPI devices ACPI video devices get tagged by the kernel with the custom LNXVIDEO HID so that normal pnp-id matching can be used and are handled by the acpi-video driver. Sometimes the ACPI nodes describing these contain a SERIAL_TYPE_I2C ACPI resource. Before this commit the presence of this resource would cause the i2c-core to create a /sys/bus/i2c/devices/i2c-LNXVIDEO:00 device for this with a modalias of: "i2c:LNXVIDEO:00". There is no i2c driver for this custom HID, the acpi-video driver binds directly to the ACPI device /sys/bus/acpi/devices/LNXVIDEO\:00 which has a modalias of "acpi:LNXVIDEO:" . Not only is the creation of an i2c-client for this undesirable, it is actually causing problems. This weird pseudo-resource claims an i2c speed of 100KHz and typically points to the i2c bus which is used by the touchscreen controller. Some touchscreen controllers only work properly at 400KHz, at 100KHz they cause errors like these: i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration silead_ts i2c-MSSL1680:00: Registers clear error -11 This commit makes the i2c-core ignore LNXVIDEO compatible ACPI devices which has 2 positive results: 1) The bogus i2c-client for these is no longer created. 2) i2c_acpi_lookup_speed now ignores the 100KHz speed from the pseudo i2c-resouce and properly returns 400KHz as speed for the touchscreen i2c bus, fixing the touchscreen not working on various devies. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5122daa017578ebc4818de8fb3c9d0e131f8b335 Author: Colin Ian King Date: Tue Jul 4 09:31:29 2017 +0100 x86/platform/uv/BAU: Minor cleanup, make some local functions static The functions handle_uv2_busy, uv_flush_send_and_wait and find_another_by_swack are local to the source, so make them static. Also remove normal_busy as it is no longer used. Fixes various smatch warnings, such as: "symbol 'find_another_by_swack' was not declared. Should it be static?" "symbol 'handle_uv2_busy' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: Thomas Gleixner Cc: Mike Travis Cc: Andrew Banman Cc: kernel-janitors@vger.kernel.org Cc: Dimitri Sivanich Cc: Dou Liyang Link: http://lkml.kernel.org/r/20170704083129.10559-1-colin.king@canonical.com arch/x86/platform/uv/tlb_uv.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) commit 1372324b328cd5dabaef5e345e37ad48c63df2a9 Author: Cornelia Huck Date: Tue Jul 4 11:30:38 2017 +0200 Update my email address Signed-off-by: Cornelia Huck Signed-off-by: Paolo Bonzini MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2343877fbda701599653e63f8dcc318aa1bf15ee Author: Thomas Gleixner Date: Thu Jun 29 23:33:39 2017 +0200 genirq/timings: Move free timings out of spinlocked region No point to do memory management from a interrupt disabled spin locked region. Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Cc: Daniel Lezcano Cc: Heiko Stuebner Cc: Julia Cartwright Cc: Linus Walleij Cc: Brian Norris Cc: Doug Anderson Cc: linux-rockchip@lists.infradead.org Cc: John Keeping Cc: linux-gpio@vger.kernel.org Link: http://lkml.kernel.org/r/20170629214344.196130646@linutronix.de kernel/irq/manage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 46e48e257360f0845fe17089713cbad4db611e70 Author: Thomas Gleixner Date: Thu Jun 29 23:33:38 2017 +0200 genirq: Move irq resource handling out of spinlocked region Aside of being conceptually wrong, there is also an actual (hard to trigger and mostly theoretical) problem. CPU0 CPU1 free_irq(X) interrupt X spin_lock(desc->lock) wake irq thread() spin_unlock(desc->lock) spin_lock(desc->lock) remove action() shutdown_irq() release_resources() thread_handler() spin_unlock(desc->lock) access released resources. synchronize_irq() Move the release resources invocation after synchronize_irq() so it's guaranteed that the threaded handler has finished. Move the resource request call out of the desc->lock held region as well, so the invocation context is the same for both request and release. This solves the problems with those functions on RT as well. Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Cc: Heiko Stuebner Cc: Julia Cartwright Cc: Linus Walleij Cc: Brian Norris Cc: Doug Anderson Cc: linux-rockchip@lists.infradead.org Cc: John Keeping Cc: linux-gpio@vger.kernel.org Link: http://lkml.kernel.org/r/20170629214344.117028181@linutronix.de kernel/irq/manage.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 9114014cf4e6df0b22d764380ae1fc54f1a7a8b2 Author: Thomas Gleixner Date: Thu Jun 29 23:33:37 2017 +0200 genirq: Add mutex to irq desc to serialize request/free_irq() The irq_request/release_resources() callbacks ar currently invoked under desc->lock with interrupts disabled. This is a source of problems on RT and conceptually not required. Add a seperate mutex to struct irq_desc which allows to serialize request/free_irq(), which can be used to move the resource functions out of the desc->lock held region. Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Cc: Heiko Stuebner Cc: Julia Cartwright Cc: Linus Walleij Cc: Brian Norris Cc: Doug Anderson Cc: linux-rockchip@lists.infradead.org Cc: John Keeping Cc: linux-gpio@vger.kernel.org Link: http://lkml.kernel.org/r/20170629214344.039220922@linutronix.de include/linux/irqdesc.h | 3 +++ kernel/irq/irqdesc.c | 1 + kernel/irq/manage.c | 8 ++++++++ 3 files changed, 12 insertions(+) commit 3a90795e1e885167209056a1a90be965add30e25 Author: Thomas Gleixner Date: Thu Jun 29 23:33:36 2017 +0200 genirq: Move bus locking into __setup_irq() There is no point in having the irq_bus_lock() protection around all callers to __setup_irq(). Move it into __setup_irq(). This is also a preparatory patch for addressing the issues with the irq resource callbacks. Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Cc: Heiko Stuebner Cc: Julia Cartwright Cc: Linus Walleij Cc: Brian Norris Cc: Doug Anderson Cc: linux-rockchip@lists.infradead.org Cc: John Keeping Cc: linux-gpio@vger.kernel.org Link: http://lkml.kernel.org/r/20170629214343.960949031@linutronix.de kernel/irq/manage.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 2372a519f63829b8effcdde5f4564a7e036294f0 Author: Geert Uytterhoeven Date: Tue Jul 4 12:06:01 2017 +0200 genirq: Force inlining of __irq_startup_managed to prevent build failure If CONFIG_SMP=n, and gcc (e.g. 4.1.2) decides not to inline __irq_startup_managed(), the build fails with: kernel/built-in.o: In function `irq_startup': (.text+0x38ed8): undefined reference to `irq_set_affinity_locked' Fix this by forcing inlining of __irq_startup_managed(). Fixes: 761ea388e8c4e3ac ("genirq: Handle managed irqs gracefully in irq_startup()") Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Cc: Arnd Bergmann Link: http://lkml.kernel.org/r/1499162761-12398-1-git-send-email-geert@linux-m68k.org kernel/irq/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5682b4eecb2b73282853d0ef314d3164b986997 Author: Sebastian Ott Date: Tue Jul 4 11:25:15 2017 +0200 genirq/debugfs: Fix build for !CONFIG_IRQ_DOMAIN Fix this build error: kernel/irq/internals.h:440:20: error: inlining failed in call to always_inline 'irq_domain_debugfs_init': function body not available kernel/irq/debugfs.c:202:2: note: called from here irq_domain_debugfs_init(root_dir); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Sebastian Ott Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/alpine.LFD.2.20.1707041124000.1712@schleppi kernel/irq/internals.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 65a30f8b300107266f316d550f060ccc186201a3 Author: Suzuki K Poulose Date: Tue Jul 4 10:56:35 2017 +0100 irqchip/gic-v3: Honor forced affinity setting Honor the 'force' flag for set_affinity, by selecting a CPU from the given mask (which may not be reported "online" by the cpu_online_mask). Some drivers, like ARM PMU, rely on it. Cc: Marc Zyngier Reported-by: Mark Rutland Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 63c16c6eacb69d0cbdaee5dea0dd56d238375fe6 Author: Suzuki K Poulose Date: Tue Jul 4 10:56:33 2017 +0100 irqchip/gic-v3: Report failures in gic_irq_domain_alloc If the GIC cannot map an IRQ via irq_domain_ops->alloc(), it doesn't return an error code. This can cause a problem with drivers, where it thinks it has successfully got an IRQ for the device, but requesting the same ends up failure with -ENOSYS (as the IRQ's chip is not set). Fixes: commit 443acc4f37f6 ("irqchip: GICv3: Convert to domain hierarchy") Cc: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 456c59c31c5126fe31c64956c43670060ea9debd Author: Suzuki K Poulose Date: Tue Jul 4 10:56:34 2017 +0100 irqchip/gic-v2: Report failures in gic_irq_domain_alloc If the GIC cannot map an IRQ via irq_domain_ops->alloc(), it doesn't return an error code. This can cause a problem with drivers, where it thinks it has successfully got an IRQ for the device, but requesting the same ends up failure with -ENOSYS (as the IRQ's chip is not set). Fixes: commit 9a1091ef0017c ("irqchip: gic: Support hierarchy irq domain.") Cc: Yingjoe Chen Cc: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0a46230bf03549435156b36dee9e7489b8270be7 Author: Boris Brezillon Date: Tue Jul 4 11:10:41 2017 +0200 irqchip/atmel-aic: Remove root argument from ->fixup() prototype We are no longer using the root argument passed to the ->fixup() hooks. Remove it. Signed-off-by: Boris Brezillon Signed-off-by: Marc Zyngier drivers/irqchip/irq-atmel-aic-common.c | 8 ++++---- drivers/irqchip/irq-atmel-aic-common.h | 4 ++-- drivers/irqchip/irq-atmel-aic.c | 14 +++++++------- drivers/irqchip/irq-atmel-aic5.c | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) commit 277867ade8262583f4280cadbe90e0031a3706a7 Author: Boris Brezillon Date: Tue Jul 4 11:10:40 2017 +0200 irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup() of_find_compatible_node() is calling of_node_put() on its first argument thus leading to an unbalanced of_node_get/put() issue if the node has not been retained before that. Instead of passing the root node, pass NULL, which does exactly the same: iterate over all DT nodes, starting from the root node. Signed-off-by: Boris Brezillon Reported-by: Alexandre Belloni Fixes: 3d61467f9bab ("irqchip: atmel-aic: Implement RTC irq fixup") Cc: Signed-off-by: Marc Zyngier drivers/irqchip/irq-atmel-aic-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 469bcef53c546bb792aa66303933272991b7831d Author: Boris Brezillon Date: Tue Jul 4 11:10:39 2017 +0200 irqchip/atmel-aic: Fix unbalanced of_node_put() in aic_common_irq_fixup() aic_common_irq_fixup() is calling twice of_node_put() on the same node thus leading to an unbalanced refcount on the root node. Signed-off-by: Boris Brezillon Reported-by: Alexandre Belloni Fixes: b2f579b58e93 ("irqchip: atmel-aic: Add irq fixup infrastructure") Cc: Signed-off-by: Marc Zyngier drivers/irqchip/irq-atmel-aic-common.c | 1 - 1 file changed, 1 deletion(-) commit 3b9c08ae3dd44201b3a188aef34d6ddf73434015 Author: Ingo Molnar Date: Tue Jul 4 11:53:40 2017 +0200 Revert "sched/cputime: Refactor the cputime_adjust() code" This reverts commit 72298e5c92c50edd8cb7cfda4519483ce65fa166. As Peter explains: > Argh, no... That code was perfectly fine. The new code otoh is > convoluted. > > The old code had the following form: > > if (exception1) > deal with exception1 > > if (execption2) > deal with exception2 > > do normal stuff > > Which is as simple and straight forward as it gets. > > The new code otoh reads like: > > if (!exception1) { > if (exception2) > deal with exception 2 > else > do normal stuff > } So restore the old form. Also fix the comment describing the logic, as it was confusing. Requested-by: Peter Zijlstra Cc: Gustavo A. R. Silva Cc: Frans Klaver Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Wanpeng Li Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 691bd4340bef49cf7e5855d06cf24444b5bf2d85 Author: Haozhong Zhang Date: Tue Jul 4 10:27:41 2017 +0800 kvm: vmx: allow host to access guest MSR_IA32_BNDCFGS It's easier for host applications, such as QEMU, if they can always access guest MSR_IA32_BNDCFGS in VMCS, even though MPX is disabled in guest cpuid. Cc: stable@vger.kernel.org Signed-off-by: Haozhong Zhang Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 34dc77ad74368707f0f51f42536e38e6ef30ff22 Author: Jaegeuk Kim Date: Thu Jun 15 16:44:42 2017 -0700 f2fs: add ioctl to do gc with target block address This patch adds f2fs_ioc_gc_range() to move blocks located in the given range. Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 8 ++++++++ fs/f2fs/file.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit a9bcf9bcd01499001834273ac1114ec76668f048 Author: Jaegeuk Kim Date: Wed Jun 14 08:05:32 2017 -0700 f2fs: don't need to check encrypted inode for partial truncation The cache_only is always false, if inode is encrypted. Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0eb0adadf2e49d82bc4ecd65ec3bb69251f7564c Author: Chao Yu Date: Wed Jun 14 23:00:56 2017 +0800 f2fs: measure inode.i_blocks as generic filesystem Both in memory or on disk, generic filesystems record i_blocks with 512bytes sized sector count, also VFS sub module such as disk quota follows this rule, but f2fs records it with 4096bytes sized block count, this difference leads to that once we use dquota's function which inc/dec iblocks, it will make i_blocks of f2fs being inconsistent between in memory and on disk. In order to resolve this issue, this patch changes to make in-memory i_blocks of f2fs recording sector count instead of block count, meanwhile leaving on-disk i_blocks recording block count. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 23 +++++++++++++---------- fs/f2fs/file.c | 1 - fs/f2fs/inode.c | 5 +++-- fs/f2fs/node.c | 2 +- 4 files changed, 17 insertions(+), 14 deletions(-) commit 663f387b713089463e37761bfa2561972c7f45ff Author: Chao Yu Date: Wed Jun 14 23:00:55 2017 +0800 f2fs: set CP_TRIMMED_FLAG correctly Don't set CP_TRIMMED_FLAG for non-zoned block device or discard unsupported device, it can avoid to trigger unneeded checkpoint for that kind of device. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67773a1fbdcb5be4a0490b1dd2a5975784ef40df Author: Eric Biggers Date: Tue Jun 13 16:47:54 2017 -0700 f2fs: require key for truncate(2) of encrypted file Currently, filesystems allow truncate(2) on an encrypted file without the encryption key. However, it's impossible to correctly handle the case where the size being truncated to is not a multiple of the filesystem block size, because that would require decrypting the final block, zeroing the part beyond i_size, then encrypting the block. As other modifications to encrypted file contents are prohibited without the key, just prohibit truncate(2) as well, making it fail with ENOKEY. Signed-off-by: Eric Biggers Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 8ceffcb29e61ba882a011b1e4d73ca03691fdc2e Author: Chao Yu Date: Wed Jun 14 17:39:47 2017 +0800 f2fs: move sysfs code from super.c to fs/f2fs/sysfs.c Codes related to sysfs and procfs are dispersive and mixed with sb related codes, but actually these codes are independent from others, so split them from super.c, and reorgnize and manger them in sysfs.c. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/Makefile | 2 +- fs/f2fs/f2fs.h | 8 ++ fs/f2fs/super.c | 332 ---------------------------------------------------- fs/f2fs/sysfs.c | 350 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 359 insertions(+), 333 deletions(-) commit a398101aa113351ec973e9e6a3208c7160b7b1fc Author: Chao Yu Date: Wed Jun 14 17:39:46 2017 +0800 f2fs: clean up sysfs codes Just cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 121 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 74 insertions(+), 47 deletions(-) commit 56412894b3cee24805e48f380ffa9a5f32cff183 Author: Chao Yu Date: Mon Jun 12 22:30:44 2017 +0800 f2fs: fix to document fault injection option and sysfs file Commit 73faec4d9935 ("f2fs: add mount option to select fault injection ratio") and Commit 087968974fcd ("f2fs: add fault injection to sysfs") forget to document mount option and sysfs file. This patch fixes to document them. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 12 ++++++++++++ Documentation/filesystems/f2fs.txt | 2 ++ 2 files changed, 14 insertions(+) commit 1727f317219bfc60a3e50306d67938ffedb17f8a Author: Chao Yu Date: Mon Jun 12 09:44:27 2017 +0800 f2fs: fix wrong error number of fill_super This patch fixes incorrect error number in error path of fill_super. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6f6d9fe2ab3fc68d194b18f4d120443326ec524a Author: Chao Yu Date: Mon Jun 12 09:44:26 2017 +0800 f2fs: fix incorrect document of batched_trim_sections Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44529f8975b7b93709b1b92be7d027a1d406de8a Author: Chao Yu Date: Mon Jun 12 09:44:24 2017 +0800 f2fs: fix to show injection rate in ->show_options If fault injection functionality is enabled, show additional injection rate in ->show_options. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b63def9112cd8b91477a06ba5318c8a01ac474f1 Author: Christophe JAILLET Date: Sun Jun 11 09:21:11 2017 +0200 f2fs: Fix a return value in case of error in 'f2fs_fill_super' err must be set to -ENOMEM, otherwise we return 0. Fixes: a912b54d3aaa0 ("f2fs: split bio cache") Signed-off-by: Christophe JAILLET Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a005774c8dab68d1c3963aee7d9464c3ec400eba Author: Tiezhu Yang Date: Fri Jun 9 06:32:54 2017 +0800 f2fs: use proper variable name It is better to use variable name "inline_dentry" instead of "dentry_blk" when data type is "struct f2fs_inline_dentry". This patch has no functional changes, just to make code more readable especially when call the function make_dentry_ptr_inline() and f2fs_convert_inline_dir(). Signed-off-by: Tiezhu Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/inline.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 1f258ec13b82d3d947b515a007a748ffcbe29f9a Author: Chao Yu Date: Wed Jun 7 11:17:35 2017 +0800 f2fs: fix to avoid panic when encountering corrupt node With fault_injection option, generic/361 of fstests will complain us with below message: Call Trace: get_node_page+0x12/0x20 [f2fs] f2fs_iget+0x92/0x7d0 [f2fs] f2fs_fill_super+0x10fb/0x15e0 [f2fs] mount_bdev+0x184/0x1c0 f2fs_mount+0x15/0x20 [f2fs] mount_fs+0x39/0x150 vfs_kern_mount+0x67/0x110 do_mount+0x1bb/0xc70 SyS_mount+0x83/0xd0 do_syscall_64+0x6e/0x160 entry_SYSCALL64_slow_path+0x25/0x25 Since mkfs loop device in f2fs partition can be failed silently due to checkpoint error injection, so root inode page can be corrupted, in order to avoid needless panic, in get_node_page, it's better to leave message and return error to caller, and let fsck repaire it later. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit febeca6d375531f2d3244b47bf0eb396180689e0 Author: Chao Yu Date: Mon Jun 5 18:29:08 2017 +0800 f2fs: don't track newly allocated nat entry in list We will never persist newly allocated nat entries during checkpoint(), so we don't need to track such nat entries in nat dirty list in order to avoid: - more latency during traversing dirty list; - sorting nat sets incorrectly due to recording wrong entry_cnt in nat entry set. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit d9703d9097d7c97f735a3b7870c52735a4dfa051 Author: Chao Yu Date: Mon Jun 5 18:29:07 2017 +0800 f2fs: add f2fs_bug_on in __remove_discard_cmd Recently, discard related codes have changed a lot, so add f2fs_bug_on to detect potential bug. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) commit 2a510c005c9d3fafbaae1a6d27da8256c95542f9 Author: Chao Yu Date: Mon Jun 5 18:29:06 2017 +0800 f2fs: introduce __wait_one_discard_bio In order to avoid copied codes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 5a3a2d83cda82df7f8c306df85647d2c368e829a Author: Qiuyang Sun Date: Thu May 18 11:06:45 2017 +0800 f2fs: dax: fix races between page faults and truncating pages Currently in F2FS, page faults and operations that truncate the pagecahe or data blocks, are completely unsynchronized. This can result in page fault faulting in a page into a range that we are changing after truncating, and thus we can end up with a page mapped to disk blocks that will be shortly freed. Filesystem corruption will shortly follow. This patch fixes the problem by creating new rw semaphore i_mmap_sem in f2fs_inode_info and grab it for functions removing blocks from extent tree and for read over page faults. The mechanism is similar to that in ext4. Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 ++ fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 48 +++++++++++++++++++++++++++++++++++++++--------- fs/f2fs/super.c | 1 + 4 files changed, 43 insertions(+), 9 deletions(-) commit 72fdbe2efe3e42a54e268d2ee2a8c0828d3996e7 Author: Fan Li Date: Fri Jun 2 15:45:42 2017 +0800 f2fs: simplify the way of calulating next nat address The index of segment which the next nat block is in has only one different bit than the current one, so to get the next nat address, we can simply alter that one bit. Signed-off-by: Fan Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 21d3f8e1c3b7996ce239ab6fa82e9f7a8c47d84d Author: Jin Qian Date: Thu Jun 1 11:18:30 2017 -0700 f2fs: sanity check size of nat and sit cache Make sure number of entires doesn't exceed max journal size. Cc: stable@vger.kernel.org Signed-off-by: Jin Qian Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d4fdf8ba0e5808ba9ad6b44337783bd9935e0982 Author: Yunlei He Date: Thu Jun 1 16:43:51 2017 +0800 f2fs: fix a panic caused by NULL flush_cmd_control Mount fs with option noflush_merge, boot failed for illegal address fcc in function f2fs_issue_flush: if (!test_opt(sbi, FLUSH_MERGE)) { ret = submit_flush_wait(sbi); atomic_inc(&fcc->issued_flush); -> Here, fcc illegal return ret; } Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 68390dd9bd5b2ef7c3ec69c23010b39981e264a4 Author: Zhang Shengju Date: Thu Jun 1 16:50:10 2017 +0800 f2fs: remove the unnecessary cast for PTR_ERR It's not necessary to specify 'int' casting for PTR_ERR. Signed-off-by: Zhang Shengju Signed-off-by: Jaegeuk Kim fs/f2fs/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8c4256c17dac3e9ec0c441b81292d5d2044c89f Author: Jaegeuk Kim Date: Thu Jun 1 15:39:27 2017 -0700 f2fs: remove false-positive bug_on For example, f2fs_create - new_node_page is failed - handle_failed_inode - skip to add it into orphan list, since ni.blk_addr == NULL_ADDR : set_inode_flag(inode, FI_FREE_NID) f2fs_evict_inode - EIO due to fault injection - f2fs_bug_on() is triggered So, we don't need to call f2fs_bug_on in this case. Signed-off-by: Jaegeuk Kim fs/f2fs/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit acfd2810c75b0625897fc119a2d3a9c26cc0e405 Author: Damien Le Moal Date: Fri May 26 17:04:40 2017 +0900 f2fs: Do not issue small discards in LFS mode clear_prefree_segments() issues small discards after discarding full segments. These small discards may not be section aligned, so not zone aligned on a zoned block device, causing __f2fs_iissue_discard_zone() to fail. Fix this by not issuing small discards for a volume mounted with the BLKZONED feature enabled. Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 397fc9e5cefee0c33b86811fbddb0decb7288c52 Author: Roopa Prabhu Date: Mon Jul 3 15:31:21 2017 -0700 mpls: route get support This patch adds RTM_GETROUTE doit handler for mpls routes. Input: RTA_DST - input label RTA_NEWDST - labels in packet for multipath selection By default the getroute handler returns matched nexthop label, via and oif With RTM_F_FIB_MATCH flag, full matched route is returned. example (with patched iproute2): $ip -f mpls route show 101 nexthop as to 102/103 via inet 172.16.2.2 dev virt1-2 nexthop as to 302/303 via inet 172.16.12.2 dev virt1-12 201 nexthop as to 202/203 via inet6 2001:db8:2::2 dev virt1-2 nexthop as to 402/403 via inet6 2001:db8:12::2 dev virt1-12 $ip -f mpls route get 103 RTNETLINK answers: Network is unreachable $ip -f mpls route get 101 101 as to 102/103 via inet 172.16.2.2 dev virt1-2 $ip -f mpls route get as to 302/303 101 101 as to 302/303 via inet 172.16.12.2 dev virt1-12 $ip -f mpls route get fibmatch 103 RTNETLINK answers: Network is unreachable $ip -f mpls route get fibmatch 101 101 nexthop as to 102/103 via inet 172.16.2.2 dev virt1-2 nexthop as to 302/303 via inet 172.16.12.2 dev virt1-12 Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/mpls/af_mpls.c | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 162 insertions(+), 1 deletion(-) commit 7597b266c56feaad7d4e6e65822766e929407da2 Author: Nikolay Aleksandrov Date: Mon Jul 3 15:14:59 2017 -0700 bridge: allow ext learned entries to change ports current code silently ignores change of port in the request message. This patch makes sure the port is modified and notification is sent to userspace. Fixes: cf6b8e1eedff ("bridge: add API to notify bridge driver of learned FBD on offloaded device") Signed-off-by: Nikolay Aleksandrov Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_fdb.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit e05a90ec9e1680952454ea9510da9a761a5baac9 Author: Jamal Hadi Salim Date: Mon Jul 3 09:51:50 2017 -0400 net: reflect mark on tcp syn ack packets SYN-ACK responses on a server in response to a SYN from a client did not get the injected skb mark that was tagged on the SYN packet. Fixes: 84f39b08d786 ("net: support marking accepting TCP sockets") Reviewed-by: Lorenzo Colitti Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/ipv4/ip_output.c | 3 ++- net/ipv4/tcp_output.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 8d32e0624392bb4abfbe122f754757a4cb326d7f Author: Sean Wang Date: Tue Jul 4 11:17:36 2017 +0800 net: ethernet: mediatek: fixed deadlock captured by lockdep Lockdep found an inconsistent lock state when mtk_get_stats64 is called in user context while NAPI updates MAC statistics in softirq. Use spin_trylock_bh/spin_unlock_bh fix following lockdep warning. [ 81.321030] WARNING: inconsistent lock state [ 81.325266] 4.12.0-rc1-00035-gd9dda65 #32 Not tainted [ 81.330273] -------------------------------- [ 81.334505] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [ 81.340464] ksoftirqd/0/7 [HC0[0]:SC1[1]:HE1:SE0] takes: [ 81.345731] (&syncp->seq#2){+.?...}, at: [] mtk_handle_status_irq.part.6+0x70/0x84 [ 81.354219] {SOFTIRQ-ON-W} state was registered at: [ 81.359062] lock_acquire+0xfc/0x2b0 [ 81.362696] mtk_stats_update_mac+0x60/0x2c0 [ 81.367017] mtk_get_stats64+0x17c/0x18c [ 81.370995] dev_get_stats+0x48/0xbc [ 81.374628] rtnl_fill_stats+0x48/0x128 [ 81.378520] rtnl_fill_ifinfo+0x4ac/0xd1c [ 81.382584] rtmsg_ifinfo_build_skb+0x7c/0xe0 [ 81.386991] rtmsg_ifinfo.part.5+0x24/0x54 [ 81.391139] rtmsg_ifinfo+0x24/0x28 [ 81.394685] __dev_notify_flags+0xa4/0xac [ 81.398749] dev_change_flags+0x50/0x58 [ 81.402640] devinet_ioctl+0x768/0x85c [ 81.406444] inet_ioctl+0x1a4/0x1d0 [ 81.409990] sock_ioctl+0x16c/0x33c [ 81.413538] do_vfs_ioctl+0xb4/0xa34 [ 81.417169] SyS_ioctl+0x44/0x6c [ 81.420458] ret_fast_syscall+0x0/0x1c [ 81.424260] irq event stamp: 3354692 [ 81.427806] hardirqs last enabled at (3354692): [] net_rx_action+0xc0/0x504 [ 81.435660] hardirqs last disabled at (3354691): [] net_rx_action+0x8c/0x504 [ 81.443515] softirqs last enabled at (3354106): [] __do_softirq+0x4b4/0x614 [ 81.451370] softirqs last disabled at (3354109): [] run_ksoftirqd+0x44/0x80 [ 81.459134] [ 81.459134] other info that might help us debug this: [ 81.465608] Possible unsafe locking scenario: [ 81.465608] [ 81.471478] CPU0 [ 81.473900] ---- [ 81.476321] lock(&syncp->seq#2); [ 81.479701] [ 81.482294] lock(&syncp->seq#2); [ 81.485847] [ 81.485847] *** DEADLOCK *** [ 81.485847] [ 81.491720] 1 lock held by ksoftirqd/0/7: [ 81.495693] #0: (&(&mac->hw_stats->stats_lock)->rlock){+.+...}, at: [] mtk_handle_status_irq.part.6+0x48/0x84 [ 81.506579] [ 81.506579] stack backtrace: [ 81.510904] CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted 4.12.0-rc1-00035-gd9dda65 #32 [ 81.518668] Hardware name: Mediatek Cortex-A7 (Device Tree) [ 81.524208] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [ 81.531899] [] (show_stack) from [] (dump_stack+0xb4/0xe0) [ 81.539072] [] (dump_stack) from [] (print_usage_bug+0x234/0x2e0) [ 81.546846] [] (print_usage_bug) from [] (mark_lock+0x63c/0x7bc) [ 81.554532] [] (mark_lock) from [] (__lock_acquire+0x654/0x1bfc) [ 81.562217] [] (__lock_acquire) from [] (lock_acquire+0xfc/0x2b0) [ 81.569990] [] (lock_acquire) from [] (mtk_stats_update_mac+0x60/0x2c0) [ 81.578283] [] (mtk_stats_update_mac) from [] (mtk_handle_status_irq.part.6+0x70/0x84) [ 81.587865] [] (mtk_handle_status_irq.part.6) from [] (mtk_napi_tx+0x358/0x37c) [ 81.596845] [] (mtk_napi_tx) from [] (net_rx_action+0x244/0x504) [ 81.604533] [] (net_rx_action) from [] (__do_softirq+0x134/0x614) [ 81.612306] [] (__do_softirq) from [] (run_ksoftirqd+0x44/0x80) [ 81.619907] [] (run_ksoftirqd) from [] (smpboot_thread_fn+0x14c/0x25c) [ 81.628110] [] (smpboot_thread_fn) from [] (kthread+0x150/0x180) [ 81.635798] [] (kthread) from [] (ret_from_fork+0x14/0x24) Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2671e9fc62c392abea6a5e80297dfb03fdbae2e7 Merge: 25f4535 0029c0d Author: David S. Miller Date: Tue Jul 4 01:29:05 2017 -0700 Merge branch 'ipv4-ipv6-refcount_t' Elena Reshetova says: ==================== v2 ipv4/ipv6 refcount conversions Changes in v2: * rebase on top of net-next * currently by default refcount_t = atomic_t (*) and uses all atomic standard operations unless CONFIG_REFCOUNT_FULL is enabled. This is a compromise for the systems that are critical on performance (such as net) and cannot accept even slight delay on the refcounter operations. This series, for ipv4/ipv6 network components, replaces atomic_t reference counters with the new refcount_t type and API (see include/linux/refcount.h). By doing this we prevent intentional or accidental underflows or overflows that can led to use-after-free vulnerabilities. The patches are fully independent and can be cherry-picked separately. In order to try with refcount functionality enabled in run-time, CONFIG_REFCOUNT_FULL must be enabled. NOTE: automatic kernel builder for some reason doesn't like all my network branches and regularly times out the builds on these branches. Suggestion for "waiting a day for a good coverage" doesn't work, as we have seen with generic network conversions. So please wait for the full report from kernel test rebot before merging further up. This has been compile-tested in 116 configs, but 71 timed out (including all s390-related configs again). I am trying to see if they can fix build coverage for me in meanwhile. * The respective change is currently merged into -next as "locking/refcount: Create unchecked atomic_t implementation". ==================== Signed-off-by: David S. Miller commit 0029c0deb590bc18732327d53b8fdab12eec6d7c Author: Reshetova, Elena Date: Tue Jul 4 09:35:02 2017 +0300 net, ipv4: convert fib_info.fib_clntref from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/ip_fib.h | 7 ++++--- net/ipv4/fib_semantics.c | 2 +- net/ipv4/fib_trie.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit f6a6fede28e3cc3f9e4669a12839b47011330d95 Author: Reshetova, Elena Date: Tue Jul 4 09:35:01 2017 +0300 net, ipv4: convert cipso_v4_doi.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/cipso_ipv4.h | 3 ++- net/ipv4/cipso_ipv4.c | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) commit 87078f26b6644c2ad8226cf29a7e3a6ef6c74ae2 Author: Reshetova, Elena Date: Tue Jul 4 09:35:00 2017 +0300 net, ipv6: convert ip6addrlbl_entry.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/ipv6/addrlabel.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d12f3827e04b58f617c43f4d44ad3ad788d852b7 Author: Reshetova, Elena Date: Tue Jul 4 09:34:59 2017 +0300 net, ipv6: convert xfrm6_tunnel_spi.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/ipv6/xfrm6_tunnel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit affa78bc6a204fac1b5ced4f34376f53c70ec0ac Author: Reshetova, Elena Date: Tue Jul 4 09:34:58 2017 +0300 net, ipv6: convert ifacaddr6.aca_refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/if_inet6.h | 2 +- net/ipv6/anycast.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit d3981bc615f652b9ead0762dd180125ac2b21a3a Author: Reshetova, Elena Date: Tue Jul 4 09:34:57 2017 +0300 net, ipv6: convert ifmcaddr6.mca_refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/if_inet6.h | 2 +- net/ipv6/mcast.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 271201c09c86cd75e0fd6206bde689176e85aa21 Author: Reshetova, Elena Date: Tue Jul 4 09:34:56 2017 +0300 net, ipv6: convert inet6_ifaddr.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/addrconf.h | 6 +++--- include/net/if_inet6.h | 2 +- net/ipv6/addrconf.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 1be9246077f6bb1583f9347c599480621d63c66a Author: Reshetova, Elena Date: Tue Jul 4 09:34:55 2017 +0300 net, ipv6: convert inet6_dev.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/addrconf.h | 8 ++++---- include/net/if_inet6.h | 3 ++- net/ipv6/addrconf.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) commit 0aeea21ada517b99a6e95298ffc105381bcd3a52 Author: Reshetova, Elena Date: Tue Jul 4 09:34:54 2017 +0300 net, ipv6: convert ipv6_txoptions.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/ipv6.h | 7 ++++--- net/ipv6/exthdrs.c | 4 ++-- net/ipv6/ipv6_sockglue.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) commit e5859d3a0ea07bf948f4538d47fe6547f6e115be Author: Sagi Grimberg Date: Tue Jul 4 10:18:50 2017 +0300 nvme-fc: use blk_mq_delay_run_hw_queue instead of open-coding it Cc: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/host/fc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit cda5fd1ac5c2c42d1b2e1847aa0438b229c5c068 Author: Sagi Grimberg Date: Thu Jun 29 11:20:10 2017 +0300 nvme-fc: update tagset nr_hw_queues after queues reinit We might have more/less queues once we reconnect/reset. For example due to cpu going online/offline or controller constraints. Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/fc.c | 2 ++ 1 file changed, 2 insertions(+) commit 4368c39bf6e6a2bfffb7a72d78912c68f156e8da Author: Sagi Grimberg Date: Thu Jun 29 11:13:43 2017 +0300 nvme-loop: update tagset nr_hw_queues after reconnecting/resetting We might have more/less queues once we reconnect/reset. For example due to cpu going online/offline Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/loop.c | 3 +++ 1 file changed, 3 insertions(+) commit 4c8b99f6b1ff086c1745fcb0511800fba5c4fb34 Author: Sagi Grimberg Date: Thu Jun 29 11:10:44 2017 +0300 nvme-rdma: update tagset nr_hw_queues after reconnecting/resetting We might have more/less queues once we reconnect/reset. For example due to cpu going online/offline or controller constraints. Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/rdma.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7314183d1d0c200def4d0f5a6d978d3b29d28813 Author: Sagi Grimberg Date: Thu Jun 29 11:16:49 2017 +0300 nvme-fc: don't override opts->nr_io_queues Its what the user passed, so its probably a better idea to keep it intact. Also, limit the number of I/O queues to max online cpus and the lport maximum hw queues. Reviewed-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/fc.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 3edc85023a1e1daf22d8e372c5c4f87dc4a04a71 Merge: 2e76eba 33cb088 Author: Vinod Koul Date: Tue Jul 4 10:05:22 2017 +0530 Merge branch 'topic/rcar' into for-linus commit 2e76eba5e0f0e4535868ce41e0a8d28754d0db29 Merge: 98cd085 d43674e Author: Vinod Koul Date: Tue Jul 4 10:05:18 2017 +0530 Merge branch 'topic/pl330' into for-linus commit 98cd085ebb20acd3cb6304cd5bf4ef805efbbb87 Merge: 70ef9af fcc7854 Author: Vinod Koul Date: Tue Jul 4 10:05:10 2017 +0530 Merge branch 'topic/pl08x' into for-linus commit 70ef9af76590c970c23f99561c89ec614b0d26aa Merge: 87fce2f 2446563 Author: Vinod Koul Date: Tue Jul 4 10:05:01 2017 +0530 Merge branch 'topic/mxs' into for-linus commit 87fce2f5f43715c46d85a31aa9142d83d7af347d Merge: 930a634 ecfa771 Author: Vinod Koul Date: Tue Jul 4 10:04:48 2017 +0530 Merge branch 'topic/mv_xor' into for-linus commit 930a63485f858e2a12d25eb8204719a2d3157750 Merge: 1326fe6 702fce0 Author: Vinod Koul Date: Tue Jul 4 10:04:36 2017 +0530 Merge branch 'topic/dw' into for-linus commit 1326fe64e70724b7c577db6c0837009f1e1fed23 Merge: 99efdb3 1fc63cb Author: Vinod Koul Date: Tue Jul 4 10:04:28 2017 +0530 Merge branch 'topic/bcm' into for-linus commit 650fc870a2ef35b83397eebd35b8c8df211bff78 Merge: f4dd029 1cb566b Author: Linus Torvalds Date: Mon Jul 3 21:13:25 2017 -0700 Merge tag 'docs-4.13' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "There has been a fair amount of activity in the docs tree this time around. Highlights include: - Conversion of a bunch of security documentation into RST - The conversion of the remaining DocBook templates by The Amazing Mauro Machine. We can now drop the entire DocBook build chain. - The usual collection of fixes and minor updates" * tag 'docs-4.13' of git://git.lwn.net/linux: (90 commits) scripts/kernel-doc: handle DECLARE_HASHTABLE Documentation: atomic_ops.txt is core-api/atomic_ops.rst Docs: clean up some DocBook loose ends Make the main documentation title less Geocities Docs: Use kernel-figure in vidioc-g-selection.rst Docs: fix table problems in ras.rst Docs: Fix breakage with Sphinx 1.5 and upper Docs: Include the Latex "ifthen" package doc/kokr/howto: Only send regression fixes after -rc1 docs-rst: fix broken links to dynamic-debug-howto in kernel-parameters doc: Document suitability of IBM Verse for kernel development Doc: fix a markup error in coding-style.rst docs: driver-api: i2c: remove some outdated information Documentation: DMA API: fix a typo in a function name Docs: Insert missing space to separate link from text doc/ko_KR/memory-barriers: Update control-dependencies example Documentation, kbuild: fix typo "minimun" -> "minimum" docs: Fix some formatting issues in request-key.rst doc: ReSTify keys-trusted-encrypted.txt doc: ReSTify keys-request-key.txt ... commit 407cd7fb83c0ebabb490190e673d8c71ee7df97e Author: Tahsin Erdogan Date: Tue Jul 4 00:11:21 2017 -0400 ext4: change fast symlink test to not rely on i_blocks ext4_inode_info->i_data is the storage area for 4 types of data: a) Extents data b) Inline data c) Block map d) Fast symlink data (symlink length < 60) Extents data case is positively identified by EXT4_INODE_EXTENTS flag. Inline data case is also obvious because of EXT4_INODE_INLINE_DATA flag. Distinguishing c) and d) however requires additional logic. This currently relies on i_blocks count. After subtracting external xattr block from i_blocks, if it is greater than 0 then we know that some data blocks exist, so there must be a block map. This logic got broken after ea_inode feature was added. That feature charges the data blocks of external xattr inodes to the referencing inode and so adds them to the i_blocks. To fix this, we could subtract ea_inode blocks by iterating through all xattr entries and then check whether remaining i_blocks count is zero. Besides being complicated, this won't change the fact that the current way of distinguishing between c) and d) is fragile. The alternative solution is to test whether i_size is less than 60 to determine fast symlink case. ext4_symlink() uses the same test to decide whether to store the symlink in i_data. There is one caveat to address before this can work though. If an inode's i_nlink is zero during eviction, its i_size is set to zero and its data is truncated. If system crashes before inode is removed from the orphan list, next boot orphan cleanup may find the inode with zero i_size. So, a symlink that had its data stored in a block may now appear to be a fast symlink. The solution used in this patch is to treat i_size = 0 as a non-fast symlink case. A zero sized symlink is not legal so the only time this can happen is the mentioned scenario. This is also logically correct because a i_size = 0 symlink has no data stored in i_data. Suggested-by: Andreas Dilger Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger fs/ext4/inode.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit f4dd029ee0b92b77769a1ac6dce03e829e74763e Merge: 9746684 cbbdc60 Author: Linus Torvalds Date: Mon Jul 3 20:55:59 2017 -0700 Merge tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc updates from Greg KH: "Here is the "big" char/misc driver patchset for 4.13-rc1. Lots of stuff in here, a large thunderbolt update, w1 driver header reorg, the new mux driver subsystem, google firmware driver updates, and a raft of other smaller things. Full details in the shortlog. All of these have been in linux-next for a while with the only reported issue being a merge problem with this tree and the jc-docs tree in the w1 documentation area" * tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (147 commits) misc: apds990x: Use sysfs_match_string() helper mei: drop unreachable code in mei_start mei: validate the message header only in first fragment. DocBook: w1: Update W1 file locations and names in DocBook mux: adg792a: always require I2C support nvmem: rockchip-efuse: add support for rk322x-efuse nvmem: core: add locking to nvmem_find_cell nvmem: core: Call put_device() in nvmem_unregister() nvmem: core: fix leaks on registration errors nvmem: correct Broadcom OTP controller driver writes w1: Add subsystem kernel public interface drivers/fsi: Add module license to core driver drivers/fsi: Use asynchronous slave mode drivers/fsi: Add hub master support drivers/fsi: Add SCOM FSI client device driver drivers/fsi/gpio: Add tracepoints for GPIO master drivers/fsi: Add GPIO based FSI master drivers/fsi: Document FSI master sysfs files in ABI drivers/fsi: Add error handling for slave drivers/fsi: Add tracepoints for low-level operations ... commit 974668417b74ec5f68df2411f53b3d3812565059 Merge: 9a715cd d565ed3 Author: Linus Torvalds Date: Mon Jul 3 20:27:48 2017 -0700 Merge tag 'driver-core-4.13-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 driver core update for 4.13-rc1. The large majority of this is a lot of cleanup of old fields in the driver core structures and their remaining usages in random drivers. All of those fixes have been reviewed by the various subsystem maintainers. There's also some small firmware updates in here, a new kobject uevent api interface that makes userspace interaction easier, and a few other minor things. All of these have been in linux-next for a long while with no reported issues" * tag 'driver-core-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (56 commits) arm: mach-rpc: ecard: fix build error zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO() driver-core: remove struct bus_type.dev_attrs powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type powerpc: vio: use dev_groups and not dev_attrs for bus_type USB: usbip: convert to use DRIVER_ATTR_RW s390: drivers: convert to use DRIVER_ATTR_RO/WO platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW pcmcia: ds: convert to use DRIVER_ATTR_RO wireless: ipw2x00: convert to use DRIVER_ATTR_RW net: ehea: convert to use DRIVER_ATTR_RO net: caif: convert to use DRIVER_ATTR_RO TTY: hvc: convert to use DRIVER_ATTR_RW PCI: pci-driver: convert to use DRIVER_ATTR_WO IB: nes: convert to use DRIVER_ATTR_RW HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups arm: ecard: fix dev_groups patch typo tty: serdev: use dev_groups and not dev_attrs for bus_type sparc: vio: use dev_groups and not dev_attrs for bus_type hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type ... commit 9a715cd54347948e74f1a597da22884af287727d Merge: cbcd4f0 a6d7514 Author: Linus Torvalds Date: Mon Jul 3 20:04:16 2017 -0700 Merge tag 'tty-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the large tty/serial patchset for 4.13-rc1. A lot of tty and serial driver updates are in here, along with some fixups for some __get/put_user usages that were reported. Nothing huge, just lots of development by a number of different developers, full details in the shortlog. All of these have been in linux-next for a while" * tag 'tty-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (71 commits) tty: serial: lpuart: add a more accurate baud rate calculation method tty: serial: lpuart: add earlycon support for imx7ulp tty: serial: lpuart: add imx7ulp support dt-bindings: serial: fsl-lpuart: add i.MX7ULP support tty: serial: lpuart: add little endian 32 bit register support tty: serial: lpuart: refactor lpuart32_{read|write} prototype tty: serial: lpuart: introduce lpuart_soc_data to represent SoC property serial: imx-serial - move DMA buffer configuration to DT serial: imx: Enable RTSD only when needed serial: imx: Remove unused members from imx_port struct serial: 8250: 8250_omap: Fix race b/w dma completion and RX timeout serial: 8250: Fix THRE flag usage for CAP_MINI tty/serial: meson_uart: update to stable bindings dt-bindings: serial: Add bindings for the Amlogic Meson UARTs serial: Delete dead code for CIR serial ports serial: sirf: make of_device_ids const serial/mpsc: switch to dma_alloc_attrs tty: serial: Add Actions Semi Owl UART earlycon dt-bindings: serial: Document Actions Semi Owl UARTs tty/serial: atmel: make the driver DT only ... commit cbcd4f08aa637b74f575268770da86a00fabde6d Merge: 362f672 9b326df Author: Linus Torvalds Date: Mon Jul 3 19:57:30 2017 -0700 Merge tag 'staging-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO updates from Greg KH: "Here's the large set of staging and iio driver patches for 4.13-rc1. After over 500 patches, we removed about 200 more lines of code than we added, not great, but we added some new IIO drivers for unsupported hardware, so it's an overall win. Also here are lots of small fixes, and some tty core api additions (with the tty maintainer's ack) for the speakup drivers, those are finally getting some much needed cleanups and are looking much better now than before. Full details in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (529 commits) staging: lustre: replace kmalloc with kmalloc_array Staging: ion: fix code style warning from NULL comparisons staging: fsl-mc: make dprc.h header private staging: fsl-mc: move mc-cmd.h contents in the public header staging: fsl-mc: move mc-sys.h contents in the public header staging: fsl-mc: fix a few implicit includes staging: fsl-mc: remove dpmng API files staging: fsl-mc: move rest of mc-bus.h to private header staging: fsl-mc: move couple of definitions to public header staging: fsl-mc: move irq domain creation prototype to public header staging: fsl-mc: turn several exported functions static staging: fsl-mc: delete prototype of unimplemented function staging: fsl-mc: delete duplicated function prototypes staging: fsl-mc: decouple the mc-bus public headers from dprc.h staging: fsl-mc: drop useless #includes staging: fsl-mc: be consistent when checking strcmp() return staging: fsl-mc: move comparison before strcmp() call staging: speakup: make function ser_to_dev static staging: ks7010: fix spelling mistake: "errror" -> "error" staging: rtl8192e: fix spelling mistake: "respose" -> "response" ... commit 362f6729cbb1d6bbab59e069f19441b0622ff7ec Merge: 4422d80 6836796 Author: Linus Torvalds Date: Mon Jul 3 19:30:55 2017 -0700 Merge tag 'usb-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here is the big patchset of USB and PHY driver updates for 4.13-rc1. On the PHY side, they decided to move files around to "make things easier" in their tree. Hopefully that wasn't a mistake, but in linux-next testing, we haven't had any reported problems. There's the usual set of gadget and xhci and musb updates in here as well, along with a number of smaller updates for a raft of different USB drivers. Full details in the shortlog, nothing really major. All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (173 commits) Add USB quirk for HVR-950q to avoid intermittent device resets USB hub_probe: rework ugly goto-into-compound-statement usb: host: ohci-pxa27x: Handle return value of clk_prepare_enable USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick usbip: Fix uninitialized variable bug in vhci usb: core: read USB ports from DT in the usbport LED trigger driver dt-bindings: leds: document new trigger-sources property usb: typec: ucsi: Add ACPI driver usb: typec: Add support for UCSI interface usb: musb: compress return logic into one line USB: serial: propagate late probe errors USB: serial: refactor port endpoint setup usb: musb: tusb6010_omap: Convert to DMAengine API ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines usb: musb: tusb6010: Handle DMA TX completion in DMA callback as well usb: musb: tusb6010_omap: Allocate DMA channels upfront usb: musb: tusb6010_omap: Create new struct for DMA data/parameters usb: musb: tusb6010_omap: Use one musb_ep_select call in tusb_omap_dma_program usb: musb: tusb6010: Add MUSB_G_NO_SKB_RESERVE to quirks usb: musb: Add quirk to avoid skb reserve in gadget mode ... commit 7f53b7d047d221b9fe38b9f2203bd4499135be88 Merge: fbaf94e b86a496 Author: Miklos Szeredi Date: Tue Jul 4 04:05:05 2017 +0200 Merge tag 'uuid-for-4.13' of git://git.infradead.org/users/hch/uuid into overlayfs-next UUID/GUID updates: - introduce the new uuid_t/guid_t types that are going to replace the somewhat confusing uuid_be/uuid_le types and make the terminology fit the various specs, as well as the userspace libuuid library. (me, based on a previous version from Amir) - consolidated generic uuid/guid helper functions lifted from XFS and libnvdimm (Amir and me) - conversions to the new types and helpers (Amir, Andy and me) commit 1e0fc9d1eb2b0241a03e0a02bcdb9b5b641b9d35 Author: Balbir Singh Date: Thu Jun 29 03:04:11 2017 +1000 powerpc/Kconfig: Enable STRICT_KERNEL_RWX for some configs All code that patches kernel text has been moved over to using patch_instruction() and patch_instruction() is able to cope with the kernel text being read only. The linker script has been updated to ensure the read only data ends on a large page boundary, so it and the preceding kernel text can be marked R_X. We also have implementations of mark_rodata_ro() for Hash and Radix MMU modes. There are some corner-cases missing when the kernel is built relocatable, so for now make it depend on !RELOCATABLE. There's also a temporary workaround to depend on !HIBERNATION to avoid a build failure, that will be removed once we've merged with the PM tree. Signed-off-by: Balbir Singh [mpe: Make it depend on !RELOCATABLE, munge change log] Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 7614ff3272a115a047139173cc04466e8132a1f2 Author: Balbir Singh Date: Thu Jun 29 03:04:09 2017 +1000 powerpc/mm/radix: Implement STRICT_RWX/mark_rodata_ro() for Radix The Radix linear mapping code (create_physical_mapping()) tries to use the largest page size it can at each step. Currently the only reason it steps down to a smaller page size is if the start addr is unaligned (never happens in practice), or the end of memory is not aligned to a huge page boundary. To support STRICT_RWX we need to break the mapping at __init_begin, so that the text and rodata prior to that can be marked R_X and the regular pages after can be marked RW. Having done that we can now implement mark_rodata_ro() for Radix, knowing that we won't need to split any mappings. Signed-off-by: Balbir Singh [mpe: Split down to PAGE_SIZE, not 2MB, rewrite change log] Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 67 ++++++++++++++++++++++++++++++++++++++++- arch/powerpc/mm/pgtable_64.c | 4 ++- 2 files changed, 69 insertions(+), 2 deletions(-) commit cd65d69713349fc7b33fa9de2b32989b99c9fb39 Author: Balbir Singh Date: Thu Jun 29 03:04:08 2017 +1000 powerpc/mm/hash: Implement mark_rodata_ro() for hash With hash we update the bolted pte to mark it read-only. We rely on the MMU_FTR_KERNEL_RO to generate the correct permissions for read-only text. The radix implementation just prints a warning in this implementation Signed-off-by: Balbir Singh [mpe: Make the warning louder when we don't have MMU_FTR_KERNEL_RO] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash.h | 3 +++ arch/powerpc/include/asm/book3s/64/radix.h | 4 ++++ arch/powerpc/mm/pgtable-hash64.c | 36 ++++++++++++++++++++++++++++++ arch/powerpc/mm/pgtable_64.c | 13 +++++++++++ 4 files changed, 56 insertions(+) commit 4422d80ed7d4bdb2d6e9fb890c66c3d9250ba694 Merge: 9a9594e 32288da Author: Linus Torvalds Date: Mon Jul 3 18:33:03 2017 -0700 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Thomas Gleixner: "The RAS updates for the 4.13 merge window: - Cleanup of the MCE injection facility (Borsilav Petkov) - Rework of the AMD/SMCA handling (Yazen Ghannam) - Enhancements for ACPI/APEI to handle new notitication types (Shiju Jose) - atomic_t to refcount_t conversion (Elena Reshetova) - A few fixes and enhancements all over the place" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: RAS/CEC: Check the correct variable in the debugfs error handling x86/mce: Always save severity in machine_check_poll() x86/MCE, xen/mcelog: Make /dev/mcelog registration messages more precise x86/mce: Update bootlog description to reflect behavior on AMD x86/mce: Don't disable MCA banks when offlining a CPU on AMD x86/mce/mce-inject: Preset the MCE injection struct x86/mce: Clean up include files x86/mce: Get rid of register_mce_write_callback() x86/mce: Merge mce_amd_inj into mce-inject x86/mce/AMD: Use saved threshold block info in interrupt handler x86/mce/AMD: Use msr_stat when clearing MCA_STATUS x86/mce/AMD: Carve out SMCA bank configuration x86/mce/AMD: Redo error logging from APIC LVT interrupt handlers x86/mce: Convert threshold_bank.cpus from atomic_t to refcount_t RAS: Make local function parse_ras_param() static ACPI/APEI: Handle GSIV and GPIO notification types commit 9a9594efe54324e9124add7e7b1e7bdb6d0b08a3 Merge: 3ad918e 993647a Author: Linus Torvalds Date: Mon Jul 3 18:08:06 2017 -0700 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull SMP hotplug updates from Thomas Gleixner: "This update is primarily a cleanup of the CPU hotplug locking code. The hotplug locking mechanism is an open coded RWSEM, which allows recursive locking. The main problem with that is the recursive nature as it evades the full lockdep coverage and hides potential deadlocks. The rework replaces the open coded RWSEM with a percpu RWSEM and establishes full lockdep coverage that way. The bulk of the changes fix up recursive locking issues and address the now fully reported potential deadlocks all over the place. Some of these deadlocks have been observed in the RT tree, but on mainline the probability was low enough to hide them away." * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits) cpu/hotplug: Constify attribute_group structures powerpc: Only obtain cpu_hotplug_lock if called by rtasd ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init cpu/hotplug: Remove unused check_for_tasks() function perf/core: Don't release cred_guard_mutex if not taken cpuhotplug: Link lock stacks for hotplug callbacks acpi/processor: Prevent cpu hotplug deadlock sched: Provide is_percpu_thread() helper cpu/hotplug: Convert hotplug locking to percpu rwsem s390: Prevent hotplug rwsem recursion arm: Prevent hotplug rwsem recursion arm64: Prevent cpu hotplug rwsem recursion kprobes: Cure hotplug lock ordering issues jump_label: Reorder hotplug lock and jump_label_lock perf/tracing/cpuhotplug: Fix locking order ACPI/processor: Use cpu_hotplug_disable() instead of get_online_cpus() PCI: Replace the racy recursion prevention PCI: Use cpu_hotplug_disable() instead of get_online_cpus() perf/x86/intel: Drop get_online_cpus() in intel_snb_check_microcode() x86/perf: Drop EXPORT of perf_check_microcode ... commit 3ad918e65d6926490c8f18a157cea25bf29ecd3a Merge: 8c07351 a1272dd Author: Linus Torvalds Date: Mon Jul 3 18:01:50 2017 -0700 Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 timers updates from Thomas Gleixner: "This update contains: - The solution for the TSC deadline timer borkage, which is caused by a hardware problem in the TSC_ADJUST/TSC_DEADLINE_TIMER logic. The problem is documented now and fixed with a microcode update, so we can remove the workaround and just check for the microcode version. If the microcode is not up to date, then the TSC deadline timer is disabled. If the borkage is fixed by the proper microcode version, then the deadline timer can be used. In both cases the restrictions to the range of the TSC_ADJUST value, which were added as workarounds, are removed. - A few simple fixes and updates to the timer related x86 code" * 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tsc: Call check_system_tsc_reliable() before unsynchronized_tsc() x86/hpet: Do not use smp_processor_id() in preemptible code x86/time: Make setup_default_timer_irq() static x86/tsc: Remove the TSC_ADJUST clamp x86/apic: Add TSC_DEADLINE quirk due to errata x86/apic: Change the lapic name in deadline mode commit 8c073517a992124e385040c0da0df809abfa8f61 Merge: 03ffbcd df65c1b Author: Linus Torvalds Date: Mon Jul 3 17:27:42 2017 -0700 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 PCI updates from Thomas Gleixner: "This update provides the seperation of x86 PCI accessors from the global PCI lock in the generic PCI config space accessors. The reasons for this are: - x86 has it's own PCI config lock for various reasons, so the accessors have to lock two locks nested. - The ECAM (mmconfig) access to the extended configuration space does not require locking. The existing generic locking causes a massive lock contention when accessing the extended config space of the Uncore facility for performance monitoring. The commit which switched the access to the primary config space over to ECAM mode has been removed from the branch, so the primary config space is still accessed with type1 accessors properly serialized by the x86 internal locking. Bjorn agreed on merging this through the x86 tree" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/PCI: Select CONFIG_PCI_LOCKLESS_CONFIG PCI: Provide Kconfig option for lockless config space accessors x86/PCI/ce4100: Properly lock accessor functions x86/PCI: Abort if legacy init fails x86/PCI: Remove duplicate defines commit 9d92573fff3ec70785ef1815cc80573f70e7a921 Merge: 2de5148 0b27796 Author: Dan Williams Date: Mon Jul 3 16:54:58 2017 -0700 Merge branch 'for-4.13/dax' into libnvdimm-for-next commit 03ffbcdd7898c0b5299efeb9f18de927487ec1cf Merge: 1b044f1 f9632de Author: Linus Torvalds Date: Mon Jul 3 16:50:31 2017 -0700 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The irq department delivers: - Expand the generic infrastructure handling the irq migration on CPU hotplug and convert X86 over to it. (Thomas Gleixner) Aside of consolidating code this is a preparatory change for: - Finalizing the affinity management for multi-queue devices. The main change here is to shut down interrupts which are affine to a outgoing CPU and reenabling them when the CPU comes online again. That avoids moving interrupts pointlessly around and breaking and reestablishing affinities for no value. (Christoph Hellwig) Note: This contains also the BLOCK-MQ and NVME changes which depend on the rework of the irq core infrastructure. Jens acked them and agreed that they should go with the irq changes. - Consolidation of irq domain code (Marc Zyngier) - State tracking consolidation in the core code (Jeffy Chen) - Add debug infrastructure for hierarchical irq domains (Thomas Gleixner) - Infrastructure enhancement for managing generic interrupt chips via devmem (Bartosz Golaszewski) - Constification work all over the place (Tobias Klauser) - Two new interrupt controller drivers for MVEBU (Thomas Petazzoni) - The usual set of fixes, updates and enhancements all over the place" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (112 commits) irqchip/or1k-pic: Fix interrupt acknowledgement irqchip/irq-mvebu-gicp: Allocate enough memory for spi_bitmap irqchip/gic-v3: Fix out-of-bound access in gic_set_affinity nvme: Allocate queues for all possible CPUs blk-mq: Create hctx for each present CPU blk-mq: Include all present CPUs in the default queue mapping genirq: Avoid unnecessary low level irq function calls genirq: Set irq masked state when initializing irq_desc genirq/timings: Add infrastructure for estimating the next interrupt arrival time genirq/timings: Add infrastructure to track the interrupt timings genirq/debugfs: Remove pointless NULL pointer check irqchip/gic-v3-its: Don't assume GICv3 hardware supports 16bit INTID irqchip/gic-v3-its: Add ACPI NUMA node mapping irqchip/gic-v3-its-platform-msi: Make of_device_ids const irqchip/gic-v3-its: Make of_device_ids const irqchip/irq-mvebu-icu: Add new driver for Marvell ICU irqchip/irq-mvebu-gicp: Add new driver for Marvell GICP dt-bindings/interrupt-controller: Add DT binding for the Marvell ICU genirq/irqdomain: Remove auto-recursive hierarchy support irqchip/MSI: Use irq_domain_update_bus_token instead of an open coded access ... commit 2de5148ffb12ff6b4088125f44818771e78e6830 Author: Dan Williams Date: Mon Jul 3 16:30:44 2017 -0700 libnvdimm, namespace: record 'lbasize' for pmem namespaces Commit f979b13c3cc5 "libnvdimm, label: honor the lba size specified in v1.2 labels") neglected to update the 'lbasize' in the label when the namespace sector_size attribute was written. We need this value in the label for inter-OS / pre-OS compatibility. Fixes: f979b13c3cc5 ("libnvdimm, label: honor the lba size specified in v1.2 labels") Signed-off-by: Dan Williams drivers/nvdimm/label.c | 1 + 1 file changed, 1 insertion(+) commit 1b044f1cfc65a7d90b209dfabd57e16d98b58c5b Merge: e0f3e8f 2287d86 Author: Linus Torvalds Date: Mon Jul 3 16:14:51 2017 -0700 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "A rather large update for timers/timekeeping: - compat syscall consolidation (Al Viro) - Posix timer consolidation (Christoph Helwig / Thomas Gleixner) - Cleanup of the device tree based initialization for clockevents and clocksources (Daniel Lezcano) - Consolidation of the FTTMR010 clocksource/event driver (Linus Walleij) - The usual set of small fixes and updates all over the place" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (93 commits) timers: Make the cpu base lock raw clocksource/drivers/mips-gic-timer: Fix an error code in 'gic_clocksource_of_init()' clocksource/drivers/fsl_ftm_timer: Unmap region obtained by of_iomap clocksource/drivers/tcb_clksrc: Make IO endian agnostic clocksource/drivers/sun4i: Switch to the timer-of common init clocksource/drivers/timer-of: Fix invalid iomap check Revert "ktime: Simplify ktime_compare implementation" clocksource/drivers: Fix uninitialized variable use in timer_of_init kselftests: timers: Add test for frequency step kselftests: timers: Fix inconsistency-check to not ignore first timestamp time: Add warning about imminent deprecation of CONFIG_GENERIC_TIME_VSYSCALL_OLD time: Clean up CLOCK_MONOTONIC_RAW time handling posix-cpu-timers: Make timespec to nsec conversion safe itimer: Make timeval to nsec conversion range limited timers: Fix parameter description of try_to_del_timer_sync() ktime: Simplify ktime_compare implementation clocksource/drivers/fttmr010: Factor out clock read code clocksource/drivers/fttmr010: Implement delay timer clocksource/drivers: Add timer-of common init routine clocksource/drivers/tcb_clksrc: Save timer context on suspend/resume ... commit 7c20f11680a441df09de7235206f70115fbf6290 Author: Christoph Hellwig Date: Mon Jul 3 16:58:43 2017 -0600 bio-integrity: stop abusing bi_end_io And instead call directly into the integrity code from bio_end_io. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio-integrity.c | 39 ++++++++++++--------------------------- block/bio.c | 5 ++--- block/blk.h | 11 +++++++++++ include/linux/bio.h | 9 --------- 4 files changed, 25 insertions(+), 39 deletions(-) commit 63573e359d052e506d305c263576499f06355985 Author: Dmitry Monakhov Date: Thu Jun 29 11:31:15 2017 -0700 bio-integrity: Restore original iterator on verify stage Currently ->verify_fn not woks at all because at the moment it is called bio->bi_iter.bi_size == 0, so we do not iterate integrity bvecs at all. In order to perform verification we need to know original data vector, with new bvec rewind API this is trivial. testcase: https://github.com/dmonakhov/xfstests/commit/3c6509eaa83b9c17cd0bc95d73fcdd76e1c54a85 Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Dmitry Monakhov [hch: adopted for new status values] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio-integrity.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit f9df1cd99ebd82f05e8f5e0aa7e38cb8d3c791d7 Author: Dmitry Monakhov Date: Thu Jun 29 11:31:14 2017 -0700 bio: add bvec_iter rewind API Some ->bi_end_io handlers (for example: pi_verify or decrypt handlers) need to know original data vector, but after bio traverse io-stack it may be advanced, splited and relocated many times so it is hard to guess original iterator. Let's add 'bi_done' conter which accounts number of bytes iterator was advanced during it's evolution. Later end_io handler may easily restore original iterator by rewinding iterator to iter->bi_done. Note: this change makes sizeof (struct bvec_iter) multiple to 8 Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Dmitry Monakhov [hch: switched to true/false return] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/bio.h | 19 +++++++++++++++++-- include/linux/bvec.h | 27 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) commit b1fb2c52b2d85f51f36f1661409f9aeef94265ff Author: Dmitry Monakhov Date: Thu Jun 29 11:31:13 2017 -0700 block: guard bvec iteration logic Currently if some one try to advance bvec beyond it's size we simply dump WARN_ONCE and continue to iterate beyond bvec array boundaries. This simply means that we endup dereferencing/corrupting random memory region. Sane reaction would be to propagate error back to calling context But bvec_iter_advance's calling context is not always good for error handling. For safity reason let truncate iterator size to zero which will break external iteration loop which prevent us from unpredictable memory range corruption. And even it caller ignores an error, it will corrupt it's own bvecs, not others. This patch does: - Return error back to caller with hope that it will react on this - Truncate iterator size Code was added long time ago here 4550dd6c, luckily no one hit it in real life :) Signed-off-by: Dmitry Monakhov Reviewed-by: Ming Lei Reviewed-by: Martin K. Petersen [hch: switch to true/false returns instead of errno values] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvdimm/blk.c | 3 ++- drivers/nvdimm/btt.c | 3 ++- include/linux/bio.h | 4 +++- include/linux/bvec.h | 14 +++++++++----- 4 files changed, 16 insertions(+), 8 deletions(-) commit 128b6f9fdd9ace9e56cb3a263b4bc269658f9c40 Author: Dmitry Monakhov Date: Thu Jun 29 11:31:12 2017 -0700 t10-pi: Move opencoded contants to common header Signed-off-by: Dmitry Monakhov Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/t10-pi.c | 9 +++------ drivers/scsi/lpfc/lpfc_scsi.c | 5 +++-- drivers/scsi/qla2xxx/qla_isr.c | 8 ++++---- drivers/target/target_core_sbc.c | 2 +- include/linux/t10-pi.h | 2 ++ 5 files changed, 13 insertions(+), 13 deletions(-) commit e23947bd76f00701f9407af23e671f4da96f5f25 Author: Dmitry Monakhov Date: Thu Jun 29 11:31:11 2017 -0700 bio-integrity: fold bio_integrity_enabled to bio_integrity_prep Currently all integrity prep hooks are open-coded, and if prepare fails we ignore it's code and fail bio with EIO. Let's return real error to upper layer, so later caller may react accordingly. In fact no one want to use bio_integrity_prep() w/o bio_integrity_enabled, so it is reasonable to fold it in to one function. Signed-off-by: Dmitry Monakhov Reviewed-by: Martin K. Petersen [hch: merged with the latest block tree, return bool from bio_integrity_prep] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe Documentation/block/data-integrity.txt | 6 +-- block/bio-integrity.c | 88 +++++++++++++++------------------- block/blk-core.c | 5 +- block/blk-mq.c | 4 +- drivers/nvdimm/blk.c | 13 +---- drivers/nvdimm/btt.c | 13 +---- include/linux/bio.h | 12 ++--- 7 files changed, 50 insertions(+), 91 deletions(-) commit fbd08e7673f950854679e5d79a30bb25e77a9d08 Author: Dmitry Monakhov Date: Thu Jun 29 11:31:10 2017 -0700 bio-integrity: fix interface for bio_integrity_trim bio_integrity_trim inherent it's interface from bio_trim and accept offset and size, but this API is error prone because data offset must always be insync with bio's data offset. That is why we have integrity update hook in bio_advance() So only meaningful values are: offset == 0, sectors == bio_sectors(bio) Let's just remove them completely. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Dmitry Monakhov Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio-integrity.c | 11 ++--------- block/bio.c | 4 ++-- drivers/md/dm.c | 2 +- include/linux/bio.h | 5 ++--- 4 files changed, 7 insertions(+), 15 deletions(-) commit 309a62fa3a9e78cb37a620913151cbb47d83b81d Author: Dmitry Monakhov Date: Thu Jun 29 11:31:09 2017 -0700 bio-integrity: bio_integrity_advance must update integrity seed SCSI drivers do care about bip_seed so we must update it accordingly. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Dmitry Monakhov Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio-integrity.c | 1 + 1 file changed, 1 insertion(+) commit 376a78abf5cc721a86ed42a1a24044d35fb8d2a8 Author: Dmitry Monakhov Date: Thu Jun 29 11:31:08 2017 -0700 bio-integrity: bio_trim should truncate integrity vector accordingly Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Signed-off-by: Dmitry Monakhov Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 4 ++++ 1 file changed, 4 insertions(+) commit 32825c45ff8f4cce937ab85b030dc693ceb1aa0a Author: Ming Lei Date: Mon Jul 3 20:37:14 2017 +0800 blk-mq-sched: fix performance regression of mq-deadline When mq-deadline is taken, IOPS of sequential read and seqential write is observed more than 20% drop on sata(scsi-mq) devices, compared with using 'none' scheduler. The reason is that the default nr_requests for scheduler is too big for small queuedepth devices, and latency is increased much. Since the principle of taking 256 requests for mq scheduler is based on 128 queue depth, this patch changes into double size of min(hw queue_depth, 128). Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 431b17f9d5453533cba7d73e7e40428e4f90b35d Author: Paolo Valente Date: Mon Jul 3 10:00:10 2017 +0200 block, bfq: don't change ioprio class for a bfq_queue on a service tree On each deactivation or re-scheduling (after being served) of a bfq_queue, BFQ invokes the function __bfq_entity_update_weight_prio(), to perform pending updates of ioprio, weight and ioprio class for the bfq_queue. BFQ also invokes this function on I/O-request dispatches, to raise or lower weights more quickly when needed, thereby improving latency. However, the entity representing the bfq_queue may be on the active (sub)tree of a service tree when this happens, and, although with a very low probability, the bfq_queue may happen to also have a pending change of its ioprio class. If both conditions hold when __bfq_entity_update_weight_prio() is invoked, then the entity moves to a sort of hybrid state: the new service tree for the entity, as returned by bfq_entity_service_tree(), differs from service tree on which the entity still is. The functions that handle activations and deactivations of entities do not cope with such a hybrid state (and would need to become more complex to cope). This commit addresses this issue by just making __bfq_entity_update_weight_prio() not perform also a possible pending change of ioprio class, when invoked on an I/O-request dispatch for a bfq_queue. Such a change is thus postponed to when __bfq_entity_update_weight_prio() is invoked on deactivation or re-scheduling of the bfq_queue. Reported-by: Marco Piazza Reported-by: Laurentiu Nicola Signed-off-by: Paolo Valente Tested-by: Marco Piazza Signed-off-by: Jens Axboe block/bfq-iosched.c | 14 ++++++++++---- block/bfq-iosched.h | 3 ++- block/bfq-wf2q.c | 39 ++++++++++++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 10 deletions(-) commit 3170d8d226c2053355f3946b4b5ded4c006fe6d4 Author: Al Viro Date: Tue May 2 20:06:33 2017 -0400 kill {__,}{get,put}_user_unaligned() no users left Signed-off-by: Al Viro arch/arm/include/asm/uaccess.h | 7 - arch/arm64/include/asm/uaccess.h | 4 - arch/ia64/include/asm/uaccess.h | 36 ----- arch/m68k/include/asm/uaccess.h | 7 - arch/mips/include/asm/uaccess.h | 277 -------------------------------- arch/parisc/include/asm/uaccess.h | 1 - arch/powerpc/include/asm/uaccess.h | 3 - arch/s390/include/asm/uaccess.h | 3 - arch/sparc/include/asm/uaccess_64.h | 1 - arch/tile/include/asm/uaccess.h | 1 - arch/x86/include/asm/uaccess.h | 3 - include/asm-generic/uaccess-unaligned.h | 26 --- 12 files changed, 369 deletions(-) commit 468138d78510688fb5476f98d23f11ac6a63229a Author: Al Viro Date: Tue May 2 19:52:17 2017 -0400 binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail on MMU targets EFAULT is possible here. Make both return 0 or error, passing what used to be the return value of flat_get_addr_from_rp() by reference. Signed-off-by: Al Viro arch/arm/include/asm/flat.h | 25 +++++++++++++++++++++--- arch/blackfin/include/asm/flat.h | 25 ++++++++++++++---------- arch/blackfin/kernel/flat.c | 13 ++++++------- arch/c6x/include/asm/flat.h | 15 +++++++++++++-- arch/h8300/include/asm/flat.h | 24 +++++++++++++++++------ arch/m32r/include/asm/flat.h | 19 ++++++++----------- arch/m68k/include/asm/flat.h | 23 +++++++++++++++++++--- arch/microblaze/include/asm/flat.h | 34 ++++++++++++++++----------------- arch/sh/include/asm/flat.h | 15 +++++++++++++-- arch/xtensa/include/asm/flat.h | 15 +++++++++++++-- fs/binfmt_flat.c | 39 +++++++++++++++++++++----------------- include/linux/flat.h | 2 +- 12 files changed, 168 insertions(+), 81 deletions(-) commit e0f3e8f14da868047c524a0cf11e08b95fd1b008 Merge: e5859eb 9e293b5 Author: Linus Torvalds Date: Mon Jul 3 15:39:36 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: "The bulk of the s390 patches for 4.13. Some new things but mostly bug fixes and cleanups. Noteworthy changes: - The SCM block driver is converted to blk-mq - Switch s390 to 5 level page tables. The virtual address space for a user space process can now have up to 16EB-4KB. - Introduce a ELF phdr flag for qemu to avoid the global vm.alloc_pgste which forces all processes to large page tables - A couple of PCI improvements to improve error recovery - Included is the merge of the base support for proper machine checks for KVM" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (52 commits) s390/dasd: Fix faulty ENODEV for RO sysfs attribute s390/pci: recognize name clashes with uids s390/pci: provide more debug information s390/pci: fix handling of PEC 306 s390/pci: improve pci hotplug s390/pci: introduce clp_get_state s390/pci: improve error handling during fmb (de)registration s390/pci: improve unreg_ioat error handling s390/pci: improve error handling during interrupt deregistration s390/pci: don't cleanup in arch_setup_msi_irqs KVM: s390: Backup the guest's machine check info s390/nmi: s390: New low level handling for machine check happening in guest s390/fpu: export save_fpu_regs for all configs s390/kvm: avoid global config of vm.alloc_pgste=1 s390: rename struct psw_bits members s390: rename psw_bits enums s390/mm: use correct address space when enabling DAT s390/cio: introduce io_subchannel_type s390/ipl: revert Load Normal semantics for LPAR CCW-type re-IPL s390/dumpstack: remove raw stack dump ... commit e5859eb84576ce7a0d95be6224d2e269c8daa741 Merge: 058e88d 33f9e02 Author: Linus Torvalds Date: Mon Jul 3 15:27:58 2017 -0700 Merge branch 'parisc-4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Main changes are: - Added support to the parisc dma functions to return DMA_ERROR_CODE if DMA isn't possible. This fixes a long standing kernel crash if parport_pc is enabled (by Thomas Bogendoerfer, marked for stable series). - Use the compat_sys_keyctl() in compat mode (by Eric Biggers, marked for stable series). - Initial support for the Page Deallocation Table (PDT) which is maintained by firmware and holds the list of memory addresses which had physical errors. By checking that list we can prevent Linux to use those broken memory areas. - Ensure IRQs are off in switch_mm(). - Report SIGSEGV instead of SIGBUS when running out of stack. - Mark the cr16 clocksource stable on single-socket and single-core machines" * 'parisc-4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: DMA API: return error instead of BUG_ON for dma ops on non dma devs parisc: Report SIGSEGV instead of SIGBUS when running out of stack parisc: use compat_sys_keyctl() parisc: Don't hardcode PSW values in hpmc code parisc: Don't hardcode PSW values in gsc_*() functions parisc: Avoid zeroing gr[0] in fixup_exception() parisc/mm: Ensure IRQs are off in switch_mm() parisc: Add Page Deallocation Table (PDT) support parisc: Enhance detection of synchronous cr16 clocksources parisc: Drop per_cpu uaccess related exception_data struct parisc: Inline trivial exception code in lusercopy.S commit 058e88d37f872a9bc9fac7e49fdad43cdc9ba25d Merge: 241e5e6 14ef905 Author: Linus Torvalds Date: Mon Jul 3 15:17:19 2017 -0700 Merge tag 'microblaze-4.13-rc1' of git://git.monstr.eu/linux-2.6-microblaze Pull microblaze updates from Michal Simek: - timer fix - use simplified macro in dma.c - wire-up new syscall - remove asp-generic wrappers - fix MMU table handling - defconfig updates - low-level entry.S changes * tag 'microblaze-4.13-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Fix MSR flags when returning from exception microblaze: Separate GP registers from MSR handling microblaze: Enabling CONFIG_BRIDGE in mmu_defconfig microblaze: Enabling CONFIGS related to MTD microblaze: Update defconfigs microblaze: mm: Flush TLB to ensure correct mapping when higmem ON microblaze: remove asm-generic wrapper headers microblaze: wire up statx syscall microblaze: Set ->min_delta_ticks and ->max_delta_ticks for timer microblaze: use sg_phys() commit 241e5e6f0497769d37240215047b9473ae3ae3f0 Merge: 7a69f9c6 204a2be Author: Linus Torvalds Date: Mon Jul 3 15:12:52 2017 -0700 Merge tag 'm68k-for-v4.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - NuBus improvements and cleanups - defconfig updates - Fix debugger syscall restart interactions, leading to the global removal of ptrace_signal_deliver() * tag 'm68k-for-v4.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Remove ptrace_signal_deliver m68k/defconfig: Update defconfigs for v4.12-rc1 nubus: Fix pointer validation nubus: Remove slot zero probe commit 7a69f9c60b49699579f5bfb71f928cceba0afe1a Merge: 9bc088a 8781fb7 Author: Linus Torvalds Date: Mon Jul 3 14:45:09 2017 -0700 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: - Continued work to add support for 5-level paging provided by future Intel CPUs. In particular we switch the x86 GUP code to the generic implementation. (Kirill A. Shutemov) - Continued work to add PCID CPU support to native kernels as well. In this round most of the focus is on reworking/refreshing the TLB flush infrastructure for the upcoming PCID changes. (Andy Lutomirski)" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (34 commits) x86/mm: Delete a big outdated comment about TLB flushing x86/mm: Don't reenter flush_tlb_func_common() x86/KASLR: Fix detection 32/64 bit bootloaders for 5-level paging x86/ftrace: Exclude functions in head64.c from function-tracing x86/mmap, ASLR: Do not treat unlimited-stack tasks as legacy mmap x86/mm: Remove reset_lazy_tlbstate() x86/ldt: Simplify the LDT switching logic x86/boot/64: Put __startup_64() into .head.text x86/mm: Add support for 5-level paging for KASLR x86/mm: Make kernel_physical_mapping_init() support 5-level paging x86/mm: Add sync_global_pgds() for configuration with 5-level paging x86/boot/64: Add support of additional page table level during early boot x86/boot/64: Rename init_level4_pgt and early_level4_pgt x86/boot/64: Rewrite startup_64() in C x86/boot/compressed: Enable 5-level paging during decompression stage x86/boot/efi: Define __KERNEL32_CS GDT on 64-bit configurations x86/boot/efi: Fix __KERNEL_CS definition of GDT entry on 64-bit configurations x86/boot/efi: Cleanup initialization of GDT entries x86/asm: Fix comment in return_from_SYSCALL_64() x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation ... commit 7184ef8bab0cb865c3cea9dd1a675771145df0af Author: Shaohua Li Date: Mon Jul 3 14:34:23 2017 -0700 MD: fix sleep in atomic bioset_free() will take a mutex, so can't get called with spinlock hold. Fix: 5a85071c2cbc(md: use a separate bio_set for synchronous IO.) Cc: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 9bc088ab66be8978fbc981ba9644468fa2c2fd3f Merge: e144900 d7f7dc7 Author: Linus Torvalds Date: Mon Jul 3 14:35:18 2017 -0700 Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode updates from Ingo Molnar: "The main changes are a fix early microcode application for resume-from-RAM, plus a 32-bit initrd placement fix - by Borislav Petkov" * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode: Make a couple of symbols static x86/microcode/intel: Save pointer to ucode patch for early AP loading x86/microcode: Look for the initrd at the correct address on 32-bit commit 25f4535a94c2b38d09912d7e8bab371c9e97be38 Author: Michal Kalderon Date: Mon Jul 3 21:55:25 2017 +0300 qed: initialize ll2_syn_handle at start of function Fix compilation warning qed_iwarp.c:1721:5: warning: ll2_syn_handle may be used uninitialized in this function Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e1449007e83f18db4470194232812ae524d64d79 Merge: e6529f6 71c2a2d Author: Linus Torvalds Date: Mon Jul 3 14:09:32 2017 -0700 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: "Avoid boot time TSC calibration on Hyper-V hosts, to improve calibration robustness. (Vitaly Kuznetsov)" * 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hyperv: Read TSC frequency from a synthetic MSR x86/hyperv: Check frequency MSRs presence according to the specification commit e6529f6f58a293fff59fa809ce67cfa063219d73 Merge: 6553698 c133c76 Author: Linus Torvalds Date: Mon Jul 3 14:07:45 2017 -0700 Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 debug update from Ingo Molnar: "A single fix for an off-by one bug in test_nmi_ipi() that probably doesn't matter in practice" * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/nmi: Fix timeout test in test_nmi_ipi() commit 6553698be05983056f5561cef6aaee0cc6afe7a0 Merge: 25e09ca e8ad8bc Author: Linus Torvalds Date: Mon Jul 3 13:42:17 2017 -0700 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Two small cleanups" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/paravirt: Remove unnecessary return from void function x86/boot: Add missing strchr() declaration commit 25e09ca52459586eb6171209635bc8b436a56d79 Merge: 48b5259 fe2d48b Author: Linus Torvalds Date: Mon Jul 3 13:40:38 2017 -0700 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 in this cycle were KASLR improvements for rare environments with special boot options, by Baoquan He. Also misc smaller changes/cleanups" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/debug: Extend the lower bound of crash kernel low reservations x86/boot: Remove unused copy_*_gs() functions x86/KASLR: Use the right memcpy() implementation Documentation/kernel-parameters.txt: Update 'memmap=' boot option description x86/KASLR: Handle the memory limit specified by the 'memmap=' and 'mem=' boot options x86/KASLR: Parse all 'memmap=' boot option entries commit 48b5259cf0a2b86b978da122f9459e22a2d1e8f6 Merge: 2a27538 236222d Author: Linus Torvalds Date: Mon Jul 3 13:38:28 2017 -0700 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "A single commit micro-optimizing short user copies on certain Intel CPUs" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings commit 2a275382a4f78f386db3473d9bb9987580de3cf4 Merge: 59b6018 538ac46 Author: Linus Torvalds Date: Mon Jul 3 13:36:23 2017 -0700 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic updates from Ingo Molnar: "Janitorial changes: removal of an unused function plus __init annotations" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Make arch_init_msi/htirq_domain __init x86/apic: Make init_legacy_irqs() __init x86/ioapic: Remove unused IO_APIC_irq_trigger() function commit 59b60185b4a1adc46b115291dc34af2186cc9678 Merge: 9bd4218 d4af6d9 Author: Linus Torvalds Date: Mon Jul 3 13:33:57 2017 -0700 Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull nohz updates from Ingo Molnar: "The main changes in this cycle relate to fixing another bad (but sporadic and hard to detect) interaction between the dynticks scheduler tick and hrtimers, plus related improvements to better detection and handling of similar problems - by Frédéric Weisbecker" * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: nohz: Fix spurious warning when hrtimer and clockevent get out of sync nohz: Fix buggy tick delay on IRQ storms nohz: Reset next_tick cache even when the timer has no regs nohz: Fix collision between tick and other hrtimers, again nohz: Add hrtimer sanity check commit 7bc7b7777ee0e3b3d995aebaf26a462d5a23e3d7 Author: John Brooks Date: Mon Jul 3 14:05:35 2017 -0400 drm/amdgpu: Don't call amd_powerplay_destroy() if we don't have powerplay amd_powerplay_destroy() expects a handle pointing to a struct pp_instance. On chips without PowerPlay, pp_handle points to a struct amdgpu_device. The resulting attempt to kfree() fields of the wrong struct ends in fire: [ 91.560405] BUG: unable to handle kernel paging request at ffffebe000000620 [ 91.560414] IP: kfree+0x57/0x160 [ 91.560416] PGD 0 [ 91.560416] P4D 0 [ 91.560420] Oops: 0000 [#1] SMP [ 91.560422] Modules linked in: tun x86_pkg_temp_thermal crc32_pclmul ghash_clmulni_intel efivarfs amdgpu(-) i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm [ 91.560438] CPU: 6 PID: 3598 Comm: rmmod Not tainted 4.12.0-rc5-drm-next-4.13-ttmpatch+ #1 [ 91.560443] Hardware name: Gigabyte Technology Co., Ltd. Z97X-UD3H-BK/Z97X-UD3H-BK-CF, BIOS F6 06/17/2014 [ 91.560448] task: ffff8805063d6a00 task.stack: ffffc90003400000 [ 91.560451] RIP: 0010:kfree+0x57/0x160 [ 91.560454] RSP: 0018:ffffc90003403cc0 EFLAGS: 00010286 [ 91.560457] RAX: 000077ff80000000 RBX: 00000000000186a0 RCX: 0000000180400035 [ 91.560460] RDX: 0000000180400036 RSI: ffffea001418e740 RDI: ffffea0000000000 [ 91.560463] RBP: ffffc90003403cd8 R08: 000000000639d201 R09: 0000000180400035 [ 91.560467] R10: ffffebe000000600 R11: 0000000000000300 R12: ffff880500530030 [ 91.560470] R13: ffffffffa01e70fc R14: 00000000ffffffff R15: ffff880500530000 [ 91.560473] FS: 00007f7e500c3700(0000) GS:ffff88051ed80000(0000) knlGS:0000000000000000 [ 91.560478] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 91.560480] CR2: ffffebe000000620 CR3: 0000000503103000 CR4: 00000000001406e0 [ 91.560483] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 91.560487] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 91.560489] Call Trace: [ 91.560530] amd_powerplay_destroy+0x1c/0x60 [amdgpu] [ 91.560558] amdgpu_pp_late_fini+0x44/0x60 [amdgpu] [ 91.560575] amdgpu_fini+0x254/0x490 [amdgpu] [ 91.560593] amdgpu_device_fini+0x58/0x1b0 [amdgpu] [ 91.560610] amdgpu_driver_unload_kms+0x4f/0xa0 [amdgpu] [ 91.560622] drm_dev_unregister+0x3c/0xe0 [drm] [ 91.560638] amdgpu_pci_remove+0x19/0x30 [amdgpu] [ 91.560643] pci_device_remove+0x39/0xc0 [ 91.560648] device_release_driver_internal+0x155/0x210 [ 91.560651] driver_detach+0x38/0x70 [ 91.560655] bus_remove_driver+0x4c/0xa0 [ 91.560658] driver_unregister+0x2c/0x40 [ 91.560662] pci_unregister_driver+0x21/0x90 [ 91.560689] amdgpu_exit+0x15/0x406 [amdgpu] [ 91.560694] SyS_delete_module+0x1a8/0x270 [ 91.560698] ? exit_to_usermode_loop+0x92/0xa0 [ 91.560702] entry_SYSCALL_64_fastpath+0x13/0x94 [ 91.560705] RIP: 0033:0x7f7e4fc118e7 [ 91.560708] RSP: 002b:00007fff978ca118 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 91.560713] RAX: ffffffffffffffda RBX: 000055afe21bc200 RCX: 00007f7e4fc118e7 [ 91.560716] RDX: 000000000000000a RSI: 0000000000000800 RDI: 000055afe21bc268 [ 91.560719] RBP: 0000000000000003 R08: 0000000000000000 R09: 1999999999999999 [ 91.560722] R10: 0000000000000883 R11: 0000000000000206 R12: 00007fff978c9100 [ 91.560725] R13: 0000000000000000 R14: 0000000000000000 R15: 000055afe21bc200 [ 91.560728] Code: 00 00 00 80 ff 77 00 00 48 bf 00 00 00 00 00 ea ff ff 49 01 da 48 0f 42 05 57 33 bd 00 49 01 c2 49 c1 ea 0c 49 c1 e2 06 49 01 fa <49> 8b 42 20 48 8d 78 ff a8 01 4c 0f 45 d7 49 8b 52 20 48 8d 42 [ 91.560759] RIP: kfree+0x57/0x160 RSP: ffffc90003403cc0 [ 91.560761] CR2: ffffebe000000620 [ 91.560765] ---[ end trace 08a9f3cd82223c1d ]--- Fixes: 1c8638024846 (drm/amd/powerplay: refine powerplay interface.) Signed-off-by: John Brooks Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8046e1955465e3f24e9154d0f2a2e0a8e3f8dccf Author: John Brooks Date: Mon Jul 3 14:05:34 2017 -0400 drm/ttm: Fix use-after-free in ttm_bo_clean_mm We unref the man->move fence in ttm_bo_clean_mm() and then call ttm_bo_force_list_clean() which waits on it, except the refcount is now zero so a warning is generated (or worse): [149492.279301] refcount_t: increment on 0; use-after-free. [149492.279309] ------------[ cut here ]------------ [149492.279315] WARNING: CPU: 3 PID: 18726 at lib/refcount.c:150 refcount_inc+0x2b/0x30 [149492.279315] Modules linked in: vhost_net vhost tun x86_pkg_temp_thermal crc32_pclmul ghash_clmulni_intel efivarfs amdgpu( -) i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm [149492.279326] CPU: 3 PID: 18726 Comm: rmmod Not tainted 4.12.0-rc5-drm-next-4.13-ttmpatch+ #1 [149492.279326] Hardware name: Gigabyte Technology Co., Ltd. Z97X-UD3H-BK/Z97X-UD3H-BK-CF, BIOS F6 06/17/2014 [149492.279327] task: ffff8804ddfedcc0 task.stack: ffffc90008d20000 [149492.279329] RIP: 0010:refcount_inc+0x2b/0x30 [149492.279330] RSP: 0018:ffffc90008d23c30 EFLAGS: 00010286 [149492.279331] RAX: 000000000000002b RBX: 0000000000000170 RCX: 0000000000000000 [149492.279331] RDX: 0000000000000000 RSI: ffff88051ecccbe8 RDI: ffff88051ecccbe8 [149492.279332] RBP: ffffc90008d23c30 R08: 0000000000000001 R09: 00000000000003ee [149492.279333] R10: ffffc90008d23bb0 R11: 00000000000003ee R12: ffff88043aaac960 [149492.279333] R13: ffff8805005e28a8 R14: 0000000000000002 R15: ffff88050115e178 [149492.279334] FS: 00007fc540168700(0000) GS:ffff88051ecc0000(0000) knlGS:0000000000000000 [149492.279335] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [149492.279336] CR2: 00007fc3e8654140 CR3: 000000027ba77000 CR4: 00000000001426e0 [149492.279337] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [149492.279337] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [149492.279338] Call Trace: [149492.279345] ttm_bo_force_list_clean+0xb9/0x110 [ttm] [149492.279348] ttm_bo_clean_mm+0x7a/0xe0 [ttm] [149492.279375] amdgpu_ttm_fini+0xc9/0x1f0 [amdgpu] [149492.279392] amdgpu_bo_fini+0x12/0x40 [amdgpu] [149492.279415] gmc_v7_0_sw_fini+0x32/0x40 [amdgpu] [149492.279430] amdgpu_fini+0x2c9/0x490 [amdgpu] [149492.279445] amdgpu_device_fini+0x58/0x1b0 [amdgpu] [149492.279461] amdgpu_driver_unload_kms+0x4f/0xa0 [amdgpu] [149492.279470] drm_dev_unregister+0x3c/0xe0 [drm] [149492.279485] amdgpu_pci_remove+0x19/0x30 [amdgpu] [149492.279487] pci_device_remove+0x39/0xc0 [149492.279490] device_release_driver_internal+0x155/0x210 [149492.279491] driver_detach+0x38/0x70 [149492.279493] bus_remove_driver+0x4c/0xa0 [149492.279494] driver_unregister+0x2c/0x40 [149492.279496] pci_unregister_driver+0x21/0x90 [149492.279520] amdgpu_exit+0x15/0x406 [amdgpu] [149492.279523] SyS_delete_module+0x1a8/0x270 [149492.279525] ? exit_to_usermode_loop+0x92/0xa0 [149492.279528] entry_SYSCALL_64_fastpath+0x13/0x94 [149492.279529] RIP: 0033:0x7fc53fcb68e7 [149492.279529] RSP: 002b:00007ffcfbfaabb8 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [149492.279531] RAX: ffffffffffffffda RBX: 0000563117adb200 RCX: 00007fc53fcb68e7 [149492.279531] RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000563117adb268 [149492.279532] RBP: 0000000000000003 R08: 0000000000000000 R09: 1999999999999999 [149492.279533] R10: 0000000000000883 R11: 0000000000000206 R12: 00007ffcfbfa9ba0 [149492.279533] R13: 0000000000000000 R14: 0000000000000000 R15: 0000563117adb200 [149492.279534] Code: 55 48 89 e5 e8 77 fe ff ff 84 c0 74 02 5d c3 80 3d 40 f2 a4 00 00 75 f5 48 c7 c7 20 3c ca 81 c6 05 30 f2 a4 00 01 e8 91 f0 d7 ff <0f> ff 5d c3 90 55 48 89 fe bf 01 00 00 00 48 89 e5 e8 9f fe ff [149492.279557] ---[ end trace 2d4e0ffcb66a1016 ]--- Unref the fence *after* waiting for it. v2: Set man->move to NULL after dropping the last ref (Christian König) Fixes: aff98ba1fdb8 (drm/ttm: wait for eviction in ttm_bo_force_list_clean) Signed-off-by: John Brooks Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/ttm/ttm_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9bd42183b951051f73de121f7ee17091e7d26fbb Merge: 7447d56 72298e5 Author: Linus Torvalds Date: Mon Jul 3 13:08:04 2017 -0700 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "The main changes in this cycle were: - Add the SYSTEM_SCHEDULING bootup state to move various scheduler debug checks earlier into the bootup. This turns silent and sporadically deadly bugs into nice, deterministic splats. Fix some of the splats that triggered. (Thomas Gleixner) - A round of restructuring and refactoring of the load-balancing and topology code (Peter Zijlstra) - Another round of consolidating ~20 of incremental scheduler code history: this time in terms of wait-queue nomenclature. (I didn't get much feedback on these renaming patches, and we can still easily change any names I might have misplaced, so if anyone hates a new name, please holler and I'll fix it.) (Ingo Molnar) - sched/numa improvements, fixes and updates (Rik van Riel) - Another round of x86/tsc scheduler clock code improvements, in hope of making it more robust (Peter Zijlstra) - Improve NOHZ behavior (Frederic Weisbecker) - Deadline scheduler improvements and fixes (Luca Abeni, Daniel Bristot de Oliveira) - Simplify and optimize the topology setup code (Lauro Ramos Venancio) - Debloat and decouple scheduler code some more (Nicolas Pitre) - Simplify code by making better use of llist primitives (Byungchul Park) - ... plus other fixes and improvements" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (103 commits) sched/cputime: Refactor the cputime_adjust() code sched/debug: Expose the number of RT/DL tasks that can migrate sched/numa: Hide numa_wake_affine() from UP build sched/fair: Remove effective_load() sched/numa: Implement NUMA node level wake_affine() sched/fair: Simplify wake_affine() for the single socket case sched/numa: Override part of migrate_degrades_locality() when idle balancing sched/rt: Move RT related code from sched/core.c to sched/rt.c sched/deadline: Move DL related code from sched/core.c to sched/deadline.c sched/cpuset: Only offer CONFIG_CPUSETS if SMP is enabled sched/fair: Spare idle load balancing on nohz_full CPUs nohz: Move idle balancer registration to the idle path sched/loadavg: Generalize "_idle" naming to "_nohz" sched/core: Drop the unused try_get_task_struct() helper function sched/fair: WARN() and refuse to set buddy when !se->on_rq sched/debug: Fix SCHED_WARN_ON() to return a value on !CONFIG_SCHED_DEBUG as well sched/wait: Disambiguate wq_entry->task_list and wq_head->task_list naming sched/wait: Move bit_wait_table[] and related functionality from sched/core.c to sched/wait_bit.c sched/wait: Split out the wait_bit*() APIs from into sched/wait: Re-adjust macro line continuation backslashes in ... commit 7447d56217e215e50317f308aee1ed293ac4f749 Merge: 892ad5a 23acd3e Author: Linus Torvalds Date: Mon Jul 3 12:40:46 2017 -0700 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "Most of the changes are for tooling, the main changes in this cycle were: - Improve Intel-PT hardware tracing support, both on the kernel and on the tooling side: PTWRITE instruction support, power events for C-state tracing, etc. (Adrian Hunter) - Add support to measure SMI cost to the x86 architecture, with tooling support in 'perf stat' (Kan Liang) - Support function filtering in 'perf ftrace', plus related improvements (Namhyung Kim) - Allow adding and removing fields to the default 'perf script' columns, using + or - as field prefixes to do so (Andi Kleen) - Allow resolving the DSO name with 'perf script -F brstack{sym,off},dso' (Mark Santaniello) - Add perf tooling unwind support for PowerPC (Paolo Bonzini) - ... and various other improvements as well" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (84 commits) perf auxtrace: Add CPU filter support perf intel-pt: Do not use TSC packets for calculating CPU cycles to TSC perf intel-pt: Update documentation to include new ptwrite and power events perf intel-pt: Add example script for power events and PTWRITE perf intel-pt: Synthesize new power and "ptwrite" events perf intel-pt: Move code in intel_pt_synth_events() to simplify attr setting perf intel-pt: Factor out intel_pt_set_event_name() perf intel-pt: Tidy messages into called function intel_pt_synth_event() perf intel-pt: Tidy Intel PT evsel lookup into separate function perf intel-pt: Join needlessly wrapped lines perf intel-pt: Remove unused instructions_sample_period perf intel-pt: Factor out common code synthesizing event samples perf script: Add synthesized Intel PT power and ptwrite events perf/x86/intel: Constify the 'lbr_desc[]' array and make a function static perf script: Add 'synth' field for synthesized event payloads perf auxtrace: Add itrace option to output power events perf auxtrace: Add itrace option to output ptwrite events tools include: Add byte-swapping macros to kernel.h perf script: Add 'synth' event type for synthesized events x86/insn: perf tools: Add new ptwrite instruction ... commit 892ad5acca0b2ddb514fae63fa4686bf726d2471 Merge: 162b246 5d6dec6 Author: Linus Torvalds Date: Mon Jul 3 12:14:18 2017 -0700 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "The main changes in this cycle were: - Add CONFIG_REFCOUNT_FULL=y to allow the disabling of the 'full' (robustness checked) refcount_t implementation with slightly lower runtime overhead. (Kees Cook) The lighter weight variant is the default. The two variants use the same API. Having this variant was a precondition by some maintainers to merge refcount_t cleanups. - Add lockdep support for rtmutexes (Peter Zijlstra) - liblockdep fixes and improvements (Sasha Levin, Ben Hutchings) - ... misc fixes and improvements" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) locking/refcount: Remove the half-implemented refcount_sub() API locking/refcount: Create unchecked atomic_t implementation locking/rtmutex: Don't initialize lockdep when not required locking/selftest: Add RT-mutex support locking/selftest: Remove the bad unlock ordering test rt_mutex: Add lockdep annotations MAINTAINERS: Claim atomic*_t maintainership locking/x86: Remove the unused atomic_inc_short() methd tools/lib/lockdep: Remove private kernel headers tools/lib/lockdep: Hide liblockdep output from test results tools/lib/lockdep: Add dummy current_gfp_context() tools/include: Add IS_ERR_OR_NULL to err.h tools/lib/lockdep: Add empty __is_[module,kernel]_percpu_address tools/lib/lockdep: Include err.h tools/include: Add (mostly) empty include/linux/sched/mm.h tools/lib/lockdep: Use LDFLAGS tools/lib/lockdep: Remove double-quotes from soname tools/lib/lockdep: Fix object file paths used in an out-of-tree build tools/lib/lockdep: Fix compilation for 4.11 tools/lib/lockdep: Don't mix fd-based and stream IO ... commit 162b246eb420d2ca2002a50917c897b10c9aba09 Merge: 330e9e4 6c64447 Author: Linus Torvalds Date: Mon Jul 3 12:12:05 2017 -0700 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: - Rework the EFI capsule loader to allow for workarounds for non-compliant firmware (Ard Biesheuvel) - Implement a capsule loader quirk for Quark X102x (Jan Kiszka) - Enable SMBIOS/DMI support for the ARM architecture (Ard Biesheuvel) - Add CONFIG_EFI_PGT_DUMP=y support for x86-32 and kexec (Sai Praneeth) - Fixes for EFI support for Xen dom0 guests running under x86-64 hosts (Daniel Kiper)" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/xen/efi: Initialize only the EFI struct members used by Xen efi: Process the MEMATTR table only if EFI_MEMMAP is enabled efi/arm: Enable DMI/SMBIOS x86/efi: Extend CONFIG_EFI_PGT_DUMP support to x86_32 and kexec as well efi/efi_test: Use memdup_user() helper efi/capsule: Add support for Quark security header efi/capsule-loader: Use page addresses rather than struct page pointers efi/capsule-loader: Redirect calls to efi_capsule_setup_info() via weak alias efi/capsule: Remove NULL test on kmap() efi/capsule-loader: Use a cached copy of the capsule header efi/capsule: Adjust return type of efi_capsule_setup_info() efi/capsule: Clean up pr_err/_info() messages efi/capsule: Remove pr_debug() on ENOMEM or EFAULT efi/capsule: Fix return code on failing kmap/vmap commit 330e9e46253cbfab178450c976aa90ef0f3ae940 Merge: e94693f 567b64a Author: Linus Torvalds Date: Mon Jul 3 11:34:53 2017 -0700 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The sole purpose of these changes is to shrink and simplify the RCU code base, which has suffered from creeping bloat over the past couple of years. The end result is a net removal of ~2700 lines of code: 79 files changed, 1496 insertions(+), 4211 deletions(-) Plus there's a marked reduction in the Kconfig space complexity as well, here's the number of matches on 'grep RCU' in the .config: before after x86-defconfig 17 15 x86-allmodconfig 33 20" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (86 commits) rcu: Remove RCU CPU stall warnings from Tiny RCU rcu: Remove event tracing from Tiny RCU rcu: Move RCU debug Kconfig options to kernel/rcu rcu: Move RCU non-debug Kconfig options to kernel/rcu rcu: Eliminate NOCBs CPU-state Kconfig options rcu: Remove debugfs tracing srcu: Remove Classic SRCU srcu: Fix rcutorture-statistics typo rcu: Remove SPARSE_RCU_POINTER Kconfig option rcu: Remove the now-obsolete PROVE_RCU_REPEATEDLY Kconfig option rcu: Remove typecheck() from RCU locking wrapper functions rcu: Remove #ifdef moving rcu_end_inkernel_boot from rcupdate.h rcu: Remove nohz_full full-system-idle state machine rcu: Remove the RCU_KTHREAD_PRIO Kconfig option rcu: Remove *_SLOW_* Kconfig options srcu: Use rnp->lock wrappers to replace explicit memory barriers rcu: Move rnp->lock wrappers for SRCU use rcu: Convert rnp->lock wrappers to macros for SRCU use rcu: Refactor #includes from include/linux/rcupdate.h bcm47xx: Fix build regression ... commit e94693f797400b9f424c69e1da9381e4846762fe Merge: 26d3a77 2513cbf Author: Linus Torvalds Date: Mon Jul 3 11:12:04 2017 -0700 Merge branch 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: "This is an extensive rewrite of the objdump tool to track all stack pointer modifications through the machine instructions of disassembled functions found in kernel .o files. This re-design removes the prior dependency on CONFIG_FRAME_POINTERS, with the goal to prepare the tool to generate kernel debuginfo data in the future. There's also an increase in checking/tracking robustness as a side effect as well. No (intended) changes to existing functionality" * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Silence warnings for functions which use IRET objtool: Implement stack validation 2.0 objtool, x86: Add several functions and files to the objtool whitelist objtool: Move checking code to check.c commit 26d3a77d2cb3cb31bbaa2de37b7a4e6375f204ee Merge: c6b1e36 164c292 Author: Linus Torvalds Date: Mon Jul 3 11:09:38 2017 -0700 Merge tag 'edac_for_4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: "Nothing earth-shattering - just the normal development flow of cleanups, improvements, fixes and such. Summary: - i31200_edac: Add Kabylake support (Jason Baron) - sb_edac: resolve memory controller detection issues on asymmetric setups with not all DIMM slots being populated (Tony Luck and Qiuxu Zhuo) - misc cleanups and fixlets all over" * tag 'edac_for_4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (22 commits) EDAC, pnd2: Fix Apollo Lake DIMM detection EDAC, i5000, i5400: Fix definition of NRECMEMB register EDAC, pnd2: Make function sbi_send() static EDAC, pnd2: Return proper error value from apl_rd_reg() EDAC, altera: Simplify calculation of total memory EDAC, sb_edac: Avoid creating SOCK memory controller EDAC, mce_amd: Fix typo in SMCA error description EDAC, mv64x60: Sanity check edac_op_state before registering EDAC, thunderx: Fix a warning during l2c debugfs node creation EDAC, mv64x60: Check driver registration success EDAC, ie31200: Add Intel Kaby Lake CPU support EDAC, mv64x60: Replace in_le32()/out_le32() with readl()/writel() EDAC, mv64x60: Fix pdata->name EDAC, sb_edac: Bump driver version and do some cleanups EDAC, sb_edac: Check if ECC enabled when at least one DIMM is present EDAC, sb_edac: Drop NUM_CHANNELS from 8 back to 4 EDAC, sb_edac: Carve out dimm-populating loop EDAC, sb_edac: Fix mod_name EDAC, sb_edac: Assign EDAC memory controller per h/w controller EDAC, sb_edac: Don't use "Socket#" in the memory controller name ... commit 818a23e3882b1bf65d1719e407be04716e69a4d5 Merge: a178232 b821d29 Author: Takashi Iwai Date: Mon Jul 3 19:51:42 2017 +0200 Merge tag 'asoc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.13 The big news with this release is the of-graph card, this provides a replacement for simple-card that is much more flexibile and scalable, allowing many more systems to use a generic sound card than was possible before: - The of-graph card, finally merged after a long and dedicated effort by Morimoto-san. - New widget types intended mainly for use with DSPs. - New drivers for Allwinner V3s SoCs, Ensonic ES8316, several classes of x86 machine, Rockchip PDM controllers, STM32 I2S and S/PDIF controllers and ZTE AUD96P22 CODECs. commit c6b1e36c8fa04a6680c44fe0321d0370400e90b6 Merge: 81e3e04 a84ebb8 Author: Linus Torvalds Date: Mon Jul 3 10:34:51 2017 -0700 Merge branch 'for-4.13/block' of git://git.kernel.dk/linux-block Pull core block/IO updates from Jens Axboe: "This is the main pull request for the block layer for 4.13. Not a huge round in terms of features, but there's a lot of churn related to some core cleanups. Note this depends on the UUID tree pull request, that Christoph already sent out. This pull request contains: - A series from Christoph, unifying the error/stats codes in the block layer. We now use blk_status_t everywhere, instead of using different schemes for different places. - Also from Christoph, some cleanups around request allocation and IO scheduler interactions in blk-mq. - And yet another series from Christoph, cleaning up how we handle and do bounce buffering in the block layer. - A blk-mq debugfs series from Bart, further improving on the support we have for exporting internal information to aid debugging IO hangs or stalls. - Also from Bart, a series that cleans up the request initialization differences across types of devices. - A series from Goldwyn Rodrigues, allowing the block layer to return failure if we will block and the user asked for non-blocking. - Patch from Hannes for supporting setting loop devices block size to that of the underlying device. - Two series of patches from Javier, fixing various issues with lightnvm, particular around pblk. - A series from me, adding support for write hints. This comes with NVMe support as well, so applications can help guide data placement on flash to improve performance, latencies, and write amplification. - A series from Ming, improving and hardening blk-mq support for stopping/starting and quiescing hardware queues. - Two pull requests for NVMe updates. Nothing major on the feature side, but lots of cleanups and bug fixes. From the usual crew. - A series from Neil Brown, greatly improving the bio rescue set support. Most notably, this kills the bio rescue work queues, if we don't really need them. - Lots of other little bug fixes that are all over the place" * 'for-4.13/block' of git://git.kernel.dk/linux-block: (217 commits) lightnvm: pblk: set line bitmap check under debug lightnvm: pblk: verify that cache read is still valid lightnvm: pblk: add initialization check lightnvm: pblk: remove target using async. I/Os lightnvm: pblk: use vmalloc for GC data buffer lightnvm: pblk: use right metadata buffer for recovery lightnvm: pblk: schedule if data is not ready lightnvm: pblk: remove unused return variable lightnvm: pblk: fix double-free on pblk init lightnvm: pblk: fix bad le64 assignations nvme: Makefile: remove dead build rule blk-mq: map all HWQ also in hyperthreaded system nvmet-rdma: register ib_client to not deadlock in device removal nvme_fc: fix error recovery on link down. nvmet_fc: fix crashes on bad opcodes nvme_fc: Fix crash when nvme controller connection fails. nvme_fc: replace ioabort msleep loop with completion nvme_fc: fix double calls to nvme_cleanup_cmd() nvme-fabrics: verify that a controller returns the correct NQN nvme: simplify nvme_dev_attrs_are_visible ... commit 7bb5a650f3471e4052e1692b29b0f3d3ca099c47 Author: H. Nikolaus Schaller Date: Mon Jul 3 18:37:11 2017 +0200 power: supply: twl4030-charger: add deferred probing for phy and iio This fixes an issue if both this twl4030_charger driver and phy-twl4030-usb are compiled as modules and loaded in random order. It has been observed on GTA04 and OpenPandora devices that in worst case the boot process hangs and in best case the AC detection fails with a warning. Therefore we add deferred probing checks for the usb_phy and the iio channel for AC detection. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Sebastian Reichel drivers/power/supply/twl4030_charger.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 3950c95e2c39b998abcc9702005b5ba7c7f70d32 Author: H. Nikolaus Schaller Date: Mon Jul 3 18:37:10 2017 +0200 power: supply: twl4030-charger: move irq allocation to just before irqs are enabled And initialize workers and notifiers as soon as possible. This avoids a potential race if irqs are enabled and triggered too early before the worker is properly set up. Suggested-by: Grygorii Strashko Signed-off-by: H. Nikolaus Schaller Signed-off-by: Sebastian Reichel drivers/power/supply/twl4030_charger.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 81e3e044897b0875a52953b3fb6241a33428e4f9 Merge: 6f7da29 b86a496 Author: Linus Torvalds Date: Mon Jul 3 09:55:26 2017 -0700 Merge tag 'uuid-for-4.13' of git://git.infradead.org/users/hch/uuid Pull uuid subsystem from Christoph Hellwig: "This is the new uuid subsystem, in which Amir, Andy and I have started consolidating our uuid/guid helpers and improving the types used for them. Note that various other subsystems have pulled in this tree, so I'd like it to go in early. UUID/GUID summary: - introduce the new uuid_t/guid_t types that are going to replace the somewhat confusing uuid_be/uuid_le types and make the terminology fit the various specs, as well as the userspace libuuid library. (me, based on a previous version from Amir) - consolidated generic uuid/guid helper functions lifted from XFS and libnvdimm (Amir and me) - conversions to the new types and helpers (Amir, Andy and me)" * tag 'uuid-for-4.13' of git://git.infradead.org/users/hch/uuid: (34 commits) ACPI: hns_dsaf_acpi_dsm_guid can be static mmc: sdhci-pci: make guid intel_dsm_guid static uuid: Take const on input of uuid_is_null() and guid_is_null() thermal: int340x_thermal: fix compile after the UUID API switch thermal: int340x_thermal: Switch to use new generic UUID API acpi: always include uuid.h ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() ACPI / extlog: Switch to use new generic UUID API ACPI / bus: Switch to use new generic UUID API ACPI / APEI: Switch to use new generic UUID API acpi, nfit: Switch to use new generic UUID API MAINTAINERS: add uuid entry tmpfs: generate random sb->s_uuid scsi_debug: switch to uuid_t nvme: switch to uuid_t sysctl: switch to use uuid_t partitions/ldm: switch to use uuid_t overlayfs: use uuid_t instead of uuid_be fs: switch ->s_uuid to uuid_t ima/policy: switch to use uuid_t ... commit 8d67f64f7739464c352d4b167ed1748f3b2c1f44 Merge: 9b08f76 3ffad46 a9bc67d be03530 Author: Mark Brown Date: Mon Jul 3 16:52:21 2017 +0100 Merge remote-tracking branches 'regulator/topic/settle', 'regulator/topic/tps65910' and 'regulator/topic/tps65917' into regulator-next commit 9b08f765f5816a6053026b8eba1ee34e0272853c Merge: 8f5bb9c ded7b2a 80aec6f 42f1ea4 f74521c 96e4f52 Author: Mark Brown Date: Mon Jul 3 16:52:18 2017 +0100 Merge remote-tracking branches 'regulator/topic/hi6421v530', 'regulator/topic/lp8755', 'regulator/topic/lp87565', 'regulator/topic/max8997' and 'regulator/topic/palmas' into regulator-next commit 8f5bb9c143c965d982d762add43162f077ebcdbc Merge: fcaa316 1dbe0cc cb42b64 4b7f495 a8ea49d Author: Mark Brown Date: Mon Jul 3 16:52:17 2017 +0100 Merge remote-tracking branches 'regulator/topic/axp20x', 'regulator/topic/bd9571mwv', 'regulator/topic/da9061' and 'regulator/topic/hi6421' into regulator-next commit fcaa3167b2763d35a7dc60c5724f23e441d29f4f Merge: 85fd19e4 dbc5595 Author: Mark Brown Date: Mon Jul 3 16:52:16 2017 +0100 Merge remote-tracking branch 'regulator/topic/core' into regulator-next commit 85fd19e432b5ed5357d54f1048a088d9eb5aae94 Merge: 9ef6d2e 64f7d69 Author: Mark Brown Date: Mon Jul 3 16:52:14 2017 +0100 Merge remote-tracking branch 'regulator/fix/max77802' into regulator-linus commit 9ef6d2e0fac8fc9d899a9e07eda555792757b854 Merge: 6f7da29 2c2874b Author: Mark Brown Date: Mon Jul 3 16:52:14 2017 +0100 Merge remote-tracking branch 'regulator/fix/core' into regulator-linus commit b821d298f8864dc3c3d42643812df43289159507 Merge: 254d96b 478b774 Author: Mark Brown Date: Mon Jul 3 16:51:38 2017 +0100 Merge remote-tracking branch 'asoc/topic/inte' into asoc-next commit 254d96be464ab57290afb2440c747606030b3d52 Merge: 3004352 e4798d2 7204e97 286345e 664d00d Author: Mark Brown Date: Mon Jul 3 16:51:36 2017 +0100 Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/drm', 'asoc/topic/dwc' and 'asoc/topic/es8316' into asoc-next commit 30043527c836a45db699a191d3edecdc5dfb5d2c Merge: feb36c5 177e271 92f468d 0e54153 679d026 Author: Mark Brown Date: Mon Jul 3 16:51:34 2017 +0100 Merge remote-tracking branches 'asoc/topic/cs4271', 'asoc/topic/cs53l30', 'asoc/topic/da7213' and 'asoc/topic/da7218' into asoc-next commit feb36c5f54ea830b4e878884545955a8feec7e59 Merge: 6bf4cd2 907cd88 836e4fe cd18775 e8fa1a4 486fb95 Author: Mark Brown Date: Mon Jul 3 16:51:31 2017 +0100 Merge remote-tracking branches 'asoc/topic/ak4613', 'asoc/topic/ak4642', 'asoc/topic/atmel', 'asoc/topic/cs35l34' and 'asoc/topic/cs35l35' into asoc-next commit 6bf4cd287d6e60755481940386b3d146f7ba3c92 Merge: 2016d5e 8288591 Author: Mark Brown Date: Mon Jul 3 16:51:30 2017 +0100 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next commit 2016d5ed401133539779d8a070abbe42fe9cb3da Merge: 0532512 7d3d6e0 Author: Mark Brown Date: Mon Jul 3 16:51:30 2017 +0100 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit 05325120861066e1e3e726eda54e429802725a64 Merge: 1233f6f 8a70b45 Author: Mark Brown Date: Mon Jul 3 16:51:29 2017 +0100 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next commit 1233f6f531008fcd5c88774e7d86624365277b3d Merge: dea38fc 5894b91 a6ff8dd 17616ce 8e2d163 a205c15 Author: Mark Brown Date: Mon Jul 3 16:51:26 2017 +0100 Merge remote-tracking branches 'asoc/fix/rockchip', 'asoc/fix/rt5645', 'asoc/fix/rt5663', 'asoc/fix/rt5670' and 'asoc/fix/zte' into asoc-linus commit dea38fc5c3cf4b509737bd9a69e454871a448c02 Merge: 9f9f699f b5f2a48 a00cebf 01b8ced dc43f46 2a0c218 Author: Mark Brown Date: Mon Jul 3 16:51:23 2017 +0100 Merge remote-tracking branches 'asoc/fix/ak4613', 'asoc/fix/atmel', 'asoc/fix/compress', 'asoc/fix/cs35l35' and 'asoc/fix/da7219' into asoc-linus commit 9f9f699feb026d1d109d264e721e478cf47b3648 Merge: 9b0695f 8cd8a18 Author: Mark Brown Date: Mon Jul 3 16:51:22 2017 +0100 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus commit 9b0695f74c720e924bf10ce76b4c6973478cd759 Merge: 6f7da29 fd0f237 Author: Mark Brown Date: Mon Jul 3 16:51:22 2017 +0100 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 7d3d6e0645dd3689e625161b9e312108e66b2b51 Author: Vinod Koul Date: Mon Jul 3 13:54:47 2017 +0530 ASoC: Intel: Skylake: Remove driver debugfs exit For driver debugfs, debugfs_remove_recursive() is called which is not needed as it is already done in ASoC core debugfs. And a device managed memory need not be freed explicitly as device core frees it up. So remove unnecessary skl_debugfs_exit(). Fixes: 5cdf6c09ca9d ASoC: ("Intel: Skylake: Add debugfs support") Reported-by: Julia Lawall Reported-by: kbuild test robot Signed-off-by: Vinod Koul Signed-off-by: Guneshwor Singh Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-debug.c | 8 -------- sound/soc/intel/skylake/skl.c | 1 - sound/soc/intel/skylake/skl.h | 3 --- 3 files changed, 12 deletions(-) commit 58be77537aa12ca0c6c91eaf37902ad5f8c812bd Author: Vinod Koul Date: Mon Jul 3 13:54:46 2017 +0530 ASoC: Intel: Skylake: explicitly add the headers sst-dsp.h Commit bdd0384a5ada ("ASoC: Intel: Skylake: Add support to read firmware registers") introduced firmware register read so added sst-dsp-priv.h but missed adding sst-dsp.h as that leads to below compiler warning: In file included from sound/soc/intel/skylake/skl-debug.c:23:0: >> sound/soc/intel/skylake/../common/sst-dsp-priv.h:63:42: warning: 'struct sst_pdata' declared inside parameter list [enabled by default] int (*init)(struct sst_dsp *sst, struct sst_pdata *pdata); ^ >> sound/soc/intel/skylake/../common/sst-dsp-priv.h:63:42: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] So add the missing header. Fixes: bdd0384a5ada ("ASoC: Intel: Skylake: Add support to read firmware registers") Reported-by: kbuild test robot Signed-off-by: Vinod Koul Signed-off-by: Guneshwor Singh Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-debug.c | 1 + 1 file changed, 1 insertion(+) commit 082f6968bb204d1a3d8b2da3c53d6b7a59bbd985 Merge: cc7e35b f792943 0b0cda4 7b821a6 Author: Mark Brown Date: Mon Jul 3 16:21:12 2017 +0100 Merge remote-tracking branches 'spi/topic/spidev', 'spi/topic/st-ssc4' and 'spi/topic/stm32' into spi-next commit cc7e35baca2edade2972da753d8cae09cae1aade Merge: 15f8c9a b28b914 fc0b2ac aa09938 cf9e478 2d781e8 Author: Mark Brown Date: Mon Jul 3 16:21:10 2017 +0100 Merge remote-tracking branches 'spi/topic/orion', 'spi/topic/pxa2xx', 'spi/topic/rockchip', 'spi/topic/sh-msiof' and 'spi/topic/sirf' into spi-next commit 15f8c9af83c6cc18b1ff0adc00812bc624cf2592 Merge: 63a8927 704c309 454fa27 b6b1f2d ad74499 Author: Mark Brown Date: Mon Jul 3 16:21:08 2017 +0100 Merge remote-tracking branches 'spi/topic/loopback', 'spi/topic/meson-spicc', 'spi/topic/mtk' and 'spi/topic/omap2-mcspi' into spi-next commit 63a89274bd4a181aaa01c4ae2b07124e746239c6 Merge: 9d540b0 6aba9c6 b85d65d 35fc3b9 2c14777 Author: Mark Brown Date: Mon Jul 3 16:21:06 2017 +0100 Merge remote-tracking branches 'spi/topic/atmel', 'spi/topic/bcm63xx', 'spi/topic/davinci' and 'spi/topic/imx' into spi-next commit 9d540b0d4964603798efdccae90cab8ac06c8bf4 Merge: 096bf6b 8caab75 Author: Mark Brown Date: Mon Jul 3 16:21:05 2017 +0100 Merge remote-tracking branch 'spi/topic/master' into spi-next commit 096bf6b7f4fcc2fe486f61526b888034a7059342 Merge: 20e5c74 ad25c92 Author: Mark Brown Date: Mon Jul 3 16:21:05 2017 +0100 Merge remote-tracking branch 'spi/topic/core' into spi-next commit 20e5c748d9dc5b5b91f7dc03883c122ff8fdcb6b Merge: 6f7da29 7094576 0b85a84 b56ffae cddebdd 967d694 Author: Mark Brown Date: Mon Jul 3 16:21:02 2017 +0100 Merge remote-tracking branches 'spi/fix/atmel', 'spi/fix/bcm63xx', 'spi/fix/doc', 'spi/fix/fsl-dspi' and 'spi/fix/ti-qspi' into spi-linus commit 2a40f9421cb72d1d15618997b324f4169504ac09 Merge: 6f7da29 c13be1d9 a71411d f458e61 Author: Mark Brown Date: Mon Jul 3 16:20:28 2017 +0100 Merge remote-tracking branches 'regmap/topic/1wire', 'regmap/topic/irq' and 'regmap/topic/lzo' into regmap-next commit 478b77461a88304ad1566c042d6aa141815ba19f Merge: f116d2f 0e15bdf Author: Mark Brown Date: Mon Jul 3 16:15:23 2017 +0100 Merge remote-tracking branch 'asoc/topic/zx-aud96p22' into asoc-next commit f116d2ffb9ed4ccce169aacb46a421fb802245c6 Merge: cf1f9e5 81321fe 8b2840b 51827c4 b75a651 503ada8 Author: Mark Brown Date: Mon Jul 3 16:15:20 2017 +0100 Merge remote-tracking branches 'asoc/topic/stm32', 'asoc/topic/sunxi', 'asoc/topic/tlv320dac31xx', 'asoc/topic/topology' and 'asoc/topic/wm-adsp' into asoc-next commit cf1f9e5d167a4ce757aa3ad6148c0c65dca03f19 Merge: 2716765 0994c03 a729526 3048e76 Author: Mark Brown Date: Mon Jul 3 16:15:19 2017 +0100 Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000' and 'asoc/topic/sh' into asoc-next commit 2716765697a11a6a42c3c7536ff7b12a0facfecd Merge: 858e84a 03ba791 4999b02 5800b69 b059ca7 c243d96 Author: Mark Brown Date: Mon Jul 3 16:15:17 2017 +0100 Merge remote-tracking branches 'asoc/topic/rt5614', 'asoc/topic/rt5645', 'asoc/topic/rt5651', 'asoc/topic/rt5665' and 'asoc/topic/rt5670' into asoc-next commit 858e84a1abb24be357a278d99d60b175b4bf6b0b Merge: f459768 69beca6 73d7ee2 33c0f55 6d3edf8 Author: Mark Brown Date: Mon Jul 3 16:15:15 2017 +0100 Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rockchip' and 'asoc/topic/rt5514' into asoc-next commit f459768c6cd4c1057fe783810ef0335807eb48a7 Merge: 5e9516d 9f3b777 b02ee56 fa10143 fc3ba81 f986907 Author: Mark Brown Date: Mon Jul 3 16:15:12 2017 +0100 Merge remote-tracking branches 'asoc/topic/msm8916', 'asoc/topic/mtk', 'asoc/topic/nau8824', 'asoc/topic/nau8825' and 'asoc/topic/of-graph' into asoc-next commit 5e9516db5fbc9b8e6a60e5f201129ab4de1571f1 Merge: be60547 372f69a ca3b5ad 2a54e84 1943b06 Author: Mark Brown Date: Mon Jul 3 16:15:11 2017 +0100 Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/hdmi', 'asoc/topic/hisi' and 'asoc/topic/max9867' into asoc-next commit be6054765c14333557ade067de5280177ac92a42 Merge: f83ff1f e4798d2 7204e97 286345e 664d00d Author: Mark Brown Date: Mon Jul 3 16:15:09 2017 +0100 Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/drm', 'asoc/topic/dwc' and 'asoc/topic/es8316' into asoc-next commit f83ff1f4d2f37f5c74626e3c6a0eae06e4629fcf Merge: c7a9dd3 177e271 92f468d 0e54153 679d026 Author: Mark Brown Date: Mon Jul 3 16:15:07 2017 +0100 Merge remote-tracking branches 'asoc/topic/cs4271', 'asoc/topic/cs53l30', 'asoc/topic/da7213' and 'asoc/topic/da7218' into asoc-next commit c7a9dd3cb62bed68861befbf176475459bfdc2f1 Merge: 85ee1f4 907cd88 836e4fe cd18775 e8fa1a4 486fb95 Author: Mark Brown Date: Mon Jul 3 16:15:05 2017 +0100 Merge remote-tracking branches 'asoc/topic/ak4613', 'asoc/topic/ak4642', 'asoc/topic/atmel', 'asoc/topic/cs35l34' and 'asoc/topic/cs35l35' into asoc-next commit 85ee1f42fa60693e5ed72e9453ef6352e72bb4c0 Merge: 51fa6a8 8288591 Author: Mark Brown Date: Mon Jul 3 16:15:04 2017 +0100 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next commit 51fa6a8f15ddaaf8ecb0fe75b365c012905341fe Merge: 9a532f0 bdd0384 Author: Mark Brown Date: Mon Jul 3 16:15:04 2017 +0100 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit 9a532f0554ca8558e844a96b9df82cef747b437d Merge: 10e5b9c 8a70b45 Author: Mark Brown Date: Mon Jul 3 16:15:03 2017 +0100 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next commit 10e5b9c291b3bbcccb90fd28418676b5370ed53d Merge: b1dfce7 5894b91 a6ff8dd 17616ce 8e2d163 a205c15 Author: Mark Brown Date: Mon Jul 3 16:15:00 2017 +0100 Merge remote-tracking branches 'asoc/fix/rockchip', 'asoc/fix/rt5645', 'asoc/fix/rt5663', 'asoc/fix/rt5670' and 'asoc/fix/zte' into asoc-linus commit b1dfce7784e345ca56de5b1829a8450cd9c8fc7f Merge: cc8a819 b5f2a48 a00cebf 01b8ced dc43f46 2a0c218 Author: Mark Brown Date: Mon Jul 3 16:14:58 2017 +0100 Merge remote-tracking branches 'asoc/fix/ak4613', 'asoc/fix/atmel', 'asoc/fix/compress', 'asoc/fix/cs35l35' and 'asoc/fix/da7219' into asoc-linus commit cc8a819ff0c64cb5998be5605466748af5223ba5 Merge: e60b2e5 8cd8a18 Author: Mark Brown Date: Mon Jul 3 16:14:57 2017 +0100 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus commit e60b2e5d1dbf3741bf990331624411bfe6a1cc0f Merge: 6f7da29 fd0f237 Author: Mark Brown Date: Mon Jul 3 16:14:57 2017 +0100 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 5ecce4c9b17bed4dc9cb58bfb10447307569b77b Author: Boris Pismenny Date: Tue Jun 27 15:09:13 2017 +0300 RDMA/uverbs: Check port number supplied by user verbs cmds The ib_uverbs_create_ah() ind ib_uverbs_modify_qp() calls receive the port number from user input as part of its attributes and assumes it is valid. Down on the stack, that parameter is used to access kernel data structures. If the value is invalid, the kernel accesses memory it should not. To prevent this, verify the port number before using it. BUG: KASAN: use-after-free in ib_uverbs_create_ah+0x6d5/0x7b0 Read of size 4 at addr ffff880018d67ab8 by task syz-executor/313 BUG: KASAN: slab-out-of-bounds in modify_qp.isra.4+0x19d0/0x1ef0 Read of size 4 at addr ffff88006c40ec58 by task syz-executor/819 Fixes: 67cdb40ca444 ("[IB] uverbs: Implement more commands") Fixes: 189aba99e70 ("IB/uverbs: Extend modify_qp and support packet pacing") Cc: # v2.6.14+ Cc: Cc: Yevgeny Kliteynik Cc: Tziporet Koren Cc: Alex Polak Signed-off-by: Boris Pismenny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 33f9e02495d15a061f0c94ef46f5103a2d0c20f3 Author: Thomas Bogendoerfer Date: Mon Jul 3 10:38:05 2017 +0200 parisc: DMA API: return error instead of BUG_ON for dma ops on non dma devs Enabling parport pc driver on a B2600 (and probably other 64bit PARISC systems) produced following BUG: CPU: 0 PID: 1 Comm: swapper Not tainted 4.12.0-rc5-30198-g1132d5e #156 task: 000000009e050000 task.stack: 000000009e04c000 YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI PSW: 00001000000001101111111100001111 Not tainted r00-03 000000ff0806ff0f 000000009e04c990 0000000040871b78 000000009e04cac0 r04-07 0000000040c14de0 ffffffffffffffff 000000009e07f098 000000009d82d200 r08-11 000000009d82d210 0000000000000378 0000000000000000 0000000040c345e0 r12-15 0000000000000005 0000000040c345e0 0000000000000000 0000000040c9d5e0 r16-19 0000000040c345e0 00000000f00001c4 00000000f00001bc 0000000000000061 r20-23 000000009e04ce28 0000000000000010 0000000000000010 0000000040b89e40 r24-27 0000000000000003 0000000000ffffff 000000009d82d210 0000000040c14de0 r28-31 0000000000000000 000000009e04ca90 000000009e04cb40 0000000000000000 sr00-03 0000000000000000 0000000000000000 0000000000000000 0000000000000000 sr04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000000 IASQ: 0000000000000000 0000000000000000 IAOQ: 00000000404aece0 00000000404aece4 IIR: 03ffe01f ISR: 0000000010340000 IOR: 000001781304cac8 CPU: 0 CR30: 000000009e04c000 CR31: 00000000e2976de2 ORIG_R28: 0000000000000200 IAOQ[0]: sba_dma_supported+0x80/0xd0 IAOQ[1]: sba_dma_supported+0x84/0xd0 RP(r2): parport_pc_probe_port+0x178/0x1200 Cause is a call to dma_coerce_mask_and_coherenet in parport_pc_probe_port, which PARISC DMA API doesn't handle very nicely. This commit gives back DMA_ERROR_CODE for DMA API calls, if device isn't capable of DMA transaction. Cc: # v3.13+ Signed-off-by: Thomas Bogendoerfer Signed-off-by: Helge Deller arch/parisc/include/asm/dma-mapping.h | 11 +++++++---- drivers/parisc/ccio-dma.c | 12 ++++++++++++ drivers/parisc/dino.c | 5 ++++- drivers/parisc/lba_pci.c | 6 ++++-- drivers/parisc/sba_iommu.c | 14 ++++++++++++++ 5 files changed, 41 insertions(+), 7 deletions(-) commit ac548add22a7916b3f38bd46b73bccf0ba6ca4cf Merge: 30c2a65 88cda00 Author: Arnd Bergmann Date: Mon Jul 3 16:44:57 2017 +0200 Merge tag 'mvebu-dt64-4.13-3' of git://git.infradead.org/linux-mvebu into next/dt64 Pull "late dt64 for 4.13" from Gregory CLEMENT: It is actually a patch that missed the end of the 4.12 merge window. The patch itself fix a bogus definition of the timer for the Armada 37xx SoCs. * tag 'mvebu-dt64-4.13-3' of git://git.infradead.org/linux-mvebu: ARM64: dts: marvell: armada37xx: Fix timer interrupt specifiers commit a5707eef798b57ff5a2e56fca435dff616019b7e Merge: dc0cf5a f4e981c Author: Petr Mladek Date: Mon Jul 3 15:33:39 2017 +0200 Merge branch 'for-4.13' into for-linus commit 88cda00733f0731711c76e535d4972c296ac512e Author: Marc Zyngier Date: Wed Jun 21 22:45:08 2017 +0100 ARM64: dts: marvell: armada37xx: Fix timer interrupt specifiers Contrary to popular belief, PPIs connected to a GICv3 to not have an affinity field similar to that of GICv2. That is consistent with the fact that GICv3 is designed to accomodate thousands of CPUs, and fitting them as a bitmap in a byte is... difficult. Fixes: adbc3695d9e4 ("arm64: dts: add the Marvell Armada 3700 family and a development board") Cc: Signed-off-by: Marc Zyngier Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 04941829b0049d2446c7042ab9686dd057d809a6 Author: sagar.a.kamble@intel.com Date: Tue Jun 27 23:09:41 2017 +0530 drm/i915: Hold RPM wakelock while initializing OA buffer OA buffer initialization involves access to HW registers to set the OA base, head and tail. Ensure device is awake while setting these. With this, all oa.ops are covered under RPM and forcewake wakelock. Cc: Lionel Landwerlin Signed-off-by: Sagar Arun Kamble Reviewed-by: Lionel Landwerlin Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1498585181-23048-1-git-send-email-sagar.a.kamble@intel.com Fixes: d79651522e89c ("drm/i915: Enable i915 perf stream for Haswell OA unit") Cc: # v4.11+ (cherry picked from commit 987f8c444aa2c33d98e7030d0c5f0a5325cc84ea) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_perf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c379b897ba1a7f786419e8c36a3438ce856f016a Author: Navare, Manasi D Date: Thu Jun 29 18:14:01 2017 -0700 drm/i915/cnl: Fix the CURSOR_COEFF_MASK used in DDI Vswing Programming The Cursor Coeff is lower 6 bits in the PORT_TX_DW4 register and hence the CURSOR_COEFF_MASK should be (0x3F << 0) Fixes: 04416108ccea ("drm/i915/cnl: Add registers related to voltage swing sequences.") Signed-off-by: Manasi Navare Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1498785241-21138-1-git-send-email-manasi.d.navare@intel.com (cherry picked from commit fcace3b9b727e25ffa3f7ad2c96e76b8584a9f3e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2347728934b501b07bea8b1b6e8fa27a56dc098f Author: Rodrigo Vivi Date: Mon Jun 19 14:21:47 2017 -0700 drm/i915/cfl: Fix Workarounds. During the review of Coffee Lake workarounds Mika pointed out that WaDisableKillLogic and GEN9_DISABLE_OCL_OOB_SUPPRESS_LOGIC should be removed from CFL and with that I should carry the rv-b. However when doing the v2 I removed another Workaround that should remain because although not mentioned by spec the history of hangs around it advocates on its favor. On some follow-up patches I continued operating on the wrong workardound, but Ville noticed that, so here is the fix for the current CFL code that is upstream already. Fixes: 46c26662d2f ("drm/i915/cfl: Introduce Coffee Lake workarounds.") Cc: Ville Syrjälä Cc: Dhinakaran Pandiyan Cc: Mika Kuoppala Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan (cherry picked from commit 98eed3d1ade53596e1c8785e049f03da4480a820) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_engine_cs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4ec654bf3a63d503e3c5336eade5c369ae17db56 Author: Chris Wilson Date: Thu Jun 29 16:04:25 2017 +0100 drm/i915: Avoid undefined behaviour of "u32 >> 32" When computing a hash for looking up relocation target handles in an execbuf, we start with a large size for the hashtable and proceed to halve it until the allocation succeeds. The final attempt is with an order of 0 (i.e. a single element). This means that we then pass bits=0 to hash_32() which then computes "hash >> (32 - 0)" to lookup the single element. Right shifting a value by the width of the operand is undefined, so limit the smallest hash table we use to order 1. v2: Keep the retry allocation flag for the final pass Fixes: 4ff4b44cbb70 ("drm/i915: Store a direct lookup from object handle to vma") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170629150425.27508-1-chris@chris-wilson.co.uk (cherry picked from commit 4d470f7359c4bf22518baa30700ad45649371a22) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_execbuffer.c | 38 +++++++++++++++++++----------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 995f00a619584e65e53eff372d9b73b121a7bad5 Author: Peter Feiner Date: Fri Jun 30 17:26:32 2017 -0700 x86: kvm: mmu: use ept a/d in vmcs02 iff used in vmcs12 EPT A/D was enabled in the vmcs02 EPTP regardless of the vmcs12's EPTP value. The problem is that enabling A/D changes the behavior of L2's x86 page table walks as seen by L1. With A/D enabled, x86 page table walks are always treated as EPT writes. Commit ae1e2d1082ae ("kvm: nVMX: support EPT accessed/dirty bits", 2017-03-30) tried to work around this problem by clearing the write bit in the exit qualification for EPT violations triggered by page walks. However, that fixup introduced the opposite bug: page-table walks that actually set x86 A/D bits were *missing* the write bit in the exit qualification. This patch fixes the problem by disabling EPT A/D in the shadow MMU when EPT A/D is disabled in vmcs12's EPTP. Signed-off-by: Peter Feiner Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 1 + arch/x86/kvm/vmx.c | 38 +++++++++++++++++--------------------- 2 files changed, 18 insertions(+), 21 deletions(-) commit 9c75b185274b7766fe69c2e73607c1ed780b284b Author: Gabriel Krisman Bertazi Date: Wed Jun 28 18:06:05 2017 -0300 drm/i915: reintroduce VLV/CHV PFI programming power domain workaround There are still cases on these platforms where an attempt is made to configure the CDCLK while the power domain is off, like when coming back from a suspend. So the workaround below is still needed. This effectively reverts commit 63ff30442519 ("drm/i915: Nuke the VLV/CHV PFI programming power domain workaround"). Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101517 Suggested-by: Ville Syrjälä Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170628210605.4994-1-krisman@collabora.co.uk Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä (cherry picked from commit 886015a0ad43c7fc034b23ea4614ba39162f9ddd) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_cdclk.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 1a13a2ec3eb360c80e1ea88b9b7616fa64d4e278 Author: Christophe JAILLET Date: Tue Jun 27 07:38:54 2017 +0200 drm/i915: Fix an error checking test 'dma_buf_vmap' returns NULL on error, not an error pointer. Fixes: 6cca22ede8a4 ("drm/i915: Add some mock tests for dmabuf interop") Signed-off-by: Christophe JAILLET Link: http://patchwork.freedesktop.org/patch/msgid/20170627053854.21152-1-christophe.jaillet@wanadoo.fr Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson (cherry picked from commit 7c3f5317b8c2828ab10e8cf87c8ab5232d1966d0) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ce3f7163e4ce8fd583dcb36b6ee6b81fd1b419ae Author: Ville Syrjälä Date: Mon Jun 26 23:30:51 2017 +0300 drm/i915: Disable MSI for all pre-gen5 We have pretty clear evidence that MSIs are getting lost on g4x and somehow the interrupt logic doesn't seem to recover from that state even if we try hard to clear the IIR. Disabling IER around the normal IIR clearing in the irq handler isn't sufficient to avoid this, so the problem really seems to be further up the interrupt chain. This should guarantee that there's always an edge if any IIR bits are set after the interrupt handler is done, which should normally guarantee that the CPU interrupt is generated. That approach seems to work perfectly on VLV/CHV, but apparently not on g4x. MSI is documented to be broken on 965gm at least. The chipset spec says MSI is defeatured because interrupts can be delayed or lost, which fits well with what we're seeing on g4x. Previously we've already disabled GMBUS interrupts on g4x because somehow GMBUS manages to raise legacy interrupts even when MSI is enabled. Since there's such widespread MSI breakahge all over in the pre-gen5 land let's just give up on MSI on these platforms. Seqno reporting might be negatively affected by this since the legcy interrupts aren't guaranteed to be ordered with the seqno writes, whereas MSI interrupts may be? But an occasioanlly missed seqno seems like a small price to pay for generally working interrupts. Cc: stable@vger.kernel.org Cc: Diego Viola Tested-by: Diego Viola Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101261 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170626203051.28480-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter (cherry picked from commit e38c2da01f76cca82b59ca612529b81df82a7cc7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit dc8cca5ef25ac4cb0dfc37467521a759767ff361 Author: Shawn Lin Date: Mon Jul 3 17:21:02 2017 +0800 PCI: rockchip: Use normal register bank for config accessors Rockchip's RC has two banks of registers for the root port: a normal bank that is strictly compatible with the PCIe spec, and a privileged bank that can be used to change RO bits of root port registers. When probing the RC driver, we use the privileged bank to do some basic setup work as some RO bits are hw-inited to wrong value. But we didn't change to the normal bank after probing the driver. This leads to a serious problem when the PME code tries to clear the PME status by writing PCI_EXP_RTSTA_PME to the register of PCI_EXP_RTSTA. Per PCIe 3.0 spec, section 7.8.14, the PME status bit is RW1C. So the PME code is doing the right thing to clear the PME status but we find the RC doesn't clear it but actually setting it to one. So finally the system trap in pcie_pme_work_fn() as PCI_EXP_RTSTA_PME is true now forever. This issue can be reproduced by booting kernel with pci=nomsi. Use the normal register bank for the PCI config accessors. The privileged bank is used only internally by this driver. Fixes: e77f847d ("PCI: rockchip: Add Rockchip PCIe controller support") Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org Cc: Jeffy Chen Cc: Brian Norris drivers/pci/host/pcie-rockchip.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d924cc3feda9c2bea8164930899f367ce249cbbf Author: Balbir Singh Date: Thu Jun 29 03:04:06 2017 +1000 powerpc/vmlinux.lds: Align __init_begin to 16M For CONFIG_STRICT_KERNEL_RWX align __init_begin to 16M. We use 16M since its the larger of 2M on radix and 16M on hash for our linear mapping. The plan is to have .text, .rodata and everything upto __init_begin marked as RX. Note we still have executable read only data. We could further align rodata to another 16M boundary. I've used keeping text plus rodata as read-only-executable as a trade-off to doing read-only-executable for text and read-only for rodata. We don't use multi PT_LOAD in PHDRS because we are not sure if all bootloaders support them. This patch keeps PHDRS in vmlinux.lds.S as the same they are with just one PT_LOAD for all of the kernel marked as RWX (7). mpe: What this means is the added alignment bloats the resulting binary on disk, a powernv kernel goes from 17M to 22M. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/vmlinux.lds.S | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 37bc3e5fd764fb258ff4fcbb90b6d1b67fb466c1 Author: Balbir Singh Date: Thu Jun 29 03:04:05 2017 +1000 powerpc/lib/code-patching: Use alternate map for patch_instruction() This patch creates the window using text_poke_area, allocated via get_vm_area(). text_poke_area is per CPU to avoid locking. text_poke_area for each cpu is setup using late_initcall, prior to setup of these alternate mapping areas, we continue to use direct write to change/modify kernel text. With the ability to use alternate mappings to write to kernel text, it provides us the freedom to then turn text read-only and implement CONFIG_STRICT_KERNEL_RWX. This code is CPU hotplug aware to ensure that the we have mappings for any new cpus as they come online and tear down mappings for any CPUs that go offline. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/lib/code-patching.c | 171 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 167 insertions(+), 4 deletions(-) commit efe4fbb1ac3a6489c1dc7d31b51ecb7425807b1b Author: Balbir Singh Date: Tue Jun 27 17:48:58 2017 +1000 powerpc/xmon: Add patch_instruction() support for xmon Move from mwrite() to patch_instruction() for xmon for breakpoint addition and removal. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f3eca956389316acd1a132fad1ad0b6f2ca78a61 Author: Balbir Singh Date: Tue Jun 6 14:29:39 2017 +1000 powerpc/kprobes/optprobes: Use patch_instruction() So that we can implement STRICT_RWX, use patch_instruction() in optprobes. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/optprobes.c | 53 +++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 21 deletions(-) commit d07df82c43be82ab6972662180e89e6ba2a828ad Author: Balbir Singh Date: Tue Jun 6 14:29:38 2017 +1000 powerpc/kprobes: Move kprobes over to patch_instruction() arch_arm/disarm_probe() use direct assignment for copying instructions, replace them with patch_instruction(). We don't need to call flush_icache_range() because patch_instruction() does it for us. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 7f6d498ed3354740cfd100e4aa99e388f1a95be7 Author: Balbir Singh Date: Thu Jun 29 03:04:10 2017 +1000 powerpc/mm/radix: Fix execute permissions for interrupt_vectors Commit 9abcc981de97 ("powerpc/mm/radix: Only add X for pages overlapping kernel text") changed the linear mapping on Radix to only mark the kernel text executable. However if the kernel is run relocated, for example as a kdump kernel, then the exception vectors are split from the kernel text, ie. they remain at real address 0. We tend to get away with it, because the kernel itself will usually be below 1G, which means the 1G page at 0-1G is marked executable and everything works OK. However if the kernel is loaded above 1G, or the system has less than 1G in total (meaning we can't use a 1G page), then the exception vectors will not be marked executable and the kernel will fail to boot. Fix it by also checking if the address range overlaps the exception vectors when deciding if we should add PAGE_KERNEL_X. Fixes: 9abcc981de97 ("powerpc/mm/radix: Only add X for pages overlapping kernel text") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Balbir Singh [mpe: Combine with the existing check, rewrite change log] Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e71ff982ae4c17d176e9f0132157d54973788377 Author: Balbir Singh Date: Thu Jun 29 03:04:07 2017 +1000 powerpc/pseries: Fix passing of pp0 in updatepp() and updateboltedpp() Once upon a time there were only two PP (page protection) bits. In ISA 2.03 an additional PP bit was added, but because of the layout of the HPTE it could not be made contiguous with the existing PP bits. The result is that we now have three PP bits, named pp0, pp1, pp2, where pp0 occupies bit 63 of dword 1 of the HPTE and pp1 and pp2 occupy bits 1 and 0 respectively. Until recently Linux hasn't used pp0, however with the addition of _PAGE_KERNEL_RO we started using it. The problem arises in the LPAR code, where we need to translate the PP bits into the argument for the H_PROTECT hypercall. Currently the code only passes bits 0-2 of newpp, which covers pp1, pp2 and N (no execute), meaning pp0 is not passed to the hypervisor at all. We can't simply pass it through in bit 63, as that would collide with a different field in the flags argument, as defined in PAPR. Instead we have to shift it down to bit 8 (IBM bit 55). Fixes: e58e87adc8bf ("powerpc/mm: Update _PAGE_KERNEL_RO") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Balbir Singh [mpe: Simplify the test, rework change log] Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/lpar.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 90653a84052cfbbc1f46427f851dad14083e36df Author: Naveen N. Rao Date: Thu Jun 29 23:19:20 2017 +0530 powerpc/64s: Blacklist rtas entry/exit from kprobes We can't take traps with relocation off, so blacklist enter_rtas() and rtas_return_loc(). However, instead of blacklisting all of enter_rtas(), introduce a new symbol __enter_rtas from where on we can't take a trap and blacklist that. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 4 ++++ 1 file changed, 4 insertions(+) commit 15770a13bebc7fae2fbc06bc4cc708a3f724c586 Author: Naveen N. Rao Date: Thu Jun 29 23:19:19 2017 +0530 powerpc/64s: Blacklist functions invoked on a trap Blacklist all functions involved while handling a trap. We: - convert some of the symbols into private symbols, and - blacklist most functions involved while handling a trap. Reviewed-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 35 ++++++++++++++++++++++------------- arch/powerpc/kernel/exceptions-64s.S | 2 ++ arch/powerpc/kernel/traps.c | 3 +++ 3 files changed, 27 insertions(+), 13 deletions(-) commit 3639d6619c249acf3b8ecc4fd4552486f217dec0 Author: Naveen N. Rao Date: Thu Jun 29 23:19:18 2017 +0530 powerpc/64s: Un-blacklist system_call() from kprobes It is actually safe to probe system_call() in entry_64.S, but only till we unset MSR_RI. To allow this, add a new symbol system_call_exit() after the mtmsrd and blacklist that. Suggested-by: Michael Ellerman Reviewed-by: Nicholas Piggin Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 266de3a842d70b481ef1dac487acfad1240deb7e Author: Naveen N. Rao Date: Thu Jun 29 23:19:17 2017 +0530 powerpc/64s: Move system_call() symbol to just after setting MSR_EE It is common to get a PMU interrupt right after the mtmsr instruction that enables interrupts. Due to this, the stack trace profile gets needlessly split across system_call_common() and system_call(). Previously, system_call() symbol was at the current place to hide a few earlier symbols which have since been made private or removed entirely. So, let's move system_call() slightly higher up, right after the mtmsr instruction that enables interrupts. Convert existing references to system_call to a local syscall symbol. Suggested-by: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit cf7d6fb0672668690ba235280698c9aa6a81010a Author: Naveen N. Rao Date: Thu Jun 29 23:19:16 2017 +0530 powerpc/64s: Blacklist system_call() and system_call_common() from kprobes Convert some of the symbols into private symbols and blacklist system_call_common() and system_call() from kprobes. We can't take a trap at parts of these functions as either MSR_RI is unset or the kernel stack pointer is not yet setup. Reviewed-by: Masami Hiramatsu Reviewed-by: Nicholas Piggin Signed-off-by: Naveen N. Rao [mpe: Don't convert system_call_common to _GLOBAL()] Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 9d6c452352d6535745e734f296335e6695b6df0b Author: Naveen N. Rao Date: Thu Jun 29 23:19:15 2017 +0530 powerpc/64s: Convert .L__replay_interrupt_return to a local label Commit b48bbb82e2b835 ("powerpc/64s: Don't unbalance the return branch predictor in __replay_interrupt()") introduced __replay_interrupt_return symbol with '.L' prefix in hopes of keeping it private. However, due to the use of LOAD_REG_ADDR(), the assembler kept this symbol visible. Fix the same by instead using the local label '1'. Fixes: Commit b48bbb82e2b835 ("powerpc/64s: Don't unbalance the return branch predictor in __replay_interrupt()") Suggested-by: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83e840c770f2c578bbbff478d62a4403c073b438 Author: Naveen N. Rao Date: Thu Jun 29 23:19:14 2017 +0530 powerpc64/elfv1: Only dereference function descriptor for non-text symbols Currently, we assume that the function pointer we receive in ppc_function_entry() points to a function descriptor. However, this is not always the case. In particular, assembly symbols without the right annotation do not have an associated function descriptor. Some of these symbols are added to the kprobe blacklist using _ASM_NOKPROBE_SYMBOL(). When such addresses are subsequently processed through arch_deref_entry_point() in populate_kprobe_blacklist(), we see the below errors during bootup: [ 0.663963] Failed to find blacklist at 7d9b02a648029b6c [ 0.663970] Failed to find blacklist at a14d03d0394a0001 [ 0.663972] Failed to find blacklist at 7d5302a6f94d0388 [ 0.663973] Failed to find blacklist at 48027d11e8610178 [ 0.663974] Failed to find blacklist at f8010070f8410080 [ 0.663976] Failed to find blacklist at 386100704801f89d [ 0.663977] Failed to find blacklist at 7d5302a6f94d00b0 Fix this by checking if the function pointer we receive in ppc_function_entry() already points to kernel text. If so, we just return it as is. If not, we assume that this is a function descriptor and proceed to dereference it. Suggested-by: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/code-patching.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ea7f4491e9773fbd1f57a3f38b9b9cd92090ba9b Author: Ryder Lee Date: Sun May 21 11:42:25 2017 +0800 dt-bindings: PCI: Add documentation for MediaTek PCIe Add documentation for PCIe host driver available in MT7623 series SoCs. Signed-off-by: Ryder Lee Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../bindings/pci/mediatek,mt7623-pcie.txt | 130 +++++++++++++++++++++ 1 file changed, 130 insertions(+) commit 3ced8d73006321bd2a0412fa0ff4b065a02e7514 Author: Christophe Lombard Date: Thu Jun 22 15:07:27 2017 +0200 cxl: Export library to support IBM XSL This patch exports a in-kernel 'library' API which can be called by other drivers to help interacting with an IBM XSL on a POWER9 system. The XSL (Translation Service Layer) is a stripped down version of the PSL (Power Service Layer) used in some cards such as the Mellanox CX5. Like the PSL, it implements the CAIA architecture, but has a number of differences, mostly in it's implementation dependent registers. The XSL also uses a special DMA cxl mode, which uses a slightly different init sequence for the CAPP and PHB. Signed-off-by: Andrew Donnellan Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal-api.h | 1 + drivers/misc/cxl/Kconfig | 5 + drivers/misc/cxl/Makefile | 2 +- drivers/misc/cxl/cxl.h | 6 + drivers/misc/cxl/cxllib.c | 246 ++++++++++++++++++++++++++++++++++++ drivers/misc/cxl/fault.c | 29 +++-- drivers/misc/cxl/native.c | 16 ++- drivers/misc/cxl/pci.c | 41 ++++-- include/misc/cxllib.h | 133 +++++++++++++++++++ 9 files changed, 449 insertions(+), 30 deletions(-) commit 218ea31039e84901b449c3769035456688f6e17d Merge: 5405c92 d6bd819 Author: Michael Ellerman Date: Mon Jul 3 23:05:43 2017 +1000 Merge branch 'fixes' into next Merge our fixes branch, a few of them are tripping people up while working on top of next, and we also have a dependency between the CXL fixes and new CXL code we want to merge into next. commit 5405c92bc2cd0c09c7f9716af234b45ef66faa94 Author: Masahiro Yamada Date: Wed May 24 14:12:24 2017 +0900 powerpc/dts: Use #include "..." to include local DT Most of DT files in PowerPC use #include "..." to make pre-processor include DT in the same directory, but we have 3 exceptional files that use #include <...> for that. Fix them to remove -I$(srctree)/arch/$(SRCARCH)/boot/dts path from dtc_cpp_flags. Signed-off-by: Masahiro Yamada Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/ac14xx.dts | 2 +- arch/powerpc/boot/dts/mpc5121ads.dts | 2 +- arch/powerpc/boot/dts/pdm360ng.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit beaba77cf23f1734fc06ea90932526567c95ac25 Merge: 85e4b30 c26ebe9 Author: Bjorn Helgaas Date: Mon Jul 3 08:00:32 2017 -0500 Merge branch 'pci/host-imx6' into next * pci/host-imx6: PCI: imx6: Add regulator support commit 85e4b30a2c6f40f25bad2226840dc98ec2854603 Merge: 6f65dae 7dcf90e Author: Bjorn Helgaas Date: Mon Jul 3 08:00:31 2017 -0500 Merge branch 'pci/host-hv' into next * pci/host-hv: PCI: hv: Use vPCI protocol version 1.2 PCI: hv: Add vPCI version protocol negotiation PCI: hv: Temporary own CPU-number-to-vCPU-number infra PCI: hv: Use page allocation for hbus structure PCI: hv: Fix comment formatting and use proper integer fields commit 6f65daed5bcca6d4e419c0b914f392c7fdb48027 Merge: ecf75c4 2eeb02b Author: Bjorn Helgaas Date: Mon Jul 3 08:00:31 2017 -0500 Merge branch 'pci/host-faraday' into next * pci/host-faraday: PCI: faraday: Add clock handling PCI: faraday: Add clock bindings commit ecf75c46e6a43eb083c9dfbbe7903ec81dcd524a Merge: f011a5f 40aa52c Author: Bjorn Helgaas Date: Mon Jul 3 08:00:30 2017 -0500 Merge branch 'pci/host-dra7xx' into next * pci/host-dra7xx: PCI: dwc: dra7xx: Use RW1C for IRQSTATUS_MSI and IRQSTATUS_MAIN PCI: dwc: dra7xx: Depend on appropriate SoC or compile test commit f011a5f8bacbf62f9de16c2a4c7e73dcabfae383 Merge: 44d745f 4ab2e7c Author: Bjorn Helgaas Date: Mon Jul 3 08:00:30 2017 -0500 Merge branch 'pci/host-designware' into next * pci/host-designware: PCI: dwc: Constify dw_pcie_host_ops structures PCI: host: Mark PCIe/PCI (MSI) cascade ISR as IRQF_NO_THREAD commit 44d745fb5d06cce62501a39e9dd47a47b111777b Merge: bb02ce95 769b461 Author: Bjorn Helgaas Date: Mon Jul 3 08:00:29 2017 -0500 Merge branch 'pci/irq-fixups' into next * pci/irq-fixups: arm64: PCI: Drop DT IRQ allocation from pcibios_alloc_irq() PCI: xilinx-nwl: Move to struct pci_host_bridge IRQ mapping functions PCI: rockchip: Move to struct pci_host_bridge IRQ mapping functions PCI: xgene: Move to struct pci_host_bridge IRQ mapping functions PCI: altera: Drop pci_fixup_irqs() PCI: versatile: Drop pci_fixup_irqs() PCI: generic: Drop pci_fixup_irqs() PCI: faraday: Drop pci_fixup_irqs() PCI: designware: Drop pci_fixup_irqs() PCI: iproc: Drop pci_fixup_irqs() PCI: rcar: Drop pci_fixup_irqs() PCI: xilinx: Drop pci_fixup_irqs() PCI: tegra: Drop pci_fixup_irqs() ARM/PCI: Remove pci_fixup_irqs() call for bios32 host controllers PCI: Add a call to pci_assign_irq() in pci_device_probe() OF/PCI: Update of_irq_parse_and_map_pci() comment PCI: Add pci_assign_irq() function and have pci_fixup_irqs() use it PCI: Add IRQ mapping function pointers to pci_host_bridge struct PCI: Build setup-irq.o on all arches PCI: Remove pci_scan_root_bus_msi() PCI: xilinx-nwl: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: rockchip: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: generic: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: xgene: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: xilinx: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: altera: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: versatile: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: iproc: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: rcar: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: aardvark: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: designware: Convert PCI scan API to pci_scan_root_bus_bridge() ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge() PCI: Make pci_register_host_bridge() PCI core internal PCI: Add pci_scan_root_bus_bridge() interface PCI: tegra: Fix host bridge memory leakage PCI: faraday: Fix host bridge memory leakage PCI: Add devm_pci_alloc_host_bridge() interface PCI: Add pci_free_host_bridge() interface PCI: Initialize bridge release function at bridge allocation PCI: faraday: Convert IRQ masking to raw PCI config accessors PCI: iproc: Convert link check to raw PCI config accessors PCI: xilinx-nwl: Remove nwl_pcie_enable_msi() unused bus parameter commit bb02ce95a59ee5b96579fab2e2e7635ee26d535b Merge: c781f85 52354b9 Author: Bjorn Helgaas Date: Mon Jul 3 08:00:29 2017 -0500 Merge branch 'pci/virtualization' into next * pci/virtualization: PCI: Remove __pci_dev_reset() and pci_dev_reset() PCI: Split ->reset_notify() method into ->reset_prepare() and ->reset_done() PCI: Protect pci_error_handlers->reset_notify() usage with device_lock() PCI: Protect pci_driver->sriov_configure() usage with device_lock() PCI: Mark Intel XXV710 NIC INTx masking as broken PCI: Restore PRI and PASID state after Function-Level Reset PCI: Cache PRI and PASID bits in pci_dev commit 52354b9d1f46aae7386db7bb8ec8484b5488087f Author: Christoph Hellwig Date: Thu Jun 1 13:10:39 2017 +0200 PCI: Remove __pci_dev_reset() and pci_dev_reset() Implement the reset probing / reset chain directly in __pci_probe_reset_function() and __pci_reset_function_locked() respectively. Link: http://lkml.kernel.org/r/20170601111039.8913-4-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 108 ++++++++++++++++++++++++++---------------------------- 1 file changed, 52 insertions(+), 56 deletions(-) commit 775755ed3c65fb2d31f9268162495d76eaa2c281 Author: Christoph Hellwig Date: Thu Jun 1 13:10:38 2017 +0200 PCI: Split ->reset_notify() method into ->reset_prepare() and ->reset_done() The pci_error_handlers->reset_notify() method had a flag to indicate whether to prepare for or clean up after a reset. The prepare and done cases have no shared functionality whatsoever, so split them into separate methods. [bhelgaas: changelog, update locking comments] Link: http://lkml.kernel.org/r/20170601111039.8913-3-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 36 +++++-------- drivers/net/wireless/marvell/mwifiex/pcie.c | 75 ++++++++++++++++------------ drivers/nvme/host/pci.c | 15 +++--- drivers/pci/pci.c | 34 ++++++------- include/linux/pci.h | 3 +- 5 files changed, 82 insertions(+), 81 deletions(-) commit 1cb566ba5634d7593b8b2a0a5c83f1c9e14b2e09 Author: Jakub Kicinski Date: Fri Jun 30 19:09:59 2017 -0700 scripts/kernel-doc: handle DECLARE_HASHTABLE DECLARE_HASHTABLE needs similar handling to DECLARE_BITMAP because otherwise kernel-doc assumes the member name is the second, not first macro parameter. Signed-off-by: Jakub Kicinski Signed-off-by: Jonathan Corbet scripts/kernel-doc | 2 ++ 1 file changed, 2 insertions(+) commit 52427fa0631269c62885dc48e0c32e2ad6e17f8c Author: Daniel Axtens Date: Mon Jul 3 21:46:43 2017 +1000 openvswitch: fix mis-ordered comment lines for ovs_skb_cb I was trying to wrap my head around meaning of mru, and realised that the second line of the comment defining it had somehow ended up after the line defining cutlen, leading to much confusion. Reorder the lines to make sense. Signed-off-by: Daniel Axtens Signed-off-by: David S. Miller net/openvswitch/datapath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcdb9e8523bd46000648382ae3e53a00eecc502e Merge: 3a3f7d1 17d9aa6 Author: David S. Miller Date: Mon Jul 3 05:51:45 2017 -0700 Merge tag 'wireless-drivers-next-for-davem-2017-07-03' of https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.13 Last minute changes to get new hardware and firmware support for iwlwifi and few other changes I was able to squeeze in. Also two patches for ieee80211.h and nl80211 as Johannes is away. Major changes: iwlwifi * some important fixes for 9000 HW * support for version 30 of the FW API for 8000 and 9000 series * a few new PCI IDs for 9000 series * reorganization of common files brcmfmac * support 4-way handshake offloading for WPA/WPA2-PSK and 802.1X ==================== Signed-off-by: David S. Miller commit 18cfd9429d8a82c49add8f3ca9d366599bfcac45 Author: Andreas Färber Date: Sat Jul 1 23:29:30 2017 +0200 ARM: owl: smp: Drop bogus holding pen The S500 SoC can start secondary CPUs without busy-looping for pen_release, so simplify the SMP code compared to the LeMaker kernel tree. Fixes: 172067e0bc87 ("ARM: owl: Implement CPU enable-method for S500") Suggested-by: Arnd Bergmann Cc: David Liu Signed-off-by: Andreas Färber Signed-off-by: Arnd Bergmann arch/arm/mach-actions/headsmp.S | 20 ++------------------ arch/arm/mach-actions/platsmp.c | 29 +---------------------------- 2 files changed, 3 insertions(+), 46 deletions(-) commit eb3827457ab0e151b79798b07072c70f5c83809d Author: Andreas Färber Date: Sat Jul 1 23:41:00 2017 +0200 ARM: owl: Drop custom machine Rely on the fallback to "Generic DT based system". This change is visible in /proc/cpuinfo. Cc: Arnd Bergmann Signed-off-by: Andreas Färber Signed-off-by: Arnd Bergmann arch/arm/mach-actions/Makefile | 1 - arch/arm/mach-actions/owl.c | 28 ---------------------------- 2 files changed, 29 deletions(-) commit 03471c06d02f80f9338a5df45f2a92ef38ca1233 Merge: bee5799 ef75040 d37efb7 Author: Rafael J. Wysocki Date: Mon Jul 3 14:26:43 2017 +0200 Merge branches 'acpi-ec' and 'acpi-video' * acpi-ec: ACPI / EC: Add quirk for GL720VMK ACPI / EC: Fix media keys not working problem on some Asus laptops ACPI / EC: Add support to skip boot stage DSDT probe ACPI / EC: Enhance boot EC sanity check ACPI: EC: Fix EC command visibility for dynamic debug ACPI: EC: Fix an EC event IRQ storming issue * acpi-video: ACPI / video: Add quirks for the Dell Precision 7510 commit bee5799e4fc53e518255a9f65e4d81ff58ce6c9b Merge: 80abc82 72ebe5a b6aeab4 772bf1e Author: Rafael J. Wysocki Date: Mon Jul 3 14:25:11 2017 +0200 Merge branches 'acpi-pmic', 'acpi-misc' and 'acpi-tables' * acpi-pmic: ACPI / PMIC: xpower: Add support for the GPI1 regulator to the OpRegion handler * acpi-misc: ACPI: fix whitespace in pr_fmt() to align log entries * acpi-tables: ACPI: configfs: Unload SSDT on configfs entry removal commit 80abc82e6cf1959c3e88e85daede5795b755cf9c Merge: c0bc126 3d867f6 Author: Rafael J. Wysocki Date: Mon Jul 3 14:24:28 2017 +0200 Merge branch 'acpica' * acpica: (53 commits) ACPICA: Use designated initializers ACPICA: Update version to 20170531 ACPICA: Update a couple of debug output messages ACPICA: acpiexec: enhance local signal handler ACPICA: Simplify output for the ACPI Debug Object ACPICA: Unix application OSL: Correctly handle control-c (EINTR) ACPICA: Improvements for debug output only ACPICA: Disassembler: allow conflicting external declarations to be emitted. ACPICA: Disassembler: add external op to namespace on first pass ACPICA: Disassembler: prevent external op's from opening a new scope ACPICA: Changed Gbl_disasm_flag to acpi_gbl_disasm_flag ACPICA: Changing External to a named object ACPICA: Update two error messages to emit control method name ACPICA: Fix for Device/Thermal objects with ObjectType and DerefOf ACPICA: Comment update: spelling/format. No functional change ACPICA: Update comments, no functional change ACPICA: Split resource descriptor decode strings to a new file ACPICA: Remove extraneous status check ACPICA: Export the public mutex interfaces ACPICA: Disassembler: Abort on an invalid/unknown AML opcode ... commit 8f8e5c3e2796eaf150d6262115af12707c2616dd Merge: 9a5f2c8 de3ef1e Author: Rafael J. Wysocki Date: Mon Jul 3 14:23:09 2017 +0200 Merge branch 'acpi-pm' * acpi-pm: PM / core: Drop run_wake flag from struct dev_pm_info PCI / PM: Simplify device wakeup settings code PCI / PM: Drop pme_interrupt flag from struct pci_dev ACPI / PM: Consolidate device wakeup settings code ACPI / PM: Drop run_wake from struct acpi_device_wakeup_flags ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems platform: x86: intel-hid: Wake up the system from suspend-to-idle platform: x86: intel-vbtn: Wake up the system from suspend-to-idle ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle platform/x86: Add driver for ACPI INT0002 Virtual GPIO device PCI / PM: Restore PME Enable if skipping wakeup setup PM / sleep: Print timing information if debug is enabled ACPI / PM: Clean up device wakeup enable/disable code ACPI / PM: Change log level of wakeup-related message USB / PCI / PM: Allow the PCI core to do the resume cleanup ACPI / PM: Run wakeup notify handlers synchronously Conflicts: drivers/base/power/main.c commit 9a5f2c871af4cf6bd63ddb20061faa7049103350 Merge: fb0356c 268cd2e 1a99d0c edbdabc Author: Rafael J. Wysocki Date: Mon Jul 3 14:22:34 2017 +0200 Merge branches 'pm-domains', 'pm-avs' and 'powercap' * pm-domains: PM / Domains: Fix missing default_power_down_ok comment PM / Domains: Fix unsafe iteration over modified list of domains PM / Domains: Fix unsafe iteration over modified list of domain providers PM / Domains: Fix unsafe iteration over modified list of device links PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device PM / Domains: Call driver's noirq callbacks PM / Domains: Constify genpd pointer PM / Domains: pdd->dev can't be NULL in genpd_dev_pm_qos_notifier() * pm-avs: PM / AVS: rockchip-io: add io selectors and supplies for rk3228 * powercap: powercap/RAPL: prevent overridding bits outside of the mask commit fb0356c4786ea97e5abdf06c98a29dd675187bd0 Merge: 301f8d7 cbcba35 829a4e8 dbb1d8b Author: Rafael J. Wysocki Date: Mon Jul 3 14:22:05 2017 +0200 Merge branches 'pm-core', 'pm-opp' and 'pm-qos' * pm-core: PM / sysfs: Constify attribute groups PM: Constify info string used in messages PM: Constify returned PM event name PM / wakeirq: Convert to SRCU * pm-opp: PM / OPP: Add dev_pm_opp_{set|put}_clkname() PM / OPP: Use - instead of @ for DT entries PM / OPP: Don't create debugfs "supply-0" directory unnecessarily PM / OPP: opp-microvolt is not optional if regulators are set PM / OPP: Don't create copy of regulators unnecessarily PM / OPP: Reorganize _generic_set_opp_regulator() * pm-qos: PM / QoS: constify *_attribute_group. commit 301f8d7463b1f3d1fdb56ee1cb4abb674094531d Merge: f1c7842 59494fe Author: Rafael J. Wysocki Date: Mon Jul 3 14:21:33 2017 +0200 Merge branch 'pm-sleep' * pm-sleep: PM: hibernate: constify attribute_group structures. PM / hibernate: Drop redundant parameter of swsusp_alloc() PM / hibernate: Use CONFIG_HAVE_SET_MEMORY for include condition x86/power/64: Use char arrays for asm function names commit f1c7842e5fdd81363643debcd04c5e9b9a55325a Merge: 16b5b09 73808d0 8183003 3ed09c9 Author: Rafael J. Wysocki Date: Mon Jul 3 14:21:18 2017 +0200 Merge branches 'pm-cpufreq', 'intel_pstate' and 'pm-cpuidle' * pm-cpufreq: cpufreq / CPPC: Initialize policy->min to lowest nonlinear performance cpufreq: sfi: make freq_table static cpufreq: exynos5440: Fix inconsistent indenting cpufreq: imx6q: imx6ull should use the same flow as imx6ul cpufreq: dt: Add support for hi3660 * intel_pstate: cpufreq: Update scaling_cur_freq documentation cpufreq: intel_pstate: Clean up after performance governor changes intel_pstate: skip scheduler hook when in "performance" mode intel_pstate: delete scheduler hook in HWP mode x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF cpufreq: intel_pstate: Remove max/min fractions to limit performance x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz" * pm-cpuidle: cpuidle: menu: allow state 0 to be disabled intel_idle: Use more common logging style x86/ACPI/cstate: Allow ACPI C1 FFH MWAIT use on AMD systems ARM: cpuidle: Support asymmetric idle definition commit 16b5b092407d3fbe23431ca58804fd1481f811b2 Merge: 875aabf5 902bef7 Author: Rafael J. Wysocki Date: Mon Jul 3 14:17:16 2017 +0200 Merge branch 'pm-tools' * pm-tools: cpupower: Add support for new AMD family 0x17 cpupower: Fix bug where return value was not used tools/power turbostat: update version number tools/power turbostat: decode MSR_IA32_MISC_ENABLE only on Intel tools/power turbostat: stop migrating, unless '-m' tools/power turbostat: if --debug, print sampling overhead tools/power turbostat: hide SKL counters, when not requested intel_pstate: use updated msr-index.h HWP.EPP values tools/power x86_energy_perf_policy: support HWP.EPP x86: msr-index.h: fix shifts to ULL results in HWP macros. x86: msr-index.h: define HWP.EPP values x86: msr-index.h: define EPB mid-points commit 875aabf52e21f84cb6700a760dc734c260c54e7e Merge: c0bc126 87085ff Author: Rafael J. Wysocki Date: Mon Jul 3 14:13:44 2017 +0200 Merge branch 'uuid-types' Merge 'uuid-types' from git://git.infradead.org/users/hch/uuid.git commit ff9e0e3b091291a6694c52074940c5fabd693467 Merge: 0281baf 4fcee14 Author: Arnd Bergmann Date: Mon Jul 3 14:09:06 2017 +0200 Merge tag 'mvebu-fixes-4.12-2' of git://git.infradead.org/linux-mvebu into next/fixes-non-critical mvebu fixes for 4.12 (part 2) Fix Openblock A6 (kirkwood base board) nand partition overlap * tag 'mvebu-fixes-4.12-2' of git://git.infradead.org/linux-mvebu: ARM: dts: kirkwood: Fix Openblock A6 nand partition overlap arm64: marvell: dts: fix interrupts in 7k/8k crypto nodes commit c013b65ad8a1e132f733404809afc72f7d00e768 Author: Rasmus Villemoes Date: Tue May 30 10:56:45 2017 +0200 watchdog: introduce watchdog_worker_should_ping helper This will be useful when the condition becomes slightly more complicated in the next patch. Signed-off-by: Rasmus Villemoes Reviewed-by: Esben Haabendal Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/watchdog_dev.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit e7bf02895f06c0603af800c4bfce3ca4ede9147d Author: Keiji Hayashibara Date: Wed Jun 14 16:53:44 2017 +0900 watchdog: uniphier: add UniPhier watchdog driver Add a watchdog driver for Socionext UniPhier series SoC. Note that the timeout value for this device must be a power of 2 because of the specification. Signed-off-by: Keiji Hayashibara Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-parameters.txt | 6 + drivers/watchdog/Kconfig | 12 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/uniphier_wdt.c | 268 +++++++++++++++++++++++++ 4 files changed, 287 insertions(+) commit e75bf0ea77e9778e9a1975eb9b38698babcbde63 Author: Keiji Hayashibara Date: Wed Jun 14 16:53:43 2017 +0900 dt-bindings: watchdog: add description for UniPhier WDT controller Add uniphier-wdt dt-bindings documentation. Signed-off-by: Keiji Hayashibara Acked-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/watchdog/uniphier-wdt.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 011e29e7d93d80c2529ba17109bc4e5d031ea2b1 Author: Arvind Yadav Date: Tue Jun 20 11:04:26 2017 +0530 watchdog: cadence_wdt: make of_device_ids const. of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 1962 612 4 2578 a12 drivers/watchdog/cadence_wdt.o File size after constify cdns_wdt_of_match: text data bss dec hex filename 2378 196 4 2578 a12 drivers/watchdog/cadence_wdt.o Signed-off-by: Arvind Yadav Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/cadence_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 935988c67406f35e63873ac63e2962664ee99bdc Author: Arvind Yadav Date: Mon Jun 12 12:02:39 2017 +0530 watchdog: zx2967: constify zx2967_wdt_ops. File size before: text data bss dec hex filename 988 288 0 1276 4fc drivers/watchdog/zx2967_wdt.o File size After adding 'const': text data bss dec hex filename 1084 192 0 1276 4fc drivers/watchdog/zx2967_wdt.o Signed-off-by: Arvind Yadav Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/zx2967_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d34f1f4800439c8330f05e9f1133317f3b1f8c38 Author: Arvind Yadav Date: Mon Jun 12 11:50:26 2017 +0530 watchdog: bcm47xx_wdt: constify bcm47xx_wdt_hard_ops and bcm47xx_wdt_soft_ops File size before: text data bss dec hex filename 1282 388 1 1671 687 drivers/watchdog/bcm47xx_wdt.o File size After adding 'const': text data bss dec hex filename 1474 196 1 1671 687 drivers/watchdog/bcm47xx_wdt.o Signed-off-by: Arvind Yadav Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm47xx_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 81667e9c8ad827365f2d1e8b924caf062a19c593 Author: Dan Carpenter Date: Mon Jul 3 13:54:28 2017 +0300 mtd: nand: mtk: release lock on error path We only want to hold the lock on the success path, not this error path. Fixes: 7ec4a37c5d71 ("mtd: nand: mediatek: add support for different MTK NAND FLASH Controller IP") Signed-off-by: Dan Carpenter Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_ecc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c54590cac51db8ab5fd30156bdaba34af915e629 Author: Marek Marczykowski-Górecki Date: Mon Jun 26 14:49:46 2017 +0200 x86/xen: allow userspace access during hypercalls Userspace application can do a hypercall through /dev/xen/privcmd, and some for some hypercalls argument is a pointers to user-provided structure. When SMAP is supported and enabled, hypervisor can't access. So, lets allow it. The same applies to HYPERVISOR_dm_op, where additionally privcmd driver carefully verify buffer addresses. Cc: stable@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/include/asm/xen/hypercall.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit bf1b9ddf181d29ec91f87d9c52bcb551ccf04157 Author: Gustavo A. R. Silva Date: Fri Jun 23 17:01:20 2017 -0500 x86: xen: remove unnecessary variable in xen_foreach_remap_area() Remove unnecessary variable mfn in function xen_foreach_remap_area() and, refactor the code. Variable mfn at line 518:mfn = xen_remap_buf.mfns[i]; is only being used to store a value to be passed as an argument to the xen_update_mem_tables() function. This value can be passed directly, which makes variable mfn unnecessary. Also, value assigned to variable mfn at line 534:mfn = xen_remap_mfn; is never used. Addresses-Coverity-ID: 1260110 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/setup.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3a3f7d130eb5c219a1a4b183b92106028747dc85 Merge: 784c372 ea23b42 Author: David S. Miller Date: Mon Jul 3 03:42:10 2017 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/davem/net Some overlapping changes in the mlx5 driver. A merge conflict resolution posted by Stephen Rothwell was used as a guide. Signed-off-by: David S. Miller commit 784c372a8184bdb8ae722c94250c2d57dc327a8e Author: Eric Dumazet Date: Mon Jul 3 02:57:54 2017 -0700 net: make sk_ehashfn() static sk_ehashfn() is only used from a single file. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_hashtables.h | 1 - net/ipv4/inet_hashtables.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 5361e209dd30040dade51ea7c8f97f4090b30116 Author: Eric Dumazet Date: Mon Jul 3 02:54:33 2017 -0700 net: avoid one splat in fib_nl_delrule() We need to use refcount_set() on a newly created rule to avoid following error : [ 64.601749] ------------[ cut here ]------------ [ 64.601757] WARNING: CPU: 0 PID: 6476 at lib/refcount.c:184 refcount_sub_and_test+0x75/0xa0 [ 64.601758] Modules linked in: w1_therm wire cdc_acm ehci_pci ehci_hcd mlx4_en ib_uverbs mlx4_ib ib_core mlx4_core [ 64.601769] CPU: 0 PID: 6476 Comm: ip Tainted: G W 4.12.0-smp-DEV #274 [ 64.601771] task: ffff8837bf482040 task.stack: ffff8837bdc08000 [ 64.601773] RIP: 0010:refcount_sub_and_test+0x75/0xa0 [ 64.601774] RSP: 0018:ffff8837bdc0f5c0 EFLAGS: 00010286 [ 64.601776] RAX: 0000000000000026 RBX: 0000000000000001 RCX: 0000000000000000 [ 64.601777] RDX: 0000000000000026 RSI: 0000000000000096 RDI: ffffed06f7b81eae [ 64.601778] RBP: ffff8837bdc0f5d0 R08: 0000000000000004 R09: fffffbfff4a54c25 [ 64.601779] R10: 00000000cbc500e5 R11: ffffffffa52a6128 R12: ffff881febcf6f24 [ 64.601779] R13: ffff881fbf4eaf00 R14: ffff881febcf6f80 R15: ffff8837d7a4ed00 [ 64.601781] FS: 00007ff5a2f6b700(0000) GS:ffff881fff800000(0000) knlGS:0000000000000000 [ 64.601782] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 64.601783] CR2: 00007ffcdc70d000 CR3: 0000001f9c91e000 CR4: 00000000001406f0 [ 64.601783] Call Trace: [ 64.601786] refcount_dec_and_test+0x11/0x20 [ 64.601790] fib_nl_delrule+0xc39/0x1630 [ 64.601793] ? is_bpf_text_address+0xe/0x20 [ 64.601795] ? fib_nl_newrule+0x25e0/0x25e0 [ 64.601798] ? depot_save_stack+0x133/0x470 [ 64.601801] ? ns_capable+0x13/0x20 [ 64.601803] ? __netlink_ns_capable+0xcc/0x100 [ 64.601806] rtnetlink_rcv_msg+0x23a/0x6a0 [ 64.601808] ? rtnl_newlink+0x1630/0x1630 [ 64.601811] ? memset+0x31/0x40 [ 64.601813] netlink_rcv_skb+0x2d7/0x440 [ 64.601815] ? rtnl_newlink+0x1630/0x1630 [ 64.601816] ? netlink_ack+0xaf0/0xaf0 [ 64.601818] ? kasan_unpoison_shadow+0x35/0x50 [ 64.601820] ? __kmalloc_node_track_caller+0x4c/0x70 [ 64.601821] rtnetlink_rcv+0x28/0x30 [ 64.601823] netlink_unicast+0x422/0x610 [ 64.601824] ? netlink_attachskb+0x650/0x650 [ 64.601826] netlink_sendmsg+0x7b7/0xb60 [ 64.601828] ? netlink_unicast+0x610/0x610 [ 64.601830] ? netlink_unicast+0x610/0x610 [ 64.601832] sock_sendmsg+0xba/0xf0 [ 64.601834] ___sys_sendmsg+0x6a9/0x8c0 [ 64.601835] ? copy_msghdr_from_user+0x520/0x520 [ 64.601837] ? __alloc_pages_nodemask+0x160/0x520 [ 64.601839] ? memcg_write_event_control+0xd60/0xd60 [ 64.601841] ? __alloc_pages_slowpath+0x1d50/0x1d50 [ 64.601843] ? kasan_slab_free+0x71/0xc0 [ 64.601845] ? mem_cgroup_commit_charge+0xb2/0x11d0 [ 64.601847] ? lru_cache_add_active_or_unevictable+0x7d/0x1a0 [ 64.601849] ? __handle_mm_fault+0x1af8/0x2810 [ 64.601851] ? may_open_dev+0xc0/0xc0 [ 64.601852] ? __pmd_alloc+0x2c0/0x2c0 [ 64.601853] ? __fdget+0x13/0x20 [ 64.601855] __sys_sendmsg+0xc6/0x150 [ 64.601856] ? __sys_sendmsg+0xc6/0x150 [ 64.601857] ? SyS_shutdown+0x170/0x170 [ 64.601859] ? handle_mm_fault+0x28a/0x650 [ 64.601861] SyS_sendmsg+0x12/0x20 [ 64.601863] entry_SYSCALL_64_fastpath+0x13/0x94 Fixes: 717d1e993ad8 ("net: convert fib_rule.refcnt from atomic_t to refcount_t") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/fib_rules.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a178232ddab55048e347b43b697bfa5013ef819e Author: Kai-Heng Feng Date: Mon Jul 3 17:26:50 2017 +0800 ALSA: hda/realtek - Remove GPIO_MASK GPIO_MASK was introduced in commit "df694daa3c01 [ALSA] hda-codec - Add the support of ALC262,ALC883,ALC885,ALC861" but it's not being used. So we can simply remove it. Signed-off-by: Kai-Heng Feng Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 3 --- 1 file changed, 3 deletions(-) commit 0cd52df8a782be2e6592d331094a313d8947683a Author: Arvind Yadav Date: Tue Jun 27 14:39:58 2017 +0530 sparc: kernel: pmc: make of_device_ids const. of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller arch/sparc/kernel/pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b68067bd2752a76868f36bf79f745451cef2a05 Author: Zhu Yanjun Date: Mon Jul 3 01:35:19 2017 -0400 mlx4_en: make mlx4_log_num_mgm_entry_size static The variable mlx4_log_num_mgm_entry_size is only called in main.c. CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 2 +- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 9af9959e142c274f4a30fefb71d97d2b028b337f Author: Alban Browaeys Date: Mon Jul 3 03:20:13 2017 +0200 net: core: Fix slab-out-of-bounds in netdev_stats_to_stats64 commit 9256645af098 ("net/core: relax BUILD_BUG_ON in netdev_stats_to_stats64") made an attempt to read beyond the size of the source a possibility. Fix to only copy src size to dest. As dest might be bigger than src. ================================================================== BUG: KASAN: slab-out-of-bounds in netdev_stats_to_stats64+0xe/0x30 at addr ffff8801be248b20 Read of size 192 by task VBoxNetAdpCtl/6734 CPU: 1 PID: 6734 Comm: VBoxNetAdpCtl Tainted: G O 4.11.4prahal+intel+ #118 Hardware name: LENOVO 20CDCTO1WW/20CDCTO1WW, BIOS GQET52WW (1.32 ) 05/04/2017 Call Trace: dump_stack+0x63/0x86 kasan_object_err+0x1c/0x70 kasan_report+0x270/0x520 ? netdev_stats_to_stats64+0xe/0x30 ? sched_clock_cpu+0x1b/0x190 ? __module_address+0x3e/0x3b0 ? unwind_next_frame+0x1ea/0xb00 check_memory_region+0x13c/0x1a0 memcpy+0x23/0x50 netdev_stats_to_stats64+0xe/0x30 dev_get_stats+0x1b9/0x230 rtnl_fill_stats+0x44/0xc00 ? nla_put+0xc6/0x130 rtnl_fill_ifinfo+0xe9e/0x3700 ? rtnl_fill_vfinfo+0xde0/0xde0 ? sched_clock+0x9/0x10 ? sched_clock+0x9/0x10 ? sched_clock_local+0x120/0x130 ? __module_address+0x3e/0x3b0 ? unwind_next_frame+0x1ea/0xb00 ? sched_clock+0x9/0x10 ? sched_clock+0x9/0x10 ? sched_clock_cpu+0x1b/0x190 ? VBoxNetAdpLinuxIOCtlUnlocked+0x14b/0x280 [vboxnetadp] ? depot_save_stack+0x1d8/0x4a0 ? depot_save_stack+0x34f/0x4a0 ? depot_save_stack+0x34f/0x4a0 ? save_stack+0xb1/0xd0 ? save_stack_trace+0x16/0x20 ? save_stack+0x46/0xd0 ? kasan_slab_alloc+0x12/0x20 ? __kmalloc_node_track_caller+0x10d/0x350 ? __kmalloc_reserve.isra.36+0x2c/0xc0 ? __alloc_skb+0xd0/0x560 ? rtmsg_ifinfo_build_skb+0x61/0x120 ? rtmsg_ifinfo.part.25+0x16/0xb0 ? rtmsg_ifinfo+0x47/0x70 ? register_netdev+0x15/0x30 ? vboxNetAdpOsCreate+0xc0/0x1c0 [vboxnetadp] ? vboxNetAdpCreate+0x210/0x400 [vboxnetadp] ? VBoxNetAdpLinuxIOCtlUnlocked+0x14b/0x280 [vboxnetadp] ? do_vfs_ioctl+0x17f/0xff0 ? SyS_ioctl+0x74/0x80 ? do_syscall_64+0x182/0x390 ? __alloc_skb+0xd0/0x560 ? __alloc_skb+0xd0/0x560 ? save_stack_trace+0x16/0x20 ? init_object+0x64/0xa0 ? ___slab_alloc+0x1ae/0x5c0 ? ___slab_alloc+0x1ae/0x5c0 ? __alloc_skb+0xd0/0x560 ? sched_clock+0x9/0x10 ? kasan_unpoison_shadow+0x35/0x50 ? kasan_kmalloc+0xad/0xe0 ? __kmalloc_node_track_caller+0x246/0x350 ? __alloc_skb+0xd0/0x560 ? kasan_unpoison_shadow+0x35/0x50 ? memset+0x31/0x40 ? __alloc_skb+0x31f/0x560 ? napi_consume_skb+0x320/0x320 ? br_get_link_af_size_filtered+0xb7/0x120 [bridge] ? if_nlmsg_size+0x440/0x630 rtmsg_ifinfo_build_skb+0x83/0x120 rtmsg_ifinfo.part.25+0x16/0xb0 rtmsg_ifinfo+0x47/0x70 register_netdevice+0xa2b/0xe50 ? __kmalloc+0x171/0x2d0 ? netdev_change_features+0x80/0x80 register_netdev+0x15/0x30 vboxNetAdpOsCreate+0xc0/0x1c0 [vboxnetadp] vboxNetAdpCreate+0x210/0x400 [vboxnetadp] ? vboxNetAdpComposeMACAddress+0x1d0/0x1d0 [vboxnetadp] ? kasan_check_write+0x14/0x20 VBoxNetAdpLinuxIOCtlUnlocked+0x14b/0x280 [vboxnetadp] ? VBoxNetAdpLinuxOpen+0x20/0x20 [vboxnetadp] ? lock_acquire+0x11c/0x270 ? __audit_syscall_entry+0x2fb/0x660 do_vfs_ioctl+0x17f/0xff0 ? __audit_syscall_entry+0x2fb/0x660 ? ioctl_preallocate+0x1d0/0x1d0 ? __audit_syscall_entry+0x2fb/0x660 ? kmem_cache_free+0xb2/0x250 ? syscall_trace_enter+0x537/0xd00 ? exit_to_usermode_loop+0x100/0x100 SyS_ioctl+0x74/0x80 ? do_sys_open+0x350/0x350 ? do_vfs_ioctl+0xff0/0xff0 do_syscall_64+0x182/0x390 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7f7e39a1ae07 RSP: 002b:00007ffc6f04c6d8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffc6f04c730 RCX: 00007f7e39a1ae07 RDX: 00007ffc6f04c730 RSI: 00000000c0207601 RDI: 0000000000000007 RBP: 00007ffc6f04c700 R08: 00007ffc6f04c780 R09: 0000000000000008 R10: 0000000000000541 R11: 0000000000000206 R12: 0000000000000007 R13: 00000000c0207601 R14: 00007ffc6f04c730 R15: 0000000000000012 Object at ffff8801be248008, in cache kmalloc-4096 size: 4096 Allocated: PID = 6734 save_stack_trace+0x16/0x20 save_stack+0x46/0xd0 kasan_kmalloc+0xad/0xe0 __kmalloc+0x171/0x2d0 alloc_netdev_mqs+0x8a7/0xbe0 vboxNetAdpOsCreate+0x65/0x1c0 [vboxnetadp] vboxNetAdpCreate+0x210/0x400 [vboxnetadp] VBoxNetAdpLinuxIOCtlUnlocked+0x14b/0x280 [vboxnetadp] do_vfs_ioctl+0x17f/0xff0 SyS_ioctl+0x74/0x80 do_syscall_64+0x182/0x390 return_from_SYSCALL_64+0x0/0x6a Freed: PID = 5600 save_stack_trace+0x16/0x20 save_stack+0x46/0xd0 kasan_slab_free+0x73/0xc0 kfree+0xe4/0x220 kvfree+0x25/0x30 single_release+0x74/0xb0 __fput+0x265/0x6b0 ____fput+0x9/0x10 task_work_run+0xd5/0x150 exit_to_usermode_loop+0xe2/0x100 do_syscall_64+0x26c/0x390 return_from_SYSCALL_64+0x0/0x6a Memory state around the buggy address: ffff8801be248a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801be248b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801be248b80: 00 00 00 00 00 00 00 00 00 00 00 07 fc fc fc fc ^ ffff8801be248c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801be248c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Signed-off-by: Alban Browaeys Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5614fd84ebe2fb56af51e8eab0524ce4966b67c0 Author: Christos Gkekas Date: Sun Jul 2 23:16:11 2017 +0100 netxen_nic: Remove unused pointer hdr in netxen_setup_minidump() Pointer hdr in netxen_setup_minidump() is set but never used, thus should be removed. Signed-off-by: Christos Gkekas Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 3 --- 1 file changed, 3 deletions(-) commit 4b821cb200b5ca25de3d98eeb39c0ddebf6d69a5 Merge: c1c1d86 4b4c21f Author: David S. Miller Date: Mon Jul 3 02:36:42 2017 -0700 Merge branch 'vxlan-geneve-fix-hlist-corruption' Jiri Benc says: ==================== vxlan, geneve: fix hlist corruption Fix memory corruption introduced with the support of both IPv4 and IPv6 sockets in a single device. The same bug is present in VXLAN and Geneve. ==================== Signed-off-by: Jiri Benc Signed-off-by: David S. Miller commit 4b4c21fad6ae6bd58ff1566f23b0f4f70fdc9a30 Author: Jiri Benc Date: Sun Jul 2 19:00:58 2017 +0200 geneve: fix hlist corruption It's not a good idea to add the same hlist_node to two different hash lists. This leads to various hard to debug memory corruptions. Fixes: 8ed66f0e8235 ("geneve: implement support for IPv6-based tunnels") Cc: John W. Linville Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/geneve.c | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit 69e766612c4bcb79e19cebed9eed61d4222c1d47 Author: Jiri Benc Date: Sun Jul 2 19:00:57 2017 +0200 vxlan: fix hlist corruption It's not a good idea to add the same hlist_node to two different hash lists. This leads to various hard to debug memory corruptions. Fixes: b1be00a6c39f ("vxlan: support both IPv4 and IPv6 sockets in a single vxlan device") Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 32 +++++++++++++++++++++----------- include/net/vxlan.h | 10 +++++++++- 2 files changed, 30 insertions(+), 12 deletions(-) commit c1c1d86bdea45880c1843087d40498127d4293c9 Author: Or Gerlitz Date: Sun Jul 2 18:57:28 2017 +0300 net/mlxfw: Properly handle dependancy with non-loadable mlx5 If mlx5 is set to be built-in and mlxfw as a module, we get a link error: drivers/built-in.o: In function `mlx5_firmware_flash': (.text+0x5aed72): undefined reference to `mlxfw_firmware_flash' Since we don't want to mandate selecting mlxfw for mlx5 users, we use the IS_REACHABLE macro to make sure that a stub is exposed to the caller. Signed-off-by: Or Gerlitz Reported-by: Jakub Kicinski Reported-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2c9c5df6665be7f27381ce5185b830accdb10e7 Author: David S. Miller Date: Mon Jul 3 02:31:22 2017 -0700 iucv: Convert sk_wmem_alloc accesses to refcount_t. Reported-by: kbuild test robot Signed-off-by: David S. Miller net/iucv/af_iucv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bba5850c8b11ce849434434a7f77fb59ac7248e7 Author: David S. Miller Date: Mon Jul 3 02:29:57 2017 -0700 ctcm_fsms: Convert skb->user accesses to refcount_t Reported-by: kbuild test robot Signed-off-by: David S. Miller drivers/s390/net/ctcm_fsms.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 63d7c880c58c257d07fbf909940467905071c6fd Merge: a68491f 6d191ed4 Author: David S. Miller Date: Mon Jul 3 02:22:53 2017 -0700 Merge branch 'bpf-misc-helper-verifier-improvements' Daniel Borkmann says: ==================== Misc BPF helper/verifier improvements Miscellanous improvements I still had in my queue, it adds a new bpf_skb_adjust_room() helper for cls_bpf, exports to fdinfo whether tail call array owner is JITed, so iproute2 error reporting can be improved on that regard, a small cleanup and extension to trace printk, two verifier patches, one to make the code around narrower ctx access a bit more straight forward and one to allow for imm += x operations, that we've seen LLVM generating and the verifier currently rejecting. We've included the patch 6 given it's rather small and we ran into it from LLVM side, it would be great if it could be queued for stable as well after the merge window. Last but not least, test cases are added also related to imm alu improvement. Thanks a lot! ==================== Signed-off-by: David S. Miller commit 6d191ed40d8d84ef0045cd44c75c63770e250f2d Author: Daniel Borkmann Date: Sun Jul 2 02:13:31 2017 +0200 bpf: add various test cases for verifier selftest Add couple of verifier test cases for x|imm += pkt_ptr, including the imm += x extension. Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 165 ++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) commit 43188702b3d98d2792969a3377a30957f05695e6 Author: John Fastabend Date: Sun Jul 2 02:13:30 2017 +0200 bpf, verifier: add additional patterns to evaluate_reg_imm_alu Currently the verifier does not track imm across alu operations when the source register is of unknown type. This adds additional pattern matching to catch this and track imm. We've seen LLVM generating this pattern while working on cilium. Signed-off-by: John Fastabend Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 7bda4b40c5624c3f1c69227f8ebfd46a4b83f2ef Author: John Fastabend Date: Sun Jul 2 02:13:29 2017 +0200 bpf: extend bpf_trace_printk to support %i Currently, bpf_trace_printk does not support common formatting symbol '%i' however vsprintf does and is what eventually gets called by bpf helper. If users are used to '%i' and currently make use of it, then bpf_trace_printk will just return with error without dumping anything to the trace pipe, so just add support for '%i' to the helper. Signed-off-by: John Fastabend Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/trace/bpf_trace.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9780c0ab1a4e64ef6998c4d83f9df5be806a02dc Author: Daniel Borkmann Date: Sun Jul 2 02:13:28 2017 +0200 bpf: export whether tail call has jited owner We do export through fdinfo already whether a prog is JITed or not, given a program load can fail in case of either prog or tail call map has JITed property, but neither both are JITed or not JITed, we can facilitate error reporting in loaders like iproute2 through exporting owner_jited of tail call map. We already do export owner_prog_type through this facility, so parser can pick up both for comparison. Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/syscall.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f96da09473b52c09125cc9bf7d7d4576ae8229e0 Author: Daniel Borkmann Date: Sun Jul 2 02:13:27 2017 +0200 bpf: simplify narrower ctx access This work tries to make the semantics and code around the narrower ctx access a bit easier to follow. Right now everything is done inside the .is_valid_access(). Offset matching is done differently for read/write types, meaning writes don't support narrower access and thus matching only on offsetof(struct foo, bar) is enough whereas for read case that supports narrower access we must check for offsetof(struct foo, bar) + offsetof(struct foo, bar) + sizeof() - 1 for each of the cases. For read cases of individual members that don't support narrower access (like packet pointers or skb->cb[] case which has its own narrow access logic), we check as usual only offsetof(struct foo, bar) like in write case. Then, for the case where narrower access is allowed, we also need to set the aux info for the access. Meaning, ctx_field_size and converted_op_size have to be set. First is the original field size e.g. sizeof() as in above example from the user facing ctx, and latter one is the target size after actual rewrite happened, thus for the kernel facing ctx. Also here we need the range match and we need to keep track changing convert_ctx_access() and converted_op_size from is_valid_access() as both are not at the same location. We can simplify the code a bit: check_ctx_access() becomes simpler in that we only store ctx_field_size as a meta data and later in convert_ctx_accesses() we fetch the target_size right from the location where we do convert. Should the verifier be misconfigured we do reject for BPF_WRITE cases or target_size that are not provided. For the subsystems, we always work on ranges in is_valid_access() and add small helpers for ranges and narrow access, convert_ctx_accesses() sets target_size for the relevant instruction. Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Cc: Yonghong Song Signed-off-by: David S. Miller include/linux/bpf.h | 9 +- include/linux/filter.h | 47 ++++++++++ kernel/bpf/verifier.c | 78 +++++++--------- kernel/trace/bpf_trace.c | 31 +++--- net/core/filter.c | 239 +++++++++++++++++++++-------------------------- 5 files changed, 209 insertions(+), 195 deletions(-) commit 2be7e212d5419a400d051c84ca9fdd083e5aacac Author: Daniel Borkmann Date: Sun Jul 2 02:13:26 2017 +0200 bpf: add bpf_skb_adjust_room helper This work adds a helper that can be used to adjust net room of an skb. The helper is generic and can be further extended in future. Main use case is for having a programmatic way to add/remove room to v4/v6 header options along with cls_bpf on egress and ingress hook of the data path. It reuses most of the infrastructure that we added for the bpf_skb_change_type() helper which can be used in nat64 translations. Similarly, the helper only takes care of adjusting the room so that related data is populated and csum adapted out of the BPF program using it. Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 16 +++++- net/core/filter.c | 126 +++++++++++++++++++++++++++++++++++++++-- tools/include/uapi/linux/bpf.h | 16 +++++- 3 files changed, 151 insertions(+), 7 deletions(-) commit 0daf4349406074fc03e4889ba5e97e6fb5311bab Author: Daniel Borkmann Date: Sun Jul 2 02:13:25 2017 +0200 bpf, net: add skb_mac_header_len helper Add a small skb_mac_header_len() helper similarly as the skb_network_header_len() we have and replace open coded places in BPF's bpf_skb_change_proto() helper. Will also be used in upcoming work. Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/skbuff.h | 5 +++++ net/core/filter.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit ac8d57e5734389da18633d4e8cc030fe10843da7 Author: Peter Feiner Date: Fri Jun 30 17:26:31 2017 -0700 kvm: x86: mmu: allow A/D bits to be disabled in an mmu Adds the plumbing to disable A/D bits in the MMU based on a new role bit, ad_disabled. When A/D is disabled, the MMU operates as though A/D aren't available (i.e., using access tracking faults instead). To avoid SP -> kvm_mmu_page.role.ad_disabled lookups all over the place, A/D disablement is now stored in the SPTE. This state is stored in the SPTE by tweaking the use of SPTE_SPECIAL_MASK for access tracking. Rather than just setting SPTE_SPECIAL_MASK when an access-tracking SPTE is non-present, we now always set SPTE_SPECIAL_MASK for access-tracking SPTEs. Signed-off-by: Peter Feiner [Use role.ad_disabled even for direct (non-shadow) EPT page tables. Add documentation and a few MMU_WARN_ONs. - Paolo] Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/mmu.txt | 4 ++ arch/x86/include/asm/kvm_host.h | 3 +- arch/x86/kvm/mmu.c | 115 ++++++++++++++++++++++++++++---------- arch/x86/kvm/mmutrace.h | 6 +- 4 files changed, 95 insertions(+), 33 deletions(-) commit a68491f895a937778bb25b0795830797239de31f Author: Tore Anderson Date: Sat Jul 1 15:20:02 2017 +0200 net: cdc_mbim: apply "NDP to end" quirk to HP lt4132 The HP lt4132 LTE/HSPA+ 4G Module (03f0:a31d) is a rebranded Huawei ME906s-158 device. It, like the ME906s-158, requires the "NDP to end" quirk for correct operation. Signed-off-by: Tore Anderson Signed-off-by: David S. Miller drivers/net/usb/cdc_mbim.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 75674c4cbb03a8b6ed7ef1f72b9e9aecc0bfd9dc Author: Matteo Croce Date: Fri Jun 30 18:21:47 2017 +0200 Documentation: fix wrong example command In the IPVLAN documentation there is an example command line where the master and slave interface names are inverted. Fix the command line and also add the optional `name' keyword to better describe what the command is doing. v2: added commit message Signed-off-by: Matteo Croce Signed-off-by: David S. Miller Documentation/networking/ipvlan.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 889ce937c98f1f969137a8a2ee78627c1537d4b3 Author: Sabrina Dubroca Date: Fri Jun 30 15:50:00 2017 +0200 vxlan: correctly set vxlan->net when creating the device in a netns Commit a985343ba906 ("vxlan: refactor verification and application of configuration") modified vxlan device creation, and replaced the assignment of vxlan->net to src_net with dev_net(netdev) in ->setup(). But dev_net(netdev) is not the same as src_net. At the time ->setup() is called, dev_net hasn't been set yet, so we end up creating the socket for the vxlan device in init_net. Fix this by bringing back the assignment of vxlan->net during device creation. Fixes: a985343ba906 ("vxlan: refactor verification and application of configuration") Signed-off-by: Sabrina Dubroca Reviewed-by: Matthias Schiffer Signed-off-by: David S. Miller drivers/net/vxlan.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 737bcff5faaeea121ccf7c5885507d438c60f06b Author: Arvind Yadav Date: Tue Jun 6 16:08:31 2017 +0530 watchdog: davinci: Add missing clk_disable_unprepare(). davinci_wdt_probe() can fail here and we must disable clock. Signed-off-by: Arvind Yadav Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/davinci_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8f11eb58ad5747bab622910cc2efaa45e6a21c1f Author: Arvind Yadav Date: Tue Jun 6 15:47:53 2017 +0530 watchdog: davinci: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/davinci_wdt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 65360944c19814a6d3c0a58c5a983f7198d29c51 Author: Arvind Yadav Date: Wed Jun 7 15:04:15 2017 +0530 watchdog: meson: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/meson_gxbb_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c3b99db809220f0f0dd81d9c92c426b9ffba9735 Merge: 6992c6c 67cd9a99 Author: David S. Miller Date: Mon Jul 3 02:01:16 2017 -0700 Merge branch 'hns-phy-loopback' Lin Yun Sheng says: ==================== Add loopback support in phy_driver and hns ethtool fix This Patch Set add set_loopback in phy_driver and use it to setup loopback when doing ethtool phy self_test. Patch V8: Respin the Patch based on net-next Patch V7: 1. Add comment why resume the phy in hns_nic_config_phy_loopback. 2. Fix a typo error in patch description. Patch V6: Fix Or'ing error code in __lb_setup. Patch V5: Removing non loopback related code change. Patch V4: 1. Remove c45 checking 2. Add -ENOTSUPP when function pointer is null, take mutex in phy_loopback. Patch V3: Calling phy_loopback enable and disable in pair in hns mac driver. Patch V2: 1. Add phy_loopback in phy_device.c. 2. Do error checking and do the read and write once in genphy_loopback. 3. Remove gen10g_loopback in phy_device.c. Patch V1: Initial Submit ==================== Signed-off-by: David S. Miller commit 67cd9a997f1bfb5dedf407ad540232912bd04b10 Author: Lin Yun Sheng Date: Fri Jun 30 17:44:16 2017 +0800 net: hns: Use phy_driver to setup Phy loopback Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.h | 1 + drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 105 ++++++++--------------- 2 files changed, 35 insertions(+), 71 deletions(-) commit f0f9b4ed23381d97cde2ac64248198bc43608e6d Author: Lin Yun Sheng Date: Fri Jun 30 17:44:15 2017 +0800 net: phy: Add phy loopback support in net phy framework This patch add set_loopback in phy_driver, which is used by MAC driver to enable or disable phy loopback. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable loopback. Signed-off-by: Lin Yun Sheng Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 1 + drivers/net/phy/phy_device.c | 51 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/phy.h | 5 +++++ 3 files changed, 57 insertions(+) commit cddda07c7b31828f08c18f5898df0e457d280ada Author: Guenter Roeck Date: Sat Jun 10 21:04:36 2017 -0700 watchdog: it87: Add support for various Super-IO chips Add support for IT8607, IT8622, IT8625, IT8628, IT8655, IT8665, and IT8686. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 7 ++++--- drivers/watchdog/it87_wdt.c | 19 +++++++++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) commit 1123c514b11201758674e2b34f297b94509d81db Author: Guenter Roeck Date: Sat Jun 10 21:04:35 2017 -0700 watchdog: it87: Use infrastructure to stop watchdog on reboot Use watchdog_stop_on_reboot() to stop the watchdog on reboot instead of registering a driver-specific notifier. While at it, reorder remaining include files alphabetically. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/it87_wdt.c | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) commit 893dc8b5c9785e9ecf5ddfebbd78da6eddcdbac6 Author: Guenter Roeck Date: Sat Jun 10 21:04:34 2017 -0700 watchdog: it87: Drop support for resetting watchdog though CIR and Game port Resetting the watchdog timer on CIR interrupts or on game port interrupts is not not supported on recent chips, and doesn't really tell if the system is stable. On top of that, at least the bit to enable resetting the watchdog through the game port is used differently on recent chips. Drop resetting the watchdog on CIR or game port interrupts to simplify the code. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 3 - drivers/watchdog/it87_wdt.c | 226 ++++---------------------------------------- 2 files changed, 19 insertions(+), 210 deletions(-) commit 1d7b80394c48a56c705733cb6c044199ffbf1dfd Author: Guenter Roeck Date: Sat Jun 10 21:04:33 2017 -0700 watchdog: it87: Convert to use watchdog core infrastructure Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 1 + drivers/watchdog/it87_wdt.c | 375 +++++++++----------------------------------- 2 files changed, 72 insertions(+), 304 deletions(-) commit 733403017399f18c1e31db2470b724e2605618b9 Author: Guenter Roeck Date: Sat Jun 10 21:04:32 2017 -0700 watchdog: it87: Drop FSF mailing address The FSF mailing address may change. Drop it. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/it87_wdt.c | 4 ---- 1 file changed, 4 deletions(-) commit 6992c6c5dd4756e665824d4bc29f15b85c2907e0 Author: Stephen Rothwell Date: Fri Jun 30 16:24:35 2017 +1000 net/mlx5: fix memcpy limit? Signed-off-by: Stephen Rothwell Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec8add2a4c9df723c94a863b8fcd6d93c472deed Author: Sabrina Dubroca Date: Thu Jun 29 16:56:54 2017 +0200 ipv6: dad: don't remove dynamic addresses if link is down Currently, when the link for $DEV is down, this command succeeds but the address is removed immediately by DAD (1): ip addr add 1111::12/64 dev $DEV valid_lft 3600 preferred_lft 1800 In the same situation, this will succeed and not remove the address (2): ip addr add 1111::12/64 dev $DEV ip addr change 1111::12/64 dev $DEV valid_lft 3600 preferred_lft 1800 The comment in addrconf_dad_begin() when !IF_READY makes it look like this is the intended behavior, but doesn't explain why: * If the device is not ready: * - keep it tentative if it is a permanent address. * - otherwise, kill it. We clearly cannot prevent userspace from doing (2), but we can make (1) work consistently with (2). addrconf_dad_stop() is only called in two cases: if DAD failed, or to skip DAD when the link is down. In that second case, the fix is to avoid deleting the address, like we already do for permanent addresses. Fixes: 3c21edbd1137 ("[IPV6]: Defer IPv6 device initialization until the link becomes ready.") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller net/ipv6/addrconf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 65a3b6935d920a37820226864eb607467e49ba50 Author: Steffen Trumtrar Date: Mon May 22 10:51:39 2017 +0200 watchdog: dw_wdt: get reset lines from dt The dw_wdt has an external reset line, that can keep the device in reset and therefore rendering it useless and also is the only way of stopping the watchdog once it was started. Get the reset lines for this core from the devicetree. As these lines are optional, use devm_reset_control_get_optional_shared. If the reset line is not specified in the devicetree, the reset framework will just skip deasserting and continue. This way all users of the driver will continue to function without any harm, even if the reset line is not specified in the devicetree. Signed-off-by: Steffen Trumtrar Cc: linux-watchdog@vger.kernel.org Reviewed-by: Philipp Zabel Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/dw_wdt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit d9c033a1343d91fb1c1eebe66823673c60b91915 Author: Steffen Trumtrar Date: Mon May 22 10:51:38 2017 +0200 watchdog: bindings: dw_wdt: add reset lines Document the reset lines holding the watchdog core in reset. Signed-off-by: Steffen Trumtrar Cc: Rob Herring Cc: Mark Rutland Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/dw_wdt.txt | 3 +++ 1 file changed, 3 insertions(+) commit e1069bbfcf3bcf4feb264397f3451184fd66b907 Author: Jim Baxter Date: Wed Jun 28 21:35:29 2017 +0100 net: cdc_ncm: Reduce memory use when kernel memory low The CDC-NCM driver can require large amounts of memory to create skb's and this can be a problem when the memory becomes fragmented. This especially affects embedded systems that have constrained resources but wish to maximise the throughput of CDC-NCM with 16KiB NTB's. The issue is after running for a while the kernel memory can become fragmented and it needs compacting. If the NTB allocation is needed before the memory has been compacted the atomic allocation can fail which can cause increased latency, large re-transmissions or disconnections depending upon the data being transmitted at the time. This situation occurs for less than a second until the kernel has compacted the memory but the failed devices can take a lot longer to recover from the failed TX packets. To ease this temporary situation I modified the CDC-NCM TX path to temporarily switch into a reduced memory mode which allocates an NTB that will fit into a USB_CDC_NCM_NTB_MIN_OUT_SIZE (default 2048 Bytes) sized memory block and only transmit NTB's with a single network frame until the memory situation is resolved. Each time this issue occurs we wait for an increasing number of reduced size allocations before requesting a full size one to not put additional pressure on a low memory system. Once the memory is compacted the CDC-NCM data can resume transmitting at the normal tx_max rate once again. Signed-off-by: Jim Baxter Reviewed-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 54 +++++++++++++++++++++++++++++++++++---------- include/linux/usb/cdc_ncm.h | 3 +++ 2 files changed, 45 insertions(+), 12 deletions(-) commit 2da95be940714f6e75054a81e6484f5349b66f5f Merge: a5192c5 93c4598 Author: David S. Miller Date: Mon Jul 3 01:43:46 2017 -0700 Merge branch 'qed-Add-iWARP-support-for-QL4xxxx' Michal Kalderon says: ==================== qed: Add iWARP support for QL4xxxx This patch series adds iWARP support to our QL4xxxx networking adapters. The code changes span across qed and qedr drivers, but this series contains changes to qed only. Once the series is accepted, the qedr series will be submitted to the rdma tree. There is one additional qed patch which enables the iWARP, this patch is delayed until the qedr series will be accepted. The patches were previously sent as an RFC, and these are the first 12 patches in the RFC series: https://www.spinics.net/lists/linux-rdma/msg51416.html This series was tested and built against net-next. MAINTAINERS file is not updated in this PATCH as there is a pending patch for qedr driver update https://patchwork.kernel.org/patch/9752761. ==================== Signed-off-by: David S. Miller commit 93c45984d385bddf156735991ee0cd15c0753e4d Author: Kalderon, Michal Date: Sun Jul 2 10:29:32 2017 +0300 qed: Add iWARP support for physical queue allocation iWARP has different physical queue requirements than RoCE Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5d7dc9620d35ce1f503e2062aa324447e557e3f2 Author: Kalderon, Michal Date: Sun Jul 2 10:29:31 2017 +0300 qed: Add iWARP protocol support in context allocation When computing how much memory is required for the different hw clients iWARP protocol should be taken into account Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 9816b614346925feac1198e33d2dc5201c4ef74e Author: Kalderon, Michal Date: Sun Jul 2 10:29:30 2017 +0300 qed: iWARP CM add error handling This patch introduces error handling for errors that occurred during connection establishment. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 183 +++++++++++++++++++++++++++- include/linux/qed/qed_rdma_if.h | 9 ++ 2 files changed, 190 insertions(+), 2 deletions(-) commit fc4c6065e661224df3db50780219ac53fee56e2b Author: Kalderon, Michal Date: Sun Jul 2 10:29:29 2017 +0300 qed: iWARP implement disconnect flows This patch takes care of active/passive disconnect flows. Disconnect flows can be initiated remotely, in which case a async event will arrive from peer and indicated to qedr driver. These are referred to as exceptions. When a QP is destroyed, it needs to check that it's associated ep has been closed. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 90 ++++++++++++++++++++++++++++- include/linux/qed/qed_rdma_if.h | 2 + 2 files changed, 91 insertions(+), 1 deletion(-) commit 4b0fdd7c8b757125ac7996617d914bbdb9e0348c Author: Kalderon, Michal Date: Sun Jul 2 10:29:28 2017 +0300 qed: iWARP CM add active side connect This patch implements the active side connect. Offload a connection, process MPA reply and send RTR. In some of the common passive/active functions, the active side will work in blocking mode. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 240 ++++++++++++++++++++++++++-- drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 7 + drivers/net/ethernet/qlogic/qed/qed_rdma.c | 4 + include/linux/qed/qed_rdma_if.h | 26 +++ 4 files changed, 265 insertions(+), 12 deletions(-) commit 456a584947d5b92d5e5a62cc68125ab5f150aa8c Author: Kalderon, Michal Date: Sun Jul 2 10:29:27 2017 +0300 qed: iWARP CM add passive side connect This patch implements the passive side connect. It addresses pre-allocating resources, creating a connection element upon valid SYN packet received. Calling upper layer and implementation of the accept/reject calls. Error handling is not part of this patch. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 2 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 11 + drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 939 +++++++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 62 ++ drivers/net/ethernet/qlogic/qed/qed_l2.c | 13 - drivers/net/ethernet/qlogic/qed/qed_rdma.h | 2 + drivers/net/ethernet/qlogic/qed/qed_sp.h | 2 + include/linux/qed/common_hsi.h | 2 + include/linux/qed/qed_rdma_if.h | 26 +- 9 files changed, 1039 insertions(+), 20 deletions(-) commit 65a91a6cdb868a28b919ca133c0f9d9dfd9a635a Author: Kalderon, Michal Date: Sun Jul 2 10:29:26 2017 +0300 qed: iWARP CM add listener functions and initial SYN processing This patch adds the ability to add and remove listeners and identify whether the SYN packet received is intended for iWARP or not. If a listener is not found the SYN packet is posted back to the chip. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 269 +++++++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 23 +++ drivers/net/ethernet/qlogic/qed/qed_rdma.c | 2 + include/linux/qed/qed_rdma_if.h | 52 ++++++ 4 files changed, 343 insertions(+), 3 deletions(-) commit b5c29ca7dab75f29a7df6e82285742f830d8ed1a Author: Kalderon, Michal Date: Sun Jul 2 10:29:25 2017 +0300 qed: iWARP CM - setup a ll2 connection for handling SYN packets iWARP handles incoming SYN packets using the ll2 interface. This patch implements ll2 setup and teardown. Additional ll2 connections will be used in the future which are not part of this patch series. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 211 +++++++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 12 ++ 2 files changed, 220 insertions(+), 3 deletions(-) commit cc4ad324e7e247bb4979791dd4f2ff11419d9742 Author: Kalderon, Michal Date: Sun Jul 2 10:29:24 2017 +0300 qed: Add iWARP support in ll2 connections Add a new connection type for iWARP ll2 connections for setting correct ll2 filters and connection type to FW. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 13 +++++++++++-- include/linux/qed/qed_ll2_if.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) commit 526d1d05e456c9cfc077694d18b5f521e2338f18 Author: Kalderon, Michal Date: Sun Jul 2 10:29:23 2017 +0300 qed: Rename some ll2 related defines Make some names more generic as they will be used by iWARP too. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 29 ++++++++++++++--------------- include/linux/qed/qed_ll2_if.h | 2 +- 3 files changed, 16 insertions(+), 17 deletions(-) commit 67b40dccc45ff5d488aad17114e80e00029fd854 Author: Kalderon, Michal Date: Sun Jul 2 10:29:22 2017 +0300 qed: Implement iWARP initialization, teardown and qp operations This patch adds iWARP support for flows that have common code between RoCE and iWARP, such as initialization, teardown and qp setup verbs: create, destroy, modify, query. It introduces the iWARP specific files qed_iwarp.[ch] and iwarp_common.h Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/Makefile | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 9 +- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 1 + drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 531 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 85 +++++ drivers/net/ethernet/qlogic/qed/qed_rdma.c | 133 +++++-- drivers/net/ethernet/qlogic/qed/qed_rdma.h | 3 + drivers/net/ethernet/qlogic/qed/qed_roce.c | 20 ++ drivers/net/ethernet/qlogic/qed/qed_sp.h | 5 +- include/linux/qed/iwarp_common.h | 53 +++ include/linux/qed/qed_rdma_if.h | 1 + 11 files changed, 803 insertions(+), 40 deletions(-) commit c851a9dc4359c6b19722de568e9f543c1c23481c Author: Kalderon, Michal Date: Sun Jul 2 10:29:21 2017 +0300 qed: Introduce iWARP personality iWARP personality introduced the need for differentiating in several places in the code whether we are RoCE, iWARP or either. This leads to introducing new macros for querying the personality. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 26 +++++++++++++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 8 ++++---- drivers/net/ethernet/qlogic/qed/qed_dev.c | 12 +++++------- drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 +-- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_main.c | 17 ++++++++--------- include/linux/qed/common_hsi.h | 2 +- 7 files changed, 43 insertions(+), 27 deletions(-) commit dcdca5fed5f6ef2521f927ba3b5cd6b328054be1 Author: Peter Feiner Date: Fri Jun 30 17:26:30 2017 -0700 x86: kvm: mmu: make spte mmio mask more explicit Specify both a mask (i.e., bits to consider) and a value (i.e., pattern of bits that indicates a special PTE) for mmio SPTEs. On Intel, this lets us pack even more information into the (SPTE_SPECIAL_MASK | EPT_VMX_RWX_MASK) mask we use for access tracking liberating all (SPTE_SPECIAL_MASK | (non-misconfigured-RWX)) values. Signed-off-by: Peter Feiner Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 9 ++++++--- arch/x86/kvm/mmu.h | 2 +- arch/x86/kvm/vmx.c | 3 ++- arch/x86/kvm/x86.c | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) commit ce00053b1cfca312c22e2a6465451f1862561eab Author: Peter Feiner Date: Fri Jun 30 17:26:29 2017 -0700 x86: kvm: mmu: dead code thanks to access tracking The MMU always has hardware A bits or access tracking support, thus it's unnecessary to handle the scenario where we have neither. Signed-off-by: Peter Feiner Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) commit 8a53e7e572252e551fd4b172dc207f8beca1ae20 Merge: 00c1475 8b24e69 Author: Paolo Bonzini Date: Mon Jul 3 10:41:59 2017 +0200 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD - Better machine check handling for HV KVM - Ability to support guests with threads=2, 4 or 8 on POWER9 - Fix for a race that could cause delayed recognition of signals - Fix for a bug where POWER9 guests could sleep with interrupts pending. commit 00c14757f6abacd78cad9b2690a0e1f42e4b76c8 Author: Paul Mackerras Date: Fri Jun 30 16:39:55 2017 +1000 KVM: PPC: Book3S: Fix typo in XICS-on-XIVE state saving code This fixes a typo where the wrong loop index was used to index the kvmppc_xive_vcpu.queues[] array in xive_pre_save_scan(). The variable i contains the vcpu number; we need to index queues[] using j, which iterates from 0 to KVMPPC_XIVE_Q_COUNT-1. The effect of this bug is that things that save the interrupt controller state, such as "virsh dump", on a VM with more than 8 vCPUs, result in xive_pre_save_queue() getting called on a bogus queue structure, usually resulting in a crash like this: [ 501.821107] Unable to handle kernel paging request for data at address 0x00000084 [ 501.821212] Faulting instruction address: 0xc008000004c7c6f8 [ 501.821234] Oops: Kernel access of bad area, sig: 11 [#1] [ 501.821305] SMP NR_CPUS=1024 [ 501.821307] NUMA [ 501.821376] PowerNV [ 501.821470] Modules linked in: vhost_net vhost tap xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables ses enclosure scsi_transport_sas ipmi_powernv ipmi_devintf ipmi_msghandler powernv_op_panel kvm_hv nfsd auth_rpcgss oid_registry nfs_acl lockd grace sunrpc kvm tg3 ptp pps_core [ 501.822477] CPU: 3 PID: 3934 Comm: live_migration Not tainted 4.11.0-4.git8caa70f.el7.centos.ppc64le #1 [ 501.822633] task: c0000003f9e3ae80 task.stack: c0000003f9ed4000 [ 501.822745] NIP: c008000004c7c6f8 LR: c008000004c7c628 CTR: 0000000030058018 [ 501.822877] REGS: c0000003f9ed7980 TRAP: 0300 Not tainted (4.11.0-4.git8caa70f.el7.centos.ppc64le) [ 501.823030] MSR: 9000000000009033 [ 501.823047] CR: 28022244 XER: 00000000 [ 501.823203] CFAR: c008000004c7c77c DAR: 0000000000000084 DSISR: 40000000 SOFTE: 1 [ 501.823203] GPR00: c008000004c7c628 c0000003f9ed7c00 c008000004c91450 00000000000000ff [ 501.823203] GPR04: c0000003f5580000 c0000003f559bf98 9000000000009033 0000000000000000 [ 501.823203] GPR08: 0000000000000084 0000000000000000 00000000000001e0 9000000000001003 [ 501.823203] GPR12: c00000000008a7d0 c00000000fdc1b00 000000000a9a0000 0000000000000000 [ 501.823203] GPR16: 00000000402954e8 000000000a9a0000 0000000000000004 0000000000000000 [ 501.823203] GPR20: 0000000000000008 c000000002e8f180 c000000002e8f1e0 0000000000000001 [ 501.823203] GPR24: 0000000000000008 c0000003f5580008 c0000003f4564018 c000000002e8f1e8 [ 501.823203] GPR28: 00003ff6e58bdc28 c0000003f4564000 0000000000000000 0000000000000000 [ 501.825441] NIP [c008000004c7c6f8] xive_get_attr+0x3b8/0x5b0 [kvm] [ 501.825671] LR [c008000004c7c628] xive_get_attr+0x2e8/0x5b0 [kvm] [ 501.825887] Call Trace: [ 501.825991] [c0000003f9ed7c00] [c008000004c7c628] xive_get_attr+0x2e8/0x5b0 [kvm] (unreliable) [ 501.826312] [c0000003f9ed7cd0] [c008000004c62ec4] kvm_device_ioctl_attr+0x64/0xa0 [kvm] [ 501.826581] [c0000003f9ed7d20] [c008000004c62fcc] kvm_device_ioctl+0xcc/0xf0 [kvm] [ 501.826843] [c0000003f9ed7d40] [c000000000350c70] do_vfs_ioctl+0xd0/0x8c0 [ 501.827060] [c0000003f9ed7de0] [c000000000351534] SyS_ioctl+0xd4/0xf0 [ 501.827282] [c0000003f9ed7e30] [c00000000000b8e0] system_call+0x38/0xfc [ 501.827496] Instruction dump: [ 501.827632] 419e0078 3b760008 e9160008 83fb000c 83db0010 80fb0008 2f280000 60000000 [ 501.827901] 60000000 60420000 419a0050 7be91764 <7d284c2c> 552a0ffe 7f8af040 419e003c [ 501.828176] ---[ end trace 2d0529a5bbbbafed ]--- Cc: stable@vger.kernel.org Fixes: 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller") Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_xive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4086d90cffb8f48400d51fbab575fe50458512e3 Author: Maarten Lankhorst Date: Thu Jun 29 13:59:54 2017 +0200 drm/atomic: Add missing drm_atomic_state_clear to atomic_remove_fb All atomic state should be cleared when drm_modeset_backoff() is called, because it drops all locks and the state becomes invalid. The call to drm_atomic_state_clear was missing in atomic_remove_fb, so add the missing call there. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170629115954.26029-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter Fixes: db8f6403e88a ("drm: Convert drm_framebuffer_remove to atomic, v4.") Cc: stable@vger.kernel.org # v4.12-rc1+ drivers/gpu/drm/drm_framebuffer.c | 1 + 1 file changed, 1 insertion(+) commit b4576de87243c32fab50dda9f8eba1e3cf13a7e2 Author: Shih-Yuan Lee (FourDollars) Date: Mon Jul 3 14:13:29 2017 +0800 ALSA: hda/realtek - Fix typo of pincfg for Dell quirk The PIN number for Dell headset mode of ALC3271 is wrong. Fixes: fcc6c877a01f ("ALSA: hda/realtek - Support Dell headset mode for ALC3271") Signed-off-by: Shih-Yuan Lee (FourDollars) Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 413058df4331ce29f9934a5870d582c7e71fe15f Author: Jan Kiszka Date: Wed Jul 27 16:32:20 2016 +0200 serial: exar: Add support for IOT2040 device This implements the setup of RS232 and the switch-over to RS485 or RS422 for the Siemens IOT2040. That uses an EXAR XR17V352 with external logic to switch between the different modes. The external logic is controlled via MPIO pins of the EXAR controller. Only pin 10 can be exported as GPIO on the IOT2040. It is connected to an LED. As the XR17V352 used on the IOT2040 is not equipped with an external EEPROM, it cannot present itself as IOT2040-variant via subvendor/ subdevice IDs. Thus, we have to check via DMI for the target platform. Co-developed with Sascha Weisenberger. Signed-off-by: Sascha Weisenberger Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 129 +++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) commit 380b1e2f3a2f32bfe9c0aa85a68629eb99b043c0 Author: Jan Kiszka Date: Mon May 22 12:43:18 2017 +0200 gpio-exar/8250-exar: Make set of exported GPIOs configurable On the SIMATIC, IOT2040 only a single pin is exportable as GPIO, the rest is required to operate the UART. To allow modeling this case, expand the platform device data structure to specify a (consecutive) pin subset for exporting by the gpio-exar driver. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko drivers/gpio/gpio-exar.c | 56 ++++++++++++++++++++++--------------- drivers/tty/serial/8250/8250_exar.c | 15 ++++++++-- 2 files changed, 45 insertions(+), 26 deletions(-) commit 277036f05be242540b7bfe75f226107d04f51b06 Author: Jan Kiszka Date: Fri Jun 2 07:43:27 2017 +0200 platform: Accept const properties Aligns us with device_add_properties, the function we call. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko drivers/base/platform.c | 2 +- include/linux/platform_device.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0d963ebf57d4c6374b3a33050a18af23c1e2ede1 Author: Jan Kiszka Date: Fri Jun 2 07:27:59 2017 +0200 serial: exar: Factor out platform hooks This prepares the addition of IOT2040 platform support by preparing the needed setup and rs485_config hooks. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) commit 4076cf08ac7673aca7d4dd9ddf18045d08dbc292 Author: Jan Kiszka Date: Sun May 21 11:49:24 2017 +0200 gpio-exar/8250-exar: Rearrange gpiochip parenthood Set the parent of the exar gpiochip to its platform device, like other gpiochips are doing it. In order to keep the relationship discoverable for ACPI systems, set the platform device companion to the PCI device. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij drivers/gpio/gpio-exar.c | 2 +- drivers/tty/serial/8250/8250_exar.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 8847f5f9ef554269d2a06100b311d363b9727da6 Author: Jan Kiszka Date: Tue May 2 08:42:40 2017 +0200 gpio: exar: Fix iomap request The UART driver already maps the resource for us. Trying to do this here only fails and leaves us with a non-working device. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij drivers/gpio/gpio-exar.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit a39f2fe7165647c2cd7bdbebb3d04061035e520f Author: Jan Kiszka Date: Thu May 25 08:25:19 2017 +0200 gpio-exar/8250-exar: Do not even instantiate a GPIO device for Commtech cards Commtech adapters need the MPIOs for internal purposes, and the gpio-exar driver already refused to pick them up. But there is actually no point in even creating the underlying platform device. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Greg Kroah-Hartman drivers/gpio/gpio-exar.c | 3 --- drivers/tty/serial/8250/8250_exar.c | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) commit 6697f1f82fba6d23b278222750ffb2de05abc13e Author: Jan Kiszka Date: Sat May 13 09:29:04 2017 +0200 serial: uapi: Add support for bus termination The Siemens IOT2040 comes with a RS485 interface that allows to enable or disable bus termination via software. Add a bit to the flags field of serial_rs485 that applications can set in order to request this feature from the hardware. This seems generic enough to add it for everyone. Existing driver will simply ignore it when set. Signed-off-by: Sascha Weisenberger Signed-off-by: Jan Kiszka Signed-off-by: Greg Kroah-Hartman include/uapi/linux/serial.h | 3 +++ 1 file changed, 3 insertions(+) commit 9b2970aacfd9aa5d9bad377a554a002b398f882e Author: Christoph Hellwig Date: Thu Jun 29 11:43:21 2017 -0700 xfs: Switch to iomap for SEEK_HOLE / SEEK_DATA Switch to the iomap_seek_hole and iomap_seek_data helpers for implementing lseek SEEK_HOLE / SEEK_DATA, and remove all the code that isn't needed any more. Based on patches from Andreas Gruenbacher . Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 375 ++--------------------------------------------------- fs/xfs/xfs_inode.h | 3 - 2 files changed, 14 insertions(+), 364 deletions(-) commit 0ed3b0d45fd39142e418220f518c8959c1a5f596 Author: Andreas Gruenbacher Date: Thu Jun 29 11:43:21 2017 -0700 vfs: Add iomap_seek_hole and iomap_seek_data helpers Filesystems can use this for implementing lseek SEEK_HOLE / SEEK_DATA support via iomap. Signed-off-by: Andreas Gruenbacher [hch: split functions, coding style cleanups] Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/iomap.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/iomap.h | 4 +++ 2 files changed, 98 insertions(+) commit 334fd34d76f237c0ee58dfc400d2c4e34d660544 Author: Andreas Gruenbacher Date: Thu Jun 29 11:43:20 2017 -0700 vfs: Add page_cache_seek_hole_data helper Both ext4 and xfs implement seeking for the next hole or piece of data in unwritten extents by scanning the page cache, and both versions share the same bug when iterating the buffers of a page: the start offset into the page isn't taken into account, so when a page fits more than two filesystem blocks, things will go wrong. For example, on a filesystem with a block size of 1k, the following command will fail: xfs_io -f -c "falloc 0 4k" \ -c "pwrite 1k 1k" \ -c "pwrite 3k 1k" \ -c "seek -a -r 0" foo In this example, neither lseek(fd, 1024, SEEK_HOLE) nor lseek(fd, 2048, SEEK_DATA) will return the correct result. Introduce a generic vfs helper for seeking in the page cache that gets this right. The next commits will replace the filesystem specific implementations. Signed-off-by: Andreas Gruenbacher [hch: dropped the export] Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/buffer.c | 124 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/buffer_head.h | 2 + 2 files changed, 126 insertions(+) commit 99efdb3e48fb2fa84addb3102946d3eca341192b Author: Sinan Kaya Date: Fri Jun 30 10:43:05 2017 -0400 dmaengine: qcom_hidma: correct API violation for submit Current code is violating the DMA Engine API by putting the submitted requests directly into the HW queue. This causes queued transactions to be started by another thread as soon as the first one finishes. The DMA Engine document clearly states this. "dmaengine_submit() will not start the DMA operation". Move HW queuing of the requests into the issue_pending() routine to comply with API requirements also create a new queued state for temporarily holding the requests. A descriptor goes through these transitions now. free->prepared->queued->active->completed->free as opposed to free->prepared->active->completed->free Signed-off-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma.c | 15 ++++++++++++--- drivers/dma/qcom/hidma.h | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) commit 82474dade7f4c60206609e7274591d159db105bf Author: Stefan Roese Date: Fri Jun 23 11:05:49 2017 +0200 dmaengine: zynqmp_dma: Remove max len check in zynqmp_dma_prep_memcpy Remove check for "len > ZYNQMP_DMA_MAX_TRANS_LEN" as its not needed. If the length is larger, the transfer is split up into multiple parts with the max descriptor length already. Signed-off-by: Stefan Roese Cc: Kedareswara rao Appana Cc: Vinod Koul Signed-off-by: Vinod Koul drivers/dma/xilinx/zynqmp_dma.c | 3 --- 1 file changed, 3 deletions(-) commit c781f85bc1958391e2d305fe6f52c90de0adb92e Merge: 8cd9385 393958d Author: Bjorn Helgaas Date: Sun Jul 2 18:51:10 2017 -0500 Merge branch 'pci/switchtec' into next * pci/switchtec: switchtec: Add device IDs for additional Switchtec products switchtec: Add "running" status flag to fw partition info ioctl commit 8cd93850347bb4487d332d6638a22c7686ae237d Merge: 74da4a01 13cfc73 Author: Bjorn Helgaas Date: Sun Jul 2 18:49:49 2017 -0500 Merge branch 'pci/resource' into next * pci/resource: PCI: Work around poweroff & suspend-to-RAM issue on Macbook Pro 11 PCI: Do not disregard parent resources starting at 0x0 Conflicts: arch/x86/pci/fixup.c commit 74da4a0180fb2091802087764e67ac5e53667217 Merge: 2cf816a ae6dc7d Author: Bjorn Helgaas Date: Sun Jul 2 18:48:50 2017 -0500 Merge branch 'pci/portdrv' into next * pci/portdrv: PCI/portdrv: Allocate MSI/MSI-X vector for Downstream Port Containment PCI/portdrv: Support multiple interrupts for MSI as well as MSI-X commit 2cf816a947e0f729825a1bb73d2eed6255c29f88 Merge: 6a1c1d5 666ff6f Author: Bjorn Helgaas Date: Sun Jul 2 18:48:49 2017 -0500 Merge branch 'pci/pm' into next * pci/pm: PCI/PM: Avoid using device_may_wakeup() for runtime PM x86/PCI: Avoid AMD SB7xx EHCI USB wakeup defect PCI/PM: Restore the status of PCI devices across hibernation drm/radeon: make MacBook Pro d3_delay quirk more generic drm/amdgpu: remove unnecessary save/restore of pdev->d3_delay PCI/PM: Add needs_resume flag to avoid suspend complete optimization PCI: imx6: Fix config read timeout handling switchtec: Fix minor bug with partition ID register switchtec: Use new cdev_device_add() helper function PCI: endpoint: Make PCI_ENDPOINT depend on HAS_DMA commit 6a1c1d553ebf4e4241c0b1e20517a67e36d46c12 Merge: 91bbec6 6f9a22b Author: Bjorn Helgaas Date: Sun Jul 2 18:48:49 2017 -0500 Merge branch 'pci/msi' into next * pci/msi: PCI/MSI: Ignore affinity if pre/post vector count is more than min_vecs commit 91bbec655f488b88281a2377b4e6c213d2d25978 Merge: f9bfecc f5ab3b7 Author: Bjorn Helgaas Date: Sun Jul 2 18:48:48 2017 -0500 Merge branch 'pci/misc' into next * pci/misc: x86/PCI: Simplify Dell DMI B1 quirk PCI: Add domain number check to find_smbios_instance_string() x86/PCI: Fix whitespace in set_bios_x() printk PCI: Correct PCI_STD_RESOURCE_END usage efi/fb: Correct PCI_STD_RESOURCE_END usage MIPS: PCI: Remove unused busn_offset MIPS: Loongson: Remove unused PCI_BAR_COUNT definition commit f9bfeccd6603484563b00462480c9b32f5ae43bd Merge: 397ee43 675734b Author: Bjorn Helgaas Date: Sun Jul 2 18:48:47 2017 -0500 Merge branch 'pci/enumeration' into next * pci/enumeration: PCI: Enable ECRC only if device supports it PCI: Add sysfs max_link_speed/width, current_link_speed/width, etc PCI: Test INTx masking during enumeration, not at run-time commit 397ee434c5bf813db33632957ae50ae3b30226ed Merge: 2ea659a 69a3025 Author: Bjorn Helgaas Date: Sun Jul 2 18:48:47 2017 -0500 Merge branch 'pci/dpc' into next * pci/dpc: PCI/DPC: Fix control register setting PCI/DPC: Skip DPC event if device is not present commit fdc71ce97c13f64ffd0e2c74b6c50da64e1642f8 Author: Arvind Yadav Date: Tue Jun 20 11:17:48 2017 +0530 PCI: xilinx: Make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 195 600 0 795 31b drivers/pci/host/pcie-xilinx.o File size after constify xilinx_pcie_of_match: text data bss dec hex filename 595 184 0 779 30b drivers/pci/host/pcie-xilinx.o Signed-off-by: Arvind Yadav Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a181e1093af59f53eaa33bcd2281a0a2158a7be Author: Bharat Kumar Gogada Date: Fri Apr 14 20:34:32 2017 +0530 PCI: xilinx-nwl: Modify IRQ chip for legacy interrupts - Add spinlock for protecting legacy mask register - Few wifi end points which only support legacy interrupts, performs hardware reset functionalities after disabling interrupts by invoking disable_irq() and then re-enable using enable_irq(), they enable hardware interrupts first and then virtual IRQ line later. - The legacy IRQ line goes low only after DEASSERT_INTx is received. As the legacy IRQ line is high immediately after hardware interrupts are enabled but virq of EP is still in disabled state and EP handler is never executed resulting no DEASSERT_INTx. If dummy IRQ chip is used, interrupts are not masked and system hangs with CPU stall. - Add IRQ chip functions instead of dummy IRQ chip for legacy interrupts. - Legacy interrupts are level sensitive, so using handle_level_irq() is more appropriate as it is masks interrupts until Endpoint handles interrupts and unmasks interrupts after Endpoint handler is executed. - Legacy interrupts are level triggered, virtual IRQ line of EndPoint shows as edge in /proc/interrupts. - Set IRQ flags of virtual IRQ line of EP to level triggered at the time of mapping. Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx-nwl.c | 45 +++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) commit 0cb259c47a4df466d641c1f07ae3eccaa9ba3ccb Author: Jon Derrick Date: Thu Jun 22 09:15:42 2017 -0600 PCI: vmd: Move SRCU cleanup after bus, child device removal Recent __call_srcu() changes have exposed that we need to cleanup SRCU structures after pci_stop_root_bus() calls into vmd_msi_free(). Fixes: 3906b91844d6 ("PCI: vmd: Use SRCU as a local RCU to prevent delaying global RCU") Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Acked-by: Keith Busch Cc: # 4.11 drivers/pci/host/vmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 575a144e7b3006c1b583ccecc4ede8b180d00d0c Author: Bjorn Helgaas Date: Mon Jun 19 15:26:57 2017 -0500 PCI: vmd: Correct comment: VMD domains start at 0x10000, not 0x1000 VMD domains are allocated starting at 0x10000, not 0x1000 as the comment said. Correct the comment and add a reference to the ACPI spec for _SEG. Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch drivers/pci/host/vmd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7d630aaaa27f1eaace8169b68596fd91728d59c9 Author: Bjorn Helgaas Date: Tue Jun 27 17:40:00 2017 -0500 PCI: versatile: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-versatile.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit d7bd554f27c942e6b8b54100b4044f9be1038edf Author: Thierry Reding Date: Thu May 4 22:10:32 2017 +0200 PCI: tegra: Do not allocate MSI target memory The PCI host bridge found on Tegra SoCs doesn't require the MSI target address to be backed by physical system memory. Writes are intercepted within the controller and never make it to the memory pointed to. Since no actual system memory is required, remove the allocation of a single page and hardcode the MSI target address with a special address that maps to the last 4 KiB page within the range that is reserved for system memory and memory-mapped I/O in the FPCI address map. Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas Acked-by: Stephen Warren drivers/pci/host/pci-tegra.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit c016555091119b469fe49d1b1b359f0ae3fc6ed7 Author: Thierry Reding Date: Thu May 4 22:10:31 2017 +0200 PCI: tegra: Support MSI 64-bit addressing The MSI target address can reside beyond the 32-bit boundary on devices with more than 2 GiB of system memory. The PCI host bridge on Tegra can easily support 64-bit addresses, so make sure to pass the upper 32 bits of the target address to endpoints when allocating MSI entries. Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas Acked-by: Stephen Warren drivers/pci/host/pci-tegra.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit c2741cb6eba7ce5f59f0b7475b01ea9054fb69fe Author: Shawn Lin Date: Thu Jun 29 09:22:49 2017 +0800 PCI: rockchip: Use local struct device pointer consistently We have a local "struct device *dev" in rockchip_pcie_probe(). Use it consistently throughout the function. No functional change intended. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 94b1d0896af5bf0249a4e3b049d7d4c3b502493e Author: Arvind Yadav Date: Thu Jun 15 16:41:25 2017 -0500 PCI: rockchip: Check for clk_prepare_enable() errors during resume clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Bjorn Helgaas Reviewed-by: Heiko Stuebner Acked-by: Shawn Lin drivers/pci/host/pcie-rockchip.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit c05221d56982c93f586c8c4ddec958afb71fe9ca Author: Shawn Lin Date: Fri Jun 2 15:42:13 2017 +0800 MAINTAINERS: Remove Wenrui Li as Rockchip PCIe driver maintainer Wenrui Li changed his employer and is no longer able to maintain the Rockchip PCIe driver, so remove his email address from this file. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 45db3b7029a7c33a9ac6faaef50c35bbb8233369 Author: Shawn Lin Date: Tue May 23 14:32:56 2017 -0500 PCI: rockchip: Configure RC's MPS setting The default value of MPS for RC is 128 bytes, but actually it could support 256 bytes. So this patch fixes this issue. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 09cac05097535015f0a0d64c051f17fd8c65c6bb Author: Shawn Lin Date: Thu May 4 10:24:51 2017 +0800 PCI: rockchip: Reconfigure configuration space header type Per PCIe base specification (Revision 3.1a), section 7.5.3, type 1 configuration space header should be used when accessing PCIe switch. So we need to reconfigure the header according to the bus number we are accessing. Otherwise we could not visit the buses behind the switch. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5667e655e1c77e0dec3f146a0d2484818583a800 Author: Shawn Lin Date: Thu May 4 10:24:50 2017 +0800 PCI: rockchip: Split out rockchip_pcie_cfg_configuration_accesses() We need to reconfigure the header type later, so split out a new function. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 3166ba040c02db133f022589aeb81bd05c55ec74 Author: Shawn Lin Date: Thu May 4 10:24:49 2017 +0800 PCI: rockchip: Move configuration accesses into rockchip_pcie_cfg_atu() Configuration accesses is also part of ATU settings, so let's keep all of them inside rockchip_pcie_cfg_atu(). Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 7a1d3b8cb22cc9c4b5d4b5edf03095d466299700 Author: Shawn Lin Date: Thu May 4 10:24:48 2017 +0800 PCI: rockchip: Rename rockchip_cfg_atu() to rockchip_pcie_cfg_atu() Rename rockchip_cfg_atu() to keep the name consistent with other functions in pcie-rockchip.c. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e47ced77837153bdc962bf6f988c5da51a438568 Author: Shawn Lin Date: Tue May 2 15:31:23 2017 +0800 PCI: rockchip: Control vpcie0v9 for system PM vpcie0v9 is used for PHY, so we could disable it as we don't need PHY to work then in S3 if folks assign it DT. But we should note that there is a side effect that we could not support beacon wakeup if we disable vpcie0v9 for aggressive power-saving. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Cc: Brian Norris Cc: Jeffy Chen drivers/pci/host/pcie-rockchip.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bf44167f37a12bd353ed10fa706691d3f6e4b1a0 Author: Arvind Yadav Date: Fri Jun 23 14:59:52 2017 +0530 PCI: rcar-gen2: Make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman Acked-by: Geert Uytterhoeven drivers/pci/host/pci-rcar-gen2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8d992d8f8d4bf6051e7b9df86ffe21d8a78a472 Author: Wolfram Sang Date: Sun May 28 11:30:48 2017 +0200 PCI: rcar: Use proper name for the R-Car SoC It is 'R-Car', not 'RCar'. No code or binding changes, only descriptive text. Signed-off-by: Wolfram Sang Signed-off-by: Bjorn Helgaas Acked-by: Geert Uytterhoeven Acked-by: Simon Horman Documentation/devicetree/bindings/pci/rcar-pci.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8f2a856560361753a6ac846977e4c1e21bf64f7 Author: Srinivas Kandagatla Date: Thu Jun 29 17:34:55 2017 +0200 PCI: qcom: Limit TLP size to 2K to work around hardware issue Limit TLP size to 2K to work around a hardware bug in the v0 version of PCIe IP. When using default TLP size of 4K, the internal buffer gets corrupted due to this hardware bug. This bug was originally noticed during ssh session between APQ8064-based board and PC. Network packets got corrupted randomly and terminated the ssh session due to this bug. Signed-off-by: Srinivas Kandagatla Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-qcom.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7a5966eb9123d9e335c0ea04f0fbb0c71e418186 Author: Colin Ian King Date: Wed May 31 06:34:14 2017 +0100 PCI: qcom: Fix spelling mistake: "asser" -> "assert" Trivial fix to spelling mistake in dev_err message. Signed-off-by: Colin Ian King Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d0f1b84c5265f129029885e768a2f451f48bcc2 Author: Bjorn Helgaas Date: Wed May 24 15:19:36 2017 -0500 PCI: qcom: Reorder to put v0 functions together, v1 functions together, etc Previously the v0, v1, and v2 functions were not grouped together in a consistent order. Reorder them to make them consistent. Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-qcom.c | 122 ++++++++++++++++++++++---------------------- 1 file changed, 61 insertions(+), 61 deletions(-) commit 90d52d57ccace5cd590ae642765b510240986546 Author: John Crispin Date: Tue May 23 15:02:28 2017 -0500 PCI: qcom: Add support for IPQ4019 PCIe controller Add support for the IPQ4019 PCIe controller. IPQ4019 supports Gen 1/2, one lane, one PCIe root complex with support for MSI and legacy interrupts, and it conforms to PCI Express Base 2.1 specification. The core init is the same as for the MSM8996, however the clocks and reset lines differ. [bhelgaas: fix qcom_pcie_get_resources_v3(), qcom_pcie_init_v3() compile issues] Signed-off-by: John Crispin Signed-off-by: Bjorn Helgaas Acked-by: Stanimir Varbanov Acked-by: Rob Herring # binding .../devicetree/bindings/pci/qcom,pcie.txt | 20 +- drivers/pci/dwc/pcie-qcom.c | 306 +++++++++++++++++++++ 2 files changed, 325 insertions(+), 1 deletion(-) commit 637cfacae96fa6d4166866a7fd2f97af681e6e0d Author: Ryder Lee Date: Sun May 21 11:42:24 2017 +0800 PCI: mediatek: Add MediaTek PCIe host controller support Add support for the MediaTek PCIe Gen2 controller which can be found on MT7623 series SoCs. [bhelgaas: fold in mtk_pcie_parse_and_add_res() bugfix from http://lkml.kernel.org/r/1496644078-27122-1-git-send-email-ryder.lee@mediatek.com] [bhelgaas: fold in MAINTAINERS update from http://lkml.kernel.org/r/1497588789-28607-1-git-send-email-ryder.lee@mediatek.com] [bhelgaas: fold in pci_scan_root_bus_bridge() update and leak fix from http://lkml.kernel.org/r/1498555451-55073-2-git-send-email-ryder.lee@mediatek.com] [bhelgaas: fold in powerup fixes from http://lkml.kernel.org/r/1497866400-41844-2-git-send-email-ryder.lee@mediatek.com] [bhelgaas: fold in poweroff when link down fixes from http://lkml.kernel.org/r/1497866400-41844-3-git-send-email-ryder.lee@mediatek.com] [bhelgaas: fold in optional property fixes from http://lkml.kernel.org/r/1497866400-41844-4-git-send-email-ryder.lee@mediatek.com] [bhelgaas: set host->map_irq and host->swizzle_irq and drop pci_fixup_irqs(), remove unnecessary "return", rename mtk_pcie_link_is_up() to mtk_pcie_link_up() for consistency, add local struct device pointer] [bhelgaas: fold in pci_add_flags() removal from http://lkml.kernel.org/r/1499061300-55951-1-git-send-email-ryder.lee@mediatek.com] Signed-off-by: Ryder Lee Signed-off-by: Bjorn Helgaas MAINTAINERS | 8 + drivers/pci/host/Kconfig | 11 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pcie-mediatek.c | 554 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 574 insertions(+) commit fc5165db245ac4b56c19e634592a144352817c6d Author: Xiaowei Song Date: Mon Jun 19 18:23:48 2017 +0800 PCI: kirin: Add HiSilicon Kirin SoC PCIe controller driver Hisilicon PCIe driver shares the common functions for PCIe dw-host. The poweron functions are developed on hi3660 SoC, while other functions are common for Kirin series SoCs. Low power mode (L1 sub-state and Suspend/Resume), hotplug and MSI feature are not supported currently. Signed-off-by: Xiaowei Song [bhelgaas: fold in MAINTAINERS update from http://lkml.kernel.org/r/20170704021516.96575-1-songxiaowei@hisilicon.com] Signed-off-by: Bjorn Helgaas Reviewed-by: Jingoo Han Cc: Guodong Xu MAINTAINERS | 8 + drivers/pci/dwc/Kconfig | 10 + drivers/pci/dwc/Makefile | 1 + drivers/pci/dwc/pcie-kirin.c | 517 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 536 insertions(+) commit c26ebe98a103479dae9284fe0a86a95af4a5cd46 Author: Quentin Schulz Date: Thu Jun 8 10:07:42 2017 +0200 PCI: imx6: Add regulator support Some boards might require to control a regulator to power the PCIe port. Add support for an optional regulator defined in Device Tree linked in the PCIe controller under `vpcie-supply`. If present, the regulator will be disabled and then enabled as part of the PCIe host initialization process and will be disabled when shutting down. Signed-off-by: Quentin Schulz [bhelgaas: use dev_err() instead of pr_err() in imx6_pcie_assert_core_reset()] Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Acked-by: Richard Zhu .../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 4 +++ drivers/pci/dwc/pci-imx6.c | 37 +++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) commit 7dcf90e9e032432e91ce77dd872d2227e9d5b741 Author: Jork Loeser Date: Wed May 24 13:41:28 2017 -0700 PCI: hv: Use vPCI protocol version 1.2 Update the Hyper-V vPCI driver to use the Server-2016 version of the vPCI protocol, fixing MSI creation and retargeting issues. Signed-off-by: Jork Loeser Signed-off-by: Bjorn Helgaas Reviewed-by: K. Y. Srinivasan Acked-by: K. Y. Srinivasan arch/x86/include/uapi/asm/hyperv.h | 6 + drivers/pci/host/pci-hyperv.c | 300 ++++++++++++++++++++++++++++++------- 2 files changed, 252 insertions(+), 54 deletions(-) commit b1db7e7e1d70035cbd0a7be32006af7714737157 Author: Jork Loeser Date: Wed May 24 13:41:27 2017 -0700 PCI: hv: Add vPCI version protocol negotiation Hyper-V vPCI offers different protocol versions. Add the infra for negotiating the one to use. Signed-off-by: Jork Loeser Signed-off-by: Bjorn Helgaas Reviewed-by: K. Y. Srinivasan Acked-by: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 72 +++++++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 19 deletions(-) commit 02c3764c776c7f1ff036ce3ff0c0bb4b1094fa0b Author: Jork Loeser Date: Wed May 24 13:41:26 2017 -0700 PCI: hv: Temporary own CPU-number-to-vCPU-number infra To ease parallel effort to centralize CPU-number-to-vCPU-number conversion, temporarily stand up own version, file-local hv_tmp_cpu_nr_to_vp_nr(). Once the changes have merged, this work-around can be removed, and the calls replaced with hv_cpu_number_to_vp_number(). Signed-off-by: Jork Loeser Signed-off-by: Bjorn Helgaas Reviewed-by: K. Y. Srinivasan Acked-by: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 52 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) commit be66b673659116930f2da2f41ec79c9d1279cd8f Author: Jork Loeser Date: Wed May 24 13:41:25 2017 -0700 PCI: hv: Use page allocation for hbus structure The hv_pcibus_device structure contains an in-memory hypercall argument that must not cross a page boundary. Allocate the structure as a page to ensure that. Signed-off-by: Jork Loeser Signed-off-by: Bjorn Helgaas Reviewed-by: K. Y. Srinivasan Acked-by: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 691ac1dc5840ff0faeec82ea6e94d6b7bc187ac9 Author: Jork Loeser Date: Wed May 24 13:41:24 2017 -0700 PCI: hv: Fix comment formatting and use proper integer fields Fix comment formatting and use proper integer fields. Signed-off-by: Jork Loeser Signed-off-by: Bjorn Helgaas Reviewed-by: K. Y. Srinivasan Acked-by: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2eeb02b28579fc317504a691f3acb0b9bf94b42b Author: Linus Walleij Date: Mon May 15 19:23:24 2017 +0200 PCI: faraday: Add clock handling Add some optional clock handling to the Faraday FTPCI100. We just get and prepare+enable the clocks right now, if they exist. We can add more elaborate clock handling later. Signed-off-by: Linus Walleij [bhelgaas: folded in "Make clocks compulsory" fix from http://lkml.kernel.org/r/20170621085730.28804-1-linus.walleij@linaro.org Also folded in the clock max/cur speed fixes from http://lkml.kernel.org/r/20170621162651.25315-1-linus.walleij@linaro.org] Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-ftpci100.c | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit d1ef28900d6607ea7a25c39a3bd1ce152f6ab24a Author: Linus Walleij Date: Mon May 15 19:23:12 2017 +0200 PCI: faraday: Add clock bindings The Faraday FTPCI100 controller has two clock ports, PCLK and PCICLK. Add bindings for these two clocks so we can assign them in the device tree. Signed-off-by: Linus Walleij Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Documentation/devicetree/bindings/pci/faraday,ftpci100.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 40aa52c46288ebe37117bea84b1da8edb38e8604 Author: Arvind Yadav Date: Mon Jun 19 15:21:36 2017 +0530 PCI: dwc: dra7xx: Use RW1C for IRQSTATUS_MSI and IRQSTATUS_MAIN Previously, we tried to clear interrupt requests by clearing bits in the PCIECTRL_DRA7XX_CONF_IRQSTATUS_MSI and PCIECTRL_DRA7XX_CONF_IRQSTATUS_MAIN registers. But per the TRM, these fields are RW1C, so we must *set* bits to clear the interrupt bits. Fixes: 47ff3de911a7 ("PCI: dra7xx: Add TI DRA7xx PCIe driver") Signed-off-by: Arvind Yadav [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/pci/dwc/pci-dra7xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 27fce382a809064c0e23154433ce56ec2124dafa Author: Peter Robinson Date: Mon May 15 13:26:17 2017 +0100 PCI: dwc: dra7xx: Depend on appropriate SoC or compile test The PCI controller attached to a SoC isn't much use if the core SoC isn't enabled, unless of course it's compile testing, so add appropriate dependency. Signed-off-by: Peter Robinson Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/pci/dwc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4ab2e7c0df6b8bbc6c8ea1617b737d33c2510012 Author: Jisheng Zhang Date: Mon Jun 5 16:53:46 2017 +0800 PCI: dwc: Constify dw_pcie_host_ops structures The dw_pcie_host_ops structures are never modified. Constify these structures such that these can be write-protected. Signed-off-by: Jisheng Zhang Signed-off-by: Bjorn Helgaas Acked-by: Jingoo Han Acked-by: Kishon Vijay Abraham I drivers/pci/dwc/pci-dra7xx.c | 2 +- drivers/pci/dwc/pci-exynos.c | 2 +- drivers/pci/dwc/pci-imx6.c | 2 +- drivers/pci/dwc/pci-keystone.c | 2 +- drivers/pci/dwc/pci-layerscape.c | 6 +++--- drivers/pci/dwc/pcie-armada8k.c | 2 +- drivers/pci/dwc/pcie-artpec6.c | 2 +- drivers/pci/dwc/pcie-designware-plat.c | 2 +- drivers/pci/dwc/pcie-designware.h | 2 +- drivers/pci/dwc/pcie-qcom.c | 2 +- drivers/pci/dwc/pcie-spear13xx.c | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) commit 3eefa790c9681a2dcbc923542dcd85b6989e8855 Author: Jisheng Zhang Date: Thu Apr 20 18:27:18 2017 +0800 PCI: host: Mark PCIe/PCI (MSI) cascade ISR as IRQF_NO_THREAD Similar as commit 8ff0ef996ca0 ("PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD"), we should mark PCIe/PCI (MSI) IRQ cascade handlers in designware, qcom, and vmd as IRQF_NO_THREAD explicitly. Signed-off-by: Jisheng Zhang Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch # vmd Acked-by: Jingoo Han # pcie-designware-plat.c drivers/pci/dwc/pcie-designware-plat.c | 3 ++- drivers/pci/dwc/pcie-qcom.c | 3 ++- drivers/pci/host/vmd.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit c4e6fff1ae5729c2af159008b13fca39fbbac70e Author: Cao jin Date: Fri Jun 30 10:45:43 2017 +0800 kbuild: improve comments on KBUILD_SRC Original comments is confusing on "OBJ directory", make it clear. Bonus: move comments close to what it wants to comment. Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9e6e0d5f2a2713402cf9dce69b9f9b516e4185d2 Author: Bjørn Forsman Date: Sat Jun 24 16:48:10 2017 +0200 kbuild: create deterministic initramfs directory listings kbuild runs "find" on each entry in CONFIG_INITRAMFS_SOURCE that is a directory. The order of the file listing output by "find" matter for build reproducability, hence this patch applies "sort" to get deterministic results. Without this patch, two different machines with identical initramfs directory input may produce differing initramfs cpio archives (different hash) due to the different order of the files within the archive. Signed-off-by: Bjørn Forsman Signed-off-by: Masahiro Yamada scripts/gen_initramfs_list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5192c52377e6d283abb5dcd5d25d65bf2316f62 Author: Lawrence Brakmo Date: Sun Jul 2 09:14:28 2017 -0700 bpf: fix to bpf_setsockops Fixed build error due to misplaced "#ifdef CONFIG_INET" (moved 1 statement up). Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller net/core/filter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 769b461fc0c0451bacf75826d5830fc07c5a57e4 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:12 2017 -0500 arm64: PCI: Drop DT IRQ allocation from pcibios_alloc_irq() With the introduction of struct pci_host_bridge.map_irq pointer it is possible to assign IRQs for all devices originating from a PCI host bridge at probe time; this is implemented through pci_assign_irq() that relies on the struct pci_host_bridge.map_irq pointer to map IRQ for a given device. The benefits this brings are twofold: - the IRQ for a device is assigned once at probe time - the IRQ assignment works also for hotplugged devices With all DT based PCI host bridges converted to the struct pci_host_bridge.{map/swizzle}_irq hooks mechanism the DT IRQ allocation in ARM64 pcibios_alloc_irq() is now redundant and can be removed. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Will Deacon arch/arm64/kernel/pci.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1ee4d93d5037c9247a81431b563b03e436e3f7b6 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:11 2017 -0500 PCI: xilinx-nwl: Move to struct pci_host_bridge IRQ mapping functions struct pci_host_bridge gained hooks to map/swizzle IRQs, so that the IRQ mapping can be done automatically by PCI core code through the pci_assign_irq() function instead of resorting to arch-specific implementation callbacks to carry out the same task which force PCI host bridge drivers implementation to implement per-arch kludges to carry out a task that is inherently architecture agnostic. Add map/swizzle IRQs hooks to the xilinx-nwl PCI host driver to move the IRQ allocation into core code and stop relying on arch-specific callbacks. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Bharat Kumar Gogada drivers/pci/host/pcie-xilinx-nwl.c | 2 ++ 1 file changed, 2 insertions(+) commit 5a3dc3c1f6944b295745e9196135f3dc6508b96b Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:11 2017 -0500 PCI: rockchip: Move to struct pci_host_bridge IRQ mapping functions struct pci_host_bridge gained hooks to map/swizzle IRQs, so that the IRQ mapping can be done automatically by PCI core code through the pci_assign_irq() function instead of resorting to arch-specific implementation callbacks to carry out the same task which force PCI host bridge drivers implementation to implement per-arch kludges to carry out a task that is inherently architecture agnostic. Add map/swizzle IRQs hooks to the rockchip PCI host driver to move the IRQ allocation into core code and stop relying on arch-specific callbacks. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Wenrui Li Cc: Shawn Lin drivers/pci/host/pcie-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) commit c62e98bdaa701fa1044b38d118d85950bda8eb85 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:10 2017 -0500 PCI: xgene: Move to struct pci_host_bridge IRQ mapping functions struct pci_host_bridge gained hooks to map/swizzle IRQs, so that the IRQ mapping can be done automatically by PCI core code through the pci_assign_irq() function instead of resorting to arch-specific implementation callbacks to carry out the same task which force PCI host bridge drivers implementation to implement per-arch kludges to carry out a task that is inherently architecture agnostic. Add map/swizzle IRQs hooks to the xgene PCI host driver to move the IRQ allocation into core code and stop relying on arch-specific callbacks. Tested-by: Khuong Dinh # with e1000e Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Tanmay Inamdar drivers/pci/host/pci-xgene.c | 2 ++ 1 file changed, 2 insertions(+) commit 6ab380957838db3ac4606e1e338a41c13243e97a Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:10 2017 -0500 PCI: altera: Drop pci_fixup_irqs() Since, through struct pci_host_bridge.map/swizzle_irq hooks, IRQs are now allocated in the pci_assign_irq() callback automatically, PCI host bridge drivers can stop relying on pci_fixup_irqs() for IRQ allocation. Drop pci_fixup_irqs() usage from PCI altera host bridge driver. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Ley Foon Tan drivers/pci/host/pcie-altera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf60374de8f6e9bfe42bcdf959bd474984a82ea1 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:09 2017 -0500 PCI: versatile: Drop pci_fixup_irqs() Since, through struct pci_host_bridge.map/swizzle_irq hooks, IRQs are now allocated in the pci_assign_irq() callback automatically, PCI host bridge drivers can stop relying on pci_fixup_irqs() for IRQ allocation. Drop pci_fixup_irqs() usage from PCI versatile host bridge driver. Signed-off-by: Lorenzo Pieralisi [bhelgaas: folded in typo fix from Arnd Bergmann : http://lkml.kernel.org/r/20170621215323.3921382-4-arnd@arndb.de] Signed-off-by: Bjorn Helgaas Cc: Rob Herring drivers/pci/host/pci-versatile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6982a068aa5f1681371eaf3385ecb193d0fdc2d4 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:09 2017 -0500 PCI: generic: Drop pci_fixup_irqs() Since, through struct pci_host_bridge.map/swizzle_irq hooks, IRQs are now allocated in the pci_assign_irq() callback automatically, PCI host bridge drivers can stop relying on pci_fixup_irqs() for IRQ allocation. Drop pci_fixup_irqs() usage from PCI host-common bridge driver. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Will Deacon drivers/pci/host/pci-host-common.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f7c2e69b65fe657e0a32d8db761525cc6109720b Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:08 2017 -0500 PCI: faraday: Drop pci_fixup_irqs() Since, through struct pci_host_bridge.map/swizzle_irq hooks, IRQs are now allocated in the pci_assign_irq() callback automatically, PCI host bridge drivers can stop relying on pci_fixup_irqs() for IRQ allocation. Drop pci_fixup_irqs() usage from PCI ftpci100 host bridge driver. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Linus Walleij drivers/pci/host/pci-ftpci100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 60eca198b1ea24a64979147bb612dcd1881e1978 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:07 2017 -0500 PCI: designware: Drop pci_fixup_irqs() Since, through struct pci_host_bridge.map/swizzle_irq hooks, IRQs are now allocated in the pci_assign_irq() callback automatically, PCI host bridge drivers can stop relying on pci_fixup_irqs() for IRQ allocation. Drop pci_fixup_irqs() usage from PCI designware host bridge driver. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Jingoo Han Cc: Joao Pinto drivers/pci/dwc/pcie-designware-host.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 64bcd00a7ef54d3d55d7eaa8b058e5125d215129 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:07 2017 -0500 PCI: iproc: Drop pci_fixup_irqs() Since, through struct pci_host_bridge.map/swizzle_irq hooks, IRQs are now allocated in the pci_assign_irq() callback automatically, PCI host bridge drivers can stop relying on pci_fixup_irqs() for IRQ allocation. Drop pci_fixup_irqs() usage from PCI iproc host bridge driver. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Scott Branden Cc: Ray Jui Cc: Jon Mason drivers/pci/host/pcie-iproc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 29db991902ece287e7baa3c52de3912659b79a47 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:06 2017 -0500 PCI: rcar: Drop pci_fixup_irqs() Since, through struct pci_host_bridge.map/swizzle_irq hooks, IRQs are now allocated in the pci_assign_irq() callback automatically, PCI host bridge drivers can stop relying on pci_fixup_irqs() for IRQ allocation. Drop pci_fixup_irqs() usage from PCI rcar host bridge driver. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Simon Horman drivers/pci/host/pcie-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cc2eaaef63df7ba34fb3906a395beec02fba9279 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:06 2017 -0500 PCI: xilinx: Drop pci_fixup_irqs() Since, through struct pci_host_bridge.map/swizzle_irq hooks, IRQs are now allocated in the pci_assign_irq() callback automatically, PCI host bridge drivers can stop relying on pci_fixup_irqs() for IRQ allocation. Drop pci_fixup_irqs() usage from PCI xilinx host bridge driver. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Michal Simek drivers/pci/host/pcie-xilinx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dd5fcce2a7f9b9fd1604aaf901ccbf2ccd1f3108 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:05 2017 -0500 PCI: tegra: Drop pci_fixup_irqs() Since, through struct pci_host_bridge.map/swizzle_irq hooks, IRQs are now allocated in the pci_assign_irq() callback automatically, PCI host bridge drivers can stop relying on pci_fixup_irqs() for IRQ allocation Drop pci_fixup_irqs() usage from PCI tegra host bridge driver. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Thierry Reding drivers/pci/host/pci-tegra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1955880b2ca6b81739c0550f92c639705ec6b327 Author: Steve French Date: Wed Jun 21 16:50:20 2017 -0500 SMB3: Enable encryption for SMB3.1.1 We were missing a capability flag for SMB3.1.1 Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16508469c0f3198a63923aaec08efa1c63f5fbcc Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:04 2017 -0500 ARM/PCI: Remove pci_fixup_irqs() call for bios32 host controllers Legacy PCI host controllers (ie host controllers that set-up the PCI bus through the ARM pci_common_init() API) are currently relying on pci_fixup_irqs() to assign legacy PCI irqs to devices. This is not ideal in that pci_fixup_irqs() assigns IRQs for all PCI devices present in a given system some of which may well be enabled by the time pci_fixup_irqs() is called (ie a system with multiple host controllers). With the introduction of struct pci_host_bridge.(*map_irq) pointer it is possible to assign IRQs for all devices originating from a PCI host bridge at probe time; this is implemented through pci_assign_irq() that relies on the struct pci_host_bridge.map_irq pointer to map IRQ for a given device. The benefits this brings are twofold: - the IRQ for a device is assigned once at probe time - the IRQ assignment works also for hotplugged devices Remove pci_fixup_irqs() call from bios32 code and rely on pci_assign_irq() to carry out the IRQ mapping at device probe time. The map_irq() and swizzle_irq() struct pci_host_bridge callbacks are set-up in the struct pci_host_bridge created in the bios32 pcibios_init_hw() function and mach-* code paths (for PCI mach implementations that require a specific struct hw_pci.(*scan) function callback). Signed-off-by: Lorenzo Pieralisi [bhelgaas: folded in fixes from Lorenzo: http://lkml.kernel.org/r/20170701140629.GC8977@red-moon] Signed-off-by: Bjorn Helgaas Cc: Jason Cooper Cc: Russell King Cc: Andrew Lunn arch/arm/kernel/bios32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 30fdfb929e82450bbf3d0e0aba56efbc29b52b52 Author: Matthew Minter Date: Wed Jun 28 15:14:04 2017 -0500 PCI: Add a call to pci_assign_irq() in pci_device_probe() The pci_assign_irq() function allows assignment of an IRQ to devices during device enable time rather than only at boot. Therefore call it in the pci_device_probe() function during the enable device code path so this assignment can be performed. This patch will do nothing on arches which do not set the IRQ mapping function pointers and is therefore currently a nop, however as support for these function pointers is added to arch-specific code this will cause IRQ assignment to migrate to device enable time allowing the new code paths to be used. Signed-off-by: Matthew Minter [lorenzo.pieralisi@arm.com: moved pci_assign_irq() call site] Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas drivers/pci/pci-driver.c | 2 ++ 1 file changed, 2 insertions(+) commit 716fb31148e9ce78f7c96c1f81a32f52140bcd98 Author: Matthew Minter Date: Wed Jun 28 15:14:03 2017 -0500 OF/PCI: Update of_irq_parse_and_map_pci() comment With the introduction of struct pci_host_bridge.(*map_irq) function pointer add another direct usage of of_irq_parse_and_map_pci(). Update the function comment to reflect this behaviour. Signed-off-by: Matthew Minter Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas drivers/of/of_pci_irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 47a650f2795b00297a5a3eab7aaa46bdb2bbe304 Author: Matthew Minter Date: Wed Jun 28 15:14:02 2017 -0500 PCI: Add pci_assign_irq() function and have pci_fixup_irqs() use it Here we delete the static pdev_fixup_irq() function which is currently what pci_fixup_irqs() uses to actually assign the IRQs and replace it with the pci_assign_irq() function which changes the interface and uses the new function pointers stored in the host bridge structure. Eventually this will allow pci_fixup_irqs() to be removed entirely and the new deferred assignment code path will call pci_assign_irq() directly. However to ensure current users continue to work, a new implementation of pci_fixup_irqs() is introduced which simply wraps the functionality of pci_assign_irq(). Signed-off-by: Matthew Minter [lorenzo.pieralisi@arm.com: reworked comments/log] Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas drivers/pci/setup-irq.c | 45 +++++++++++++++++++++++++++++++++++---------- include/linux/pci.h | 1 + 2 files changed, 36 insertions(+), 10 deletions(-) commit 3aa8a41e0bf5565946082d23ae589c1a8559494a Author: Matthew Minter Date: Wed Jun 28 15:14:02 2017 -0500 PCI: Add IRQ mapping function pointers to pci_host_bridge struct In order to defer IRQ assignment arches must be able to register functions to map and swizzle interrupts. These registered functions are stored in the pci_host_bridge struct. Signed-off-by: Matthew Minter Signed-off-by: Bjorn Helgaas include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) commit be0ce12e4a2be5b5531a2afcfcb3af397d3539fb Author: Matthew Minter Date: Wed Jun 28 15:14:02 2017 -0500 PCI: Build setup-irq.o on all arches The functions included in setup-irq.o currently apply only to a selection of architectures which share common IRQ assignment code. However this code needs to be generalised for all arches to allow deferred IRQ assignment. So the first step is to build it on all architectures. Signed-off-by: Matthew Minter Signed-off-by: Bjorn Helgaas drivers/pci/Makefile | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 9ee8a1c4a0e232e9b86e03f7c628ff0286444e00 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:01 2017 -0500 PCI: Remove pci_scan_root_bus_msi() The pci_scan_root_bus_bridge() function allows passing a parameterized struct pci_host_bridge and scanning the resulting PCI bus; since the struct msi_controller is part of the struct pci_host_bridge and the struct pci_host_bridge can now be passed to pci_scan_root_bus_bridge() explicitly, there is no need for a scan interface with a MSI controller parameter. With all PCI host controller drivers and platform code relying on pci_scan_root_bus_msi() converted over to pci_scan_root_bus_bridge() the pci_scan_root_bus_msi() becomes obsolete and can be removed. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 27 +++++---------------------- include/linux/pci.h | 4 ---- 2 files changed, 5 insertions(+), 26 deletions(-) commit 123db533072e58838e32ba9ffc102c476788ec2b Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:01 2017 -0500 PCI: xilinx-nwl: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI xilinx-nwl host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Bharat Kumar Gogada drivers/pci/host/pcie-xilinx-nwl.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit ae13cb9b1926e821ab8b5f00995f829f10d9fa20 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:00 2017 -0500 PCI: rockchip: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI rockchip host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Wenrui Li Cc: Shawn Lin drivers/pci/host/pcie-rockchip.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 4246a86472ddcf6f33a74ede8ad1bfbcda66c5df Author: Lorenzo Pieralisi Date: Wed Jun 28 15:14:00 2017 -0500 PCI: generic: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI host-common code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Will Deacon drivers/pci/host/pci-host-common.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 9af275be15f75bf6a2b48fda21719ea861a42455 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:59 2017 -0500 PCI: xgene: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI xgene host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Tested-by: Khuong Dinh # with e1000e Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Tanmay Inamdar drivers/pci/host/pci-xgene.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 8c790a82add469a5e901bf612e2c30bf5085564d Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:59 2017 -0500 PCI: xilinx: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI xilinx host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas CC: Michal Simek drivers/pci/host/pcie-xilinx.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 9815791319a01be1ceca8b0b716219073b29a42d Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:58 2017 -0500 PCI: altera: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI altera host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Ley Foon Tan drivers/pci/host/pcie-altera.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 4b380678f5a7d926ebe3ae163f0aff2faa925329 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:58 2017 -0500 PCI: versatile: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI versatile host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi [bhelgaas: folded in fix from Arnd Bergmann : http://lkml.kernel.org/r/20170621215323.3921382-3-arnd@arndb.de] Signed-off-by: Bjorn Helgaas Cc: Rob Herring drivers/pci/host/pci-versatile.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 527740765629142993966afbd7a836fc47fb30ee Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:57 2017 -0500 PCI: iproc: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI iproc host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Scott Branden Cc: Ray Jui Cc: Jon Mason drivers/pci/host/pcie-iproc-bcma.c | 7 +++++-- drivers/pci/host/pcie-iproc-platform.c | 7 +++++-- drivers/pci/host/pcie-iproc.c | 38 ++++++++++++++++++---------------- 3 files changed, 30 insertions(+), 22 deletions(-) commit 90634e8540790461a55450595d5b49cc1854f616 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:57 2017 -0500 PCI: rcar: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI rcar host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Simon Horman drivers/pci/host/pcie-rcar.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 6b6de6af324857c2190c309fd01c3de81cab1bbd Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:56 2017 -0500 PCI: aardvark: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI aardvark host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Thomas Petazzoni drivers/pci/host/pci-aardvark.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 295aeb98a3220fe09c81fd4c8ad6e7884e05193d Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:56 2017 -0500 PCI: designware: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert PCI designware host code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Jingoo Han Cc: Joao Pinto drivers/pci/dwc/pcie-designware-host.c | 36 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 65938133784a3092c61b00aa63d1830fb465c1ac Author: Dmitry Torokhov Date: Wed Jun 28 16:37:25 2017 -0700 MAINTAINERS: update input subsystem patterns Add include/uapi/linux/input-event-codes.h and Documentation/input to the file patterns, so that patches touching these files get copied to linux-input mailing list. Signed-off-by: Dmitry Torokhov MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 88832613715eb46c90b1e75b4c0a537f1cb5797e Author: Dmitry Torokhov Date: Thu Jun 22 09:24:15 2017 -0700 Input: introduce KEY_ASSISTANT This adds a new keycode to allow users invoke a context-aware desktop assistant application. Signed-off-by: Dmitry Torokhov include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+) commit 247462316f85a9e0479445c1a4223950b68ffac1 Author: Helge Deller Date: Sun Jul 2 22:00:41 2017 +0200 parisc: Report SIGSEGV instead of SIGBUS when running out of stack When a process runs out of stack the parisc kernel wrongly faults with SIGBUS instead of the expected SIGSEGV signal. This example shows how the kernel faults: do_page_fault() command='a.out' type=15 address=0xfaac2000 in libc-2.24.so[f8308000+16c000] trap #15: Data TLB miss fault, vm_start = 0xfa2c2000, vm_end = 0xfaac2000 The vma->vm_end value is the first address which does not belong to the vma, so adjust the check to include vma->vm_end to the range for which to send the SIGSEGV signal. This patch unbreaks building the debian libsigsegv package. Cc: stable@vger.kernel.org Signed-off-by: Helge Deller arch/parisc/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0f94efd5aa8daa8a07d7601714c2573266cd4c9 Author: Eric Biggers Date: Mon Jun 12 23:18:30 2017 -0700 parisc: use compat_sys_keyctl() Architectures with a compat syscall table must put compat_sys_keyctl() in it, not sys_keyctl(). The parisc architecture was not doing this; fix it. Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Acked-by: Helge Deller Signed-off-by: Helge Deller arch/parisc/kernel/syscall_table.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 807900395efebf9276178eb6157959f2e81fe013 Author: Toshi Kani Date: Thu Jun 29 20:41:30 2017 -0600 acpi/nfit: Issue Start ARS to retrieve existing records ACPI 6.2 defines in section 9.20.7.2 that the OSPM may call a Start ARS with Flags Bit [1] set upon receiving the 0x81 notification. Upon receiving the notification, the OSPM may decide to issue a Start ARS with Flags Bit [1] set to prepare for the retrieval of existing records and issue the Query ARS Status function to retrieve the records. Add support to call a Start ARS from acpi_nfit_uc_error_notify() with ND_ARS_RETURN_PREV_DATA set when HW_ERROR_SCRUB_ON is not set. Link: http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf Signed-off-by: Toshi Kani Cc: Dan Williams Cc: Rafael J. Wysocki Cc: Vishal Verma Cc: Linda Knippers Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 13 ++++++++++--- drivers/acpi/nfit/mce.c | 2 +- drivers/acpi/nfit/nfit.h | 3 ++- include/uapi/linux/ndctl.h | 1 + 4 files changed, 14 insertions(+), 5 deletions(-) commit 01ad0990467eaa17ae17db7376a4f02739f558c0 Author: Sagi Grimberg Date: Mon May 1 00:27:17 2017 +0300 nvme-pci: rename to nvme_pci_configure_admin_queue we are going to need the name for the core routine... Reviewed-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20d0dfe65afd3fb59d14720570a6921eb6bf5c1f Author: Sagi Grimberg Date: Tue Jun 27 22:16:38 2017 +0300 nvme: move ctrl cap to struct nvme_ctrl All transports use either a private cache of controller cap or an on-stack copy, move it to the generic struct nvme_ctrl. In the future it will also be maintained by the core. Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Signed-off-by: Sagi Grimberg drivers/nvme/host/fc.c | 8 +++----- drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/pci.c | 20 +++++++++----------- drivers/nvme/host/rdma.c | 10 +++++----- drivers/nvme/target/loop.c | 7 +++---- 5 files changed, 21 insertions(+), 25 deletions(-) commit d858e5f04e58a42a6e0c8ec74ea15e3ea4bb45d0 Author: Sagi Grimberg Date: Mon Apr 24 10:58:29 2017 +0300 nvme: move queue_count to the nvme_ctrl All all transports use the queue_count in exactly the same, so move it to the generic struct nvme_ctrl. In the future it will also be maintained by the core. Reviewed-by: Christoph Hellwig Reviewed-By: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Signed-off-by: Sagi Grimberg drivers/nvme/host/fc.c | 35 +++++++++++++++++------------------ drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/pci.c | 15 +++++++-------- drivers/nvme/host/rdma.c | 39 +++++++++++++++++++-------------------- drivers/nvme/target/loop.c | 15 +++++++-------- 5 files changed, 51 insertions(+), 54 deletions(-) commit d554b5e1ca64d23e4f839e6531490fee8479fbaf Author: Martin K. Petersen Date: Tue Jun 27 22:27:57 2017 -0400 nvme: Quirks for PM1725 controllers PM1725 controllers have a couple of quirks that need to be handled in the driver: - I/O queue depth must be limited to 64 entries on controllers that do not report MQES. - The host interface registers go offline briefly while resetting the chip. Thus a delay is needed before checking whether the controller is ready. Note that the admin queue depth is also limited to 64 on older versions of this board. Since our NVME_AQ_DEPTH is now 32 that is no longer an issue. Signed-off-by: Martin K. Petersen Signed-off-by: Sagi Grimberg drivers/nvme/host/pci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bfaa7834b60e01135af4e8e06a9477bef2368f44 Author: Thiago Jung Bauermann Date: Thu Jun 29 18:55:38 2017 -0300 powerpc/perf/hv-24x7: Aggregate result elements on POWER9 SMT8 On POWER9 SMT8 the 24x7 API returns two result elements for physical core and virtual CPU events and we need to add their counts to get the final result. Reviewed-by: Sukadev Bhattiprolu Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 53 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 11 deletions(-) commit 2e6553aae3e6bd13cf176855d67233dce8817381 Author: Thiago Jung Bauermann Date: Thu Jun 29 18:55:37 2017 -0300 powerpc/perf/hv-24x7: Support v2 of the hypervisor API POWER9 introduces a new version of the hypervisor API to access the 24x7 perf counters. The new version changed some of the structures used for requests and results. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 135 +++++++++++++++++++++++++++------ arch/powerpc/perf/hv-24x7.h | 58 +++++++++++--- arch/powerpc/platforms/pseries/Kconfig | 2 +- 3 files changed, 160 insertions(+), 35 deletions(-) commit ebd4a5a3ebd9c7bef105e8581f80ae4592a21e6d Author: Thiago Jung Bauermann Date: Thu Jun 29 18:55:36 2017 -0300 powerpc/perf/hv-24x7: Minor improvements There's an H24x7_DATA_BUFFER_SIZE constant, so use it in init_24x7_request. There's also an HV_PERF_DOMAIN_MAX constant, so use it in h_24x7_event_init. This makes the comment above the check redundant, so remove it. In add_event_to_24x7_request, a statement is terminated with a comma instead of a semicolon. Fix it. In hv-24x7.h, improve comments in struct hv_24x7_result. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 9 ++++----- arch/powerpc/perf/hv-24x7.h | 11 ++++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) commit 38d81846106bb1e14fcf2cf390f7cdeb7fdab550 Author: Thiago Jung Bauermann Date: Thu Jun 29 18:55:35 2017 -0300 powerpc/perf/hv-24x7: Fix return value of hcalls The H_GET_24X7_CATALOG_PAGE hcall can return a signed error code, so fix this in the code. The H_GET_24X7_DATA hcall can return a signed error code, so fix this in the code. Also, don't truncate it to 32 bit to use as return value for make_24x7_request. In case of error h_24x7_event_commit_txn passes that return value to generic code, so it should be a proper errno. The other caller of make_24x7_request is single_24x7_request, whose callers don't actually care which error code is returned so they are not affected by this change. Finally, h_24x7_get_value doesn't use the error code from single_24x7_request, so there's no need to store it. Reviewed-by: Sukadev Bhattiprolu Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 62714a14928061f496308a9d4635bf986642046d Author: Thiago Jung Bauermann Date: Thu Jun 29 18:55:34 2017 -0300 powerpc-perf/hx-24x7: Don't log failed hcall twice make_24x7_request already calls log_24x7_hcall if it fails, so callers don't have to do it again. In fact, since the latter is now only called from the former, there's no need for a separate log_24x7_hcall anymore so remove it. Reviewed-by: Sukadev Bhattiprolu Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) commit 41f577eb012f33d9af9c9fcee6a68a499562f875 Author: Thiago Jung Bauermann Date: Thu Jun 29 18:55:33 2017 -0300 powerpc/perf/hv-24x7: Properly iterate through results hv-24x7.h has a comment mentioning that result_buffer->results can't be indexed as a normal array because it may contain results of variable sizes, so fix the loop in h_24x7_event_commit_txn to take the variation into account when iterating through results. Another problem in that loop is that it sets h24x7hw->events[i] to NULL. This assumes that only the i'th result maps to the i'th request, but that is not guaranteed to be true. We need to leave the event in the array so that we don't dereference a NULL pointer in case more than one result maps to one request. We still assume that each result has only one result element, so warn if that assumption is violated. Reviewed-by: Sukadev Bhattiprolu Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit 36c8fb2c616d9373758b155d9723774353067a87 Author: Thiago Jung Bauermann Date: Thu Jun 29 18:55:32 2017 -0300 powerpc/perf/hv-24x7: Fix off-by-one error in request_buffer check request_buffer can hold 254 requests, so if it already has that number of entries we can't add a new one. Also, define constant to show where the number comes from. Fixes: e3ee15dc5d19 ("powerpc/perf/hv-24x7: Define add_event_to_24x7_request()") Reviewed-by: Sukadev Bhattiprolu Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 12bf85a71000af7419b19b5e90910919f36f336c Author: Thiago Jung Bauermann Date: Thu Jun 29 18:55:31 2017 -0300 powerpc/perf/hv-24x7: Fix passing of catalog version number H_GET_24X7_CATALOG_PAGE needs to be passed the version number obtained from the first catalog page obtained previously. This is a 64 bit number, but create_events_from_catalog truncates it to 32-bit. This worked on POWER8, but POWER9 actually uses the upper bits so the call fails with H_P3 because the hypervisor doesn't recognize the version. This patch also adds the hcall return code to the error message, which is helpful when debugging the problem. Fixes: 5c5cd7b50259 ("powerpc/perf/hv-24x7: parse catalog and populate sysfs with events") Reviewed-by: Sukadev Bhattiprolu Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c07424414c28c8ae9a54803a4496e4d8718b3613 Author: Oliver O'Halloran Date: Wed Jun 28 11:32:36 2017 +1000 powerpc/mm: Enable ZONE_DEVICE on powerpc Flip the switch. Running around and screaming "IT'S ALIVE" is optional, but recommended. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1b644f57b3a8a4e05720ff88e87450c6f2e3f356 Author: Anton Blanchard Date: Wed Jun 28 11:32:35 2017 +1000 powerpc/mm: Wire up hpte_removebolted for powernv Adds support for removing bolted (i.e kernel linear mapping) mappings on powernv. This is needed to support memory hot unplug operations which are required for the teardown of DAX/PMEM devices. Reviewed-by: Balbir Singh Reviewed-by: Rashmica Gupta Signed-off-by: Anton Blanchard Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_native_64.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit ebd31197931d75c837269f3fd3365b4cee358faf Author: Oliver O'Halloran Date: Wed Jun 28 11:32:34 2017 +1000 powerpc/mm: Add devmap support for ppc64 Add support for the devmap bit on PTEs and PMDs for PPC64 Book3S. This is used to differentiate device backed memory from transparent huge pages since they are handled in more or less the same manner by the core mm code. Cc: Aneesh Kumar K.V Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 45 ++++++++++++++++++++++++++++ arch/powerpc/include/asm/book3s/64/radix.h | 2 +- arch/powerpc/mm/hugetlbpage.c | 2 +- arch/powerpc/mm/pgtable-book3s64.c | 4 +-- arch/powerpc/mm/pgtable-hash64.c | 4 ++- arch/powerpc/mm/pgtable-radix.c | 3 +- arch/powerpc/mm/pgtable_64.c | 2 +- 7 files changed, 55 insertions(+), 7 deletions(-) commit b584c2544041707ea041748dbfbb1081289c6cf5 Author: Oliver O'Halloran Date: Wed Jun 28 11:32:33 2017 +1000 powerpc/vmemmap: Add altmap support Adds support to powerpc for the altmap feature of ZONE_DEVICE memory. An altmap is a driver provided region that is used to provide the backing storage for the struct pages of ZONE_DEVICE memory. In situations where large amount of ZONE_DEVICE memory is being added to the system the altmap reduces pressure on main system memory by allowing the mm/ metadata to be stored on the device itself rather in main memory. Reviewed-by: Balbir Singh Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/mm/init_64.c | 15 +++++++++++++-- arch/powerpc/mm/mem.c | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) commit d7d9b612f1b0ac154071bafc02bc9b7b879d7363 Author: Oliver O'Halloran Date: Wed Jun 28 11:32:32 2017 +1000 powerpc/vmemmap: Reshuffle vmemmap_free() Removes an indentation level and shuffles some code around to make the following patch cleaner. No functional changes. Reviewed-by: Balbir Singh Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/mm/init_64.c | 48 ++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit 65f7d049788763969180c72ef98dab8bf0340c55 Author: Oliver O'Halloran Date: Wed Jun 28 11:32:31 2017 +1000 mm, x86: Add ARCH_HAS_ZONE_DEVICE to Kconfig Currently ZONE_DEVICE depends on X86_64 and this will get unwieldly as new architectures (and platforms) get ZONE_DEVICE support. Move to an arch selected Kconfig option to save us the trouble. Cc: linux-mm@kvack.org Acked-by: Ingo Molnar Acked-by: Balbir Singh Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/x86/Kconfig | 1 + mm/Kconfig | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 7a849a6cf3ff676d1726259c18fa413f9e0c62a3 Author: Oliver O'Halloran Date: Fri Jun 30 16:52:35 2017 +1000 powerpc/hugetlbfs: Export HPAGE_SHIFT Export it so it can be referenced inside a module. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage.c | 1 + 1 file changed, 1 insertion(+) commit 8c7d0a04066b0d9d95134e7853e8c26b84173108 Author: Andrew Donnellan Date: Wed Jun 28 17:22:30 2017 +1000 MAINTAINERS: cxl: update maintainership As Ian's stepping down from his maintainer role now that he's leaving IBM, Frederic has asked me to add myself to the cxl maintainer list. Updating accordingly. Cc: Frederic Barrat Cc: Ian Munsie Signed-off-by: Andrew Donnellan Acked-by: Frederic Barrat Acked-by: Ian Munsie Signed-off-by: Michael Ellerman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 5fc3a7f754b9f89744b1b45533b166db1fb2053c Author: Ian Munsie Date: Wed Jun 28 16:19:20 2017 +1000 MAINTAINERS: Remove myself as cxl maintainer I am no longer employed by IBM and will no longer have access to cxl hardware, so remove myself as a cxl maintainer. If anyone needs to contact me in the future, please use my personal email address darkstarsword@gmail.com Signed-off-by: Ian Munsie Cc: Frederic Barrat Cc: Andrew Donnellan Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 4e287e655e108cbbd6e3e7dcc49d591c8aa5a8a4 Author: Nicholas Piggin Date: Tue Jun 6 23:08:32 2017 +1000 powerpc: use spin loop primitives in some functions Use the different spin loop primitives in some simple powerpc spin loops, including those which will spin as a common case. This will help to test the spin loop primitives before more conversions are done. Signed-off-by: Nicholas Piggin [mpe: Add some includes of ] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/delay.h | 16 ++++++++++++---- arch/powerpc/kernel/smp.c | 4 ++-- arch/powerpc/kernel/time.c | 8 +++++--- arch/powerpc/mm/hash_native_64.c | 5 ++++- 4 files changed, 23 insertions(+), 10 deletions(-) commit ede8e2bbb0eb3370e4dc5484b40eb22850a09b92 Author: Nicholas Piggin Date: Tue Jun 6 23:08:31 2017 +1000 powerpc/64: implement spin loop primitives Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/processor.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 5d6dec6fba38c3e2d408df108bb92ef4ac201f18 Author: Kees Cook Date: Sat Jul 1 11:01:29 2017 -0700 locking/refcount: Remove the half-implemented refcount_sub() API CONFIG_REFCOUNT_FULL=y (correctly) does not provide a refcount_sub(), which should not be part of proper refcount design patterns. Remove the erroneous extern and the later !CONFIG_REFCOUNT_FULL accidental implementation. Signed-off-by: Kees Cook Cc: Elena Reshetova Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 29dee3c03abc ("locking/refcounts: Out-of-line everything") Link: http://lkml.kernel.org/r/20170701180129.GA17405@beast Signed-off-by: Ingo Molnar include/linux/refcount.h | 6 ------ 1 file changed, 6 deletions(-) commit d8b53bff0a499cd05a5026307af9a5f41f604ea3 Author: Takashi Sakamoto Date: Sun Jul 2 11:44:43 2017 +0900 ALSA: pcm: add a documentation for tracepoints In PCM interface/protocol for userspace, parameters of runtime for PCM substream is decided by an interaction between applications and ALSA PCM core. In former commits, some tracepoints were added to probe a part of the interaction. This commit adds a documentation about the interaction and the tracepoints. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai Documentation/sound/designs/index.rst | 1 + Documentation/sound/designs/tracepoints.rst | 172 ++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+) commit 7175a11214f02e6184690c17cf5366012b667531 Author: Christoph Hellwig Date: Thu Jun 29 11:43:19 2017 -0700 xfs: remove a whitespace-only line from xfs_fs_get_nextdqblk Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_quotaops.c | 1 - 1 file changed, 1 deletion(-) commit bda250dbaf39f67f8910e183853e4e6a9e5ce899 Author: Christoph Hellwig Date: Thu Jun 29 12:28:36 2017 -0700 xfs: rewrite xfs_dq_get_next_id using xfs_iext_lookup_extent This goes straight to a single lookup in the extent list and avoids a roundtrip through two layers that don't add any value for the simple quoata file that just has data or holes and no page cache, delayed allocation, unwritten extent or COW fork (which btw, doesn't seem to be handled by the existing SEEK HOLE/DATA code). Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_dquot.c | 66 ++++++++++++++++++------------------------------------ 1 file changed, 22 insertions(+), 44 deletions(-) commit d04c241c669209667dd8f44335591246e601139a Author: Carlos Maiolino Date: Fri Jun 30 09:46:07 2017 -0700 xfs: Check for m_errortag initialization in xfs_errortag_test While adding error injection into IO completion, I notice the lack of initialization check in xfs_errortag_test(), make the error injection mechanism unable to be used there. IO completion is executed a few times before the error injection mechanism is initialized, so to be safer, make xfs_errortag_test() check if the errortag is properly initialized. Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_error.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bcdb239b456265b927a809c4078f0a1f433a6e18 Merge: 57a53a0 04df41e Author: David S. Miller Date: Sat Jul 1 16:15:15 2017 -0700 Merge branch 'bpf-Add-support-for-sock_ops' Lawrence Brakmo says: ==================== bpf: Add support for sock_ops Created a new BPF program type, BPF_PROG_TYPE_SOCK_OPS, and a corresponding struct that allows BPF programs of this type to access some of the socket's fields (such as IP addresses, ports, etc.) and setting connection parameters such as buffer sizes, initial window, SYN/SYN-ACK RTOs, etc. Unlike current BPF program types that expect to be called at a particular place in the network stack code, SOCK_OPS program can be called at different places and use an "op" field to indicate the context. There are currently two types of operations, those whose effect is through their return value and those whose effect is through the new bpf_setsocketop BPF helper function. Example operands of the first type are: BPF_SOCK_OPS_TIMEOUT_INIT BPF_SOCK_OPS_RWND_INIT BPF_SOCK_OPS_NEEDS_ECN Example operands of the secont type are: BPF_SOCK_OPS_TCP_CONNECT_CB BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB Current operands are only called during connection establishment so there should not be any BPF overheads after connection establishment. The main idea is to use connection information form both hosts, such as IP addresses and ports to allow setting of per connection parameters to optimize the connection's peformance. Alghough there are already 3 mechanisms to set parameters (sysctls, route metrics and setsockopts), this new mechanism provides some disticnt advantages. Unlike sysctls, it can set parameters per connection. In contrast to route metrics, it can also use port numbers and information provided by a user level program. In addition, it could set parameters probabilistically for evaluation purposes (i.e. do something different on 10% of the flows and compare results with the other 90% of the flows). Also, in cases where IPv6 addresses contain geographic information, the rules to make changes based on the distance (or RTT) between the hosts are much easier than route metric rules and can be global. Finally, unlike setsockopt, it does not require application changes and it can be updated easily at any time. It uses the existing bpf cgroups infrastructure so the programs can be attached per cgroup with full inheritance support. Although the bpf cgroup framework already contains a sock related program type (BPF_PROG_TYPE_CGROUP_SOCK), I created the new type (BPF_PROG_TYPE_SOCK_OPS) beccause the existing type expects to be called only once during the connections's lifetime. In contrast, the new program type will be called multiple times from different places in the network stack code. For example, before sending SYN and SYN-ACKs to set an appropriate timeout, when the connection is established to set congestion control, etc. As a result it has "op" field to specify the type of operation requested. This patch set also includes sample BPF programs to demostrate the differnet features. v2: Formatting changes, rebased to latest net-next v3: Fixed build issues, changed socket_ops to sock_ops throught, fixed formatting issues, removed the syscall to load sock_ops program and added functionality to use existing bpf attach and bpf detach system calls, removed reader/writer locks in sock_bpfops.c (used when saving sock_ops global program) and fixed missing module refcount increment. v4: Removed global sock_ops program and instead used existing cgroup bpf infrastructure to support a new BPF_CGROUP_ATTCH type. v5: fixed kbuild warning happening in bpf-cgroup.h removed automatic converstion to host byte order from some sock_ops fields (ipv4 and ipv6 addresses, remote port) Added conversion to host byte order in some of the sample programs Added to sample BPF program comments about using load_sock_ops to load Removed is_req_sock field from bpf_sock_ops_kern and related places, using sk_fullsock() instead. v6: fixes to BPF helper function setsockopt (possible NULL deferencing, etc.) ==================== Signed-off-by: David S. Miller commit 04df41e343db9ca91a278ea14606bbaaf0491f2e Author: Lawrence Brakmo Date: Fri Jun 30 20:02:55 2017 -0700 bpf: update tools/include/uapi/linux/bpf.h Update tools/include/uapi/linux/bpf.h to include changes related to new bpf sock_ops program type. Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller tools/include/uapi/linux/bpf.h | 66 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) commit 6c4a01b27852347cd3c4d2bf0dadf157ea6c3c40 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:54 2017 -0700 bpf: Sample bpf program to set sndcwnd clamp Sample BPF program, tcp_clamp_kern.c, to demostrate the use of setting the sndcwnd clamp. This program assumes that if the first 5.5 bytes of the host's IPv6 addresses are the same, then the hosts are in the same datacenter and sets sndcwnd clamp to 100 packets, SYN and SYN-ACK RTOs to 10ms and send/receive buffer sizes to 150KB. Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + samples/bpf/tcp_clamp_kern.c | 102 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) commit 13bf96411ad2bd162a4f9470d58c6bb579c96e21 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:53 2017 -0700 bpf: Adds support for setting sndcwnd clamp Adds a new bpf_setsockopt for TCP sockets, TCP_BPF_SNDCWND_CLAMP, which sets the initial congestion window. It is useful to limit the sndcwnd when the host are close to each other (small RTT). Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 1 + net/core/filter.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 7bc62e28547946ec6e47009730ee1385819e6999 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:52 2017 -0700 bpf: Sample BPF program to set initial cwnd Sample BPF program that assumes hosts are far away (i.e. large RTTs) and sets initial cwnd and initial receive window to 40 packets, send and receive buffers to 1.5MB. In practice there would be a test to insure the hosts are actually far enough away. Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + samples/bpf/tcp_iw_kern.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) commit fc7478103c84af437ca3bfae71a82631f770bf7e Author: Lawrence Brakmo Date: Fri Jun 30 20:02:51 2017 -0700 bpf: Adds support for setting initial cwnd Adds a new bpf_setsockopt for TCP sockets, TCP_BPF_IW, which sets the initial congestion window. This can be used when the hosts are far apart (large RTTs) and it is safe to start with a large inital cwnd. Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 2 ++ net/core/filter.c | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) commit bb56d4449d8b8de1f22a07f007bb91cb30fcc7cc Author: Lawrence Brakmo Date: Fri Jun 30 20:02:50 2017 -0700 bpf: Sample BPF program to set congestion control Sample BPF program that sets congestion control to dctcp when both hosts are within the same datacenter. In this example that is assumed to be when they have the first 5.5 bytes of their IPv6 address are the same. Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + samples/bpf/tcp_cong_kern.c | 83 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) commit 91b5b21c7c16899abb37f4a9e4388b4e9aae0b9d Author: Lawrence Brakmo Date: Fri Jun 30 20:02:49 2017 -0700 bpf: Add support for changing congestion control Added support for changing congestion control for SOCK_OPS bpf programs through the setsockopt bpf helper function. It also adds a new SOCK_OPS op, BPF_SOCK_OPS_NEEDS_ECN, that is needed for congestion controls, like dctcp, that need to enable ECN in the SYN packets. Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller include/net/tcp.h | 9 ++++++++- include/uapi/linux/bpf.h | 3 +++ net/core/filter.c | 18 +++++++++++++++++- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_cong.c | 32 ++++++++++++++++++++++---------- net/ipv4/tcp_input.c | 3 ++- net/ipv4/tcp_output.c | 8 +++++--- 7 files changed, 58 insertions(+), 17 deletions(-) commit d9925368a641391f38cd281e67b948e6b6f3bcca Author: Lawrence Brakmo Date: Fri Jun 30 20:02:48 2017 -0700 bpf: Sample BPF program to set buffer sizes This patch contains a BPF program to set initial receive window to 40 packets and send and receive buffers to 1.5MB. This would usually be done after doing appropriate checks that indicate the hosts are far enough away (i.e. large RTT). Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + samples/bpf/tcp_bufs_kern.c | 86 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) commit 9872a4bde31b0b055448e9ac1f4c9ee62d978766 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:47 2017 -0700 bpf: Add TCP connection BPF callbacks Added callbacks to BPF SOCK_OPS type program before an active connection is intialized and after a passive or active connection is established. The following patch demostrates how they can be used to set send and receive buffer sizes. Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 11 +++++++++++ net/ipv4/tcp_fastopen.c | 1 + net/ipv4/tcp_input.c | 3 ++- net/ipv4/tcp_output.c | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) commit 8c4b4c7e9ff0447995750d9329949fa082520269 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:46 2017 -0700 bpf: Add setsockopt helper function to bpf Added support for calling a subset of socket setsockopts from BPF_PROG_TYPE_SOCK_OPS programs. The code was duplicated rather than making the changes to call the socket setsockopt function because the changes required would have been larger. The ops supported are: SO_RCVBUF SO_SNDBUF SO_MAX_PACING_RATE SO_PRIORITY SO_RCVLOWAT SO_MARK Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 14 ++++++++- net/core/filter.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++- samples/bpf/bpf_helpers.h | 3 ++ 3 files changed, 94 insertions(+), 2 deletions(-) commit c400296bf63d234899cf2448cd3d17199676f188 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:45 2017 -0700 bpf: Sample bpf program to set initial window The sample bpf program, tcp_rwnd_kern.c, sets the initial advertized window to 40 packets in an environment where distinct IPv6 prefixes indicate that both hosts are not in the same data center. Signed-off-by: Lawrence Brakmo Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + samples/bpf/tcp_rwnd_kern.c | 69 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) commit 13d3b1ebe28762c79e981931a41914fae5d04386 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:44 2017 -0700 bpf: Support for setting initial receive window This patch adds suppport for setting the initial advertized window from within a BPF_SOCK_OPS program. This can be used to support larger initial cwnd values in environments where it is known to be safe. Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller include/net/tcp.h | 10 ++++++++++ include/uapi/linux/bpf.h | 4 ++++ net/ipv4/tcp_minisocks.c | 9 ++++++++- net/ipv4/tcp_output.c | 7 ++++++- 4 files changed, 28 insertions(+), 2 deletions(-) commit 61bc4d8daa7af018d7ea084ea38648828a5a90d5 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:43 2017 -0700 bpf: Sample bpf program to set SYN/SYN-ACK RTOs The sample BPF program, tcp_synrto_kern.c, sets the SYN and SYN-ACK RTOs to 10ms when both hosts are within the same datacenter (i.e. small RTTs) in an environment where common IPv6 prefixes indicate both hosts are in the same data center. Signed-off-by: Lawrence Brakmo Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + samples/bpf/tcp_synrto_kern.c | 69 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) commit 8550f328f45db6d37981eb2041bc465810245c03 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:42 2017 -0700 bpf: Support for per connection SYN/SYN-ACK RTOs This patch adds support for setting a per connection SYN and SYN_ACK RTOs from within a BPF_SOCK_OPS program. For example, to set small RTOs when it is known both hosts are within a datacenter. Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller include/net/tcp.h | 11 +++++++++++ include/uapi/linux/bpf.h | 3 +++ net/ipv4/tcp_input.c | 3 ++- net/ipv4/tcp_output.c | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) commit ae16189efb0fe2bdc5e702bd6221ed6d0ff5babd Author: Lawrence Brakmo Date: Fri Jun 30 20:02:41 2017 -0700 bpf: program to load and attach sock_ops BPF progs The program load_sock_ops can be used to load sock_ops bpf programs and to attach it to an existing (v2) cgroup. It can also be used to detach sock_ops programs. Examples: load_sock_ops [-l] Load and attaches a sock_ops program at the specified cgroup. If "-l" is used, the program will continue to run to output the BPF log buffer. If the specified filename does not end in ".o", it appends "_kern.o" to the name. load_sock_ops -r Detaches the currently attached sock_ops program from the specified cgroup. Signed-off-by: Lawrence Brakmo Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 3 ++ samples/bpf/load_sock_ops.c | 97 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) commit 40304b2a1567fecc321f640ee4239556dd0f3ee0 Author: Lawrence Brakmo Date: Fri Jun 30 20:02:40 2017 -0700 bpf: BPF support for sock_ops Created a new BPF program type, BPF_PROG_TYPE_SOCK_OPS, and a corresponding struct that allows BPF programs of this type to access some of the socket's fields (such as IP addresses, ports, etc.). It uses the existing bpf cgroups infrastructure so the programs can be attached per cgroup with full inheritance support. The program will be called at appropriate times to set relevant connections parameters such as buffer sizes, SYN and SYN-ACK RTOs, etc., based on connection information such as IP addresses, port numbers, etc. Alghough there are already 3 mechanisms to set parameters (sysctls, route metrics and setsockopts), this new mechanism provides some distinct advantages. Unlike sysctls, it can set parameters per connection. In contrast to route metrics, it can also use port numbers and information provided by a user level program. In addition, it could set parameters probabilistically for evaluation purposes (i.e. do something different on 10% of the flows and compare results with the other 90% of the flows). Also, in cases where IPv6 addresses contain geographic information, the rules to make changes based on the distance (or RTT) between the hosts are much easier than route metric rules and can be global. Finally, unlike setsockopt, it oes not require application changes and it can be updated easily at any time. Although the bpf cgroup framework already contains a sock related program type (BPF_PROG_TYPE_CGROUP_SOCK), I created the new type (BPF_PROG_TYPE_SOCK_OPS) beccause the existing type expects to be called only once during the connections's lifetime. In contrast, the new program type will be called multiple times from different places in the network stack code. For example, before sending SYN and SYN-ACKs to set an appropriate timeout, when the connection is established to set congestion control, etc. As a result it has "op" field to specify the type of operation requested. The purpose of this new program type is to simplify setting connection parameters, such as buffer sizes, TCP's SYN RTO, etc. For example, it is easy to use facebook's internal IPv6 addresses to determine if both hosts of a connection are in the same datacenter. Therefore, it is easy to write a BPF program to choose a small SYN RTO value when both hosts are in the same datacenter. This patch only contains the framework to support the new BPF program type, following patches add the functionality to set various connection parameters. This patch defines a new BPF program type: BPF_PROG_TYPE_SOCKET_OPS and a new bpf syscall command to load a new program of this type: BPF_PROG_LOAD_SOCKET_OPS. Two new corresponding structs (one for the kernel one for the user/BPF program): /* kernel version */ struct bpf_sock_ops_kern { struct sock *sk; __u32 op; union { __u32 reply; __u32 replylong[4]; }; }; /* user version * Some fields are in network byte order reflecting the sock struct * Use the bpf_ntohl helper macro in samples/bpf/bpf_endian.h to * convert them to host byte order. */ struct bpf_sock_ops { __u32 op; union { __u32 reply; __u32 replylong[4]; }; __u32 family; __u32 remote_ip4; /* In network byte order */ __u32 local_ip4; /* In network byte order */ __u32 remote_ip6[4]; /* In network byte order */ __u32 local_ip6[4]; /* In network byte order */ __u32 remote_port; /* In network byte order */ __u32 local_port; /* In host byte horder */ }; Currently there are two types of ops. The first type expects the BPF program to return a value which is then used by the caller (or a negative value to indicate the operation is not supported). The second type expects state changes to be done by the BPF program, for example through a setsockopt BPF helper function, and they ignore the return value. The reply fields of the bpf_sockt_ops struct are there in case a bpf program needs to return a value larger than an integer. Signed-off-by: Lawrence Brakmo Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf-cgroup.h | 18 +++++ include/linux/bpf_types.h | 1 + include/linux/filter.h | 9 +++ include/net/tcp.h | 36 ++++++++++ include/uapi/linux/bpf.h | 30 ++++++++ kernel/bpf/cgroup.c | 37 ++++++++++ kernel/bpf/syscall.c | 5 ++ net/core/filter.c | 168 +++++++++++++++++++++++++++++++++++++++++++++ samples/bpf/bpf_load.c | 13 +++- 9 files changed, 314 insertions(+), 3 deletions(-) commit 57a53a0b6788e1e3e660987e3771837efa90d980 Merge: 2cb5c8e feb1672 Author: David S. Miller Date: Sat Jul 1 15:57:29 2017 -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 2017-07-01 Here are some more Bluetooth patches for the 4.13 kernel: - Added support for Broadcom BCM43430 controllers - Added sockaddr length checks before accessing sa_family - Fixed possible "might sleep" errors in bnep, cmtp and hidp modules - A few other minor fixes Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 2cb5c8e378d10a57aa1c9eaee36bea46c27dd2b9 Author: Neil Horman Date: Fri Jun 30 13:32:57 2017 -0400 sctp: Add peeloff-flags socket option Based on a request raised on the sctp devel list, there is a need to augment the sctp_peeloff operation while specifying the O_CLOEXEC and O_NONBLOCK flags (simmilar to the socket syscall). Since modifying the SCTP_SOCKOPT_PEELOFF socket option would break user space ABI for existing programs, this patch creates a new socket option SCTP_SOCKOPT_PEELOFF_FLAGS, which accepts a third flags parameter to allow atomic assignment of the socket descriptor flags. Tested successfully by myself and the requestor Signed-off-by: Neil Horman CC: Vlad Yasevich CC: "David S. Miller" CC: Andreas Steinmetz CC: Marcelo Ricardo Leitner Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/uapi/linux/sctp.h | 6 ++++ net/sctp/socket.c | 87 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 78 insertions(+), 15 deletions(-) commit 15324b25d5792b92c44714e20694a2df3a3a7b8f Merge: 4120dab 53172d9 Author: David S. Miller Date: Sat Jul 1 15:24:06 2017 -0700 Merge branch 'sfc-MCDI-cleanups' Edward Cree says: ==================== sfc: small MCDI cleanups Giving the full MCDI event rather than just the code can aid in debugging. While fixing this I noticed an outdated comment. ==================== Signed-off-by: David S. Miller commit 53172d9bc4b44c037a305d3248c7160e5ad51341 Author: Edward Cree Date: Fri Jun 30 15:55:28 2017 +0100 sfc: correct comment on efx_mcdi_process_event Fix out-of-date comment. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e2e347b77d8bd724bfd2e10a84551cb9099ccd7 Author: Jon Cooper Date: Fri Jun 30 15:54:33 2017 +0100 sfc: change Unknown MCDI event message to print full event. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4120dab09574e29e7576895342896ccb21b336e7 Author: Colin Ian King Date: Fri Jun 30 11:59:22 2017 +0100 net/mlx5: fix spelling mistake: "Allodating" -> "Allocating" Trivial fix to spelling mistake in mlx5_core_dbg debug message Signed-off-by: Colin Ian King Reviewed-by: Ilan Tayari Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 283131d20edd6f3629bf258e236aa6e44b1a8e27 Merge: 9d46b77 bd75180 Author: David S. Miller Date: Sat Jul 1 14:30:39 2017 -0700 Merge tag 'nfc-next-4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next Samuel Ortiz says: ==================== NFC 4.13 pull request This is the NFC pull requesy for 4.13. We have: - A conversion to unified device and GPIO APIs for the fdp, pn544, and st{21,-nci} drivers. - A fix for NFC device IDs allocation. - A fix for the nfcmrvl driver firmware download mechanism. - A trf7970a DT and GPIO cleanup and clock setting fix. - A few fixes for potential overflows in the digital and LLCP code. ==================== Signed-off-by: David S. Miller commit c345c6ca13825d1a15de5399226802433dd30f8c Author: Himanshu Madhani Date: Fri Jun 30 19:32:53 2017 -0700 qla2xxx: Fix NVMe entry_type for iocb packet on BE system This patch fixes incorrect assignment for entry_type field for Continuation Type iocb packet on BE system. This was caught by -Woverflow warning on BE system compilation. For Continuation Type iocb driver needs to write complete 32 bit value to initialize other field members in structure to 0. Following warning is seen on BE system compile: drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq': include/uapi/linux/byteorder/big_endian.h:32:26: warning: large integer implicitly truncated to unsigned type [-Woverflow] #define __cpu_to_le32(x) ((__force __le32)__swab32((x))) [mkp: fixed typo] Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_nvme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9d46b7701c30b308a3f3765bd33c1e69ccf4d9a2 Author: Maxime Ripard Date: Fri Jun 30 09:46:17 2017 +0200 arm: sunxi: Revert changes merged through net-next. This reverts commits 2c0cba482e79 ("arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module") to 2428fd0fe550 ("arm64: defconfig: Enable dwmac-sun8i driver on defconfig") and 3432a86e641c ("arm: sun8i: orangepipc: use internal phy-mode") to 5a79b4f2a5e7 ("arm: sun8i: orangepi-2: use internal phy-mode") that should be merged through the arm-soc tree, and end up in merge conflicts and build failures. Signed-off-by: Maxime Ripard Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 8 ----- arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 7 ---- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 ----- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 ----- arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 --- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 ----- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 40 --------------------- arch/arm/configs/multi_v7_defconfig | 1 - arch/arm/configs/sunxi_defconfig | 1 - .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 15 -------- .../boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 17 +-------- .../arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 16 --------- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 41 ---------------------- arch/arm64/configs/defconfig | 1 - 14 files changed, 1 insertion(+), 175 deletions(-) commit bcda771b2f7e4f2a7577eef62ddeb61394e03b69 Author: Arnd Bergmann Date: Fri Jun 30 18:10:40 2017 +0200 scsi: qla2xxx: avoid unused-function warning When NVMe support is disabled, we get a couple of harmless warnings: drivers/scsi/qla2xxx/qla_nvme.c:667:13: error: 'qla_nvme_unregister_remote_port' defined but not used [-Werror=unused-function] drivers/scsi/qla2xxx/qla_nvme.c:634:13: error: 'qla_nvme_abort_all' defined but not used [-Werror=unused-function] drivers/scsi/qla2xxx/qla_nvme.c:604:12: error: 'qla_nvme_wait_on_rport_del' defined but not used [-Werror=unused-function] This replaces the preprocessor checks in the code with equivalent compiler conditionals, which lets gcc drop the unused functions without warning, and is nicer to read. Fixes: e84067d74301 ("scsi: qla2xxx: Add FC-NVMe F/W initialization and transport registration") Signed-off-by: Arnd Bergmann Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/Kconfig | 1 + drivers/scsi/qla2xxx/qla_nvme.c | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) commit 9f80efda8f09283bb0fb7f8342a3e5c93857a7f2 Author: Colin Ian King Date: Fri Jun 30 14:59:50 2017 +0100 scsi: snic: fix a couple of spelling mistakes/typos Trivial fix to spelling mistakes/typos: "requrest_irq" -> "request_irq" "Firmwqre" -> "Firmware" Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/snic/snic_isr.c | 4 ++-- drivers/scsi/snic/snic_scsi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0bf0efa1f1a5230794618e633e54d68e088dfcf5 Author: Colin Ian King Date: Fri Jun 30 14:47:41 2017 +0100 scsi: qla2xxx: fix a bunch of typos and spelling mistakes Fix the following typos/spelling mistakes: "attribure" -> "attribute" "suppored" -> "supported" "Symobilic" -> "Symbolic" "iteself" -> "itself" "reqeust" -> "request" "nvme_wait_on_comand" -> "nvme_wait_on_command" "bount" -> "bound" "captrue_mask" -> "capture_mask" "tempelate" -> "template" ..and also unwrap a line to fix a checkpatch warning. Signed-off-by: Colin Ian King Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 2 +- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_isr.c | 3 +-- drivers/scsi/qla2xxx/qla_mbx.c | 2 +- drivers/scsi/qla2xxx/qla_nvme.c | 4 ++-- drivers/scsi/qla2xxx/qla_nx.c | 4 ++-- drivers/scsi/qla2xxx/qla_nx2.c | 2 +- 8 files changed, 10 insertions(+), 11 deletions(-) commit ea23b42739a2c3c1158344928048fff8c70d1f66 Merge: 4d8a991 8ff93de Author: David S. Miller Date: Sat Jul 1 14:11:48 2017 -0700 Merge tag 'mlx5-fixes-2017-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2017-06-28 This series contains some fixes for the mlx5 core and netdev driver. Please pull and let me know if there's any problem. For -stable: ("net/mlx5e: Fix TX carrier errors report in get stats ndo") Kernels >= v4.7 ("net/mlx5: Cancel delayed recovery work when unloading the driver") Kernels >= v4.10 * When applied to net-next this will introduce a contextual conflict, it should be easy to resolve, (a spin_lock was changed to spin_lock_irqsave in net-next), if you need any help with this please let me know. ("net/mlx5: Fix driver load error flow when firmware is stuck") Kernels >= v4.4* * This patch fixes: 6c780a0267b8 ("net/mlx5: Wait for FW readiness before initializing command interface") which was submitted two weeks ago and queued up for v4.4. Sorry about the mess, but other than the above, this series doesn't introduce any conflict with the current mlx5 IPSec offload series. ==================== Signed-off-by: David S. Miller commit 88e96174206e09e8eef7636067f4e24a9e67139a Author: Dan Carpenter Date: Fri Jun 30 11:03:53 2017 +0300 scsi: lpfc: don't double count abort errors If lpfc_nvmet_unsol_fcp_issue_abort() fails then we accidentally increment "tgtp->xmt_abort_rsp_error" and then two lines later we increment it a second time. Fixes: 547077a44b3b ("scsi: lpfc: Adding additional stats counters for nvme.") Signed-off-by: Dan Carpenter Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 1 - 1 file changed, 1 deletion(-) commit c4031db72b4fd2640ff3a7240701397abaacf048 Author: Dan Carpenter Date: Fri Jun 30 11:02:51 2017 +0300 scsi: lpfc: spin_lock_irq() is not nestable We're calling spin_lock_irq() multiple times, the problem is that on the first spin_unlock_irq() then we will re-enable IRQs and we don't want that. Fixes: 966bb5b71196 ("scsi: lpfc: Break up IO ctx list into a separate get and put list") Signed-off-by: Dan Carpenter Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit f557e32c0023ea0d67cdaa81b3398550dc1e4876 Author: Xiaofei Tan Date: Thu Jun 29 21:02:14 2017 +0800 scsi: hisi_sas: optimise DMA slot memory Currently we allocate 3 sets of DMA memories from separate pools for each slot. This is inefficient in terms of memory usage (buffers are less than 1 page in size, so we lose due to alignment), and also time spent in doing 3 allocations + de-allocations per slot, instead of 1. To optimise, combine the 3 DMA buffers into a single buffer from a single pool. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 47 ++++++++++++++------- drivers/scsi/hisi_sas/hisi_sas_main.c | 75 +++++++++------------------------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 31 +++++++------- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 37 ++++++++--------- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 36 ++++++++-------- 5 files changed, 104 insertions(+), 122 deletions(-) commit e4a80c31f2e863295cb2351f23ae486b0513a705 Author: Arvind Yadav Date: Thu Jun 29 13:24:41 2017 +0530 scsi: ibmvfc: constify dev_pm_ops structures. dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 41937 1296 20 43253 a8f5 drivers/scsi/ibmvscsi/ibmvfc.o File size After adding 'const': text data bss dec hex filename 42129 1104 20 43253 a8f5 drivers/scsi/ibmvscsi/ibmvfc.o Signed-off-by: Arvind Yadav Acked-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6b53a752ba76e1268b04052c9ec06555e3f6995 Author: Arvind Yadav Date: Thu Jun 29 13:13:55 2017 +0530 scsi: ibmvscsi: constify dev_pm_ops structures. dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 17956 1456 8 19420 4bdc drivers/scsi/ibmvscsi/ibmvscsi.o File size After adding 'const': text data bss dec hex filename 18164 1264 8 19436 4bec drivers/scsi/ibmvscsi/ibmvscsi.o Signed-off-by: Arvind Yadav Acked-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a4d9d7790422c4a92d8ca52e37c1e2b45d42c27 Author: Matthew R. Ochs Date: Wed Jun 28 12:14:37 2017 -0500 scsi: cxlflash: Update debug prints in reset handlers The device and host reset handler contain debug prints to help identify the entities being reset. Today these reset handlers are based on a SCSI EH design that uses a SCSI command reference as a means of identifying the target entity. As such, the debug trace includes the SCSI command pointer and associated CDB. This is not necessary as the SCSI command is simply the messenger in these scenarios. Refactor the debug prints in the host and reset handlers to only present information that is applicable given the function scope. Signed-off-by: Matthew R. Ochs Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 32abbedaafde5a0c1edfd07369dde73a4fda2554 Author: Matthew R. Ochs Date: Wed Jun 28 12:14:30 2017 -0500 scsi: cxlflash: Update send_tmf() parameters The current send_tmf() implementation is based on the caller providing a SCSI command reference. In reality all that is needed is a SCSI device reference as the routine uses a private command. Refactor send_tmf() to pass the private adapter configuration reference and a SCSI device reference. As a nice side effect, this will ease the burden of converting caller routines to be based solely off of a SCSI device reference. Signed-off-by: Matthew R. Ochs Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit acfeb23b29894deaee65d63c55bea09183f6b538 Author: Matthew R. Ochs Date: Wed Jun 28 12:14:21 2017 -0500 scsi: cxlflash: Avoid double free of character device The device_unregister() service used when cleaning up the character device is already responsible for the internal state associated with the device upon successful creation. As the cxlflash driver does not obtain a second reference to the character device, the explicit call to put_device() is not required and can lead to an inconsistent sysfs among other issues as the reference is no longer valid after the first put_device() is performed. Remove the unnecessary put_device() to remedy this issue. Fixes: a834a36b57d9 ("scsi: cxlflash: Create character device to provide host management interface") Signed-off-by: Matthew R. Ochs Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 1 - 1 file changed, 1 deletion(-) commit f1efece4e2a28df1635b20a6345a9cba034dbda5 Merge: 9cc9a5c fdcbe65 Author: David S. Miller Date: Sat Jul 1 13:58:44 2017 -0700 Merge tag 'wireless-drivers-next-for-davem-2017-06-30' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.13 Mostly fixes and cleanups, but iwlwifi and rtlwifi had also some new features. Major changes: iwlwifi * some changes in suspend/resume handling to support new FWs * Continued work towards the A000 family * support for a new version of the TX flush FW API * remove some noise from the kernel logs rtlwifi * more bluetooth coexistance improvements ==================== Signed-off-by: David S. Miller commit f9279c968c257ee39b0d7bd2571a4d231a67bcc1 Author: Ewan D. Milne Date: Tue Jun 27 14:55:58 2017 -0400 scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state The addition of the STARGET_REMOVE state had the side effect of introducing a race condition that can cause a crash. scsi_target_reap_ref_release() checks the starget->state to see if it still in STARGET_CREATED, and if so, skips calling transport_remove_device() and device_del(), because the starget->state is only set to STARGET_RUNNING after scsi_target_add() has called device_add() and transport_add_device(). However, if an rport loss occurs while a target is being scanned, it can happen that scsi_remove_target() will be called while the starget is still in the STARGET_CREATED state. In this case, the starget->state will be set to STARGET_REMOVE, and as a result, scsi_target_reap_ref_release() will take the wrong path. The end result is a panic: [ 1255.356653] Oops: 0000 [#1] SMP [ 1255.360154] Modules linked in: x86_pkg_temp_thermal kvm_intel kvm irqbypass crc32c_intel ghash_clmulni_i [ 1255.393234] CPU: 5 PID: 149 Comm: kworker/u96:4 Tainted: G W 4.11.0+ #8 [ 1255.401879] Hardware name: Dell Inc. PowerEdge R320/08VT7V, BIOS 2.0.22 11/19/2013 [ 1255.410327] Workqueue: scsi_wq_6 fc_scsi_scan_rport [scsi_transport_fc] [ 1255.417720] task: ffff88060ca8c8c0 task.stack: ffffc900048a8000 [ 1255.424331] RIP: 0010:kernfs_find_ns+0x13/0xc0 [ 1255.429287] RSP: 0018:ffffc900048abbf0 EFLAGS: 00010246 [ 1255.435123] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 1255.443083] RDX: 0000000000000000 RSI: ffffffff8188d659 RDI: 0000000000000000 [ 1255.451043] RBP: ffffc900048abc10 R08: 0000000000000000 R09: 0000012433fe0025 [ 1255.459005] R10: 0000000025e5a4b5 R11: 0000000025e5a4b5 R12: ffffffff8188d659 [ 1255.466972] R13: 0000000000000000 R14: ffff8805f55e5088 R15: 0000000000000000 [ 1255.474931] FS: 0000000000000000(0000) GS:ffff880616b40000(0000) knlGS:0000000000000000 [ 1255.483959] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1255.490370] CR2: 0000000000000068 CR3: 0000000001c09000 CR4: 00000000000406e0 [ 1255.498332] Call Trace: [ 1255.501058] kernfs_find_and_get_ns+0x31/0x60 [ 1255.505916] sysfs_unmerge_group+0x1d/0x60 [ 1255.510498] dpm_sysfs_remove+0x22/0x60 [ 1255.514783] device_del+0xf4/0x2e0 [ 1255.518577] ? device_remove_file+0x19/0x20 [ 1255.523241] attribute_container_class_device_del+0x1a/0x20 [ 1255.529457] transport_remove_classdev+0x4e/0x60 [ 1255.534607] ? transport_add_class_device+0x40/0x40 [ 1255.540046] attribute_container_device_trigger+0xb0/0xc0 [ 1255.546069] transport_remove_device+0x15/0x20 [ 1255.551025] scsi_target_reap_ref_release+0x25/0x40 [ 1255.556467] scsi_target_reap+0x2e/0x40 [ 1255.560744] __scsi_scan_target+0xaa/0x5b0 [ 1255.565312] scsi_scan_target+0xec/0x100 [ 1255.569689] fc_scsi_scan_rport+0xb1/0xc0 [scsi_transport_fc] [ 1255.576099] process_one_work+0x14b/0x390 [ 1255.580569] worker_thread+0x4b/0x390 [ 1255.584651] kthread+0x109/0x140 [ 1255.588251] ? rescuer_thread+0x330/0x330 [ 1255.592730] ? kthread_park+0x60/0x60 [ 1255.596815] ret_from_fork+0x29/0x40 [ 1255.600801] Code: 24 08 48 83 42 40 01 5b 41 5c 5d c3 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 [ 1255.621876] RIP: kernfs_find_ns+0x13/0xc0 RSP: ffffc900048abbf0 [ 1255.628479] CR2: 0000000000000068 [ 1255.632756] ---[ end trace 34a69ba0477d036f ]--- Fix this by adding another scsi_target state STARGET_CREATED_REMOVE to distinguish this case. Fixes: f05795d3d771 ("scsi: Add intermediate STARGET_REMOVE state to scsi_target_state") Reported-by: David Jeffery Signed-off-by: Ewan D. Milne Cc: Reviewed-by: Laurence Oberman Tested-by: Laurence Oberman Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 5 +++-- drivers/scsi/scsi_sysfs.c | 8 ++++++-- include/scsi/scsi_device.h | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) commit 62e62ffd95539b9220894a7900a619e0f3ef4756 Author: Maurizio Lombardi Date: Tue Jun 27 11:53:27 2017 +0200 scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails. The enclosure_add_device() function should fail if it can't create the relevant sysfs links. Cc: Signed-off-by: Maurizio Lombardi Tested-by: Douglas Miller Acked-by: James Bottomley Signed-off-by: Martin K. Petersen drivers/misc/enclosure.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 8dc0da7981a3f9680c873e92e3ec17308377e3b9 Author: Zang Leigang Date: Sat Jun 24 19:14:32 2017 +0800 scsi: ufs: flush eh_work when eh_work scheduled. Forget a condition: eh_work scheduled but do not start to work. Signed-off-by: Zang Leigang Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 578079fab3f89eda73d7f3bb3bdfdf650ab1b8ec Author: Johannes Thumshirn Date: Fri Jun 23 09:10:11 2017 +0200 scsi: qla2xxx: Protect access to qpair members with qpair->qp_lock In qla2xx_start_scsi_mq() and qla2xx_dif_start_scsi_mq() we grab the qpair->qp_lock but do access members of the qpair before having the lock. Re-order the locking sequence to have all read and write access to qpair members under the qpair->qp_lock. Signed-off-by: Johannes Thumshirn Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_iocb.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 9cc9a5cb176ccb4f2cda5ac34da5a659926f125f Author: Tonghao Zhang Date: Thu Jun 29 17:27:44 2017 -0700 datapath: Avoid using stack larger than 1024. When compiling OvS-master on 4.4.0-81 kernel, there is a warning: CC [M] /root/ovs/datapath/linux/datapath.o /root/ovs/datapath/linux/datapath.c: In function 'ovs_flow_cmd_set': /root/ovs/datapath/linux/datapath.c:1221:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=] This patch factors out match-init and action-copy to avoid "Wframe-larger-than=1024" warning. Because mask is only used to get actions, we new a function to save some stack space. Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/datapath.c | 81 +++++++++++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 23 deletions(-) commit 7e5988df26cdd7d823ab473ad3e3ca6623a66f21 Merge: 1383445 01a992b Author: David S. Miller Date: Sat Jul 1 09:08:42 2017 -0700 Merge branch 'sctp-remove-typedefs-from-structures-part-1' Xin Long says: ==================== sctp: remove typedefs from structures part 1 As we know, typedef is suggested not to use in kernel, even checkpatch.pl also gives warnings about it. Now sctp is using it for many structures. All this kind of typedef's using should be removed. As the 1st part, this patchset is to remove it for 11 basic structures in linux/sctp.h. It is also to fix some indents. No any code's logic is changed in these patches, only cleaning up. ==================== Signed-off-by: David S. Miller commit 01a992bea523d9568cf56a02003c15c9dc40eb20 Author: Xin Long Date: Fri Jun 30 11:52:22 2017 +0800 sctp: remove the typedef sctp_init_chunk_t This patch is to remove the typedef sctp_init_chunk_t, and replace with struct sctp_init_chunk in the places where it's using this typedef. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 6 +++--- include/net/sctp/command.h | 4 ++-- include/net/sctp/structs.h | 4 ++-- net/sctp/input.c | 4 ++-- net/sctp/sm_make_chunk.c | 6 +++--- net/sctp/sm_sideeffect.c | 2 +- net/sctp/sm_statefuns.c | 28 ++++++++++++++-------------- 7 files changed, 27 insertions(+), 27 deletions(-) commit 4ae70c0845faba3096aa2be4b2ebfcc3ac590a67 Author: Xin Long Date: Fri Jun 30 11:52:21 2017 +0800 sctp: remove the typedef sctp_inithdr_t This patch is to remove the typedef sctp_inithdr_t, and replace with struct sctp_inithdr in the places where it's using this typedef. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 6 +++--- net/netfilter/nf_conntrack_proto_sctp.c | 4 ++-- net/sctp/sm_make_chunk.c | 4 ++-- net/sctp/sm_statefuns.c | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) commit 9f8d31471548d9b74609335f9a3c75c7b664c8b4 Author: Xin Long Date: Fri Jun 30 11:52:20 2017 +0800 sctp: remove the typedef sctp_data_chunk_t This patch is to remove the typedef sctp_data_chunk_t, and replace with struct sctp_data_chunk in the places where it's using this typedef. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 4 ++-- include/net/sctp/constants.h | 2 +- include/net/sctp/sm.h | 2 +- net/sctp/output.c | 4 ++-- net/sctp/sm_statefuns.c | 6 +++--- net/sctp/ulpqueue.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) commit 3583df1a3d7328b42cf116db3fb56b0368fab12b Author: Xin Long Date: Fri Jun 30 11:52:19 2017 +0800 sctp: remove the typedef sctp_datahdr_t This patch is to remove the typedef sctp_datahdr_t, and replace with struct sctp_datahdr in the places where it's using this typedef. It is also to use izeof(variable) instead of sizeof(type). Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 6 +++--- net/sctp/sm_statefuns.c | 13 ++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) commit 0664ed4378907c936fbee811efe95650d32baf34 Author: Xin Long Date: Fri Jun 30 11:52:18 2017 +0800 sctp: remove the typedef sctp_param_action_t Remove this typedef, there is even no places using it. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34b4e29b383559e3848eea30af66e94aa72af88c Author: Xin Long Date: Fri Jun 30 11:52:17 2017 +0800 sctp: remove the typedef sctp_param_t This patch is to remove the typedef sctp_param_t, and replace with struct sctp_paramhdr in the places where it's using this typedef. It is also to remove the useless declaration sctp_addip_addr_config and fix the lack of params for some other functions' declaration. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 4 ++-- include/net/sctp/sm.h | 14 ++++++-------- net/sctp/sm_make_chunk.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) commit 3c9187049214127d3401926b033d05eb75d69c39 Author: Xin Long Date: Fri Jun 30 11:52:16 2017 +0800 sctp: remove the typedef sctp_paramhdr_t This patch is to remove the typedef sctp_paramhdr_t, and replace with struct sctp_paramhdr in the places where it's using this typedef. It is also to fix some indents and use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 44 +++++++++++++++++++++---------------------- include/net/sctp/sctp.h | 2 +- include/net/sctp/structs.h | 5 +++-- net/sctp/associola.c | 6 +++--- net/sctp/auth.c | 22 +++++++++++++--------- net/sctp/endpointola.c | 7 ++++--- net/sctp/sm_make_chunk.c | 47 +++++++++++++++++++++++----------------------- net/sctp/sm_statefuns.c | 6 +++--- net/sctp/socket.c | 7 ++++--- net/sctp/stream.c | 4 ++-- 10 files changed, 79 insertions(+), 71 deletions(-) commit ec431c2cd55c4122e729b7dc45956653a038614b Author: Xin Long Date: Fri Jun 30 11:52:15 2017 +0800 sctp: remove the typedef sctp_cid_action_t Remove this typedef, there is even no places using it. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d85e68f4cde48f8c2fac6d9c00ca6988cf6e327 Author: Xin Long Date: Fri Jun 30 11:52:14 2017 +0800 sctp: remove the typedef sctp_cid_t This patch is to remove the typedef sctp_cid_t, and replace with struct sctp_cid in the places where it's using this typedef. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 4 ++-- include/net/sctp/auth.h | 6 ++++-- include/net/sctp/constants.h | 4 ++-- include/net/sctp/structs.h | 2 +- net/sctp/auth.c | 6 +++--- net/sctp/sm_make_chunk.c | 4 ++-- net/sctp/sm_statetable.c | 4 ++-- 7 files changed, 16 insertions(+), 14 deletions(-) commit 922dbc5be2186659d2c453a53f2ae569e55b6101 Author: Xin Long Date: Fri Jun 30 11:52:13 2017 +0800 sctp: remove the typedef sctp_chunkhdr_t This patch is to remove the typedef sctp_chunkhdr_t, and replace with struct sctp_chunkhdr in the places where it's using this typedef. It is also to fix some indents and use sizeof(variable) instead of sizeof(type)., especially in sctp_new. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 34 ++++++++--------- include/net/sctp/sctp.h | 2 +- net/netfilter/ipvs/ip_vs_core.c | 4 +- net/netfilter/ipvs/ip_vs_proto_sctp.c | 6 +-- net/netfilter/nf_conntrack_proto_sctp.c | 29 +++++++------- net/netfilter/xt_sctp.c | 4 +- net/sctp/input.c | 20 +++++----- net/sctp/inqueue.c | 15 ++++---- net/sctp/sm_make_chunk.c | 17 +++++---- net/sctp/sm_sideeffect.c | 5 ++- net/sctp/sm_statefuns.c | 67 +++++++++++++++++---------------- net/sctp/ulpevent.c | 2 +- 12 files changed, 102 insertions(+), 103 deletions(-) commit ae146d9b76589d636d11c5e4382bbba2fe8bdb9b Author: Xin Long Date: Fri Jun 30 11:52:12 2017 +0800 sctp: remove the typedef sctp_sctphdr_t This patch is to remove the typedef sctp_sctphdr_t, and replace with struct sctphdr in the places where it's using this typedef. It is also to fix some indents and use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 4 ++-- net/netfilter/ipset/ip_set_getport.c | 4 ++-- net/netfilter/ipvs/ip_vs_core.c | 6 +++--- net/netfilter/ipvs/ip_vs_proto_sctp.c | 15 +++++++-------- net/netfilter/nf_conntrack_proto_sctp.c | 2 +- net/netfilter/nf_nat_proto_sctp.c | 2 +- net/netfilter/xt_sctp.c | 16 ++++++++-------- 7 files changed, 24 insertions(+), 25 deletions(-) commit 13834451950f557cbbc3129426e72e763f2d63ee Merge: 7f304b9 81f3ddf Author: David S. Miller Date: Sat Jul 1 08:51:33 2017 -0700 Merge branch 'nfp-introduce-flower-offload-capabilities' Simon Horman says: ==================== nfp: introduce flower offload capabilities this series adds flower offload to the NFP driver. It builds on recent work to add representor and a skeleton flower app - now the app does what its name says. In general the approach taken is to allow some flows within the universe of possible flower matches and tc actions to be offloaded. It is planned that this support will grow over time but the support offered by this patch-set seems to be a reasonable starting point. Key Changes since v2: * Revised flow structures to simplify setup/teardown and locking of stats * Addressed other code-change review of v2 Other review questions regarding v2 have been answered on netdev. ==================== Signed-off-by: David S. Miller commit 81f3ddf2547d40c3d4878aa66ce837177665ce3c Author: Pieter Jansen van Vuuren Date: Thu Jun 29 22:08:19 2017 +0200 nfp: add control message passing capabilities to flower offloads Previously the flower offloads never sends messages to the hardware, and never registers a handler for receiving messages from hardware. This patch enables the flower offloads to send control messages to hardware when adding and removing flow rules. Additionally it registers a control message rx handler for receiving stats updates from hardware for each offloaded flow. Additionally this patch adds 4 control message types; Add, modify and delete flow, as well as flow stats. It also allows nfp_flower_cmsg_get_data() to be used outside of cmsg.c. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 6 ++- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 6 +++ .../net/ethernet/netronome/nfp/flower/offload.c | 59 ++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) commit abfcdc1de9bf38cdde6792a165c75d9037ea35fe Author: Pieter Jansen van Vuuren Date: Thu Jun 29 22:08:18 2017 +0200 nfp: add a stats handler for flower offloads Previously there was no way of updating flow rule stats after they have been offloaded to hardware. This is solved by keeping track of stats received from hardware and providing this to the TC handler on request. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 5 - drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 5 + drivers/net/ethernet/netronome/nfp/flower/main.h | 28 +++++ .../net/ethernet/netronome/nfp/flower/metadata.c | 124 ++++++++++++++++++++- .../net/ethernet/netronome/nfp/flower/offload.c | 17 ++- 5 files changed, 171 insertions(+), 8 deletions(-) commit 43f84b72c50d40c3eb2f59070e40ef51bfd483cc Author: Pieter Jansen van Vuuren Date: Thu Jun 29 22:08:17 2017 +0200 nfp: add metadata to each flow offload Adds metadata describing the mask id of each flow and keeps track of flows installed in hardware. Previously a flow could not be removed from hardware as there was no way of knowing if that a specific flow was installed. This is solved by storing the offloaded flows in a hash table. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/flower/main.c | 21 +- drivers/net/ethernet/netronome/nfp/flower/main.h | 54 ++++ .../net/ethernet/netronome/nfp/flower/metadata.c | 318 +++++++++++++++++++++ .../net/ethernet/netronome/nfp/flower/offload.c | 31 +- 5 files changed, 412 insertions(+), 13 deletions(-) commit 1a1e586f54bfe54a0ba7ea0ac9b8c7b1d3e655f6 Author: Pieter Jansen van Vuuren Date: Thu Jun 29 22:08:16 2017 +0200 nfp: add basic action capabilities to flower offloads Adds push vlan, pop vlan, output and drop action capabilities to flower offloads. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/flower/action.c | 211 +++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 45 +++++ drivers/net/ethernet/netronome/nfp/flower/main.h | 3 + .../net/ethernet/netronome/nfp/flower/offload.c | 11 ++ 5 files changed, 271 insertions(+) commit 5571e8c9f2419c19916d4a707ba359602e0a85d7 Author: Pieter Jansen van Vuuren Date: Thu Jun 29 22:08:15 2017 +0200 nfp: extend flower matching capabilities Extends matching capabilities for flower offloads to include vlan, layer 2, layer 3 and layer 4 type matches. This includes both exact and wildcard matching. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 4 + drivers/net/ethernet/netronome/nfp/flower/main.h | 5 + drivers/net/ethernet/netronome/nfp/flower/match.c | 292 +++++++++++++++++++++ .../net/ethernet/netronome/nfp/flower/offload.c | 6 +- drivers/net/ethernet/netronome/nfp/nfp_net_repr.h | 9 + 6 files changed, 316 insertions(+), 1 deletion(-) commit af9d842c13549cf306259b7b9c932c6c885ba94b Author: Pieter Jansen van Vuuren Date: Thu Jun 29 22:08:14 2017 +0200 nfp: extend flower add flow offload Extends the flower flow add function by calculating which match fields are present in the flower offload structure and allocating the appropriate space to describe these. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 141 ++++++++++++++++++ drivers/net/ethernet/netronome/nfp/flower/main.h | 24 +++ .../net/ethernet/netronome/nfp/flower/offload.c | 161 ++++++++++++++++++++- 3 files changed, 325 insertions(+), 1 deletion(-) commit 8a2768732a4dfdaabdbea18603330922fb0ee773 Author: Pieter Jansen van Vuuren Date: Thu Jun 29 22:08:13 2017 +0200 nfp: provide infrastructure for offloading flower based TC filters Adds a flower based TC offload handler for representor devices, this is in addition to the bpf based offload handler. The changes in this patch will be used in a follow-up patch to add tc flower offload to the NFP. The flower app enables tc offloads on representors by default. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 3 +- drivers/net/ethernet/netronome/nfp/flower/main.c | 20 ++++ drivers/net/ethernet/netronome/nfp/flower/main.h | 45 ++++++++ .../net/ethernet/netronome/nfp/flower/offload.c | 127 +++++++++++++++++++++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 14 +-- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 6 + drivers/net/ethernet/netronome/nfp/nfp_port.c | 15 +++ drivers/net/ethernet/netronome/nfp/nfp_port.h | 4 + 8 files changed, 220 insertions(+), 14 deletions(-) commit 8f15df600dff00c8f28c8588bdd4dca55dff690b Author: Simon Horman Date: Thu Jun 29 22:08:12 2017 +0200 nfp: add phys_switch_id support Add phys_switch_id support by allowing lookup of SWITCHDEV_ATTR_ID_PORT_PARENT_ID via the nfp_repr_port_attr_get switchdev operation. This is visible to user-space in the phys_switch_id attribute of a netdev. e.g. cd /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 find . -name phys_switch_id | xargs grep . ./net/eth3/phys_switch_id:00154d1300bd ./net/eth4/phys_switch_id:00154d1300bd ./net/eth2/phys_switch_id:00154d1300bd grep: ./net/eth5/phys_switch_id: Operation not supported In the above eth2 and eth3 and representor netdevs for the first and second physical port. eth4 is the representor for the PF. And eth5 is the PF netdev. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 3 +++ drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 2 ++ drivers/net/ethernet/netronome/nfp/nfp_port.c | 29 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_port.h | 2 ++ 4 files changed, 36 insertions(+) commit d643a75ac2bcc559994405d29c50ed086aeae434 Author: Simon Horman Date: Thu Jun 29 22:08:11 2017 +0200 net: switchdev: add SET_SWITCHDEV_OPS helper Add a helper to allow switchdev ops to be set if NET_SWITCHDEV is configured and do nothing otherwise. This allows for slightly cleaner code which uses switchdev but does not select NET_SWITCHDEV. Signed-off-by: Simon Horman Acked-by: Ivan Vecera Signed-off-by: David S. Miller include/net/switchdev.h | 4 ++++ 1 file changed, 4 insertions(+) commit 759d6a9641d7f52f9311aae4f2d90058adad3ac2 Author: Jerry Hoemann Date: Fri Jun 30 20:41:29 2017 -0700 libnvdimm: New ACPI 6.2 DSM functions ACPI 6.2 added new NVDIMM root DSM functions. Define their data structures. Signed-off-by: Jerry Hoemann Signed-off-by: Dan Williams include/uapi/linux/ndctl.h | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit 41f95db7b999774fc70b5905c77436d019a910eb Author: Jerry Hoemann Date: Fri Jun 30 20:41:28 2017 -0700 acpi, nfit: Show bus_dsm_mask in sysfs Display bus_dsm_mask in sysfs as /sys/bus/nd/devices/ndbusX/nfit/dsm_mask. Signed-off-by: Jerry Hoemann Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7db5bb33add5afe6c64e00516b0c928bfc937466 Author: Jerry Hoemann Date: Fri Jun 30 20:53:24 2017 -0700 libnvdimm, acpi, nfit: Add bus level dsm mask for pass thru. Add a bus level dsm_mask to nvdimm_bus_descriptor to allow the passthru calling mechanism to specify a different mask from the cmd_mask. Populate bus_dsm_mask and use it to filter dsm calls that user can make through the pass thru interface. Signed-off-by: Jerry Hoemann [djbw: use command number constants instead of a magic mask value] Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 27 +++++++++++++++++++++++++++ include/linux/libnvdimm.h | 1 + 2 files changed, 28 insertions(+) commit 37d74841b9d42b105cba053e70e9db0e395949da Author: Jerry Hoemann Date: Fri Jun 30 20:41:24 2017 -0700 acpi, nfit: Enable DSM pass thru for root functions. Set ND_CMD_CALL in the cmd_mask to enable calling root functions via the pass thru mechanism. Signed-off-by: Jerry Hoemann Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 1 + include/uapi/linux/ndctl.h | 1 + 2 files changed, 2 insertions(+) commit 53b85a449b15e0e2e6727d8855e4c8b7627577e1 Author: Jerry Hoemann Date: Fri Jun 30 20:41:22 2017 -0700 libnvdimm: passthru functions clear to send Have dsm functions called via the pass thru mechanism also be checked against clear to send. Signed-off-by: Jerry Hoemann Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e6be2dcbefdb7c3817889363cee3e933695cba21 Author: Vishal Verma Date: Fri Jun 30 18:32:51 2017 -0600 libnvdimm, btt: convert some info messages to warn/err Some critical messages such as IO errors, metadata failures were printed with dev_info. Make them louder by upgrading them to dev_warn or dev_error. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7f304b9efabbad584b093289d135bebdc09b222e Author: Xin Long Date: Thu Jun 29 17:28:06 2017 +0800 sctp: remove an unnecessary check from sctp_endpoint_destroy ep->base.sk gets it's value since sctp_endpoint_new, nowhere will change it. So there's no need to check if it's null, as it can never be null. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/endpointola.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 0b58e6db0fa6382bf9ea50cf6779d9d7b44a033e Merge: 574a602 fb5c2c1 Author: David S. Miller Date: Sat Jul 1 07:39:09 2017 -0700 Merge branch 'net-refcount_t' Elena Reshetova says: ==================== v3 net generic subsystem refcount conversions Changes in v3: Rebased on top of the net-next tree. Changes in v2: No changes in patches apart from rebases, but now by default refcount_t = atomic_t (*) and uses all atomic standard operations unless CONFIG_REFCOUNT_FULL is enabled. This is a compromise for the systems that are critical on performance (such as net) and cannot accept even slight delay on the refcounter operations. This series, for core network subsystem components, replaces atomic_t reference counters with the new refcount_t type and API (see include/linux/refcount.h). By doing this we prevent intentional or accidental underflows or overflows that can led to use-after-free vulnerabilities. These patches contain only generic net pieces. Other changes will be sent separately. The patches are fully independent and can be cherry-picked separately. The big patches, such as conversions for sock structure, need a very detailed look from maintainers: refcount managing is quite complex in them and while it seems that they would benefit from the change, extra checking is needed. The biggest corner issue is the fact that refcount_inc() does not increment from zero. If there are no objections to the patches, please merge them via respective trees. * The respective change is currently merged into -next as "locking/refcount: Create unchecked atomic_t implementation". ==================== Signed-off-by: David S. Miller commit fb5c2c17a556d9b00798d6a6b9e624281ee2eb28 Author: Reshetova, Elena Date: Fri Jun 30 13:08:10 2017 +0300 net: convert packet_fanout.sk_ref from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller net/packet/af_packet.c | 8 ++++---- net/packet/internal.h | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) commit b4217b82893c23f9f45f77914b5aa3b662b75332 Author: Reshetova, Elena Date: Fri Jun 30 13:08:09 2017 +0300 net: convert netlbl_lsm_cache.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/netlabel.h | 8 ++++---- net/ipv4/cipso_ipv4.c | 4 ++-- net/ipv6/calipso.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit c122e14df2d64311d1f0c0bbf4d8f42a7a8baf41 Author: Reshetova, Elena Date: Fri Jun 30 13:08:08 2017 +0300 net: convert net.passive from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/net_namespace.h | 3 ++- net/core/net-sysfs.c | 2 +- net/core/net_namespace.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) commit edcb691871b27c3cc463b7291afe75f1c3423406 Author: Reshetova, Elena Date: Fri Jun 30 13:08:07 2017 +0300 net: convert inet_frag_queue.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/inet_frag.h | 4 ++-- net/ipv4/inet_fragment.c | 14 +++++++------- net/ipv4/ip_fragment.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) commit 717d1e993ad8d24a711775d8f2afbcdc76a520a1 Author: Reshetova, Elena Date: Fri Jun 30 13:08:06 2017 +0300 net: convert fib_rule.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/fib_rules.h | 7 ++++--- net/core/fib_rules.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit 8c9814b97002f61846ebf3048e8df5aae52f7828 Author: Reshetova, Elena Date: Fri Jun 30 13:08:05 2017 +0300 net: convert unix_address.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/af_unix.h | 3 ++- net/unix/af_unix.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit 433cea4d9bbb83cc848b80c51bb849a2ceb49379 Author: Reshetova, Elena Date: Fri Jun 30 13:08:04 2017 +0300 net: convert netpoll_info.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/linux/netpoll.h | 3 ++- net/core/netpoll.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 7658b36f1b3122c298213eed344f622e836b281b Author: Reshetova, Elena Date: Fri Jun 30 13:08:03 2017 +0300 net: convert in_device.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/linux/inetdevice.h | 11 ++++++----- net/ipv4/devinet.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) commit 8851ab526791530d00bbbd0952512d68684a44b8 Author: Reshetova, Elena Date: Fri Jun 30 13:08:02 2017 +0300 net: convert ip_mc_list.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/linux/igmp.h | 3 ++- net/ipv4/igmp.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) commit 41c6d650f6537e55a1b53438c646fbc3f49176bf Author: Reshetova, Elena Date: Fri Jun 30 13:08:01 2017 +0300 net: convert sock.sk_refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. This patch uses refcount_inc_not_zero() instead of atomic_inc_not_zero_hint() due to absense of a _hint() version of refcount API. If the hint() version must be used, we might need to revisit API. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller crypto/algif_aead.c | 2 +- include/net/inet_hashtables.h | 4 ++-- include/net/request_sock.h | 9 +++++---- include/net/sock.h | 17 +++++++++-------- net/atm/proc.c | 2 +- net/bluetooth/af_bluetooth.c | 2 +- net/bluetooth/rfcomm/sock.c | 2 +- net/core/skbuff.c | 6 +++--- net/core/sock.c | 6 +++--- net/ipv4/inet_connection_sock.c | 2 +- net/ipv4/inet_hashtables.c | 4 ++-- net/ipv4/inet_timewait_sock.c | 8 ++++---- net/ipv4/ping.c | 4 ++-- net/ipv4/raw.c | 2 +- net/ipv4/syncookies.c | 2 +- net/ipv4/tcp_fastopen.c | 2 +- net/ipv4/tcp_ipv4.c | 4 ++-- net/ipv4/udp.c | 6 +++--- net/ipv4/udp_diag.c | 4 ++-- net/ipv6/datagram.c | 2 +- net/ipv6/inet6_hashtables.c | 4 ++-- net/ipv6/tcp_ipv6.c | 4 ++-- net/ipv6/udp.c | 4 ++-- net/key/af_key.c | 2 +- net/l2tp/l2tp_debugfs.c | 3 +-- net/llc/llc_conn.c | 8 ++++---- net/llc/llc_sap.c | 2 +- net/netfilter/xt_TPROXY.c | 4 ++-- net/netlink/af_netlink.c | 6 +++--- net/packet/af_packet.c | 2 +- net/phonet/socket.c | 2 +- net/rxrpc/af_rxrpc.c | 2 +- net/sched/em_meta.c | 2 +- net/tipc/socket.c | 2 +- net/unix/af_unix.c | 2 +- 35 files changed, 70 insertions(+), 69 deletions(-) commit 14afee4b6092fde451ee17604e5f5c89da33e71e Author: Reshetova, Elena Date: Fri Jun 30 13:08:00 2017 +0300 net: convert sock.sk_wmem_alloc from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller drivers/atm/fore200e.c | 12 +----------- drivers/atm/he.c | 2 +- drivers/atm/idt77252.c | 4 ++-- include/linux/atmdev.h | 2 +- include/net/sock.h | 8 ++++---- net/atm/br2684.c | 2 +- net/atm/clip.c | 2 +- net/atm/common.c | 10 +++++----- net/atm/lec.c | 4 ++-- net/atm/mpc.c | 4 ++-- net/atm/pppoatm.c | 2 +- net/atm/raw.c | 2 +- net/atm/signaling.c | 2 +- net/caif/caif_socket.c | 2 +- net/core/datagram.c | 2 +- net/core/skbuff.c | 2 +- net/core/sock.c | 26 +++++++++++++------------- net/ipv4/af_inet.c | 2 +- net/ipv4/esp4.c | 2 +- net/ipv4/ip_output.c | 6 +++--- net/ipv4/tcp.c | 4 ++-- net/ipv4/tcp_offload.c | 2 +- net/ipv4/tcp_output.c | 15 +++++++-------- net/ipv6/esp6.c | 2 +- net/ipv6/ip6_output.c | 4 ++-- net/kcm/kcmproc.c | 2 +- net/key/af_key.c | 2 +- net/netlink/af_netlink.c | 2 +- net/packet/af_packet.c | 4 ++-- net/phonet/socket.c | 2 +- net/rds/tcp_send.c | 2 +- net/rxrpc/af_rxrpc.c | 4 ++-- net/sched/sch_atm.c | 2 +- net/sctp/output.c | 2 +- net/sctp/proc.c | 2 +- net/sctp/socket.c | 4 ++-- net/unix/af_unix.c | 6 +++--- 37 files changed, 74 insertions(+), 85 deletions(-) commit 2638595afccf6554bfe55268ff9b2d3ac3dff2e6 Author: Reshetova, Elena Date: Fri Jun 30 13:07:59 2017 +0300 net: convert sk_buff_fclones.fclone_ref from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/linux/skbuff.h | 4 ++-- net/core/skbuff.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit 633547973ffc32fd2c815639d4675e1531f0896f Author: Reshetova, Elena Date: Fri Jun 30 13:07:58 2017 +0300 net: convert sk_buff.users from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller drivers/infiniband/hw/nes/nes_cm.c | 4 ++-- drivers/isdn/mISDN/socket.c | 2 +- drivers/net/rionet.c | 2 +- drivers/s390/net/ctcm_main.c | 26 +++++++++++++------------- drivers/s390/net/netiucv.c | 10 +++++----- drivers/s390/net/qeth_core_main.c | 4 ++-- include/linux/skbuff.h | 10 +++++----- net/core/datagram.c | 4 ++-- net/core/dev.c | 10 +++++----- net/core/netpoll.c | 4 ++-- net/core/pktgen.c | 16 ++++++++-------- net/core/rtnetlink.c | 2 +- net/core/skbuff.c | 8 ++++---- net/dccp/ipv6.c | 2 +- net/ipv6/syncookies.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- net/key/af_key.c | 4 ++-- net/netlink/af_netlink.c | 6 +++--- net/rxrpc/skbuff.c | 12 ++++++------ net/sctp/outqueue.c | 2 +- net/sctp/socket.c | 2 +- 21 files changed, 67 insertions(+), 67 deletions(-) commit 53869cebce4bc53f71a080e7830600d4ae1ab712 Author: Reshetova, Elena Date: Fri Jun 30 13:07:57 2017 +0300 net: convert nf_bridge_info.use from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/linux/skbuff.h | 6 +++--- include/net/netfilter/br_netfilter.h | 2 +- net/bridge/br_netfilter_hooks.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 6343944bc1050dcec7c959f484ee0fb6928db3be Author: Reshetova, Elena Date: Fri Jun 30 13:07:56 2017 +0300 net: convert neigh_params.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/neighbour.h | 6 +++--- net/core/neighbour.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit 9f23743017d11c103b38d2fa1f64674baeca41cd Author: Reshetova, Elena Date: Fri Jun 30 13:07:55 2017 +0300 net: convert neighbour.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/arp.h | 2 +- include/net/ndisc.h | 2 +- include/net/neighbour.h | 9 +++++---- net/atm/clip.c | 6 +++--- net/core/neighbour.c | 14 +++++++------- net/decnet/dn_neigh.c | 2 +- 6 files changed, 18 insertions(+), 17 deletions(-) commit 1cc9a98b59ba92fece1277f76aa43e05f34936a6 Author: Reshetova, Elena Date: Fri Jun 30 13:07:54 2017 +0300 net: convert inet_peer.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. This conversion requires overall +1 on the whole refcounting scheme. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David S. Miller include/net/inetpeer.h | 4 ++-- net/ipv4/inetpeer.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 8b24e69fc47e43679bb29ddb481aa0e8dce2a3c5 Author: Paul Mackerras Date: Mon Jun 26 15:45:51 2017 +1000 KVM: PPC: Book3S HV: Close race with testing for signals on guest entry At present, interrupts are hard-disabled fairly late in the guest entry path, in the assembly code. Since we check for pending signals for the vCPU(s) task(s) earlier in the guest entry path, it is possible for a signal to be delivered before we enter the guest but not be noticed until after we exit the guest for some other reason. Similarly, it is possible for the scheduler to request a reschedule while we are in the guest entry path, and we won't notice until after we have run the guest, potentially for a whole timeslice. Furthermore, with a radix guest on POWER9, we can take the interrupt with the MMU on. In this case we end up leaving interrupts hard-disabled after the guest exit, and they are likely to stay hard-disabled until we exit to userspace or context-switch to another process. This was masking the fact that we were also not setting the RI (recoverable interrupt) bit in the MSR, meaning that if we had taken an interrupt, it would have crashed the host kernel with an unrecoverable interrupt message. To close these races, we need to check for signals and reschedule requests after hard-disabling interrupts, and then keep interrupts hard-disabled until we enter the guest. If there is a signal or a reschedule request from another CPU, it will send an IPI, which will cause a guest exit. This puts the interrupt disabling before we call kvmppc_start_thread() for all the secondary threads of this core that are going to run vCPUs. The reason for that is that once we have started the secondary threads there is no easy way to back out without going through at least part of the guest entry path. However, kvmppc_start_thread() includes some code for radix guests which needs to call smp_call_function(), which must be called with interrupts enabled. To solve this problem, this patch moves that code into a separate function that is called earlier. When the guest exit is caused by an external interrupt, a hypervisor doorbell or a hypervisor maintenance interrupt, we now handle these using the replay facility. __kvmppc_vcore_entry() now returns the trap number that caused the exit on this thread, and instead of the assembly code jumping to the handler entry, we return to C code with interrupts still hard-disabled and set the irq_happened flag in the PACA, so that when we do local_irq_enable() the appropriate handler gets called. With all this, we now have the interrupt soft-enable flag clear while we are in the guest. This is useful because code in the real-mode hypercall handlers that checks whether interrupts are enabled will now see that they are disabled, which is correct, since interrupts are hard-disabled in the real-mode code. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 140 +++++++++++++++++++++++++------- arch/powerpc/kvm/book3s_hv_interrupts.S | 8 +- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 58 ++++--------- 3 files changed, 127 insertions(+), 79 deletions(-) commit 898b25b202f3504335ae00055d7a2863bd93f2f8 Author: Paul Mackerras Date: Thu Jun 22 15:08:42 2017 +1000 KVM: PPC: Book3S HV: Simplify dynamic micro-threading code Since commit b009031f74da ("KVM: PPC: Book3S HV: Take out virtual core piggybacking code", 2016-09-15), we only have at most one vcore per subcore. Previously, the fact that there might be more than one vcore per subcore meant that we had the notion of a "master vcore", which was the vcore that controlled thread 0 of the subcore. We also needed a list per subcore in the core_info struct to record which vcores belonged to each subcore. Now that there can only be one vcore in the subcore, we can replace the list with a simple pointer and get rid of the notion of the master vcore (and in fact treat every vcore as a master vcore). We can also get rid of the subcore_vm[] field in the core_info struct since it is never read. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s.h | 1 - arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +- arch/powerpc/kvm/book3s_hv.c | 88 +++++++++++++------------------ arch/powerpc/kvm/book3s_hv_builtin.c | 2 +- 4 files changed, 39 insertions(+), 54 deletions(-) commit 23acd3e1a0a377cf3730ccb753aa1fdc50378396 Merge: e91c8d9 644e084 Author: Ingo Molnar Date: Sat Jul 1 10:39:25 2017 +0200 Merge tag 'perf-core-for-mingo-4.13-20170630' 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: Intel PT enhancements: - Support "ptwrite" instruction, a way to stuff 32 or 64 bit values into the Intel PT trace (Adrian Hunter) - Support power events in Intel PT to report changes to C-state (Adrian Hunter) - Synthesize Intel PT events as PERF_RECORD_SAMPLE records with a perf_event_attr.type (PERF_TYPE_SYNTH) just after the range used by the kernel, i.e. right after what is allocated for PMUs, at INT_MAX + 1U, attr.config will have the identification for the synthesized event and the PERF_SAMPLE_RAW payload will have its fields (Adrian Hunter) Infrastructure changes: - Remove warning() and error(), using instead pr_warning() and pr_error(), consolidating error reporting (Arnaldo Carvalho de Melo) - Add platform dependency to 'perf test 15' (Thomas Richter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 7720113516eacd7b91272c2298b1b392ae1ae436 Author: Gustavo A. R. Silva Date: Fri Jun 30 17:34:23 2017 -0500 ALSA: atmel: ac97c: fix error return code in atmel_ac97c_probe() platform_get_irq() returns an error code, but the ac97c driver ignores it and always returns -ENXIO. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Notice that platform_get_irq() no longer returns 0 on error. Print and propagate the return value of platform_get_irq on failure. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Takashi Iwai sound/atmel/ac97c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d791db9a57ab7f390916dce0fa1315130bb6664c Author: Arvind Yadav Date: Fri Jun 30 10:39:47 2017 +0530 platform/x86: sony-laptop: constify attribute_group and input index array attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. The content of sony_laptop_input_index does not change and is declared as a static global array. Constify spic_attribute_group and sony_laptop_input_index. File size before: text data bss dec hex filename 31273 5176 372 36821 8fd5 drivers/platform/x86/sony-laptop.o File size After adding 'const': text data bss dec hex filename 31337 5112 372 36821 8fd5 drivers/platform/x86/sony-laptop.o Signed-off-by: Arvind Yadav [dvhart: updated commit message, includes fix suggested by Arnd Bergmann] Signed-off-by: Andy Shevchenko Signed-off-by: Darren Hart (VMware) drivers/platform/x86/sony-laptop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eee77da1a7f02fd114288c4c379fed3d2ca4593d Author: Michał Kępień Date: Fri Jun 16 06:40:58 2017 +0200 platform/x86: fujitsu-laptop: rework debugging Using a dedicated Kconfig option for enabling debugging means the user may be forced to recompile their kernel in order to gather debugging information, which is inconvenient. Replace custom debugging infrastructure with standard logging functions, taking advantage of dynamic debug. Replace a pr_info() call inside an ACPI callback with an acpi_handle_info() call. The following mapping was used: - FUJLAPTOP_DBG_ERROR -> acpi_handle_err() - FUJLAPTOP_DBG_WARN -> acpi_handle_info() / dev_info() - FUJLAPTOP_DBG_INFO -> acpi_handle_debug() - FUJLAPTOP_DBG_TRACE -> acpi_handle_debug() / dev_dbg() This means that some events which used to only be logged when the user explicitly requested it will now be logged by default: - ACPI method evaluation errors, - unknown ACPI notification codes, - unknown hotkey scancodes. The first type of events should happen rarely, if ever at all. The rest is interesting from driver development perspective as their presence in the logs will mean the driver is unaware of certain events, handling of which should be implemented. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 10 ----- drivers/platform/x86/fujitsu-laptop.c | 78 +++++++++++++---------------------- 2 files changed, 28 insertions(+), 60 deletions(-) commit 32c28f1f431f1c1c6db3491820a0086ddcd317c6 Author: Michał Kępień Date: Fri Jun 16 06:40:57 2017 +0200 platform/x86: fujitsu-laptop: do not evaluate ACPI _INI methods acpi_ns_initialize_devices(), which is called during system-wide ACPI initialization, already detects and calls all _INI methods belonging to objects present in ACPI tables. There is no need to call these methods again every time the module is loaded because they only initialize status flags and hotkey-related variables; status flags are effectively constants, hotkey-related variables may be assigned non-zero values before acpi_fujitsu_laptop_add() is called, but that does not really matter as we drain the scancodes queued in the firmware's ring buffer before doing anything else. Remove sections of code which invoke and check evaluation status of the _INI methods belonging to the ACPI devices handled by the driver. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 1c1946269f6a7b3c96a7164f0c9b48854ac8a6e2 Author: Michał Kępień Date: Fri Jun 16 06:40:56 2017 +0200 platform/x86: fujitsu-laptop: do not update ACPI device power status Calling acpi_bus_update_power() for ACPI devices FUJ02B1 and FUJ02E3 is pointless as they are not power manageable (neither _PS0 nor _PR0 is defined for any of them), which causes their power state to be inherited from their parent devices. Given the ACPI paths of these two devices (\_SB.PCI0.LPCB.FJEX, \_SB.FEXT), their parent devices are also not power manageable. These parent devices will thus have their power state initialized to ACPI_STATE_D0, which in turn causes the power state for both FUJ02B1 and FUJ02E3 to always be ACPI_STATE_D0 ("on"). Remove relevant acpi_bus_update_power() calls along with parts of debug messages that they were supposed to have an effect on. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit c1f51f1c4906f2551e21451228dcbb3b9dfc7008 Author: Michał Kępień Date: Fri Jun 16 06:40:55 2017 +0200 platform/x86: fujitsu-laptop: sanitize hotkey input device identification In the case of brightness-related FUJ02B1 ACPI device, initializing the input device associated with it identically as acpi-video initializes its input device makes sense. However, using the same data for the input device associated with the FUJ02E3 ACPI device makes little sense, because the latter has nothing to do with video and assigning an arbitrary product ID to it is redundant. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d6a298aea319c794fd7ae976836fe5f71a649407 Author: Michał Kępień Date: Fri Jun 16 06:40:54 2017 +0200 platform/x86: fujitsu-laptop: use strcpy to set ACPI device names and classes No formatting is needed when setting ACPI device name and class, so switch to using strcpy() for this purpose. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 08df5d476fa817ff9c4a5a194a171e43f27a91c1 Author: Michał Kępień Date: Fri Jun 16 06:40:53 2017 +0200 platform/x86: fujitsu-laptop: remove redundant safety checks Do not check whether the pointer passed to ACPI add callbacks is NULL as it is earlier dereferenced anyway in the bus-level probe callback, acpi_device_probe(). Do not check the value of acpi_disabled in fujitsu_init(), because it is already done by acpi_bus_register_driver(), which is the first function called by fujitsu_init(). Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 9 --------- 1 file changed, 9 deletions(-) commit 79e19ab5421b2d4f30901594aeee8180ee7a99ab Author: Arvind Yadav Date: Fri Jun 23 16:06:30 2017 +0530 platform/x86: msi-laptop: constify msipf*_attribute_group File size before: text data bss dec hex filename 5396 5016 85 10497 2901 drivers/platform/x86/msi-laptop.o File size After adding 'const': text data bss dec hex filename 5524 4888 85 10497 2901 drivers/platform/x86/msi-laptop.o Signed-off-by: Arvind Yadav Signed-off-by: Andy Shevchenko drivers/platform/x86/msi-laptop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 130bbe6328c9edec37f59e4582cec5e43512b8e6 Author: Arvind Yadav Date: Fri Jun 23 14:40:51 2017 +0530 platform/x86: eeepc-laptop: constify platform_attribute_group File size before: text data bss dec hex filename 9934 1136 2 11072 2b40 drivers/platform/x86/eeepc-laptop.o File size After adding 'const': text data bss dec hex filename 9998 1072 2 11072 2b40 drivers/platform/x86/eeepc-laptop.o Signed-off-by: Arvind Yadav Signed-off-by: Andy Shevchenko drivers/platform/x86/eeepc-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6aa734a2f38e2e17ac4de3561770b8676b27af2e Author: Dan Williams Date: Fri Jun 30 18:56:03 2017 -0700 libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime We need to hold a reference on the 'dirent' until we are sure there are no more notifications that will be sent. As noted in the new comments we take advantage of the fact that the references are taken and dropped under device_lock() and that nd_device_notify() holds device_lock() over new badblocks notifications. The notifications that happen when badblocks are cleared only occur while the device is active. Also take the opportunity to fix up the error messages to report the user visible effect of a sysfs_get_dirent() failure. Fixes: 975750a98c26 ("libnvdimm, pmem: Add sysfs notifications to badblocks") Cc: Toshi Kani Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 16 ++++++++++++---- drivers/nvdimm/region.c | 13 +++++++++---- 2 files changed, 21 insertions(+), 8 deletions(-) commit 7e5a21dfe5524a85705d3bc7b540c849cc13e9a1 Author: Vishal Verma Date: Fri Jun 30 18:32:52 2017 -0600 libnvdimm: fix the clear-error check in nsio_rw_bytes A leftover from the 'bandaid' fix that disabled BTT error clearing in rw_bytes resulted in an incorrect check. After we converted these checks over to use the NVDIMM_IO_ATOMIC flag, the ndns->claim check was both redundant, and incorrect. Remove it. Fixes: 3ae3d67ba705 ("libnvdimm: add an atomic vs process context flag to rw_bytes") Cc: Cc: Dave Jiang Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/claim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1fe3854a83b580727c9464b37b62ba77ead1d6f6 Author: Dan Carpenter Date: Wed Jun 14 12:13:27 2017 +0300 thermal: bcm2835: fix an error code in probe() This causes a static checker because we're passing a valid pointer to PTR_ERR(). "err" is already the correct error code, so we can just delete this line. Fixes: bcb7dd9ef206 ("thermal: bcm2835: add thermal driver for bcm2835 SoC") Acked-by: Stefan Wahren Signed-off-by: Dan Carpenter Signed-off-by: Eduardo Valentin drivers/thermal/broadcom/bcm2835_thermal.c | 1 - 1 file changed, 1 deletion(-) commit 919054fdfc8adf58c5512fe9872eb53ea0f5525d Author: Arvind Yadav Date: Tue Jun 6 15:04:46 2017 +0530 thermal: hisilicon: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e3bdc8d7623d5875403ad40443e7b049ae200fcd Author: Arvind Yadav Date: Tue Jun 6 15:12:37 2017 +0530 thermal: imx: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Eduardo Valentin drivers/thermal/imx_thermal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e67f85fb96ca80e5a60ea69c536affed0affc77d Author: Shuah Khan Date: Thu Jun 29 16:54:57 2017 -0600 selftests: membarrier: use ksft_* var arg msg api Use ksft_* var arg msg to include strerror() info. in test output. Remove redundant SKIP/FAIL/PASS logic as it is no longer needed with ksft_ api. Improve test output to be consistent and clear. Signed-off-by: Shuah Khan .../testing/selftests/membarrier/membarrier_test.c | 91 ++++++++++------------ 1 file changed, 41 insertions(+), 50 deletions(-) commit 0732d06ee563bbcdf34ec889918baa62451b580d Author: Shuah Khan Date: Thu Jun 29 15:52:42 2017 -0600 selftests: breakpoints: breakpoint_test_arm64: convert test to use TAP13 Convert breakpoint_test_arm64 output to TAP13 format. Use ksft_* var arg msg api to include strerror() info. in the output. Change output from child process to use ksft_print_msg() instead of ksft_exit_* to avoid double counting tests and ensure parent process does the test counter incrementing. Signed-off-by: Shuah Khan .../selftests/breakpoints/breakpoint_test_arm64.c | 94 +++++++++++++--------- 1 file changed, 58 insertions(+), 36 deletions(-) commit 3fa72f2c784b5c05f271ab8b34116d6a8e8d108d Author: Shuah Khan Date: Thu Jun 29 15:37:05 2017 -0600 selftests: breakpoints: step_after_suspend_test use ksft_* var arg msg api Use ksft_* var arg msg to include strerror() info. in test output and simplify test_result and exit_* using var arg msg api. Signed-off-by: Shuah Khan .../breakpoints/step_after_suspend_test.c | 59 ++++++++++++---------- 1 file changed, 33 insertions(+), 26 deletions(-) commit 4ca562878b907e34fdb652c3a8cb631fd5efe706 Author: Shuah Khan Date: Thu Jun 29 15:19:47 2017 -0600 selftests: breakpoint_test: use ksft_* var arg msg api Use ksft_* var arg msg to include strerror() info. in test output. Change output from child process to use ksft_print_msg() instead of ksft_exit_* to avoid double counting tests and ensure parent does the incrementing test counters. Also includes unused variable cleanup. Signed-off-by: Shuah Khan .../selftests/breakpoints/breakpoint_test.c | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) commit ab52a484455007b3c9c11e18f6d0eed6d8f2de4e Author: Paul Elder Date: Wed Jun 28 23:40:21 2017 +0900 kselftest: add ksft_print_msg() function to output general information Add a generic information output function: ksft_print_msg() Signed-off-by: Paul Elder Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 151b2732111f0743e764a7bc62d4f580341a62f3 Author: Paul Elder Date: Wed Jun 28 23:40:20 2017 +0900 kselftest: make ksft_* output functions variadic Make the ksft_* output functions variadic to allow string formatting directly in these functions. Signed-off-by: Paul Elder Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 55 +++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 12 deletions(-) commit 4d1707c1c6901906707b9419cac8d9c84bc17d88 Author: Colin Ian King Date: Thu Jun 29 18:57:38 2017 +0100 leds: lp55xx: make various arrays static const Several arrays are currently on-stack and instead should be made static const. Signed-off-by: Colin Ian King Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/leds-lp5523.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1967158fff819b38f4e46763ca8df067b4b69f59 Author: Gustavo A. R. Silva Date: Fri Jun 30 15:18:41 2017 -0500 ALSA: x86: fix error return code in hdmi_lpe_audio_probe() platform_get_irq() returns an error code, but the intel_hdmi_audio driver ignores it and always returns -ENODEV. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Also, notice that platform_get_irq() no longer returns 0 on error. Print error message and propagate the return value of platform_get_irq on failure. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Takashi Iwai sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3cf50f6b13a2b2325532bc389107e6a2dcc99314 Merge: 785b621 1fa67c6 Author: Stephen Boyd Date: Fri Jun 30 12:23:05 2017 -0700 Merge branch 'binding-doc-cp110-ap806' of git://git.infradead.org/linux-mvebu into clk-next * 'binding-doc-cp110-ap806' of git://git.infradead.org/linux-mvebu: gpio: dt-bindings: Add documentation for gpio controllers on Armada 7K/8K pinctrl: dt-bindings: add documentation for CP110 pin controllers pinctrl: dt-bindings: add documentation for AP806 pin controllers dt-bindings: cp110: add sdio clock to cp-110 system controller dt-bindings: cp110: introduce a new binding dt-bindings: cp110: do not depend anymore of the *-clock-output-names commit 8acdf5055974e49d337d51ac7011449cfd7b7d05 Author: Kees Cook Date: Fri Oct 28 00:45:16 2016 -0700 randstruct: opt-out externally exposed function pointer structs Some function pointer structures are used externally to the kernel, like the paravirt structures. These should never be randomized, so mark them as such, in preparation for enabling randstruct's automatic selection of all-function-pointer structures. These markings are verbatim from Brad Spengler/PaX Team's code in the last public patch of grsecurity/PaX based on my understanding of the code. Changes or omissions from the original code are mine and don't reflect the original grsecurity/PaX code. Signed-off-by: Kees Cook arch/arm/include/asm/cacheflush.h | 2 +- arch/x86/include/asm/paravirt_types.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 29e48ce87f1eaaa4b1fe3d9af90c586ac2d1fb74 Author: Kees Cook Date: Wed Apr 5 22:43:33 2017 -0700 task_struct: Allow randomized layout This marks most of the layout of task_struct as randomizable, but leaves thread_info and scheduler state untouched at the start, and thread_struct untouched at the end. Other parts of the kernel use unnamed structures, but the 0-day builder using gcc-4.4 blows up on static initializers. Officially, it's documented as only working on gcc 4.6 and later, which further confuses me: https://gcc.gnu.org/wiki/C11Status The structure layout randomization already requires gcc 4.7, but instead of depending on the plugin being enabled, just check the gcc versions for wider build testing. At Linus's suggestion, the marking is hidden in a macro to reduce how ugly it looks. Additionally, indenting is left unchanged since it would make things harder to read. Randomization of task_struct is modified from Brad Spengler/PaX Team's code in the last public patch of grsecurity/PaX based on my understanding of the code. Changes or omissions from the original code are mine and don't reflect the original grsecurity/PaX code. Cc: Linus Torvalds Signed-off-by: Kees Cook include/linux/compiler-gcc.h | 13 ++++++++++++- include/linux/compiler.h | 5 +++++ include/linux/sched.h | 14 ++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) commit 3859a271a003aba01e45b85c9d8b355eb7bf25f9 Author: Kees Cook Date: Fri Oct 28 01:22:25 2016 -0700 randstruct: Mark various structs for randomization This marks many critical kernel structures for randomization. These are structures that have been targeted in the past in security exploits, or contain functions pointers, pointers to function pointer tables, lists, workqueues, ref-counters, credentials, permissions, or are otherwise sensitive. This initial list was extracted from Brad Spengler/PaX Team's code in the last public patch of grsecurity/PaX based on my understanding of the code. Changes or omissions from the original code are mine and don't reflect the original grsecurity/PaX code. Left out of this list is task_struct, which requires special handling and will be covered in a subsequent patch. Signed-off-by: Kees Cook arch/x86/include/asm/processor.h | 2 +- fs/mount.h | 4 ++-- fs/namei.c | 2 +- fs/proc/internal.h | 6 +++--- include/linux/binfmts.h | 4 ++-- include/linux/cdev.h | 2 +- include/linux/cred.h | 4 ++-- include/linux/dcache.h | 2 +- include/linux/fs.h | 17 +++++++++-------- include/linux/fs_struct.h | 2 +- include/linux/ipc.h | 2 +- include/linux/ipc_namespace.h | 2 +- include/linux/key-type.h | 4 ++-- include/linux/kmod.h | 2 +- include/linux/kobject.h | 2 +- include/linux/lsm_hooks.h | 4 ++-- include/linux/mm_types.h | 4 ++-- include/linux/module.h | 4 ++-- include/linux/mount.h | 2 +- include/linux/msg.h | 2 +- include/linux/path.h | 2 +- include/linux/pid_namespace.h | 2 +- include/linux/proc_ns.h | 2 +- include/linux/sched.h | 2 +- include/linux/sched/signal.h | 2 +- include/linux/sem.h | 2 +- include/linux/shm.h | 2 +- include/linux/sysctl.h | 2 +- include/linux/tty.h | 2 +- include/linux/tty_driver.h | 4 ++-- include/linux/user_namespace.h | 2 +- include/linux/utsname.h | 2 +- include/net/af_unix.h | 2 +- include/net/neighbour.h | 2 +- include/net/net_namespace.h | 2 +- include/net/sock.h | 2 +- kernel/futex.c | 4 ++-- security/keys/internal.h | 2 +- 38 files changed, 57 insertions(+), 56 deletions(-) commit ffa47aa678cfaa9b88e8a26cfb115b4768325121 Author: Arnd Bergmann Date: Fri Jun 30 18:03:59 2017 +0200 ARM: Prepare for randomized task_struct With the new task struct randomization, we can run into a build failure for certain random seeds, which will place fields beyond the allow immediate size in the assembly: arch/arm/kernel/entry-armv.S: Assembler messages: arch/arm/kernel/entry-armv.S:803: Error: bad immediate value for offset (4096) Only two constants in asm-offset.h are affected, and I'm changing both of them here to work correctly in all configurations. One more macro has the problem, but is currently unused, so this removes it instead of adding complexity. Suggested-by: Ard Biesheuvel Signed-off-by: Arnd Bergmann [kees: Adjust commit log slightly] Signed-off-by: Kees Cook arch/arm/include/asm/assembler.h | 2 ++ arch/arm/kernel/entry-armv.S | 5 ++++- arch/arm/mm/proc-macros.S | 10 ++++------ 3 files changed, 10 insertions(+), 7 deletions(-) commit b8691c7627edd8663d7c5d0e786bc538e2779ee9 Author: Jim Qu Date: Fri Jun 30 13:27:54 2017 +0800 drm/amd/amdgpu: move get memory type function from early init to sw init On PX system, it will get memory type before gpu post , and get unkown type. Signed-off-by: Jim Qu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2513cbf9d622d85268655bfd787d4f004342cfc9 Author: Josh Poimboeuf Date: Fri Jun 30 09:09:34 2017 -0500 objtool: Silence warnings for functions which use IRET Previously, objtool ignored functions which have the IRET instruction in them. That's because it assumed that such functions know what they're doing with respect to frame pointers. With the new "objtool 2.0" changes, it stopped ignoring such functions, and started complaining about them: arch/x86/kernel/alternative.o: warning: objtool: do_sync_core()+0x1b: unsupported instruction in callable function arch/x86/kernel/alternative.o: warning: objtool: text_poke()+0x1a8: unsupported instruction in callable function arch/x86/kernel/ftrace.o: warning: objtool: do_sync_core()+0x16: unsupported instruction in callable function arch/x86/kernel/cpu/mcheck/mce.o: warning: objtool: machine_check_poll()+0x166: unsupported instruction in callable function arch/x86/kernel/cpu/mcheck/mce.o: warning: objtool: do_machine_check()+0x147: unsupported instruction in callable function Silence those warnings for now. They can be re-enabled later, once we have unwind hints which will allow the code to annotate the IRET usages. Reported-by: Ingo Molnar Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Jiri Slaby Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Fixes: baa41469a7b9 ("objtool: Implement stack validation 2.0") Link: http://lkml.kernel.org/r/20170630140934.mmwtpockvpupahro@treble Signed-off-by: Ingo Molnar tools/objtool/check.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 574a60208794d97ce571db93797f30c36ab38425 Merge: b079115 ab91f0a Author: David S. Miller Date: Fri Jun 30 13:11:43 2017 -0400 Merge branch 'PTP-support-for-macb-driver' Rafal Ozieblo says: ==================== PTP support for macb driver This patch series adds support for PTP synchronization protocol in Cadence GEM driver based on PHC. v2 changes: * removed alarm's support * removed external time stamp support * removed PTP event interrupt handling * removed ptp_hw_support flag * removed all extra sanity checks * removed unnecessary #ifdef * fixed coding style and alligment issues * renamed macb.c to macb_main.c v3 changes: * added checking NULL ptr from ptp_clock_register() * fixed error codes return * locals list in "upside down Christmas tree" style * fixed some other issues from review v4 changes: * respin to the newest next-next (28 Jun 2017) ==================== Signed-off-by: David S. Miller commit ab91f0a9b5f4b9b5b341fdc0ed457121e69c20e1 Author: Rafal Ozieblo Date: Thu Jun 29 07:14:16 2017 +0100 net: macb: Add hardware PTP support This patch is based on original Harini's patch and Andrei's patch, implemented in a separate file to ease the review/maintanance and integration with other platforms. This driver supports GEM-GXL: - Register ptp clock framework - Initialize PTP related registers - HW time stamp on the PTP Ethernet packets are received using the SO_TIMESTAMPING API. Time stamps are obtained from the dma buffer descriptors - add macb_ptp to compilation chain Signed-off-by: Rafal Ozieblo Signed-off-by: David S. Miller drivers/net/ethernet/cadence/Makefile | 4 + drivers/net/ethernet/cadence/macb.h | 126 ++++++++ drivers/net/ethernet/cadence/macb_main.c | 90 +++++- drivers/net/ethernet/cadence/macb_ptp.c | 518 +++++++++++++++++++++++++++++++ 4 files changed, 732 insertions(+), 6 deletions(-) commit b83f1527d098c04424832b0a59d75046e26bfff1 Author: Rafal Ozieblo Date: Thu Jun 29 07:13:46 2017 +0100 net: macb: macb.c changed to macb_main.c In case that macb is compiled as a module, macb.c has been renamed to macb_main.c to avoid naming confusion in Makefile. Signed-off-by: Rafal Ozieblo Signed-off-by: David S. Miller drivers/net/ethernet/cadence/Makefile | 1 + drivers/net/ethernet/cadence/macb.c | 3588 ------------------------------ drivers/net/ethernet/cadence/macb_main.c | 3588 ++++++++++++++++++++++++++++++ 3 files changed, 3589 insertions(+), 3588 deletions(-) commit 08729fdedfbb288f36b5ad26dc4274115ff4ebfc Author: Rafal Ozieblo Date: Thu Jun 29 07:13:20 2017 +0100 net: macb: Add tsu_clk to device tree Signed-off-by: Rafal Ozieblo Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/macb.txt | 1 + 1 file changed, 1 insertion(+) commit 7b4296148066f19b5960127ba579e358df501c22 Author: Rafal Ozieblo Date: Thu Jun 29 07:12:51 2017 +0100 net: macb: Add support for PTP timestamps in DMA descriptors This patch adds support for PTP timestamps in DMA buffer descriptors. It checks capability at runtime and uses appropriate buffer descriptor. Signed-off-by: Rafal Ozieblo Signed-off-by: David S. Miller drivers/net/ethernet/cadence/Kconfig | 10 ++- drivers/net/ethernet/cadence/macb.c | 117 ++++++++++++++++++++++++++--------- drivers/net/ethernet/cadence/macb.h | 32 +++++++--- 3 files changed, 122 insertions(+), 37 deletions(-) commit a84ebb837b419787c2ece74efa566c998929cead Author: Javier González Date: Fri Jun 30 17:56:43 2017 +0200 lightnvm: pblk: set line bitmap check under debug Do bitmap checks only when debug mode is enable. The line bitmap used for mapping to physical addresses is fairly large (~512KB) and it is expensive to do this checks on the fast path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 076984669db8476c3c9a9f6d0c59a8e2c7e0092f Author: Javier González Date: Fri Jun 30 17:56:42 2017 +0200 lightnvm: pblk: verify that cache read is still valid When a read is directed to the cache, we risk that the lba has been updated during the time we made the L2P table lookup and the time we are actually reading form the cache. We intentionally not hold the L2P lock not to block other threads. While strict ordering is not a guarantee at this level (unless REQ_FLUSH has been previously issued), we have experience that some databases that have recently implemented direct I/O support, issue metadata reads very close to the writes, without issuing a fsync in the middle. An easy way to support them while they is to make an extra effort and check the L2P map right before reading the cache. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-rb.c | 15 ++++++++++++--- drivers/lightnvm/pblk-read.c | 3 +-- drivers/lightnvm/pblk.h | 10 +++++++++- 3 files changed, 22 insertions(+), 6 deletions(-) commit b5e063a2861a3af00fe3770e5fb85f936facbf42 Author: Javier González Date: Fri Jun 30 17:56:41 2017 +0200 lightnvm: pblk: add initialization check Add a sanity check to the pblk initialization sequence in order to ensure that enough LUNs have been allocated to store the line metadata. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ee8d5c1ad54e48ec44b6ae9cf91144fcab6ebf83 Author: Javier González Date: Fri Jun 30 17:56:40 2017 +0200 lightnvm: pblk: remove target using async. I/Os When removing a pblk instance, pad the current line using asynchronous I/O. This reduces the removal time from ~1 minute in the worst case to a couple of seconds. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 5 +- drivers/lightnvm/pblk-init.c | 9 +++ drivers/lightnvm/pblk-rb.c | 8 ++ drivers/lightnvm/pblk-recovery.c | 163 ++++++++++++++++++++++----------------- drivers/lightnvm/pblk-write.c | 2 +- drivers/lightnvm/pblk.h | 8 ++ 6 files changed, 122 insertions(+), 73 deletions(-) commit de54e703a4229e4688eb77b32b1c27861384e22a Author: Javier González Date: Fri Jun 30 17:56:39 2017 +0200 lightnvm: pblk: use vmalloc for GC data buffer For now, we allocate a per I/O buffer for GC data. Since the potential size of the buffer is 256KB and GC is not in the fast path, do this allocation with vmalloc. This puts lets pressure on the memory allocator at no performance cost. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 9 +++++---- drivers/lightnvm/pblk-gc.c | 6 +++--- drivers/lightnvm/pblk-read.c | 4 ++-- drivers/lightnvm/pblk-write.c | 3 ++- drivers/lightnvm/pblk.h | 4 ++-- 5 files changed, 14 insertions(+), 12 deletions(-) commit 8224cbd80be15908ecb6351b90291596e8bdcf79 Author: Javier González Date: Fri Jun 30 17:56:38 2017 +0200 lightnvm: pblk: use right metadata buffer for recovery Fix bad metadata buffer assignations introduced when refactoring the medatada write path. Fixes: dd2a43437337 lightnvm: pblk: sched. metadata on write thread Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-recovery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 10888129783cc8daeeb9c47942876b917532b58c Author: Javier González Date: Fri Jun 30 17:56:37 2017 +0200 lightnvm: pblk: schedule if data is not ready When user threads place data into the write buffer, they reserve space and do the memory copy out of the lock. As a consequence, when the write thread starts persisting data, there is a chance that it is not copied yet. In this case, avoid polling, and schedule before retrying. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-rb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 653cbb8472b88f0781d9191685bd6603f344214d Author: Javier González Date: Fri Jun 30 17:56:36 2017 +0200 lightnvm: pblk: remove unused return variable Remove unused variable. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2950e7e61089de0e7058fdf04a53d25e078f2230 Author: Javier González Date: Fri Jun 30 17:56:35 2017 +0200 lightnvm: pblk: fix double-free on pblk init Prevent pblk->lines being double freed in case of an error during pblk initialization. Fixes: dd2a43437337: "lightnvm: pblk: sched. metadata on write thread" Reported-by: Dan Carpenter Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 2 -- 1 file changed, 2 deletions(-) commit f417aa0bd8c4b8fd3fecbc23819a994436709dcc Author: Javier González Date: Fri Jun 30 17:56:34 2017 +0200 lightnvm: pblk: fix bad le64 assignations Use the right types and conversions on le64 variables. Reported by sparse. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 2 +- drivers/lightnvm/pblk-gc.c | 5 ++++- drivers/lightnvm/pblk-map.c | 2 +- drivers/lightnvm/pblk-recovery.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) commit 1655cf8829d82d367d8fdb5cb58e5885d7d2a391 Author: Vladimir Murzin Date: Wed May 24 11:24:32 2017 +0100 ARM: dma-mapping: Remove traces of NOMMU code DMA operations for NOMMU case have been just factored out into separate compilation unit, so don't keep dead code. Tested-by: Benjamin Gaignard Tested-by: Andras Szemzo Tested-by: Alexandre TORGUE Signed-off-by: Vladimir Murzin Acked-by: Arnd Bergmann Acked-by: Russell King Signed-off-by: Christoph Hellwig arch/arm/mm/dma-mapping.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) commit 1b11d39e6a6864a9dfb64e2c3ac03090e3b34399 Author: Vladimir Murzin Date: Wed May 24 11:24:31 2017 +0100 ARM: NOMMU: Set ARM_DMA_MEM_BUFFERABLE for M-class cpus Now, we have dedicated non-cacheable region for consistent DMA operations. However, that region can still be marked as bufferable by MPU, so it'd be safer to have barriers by default. M-class machines that didn't need it until now also likely won't need it in the future, therefore, we offer this as an option. Tested-by: Benjamin Gaignard Tested-by: Andras Szemzo Tested-by: Alexandre TORGUE Reviewed-by: Robin Murphy Signed-off-by: Vladimir Murzin Acked-by: Russell King Signed-off-by: Christoph Hellwig arch/arm/mm/Kconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1c51c429f30ea10428337f3a33c12059ba59f668 Author: Vladimir Murzin Date: Wed May 24 11:24:30 2017 +0100 ARM: NOMMU: Introduce dma operations for noMMU R/M classes of cpus can have memory covered by MPU which in turn might configure RAM as Normal i.e. bufferable and cacheable. It breaks dma_alloc_coherent() and friends, since data can stuck in caches now or be buffered. This patch factors out DMA support for NOMMU configuration into separate entity which provides dedicated dma_ops. We have to handle there several cases: - configurations with MMU/MPU setup - configurations without MMU/MPU setup - special case for M-class, since caches and MPU there are optional In general we rely on default DMA area for coherent allocations or/and per-device memory reserves suitable for coherent DMA, so if such regions are set coherent allocations go from there. In case MMU/MPU was not setup we fallback to normal page allocator for DMA memory allocation. In case we run M-class cpus, for configuration without cache support (like Cortex-M3/M4) dma operations are forced to be coherent and wired with dma-noop (such decision is made based on cacheid global variable); however, if caches are detected there and no DMA coherent region is given (either default or per-device), dma is disallowed even MPU is not set - it is because M-class implement system memory map which defines part of address space as Normal memory. Reported-by: Alexandre Torgue Reported-by: Andras Szemzo Tested-by: Benjamin Gaignard Tested-by: Andras Szemzo Tested-by: Alexandre TORGUE Reviewed-by: Robin Murphy Signed-off-by: Vladimir Murzin Acked-by: Arnd Bergmann Acked-by: Russell King [hch: removed the dma_supported() implementation that isn't required anymore] Signed-off-by: Christoph Hellwig arch/arm/Kconfig | 1 + arch/arm/include/asm/dma-mapping.h | 2 +- arch/arm/mm/Makefile | 5 +- arch/arm/mm/dma-mapping-nommu.c | 228 +++++++++++++++++++++++++++++++++++++ 4 files changed, 232 insertions(+), 4 deletions(-) commit 07c75d7a6b9eae24ab72c6eb2fbd39963775b0bf Author: Vladimir Murzin Date: Wed Jun 28 10:16:57 2017 +0100 drivers: dma-mapping: allow dma_common_mmap() for NOMMU Currently, internals of dma_common_mmap() is compiled out if build is done for either NOMMU or target which explicitly says it does not have/want coherent DMA mmap. It turned out that dma_common_mmap() can be handy in NOMMU setup (at least for ARM). This patch converts exitent NOMMU targets to use ARCH_NO_COHERENT_DMA_MMAP, thus when CONFIG_MMU is gone from dma_common_mmap() their behaviour stays unchanged. ARM is not converted to ARCH_NO_COHERENT_DMA_MMAP because it 1) already has mmap callback which can handle (at some extent) NOMMU 2) already defines dummy pgprot_noncached() for NOMMU build. c6x and frv stay untouched since they already have ARCH_NO_COHERENT_DMA_MMAP. Cc: Steven Miao Cc: Geert Uytterhoeven Cc: Michal Simek Cc: Yoshinori Sato Cc: Rich Felker Cc: Chris Zankel Cc: Max Filippov Suggested-by: Christoph Hellwig Signed-off-by: Vladimir Murzin Tested-by: Benjamin Gaignard arch/blackfin/Kconfig | 1 + arch/m32r/Kconfig | 1 + arch/m68k/Kconfig | 1 + arch/microblaze/Kconfig | 1 + arch/sh/Kconfig | 1 + arch/xtensa/Kconfig | 1 + drivers/base/dma-mapping.c | 4 ++-- 7 files changed, 8 insertions(+), 2 deletions(-) commit b07911593719828cac023bdcf6bf4da1c9ba546f Merge: 52a623b 4d8a991 Author: David S. Miller Date: Fri Jun 30 12:43:08 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net A set of overlapping changes in macvlan and the rocker driver, nothing serious. Signed-off-by: David S. Miller commit 666ff6f83e1db6ed847abf44eb5e3402d82b9350 Author: Rafael J. Wysocki Date: Fri Jun 23 14:58:11 2017 +0200 PCI/PM: Avoid using device_may_wakeup() for runtime PM pci_target_state() calls device_may_wakeup() which checks whether or not the device may wake up the system from sleep states, but pci_target_state() is used for runtime PM too. Since runtime PM is expected to always enable remote wakeup if possible, modify pci_target_state() to take additional argument indicating whether or not it should look for a state from which the device can signal wakeup and pass either the return value of device_can_wakeup(), or "false" (if the device itself is not wakeup-capable) to it from the code related to runtime PM. While at it, fix the comment in pci_dev_run_wake() which is not about sleep states. Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg drivers/pci/pci.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 0bf3730bbc41f155543fa63becb4ff436d6a00a9 Author: Kai-Heng Feng Date: Fri Jun 16 17:40:54 2017 +0800 x86/PCI: Avoid AMD SB7xx EHCI USB wakeup defect On an AMD Carrizo laptop, when EHCI runtime PM is enabled, EHCI ports do not assert PME# for device plug/unplug events while in D3. As Alan Stern points out [1], the PME signal is not enabled when controller is in D3, therefore it's not being woken up when new devices get plugged in. Testing shows PME signal works when the EHCI power state is D2. Clear the PCI_PM_CAP_PME_D3 and PCI_PM_CAP_PME_D3cold bits in dev->pme_support to indicate the device will not assert PME# from those states. [1] http://lkml.kernel.org/r/Pine.LNX.4.44L0.1706121010010.2092-100000@iolanthe.rowland.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=196091 Link: https://support.amd.com/TechDocs/46837.pdf (Section 23) Link: https://support.amd.com/TechDocs/42413.pdf (Appendix A2) Signed-off-by: Kai-Heng Feng [bhelgaas: changelog, add parens in quirk] Signed-off-by: Bjorn Helgaas arch/x86/pci/fixup.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e60514bd4485c0c7c5a7cf779b200ce0b95c70d6 Author: Chen Yu Date: Thu May 25 16:49:07 2017 +0800 PCI/PM: Restore the status of PCI devices across hibernation Currently we saw a lot of "No irq handler" errors during hibernation, which caused the system hang finally: ata4.00: qc timeout (cmd 0xec) ata4.00: failed to IDENTIFY (I/O error, err_mask=0x4) ata4.00: revalidation failed (errno=-5) ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300) do_IRQ: 31.151 No irq handler for vector According to above logs, there is an interrupt triggered and it is dispatched to CPU31 with a vector number 151, but there is no handler for it, thus this IRQ will not get acked and will cause an IRQ flood which kills the system. To be more specific, the 31.151 is an interrupt from the AHCI host controller. After some investigation, the reason why this issue is triggered is because the thaw_noirq() function does not restore the MSI/MSI-X settings across hibernation. The scenario is illustrated below: 1. Before hibernation, IRQ 34 is the handler for the AHCI device, which is bound to CPU31. 2. Hibernation starts, the AHCI device is put into low power state. 3. All the nonboot CPUs are put offline, so IRQ 34 has to be migrated to the last alive one - CPU0. 4. After the snapshot has been created, all the nonboot CPUs are brought up again; IRQ 34 remains bound to CPU0. 5. AHCI devices are put into D0. 6. The snapshot is written to the disk. The issue is triggered in step 6. The AHCI interrupt should be delivered to CPU0, however it is delivered to the original CPU31 instead, which causes the "No irq handler" issue. Ying Huang has provided a clue that, in step 3 it is possible that writing to the register might not take effect as the PCI devices have been suspended. In step 3, the IRQ 34 affinity should be modified from CPU31 to CPU0, but in fact it is not. In __pci_write_msi_msg(), if the device is already in low power state, the low level MSI message entry will not be updated but cached. During the device restore process after a normal suspend/resume, pci_restore_msi_state() writes the cached MSI back to the hardware. But this is not the case for hibernation. pci_restore_msi_state() is not currently called in pci_pm_thaw_noirq(), although pci_save_state() has saved the necessary PCI cached information in pci_pm_freeze_noirq(). Restore the PCI status for the device during hibernation. Otherwise the status might be lost across hibernation (for example, settings for MSI, MSI-X, ATS, ACS, IOV, etc.), which might cause problems during hibernation. Suggested-by: Ying Huang Suggested-by: Rafael J. Wysocki Signed-off-by: Chen Yu [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Cc: stable@vger.kernel.org Cc: Len Brown Cc: Dan Williams Cc: Rui Zhang Cc: Ying Huang drivers/pci/pci-driver.c | 1 + 1 file changed, 1 insertion(+) commit 5938628c51a711ae2169d68b2e3a4f7d93d4dbea Author: Bjorn Helgaas Date: Tue May 9 10:10:18 2017 -0500 drm/radeon: make MacBook Pro d3_delay quirk more generic The PCI Power Management Spec, r1.2, sec 5.6.1, requires a 10 millisecond delay when powering on a device, i.e., transitioning from state D3hot to D0. Apparently some devices require more time, and d1f9809ed131 ("drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks") added an additional delay for the Radeon device in a MacBook Pro. 4807c5a8a0c8 ("drm/radeon: add a PX quirk list") made the affected device more explicit. Add a generic PCI quirk to increase the d3_delay. This means we will use the additional delay for *all* wakeups from D3, not just those initiated by radeon_switcheroo_set_state(). Signed-off-by: Bjorn Helgaas Reviewed-by: Andreas Boll Acked-by: Alex Deucher CC: Maarten Lankhorst drivers/gpu/drm/radeon/radeon_device.c | 11 ----------- drivers/pci/quirks.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) commit ee76380c1e751605fcb0ee1aa3632bcf6fd0bf08 Author: Bjorn Helgaas Date: Tue May 9 10:08:58 2017 -0500 drm/amdgpu: remove unnecessary save/restore of pdev->d3_delay Remove unnecessary save/restore of pdev->d3_delay. The only assignments to pdev->d3_delay are in radeon_switcheroo_set_state() and some quirks, none of which should be relevant in the amdgpu_switcheroo_set_state() path. Signed-off-by: Bjorn Helgaas Reviewed-by: Andreas Boll Acked-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-) commit 425e1ed73e6574e4fe186ec82fd37213cbd47df0 Author: Luc Van Oostenryck Date: Wed Jun 28 16:58:03 2017 +0200 arm64: fix endianness annotation for 'struct jit_ctx' and friends struct jit_ctx::image is used the store a pointer to the jitted intructions, which are always little-endian. These instructions are thus correctly converted from native order to little-endian before being stored but the pointer 'image' is declared as for native order values. Fix this by declaring the field as __le32* instead of u32*. Same for the pointer used in jit_fill_hole() to initialize the image. Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/net/bpf_jit_comp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 796a3bae2fba6810427efdb314a1c126c9490fb3 Author: Andy Lutomirski Date: Thu Jun 29 08:46:12 2017 -0700 selftests/capabilities: Fix the test_execve test test_execve does rather odd mount manipulations to safely create temporary setuid and setgid executables that aren't visible to the rest of the system. Those executables end up in the test's cwd, but that cwd is MNT_DETACHed. The core namespace code considers MNT_DETACHed trees to belong to no mount namespace at all and, in general, MNT_DETACHed trees are only barely function. This interacted with commit 380cf5ba6b0a ("fs: Treat foreign mounts as nosuid") to cause all MNT_DETACHed trees to act as though they're nosuid, breaking the test. Fix it by just not detaching the tree. It's still in a private mount namespace and is therefore still invisible to the rest of the system (except via /proc, and the same nosuid logic will protect all other programs on the system from believing in test_execve's setuid bits). While we're at it, fix some blatant whitespace problems. Reported-by: Naresh Kamboju Fixes: 380cf5ba6b0a ("fs: Treat foreign mounts as nosuid") Cc: stable@vger.kernel.org Cc: "Eric W. Biederman" Cc: Kees Cook Cc: Shuah Khan Cc: Greg KH Cc: linux-kselftest@vger.kernel.org Signed-off-by: Andy Lutomirski Acked-by: Greg Kroah-Hartman Signed-off-by: Shuah Khan tools/testing/selftests/capabilities/test_execve.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 4ca90c21b215b6b09761b51547b88993a2046893 Author: Shuah Khan Date: Mon Jun 26 10:52:58 2017 -0600 selftests: intel_pstate: add .gitignore Add .gitignore for generated files. Signed-off-by: Shuah Khan tools/testing/selftests/intel_pstate/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 5ff0c60b0e5e8c2a2139c304d7620b0ea70d721a Author: Po-Hsu Lin Date: Tue Jun 27 14:17:15 2017 +0800 selftests: fix memory-hotplug test In the memory offline test, the $ration was used with RANDOM as the possibility to get it offlined, correct it to become the portion of available removable memory blocks. Also ask the tool to try to offline the next available memory block if the attempt is unsuccessful. It will only fail if all removable memory blocks are busy. A nice example: $ sudo ./test.sh Test scope: 10% hotplug memory online all hot-pluggable memory in offline state: SKIPPED - no hot-pluggable memory in offline state offline 10% hot-pluggable memory in online state trying to offline 3 out of 28 memory block(s): online->offline memory1 online->offline memory10 ./test.sh: line 74: echo: write error: Resource temporarily unavailable offline_memory_expect_success 10: unexpected fail online->offline memory100 online->offline memory101 online all hot-pluggable memory in offline state: offline->online memory1 offline->online memory100 offline->online memory101 skip extra tests: debugfs is not mounted $ echo $? 0 Signed-off-by: Po-Hsu Lin Signed-off-by: Shuah Khan .../selftests/memory-hotplug/mem-on-off-test.sh | 70 +++++++++++++++++----- 1 file changed, 54 insertions(+), 16 deletions(-) commit 02d8f075ac44f6f0dc46881965f815576921f2c0 Author: Po-Hsu Lin Date: Tue Jun 27 14:17:14 2017 +0800 selftests: add missing test name in memory-hotplug test There is no prompt for testing memory notifier error injection, added with the same echo format of other tests above. Signed-off-by: Po-Hsu Lin Signed-off-by: Shuah Khan tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 1 + 1 file changed, 1 insertion(+) commit 72441ea5886780d04ac96913e02dba9e84ea80e5 Author: Po-Hsu Lin Date: Tue Jun 27 14:17:13 2017 +0800 selftests: check percentage range for memory-hotplug test Check the precentage range for -r flag in memory-hotplug test. Signed-off-by: Po-Hsu Lin Signed-off-by: Shuah Khan tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 4 ++++ 1 file changed, 4 insertions(+) commit a34b28c92ec8c92938de03c18c5fab32efd2e29a Author: Po-Hsu Lin Date: Tue Jun 27 14:17:12 2017 +0800 selftests: check hot-pluggagble memory for memory-hotplug test Check for hot-pluggable memory availability in prerequisite() of the memory-hotplug test. Signed-off-by: Po-Hsu Lin Signed-off-by: Shuah Khan tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 5 +++++ 1 file changed, 5 insertions(+) commit 593f927851a58fdca559b173c807a0b78c9f6e49 Author: Po-Hsu Lin Date: Tue Jun 27 14:17:11 2017 +0800 selftests: typo correction for memory-hotplug test Typo fixed for hotpluggable_offline_memory() in memory-hotplug test. Signed-off-by: Po-Hsu Lin Signed-off-by: Shuah Khan tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d87b29179aa00efe15c88eebbcb88819e87e7f2a Author: Masami Hiramatsu Date: Tue Jun 27 19:28:32 2017 +0900 selftests: ftrace: Use md5sum to take less time of checking logs Use md5sum so that it takes less time of checking trace logs update. Since busybox tail/cat takes too long time to read the trace log, this uses md5sum to check whether trace log is updated or not. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan .../selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f9632de40ee0161e864bea8c1b017d957fd7312c Merge: 425a17c ca38701 Author: Thomas Gleixner Date: Fri Jun 30 17:29:46 2017 +0200 Merge tag 'irqchip-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Merge second batch of irqchip updates for 4.13 from Marc Zyngier - Potential out of bound access for GICv3 - Memory allocation gotcha in the Marvell GICP driver - Fix openrisc interrupt acknowledgement commit 73cc90798ff765341a1d9c2cfe18153ab231c9bb Author: Alex Deucher Date: Fri Jun 30 09:58:34 2017 -0400 drm/amdgpu/cgs: always set reference clock in mode_info It's relevent regardless of whether there are displays enabled. Fixes garbage values for ref clock in powerplay leading to incorrect fan speed reporting when displays are disabled. bug: https://bugs.freedesktop.org/show_bug.cgi?id=101653 Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 644e0840ad4615e032d67adec6ee60f821b669fe Author: Adrian Hunter Date: Fri May 26 11:17:38 2017 +0300 perf auxtrace: Add CPU filter support Decoding auxtrace data can take a long time. To avoid decoding unnecessarily, filter auxtrace data that is collected per-cpu before it is decoded. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-38-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/util/auxtrace.c | 10 ++++++++++ tools/perf/util/auxtrace.h | 2 ++ 4 files changed, 14 insertions(+) commit 38b65b0891dc129dc0a5ce148a21c481e667b395 Author: Adrian Hunter Date: Fri May 26 11:17:37 2017 +0300 perf intel-pt: Do not use TSC packets for calculating CPU cycles to TSC CBR (core-to-bus ratio) packets provide an indication of CPU frequency. A more accurate measure can be made by counting the cycles (given by CYC packets) in between other timing packets (either MTC or TSC). Using TSC packets has at least 2 issues: 1) timing might have stopped (e.g. mwait) or 2) TSC packets within PSB+ might slip past CYC packets. For now, simply do not use TSC packets for calculating CPU cycles to TSC. That leaves the case where 2 MTC packets are used, otherwise falling back to the CBR value. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-37-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ead2bfdb85ab311bc3e1c2e55bff207aafaab096 Author: Adrian Hunter Date: Fri May 26 11:17:36 2017 +0300 perf intel-pt: Update documentation to include new ptwrite and power events Update documentation to include new ptwrite and power events. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-36-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/intel-pt.txt | 42 +++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit cc892720d85a31cc04f4c01c03d88a0eb3c437fa Author: Adrian Hunter Date: Fri May 26 11:17:35 2017 +0300 perf intel-pt: Add example script for power events and PTWRITE Add script intel-pt-events.py that provides an example of how to unpack the raw data for power events and PTWRITE. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-35-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/scripts/python/bin/intel-pt-events-record | 13 +++ .../perf/scripts/python/bin/intel-pt-events-report | 3 + tools/perf/scripts/python/intel-pt-events.py | 128 +++++++++++++++++++++ 3 files changed, 144 insertions(+) commit 3797307576191d7fb4c974cd461188162ac36f33 Author: Adrian Hunter Date: Fri Jun 30 11:36:45 2017 +0300 perf intel-pt: Synthesize new power and "ptwrite" events Synthesize new power and ptwrite events. Power events report changes to C-state but I have also added support for the existing CBR (core-to-bus ratio) packet and included that when outputting power events. The PTWRITE packet is associated with the new "ptwrite" instruction, which is essentially just a way to stuff a 32 or 64 bit value into the PT trace. More details can be found in the patches that add documentation and in the Intel SDM. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1498811805-2335-1-git-send-email-adrian.hunter@intel.com [ Copy the description of such packet from the patchkit cover message ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 283 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) commit 4a9fd4e0effc94b9ec79250946a0054d4dd1a963 Author: Adrian Hunter Date: Fri May 26 11:17:33 2017 +0300 perf intel-pt: Move code in intel_pt_synth_events() to simplify attr setting intel_pt_synth_events() uses the same attr structure to create each event. Move the code around a bit to simplify that. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-33-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) commit bbac88ed64436201d6b6f2b00177d58081d56707 Author: Adrian Hunter Date: Fri May 26 11:17:32 2017 +0300 perf intel-pt: Factor out intel_pt_set_event_name() Factor out intel_pt_set_event_name() so it can be reused. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-32-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 63a22cd9f8400fe914ddc3d597d925594f212519 Author: Adrian Hunter Date: Fri May 26 11:17:31 2017 +0300 perf intel-pt: Tidy messages into called function intel_pt_synth_event() Tidy print messages into called function intel_pt_synth_event(). Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-31-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) commit 85a564d26dfb45bbf0c0095e0fcee3bdc4a49a85 Author: Adrian Hunter Date: Fri May 26 11:17:30 2017 +0300 perf intel-pt: Tidy Intel PT evsel lookup into separate function Tidy the lookup of the Intel PT selected event (perf_evsel) into a separate function. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-30-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 406a180501f6d0d4e43d5acc5f580abfc95c742d Author: Adrian Hunter Date: Fri May 26 11:17:29 2017 +0300 perf intel-pt: Join needlessly wrapped lines Join needlessly wrapped lines. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-29-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f90d07a9f6d76e46ed99b4103747031394b16dd7 Author: Adrian Hunter Date: Fri May 26 11:17:28 2017 +0300 perf intel-pt: Remove unused instructions_sample_period Remove unused struct intel_pt member instructions_sample_period. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-28-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 2 -- 1 file changed, 2 deletions(-) commit 0f3e53799cd5fad1dcc8c077a3d9cc260243328f Author: Adrian Hunter Date: Fri May 26 11:17:27 2017 +0300 perf intel-pt: Factor out common code synthesizing event samples Factor out common code in functions synthesizing event samples i.e. intel_pt_synth_branch_sample(), intel_pt_synth_instruction_sample() and intel_pt_synth_transaction_sample(). Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-27-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 222 ++++++++++++++++++++------------------------- 1 file changed, 100 insertions(+), 122 deletions(-) commit 65c5e18f9df078f40abd22a3f6983eb9804b6d02 Author: Adrian Hunter Date: Fri Jun 30 11:36:42 2017 +0300 perf script: Add synthesized Intel PT power and ptwrite events Add definitions for synthesized Intel PT events for power and ptwrite. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1498811802-2301-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 114 +++++++++++++++++++++++++++++++++++++++++- tools/perf/util/event.h | 118 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+), 1 deletion(-) commit ca38701935138a4aba7dd9e4daf21e13a4663f43 Author: Pedro H. Penna Date: Fri Jun 30 08:33:56 2017 -0300 irqchip/or1k-pic: Fix interrupt acknowledgement Usually, hardware implicitly acknowledges interrupts when reading them. However, if this is not the case, the IRQ gets fired over and over again in the current implementation. This patch uses the right mask acknowledge function to handle the aforementioned situation on or1k processors that interact with such kind of hardware. Acked-by: Stafford Horne Signed-off-by: Pedro H. Penna Signed-off-by: Marc Zyngier drivers/irqchip/irq-or1k-pic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 478a2db82863db9f1c135111e78298e6ed5022f3 Author: Dan Carpenter Date: Fri Jun 30 11:00:49 2017 +0300 irqchip/irq-mvebu-gicp: Allocate enough memory for spi_bitmap BITS_TO_LONGS() gives us the number of longs we need, but we want to allocate the number of bytes. Fixes: a68a63cb4dfc ("irqchip/irq-mvebu-gicp: Add new driver for Marvell GICP") Acked-by: Thomas Petazzoni Signed-off-by: Dan Carpenter Signed-off-by: Marc Zyngier drivers/irqchip/irq-mvebu-gicp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 866d7c1b0a3c70387646c4e455e727a58c5d465a Author: Suzuki K Poulose Date: Fri Jun 30 10:58:28 2017 +0100 irqchip/gic-v3: Fix out-of-bound access in gic_set_affinity The GICv3 driver doesn't check if the target CPU for gic_set_affinity is valid before going ahead and making the changes. This triggers the following splat with KASAN: [ 141.189434] BUG: KASAN: global-out-of-bounds in gic_set_affinity+0x8c/0x140 [ 141.189704] Read of size 8 at addr ffff200009741d20 by task swapper/1/0 [ 141.189958] [ 141.190158] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.12.0-rc7 [ 141.190458] Hardware name: Foundation-v8A (DT) [ 141.190658] Call trace: [ 141.190908] [] dump_backtrace+0x0/0x328 [ 141.191224] [] show_stack+0x14/0x20 [ 141.191507] [] dump_stack+0xa4/0xc8 [ 141.191858] [] print_address_description+0x13c/0x250 [ 141.192219] [] kasan_report+0x210/0x300 [ 141.192547] [] __asan_load8+0x84/0x98 [ 141.192874] [] gic_set_affinity+0x8c/0x140 [ 141.193158] [] irq_do_set_affinity+0x54/0xb8 [ 141.193473] [] irq_set_affinity_locked+0x64/0xf0 [ 141.193828] [] __irq_set_affinity+0x48/0x78 [ 141.194158] [] arm_perf_starting_cpu+0x104/0x150 [ 141.194513] [] cpuhp_invoke_callback+0x17c/0x1f8 [ 141.194783] [] notify_cpu_starting+0x8c/0xb8 [ 141.195130] [] secondary_start_kernel+0x15c/0x200 [ 141.195390] [<0000000080db81b4>] 0x80db81b4 [ 141.195603] [ 141.195685] The buggy address belongs to the variable: [ 141.196012] __cpu_logical_map+0x200/0x220 [ 141.196176] [ 141.196315] Memory state around the buggy address: [ 141.196586] ffff200009741c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 141.196913] ffff200009741c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 141.197158] >ffff200009741d00: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 00 [ 141.197487] ^ [ 141.197758] ffff200009741d80: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00 [ 141.198060] ffff200009741e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 141.198358] ================================================================== [ 141.198609] Disabling lock debugging due to kernel taint [ 141.198961] CPU1: Booted secondary processor [410fd051] This patch adds the check to make sure the cpu is valid. Fixes: commit 021f653791ad17e03f98 ("irqchip: gic-v3: Initial support for GICv3") Cc: stable@vger.kernel.org Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 3 +++ 1 file changed, 3 insertions(+) commit 5e1743c0af9d5179cf575c0bc2777af02a79b911 Author: Frank Rowand Date: Wed Jun 28 15:21:46 2017 -0700 of: document /sys/firmware/fdt Add ABI documentation for /sys/firmware/fdt Update contact email for /sys/firmware/devicetree/* and add mail list Signed-off-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring Documentation/ABI/testing/sysfs-firmware-ofw | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit ce437750e895639332cdde4a65d054bca526218e Author: Palmer Dabbelt Date: Mon Jun 26 22:21:22 2017 -0700 dt-bindings: Add RISC-V vendor prefix RISC-V systems use device tree to specify the memory layout of the system. This patch reserves the "riscv" vendor prefix, which will be used for devices that are specified by the various RISC-V ISA specifications. Signed-off-by: Palmer Dabbelt Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 4d49f1b4a1fcab16b6dd1c79ef14f2b6531d50a6 Author: Heinz Mauelshagen Date: Fri Jun 30 15:45:58 2017 +0200 dm raid: stop using BUG() in __rdev_sectors() Return 0 rather than BUG() if __rdev_sectors() fails and catch invalid rdev size in the constructor. Reported-by: Hannes Reinecke Cc: stable@vger.kernel.org Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit beb3777682d5c296cc15a2a424f5a7a98476def0 Author: Alex Deucher Date: Thu Jun 29 16:08:49 2017 -0400 drm/amdgpu: fix vblank_time when displays are off If the displays are off, set the vblank time to max to make sure mclk switching is enabled. Avoid mclk getting set to high when no displays are attached. bug: https://bugs.freedesktop.org/show_bug.cgi?id=101528 fixes: 09be4a5219 (drm/amd/powerplay/smu7: add vblank check for mclk switching (v2)) Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 +++ 1 file changed, 3 insertions(+) commit 3fa53ec2ed885b0aec3f0472e3b4a8a6f1cd748c Author: Thomas Gleixner Date: Thu Jun 29 23:33:35 2017 +0200 pinctrl: samsung: Remove bogus irq_[un]mask from resource management The irq chip callbacks irq_request/release_resources() have absolutely no business with masking and unmasking the irq. The core code unmasks the interrupt after complete setup and masks it before invoking irq_release_resources(). The unmask is actually harmful as it happens before the interrupt is completely initialized in __setup_irq(). Remove it. Fixes: f6a8249f9e55 ("pinctrl: exynos: Lock GPIOs as interrupts when used as EINTs") Signed-off-by: Thomas Gleixner Cc: Krzysztof Kozlowski Cc: Sylwester Nawrocki Cc: Linus Walleij Cc: Kukjin Kim Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-gpio@vger.kernel.org Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-exynos.c | 4 ---- 1 file changed, 4 deletions(-) commit 09dc048d13165dff74ab4050454f9c2d715895d5 Author: Colin Ian King Date: Fri Jun 30 11:26:53 2017 +0100 pinctrl: rza1: make structures rza1_gpiochip_template and rza1_pinmux_ops static structures rza1_gpiochip_template and rza1_pinmux_ops do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'rza1_gpiochip_template' was not declared. Should it be static? symbol 'rza1_pinmux_ops' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rza1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea4083165fbb322b69a59588a283b7c98bd42db3 Author: Geert Uytterhoeven Date: Fri Jun 30 08:57:39 2017 +0200 pinctrl: rza1: Remove unneeded wrong check for wrong variable Depending on compiler version: drivers/pinctrl/pinctrl-rza1.c: In function ‘rza1_pinctrl_probe’: drivers/pinctrl/pinctrl-rza1.c:1260:5: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (ret) ^ Indeed, the result returned by platform_get_resource() was stored in "res", not "ret". In addition, the correct error check would be "if (!res)", as platform_get_resource() does not return an error code, but returns NULL on failure. However, as devm_ioremap_resource() verifies the validity of the passed resource pointer anyway, the check can just be removed. Reported-by: Stephen Rothwell Fixes: 5a49b644b3075f88 ("pinctrl: Renesas RZ/A1 pin and gpio controller") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rza1.c | 3 --- 1 file changed, 3 deletions(-) commit 52a623bd6189b6ea8f06a0d7594c7604deaab24a Merge: fcce2fd 04ba724 Author: David S. Miller Date: Fri Jun 30 06:27:09 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for your net-next tree. This batch contains connection tracking updates for the cleanup iteration path, patches from Florian Westphal: X) Skip unconfirmed conntracks in nf_ct_iterate_cleanup_net(), just set dying bit to let the CPU release them. X) Add nf_ct_iterate_destroy() to be used on module removal, to kill conntrack from all namespace. X) Restart iteration on hashtable resizing, since both may occur at the same time. X) Use the new nf_ct_iterate_destroy() to remove conntrack with NAT mapping on module removal. X) Use nf_ct_iterate_destroy() to remove conntrack entries helper module removal, from Liping Zhang. X) Use nf_ct_iterate_cleanup_net() to remove the timeout extension if user requests this, also from Liping. X) Add net_ns_barrier() and use it from FTP helper, so make sure no concurrent namespace removal happens at the same time while the helper module is being removed. X) Use NFPROTO_MAX in layer 3 conntrack protocol array, to reduce module size. Same thing in nf_tables. Updates for the nf_tables infrastructure: X) Prepare usage of the extended ACK reporting infrastructure for nf_tables. X) Remove unnecessary forward declaration in nf_tables hash set. X) Skip set size estimation if number of element is not specified. X) Changes to accomodate a (faster) unresizable hash set implementation, for anonymous sets and dynamic size fixed sets with no timeouts. X) Faster lookup function for unresizable hash table for 2 and 4 bytes key. And, finally, a bunch of asorted small updates and cleanups: X) Do not hold reference to netdev from ipt_CLUSTER, instead subscribe to device events and look up for index from the packet path, this is fixing an issue that is present since the very beginning, patch from Xin Long. X) Use nf_register_net_hook() in ipt_CLUSTER, from Florian Westphal. X) Use ebt_invalid_target() whenever possible in the ebtables tree, from Gao Feng. X) Calm down compilation warning in nf_dup infrastructure, patch from stephen hemminger. X) Statify functions in nftables rt expression, also from stephen. X) Update Makefile to use canonical method to specify nf_tables-objs. From Jike Song. X) Use nf_conntrack_helpers_register() in amanda and H323. X) Space cleanup for ctnetlink, from linzhang. ==================== Signed-off-by: David S. Miller commit 70a62ad19e40a6b0d9e3a048fe0d0a391d76ad12 Author: Arvind Yadav Date: Fri Jun 30 17:00:20 2017 +0530 arm64: cpuinfo: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Will Deacon arch/arm64/kernel/cpuinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdd0384a5ada8bb5745e5f29c10a5ba88827efad Author: Vunny Sodhi Date: Fri Jun 30 09:06:08 2017 +0530 ASoC: Intel: Skylake: Add support to read firmware registers This patch adds debugfs support to read fw registers, mailbox offsets and sram address. Signed-off-by: Mousumi Jana Signed-off-by: Ramesh Babu Signed-off-by: Jayachandran B Signed-off-by: Pardha Saradhi K Signed-off-by: Vunny Sodhi Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-debug.c | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 09e914d6b647cf23d81a226e1f1c4464bafdeb2d Author: Guneshwor Singh Date: Fri Jun 30 09:06:07 2017 +0530 ASoC: Intel: Skylake: Add sram address to sst_addr structure SRAM address and memory window size differ for different platforms. So add members to sst_addr structure and initialize them in the respective dsp_init(). Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/common/sst-dsp-priv.h | 4 ++++ sound/soc/intel/skylake/bxt-sst.c | 4 ++++ sound/soc/intel/skylake/skl-sst.c | 5 +++++ 3 files changed, 13 insertions(+) commit d14700a01f9101c2bc75c24fc859c8d85ba7e623 Author: Vinod Koul Date: Fri Jun 30 09:06:06 2017 +0530 ASoC: Intel: Skylake: Debugfs facility to dump module config Driver modules have lot of information represented in struct skl_module_cfg. Knowing this is useful for debug, so enable debugfs for this structure. Signed-off-by: Vinod Koul Signed-off-by: Vunny Sodhi Signed-off-by: Guneshwor Singh Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-debug.c | 156 +++++++++++++++++++++++++++++++++ sound/soc/intel/skylake/skl-topology.c | 3 + sound/soc/intel/skylake/skl.h | 10 +++ 3 files changed, 169 insertions(+) commit 5cdf6c09ca9de3f037ba2d770206f3374459602d Author: Vinod Koul Date: Fri Jun 30 09:06:05 2017 +0530 ASoC: Intel: Skylake: Add debugfs support For debug, the kernel debugfs mechanism is available. We can add various debug options for driver like module configuration read, firmware register read etc. This patch adds debugfs as a child to asoc plaform component and caller is added for skylake driver to do init and cleanup of debugfs. Signed-off-by: Vinod Koul Signed-off-by: Vunny Sodhi Signed-off-by: Guneshwor Singh Signed-off-by: Mark Brown sound/soc/intel/skylake/Makefile | 4 +++ sound/soc/intel/skylake/skl-debug.c | 55 +++++++++++++++++++++++++++++++++++++ sound/soc/intel/skylake/skl-pcm.c | 6 +++- sound/soc/intel/skylake/skl.c | 2 ++ sound/soc/intel/skylake/skl.h | 16 +++++++++++ 5 files changed, 82 insertions(+), 1 deletion(-) commit 4495ec6d770e1bca7a04e93ac453ab6720c56c5d Author: Corey Minyard Date: Fri Jun 30 07:18:08 2017 -0500 ipmi:ssif: Add missing unlock in error branch When getting flags, a response to a different message would result in a deadlock because of a missing unlock. Add that unlock and a comment. Found by static analysis. Reported-by: Dan Carpenter Cc: stable@vger.kernel.org # 3.19 Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_ssif.c | 5 +++++ 1 file changed, 5 insertions(+) commit 46b5a4d249ac6798cee28de9f51ef80777d16a3e Author: Wu Fengguang Date: Fri Jun 30 00:27:13 2017 +0800 ASoC: fix semicolon.cocci warnings sound/soc/soc-core.c:1961:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 98faf436ee05 ("ASoC: Drop invalid DMI fields when setting card long name from DMI info") CC: Mengdong Lin Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbc559554086f176b04f97eec561ad26ee54e47c Author: Haishan Zhou Date: Fri Jun 30 11:43:42 2017 +0800 regulator: core: Fix size limit of supply_map Now the debugfs file supply_map has a size limit PAGE_SIZE and the user can not see the whole content of regulator_map_list when it is larger than this limit. This patch uses seq_file instead to make sure supply_map shows the full information of regulator_map_list. Signed-off-by: Haishan Zhou Signed-off-by: Mark Brown drivers/regulator/core.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) commit 4999b0214b05a08b42bbafcb29a0b9c413002d3f Author: Takashi Iwai Date: Thu Jun 29 18:08:33 2017 +0200 ASoC: rt5645: Add quirk override by module option For making the development easier, add quirk module option to override the platform data setup. For example, a platform with inverted jack detection with jd_mode=2, pass the value 0x21 (0x1 = inv_jd1_1, 0x20 = jd_mode=2). It overrides the whole pdata fields, so pass it carefully. Signed-off-by: Takashi Iwai Tested-by: James Cameron Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 8288591368fcb470024348a9b846f7b3f791be44 Author: Colin Ian King Date: Fri Jun 30 10:50:59 2017 +0100 ASoC: rsnd: make arrays path and cmd_case static const Don't populate the arrays path and cmd_case on the stack but make them static const. Makes the object code smaller: Before: text data bss dec hex filename 2673 624 0 3297 ce1 sound/soc/sh/rcar/cmd.o After: text data bss dec hex filename 2398 768 0 3166 c5e sound/soc/sh/rcar/cmd.o Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/sh/rcar/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f986907c9225cf48e9a55233b086039152bb5b99 Author: Shawn Guo Date: Thu Jun 29 21:26:38 2017 +0800 ASoC: audio-graph-card: add widgets and routing for external amplifier support It's very common that audio card has a machine level amplifier which is controlled by GPIO. The patch adds DAPM widgets and routing support into audio-graph-card driver, and creates an output driver widget with event to control the amplifier via GPIO. Signed-off-by: Shawn Guo Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 48 +++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit a0c683d734e0b3589892c17d0e1187f20d2c3a54 Author: Shawn Guo Date: Thu Jun 29 21:26:37 2017 +0800 ASoC: audio-graph-card: update bindings for amplifier support The audio-graph-card should be able to support widgets and routing in the same way as what simple-audio-card does. The patch adds the properties into audio-graph-card bindings. Then an optional property 'pa-gpios' for controlling external amplifier, which depends on DAPM widgets and routing, is added. Signed-off-by: Shawn Guo Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/audio-graph-card.txt | 5 +++++ 1 file changed, 5 insertions(+) commit b059ca720e2ac04380240500eb8d8ba931898570 Author: Bard Liao Date: Thu Jun 29 20:07:50 2017 +0800 ASoC: rt5665: calibration should be done before jack detection We will set some volatile registers in jack detection function. But those volatile registers will be clear in rt5665_calibrate function because we set cache bypass and reset codec in rt5665_calibrate function. This patch add a flag to make sure that rt5665_calibrate is done before starting jack detection. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 49ebf13b0453d8535cd53abb514e1683a1875208 Author: Arvind Yadav Date: Thu Jun 29 10:40:50 2017 +0530 ASoC: rsnd: constify dev_pm_ops structures. dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 8172 920 0 9092 2384 sound/soc/sh/rcar/core.o File size After adding 'const': text data bss dec hex filename 8364 728 0 9092 2384 sound/soc/sh/rcar/core.o Signed-off-by: Arvind Yadav Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc3ba81a5adac413312019413c91b1e6a5d8d1fa Author: John Hsu Date: Thu Jun 29 11:41:30 2017 +0800 ASoC: nau8825: change crosstalk-bypass property to bool type The property type of "nuvoton,crosstalk-bypass" changes to boolean. The document is updated as well. Signed-off-by: John Hsu Signed-off-by: John Hsu Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/nau8825.txt | 3 +++ sound/soc/codecs/nau8825.c | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit c243d96378bd0dc1249a335c282133f05e93c253 Author: Bard Liao Date: Thu Jun 29 09:47:55 2017 +0800 ASoC: rt5670: fix incompatible pointer type of set_sysclk The first parameter is codec not dai. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a70b4544ef4f094cc2c52734e097cc358f56603 Author: Liam Girdwood Date: Thu Jun 29 14:22:24 2017 +0100 ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs. Add some DAPM widget types to better support the construction of DAPM graphs within DSPs. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown Documentation/sound/soc/dapm.rst | 18 ++++++++++++++++++ include/sound/soc-dapm.h | 7 +++++++ include/uapi/sound/asoc.h | 10 +++++++++- sound/soc/soc-topology.c | 8 ++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) commit b75a65118d287aadeade8b106ed0da7b5e42c167 Author: Liam Girdwood Date: Thu Jun 29 14:22:26 2017 +0100 ASoC: topology: show index in debug when adding DAPM routes Makes the debug output much more useful. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bb97142bcf8c042103e87d035a120f522d12e788 Author: Liam Girdwood Date: Thu Jun 29 14:22:25 2017 +0100 ASoC: topology: Fix usage of SND_SOC_TPLG_INDEX_ALL during load SND_SOC_TPLG_INDEX_ALL is used by drivers to tell the core to load all topology component indexes, not just the index in the header. Fix this so that SND_SOC_TPLG_INDEX_ALL will load all components no matter their index. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17d9aa66b08de445645bd0688fc1635bed77a57b Merge: 8a063a2 ba320dd Author: Kalle Valo Date: Fri Jun 30 13:48:19 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-06-30' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Final set of patches for 4.13 * Some important fixes for 9000 HW; * FW API changes for the upcoming -30 ucode release; * A few new PCI IDs for 9000 series; * Reorganization of common files; * Some more fixes and improvements here and there * Initialization and other important fixes for 9000 series; * Support for version 30 of the FW API for 8000 and 9000 series; commit 8616abc253793345a245d026c7a0cc11fbc3abd8 Author: Nick Desaulniers Date: Tue Jun 27 19:37:14 2017 -0700 KVM: x86: remove ignored type attribute The macro insn_fetch marks the 'type' argument as having a specified alignment. Type attributes can only be applied to structs, unions, or enums, but insn_fetch is only ever invoked with integral types, so Clang produces 19 -Wignored-attributes warnings for this source file. Signed-off-by: Nick Desaulniers Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04a7ea04d508b925e7f829305b358157d58b4f82 Merge: c853354 d38338e Author: Paolo Bonzini Date: Fri Jun 30 12:38:26 2017 +0200 Merge tag 'kvmarm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/ARM updates for 4.13 - vcpu request overhaul - allow timer and PMU to have their interrupt number selected from userspace - workaround for Cavium erratum 30115 - handling of memory poisonning - the usual crop of fixes and cleanups Conflicts: arch/s390/include/asm/kvm_host.h commit 836e4fedee8df123a203a0ded090251de66b9bd1 Author: Colin Ian King Date: Fri Jun 30 10:16:36 2017 +0100 ASoC: ak4642: make arrays fs_list and ps_list static const Don't populate the arrays fs_list and ps_list on the stack but make them static const. Makes the object code smaller: Before: text data bss dec hex filename 12084 4888 64 17036 428c sound/soc/codecs/ak4642.o After: text data bss dec hex filename 11883 5032 64 16979 4253 sound/soc/codecs/ak4642.o Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/codecs/ak4642.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5b3955828baa4d7ae44ec075529d66fa7bdf903 Author: Tony Lindgren Date: Fri Jun 30 03:37:03 2017 -0700 ARM: OMAP4: Fix legacy code clean-up regression Commit 2a26d31b1bae ("ARM: OMAP2+: Remove unused legacy code for PRM") removed PRM platform init code that I thought is unused. Turns out omap4 still needs this code, so let's do a partial revert to add it back. I probably missed this earlier as the comments used to say "OMAP4+ is DT only now" for !of_have_populated_dt() to exit early and missed the negative test. Let's not add those lines back as they are confusing and no longer needed as we only boot in device tree mode. Without things things can mysterious fail for i2c, for example LM75 I2C temperature sensor can stop working as the PRM interrupts won't work. Fixes: 2a26d31b1bae ("ARM: OMAP2+: Remove unused legacy code for PRM") Signed-off-by: Tony Lindgren arch/arm/mach-omap2/prm44xx.c | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 507ad75736f896f705663f22d8fd045cac99afae Merge: bdbbf7d 5cd82b7 Author: Jani Nikula Date: Fri Jun 30 12:49:44 2017 +0300 Merge tag 'gvt-fixes-2017-06-29' of https://github.com/01org/gvt-linux into drm-intel-next-fixes gvt-fixes-2017-06-29 - two race fixes for VFIO locks from Chuanxiao - virtual display fix for BDW from Xiong Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170629065424.kxopjbvntuakbyz2@zhen-hp.sh.intel.com commit 0a6f0600efc3df0179a33188c30b5026bd9d1c27 Author: Kailang Yang Date: Fri Jun 30 16:00:48 2017 +0800 ALSA: hda/realtek - New codecs support for ALC215/ALC285/ALC289 Add new codecs support for ALC215 ALC285 ALC289. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4731d5de4b1ca8d2565782cc3aeac392db07c075 Author: Kailang Yang Date: Fri Jun 30 15:22:57 2017 +0800 ALSA: hda/realtek - Remove ALC285 device ID 0x0285 Device ID was not used. It just assigned for alias of ALC293 as backup. So, remove it first. Because our new codec will use this device ID. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 1694130910cd654a9215fbc0244975e3cf208fc1 Author: Song Hongyan Date: Thu Jun 29 13:43:34 2017 -0700 HID: intel-ish-hid: Enable Gemini Lake ish driver Added PCI ID for Gemini Lake ISH. Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/hw-ish.h | 1 + drivers/hid/intel-ish-hid/ipc/pci-ish.c | 1 + 2 files changed, 2 insertions(+) commit 1e3b74a2f844c3fcd8b3206178b8c6524aa34d05 Author: Song Hongyan Date: Thu Jun 29 13:43:33 2017 -0700 HID: intel-ish-hid: Enable Cannon Lake ish driver Added PCI ID for Cannon Lake ISH. Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/hw-ish.h | 1 + drivers/hid/intel-ish-hid/ipc/pci-ish.c | 1 + 2 files changed, 2 insertions(+) commit baa41469a7b992c1e3db2a39854219cc7442e48f Author: Josh Poimboeuf Date: Wed Jun 28 10:11:07 2017 -0500 objtool: Implement stack validation 2.0 This is a major rewrite of objtool. Instead of only tracking frame pointer changes, it now tracks all stack-related operations, including all register saves/restores. In addition to making stack validation more robust, this also paves the way for undwarf generation. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Jiri Slaby Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/678bd94c0566c6129bcc376cddb259c4c5633004.1498659915.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/Documentation/stack-validation.txt | 153 +++-- tools/objtool/Makefile | 2 +- tools/objtool/arch.h | 64 ++- tools/objtool/arch/x86/decode.c | 400 ++++++++++++-- tools/objtool/cfi.h | 55 ++ tools/objtool/check.c | 676 ++++++++++++++++++----- tools/objtool/check.h | 19 +- tools/objtool/elf.c | 59 +- tools/objtool/elf.h | 6 +- tools/objtool/special.c | 6 +- tools/objtool/warn.h | 10 + 11 files changed, 1130 insertions(+), 320 deletions(-) commit c207aee48037abca71c669cbec407b9891965c34 Author: Josh Poimboeuf Date: Wed Jun 28 10:11:06 2017 -0500 objtool, x86: Add several functions and files to the objtool whitelist In preparation for an objtool rewrite which will have broader checks, whitelist functions and files which cause problems because they do unusual things with the stack. These whitelists serve as a TODO list for which functions and files don't yet have undwarf unwinder coverage. Eventually most of the whitelists can be removed in favor of manual CFI hint annotations or objtool improvements. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Jiri Slaby Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/7f934a5d707a574bda33ea282e9478e627fb1829.1498659915.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/crypto/Makefile | 2 ++ arch/x86/crypto/sha1-mb/Makefile | 2 ++ arch/x86/crypto/sha256-mb/Makefile | 2 ++ arch/x86/kernel/Makefile | 1 + arch/x86/kernel/acpi/Makefile | 2 ++ arch/x86/kernel/kprobes/opt.c | 9 ++++++++- arch/x86/kernel/reboot.c | 2 ++ arch/x86/kvm/svm.c | 2 ++ arch/x86/kvm/vmx.c | 3 +++ arch/x86/lib/msr-reg.S | 8 ++++---- arch/x86/net/Makefile | 2 ++ arch/x86/platform/efi/Makefile | 1 + arch/x86/power/Makefile | 2 ++ arch/x86/xen/Makefile | 3 +++ kernel/kexec_core.c | 4 +++- 15 files changed, 39 insertions(+), 6 deletions(-) commit dcc914f44f065ef73685b37e59877a5bb3cb7358 Author: Josh Poimboeuf Date: Wed Jun 28 10:11:05 2017 -0500 objtool: Move checking code to check.c In preparation for the new 'objtool undwarf generate' command, which will rely on 'objtool check', move the checking code from builtin-check.c to check.c where it can be used by other commands. Signed-off-by: Josh Poimboeuf Reviewed-by: Jiri Slaby Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/294c5c695fd73c1a5000bbe5960a7c9bec4ee6b4.1498659915.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/Build | 1 + tools/objtool/builtin-check.c | 1281 +---------------------------------------- tools/objtool/check.c | 1263 ++++++++++++++++++++++++++++++++++++++++ tools/objtool/check.h | 51 ++ 4 files changed, 1328 insertions(+), 1268 deletions(-) commit 725816e8aabb1c183baa2bc9572ab9a0d26b9ea1 Author: Deepa Dinamani Date: Sat Jun 24 11:45:08 2017 -0700 posix_clocks: Use get_itimerspec64() and put_itimerspec64() Usage of these apis and their compat versions makes the syscalls: timer_settime and timer_gettime and their compat implementations simpler. This patch also serves as a preparatory patch for changing syscalls to use new time_t data types to support the y2038 effort by isolating the processing of user pointers through these apis. Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro kernel/time/posix-timers.c | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) commit bff412036f457d8160eebada43199b8d987152d8 Author: Deepa Dinamani Date: Sat Jun 24 11:45:07 2017 -0700 timerfd: Use get_itimerspec64() and put_itimerspec64() Usage of these apis and their compat versions makes the syscalls: timerfd_settime and timerfd_gettime and their compat implementations simpler. This patch also serves as a preparatory patch for changing syscalls to use new time_t data types to support the y2038 effort by isolating the processing of user pointers through these apis. Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro fs/timerfd.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit c0edd7c9acd0eaee149ab6cb4441cc71a1af87f0 Author: Deepa Dinamani Date: Sat Jun 24 11:45:06 2017 -0700 nanosleep: Use get_timespec64() and put_timespec64() Usage of these apis and their compat versions makes the syscalls: clock_nanosleep and nanosleep and their compat implementations simpler. This is a preparatory patch to isolate data conversions to struct timespec64 at userspace boundaries. This helps contain the changes needed to transition to new y2038 safe types. Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro include/linux/hrtimer.h | 2 +- kernel/time/alarmtimer.c | 4 ++-- kernel/time/hrtimer.c | 30 +++++++++++++----------------- kernel/time/posix-cpu-timers.c | 8 ++------ kernel/time/posix-timers.c | 20 ++++++++------------ 5 files changed, 26 insertions(+), 38 deletions(-) commit 5c4994102fb508d4a0f7a8afa46560c314c1ebd4 Author: Deepa Dinamani Date: Sat Jun 24 11:45:05 2017 -0700 posix-timers: Use get_timespec64() and put_timespec64() Usage of these apis and their compat versions makes the syscalls: clock_gettime, clock_settime, clock_getres and their compat implementations simpler. This is a preparatory patch to isolate data conversions to struct timespec64 at userspace boundaries. This helps contain the changes needed to transition to new y2038 safe types. Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro kernel/time/posix-stubs.c | 83 +++++++++++++++++++++++++--------------------- kernel/time/posix-timers.c | 63 ++++++++++++++--------------------- 2 files changed, 70 insertions(+), 76 deletions(-) commit 8781fb7e9749da424e01daacd14834b674658c63 Author: Andy Lutomirski Date: Thu Jun 29 08:53:14 2017 -0700 x86/mm: Delete a big outdated comment about TLB flushing The comment describes the old explicit IPI-based flush logic, which is long gone. Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/55e44997e56086528140c5180f8337dc53fb7ffc.1498751203.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit bc0d5a89fbe3c83ac45438d7ba88309f4713615d Author: Andy Lutomirski Date: Thu Jun 29 08:53:13 2017 -0700 x86/mm: Don't reenter flush_tlb_func_common() It was historically possible to have two concurrent TLB flushes targetting the same CPU: one initiated locally and one initiated remotely. This can now cause an OOPS in leave_mm() at arch/x86/mm/tlb.c:47: if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK) BUG(); with this call trace: flush_tlb_func_local arch/x86/mm/tlb.c:239 [inline] flush_tlb_mm_range+0x26d/0x370 arch/x86/mm/tlb.c:317 Without reentrancy, this OOPS is impossible: leave_mm() is only called if we're not in TLBSTATE_OK, but then we're unexpectedly in TLBSTATE_OK in leave_mm(). This can be caused by flush_tlb_func_remote() happening between the two checks and calling leave_mm(), resulting in two consecutive leave_mm() calls on the same CPU with no intervening switch_mm() calls. We never saw this OOPS before because the old leave_mm() implementation didn't put us back in TLBSTATE_OK, so the assertion didn't fire. Nadav noticed the reentrancy issue in a different context, but neither of us realized that it caused a problem yet. Reported-by: Levin, Alexander (Sasha Levin) Signed-off-by: Andy Lutomirski Reviewed-by: Nadav Amit Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Peter Zijlstra Cc: Rik van Riel Cc: linux-mm@kvack.org Fixes: 3d28ebceaffa ("x86/mm: Rework lazy TLB to track the actual loaded mm") Link: http://lkml.kernel.org/r/855acf733268d521c9f2e191faee2dcc23a29729.1498751203.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 236222d39347e0e486010f10c1493e83dbbdfba8 Author: Paolo Abeni Date: Thu Jun 29 15:55:58 2017 +0200 x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings According to the Intel datasheet, the REP MOVSB instruction exposes a pretty heavy setup cost (50 ticks), which hurts short string copy operations. This change tries to avoid this cost by calling the explicit loop available in the unrolled code for strings shorter than 64 bytes. The 64 bytes cutoff value is arbitrary from the code logic point of view - it has been selected based on measurements, as the largest value that still ensures a measurable gain. Micro benchmarks of the __copy_from_user() function with lengths in the [0-63] range show this performance gain (shorter the string, larger the gain): - in the [55%-4%] range on Intel Xeon(R) CPU E5-2690 v4 - in the [72%-9%] range on Intel Core i7-4810MQ Other tested CPUs - namely Intel Atom S1260 and AMD Opteron 8216 - show no difference, because they do not expose the ERMS feature bit. Signed-off-by: Paolo Abeni Acked-by: Linus Torvalds Cc: Alan Cox Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Hannes Frederic Sowa Cc: Josh Poimboeuf Cc: Kees Cook Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/4533a1d101fd460f80e21329a34928fad521c1d4.1498744345.git.pabeni@redhat.com [ Clarified the changelog. ] Signed-off-by: Ingo Molnar arch/x86/lib/copy_user_64.S | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 72298e5c92c50edd8cb7cfda4519483ce65fa166 Author: Gustavo A. R. Silva Date: Thu Jun 29 13:41:28 2017 -0500 sched/cputime: Refactor the cputime_adjust() code Address a Coverity false positive, which is caused by overly convoluted code: Value assigned to variable 'utime' at line 619:utime = rtime; is overwritten at line 642:utime = rtime - stime; before it can be used. This makes such variable assignment useless. Remove this variable assignment and refactor the code related. Addresses-Coverity-ID: 1371643 Signed-off-by: Gustavo A. R. Silva Cc: Frans Klaver Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/20170629184128.GA5271@embeddedgus Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 993647a293814dd47ae41d38657fda6e4ab04e33 Author: Arvind Yadav Date: Thu Jun 29 17:40:47 2017 +0530 cpu/hotplug: Constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const: File size before: text data bss dec hex filename 12582 15361 20 27963 6d3b kernel/cpu.o File size After adding 'const': text data bss dec hex filename 12710 15265 20 27995 6d5b kernel/cpu.o Signed-off-by: Arvind Yadav Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: anna-maria@linutronix.de Cc: bigeasy@linutronix.de Cc: boris.ostrovsky@oracle.com Cc: rcochran@linutronix.de Link: http://lkml.kernel.org/r/f9079e94e12b36d245e7adbf67d312bc5d0250c6.1498737970.git.arvind.yadav.cs@gmail.com Signed-off-by: Ingo Molnar kernel/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48365b38849fdb1ee6dc65beac044ca59f669683 Author: Daniel Bristot de Oliveira Date: Mon Jun 26 17:07:14 2017 +0200 sched/debug: Expose the number of RT/DL tasks that can migrate Add the value of the rt_rq.rt_nr_migratory and dl_rq.dl_nr_migratory to the sched_debug output, for instance: rt_rq[0]: .rt_nr_running : 2 .rt_nr_migratory : 1 <--- Like this .rt_throttled : 0 .rt_time : 828.645877 .rt_runtime : 1000.000000 This is useful to debug problems related to the RT/DL schedulers. This also fixes the format of some variables, that were unsigned, rather than signed. Signed-off-by: Daniel Bristot de Oliveira Cc: Clark Williams Cc: Linus Torvalds Cc: Luis Claudio R. Goncalves Cc: Luiz Capitulino Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Thomas Gleixner Cc: linux-rt-users Link: http://lkml.kernel.org/r/7896f71cada54ee7dd8507bb666063a2e051c3d4.1498482127.git.bristot@redhat.com Signed-off-by: Ingo Molnar kernel/sched/debug.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit e91c8d97eac74e603481840d950536bcb62b471b Author: Colin Ian King Date: Thu Jun 29 10:14:06 2017 +0100 perf/x86/intel: Constify the 'lbr_desc[]' array and make a function static A few minor clean-ups: constify the lbr_desc[] array and make local function lbr_from_signext_quirk_rd() static to fix a sparse warning: "symbol 'lbr_from_signext_quirk_rd' was not declared. Should it be static?" Signed-off-by: Colin Ian King Cc: Dan Carpenter Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20170629091406.9870-1-colin.king@canonical.com Signed-off-by: Ingo Molnar arch/x86/events/intel/lbr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dba9b7b6ca1af60fd21137c18795a81a5652c5ae Author: Takashi Iwai Date: Thu Jun 29 16:18:12 2017 +0200 ALSA: hda - Fix doubly initialization of i915 component In the commit fcc88d91cd36 ("ALSA: hda - Bind with i915 component before codec binding"), the binding with i915 audio component is moved to be performed always at probing the controller. This fixed the potential problems on IVB, but now it brought another issue on HSW and BDW. These two platforms give two individual HD-audio controllers, one for the analog codec on PCH and another for HDMI over gfx. Since I decided to take a lazy path to check only AZX_DRIVER_PCH type in the commit above, now both controllers try to bind with i915, and you see a kernel WARNING. This patch tries to address it again properly. Now a new DCAPS bit, AZX_DCAPS_I915_COMPONENT, is introduced for indicating the binding with i915 component in addition to the existing I915_POWERWELL bit flag. Each PCI entry has to give this new flag if it requires the binding with i915 component. For HSW/BDW PCH (i.e. the ones defined by AZX_DCAPS_INTEL_PCH) doesn't contain AZX_DCAPS_I915_COMPONENT bit while others have it. While we're at it, add parentheses around the bit flag check for avoiding possible compiler warnings, too. The bug was spotted by Intel CI tests. Fixes: fcc88d91cd36 ("ALSA: hda - Bind with i915 component before codec binding") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196219 Reported-by: Martin Peres Signed-off-by: Takashi Iwai sound/pci/hda/hda_controller.h | 6 +++++- sound/pci/hda/hda_intel.c | 40 ++++++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 19 deletions(-) commit a24261d70e00e4ce03cf45bbf18398f52a7b9229 Author: Kirill A. Shutemov Date: Wed Jun 28 15:17:30 2017 +0300 x86/KASLR: Fix detection 32/64 bit bootloaders for 5-level paging KASLR uses hack to detect whether we booted via startup_32() or startup_64(): it checks what is loaded into cr3 and compares it to _pgtables. _pgtables is the array of page tables where early code allocates page table from. KASLR expects cr3 to point to _pgtables if we booted via startup_32(), but that's not true if we booted with 5-level paging enabled. In this case top level page table is allocated separately and only the first p4d page table is allocated from the array. Let's modify the check to cover both 4- and 5-level paging cases. The patch also renames 'level4p' to 'top_level_pgt' as it now can hold page table for 4th or 5th level, depending on configuration. Signed-off-by: Kirill A. Shutemov Acked-by: Kees Cook Cc: Andrew Morton Cc: Andy Lutomirski Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170628121730.43079-1-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/pagetable.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 8a063a27815a759b99ad710402da1ccd1b0987f7 Author: Ganapathi Bhat Date: Wed Jun 28 12:26:58 2017 +0530 mwifiex: do not update MCS set from hostapd We should not copy the MCS set from hostapd RX-STBC. We have to just use the MCS set supported by the hardware. This fixes an issue, where mwifiex is advertising wrong MCS sets in beacons. Fixes: 474a41e94dfc ("mwifiex: update MCS set as per RX-STBC bit from hostapd") Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 5 ----- drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 22 ---------------------- 2 files changed, 27 deletions(-) commit 3cb57df37bf3c87c7bbd2bd6f94d9d48c1c8e2ae Author: Peter Oh Date: Tue Jun 27 15:07:29 2017 -0700 ieee80211: update public action codes Update Public Action field values as updated in IEEE Std 802.11-2016, so that modules/drivers can refer it. Signed-off-by: Peter Oh Reviewed-by: Johannes Berg Signed-off-by: Kalle Valo include/linux/ieee80211.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 36a554cec119bbd20c4ec0cb96bd4712d124bfea Author: Andrei Otcheretianski Date: Mon Jun 26 19:52:30 2017 +0300 nl80211: Don't verify owner_nlportid on NAN commands If NAN interface is created with NL80211_ATTR_SOCKET_OWNER, the socket that is used to create the interface is used for all NAN operations and reporting NAN events. However, it turns out that sending commands and receiving events on the same socket is not possible in a completely race-free way: If the socket buffer is overflowed by the events, the command response will not be sent. In that case the caller will block forever on recv. Using non-blocking socket for commands is more complicated and still the command response or ack may not be received. So, keep unicasting NAN events to the interface creator, but allow using a different socket for commands. Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho Reviewed-by: Johannes Berg Signed-off-by: Kalle Valo include/uapi/linux/nl80211.h | 9 ++++----- net/wireless/nl80211.c | 8 -------- 2 files changed, 4 insertions(+), 13 deletions(-) commit 123fef3fd4ae6052bad5cf1623c49845d16a6c67 Author: Arend van Spriel Date: Fri Jun 9 13:08:49 2017 +0100 brcmfmac: switch to using cfg80211_connect_done() The driver used cfg80211_connect_result() which is basically a wrapper around cfg80211_connect_done() passing a subset of the information that can be passed. For upcoming functionality this is not sufficient so switching to use cfg80211_connect_done(). Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 2526ff21aa77c205f72e8263335f20b7d7e636fc Author: Arend van Spriel Date: Fri Jun 9 13:08:48 2017 +0100 brcmfmac: support 4-way handshake offloading for 802.1X Adding callbacks for PMK provisioning. If firmware supports offloading it is indicated to user-space that 802.1X offload is supported. Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 61 ++++++++++++++++++++-- .../broadcom/brcm80211/brcmfmac/cfg80211.h | 3 +- 2 files changed, 60 insertions(+), 4 deletions(-) commit b8a64f0e96c2b258321ee03975aeb0f5e88a055b Author: Arend van Spriel Date: Fri Jun 9 13:08:47 2017 +0100 brcmfmac: support 4-way handshake offloading for WPA/WPA2-PSK The firmware may have supplicant code built-in. This is detected by the driver and indicated in the wiphy features flags. User-space can use this flag to determine whether or not to provide the pre-shared key material in the nl80211 CONNECT command. Reviewed-by: Gautam (Gautam Kumar) Shukla Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 75 ++++++++++++++++++++-- .../broadcom/brcm80211/brcmfmac/cfg80211.h | 14 +++- .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 1 + .../wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +- .../wireless/broadcom/brcm80211/brcmfmac/fweh.h | 30 +++++++++ .../wireless/broadcom/brcm80211/brcmfmac/fwil.h | 1 + .../broadcom/brcm80211/brcmfmac/fwil_types.h | 16 +++++ 7 files changed, 134 insertions(+), 7 deletions(-) commit 324dd7a6ac27b388e605ef136f23c88a5e49edbe Author: Tony Lindgren Date: Tue Jun 27 01:48:38 2017 -0700 ARM: OMAP2+: Fix omap3 prm shared irq Shared interrupts with IRQ_NOAUTOEN got a warning added with commit 04c848d39879 ("genirq: Warn when IRQ_NOAUTOEN is used with shared interrupts"). Let's just drop the IRQ_NOAUTOEN use for omap3 PRM shared interrupt as it does not seem to cause any other issues based on my testing. We have moved a lot of the code to initialize later, and whatever problems the legacy booting had seem to be gone now with pinctrl driver and device tree based booting. Otherwise we will get: WARNING: CPU: 0 PID: 1 at kernel/irq/manage.c:1348 __setup_irq+0x5d0/0x64c [] (__setup_irq) from [] (request_threaded_irq+0xdc/0x188) [] (request_threaded_irq) from [] (pcs_probe+0x6ec/0x8a4) [] (pcs_probe) from [] (platform_drv_probe+0x50/0xb0) [] (platform_drv_probe) from [] (driver_probe_device+0x33c/0x478) Note that we also need to remove the related enable_irq() to avoid getting the following: WARNING: CPU: 0 PID: 1 at kernel/irq/manage.c:529 enable_irq+0x34/0x70 [] (enable_irq) from [] (omap3_pm_init+0x118/0x3f8) [] (omap3_pm_init) from [] (am35xx_init_late+0x10/0x18) Cc: Kevin Hilman Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/pm34xx.c | 1 - arch/arm/mach-omap2/prm3xxx.c | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) commit e4448ed87ccdbacb74871736f63220642242b32f Author: Al Viro Date: Sat May 13 18:43:00 2017 -0400 bpf: don't open-code memdup_user() Signed-off-by: Al Viro kernel/bpf/syscall.c | 45 ++++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) commit a9bd8dfa539493db265e46a496c1a89279ab31d1 Author: Al Viro Date: Sat May 13 18:39:01 2017 -0400 kimage_file_prepare_segments(): don't open-code memdup_user() Signed-off-by: Al Viro kernel/kexec_file.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 30e7e3ecf39e578ffab6d5944c79c1d30dee0d3f Author: Al Viro Date: Sat May 13 18:31:26 2017 -0400 ethtool: don't open-code memdup_user() Signed-off-by: Al Viro net/core/ethtool.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit a2c841d94209f5775d354b563f4dccd76b876dc0 Author: Al Viro Date: Sat May 13 18:26:06 2017 -0400 do_ip_setsockopt(): don't open-code memdup_user() Signed-off-by: Al Viro net/ipv4/ip_sockglue.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 43727da90ec8955f1351ad582c6bc8f1c1ab8ab8 Author: Al Viro Date: Sat May 13 18:22:53 2017 -0400 do_ipv6_setsockopt(): don't open-code memdup_user() Signed-off-by: Al Viro net/ipv6/ipv6_sockglue.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit aa47cc1c3c7bd0df82b241aa2e3df36977b0c24b Author: Al Viro Date: Sat May 13 18:20:33 2017 -0400 irda: don't open-code memdup_user() and no, GFP_ATOMIC does not make any sense there... Signed-off-by: Al Viro net/irda/af_irda.c | 48 ++++++++++++------------------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) commit 7f2d17c67ae3a0954e35092564f1cf58726b2c44 Author: Al Viro Date: Sat May 13 18:16:28 2017 -0400 xfrm_user_policy(): don't open-code memdup_user() Signed-off-by: Al Viro net/xfrm/xfrm_state.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 02412e9b4e54e124fe0890b30b891d3e6f3adf38 Author: Al Viro Date: Sat May 13 18:15:25 2017 -0400 ima_write_policy(): don't open-code memdup_user_nul() Signed-off-by: Al Viro security/integrity/ima/ima_fs.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 65a5c3dd3e11225a0d0e0df97d23fa64ab2d4ed2 Author: Jon Hunter Date: Tue Jun 6 13:49:29 2017 +0100 dmaengine: tegra-apb: Really fix runtime-pm usage Commit edd3bdbe9db1 ("dmaengine: tegra-apb: Correct runtime-pm usage") added pm_runtime_get/put() calls to the tegra-apb DMA system suspend callbacks. Runtime PM is disabled during system suspend and so these APIs cannot be used. Fix the suspend handling for the tegra-apb DMA by moving the save and restore of the DMA register context into the runtime PM suspend and resume callbacks, and then use the pm_runtime_force_suspend/resume() APIs to invoke the runtime PM callbacks during system suspend. Fixes: edd3bdbe9db1 ("dmaengine: tegra-apb: Correct runtime-pm usage") Signed-off-by: Jon Hunter Signed-off-by: Vinod Koul drivers/dma/tegra20-apb-dma.c | 50 +++++++++---------------------------------- 1 file changed, 10 insertions(+), 40 deletions(-) commit 72e809ed81edf81b93d3a36b7238ba50d67f043d Author: Al Viro Date: Thu Jun 29 21:52:57 2017 -0400 iov_iter: sanity checks for copy to/from page primitives for now - just that we don't attempt to cross out of compound page Signed-off-by: Al Viro lib/iov_iter.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit aa28de275a248879f9828cb9f7ee7e119c72ff96 Author: Al Viro Date: Thu Jun 29 21:45:10 2017 -0400 iov_iter/hardening: move object size checks to inlined part There we actually have useful information about object sizes. Note: this patch has them done for all iov_iter flavours. Right now we do them twice in iovec case, but that'll change very shortly. Signed-off-by: Al Viro include/linux/uio.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++----- lib/iov_iter.c | 22 ++++++++++---------- 2 files changed, 64 insertions(+), 16 deletions(-) commit b0377fedb6528087ed319b0d054d6ed82240372c Author: Al Viro Date: Thu Jun 29 21:42:43 2017 -0400 copy_{to,from}_user(): consolidate object size checks ... and move them into thread_info.h, next to check_object_size() Signed-off-by: Al Viro include/linux/thread_info.h | 27 +++++++++++++++++++++++++++ include/linux/uaccess.h | 28 ++-------------------------- 2 files changed, 29 insertions(+), 26 deletions(-) commit 9c5f6908de03a4f52ba7364b11fcd6116225480c Author: Al Viro Date: Thu Jun 29 21:39:54 2017 -0400 copy_{from,to}_user(): move kasan checks and might_fault() out-of-line Signed-off-by: Al Viro include/linux/uaccess.h | 16 ++++++++-------- lib/usercopy.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 10 deletions(-) commit 785b62167d2fb9f2b98432627e503d3759a48de9 Author: Joel Stanley Date: Thu Jun 29 15:31:07 2017 +0930 clk: gemini: Read status before using the value The probe does a shift and mask of val without having read it from the hardware. Fixes: 846423f96721 ("clk: Add Gemini SoC clock controller") Signed-off-by: Joel Stanley Reviewed-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/clk-gemini.c | 1 + 1 file changed, 1 insertion(+) commit 2b286b09a048df80fd5f7dfc5057c2837679a1ab Author: Jerome Brunet Date: Wed Jun 28 15:53:45 2017 +0200 clk: scpi: error when clock fails to register Current implementation of scpi_clk_add just print a warning when clock fails to register but then keep going as if nothing happened. The provider is then registered with bogus data. This may latter lead to an Oops in __clk_create_clk when hlist_add_head(&clk->clks_node, &hw->core->clks) is called. This patch fixes the issue and errors if a clock fails to register. Fixes: cd52c2a4b5c4 ("clk: add support for clocks provided by SCP(System Control Processor)") Signed-off-by: Jerome Brunet Reviewed-by: Sudeep Holla Signed-off-by: Stephen Boyd drivers/clk/clk-scpi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b3b02eac33eddda88992962d920b46348bb086da Author: Alexandre Belloni Date: Thu Jun 8 02:36:47 2017 +0200 clk: at91: Add sama5d2 suspend/resume On sama5d2, VDD core maybe be cut while in suspend. This means registers will be lost. Ensure they are saved and restored properly. Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: Stephen Boyd drivers/clk/at91/clk-generated.c | 2 + drivers/clk/at91/clk-peripheral.c | 4 +- drivers/clk/at91/pmc.c | 129 ++++++++++++++++++++++++++++++++++++++ drivers/clk/at91/pmc.h | 6 ++ 4 files changed, 140 insertions(+), 1 deletion(-) commit c13c43d54f2c6a3be1c675766778ac1ad8dfbfcc Author: Vishal Verma Date: Thu Jun 29 16:59:11 2017 -0600 libnvdimm, btt: fix btt_rw_page not returning errors btt_rw_page was not propagating errors frm btt_do_bvec, resulting in any IO errors via the rw_page path going unnoticed. the pmem driver recently fixed this in e10624f pmem: fail io-requests to known bad blocks but same problem in BTT went neglected. Fixes: 5212e11fde4d ("nd_btt: atomic sector updates") Cc: Cc: Toshi Kani Cc: Dan Williams Cc: Jeff Moyer Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit a8e2b6367794e6cee9eecba6d5ff425f338e0754 Author: Carlos Maiolino Date: Thu Jun 29 11:25:40 2017 +0200 Make statfs properly return read-only state after emergency remount Emergency remount (sysrq-u) sets MS_RDONLY to the superblock but doesn't set MNT_READONLY to the mount point. Once calculate_f_flags() only check for the mount point read only state, when setting kstatfs flags, after an emergency remount, statfs does not report the filesystem as read-only, even though it is. Enable flags_by_sb() to also check for superblock read only state, so the kstatfs and consequently statfs can properly show the read-only state of the filesystem. Signed-off-by: Carlos Maiolino Signed-off-by: Al Viro fs/statfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 6916363f3083837ed5adb3df2dd90d6b97017dff Author: Sebastian Andrzej Siewior Date: Tue Jun 27 18:19:11 2017 +0200 fs/dcache: init in_lookup_hashtable in_lookup_hashtable was introduced in commit 94bdd655caba ("parallel lookups machinery, part 3") and never initialized but since it is in the data it is all zeros. But we need this for -RT. Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Al Viro fs/dcache.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4f2ed694148131f93baffca9e68b0cd8dcc96c38 Author: Denys Vlasenko Date: Wed Jun 21 19:46:47 2017 +0200 minix: Deinline get_block, save 2691 bytes This function compiles to 1402 bytes of machine code. It has 2 callsites, and also a not-inlined copy gets created by compiler anyway since its address gets passed as a parameter to block_truncate_page(). Signed-off-by: Denys Vlasenko CC: Al Viro CC: linux-fsdevel@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Al Viro fs/minix/itree_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc658db47d6897a8571fb6227f59d1d18151b0b2 Author: Kees Cook Date: Wed Jun 21 09:53:06 2017 -0700 fs: Reorder inode_owner_or_capable() to avoid needless Checking for capabilities should be the last operation when performing access control tests so that PF_SUPERPRIV is set only when it was required for success (implying that the capability was needed for the operation). Reported-by: Solar Designer Signed-off-by: Kees Cook Acked-by: Serge Hallyn Reviewed-by: Andy Lutomirski Signed-off-by: Al Viro fs/inode.c | 2 +- fs/namei.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 41124db869b7e00e12052555f8987867ac01d70c Author: Luis R. Rodriguez Date: Thu Jun 1 11:08:01 2017 -0700 fs: warn in case userspace lied about modprobe return kmod <= v19 was broken -- it could return 0 to modprobe calls, incorrectly assuming that a kernel module was built-in, whereas in reality the module was just forming in the kernel. The reason for this is an incorrect userspace heuristics. A userspace kmod fix is available for it [0], however should userspace break again we could go on with an failed get_fs_type() which is hard to debug as the request_module() is detected as returning 0. The first suspect would be that there is something worth with the kernel's module loader and obviously in this case that is not the issue. Since these issues are painful to debug complain when we know userspace has outright lied to us. [0] http://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/libkmod/libkmod-module.c?id=fd44a98ae2eb5eb32161088954ab21e58e19dfc4 Suggested-by: Rusty Russell Cc: Jessica Yu Signed-off-by: Luis R. Rodriguez Signed-off-by: Al Viro fs/filesystems.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 42317ea79d9af0a83b6cfdfe43c27a91d468bfb1 Author: Masahiro Yamada Date: Fri Jun 30 01:03:32 2017 +0900 tile: remove unneeded extra-y in Makefile This extra-y is unneeded because vdso.lds is generated according to the dependency. Signed-off-by: Masahiro Yamada arch/tile/kernel/vdso/Makefile | 1 - 1 file changed, 1 deletion(-) commit 799c43415442414b1032580c47684cb709dfed6d Author: Nicholas Piggin Date: Fri Jun 9 15:24:17 2017 +1000 kbuild: thin archives make default for all archs Make thin archives build the default, but keep the config option to allow exemptions if any breakage can't be quickly solved. Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada Documentation/process/changes.rst | 9 ++++----- arch/Kconfig | 2 +- arch/powerpc/Kconfig | 8 -------- 3 files changed, 5 insertions(+), 14 deletions(-) commit 827880ec260ba048f95fe646b96a205c394fa0f0 Author: Nicholas Piggin Date: Fri Jun 9 15:24:16 2017 +1000 x86/um: thin archives build fix The linker does not like vdso-syms.lds in input archive files. Make it an extra-y instead. Cc: Jeff Dike Cc: Richard Weinberger Cc: user-mode-linux-devel@lists.sourceforge.net Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada arch/x86/um/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6d62a1c1e2276ee6fb4c25610dbcb39beb62240 Author: Nicholas Piggin Date: Thu Jun 22 22:39:29 2017 +1000 tile: thin archives fix linking The VDSO symbols can't be linked into built-in.o when building with thin archives, so change this to linking a new object file that is included into the built-in.o. Cc: Chris Metcalf Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada arch/tile/kernel/vdso/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 26160371359ea91d8e2bdad6245f39e7ed0c17a3 Author: Nicholas Piggin Date: Fri Jun 23 23:44:15 2017 +1000 ia64: thin archives fix linking The VDSO symbols can't be linked into built-in.o when building with thin archives, so change this to linking a new object file that is included into the built-in.o. Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada arch/ia64/kernel/Makefile.gate | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 8f5ef7c74ac778a16a89bc054e316dcade304784 Author: Nicholas Piggin Date: Thu Jun 22 22:39:27 2017 +1000 sh: thin archives fix linking The VDSO symbols can't be linked into built-in.o when building with thin archives, so change this to linking a new object file that is included into the built-in.o. Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada arch/sh/kernel/vsyscall/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3a166fc2d4ef7a6b7e440271ee6bd1799c066605 Author: Nicholas Piggin Date: Tue Jun 20 01:52:05 2017 +1000 kbuild: handle libs-y archives separately from built-in.o archives The thin archives build currently puts all lib.a and built-in.o files together and links them with --whole-archive. This works because thin archives can recursively refer to thin archives. However some architectures include libgcc.a, which may not be a thin archive, or it may not be constructed with the "P" option, in which case its contents do not get linked correctly. So don't pull .a libs into the root built-in.o archive. These libs should already have symbol tables and indexes built, so they can be direct linker inputs. Move them out of the --whole-archive option, which restore the conditional linking behaviour of lib.a to thin archives builds. Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada Documentation/kbuild/kbuild.txt | 8 ++++++-- Makefile | 8 ++++---- scripts/link-vmlinux.sh | 45 ++++++++++++++++++++++++++++++++--------- 3 files changed, 46 insertions(+), 15 deletions(-) commit 9a6cfca4f4130444cb02536a4fdf7b6e285c713e Author: Nicholas Piggin Date: Fri Jun 9 15:24:14 2017 +1000 kbuild: thin archives use P option to ar The P option makes ar do full path name matching and can prevent ar from discarding files with duplicate names in some cases of creating thin archives from thin archives. The sh architecture in particular loses some object files from its kernel/cpu/sh*/ directories without this option. This could be a bug in binutils ar, but the P option should not cause any negative effects so it is safe to use to work around this with. Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada scripts/Makefile.build | 8 ++++---- scripts/link-vmlinux.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 1328a1ae0e9048ff4b7f6b60c497db7a2799e1b1 Author: Nicholas Piggin Date: Fri Jun 9 15:24:13 2017 +1000 kbuild: thin archives final link close --whole-archives option Close the --whole-archives option with --no-whole-archive. Some architectures end up including additional .o and files multiple times after this, and they get duplicate symbols when they are brought under the --whole-archives option. This matches more closely with the incremental final link. Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada scripts/link-vmlinux.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit df91b0262e2cff23db5eac77126ea0bef06d54d2 Author: Masahiro Yamada Date: Fri Jun 30 00:52:06 2017 +0900 ia64: remove unneeded extra-y in Makefile.gate All the files listed in "extra-y" are generated according to the dependency. They are still needed in "targets" to include .*.cmd for incremental building. Signed-off-by: Masahiro Yamada arch/ia64/kernel/Makefile.gate | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 44ea9948e93556a501c6de50b0a77042a0ba077f Author: Masahiro Yamada Date: Sun Jun 25 10:53:08 2017 +0900 tile: fix dependency and .*.cmd inclusion for incremental build Build targets using if_changed(_rule) must depend on FORCE so that they are evaluated every time. In order to include .*.cmd files correctly, build targets added to "targets" must not be prefixed with $(obj)/ because it is done by scripts/Makefile.lib . Signed-off-by: Masahiro Yamada arch/tile/kernel/vdso/Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9289ea7f952b14ef2627edc49f9508234952a85e Author: David S. Miller Date: Thu Jun 22 10:56:48 2017 -0400 sparc64: Use indirect calls in hamming weight stubs Otherwise, depending upon link order, the branch relocation limits could be exceeded. Signed-off-by: David S. Miller Signed-off-by: Masahiro Yamada arch/sparc/lib/hweight.S | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit cc1a7c4bae28215d042fb9f00dcb77dd65abafdf Author: Al Viro Date: Tue Jun 27 17:46:06 2017 -0400 usbdevfs: get rid of field-by-field copyin Signed-off-by: Al Viro drivers/usb/core/devio.c | 48 +++++++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) commit 30138384dae74cdd5694615c098a19af984a3dda Author: Al Viro Date: Tue Jun 27 15:51:38 2017 -0400 compat_hdio_ioctl: get rid of set_fs() Signed-off-by: Al Viro block/compat_ioctl.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 229b53c9bf4e1132a4aa6feb9632a7a1f1d08c5c Author: Al Viro Date: Tue Jun 27 15:47:56 2017 -0400 take floppy compat ioctls to sodding floppy.c all other drivers recognizing those ioctls are very much *not* biarch. Signed-off-by: Al Viro block/compat_ioctl.c | 340 ------------------------------------------------- drivers/block/floppy.c | 328 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 328 insertions(+), 340 deletions(-) commit 251d59515fe4681a64a8bc7e37cfa00701e0f9b0 Author: Al Viro Date: Thu Apr 20 15:47:34 2017 -0400 spidev: quit messing with access_ok() Signed-off-by: Al Viro drivers/spi/spidev.c | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) commit a4058c5bce8aded1a12a59990e84e481a96fb490 Author: Christoph Hellwig Date: Sat May 27 11:16:54 2017 +0300 nfsd: remove nfsd_vfs_read Simpler done in the only caller. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/nfsd/vfs.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 73da852e3831bdc7a38d8d5fba178f35c923b264 Author: Christoph Hellwig Date: Sat May 27 11:16:53 2017 +0300 nfsd: use vfs_iter_read/write Instead of messing with the address limit to use vfs_read/vfs_writev. Note that this requires that exported file implement ->read_iter and ->write_iter. All currently exportable file systems do this. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/nfsd/vfs.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit abbb65899aecfc97bda64b6816d1e501754cfe1f Author: Christoph Hellwig Date: Sat May 27 11:16:52 2017 +0300 fs: implement vfs_iter_write using do_iter_write De-dupliate some code and allow for passing the flags argument to vfs_iter_write. Additionally it now properly updates timestamps. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro drivers/block/loop.c | 2 +- drivers/target/target_core_file.c | 4 ++-- fs/coda/file.c | 2 +- fs/read_write.c | 29 +++++++++-------------------- fs/splice.c | 2 +- include/linux/fs.h | 3 ++- 6 files changed, 16 insertions(+), 26 deletions(-) commit 18e9710ee59ce3bd2a2512ddcd3f7ceebe8b8d17 Author: Christoph Hellwig Date: Sat May 27 11:16:51 2017 +0300 fs: implement vfs_iter_read using do_iter_read De-dupliate some code and allow for passing the flags argument to vfs_iter_read. Additional it properly updates atime now. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro drivers/block/loop.c | 4 ++-- drivers/target/target_core_file.c | 2 +- fs/coda/file.c | 2 +- fs/read_write.c | 29 +++++++++-------------------- include/linux/fs.h | 3 ++- 5 files changed, 15 insertions(+), 25 deletions(-) commit edab5fe38c2c17a7d7ea5f82e1d9503bfc79a8ac Author: Christoph Hellwig Date: Sat May 27 11:16:49 2017 +0300 fs: move more code into do_iter_read/do_iter_write The checks for the permissions and can read / write flags are common for the callers. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 73 ++++++++++++++++++++++----------------------------------- 1 file changed, 28 insertions(+), 45 deletions(-) commit 19c735868dd018fd432d0df43aaf2d5ecb7c1256 Author: Christoph Hellwig Date: Sat May 27 11:16:48 2017 +0300 fs: remove __do_readv_writev Split it into one helper each for reads vs writes. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 60 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 24 deletions(-) commit 26c87fb7d10dadc59a475c7809adc05303bf951e Author: Christoph Hellwig Date: Sat May 27 11:16:47 2017 +0300 fs: remove do_compat_readv_writev opencode it in both callers to simplify the call stack a bit. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) commit 251b42a1dc641fac3fe412515233d60456180011 Author: Christoph Hellwig Date: Sat May 27 11:16:46 2017 +0300 fs: remove do_readv_writev opencode it in both callers to simplify the call stack a bit. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit 8183003e48cbb9d6d276b6330eb5edecf95830f3 Author: Rafael J. Wysocki Date: Thu Jun 29 01:49:44 2017 +0200 cpufreq: Update scaling_cur_freq documentation Commit f8475cef9008 "x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF" modified the way the scaling_cur_freq cpufreq policy attribute in sysfs is handled on contemporary Intel-based x86 systems, so update the documentation to reflect that change. Signed-off-by: Rafael J. Wysocki Documentation/admin-guide/pm/cpufreq.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fab24dcc395637557a7988a867e7b3a5823917a9 Author: Rafael J. Wysocki Date: Thu Jun 29 01:47:56 2017 +0200 cpufreq: intel_pstate: Clean up after performance governor changes After commit 82b4e03e01bc (intel_pstate: skip scheduler hook when in "performance" mode) get_target_pstate_use_performance() and get_target_pstate_use_cpu_load() are never called if scaling_governor is "performance", so drop the CPUFREQ_POLICY_PERFORMANCE checks from them as they will never trigger anyway. Moreover, the documentation needs to be updated to reflect the change made by the above commit, so do that too. Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada Documentation/admin-guide/pm/intel_pstate.rst | 6 ++---- drivers/cpufreq/intel_pstate.c | 6 ------ 2 files changed, 2 insertions(+), 10 deletions(-) commit 59494fe2c89e46e85d83de9bc45dd1d528955c49 Author: Arvind Yadav Date: Thu Jun 29 16:58:40 2017 +0530 PM: hibernate: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 6332 488 308 7128 1bd8 kernel/power/hibernate.o File size After adding 'const': text data bss dec hex filename 6396 424 308 7128 1bd8 kernel/power/hibernate.o Signed-off-by: Arvind Yadav Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki kernel/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ed09c94580de9d5b18cc35d1f97e9f24cd9233b Author: Nicholas Piggin Date: Mon Jun 26 15:38:15 2017 +1000 cpuidle: menu: allow state 0 to be disabled The menu driver does not allow state0 to be disabled completely. If it is disabled but other enabled states don't meet latency requirements, it is still used. Fix this by starting with the first enabled idle state. Fall back to state 0 if no idle states are enabled (arguably this should be -EINVAL if it is attempted, but this is the minimal fix). Acked-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/menu.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 654d08a42a5660514df5a5a6ed4dc1b0c978a0a3 Author: Joe Perches Date: Fri Jun 9 12:29:20 2017 -0700 intel_idle: Use more common logging style Remove #define PREFIX and add #define pr_fmt to use more common logging. Miscellanea: o Add missing newline to format o Convert a single printk without KERN_ to pr_info Signed-off-by: Joe Perches Acked-by: Jacob Pan Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit d5d51fece79eafcdbc69d1836c28a3c9c7c8e862 Author: Dan Williams Date: Thu Jun 29 09:02:10 2017 -0700 acpi, nfit: quiet invalid block-aperture-region warnings This state is already visible by userspace since the BLK region will not be enabled, and it is otherwise benign as it usually indicates that the DIMM is not configured. Signed-off-by: Dan Williams drivers/nvdimm/region_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14e494542636b7a685c5bf27e695e3bb9ec3fe7d Author: Vishal Verma Date: Wed Jun 28 14:25:00 2017 -0600 libnvdimm, btt: BTT updates for UEFI 2.7 format The UEFI 2.7 specification defines an updated BTT metadata format, bumping the revision to 2.0. Add support for the new format, while retaining compatibility for the old 1.1 format. Cc: Toshi Kani Cc: Linda Knippers Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 28 +++++++++++++------ drivers/nvdimm/btt.h | 2 ++ drivers/nvdimm/btt_devs.c | 46 +++++++++++++++++++++++++++---- drivers/nvdimm/claim.c | 1 + drivers/nvdimm/label.c | 6 ++++ drivers/nvdimm/label.h | 1 + drivers/nvdimm/namespace_devs.c | 61 +++++++++++++++++++++++++++++++++++++++-- drivers/nvdimm/nd.h | 3 ++ include/linux/nd.h | 1 + 9 files changed, 134 insertions(+), 15 deletions(-) commit 5e93746f065c49445cf8115007fc887789438ec0 Author: Arvind Yadav Date: Thu Jun 22 15:44:41 2017 +0530 acpi, nfit: constify *_attribute_group File size before: text data bss dec hex filename 20792 1580 994 23366 5b46 drivers/acpi/nfit/core.o File size After adding 'const': text data bss dec hex filename 20968 1388 994 23350 5b36 drivers/acpi/nfit/core.o Signed-off-by: Arvind Yadav Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bb43dbc5e09d52c6085dfee65f4f923b3fbcd1d4 Author: Kirill A. Shutemov Date: Tue Jun 27 14:59:48 2017 +0300 x86/ftrace: Exclude functions in head64.c from function-tracing A recent commit moved most logic of early boot up from startup_64() written in assembly to __startup_64() written in C. Fengguang reported breakage due to the change. It was tracked down to CONFIG_FUNCTION_TRACER being enabled. Tracing this function is not possible because it's invoked from the earliest boot stage before the relocation fixups have been done. It is the function doing the relocation. Exclude it from being built with tracer stubs. Fixes: c88d71508e36 ("x86/boot/64: Rewrite startup_64() in C") Reported-by: Fengguang Wu Signed-off-by: Kirill A. Shutemov Acked-by: Steven Rostedt Signed-off-by: Thomas Gleixner Cc: lkp@01.org Link: http://lkml.kernel.org/r/20170627115948.17938-1-kirill.shutemov@linux.intel.com arch/x86/kernel/Makefile | 1 + 1 file changed, 1 insertion(+) commit fcce2fdbf478c749aa194e286858f6b6b601f5ee Merge: cddbb79 ec327f7 Author: David S. Miller Date: Thu Jun 29 15:56:16 2017 -0400 Merge branch 'mlx4-dynamic-tc-tx-queues' Tariq Toukan says: ==================== mlx4_en dynamic TC tx queues This patchset from Inbar aligns the number of TX queues to the actual need, according to the TC configuration. Series generated against net-next commit: 2ee87db3a287 Merge branch 'nfp-get_phys_port_name-for-representors-and-SR-IOV-reorder' ==================== Signed-off-by: David S. Miller commit ec327f7a4340b635d89ca9667935adefa3905be1 Author: Inbar Karmy Date: Thu Jun 29 14:07:57 2017 +0300 net/mlx4_en: Do not allocate redundant TX queues when TC is disabled Currently the number of TX queues that are allocated doesn't depend on the number of TCs, the module always loads with max num of UP per channel. In order to prevent the allocation of unnecessary memory, the module will load with minimum number of UPs per channel, and the user will be able to control the number of TX queues per channel by changing the number of TC to 8 using the tc command. The variable num_up will hold the information about the current number of UPs. Due to the change, needed to remove the lines that set the value of UP to be different than zero in the func "mlx4_en_select_queue", since now the num of TX queues that are allocated is only one per channel in default. In order not to force the UP to be zero in case of only one TC, added a condition before forcing it in the func "mlx4_en_fill_qp_context". Tested: After the module is loaded with minimum number of UP per channel, to increase num of TCs to 8, use: tc qdisc add dev ens8 root mqprio num_tc 8 In order to decrease the number of TCs to minimum number of UP per channel, use: tc qdisc del dev ens8 root Signed-off-by: Inbar Karmy Signed-off-by: Tariq Toukan Cc: Tarick Bedeir Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | 6 +-- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 7 +-- drivers/net/ethernet/mellanox/mlx4/en_main.c | 3 +- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 54 +++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx4/en_resources.c | 3 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 6 +-- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 + 7 files changed, 65 insertions(+), 16 deletions(-) commit f21ad61424f7c623eddbcf54425a86afb68ca55f Author: Inbar Karmy Date: Thu Jun 29 14:07:56 2017 +0300 net/mlx4_en: Add dynamic variable to hold the number of user priorities (UP) Until this patch, the number of UPs was hard coded for eight. Replace this with a variable in struct "mlx4_en_port_profile". Currently, the variable will hold the maximum number of UP, as before. The patch creates an infrastructure to add an option for dynamic change of the actual number of TCs. Signed-off-by: Inbar Karmy Signed-off-by: Tariq Toukan Cc: Tarick Bedeir Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 12 +++++++----- drivers/net/ethernet/mellanox/mlx4/en_main.c | 3 ++- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 7 ++++--- 5 files changed, 17 insertions(+), 13 deletions(-) commit cddbb79f7a80adbe5f2b2dfddb9c0611bdba6cdb Author: Arvind Yadav Date: Thu Jun 29 16:39:38 2017 +0530 net: bridge: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 2645 896 0 3541 dd5 net/bridge/br_sysfs_br.o File size After adding 'const': text data bss dec hex filename 2701 832 0 3533 dcd net/bridge/br_sysfs_br.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller net/bridge/br_sysfs_br.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38ef00cc3390798cc09e8565b708a46daef7f1b6 Author: Arvind Yadav Date: Thu Jun 29 16:31:26 2017 +0530 net: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 9968 3168 16 13152 3360 net/core/net-sysfs.o File size After adding 'const': text data bss dec hex filename 10160 2976 16 13152 3360 net/core/net-sysfs.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller net/core/net-sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ee27244b6653f54fb1a7601ff08d02889b699388 Author: Arvind Yadav Date: Thu Jun 29 11:26:06 2017 +0530 net: freescale: gianfar : constify dev_pm_ops structures. dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 19057 392 0 19449 4bf9 drivers/net/ethernet/freescale/gianfar.o File size After adding 'const': text data bss dec hex filename 19249 192 0 19441 4bf1 drivers/net/ethernet/freescale/gianfar.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/net/ethernet/freescale/gianfar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d19724ec7b73d4b3935dc59be2f38fd09cde1e74 Author: Arvind Yadav Date: Thu Jun 29 11:21:00 2017 +0530 net: smc91x: constify dev_pm_ops structures. dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 18709 401 0 19110 4aa6 drivers/net/ethernet/smsc/smc91x.o File size After adding 'const': text data bss dec hex filename 18901 201 0 19102 4a9e drivers/net/ethernet/smsc/smc91x.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc91x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb60a73d00a7e1f069cd45d7b06ee46bc6b7dfb1 Author: Arvind Yadav Date: Thu Jun 29 11:14:50 2017 +0530 net: ibm: ibmveth: constify dev_pm_ops structures. dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 15426 1256 0 16682 412a drivers/net/ethernet/ibm/ibmveth.o File size After adding 'const': text data bss dec hex filename 15618 1064 0 16682 412a drivers/net/ethernet/ibm/ibmveth.o Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmveth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5df969c3b0c6df03d72e0e7502c4adc7838442f9 Author: Thomas Falcon Date: Wed Jun 28 19:55:54 2017 -0500 ibmvnic: Fix assignment of RX/TX IRQ's The driver currently creates RX/TX queues during device probe, but assigns IRQ's to them during device open. On reset, however, IRQ's are assigned when resetting the queues. If there is a reset while the device is closed and the device is later opened, the driver will request IRQ's twice, causing the open to fail. This patch assigns the IRQ's in the ibmvnic_init function after the queues are reset or initialized, ensuring IRQ's are only requested once. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4f75ba6982bc7e37e7738b2f1257d21a9c9e5d31 Author: Donald Sharp Date: Wed Jun 28 13:58:57 2017 -0400 net: ipmr: Add ipmr_rtm_getroute Add to RTNL_FAMILY_IPMR, RTM_GETROUTE the ability to retrieve one S,G mroute from a specified table. *,G will return mroute information for just that particular mroute if it exists. This is because it is entirely possible to have more S's then can fit in one skb to return to the requesting process. Signed-off-by: Donald Sharp Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/ipmr.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) commit 8007e40a24e12d35189203370268c7278f29ab74 Author: Martin KaFai Lau Date: Wed Jun 28 10:41:24 2017 -0700 bpf: Fix out-of-bound access on interpreters[] The index is off-by-one when fp->aux->stack_depth has already been rounded up to 32. In particular, if stack_depth is 512, the index will be 16. The fix is to round_up and then takes -1 instead of round_down. [ 22.318680] ================================================================== [ 22.319745] BUG: KASAN: global-out-of-bounds in bpf_prog_select_runtime+0x48a/0x670 [ 22.320737] Read of size 8 at addr ffffffff82aadae0 by task sockex3/1946 [ 22.321646] [ 22.321858] CPU: 1 PID: 1946 Comm: sockex3 Tainted: G W 4.12.0-rc6-01680-g2ee87db3a287 #22 [ 22.323061] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-1.el7.centos 04/01/2014 [ 22.324260] Call Trace: [ 22.324612] dump_stack+0x67/0x99 [ 22.325081] print_address_description+0x1e8/0x290 [ 22.325734] ? bpf_prog_select_runtime+0x48a/0x670 [ 22.326360] kasan_report+0x265/0x350 [ 22.326860] __asan_report_load8_noabort+0x19/0x20 [ 22.327484] bpf_prog_select_runtime+0x48a/0x670 [ 22.328109] bpf_prog_load+0x626/0xd40 [ 22.328637] ? __bpf_prog_charge+0xc0/0xc0 [ 22.329222] ? check_nnp_nosuid.isra.61+0x100/0x100 [ 22.329890] ? __might_fault+0xf6/0x1b0 [ 22.330446] ? lock_acquire+0x360/0x360 [ 22.331013] SyS_bpf+0x67c/0x24d0 [ 22.331491] ? trace_hardirqs_on+0xd/0x10 [ 22.332049] ? __getnstimeofday64+0xaf/0x1c0 [ 22.332635] ? bpf_prog_get+0x20/0x20 [ 22.333135] ? __audit_syscall_entry+0x300/0x600 [ 22.333770] ? syscall_trace_enter+0x540/0xdd0 [ 22.334339] ? exit_to_usermode_loop+0xe0/0xe0 [ 22.334950] ? do_syscall_64+0x48/0x410 [ 22.335446] ? bpf_prog_get+0x20/0x20 [ 22.335954] do_syscall_64+0x181/0x410 [ 22.336454] entry_SYSCALL64_slow_path+0x25/0x25 [ 22.337121] RIP: 0033:0x7f263fe81f19 [ 22.337618] RSP: 002b:00007ffd9a3440c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141 [ 22.338619] RAX: ffffffffffffffda RBX: 0000000000aac5fb RCX: 00007f263fe81f19 [ 22.339600] RDX: 0000000000000030 RSI: 00007ffd9a3440d0 RDI: 0000000000000005 [ 22.340470] RBP: 0000000000a9a1e0 R08: 0000000000a9a1e0 R09: 0000009d00000001 [ 22.341430] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000010000 [ 22.342411] R13: 0000000000a9a023 R14: 0000000000000001 R15: 0000000000000003 [ 22.343369] [ 22.343593] The buggy address belongs to the variable: [ 22.344241] interpreters+0x80/0x980 [ 22.344708] [ 22.344908] Memory state around the buggy address: [ 22.345556] ffffffff82aad980: 00 00 00 04 fa fa fa fa 04 fa fa fa fa fa fa fa [ 22.346449] ffffffff82aada00: 00 00 00 00 00 fa fa fa fa fa fa fa 00 00 00 00 [ 22.347361] >ffffffff82aada80: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa [ 22.348301] ^ [ 22.349142] ffffffff82aadb00: 00 01 fa fa fa fa fa fa 00 00 00 00 00 00 00 00 [ 22.350058] ffffffff82aadb80: 00 00 07 fa fa fa fa fa 00 00 05 fa fa fa fa fa [ 22.350984] ================================================================== Fixes: b870aa901f4b ("bpf: use different interpreter depending on required stack size") Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit beef8516a4540b61ebb16d94ca0430b8f6760a54 Author: Colin Ian King Date: Wed Jun 28 17:51:10 2017 +0100 amd-xgbe: fix spelling mistake: "avialable" -> "available" Trivial fix to spelling mistake in netdev_err message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ac6e2a3b8dd7dc8f5b924f440e005d957489d8d Merge: 65344ba a356ab1 Author: David S. Miller Date: Thu Jun 29 15:26:14 2017 -0400 Merge branch 'arcnet-features' Michael Grzeschik says: ==================== arcnet: Collection of latest features Here we sum up the latest features to improve the arcnet framework. One patch is used to get feedback from the transfer queue about failed xfers by adding the err_skb message queue. Beside that we improve the backplane status that can be read by the PCI-based cards and offer that status via an extra sysfs attribute. In the last patch we add another card type PCIFB2. ==================== Signed-off-by: David S. Miller commit a356ab1c3d46513067dddf9484c9f05e10279312 Author: Michael Grzeschik Date: Wed Jun 28 18:32:21 2017 +0200 arcnet: com20020-pci: add support for PCIFB2 card We add support for the PCIFB2 card from EAE. Beside other cards, this card has the backplane mode enabled by default. Signed-off-by: Michael Grzeschik Signed-off-by: David S. Miller drivers/net/arcnet/com20020-pci.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 52ab12e4f99437a046962e6486b0efded52846af Author: Michael Grzeschik Date: Wed Jun 28 18:32:20 2017 +0200 arcnet: com20020-pci: handle backplane mode depending on card type We read the backplane mode of each subcard from bits 2 and 3 of the misc register. Signed-off-by: Michael Grzeschik Signed-off-by: David S. Miller drivers/net/arcnet/com20020-pci.c | 2 ++ 1 file changed, 2 insertions(+) commit ede07a1fc7d70adfb290cfdace391295897023cb Author: Michael Grzeschik Date: Wed Jun 28 18:32:19 2017 +0200 arcnet: com20020-pci: add attribute to readback backplane status We add the sysfs interface the read back the backplane status of the interface. Signed-off-by: Michael Grzeschik Signed-off-by: David S. Miller drivers/net/arcnet/com20020-pci.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 05fcd31cc472c5da6416d3bc2ab25599bbb9331f Author: Michael Grzeschik Date: Wed Jun 28 18:32:18 2017 +0200 arcnet: add err_skb package for package status feedback We need to track the status of our queued packages. This way the driving process knows if failed packages need to be retransmitted. For this purpose we queue the transferred/failed packages back into the err_skb message queue added with some status information. Signed-off-by: Michael Grzeschik Signed-off-by: David S. Miller drivers/net/arcnet/arcdevice.h | 4 +++ drivers/net/arcnet/arcnet.c | 74 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 68 insertions(+), 10 deletions(-) commit 65344ba99836164c627f8459f955c4a4c391087b Merge: e3ef698 6f59595 Author: David S. Miller Date: Thu Jun 29 15:14:20 2017 -0400 Merge branch 'amd-xgbe-updates' Tom Lendacky says: ==================== amd-xgbe: AMD XGBE driver updates 2016-06-28 The following updates and fixes are included in this driver update series: - Simplify mailbox interface code - Fix SFP supported and advertising settings - Fix PTP initialization register usage - Insure there is timestamp skb present before using it - Add a timeout to timestamp register updates - Handle return code from software reset function - Some fixes for handling 2.5Gbps rates - Limit I2C error messages - Fix non-DMA interrupt handling through tasklet usage - Add NUMA affinity support for memory allocations - Add NUMA affinity support for interrupts - Prepare for more fine-grained cache coherency controls - Simplify setting the DMA burst length programming - Performance improvements This patch series is based on net-next. ==================== Signed-off-by: David S. Miller commit 6f595959c095d8923b19196fea3e983dcb299f22 Author: Lendacky, Thomas Date: Wed Jun 28 13:43:26 2017 -0500 amd-xgbe: Adjust register settings to improve performance Add support to change some general performance settings and to provide some performance settings based on the device that is probed. This includes: - Setting the maximum read/write outstanding request limit - Reducing the AXI interface burst length size - Selectively setting the Tx and Rx descriptor pre-fetch threshold - Selectively setting additional cache coherency controls Tested and verified on all versions of the hardware. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-common.h | 13 +++++++++++++ drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 26 +++++++++++++++++++++++--- drivers/net/ethernet/amd/xgbe/xgbe-main.c | 5 ++++- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 9 +++++++-- drivers/net/ethernet/amd/xgbe/xgbe.h | 11 +++++++++++ 5 files changed, 58 insertions(+), 6 deletions(-) commit 7e1e6b86a5d96ca13834fbc6b6e54a9228f308e1 Author: Lendacky, Thomas Date: Wed Jun 28 13:43:18 2017 -0500 amd-xgbe: Simplify the burst length settings Currently the driver hardcodes the PBLx8 setting. Remove the need for specifying the PBLx8 setting and automatically calculate based on the specified PBL value. Since the PBLx8 setting applies to both Tx and Rx use the same PBL value for both of them. Also, the driver currently uses a bit field to set the AXI master burst len setting. Change to the full bit field range and set the burst length based on the specified value. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-common.h | 11 ++++- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 67 ++++++++--------------------- drivers/net/ethernet/amd/xgbe/xgbe-main.c | 5 +-- drivers/net/ethernet/amd/xgbe/xgbe.h | 12 +----- 4 files changed, 31 insertions(+), 64 deletions(-) commit 9916716a1bb677be8371f602f53989bf04a70d7f Author: Lendacky, Thomas Date: Wed Jun 28 13:43:09 2017 -0500 amd-xgbe: Prepare for more fine grained cache coherency controls In prep for setting fine grained read and write DMA cache coherency controls, allow specific values to be used to set the cache coherency registers. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-common.h | 28 --------------------------- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 23 ++-------------------- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 5 ++--- drivers/net/ethernet/amd/xgbe/xgbe-platform.c | 10 ++++------ drivers/net/ethernet/amd/xgbe/xgbe.h | 15 ++++++-------- 5 files changed, 14 insertions(+), 67 deletions(-) commit f00ba49d8ef9b7a8a9f17be4128fad397e42683b Author: Lendacky, Thomas Date: Wed Jun 28 13:43:00 2017 -0500 amd-xgbe: Add NUMA affinity support for IRQ hints For IRQ affinity, set the affinity hints for the IRQs to be (initially) on the processors corresponding to the NUMA node of the device. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 18 +++++++++++++++--- drivers/net/ethernet/amd/xgbe/xgbe.h | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-) commit 18f9f0ac55629b298b1e975c4ed1c86aa21eafb0 Author: Lendacky, Thomas Date: Wed Jun 28 13:42:51 2017 -0500 amd-xgbe: Add NUMA affinity support for memory allocations Add support to perform memory allocations on the node of the device. The original allocation or the ring structure and Tx/Rx queues allocated all of the memory at once and then carved it up for each channel and queue. To best ensure that we get as much memory from the NUMA node as we can, break the channel and ring allocations into individual allocations. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 94 +++++++++++----- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 135 +++++++++-------------- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 177 ++++++++++++++++-------------- drivers/net/ethernet/amd/xgbe/xgbe.h | 5 +- 4 files changed, 217 insertions(+), 194 deletions(-) commit 85b85c853401da56e15ef500552c1c2e795122ed Author: Lendacky, Thomas Date: Wed Jun 28 13:42:42 2017 -0500 amd-xgbe: Re-issue interrupt if interrupt status not cleared Some of the device interrupts should function as level interrupts. For some hardware configurations this requires setting some control bits so that if the interrupt status has not been cleared the interrupt should be reissued. Additionally, when using MSI or MSI-X interrupts, run the interrupt service routine as a tasklet so that the re-issuance of the interrupt is handled properly. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-common.h | 1 + drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 53 +++++++++++++++++++++++++---- drivers/net/ethernet/amd/xgbe/xgbe-i2c.c | 30 +++++++++++++--- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 33 ++++++++++++++++-- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 4 +++ drivers/net/ethernet/amd/xgbe/xgbe.h | 11 ++++-- 6 files changed, 115 insertions(+), 17 deletions(-) commit 45a2005e9354f8bcf2333a8bc8cc4b26a927d042 Author: Lendacky, Thomas Date: Wed Jun 28 13:42:35 2017 -0500 amd-xgbe: Limit the I2C error messages that are output When I2C communication fails, it tends to always fail. Rather than continuously issue an error message (once per second in most cases), change the message to be issued just once. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ed3333fa6fc21b4191601367a5ea4f0f198f100d Author: Lendacky, Thomas Date: Wed Jun 28 13:42:25 2017 -0500 amd-xgbe: Fixes for working with PHYs that support 2.5GbE The driver has some missing functionality when operating in the mode that supports 2.5GbE. Fix the driver to fully recognize and support this speed. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 42d452dc4a3674bbe53fa80f00f31f72385252dd Author: Lendacky, Thomas Date: Wed Jun 28 13:42:16 2017 -0500 amd-xgbe: Handle return code from software reset function Currently the function that performs a software reset of the hardware provides a return code. During driver probe check this return code and exit with an error if the software reset fails. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9018ff5331a64aa9e6dd600345bb1d087684fdff Author: Lendacky, Thomas Date: Wed Jun 28 13:42:07 2017 -0500 amd-xgbe: Prevent looping forever if timestamp update fails Just to be on the safe side, should the update of the timestamp registers not complete, issue a warning rather than looping forever waiting for the update to complete. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 93845d5f1b3c3878fdeb6275f1928217ec0c9ff2 Author: Lendacky, Thomas Date: Wed Jun 28 13:41:58 2017 -0500 amd-xgbe: Add a check for an skb in the timestamp path Spurious Tx timestamp interrupts can cause an oops in the Tx timestamp processing function if a Tx timestamp skb is NULL. Add a check to insure a Tx timestamp skb is present before attempting to use it. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3abc7cff671a15f797f2baca9ba6b406508757b8 Author: Lendacky, Thomas Date: Wed Jun 28 13:41:49 2017 -0500 amd-xgbe: Use the proper register during PTP initialization During PTP initialization, the Timestamp Control register should be cleared and not the Tx Configuration register. While this typo causes the wrong register to be cleared, the default value of each register and and the fact that the Tx Configuration register is programmed afterwards doesn't result in a bug, hence only fixing in net-next. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56503d55cc8b843096a5f51355712ca837f3757b Author: Lendacky, Thomas Date: Wed Jun 28 13:41:40 2017 -0500 amd-xgbe: Fix SFP PHY supported/advertised settings When using SFPs, the supported and advertised settings should be initially based on the SFP that has been detected. The code currently indicates the overall support of the device as opposed to what the SFP is capable of. Update the code to change the supported link modes, auto-negotiation, etc. to be based on the installed SFP. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 69 ++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 22 deletions(-) commit 549b32af9f7c4b3a924ddf4feb3b09aae6d8c867 Author: Lendacky, Thomas Date: Wed Jun 28 13:41:32 2017 -0500 amd-xgbe: Simplify mailbox interface rate change code Simplify and centralize the mailbox command rate change interface by having a single function perform the writes to the mailbox registers to issue the request. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 155 ++++++---------------------- 1 file changed, 29 insertions(+), 126 deletions(-) commit 848c23b78fafdcd3270b06a30737f8dbd70c347f Author: Qu Wenruo Date: Thu Jun 22 10:01:21 2017 +0800 btrfs: Remove false alert when fiemap range is smaller than on-disk extent Commit 4751832da990 ("btrfs: fiemap: Cache and merge fiemap extent before submit it to user") introduced a warning to catch unemitted cached fiemap extent. However such warning doesn't take the following case into consideration: 0 4K 8K |<---- fiemap range --->| |<----------- On-disk extent ------------------>| In this case, the whole 0~8K is cached, and since it's larger than fiemap range, it break the fiemap extent emit loop. This leaves the fiemap extent cached but not emitted, and caught by the final fiemap extent sanity check, causing kernel warning. This patch removes the kernel warning and renames the sanity check to emit_last_fiemap_cache() since it's possible and valid to have cached fiemap extent. Reported-by: David Sterba Reported-by: Adam Borowski Fixes: 4751832da990 ("btrfs: fiemap: Cache and merge fiemap extent ...") Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit b7f8a09f8097db776b8d160862540e4fc1f51296 Author: Jan Kara Date: Thu Jun 22 15:31:07 2017 +0200 btrfs: Don't clear SGID when inheriting ACLs When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the owning group of 'DIR0'). However when 'DIR0' also has some default ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on 'DIR1' to get cleared if user is not member of the owning group. Fix the problem by moving posix_acl_update_mode() out of __btrfs_set_acl() into btrfs_set_acl(). That way the function will not be called when inheriting ACLs which is what we want as it prevents SGID bit clearing and the mode has been properly set by posix_acl_create() anyway. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: stable@vger.kernel.org CC: linux-btrfs@vger.kernel.org CC: David Sterba Signed-off-by: Jan Kara Signed-off-by: David Sterba fs/btrfs/acl.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 6374e57ad8091b9c2db2eecc536c7f0166ce099e Author: Chris Mason Date: Fri Jun 23 09:48:21 2017 -0700 btrfs: fix integer overflow in calc_reclaim_items_nr Dave Jones hit a WARN_ON(nr < 0) in btrfs_wait_ordered_roots() with v4.12-rc6. This was because commit 70e7af244 made it possible for calc_reclaim_items_nr() to return a negative number. It's not really a bug in that commit, it just didn't go far enough down the stack to find all the possible 64->32 bit overflows. This switches calc_reclaim_items_nr() to return a u64 and changes everyone that uses the results of that math to u64 as well. Reported-by: Dave Jones Fixes: 70e7af2 ("Btrfs: fix delalloc accounting leak caused by u32 overflow") Signed-off-by: Chris Mason Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 4 ++-- fs/btrfs/extent-tree.c | 12 ++++++------ fs/btrfs/ioctl.c | 2 +- fs/btrfs/ordered-data.c | 17 ++++++++--------- fs/btrfs/ordered-data.h | 4 ++-- fs/btrfs/qgroup.c | 2 +- fs/btrfs/relocation.c | 2 +- fs/btrfs/scrub.c | 2 +- fs/btrfs/super.c | 2 +- fs/btrfs/transaction.c | 2 +- 10 files changed, 24 insertions(+), 25 deletions(-) commit ded56184a562b925a588b6e78688e2e60757b425 Author: David Sterba Date: Mon Jun 26 15:19:00 2017 +0200 btrfs: scrub: fix target device intialization while setting up scrub context The commit "btrfs: scrub: inline helper scrub_setup_wr_ctx" inlined a helper but wrongly sets up the target device. Incidentally there's a local variable with the same name as a parameter in the previous function, so this got caught during runtime as crash in test btrfs/027. Reported-by: Chris Mason Signed-off-by: David Sterba fs/btrfs/scrub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bc42bda22345efdb5d8b578d1b4df2c6eaa85c58 Author: Qu Wenruo Date: Mon Feb 27 15:10:39 2017 +0800 btrfs: qgroup: Fix qgroup reserved space underflow by only freeing reserved ranges [BUG] For the following case, btrfs can underflow qgroup reserved space at an error path: (Page size 4K, function name without "btrfs_" prefix) Task A | Task B ---------------------------------------------------------------------- Buffered_write [0, 2K) | |- check_data_free_space() | | |- qgroup_reserve_data() | | Range aligned to page | | range [0, 4K) <<< | | 4K bytes reserved <<< | |- copy pages to page cache | | Buffered_write [2K, 4K) | |- check_data_free_space() | | |- qgroup_reserved_data() | | Range alinged to page | | range [0, 4K) | | Already reserved by A <<< | | 0 bytes reserved <<< | |- delalloc_reserve_metadata() | | And it *FAILED* (Maybe EQUOTA) | |- free_reserved_data_space() |- qgroup_free_data() Range aligned to page range [0, 4K) Freeing 4K (Special thanks to Chandan for the detailed report and analyse) [CAUSE] Above Task B is freeing reserved data range [0, 4K) which is actually reserved by Task A. And at writeback time, page dirty by Task A will go through writeback routine, which will free 4K reserved data space at file extent insert time, causing the qgroup underflow. [FIX] For btrfs_qgroup_free_data(), add @reserved parameter to only free data ranges reserved by previous btrfs_qgroup_reserve_data(). So in above case, Task B will try to free 0 byte, so no underflow. Reported-by: Chandan Rajendra Signed-off-by: Qu Wenruo Reviewed-by: Chandan Rajendra Tested-by: Chandan Rajendra Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 +++-- fs/btrfs/extent-tree.c | 12 +++++---- fs/btrfs/file.c | 29 +++++++++++--------- fs/btrfs/inode.c | 29 ++++++++++---------- fs/btrfs/ioctl.c | 4 +-- fs/btrfs/qgroup.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++---- fs/btrfs/qgroup.h | 3 ++- fs/btrfs/relocation.c | 8 +++--- 8 files changed, 117 insertions(+), 46 deletions(-) commit 364ecf3651e0862152c8b340d7cb3021dc0122c7 Author: Qu Wenruo Date: Mon Feb 27 15:10:38 2017 +0800 btrfs: qgroup: Introduce extent changeset for qgroup reserve functions Introduce a new parameter, struct extent_changeset for btrfs_qgroup_reserved_data() and its callers. Such extent_changeset was used in btrfs_qgroup_reserve_data() to record which range it reserved in current reserve, so it can free it in error paths. The reason we need to export it to callers is, at buffered write error path, without knowing what exactly which range we reserved in current allocation, we can free space which is not reserved by us. This will lead to qgroup reserved space underflow. Reviewed-by: Chandan Rajendra Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ++++-- fs/btrfs/extent-tree.c | 23 +++++++++++++---------- fs/btrfs/extent_io.h | 34 +++++++++++++++++++++++++++++++++ fs/btrfs/file.c | 12 +++++++++--- fs/btrfs/inode-map.c | 4 +++- fs/btrfs/inode.c | 18 ++++++++++++++---- fs/btrfs/ioctl.c | 5 ++++- fs/btrfs/qgroup.c | 51 ++++++++++++++++++++++++++++++++------------------ fs/btrfs/qgroup.h | 3 ++- fs/btrfs/relocation.c | 4 +++- 10 files changed, 119 insertions(+), 41 deletions(-) commit a12b877b557dde885bdb6978cec86bf761e63c9a Author: Qu Wenruo Date: Mon Feb 27 15:10:37 2017 +0800 btrfs: qgroup: Fix qgroup reserved space underflow caused by buffered write and quotas being enabled [BUG] Under the following case, we can underflow qgroup reserved space. Task A | Task B --------------------------------------------------------------- Quota disabled | Buffered write | |- btrfs_check_data_free_space() | | *NO* qgroup space is reserved | | since quota is *DISABLED* | |- All pages are copied to page | cache | | Enable quota | Quota scan finished | | Sync_fs | |- run_delalloc_range | |- Write pages | |- btrfs_finish_ordered_io | |- insert_reserved_file_extent | |- btrfs_qgroup_release_data() | Since no qgroup space is reserved in Task A, we underflow qgroup reserved space This can be detected by fstest btrfs/104. [CAUSE] In insert_reserved_file_extent() we tell qgroup to release the @ram_bytes size of qgroup reserved_space in all cases. And btrfs_qgroup_release_data() will check if quotas are enabled. However in the above case, the buffered write happens before quota is enabled, so we don't have the reserved space for that range. [FIX] In insert_reserved_file_extent(), we tell qgroup to release the acctual byte number it released. In the above case, since we don't have the reserved space, we tell qgroups to release 0 byte, so the problem can be fixed. And thanks to the @reserved parameter introduced by the qgroup rework, and previous patch to return released bytes, the fix can be as small as 10 lines. Signed-off-by: Qu Wenruo [ changelog updates ] Signed-off-by: David Sterba fs/btrfs/inode.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 7bc329c1836866ffac8b2613f780a51b3ffe786d Author: Qu Wenruo Date: Mon Feb 27 15:10:36 2017 +0800 btrfs: qgroup: Return actually freed bytes for qgroup release or free data btrfs_qgroup_release/free_data() only returns 0 or a negative error number (ENOMEM is the only possible error). This is normally good enough, but sometimes we need the exact byte count it freed/released. Change it to return actually released/freed bytenr number instead of 0 for success. And slightly modify related extent_changeset structure, since in btrfs one no-hole data extent won't be larger than 128M, so "unsigned int" is large enough for the use case. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 +- fs/btrfs/extent_io.h | 2 +- fs/btrfs/qgroup.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit d1b8b94a2b4f416b416bdfde46315e9aef17f358 Author: Qu Wenruo Date: Mon Feb 27 15:10:35 2017 +0800 btrfs: qgroup: Cleanup btrfs_qgroup_prepare_account_extents function Quite a lot of qgroup corruption happens due to wrong time of calling btrfs_qgroup_prepare_account_extents(). Since the safest time is to call it just before btrfs_qgroup_account_extents(), there is no need to separate these 2 functions. Merging them will make code cleaner and less bug prone. Signed-off-by: Qu Wenruo [ changelog and comment adjustments ] Signed-off-by: David Sterba fs/btrfs/qgroup.c | 50 +++++++++++++++++--------------------------------- fs/btrfs/qgroup.h | 3 +-- fs/btrfs/transaction.c | 10 ---------- 3 files changed, 18 insertions(+), 45 deletions(-) commit 5edfd9fdc644bf426a8bf9192d9c1a3680d75862 Author: Qu Wenruo Date: Mon Feb 27 15:10:34 2017 +0800 btrfs: qgroup: Add quick exit for non-fs extents Modify btrfs_qgroup_account_extent() to exit quicker for non-fs extents. The quick exit condition is: 1) The extent belongs to a non-fs tree Only fs-tree extents can affect qgroup numbers and is the only case where extent can be shared between different trees. Although strictly speaking extent in data-reloc or tree-reloc tree can be shared, data/tree-reloc root won't appear in the result of btrfs_find_all_roots(), so we can ignore such case. So we can check the first root in old_roots/new_roots ulist. - if we find the 1st root is a not a fs/subvol root, then we can skip the extent - if we find the 1st root is a fs/subvol root, then we must continue calculation OR 2) both 'nr_old_roots' and 'nr_new_roots' are 0 This means either such extent got allocated then freed in current transaction or it's a new reloc tree extent, whose nr_new_roots is 0. Either way it won't affect qgroup accounting and can be skipped safely. Such quick exit can make trace output more quite and less confusing: (example with fs uuid and time stamp removed) Before: ------ add_delayed_tree_ref: bytenr=29556736 num_bytes=16384 action=ADD_DELAYED_REF parent=0(-) ref_root=2(EXTENT_TREE) level=0 type=TREE_BLOCK_REF seq=0 btrfs_qgroup_account_extent: bytenr=29556736 num_bytes=16384 nr_old_roots=0 nr_new_roots=1 ------ Extent tree block will trigger btrfs_qgroup_account_extent() trace point while no qgroup number is changed, as extent tree won't affect qgroup accounting. After: ------ add_delayed_tree_ref: bytenr=29556736 num_bytes=16384 action=ADD_DELAYED_REF parent=0(-) ref_root=2(EXTENT_TREE) level=0 type=TREE_BLOCK_REF seq=0 ------ Now such unrelated extent won't trigger btrfs_qgroup_account_extent() trace point, making the trace less noisy. Signed-off-by: Qu Wenruo [ changelog and comment adjustments ] Signed-off-by: David Sterba fs/btrfs/qgroup.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) commit d7eae3403f46646889a9d172476e61a7aa822cc7 Author: Omar Sandoval Date: Tue Jun 6 16:45:31 2017 -0700 Btrfs: rework delayed ref total_bytes_pinned accounting The total_bytes_pinned counter is completely broken when accounting delayed refs: - If two drops for the same extent are merged, we will decrement total_bytes_pinned twice but only increment it once. - If an add is merged into a drop or vice versa, we will decrement the total_bytes_pinned counter but never increment it. - If multiple references to an extent are dropped, we will account it multiple times, potentially vastly over-estimating the number of bytes that will be freed by a commit and doing unnecessary work when we're close to ENOSPC. The last issue is relatively minor, but the first two make the total_bytes_pinned counter leak or underflow very often. These accounting issues were introduced in b150a4f10d87 ("Btrfs: use a percpu to keep track of possibly pinned bytes"), but they were papered over by zeroing out the counter on every commit until d288db5dc011 ("Btrfs: fix race of using total_bytes_pinned"). We need to make sure that an extent is accounted as pinned exactly once if and only if we will drop references to it when when the transaction is committed. Ideally we would only add to total_bytes_pinned when the *last* reference is dropped, but this information isn't readily available for data extents. Again, this over-estimation can lead to extra commits when we're close to ENOSPC, but it's not as bad as before. The fix implemented here is to increment total_bytes_pinned when the total refmod count for an extent goes negative and decrement it if the refmod count goes back to non-negative or after we've run all of the delayed refs for that extent. Signed-off-by: Omar Sandoval Tested-by: Holger Hoffstätte Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) commit 7be07912b32d103d9789082f27dd54b47c89c744 Author: Omar Sandoval Date: Tue Jun 6 16:45:30 2017 -0700 Btrfs: return old and new total ref mods when adding delayed refs We need this to decide when to account pinned bytes. Signed-off-by: Omar Sandoval Tested-by: Holger Hoffstätte Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 29 ++++++++++++++++++++-------- fs/btrfs/delayed-ref.h | 6 ++++-- fs/btrfs/extent-tree.c | 51 ++++++++++++++++++++++++++------------------------ 3 files changed, 52 insertions(+), 34 deletions(-) commit 0a16c7d7aecfae8987197e50116ebfc338cbe0a2 Author: Omar Sandoval Date: Tue Jun 6 16:45:29 2017 -0700 Btrfs: always account pinned bytes when dropping a tree block ref Currently, we only increment total_bytes_pinned in btrfs_free_tree_block() when dropping the last reference on the block. However, when the delayed ref is run later, we will decrement total_bytes_pinned regardless of whether it was the last reference or not. This causes the counter to underflow when the reference we dropped was not the last reference. Fix it by incrementing the counter unconditionally, which is what btrfs_free_extent() does. This makes total_bytes_pinned an overestimate when references to shared extents are dropped, but in the worst case this will just make us try to commit the transaction to try to free up space and find we didn't free enough. Signed-off-by: Omar Sandoval Tested-by: Holger Hoffstätte Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 4da8b76d347bcae951f89522a040c36d9fc9f3b3 Author: Omar Sandoval Date: Tue Jun 6 16:45:28 2017 -0700 Btrfs: update total_bytes_pinned when pinning down extents The extents marked in pin_down_extent() will be unpinned later in unpin_extent_range(), which decrements total_bytes_pinned. pin_down_extent() must increment the counter to avoid underflowing it. Also adjust btrfs_free_tree_block() to avoid accounting for the same extent twice. Signed-off-by: Omar Sandoval Tested-by: Holger Hoffstätte Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 55e8196a57cfe603ce3480a66c15dde3a13fe218 Author: Omar Sandoval Date: Tue Jun 6 16:45:27 2017 -0700 Btrfs: make BUG_ON() in add_pinned_bytes() an ASSERT() The value of flags is one of DATA/METADATA/SYSTEM, they must exist at when add_pinned_bytes is called. Signed-off-by: Omar Sandoval Tested-by: Holger Hoffstätte Reviewed-by: David Sterba [ added changelog ] Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d9f824df35d11215016785213f9c0fd06a72fc0 Author: Omar Sandoval Date: Tue Jun 6 16:45:26 2017 -0700 Btrfs: make add_pinned_bytes() take an s64 num_bytes instead of u64 There are a few places where we pass in a negative num_bytes, so make it signed for clarity. Also move it up in the file since later patches will need it there. Signed-off-by: Omar Sandoval Tested-by: Holger Hoffstätte Reviewed-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) commit ba320dd61ec91bbe98730f3407a486facc174d63 Author: Luca Coelho Date: Fri May 19 15:12:07 2017 +0300 iwlwifi: bump MAX API for 8000/9000/A000 to 33 Bump the maximum API supported by these device families to 33. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/8000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/a000.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 1164a9fb9c7be09c2fb7489365a82d4260c81d36 Author: David Sterba Date: Wed Jun 21 17:43:24 2017 +0200 btrfs: fix validation of XATTR_ITEM dir items The XATTR_ITEM is a type of a directory item so we use the common validator helper. Unlike other dir items, it can have data. The way the name len validation is currently implemented does not reflect that. We'd have to adjust by the data_len when comparing the read and item limits. However, this will not work for multi-item xattr dir items. Example from tree dump of generic/337: item 7 key (257 XATTR_ITEM 751495445) itemoff 15667 itemsize 147 location key (0 UNKNOWN.0 0) type XATTR transid 8 data_len 3 name_len 11 name: user.foobar data 123 location key (0 UNKNOWN.0 0) type XATTR transid 8 data_len 6 name_len 13 name: user.WvG1c1Td data qwerty location key (0 UNKNOWN.0 0) type XATTR transid 8 data_len 5 name_len 19 name: user.J3__T_Km3dVsW_ data hello At the point of btrfs_is_name_len_valid call we don't have access to the data_len value of the 2nd and 3rd sub-item. So simple btrfs_dir_data_len(leaf, di) would always return 3, although we'd need to get 6 and 5 respectively to get the claculations right. (read_end + name_len + data_len vs item_end) We'd have to also pass data_len externally, which is not point of the name validation. The last check is supposed to test if there's at least one dir item space after the one we're processing. I don't think this is particularly useful, validation of the next item would catch that too. So the check is removed and we don't weaken the validation. Now tests btrfs/048, btrfs/053, generic/273 and generic/337 pass. Signed-off-by: David Sterba fs/btrfs/dir-item.c | 8 -------- 1 file changed, 8 deletions(-) commit 099a628bf6d9bb1d66cc0383f97cea19cfa4aacc Author: Emmanuel Grumbach Date: Tue Jun 27 12:29:26 2017 +0300 iwlwifi: pcie: wait longer after device reset The newest devices need a longer time to reset because of their more complex hardware. Wait 5ms after device reset. Consolidate all the places that reset the device in the PCIe transport to avoid future bugs. While at it, unify the flow to use set_bit instead of full write as requested by the hardware designers. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 7 +++++++ .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 8 ++------ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 23 +++++----------------- 4 files changed, 15 insertions(+), 25 deletions(-) commit 52b6e168ae579483d71621e4d64d6491e8973e91 Author: Emmanuel Grumbach Date: Tue Jun 27 12:23:56 2017 +0300 iwlwifi: pcie: propagate iwl_pcie_apm_init's status iwl_pcie_apm_init can fail so make sure that the caller takes the status into account. Also, ensure that the error that iwl_pcie_apm_init can emit will appear in the kernel log by default. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 51da3d8b94485a8397ae7af3bfdb65feaf582202 Author: Johannes Berg Date: Mon Jun 12 11:24:06 2017 +0200 iwlwifi: mvm: quietly accept non-sta disassoc frames When a station that's not associated sends a data frame (e.g. an NDP) hostapd will respond with a disassoc frame, telling it that it's not associated. The station might also not be authenticated, in which case there will not be a station entry for it, and as a result we need to accept such frames without a station. Fixes: 3ee0f0e23e4f ("iwlwifi: mvm: fix DQA AP mode station assumption") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 678d9b6dddea3869e78996a94ade8dc6d1b5fe68 Author: Liad Kaufman Date: Thu May 18 18:00:49 2017 +0300 iwlwifi: mvm: update rx statistics cmd api The API has changed - update the code. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/file.h | 4 + drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 235 +++++++++++++-------- .../net/wireless/intel/iwlwifi/mvm/fw-api-stats.h | 167 +++++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 11 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 83 +++++--- 7 files changed, 371 insertions(+), 141 deletions(-) commit 6e46496302df7e63158fa1476cf9a30d5ee59dee Author: Johannes Berg Date: Thu Jun 22 13:06:21 2017 +0200 iwlwifi: mvm: remove DQA non-STA client mode special case When we get a non-STA frame to transmit in client mode, we try to use the IWL_MVM_DQA_BSS_CLIENT_QUEUE queue (queue #4). However, at this point, the queue might not be allocated at all, causing warnings. The scenario on which this happened was a race condition between mac80211 and our queue allocation work: * mac80211 sends auth * we stop mac80211 queues to allocate a hw queue * authentication is aborted * we allocate HW queue and start mac80211 queues * mac80211 removes station * mac80211 hands us the auth frame from the pending queue At this point, since mac80211 has already removed the station, we try to transmit the frame through this special non-station case on queue 4 anyway. In order to really use it properly, we'd have to again go through the hw queue allocation work, and attach it to a station, etc. In this case that isn't possible (there's no station anymore), but if this special case were needed, then we'd have to do it this way. However, the special case is documented to exist for TDLS, but can't trigger there because the TDLS setup frames etc. are normal to-DS frames going to the peer through the AP. Testing also confirms that this code path isn't triggered in TDLS. Therefore, remove the code path to avoid using an unused queue. The erroneous frame described above will still be transmitted on the AUX queue, but arguably that's a mac80211 problem, which will eventually be fixed by moving everything there to TXQs. Fixes: e3118ad74d7e ("iwlwifi: mvm: support tdls in dqa mode") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 -------- 1 file changed, 8 deletions(-) commit 6344436e9d3f4fb4878c12169477d4beb5b825ea Author: Emmanuel Grumbach Date: Wed Jun 21 09:40:15 2017 +0300 iwlwifi: mvm: don't mess the SNAP header in TSO for non-QoS packets When we get large sends on non-QoS association, we had a bug that mangled the SNAP header. Fix that. Fixes: a6d5e32f247c ("iwlwifi: mvm: send large SKBs to the transport") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 52848a79b9d2d6773160221e7ea1e1500954de84 Author: Johannes Berg Date: Tue Jun 20 12:51:30 2017 +0200 iwlwifi: pcie: reconfigure MSI-X HW on resume When going into suspend, the HW configuration for MSI-X will likely be lost. As a consequence, after waking up, all IRQ causes will be mapped to interrupt 0, and as a consequence we don't notice the interrupt because in most cases this is an interrupt for a queue, and getting it doesn't read the other cause registers. Fixes: 2e5d4a8f61dc ("iwlwifi: pcie: Add new configuration to enable MSIX") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 +++ 1 file changed, 3 insertions(+) commit 4f555e602b42826b3d79081c9ef8b8e8fe29fc49 Author: Emmanuel Grumbach Date: Tue Jun 20 16:05:30 2017 +0300 iwlwifi: mvm: don't send fetch the TID from a non-QoS packet in TSO Getting the TID of a packet before we know it is a QoS data packet isn't a good idea. Delay the TID retrieval until we know the packet is a QoS data packet. Fixes: bb81bb68f472 ("iwlwifi: mvm: add Tx A-MSDU inside A-MPDU") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 32026e8f709ff29bd00cce58036da8381eaa7592 Author: Johannes Berg Date: Mon Jun 19 23:26:55 2017 +0200 iwlwifi: mvm: fix mac80211's hw_queue in DQA mode When in non-DQA mode, mac80211 actually gets a pretty much perfect idea (in vif->hw_queue/cab_queue) of which queues we're using. But in DQA mode, this isn't true - nonetheless, we were adding all the queues, even the ones stations are using, to the queue allocation bitmap. Fix this, we should only add the queues we really are using in DQA mode: * IWL_MVM_OFFCHANNEL_QUEUE, as we use this in both modes * mvm->aux_queue, as we use this in both modes - mac80211 never really knows about it but we use it as a cookie internally, so can't reuse it * possibly the GCAST queue (cab_queue) * all the "queues" we told mac80211 about we were using on each interface (vif->hw_queue), these are entirely virtual in this mode Also add back the failure now when we can't allocate any more of these - now virtual - queues; this was skipped in DQA mode and would lead to having multiple ACs or even interfaces use the same queue number in mac80211 (10, since that's the limit), which would stop far too many queues if stopped. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 32 ++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) commit b0129db4f0669eb5d7c79031ac54e746f470e45a Author: Johannes Berg Date: Mon Jun 19 22:48:32 2017 +0200 iwlwifi: mvm: map cab_queue to real one earlier There may be a difference between the mac80211 vif->cab_queue and mvmvif->cab_queue, particularly with TVQM. Make the code map this earlier, instead of first returning the mac80211 one again from iwl_mvm_get_ctrl_vif_queue(). Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 37e474acc9b6f645d92d8dc35014ff1baed3b1bc Author: Johannes Berg Date: Mon Jun 19 22:31:56 2017 +0200 iwlwifi: mvm: fix mac80211 queue tracking In the driver, we track which hardware queue is associated with which mac80211 "hw_queue", in order to be able to stop and wake it. When moving these bitmaps out of the queue_info structures, the type of the bitmap was erroneously changed from u32 to u8, presumably in order to save memory. Turns out that u32 isn't needed, because the highest queue we can ever tell mac80211 is always < 16, but a u16 definitely is needed, queues >=8 do happen. While at it, throw a BUILD_BUG_ON() into the place where we set the limit (mvm->first_agg_queue) and a warning when it actually gets put into the bitmap. The consequence of this bug is that full HW queues associated with such a too-high mac80211 number never stop higher layer queues when full, and thus would simply drop all packets that couldn't be enqueued to the hardware queue. Fixes: 34e10860ae8d ("iwlwifi: mvm: remove references to queue_info in new TX path") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 4 ++++ drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 8 +++++++- 3 files changed, 12 insertions(+), 2 deletions(-) commit 275896ab5fbffcbe9d148ec054efe1af3fb4a29d Author: Johannes Berg Date: Mon Jun 19 13:24:49 2017 +0200 iwlwifi: mvm: properly enable IP header checksumming The code was intended to enable IP header checksumming on AMSDUs, but failed to really do so because the A-MSDU bit was set after all the checksumming bits, and thus checking for A-MSDU could never be true. Fix this by setting the A-MSDU bit before the offload bits. Fixes: 5e6a98dc4863 ("iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family") Reported-by: Emmanuel Grumbach Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit c42ff65da8167fa486bfcb7ea290cbdee8350aa7 Author: Johannes Berg Date: Tue Jun 13 21:19:47 2017 +0200 iwlwifi: pcie: add MSI-X interrupt tracing We have tracing for both pre-ICT and ICT interrupts, including all the data read there. Extend the tracing to MSI-X interrupts. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/iwl-devtrace-io.h | 26 +++++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 4 ++++ 2 files changed, 29 insertions(+), 1 deletion(-) commit e3ef6983ccdd067fa2ed7f8e58bca8392d2b5495 Merge: 77b0d36 a8744f2 Author: David S. Miller Date: Thu Jun 29 13:13:26 2017 -0400 Merge branch 'bpf-Add-syscall-lookup-support-for-fd-array-and-htab' Martin KaFai Lau says: ==================== bpf: Add syscall lookup support for fd array and htab This patchset adds BPF_MAP_LOOKUP_ELEM syscall support for BPF_MAP_TYPE_PROG_ARRAY, BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS ==================== Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller commit a8744f2528c14e4545c6071b6681ab17607be2fa Author: Martin KaFai Lau Date: Tue Jun 27 23:08:35 2017 -0700 bpf: Add test for syscall on fd array/htab lookup Checks are added to the existing sockex3 and test_map_in_map test. Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/sockex3_user.c | 15 ++++++++++++++- samples/bpf/test_map_in_map_user.c | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) commit 14dc6f04f49dc12614d7e90928b495b8d73cd471 Author: Martin KaFai Lau Date: Tue Jun 27 23:08:34 2017 -0700 bpf: Add syscall lookup support for fd array and htab This patch allows userspace to do BPF_MAP_LOOKUP_ELEM on BPF_MAP_TYPE_PROG_ARRAY, BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS. The lookup returns a prog-id or map-id to the userspace. The userspace can then use the BPF_PROG_GET_FD_BY_ID or BPF_MAP_GET_FD_BY_ID to get a fd. Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 3 +++ kernel/bpf/arraymap.c | 27 +++++++++++++++++++++++++++ kernel/bpf/hashtab.c | 21 +++++++++++++++++++++ kernel/bpf/map_in_map.c | 5 +++++ kernel/bpf/map_in_map.h | 1 + kernel/bpf/syscall.c | 16 +++++++++++++--- 6 files changed, 70 insertions(+), 3 deletions(-) commit 77b0d3617738e532bae683bf9d88ea35fff223e5 Author: Thor Thayer Date: Tue Jun 27 17:16:27 2017 -0500 net: stmmac: Add additional registers for dwmac1000_dma ethtool Version 3.70a of the Designware has additional DMA registers so add those to the ethtool DMA Register dump. Offset 9 - Receive Interrupt Watchdog Timer Register Offset 10 - AXI Bus Mode Register Offset 11 - AHB or AXI Status Register Offset 22 - HW Feature Register Signed-off-by: Thor Thayer Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 4 ++-- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 91af6ba7ff16bd7e5919aedfe70aad73a3375619 Author: Liping Zhang Date: Sun Jun 18 10:51:09 2017 +0800 netfilter: ebt_nflog: fix unexpected truncated packet "struct nf_loginfo li;" is a local variable, so we should set the flags to 0 explicitly, else, packets maybe truncated unexpectedly when copied to the userspace. Fixes: 7643507fe8b5 ("netfilter: xt_NFLOG: nflog-range does not truncate packets") Cc: Vishwanath Pai Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebt_nflog.c | 1 + 1 file changed, 1 insertion(+) commit deaa0a976b829af8a7886d8e2528a675cbe4dac8 Author: Liping Zhang Date: Sun Jun 4 19:17:34 2017 +0800 netfilter: nf_ct_dccp/sctp: fix memory leak after netns cleanup After running the following commands for a while, kmemleak reported that "1879 new suspected memory leaks" happened: # while : ; do ip netns add test ip netns delete test done unreferenced object 0xffff88006342fa38 (size 1024): comm "ip", pid 15477, jiffies 4295982857 (age 957.836s) hex dump (first 32 bytes): b8 b0 4d a0 ff ff ff ff c0 34 c3 59 00 88 ff ff ..M......4.Y.... 04 00 00 00 a4 01 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc_track_caller+0x150/0x300 [] kmemdup+0x20/0x50 [] dccp_init_net+0x8a/0x160 [nf_conntrack] [] nf_ct_l4proto_pernet_register_one+0x25/0x90 ... unreferenced object 0xffff88006342da58 (size 1024): comm "ip", pid 15477, jiffies 4295982857 (age 957.836s) hex dump (first 32 bytes): 10 b3 4d a0 ff ff ff ff 04 35 c3 59 00 88 ff ff ..M......5.Y.... 04 00 00 00 a4 01 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc_track_caller+0x150/0x300 [] kmemdup+0x20/0x50 [] sctp_init_net+0x5d/0x130 [nf_conntrack] [] nf_ct_l4proto_pernet_register_one+0x25/0x90 ... This is because we forgot to implement the get_net_proto for sctp and dccp, so we won't invoke the nf_ct_unregister_sysctl to free the ctl_table when do netns cleanup. Also note, we will fail to register the sysctl for dccp/sctp either due to the lack of get_net_proto. Fixes: c51d39010a1b ("netfilter: conntrack: built-in support for DCCP") Fixes: a85406afeb3e ("netfilter: conntrack: built-in support for SCTP") Cc: Davide Caratti Signed-off-by: Liping Zhang Acked-by: Davide Caratti Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_dccp.c | 7 +++++++ net/netfilter/nf_conntrack_proto_sctp.c | 7 +++++++ 2 files changed, 14 insertions(+) commit 5fbd5fc49fc39ac8433da62d16682a1d0217ea4f Author: Dave Martin Date: Thu Jun 29 15:25:49 2017 +0100 arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set() Now that compat_vfp_get() uses the regset API to copy the FPSCR value out to userspace, compat_vfp_set() looks inconsistent. In particular, compat_vfp_set() will fail if called with kbuf != NULL && ubuf == NULL (which is valid usage according to the regset API). This patch fixes compat_vfp_set() to use user_regset_copyin(), similarly to compat_vfp_get(). This also squashes a sparse warning triggered by the cast that drops __user when calling get_user(). Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/ptrace.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 16d38acb12d065ebe3494e4e31e8b4438f3214da Author: Dave Martin Date: Thu Jun 29 15:25:48 2017 +0100 arm64: ptrace: Remove redundant overrun check from compat_vfp_set() compat_vfp_set() checks for userspace trying to write an excessive amount of data to the regset. However this check is conspicuous for its absence from every other _set() in the arm64 ptrace implementation. In fact, the core ptrace_regset() already clamps userspace's iov_len to the regset size before the individual regset .{get,set}() methods get called. This patch removes the redundant check. Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/ptrace.c | 3 --- 1 file changed, 3 deletions(-) commit 53b1a742ed251780267a57415bc955bd50f40c3d Author: Dave Martin Date: Thu Jun 29 15:25:47 2017 +0100 arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails If get_user() fails when reading the new FPSCR value from userspace in compat_vfp_get(), then garbage* will be written to the task's FPSR and FPCR registers. This patch prevents this by checking the return from get_user() first. [*] Actually, zero, due to the behaviour of get_user() on error, but that's still not what userspace expects. Fixes: 478fcb2cdb23 ("arm64: Debugging support") Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/ptrace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a379d69f00f28063a7a1c3de235e2996c2c5a6f5 Author: Vishwanathapura, Niranjana Date: Wed Jun 14 12:34:42 2017 -0700 IB/opa_vnic: Use spinlock instead of mutex for stats_lock Stats can be read from atomic context, hence make stats_lock as a spinlock. Fix the following trace with debug kernel. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238 in_atomic(): 1, irqs_disabled(): 0, pid: 6487, name: sadc Call Trace: dump_stack+0x63/0x90 ___might_sleep+0xda/0x130 __might_sleep+0x4a/0x90 mutex_lock+0x20/0x50 opa_vnic_get_stats64+0x56/0x140 [opa_vnic] dev_get_stats+0x74/0x130 dev_seq_printf_stats+0x37/0x120 dev_seq_show+0x14/0x30 seq_read+0x26d/0x3d0 Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c | 4 ++-- drivers/infiniband/ulp/opa_vnic/opa_vnic_internal.h | 2 +- drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 8 +++----- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c | 8 ++++---- 4 files changed, 10 insertions(+), 12 deletions(-) commit 6b5defd68a0aa4bcecbfb5085e04214bb1a61f97 Author: Eric Huang Date: Tue Jun 27 11:29:09 2017 -0400 drm/amd/powerplay: power value format change for Vega10 Power value is an integer on vega10. Signed-off-by: Eric Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0568c4640e2b12df063d1761fd4d53af24dc4018 Author: Vishwanathapura, Niranjana Date: Wed Jun 14 12:34:41 2017 -0700 IB/opa_vnic: Use GFP_ATOMIC while sending trap Pass GFP_ATOMIC flag to ib_create_send_mad() while sending trap as it can be triggered from the atomic context. Fix the following trace with debug kernel. BUG: sleeping function called from invalid context at mm/slab.h:432 in_atomic(): 1, irqs_disabled(): 0, pid: 1771, name: NetworkManager Call Trace: dump_stack+0x63/0x90 ___might_sleep+0xda/0x130 __might_sleep+0x4a/0x90 __kmalloc+0x19e/0x220 ? ib_create_send_mad+0xea/0x390 [ib_core] ib_create_send_mad+0xea/0x390 [ib_core] opa_vnic_vema_send_trap+0x17b/0x460 [opa_vnic] opa_vnic_vema_report_event+0x57/0x80 [opa_vnic] opa_vnic_mac_send_event+0xaa/0xf0 [opa_vnic] opa_vnic_set_rx_mode+0x17/0x30 [opa_vnic] __dev_set_rx_mode+0x52/0x90 dev_set_rx_mode+0x26/0x40 __dev_open+0xe8/0x140 Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c94d38f03d4d3edd4a26c6edb80faeceb5c043ad Author: Nicolai Hähnle Date: Tue Jun 13 22:10:45 2017 +0200 drm/amdgpu/gfx9: support the amdgpu.disable_cu option This is ported from gfx8. Signed-off-by: Nicolai Hähnle Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 44903326516544e819be91bb09152c1649c17212 Author: Eric Huang Date: Mon Jun 26 11:41:33 2017 -0400 drm/amd/powerplay: change PPSMC_MSG_GetCurrPkgPwr for Vega10 To follow up SMU FW 28.35.0. Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/vega10_ppsmc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9211c784c64e56a87a6ef66e65506bc82fdb7076 Author: Alex Xie Date: Tue Jun 20 16:35:04 2017 -0400 drm/amdgpu: Make amdgpu_cs_parser_init static (v2) The function is called only once inside the .c file. v2: update the commit message (Michel) Signed-off-by: Alex Xie Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 9f69c0fd4d581ff03d7b3123cd1324f7492627a8 Author: Alex Xie Date: Tue Jun 20 16:33:02 2017 -0400 drm/amdgpu/cs: fix a typo in a comment Signed-off-by: Alex Xie Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbfe85ea496728ccf7731601084853f760be77d7 Author: Flora Cui Date: Tue Jun 20 11:08:35 2017 +0800 drm/amdgpu: Fix the exported always on CU bitmap Newer asics with 4 SEs are not able to fit the entire bitmask in the original field, use an array instead. v2: keep cu_ao_mask for backward compatibility. Signed-off-by: Flora Cui Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +++- include/uapi/drm/amdgpu_drm.h | 3 +++ 8 files changed, 24 insertions(+), 7 deletions(-) commit 552c8f76afe7d24c1c1415ec951dea56d553d59c Author: kbuild test robot Date: Fri Jun 23 04:28:47 2017 +0800 drm/amdgpu/gfx9: gfx_v9_0_enable_gfx_static_mg_power_gating() can be static Signed-off-by: Fengguang Wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f03defe0b70c8c3e19c267fa27f094ce6503c30f Author: Alex Deucher Date: Thu Jun 22 18:26:33 2017 -0400 drm/amdgpu/psp: upper_32_bits/lower_32_bits for address setup Rather than casting and shifting. Fixes sparse cast warnings. Reviewed-by: Samuel Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) commit 14b05f8a012a319cd58d25b4564da98a7b9b7303 Author: Alex Deucher Date: Thu Jun 22 17:48:04 2017 -0400 drm/amd/powerplay/cz: print message if smc message fails Helpful in debugging. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27bad5b9a7caf4f2b144fcd862f6b2685c671079 Author: Arnd Bergmann Date: Wed Jun 21 23:51:02 2017 +0200 drm/amdgpu: fix typo in amdgpu_debugfs_test_ib_init The debugfs interface has calls a function that was evidently defined under the wrong name in some configurations: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:64:12: error: 'amdgpu_debugfs_test_ib_ring_init' used but never defined [-Werror] drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3803:12: error: 'amdgpu_debugfs_test_ib_init' defined but not used [-Werror=unused-function] This fixes the function name. Fixes: 4f0955fcc052 ("drm/amdgpu: export test ib debugfs interface") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32622ad89ea78d13f77b45f2047697609aad4a01 Author: Hawking Zhang Date: Mon Jun 19 14:40:19 2017 +0800 drm/amdgpu: enable mmhub pg on raven Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f8386b3521f2d97bc782c545a9ab1a10ff260d25 Author: Hawking Zhang Date: Mon Jun 19 14:39:02 2017 +0800 drm/amdgpu: add new flag AMD_PG_SUPPORT_MMHUB Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 + drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +- drivers/gpu/drm/amd/include/amd_shared.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit a95890b45fcf982b34a0357793499ed44f15ddd9 Author: Hawking Zhang Date: Fri Jun 16 21:31:43 2017 +0800 drm/amdgpu: add interface to enable/disable mmhub pg on raven Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 48 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h | 2 ++ 2 files changed, 50 insertions(+) commit 2fcd43cef6e28ca546376af07c0454dc72b593f9 Author: Hawking Zhang Date: Mon Jun 19 14:19:07 2017 +0800 drm/amdgpu: add mmhub pg init sequence on raven MMHub Powergating init sequence. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 ++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 170 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h | 1 + 3 files changed, 179 insertions(+) commit ebc1c9c1be5b49ddb8396350b12b74be493d48d2 Author: Rex Zhu Date: Mon Jun 19 17:11:41 2017 +0800 drm/amd/powerplay: add support for ATOM GFXCLK table v2. New vbios table format on some boards. Signed-off-by: Rex Zhu Reviewed-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 14 +++++--- .../gpu/drm/amd/powerplay/hwmgr/vega10_pptable.h | 9 +++++ .../amd/powerplay/hwmgr/vega10_processpptables.c | 42 +++++++++++++++++----- 3 files changed, 51 insertions(+), 14 deletions(-) commit 67bef0f7908a3a6b10e5a29d8e8c09e27f90c9f8 Author: Huang Rui Date: Thu Jun 29 14:21:49 2017 +0800 drm/amdgpu: fix the memory corruption on S3 psp->cmd will be used on resume phase, so we can not free it on hw_init. Otherwise, a memory corruption will be triggered. Signed-off-by: Huang Rui Reviewed-by: Christian König Tested-by: Xiaojie Yuan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 6b0fa871a9a2d83dd869ca40a7fd65a935d3564c Author: Rex Zhu Date: Mon Jun 26 14:39:36 2017 +0800 drm/amdgpu: fix vulkan test performance drop and hang on VI caused by not program dynamic_cu_mask_addr in the KIQ MQD. v2: create struct vi_mqd_allocation in FB which will contain 1. PM4 MQD structure. 2. Write Pointer Poll Memory. 3. Read Pointer Report Memory 4. Dynamic CU Mask. 5. Dynamic RB Mask. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 27 ++-- drivers/gpu/drm/amd/include/vi_structs.h | 268 +++++++++++++++++++++++++++++++ 2 files changed, 285 insertions(+), 10 deletions(-) commit 5185ad616bb4d17e4874b29043d4b4069d8b2fb7 Merge: 869684a 164f16f Author: David S. Miller Date: Thu Jun 29 12:30:16 2017 -0400 Merge tag 'mlx5-updates-2017-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-06-27 (Innova IPsec offload support) This patchset adds support for Innova IPSec network interface card. About Innova device: -------------------- Innova is a network card with a ConnectX chip and an FPGA chip as a bump-on-the-wire. Internal +----------+ Link +-----------------+ | +--------------+ FPGA | +------+ | ConnectX | | Shell +--+ QSFP | | +--------------+ +-------+ | | Port | +----------+ I2C | | SBU | | +------+ | +-------+ | +--+----------+---+ | | +--+--+ +---+---+ | DDR | | Flash | +-----+ +-------+ The FPGA synthesized logic is loaded from dedicated flash storage and has access to its own dedicated DDR RAM. The ConnectX chip firmware programs the FPGA by accessing its configuration space over either the slow internal I2C link or the high-speed internal link. The FPGA logic is divided into a "Shell" and a "Sandbox Unit" (SBU). mlx5_core driver (with CONFIG_MLX5_FPGA) handles all shell functionality, while other components may handle the various SBU functionalities. The driver opens high-speed reliable communication channels with the shell and the SBU over the internal link. These channels may be used for high-bandwidth configuration or for SBU-specific out-of-band data paths. About Innova IPSec device: -------------------------- Innova IPSec is a network card that allows offloading IPSec cryptography operations from the host CPU to the NIC. It is an Innova card with an IPSec SBU. The hardware keeps the database of IPSec Security Associations (SADB) in the FPGA's DDR memory. Internal +----------+ Link +-----------------+ | +--------------+ FPGA | +------+ | ConnectX | | Shell +--+ QSFP | | +--------------+ +-------+ | | Port | +----------+ Internal I2C | | IPSec | | +------+ | | SBU | | | +-------+ | +--+----------+---+ | | +--+--+ +---+---+ | DDR | | | | | | Flash | |SADB | | | +-----+ +-------+ Modes and ciphers: Currently the following modes and ciphers are supported: IPv4 and IPv6 ESP tunnel and transport modes AES 128 and 256 bit encryption, with GCM authentication (RFC4106) IV is generated using seqiv, in sync with Linux's geniv. More modes and ciphers may be added later. Notes: In the future similar functionality will be included in a single-chip NIC. About the driver: ----------------- Patches 1-4 prepare some existing driver code for the new feature: * Add support for reserved GIDs in the hardware GID table * Allow multiple modules to enable hardware RoCE support independently Patches 5-6 define structs and helper functions for QP work-queues. Patches 7-11 add various FPGA-related features required for Innova. IPSec. Patch 12 adds abstraction layer for Mellanox IPSec-offload capable devices. atches 13-16 add IPSec offload support to the mlx5 netdevice. This driver services the new IPSec offload API introduced in commit d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") Configuration Path: If Innova IPSec device is detected, the mlx5e netdevice gets the new NETIF_F_HW_ESP feature and the xdo callbacks, indicating ESP offload capabilities, and also the matching TX checksum and GSO features. The driver configures offloaded Security Associations (SAs) by sending an ADD_SA or DEL_SA message to the IPSec SBU, which updates the SADB in DDR. These messages and their responses are sent over a high-speed channel. Counters for ethtool are retrieved by the driver from the SBU. Data path: On receive path, the SBU decrypts ESP packets which match the offloaded SADB, but keeps them encapsulated. The SBU injects metadata (Mellanox owned ethertype) indicating that crypto-offload has taken place, the SA with which it was done, and the authentication result. The ConnectX chip performs RX checksum offload on the packet, and RSS using the ESP SPI value. The driver detects the special ethertype, and attaches a struct secpath to the RX SKB, including flags to indicate that crypto offload took place, the authentication result, and which xfrm_state was used for decryption, in the olen and ovec members. The RX SKB may have useful CHECKSUM_COMPLETE. A separate patchset will add support for that in the xfrm stack. On transmit path, the stack encapsulates the packet but does not encrypt it, and indicates in the SKB's secpath that crypto offload is to be performed and the SA to use to do so. The driver avoids performing crypto-offload for ESP fragments, and packets with IP options, as the SBU cannot currently do that. For eligible packets, the driver prepends a special ethertype with metadata instructing the hardware to perform crypto offload. The stack builds regular (non-GSO) SKBs so that they contain a placeholder for the ESP trailer. The driver trims it off, because the SBU automatically appends the trailer for offloaded packets. The ConnectX chip performs TX checksum offload on inner UDP or TCP packets, and GSO for TCP packets (duplicating the prepended metadata). The segmented packets then undergo encryption in the SBU before going on the wire. Performance: We measure single stream of TCP on Intel(R) Xeon(R) CPU E5-2643 v2 @3.50GHz Using AES-NI with ESP GSO we get constant 4.1 Gbps. Using crypto offload we get constant 18 Gbps. Note that these numbers require CHECKSUM_COMPLETE support in XFRM, which we submit separately. - Ilan Tayari ==================== Signed-off-by: David S. Miller commit 0b277961f4484fb3f142caaa1dd1748cb0b2cbee Author: Dan Williams Date: Fri Jun 9 09:46:50 2017 -0700 libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region The pmem driver attaches to both persistent and volatile memory ranges advertised by the ACPI NFIT. When the region is volatile it is redundant to spend cycles flushing caches at fsync(). Check if the hosting region is volatile and do not set dax_write_cache() if it is. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 13 ++++++++----- drivers/nvdimm/region_devs.c | 6 ++++++ include/linux/libnvdimm.h | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) commit 6e0c90d691cd5d90569f5918ab03eb76c81f9c6e Author: Dan Williams Date: Mon Jun 26 21:28:41 2017 -0700 libnvdimm, pmem, dax: export a cache control attribute The dax_flush() operation can be turned into a nop on platforms where firmware arranges for cpu caches to be flushed on a power-fail event. The ACPI 6.2 specification defines a mechanism for the platform to indicate this capability so the kernel can select the proper default. However, for other platforms, the administrator must toggle this setting manually. Given this flush setting is a dax-specific mechanism we advertise it through a 'dax' attribute group hanging off a host device. For example, a 'pmem0' block-device gets a 'dax' sysfs-subdirectory with a 'write_cache' attribute to control response to dax cache flush requests. This is similar to the 'queue/write_cache' attribute that appears under block devices. Cc: Jan Kara Cc: Jeff Moyer Cc: Matthew Wilcox Cc: Ross Zwisler Suggested-by: Christoph Hellwig Signed-off-by: Dan Williams drivers/dax/super.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/pmem.c | 10 +++++++ include/linux/dax.h | 3 ++ 3 files changed, 92 insertions(+) commit 9a60c3ef577beb0376704808949f2c1f8fb0672c Author: Dan Williams Date: Tue Jun 27 17:59:28 2017 -0700 dax: convert to bitmask for flags In preparation for adding more flags, convert the existing flag to a bit-flag. Signed-off-by: Dan Williams drivers/dax/super.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 869684a70d69e69352eb08fdd22dfd3315637dcd Merge: bf24e13 0ccf59b Author: David S. Miller Date: Thu Jun 29 12:28:57 2017 -0400 Merge branch 'net-fix-sw-timestamping' Ivan Khoronzhuk says: ==================== net: fix sw timestamping for non PTP packets This series contains several corrections connected with timestamping for cpsw and netcp drivers based on same cpts module. Based on net/next ==================== Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller commit 0ccf59ba07377201f3d4347b7c6443f60bd9af93 Author: Ivan Khoronzhuk Date: Tue Jun 27 16:58:53 2017 +0300 net: ethernet: ti: netcp_ethss: use cpts to check if packet needs timestamping There is cpts function to check if packet can be timstamped with cpts. Seems that ptp_classify_raw cover all cases listed with "case". Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_ethss.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit f44f8417baef9dcd8533a706691dadbda219ef82 Author: Ivan Khoronzhuk Date: Tue Jun 27 16:58:52 2017 +0300 net: ethernet: ti: cpsw: fix sw timestamping for non PTP packets The cpts can timestmap only ptp packets at this moment, so driver cannot mark every packet as though it's going to be timestamped, only because h/w timestamping for given skb is enabled with SKBTX_HW_TSTAMP. It doesn't allow to use sw timestamping, as result outgoing packet is not timestamped at all if it's not PTP and h/w timestamping is enabled. So, fix it by setting SKBTX_IN_PROGRESS only for PTP packets. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 3 ++- drivers/net/ethernet/ti/cpts.h | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 98fdd857a3bd6a3bf0003d3f68f07c25c85dcde3 Author: Ivan Khoronzhuk Date: Tue Jun 27 16:58:51 2017 +0300 net: ethernet: ti: cpsw: move skb timestamp to packet_submit Move sw timestamp function close to channel submit function. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bf24e136a32eb513195b6e0148e5a70131a95494 Author: Joe Perches Date: Tue Jun 27 03:56:54 2017 -0700 cavium: thunder: Remove duplicate "netdev->name" logging output Using netdev_(netdev, "%s: ...", netdev->name) duplicates the name in the output. Remove those uses. Miscellanea: o Use the netif_ convenience macros at the same time Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 33 ++++++++-------------- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 8 ++---- 2 files changed, 15 insertions(+), 26 deletions(-) commit 46ccf725bff81693aff8f02b588a2c68566a0b92 Author: Colin Ian King Date: Tue Jun 27 11:36:49 2017 +0100 net/mlx4: fix spelling mistake: "enforcment" -> "enforcement" Trivial fix to spelling mistake in mlx4_dbg debug message Signed-off-by: Colin Ian King Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62d4fd4733002c17da7c467dd3bd1065ebca9833 Author: Colin Ian King Date: Tue Jun 27 10:51:22 2017 +0100 net: atl1c: fix spelling mistake: "droppted" -> "dropped" Trivial fix to spelling mistake in netif_info message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a79b4f2a5e7c8873da92ad69be771a100aaca0c Author: LABBE Corentin Date: Tue Jun 27 11:28:06 2017 +0200 arm: sun8i: orangepi-2: use internal phy-mode Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdcc005beac900d868f45fb7222ef0e6847fc702 Author: LABBE Corentin Date: Tue Jun 27 11:28:05 2017 +0200 arm: sun8i: nanopi-neo: use internal phy-mode Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ac57180eab256f867f32ce12c985a6d7c8993c7 Author: LABBE Corentin Date: Tue Jun 27 11:28:04 2017 +0200 arm: sun8i: orangepi-one: use internal phy-mode Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6066de6848d414b3420eb37e1f15d7b54ed30e1c Author: LABBE Corentin Date: Tue Jun 27 11:28:03 2017 +0200 arm: sun8i: orangepi-zero: use internal phy-mode Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3432a86e641c6abd514f44a0ee94634ae4e349af Author: LABBE Corentin Date: Tue Jun 27 11:28:02 2017 +0200 arm: sun8i: orangepipc: use internal phy-mode Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c2fa5f846832cbed8b8e6151471436071972e41 Author: LABBE Corentin Date: Tue Jun 27 11:28:01 2017 +0200 net: stmmac: support future possible different internal phy mode The current way to find if the phy is internal is to compare DT phy-mode and emac_variant/internal_phy. But it will negate a possible future SoC where an external PHY use the same phy mode than the internal one. By using phy-mode = "internal" we permit to have an external PHY with the same mode than the internal one. Reported-by: André Przywara Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit eac306b4adb7452c0228f32dd004f791ab08aae8 Author: Michael Dilmore Date: Mon Jun 26 16:49:46 2017 +0100 Bonding: Convert multiple netdev_info messages to netdev_dbg The bond_options.c file contains multiple netdev_info statements that clutter kernel output. This patch replaces all netdev_info with netdev_dbg and adds a netdev_dbg statement for the packets per slave parameter. Also fixes misalignment at line 467. Suggested-by: Joe Perches Signed-off-by: Michael J Dilmore Signed-off-by: David S. Miller drivers/net/bonding/bond_options.c | 132 +++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 65 deletions(-) commit c853354429f7ec88f9cdde4e46e69a2c0e3c8310 Author: Wanpeng Li Date: Thu Jun 29 06:28:09 2017 -0700 KVM: LAPIC: Fix lapic timer injection delay If the TSC deadline timer is programmed really close to the deadline or even in the past, the computation in vmx_set_hv_timer will program the absolute target tsc value to vmcs preemption timer field w/ delta == 0, then plays a vmentry and an upcoming vmx preemption timer fire vmexit dance, the lapic timer injection is delayed due to this duration. Actually the lapic timer which is emulated by hrtimer can handle this correctly. This patch fixes it by firing the lapic timer and injecting a timer interrupt immediately during the next vmentry if the TSC deadline timer is programmed really close to the deadline or even in the past. This saves ~300 cycles on the tsc_deadline_timer test of apic.flat. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 5 ++++- arch/x86/kvm/vmx.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) commit a5a041b6b50bcaf96f96e5db4850d11006d61d26 Author: Arvind Yadav Date: Thu Jun 29 16:07:01 2017 +0530 ALSA: hda: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 995 608 0 1603 643 sound/pci/hda/hda_sysfs.o File size After adding 'const': text data bss dec hex filename 1035 544 0 1579 62b sound/pci/hda/hda_sysfs.o Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai sound/pci/hda/hda_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 343fe850668cc38ba0524aa5880b041b2567ae5c Author: Arvind Yadav Date: Thu Jun 29 16:02:56 2017 +0530 ALSA: pcm: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 9781 240 8 10029 272d sound/core/pcm.o File size After adding 'const': text data bss dec hex filename 9813 176 8 9997 270d sound/core/pcm.o Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai sound/core/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a749e247f745f609fd1106f1400ea063fe9b18ba Author: Paolo Bonzini Date: Thu Jun 29 17:14:50 2017 +0200 KVM: lapic: reorganize restart_apic_timer Move the code to cancel the hv timer into the caller, just before it starts the hrtimer. Check availability of the hv timer in start_hv_timer. Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 85 +++++++++++++++++++++++++--------------------------- arch/x86/kvm/lapic.h | 2 +- arch/x86/kvm/x86.c | 8 ++--- 3 files changed, 45 insertions(+), 50 deletions(-) commit 35ee9e48b9df6c7751e8f759a4deec5aed1463c3 Author: Paolo Bonzini Date: Thu Jun 29 17:14:50 2017 +0200 KVM: lapic: reorganize start_hv_timer There are many cases in which the hv timer must be canceled. Split out a new function to avoid duplication. Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit a2b93775002bc12ff7a61c7d622de07f553f0d53 Author: Valentin Rothberg Date: Thu Jun 29 08:59:07 2017 +0200 nvme: Makefile: remove dead build rule Remove dead build rule for drivers/nvme/host/scsi.c which has been removed by commit ("nvme: Remove SCSI translations"). Signed-off-by: Valentin Rothberg Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/Makefile | 1 - 1 file changed, 1 deletion(-) commit ffe3744a591fdce695da6b891378261e2caedc69 Merge: 4312fc3 d97d0f1 Author: Arnd Bergmann Date: Thu Jun 29 17:34:57 2017 +0200 Merge tag 'actions-drivers-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/drivers Pull "Actions Semi SoC drivers for 4.13" from Andreas Färber: This adds clock source and power domain drivers for S500/S900. * tag 'actions-drivers-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: soc: actions: owl-sps: Factor out owl_sps_set_pg() for power-gating soc: actions: Add Owl SPS dt-bindings: power: Add Owl SPS power domains clocksource: owl: Add S900 support clocksource: Add Owl timer commit c070d6ba252c8f002dbc464f6a55175aa3565baa Merge: dc366b1 b6a0e18 Author: Arnd Bergmann Date: Thu Jun 29 17:33:41 2017 +0200 Merge tag 'actions-arm-soc+sps-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/soc Pull "Actions Semi ARM SoC for v4.13 #2" from Andreas Färber: This adds SMP code to bring up the remaining S500 CPU cores by reusing a helper factored out of the SPS power domains driver. * tag 'actions-arm-soc+sps-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: ARM: owl: smp: Implement SPS power-gating for CPU2 and CPU3 soc: actions: owl-sps: Factor out owl_sps_set_pg() for power-gating soc: actions: Add Owl SPS dt-bindings: power: Add Owl SPS power domains commit 15ad6ace52039c7e39435c4d712d147126604a97 Author: Luc Van Oostenryck Date: Thu Jun 29 16:40:12 2017 +0200 arm64: fix endianness annotation for __apply_alternatives()/get_alt_insn() get_alt_insn() is used to read and create ARM instructions, which are always stored in memory in little-endian order. These values are thus correctly converted to/from native order when processed but the pointers used to hold the address of these instructions are declared as for native order values. Fix this by declaring the pointers as __le32* instead of u32* and make the few appropriate needed changes like removing the unneeded cast '(u32*)' in front of __ALT_PTR()'s definition. Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/kernel/alternative.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 67831edf8a826750b43d5612792a9c3bc449f227 Author: Luc Van Oostenryck Date: Thu Jun 29 16:35:29 2017 +0200 arm64: fix endianness annotation in get_kaslr_seed() In the flattened device tree format, all integer properties are in big-endian order. Here the property "kaslr-seed" is read from the fdt and then correctly converted to native order (via fdt64_to_cpu()) but the pointer used for this is not annotated as being for big-endian. Fix this by declaring the pointer as fdt64_t instead of u64 (fdt64_t being itself typedefed to __be64). Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/kernel/kaslr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50a4b05609929003ce98987bb901ee10fe21fb20 Author: Luc Van Oostenryck Date: Thu Jun 29 16:31:40 2017 +0200 arm64: add missing conversion to __wsum in ip_fast_csum() ARM64 implementation of ip_fast_csum() do most of the work in 128 or 64 bit and call csum_fold() to finalize. csum_fold() itself take a __wsum argument, to insure that this value is always a 32bit native-order value. Fix this by adding the sadly needed '__force' to cast the native 'sum' to the type '__wsum'. Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/include/asm/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3efe3db932b55ed34ba32862f568abae32046d0 Author: Dennis Zhou Date: Thu Jun 29 10:56:26 2017 -0400 percpu: fix static checker warnings in pcpu_destroy_chunk From 5021b97f4026334d2c8dfad80797dd1028cddd73 Mon Sep 17 00:00:00 2001 From: Dennis Zhou Date: Thu, 29 Jun 2017 07:11:41 -0700 Add NULL check in pcpu_destroy_chunk to correct static checker warnings. Signed-off-by: Dennis Zhou Reported-by: Dan Carpenter Signed-off-by: Tejun Heo mm/percpu-km.c | 5 ++++- mm/percpu-vm.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit a3cc999959fc9b492f3ddb48add2be6d872c16c7 Author: Tom Rini Date: Wed Jun 21 07:42:39 2017 -0400 multi_v7_defconfig: Enable OMAP MTD and DM816 AHCI A wide variety of TI platforms support NAND via the CONFIG_MTD_NAND_OMAP2 driver (and related BCH options), so enable this. In addition, multi_v7_defconfig supports the dm8168-evm and that supports root being on a SATA drive, so build the DM816 AHCI driver into the resulting kernel as well. Cc: Russell King Cc: Arnd Bergmann Cc: Mihail Grigorov Signed-off-by: Tom Rini Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 96f630279ad49402fa394e145a2c28bd97d6e3c4 Merge: a1f338f c88cc3e Author: Arnd Bergmann Date: Thu Jun 29 17:19:27 2017 +0200 Merge tag 'actions-arm64-soc-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/arm64 Pull "Actions Semi ARM64 SoC for v4.13" from Andreas Färber: This adds a Kconfig symbol for DTs and drivers being added. * tag 'actions-arm64-soc-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: arm64: Prepare Actions Semi S900 commit 30c2a6582869055132fb59fb28624d6703d202fe Merge: 6d599c8 06edb80 Author: Arnd Bergmann Date: Thu Jun 29 17:16:12 2017 +0200 Merge tag 'actions-arm64-dt-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/dt64 Pull "Actions Semi ARM64 based SoC DT for 4.13" from Andreas Färber: This adds an initial DT for the S900 SoC and a devboard based on it. * tag 'actions-arm64-dt-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: arm64: dts: Add Actions Semi S900 and Bubblegum-96 dt-bindings: Add vendor prefix for uCRobotics commit e47c0b96678c5fd731c125dca677880e06d6394c Author: Jaehoon Chung Date: Mon Jun 5 13:41:35 2017 +0900 mmc: dw_mmc: remove the unnecessary slot variable Remove the unnecessary slot variable. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 42f989c002f235557e3a03feac3b2f16b17d53f6 Author: Jaehoon Chung Date: Mon Jun 5 13:41:34 2017 +0900 mmc: dw_mmc: use the 'slot' instead of 'cur_slot' Remove the 'cur_slot'. Instead, just use 'slot'. There is no multiple slots, so we need to consider only one slot. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-exynos.c | 4 ++-- drivers/mmc/host/dw_mmc.c | 33 ++++++++++++++++----------------- drivers/mmc/host/dw_mmc.h | 3 --- 3 files changed, 18 insertions(+), 22 deletions(-) commit e4a65ef7687b6aaf36bedb497d3fd1480163d2d5 Author: Jaehoon Chung Date: Mon Jun 5 13:41:33 2017 +0900 mmc: dw_mmc: remove the 'id' arguments about functions relevant to slot Doesn't need to pass the id value for slot functions. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit b23475faed77f6a9016013c8db6b4707466e74a8 Author: Jaehoon Chung Date: Mon Jun 5 13:41:32 2017 +0900 mmc: dw_mmc: change the array of slots It doesn't need to use the array of slots anymore. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 21 +++++++++------------ drivers/mmc/host/dw_mmc.h | 4 +--- 2 files changed, 10 insertions(+), 15 deletions(-) commit 58870241a67453be7dc9ab368d5a0cdc9c404616 Author: Jaehoon Chung Date: Mon Jun 5 13:41:31 2017 +0900 mmc: dw_mmc: remove the loop about finding slots dwmmc controller has used the only one slot. It doesn't need to check the other slots. Remove the loop about finding slots. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 115 +++++++++++++++------------------------------- 1 file changed, 36 insertions(+), 79 deletions(-) commit d30a8f7bdf6498e47bd3a6f31e5028f239deb208 Author: Jaehoon Chung Date: Mon Jun 5 13:41:30 2017 +0900 mmc: dw_mmc: deprecated the "num-slots" property dwmmc controller is supporting only one slot per a IP. Even though DWMMC IP is provided the multiple slot, but there is no usage in real world. In mmc subsystem, not allow the multiple slot concept. Then "num-slots" property is deprecated. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 1a12a70fa6784baf2b8b9301ac2c22d1b1ab2979 Author: Shawn Lin Date: Tue May 16 14:28:54 2017 +0800 mmc: dw_mmc-rockchip: parse rockchip, desired-num-phases from DT Currently we unconditionally do tuning for each degree, which costs 900ms for each boot and resume. May someone argue that this is a question of accuracy VS time. But I would say it's a trick of how we need to do decision for our boards. If we don't care the time we spend at all, we could definitely do tuning for each degree. But when we need to improve the user experience, for instance, speed up resuming from S3, we should also have the right to do that. This patch add parsing "rockchip,desired-num-phases", for folks to specify the number of doing tuning. If not specified, 360 will be used as before. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-rockchip.c | 48 ++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 18 deletions(-) commit fca0c33003b1523a9579696515870b164311e56e Author: Shawn Lin Date: Tue May 16 14:28:53 2017 +0800 dt-bindings: rockchip-dw-mshc: add optional rockchip, desired-num-phases By default, dw_mmc-rockchip will execute tuning for each degree. So we won't miss every point of the good sample windows. However, probably the phases are linear inside the good sample window. Actually we don't need to do tuning for each degree so that we could save some time, for instance, probe the driver or resume from S3. Signed-off-by: Shawn Lin Acked-by: Rob Herring Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt | 4 ++++ 1 file changed, 4 insertions(+) commit a6d7514b14a6ea2a3868bdcb2fca7b2410738595 Author: Dong Aisheng Date: Tue Jun 13 10:55:54 2017 +0800 tty: serial: lpuart: add a more accurate baud rate calculation method On new LPUART versions, the oversampling ratio for the receiver can be changed from 4x (00011) to 32x (11111) which could help us get a more accurate baud rate divider. The idea is to use the best OSR (over-sampling rate) possible. Note, OSR is typically hard-set to 16 in other LPUART instantiations. Loop to find the best OSR value possible, one that generates minimum baud diff iterate through the rest of the supported values of OSR. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Stefan Agner Cc: Mingkai Hu Cc: Yangbo Lu Acked-by: Fugang Duan Signed-off-by: Dong Aisheng Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 79 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 7 deletions(-) commit 97d6f353dafa42281dc70a67006c9e40d395796a Author: Dong Aisheng Date: Tue Jun 13 10:55:53 2017 +0800 tty: serial: lpuart: add earlycon support for imx7ulp earlycon is executed quite early before the device tree probe, so we need correctly initialize the port membase and iotype for imx7ulp during early console setup before using. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Stefan Agner Cc: Mingkai Hu Cc: Yangbo Lu Acked-by: Fugang Duan Signed-off-by: Dong Aisheng Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 24b1e5f0e83c2aced8096473d20c4cf6c1355f30 Author: Dong Aisheng Date: Tue Jun 13 10:55:52 2017 +0800 tty: serial: lpuart: add imx7ulp support The lpuart of imx7ulp is basically the same as ls1021a. It's also 32 bit width register, but unlike ls1021a, it's little endian. Besides that, imx7ulp lpuart has a minor different register layout from ls1021a that it has four extra registers (verid, param, global, pincfg) located at the beginning of register map, which are currently not used by the driver and less to be used later. To ease the register difference handling, we add a reg_off member in lpuart_soc_data structure to represent if the normal lpuart32_{read|write} requires plus a offset to hide the issue. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Stefan Agner Cc: Mingkai Hu Cc: Yangbo Lu Cc: Fugang Duan Signed-off-by: Dong Aisheng Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f2422fe43790204b98d3de823c332477b38242f7 Author: Dong Aisheng Date: Tue Jun 13 10:55:51 2017 +0800 dt-bindings: serial: fsl-lpuart: add i.MX7ULP support The lpuart of imx7ulp is basically the same as ls1021a. It's also 32 bit width register, but unlike ls1021a, it's little endian. Besides that, imx7ulp lpuart has a minor different register layout from ls1021a. Cc: devicetree@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Stefan Agner Cc: Mingkai Hu Cc: Yangbo Lu Acked-by: Rob Herring Acked-by: Fugang Duan Signed-off-by: Dong Aisheng Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/fsl-lpuart.txt | 2 ++ 1 file changed, 2 insertions(+) commit f98e1fcd96f95ba20648c122811869a172a36107 Author: Dong Aisheng Date: Tue Jun 13 10:55:50 2017 +0800 tty: serial: lpuart: add little endian 32 bit register support Use standard port->iotype to distinguish endian difference. Note as we read/write register by checking iotype dynamically, we need to initialize the iotype correctly for earlycon as well to avoid a break. Cc: Greg Kroah-Hartman Cc: Jiri Slaby (supporter:TTY LAYER) Cc: Stefan Agner Cc: Mingkai Hu Cc: Yangbo Lu Cc: Fugang Duan Cc: Andy Shevchenko Cc: Nikita Yushchenko Signed-off-by: Dong Aisheng ChangeLog: v3->v4: * Removed unneeded semicolon catched by 0day Robot. v2->v3: * Instead of using global var, use standard port->iotype to distinguish endian difference. v1->v2: * No changes Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 45 +++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 15 deletions(-) commit a0204f25e15cb5b7a14ffcb0d2f45bfc37939206 Author: Dong Aisheng Date: Tue Jun 13 10:55:49 2017 +0800 tty: serial: lpuart: refactor lpuart32_{read|write} prototype Due to the original lpuart32_read/write takes no port specific information arguments, it's hard to distinguish port difference within the API. Although it works before, but not suitable anymore when adding more new chips support. So let's convert it to accept a new struct uart_port argument to make it be able to retrieve more port specific information. This is a preparation for the later adding new chips support more easily. No functions changes. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Stefan Agner Cc: Mingkai Hu Cc: Yangbo Lu Cc: Fugang Duan Cc: Andy Shevchenko Cc: Nikita Yushchenko Signed-off-by: Dong Aisheng Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 123 ++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 61 deletions(-) commit 0d6fce904452636540949d0babd8fd398002af73 Author: Dong Aisheng Date: Tue Jun 13 10:55:48 2017 +0800 tty: serial: lpuart: introduce lpuart_soc_data to represent SoC property This is used to dynamically check the SoC specific lpuart properies. Currently only the iotype is added, it functions the same as before. With this, new chips with different iotype will be more easily added. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Stefan Agner Cc: Mingkai Hu Cc: Yangbo Lu Cc: Fugang Duan Cc: Andy Shevchenko Cc: Nikita Yushchenko Signed-off-by: Dong Aisheng Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 47 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 20 deletions(-) commit 0c6cda5839b8b65d1d04cbf5c310735459f7bc60 Merge: 1964bab 740f6beb Author: Arnd Bergmann Date: Thu Jun 29 17:09:58 2017 +0200 Merge tag 'actions-arm-dt-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/dt Pull "Actions Semi ARM based SoC DT for v4.13" from Andreas Färber: This adds an initial DT for the S500 SoC and a devboard based on it. * tag 'actions-arm-dt-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: ARM: dts: owl-s500: Add SPS node ARM: dts: owl-s500: Set CPU enable-method dt-bindings: arm: cpus: Add S500 enable-method ARM: dts: Add Actions Semi S500 and LeMaker Guitar dt-bindings: arm: Document Actions Semi S900 dt-bindings: timer: Document Owl timer dt-bindings: arm: Document Actions Semi S500 dt-bindings: Add vendor prefix for Actions Semi commit a3015affdf76ef279fbbb3710a220bab7e9ea04b Author: Nandor Han Date: Wed Jun 28 12:15:14 2017 +0200 serial: imx-serial - move DMA buffer configuration to DT The size of the DMA buffer can affect the delta time between data being produced and data being consumed. Basically the DMA system will move data to tty buffer when a) DMA buffer is full b) serial line is idle. The situation is visible when producer generates data continuously and there is no possibility for idle line. At this point the DMA buffer is directly affecting the delta time. The patch will add the possibility to configure the DMA buffers in DT, which case by case can be configured separately for every driver instance. The DT configuration is optional and in case missing the driver will use the 4096 buffer with 4 periods (as before), therefore no clients are impacted by this change. Signed-off-by: Nandor Han Signed-off-by: Romain Perier Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/serial/fsl-imx-uart.txt | 2 ++ drivers/tty/serial/imx.c | 25 +++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) commit 6376cd39ea0b9a56c3ddfb8c794b7322a7029b63 Author: Nandor Han Date: Wed Jun 28 15:59:36 2017 +0200 serial: imx: Enable RTSD only when needed Currently, this IRQ is always enabled. Some devices might mux these pins to other I/Os, like I2C. This could lead to spurious interrupts. This commit makes this IRQ optional, by using the field have_rtscts. Signed-off-by: Nandor Han Signed-off-by: Romain Perier Reviewed-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5ac88295fc8e128717e08eca9726549215a2fa70 Author: Fabio Estevam Date: Tue Jun 20 14:12:49 2017 -0300 serial: imx: Remove unused members from imx_port struct IRDA support is gone since commit afe9cbb1a6ad ("serial: imx: drop support for IRDA"), so remove the remaining irda members from imx_port structure. While at it, also remove 'trcv_delay' which is also unused. Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 3 --- 1 file changed, 3 deletions(-) commit dc366b16a256c758ef6b3de220b628612f182485 Merge: b1cb5e6 ba2694de Author: Arnd Bergmann Date: Thu Jun 29 17:05:13 2017 +0200 Merge tag 'actions-arm-soc-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/soc Pull "Actions Semi ARM SoC for v4.13" from Andreas Färber: This adds a Kconfig symbol and mach-actions with board and SMP code, plus a MAINTAINERS entry. * tag 'actions-arm-soc-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: MAINTAINERS: Update Actions Semi section with SPS ARM: owl: Implement CPU enable-method for S500 MAINTAINERS: Add Actions Semi Owl section ARM: Prepare Actions Semi S500 commit 9f4cfffb2d7d43e5cd541a0b6379d181c65d0f85 Merge: a4857ad 7f79478 Author: Arnd Bergmann Date: Thu Jun 29 17:03:21 2017 +0200 Merge tag 'qcom-defconfig-for-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/defconfig Pull "Qualcomm ARM Based defconfig Updates for v4.13 - Part 2" from Andy Gross: * Enable RPMSG_QCOM_SMD to get boards working again * tag 'qcom-defconfig-for-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: qcom_defconfig: enable RPMSG_QCOM_SMD commit a1bfb6eb300d008decfbcdf13b0fda536d22dea9 Author: Vignesh R Date: Tue Jun 20 11:12:12 2017 +0530 serial: 8250: 8250_omap: Fix race b/w dma completion and RX timeout DMA RX completion handler for UART is called from a tasklet and hence may be delayed depending on the system load. In meanwhile, there may be RX timeout interrupt which can get serviced first before DMA RX completion handler is executed for the completed transfer. omap_8250_rx_dma_flush() which is called on RX timeout interrupt makes sure that the DMA RX buffer is pushed and then the FIFO is drained and also queues a new DMA request. But, when DMA RX completion handler executes, it will erroneously flush the currently queued DMA transfer which sometimes results in data corruption and double queueing of DMA RX requests. Fix this by checking whether RX completion is for the currently queued transfer or not. And also hold port lock when in DMA completion to avoid race wrt RX timeout handler preempting it. Signed-off-by: Vignesh R Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_omap.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit cfde770d945f63b8d66eef0246209cea985f0913 Author: Phil Elwell Date: Wed Jun 28 10:41:25 2017 +0100 serial: 8250: Fix THRE flag usage for CAP_MINI The BCM2835 MINI UART has non-standard THRE semantics. Conventionally the bit means that the FIFO is empty (although there may still be a byte in the transmit register), but on 2835 it indicates that the FIFO is not full. This causes interrupts after every byte is transmitted, with the FIFO providing some interrupt latency tolerance. A consequence of this difference is that the usual strategy of writing multiple bytes into the TX FIFO after checking THRE once is unsafe. In the worst case of 7 bytes in the FIFO, writing 8 bytes loses all but the first since by then the FIFO is full. There is an HFIFO ("Hidden FIFO") capability that causes the transmit loop to terminate when both THRE and TEMT are set, i.e. when the TX block is completely idle. This is unnecessarily cautious, potentially causing gaps in transmission. Add a new conditional to the transmit loop, predicated on CAP_MINI, that exits when THRE is no longer set (the FIFO is full). This allows the FIFO to fill quickly but subsequent writes are paced by the transmission rate. Signed-off-by: Phil Elwell Acked-by: Eric Anholt Acked-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6d599c8d35475ec47612e28ed8d9aa23b9caaf73 Merge: 2b29ca2 cd84aff Author: Arnd Bergmann Date: Thu Jun 29 16:59:54 2017 +0200 Merge tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt64 Pull "Amlogic 64-bit DT changes for v4.13 (round 2)" from Kevin Hilman: - support new SPI controller driver - several more leaf clocks exposed to DT - New board: S905x LibreTech CC board * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gxl: Add Libre Technology CC support dt-bindings: arm: amlogic: Add Libre Technology CC board dt-bindings: add Libre Technology vendor prefix ARM64: dts: meson-gx: Add SPICC nodes clk: meson-gxbb: un-export the CPU clock clk: meson-gxbb: expose UART clocks clk: meson-gxbb: expose SPICC gate clk: meson-gxbb: expose spdif master clock clk: meson-gxbb: expose i2s master clock clk: meson-gxbb: expose spdif clock gates commit 1964babb2659a2939e7737550eb511609ae7d6c5 Merge: 30e3224 f28d4bd Author: Arnd Bergmann Date: Thu Jun 29 16:58:33 2017 +0200 Merge tag 'amlogic-dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Merge "Amlogic 32-bit DT changes for v4.13 (round 2)" from Kevin Hilman: - greatly expands DT clock support for meson8b * tag 'amlogic-dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (22 commits) ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b ARM: dts: meson8b: add the SCU device node ARM: dts: meson: add USB support on Meson8 and Meson8b ARM: dts: meson: add the hardware random number generator ARM: dts: meson8: add reserved memory zones ARM: dts: meson: add the SAR ADC ARM: dts: meson8: add the pins for the SDIO controller ARM: dts: meson8: add the PWM_E and PWM_F pins ARM: dts: meson: use GIC_SPI and IRQ_TYPE_EDGE_RISING macros ARM: dts: meson: use C preprocessor friendly include syntax ARM: dts: meson8: fix the IR receiver pins clk: meson8b: export the ethernet gate clock clk: meson8b: export the USB clocks clk: meson8b: export the gate clock for the HW random number generator clk: meson8b: export the SDIO clock clk: meson8b: export the SAR ADC clocks clk: meson-gxbb: un-export the CPU clock clk: meson-gxbb: expose UART clocks clk: meson-gxbb: expose SPICC gate clk: meson-gxbb: expose spdif master clock ... commit fe631457ff3e19e7bb28f4ad65c65726203fdb64 Author: Max Gurtovoy Date: Thu Jun 29 08:40:11 2017 -0600 blk-mq: map all HWQ also in hyperthreaded system This patch performs sequential mapping between CPUs and queues. In case the system has more CPUs than HWQs then there are still CPUs to map to HWQs. In hyperthreaded system, map the unmapped CPUs and their siblings to the same HWQ. This actually fixes a bug that found unmapped HWQs in a system with 2 sockets, 18 cores per socket, 2 threads per core (total 72 CPUs) running NVMEoF (opens upto maximum of 64 HWQs). Performance results running fio (72 jobs, 128 iodepth) using null_blk (w/w.o patch): bs IOPS(read submit_queues=72) IOPS(write submit_queues=72) IOPS(read submit_queues=24) IOPS(write submit_queues=24) ----- ---------------------------- ------------------------------ ---------------------------- ----------------------------- 512 4890.4K/4723.5K 4524.7K/4324.2K 4280.2K/4264.3K 3902.4K/3909.5K 1k 4910.1K/4715.2K 4535.8K/4309.6K 4296.7K/4269.1K 3906.8K/3914.9K 2k 4906.3K/4739.7K 4526.7K/4330.6K 4301.1K/4262.4K 3890.8K/3900.1K 4k 4918.6K/4730.7K 4556.1K/4343.6K 4297.6K/4264.5K 3886.9K/3893.9K 8k 4906.4K/4748.9K 4550.9K/4346.7K 4283.2K/4268.8K 3863.4K/3858.2K 16k 4903.8K/4782.6K 4501.5K/4233.9K 4292.3K/4282.3K 3773.1K/3773.5K 32k 4885.8K/4782.4K 4365.9K/4184.2K 4307.5K/4289.4K 3780.3K/3687.3K 64k 4822.5K/4762.7K 2752.8K/2675.1K 4308.8K/4312.3K 2651.5K/2655.7K 128k 2388.5K/2313.8K 1391.9K/1375.7K 2142.8K/2152.2K 1395.5K/1374.2K Signed-off-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq-cpumap.c | 68 +++++++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 46 deletions(-) commit 9b326dfce12afb429915c63f5a3df4afa4bea957 Author: Denis Petrovic Date: Sun Jun 25 14:52:48 2017 +0200 staging: lustre: replace kmalloc with kmalloc_array This patch fixes the following checkpatch.pl warning: WARNING: Prefer kmalloc_array over kmalloc with multiply Signed-off-by: Denis Petrovic Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 878c33a78811f90795f17333bc3a7c819a1589a7 Author: Quytelda Kahja Date: Tue Jun 27 14:35:46 2017 -0700 Staging: ion: fix code style warning from NULL comparisons This patch replaces several instances where a pointer is compared to NULL (i.e., `ptr == NULL`) with `!ptr`, which is preferred. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd18c0c9c8ed77ad73301752d04cbdc3f0af3b77 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:35 2017 +0300 staging: fsl-mc: make dprc.h header private dprc.h is only used in the mc bus driver so move it together with the sources thus making it private. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc.c | 2 +- drivers/staging/fsl-mc/bus/dprc.h | 268 ++++++++++++++++++++++++++++ drivers/staging/fsl-mc/bus/fsl-mc-private.h | 1 + drivers/staging/fsl-mc/include/dprc.h | 268 ---------------------------- drivers/staging/fsl-mc/include/mc.h | 1 - 5 files changed, 270 insertions(+), 270 deletions(-) commit d30a41dbcb79ba2918f07acd86e447802fd1b527 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:34 2017 +0300 staging: fsl-mc: move mc-cmd.h contents in the public header mc-cmd.h contains some low level functions used to encode and decode commands to the MC. They are used by the drivers so move them to the public headers and get rid of the mc-cmd.h header. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpni.c | 1 - drivers/staging/fsl-mc/bus/dpbp.c | 1 - drivers/staging/fsl-mc/bus/dpcon.c | 1 - drivers/staging/fsl-mc/bus/dpio/dpio.c | 1 - drivers/staging/fsl-mc/bus/dpmcp.c | 1 - drivers/staging/fsl-mc/bus/dprc.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 - drivers/staging/fsl-mc/bus/mc-sys.c | 1 - drivers/staging/fsl-mc/include/mc-cmd.h | 130 ------------------------------ drivers/staging/fsl-mc/include/mc.h | 95 +++++++++++++++++++++- 11 files changed, 94 insertions(+), 140 deletions(-) commit fab8ca582796796d869924839839dbc940367a3a Author: Laurentiu Tudor Date: Tue Jun 27 17:41:33 2017 +0300 staging: fsl-mc: move mc-sys.h contents in the public header mc-sys.h contains the API to send commands to the MC and is used by drivers. Move it to the public headers and get rid of the mc-sys.h header. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 1 - drivers/staging/fsl-dpaa2/ethernet/dpni.c | 2 +- drivers/staging/fsl-mc/bus/dpbp.c | 2 +- drivers/staging/fsl-mc/bus/dpcon.c | 2 +- drivers/staging/fsl-mc/bus/dpio/dpio.c | 2 +- drivers/staging/fsl-mc/bus/dpmcp.c | 2 +- drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +- drivers/staging/fsl-mc/bus/dprc.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 2 +- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - drivers/staging/fsl-mc/bus/mc-io.c | 2 +- drivers/staging/fsl-mc/bus/mc-sys.c | 1 - drivers/staging/fsl-mc/include/mc-sys.h | 98 -------------------------- drivers/staging/fsl-mc/include/mc.h | 53 ++++++++++++++ 14 files changed, 61 insertions(+), 110 deletions(-) commit 409acdd0412e9343095d965a9228f6e6a83a416f Author: Laurentiu Tudor Date: Tue Jun 27 17:41:32 2017 +0300 staging: fsl-mc: fix a few implicit includes Few files using byte order macros but did not explicitly included the required kernel header, so add it. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpbp.c | 1 + drivers/staging/fsl-mc/bus/dpcon.c | 1 + drivers/staging/fsl-mc/bus/dpio/dpio.c | 1 + drivers/staging/fsl-mc/bus/dpmcp.c | 1 + drivers/staging/fsl-mc/bus/dprc.c | 1 + 5 files changed, 5 insertions(+) commit 3ea73a4b7742d49621a369f1ce2c702c17bf83ca Author: Laurentiu Tudor Date: Tue Jun 27 17:41:31 2017 +0300 staging: fsl-mc: remove dpmng API files dpmng.h & dpmng.c files expose an API of just one function which is only used by the bus driver. Move that single API in the bus source as static and remove the two files. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/Makefile | 1 - drivers/staging/fsl-mc/bus/dpmng.c | 74 --------------------------------- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 53 ++++++++++++++++++++++- drivers/staging/fsl-mc/include/dpmng.h | 67 ----------------------------- 4 files changed, 52 insertions(+), 143 deletions(-) commit 5e0d2d01435725ed533cfe7ca91368408fab4552 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:30 2017 +0300 staging: fsl-mc: move rest of mc-bus.h to private header All the mc-bus.h contents is only used privately in the bus driver so move everything to the private header and get rid of the mc-bus.h header file. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-private.h | 61 +++++++++++++++++ .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 1 - drivers/staging/fsl-mc/bus/mc-io.c | 1 - drivers/staging/fsl-mc/include/mc-bus.h | 77 ---------------------- 8 files changed, 61 insertions(+), 83 deletions(-) commit 61aa52c7742b1de3afa583f06de320da5ad79b60 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:29 2017 +0300 staging: fsl-mc: move couple of definitions to public header Define dev_is_fsl_mc() and the bus type definition (fsl_mc_bus_type) are used externally so move them to the public header. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 9 --------- drivers/staging/fsl-mc/include/mc.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit 7211e711bf9d41ade0cc9ce9251144944c186854 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:28 2017 +0300 staging: fsl-mc: move irq domain creation prototype to public header fsl_mc_msi_create_irq_domain() will is used from the irqchip glue code so it needs to be in the public headers. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 7 ------- drivers/staging/fsl-mc/include/mc.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit ad62553f03635371ba22d69614c5a25c3454b371 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:27 2017 +0300 staging: fsl-mc: turn several exported functions static They are never used outside the source they are implemented in and very likely never will, so it's safe to make them static. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 8 +++----- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 5 ++--- drivers/staging/fsl-mc/include/mc-bus.h | 8 -------- 3 files changed, 5 insertions(+), 16 deletions(-) commit a8d77e43bd35cbb839279c338b1757745958ea9e Author: Laurentiu Tudor Date: Tue Jun 27 17:41:26 2017 +0300 staging: fsl-mc: delete prototype of unimplemented function The function fsl_mc_bus_exists() has a prototype but is never implemented so delete it from the header file. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 2 -- 1 file changed, 2 deletions(-) commit fda0d1d57e66a1c0ad45424e185108addbaf3f79 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:25 2017 +0300 staging: fsl-mc: delete duplicated function prototypes These functions already have their prototypes in fsl-mc-private.h header file so delete them from mc-bus.h. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 8 -------- 1 file changed, 8 deletions(-) commit 0cf9f5096da2200b52cee0e38139c99c4fc0151c Author: Laurentiu Tudor Date: Tue Jun 27 17:41:24 2017 +0300 staging: fsl-mc: decouple the mc-bus public headers from dprc.h In its current form, the public headers of the mc-bus depend only on a structure "dprc_obj_desc" defined in dprc.h. Move it to the bus public header together with its associated defines and, in order to keep the naming prefixes consistent rename it to "fsl_mc_obj_desc". This will allow making dprc.h private in future patches. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 38 ++++++++++++------------ drivers/staging/fsl-mc/bus/dprc.c | 3 +- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 12 ++++---- drivers/staging/fsl-mc/bus/fsl-mc-private.h | 2 +- drivers/staging/fsl-mc/include/dprc.h | 46 ++--------------------------- drivers/staging/fsl-mc/include/mc.h | 41 ++++++++++++++++++++++++- 6 files changed, 71 insertions(+), 71 deletions(-) commit 5b4813cb1e8b2ce19fad4a0134b318f5ce3b85f0 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:23 2017 +0300 staging: fsl-mc: drop useless #includes These couple of header files are not needed in the source so remove them. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 2 -- 1 file changed, 2 deletions(-) commit b93ad9a067e1515af42da7d56bc61f1a25075f94 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:22 2017 +0300 staging: fsl-mc: be consistent when checking strcmp() return Stick to one way of checking the return code of strcmp(): use '!'. This was suggested in a review comment. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 714cc27d41b5676257e6b23851ff4afacf395883 Author: Laurentiu Tudor Date: Tue Jun 27 17:41:21 2017 +0300 staging: fsl-mc: move comparison before strcmp() call Move comparison before the strcmp() in this if statement, and slightly increase efficiency by not making the strcmp() each time the if gets evaluated but only when the comparison is true. This was suggested in a review comment. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ce73724d4d4f5f807ca0739b8993394ece9f4212 Author: Colin Ian King Date: Wed Jun 28 14:13:51 2017 +0100 staging: speakup: make function ser_to_dev static The helper function ser_to_dev does not need to be in global scope, so make it static. Cleans up sparse warning: "warning: symbol 'ser_to_dev' was not declared. Should it be static?" Signed-off-by: Colin Ian King Reviewed-by: Okash Khawaja Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9cbe2ad656f3e9fc2054853ffc4adda71477fe6 Author: Colin Ian King Date: Wed Jun 28 17:11:29 2017 +0100 staging: ks7010: fix spelling mistake: "errror" -> "error" Trivial fix to spelling mistake in netdev_err message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ad33de53afedd064926c64f2ffa896c21e4bc28 Author: Colin Ian King Date: Tue Jun 27 15:23:26 2017 +0100 staging: rtl8192e: fix spelling mistake: "respose" -> "response" Trivial fix to spelling mistake in netdev_info message and split line to clean up an checkpatch line too wide warning. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_softmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e171da0d09b14fa5f67ae6ef1095fcd7e23b67fc Author: Colin Ian King Date: Tue Jun 27 10:29:06 2017 +0100 staging: wilc1000: fix spelling mistake: "dissconect" -> "disconnect" Trivial fix to spelling mistake in netdev_err error message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb0cb50d6e5aebf8671db7ab4b582f782abe8477 Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:26 2017 +0300 staging: ccree: fix block comment style Align block comments according to coding style. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_hw_queue_defs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 492ddcbb2103ea28217e5fea1a5c769254934c46 Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:25 2017 +0300 staging: ccree: remove/add (un)needed blank lines Remove or add blank lines as needed to match coding style. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 20 +++++-------------- drivers/staging/ccree/ssi_aead.h | 4 ---- drivers/staging/ccree/ssi_buffer_mgr.c | 7 ++++--- drivers/staging/ccree/ssi_buffer_mgr.h | 1 - drivers/staging/ccree/ssi_cipher.c | 17 +++------------- drivers/staging/ccree/ssi_cipher.h | 6 ------ drivers/staging/ccree/ssi_driver.c | 4 +--- drivers/staging/ccree/ssi_fips.c | 2 -- drivers/staging/ccree/ssi_fips.h | 3 --- drivers/staging/ccree/ssi_fips_data.h | 8 -------- drivers/staging/ccree/ssi_fips_ext.c | 2 -- drivers/staging/ccree/ssi_fips_ll.c | 35 +++++++++------------------------ drivers/staging/ccree/ssi_fips_local.c | 14 +------------ drivers/staging/ccree/ssi_fips_local.h | 4 ++-- drivers/staging/ccree/ssi_hash.c | 12 ++++------- drivers/staging/ccree/ssi_ivgen.c | 1 - drivers/staging/ccree/ssi_ivgen.h | 1 - drivers/staging/ccree/ssi_pm.c | 5 ----- drivers/staging/ccree/ssi_pm.h | 3 --- drivers/staging/ccree/ssi_request_mgr.c | 9 +++------ drivers/staging/ccree/ssi_sram_mgr.c | 2 -- drivers/staging/ccree/ssi_sram_mgr.h | 1 - drivers/staging/ccree/ssi_sysfs.c | 4 ---- drivers/staging/ccree/ssi_sysfs.h | 1 + 24 files changed, 33 insertions(+), 133 deletions(-) commit e8e5110e6be0889abd0913dc00d8731e3c0f7742 Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:24 2017 +0300 staging: ccree: remove unused type CCFipsSyncStatus_t The CCFipsSyncStatus_t type was not being used in the code. Remove it. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips_local.h | 10 ---------- 1 file changed, 10 deletions(-) commit dff5e61e90476ee85a544daf9ba71dbd9404620d Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:23 2017 +0300 staging: ccree: remove custom type ssi_fips_state_t Replace custom type ssi_fips_state_t with underlying enum. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips.c | 4 ++-- drivers/staging/ccree/ssi_fips.h | 6 +++--- drivers/staging/ccree/ssi_fips_ext.c | 6 +++--- drivers/staging/ccree/ssi_fips_local.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) commit 8422f1120bcfacc724a1928ea691d3953c62756e Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:22 2017 +0300 staging: ccree: remove custom type ssi_fips_error_t Replace custom type ssi_fips_error_t with underlying enum. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips.c | 4 ++-- drivers/staging/ccree/ssi_fips.h | 6 +++--- drivers/staging/ccree/ssi_fips_ext.c | 6 +++--- drivers/staging/ccree/ssi_fips_ll.c | 30 +++++++++++++++--------------- drivers/staging/ccree/ssi_fips_local.c | 28 ++++++++++++++-------------- drivers/staging/ccree/ssi_fips_local.h | 2 +- 6 files changed, 38 insertions(+), 38 deletions(-) commit 1de8f59fa44b070d5ae6c3f2f4b06d42ab4c8b46 Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:21 2017 +0300 staging: ccree: remove custom type tdes_keys_t Replace references to type tdes_keys_t with struct tdes_keys. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d32a0b6db88a70e613dc90df8f1bbe545f4ce049 Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:20 2017 +0300 staging: ccree: fix pointer location Fix location of pointer in variables definitions and dereference. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.h | 4 ++-- drivers/staging/ccree/ssi_buffer_mgr.c | 12 ++++++------ drivers/staging/ccree/ssi_cipher.c | 8 ++++---- drivers/staging/ccree/ssi_fips_ll.c | 24 ++++++++++++------------ drivers/staging/ccree/ssi_fips_local.c | 2 +- drivers/staging/ccree/ssi_hash.c | 2 +- drivers/staging/ccree/ssi_hash.h | 6 +++--- drivers/staging/ccree/ssi_request_mgr.c | 10 +++++----- drivers/staging/ccree/ssi_sysfs.c | 4 ++-- 9 files changed, 36 insertions(+), 36 deletions(-) commit 6191eb1dc817d78b147a6e4a485b2406be9bf15e Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:19 2017 +0300 staging: ccree: remove comparisons to NULL Remove explicit comparisons to NULL in ccree driver. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 34 ++++++++++++------------- drivers/staging/ccree/ssi_buffer_mgr.c | 44 ++++++++++++++++----------------- drivers/staging/ccree/ssi_cipher.c | 12 ++++----- drivers/staging/ccree/ssi_driver.c | 20 +++++++-------- drivers/staging/ccree/ssi_fips.c | 4 +-- drivers/staging/ccree/ssi_fips_ext.c | 4 +-- drivers/staging/ccree/ssi_fips_local.c | 10 ++++---- drivers/staging/ccree/ssi_hash.c | 12 ++++----- drivers/staging/ccree/ssi_ivgen.c | 4 +-- drivers/staging/ccree/ssi_request_mgr.c | 8 +++--- drivers/staging/ccree/ssi_sram_mgr.c | 2 +- drivers/staging/ccree/ssi_sysfs.c | 2 +- 12 files changed, 78 insertions(+), 78 deletions(-) commit 44c891af576997763d1d4c790d50d10db9eff00f Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:18 2017 +0300 staging: ccree: fix unmatched if/else braces Fix mismatched braces between if and else. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++- drivers/staging/ccree/ssi_cipher.c | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit a8f6cbaad29b3e7570570f819d3577c4f4ab0f59 Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:17 2017 +0300 staging: ccree: no need for braces for single statements Fix several cases of needless braces around single statement blocks. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 38 +++++++----------- drivers/staging/ccree/ssi_buffer_mgr.c | 70 ++++++++++++++------------------- drivers/staging/ccree/ssi_cipher.c | 41 +++++++------------ drivers/staging/ccree/ssi_driver.c | 9 +++-- drivers/staging/ccree/ssi_fips.c | 6 +-- drivers/staging/ccree/ssi_fips_ext.c | 6 +-- drivers/staging/ccree/ssi_fips_local.c | 39 +++++++++--------- drivers/staging/ccree/ssi_hash.c | 35 ++++++----------- drivers/staging/ccree/ssi_ivgen.c | 4 +- drivers/staging/ccree/ssi_request_mgr.c | 20 ++++------ drivers/staging/ccree/ssi_sysfs.c | 4 +- 11 files changed, 110 insertions(+), 162 deletions(-) commit b4562b61cf084bbd7f8d10b19e5428d7a0e50034 Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:16 2017 +0300 staging: ccree: remove redundant blank lines Remove redundant blank lines in brace blocks Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 2 -- drivers/staging/ccree/ssi_buffer_mgr.c | 8 -------- drivers/staging/ccree/ssi_cipher.c | 5 ----- drivers/staging/ccree/ssi_driver.c | 1 - drivers/staging/ccree/ssi_hash.c | 2 -- drivers/staging/ccree/ssi_pm.c | 1 - drivers/staging/ccree/ssi_request_mgr.c | 1 - 7 files changed, 20 deletions(-) commit 8683e6272de45e9e2df9da811e9eac7c63644072 Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:15 2017 +0300 staging: ccree: fix else placement Fix cases where the else clause was not located correctly after the if brace. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 3 +-- drivers/staging/ccree/ssi_pm.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 7331916cff9874ec1659d2d69e321e00b26e68e3 Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:14 2017 +0300 staging: ccree: drop comparsion to true/false Fix cases in ccree where explicit comparsion to true/false was made. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 18 +++++++++--------- drivers/staging/ccree/ssi_buffer_mgr.c | 20 ++++++++++---------- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_driver.c | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) commit e7258b6a228bdb176ef6c00a01a322f8e8ea6e8a Author: Gilad Ben-Yossef Date: Tue Jun 27 10:27:13 2017 +0300 staging: ccree: fix missing or redundant spaces Add and/or remove redundant and/or missing spaces in ccree source Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/Kconfig | 2 +- drivers/staging/ccree/ssi_aead.c | 38 ++++---- drivers/staging/ccree/ssi_aead.h | 12 +-- drivers/staging/ccree/ssi_buffer_mgr.c | 158 ++++++++++++++++---------------- drivers/staging/ccree/ssi_cipher.c | 44 ++++----- drivers/staging/ccree/ssi_driver.c | 18 ++-- drivers/staging/ccree/ssi_driver.h | 4 +- drivers/staging/ccree/ssi_fips_data.h | 12 +-- drivers/staging/ccree/ssi_fips_ll.c | 12 +-- drivers/staging/ccree/ssi_fips_local.c | 8 +- drivers/staging/ccree/ssi_fips_local.h | 18 ++-- drivers/staging/ccree/ssi_hash.c | 38 ++++---- drivers/staging/ccree/ssi_pm.c | 16 ++-- drivers/staging/ccree/ssi_pm.h | 2 +- drivers/staging/ccree/ssi_request_mgr.c | 62 ++++++------- drivers/staging/ccree/ssi_request_mgr.h | 6 +- drivers/staging/ccree/ssi_sysfs.c | 56 +++++------ 17 files changed, 253 insertions(+), 253 deletions(-) commit 97af1ce27844a4303139b06df962e3a8d738d23b Author: Dhananjay Balan Date: Thu Jun 29 13:24:35 2017 +0200 drivers: staging: sm750: Hold lock irrespective of fb numbers. Start holding the lock for all cases irrespective of number of fb, there could be a deadlock since this number could change in the lifetime of this lock Signed-off-by: Dhananjay Balan Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit d80210f25ff0050245556bb8ce84d280d8fa4ca7 Author: Christoph Hellwig Date: Mon Jun 19 14:26:46 2017 +0200 sd: add support for TCG OPAL self encrypting disks Just wire up the generic TCG OPAL infrastructure to the SCSI disk driver and the Security In/Out commands. Note that I don't know of any actual SCSI disks that do support TCG OPAL, but this is required to support ATA disks through libata. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 3 +++ drivers/scsi/sd.c | 53 +++++++++++++++++++++++++++++++++++++++++++++- drivers/scsi/sd.h | 2 ++ include/scsi/scsi_device.h | 1 + 4 files changed, 58 insertions(+), 1 deletion(-) commit c8ccf812c36bfc939063b83614beaa2562828e07 Author: Tejun Heo Date: Wed Jun 28 14:18:13 2017 -0400 libata: fix build warning from unused goto label b1ffbf854e08 ("libata: Support for an ATA PASS-THROUGH(32) command.") introduced an unused goto label. Remove it. Reported-by: Stephen Rothwell Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 1 - 1 file changed, 1 deletion(-) commit fcc6c877a01f83cbce1cca885ea62df6a10d33c3 Author: Kailang Yang Date: Thu Jun 29 15:21:27 2017 +0800 ALSA: hda/realtek - Support Dell headset mode for ALC3271 Add DELL4_MIC_NO_PRESENCE model. Add the pin configuration value of this machine into the pin_quirk table to make DELL4_MIC_NO_PRESENCE apply to this machine. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit d2a2c80815edfeecb189e6fbef8c2f2421018568 Author: Varadarajan Narayanan Date: Fri Jun 9 15:02:58 2017 +0530 pinctrl: qcom: Add ipq8074 pinctrl driver Add initial pinctrl driver to support pin configuration with pinctrl framework for ipq8074. Signed-off-by: Manoharan Vijaya Raghavan Signed-off-by: Varadarajan Narayanan Acked-by: Rob Herring Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij .../bindings/pinctrl/qcom,ipq8074-pinctrl.txt | 172 ++++ drivers/pinctrl/qcom/Kconfig | 10 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-ipq8074.c | 1076 ++++++++++++++++++++ 4 files changed, 1259 insertions(+) commit df81b9411acc1d5d55fc03a99c7d5337400fed1c Merge: b306004 c03a133 Author: Linus Walleij Date: Thu Jun 29 15:05:51 2017 +0200 Merge tag 'sh-pfc-for-v4.13-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.13 (take two) - Add SCIF1 and SCIF2 pin groups for R-Car V2H, - Add EtherAVB, DU parallel RGB output, and PWM pin groups for R-Car H3 ES2.0, - Add pin and gpio controller support for RZ/A1. commit b3060044e4951fea7cdbd25310f78c438bba71c9 Author: Arvind Yadav Date: Tue Jun 27 17:25:21 2017 +0530 pinctrl: freescale: imx7d: make of_device_ids const. of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx7d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6836796de4019944f4ba4c99a360e8250fd2e735 Author: Devin Heitmueller Date: Tue Jun 27 13:08:51 2017 -0400 Add USB quirk for HVR-950q to avoid intermittent device resets The USB core and sysfs will attempt to enumerate certain parameters which are unsupported by the au0828 - causing inconsistent behavior and sometimes causing the chip to reset. Avoid making these calls. This problem manifested as intermittent cases where the au8522 would be reset on analog video startup, in particular when starting up ALSA audio streaming in parallel - the sysfs entries created by snd-usb-audio on streaming startup would result in unsupported control messages being sent during tuning which would put the chip into an unknown state. Signed-off-by: Devin Heitmueller Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) commit c94dc34f771a25b8c3e0955147fdc4f5e3d79908 Author: Eugene Korenevsky Date: Sun Jun 25 11:08:14 2017 +0300 USB hub_probe: rework ugly goto-into-compound-statement Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. Signed-off-by: Eugene Korenevsky Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit af06d0094fa7fc2613294d409128671856c5471d Author: Arvind Yadav Date: Wed Jun 28 10:21:28 2017 +0530 usb: host: ohci-pxa27x: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-pxa27x.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 138b87fa43b629ed14429e2e056fe4d5ef132921 Author: Laurent Pinchart Date: Thu Jun 29 15:37:20 2017 +0300 drm: vblank: Fix vblank timestamp update Commit 3fcdcb270936 ("drm/vblank: Switch to bool in_vblank_irq in get_vblank_timestamp") inverted a condition by mistake that resulted in vblank timestamps always being 0 on hardware without a vblank counter. Fix it. Fixes: 3fcdcb270936 ("drm/vblank: Switch to bool in_vblank_irq in get_vblank_timestamp") Suggested-by: Ville Syrjälä Signed-off-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170629123720.27173-1-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/drm_vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit feb16722b5d5f05b7ae1278a43e717c3d35cd512 Author: Ian Molton Date: Wed Jun 28 20:10:55 2017 +0100 Bluetooth: btbcm: Add entry for BCM43430 UART bluetooth This patch adds the device ID for the bluetooth chip used in the Broadcom BCM43430 SDIO WiFi / UART BT chip. Successfully tested using Firmware version 0x0182 Signed-off-by: Ian Molton Reported-by: Loic Poulain Signed-off-by: Marcel Holtmann drivers/bluetooth/btbcm.c | 1 + 1 file changed, 1 insertion(+) commit d2ecfa765dff59145a4ba9c84856e50c4f43c2b2 Author: Mateusz Jurczyk Date: Thu Jun 29 14:04:59 2017 +0200 Bluetooth: Add sockaddr length checks before accessing sa_family in bind and connect handlers Verify that the caller-provided sockaddr structure is large enough to contain the sa_family field, before accessing it in bind() and connect() handlers of the Bluetooth sockets. Since neither syscall enforces a minimum size of the corresponding memory region, very short sockaddrs (zero or one byte long) result in operating on uninitialized memory while referencing sa_family. Signed-off-by: Mateusz Jurczyk Signed-off-by: Marcel Holtmann net/bluetooth/l2cap_sock.c | 5 +++-- net/bluetooth/rfcomm/sock.c | 3 ++- net/bluetooth/sco.c | 6 ++---- 3 files changed, 7 insertions(+), 7 deletions(-) commit 29e2dd0d56ea0d6c4a95c080760e1cc748fb6f14 Author: Tejun Heo Date: Wed Jun 28 14:44:06 2017 -0400 bluetooth: remove WQ_MEM_RECLAIM from hci workqueues Bluetooth hci uses ordered HIGHPRI, MEM_RECLAIM workqueues. It's likely that the flags came from mechanical conversion from create_singlethread_workqueue(). Bluetooth shouldn't be depended upon for memory reclaim and the spurious MEM_RECLAIM flag can trigger the following warning. Remove WQ_MEM_RECLAIM and convert to alloc_ordered_workqueue() while at it. workqueue: WQ_MEM_RECLAIM hci0:hci_power_off is flushing !WQ_MEM_RECLAIM events:btusb_work ------------[ cut here ]------------ WARNING: CPU: 2 PID: 14231 at /home/brodo/local/kernel/git/linux/kernel/workqueue.c:2423 check_flush_dependency+0xb3/0x100 Modules linked in: CPU: 2 PID: 14231 Comm: kworker/u9:4 Not tainted 4.12.0-rc6+ #3 Hardware name: Dell Inc. XPS 13 9343/0TM99H, BIOS A11 12/08/2016 Workqueue: hci0 hci_power_off task: ffff9432dad58000 task.stack: ffff986d43790000 RIP: 0010:check_flush_dependency+0xb3/0x100 RSP: 0018:ffff986d43793c90 EFLAGS: 00010086 RAX: 000000000000005a RBX: ffff943316810820 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000096 RDI: 0000000000000001 RBP: ffff986d43793cb0 R08: 0000000000000775 R09: ffffffff85bdd5c0 R10: 0000000000000040 R11: 0000000000000000 R12: ffffffff84d596e0 R13: ffff9432dad58000 R14: ffff94321c640320 R15: ffff9432dad58000 FS: 0000000000000000(0000) GS:ffff94331f500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007b8bca242000 CR3: 000000014f60a000 CR4: 00000000003406e0 Call Trace: flush_work+0x8a/0x1c0 ? flush_work+0x184/0x1c0 ? skb_free_head+0x21/0x30 __cancel_work_timer+0x124/0x1b0 ? hci_dev_do_close+0x2a4/0x4d0 cancel_work_sync+0x10/0x20 btusb_close+0x23/0x100 hci_dev_do_close+0x2ca/0x4d0 hci_power_off+0x1e/0x50 process_one_work+0x184/0x3e0 worker_thread+0x4a/0x3a0 ? preempt_count_sub+0x9b/0x100 ? preempt_count_sub+0x9b/0x100 kthread+0x125/0x140 ? process_one_work+0x3e0/0x3e0 ? __kthread_create_on_node+0x1a0/0x1a0 ? do_syscall_64+0x58/0xd0 ret_from_fork+0x27/0x40 Code: 00 75 bf 49 8b 56 18 48 8d 8b b0 00 00 00 48 81 c6 b0 00 00 00 4d 89 e0 48 c7 c7 20 23 6b 85 c6 05 83 cd 31 01 01 e8 bf c4 0c 00 <0f> ff eb 93 80 3d 74 cd 31 01 00 75 a5 65 48 8b 04 25 00 c5 00 ---[ end trace b88fd2f77754bfec ]--- Signed-off-by: Tejun Heo Reported-by: Dominik Brodowski Signed-off-by: Marcel Holtmann net/bluetooth/hci_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c4c285da1ee18582ace366f07e56e355c20ebc49 Author: Hans de Goede Date: Thu Jun 29 14:21:32 2017 +0200 Bluetooth: hci_bcm: Add active_low irq polarity quirk for Asus T100CHI Just like the T100TA the host-wake irq on the Asus T100CHI is active low. Having a quirk for this is actually extra important on the T100CHI as it ships with a bluetooth keyboard dock, which does not work properly without this quirk. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 857f9dc3f60fba212285eae7b3266559c355a616 Author: Dong Aisheng Date: Thu Jun 22 22:49:00 2017 +0800 pinctrl: DT: extend the pinmux property to support integers array Some platforms may need more than one integer to represent a complete pinmux binding, so let's extend the pinmux property to allow to accept integer array instead of only a single integer. Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Shawn Guo Acked-by: Rob Herring Signed-off-by: Jacopo Mondi Signed-off-by: Dong Aisheng Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-bindings.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 425562429d4f3b134c7390249c23a3f647aad199 Author: Jacopo Mondi Date: Thu Jun 22 12:00:58 2017 +0200 pinctrl: generic: Add output-enable property Add output-enable generic pin configuration property. This properties allows enabling/disabling pin's output capabilities without actually driving any value on the line. Acked-by: Rob Herring [Added inline elaborations on buffer enabling/disabling] Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-bindings.txt | 10 ++++++++-- drivers/pinctrl/pinconf-generic.c | 3 +++ include/linux/pinctrl/pinconf-generic.h | 15 +++++++++++---- 3 files changed, 22 insertions(+), 6 deletions(-) commit 61830619675b97d3da34c59c71ae51646a205e2c Merge: 8137f78 c0bc126 Author: Linus Walleij Date: Thu Jun 29 14:27:39 2017 +0200 Merge tag 'v4.12-rc7' into devel Linux 4.12-rc7 commit 85bb4646f8908eb786dfa19a6bb2ff1423dc8aa4 Author: Biju Das Date: Wed Jun 21 15:27:09 2017 +0100 gpio: rcar: Add R8A7743 (RZ/G1M) support Renesas RZ/G1M (R8A7743) SoC GPIO blocks are identical to the R-Car Gen2 family. Add support for its GPIO controllers. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Acked-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 1 + drivers/gpio/gpio-rcar.c | 4 ++++ 2 files changed, 5 insertions(+) commit 96b5b19459b3c2aed2872bac42cbe19edfae710f Author: Luis R. Rodriguez Date: Wed Jun 28 18:32:31 2017 -0700 module: make the modinfo name const This can be accomplished by making blacklisted() also accept const. Signed-off-by: Luis R. Rodriguez Acked-by: Kees Cook [jeyu: fix typo] Signed-off-by: Jessica Yu kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a02dc974720cdfcea7fde462bcfc12a180e410f Author: Kuppuswamy Sathyanarayanan Date: Mon Jun 26 10:37:04 2017 -0700 gpio: gpio-wcove: Fix GPIO control register offset calculation According to Whiskey Cove PMIC GPIO controller specification, for GPIO pins 0-12, GPIO input and output register control address range from, 0x4e44-0x4e50 for GPIO outputs control register 0x4e51-0x4e5d for GPIO input control register But, currently when calculating the GPIO register offsets in to_reg() function, all GPIO pins in the same bank uses the same GPIO control register address. This logic is incorrect. This patch fixes this issue. This patch also adds support to selectively skip register modification for virtual GPIOs. In case of Whiskey Cove PMIC, ACPI code may use up 94 virtual GPIOs. These virtual GPIOs are used by the ACPI code as means to access various non GPIO bits of PMIC. So for these virtual GPIOs, we don't need to manipulate the physical GPIO pin register. A similar patch has been merged recently by Hans for Crystal Cove PMIC GPIO driver. You can find more details about it in Commit 9a752b4c9ab9 ("gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs") Signed-off-by: Kuppuswamy Sathyanarayanan Reported-by: Jukka Laitinen Signed-off-by: Linus Walleij drivers/gpio/gpio-wcove.c | 75 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 24 deletions(-) commit f0cda7e6dc5893b4b4daa3440512fc1226bc983f Author: Luc Van Oostenryck Date: Wed Jun 28 16:58:07 2017 +0200 arm64: fix endianness annotation in acpi_parking_protocol.c Here both variables 'cpu_id' and 'entry_point' are read via read[lq]_relaxed(), from a little-endian annotated pointer and then used as a native endian value. This is correct since the read[lq]() family of function internally do a little-to-native endian conversion. But in this case, it is wrong to declare these variable as little-endian since there are native ones. Fix this by changing the declaration of these variables as 'u32' or 'u64' instead of '__le32' / '__le64'. Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/kernel/acpi_parking_protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0d109de4c0ca365a2bd180e2e65501196fa8ef4 Author: Luc Van Oostenryck Date: Mon Jun 26 15:16:25 2017 +0200 arm64: use readq() instead of readl() to read 64bit entry_point Here the entrypoint, declared as a 64 bit integer, is read from a pointer to 64bit integer but the read is done via readl_relaxed() which is for 32bit quantities. All the high bits will thus be lost which change the meaning of the test against zero done later. Fix this by using readq_relaxed() instead as it should be for 64bit quantities. Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/kernel/acpi_parking_protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6835942a7414ef4fd07b59851ad1fca7560dec1 Author: Johannes Berg Date: Mon Jun 12 11:24:06 2017 +0200 iwlwifi: mvm: quietly accept non-sta assoc response frames When hostapd adds a station, it does so before sending the association response frame, so that it can indicate the correct status code in the response. However, when this then fails, or the association response already is a reject for some other reason, then there's no station entry and thus no per-station management queue to send the response on and it must be sent on the probe response queue. The code should therefore not warn. In theory, we could check and warn if the status code is success, but that seems excessive, so just relax the check to allow any association response frames. Fixes: 3ee0f0e23e4f ("iwlwifi: mvm: fix DQA AP mode station assumption") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 4f2210ee8498faa3499a927f0a40027ff972ec3a Author: Johannes Berg Date: Thu Jun 1 11:37:25 2017 +0200 iwlwifi: mvm: remove version 2 of paging command Only a000-series devices were going to use this, but actually initialize using the context info, which includes paging, so this code is never invoked; remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 25 ++-------------- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 39 ++++++++----------------- 2 files changed, 15 insertions(+), 49 deletions(-) commit 650aaed3b30158f74c1f051a653da4f6eb3db205 Author: Johannes Berg Date: Thu Jun 1 10:38:04 2017 +0200 iwlwifi: move configuration into sub-directory Since we now support 8 device families, move their configuration files into a new subdirectory "cfg". Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/Makefile | 4 +- drivers/net/wireless/intel/iwlwifi/cfg/1000.c | 134 +++++++++ drivers/net/wireless/intel/iwlwifi/cfg/2000.c | 204 ++++++++++++++ drivers/net/wireless/intel/iwlwifi/cfg/5000.c | 171 ++++++++++++ drivers/net/wireless/intel/iwlwifi/cfg/6000.c | 374 +++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/cfg/7000.c | 384 ++++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/cfg/8000.c | 280 +++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 214 ++++++++++++++ drivers/net/wireless/intel/iwlwifi/cfg/a000.c | 172 ++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-1000.c | 134 --------- drivers/net/wireless/intel/iwlwifi/iwl-2000.c | 204 -------------- drivers/net/wireless/intel/iwlwifi/iwl-5000.c | 171 ------------ drivers/net/wireless/intel/iwlwifi/iwl-6000.c | 374 ------------------------- drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 384 -------------------------- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 280 ------------------- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 214 -------------- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 172 ------------ 17 files changed, 1935 insertions(+), 1935 deletions(-) commit 9fca9d5c9745a18f65a380dfc61cd07ee874c7e0 Author: Johannes Berg Date: Thu Jun 1 10:32:17 2017 +0200 iwlwifi: move notification wait into fw/ Move the notification wait code into the new fw interaction directory. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/Makefile | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/dev.h | 2 +- drivers/net/wireless/intel/iwlwifi/fw/notif-wait.c | 195 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/notif-wait.h | 154 ++++++++++++++++ .../net/wireless/intel/iwlwifi/iwl-notif-wait.c | 195 --------------------- .../net/wireless/intel/iwlwifi/iwl-notif-wait.h | 154 ---------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/time-event.c | 2 +- 9 files changed, 354 insertions(+), 354 deletions(-) commit d962f9b1013b3209813b7b8038c2b9123a9626c4 Author: Johannes Berg Date: Thu Jun 1 10:22:09 2017 +0200 iwlwifi: create new subdirectory for FW interaction There's a lot of mvm code that really should be more generic and part of the iwlwifi module. Start by making a place to keep such code - in the new "fw" subdirectory - and already move the firmware related header files there. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/dev.h | 2 +- drivers/net/wireless/intel/iwlwifi/fw/api.h | 229 ++++++ drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | 335 ++++++++ drivers/net/wireless/intel/iwlwifi/fw/file.h | 870 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/img.h | 342 ++++++++ drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-fw-api.h | 229 ------ .../net/wireless/intel/iwlwifi/iwl-fw-error-dump.h | 335 -------- drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 870 --------------------- drivers/net/wireless/intel/iwlwifi/iwl-fw.h | 342 -------- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.h | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 18 files changed, 1788 insertions(+), 1788 deletions(-) commit b4f489857aba0e066847dfd01b980578bbf921c9 Author: Johannes Berg Date: Thu Jun 1 09:06:11 2017 +0200 iwlwifi: mvm: rename iwl_shared_mem_cfg_v1 to the correct _v2 This structure represents V2, V1 has the three last fields missing. Rename it to be more accurate. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 6 +++--- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 92c4dca6f5fd3d29d8c1daf02e210dd48dc756ac Author: Johannes Berg Date: Wed Jun 7 10:35:54 2017 +0200 iwlwifi: mvm: fix deduplication start logic If the first frame on a given TID is received with seqno 0 and needed to be retransmitted, we erroneously drop it because the deduplication data is initialized to zero, and then comparing if (unlikely(ieee80211_has_retry(hdr->frame_control) && dup_data->last_seq[tid] == hdr->seq_ctrl && dup_data->last_sub_frame[tid] >= sub_frame_idx)) return true; will return in iwl_mvm_is_dup() since last_sub_frame is also set to zero, and sub_frame_idx is usually zero since this only covers the relatively rare case of A-MSDU. Fix this by initializing the last_seq array to 0xffff, which is an impossible value for hdr->seq_ctrl to have here because the lower four bits are the fragment number, and fragments aren't handled in this code but go to mac80211 instead. Fixes: a571f5f635ef ("iwlwifi: mvm: add duplicate packet detection per rx queue") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit b092c9f25d45972cf401ad8bcfee2429bf189e2b Author: Johannes Berg Date: Wed May 31 14:14:51 2017 +0200 iwlwifi: mvm: unconditionally stop device after init In commit b93b1fe3b532 ("iwlwifi: mvm: fix init_dbg flow to work as expected"), the code was changed to make the stop conditional on not having failed (and on not having init_dbg), which doesn't make sense - we should stop the device regardless of failures. Failure to do so is leading to the device being enabled when it shouldn't be, and - if it gets re-enabled later - the new context info code gets confused as paging data wasn't freed. Remove the invalid error condition again. Fixes: b93b1fe3b532 ("iwlwifi: mvm: fix init_dbg flow to work as expected") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0fea2b728af737ec45d96a0279087a558ad9774 Author: Johannes Berg Date: Wed May 31 13:19:10 2017 +0200 iwlwifi: pcie: warn if paging is already initialized during init This appears to happen in some cases, like when iwlmvm is unloaded and loaded again without also unloading iwlwifi. Warn in this case and free the paging data to be able to continue without causing corruption and kernel crashes due to it (otherwise, paging data is overwritten, but dram->paging_cnt gets to be twice as big as it should be, and then an eventual free will crash.) Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 5 +++++ 1 file changed, 5 insertions(+) commit 87fc030231b11a190f16d7162a141e2f162eae36 Author: Johannes Berg Date: Wed May 31 13:15:18 2017 +0200 iwlwifi: pcie: make ctxt-info free idempotent By setting the pointers to NULL at the end, these functions are made idempotent. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 2 ++ 1 file changed, 2 insertions(+) commit 3b37f4c99c93abf2cdde751a536190bde5a1283a Author: Johannes Berg Date: Tue May 30 16:45:31 2017 +0200 iwlwifi: unify external & internal modparam names Where possible (all except for "11n_disable", which isn't valid in C) rename the internal names for module parameters to be the same as the externally visible names, to aid finding their use etc. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c | 6 +++--- drivers/net/wireless/intel/iwlwifi/dvm/lib.c | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 8 ++++---- drivers/net/wireless/intel/iwlwifi/dvm/main.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/dvm/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/rxon.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 12 ++++++------ drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | 16 ++++++++-------- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 8 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 +++--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 8 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 +- 15 files changed, 43 insertions(+), 43 deletions(-) commit cba46988c0813cd9e74d6625af32f7043780dac3 Author: Liad Kaufman Date: Thu Apr 13 17:10:33 2017 +0300 iwlwifi: mvm: support multi tid ba notif When receiving a BA_NOTIF on new TX API, it can contain BAs for several TIDs. Go over them and reclaim TX for every TID. Note that although the small API change, the API version still isn't bumped forward, as this NIC isn't still officially released. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 4 +++- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 28 ++++++++++------------ 2 files changed, 15 insertions(+), 17 deletions(-) commit b3de3ef48aa3fe066150243f07d1cc4e6fac2c80 Author: Emmanuel Grumbach Date: Mon May 29 14:01:06 2017 +0300 iwlwifi: mvm: change when the BT_COEX is sent The BT_COEX command should not be sent to the INIT firmware image starting from 8000 family. The firmware team also requested to send the BT_COEX command after the PHY_DB_CMD and the PHY_CFG_CMD. While at it: s/iwl_send_bt_init_conf/iwl_mvm_send_bt_init_conf/ Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/coex.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 16 +++++++++------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) commit 3bfdee768c09bac3ee3e4b3a6d3b75cdc19e489c Author: Johannes Berg Date: Mon May 29 12:15:45 2017 +0200 iwlwifi: pcie: improve debug in iwl_pcie_rx_handle_rb() Print the queue for the existing debug message and add a new debug message indicating where the RB ended. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit a58bb46855a019a204858cefd3e7d56f87f842f4 Author: Liad Kaufman Date: Sun May 28 14:20:04 2017 +0300 iwlwifi: mvm: support aggs of 64 frames in A000 family A SCD bug was fixed in the A000 family, allowing to support aggregations of 64 frames (rather than 63). Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 6 +++++- drivers/net/wireless/intel/iwlwifi/mvm/rs.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 11 +++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) commit a395058eb61c888ac5624cccb40eaedf77c01472 Author: Johannes Berg Date: Fri May 26 11:16:39 2017 +0200 iwlwifi: pcie: improve "invalid queue" warning Print out both queue IDs to be able to see what went wrong. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 91109f42d0ad0c0c282d1fa1257a1548977aa895 Author: Johannes Berg Date: Fri May 26 13:11:44 2017 +0200 iwlwifi: mvm: use proper CDB check in PHY context modify When the firmware supports CDB, PHY contexts cannot be modified to change their band, but need to be added/remove instead. Instead of relying on iwl_mvm_has_new_tx_api(), check the right FW capa flag IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT and remove the comment. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4e37b063ad9f902052903c579b6f291ba329104e Author: Tzipi Peres Date: Mon May 22 16:16:52 2017 +0300 iwlwifi: add twelve new 9560 series PCI IDs Add twelve new PCI IDs for the 9560 series. Signed-off-by: Tzipi Peres Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 175b87c692532ece6c4622628c8c9df726773236 Author: Tzipi Peres Date: Mon May 22 12:36:28 2017 +0300 iwlwifi: add the new a000_2ax series Add a new config struct for the new a000 2ax series and add the five PCI ID for it. Signed-off-by: Tzipi Peres Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 10 ++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 5 +++++ 3 files changed, 16 insertions(+) commit 4c324a51b62079a43a4aa5024785ba542ff83ce3 Author: Luca Coelho Date: Fri May 19 15:06:29 2017 +0300 iwlwifi: mvm: simplify CHECK_MLME_TRIGGER macro There's no reason to pass mvm and trig as parameters to the macro, since it will be expanded inside the function itself. Also remove the bogus buf parameter which doesn't exist and is not used. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 24 +++++++++-------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 806911da64404a6a6348c4840a47218c3bb64a3c Author: Sharon Dvir Date: Sun May 21 12:09:49 2017 +0300 iwlwifi: mvm: change sta_id to u8 The sta_id variable is used as an index in an array, should be unsigned. Found by Klocwork. Fixes: 9f9af3d7d303 ("iwlwifi: mvm: re-aggregate shared queue after unsharing") Signed-off-by: Sharon Dvir Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae5bb2a62d96e52b138628e0cda4ebb377cbc456 Author: Johannes Berg Date: Thu May 18 17:02:05 2017 +0200 iwlwifi: pcie: fix 9000-series RF-kill interrupt propagation A hardware issue on 9000 series devices sometimes causes RF-kill interrupts to not be propagated to the host properly if ASPM is enabled. Work around this by setting the right hardware bit to allow it to interrupt the host for this reason (rfkill). Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 565291c60a3592bd1b6683d2c848dd165a6a3e76 Author: Johannes Berg Date: Wed May 10 11:31:06 2017 +0200 iwlwifi: pcie: only apply retention workaround on 9000-series A-step Due to a hardware issue, certain power saving had to be disabled. However, this issue was fixed in B-step, so the workaround only needs to apply to A-step. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 779e0513c76e21b62e2ef907f8cfc48f9f41f734 Author: Johannes Berg Date: Wed May 17 13:45:29 2017 +0200 iwlwifi: dvm: use macros for format strings Some static checkers (e.g. smatch) complain if a non-constant format string is used, even if that's a static const variable. Since there's no impact on code generation, just change those format strings to be macros. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit acf91dda3f64bedb4abc46d87b35d41c36a4a28d Author: Johannes Berg Date: Tue May 16 16:15:42 2017 +0200 iwlwifi: mvm: fix a bunch of kernel-doc warnings Fix the kernel-doc, and remove some fields even the firmware doesn't use in ToF, RX, scan, station and generic FW APIS. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-coex.h | 11 ++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-d3.h | 5 ++ .../net/wireless/intel/iwlwifi/mvm/fw-api-mac.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rs.h | 3 ++ drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rx.h | 33 ++++++------ .../net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 28 ++++++---- .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 63 ++++++++++++++++------ .../net/wireless/intel/iwlwifi/mvm/fw-api-tof.h | 14 +++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 26 ++++++--- 9 files changed, 127 insertions(+), 58 deletions(-) commit 358631bf444547d476476cb90c8fc78962a81884 Author: Johannes Berg Date: Tue May 16 15:14:19 2017 +0200 iwlwifi: mvm: add documentation for all command IDs Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-api.h | 24 ++ drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c | 18 -- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 276 ++++++++++++++++++++- 4 files changed, 292 insertions(+), 27 deletions(-) commit cecb43c7b5e68924a57e09bba9290907defc2308 Author: Johannes Berg Date: Tue May 16 15:12:14 2017 +0200 iwlwifi: mvm: use __le16 even for reserved fields Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40e07545d1bb9be2c37140a4d40df1339a4ed51d Author: Johannes Berg Date: Tue May 16 14:33:41 2017 +0200 iwlwifi: mvm: remove various unused command IDs/structs Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 28 ------------------------- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 11 ---------- 2 files changed, 39 deletions(-) commit 83b0319abc5c8bfb16c5fe3063a04de1402f9b21 Author: Johannes Berg Date: Tue May 16 13:28:53 2017 +0200 iwlwifi: mvm: fix various "Excess ... description" kernel-doc warnings Fix various "Excess struct/union/enum/typedef member '...' description in '...'" warnings from kernel-doc, mostly caused by typos. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-d3.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-mac.h | 3 +-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rx.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 8 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 5 ++--- 6 files changed, 10 insertions(+), 13 deletions(-) commit 1644be9189c962cfd064d6b21af16f26f219a146 Author: Johannes Berg Date: Tue May 16 13:21:52 2017 +0200 iwlwifi: mvm: remove some CamelCase from firmware API Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-d3.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit e6ee06575bb71ae96d936b2279fc827b82f98353 Author: Haim Dreyfuss Date: Mon May 15 14:27:21 2017 +0300 iwlwifi: mvm: Add debugfs entry to retrieve SAR geographic profile Add a debugfs entry to get a verbose description of the power settings used in each band with the currently selected SAR geographic profile. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 7fe90e0e3d603844657e8361aa4686c6ee4a8c9d Author: Haim Dreyfuss Date: Thu Mar 30 11:16:17 2017 +0300 iwlwifi: mvm: refactor geo init We are going to add debugfs entry to retrieve the current geographic profile being used in the FW. Currently the driver reads those tables from the BIOS and passes them to the FW. To prepare for this retrieving we want to store those tables in the driver. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-power.h | 9 +++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 64 ++++++++++++++++------ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 12 +++- 3 files changed, 67 insertions(+), 18 deletions(-) commit 02129ae5fea83294b45c8f16c4ff14ae94e6858d Author: Luc Van Oostenryck Date: Wed Jun 28 16:56:00 2017 +0200 arm64: fix endianness annotation for reloc_insn_movw() & reloc_insn_imm() Here the functions reloc_insn_movw() & reloc_insn_imm() are used to read, modify and write back ARM instructions, which are always stored in memory in little-endian order. These values are thus correctly converted to/from native order but the pointers used to hold their addresses are declared as for native order values. Fix this by declaring the pointers as __le32* and remove the casts that are now unneeded. Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/kernel/module.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 57c138357d5922878b3bc5207bd59b8512ee80e6 Author: Luc Van Oostenryck Date: Wed Jun 28 16:58:11 2017 +0200 arm64: fix endianness annotation for aarch64_insn_write() aarch64_insn_write() is used to write an instruction. As on ARM64 in-memory instructions are always stored in little-endian order, this function, taking the instruction opcode in native order, correctly convert it to little-endian before sending it to an helper function __aarch64_insn_write() which will do the effective write. This is all good, but the variable and argument holding the converted value are not annotated for a little-endian value but left for native values. Fix this by adjusting the prototype of the helper and directly using the result of cpu_to_le32() without passing by an intermediate variable (which was not a distinct one but the same as the one holding the native value). Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/kernel/insn.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 65de142143206c7ffd98b0fcb062a79b3c6f1934 Author: Luc Van Oostenryck Date: Wed Jun 28 16:58:09 2017 +0200 arm64: fix endianness annotation in aarch64_insn_read() The function arch64_insn_read() is used to read an instruction. On AM64 instructions are always stored in little-endian order and thus the function correctly do a little-to-native endian conversion to the value just read. However, the variable used to hold the value before the conversion is not declared for a little-endian value but for a native one. Fix this by using the correct type for the declaration: __le32 Note: This only works because the function reading the value, probe_kernel_read((), takes a void pointer and void pointers are endian-agnostic. Otherwise probe_kernel_read() should also be properly annotated (or worse, need to be specialized). Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/kernel/insn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cf5d4af83e04f4cfae91bfdefd9d4d6949c09b2 Author: Luc Van Oostenryck Date: Wed Jun 28 16:55:55 2017 +0200 arm64: fix endianness annotation in call_undef_hook() Here we're reading thumb or ARM instructions, which are always stored in memory in little-endian order. These values are thus correctly converted to native order but the intermediate value should be annotated as for little-endian values. Fix this by declaring the intermediate var as __le32 or __le16. Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a5018b0e6f036a598e55371e9135e287dc3b25e5 Author: Luc Van Oostenryck Date: Wed Jun 28 16:55:52 2017 +0200 arm64: fix endianness annotation for debug-monitors.c Here we're reading thumb or ARM instructions, which are always stored in memory in little-endian order. These values are thus correctly converted to native order but the intermediate value should be annotated as for little-endian values. Fix this by declaring the intermediate var as __le32 or __le16. Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/kernel/debug-monitors.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 0607512d0a8d7fac86667466b884095e04b10a59 Author: Arnd Bergmann Date: Tue Jun 27 17:35:41 2017 +0200 ras: mark stub functions as 'inline' With CONFIG_RAS disabled, we get two harmless warnings about unused functions: include/linux/ras.h:37:13: error: 'log_arm_hw_error' defined but not used [-Werror=unused-function] static void log_arm_hw_error(struct cper_sec_proc_arm *err) { return; } include/linux/ras.h:33:13: error: 'log_non_standard_event' defined but not used [-Werror=unused-function] static void log_non_standard_event(const guid_t *sec_type, Clearly these are meant to be 'inline', like the other stubs in the same header. Fixes: 297b64c74385 ("ras: acpi / apei: generate trace event for unrecognized CPER section") Fixes: e9279e83ad1f ("trace, ras: add ARM processor error trace event") Acked-by: Borislav Petkov Signed-off-by: Arnd Bergmann Signed-off-by: Will Deacon include/linux/ras.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 8137f78a7fedeef1ffc0ac36e0ad68960eaf5010 Author: Gregory CLEMENT Date: Fri Jun 23 14:29:52 2017 +0200 pinctrl: armada-37xx: Fix number of pin in sdio_sb The sdio_sb group is composed of 6 pins and not 5. Reported-by: Ken Ma Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce8a4a38bb01ec9cef36718020d6159c48b6864b Author: Ken Ma Date: Fri Jun 23 14:29:51 2017 +0200 pinctrl: armada-37xx: Fix uart2 group selection register mask If north bridge selection register bit1 is clear, pins [10:8] are for SDIO0 Resetn, Wakeup, and PDN while if bit1 is set, pins [10:8]are for GPIO; when bit1 is clear, pin 9 and pin 10 can be used for uart2 RTSn and CTSn, so bit1 should be added to uart2 group and it must be set for both "gpio" and "uart" functions of uart2 group. Signed-off-by: Ken Ma Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 37a2f8e5522abd8e206a0da1622034382aa6683d Author: Stefan Wahren Date: Wed Jun 21 20:20:04 2017 +0200 pinctrl: bcm2835: Avoid warning from __irq_do_set_handler We get a warning during boot with enabled EARLY_PRINTK that we try to set a irq_chip without data. This is caused by ignoring the return value of irq_of_parse_and_map(). So avoid calling gpiochip_set_chained_irqchip() in error case. Signed-off-by: Stefan Wahren Fixes: 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP") Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 ++++ 1 file changed, 4 insertions(+) commit 164c29244d4beb9a105102c42821f4925e4a0c7a Author: Tony Luck Date: Wed Jun 28 16:44:07 2017 -0700 EDAC, pnd2: Fix Apollo Lake DIMM detection Non-existent or empty DIMM slots result in error return from RD_REGP(). But we shouldn't give up on failure. So long as we find at least one DIMM we can continue. Signed-off-by: Tony Luck Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20170628234407.21521-1-tony.luck@intel.com Signed-off-by: Borislav Petkov drivers/edac/pnd2_edac.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit a8c8261425649da58bdf08221570e5335ad33a31 Author: Jérémy Lefaure Date: Wed Jun 28 20:57:29 2017 -0400 EDAC, i5000, i5400: Fix definition of NRECMEMB register In the i5000 and i5400 drivers, the NRECMEMB register is defined as a 16-bit value, which results in wrong shifts in the code, as reported by sparse. In the datasheets ([1], section 3.9.22.20 and [2], section 3.9.22.21), this register is a 32-bit register. A u32 value for the register fixes the wrong shifts warnings and matches the datasheet. Also fix the mask to access to the CAS bits [27:16] in the i5000 driver. [1]: https://www.intel.com/content/dam/doc/datasheet/5000p-5000v-5000z-chipset-memory-controller-hub-datasheet.pdf [2]: https://www.intel.se/content/dam/doc/datasheet/5400-chipset-memory-controller-hub-datasheet.pdf Signed-off-by: Jérémy Lefaure Cc: linux-edac Link: http://lkml.kernel.org/r/20170629005729.8478-1-jeremy.lefaure@lse.epita.fr Signed-off-by: Borislav Petkov drivers/edac/i5000_edac.c | 6 +++--- drivers/edac/i5400_edac.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit ff801b716effd652f420204eddb36f6e4a716819 Author: Thomas Gleixner Date: Thu Jun 29 08:25:52 2017 +0200 sched/numa: Hide numa_wake_affine() from UP build Stephen reported the following build warning in UP: kernel/sched/fair.c:2657:9: warning: 'struct sched_domain' declared inside parameter list ^ /home/sfr/next/next/kernel/sched/fair.c:2657:9: warning: its scope is only this definition or declaration, which is probably not what you want Hide the numa_wake_affine() inline stub on UP builds to get rid of it. Fixes: 3fed382b46ba ("sched/numa: Implement NUMA node level wake_affine()") Reported-by: Stephen Rothwell Signed-off-by: Thomas Gleixner Cc: Rik van Riel Cc: Peter Zijlstra kernel/sched/fair.c | 2 ++ 1 file changed, 2 insertions(+) commit f4ce85281139214cd50900d0ff38b7d97766318f Author: Bjorn Andersson Date: Wed Jun 28 14:53:23 2017 -0700 rpmsg: Make modalias work for DeviceTree based devices When rpmsg devices are expected to be matched based on their compatible the modalias should reflect this, so that module autoloading has a chance to match and load the appropriate module. Tested-by: Rob Clark Reported-by: Rob Clark Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5f54d3e869812ef288c63dff67848a7520979953 Author: Arvind Yadav Date: Tue Jun 27 17:38:27 2017 +0530 dmaengine: fsl_raid: make of_device_ids const. of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 3981 608 0 4589 11ed drivers/dma/fsl_raid.o File size after constify: text data bss dec hex filename 4381 192 0 4573 11dd drivers/dma/fsl_raid.o Signed-off-by: Arvind Yadav Signed-off-by: Vinod Koul drivers/dma/fsl_raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cd82b757795228516bf60a0552d1a40fa8adeb2 Author: Changbin Du Date: Tue Jun 13 10:15:26 2017 +0800 drm/i915/gvt: Make function dpy_reg_mmio_readx safe The dpy_reg_mmio_read_x functions directly copy 4 bytes data to the target address with considering the length. If may cause the target memory corrupted if the requested length less than 4 bytes. Fix it for safety even we already have some checking to avoid this happen. And for convince, the 3 functions are merged. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 4ca0e75e46b6ee408bdc334fff449323d476812c Author: Srinivas Pandruvada Date: Tue Jun 6 16:00:41 2017 -0700 thermal: int340x: check for sensor when PTYP is missing For INT3403 sensor PTYP field is mandatory. But some platforms didn't have this field for sensors. This cause load failure for int3403 driver. This change checks for the presence of _TMP method and if present, then treats this device as a sensor. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/int340x_thermal/int3403_thermal.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 86326031e3d4dec828d966c19fe9fe1371d0a0a8 Author: Sumeet Pawnikar Date: Tue May 30 23:14:58 2017 +0530 Thermal/int340x: Fix few typos and kernel-doc style This patch fix the few typos in function header of acpi_parse_trt. Also, fix the typo in kernel debug message for acpi_parse_art. Signed-off-by: Sumeet Pawnikar Signed-off-by: Zhang Rui drivers/thermal/int340x_thermal/acpi_thermal_rel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d76d6e1eede5f2aa13695cb4c9d763bb3555e3e Author: Willy WOLFF Date: Sat Jun 24 14:06:03 2017 +0100 thermal: fix source code documentation for parameters Some parameters are not documented, or not present at all, in thermal governors code. Signed-off-by: Willy Wolff Signed-off-by: Zhang Rui drivers/thermal/fair_share.c | 1 + drivers/thermal/step_wise.c | 3 +-- drivers/thermal/user_space.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) commit 1e7a75f74a193f92eb9e5da20d1fb1b388241631 Author: Arvind Yadav Date: Fri Jun 23 10:43:30 2017 +0530 char: ipmi: constify bmc_dev_attr_group and bmc_device_type File size before: text data bss dec hex filename 25678 1024 92 26794 68aa drivers/char/ipmi/ipmi_msghandler.o File size After adding 'const': text data bss dec hex filename 25806 896 92 26794 68aa drivers/char/ipmi/ipmi_msghandler.o Signed-off-by: Arvind Yadav Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bdb94f6e824d5bd1577c3f80cbe0c6b4beab5a5c Author: Aleksandar Markovic Date: Wed Jun 28 17:55:31 2017 +0200 MIPS: VDSO: Fix a mismatch between comment and preprocessor constant Sync the comment with its preprocessor constant counterpart. Signed-off-by: Aleksandar Markovic Cc: James Hogan Cc: Miodrag Dinic Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16641/ Signed-off-by: Ralf Baechle arch/mips/vdso/gettimeofday.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b523a85e134d41f57ddd8c5193bd9f0a5e20b0d Author: Goran Ferenc Date: Wed Jun 28 17:55:30 2017 +0200 MIPS: VDSO: Add implementation of gettimeofday() fallback This patch adds gettimeofday_fallback() function that wraps assembly invocation of gettimeofday() syscall using __NR_gettimeofday. This function is used if pure VDSO implementation gettimeofday() does not succeed for any reason. Its imeplementation is enclosed in "#ifdef CONFIG_MIPS_CLOCK_VSYSCALL" to be in sync with the similar arrangement for __vdso_gettimeofday(). If syscall invocation via __NR_gettimeofday fails, register a3 will be set. So, after the syscall, register a3 is tested and the return valuem is negated if it's set. Signed-off-by: Goran Ferenc Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: James Hogan Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16640/ Signed-off-by: Ralf Baechle arch/mips/vdso/gettimeofday.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 180902e08f051f72c89ffa366f4e4f7a8e9c753e Author: Goran Ferenc Date: Wed Jun 28 17:55:29 2017 +0200 MIPS: VDSO: Add implementation of clock_gettime() fallback This patch adds clock_gettime_fallback() function that wraps assembly invocation of clock_gettime() syscall using __NR_clock_gettime. This function is used if pure VDSO implementation of clock_gettime() does not succeed for any reason. For example, it is called if the clkid parameter of clock_gettime() is not one of the clkids listed in the switch-case block of the function __vdso_clock_gettime() (one such case for clkid is CLOCK_BOOTIME). If syscall invocation via __NR_clock_gettime fails, register a3 will be set. So, after the syscall, register a3 is tested and the return value is negated if it's set. Signed-off-by: Goran Ferenc Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: James Hogan Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16639/ Signed-off-by: Ralf Baechle arch/mips/vdso/gettimeofday.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 8ec7f15b8cca4f790df5cdf33f26e2926d4ee2fd Author: Goran Ferenc Date: Wed Jun 28 17:55:28 2017 +0200 MIPS: VDSO: Fix conversions in do_monotonic()/do_monotonic_coarse() Fix incorrect calculation in do_monotonic() and do_monotonic_coarse() function that in turn caused incorrect values returned by the vdso version of system call clock_gettime() on mips64 if its system clock ID parameter was CLOCK_MONOTONIC or CLOCK_MONOTONIC_COARSE. Consider these variables and their types on mips32 and mips64: tk->wall_to_monotonic.tv_sec s64, s64 (kernel/vdso.c) vdso_data.wall_to_mono_sec u32, u32 (kernel/vdso.c) to_mono_sec u32, u32 (vdso/gettimeofday.c) ts->tv_sec s32, s64 (vdso/gettimeofday.c) For mips64 case, u32 vdso_data.wall_to_mono_sec variable is updated from the 64-bit signed variable tk->wall_to_monotonic.tv_sec (kernel/vdso.c:76) which is a negative number holding the time passed from 1970-01-01 to the time boot started. This 64-bit signed value is currently around 47+ years, in seconds. For instance, let this value be: -1489757461 or 11111111111111111111111111111111 10100111001101000001101011101011 By updating 32-bit vdso_data.wall_to_mono_sec variable, we lose upper 32 bits (signed 1's). to_mono_sec variable is a parameter of do_monotonic() and do_monotonic_coarse() functions which holds vdso_data.wall_to_mono_sec value. Its value needs to be added (or subtracted considering it holds negative value from the tk->wall_to_monotonic.tv_sec) to the current time passed from 1970-01-01 (ts->tv_sec), which is again something like 47+ years, but increased by the time passed from the boot to the current time. ts->tv_sec is 32-bit long in case of 32-bit architecture and 64-bit long in case of 64-bit architecture. Consider the update of ts->tv_sec (vdso/gettimeofday.c:55 & 167): ts->tv_sec += to_mono_sec; mips32 case: This update will be performed correctly, since both ts->tv_sec and to_mono_sec are 32-bit long and the sign in to_mono_sec is preserved. Implicit conversion from u32 to s32 will be done correctly. mips64 case: This update will be wrong, since the implicit conversion will not be done correctly. The reason is that the conversion will be from u32 to s64. This is because to_mono_sec is 32-bit long for both mips32 and mips64 cases and s64..33 bits of converted to_mono_sec variable will be zeros. So, in order to make MIPS64 implementation work properly for MONOTONIC and MONOTONIC_COARSE clock ids on mips64, the size of wall_to_mono_sec variable in mips_vdso_data union and respective parameters in do_monotonic() and do_monotonic_coarse() functions should be changed from u32 to u64. Because of consistency, this size change from u32 and u64 is also done for wall_to_mono_nsec variable and corresponding function parameters. As far as similar situations for other architectures are concerned, let's take a look at arm. Arm has two distinct vdso_data structures for 32-bit & 64-bit cases, and arm's wall_to_mono_sec and wall_to_mono_nsec are u32 for 32-bit and u64 for 64-bit cases. On the other hand, MIPS has only one structure (mips_vdso_data), hence the need for changing the size of above mentioned parameters. Signed-off-by: Goran Ferenc Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: James Hogan Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16638/ Signed-off-by: Ralf Baechle arch/mips/include/asm/vdso.h | 4 ++-- arch/mips/vdso/gettimeofday.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 5f930860e70a4761f026d3e3a9f7787eac3c4f60 Author: Paul Burton Date: Fri Jun 2 15:38:04 2017 -0700 MIPS: Use current_cpu_type() in m4kc_tlbp_war() Use current_cpu_type() to check for 4Kc processors instead of checking the PRID directly. This will allow for the 4Kc case to be optimised out of kernels that can't run on 4KC processors, thanks to __get_cpu_type() and its unreachable() call. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16205/ Signed-off-by: Ralf Baechle arch/mips/mm/tlbex.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cebf8c0f4f4e378f5e82606023b92ffbb1ad6048 Author: Paul Burton Date: Fri Jun 2 15:38:03 2017 -0700 MIPS: Allow storing pgd in C0_CONTEXT for MIPSr6 CONFIG_MIPS_PGD_C0_CONTEXT, which allows a pointer to the page directory to be stored in the cop0 Context register when enabled, was previously only allowed for MIPSr2. MIPSr6 is just as able to make use of it, so allow it there too. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16204/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f39878cc5b09c75d35eaf52131e920b872e3feb4 Author: Paul Burton Date: Fri Jun 2 15:38:02 2017 -0700 MIPS: Handle tlbex-tlbp race condition In systems where there are multiple actors updating the TLB, the potential exists for a race condition wherein a CPU hits a TLB exception but by the time it reaches a TLBP instruction the affected TLB entry may have been replaced. This can happen if, for example, a CPU shares the TLB between hardware threads (VPs) within a core and one of them replaces the entry that another has just taken a TLB exception for. We handle this race in the case of the Hardware Table Walker (HTW) being the other actor already, but didn't take into account the potential for multiple threads racing. Include the code for aborting TLB exception handling in affected multi-threaded systems, those being the I6400 & I6500 CPUs which share TLB entries between VPs. In the case of using RiXi without dedicated exceptions we have never handled this race even for HTW. This patch adds WARN()s to these cases which ought never to be hit because all CPUs with either HTW or shared FTLB RAMs also include dedicated RiXi exceptions, but the WARN()s will ensure this is always the case. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16203/ Signed-off-by: Ralf Baechle arch/mips/mm/tlbex.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit e7bc8557428f069eaa613b3676ea6931c0f7fe43 Author: Paul Burton Date: Fri Jun 2 15:38:01 2017 -0700 MIPS: Add CPU shared FTLB feature detection Some systems share FTLB RAMs or entries between sibling CPUs (ie. hardware threads, or VP(E)s, within a core). These properties require kernel handling in various places. As a start this patch introduces cpu_has_shared_ftlb_ram & cpu_has_shared_ftlb_entries feature macros which we set appropriately for I6400 & I6500 CPUs. Further patches will make use of these macros as appropriate. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16202/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-features.h | 41 ++++++++++++++++++++++++++++++++++++ arch/mips/include/asm/cpu.h | 4 ++++ arch/mips/kernel/cpu-probe.c | 11 ++++++++++ 3 files changed, 56 insertions(+) commit fa7a3b4a7217b40bf58c4f38e5ee573b43a8aa2f Author: Paul Burton Date: Fri Jun 2 14:48:55 2017 -0700 MIPS: CPS: Handle spurious VP starts more gracefully On pre-r6 systems with the MT ASE the CPS SMP code included checks to halt the VPE running mips_cps_boot_vpes() if its bit in the struct core_boot_config vpe_mask field is clear. This was largely done in order to allow us to start arbitrary VPEs within a core despite the fact that hardware is typically configured to run only VPE0 after powering up a core. VPE0 would start the desired other VPEs, halt itself, and the fact that VPE0 started would be largely hidden & irrelevant. In MIPSr6 multithreading we have control over which VPs start executing when a core powers up via the cores CPC registers accessed remotely through the redirect block. For this reason the MIPSr6 multithreading path in mips_cps_boot_vpes() hasn't bothered up until now to handle halting the VP running it. However it is possible to power up cores entirely in hardware by using a pwr_up pin associated with the core. Unfortunately some systems wire this pin to a logic 1, which means that it is possible for a core to power up at a point that software doesn't expect. The result is that we generally go execute the kernel on a CPU that ought not to be running & the results can be unpredictable. Handle this case by stopping VPs that we don't expect to be running in mips_cps_boot_vpes() - with this change even if a core powers up it will do nothing useful & all VPs within it will stop running before they proceed to run general kernel code & do any damage. Ideally we would produce some sort of warning here, but given the stage of core bringup this happens at that would be non-trivial. We also will only hit this if a core starts up after being offlined via hotplug, and when that happens we will already produce a warning that the CPU didn't power down in cps_cpu_die() which seems sufficient. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16198/ Signed-off-by: Ralf Baechle arch/mips/kernel/cps-vec.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4ad755c9e39c0eeae16f96b97602f1954f582c66 Author: Paul Burton Date: Fri Jun 2 14:48:54 2017 -0700 MIPS: CPS: Handle cores not powering down more gracefully If we get into a state where a core that ought to power down isn't doing so then the current result is that another CPU gets stuck inside cps_cpu_die() waiting for CPU that ought to be powering down to do so. The best case scenario is that we then trigger RCU stall messages or lockup messages, but neither makes it particularly clear what's happening. Handle this more gracefully by introducing a timeout beyond which we warn the user that the core didn't power down & stop waiting for it. This at least allows the CPU running cps_cpu_die() to continue normally, and hopefully presuming the CPU that powered back up is doing nothing harmful the system will continue functioning as normal. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16197/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-cps.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit 5570ba2ee920de4e7760a2802b842771845b2c32 Author: Paul Burton Date: Fri Jun 2 14:48:53 2017 -0700 MIPS: CPS: Prevent multi-core with dcache aliasing Systems using the MIPS Coherence Manager (CM) cannot support multi-core SMP with dcache aliasing. This is because CPU caches are VIPT, but interventions in CM-based systems provide only the physical address to remote caches. This means that interventions may behave incorrectly in the presence of an aliasing dcache, since the physical address used when handling an intervention may lead to operation on an aliased cache line rather than the correct line. Prevent us from running into this issue by refusing to boot secondary cores in systems where dcache aliasing may occur. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16196/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-cps.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c8b7712c34d0604e2540608731bd5e9202c1139e Author: Paul Burton Date: Fri Jun 2 14:48:52 2017 -0700 MIPS: CPS: Select CONFIG_SYS_SUPPORTS_SCHED_SMT for MIPSr6 Prior to MIPSr6 multithreading is only supported if CONFIG_MIPS_MT_SMP is enabled, so CONFIG_MIPS_MT_SMP selects CONFIG_SYS_SUPPORTS_SCHED_SMT. With MIPSr6 the CONFIG_MIPS_CPS SMP implementation always supports multithreading, so have it select CONFIG_SYS_SUPPORTS_SCHED_SMT in order to allow the scheduler to make better informed decisions on multithreaded MIPSr6 systems (for example those using I6400 or I6500 CPUs). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16195/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2f93a60c3d829da07764eafd922beb40e7317aa3 Author: Paul Burton Date: Fri Jun 2 14:48:51 2017 -0700 MIPS: CM: WARN on attempt to lock invalid VP, not BUG Rather than using BUG_ON in the case of an invalid attempt to lock access to a non-zero VP on a pre-CM3 system, use WARN_ON so that we have even the slightest chance of recovery. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16194/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 516db1c61f3fd4328361699a2c74781ab1dbf84c Author: Paul Burton Date: Fri Jun 2 14:48:50 2017 -0700 MIPS: CM: Avoid per-core locking with CM3 & higher CM3 provides a GCR_CL_OTHER register per VP, rather than only per core. This means that we don't need to prevent other VPs within a core from racing with code that makes use of the core-other register region. Reduce locking overhead by demoting the per-core spinlock providing protection for CM2.5 & lower to a per-CPU/per-VP spinlock for CM3 & higher. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16193/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-cm.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) commit 9b03d8abe06d92195712fd489b2e8983de27fa68 Author: Paul Burton Date: Fri Jun 2 14:48:49 2017 -0700 MIPS: Skip IPI setup if we only have 1 CPU If we're running on a system with only 1 possible CPU then it makes no sense to reserve or initialise IPIs since we'll never use them. Avoid doing so. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16192/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) commit f259fe295ef07aafadf3316f58c4ac4eddfeccf1 Author: Maciej W. Rozycki Date: Fri Jun 16 00:18:11 2017 +0100 MIPS: Use `pr_debug' for messages from `__compute_return_epc_for_insn' Reduce the log level for branch emulation error messages issued before sending SIGILL by `__compute_return_epc_for_insn' as these are triggered by user software and are not an event that would normally require any attention. The same signal sent from elsewhere does not actually leave any trace in the kernel log at all. Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16402/ Signed-off-by: Ralf Baechle arch/mips/kernel/branch.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 70f743d141d3b14ca904581dfd1bd50dbe685c4f Author: Maciej W. Rozycki Date: Fri Jun 16 00:16:15 2017 +0100 MIPS: math-emu: For MFHC1/MTHC1 also return SIGILL right away Update commit 1ac944007bed ("MIPS: math-emu: Add mfhc1 & mthc1 support.") and like done throughout `cop1Emulate' for other cases also for the MFHC1 and MTHC1 instructions return SIGILL right away rather than jumping to a single `return' statement. Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16401/ Signed-off-by: Ralf Baechle arch/mips/math-emu/cp1emu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 27fe2200dad2de8207a694024a7b9037dff1b280 Author: Maciej W. Rozycki Date: Fri Jun 16 00:15:22 2017 +0100 MIPS: Fix a typo: s/preset/present/ in r2-to-r6 emulation error message This is a user-visible message, so we want it to be spelled correctly. Fixes: 5f9f41c474be ("MIPS: kernel: Prepare the JR instruction for emulation on MIPS R6") Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 3.19+ Patchwork: https://patchwork.linux-mips.org/patch/16400/ Signed-off-by: Ralf Baechle arch/mips/kernel/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a60b1a5bf88a250f1a77977c0224e502c901c77b Author: Maciej W. Rozycki Date: Fri Jun 16 00:14:12 2017 +0100 MIPS: Send SIGILL for R6 branches in `__compute_return_epc_for_insn' Fix: * commit 8467ca0122e2 ("MIPS: Emulate the new MIPS R6 branch compact (BC) instruction"), * commit 84fef630127a ("MIPS: Emulate the new MIPS R6 BALC instruction"), * commit 69b9a2fd05a3 ("MIPS: Emulate the new MIPS R6 BEQZC and JIC instructions"), * commit 28d6f93d201d ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC instructions"), * commit c893ce38b265 ("MIPS: Emulate the new MIPS R6 BOVC, BEQC and BEQZALC instructions") and send SIGILL rather than returning -SIGILL for R6 branch and jump instructions. Returning -SIGILL is never correct as the API defines this function's result upon error to be -EFAULT and a signal actually issued. Fixes: 8467ca0122e2 ("MIPS: Emulate the new MIPS R6 branch compact (BC) instruction") Fixes: 84fef630127a ("MIPS: Emulate the new MIPS R6 BALC instruction") Fixes: 69b9a2fd05a3 ("MIPS: Emulate the new MIPS R6 BEQZC and JIC instructions") Fixes: 28d6f93d201d ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC instructions") Fixes: c893ce38b265 ("MIPS: Emulate the new MIPS R6 BOVC, BEQC and BEQZALC instructions") Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 3.19+ Patchwork: https://patchwork.linux-mips.org/patch/16399/ Signed-off-by: Ralf Baechle arch/mips/kernel/branch.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit fef40be6da856afead4177aaa9d869a66fb3381f Author: Maciej W. Rozycki Date: Fri Jun 16 00:12:53 2017 +0100 MIPS: Send SIGILL for linked branches in `__compute_return_epc_for_insn' Fix commit 319824eabc3f ("MIPS: kernel: branch: Do not emulate the branch likelies on MIPS R6") and also send SIGILL rather than returning -SIGILL for BLTZAL, BLTZALL, BGEZAL and BGEZALL instruction encodings no longer supported in R6, except where emulated. Returning -SIGILL is never correct as the API defines this function's result upon error to be -EFAULT and a signal actually issued. Fixes: 319824eabc3f ("MIPS: kernel: branch: Do not emulate the branch likelies on MIPS R6") Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 3.19+ Patchwork: https://patchwork.linux-mips.org/patch/16398/ Signed-off-by: Ralf Baechle arch/mips/kernel/branch.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 1f4edde422961397cf4470b347958c13c6a740bb Author: Maciej W. Rozycki Date: Fri Jun 16 00:09:23 2017 +0100 MIPS: Rename `sigill_r6' to `sigill_r2r6' in `__compute_return_epc_for_insn' Use the more accurate `sigill_r2r6' name for the label used in the case of sending SIGILL in the absence of the instruction emulator for an earlier ISA level instruction that has been removed as from the R6 ISA, so that the `sigill_r6' name is freed for the situation where an R6 instruction is not supposed to be interpreted, because the executing processor does not support the R6 ISA. Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 3.19+ Patchwork: https://patchwork.linux-mips.org/patch/16397/ Signed-off-by: Ralf Baechle arch/mips/kernel/branch.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7b82c1058ac1f8f8b9f2b8786b1f710a57a870a8 Author: Maciej W. Rozycki Date: Fri Jun 16 00:08:29 2017 +0100 MIPS: Send SIGILL for BPOSGE32 in `__compute_return_epc_for_insn' Fix commit e50c0a8fa60d ("Support the MIPS32 / MIPS64 DSP ASE.") and send SIGILL rather than SIGBUS whenever an unimplemented BPOSGE32 DSP ASE instruction has been encountered in `__compute_return_epc_for_insn' as our Reserved Instruction exception handler would in response to an attempt to actually execute the instruction. Sending SIGBUS only makes sense for the unaligned PC case, since moved to `__compute_return_epc'. Adjust function documentation accordingly, correct formatting and use `pr_info' rather than `printk' as the other exit path already does. Fixes: e50c0a8fa60d ("Support the MIPS32 / MIPS64 DSP ASE.") Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 2.6.14+ Patchwork: https://patchwork.linux-mips.org/patch/16396/ Signed-off-by: Ralf Baechle arch/mips/kernel/branch.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 11a3799dbeb620bf0400b1fda5cc2c6bea55f20a Author: Maciej W. Rozycki Date: Fri Jun 16 00:07:34 2017 +0100 MIPS: Fix unaligned PC interpretation in `compute_return_epc' Fix a regression introduced with commit fb6883e5809c ("MIPS: microMIPS: Support handling of delay slots.") and defer to `__compute_return_epc' if the ISA bit is set in EPC with non-MIPS16, non-microMIPS hardware, which will then arrange for a SIGBUS due to an unaligned instruction reference. Returning EPC here is never correct as the API defines this function's result to be either a negative error code on failure or one of 0 and BRANCH_LIKELY_TAKEN on success. Fixes: fb6883e5809c ("MIPS: microMIPS: Support handling of delay slots.") Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 3.9+ Patchwork: https://patchwork.linux-mips.org/patch/16395/ Signed-off-by: Ralf Baechle arch/mips/include/asm/branch.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a9db101b735a9d49295326ae41f610f6da62b08c Author: Maciej W. Rozycki Date: Fri Jun 16 00:06:19 2017 +0100 MIPS: Actually decode JALX in `__compute_return_epc_for_insn' Complement commit fb6883e5809c ("MIPS: microMIPS: Support handling of delay slots.") and actually decode the regular MIPS JALX major instruction opcode, the handling of which has been added with the said commit for EPC calculation in `__compute_return_epc_for_insn'. Fixes: fb6883e5809c ("MIPS: microMIPS: Support handling of delay slots.") Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 3.9+ Patchwork: https://patchwork.linux-mips.org/patch/16394/ Signed-off-by: Ralf Baechle arch/mips/kernel/branch.c | 1 + 1 file changed, 1 insertion(+) commit 13769ebad0c42738831787e27c7c7f982e7da579 Author: Maciej W. Rozycki Date: Fri Jun 16 00:05:08 2017 +0100 MIPS: math-emu: Prevent wrong ISA mode instruction emulation Terminate FPU emulation immediately whenever an ISA mode switch has been observed. This is so that we do not interpret machine code in the wrong mode, for example when a regular MIPS FPU instruction has been placed in a delay slot of a jump that switches into the MIPS16 mode, as with the following code (taken from a GCC test suite case): 00400650 : 400650: 3c020100 lui v0,0x100 400654: 03e00008 jr ra 400658: 44c2f800 ctc1 v0,c1_fcsr 40065c: 00000000 nop [...] 004012d0 <__libc_csu_init>: 4012d0: f000 6a02 li v0,2 4012d4: f150 0b1c la v1,3f9430 <_DYNAMIC-0x6df0> 4012d8: f400 3240 sll v0,16 4012dc: e269 addu v0,v1 4012de: 659a move gp,v0 4012e0: f00c 64f6 save a0-a2,48,ra,s0-s1 4012e4: 673c move s1,gp 4012e6: f010 9978 lw v1,-32744(s1) 4012ea: d204 sw v0,16(sp) 4012ec: eb40 jalr v1 4012ee: 653b move t9,v1 4012f0: f010 997c lw v1,-32740(s1) 4012f4: f030 9920 lw s1,-32736(s1) 4012f8: e32f subu v1,s1 4012fa: 326b sra v0,v1,2 4012fc: d206 sw v0,24(sp) 4012fe: 220c beqz v0,401318 <__libc_csu_init+0x48> 401300: 6800 li s0,0 401302: 99e0 lw a3,0(s1) 401304: 4801 addiu s0,1 401306: 960e lw a2,56(sp) 401308: 4904 addiu s1,4 40130a: 950d lw a1,52(sp) 40130c: 940c lw a0,48(sp) 40130e: ef40 jalr a3 401310: 653f move t9,a3 401312: 9206 lw v0,24(sp) 401314: ea0a cmp v0,s0 401316: 61f5 btnez 401302 <__libc_csu_init+0x32> 401318: 6476 restore 48,ra,s0-s1 40131a: e8a0 jrc ra Here `set_fast_math' is called from `40130e' (`40130f' with the ISA bit) and emulation triggers for the CTC1 instruction. As it is in a jump delay slot emulation continues from `401312' (`401313' with the ISA bit). However we have no path to handle MIPS16 FPU code emulation, because there are no MIPS16 FPU instructions. So the default emulation path is taken, interpreting a 32-bit word fetched by `get_user' from `401313' as a regular MIPS instruction, which is: 401313: f5ea0a92 sdc1 $f10,2706(t7) This makes the FPU emulator proceed with the supposed SDC1 instruction and consequently makes the program considered here terminate with SIGSEGV. A similar although less severe issue exists with pure-microMIPS processors in the case where similarly an FPU instruction is emulated in a delay slot of a register jump that (incorrectly) switches into the regular MIPS mode. A subsequent instruction fetch from the jump's target is supposed to cause an Address Error exception, however instead we proceed with regular MIPS FPU emulation. For simplicity then, always terminate the emulation loop whenever a mode change is detected, denoted by an ISA mode bit flip. As from commit 377cb1b6c16a ("MIPS: Disable MIPS16/microMIPS crap for platforms not supporting these ASEs.") the result of `get_isa16_mode' can be hardcoded to 0, so we need to examine the ISA mode bit by hand. This complements commit 102cedc32a6e ("MIPS: microMIPS: Floating point support.") which added JALX decoding to FPU emulation. Fixes: 102cedc32a6e ("MIPS: microMIPS: Floating point support.") Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 3.9+ Patchwork: https://patchwork.linux-mips.org/patch/16393/ Signed-off-by: Ralf Baechle arch/mips/math-emu/cp1emu.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 0b17c9670590148656645be57f62f279f0d3ad52 Author: Paul Burton Date: Fri Jun 9 17:26:43 2017 -0700 MIPS: Use queued spinlocks (qspinlock) This patch switches MIPS to make use of generically implemented queued spinlocks, rather than the ticket spinlocks used previously. This allows us to drop a whole load of inline assembly, share more generic code, and is also a performance win. Results from running the AIM7 short workload on a MIPS Creator Ci40 (ie. 2 core 2 thread interAptiv CPU clocked at 546MHz) with v4.12-rc4 pistachio_defconfig, with ftrace disabled due to a current bug, and both with & without use of queued rwlocks & spinlocks: Forks | v4.12-rc4 | +qlocks | Change -------|-----------|----------|-------- 10 | 52630.32 | 53316.31 | +1.01% 20 | 51777.80 | 52623.15 | +1.02% 30 | 51645.92 | 52517.26 | +1.02% 40 | 51634.88 | 52419.89 | +1.02% 50 | 51506.75 | 52307.81 | +1.02% 60 | 51500.74 | 52322.72 | +1.02% 70 | 51434.81 | 52288.60 | +1.02% 80 | 51423.22 | 52434.85 | +1.02% 90 | 51428.65 | 52410.10 | +1.02% The kernels used for these tests also had my "MIPS: Hardcode cpu_has_* where known at compile time due to ISA" patch applied, which allows the kernel_uses_llsc checks in cmpxchg() & xchg() to be optimised away at compile time. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16358/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + arch/mips/include/asm/Kbuild | 1 + arch/mips/include/asm/spinlock.h | 210 +-------------------------------- arch/mips/include/asm/spinlock_types.h | 24 +--- 4 files changed, 4 insertions(+), 232 deletions(-) commit 25da4e9dedbfa1630cc87903dcced5b249b936ef Author: Paul Burton Date: Fri Jun 9 17:26:42 2017 -0700 MIPS: Use queued read/write locks (qrwlock) This patch switches MIPS to make use of generically implemented queued read/write locks, rather than the custom implementation used previously. This allows us to drop a whole load of inline assembly, share more generic code, and is also a performance win. Results from running the AIM7 short workload on a MIPS Creator Ci40 (ie. 2 core 2 thread interAptiv CPU clocked at 546MHz) with v4.12-rc4 pistachio_defconfig, with ftrace disabled due to a current bug, and both with & without use of queued rwlocks & spinlocks: Forks | v4.12-rc4 | +qlocks | Change -------|-----------|----------|-------- 10 | 52630.32 | 53316.31 | +1.01% 20 | 51777.80 | 52623.15 | +1.02% 30 | 51645.92 | 52517.26 | +1.02% 40 | 51634.88 | 52419.89 | +1.02% 50 | 51506.75 | 52307.81 | +1.02% 60 | 51500.74 | 52322.72 | +1.02% 70 | 51434.81 | 52288.60 | +1.02% 80 | 51423.22 | 52434.85 | +1.02% 90 | 51428.65 | 52410.10 | +1.02% The kernels used for these tests also had my "MIPS: Hardcode cpu_has_* where known at compile time due to ISA" patch applied, which allows the kernel_uses_llsc checks in cmpxchg() & xchg() to be optimised away at compile time. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16357/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + arch/mips/include/asm/Kbuild | 1 + arch/mips/include/asm/spinlock.h | 216 +-------------------------------- arch/mips/include/asm/spinlock_types.h | 10 +- 4 files changed, 4 insertions(+), 224 deletions(-) commit 4843cf8d3be4d45f609c865698b63374ae935042 Author: Paul Burton Date: Fri Jun 9 17:26:41 2017 -0700 MIPS: cmpxchg: Rearrange __xchg() arguments to match xchg() The __xchg() function declares its first 2 arguments in reverse order compared to the xchg() macro, which is confusing & serves no purpose. Reorder the arguments such that __xchg() & xchg() match. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16356/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3ba7f44d2b19166b34031db48ce613d1bddbd384 Author: Paul Burton Date: Fri Jun 9 17:26:40 2017 -0700 MIPS: cmpxchg: Implement 1 byte & 2 byte cmpxchg() Implement support for 1 & 2 byte cmpxchg() using read-modify-write atop a 4 byte cmpxchg(). This allows us to support these atomic operations despite the MIPS ISA only providing 4 & 8 byte atomic operations. This is required in order to support queued rwlocks (qrwlock) in a later patch, since these make use of a 1 byte cmpxchg() in their slow path. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16355/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 7 +++++ arch/mips/kernel/cmpxchg.c | 57 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) commit b70eb30056dc84568f3d32440d9be6a558025843 Author: Paul Burton Date: Fri Jun 9 17:26:39 2017 -0700 MIPS: cmpxchg: Implement 1 byte & 2 byte xchg() Implement 1 & 2 byte xchg() using read-modify-write atop a 4 byte cmpxchg(). This allows us to support these atomic operations despite the MIPS ISA only providing for 4 & 8 byte atomic operations. This is required in order to support queued spinlocks (qspinlock) in a later patch, since these make use of a 2 byte xchg() in their slow path. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16354/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 9 +++++-- arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/cmpxchg.c | 52 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) commit 8263db4d7768448cb06adbbdd14c613a1ea09830 Author: Paul Burton Date: Fri Jun 9 17:26:38 2017 -0700 MIPS: cmpxchg: Implement __cmpxchg() as a function Replace the macro definition of __cmpxchg() with an inline function, which is easier to read & modify. The cmpxchg() & cmpxchg_local() macros are adjusted to call the new __cmpxchg() function. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16353/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 59 ++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 27 deletions(-) commit 62c6081dca75d6bec1198ed5a1ae50968b323a8c Author: Paul Burton Date: Fri Jun 9 17:26:37 2017 -0700 MIPS: cmpxchg: Drop __xchg_u{32,64} functions The __xchg_u32() & __xchg_u64() functions now add very little value. This patch therefore removes them, by: - Moving memory barriers out of them & into xchg(), which also removes the duplication & readies us to support xchg_relaxed() if we wish to. - Calling __xchg_asm() directly from __xchg(). - Performing the check for CONFIG_64BIT being enabled in the size=8 case of __xchg(). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16352/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 48 +++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 31 deletions(-) commit d15dc68c1143e249c36612c15bf4e930637b47c3 Author: Paul Burton Date: Fri Jun 9 17:26:36 2017 -0700 MIPS: cmpxchg: Error out on unsupported xchg() calls xchg() has up until now simply returned the x parameter in cases where it is called with a pointer to a value of an unsupported size. This will often cause the calling code to hit a failure path, presuming that the value of x differs from the content of the memory pointed at by ptr, but we can do better by producing a compile-time or link-time error such that unsupported calls to xchg() are detectable earlier than runtime. This patch does this in the same was as is already done for cmpxchg(), using a call to a missing function annotated with __compiletime_error(). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16351/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 77299db802d4a7ae43f7ca246adbff0420bc9f5a Author: Paul Burton Date: Fri Jun 9 17:26:35 2017 -0700 MIPS: cmpxchg: Use __compiletime_error() for bad cmpxchg() pointers Our cmpxchg() implementation relies upon generating a call to a function which doesn't really exist (__cmpxchg_called_with_bad_pointer) to create a link failure in cases where cmpxchg() is called with a pointer to a value of an unsupported size. The __compiletime_error macro can be used to decorate a function such that a call to it generates a compile-time, rather than a link-time, error. This patch uses __compiletime_error to cause bad cmpxchg() calls to error out at compile time rather than link time, allowing errors to occur more quickly & making it easier to spot where the problem comes from. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16350/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5154f3b4194910a4216866e7535c37e5bcb17800 Author: Paul Burton Date: Fri Jun 9 17:26:34 2017 -0700 MIPS: cmpxchg: Pull xchg() asm into a macro Use a macro to generate the 32 & 64 bit variants of the backing code for xchg(), much as is already done for cmpxchg(). This removes the duplication that could previously be found in __xchg_u32() & __xchg_u64(). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16349/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 81 +++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 48 deletions(-) commit 6b1e76297c4ad4b906fdf054460e4e56914f6e34 Author: Paul Burton Date: Fri Jun 9 17:26:33 2017 -0700 MIPS: cmpxchg: Unify R10000_LLSC_WAR & non-R10000_LLSC_WAR cases Prior to this patch the xchg & cmpxchg functions have duplicated code which is for all intents & purposes identical apart from use of a branch-likely instruction in the R10000_LLSC_WAR case & a regular branch instruction in the non-R10000_LLSC_WAR case. This patch removes the duplication, declaring a __scbeqz macro to select the branch instruction suitable for use when checking the result of an sc instruction & making use of it to unify the 2 cases. In __xchg_u{32,64}() this means writing the branch in asm, where it was previously being done in C as a do...while loop for the non-R10000_LLSC_WAR case. As this is a single instruction, and adds consistency with the R10000_LLSC_WAR cases & the cmpxchg() code, this seems worthwhile. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16348/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 80 ++++++++++++----------------------------- 1 file changed, 22 insertions(+), 58 deletions(-) commit 3f88ec633362efa454ca4ea289d4ad91cd44a976 Author: Miodrag Dinic Date: Mon Jun 19 17:50:11 2017 +0200 MIPS: unaligned: Add DSP lwx & lhx missaligned access support Add handling of missaligned access for DSP load instructions lwx & lhx. Since DSP instructions share SPECIAL3 opcode with other non-DSP instructions, necessary logic was inserted for distinguishing between instructions with SPECIAL3 opcode. For that purpose, the instruction format for DSP instructions is added to arch/mips/include/uapi/asm/inst.h. Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Cc: James.Hogan@imgtec.com Cc: Paul.Burton@imgtec.com Cc: Raghu.Gandham@imgtec.com Cc: Leonid.Yegoshin@imgtec.com Cc: Douglas.Leung@imgtec.com Cc: Petar.Jovanovic@imgtec.com Cc: Goran.Ferenc@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16511/ Signed-off-by: Ralf Baechle arch/mips/include/uapi/asm/inst.h | 11 +++ arch/mips/kernel/unaligned.c | 174 ++++++++++++++++++++++---------------- 2 files changed, 111 insertions(+), 74 deletions(-) commit 3daf281f2ce3b80cc1abf04f355f066e37f69451 Author: Leonid Yegoshin Date: Mon Jun 19 17:50:10 2017 +0200 MIPS: R6: Fix PREF instruction usage by memcpy for MIPS R6 Disable usage of PREF instruction usage by memcpy for MIPS R6. MIPS R6 redefines PREF instruction with smaller offset than ordinary MIPS. However, the memcpy code uses PREF instruction with offsets bigger than +-256 bytes. Malta kernels already disable usage of PREF for memcpy. This was found during adaptation of MIPS R6 for virtual board used by Android emulator. Signed-off-by: Leonid Yegoshin Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: James.Hogan@imgtec.com Cc: Paul.Burton@imgtec.com Cc: Raghu.Gandham@imgtec.com Cc: Leonid.Yegoshin@imgtec.com Cc: Douglas.Leung@imgtec.com Cc: Petar.Jovanovic@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16510/ Signed-off-by: Ralf Baechle arch/mips/lib/memcpy.S | 3 +++ 1 file changed, 3 insertions(+) commit 21855a6e5b44999fb9f5493cc2c8c9eed5f32876 Author: Miodrag Dinic Date: Mon Jun 19 17:50:09 2017 +0200 MIPS: build: Fix "-modd-spreg" switch usage when compiling for mips32r6 Add "-modd-spreg" when compiling the kernel for mips32r6 target. This makes sure the kernel builds properly even with toolchains that use "-mno-odd-spreg" by default. This is the case with Android gcc. Prior to this patch, kernel builds using gcc for Android failed with following error messages, if target architecture is set to mips32r6: arch/mips/kernel/r4k_switch.S: Assembler messages: .../r4k_switch.S:210: Error: float register should be even, was 1 .../r4k_switch.S:212: Error: float register should be even, was 3 .../r4k_switch.S:214: Error: float register should be even, was 5 .../r4k_switch.S:216: Error: float register should be even, was 7 .../r4k_switch.S:218: Error: float register should be even, was 9 .../r4k_switch.S:220: Error: float register should be even, was 11 .../r4k_switch.S:222: Error: float register should be even, was 13 .../r4k_switch.S:224: Error: float register should be even, was 15 .../r4k_switch.S:226: Error: float register should be even, was 17 .../r4k_switch.S:228: Error: float register should be even, was 19 .../r4k_switch.S:230: Error: float register should be even, was 21 .../r4k_switch.S:232: Error: float register should be even, was 23 .../r4k_switch.S:234: Error: float register should be even, was 25 .../r4k_switch.S:236: Error: float register should be even, was 27 .../r4k_switch.S:238: Error: float register should be even, was 29 .../r4k_switch.S:240: Error: float register should be even, was 31 make[2]: *** [arch/mips/kernel/r4k_switch.o] Error 1 Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: James.Hogan@imgtec.com Cc: Paul.Burton@imgtec.com Cc: Raghu.Gandham@imgtec.com Cc: Leonid.Yegoshin@imgtec.com Cc: Douglas.Leung@imgtec.com Cc: Petar.Jovanovic@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16509/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 296a7624f5b292af610d728e7e347fda341a985e Author: Miodrag Dinic Date: Mon Jun 19 17:50:08 2017 +0200 MIPS: cmdline: Add support for 'memmap' parameter Implement support for parsing 'memmap' kernel command line parameter. This patch covers parsing of the following two formats for 'memmap' parameter values: - nn[KMG]@ss[KMG] - nn[KMG]$ss[KMG] ([KMG] = K M or G (kilo, mega, giga)) These two allowed formats for parameter value are already documented in file kernel-parameters.txt in Documentation/admin-guide folder. Some architectures already support them, but Mips did not prior to this patch. Excerpt from Documentation/admin-guide/kernel-parameters.txt: memmap=nn[KMG]@ss[KMG] [KNL] Force usage of a specific region of memory. Region of memory to be used is from ss to ss+nn. memmap=nn[KMG]$ss[KMG] Mark specific memory as reserved. Region of memory to be reserved is from ss to ss+nn. Example: Exclude memory from 0x18690000-0x1869ffff memmap=64K$0x18690000 or memmap=0x10000$0x18690000 There is no need to update this documentation file with respect to this patch. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: James.Hogan@imgtec.com Cc: Paul.Burton@imgtec.com Cc: Raghu.Gandham@imgtec.com Cc: Leonid.Yegoshin@imgtec.com Cc: Douglas.Leung@imgtec.com Cc: Petar.Jovanovic@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16508/ Signed-off-by: Ralf Baechle arch/mips/kernel/setup.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit b9c4dc2cf9af62bc0d2d8504c15175aeac49ad53 Author: Huacai Chen Date: Thu Jun 22 23:06:54 2017 +0800 MIPS: Loogson: Make enum loongson_cpu_type more clear Sort enum loongson_cpu_type in a more reasonable manner, this makes the CPU names more clear and extensible. Those already defined enum values are renamed to Legacy_* for compatibility. Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16591/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-loongson64/boot_param.h | 22 ++++++++++++++++------ arch/mips/loongson64/common/env.c | 11 ++++++++--- 2 files changed, 24 insertions(+), 9 deletions(-) commit ecc38a0968ec3e0605079e49d276d9a4186abdb7 Author: Huacai Chen Date: Thu Jun 22 23:06:53 2017 +0800 MIPS: Loongson-3: support irq_set_affinity() in i8259 chip With this patch we can set irq affinity via procfs, so as to improve network performance. Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16590/ Signed-off-by: Ralf Baechle arch/mips/loongson64/loongson-3/irq.c | 67 ++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 13 deletions(-) commit e1b88ca8d72193e48bac026b19b8c686cc7fea25 Author: Huacai Chen Date: Thu Jun 22 23:06:52 2017 +0800 MIPS: Loongson-3: IRQ balancing for PCI devices IRQ0 (HPET), IRQ1 (Keyboard), IRQ2 (Cascade), IRQ7 (SCI), IRQ8 (RTC) and IRQ12 (Mouse) are handled by core-0 locally. Other PCI IRQs (3, 4, 5, 6, 14, 15) are balanced by all cores from Node-0. This can improve I/O performance significantly. Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16589/ Signed-off-by: Ralf Baechle arch/mips/loongson64/loongson-3/irq.c | 19 +++++++++++++++++-- arch/mips/loongson64/loongson-3/smp.c | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 3 deletions(-) commit 99b0b5a3a1e994247e7533de0fd7e4d13ead0ddd Author: Huacai Chen Date: Thu Jun 22 23:06:51 2017 +0800 MIPS: Loongson-3: Support 4 packages in CPU Hwmon driver Loongson-3 machines may have as many as 4 physical packages. Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16588/ Signed-off-by: Ralf Baechle drivers/platform/mips/cpu_hwmon.c | 119 +++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 61 deletions(-) commit b392ee07999aa1f19b3a845fad47ec4275341f71 Author: Huacai Chen Date: Thu Jun 22 23:06:50 2017 +0800 MIPS: Loongson: Add NMI handler support Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16587/ Signed-off-by: Ralf Baechle arch/mips/loongson64/common/init.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 268cd2ed3d4413a963d765eb6c0b87f06932b971 Author: Krzysztof Kozlowski Date: Wed Jun 28 16:56:21 2017 +0200 PM / Domains: Fix missing default_power_down_ok comment Commit fc5cbf0c94b6 (PM / Domains: Support for multiple states) split out some code out of default_power_down_ok() function so the documentation has to be moved to appropriate place. Signed-off-by: Krzysztof Kozlowski Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain_governor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a7e2d1bce4c1db471f1cbc0c4666a3112bbf0994 Author: Krzysztof Kozlowski Date: Wed Jun 28 16:56:20 2017 +0200 PM / Domains: Fix unsafe iteration over modified list of domains of_genpd_remove_last() iterates over list of domains and removes matching element thus it has to use safe version of list iteration. Fixes: 17926551c98a (PM / Domains: Add support for removing nested PM domains by provider) Cc: 4.9+ # 4.9+ Signed-off-by: Krzysztof Kozlowski Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b556b15dc04e9b9b98790f04c21acf5e24f994b2 Author: Krzysztof Kozlowski Date: Wed Jun 28 16:56:19 2017 +0200 PM / Domains: Fix unsafe iteration over modified list of domain providers of_genpd_del_provider() iterates over list of domain provides and removes matching element thus it has to use safe version of list iteration. Fixes: aa42240ab254 (PM / Domains: Add generic OF-based PM domain look-up) Cc: 3.19+ # 3.19+ Signed-off-by: Krzysztof Kozlowski Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6e83cac3eda5f7dd32ee1453df2f7abb5c6cd46 Author: Krzysztof Kozlowski Date: Wed Jun 28 16:56:18 2017 +0200 PM / Domains: Fix unsafe iteration over modified list of device links pm_genpd_remove_subdomain() iterates over domain's master_links list and removes matching element thus it has to use safe version of list iteration. Fixes: f721889ff65a ("PM / Domains: Support for generic I/O PM domains (v8)") Cc: 3.1+ # 3.1+ Signed-off-by: Krzysztof Kozlowski Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b55e55ee44356d68f4a7ee4b11f9cbb1f5958cc Author: Krzysztof Kozlowski Date: Wed Jun 28 16:56:17 2017 +0200 PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device genpd_syscore_switch() had two problems: 1. It silently assumed that device, it is being called for, belongs to generic power domain and used container_of() on its power domain pointer. Such assumption might not be true always. 2. It iterated over list of generic power domains without holding gpd_list_lock mutex thus list could have been modified at the same time. Usage of genpd_lookup_dev() solves both problems as it is safe a call for non-generic power domains and uses mutex when iterating. Reported-by: Ulf Hansson Signed-off-by: Krzysztof Kozlowski Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10da65423fdbee185da5bb65f829a9d9312c1198 Author: Mikko Perttunen Date: Thu Jun 22 10:18:33 2017 +0300 PM / Domains: Call driver's noirq callbacks Currently genpd installs its own noirq callbacks, but never calls down to the driver's corresponding callbacks. Add these calls. Signed-off-by: Mikko Perttunen Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 68 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 9 deletions(-) commit 2287d8664fe7345ead891017eccd879fc605305e Author: Sebastian Andrzej Siewior Date: Tue Jun 27 18:15:38 2017 +0200 timers: Make the cpu base lock raw The timers cpu base lock could not be converted to a raw spinlock becaue the lock held time was non-deterministic due to cascading and long lasting timer wheel traversals. The rework of the timer wheel to the new non-cascading model removed also the wheel traversals and the lock held times are deterministic now. This allows to make the lock raw and thereby unbreaks NOHz* on preempt-RT. Signed-off-by: Sebastian Andrzej Siewior Link: http://lkml.kernel.org/r/20170627161538.30257-1-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner kernel/time/timer.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit ef75040ab7f179c30f084653c93bc0bbdbcaf17a Author: Carlo Caione Date: Thu Jun 15 09:41:53 2017 +0800 ACPI / EC: Add quirk for GL720VMK ASUS GL720VMK is also affected by the EC GPE preference issue. Signed-off-by: Carlo Caione Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 440f53da70875916f1962266a1ff53c40f9573e8 Author: Chris Chiu Date: Thu Jun 15 09:41:47 2017 +0800 ACPI / EC: Fix media keys not working problem on some Asus laptops Some Asus laptops (verified on X550VXK/FX502VD/FX502VE) get no interrupts when pressing media keys thus the corresponding functions are not invoked. It's due to the _GPE defines in DSDT for EC returns differnt value compared to the GPE Number in ECDT. Confirmed with Asus that the vale in ECDT is the correct one. This commit uses DMI quirks to prevent calling _GPE when doing ec_parse_device() and keep the ECDT GPE number setting for the EC device. With previous commit, it is ensured that if there is an ECDT, it can always be kept as boot_ec, this patch thus can implement a quirk on top of the determined ECDT boot_ec. Link: https://phabricator.endlessm.com/T16033 Link: https://phabricator.endlessm.com/T16722 Link: https://bugzilla.kernel.org/show_bug.cgi?id=195651 Tested-by: Daniel Drake Signed-off-by: Chris Chiu Signed-off-by: Carlo Caione Signed-off-by: Lv Zheng Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) commit c712bb58d8278465b1a91f362a08f5c79ad077e4 Author: Lv Zheng Date: Thu Jun 15 09:41:41 2017 +0800 ACPI / EC: Add support to skip boot stage DSDT probe We prepared _INI/_STA methods for \_SB, \_SB.PCI0, \_SB.LID0 and \_SB.EC, _HID(PNP0C09)/_CRS/_GPE for \_SB.EC to poke Windows behavior with qemu, we got the following execution sequence: \_SB._INI \_SB.PCI0._STA \_SB.LID0._STA \_SB.EC._STA \_SB.PCI0._INI \_SB.LID0._INI \_SB.EC._INI There is no extra DSDT EC device enumeration process occurring before the main ACPI device enumeration process. That means acpi_ec_dsdt_probe() is not Windows-compatible. Tracking back, it was added by the following commit: Commit: c5279dee26c0e8d7c4200993bfc4b540d2469598 Subject: ACPI: EC: Add some basic check for ECDT data but that commit was misguided. Why we shouldn't enumerate DSDT EC before the main ACPI device enumeration? The only way to know if the DSDT EC is valid would be to evaluate its _STA control method, but it's not safe to evaluate this control method that early and out of the ACPI enumeration process, because _STA may refer to entities (such as resources or ACPI device objects) that may not have been initialized before OSPM starts to enumerate them via the main ACPI device enumeration. But after we had reverted back to the expected behavior, a regression was reported. On that platform, there is no ECDT, but the platform control methods access EC operation region earlier than Linux expects causing some ACPI method execution errors. For this reason, we just go back to old behavior to still probe DSDT EC as the boot EC. However, that turns out to lead to yet another functional breakage and in order to work around all of the problems, we skip boot stage DSDT probe when the ECDT exists so that a later quirk can always use correct ECDT GPE setting. Link: http://bugzilla.kernel.org/show_bug.cgi?id=11880 Link: http://bugzilla.kernel.org/show_bug.cgi?id=119261 Link: http://bugzilla.kernel.org/show_bug.cgi?id=195651 Tested-by: Daniel Drake Signed-off-by: Lv Zheng [ rjw: Changelog & comments massage ] Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ae56c9fd1518f9ac8def938638aebd2d7d289325 Author: Lv Zheng Date: Thu Jun 15 09:41:35 2017 +0800 ACPI / EC: Enhance boot EC sanity check It's reported that some buggy BIOS tables can contain 2 DSDT ECs, one of them is invalid but acpi_ec_dsdt_probe() fails to pick the valid one. This patch simply enhances sanity checks in ec_parse_device() as a workaround to skip probing wrong namespace ECs. Link: https://bugzilla.kernel.org/show_bug.cgi?id=195651 Tested-by: Daniel Drake Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 2 ++ 1 file changed, 2 insertions(+) commit d37efb79bc1cc5763d5ac4a96b9ad2ecbddcbe8a Author: Shih-Yuan Lee (FourDollars) Date: Wed Jun 14 16:29:16 2017 +0800 ACPI / video: Add quirks for the Dell Precision 7510 The Dell Precision 7510 has a broken acpi-video implementation. The backlight control bits work, but when the brightness is changed via the acpi-video interface the backlight flickers annoyingly before settling at the new brightness, switching to using the native interface fixes the flickering so add a quirk for this (the vendor interface can not change the brightness at all). Signed-off-by: Shih-Yuan Lee (FourDollars) Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 13cfc732160f7bc7e596128ce34cda361c556966 Author: Bjorn Helgaas Date: Fri Aug 19 16:30:25 2016 +0800 PCI: Work around poweroff & suspend-to-RAM issue on Macbook Pro 11 Neither soft poweroff (transition to ACPI power state S5) nor suspend-to-RAM (transition to state S3) works on the Macbook Pro 11,4 and 11,5. The problem is related to the [mem 0x7fa00000-0x7fbfffff] space. When we use that space, e.g., by assigning it to the 00:1c.0 Root Port, the ACPI Power Management 1 Control Register (PM1_CNT) at [io 0x1804] doesn't work anymore. Linux does a soft poweroff (transition to S5) by writing to PM1_CNT. The theory about why this doesn't work is: - The write to PM1_CNT causes an SMI - The BIOS SMI handler depends on something in [mem 0x7fa00000-0x7fbfffff] - When Linux assigns [mem 0x7fa00000-0x7fbfffff] to the 00:1c.0 Port, it covers up whatever the SMI handler uses, so the SMI handler no longer works correctly Reserve the [mem 0x7fa00000-0x7fbfffff] space so we don't assign it to anything. This is voodoo programming, since we don't know what the real conflict is, but we've failed to find the root cause. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=103211 Tested-by: thejoe@gmail.com Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org Cc: Rafael J. Wysocki Cc: Lukas Wunner Cc: Chen Yu arch/x86/pci/fixup.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 425a17cbfff933c4cca4eeef5caa5926d198dd85 Author: Christoph Hellwig Date: Mon Jun 26 12:20:58 2017 +0200 nvme: Allocate queues for all possible CPUs Unlike most drіvers that simply pass the maximum possible vectors to pci_alloc_irq_vectors NVMe needs to configure the device before allocting the vectors, so it needs a manual update for the new scheme of using all present CPUs. Signed-off-by: Christoph Hellwig Reviewed-by: Jens Axboe Cc: Keith Busch Cc: linux-block@vger.kernel.org Cc: linux-nvme@lists.infradead.org Link: http://lkml.kernel.org/r/20170626102058.10200-4-hch@lst.de Signed-off-by: Thomas Gleixner drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b855ad37194f7bdbb200ce7a1c7051fecb56a08 Author: Christoph Hellwig Date: Mon Jun 26 12:20:57 2017 +0200 blk-mq: Create hctx for each present CPU Currently we only create hctx for online CPUs, which can lead to a lot of churn due to frequent soft offline / online operations. Instead allocate one for each present CPU to avoid this and dramatically simplify the code. Signed-off-by: Christoph Hellwig Reviewed-by: Jens Axboe Cc: Keith Busch Cc: linux-block@vger.kernel.org Cc: linux-nvme@lists.infradead.org Link: http://lkml.kernel.org/r/20170626102058.10200-3-hch@lst.de Signed-off-by: Thomas Gleixner block/blk-mq.c | 120 +++++---------------------------------------- block/blk-mq.h | 5 -- include/linux/cpuhotplug.h | 1 - 3 files changed, 11 insertions(+), 115 deletions(-) commit 5f042e7cbd9ebd3580077dcdc21f35e68c2adf5f Author: Christoph Hellwig Date: Mon Jun 26 12:20:56 2017 +0200 blk-mq: Include all present CPUs in the default queue mapping This way we get a nice distribution independent of the current cpu online / offline state. Signed-off-by: Christoph Hellwig Reviewed-by: Jens Axboe Cc: Keith Busch Cc: linux-block@vger.kernel.org Cc: linux-nvme@lists.infradead.org Link: http://lkml.kernel.org/r/20170626102058.10200-2-hch@lst.de Signed-off-by: Thomas Gleixner block/blk-mq-cpumap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3195a35b41cc245c12a5e144186faea3691ed516 Merge: 4035260 d52cd20 Author: Paolo Bonzini Date: Wed Jun 28 22:39:02 2017 +0200 Merge tag 'kvm-s390-next-4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: fixes and features for 4.13 - initial machine check forwarding - migration support for the CMMA page hinting information - cleanups - fixes commit 403526054a38073137458f6c5c8c765ec27e015d Author: Jim Mattson Date: Wed Jun 28 09:37:37 2017 -0700 kvm: nVMX: Check memory operand to INVVPID The memory operand fetched for INVVPID is 128 bits. Bits 63:16 are reserved and must be zero. Otherwise, the instruction fails with VMfail(Invalid operand to INVEPT/INVVPID). If the INVVPID_TYPE is 0 (individual address invalidation), then bits 127:64 must be in canonical form, or the instruction fails with VMfail(Invalid operand to INVEPT/INVVPID). Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit df65c1bcd9b7b639177a5a15da1b8dc3bee4f5fa Author: Thomas Gleixner Date: Thu Mar 16 22:50:07 2017 +0100 x86/PCI: Select CONFIG_PCI_LOCKLESS_CONFIG All x86 PCI configuration space accessors have either their own serialization or can operate completely lockless (ECAM). Disable the global lock in the generic PCI configuration space accessors. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Cc: Andi Kleen Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Borislav Petkov Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20170316215057.295079391@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/Kconfig | 1 + arch/x86/pci/common.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 714fe383d6c9bd95d0d2cad8cbeff3688342d025 Author: Thomas Gleixner Date: Thu Mar 16 22:50:06 2017 +0100 PCI: Provide Kconfig option for lockless config space accessors The generic PCI configuration space accessors are globally serialized via pci_lock. On larger systems this causes massive lock contention when the configuration space has to be accessed frequently. One such access pattern is the Intel Uncore performance counter unit. Provide a kernel config option which can be selected by an architecture when the low level PCI configuration space accessors in the architecture use their own serialization or can operate completely lockless. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Cc: Andi Kleen Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Borislav Petkov Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20170316215057.205961140@linutronix.de Signed-off-by: Thomas Gleixner drivers/pci/Kconfig | 3 +++ drivers/pci/access.c | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) commit bb290fda879ffd1f6f6b0869bf7335554093f4bd Author: Thomas Gleixner Date: Thu Mar 16 22:50:05 2017 +0100 x86/PCI/ce4100: Properly lock accessor functions x86 wants to get rid of the global pci_lock protecting the config space accessors so ECAM mode can operate completely lockless, but the CE4100 PCI code relies on that to protect the simulation registers. Restructure the code so it uses the x86 specific pci_config_lock to serialize the inner workings of the CE4100 PCI magic. That allows to remove the global locking via pci_lock later. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Cc: Andi Kleen Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Borislav Petkov Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20170316215057.126873574@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/pci/ce4100.c | 87 ++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 39 deletions(-) commit aae3e318d012e76211f34bb65754f3d4d2a8c93d Author: Thomas Gleixner Date: Thu Mar 16 22:50:04 2017 +0100 x86/PCI: Abort if legacy init fails If the legacy PCI init fails, then there are no PCI config space accesors available, but the code continues and tries to scan the busses, which fails due to the lack of config space accessors. Return right away, if the last init fallback fails. Switch the few printks to pr_info while at it. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Cc: Andi Kleen Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Borislav Petkov Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20170316215057.047576516@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/pci/legacy.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 9304d1621e6019c63497f8a4aad09d003916dbe9 Author: Thomas Gleixner Date: Thu Mar 16 22:50:03 2017 +0100 x86/PCI: Remove duplicate defines For some historic reason these defines are duplicated and also available in arch/x86/include/asm/pci_x86.h, Remove them. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Cc: Andi Kleen Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Borislav Petkov Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20170316215056.967808646@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/pci.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 675734baa361cf044033bb60594dea33d8d8da36 Author: Bjorn Helgaas Date: Tue Mar 21 13:01:30 2017 -0500 PCI: Enable ECRC only if device supports it John reported that an Intel QuickAssist crypto accelerator didn't work in a Dell PowerEdge R730. The problem seems to be that we enabled ECRC when the device doesn't support it: 85:00.0 Co-processor [0b40]: Intel Corporation DH895XCC Series QAT [8086:0435] Capabilities: [100 v1] Advanced Error Reporting AERCap: First Error Pointer: 00, GenCap- CGenEn+ ChkCap- ChkEn+ 1302fcf0d03e ("PCI: Configure *all* devices, not just hot-added ones") exposed the problem because it applies settings from the _HPX method to all devices, not just hot-added ones. The R730 supplies an _HPX method that allows the kernel to enable ECRC. Only enable ECRC if the device advertises support for it. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1571798 Fixes: 1302fcf0d03e ("PCI: Configure *all* devices, not just hot-added ones") Reported-by: John Mazzie Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 5 +++++ 1 file changed, 5 insertions(+) commit 97ad2bdcbe8598a69ee1f372ed6c0fbdb2869218 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:55 2017 -0500 ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge() The introduction of pci_scan_root_bus_bridge() provides a PCI core API to scan a PCI root bus backed by an already initialized struct pci_host_bridge object, which simplifies the bus scan interface and makes the PCI scan root bus interface easier to generalize as members are added to the struct pci_host_bridge. Convert ARM bios32 code to pci_scan_root_bus_bridge() to improve the PCI root bus scanning interface. Signed-off-by: Lorenzo Pieralisi [bhelgaas: fold in warning fix from Arnd Bergmann : http://lkml.kernel.org/r/20170621215323.3921382-1-arnd@arndb.de] [bhelgaas: set bridge->ops for mv78xx0] [bhelgaas: fold in fixes from Lorenzo Pieralisi : http://lkml.kernel.org/r/20170701135457.GB8977@red-moon] Signed-off-by: Bjorn Helgaas Cc: Jason Cooper Cc: Russell King Cc: Andrew Lunn arch/arm/include/asm/mach/pci.h | 3 ++- arch/arm/kernel/bios32.c | 39 +++++++++++++++++++++++++-------------- arch/arm/mach-dove/pcie.c | 17 ++++++++++++----- arch/arm/mach-iop13xx/pci.c | 31 ++++++++++++++++++++----------- arch/arm/mach-iop13xx/pci.h | 3 ++- arch/arm/mach-mv78xx0/pcie.c | 16 +++++++++++----- arch/arm/mach-orion5x/common.h | 3 ++- arch/arm/mach-orion5x/pci.c | 25 +++++++++++++++++-------- 8 files changed, 91 insertions(+), 46 deletions(-) commit cea9bc0be624fb0dc488cb10df40be1323b6b758 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:55 2017 -0500 PCI: Make pci_register_host_bridge() PCI core internal With the introduction of pci_scan_root_bus_bridge() there is no need to export pci_register_host_bridge() to other kernel subsystems other than the PCI compilation unit that needs it. Make pci_register_host_bridge() static to its compilation unit and convert the existing drivers usage over to pci_scan_root_bus_bridge(). Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Arnd Bergmann drivers/pci/host/pci-ftpci100.c | 5 ++--- drivers/pci/host/pci-tegra.c | 4 +--- drivers/pci/probe.c | 3 +-- include/linux/pci.h | 1 - 4 files changed, 4 insertions(+), 9 deletions(-) commit 1228c4b6c19a76a2691cfb1403ad1eebf5852b76 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:55 2017 -0500 PCI: Add pci_scan_root_bus_bridge() interface The current pci_scan_root_bus() interface is made up of two main code paths: - pci_create_root_bus() - pci_scan_child_bus() pci_create_root_bus() is a wrapper function that allows to create a struct pci_host_bridge structure, initialize it with the passed parameters and register it with the kernel. As the struct pci_host_bridge require additional struct members, pci_create_root_bus() parameters list has grown in time, making it unwieldy to add further parameters to it in case the struct pci_host_bridge gains more members fields to augment its functionality. Since PCI core code provides functions to allocate struct pci_host_bridge, instead of forcing the pci_create_root_bus() interface to add new parameters to cater for new struct pci_host_bridge functionality, it is more suitable to add an interface in PCI core code to scan a PCI bus straight from a struct pci_host_bridge created and customized by each specific PCI host controller driver. Add a pci_scan_root_bus_bridge() function to allow PCI host controller drivers to create and initialize struct pci_host_bridge and scan the resulting bus. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Arnd Bergmann drivers/pci/probe.c | 39 +++++++++++++++++++++++++++++++++++++++ include/linux/pci.h | 1 + 2 files changed, 40 insertions(+) commit 792abc6e2f5a5ab996bf6cc1947b382dda29a82d Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:54 2017 -0500 PCI: tegra: Fix host bridge memory leakage When probing the PCI host controller driver, if an error occurs, the probe function code does not free memory allocated for the struct pci_host_bridge resulting in memory leakage. Move the struct pci_host_bridge allocation over to the respective devm interface to fix the issue. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Arnd Bergmann drivers/pci/host/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aa17a772084e192a2364340794f0d44ac73dd4c Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:53 2017 -0500 PCI: faraday: Fix host bridge memory leakage When probing the PCI host controller driver, if an error occurs, the probe function code does not free memory allocated for the struct pci_host_bridge resulting in memory leakage. Move the struct pci_host_bridge allocation over to the respective devm interface to fix the issue. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Linus Walleij Cc: Arnd Bergmann drivers/pci/host/pci-ftpci100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c3f18cce08364ef68163228c0b42725d64cd353 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:53 2017 -0500 PCI: Add devm_pci_alloc_host_bridge() interface Struct pci_host_bridge can be allocated by PCI host bridge drivers which usually allocate and map memory through devm managed interfaces. Add a devm version for the pci_alloc_host_bridge() interface to simplify PCI host controller driver porting and simplify the driver failure paths. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Arnd Bergmann Documentation/driver-model/devres.txt | 1 + drivers/pci/probe.c | 24 ++++++++++++++++++++++-- include/linux/pci.h | 2 ++ 3 files changed, 25 insertions(+), 2 deletions(-) commit dff79b91b8f3279cbe60727368adff1f3a5ab16e Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:52 2017 -0500 PCI: Add pci_free_host_bridge() interface Commit a52d1443bba1 ("PCI: Export host bridge registration interface") exported the pci_alloc_host_bridge() interface so that PCI host controllers drivers can make use of it. Introduce pci_alloc_host_bridge() kernel counterpart to free the host bridge data structures, pci_free_host_bridge(), export it and update kernel functions releasing host bridge objects allocated memory to make use of it. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Arnd Bergmann drivers/pci/probe.c | 12 +++++++++--- include/linux/pci.h | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) commit a1c0050a17f58279480e32b4aa5068282c6982bb Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:52 2017 -0500 PCI: Initialize bridge release function at bridge allocation The introduction of pci_register_host_bridge() kernel interface allows PCI host controller drivers to create the struct pci_host_bridge object, initialize it and register it with the kernel so that its corresponding PCI bus can be scanned and its devices probed. The host bridge device release function pci_release_host_bridge_dev() is a static function common for all struct pci_host_bridge allocated objects, so in its current form cannot be used by PCI host bridge controllers drivers to initialize the allocated struct pci_host_bridge, which leaves struct pci_host_bridge devices release function uninitialized. Since pci_release_host_bridge_dev() is a function common to all PCI host bridge objects, initialize it in pci_alloc_host_bridge() (ie common host bridge allocation interface) so that all struct pci_host_bridge objects have their release function initialized by default at allocation time, removing the need for exporting the common pci_release_host_bridge_dev() function to other compilation units. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Arnd Bergmann drivers/pci/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1e8bd21e39ed51d1c5b69f29eee05ceb06b7fb4 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:51 2017 -0500 PCI: faraday: Convert IRQ masking to raw PCI config accessors Current ftpci100 driver host bridge controller driver requires struct pci_bus to be created in order to mask and clear IRQs using standard PCI bus config accessors. This struct pci_bus dependency is fictitious and burdens the driver with unneeded constraints (eg to use separate APIs to create and scan the root bus). Add PCI raw config space accessors to PCIe ftpci100 driver and remove the fictitious struct pci_bus dependency. Signed-off-by: Lorenzo Pieralisi [bhelgaas: folded in raw PCI read accessor from http://lkml.kernel.org/r/20170621162651.25315-1-linus.walleij@linaro.org The clock piece of the above posting goes with the separate "Add clock handling" patch.] Signed-off-by: Bjorn Helgaas Acked-by: Linus Walleij drivers/pci/host/pci-ftpci100.c | 81 ++++++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 33 deletions(-) commit 022adcfc4666a375185d14a43d1de1cdc58d8905 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:50 2017 -0500 PCI: iproc: Convert link check to raw PCI config accessors The current iproc driver host bridge controller driver requires struct pci_bus to be created in order to carry out PCI link checks with standard PCI config space accessors. This struct pci_bus dependency is fictitious and burdens the driver with unneeded constraints (eg to use separate APIs to create and scan the root bus). Add PCI raw config space accessors to the iproc driver and remove the fictitious struct pci_bus dependency. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Scott Branden Cc: Ray Jui Cc: Jon Mason drivers/pci/host/pcie-iproc.c | 94 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 20 deletions(-) commit 5cbd6784823f8b163ba7e88f71cd507285be72a6 Author: Lorenzo Pieralisi Date: Wed Jun 28 15:13:50 2017 -0500 PCI: xilinx-nwl: Remove nwl_pcie_enable_msi() unused bus parameter The nwl_pcie_enable_msi() second parameter (ie "bus") is unused and creates a fake dependency on the struct pci_bus that need not exist. Remove it. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Bharat Kumar Gogada drivers/pci/host/pcie-xilinx-nwl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7204e97685634813d8456f1900b7f38fa7701e60 Author: John Stultz Date: Tue Jun 13 14:59:49 2017 -0700 drm: adv7511_audio: Add .get_dai_id callback to map port number to dai id ALSA SoC needs to know connected DAI ID for probing. Using the new audio-card-graph approach, ports/endpoints are used to describe how the links are connected. Unfortunately, since ports/endpoints are used as well for video linkages, there are some issues mixing the port ids to the two (video and audio) namespaces. To solve this issue, this patch adds new .get_dai_id callback on hdmi_codec_ops. The will assume that HDMI audio out will be connected to reg = <2>. This will then be remapped to the ALSA SoC side will as DAI 0. Allowing the adv7511's hdmi audio support to be used with the audio-card-graph. Credit to Kuninori Morimoto who's patch to dw-hdmi-i2s-audio.c was what this was mostly copy-pasted from. Cc: Kuninori Morimoto Cc: Archit Taneja Cc: Mark Brown Cc: Rob Herring Cc: David Airlie Cc: Lars-Peter Clausen Cc: Linux-ALSA Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz Signed-off-by: Mark Brown .../bindings/display/bridge/adi,adv7511.txt | 8 ++++++++ drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit 5d6dee80a1e94cc284d03e06d930e60e8d3ecf7d Author: Alex Williamson Date: Wed Jun 28 13:50:05 2017 -0600 vfio: New external user group/file match At the point where the kvm-vfio pseudo device wants to release its vfio group reference, we can't always acquire a new reference to make that happen. The group can be in a state where we wouldn't allow a new reference to be added. This new helper function allows a caller to match a file to a group to facilitate this. Given a file and group, report if they match. Thus the caller needs to already have a group reference to match to the file. This allows the deletion of a group without acquiring a new reference. Signed-off-by: Alex Williamson Reviewed-by: Eric Auger Reviewed-by: Paolo Bonzini Tested-by: Eric Auger Cc: stable@vger.kernel.org drivers/vfio/vfio.c | 9 +++++++++ include/linux/vfio.h | 2 ++ virt/kvm/vfio.c | 27 +++++++++++++++++++-------- 3 files changed, 30 insertions(+), 8 deletions(-) commit e323369b2e204da4dc771bbddceef986f4bf85d5 Author: Alex Williamson Date: Wed Jun 28 13:49:52 2017 -0600 kvm-vfio: Decouple only when we match a group Unset-KVM and decrement-assignment only when we find the group in our list. Otherwise we can get out of sync if the user triggers this for groups that aren't currently on our list. Signed-off-by: Alex Williamson Reviewed-by: Alexey Kardashevskiy Reviewed-by: Eric Auger Tested-by: Eric Auger Acked-by: Paolo Bonzini Cc: stable@vger.kernel.org virt/kvm/vfio.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 811642d8d8a82c0cce8dc2debfdaf23c5a144839 Author: Alex Williamson Date: Mon Jun 19 09:10:32 2017 -0600 vfio: Fix group release deadlock If vfio_iommu_group_notifier() acquires a group reference and that reference becomes the last reference to the group, then vfio_group_put introduces a deadlock code path where we're trying to unregister from the iommu notifier chain from within a callout of that chain. Use a work_struct to release this reference asynchronously. Signed-off-by: Alex Williamson Reviewed-by: Eric Auger Tested-by: Eric Auger Cc: stable@vger.kernel.org drivers/vfio/vfio.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit e3839bd6f56a291f00a4c3737eb15ca0344a82a9 Author: Kuninori Morimoto Date: Mon Jun 19 00:39:29 2017 +0000 drm: dw-hdmi-i2s: add .get_dai_id callback for ALSA SoC ALSA SoC needs to know connected DAI ID for probing. It is not a big problem if device/driver was only for sound, but getting DAI ID will be difficult if device includes both Video/Sound, like HDMI. To solve this issue, this patch adds new .get_dai_id callback on hdmi_codec_ops. dw-hdmi-i2s will assume that HDMI sound will be connected to reg = <2>. Then, ALSA SoC side will recognized it as DAI 0 ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; /* HDMI Video IN */ }; port@1 { reg = <1>; /* HDMI OUT */ }; port@2 { reg = <2>; /* HDMI Sound IN */ }; }; Signed-off-by: Kuninori Morimoto Acked-by: Archit Taneja Signed-off-by: Mark Brown .../bindings/display/bridge/renesas,dw-hdmi.txt | 9 ++++++++- drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) commit 2c2874b191d54fbf9216524e629558eee89e1d20 Author: Tirupathi Reddy Date: Thu May 25 15:33:17 2017 +0530 regulator: core: Fix voltage change propagations to supply regulators Some regulators support get_voltage() and some support get_voltage_sel() operations but currently we only propagate changes if the regulator has a get_voltage() operation. Also do this if we've got get_voltage_sel() [Rewite commit message for clarity -- broonie] Signed-off-by: Tirupathi Reddy Signed-off-by: Mark Brown drivers/regulator/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 704c3098e4c55a409eaf5ec89cee1bccc8d44f4c Author: Arvind Yadav Date: Tue Jun 20 15:00:53 2017 +0530 spi: loopback-test: Fix kfree() NULL pointer error. Here, rx/tx allocation can fail. So avoid kvfree call with NULL pointer. Signed-off-by: Arvind Yadav Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a71411dbf6c82ba2eb2519717c04ffb19bc4dda5 Author: Michael Grzeschik Date: Fri Jun 23 14:35:09 2017 +0200 regmap: irq: add chip option mask_writeonly Some irq controllers have writeonly/multipurpose register layouts. In those cases we read invalid data back. Here we add the option mask_writeonly as masking option. Signed-off-by: Michael Grzeschik Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 40 +++++++++++++++++++++++++--------------- include/linux/regmap.h | 2 ++ 2 files changed, 27 insertions(+), 15 deletions(-) commit fdcbe65d618af080ee23229f0137ffd37f2de36b Merge: 3334c28 6788a38 Author: Kalle Valo Date: Wed Jun 28 22:10:48 2017 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.13. Major changes: Only bugfixes or cleanups, no new features. commit 3334c28ec56cfaa7c25931711eb2bda4a92d0712 Author: Colin Ian King Date: Wed Jun 28 16:50:54 2017 +0100 mwifiex: fix spelling mistake: "secuirty" -> "security" Trivial fix to spelling mistake in mwifiex_dbg message Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 478de2ba0d2dafcd460b17f032139e2b6b4eb1ac Author: Colin Ian King Date: Mon Jun 26 14:42:31 2017 +0100 spi: loopback-test: fix spelling mistake: "reruning" -> "rerunning" trivial fix to spelling mistake in dev_info error message Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d781e89e2b2f2195a8ef06fdc5325e46f26c8eb Author: Colin Ian King Date: Mon Jun 26 14:39:12 2017 +0100 spi: sirf: fix spelling mistake: "registerred" -> "registered" Trivial fix to spelling mistake in dev_info message Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-sirf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 105e56f1ec335ab62b920882e755da49e81e5b60 Author: Bard Liao Date: Tue Jun 27 10:05:29 2017 +0800 ASoC: rt5645: enable speaker protection features This patch is uploaded for enabling the speaker protection features of the audio codec. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5800b6970c6408d77c0286cba715d506313a2043 Author: Bard Liao Date: Tue Jun 27 10:28:44 2017 +0800 ASoC: rt5651: remove unexisting Muxes These MUXes are unexisting. So, remove them. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) commit 7b821a6485c943edc752a94260a29116237f9153 Author: Amelie Delaunay Date: Tue Jun 27 17:45:20 2017 +0200 spi: stm32: fix potential dereference null return value This patch fixes the usage of rx_dma_desc and tx_dma_desc pointers returned by dmaengine_prep_slave_sg, which can be null. Detected by CoverityScan, CID#1446587 ("Dereference null return value") Reported-by: Colin Ian King Signed-off-by: Amelie Delaunay Signed-off-by: Mark Brown drivers/spi/spi-stm32.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c67ad368cf75d4999d5ef86543d082b4b35dd2d7 Author: Amelie Delaunay Date: Tue Jun 27 17:45:19 2017 +0200 spi: stm32: enhance DMA error management This patch reworks DMA error management. In case the DMA callback is called while EOT (End Of Transfer) flag is not set, that means that DMA encountered an error. This error will result in an auto-suspend of SPI flow, which could also result in an overrun. So, in DMA mode, SUSP and OVR flags are a condition to stop the current transfer. Moreover, stm32_spi_can_dma doesn't care about the state of dma channels. During driver probe, master->can_dma is initialised if dma channel request is successful. That's why we must use master->can_dma to know if dma use is possible (dma channel are successfully requested and the transfer size is greater than fifo size). Signed-off-by: Amelie Delaunay Signed-off-by: Mark Brown drivers/spi/spi-stm32.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 038ac869c9d27fceb6197e775d780ad6aeb45b1f Author: Amelie Delaunay Date: Tue Jun 27 17:45:18 2017 +0200 spi: stm32: add runtime PM support This patch reworks suspend and resume callbacks and add runtime_suspend and runtime_resume callbacks. Signed-off-by: Amelie Delaunay Signed-off-by: Mark Brown drivers/spi/spi-stm32.c | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) commit 128ebb89c50e5452704de82d78845baeb3333c24 Author: Amelie Delaunay Date: Tue Jun 27 17:45:17 2017 +0200 spi: stm32: use normal conditional statements instead of ternary operator This patch replace ternary operator use by normal condition statements to ease code reading. It also removes redundant !!. Signed-off-by: Amelie Delaunay Signed-off-by: Mark Brown drivers/spi/spi-stm32.c | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) commit 042c1c60df7b85488de28574e7917b7977be3b00 Author: Amelie Delaunay Date: Tue Jun 27 17:45:16 2017 +0200 spi: stm32: replace st, spi-midi with st, spi-midi-ns to fit bindings This patch fixes the optional dt property used to set master inter-data idleness. Signed-off-by: Amelie Delaunay Signed-off-by: Mark Brown drivers/spi/spi-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fd3d9433217908e1e8e1c2f841c3b28c75509d6 Author: Amelie Delaunay Date: Tue Jun 27 17:45:15 2017 +0200 spi: stm32: fix example with st, spi-midi-ns property This patch aligns example with the optional property description, removes status and replace spidev unvalid compatible with Aarvark SPI Host Adapter one. In slave mode, Aardvark SPI Host Adapter requires 4ms delay between the end of byte n and the start of byte n+1, hence the use of the optional property st,spi-midi-ns. Signed-off-by: Amelie Delaunay Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-stm32.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c5fe2faabad41737fa36cedc1c6e15cbc9ddff11 Author: Amelie Delaunay Date: Tue Jun 27 17:45:14 2017 +0200 spi: stm32: fix compatible to fit with new bindings This patch updates of_device_id compatible string to fit with new bindings. Signed-off-by: Amelie Delaunay Signed-off-by: Mark Brown drivers/spi/spi-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 567300d11ef54f7779aa7324510fd4dbd470f73e Author: Amelie Delaunay Date: Tue Jun 27 17:45:13 2017 +0200 spi: stm32: use SoC specific compatible This patch replaces st,stm32-spi compatible with st,stm32h7-spi SoC specific compatible and updates the example accondingly. Signed-off-by: Amelie Delaunay Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-stm32.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5136f6365ce3eace5a926e10f16ed2a233db5ba9 Author: Tejun Heo Date: Tue Jun 27 14:30:28 2017 -0400 cgroup: implement "nsdelegate" mount option Currently, cgroup only supports delegation to !root users and cgroup namespaces don't get any special treatments. This limits the usefulness of cgroup namespaces as they by themselves can't be safe delegation boundaries. A process inside a cgroup can change the resource control knobs of the parent in the namespace root and may move processes in and out of the namespace if cgroups outside its namespace are visible somehow. This patch adds a new mount option "nsdelegate" which makes cgroup namespaces delegation boundaries. If set, cgroup behaves as if write permission based delegation took place at namespace boundaries - writes to the resource control knobs from the namespace root are denied and migration crossing the namespace boundary aren't allowed from inside the namespace. This allows cgroup namespace to function as a delegation boundary by itself. v2: Silently ignore nsdelegate specified on !init mounts. Signed-off-by: Tejun Heo Cc: Aravind Anbudurai Cc: Serge Hallyn Cc: Eric Biederman Documentation/cgroup-v2.txt | 61 +++++++++++++++++++++---------- include/linux/cgroup-defs.h | 9 +++++ kernel/cgroup/cgroup.c | 88 ++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 135 insertions(+), 23 deletions(-) commit 824ecbe01c5d833b8c8a371c209e3ac3a76cd18a Author: Tejun Heo Date: Sun Jun 25 00:27:59 2017 -0400 cgroup: restructure cgroup_procs_write_permission() Restructure cgroup_procs_write_permission() to make extending permission logic easier. This patch doesn't cause any functional changes. Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 57 +++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 24 deletions(-) commit aa099382ac0cda27e10fa8f45bf91edea0d1d35e Author: Jeffy Chen Date: Wed Jun 28 12:38:43 2017 +0800 spi: rockchip: Disable Runtime PM when chip select is asserted The rockchip spi would stop driving pins when runtime suspended, which might break slave's xfer(for example cros_ec). Since we have pullups on those pins, we only need to care about this when the CS asserted. So let's keep the spi alive when chip select is asserted. Also use pm_runtime_put instead of pm_runtime_put_sync. Suggested-by: Doug Anderson Signed-off-by: Jeffy Chen Reviewed-by: Douglas Anderson Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 51 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 25 deletions(-) commit c863795c4c0787e5f885099e3b673e1433448b82 Author: Jeffy Chen Date: Wed Jun 28 12:38:42 2017 +0800 spi: rockchip: Set GPIO_SS flag to enable Slave Select with GPIO CS The rockchip spi still requires slave selection when using GPIO CS. Signed-off-by: Jeffy Chen Reviewed-by: Douglas Anderson Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 1 + 1 file changed, 1 insertion(+) commit 6c28ce3c425e32d372c7c6ee98d3c3711f13ad69 Author: Bard Liao Date: Wed Jun 28 15:38:02 2017 +0800 ASoC: rt5670: move set_sysclk to codec level Move set_sysclk to codec level and people can use it at both codec and dai level. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 90384fcc054f701e17e9cbbff5c14db5f877c614 Author: Bard Liao Date: Wed Jun 28 15:38:01 2017 +0800 ASoC: rt5670: remove duplicate route. { "ADC Stereo1 Filter", NULL, "PLL1", is_sys_clk_from_pll }, and { "ADC Stereo2 Filter", NULL, "PLL1", is_sys_clk_from_pll }, are defined twice in the driver. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 2 -- 1 file changed, 2 deletions(-) commit 8e2d163b736e719ef850493ac7740a61d30b8f23 Author: Bard Liao Date: Wed Jun 28 15:38:00 2017 +0800 ASoC: rt5670: fix wrong audio route When we select "IF1_ADC4" for IF1 ADC Muxes, it is actually connected to "TxDP_ADC" widget. This patch fixes the audio route and remove the unexisting "IF1_ADC4" widget. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2d6491a56c76f2d6c22aaa710e2a4d04ad41529b Author: Chuck Lever Date: Fri Jun 23 17:18:08 2017 -0400 svcrdma: Don't account for Receive queue "starvation" >From what I can tell, calling ->recvfrom when there is no work to do is a normal part of operation. This is the only way svc_recv can tell when there is no more data ready to receive on the transport. Neither the TCP nor the UDP transport implementations have a "starve" metric. The cost of receive starvation accounting is bumping an atomic, which results in extra (IMO unnecessary) bus traffic between CPU sockets, while holding a spin lock. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit ca5c76aba7502d52a6019358ec04bd4d734037d7 Author: Chuck Lever Date: Fri Jun 23 17:18:00 2017 -0400 svcrdma: Improve Reply chunk sanity checking Identify malformed transport headers and unsupported chunk combinations as early as possible. - Ensure that segment lengths are not crazy. - Ensure that the Reply chunk's segment count is not crazy. With a 1KB inline threshold, the largest number of Write segments that can be conveyed is about 60 (for a RDMA_NOMSG Reply message). Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 3c22f326074d2306041b0c5c9df516464349564d Author: Chuck Lever Date: Fri Jun 23 17:17:52 2017 -0400 svcrdma: Improve Write chunk sanity checking Identify malformed transport headers and unsupported chunk combinations as early as possible. - Reject RPC-over-RDMA messages that contain more than one Write chunk, since this implementation does not support more than one per message. - Ensure that segment lengths are not crazy. - Ensure that the chunk's segment count is not crazy. With a 1KB inline threshold, the largest number of Write segments that can be conveyed is about 60 (for a RDMA_NOMSG Reply message). Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 52 +++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 5 deletions(-) commit e77340e00300df9b6591d686f186eea60c67206f Author: Chuck Lever Date: Fri Jun 23 17:17:44 2017 -0400 svcrdma: Improve Read chunk sanity checking Identify malformed transport headers and unsupported chunk combinations as early as possible. - Reject RPC-over-RDMA messages that contain more than one Read chunk, since this implementation currently does not support more than one per RPC transaction. - Ensure that segment lengths are not crazy. - Remove the segment count check. With a 1KB inline threshold, the largest number of Read segments that can be conveyed is about 40 (for a RDMA_NOMSG Call message). This is nowhere near RPCSVC_MAXPAGES. As far as I can tell, that was just a sanity check and does not enforce an implementation limit. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 55 ++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 18 deletions(-) commit a80a32341fbabd4276165a9ce4fa4c80168c0bef Author: Chuck Lever Date: Fri Jun 23 17:17:35 2017 -0400 svcrdma: Remove svc_rdma_marshal.c svc_rdma_marshal.c has one remaining exported function -- svc_rdma_xdr_decode_req -- and it has a single call site. Take the same approach as the sendto path, and move this function into the source file where it is called. This is a refactoring change only. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 3 - net/sunrpc/xprtrdma/Makefile | 4 +- net/sunrpc/xprtrdma/svc_rdma_marshal.c | 168 -------------------------------- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 126 ++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 173 deletions(-) commit 107c1d0a991abe632a051de697c5acc33c03fd96 Author: Chuck Lever Date: Fri Jun 23 17:17:24 2017 -0400 svcrdma: Avoid Send Queue overflow Sanity case: Catch the case where more Work Requests are being posted to the Send Queue than there are Send Queue Entries. This might happen if a client sends a chunk with more segments than there are SQEs for the transport. The server can't send that reply, so the transport will deadlock unless the client drops the RPC. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_rw.c | 5 +++++ net/sunrpc/xprtrdma/svc_rdma_sendto.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit 91a08eae7979417bf10c98f149c6ea28e6632114 Author: Chuck Lever Date: Fri Jun 23 17:17:15 2017 -0400 svcrdma: Squelch disconnection messages The server displays "svcrdma: failed to post Send WR (-107)" in the kernel log when the client disconnects. This could flood the server's log, so remove the message. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_sendto.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 06eb8a56af23ae32e90fdd6b27fec30930364b52 Author: Chuck Lever Date: Mon Jun 19 14:00:40 2017 -0400 sunrpc: Disable splice for krb5i Running a multi-threaded 8KB fio test (70/30 mix), three or four out of twelve of the jobs fail when using krb5i. The failure is an EIO on a read. Troubleshooting confirmed the EIO results when the client fails to verify the MIC of an NFS READ reply. Bruce suggested the problem could be due to the data payload changing between the time the reply's MIC was computed on the server and the time the reply was actually sent. krb5p gets around this problem by disabling RQ_SPLICE_OK. Use the same mechanism for krb5i RPCs. "iozone -i0 -i1 -s128m -y1k -az -I", export is tmpfs, mount is sec=krb5i,vers=3,proto=rdma. The important numbers are the read / reread column. Here's without the RQ_SPLICE_OK patch: kB reclen write rewrite read reread 131072 1 7546 7929 8396 8267 131072 2 14375 14600 15843 15639 131072 4 19280 19248 21303 21410 131072 8 32350 31772 35199 34883 131072 16 36748 37477 49365 51706 131072 32 55669 56059 57475 57389 131072 64 74599 75190 74903 75550 131072 128 99810 101446 102828 102724 131072 256 122042 122612 124806 125026 131072 512 137614 138004 141412 141267 131072 1024 146601 148774 151356 151409 131072 2048 180684 181727 293140 292840 131072 4096 206907 207658 552964 549029 131072 8192 223982 224360 454493 473469 131072 16384 228927 228390 654734 632607 And here's with it: kB reclen write rewrite read reread 131072 1 7700 7365 7958 8011 131072 2 13211 13303 14937 14414 131072 4 19001 19265 20544 20657 131072 8 30883 31097 34255 33566 131072 16 36868 34908 51499 49944 131072 32 56428 55535 58710 56952 131072 64 73507 74676 75619 74378 131072 128 100324 101442 103276 102736 131072 256 122517 122995 124639 124150 131072 512 137317 139007 140530 140830 131072 1024 146807 148923 151246 151072 131072 2048 179656 180732 292631 292034 131072 4096 206216 208583 543355 541951 131072 8192 223738 224273 494201 489372 131072 16384 229313 229840 691719 668427 I would say that there is not much difference in this test. For good measure, here's the same test with sec=krb5p: kB reclen write rewrite read reread 131072 1 5982 5881 6137 6218 131072 2 10216 10252 10850 10932 131072 4 12236 12575 15375 15526 131072 8 15461 15462 23821 22351 131072 16 25677 25811 27529 27640 131072 32 31903 32354 34063 33857 131072 64 42989 43188 45635 45561 131072 128 52848 53210 56144 56141 131072 256 59123 59214 62691 62933 131072 512 63140 63277 66887 67025 131072 1024 65255 65299 69213 69140 131072 2048 76454 76555 133767 133862 131072 4096 84726 84883 251925 250702 131072 8192 89491 89482 270821 276085 131072 16384 91572 91597 361768 336868 BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=307 Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields net/sunrpc/auth_gss/svcauth_gss.c | 8 ++++++++ net/sunrpc/svc.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit 059c98599b1ab1e2e479e1f4617948d4c2a32b84 Author: Gustavo A. R. Silva Date: Mon Jun 26 18:06:19 2017 -0500 wl18xx: add checks on wl18xx_top_reg_write() return value Check return value from call to wl18xx_top_reg_write(), so in case of error jump to goto label out and return. Also, remove unnecessary value check before goto label out. Addresses-Coverity-ID: 1226938 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/net/wireless/ti/wl18xx/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 69551f5f370cc20342fab17ca54716b6ec7e332d Author: Dan Carpenter Date: Fri Jun 23 18:17:38 2017 +0300 libertas: Fix lbs_prb_rsp_limit_set() The kstrtoul() test was reversed so this always returned -ENOTSUPP. Fixes: 27d7f47756f4 ("net: wireless: replace strict_strtoul() with kstrtoul()") Signed-off-by: Dan Carpenter Reviewed-by: James Cameron Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/mesh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3ac27dd37b40ae9a1a2690c91f27ab339b275142 Author: Bhumika Goyal Date: Fri Jun 23 17:13:19 2017 +0530 cw1200: add const to hwbus_ops structures Declare hwbus_ops structures as const as they are only passed as an argument to the function cw1200_core_probe. This argument is of type const. So, make these structures const. Signed-off-by: Bhumika Goyal Signed-off-by: Kalle Valo drivers/net/wireless/st/cw1200/cw1200_sdio.c | 2 +- drivers/net/wireless/st/cw1200/cw1200_spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 812a532655f56bcf70b8cc7345748534b56278c3 Author: John Hsu Date: Mon Jun 26 15:35:16 2017 +0800 ASoC: nau8825: debug message of crosstalk bypass Add debug message for crosstalk function bypass. Signed-off-by: John Hsu Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 2 ++ 1 file changed, 2 insertions(+) commit fd90f73a9925f248d696bde1cfc836d9fda5570d Author: Jeremie Rapin Date: Wed Jun 28 18:23:25 2017 +0200 USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick Added the USB serial device ID for the CEL ZigBee EM3588 radio stick. Signed-off-by: Jeremie Rapin Cc: stable Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 286345eef97ea8f4ea223410f025ed35f265e506 Author: Vijendar Mukunda Date: Fri Jun 23 12:35:00 2017 -0400 ASoC: dwc: Added a quirk DW_I2S_QUIRK_16BIT_IDX_OVERRIDE to dwc driver Added quirk DW_I2S_QUIRK_16BIT_IDX_OVERRIDE to Designware driver. This quirk will set idx value to 1. By setting this quirk, it will override supported format as 16 bit resolution and bus width as 2 Bytes. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Alex Deucher Signed-off-by: Mark Brown include/sound/designware_i2s.h | 1 + sound/soc/dwc/dwc-i2s.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 8cffb5034ee033fa292cb1ab7a082b57ce2c740b Author: Pierre-Louis Bossart Date: Fri Jun 23 12:21:01 2017 -0500 ASoC: codecs: rt5670: fix jd mode for Lenovo Miix 2 10 jd mode 2 (3.3V) is required apparently Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 58828680af495bc4863af3a006f2018c71714665 Author: Colin Ian King Date: Thu Jun 22 17:58:04 2017 +0100 rsi: add in missing RSI_FSM_STATES into array fsm_state Two recent commits added new RSI_FSM_STATES (namely FSM_FW_NOT_LOADED and FSM_COMMON_DEV_PARAMS_SENT) and the corresponding table fsm_state was not updated to match. This can lead to an array overrun when accessing the latter two states in fsm_state. Fix this by adding in the missing states. Detected by CoverityScan, CID#1398379 ("Illegal address computation") Fixes: 9920322ccd8e ("rsi: add tx frame for common device configuration") Fixes: 015e367494c1 ("rsi: Register interrupt handler before firmware load") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 21394d57feba712140762b91043a8a1436d7e2c7 Author: Arend Van Spriel Date: Thu Jun 22 11:01:04 2017 +0100 MAINTAINERS: add brcm80211 maintainer info from Cypress Since Cypress took over IoT part of Broadcom some chips supported by brcmfmac moved over as well. Adding maintainer info of our peers at Cypress to make their support official. Cc: Chi-Hsien Lin Cc: Wright Feng Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit 270a6c1f65fe68a28a5d39cd405592c550b496c7 Author: Arend Van Spriel Date: Thu Jun 22 11:01:03 2017 +0100 brcmfmac: rework headroom check in .start_xmit() Since commit 9cc4b7cb86cb ("brcmfmac: Make skb header writable before use") the headroom usage has been fixed. However, the driver was keeping statistics that got lost. So reworking the code so we get those driver statistics back for debugging. Cc: James Hughes Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 15 ++++++++++++-- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 23 +++++++++++++++------- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 13 +++++++----- 3 files changed, 37 insertions(+), 14 deletions(-) commit a833f3d4de53921263f6a060dbff08d5af926ba7 Author: Arend Van Spriel Date: Thu Jun 22 11:01:02 2017 +0100 brcmfmac: use atomic_t for statistic counter in struct brcmf_bus The statistic counter is used in common layer and in the bus layer in different thread contexts so change to use atomic operations. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ca2e99b2cae99570cade884e800153f5a2928335 Author: Arend Van Spriel Date: Thu Jun 22 11:01:01 2017 +0100 brcmfmac: cleanup kerneldoc for struct brcmf_bus A couple of old fields were still described and one field was not described. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4d7ab36f0c47c9ed5fa2391e77f3b3cb0e23c9dd Author: Ganapathi Bhat Date: Thu Jun 22 12:32:52 2017 +0530 mwifiex: Do not change bss_type in change_virtual_intf When user adds a virtual interface driver will set the bss_type to the iface_type given by the user. When supplicant is started on the same interface, a call to change_virtual_intf will be triggered if if_type is not NL80211_IFTYPE_STATION. Here driver should not update it's bss_type, because bss_type is intended to indicate the original iface_type and changing the same will defeat the purpose of creating this interface. Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 4 ---- 1 file changed, 4 deletions(-) commit 76f146b6645b79bb21a7bfdc0a903282f1160245 Author: Ping-Ke Shih Date: Wed Jun 21 12:15:38 2017 -0500 rtlwifi: Add in_4way field for btcoexist If wifi is in 4way, btcoex give wifi higher priority to use antenna. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) commit c76ab8e754426729199448ae1749e88fbbf04dd1 Author: Ping-Ke Shih Date: Wed Jun 21 12:15:37 2017 -0500 rtlwifi: Fill ap_num field by driver Check beacon and probe_resp frames to know ap_num Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 102 ++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtlwifi/base.h | 2 + drivers/net/wireless/realtek/rtlwifi/core.c | 3 + drivers/net/wireless/realtek/rtlwifi/pci.c | 3 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 13 ++++ 5 files changed, 123 insertions(+) commit f1cb27eda3a69099c4e2c9feb0d6c7e5d6ddf668 Author: Ping-Ke Shih Date: Wed Jun 21 12:15:36 2017 -0500 rtlwifi: Add ap_num field for btcoexist If there are many AP (dirty environment), we use another strategy set to resolve coex issue. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 5 +---- drivers/net/wireless/realtek/rtlwifi/pci.c | 1 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) commit 8488e211d665c8574ef78bf49adc35918b3b7d7d Author: Ping-Ke Shih Date: Wed Jun 21 12:15:35 2017 -0500 rtlwifi: Add return value to btc_set. We will use return value to handle error case. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 838dd0d3ffe644451f7492bc1f746d609c0baead Author: Ping-Ke Shih Date: Wed Jun 21 12:15:34 2017 -0500 rtlwifi: Update some cases in btc_get function -- roam, 5G, AP mode, and return value. Return value may be false in some situations. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 1024b31629bd8e296b71b97d7583f1d7a214ef84 Author: Ping-Ke Shih Date: Wed Jun 21 12:15:33 2017 -0500 rtlwifi: Modify power mode parameters of 8723be and 8821ae. Change the parameters suggested by FW. awake int: 2 smart_ps: 2 or 0 ps_mode: 2 (MAX -- every DTIM) Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit a70883920ea1070942255e1c32ef196707a12471 Author: Ping-Ke Shih Date: Wed Jun 21 12:15:32 2017 -0500 rtlwifi: Do IQK only once to reduce wifi occupy antenna Modify 8723be and 8192e only. 8812/8821 do IQK in DM, so we may do it later. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 7 +++++-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) commit 135f4fbd75d74ac2c945e3f2aef779ef0d5a29ac Author: Ping-Ke Shih Date: Wed Jun 21 12:15:31 2017 -0500 rtlwifi: Fix a2dp choppy while BT RSSI stays on threshold. In this case, BTC asks to enter/leave PS mode frequently to cause A2DP choppy. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/ps.c | 14 ++++++++------ drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 10 ++++++++-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 8 ++++++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 10 ++++++++-- 4 files changed, 30 insertions(+), 12 deletions(-) commit 3e3d8aa611076efc945687df30a3abf181989d1d Author: Colin Ian King Date: Wed Jun 21 14:25:30 2017 +0100 qtnfmac: fix uninitialized return code in ret The return value ret is unitialized and garbage is being returned for the three different error conditions when setting up the PCIe BARs. Fix this by initializing ret to -ENOMEM to indicate that the BARs failed to be setup correctly. Detected by CoverityScan, CID#1437563 ("Unitialized scalar variable") Signed-off-by: Colin Ian King Reviewed-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c25695ae88ce2683029c6c242d610e3b0e809efc Author: Pierre-Louis Bossart Date: Fri Jun 23 12:21:00 2017 -0500 ASoC: Intel: cht_bsw_rt5672: 19.2MHz clock for Baytrail platforms Lenovo platforms use RT5670 with Baytrail, add the required MCLK control and configuration to 19.2MHz Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5672.c | 89 +++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 9 deletions(-) commit 98faf436ee05503e258ee934a9de8d8a3472b40f Author: Mengdong Lin Date: Wed Jun 28 15:01:39 2017 +0800 ASoC: Drop invalid DMI fields when setting card long name from DMI info Sometimes DMI fields may be invalid and so can't give useful vendor, product or board info, such as "Type2 - Board Manufacturer" or "Type1 - TBD by OEM". Including such invalid DMI fileds may create silly card long name. So this patch creates a black list of invalid strings. And if a DMI field contains any string in this list, it will be excluded from the card long name. Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown sound/soc/soc-core.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) commit 81321fe9fb69004e71353a602f9d51f656469cdd Author: Dan Carpenter Date: Wed Jun 28 15:20:06 2017 +0300 ASoC: stm32: sai: remove some stray tabs This line was accidentally indented too far. Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87ff091c4061eae16c799af51030b539afec97ef Author: Corey Minyard Date: Wed Jun 28 12:44:35 2017 -0500 ipmi:ssif: Check dev before setting drvdata dev can be NULL. Reported-by: Austin Christ Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_ssif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a6ff8ddcf3f38ec84337e5e7eb3e0e9a73754cf5 Author: Hans de Goede Date: Wed Jun 28 15:01:24 2017 +0200 ASoC: rt5645: del btn_check_timer on remove The timer may still be running when rt5645_i2c_remove() gets called, call del_timer_sync() to make sure it is stopped. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 1 + 1 file changed, 1 insertion(+) commit 9a1d168e1bc2893120bb7c0d9932dd22f97d0b55 Merge: bb2a8b0 32c1431 Author: J. Bruce Fields Date: Wed Jun 28 13:34:15 2017 -0400 Merge tag 'v4.12-rc5' into nfsd tree Update to get f0c3192ceee3 "virtio_net: lower limit on buffer size". That bug was interfering with my nfsd testing. commit ea2b5a6e3a386b89d7f9148ff8be6c78d13542a0 Author: Takashi Iwai Date: Wed Jun 28 14:49:39 2017 +0200 ASoC: rt5645: Add jack detection workaround for GPD Win GPD Win requires jd_mode=3 and the inverted flag for making the jack detection working. Unfortunately, the BIOS doesn't give a nice way to match with DMI strings, and the only working way so far is to match with the board vendor/name/version/date to some known patterns. Hopefully other vendors won't do such a stupid setup, too... Thanks to Hans de Goede for the DMI matching suggestion. Suggested-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit aea086dda2d5df659a7c5d9efe85721e9442a133 Author: Bard Liao Date: Wed Jun 28 14:49:38 2017 +0200 ASoC: rt5645: add inv_jd1_1 flag The flag will invert jd1_1 status. Which will be used if the jack connector is normal closed. Signed-off-by: Bard Liao Tested-by: Hans de Goede Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown include/sound/rt5645.h | 2 ++ sound/soc/codecs/rt5645.c | 4 ++++ 2 files changed, 6 insertions(+) commit 895750228c9d3361ed82e9786322604de3232466 Author: Bard Liao Date: Wed Jun 28 14:49:37 2017 +0200 ASoC: rt5645: rename jd_invert flag in platform data The jd_invert flag is actually used for level triggered IRQ. Rename it to let code more readable. Signed-off-by: Bard Liao Tested-by: Hans de Goede Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown include/sound/rt5645.h | 4 ++-- sound/soc/codecs/rt5645.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 6b5da66322c50b4fa22f9343dcb968496f831361 Author: Bard Liao Date: Wed Jun 28 14:49:36 2017 +0200 ASoC: rt5645: read jd1_1 status for jd detection Read the jd status after invert control. The benefit is we don't need to invert the reading jd status when jd invert is needed. Signed-off-by: Bard Liao Tested-by: Hans de Goede Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) commit 6788a3832c706c541d8a8227076eddde47446c8a Author: Gustavo A. R. Silva Date: Mon Jun 26 18:26:58 2017 -0500 ath9k: remove useless variable assignment in ath_mci_intr() Value assigned to variable offset at line 551 is overwritten at line 562, before it can be used. This makes such variable assignment useless. Addresses-Coverity-ID: 1226941 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/mci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23de57975f1467ec1987a716a27b20c1bc665309 Author: Colin Ian King Date: Sun Jun 25 22:29:32 2017 +0100 ath10k: fix a bunch of spelling mistakes in messages Fix the following spelling mistakes in messages: syncronise -> synchronize unusally -> unusually addrress -> address inverval -> interval Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 +- drivers/net/wireless/ath/ath10k/pci.c | 2 +- drivers/net/wireless/ath/ath10k/sdio.c | 4 ++-- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit fd25d19f6b8da315332bb75936605fb45d3ea981 Author: Kees Cook Date: Wed Jun 21 13:00:26 2017 -0700 locking/refcount: Create unchecked atomic_t implementation Many subsystems will not use refcount_t unless there is a way to build the kernel so that there is no regression in speed compared to atomic_t. This adds CONFIG_REFCOUNT_FULL to enable the full refcount_t implementation which has the validation but is slightly slower. When not enabled, refcount_t uses the basic unchecked atomic_t routines, which results in no code changes compared to just using atomic_t directly. Signed-off-by: Kees Cook Acked-by: Greg Kroah-Hartman Cc: Alexey Dobriyan Cc: Andrew Morton Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: David S. Miller Cc: David Windsor Cc: Davidlohr Bueso Cc: Elena Reshetova Cc: Eric Biggers Cc: Eric W. Biederman Cc: Hans Liljestrand Cc: James Bottomley Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Manfred Spraul Cc: Peter Zijlstra Cc: Rik van Riel Cc: Serge E. Hallyn Cc: Thomas Gleixner Cc: arozansk@redhat.com Cc: axboe@kernel.dk Cc: linux-arch Link: http://lkml.kernel.org/r/20170621200026.GA115679@beast Signed-off-by: Ingo Molnar arch/Kconfig | 9 +++++++++ include/linux/refcount.h | 42 ++++++++++++++++++++++++++++++++++++++++++ lib/refcount.c | 3 +++ 3 files changed, 54 insertions(+) commit f23cdfb3fe8f6e3502b8aebb819edf5669c1d802 Author: Miaoqing Pan Date: Tue Jun 27 17:31:55 2017 +0300 ath9k: Use mutex_lock to avoid potential race in start/stop rng Move ath9k_rng_stop/ath9k_rng_start pair into critical section, use mutex_lock to void potential race accessing. Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 473becac4b310dd720a0f5e07ce149a09467f1a4 Author: Miaoqing Pan Date: Tue Jun 27 17:31:54 2017 +0300 ath9k: avoid potential freezing during random generator read In the worst case, ath9k_rng_stop() may take 10s to stop rng kthread. The time is too long for users, use wait_event_interruptible_timeout() instead of msleep_interruptible(), wakup immediately once kthread_should_stop() is true. Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/rng.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 07246c115801c27652700e3679bb58661ef7ed65 Author: Miaoqing Pan Date: Tue Jun 27 17:31:53 2017 +0300 ath9k: fix an invalid pointer dereference in ath9k_rng_stop() The bug was triggered when do suspend/resuming continuously on Dell XPS L322X/0PJHXN version 9333 (2013) with kernel 4.12.0-041200rc4-generic. But can't reproduce on DELL E5440 + AR9300 PCIE chips. The warning is caused by accessing invalid pointer sc->rng_task. sc->rng_task is not be cleared after kthread_stop(sc->rng_task) be called in ath9k_rng_stop(). Because the kthread is stopped before ath9k_rng_kthread() be scheduled. So set sc->rng_task to null after kthread_stop(sc->rng_task) to resolve this issue. WARNING: CPU: 0 PID: 984 at linux/kernel/kthread.c:71 kthread_stop+0xf1/0x100 CPU: 0 PID: 984 Comm: NetworkManager Not tainted 4.12.0-041200rc4-generic #201706042031 Hardware name: Dell Inc. Dell System XPS L322X/0PJHXN, BIOS A09 05/15/2013 task: ffff950170fdda00 task.stack: ffffa22c01538000 RIP: 0010:kthread_stop+0xf1/0x100 RSP: 0018:ffffa22c0153b5b0 EFLAGS: 00010246 RAX: ffffffffa6257800 RBX: ffff950171b79560 RCX: 0000000000000000 RDX: 0000000080000000 RSI: 000000007fffffff RDI: ffff9500ac9a9680 RBP: ffffa22c0153b5c8 R08: 0000000000000000 R09: 0000000000000000 R10: ffffa22c0153b648 R11: ffff9501768004b8 R12: ffff9500ac9a9680 R13: ffff950171b79f70 R14: ffff950171b78780 R15: ffff9501749dc018 FS: 00007f0d6bfd5540(0000) GS:ffff95017f200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc190161a08 CR3: 0000000232906000 CR4: 00000000001406f0 Call Trace: ath9k_rng_stop+0x1a/0x20 [ath9k] ath9k_stop+0x3b/0x1d0 [ath9k] drv_stop+0x33/0xf0 [mac80211] ieee80211_stop_device+0x43/0x50 [mac80211] ieee80211_do_stop+0x4f2/0x810 [mac80211] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196043 Reported-by: Giulio Genovese Tested-by: Giulio Genovese Cc: Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/rng.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1cdb6c9fd43366413f928531a03fc07a8c14429a Author: Bhumika Goyal Date: Tue Jun 27 17:31:52 2017 +0300 ath10k: add const to thermal_cooling_device_ops structure Declare thermal_cooling_device_ops structure as const as it is only passed as an argument to the function thermal_cooling_device_register and this argument is of type const. So, declare the structure as const. Signed-off-by: Bhumika Goyal Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bde717ab473668377fc65872398a102d40cb2d58 Author: Miaoqing Pan Date: Tue Jun 27 17:31:51 2017 +0300 ath9k: fix tx99 bus error The hard coded register 0x9864 and 0x9924 are invalid for ar9300 chips. Cc: Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 -- 1 file changed, 2 deletions(-) commit cf8ce1ea61b75712a154c93e40f2a5af2e4dd997 Author: Miaoqing Pan Date: Tue Jun 27 17:31:49 2017 +0300 ath9k: fix tx99 use after free One scenario that could lead to UAF is two threads writing simultaneously to the "tx99" debug file. One of them would set the "start" value to true and follow to ath9k_tx99_init(). Inside the function it would set the sc->tx99_state to true after allocating sc->tx99skb. Then, the other thread would execute write_file_tx99() and call ath9k_tx99_deinit(). sc->tx99_state would be freed. After that, the first thread would continue inside ath9k_tx99_init() and call r = ath9k_tx99_send(sc, sc->tx99_skb, &txctl); that would make use of the freed sc->tx99_skb memory. Cc: Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/tx99.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 36a1f2c607fe3f196bd15a0f4cd3d727b2c9c399 Author: Arvind Yadav Date: Fri Jun 23 14:05:56 2017 +0530 platform/x86: toshiba_haps: constify haps_attr_group File size before: text data bss dec hex filename 1471 528 8 2007 7d7 drivers/platform/x86/toshiba_haps.o File size After adding 'const': text data bss dec hex filename 1519 464 8 1991 7c7 drivers/platform/x86/toshiba_haps.o Signed-off-by: Arvind Yadav Signed-off-by: Andy Shevchenko drivers/platform/x86/toshiba_haps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71596f5b0e4a0071394d425d7cbcd2bfca655c61 Author: Mario Limonciello Date: Fri Jun 23 09:35:21 2017 -0500 platform/x86: dell-wmi-led: Adjust instance of wmi_evaluate_method calls to 0 Pali recently noticed that WMI instances are zero indexed. The only reason that these calls all worked properly is because the ASL didn't verify the instance number. Signed-off-by: Louis Davis Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi-led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0e4aa78716401e8d7d5434b69bbf6596b55a936 Author: Mario Limonciello Date: Wed Jun 21 17:01:35 2017 -0500 platform/x86: alienware-wmi: Adjust instance of wmi_evaluate_method calls to 0 Pali recently noticed that WMI instances are zero indexed. The only reason that these calls all worked properly is because the ASL didn't verify the instance number. Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/alienware-wmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4ec78467858739c0119569c0610676aa50dfa8fb Author: Steven Rostedt (VMware) Date: Wed Jun 28 11:57:03 2017 -0400 ftrace: Decrement count for dyn_ftrace_total_info for init functions Init boot up functions may be traced, but they are also freed when the kernel finishes booting. These are removed from the ftrace tables, and the debug variable for dyn_ftrace_total_info needs to reflect that as well. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 1 + 1 file changed, 1 insertion(+) commit b90a16854d60f147cc6388dbe3e9765101c5b5a6 Merge: 57c00f2 6d759b0 Author: Kalle Valo Date: Wed Jun 28 18:55:55 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next More iwlwifi patches for 4.13 * Some changes in suspend/resume handling to support new FWs; * A bunch of RF-kill related fixes; * Continued work towards the A000 family; * Support for a new version of the TX flush FW API; * Some fixes in monitor interfaces; * A few fixes in the recovery flows; * Johannes' documentation fixes and FW API struct cleanups continue; * Remove some noise from the kernel logs; * Some other small improvements, fixes and cleanups; commit 4032da5ffe266fc781a15bd7b24295c433002ab5 Merge: f03293d 43f6c8d Author: Takashi Iwai Date: Wed Jun 28 16:42:50 2017 +0200 Merge branch 'topic/hda-fix' into for-next commit 43f6c8d97bbdc05858b3d64e4c683821ce46c2db Author: Takashi Iwai Date: Wed Jun 28 14:18:29 2017 +0200 ALSA: hda - Minor code refactoring for Intel HDMI codec parsers No functional change, just a slight reduction of lines. Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 87 ++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 53 deletions(-) commit bcf741cb779283081db47853264cc94854e7ad83 Author: Herbert Xu Date: Wed Jun 28 19:09:07 2017 +0800 crypto: testmgr - Reenable sha1/aes in FIPS mode The combination of sha1 and aes was disabled in FIPS Mode accidentally. This patch reenables it. Fixes: 284a0f6e87b0 ("crypto: testmgr - Disable fips-allowed for...") Signed-off-by: Herbert Xu Acked-by: Stephan Müller crypto/testmgr.c | 1 + 1 file changed, 1 insertion(+) commit fcc88d91cd36d1343a0ccc09444b21f6b0dad2d8 Author: Takashi Iwai Date: Wed Jun 28 12:54:53 2017 +0200 ALSA: hda - Bind with i915 component before codec binding We used a on-demand i915 component binding for IvyBridge and SandyBridge HDMI codecs, but it has a potential problem of the nested module loading. For avoiding that situation, assure the i915 binding happening at the controller driver level for PCH controller devices, where the initialization is performed in a detached work, instead of calling from the codec driver probe. Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 35 +++++++++++++++++++++-------------- sound/pci/hda/patch_hdmi.c | 17 +++++------------ 2 files changed, 26 insertions(+), 26 deletions(-) commit f1d4ef7d88832444e8dfeb0e85e19d3b6ecb5011 Author: Sagi Grimberg Date: Tue Jun 27 09:23:33 2017 +0300 nvmet-rdma: register ib_client to not deadlock in device removal We can deadlock in case we got to a device removal event on a queue which is already in the process of destroying the cm_id is this is blocking until all events on this cm_id will drain. On the other hand we cannot guarantee that rdma_destroy_id was invoked as we only have indication that the queue disconnect flow has been queued (the queue state is updated before the realease work has been queued). So, we leave all the queue removal to a separate ib_client to avoid this deadlock as ib_client device removal is in a different context than the cm_id itself. Reported-by: Shiraz Saleem Tested-by: Shiraz Saleem Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 100 ++++++++++++++++++++++++++++++--------------- 1 file changed, 67 insertions(+), 33 deletions(-) commit 69fa964632fe18a11a80ead0d09ef3399b08144a Author: James Smart Date: Wed Jun 21 17:43:21 2017 -0700 nvme_fc: fix error recovery on link down. Currently, the fc transport invokes nvme_fc_error_recovery() on every io in which the transport detects an error. Which means: a) it's really noisy on large io loads that all get hit by a link down. b) we repeatively call nvme_stop_queues() even though queues are stopped upon the first error or as first steps of reset_work. Correct by: Errors are only meaningful if the controller is in the LIVE state. Thus, enact the reset_work only if LIVE. If called repeatively, state will have already transitioned. There's no need to stop the queues here. Let the first steps of reset_work do the queue stopping. Signed-off-by: James Smart Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 188f7e8a3789cb2e37b68903e0a40f406091fa97 Author: James Smart Date: Thu Jun 15 23:41:41 2017 -0700 nvmet_fc: fix crashes on bad opcodes if a nvme command is issued with an opcode that is not supported by the target (example: opcode 21 - detach namespace), the target crashes due to a null pointer. nvmet_req_init() detects the bad opcode and immediately calls the nvme command done routine with an error status, allowing the transport to send the response. However, the FC transport was aborting the command on error, so the abort freed the lldd point, but the rsp transmit path referenced it psot the free. Fix by removing the abort call on nvmet_req_init() failure. The completion response will be sent with an error status code. As the completion path will terminate the io, ensure the data_sg lists show an unused state so that teardown paths are successful. Signed-off-by: Paul Ely Signed-off-by: James Smart Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 0b5a7669a457dd503b3d9922e931ecb01843a916 Author: James Smart Date: Thu Jun 15 23:40:54 2017 -0700 nvme_fc: Fix crash when nvme controller connection fails. If a controller connection is attempted (say to a subsystem that does not exist), the first attempt errors out. If another connect is attempted, it crashes. Issue is the prior controller has yet execute it's final put, thus its still on lists. However, opts points on it have been cleared, thus causing the crash if they are referenced. Fix is to add the missing put after the nvme_uninit_ctrl() call on the attachment failure. Signed-off-by: Paul Ely Signed-off-by: James Smart Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 3 +++ 1 file changed, 3 insertions(+) commit 36715cf4b36688aa327d77ddb6bc5f740b01de94 Author: James Smart Date: Mon May 22 15:28:42 2017 -0700 nvme_fc: replace ioabort msleep loop with completion Per the recommendation by Sagi on: http://lists.infradead.org/pipermail/linux-nvme/2017-April/009261.html Wait for io aborts to complete wait converted from msleep look to using a struct completion. Signed-off-by: James Smart Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit b4dfd6ee997d6d5d30b8ace5593ad1a9134418d6 Author: James Smart Date: Wed Jun 21 17:43:05 2017 -0700 nvme_fc: fix double calls to nvme_cleanup_cmd() Current fc transport code, on io termination, is calling nvme_cleanup_cmd() followed by the transport dma unmap routine which also calls nvme_cleanup_cmd(). Which means two kfrees occur on the same address, raising havoc. This resulted in odd data errors, effectively corruption.. Fix by removing the extraneous double calls. Call now occurs only in teardown paths and as part of dma unmap routine. Signed-off-by: James Smart Reviewed-by: Ewan D. Milne Reviewed-by: Hannes Reinecke Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b1465c63449cf79295164061193cb645974da53c Author: Christoph Hellwig Date: Mon Jun 26 12:39:04 2017 +0200 nvme-fabrics: verify that a controller returns the correct NQN Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fabrics.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 49d3d50b0d4eb0c86c1dae864586f1b26ccd1f5b Author: Christoph Hellwig Date: Mon Jun 26 12:39:03 2017 +0200 nvme: simplify nvme_dev_attrs_are_visible Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 180de0070048340868c7bc841fc12e75556bb629 Author: Christoph Hellwig Date: Mon Jun 26 12:39:02 2017 +0200 nvme: read the subsystem NQN from Identify Controller NVMe 1.2.1 or later requires controllers to provide a subsystem NQN in the Identify controller data structures. Use this NQN for the subsysnqn sysfs attribute by storing it in the nvme_ctrl structure after verifying it. For older controllers we generate a "fake" NQN per non-normative text in the NVMe 1.3 spec. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 31 ++++++++++++++++++++++++++++--- drivers/nvme/host/fabrics.c | 10 ---------- drivers/nvme/host/fabrics.h | 1 - drivers/nvme/host/fc.c | 1 - drivers/nvme/host/nvme.h | 2 +- drivers/nvme/host/rdma.c | 1 - drivers/nvme/target/loop.c | 1 - 7 files changed, 29 insertions(+), 18 deletions(-) commit 942fbab4cdca06238e256e89e170090a4a412b17 Author: Christoph Hellwig Date: Mon Jun 26 12:39:01 2017 +0200 nvme: remove a misleading comment on struct nvme_ns While a NVMe Namespace is somewhat similar to a SCSI Logical Unit (and not a Logical Unit Number anyway) there are subtile differences. Remove the misleading comment. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/nvme.h | 3 --- 1 file changed, 3 deletions(-) commit 76a5af841755a0427229a6a77ca83781d61e5b2a Author: Kai-Heng Feng Date: Mon Jun 26 16:39:54 2017 -0400 nvme: explicitly disable APST on quirked devices A user reports APST is enabled, even when the NVMe is quirked or with option "default_ps_max_latency_us=0". The current logic will not set APST if the device is quirked. But the NVMe in question will enable APST automatically. Separate the logic "apst is supported" and "to enable apst", so we can use the latter one to explicitly disable APST at initialiaztion. BugLink: https://bugs.launchpad.net/bugs/1699004 Signed-off-by: Kai-Heng Feng Reviewed-by: Andy Lutomirski Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 17 +++++++++-------- drivers/nvme/host/nvme.h | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) commit 7aa1f42752f0d31a5bb6d0d5bac92fc8c2044ce2 Author: Sagi Grimberg Date: Sun Jun 18 16:15:59 2017 +0300 nvme: use a single NVME_AQ_DEPTH and relax it to 32 No need to differentiate fabrics from pci/loop, also lower it to 32 as we don't really need 256 inflight admin commands. Signed-off-by: Sagi Grimberg Reviewed-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/fabrics.c | 8 +------- drivers/nvme/host/fc.c | 2 +- drivers/nvme/host/pci.c | 1 - drivers/nvme/host/rdma.c | 10 +++++----- drivers/nvme/target/discovery.c | 2 +- drivers/nvme/target/loop.c | 4 +--- drivers/nvme/target/rdma.c | 2 +- include/linux/nvme.h | 2 +- 8 files changed, 11 insertions(+), 20 deletions(-) commit 6bfe04255d5ed5643ee4c2d9b09b337398f8cb6a Author: Johannes Thumshirn Date: Tue Jun 20 14:23:01 2017 +0200 nvme: add hostid token to fabric options Currently we have no way to define a stable host-id but always use the one which is randomly generated when we add the host or use the default host. Provide a "hostid=%s" for user-space to pass in a persistent host-id which overrides the randomly generated one. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/fabrics.c | 22 +++++++++++++++++++--- drivers/nvme/host/fabrics.h | 1 + 2 files changed, 20 insertions(+), 3 deletions(-) commit 3f7f25a910ed8988b2a87c1ca2bfee6b4fb83ac7 Author: Keith Busch Date: Tue Jun 20 15:09:56 2017 -0400 nvme: Remove SCSI translations The SCSI-to-NVMe translations were added to assist storage applications utilizing SG_IO transitioning to NVMe. It was always recommended, however, to use native NVMe for device management as too much is lost in translation and the maintenance burden in keeping this kludgey layer around has been neglected such that much of the translations are completely broken. This patch removes SG_IO handling from NVMe to avoid any confusion regarding maintenance support for this interface. The config option for NVMe SCSI emulation has been disabled by default since 4.5. The driver has supported native nvme user commands since the beginning, and native tooling is publicly available for use or as reference for anyone writing their own tools, so there's no excuse for hanging onto a broken crutch. Signed-off-by: Keith Busch Acked-by: Jens Axboe Reviewed-by: Martin K. Petersen Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Guan Junxiong Signed-off-by: Jens Axboe drivers/nvme/host/Kconfig | 12 - drivers/nvme/host/core.c | 58 +- drivers/nvme/host/nvme.h | 14 - drivers/nvme/host/scsi.c | 2460 --------------------------------------------- 4 files changed, 3 insertions(+), 2541 deletions(-) commit 442e19b7ccb25337be7bfff96df94c38c037ee9f Author: Sagi Grimberg Date: Sun Jun 18 17:28:10 2017 +0300 nvme-pci: open-code polling logic in nvme_poll Given that the code is simple enough it seems better then passing a tag by reference for each call site, also we can now get rid of __nvme_process_cq. Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit 920d13a884c0595451658a7b48af8ac16918628f Author: Sagi Grimberg Date: Sun Jun 18 17:28:09 2017 +0300 nvme-pci: factor out the cqe reading mechanics from __nvme_process_cq Also, maintain a consumed counter to rely on for doorbell and cqe_seen update instead of directly relying on the cq head and phase. Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit 83a12fb77b941a6735026e46c8ef5f4ec1204e97 Author: Sagi Grimberg Date: Sun Jun 18 17:28:08 2017 +0300 nvme-pci: factor out cqe handling into a dedicated routine Makes the code slightly more readable. Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 53 ++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 23 deletions(-) commit eb281c8283e87a2d1d6ed406f9c6408c39737b4d Author: Sagi Grimberg Date: Sun Jun 18 17:28:07 2017 +0300 nvme-pci: Introduce nvme_ring_cq_doorbell Nice abstraction of the actual mechanics of how to do it. Note the change that we call it after we assign nvmeq->cq_head to avoid passing it. Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 5657cb0797c4ab303f5782442095319bd971257b Author: Jens Axboe Date: Wed Jun 28 08:09:45 2017 -0600 fs/fcntl: use copy_to/from_user() for u64 types Some architectures (at least PPC) doesn't like get/put_user with 64-bit types on a 32-bit system. Use the variably sized copy to/from user variants instead. Reported-by: Stephen Rothwell Fixes: c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints") Signed-off-by: Jens Axboe fs/fcntl.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 93228b44c33a572cb36cec2dbed42e9bdbc88d79 Author: Vladimir Murzin Date: Mon Jun 26 10:18:58 2017 +0100 drivers: dma-coherent: Introduce default DMA pool This patch introduces default coherent DMA pool similar to default CMA area concept. To keep other users safe code kept under CONFIG_ARM. Cc: Michal Nazarewicz Cc: Marek Szyprowski Cc: Rob Herring Cc: Mark Rutland Cc: Greg Kroah-Hartman Suggested-by: Robin Murphy Tested-by: Benjamin Gaignard Tested-by: Andras Szemzo Tested-by: Alexandre TORGUE Signed-off-by: Vladimir Murzin Signed-off-by: Christoph Hellwig .../bindings/reserved-memory/reserved-memory.txt | 3 ++ drivers/base/dma-coherent.c | 59 +++++++++++++++++++--- 2 files changed, 55 insertions(+), 7 deletions(-) commit c41f9ea998f3ba61f38fa350eef28ec6caf0a07d Author: Vladimir Murzin Date: Mon Jun 26 10:18:57 2017 +0100 drivers: dma-coherent: Account dma_pfn_offset when used with device tree dma_declare_coherent_memory() and friends are designed to account difference in CPU and device addresses. However, when it is used with reserved memory regions there is assumption that CPU and device have the same view on address space. This assumption gets invalid when reserved memory for coherent DMA allocations is referenced by device with non-empty "dma-range" property. Simply feeding device address as rmem->base + dev->dma_pfn_offset would not work due to reserved memory region can be shared, so this patch turns device address to be expressed with help of CPU address and device's dma_pfn_offset in case memory reservation has been done via device tree; non device tree users continue to use the old scheme. Cc: Michal Nazarewicz Cc: Marek Szyprowski Cc: Roger Quadros Cc: Greg Kroah-Hartman Tested-by: Benjamin Gaignard Tested-by: Andras Szemzo Tested-by: Alexandre TORGUE Signed-off-by: Vladimir Murzin Signed-off-by: Christoph Hellwig drivers/base/dma-coherent.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 25f1e18870881f3366a5abec27b651983ce9032c Author: Vladimir Murzin Date: Mon Jun 26 10:18:55 2017 +0100 dma: Take into account dma_pfn_offset Even though dma-noop-ops assumes 1:1 memory mapping DMA memory range can be different to RAM. For example, ARM STM32F4 MCU offers the possibility to remap SDRAM from 0xc000_0000 to 0x0 to get CPU performance boost, but DMA continue to see SDRAM at 0xc000_0000. This difference in mapping is handled via device-tree "dma-range" property which leads to dev->dma_pfn_offset is set nonzero. To handle such cases take dma_pfn_offset into account. Cc: Joerg Roedel Cc: Christian Borntraeger Reported-by: Benjamin Gaignard Tested-by: Benjamin Gaignard Tested-by: Andras Szemzo Tested-by: Alexandre TORGUE Reviewed-by: Robin Murphy Signed-off-by: Vladimir Murzin Signed-off-by: Christoph Hellwig lib/dma-noop.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 63d36c95500400642f656ba1970980746cf437f3 Author: Christoph Hellwig Date: Mon Jun 12 19:15:04 2017 +0200 dma-mapping: replace dmam_alloc_noncoherent with dmam_alloc_attrs dmam_alloc_noncoherent is a trivial wrapper around dmam_alloc_attrs, that hardcodes one particular flag. Make the devres code more flexible by allowing the callers to pass arbitrary flags. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Documentation/driver-model/devres.txt | 2 +- drivers/base/dma-mapping.c | 36 ++++++++++++++++------------------- drivers/video/fbdev/au1200fb.c | 5 +++-- include/linux/dma-mapping.h | 5 +++-- 4 files changed, 23 insertions(+), 25 deletions(-) commit 03b643866d889d6edc87cdcee2b3880b7879a441 Author: Christoph Hellwig Date: Mon Jun 12 19:05:09 2017 +0200 dma-mapping: remove dmam_free_noncoherent This function was never used since it was added. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Documentation/driver-model/devres.txt | 1 - drivers/base/dma-mapping.c | 20 -------------------- include/linux/dma-mapping.h | 2 -- 3 files changed, 23 deletions(-) commit 72eed063767e131831fa10a0909c39a0254836ec Author: Arnd Bergmann Date: Thu Jun 22 14:35:46 2017 +0200 crypto: qat - avoid an uninitialized variable warning After commit 9e442aa6a753 ("x86: remove DMA_ERROR_CODE"), the inlining decisions in the qat driver changed slightly, introducing a new false-positive warning: drivers/crypto/qat/qat_common/qat_algs.c: In function 'qat_alg_sgl_to_bufl.isra.6': include/linux/dma-mapping.h:228:2: error: 'sz_out' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/crypto/qat/qat_common/qat_algs.c:676:9: note: 'sz_out' was declared here The patch that introduced this is correct, so let's just avoid the warning in this driver by rearranging the unwinding after an error to make it more obvious to the compiler what is going on. The problem here is the 'if (unlikely(dma_mapping_error(dev, blp)))' check, in which the 'unlikely' causes gcc to forget what it knew about the state of the variables. Cleaning up the dma state in the reverse order it was created means we can simplify the logic so it doesn't have to know about that state, and also makes it easier to understand. Cc: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Christoph Hellwig drivers/crypto/qat/qat_common/qat_algs.c | 40 +++++++++++++++++--------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit c4d9d598fd2a82136175706e599c4150d0962b1b Author: Christoph Hellwig Date: Wed Jun 14 10:37:32 2017 +0200 au1100fb: remove a bogus dma_free_nonconsistent call au1100fb is using managed dma allocations, so it doesn't need to explicitly free the dma memory in the error path (and if it did it would have to use the managed version). Signed-off-by: Christoph Hellwig Acked-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1100fb.c | 4 ---- 1 file changed, 4 deletions(-) commit 2e7d1098c00caebc8e31c4d338a49e88c979dd2b Author: Christoph Hellwig Date: Tue Jun 20 11:17:30 2017 +0200 MAINTAINERS: add entry for dma mapping helpers This code has been spread between getting in through arch trees, the iommu tree, -mm and the drivers tree. There will be a lot of work in this area, including consolidating various arch implementations into more common code, so ensure we have a proper git tree that facilitates cooperation with the architecture maintainers. Signed-off-by: Christoph Hellwig MAINTAINERS | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a9a7b06f58d82191f18f626c0d942ec3655c0bde Author: Christoph Hellwig Date: Tue May 23 15:42:02 2017 +0200 powerpc: merge __dma_set_mask into dma_set_mask Signed-off-by: Christoph Hellwig arch/powerpc/include/asm/dma-mapping.h | 1 - arch/powerpc/kernel/dma.c | 13 ++++--------- 2 files changed, 4 insertions(+), 10 deletions(-) commit 8cc9c26029d8ac3c627ecf8545b617fb78def5d4 Author: Christoph Hellwig Date: Mon Jun 5 17:05:25 2017 +0200 dma-mapping: remove the set_dma_mask method Signed-off-by: Christoph Hellwig arch/powerpc/kernel/dma.c | 4 ---- include/linux/dma-mapping.h | 6 ------ 2 files changed, 10 deletions(-) commit 7eb8a7a9e854640508fefc5a6d0bb50de243610b Author: Christoph Hellwig Date: Tue May 23 14:57:57 2017 +0200 powerpc/cell: use the dma_supported method for ops switching Besides removing the last instance of the set_dma_mask method this also reduced the code duplication. Signed-off-by: Christoph Hellwig arch/powerpc/platforms/cell/iommu.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 228a5e1a875006588f394345e96c64215f8b132e Author: Christoph Hellwig Date: Mon May 22 13:18:56 2017 +0200 powerpc/cell: clean up fixed mapping dma_ops initialization By the time cell_pci_dma_dev_setup calls cell_dma_dev_setup no device can have the fixed map_ops set yet as it's only set by the set_dma_mask method. So move the setup for the fixed case to be only called in that place instead of indirecting through cell_dma_dev_setup. Signed-off-by: Christoph Hellwig arch/powerpc/platforms/cell/iommu.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit c1f03776327f97674058fe0e10bf5408b8db14b9 Author: Christoph Hellwig Date: Mon May 22 12:02:58 2017 +0200 tile: remove dma_supported and mapping_error methods These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig arch/tile/kernel/pci-dma.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit a88f5401010115ae8b1a21c1609f2fb4332ea5eb Author: Christoph Hellwig Date: Mon May 22 11:52:17 2017 +0200 xen-swiotlb: remove xen_swiotlb_set_dma_mask This just duplicates the generic implementation. Signed-off-by: Christoph Hellwig drivers/xen/swiotlb-xen.c | 12 ------------ 1 file changed, 12 deletions(-) commit 64273a61b2e247e29c2647e83edc090fd01a118b Author: Christoph Hellwig Date: Mon May 22 11:53:36 2017 +0200 arm: implement ->dma_supported instead of ->set_dma_mask Same behavior, less code duplication. Signed-off-by: Christoph Hellwig arch/arm/common/dmabounce.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 69f07be6221c4af8b1164a4ef229bced56846f92 Author: Christoph Hellwig Date: Mon May 22 11:50:29 2017 +0200 mips/loongson64: implement ->dma_supported instead of ->set_dma_mask Same behavior, less code duplication. Signed-off-by: Christoph Hellwig arch/mips/loongson64/common/dma-swiotlb.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 447d899b18169b2ee5e42b2fa8b32dbb40a30a24 Author: Christoph Hellwig Date: Mon May 22 11:40:56 2017 +0200 dma-mapping: remove HAVE_ARCH_DMA_SUPPORTED Signed-off-by: Christoph Hellwig include/linux/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit 5860acc1a905b05c14e9ed9e22c20aad1a72554a Author: Christoph Hellwig Date: Mon May 22 11:38:27 2017 +0200 x86: remove arch specific dma_supported implementation And instead wire it up as method for all the dma_map_ops instances. Note that this also means the arch specific check will be fully instead of partially applied in the AMD iommu driver. Signed-off-by: Christoph Hellwig arch/x86/include/asm/dma-mapping.h | 3 --- arch/x86/include/asm/iommu.h | 2 ++ arch/x86/kernel/amd_gart_64.c | 1 + arch/x86/kernel/pci-calgary_64.c | 1 + arch/x86/kernel/pci-dma.c | 8 +------- arch/x86/kernel/pci-nommu.c | 1 + arch/x86/pci/sta2x11-fixup.c | 3 ++- drivers/iommu/amd_iommu.c | 2 ++ drivers/iommu/intel-iommu.c | 3 +++ 9 files changed, 13 insertions(+), 11 deletions(-) commit 418a7a7e4f05f36d6e4ab5b8548ea71f0b602140 Author: Christoph Hellwig Date: Mon May 22 11:20:18 2017 +0200 arm: remove arch specific dma_supported implementation And instead wire it up as method for all the dma_map_ops instances. Note that the code seems a little fishy for dmabounce and iommu, but for now I'd like to preserve the existing behavior 1:1. Signed-off-by: Christoph Hellwig arch/arm/common/dmabounce.c | 1 + arch/arm/include/asm/dma-iommu.h | 2 ++ arch/arm/include/asm/dma-mapping.h | 3 --- arch/arm/mm/dma-mapping.c | 7 +++++-- 4 files changed, 8 insertions(+), 5 deletions(-) commit 19ad53e498745416a77c0377cbb4ee771eedd35b Author: Christoph Hellwig Date: Mon May 22 11:11:20 2017 +0200 openrisc: remove arch-specific dma_supported implementation This implementation is simply bogus - openrisc only has a simple direct mapped DMA implementation and thus doesn't care about the address. Signed-off-by: Christoph Hellwig arch/openrisc/include/asm/dma-mapping.h | 7 ------- 1 file changed, 7 deletions(-) commit 3d6119a4a1f3f6c36be494d72a0374822b4a265c Author: Christoph Hellwig Date: Mon May 22 11:10:08 2017 +0200 hexagon: remove the unused dma_is_consistent prototype Signed-off-by: Christoph Hellwig arch/hexagon/include/asm/dma-mapping.h | 1 - 1 file changed, 1 deletion(-) commit a2b63aa2f45314bea077275c6009ba00c83826a0 Author: Christoph Hellwig Date: Mon May 22 11:07:48 2017 +0200 hexagon: remove arch-specific dma_supported implementation This implementation is simply bogus - hexagon only has a simple direct mapped DMA implementation and thus doesn't care about the address. Signed-off-by: Christoph Hellwig Acked-by: Richard Kuo arch/hexagon/include/asm/dma-mapping.h | 2 -- arch/hexagon/kernel/dma.c | 9 --------- 2 files changed, 11 deletions(-) commit 3be6d9b6da2ca62a4fd73a401b26f4a1dac2a47d Author: Christoph Hellwig Date: Mon May 22 11:04:17 2017 +0200 dma-virt: remove dma_supported and mapping_error methods These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig lib/dma-virt.c | 12 ------------ 1 file changed, 12 deletions(-) commit 050d228a740a2e4d988801e64b2aee0159542f59 Author: Christoph Hellwig Date: Mon May 22 11:03:30 2017 +0200 dma-noop: remove dma_supported and mapping_error methods These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig lib/dma-noop.c | 12 ------------ 1 file changed, 12 deletions(-) commit b02c2b0bfd7ae4fb5bc8685ac564861b99c7a552 Author: Christoph Hellwig Date: Mon May 22 09:11:30 2017 +0200 sparc: remove arch specific dma_supported implementations Usually dma_supported decisions are done by the dma_map_ops instance. Switch sparc to that model by providing a ->dma_supported instance for sbus that always returns false, and implementations tailored to the sun4u and sun4v cases for sparc64, and leave it unimplemented for PCI on sparc32, which means always supported. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller arch/sparc/include/asm/dma-mapping.h | 3 --- arch/sparc/kernel/iommu.c | 40 +++++++++++++++--------------------- arch/sparc/kernel/ioport.c | 22 ++++++-------------- arch/sparc/kernel/pci_sun4v.c | 17 +++++++++++++++ 4 files changed, 39 insertions(+), 43 deletions(-) commit c6d333e0847260972cb6279de76d8004d2461d3f Author: Christoph Hellwig Date: Mon May 22 09:06:26 2017 +0200 sparc: remove leon_dma_ops We can just use pci32_dma_ops directly. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller arch/sparc/include/asm/dma-mapping.h | 3 +-- arch/sparc/kernel/ioport.c | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) commit f51f288e237cbcfd3dbd1d4fa2d3dec00d7253e2 Author: Christoph Hellwig Date: Mon May 22 10:58:49 2017 +0200 dma-mapping: remove DMA_ERROR_CODE And update the documentation - dma_mapping_error has been supported everywhere for a long time. Signed-off-by: Christoph Hellwig Documentation/DMA-API-HOWTO.txt | 31 +++++-------------------------- include/linux/dma-mapping.h | 5 ----- 2 files changed, 5 insertions(+), 31 deletions(-) commit 9eef8b8cc26559fe5f2575daf7d08c6a17e81ff8 Author: Christoph Hellwig Date: Mon May 22 10:53:03 2017 +0200 arm: implement ->mapping_error DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig arch/arm/common/dmabounce.c | 13 +++++++++--- arch/arm/include/asm/dma-iommu.h | 2 ++ arch/arm/include/asm/dma-mapping.h | 1 - arch/arm/mm/dma-mapping.c | 41 ++++++++++++++++++++++++-------------- 4 files changed, 38 insertions(+), 19 deletions(-) commit a760088b45186d6235e05a75788d142bf203a927 Author: Christoph Hellwig Date: Mon May 22 10:37:09 2017 +0200 x86: remove DMA_ERROR_CODE All dma_map_ops instances now handle their errors through ->mapping_error. Signed-off-by: Christoph Hellwig arch/x86/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit 8bd17c6670ecf259f689f398a8336068f0a972ce Author: Christoph Hellwig Date: Mon May 22 10:36:43 2017 +0200 x86/calgary: implement ->mapping_error DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig arch/x86/kernel/pci-calgary_64.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 14a9aad7f0df85d977c0d8be42e80fa3f8efdb26 Author: Christoph Hellwig Date: Mon May 22 10:34:21 2017 +0200 x86/pci-nommu: implement ->mapping_error DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig arch/x86/kernel/pci-nommu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 6009faa43f804c99b3d8fff94fa1e0692be70358 Author: Christoph Hellwig Date: Sun May 21 14:17:10 2017 +0200 powerpc: implement ->mapping_error DMA_ERROR_CODE is going to go away, so don't rely on it. Instead define a ->mapping_error method for all IOMMU based dma operation instances. The direct ops don't ever return an error and don't need a ->mapping_error method. Signed-off-by: Christoph Hellwig Acked-by: Michael Ellerman arch/powerpc/include/asm/dma-mapping.h | 4 ---- arch/powerpc/include/asm/iommu.h | 4 ++++ arch/powerpc/kernel/dma-iommu.c | 6 ++++++ arch/powerpc/kernel/iommu.c | 28 ++++++++++++++-------------- arch/powerpc/platforms/cell/iommu.c | 1 + arch/powerpc/platforms/pseries/vio.c | 3 ++- 6 files changed, 27 insertions(+), 19 deletions(-) commit ceaf481c4f6ae6090288528825abc7d051bb1032 Author: Christoph Hellwig Date: Sun May 21 13:33:44 2017 +0200 sparc: implement ->mapping_error DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller arch/sparc/include/asm/dma-mapping.h | 2 -- arch/sparc/kernel/iommu.c | 12 +++++++++--- arch/sparc/kernel/iommu_common.h | 2 ++ arch/sparc/kernel/pci_sun4v.c | 14 ++++++++++---- 4 files changed, 21 insertions(+), 9 deletions(-) commit 81cac18e1180e9812c9838d8cef3a1fff00f3702 Author: Christoph Hellwig Date: Sun May 21 13:04:09 2017 +0200 s390: implement ->mapping_error s390 can also use noop_dma_ops, and while that currently does not return errors it will so in the future. Implementing the mapping_error method is the proper way to have per-ops error conditions. Signed-off-by: Christoph Hellwig Acked-by: Gerald Schaefer arch/s390/include/asm/dma-mapping.h | 2 -- arch/s390/pci/pci_dma.c | 18 +++++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) commit a869572c3196440e96d62d61320e4ae2f530b02e Author: Christoph Hellwig Date: Sun May 21 13:26:45 2017 +0200 iommu/amd: implement ->mapping_error DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig drivers/iommu/amd_iommu.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit e830467143ad0b4efeab3e6c9e1d8033a51a4bf9 Author: Christoph Hellwig Date: Sun May 21 12:26:24 2017 +0200 hexagon: switch to use ->mapping_error for error reporting Signed-off-by: Christoph Hellwig Acked-by: Richard Kuo arch/hexagon/include/asm/dma-mapping.h | 2 -- arch/hexagon/kernel/dma.c | 12 +++++++++--- arch/hexagon/kernel/hexagon_ksyms.c | 1 - 3 files changed, 9 insertions(+), 6 deletions(-) commit 3b58a3c72f484393c65995a551902945f5a18c70 Author: Steven Rostedt (VMware) Date: Wed Jun 28 09:09:38 2017 -0400 ftrace: Unlock hash mutex on failed allocation in process_mod_list() If the new_hash fails to allocate, then unlock the hash mutex on error. Reported-by: Julia Lawall Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fd851a3cdc196bfc1d229b5f22369069af532bf8 Author: Nicholas Piggin Date: Mon May 29 12:22:23 2017 +1000 spin loop primitives for busy waiting Current busy-wait loops are implemented by repeatedly calling cpu_relax() to give an arch option for a low-latency option to improve power and/or SMT resource contention. This poses some difficulties for powerpc, which has SMT priority setting instructions (priorities determine how ifetch cycles are apportioned). powerpc's cpu_relax() is implemented by setting a low priority then setting normal priority. This has several problems: - Changing thread priority can have some execution cost and potential impact to other threads in the core. It's inefficient to execute them every time around a busy-wait loop. - Depending on implementation details, a `low ; medium` sequence may not have much if any affect. Some software with similar pattern actually inserts a lot of nops between, in order to cause a few fetch cycles with the low priority. - The busy-wait loop runs with regular priority. This might only be a few fetch cycles, but if there are several threads running such loops, they could cause a noticable impact on a non-idle thread. Implement spin_begin, spin_end primitives that can be used around busy wait loops, which default to no-ops. And spin_cpu_relax which defaults to cpu_relax. This will allow architectures to hook the entry and exit of busy-wait loops, and will allow powerpc to set low SMT priority at entry, and normal priority at exit. Suggested-by: Linus Torvalds Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman include/linux/processor.h | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 4d0d7c02df680740da41f5f92a238c35796ca5be Author: Akshay Adiga Date: Wed Jun 28 06:46:49 2017 +0530 powerpc/powernv/idle: Clear r12 on wakeup from stop lite pnv_wakeup_noloss() expects r12 to contain SRR1 value to determine if the wakeup reason is an HMI in CHECK_HMI_INTERRUPT. When we wakeup with ESL=0, SRR1 will not contain the wakeup reason, so there is no point setting r12 to SRR1. However, we don't set r12 at all so r12 contains garbage (likely a kernel pointer), and is still used to check HMI assuming that it contained SRR1. This causes the OPAL msglog to be filled with the following print: HMI: Received HMI interrupt: HMER = 0x0040000000000000 This patch clears r12 after waking up from stop with ESL=EC=0, so that we don't accidentally enter the HMI handler in pnv_wakeup_noloss() if the value of r12[42:45] corresponds to HMI as wakeup reason. Prior to commit 9d29250136f6 ("powerpc/64s/idle: Avoid SRR usage in idle sleep/wake paths") this bug existed, in that we would incorrectly look at SRR1 to check for a HMI when SRR1 didn't contain a wakeup reason. However the SRR1 value would just happen to never have bits 42:45 set. Fixes: 9d29250136f6 ("powerpc/64s/idle: Avoid SRR usage in idle sleep/wake paths") Signed-off-by: Akshay Adiga Reviewed-by: Nicholas Piggin [mpe: Change log and comment massaging] Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6a7086431fa18df7d03b1ed0126426c79b38dc8c Merge: 84a21db 4f1fcfe 26b6aec 0b25635 757c370 01e1932 9ce3a72 0929dec 72dcac6 Author: Joerg Roedel Date: Wed Jun 28 14:45:02 2017 +0200 Merge branches 'iommu/fixes', 'arm/rockchip', 'arm/renesas', 'arm/smmu', 'arm/core', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next commit 01e1932a1748e20b69ba23d0a01db5eb3a525782 Author: Arvind Yadav Date: Wed Jun 28 16:39:32 2017 +0530 iommu/vt-d: Constify intel_dma_ops Most dma_map_ops structures are never modified. Constify these structures such that these can be write-protected. Signed-off-by: Arvind Yadav Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e4b470c0af6df6cd1456ef8482db1d07f14ae33 Merge: f0d657e c22ac6d Author: Greg Kroah-Hartman Date: Wed Jun 28 14:02:07 2017 +0200 Merge tag 'usb-serial-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.13-rc1 Here are the USB-serial updates for 4.13, including support for manipulating the modem-control signals of qcserial devices, propagation of errnos after late probe errors from usb-serial core, and a couple of clean ups. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit 72dcac633475a5b331cf21f3525467d0e123395a Author: Joerg Roedel Date: Wed Jun 28 12:52:48 2017 +0200 iommu: Warn once when device_group callback returns NULL This callback should never return NULL. Print a warning if that happens so that we notice and can fix it. Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 3 +++ 1 file changed, 3 insertions(+) commit 8faf5e5a12c511410de1590cf310ec331c5ec7b1 Author: Joerg Roedel Date: Wed Jun 28 12:50:16 2017 +0200 iommu/omap: Return ERR_PTR in device_group call-back Make sure that the device_group callback returns an ERR_PTR instead of NULL. Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f7a2304aabc4a8102bbbbeed2ec9eaee4a480c2 Author: Joerg Roedel Date: Wed Jun 28 12:45:31 2017 +0200 iommu: Return ERR_PTR() values from device_group call-backs The generic device_group call-backs in iommu.c return NULL in case of error. Since they are getting ERR_PTR values from iommu_group_alloc(), just pass them up instead. Reported-by: Gerald Schaefer Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 9e293b5a7062981016ace93160c56a980fcb73b8 Merge: 795c9a5 da72ca4 Author: Martin Schwidefsky Date: Wed Jun 28 12:57:47 2017 +0200 Merge tag 'nmiforkvm' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into features Pull kvm patches from Christian Borntraeger: "s390,kvm: provide plumbing for machines checks when running guests" This provides the basic plumbing for handling machine checks when running guests commit 17890880bbf7bac8171054c7dca7a5162b23c5c2 Author: Takashi Iwai Date: Wed Jun 28 12:45:34 2017 +0200 ALSA: hda - Skip card registration when no codec is found It's nonsense to register a card object when no codec is bound on it, as we don't support the deferred codec binding. Instead of registering an empty card object, just skip the registration by returning an error from azx_codec_configure(). Signed-off-by: Takashi Iwai sound/pci/hda/hda_controller.c | 3 +++ 1 file changed, 3 insertions(+) commit d52cd2076eb2ace9fe95dbf795f6d93587453914 Author: QingFeng Hao Date: Wed Jun 7 12:11:18 2017 +0200 KVM: s390: Inject machine check into the nested guest With vsie feature enabled, kvm can support nested guests (guest-3). So inject machine check to the guest-2 if it happens when the nested guest is running. And guest-2 will detect the machine check belongs to guest-3 and reinject it into guest-3. The host (guest-1) tries to inject the machine check to the picked destination vcpu if it's a floating machine check. Signed-off-by: QingFeng Hao Acked-by: Christian Borntraeger Signed-off-by: Christian Borntraeger arch/s390/kvm/vsie.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 4d62fcc0b692e3b4058d7d138114c27cd8b011f7 Author: QingFeng Hao Date: Wed Jun 7 12:03:05 2017 +0200 KVM: s390: Inject machine check into the guest If the exit flag of SIE indicates that a machine check has happened during guest's running and needs to be injected, inject it to the guest accordingly. But some machine checks, e.g. Channel Report Pending (CRW), refer to host conditions only (the guest's channel devices are not managed by the kernel directly) and are therefore not injected into the guest. External Damage (ED) is also not reinjected into the guest because ETR conditions are gone in Linux and STP conditions are not enabled in the guest, and ED contains only these 8 ETR and STP conditions. In general, instruction-processing damage, system recovery, storage error, service-processor damage and channel subsystem damage will be reinjected into the guest, and the remain (System damage, timing-facility damage, warning, ED and CRW) will be handled on the host. Signed-off-by: QingFeng Hao Acked-by: Christian Borntraeger Signed-off-by: Christian Borntraeger arch/s390/include/asm/nmi.h | 6 ++++++ arch/s390/kvm/interrupt.c | 43 ++++++++++++++++++++++++++++++++++++++++++- arch/s390/kvm/kvm-s390.c | 12 ++++++++++++ arch/s390/kvm/kvm-s390.h | 2 ++ 4 files changed, 62 insertions(+), 1 deletion(-) commit aec3b2c5f929c31d5517e36e2068617179d0fefd Merge: 1cae025 da72ca4 Author: Christian Borntraeger Date: Wed Jun 28 12:42:02 2017 +0200 Merge tag 'nmiforkvm' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kernelorgnext s390,kvm: provide plumbing for machines checks when running guests This provides the basic plumbing for handling machine checks when running guests commit 0929deca40bbdd7e821aada2906ac67882cfbf28 Author: Joerg Roedel Date: Thu Jun 15 15:11:51 2017 +0200 iommu/s390: Use iommu_group_get_for_dev() in s390_iommu_add_device() The iommu_group_get_for_dev() function also attaches the device to its group, so this code doesn't need to be in the iommu driver. Further by using this function the driver can make use of default domains in the future. Reviewed-by: Gerald Schaefer Signed-off-by: Joerg Roedel drivers/iommu/s390-iommu.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 58c4a95f90839624b67f67acdb8a129f4383b569 Author: Sebastian Andrzej Siewior Date: Tue Jun 27 18:16:48 2017 +0200 iommu/vt-d: Don't disable preemption while accessing deferred_flush() get_cpu() disables preemption and returns the current CPU number. The CPU number is only used once while retrieving the address of the local's CPU deferred_flush pointer. We can instead use raw_cpu_ptr() while we remain preemptible. The worst thing that can happen is that flush_unmaps_timeout() is invoked multiple times: once by taskA after seeing HIGH_WATER_MARK and then preempted to another CPU and then by taskB which saw HIGH_WATER_MARK on the same CPU as taskA. It is also likely that ->size got from HIGH_WATER_MARK to 0 right after its read because another CPU invoked flush_unmaps_timeout() for this CPU. The access to flush_data is protected by a spinlock so even if we get migrated to another CPU or preempted - the data structure is protected. While at it, I marked deferred_flush static since I can't find a reference to it outside of this file. Cc: David Woodhouse Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Cc: Andrew Morton Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit aaffaa8a3b5950c47e5f7573c34bc47de8894a18 Author: Sebastian Andrzej Siewior Date: Tue Jun 27 18:16:47 2017 +0200 iommu/iova: Don't disable preempt around this_cpu_ptr() Commit 583248e6620a ("iommu/iova: Disable preemption around use of this_cpu_ptr()") disables preemption while accessing a per-CPU variable. This does keep lockdep quiet. However I don't see the point why it is bad if we get migrated after its access to another CPU. __iova_rcache_insert() and __iova_rcache_get() immediately locks the variable after obtaining it - before accessing its members. _If_ we get migrated away after retrieving the address of cpu_rcache before taking the lock then the *other* task on the same CPU will retrieve the same address of cpu_rcache and will spin on the lock. alloc_iova_fast() disables preemption while invoking free_cpu_cached_iovas() on each CPU. The function itself uses per_cpu_ptr() which does not trigger a warning (like this_cpu_ptr() does). It _could_ make sense to use get_online_cpus() instead but the we have a hotplug notifier for CPU down (and none for up) so we are good. Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Cc: Andrew Morton Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 0a00024d7a779b283db2a02130ffa46f47634d0c Author: Huacai Chen Date: Thu Jun 22 23:06:48 2017 +0800 MIPS: Loongson: Add Loongson-3A R3 basic support Loongson-3A R3 is very similar to Loongson-3A R2. All Loongson-3 CPU family: Code-name Brand-name PRId Loongson-3A R1 Loongson-3A1000 0x6305 Loongson-3A R2 Loongson-3A2000 0x6308 Loongson-3A R3 Loongson-3A3000 0x6309 Loongson-3B R1 Loongson-3B1000 0x6306 Loongson-3B R2 Loongson-3B1500 0x6307 Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16585/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu.h | 1 + arch/mips/kernel/cpu-probe.c | 6 ++++++ arch/mips/loongson64/common/env.c | 1 + arch/mips/loongson64/loongson-3/smp.c | 5 +++-- drivers/platform/mips/cpu_hwmon.c | 17 +++++++++++++---- 5 files changed, 24 insertions(+), 6 deletions(-) commit d3f616346def161cfb0e4153692713f066755639 Author: Paul Burton Date: Fri Jun 2 12:29:59 2017 -0700 MIPS: SEAD-3: Fix GIC interrupt specifiers The various interrupt specifiers in the device tree are not in a valid format for the MIPS GIC interrupt controller binding. Where each interrupt should provide 3 values - GIC_LOCAL or GIC_SHARED, the pin number & the type of interrupt - the device tree was only providing the pin number. This causes interrupts for those devices to not be used when a GIC is present. SEAD-3 systems without a GIC are unaffected since the DT fixup code generates interrupt specifiers that are valid for the CPU interrupt controller. Fix this by adding the GIC_SHARED & IRQ_TYPE_LEVEL_HIGH values to each interrupt specifier. Signed-off-by: Paul Burton Fixes: c11e3b48dbc3 ("MIPS: SEAD3: Probe UARTs using DT") Fixes: a34e93882de4 ("MIPS: SEAD3: Probe ethernet controller using DT") Fixes: 7afd2a5aec2e ("MIPS: SEAD3: Probe EHCI controller using DT") Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # v4.9+ Patchwork: https://patchwork.linux-mips.org/patch/16189/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fbdc674ba33c3791b315a546019e570e3e94e599 Author: Paul Burton Date: Fri Jun 2 12:29:57 2017 -0700 MIPS: SEAD-3: Set interrupt-parent per-device, not at root node The SEAD-3 board may be configured with or without a MIPS Global Interrupt Controller (GIC). Because of this we have a device tree with a default case of a GIC present, and code to fixup the device tree based upon a configuration register that indicates the presence of the GIC. In order to keep this DT fixup code simple, the interrupt-parent property was specified at the root node of the SEAD-3 DT, allowing the fixup code to simply change this property to the phandle of the CPU interrupt controller if a GIC is not present & affect all interrupt-using devices at once. This however causes a problem if we do have a GIC & the device tree is used as-is, because the interrupt-parent property of the root node applies to the CPU interrupt controller node. This causes a cycle when of_irq_init() attempts to probe interrupt controllers in order and boots fail due to a lack of configured interrupts, with this message printed on the kernel console: [ 0.000000] OF: of_irq_init: children remain, but no parents Fix this by removing the interrupt-parent property from the DT root node & instead setting it for each device which uses interrupts, ensuring that the CPU interrupt controller node has no interrupt-parent & allowing of_irq_init() to identify it as the root interrupt controller. Signed-off-by: Paul Burton Reported-by: Keng Koh Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16187/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 5 ++++- arch/mips/generic/board-sead3.c | 26 ++++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) commit 032a469b1e6ef02209308a5b107c10beb4b12fb6 Author: Paul Burton Date: Fri Jun 2 12:29:56 2017 -0700 MIPS: generic: Add a MAINTAINERS entry Add an entry to MAINTAINERS for the generic platform code, such that relevant people, starting with myself, can be CC'd on patches. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16186/ Signed-off-by: Ralf Baechle MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit ae7ce6b1e0a98132e2ecb2f64ebaa8c535b6b9f5 Author: Paul Burton Date: Fri Jun 2 12:29:55 2017 -0700 MIPS: generic: Set RTC_ALWAYS_BCD to 0 Drivers for the mc146818 RTC generally check control registers to determine whether a value is encoded as binary or as a binary coded decimal. Setting RTC_ALWAYS_BCD to 1 effectively bypasses these checks and causes drivers to always expect binary coded decimal values, regardless of control register values. This does not seem like a sane default - defaulting to 0 allows the drivers to check control registers to determine encoding type & allows the driver to work generically with both binary & BCD encodings. Set this in mach-generic/mc146818rtc.h such that the generic kernel, or platforms which don't provide a custom mc146818rtc.h, can have an RTC driver which works with both encodings. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16185/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-generic/mc146818rtc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e889dfca12ce95cdeaa50f66d1f33ad8fed4ca58 Author: Paul Burton Date: Fri Jun 2 12:29:54 2017 -0700 MIPS: generic: Abstract FDT fixup application Introduce an apply_mips_fdt_fixups() function which can apply fixups to an FDT based upon an array of fixup descriptions. This abstracts that functionality such that legacy board code can apply FDT fixups without requiring lots of duplication. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16184/ Signed-off-by: Ralf Baechle arch/mips/generic/board-sead3.c | 33 +++++++++++---------------------- arch/mips/generic/init.c | 27 +++++++++++++++++++++++++++ arch/mips/include/asm/machine.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 22 deletions(-) commit c3d62fc6a058d1024f3ad0525a251e9d6c5203ed Author: Paul Burton Date: Fri Jun 2 12:29:53 2017 -0700 MIPS: generic/yamon-dt: Use serial* rather than uart* aliases Name aliases in the SEAD-3 device tree serial0 & serial1, rather than uart0 & uart1. This allows the core serial code to make use of the aliases to ensure that the UARTs are consistently numbered as expected rather than having the numbering depend upon probe order. When translating YAMON-provided serial configuration to a device tree stdout-path property adjust accordingly, such that we continue to reference a valid alias. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16183/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 6 +++--- arch/mips/generic/yamon-dt.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit f41d2430bbd6b64ee934915a1856fa406677d55e Author: Paul Burton Date: Fri Jun 2 12:29:52 2017 -0700 MIPS: generic/yamon-dt: Support > 256MB of RAM YAMON can expose more than 256MB of RAM to Linux on Malta by passing an ememsize environment variable with the full size, but the kernel then needs to be careful to choose the corresponding physical memory regions, avoiding the IO memory window. This is platform dependent, and on Malta it also depends on the memory layout which varies between system controllers. Extend yamon_dt_amend_memory() to generically handle this by taking [e]memsize bytes of memory from an array of memory regions passed in as a new parameter. Board code provides this array as appropriate depending on its own memory map. [paul.burton@imgtec.com: SEAD-3 supports 384MB DDR from 0] Signed-off-by: James Hogan Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16182/ Signed-off-by: Ralf Baechle arch/mips/generic/board-sead3.c | 17 +++++++- arch/mips/generic/yamon-dt.c | 92 +++++++++++++++++++++++++++++++--------- arch/mips/include/asm/yamon-dt.h | 22 ++++++++-- 3 files changed, 106 insertions(+), 25 deletions(-) commit 571b7e69f7f775c531ffaf73ae476b1e46150f41 Author: Paul Burton Date: Fri Jun 2 12:29:51 2017 -0700 MIPS: generic/yamon-dt: Pull YAMON DT shim code out of SEAD-3 board In preparation for supporting other YAMON-using boards (Malta) & sharing code to translate information from YAMON into device tree properties, pull the code doing so for the kernel command line, system memory & serial configuration out of the SEAD-3 board code. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16181/ Signed-off-by: Ralf Baechle arch/mips/generic/Kconfig | 8 ++ arch/mips/generic/Makefile | 1 + arch/mips/generic/board-sead3.c | 178 +----------------------------------- arch/mips/generic/yamon-dt.c | 190 +++++++++++++++++++++++++++++++++++++++ arch/mips/include/asm/yamon-dt.h | 48 ++++++++++ 5 files changed, 251 insertions(+), 174 deletions(-) commit efe4a1acdc2c70da9025cf405112667e5580a572 Author: Paul Burton Date: Fri Jun 2 12:29:58 2017 -0700 MIPS: SEAD-3: Remove GIC timer from DT The SEAD-3 board doesn't & never has configured the GIC frequency. Remove the timer node from the DT in order to avoid attempting to probe the GIC clocksource/clockevent driver which will produce error messages such as these during boot: [ 0.000000] GIC frequency not specified. [ 0.000000] Failed to initialize '/interrupt-controller@1b1c0000/timer': -22 [ 0.000000] clocksource_probe: no matching clocksources found Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16188/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 5 ----- 1 file changed, 5 deletions(-) commit 203e090ade7357101e40a3d3aad3af77653da8df Author: James Hogan Date: Wed May 31 16:19:50 2017 +0100 MIPS: Branch straight to ll in mips_atomic_set() Adjust the atomic loop in the MIPS_ATOMIC_SET operation of the sysmips system call to branch straight back to the linked load rather than jumping via a different subsection (whose purpose remains a mystery to me). Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16150/ Signed-off-by: Ralf Baechle arch/mips/kernel/syscall.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 4915e1b043d6286928207b1f6968197b50407294 Author: James Hogan Date: Wed May 31 16:19:49 2017 +0100 MIPS: Fix mips_atomic_set() with EVA EVA linked loads (LLE) and conditional stores (SCE) should be used on EVA kernels for the MIPS_ATOMIC_SET operation of the sysmips system call, or else the atomic set will apply to the kernel view of the virtual address space (potentially unmapped on EVA kernels) rather than the user view (TLB mapped). Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Cc: # 3.15.x- Patchwork: https://patchwork.linux-mips.org/patch/16151/ Signed-off-by: Ralf Baechle arch/mips/kernel/syscall.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 49955d84cd9ccdca5a16a495e448e1a06fad9e49 Author: James Hogan Date: Wed May 31 16:19:48 2017 +0100 MIPS: Save static registers before sysmips The MIPS sysmips system call handler may return directly from the MIPS_ATOMIC_SET case (mips_atomic_set()) to syscall_exit. This path restores the static (callee saved) registers, however they won't have been saved on entry to the system call. Use the save_static_function() macro to create a __sys_sysmips wrapper function which saves the static registers before calling sys_sysmips, so that the correct static register state is restored by syscall_exit. Fixes: f1e39a4a616c ("MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler") Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16149/ Signed-off-by: Ralf Baechle arch/mips/kernel/scall32-o32.S | 2 +- arch/mips/kernel/scall64-64.S | 2 +- arch/mips/kernel/scall64-n32.S | 2 +- arch/mips/kernel/scall64-o32.S | 2 +- arch/mips/kernel/syscall.c | 6 ++++++ 5 files changed, 10 insertions(+), 4 deletions(-) commit 2ec420b26f7b6ff332393f0bb5a7d245f7ad87f0 Author: James Hogan Date: Wed May 31 16:19:47 2017 +0100 MIPS: Fix mips_atomic_set() retry condition The inline asm retry check in the MIPS_ATOMIC_SET operation of the sysmips system call has been backwards since commit f1e39a4a616c ("MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler") merged in v2.6.32, resulting in the non R10000_LLSC_WAR case retrying until the operation was inatomic, before returning the new value that was probably just written multiple times instead of the old value. Invert the branch condition to fix that particular issue. Fixes: f1e39a4a616c ("MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler") Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16148/ Signed-off-by: Ralf Baechle arch/mips/kernel/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 736add2412a7740d9d8b56fb83440e94b01bc1b4 Author: Marcin Nowakowski Date: Tue Jun 13 11:23:39 2017 +0200 MIPS: perf: add I6500 handling Add a definition of the perf registers for the new I6500 core. Since I6500 has the same event definitions as I6400, re-use the existing i6400 map structures by renaming them to a slightly more generic 'i6x00_***_map'. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16362/ Signed-off-by: Ralf Baechle arch/mips/kernel/perf_event_mipsxx.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 859aeb1b0dd1b9c6ff3d78f6cb913a73af9da247 Author: Paul Burton Date: Fri Jun 2 12:39:04 2017 -0700 MIPS: Probe the I6500 CPU Introduce the I6500 PRID & probe it just the same way as I6400. The MIPS I6500 is the latest in Imagination Technologies' I-Class range of CPUs, with a focus on scalability & heterogeneity. It introduces the notion of multiple clusters to the MIPS Coherent Processing System, allowing for a far higher total number of cores & threads in a system when compared with its predecessors. Clusters don't need to be identical, and may contain differing numbers of cores & IOCUs, or cores with differing properties. This patch alone adds the basic support for booting Linux on an I6500 CPU without support for any of its new functionality, for which support will be introduced in further patches. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16190/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-type.h | 1 + arch/mips/include/asm/cpu.h | 3 ++- arch/mips/kernel/cpu-probe.c | 5 +++++ arch/mips/mm/c-r4k.c | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) commit 498e9ade6593887397844eb8ac9d811252f7239e Author: Paul Burton Date: Tue Jun 13 10:01:08 2017 -0700 MIPS: Perform post-DMA cache flushes on systems with MAARs Recent CPUs from Imagination Technologies such as the I6400 or P6600 are able to speculatively fetch data from memory into caches. This means that if used in a system with non-coherent DMA they require that caches be invalidated after a device performs DMA, and before the CPU reads the DMA'd data, in order to ensure that stale values weren't speculatively prefetched. Such CPUs also introduced Memory Accessibility Attribute Registers (MAARs) in order to control the regions in which they are allowed to speculate. Thus we can use the presence of MAARs as a good indication that the CPU requires the above cache maintenance. Use the presence of MAARs to determine the result of cpu_needs_post_dma_flush() in the default case, in order to handle these recent CPUs correctly. Note that the return type of cpu_needs_post_dma_flush() is changed to bool, such that it's clearer what's happening when cpu_has_maar is cast to bool for the return value. If this patch were backported to a pre-v4.7 kernel then MIPS_CPU_MAAR was 1ull<<34, so when cast to an int we would incorrectly return 0. It so happens that MIPS_CPU_MAAR is currently 1ull<<30, so when truncated to an int gives a non-zero value anyway, but even so the implicit conversion from long long int to bool makes it clearer to understand what will happen than the implicit conversion from long long int to int would. The bool return type also fits this usage better semantically, so seems like an all-round win. Thanks to Ed for spotting the issue for pre-v4.7 kernels & suggesting the return type change. Signed-off-by: Paul Burton Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue Cc: Ed Blake Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16363/ Signed-off-by: Ralf Baechle arch/mips/mm/dma-default.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 669c4092225f0ed5df12ebee654581b558a5e3ed Author: David Daney Date: Tue Jun 13 15:28:47 2017 -0700 MIPS: Give __secure_computing() access to syscall arguments. KProbes of __seccomp_filter() are not very useful without access to the syscall arguments. Do what x86 does, and populate a struct seccomp_data to be passed to __secure_computing(). This allows samples/bpf/tracex5 to extract a sensible trace. Signed-off-by: David Daney Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Matt Redfearn Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16368/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit f381bf6d82f032b7410185b35d000ea370ac706b Author: David Daney Date: Tue Jun 13 15:28:46 2017 -0700 MIPS: Add support for eBPF JIT. Since the eBPF machine has 64-bit registers, we only support this in 64-bit kernels. As of the writing of this commit log test-bpf is showing: test_bpf: Summary: 316 PASSED, 0 FAILED, [308/308 JIT'ed] All current test cases are successfully compiled. Many examples in samples/bpf are usable, specifically tracex5 which uses tail calls works. Signed-off-by: David Daney Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Markos Chandras Cc: Matt Redfearn Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16369/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 12 +++++++++++- arch/mips/net/Makefile | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) commit dc190129f1c16e025a42a9c3717de7ed47fc6e2f Author: David Daney Date: Tue Jun 13 15:28:45 2017 -0700 MIPS: Add some instructions to uasm. Follow on patches for eBPF JIT require these additional instructions: insn_bgtz, insn_blez, insn_break, insn_ddivu, insn_dmultu, insn_dsbh, insn_dshd, insn_dsllv, insn_dsra32, insn_dsrav, insn_dsrlv, insn_lbu, insn_movn, insn_movz, insn_multu, insn_nor, insn_sb, insn_sh, insn_slti, insn_dinsu, insn_lwu ... so, add them. Sort the insn_* enumeration values alphabetically. Signed-off-by: David Daney Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Matt Redfearn Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16367/ Signed-off-by: Ralf Baechle arch/mips/include/asm/uasm.h | 30 +++++++++++++++++++++++ arch/mips/mm/uasm-mips.c | 21 ++++++++++++++++ arch/mips/mm/uasm.c | 58 ++++++++++++++++++++++++++++++++++---------- 3 files changed, 96 insertions(+), 13 deletions(-) commit 1f22d599c9849898ef9e3229434b87438278cccc Author: David Daney Date: Tue Jun 13 15:28:44 2017 -0700 MIPS: Correctly define DBSHFL type instruction opcodes. DSHD was incorrectly classified as being BSHFL, and DSHD was missing altogether. Signed-off-by: David Daney Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Matt Redfearn Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16366/ Signed-off-by: Ralf Baechle arch/mips/include/uapi/asm/inst.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ce807d5f67ed309a6f357b88cc93185d89e921d3 Author: David Daney Date: Tue Jun 13 15:28:43 2017 -0700 MIPS: Optimize uasm insn lookup. Instead of doing a linear search through the insn_table for each instruction, use the opcode as direct index into the table. This will give constant time lookup performance as the number of supported opcodes increases. Make the tables const as they are only ever read. For uasm-mips.c sort the table alphabetically, and remove duplicate entries, uasm-micromips.c was already sorted and duplicate free. There is a small savings in object size as struct insn loses a field: $ size arch/mips/mm/uasm-mips.o arch/mips/mm/uasm-mips.o.save text data bss dec hex filename 10040 0 0 10040 2738 arch/mips/mm/uasm-mips.o 9240 1120 0 10360 2878 arch/mips/mm/uasm-mips.o.save Signed-off-by: David Daney Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Matt Redfearn Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16365/ Signed-off-by: Ralf Baechle arch/mips/mm/uasm-micromips.c | 188 ++++++++++++++++++------------------ arch/mips/mm/uasm-mips.c | 217 +++++++++++++++++++++--------------------- arch/mips/mm/uasm.c | 3 +- 3 files changed, 199 insertions(+), 209 deletions(-) commit 430d0b88943afffd0da6d98799bf0afb008fd13f Author: Paul Burton Date: Thu Mar 30 11:37:45 2017 -0700 MIPS: module: Unify rel & rela reloc handling The module load code has previously had entirely separate implementations for rel & rela style relocs, which unnecessarily duplicates a whole lot of code. Unify the implementations of both types of reloc, sharing the bulk of the code. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15832/ Signed-off-by: Ralf Baechle arch/mips/include/asm/module.h | 8 +- arch/mips/kernel/Makefile | 1 - arch/mips/kernel/module-rela.c | 202 ----------------------------------------- arch/mips/kernel/module.c | 195 ++++++++++++++++++++++++++++++--------- 4 files changed, 154 insertions(+), 252 deletions(-) commit 351b0940d473146923711bc943fc881354a4c1f3 Author: Paul Burton Date: Thu Mar 30 11:37:44 2017 -0700 MIPS: module: Ensure we always clean up r_mips_hi16_list If we hit an error whilst processing a reloc then we would return early from apply_relocate & potentially not free entries in r_mips_hi16_list, thereby leaking memory. Fix this by ensuring that we always run the code to free r_mipps_hi16_list when errors occur. Signed-off-by: Paul Burton Fixes: 861667dc82f5 ("MIPS: Fix race condition in module relocation code.") Fixes: 04211a574641 ("MIPS: Bail on unsupported module relocs") Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15831/ Signed-off-by: Ralf Baechle arch/mips/kernel/module.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 0b25635bd4da0a4b3d294f7b27aea0dc0cdfccff Merge: c0bc126 f935448 Author: Joerg Roedel Date: Wed Jun 28 10:42:54 2017 +0200 Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu commit bd751808f9ff5e1822c627f6c4283009e66b2e53 Author: Geoff Lansberry Date: Thu Apr 27 17:28:46 2017 -0400 NFC: trf7970a: Correct register settings for 27MHz clock In prior commits the selected clock frequency does not propagate correctly to what is written to the TRF7970A_MODULATOR_SYS_CLK_CTRL register. Signed-off-by: Geoff Lansberry Acked-by: Mark Greer Signed-off-by: Samuel Ortiz drivers/nfc/trf7970a.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4d79ce40646c51250477cdeefdb7bb3c720755a7 Merge: 12d01662 bdbbf7d Author: Dave Airlie Date: Wed Jun 28 17:11:12 2017 +1000 Merge tag 'drm-intel-next-fixes-2017-06-27' of git://anongit.freedesktop.org/git/drm-intel into drm-next Just three minor fixups for stuff in -next. * tag 'drm-intel-next-fixes-2017-06-27' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Clear execbuf's vma backpointer upon release drm/i915: Pass the right flags to i915_vma_move_to_active() drm/i915/cnl: Fix RMW on ddi vswing sequence. commit 12d016626f99f48edbf5b006625b4e8c0de1eec7 Merge: 8cd3737 7a10d63 Author: Dave Airlie Date: Wed Jun 28 17:09:27 2017 +1000 Merge tag 'drm-amdkfd-next-2017-06-25' of git://people.freedesktop.org/~gabbayo/linux into drm-next amdkfd fixes * tag 'drm-amdkfd-next-2017-06-25' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Spelling s/apreture/aperture/ drm/amdkfd: NULL dereference involving create_process() commit 8cd373707bc1903869573f577f7d39f9cee9c7ad Merge: 6d61e70 46a269d Author: Dave Airlie Date: Wed Jun 28 17:08:12 2017 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next - a fix from Eric for synchronization with etnaviv exported dma-bufs - thermal throttle support for newer GPU cores - updated module clock gating to work around GPU errata - a fix to restore userspace buffer cache performance * 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: restore ETNA_PREP_NOSYNC behaviour drm/etnaviv: implement cooling support for new GPU cores drm/etnaviv: update MLCG disables with info from newer Vivante driver drm/etnaviv: update common.xml.h drm/etnaviv: Expose our reservation object when exporting a dmabuf. commit f03293d8fc97f07dbe4c54ce495c8dac172dc6e1 Author: Takashi Iwai Date: Wed Jun 28 08:13:41 2017 +0200 ALSA: Fix forgotten dependency fix for tristate OSS sequencer kconfig In the commit 3d774d5ef066 ("ALSA: seq: Allow the tristate build of OSS emulation") we changed CONFIG_SND_SEQUENCER_OSS to tristate, but a couple of places were forgotten, namely, opl3 and emux Makefile. These contain the line like snd-opl3-synth-$(CONFIG_SND_SEQUENCER_OSS) += opl3_oss.o and this doesn't work any longer as expected because snd-opl3-synth can be built-in while CONFIG_SND_SEQUENCER_OSS=m. This patch fixes these places to build properly for the new kconfig dependency. In the end, we had to use ifneq() to satisfy the requirement. It's a bit ugly, but lesser evil. Fixes: 3d774d5ef066 ("ALSA: seq: Allow the tristate build of OSS emulation") Reported-by: kbuild test robot Signed-off-by: Takashi Iwai sound/drivers/opl3/Makefile | 4 +++- sound/synth/emux/Makefile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit c4758fa59285fe4dbfeab4364a6957936d040fbf Author: Stephen Rothwell Date: Tue Jun 20 14:50:36 2017 +1000 apparmor: put back designators in struct initialisers Fixes: 8014370f1257 ("apparmor: move path_link mediation to using labels") Signed-off-by: Stephen Rothwell Acked-by: John Johansen Acked-by: Kees Cook Signed-off-by: James Morris security/apparmor/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 795c9a5106119f45d2501c4fb01051178904753f Author: Jan Höppner Date: Thu Jun 22 17:17:15 2017 +0200 s390/dasd: Fix faulty ENODEV for RO sysfs attribute If a device is offline it can still be set to read-only via the bus id through sysfs. Only the read-only feature flag for the ccw_device is then set. If the device is online the corresponding block device needs to be set to read-only as well (via set_disk_ro()). The check whether there is a device to do so, however, happens after the feature flag was set. This leads to an unnecessary "no such device" error in the offline case. This bug was introduced by commit 7571cb1c8e3cc ("s390/dasd: Make use of dasd_set_feature() more often"). Fix this by simply returning count if no device is available. Fixes: 7571cb1c8e3cc ("s390/dasd: Make use of dasd_set_feature() more often") Reviewed-by: Stefan Haberland Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_devmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 312e8462ab6a1594a0bc4bc51c8e36c9f07b447b Author: Sebastian Ott Date: Wed Jun 21 10:20:35 2017 +0200 s390/pci: recognize name clashes with uids When uid checking is enabled firmware guarantees uniqueness of the uids and we use them for device enumeration. Tests have shown that uid checking can be toggled at runtime. This is unfortunate since it can lead to name clashes. Recognize these name clashes by allocating bits in zpci_domain even for firmware provided ids. Signed-off-by: Sebastian Ott Reviewed-by: Pierre Morel Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit be2c36769f6340322c5367586adad6c3ce1ed51a Author: Sebastian Ott Date: Wed Jun 21 12:30:40 2017 +0200 s390/pci: provide more debug information Add some debug data to observe the lifetime of the architecture specific device information. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 1 + arch/s390/pci/pci_clp.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 01553d9a2ba7c658bf9e9e5c65466508c1bd6db5 Author: Sebastian Ott Date: Tue Jun 20 15:56:05 2017 +0200 s390/pci: fix handling of PEC 306 In contrast to other hotplug events PEC 0x306 isn't about a single but multiple devices. Also there's no information on what happened to these devices. We correctly handled hotplug that way but failed to handle hot-unplug. This patch addresses that and implements hot-unplug of multiple devices via PEC 306. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci.h | 2 +- arch/s390/pci/pci.c | 29 +++++++++++++++++++---------- arch/s390/pci/pci_clp.c | 25 ++++--------------------- 3 files changed, 24 insertions(+), 32 deletions(-) commit 623bd44d3f277b7bbe16e0e091bd361e75964b5d Author: Sebastian Ott Date: Tue May 9 12:27:30 2017 +0200 s390/pci: improve pci hotplug PCI hotplug events basically notify about the new state of a function. Unfortunately some hypervisors implement hotplug events in a way where it is not clear what the new state of the function should be. Use clp_get_state to find the current state of the function and handle accordingly. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci.h | 1 + arch/s390/pci/pci.c | 9 +++++++++ arch/s390/pci/pci_event.c | 14 +++++++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) commit 783684f1f60faec09f3ac74c0b12e89bdb182429 Author: Sebastian Ott Date: Wed Apr 26 18:59:52 2017 +0200 s390/pci: introduce clp_get_state Code handling pci hotplug needs to determine the configuration state of a pci function. Implement clp_get_state as a wrapper for list pci functions. Also change enum zpci_state to match the configuration state values. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci.h | 10 ++++----- arch/s390/pci/pci_clp.c | 51 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 14 deletions(-) commit 4e5bd7803bd1e822513d1007bad1527a2ec589b6 Author: Sebastian Ott Date: Sat Jun 10 14:12:13 2017 +0200 s390/pci: improve error handling during fmb (de)registration Cleanup in zpci_fmb_enable_device when fmb registration fails. Also don't free the fmb when deregistration fails in zpci_fmb_disable_device but handle error situations when a function was hot-unplugged. Also remove the mod_pci helper since it is no longer used. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 51 +++++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 30 deletions(-) commit 725708349172f00b86e2bac5c03de360b79aaf65 Author: Sebastian Ott Date: Sat Jun 10 14:10:00 2017 +0200 s390/pci: improve unreg_ioat error handling DMA tables are freed in zpci_dma_exit_device regardless of the return code of zpci_unregister_ioat. This could lead to a use after free. On the other hand during function hot-unplug, zpci_unregister_ioat will always fail since the function is already gone. So let zpci_unregister_ioat report success when the function is gone but don't cleanup the dma table when a function could still have it in access. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 19 ++++++++++++++----- arch/s390/pci/pci_dma.c | 4 +++- 2 files changed, 17 insertions(+), 6 deletions(-) commit 4dfbd3efe3f0cf9ff1325b87491e1b1fe07afaf1 Author: Sebastian Ott Date: Sat Jun 10 13:54:44 2017 +0200 s390/pci: improve error handling during interrupt deregistration When we ask a function to stop creating interrupts this may fail due to the function being already gone (e.g. after hot-unplug). Consequently we don't free associated resources like summary bits and bit vectors used for irq processing. This could lead to situations where we ran out of these resources and fail to setup new interrupts. The fix is to just ignore the errors in cases where we can be sure no new interrupts are generated. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci_insn.h | 2 +- arch/s390/pci/pci.c | 29 +++++++++++++++++++---------- arch/s390/pci/pci_insn.c | 10 +++++----- 3 files changed, 25 insertions(+), 16 deletions(-) commit 795818e8bf17dbc791764ba9fb723278ee934676 Author: Sebastian Ott Date: Sat Jun 10 13:09:07 2017 +0200 s390/pci: don't cleanup in arch_setup_msi_irqs After failures in arch_setup_msi_irqs common code calls arch_teardown_msi_irqs. Thus, remove cleanup code from arch_setup_msi_irqs. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci.h | 2 +- arch/s390/pci/pci.c | 45 +++++++++++++++++---------------------------- 2 files changed, 18 insertions(+), 29 deletions(-) commit 39e46751839dfe4c34eb354eee1e278082fc9d07 Author: Anshuman Khandual Date: Thu Apr 6 19:44:50 2017 +0530 powerpc/mm: Add comments on vmemmap physical mapping Adds some explaination on how the vmemmap based struct page layout's physical mapping is allocated and tracked through linked list. It also keeps note of a possible race condition. Signed-off-by: Anshuman Khandual Signed-off-by: Michael Ellerman arch/powerpc/mm/init_64.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit b0f36c10de8d9bd271ae261604d4e4f47f663255 Author: Anshuman Khandual Date: Thu Apr 6 19:44:49 2017 +0530 powerpc/mm: Add comments to the vmemmap layout Add some explaination to the layout of vmemmap virtual address space and how physical page mapping is only used for valid PFNs present at any point on the system. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Anshuman Khandual Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-hash64.c | 75 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit c642af9c41f09296997519499d16ff30e700816a Author: Santosh Sivaraj Date: Tue Jun 27 12:30:06 2017 +0530 powerpc/smp: Convert NR_CPUS to nr_cpu_ids nr_cpu_ids can be limited by nr_cpus boot parameter, whereas NR_CPUS is a compile time constant, which shouldn't be compared against during cpu kick. Signed-off-by: Santosh Sivaraj Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 2 +- arch/powerpc/platforms/cell/smp.c | 2 +- arch/powerpc/platforms/powernv/smp.c | 2 +- arch/powerpc/platforms/pseries/smp.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit f8d0d5dc641cd405ad40cb2498b04df9716baee6 Author: Santosh Sivaraj Date: Tue Jun 27 12:30:05 2017 +0530 powerpc/smp: Do not BUG_ON if invalid CPU during kick During secondary start, we do not need to BUG_ON if an invalid CPU number is passed. We already print an error if secondary cannot be started, so just return an error instead. Signed-off-by: Santosh Sivaraj Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 3 ++- arch/powerpc/platforms/cell/smp.c | 3 ++- arch/powerpc/platforms/powernv/smp.c | 3 ++- arch/powerpc/platforms/pseries/smp.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) commit adeb8667eaf5f00b5a7f0cede680cda078e8424b Author: Javier Martinez Canillas Date: Thu Jun 15 20:54:18 2017 +0200 powerpc/44x: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/warp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d0590cefdc22bc5d6f4d30ea19c95acda2eefed Author: Javier Martinez Canillas Date: Thu Jun 15 20:54:17 2017 +0200 powerpc/83xx: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/mpc8308_p1m.dts | 2 +- arch/powerpc/boot/dts/mpc8349emitx.dts | 4 ++-- arch/powerpc/boot/dts/mpc8377_rdb.dts | 2 +- arch/powerpc/boot/dts/mpc8377_wlan.dts | 2 +- arch/powerpc/boot/dts/mpc8378_rdb.dts | 2 +- arch/powerpc/boot/dts/mpc8379_rdb.dts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) commit 9b4091682700fb5909aed439fc0101992164bcd0 Author: Javier Martinez Canillas Date: Thu Jun 15 20:54:16 2017 +0200 powerpc/512x: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/mpc5121ads.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 226b9391d1a4e91fe08627f75ebad1c60900dfe2 Author: Javier Martinez Canillas Date: Thu Jun 15 20:54:15 2017 +0200 powerpc/fsl: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/fsl/b4qds.dtsi | 8 ++++---- arch/powerpc/boot/dts/fsl/c293pcie.dts | 2 +- arch/powerpc/boot/dts/fsl/p1010rdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/p1023rdb.dts | 2 +- arch/powerpc/boot/dts/fsl/p2041rdb.dts | 4 ++-- arch/powerpc/boot/dts/fsl/p3041ds.dts | 4 ++-- arch/powerpc/boot/dts/fsl/p4080ds.dts | 4 ++-- arch/powerpc/boot/dts/fsl/p5020ds.dts | 4 ++-- arch/powerpc/boot/dts/fsl/p5040ds.dts | 4 ++-- arch/powerpc/boot/dts/fsl/t208xqds.dtsi | 8 ++++---- arch/powerpc/boot/dts/fsl/t4240qds.dts | 12 ++++++------ arch/powerpc/boot/dts/fsl/t4240rdb.dts | 6 +++--- 12 files changed, 30 insertions(+), 30 deletions(-) commit fd393188064e3d01a91a21160751f60ff5ce5def Author: Javier Martinez Canillas Date: Thu Jun 15 20:54:14 2017 +0200 powerpc/5200: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/digsy_mtc.dts | 2 +- arch/powerpc/boot/dts/pcm030.dts | 2 +- arch/powerpc/boot/dts/pcm032.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 7ded429152e84831f6696585755f318fb351e67f Author: Nicholas Piggin Date: Wed Jun 14 23:02:41 2017 +1000 cpuidle: powerpc: no memory barrier after break from idle A memory barrier is not required after the task wakes up, only if we clear the polling flag before waking. The case where we have work to do is the important one, so optimise for it. Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman drivers/cpuidle/cpuidle-powernv.c | 11 +++++++++-- drivers/cpuidle/cpuidle-pseries.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) commit 624e46d03576dd4d5667bad9d2ef814135d0075c Author: Nicholas Piggin Date: Wed Jun 14 23:02:40 2017 +1000 cpuidle: powerpc: read mostly for common globals Ensure these don't get put into bouncing cachelines. Reviewed-by: Vaidyanathan Srinivasan Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman drivers/cpuidle/cpuidle-powernv.c | 10 +++++----- drivers/cpuidle/cpuidle-pseries.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit 3fc5ee927ff4ffed6aa2fcd44d2fbf07ac893cdc Author: Nicholas Piggin Date: Wed Jun 14 23:02:39 2017 +1000 cpuidle: powerpc: cpuidle set polling before enabling irqs local_irq_enable can cause interrupts to be taken which could take significant amount of processing time. The idle process should set its polling flag before this, so another process that wakes it during this time will not have to send an IPI. Expand the TIF_POLLING_NRFLAG coverage to as large as possible. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman drivers/cpuidle/cpuidle-powernv.c | 4 +++- drivers/cpuidle/cpuidle-pseries.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 68fa6478e3b1fab7077d390070ed455aed93905c Author: Hari Bathini Date: Fri Jun 2 01:10:10 2017 +0530 powerpc/fadump: add reschedule point while releasing memory Around 95% of memory is reserved by fadump/capture kernel. All this memory is freed, one page at a time, on writing '1' to the node /sys/kernel/fadump_release_mem. On systems with large memory, this can take a long time to complete, leading to soft lockup warning messages. To avoid this, add reschedule points at regular intervals. Also, while memblock_reserve() implicitly takes care of holes in the given memory range while reserving memory, those holes need to be taken care of while releasing memory as memory is freed one page at a time. Add support to skip holes while releasing memory. Suggested-by: Michael Ellerman Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 65 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 11 deletions(-) commit a5a05b91c7f36c180c32e27fa41890957c31bad1 Author: Hari Bathini Date: Thu Jun 1 22:52:10 2017 +0530 powerpc/fadump: provide a helpful error message fadump fails to register when there are holes in boot memory area. Provide a helpful error message to the user in such case. Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit eae0dfcc44320c79a05637534d59af4643b2ee7b Author: Hari Bathini Date: Thu Jun 1 22:51:26 2017 +0530 powerpc/fadump: avoid holes in boot memory area when fadump is registered To register fadump, boot memory area - the size of low memory chunk that is required for a kernel to boot successfully when booted with restricted memory, is assumed to have no holes. But this memory area is currently not protected from hot-remove operations. So, fadump could fail to re-register after a memory hot-remove operation, if memory is removed from boot memory area. To avoid this, ensure that memory from boot memory area is not hot-removed when fadump is registered. Signed-off-by: Hari Bathini Reviewed-by: Mahesh J Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/include/asm/fadump.h | 1 + arch/powerpc/kernel/fadump.c | 12 ++++++++++++ arch/powerpc/platforms/pseries/hotplug-memory.c | 7 +++++++ 3 files changed, 20 insertions(+) commit a77af552ccc9d4d54459a39f9e5f7ad307aeb4f9 Author: Hari Bathini Date: Thu Jun 1 22:50:38 2017 +0530 powerpc/fadump: avoid duplicates in crash memory ranges fadump sets up crash memory ranges to be used for creating PT_LOAD program headers in elfcore header. Memory chunk RMA_START through boot memory area size is added as the first memory range because firmware, at the time of crash, moves this memory chunk to different location specified during fadump registration making it necessary to create a separate program header for it with the correct offset. This memory chunk is skipped while setting up the remaining memory ranges. But currently, there is possibility that some of this memory may have duplicate entries like when it is hot-removed and added again. Ensure that no two memory ranges represent the same memory. When 5 lmbs are hot-removed and then hot-plugged before registering fadump, here is how the program headers in /proc/vmcore exported by fadump look like without this change: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align NOTE 0x0000000000010000 0x0000000000000000 0x0000000000000000 0x0000000000001894 0x0000000000001894 0 LOAD 0x0000000000021020 0xc000000000000000 0x0000000000000000 0x0000000040000000 0x0000000040000000 RWE 0 LOAD 0x0000000040031020 0xc000000000000000 0x0000000000000000 0x0000000010000000 0x0000000010000000 RWE 0 LOAD 0x0000000050040000 0xc000000010000000 0x0000000010000000 0x0000000050000000 0x0000000050000000 RWE 0 LOAD 0x00000000a0040000 0xc000000060000000 0x0000000060000000 0x000000019ffe0000 0x000000019ffe0000 RWE 0 and with this change: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align NOTE 0x0000000000010000 0x0000000000000000 0x0000000000000000 0x0000000000001894 0x0000000000001894 0 LOAD 0x0000000000021020 0xc000000000000000 0x0000000000000000 0x0000000040000000 0x0000000040000000 RWE 0 LOAD 0x0000000040030000 0xc000000040000000 0x0000000040000000 0x0000000020000000 0x0000000020000000 RWE 0 LOAD 0x0000000060030000 0xc000000060000000 0x0000000060000000 0x000000019ffe0000 0x000000019ffe0000 RWE 0 Signed-off-by: Hari Bathini Reviewed-by: Mahesh J Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 24bedcb7c811375a962a621613ad152d95bc28ba Author: Madhavan Srinivasan Date: Sun Jun 25 21:04:46 2017 +0530 powerpc/perf: Fix branch event code for power9 Correct "branch" event code of Power9 is "r4d05e". Replace the current "branch" event code with "r4d05e" and add a hack to use "r10012" as event code for Power9 DD1. Fixes: d89f473ff6f8 ("powerpc/perf: Fix PM_BRU_CMPL event code for power9") Reported-by: Anton Blanchard Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/power9-events-list.h | 4 +++- arch/powerpc/perf/power9-pmu.c | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 89d8bb163868178d5b35d1bc1237e67306940cce Author: Benjamin Herrenschmidt Date: Sat Jun 24 14:57:27 2017 -0500 powerpc/xive: Silence message about VP block allocation There is no reason for that message to be pr_info(), it will be printed every time we start a KVM guest. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/native.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f62f9ffdb5ef683ef8cffb43932fa72cc3713e94 Author: Johan Hovold Date: Wed Jun 21 11:35:09 2017 +0200 scsi: sun_esp: fix device reference leaks Make sure to drop the reference to the dma device taken by of_find_device_by_node() on probe errors and on driver unbind. Fixes: 334ae614772b ("sparc: Kill SBUS DVMA layer.") Signed-off-by: Johan Hovold Signed-off-by: Martin K. Petersen drivers/scsi/sun_esp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4a1108d6caf7cd0f15d439bee6163ba00c7c1b33 Author: Satish Kharat Date: Mon Jun 26 17:49:06 2017 -0700 scsi: fnic: changing queue command to return result DID_IMM_RETRY when rport is init Currently the queue command returns DID_NO_CONNECT anytime the rport is not in RPORT_ST_READY state. Changing it to return DID_NO_CONNECT only when the rport is in RPORT_ST_DELETE state. When the rport is in one of the init states retruning DID_IMM_RETRY. Signed-off-by: Sesidhar Baddela Signed-off-by: Satish Kharat Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_scsi.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit c22fa50b2d41f3091d2ab0acf60ffdedb7ccd765 Author: Satish Kharat Date: Mon Jun 26 17:48:44 2017 -0700 scsi: fnic: correct speed display and add support for 25,40 and 100G Setting speed based on the vinc device parameter read during linkup. Also adding support to display 25,40 and 100G Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_fcs.c | 24 ++++++++++++++++++++++++ drivers/scsi/fnic/fnic_io.h | 9 +++++++++ drivers/scsi/fnic/fnic_main.c | 14 ++++++++++++-- 3 files changed, 45 insertions(+), 2 deletions(-) commit 43caa03fec79d062c5f7a959a823770d72717b24 Author: Satish Kharat Date: Mon Jun 26 17:48:08 2017 -0700 scsi: fnic: added timestamp reporting in fnic debug stats Added the timestamps for 1. current timestamp 2. last fnic stats read timestamp 3. last fnic stats reset timestamp and the deltas since last stats read and last reset in fnic stats. fnic stats uses debugfs Signed-off-by: Sesidhar Baddela Signed-off-by: Satish Kharat Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_debugfs.c | 1 + drivers/scsi/fnic/fnic_stats.h | 7 +++++++ drivers/scsi/fnic/fnic_trace.c | 24 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+) commit 1cdf8bc18f1ee43a39e543506fff8d5db3020ae1 Author: Satish Kharat Date: Mon Jun 26 17:46:23 2017 -0700 scsi: fnic: Zero io_cmpl_skip on fw reset completion io_cmpl_skip keep track of number of completions to skip when stats are reset. If a fw_reset happens immediately after stats reset it could put it out of sync so need to reset io_cmpl_skip when fw reset is completed. Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_scsi.c | 1 + 1 file changed, 1 insertion(+) commit 3655a286ca5c244612f586cbb034cab433a20a1a Author: Chad Dupuis Date: Mon Jun 26 08:59:38 2017 -0700 scsi: bnx2fc: Update version number to 2.11.8. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5eddc3358f6e2e2e7c56a24a75566c90ca207303 Author: Chad Dupuis Date: Mon Jun 26 08:59:37 2017 -0700 scsi: bnx2fc: Make rport_terminate_io callback a NOOP. Do not call the stock libfc terminate rport i/o handler so we won't reset the libfc exchange manager and kill any outstanding discovery requests. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5c63daf67d4753f80883672d429ff7b6595ec2f4 Author: Chad Dupuis Date: Mon Jun 26 08:59:36 2017 -0700 scsi: bnx2fc: If IO is still in cleanup then do not return to SCSI layer. In eh_abort, driver is calling scsi->done() for a IO for which cleanup is pending. As the IO is outstanding with the firmware, it may do DMA associated with the IO. This may lead to heap corruption. Do not complete the IO for which cleanup is still pending. Return failure from eh_abort and let the SCSI-ml retry the IO. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_io.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 59fb870f0ed4da64cbbc44f6a4dc1038be9f8904 Author: Chad Dupuis Date: Mon Jun 26 08:59:35 2017 -0700 scsi: bnx2fc: Adjust bnx2fc_npiv_create_vports for WWNNs from NVRAM that are zero. Some vports addresses stored in NVRAM may have zero for the WWNN. Adjust the WWNN that we'll use to be the same as the WWPN. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 21144b80619fc953bcf3615252960f2cdf846883 Author: Chad Dupuis Date: Mon Jun 26 08:59:34 2017 -0700 scsi: bnx2fc: Update copyright for 2017. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/57xx_hsi_bnx2fc.h | 3 ++- drivers/scsi/bnx2fc/bnx2fc.h | 3 ++- drivers/scsi/bnx2fc/bnx2fc_constants.h | 3 ++- drivers/scsi/bnx2fc/bnx2fc_debug.c | 3 ++- drivers/scsi/bnx2fc/bnx2fc_debug.h | 3 ++- drivers/scsi/bnx2fc/bnx2fc_els.c | 3 ++- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 3 ++- drivers/scsi/bnx2fc/bnx2fc_hwi.c | 3 ++- drivers/scsi/bnx2fc/bnx2fc_io.c | 3 ++- drivers/scsi/bnx2fc/bnx2fc_tgt.c | 3 ++- 10 files changed, 20 insertions(+), 10 deletions(-) commit de08f46b90d3b353f53d273604e6544186564e59 Author: Chad Dupuis Date: Mon Jun 26 08:59:33 2017 -0700 scsi: bnx2fc: Check for connection offload before sending RRQ. If the connection is not offloaded then the backpointers from the tgt pointer are undefined. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_els.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 56ffd3a0500e3b0c133da451036074fd0a8c3f1c Author: Chad Dupuis Date: Mon Jun 26 08:59:32 2017 -0700 scsi: bnx2fc: Add filters to the non-offload FCoE receive path. Add the following filters to bnx2fc_recv_frame(): 1. Filter out invalid packets - eth->dest_mac[3] matches FC frame's D_ID 2. Filter out packets that are not from our connected target - In FIP_ST_ENABLED mode - eth->src_mac matches fcoe_ctlr->dest_addr 3. Filter out packets where if d_id of the packet doesn't belong to the device when one is already assigned a port_id, only then this packet is dropped Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 5c279bd9e40624f4ab6e688671026d6005b066fa Author: Christoph Hellwig Date: Fri Jun 16 10:27:55 2017 +0200 scsi: default to scsi-mq Remove the SCSI_MQ_DEFAULT config option and default to the blk-mq I/O path now that we had plenty of testing, and have I/O schedulers for blk-mq. The module option to disable the blk-mq path is kept around for now. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 11 ----------- drivers/scsi/scsi.c | 4 ---- 2 files changed, 15 deletions(-) commit 6d311fa7d2c18659d040b9beba5e41fe24c2a6f5 Author: Johannes Thumshirn Date: Wed Jun 14 13:52:43 2017 +0200 scsi: sas: scsi_queue_work can fail, so make callers aware libsas uses scsi_queue_work() to queue its internal event notifications. scsi_queue_work() can return -EINVAL if the work queue doesn't exist and it does call queue_work() which can return false if the work is already queued. Make the SAS event code capable of returning errors up to the caller, which is handy when changing to dynamically allocated work in libsas as well, as discussed here: https://lkml.org/lkml/2017/6/14/121. [mkp: fixed typo] Signed-off-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_event.c | 36 ++++++++++++++++++++++-------------- drivers/scsi/libsas/sas_internal.h | 4 ++-- include/scsi/libsas.h | 6 +++--- 3 files changed, 27 insertions(+), 19 deletions(-) commit d06c587dd723882cd99c89d335b89c535079cdb1 Author: Himanshu Madhani Date: Wed Jun 21 13:48:46 2017 -0700 scsi: qla2xxx: Update Driver version to 10.00.00.00-k Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Reviewed-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d2364809f0a6d04137bc628d72a6f382ee155c1 Author: Duane Grigsby Date: Wed Jun 21 13:48:45 2017 -0700 scsi: qla2xxx: Use FC-NVMe FC4 type for FDMI registration [mkp: fixed typo] Signed-off-by: Duane Grigsby Signed-off-by: Darren Trapp Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Reviewed-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gs.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 50e0bdbe9f48f98bb02eac7030d682f4716884ae Author: Darrick J. Wong Date: Tue Jun 27 10:19:45 2017 -0700 xfs: grab dquots without taking the ilock Add a new dqget flag that grabs the dquot without taking the ilock. This will be used by the scrubber (which will have already grabbed the ilock) to perform basic sanity checking of the quota data. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_quota_defs.h | 2 ++ fs/xfs/xfs_dquot.c | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) commit 244e3dea58818e9520bf3dbaf4404a60b105bfb1 Author: kbuild test robot Date: Mon Jun 26 08:54:16 2017 -0700 xfs: fix semicolon.cocci warnings fs/xfs/xfs_log.c:2092:38-39: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: d4ca1d550d05 ("xfs: dump transaction usage details on log reservation overrun") CC: Brian Foster Signed-off-by: Fengguang Wu Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ba358756aa08414fa9e65a1a41d28304ed6fd7f Author: Jan Kara Date: Mon Jun 26 08:48:18 2017 -0700 xfs: Don't clear SGID when inheriting ACLs When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the owning group of 'DIR0'). However when 'DIR0' also has some default ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on 'DIR1' to get cleared if user is not member of the owning group. Fix the problem by calling __xfs_set_acl() instead of xfs_set_acl() when setting up inode in xfs_generic_create(). That prevents SGID bit clearing and mode is properly set by posix_acl_create() anyway. We also reorder arguments of __xfs_set_acl() to match the ordering of xfs_set_acl() to make things consistent. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: stable@vger.kernel.org CC: Darrick J. Wong CC: linux-xfs@vger.kernel.org Signed-off-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_acl.c | 6 +++--- fs/xfs/xfs_acl.h | 1 + fs/xfs/xfs_iops.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit cf2cb7845d6e101cb17bd62f8aa08cd514fc8988 Author: Brian Foster Date: Tue Jun 20 14:36:19 2017 -0700 xfs: free cowblocks and retry on buffered write ENOSPC XFS runs an eofblocks reclaim scan before returning an ENOSPC error to userspace for buffered writes. This facilitates aggressive speculative preallocation without causing user visible side effects such as premature ENOSPC. Run a cowblocks scan in the same situation to reclaim lingering COW fork preallocation throughout the filesystem. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 1 + 1 file changed, 1 insertion(+) commit 3e88a0078ba8ef61816c85d33131827b4a307852 Author: Brian Foster Date: Tue Jun 27 09:52:32 2017 -0700 xfs: replace log_badcrc_factor knob with error injection tag Now that error injection tags support dynamic frequency adjustment, replace the debug mode sysfs knob that controls log record CRC error injection with an error injection tag. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_error.c | 3 +++ fs/xfs/xfs_error.h | 4 +++- fs/xfs/xfs_log.c | 5 +---- fs/xfs/xfs_sysfs.c | 36 ------------------------------------ 4 files changed, 7 insertions(+), 41 deletions(-) commit f8c47250ba46eb221d1ac537266ac65bcf2866d5 Author: Darrick J. Wong Date: Tue Jun 20 17:54:48 2017 -0700 xfs: convert drop_writes to use the errortag mechanism We now have enhanced error injection that can control the frequency with which errors happen, so convert drop_writes to use this. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino fs/xfs/xfs_error.c | 3 +++ fs/xfs/xfs_error.h | 12 +++++++++++- fs/xfs/xfs_iomap.c | 2 +- fs/xfs/xfs_mount.h | 24 ------------------------ fs/xfs/xfs_sysfs.c | 42 ------------------------------------------ 5 files changed, 15 insertions(+), 68 deletions(-) commit 9e24cfd044853e0e46e7149b91b7bb09effb0a79 Author: Darrick J. Wong Date: Tue Jun 20 17:54:47 2017 -0700 xfs: remove unneeded parameter from XFS_TEST_ERROR Since we moved the injected error frequency controls to the mountpoint, we can get rid of the last argument to XFS_TEST_ERROR. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino fs/xfs/libxfs/xfs_ag_resv.c | 3 +-- fs/xfs/libxfs/xfs_alloc.c | 6 ++---- fs/xfs/libxfs/xfs_bmap.c | 13 ++++++------- fs/xfs/libxfs/xfs_btree.c | 6 ++---- fs/xfs/libxfs/xfs_dir2.c | 3 +-- fs/xfs/libxfs/xfs_ialloc.c | 3 +-- fs/xfs/libxfs/xfs_inode_buf.c | 3 +-- fs/xfs/libxfs/xfs_refcount.c | 6 ++---- fs/xfs/libxfs/xfs_rmap.c | 3 +-- fs/xfs/xfs_error.h | 4 ++-- fs/xfs/xfs_inode.c | 11 +++++------ fs/xfs/xfs_iomap.c | 2 +- fs/xfs/xfs_log.c | 3 +-- 13 files changed, 26 insertions(+), 40 deletions(-) commit c684010115221978b17968dbddc8e31a09da85e7 Author: Darrick J. Wong Date: Tue Jun 20 17:54:47 2017 -0700 xfs: expose errortag knobs via sysfs Creates a /sys/fs/xfs/$dev/errortag/ directory to control the errortag values directly. This enables us to control the randomness values, rather than having to accept the defaults. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino fs/xfs/xfs_error.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++- fs/xfs/xfs_error.h | 1 + fs/xfs/xfs_mount.h | 1 + 3 files changed, 157 insertions(+), 1 deletion(-) commit 31965ef34802f49903bba06dd7c3b96a2e2ed4e4 Author: Darrick J. Wong Date: Tue Jun 20 17:54:46 2017 -0700 xfs: make errortag a per-mountpoint structure Remove the xfs_etest structure in favor of a per-mountpoint structure. This will give us the flexibility to set as many error injection points as we want, and later enable us to set up sysfs knobs to set the trigger frequency as we wish. This comes at a cost of higher memory use, but unti we hit 1024 injection points (we're at 29) or a lot of mounts this shouldn't be a huge issue. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino fs/xfs/xfs_error.c | 154 ++++++++++++++++++++++++++++------------------------- fs/xfs/xfs_error.h | 25 +++++---- fs/xfs/xfs_ioctl.c | 4 +- fs/xfs/xfs_mount.c | 10 +++- fs/xfs/xfs_mount.h | 7 +++ 5 files changed, 111 insertions(+), 89 deletions(-) commit d3bae931172eb94af7d21b05f6e9bf79cccf8fa0 Author: Duane Grigsby Date: Wed Jun 21 13:48:44 2017 -0700 scsi: qla2xxx: Send FC4 type NVMe to the management server This patch adds switch command support for FC-4 type of FC-NVMe (0x28) for resgistering HBA port to the management server. RFT_ID command is used to register FC-4 type of 0x28 and RFF_ID is used to register FC-4 features bits for FC-NVMe port. Signed-off-by: Darren Trapp Signed-off-by: Duane Grigsby Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Reviewed-By: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_gbl.h | 6 +- drivers/scsi/qla2xxx/qla_gs.c | 118 +++++++++++++++++++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_init.c | 11 +++- 4 files changed, 131 insertions(+), 5 deletions(-) commit e84067d7430107a982858f11c5239542b56a8449 Author: Duane Grigsby Date: Wed Jun 21 13:48:43 2017 -0700 scsi: qla2xxx: Add FC-NVMe F/W initialization and transport registration This code provides the interfaces to register remote and local ports of FC4 type 0x28 with the FC-NVMe transport and transports the requests (FC-NVMe FC link services and FC-NVMe commands IUs) to the fabric. It also provides the support for allocating h/w queues and aborting FC-NVMe FC requests. Signed-off-by: Darren Trapp Signed-off-by: Duane Grigsby Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/Makefile | 2 +- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_def.h | 6 + drivers/scsi/qla2xxx/qla_gbl.h | 11 + drivers/scsi/qla2xxx/qla_init.c | 8 + drivers/scsi/qla2xxx/qla_iocb.c | 36 ++ drivers/scsi/qla2xxx/qla_isr.c | 19 + drivers/scsi/qla2xxx/qla_mbx.c | 21 ++ drivers/scsi/qla2xxx/qla_nvme.c | 756 ++++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_nvme.h | 132 +++++++ drivers/scsi/qla2xxx/qla_os.c | 40 ++- 11 files changed, 1024 insertions(+), 9 deletions(-) commit 7401bc18d1ee39e46b668341097e0183975c02eb Author: Duane Grigsby Date: Wed Jun 21 13:48:42 2017 -0700 scsi: qla2xxx: Add FC-NVMe command handling This patch adds logic to handle the completion of FC-NVMe commands and creates a sub-command in the SRB command structure to manage NVMe commands. Signed-off-by: Darren Trapp Signed-off-by: Duane Grigsby Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 17 +++++++++ drivers/scsi/qla2xxx/qla_fw.h | 22 ++++++++++-- drivers/scsi/qla2xxx/qla_isr.c | 79 ++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_os.c | 18 ++++++++-- 4 files changed, 131 insertions(+), 5 deletions(-) commit a5d42f4cffa58d0e80d92dd11c810a22f14d41b3 Author: Duane Grigsby Date: Wed Jun 21 13:48:41 2017 -0700 scsi: qla2xxx: Add FC-NVMe port discovery and PRLI handling Added logic to change the login process into an optional PRIL step for FC-NVMe ports as a separate operation, such that we can change type to 0x28 (NVMe). Currently, the driver performs the PLOGI/PRLI together as one operation, but if the discovered port is an NVMe port then we first issue the PLOGI and then we issue the PRLI. Also, the fabric discovery logic was changed to mark each discovered FC NVMe port, so that we can register them with the FC-NVMe transport later. Signed-off-by: Darren Trapp Signed-off-by: Duane Grigsby Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 9 +- drivers/scsi/qla2xxx/qla_def.h | 30 ++++++- drivers/scsi/qla2xxx/qla_fw.h | 13 ++- drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 168 ++++++++++++++++++++++++++++++++++++-- drivers/scsi/qla2xxx/qla_iocb.c | 21 +++++ drivers/scsi/qla2xxx/qla_mbx.c | 33 +++++--- drivers/scsi/qla2xxx/qla_os.c | 4 + drivers/scsi/qla2xxx/qla_target.c | 4 +- 9 files changed, 256 insertions(+), 27 deletions(-) commit 34e0badda448f798e932db76723334ffbf8bc06b Author: himanshu.madhani@cavium.com Date: Tue Jun 13 20:47:30 2017 -0700 scsi: qla2xxx: Update driver version to 9.01.00.00-k Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b945e777f95aa00c000fd2376bec85618897dd04 Author: Quinn Tran Date: Tue Jun 13 20:47:29 2017 -0700 scsi: qla2xxx: Include Exchange offload/Extended Login into FW dump Add missing memory dump of Exchange Offload and Extended login into FW dump. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 49 +++++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_dbg.h | 11 +++++++++ drivers/scsi/qla2xxx/qla_init.c | 7 ++++++ drivers/scsi/qla2xxx/qla_os.c | 3 --- 4 files changed, 67 insertions(+), 3 deletions(-) commit 60a9eadb19f33a7b3e183207b5b5e1d01d8a6add Author: Quinn Tran Date: Tue Jun 13 20:47:28 2017 -0700 scsi: qla2xxx: Move target stat counters from vha to qpair. Move counters to qpair to reduce cache miss. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 27 +++++++++++---------- drivers/scsi/qla2xxx/qla_dfs.c | 48 +++++++++++++++++++++++++++++++------- drivers/scsi/qla2xxx/qla_iocb.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 13 +++++------ drivers/scsi/qla2xxx/tcm_qla2xxx.c | 8 +++---- 5 files changed, 63 insertions(+), 35 deletions(-) commit b5399f7d80a249fafa870d8da9fcd0d077d943b9 Author: Quinn Tran Date: Tue Jun 13 20:47:27 2017 -0700 scsi: qla2xxx: Remove datasegs_per_cmd and datasegs_per_cont field These fields only hold one set of value. Replace it with macros to reduce cache thrash. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 12 +++++------- drivers/scsi/qla2xxx/qla_target.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) commit 32d29b4ce82785a78d059d89f40fc1cad163e0ad Author: Quinn Tran Date: Tue Jun 13 20:47:26 2017 -0700 scsi: qla2xxx: Remove unused tgt_enable_64bit_addr flag By default this flag is forced to true. Remove this flag and unneccessary check for this flag. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 44 ++++++++++++--------------------------- drivers/scsi/qla2xxx/qla_target.h | 1 - 2 files changed, 13 insertions(+), 32 deletions(-) commit 22d84726e3b82458dee015c56c88dae8c861436e Author: Quinn Tran Date: Tue Jun 13 20:47:25 2017 -0700 scsi: qla2xxx: Add debug logging routine for qpair For target main path io routines that uses qpair, create new logging & debugging routines to use qpair instead of reaching for scsi_qla_host to reduce cache thrash. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 101 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_dbg.h | 6 +++ drivers/scsi/qla2xxx/qla_target.c | 28 +++++------ drivers/scsi/qla2xxx/qla_target.h | 1 + 4 files changed, 122 insertions(+), 14 deletions(-) commit 8abfa9e2268337cdcd458e24008345973328e2e2 Author: Quinn Tran Date: Tue Jun 13 20:47:24 2017 -0700 scsi: qla2xxx: Add function call to qpair for door bell Add call back to door bell for qpair. This help reduce access to qla_hw_data structure, in order to reduce cach thrash. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 3 ++ drivers/scsi/qla2xxx/qla_init.c | 3 ++ drivers/scsi/qla2xxx/qla_inline.h | 15 +++++++++ drivers/scsi/qla2xxx/qla_os.c | 35 ++++++++++++------- drivers/scsi/qla2xxx/qla_target.c | 71 +++++++++++++++++++++++++++------------ drivers/scsi/qla2xxx/qla_target.h | 2 +- 6 files changed, 94 insertions(+), 35 deletions(-) commit af7bb3826a49b774332a5e8ff3f68877bdfd21c9 Author: Quinn Tran Date: Tue Jun 13 20:47:23 2017 -0700 scsi: qla2xxx: use shadow register for ISP27XX For ISP27XX, use shadow register to read FW provided REQQ's consumer index. The shadow register is dma'ed by firmware. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 1 + drivers/scsi/qla2xxx/qla_os.c | 1 + drivers/scsi/qla2xxx/qla_target.c | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) commit 7c3f8fd10bab0b4d9021a11f123fd67e81ef3b0e Author: Quinn Tran Date: Tue Jun 13 20:47:22 2017 -0700 scsi: qla2xxx: move fields from qla_hw_data to qla_qpair - Move chip_reset, enable_class_2 fields from qla_hw_data to qla_qpair to reduce cache thrash for target MQ. - Optimizations to reduce unnecessary memory load for good path io. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 2 +- drivers/scsi/qla2xxx/qla_def.h | 25 +++++++++++-- drivers/scsi/qla2xxx/qla_init.c | 14 ++++++-- drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 75 +++++++++++++++++++-------------------- drivers/scsi/qla2xxx/qla_target.h | 3 +- 6 files changed, 73 insertions(+), 48 deletions(-) commit 4b60c82736d0e2d7f863cba1a320e89bf74a884e Author: Quinn Tran Date: Tue Jun 13 20:47:21 2017 -0700 scsi: qla2xxx: Add fw_started flags to qpair Add fw_started flag to qpair to reduce cache thrash. This reduce access to qla_hw_data structure by each qpair. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 21 +++++++++++++++++++++ drivers/scsi/qla2xxx/qla_init.c | 4 ++-- drivers/scsi/qla2xxx/qla_isr.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 9 ++++----- 4 files changed, 28 insertions(+), 8 deletions(-) commit 09620eeb62c4167d0c206f9a69730fa9e9251aae Author: Quinn Tran Date: Tue Jun 13 20:47:20 2017 -0700 scsi: qla2xxx: Add debug knob for user control workload For Target mode, user can control the work load by placing qla2xxx's irq vector on certain CPU via the smp_affinity knob. This patch allows user to control the number of QPair's irq to be active. The irqs are allocated at driver load time until unload. The work itself is placed on the QPair based on user setting. Usage: modprobe qla2xxx qlini_mode=disabled ql2xuctrlirq=1 mount -t debugfs none /sys/kernel/debug echo 2 > /sys/kernel/debug/qla2xxx/qla2xxx_[host num]/naqp echo [cpu id] > /proc/irq/[irq id]/smp_affinity_list Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 7 ++- drivers/scsi/qla2xxx/qla_dfs.c | 89 +++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_gbl.h | 2 + drivers/scsi/qla2xxx/qla_isr.c | 11 +++-- drivers/scsi/qla2xxx/qla_target.c | 32 ++++++++++++++ 5 files changed, 137 insertions(+), 4 deletions(-) commit d65237c7f086042b5630d94fe2d151f62c09f723 Author: Sawan Chandak Date: Tue Jun 13 20:47:19 2017 -0700 scsi: qla2xxx: Fix mailbox failure while deleting Queue pairs In target mode driver, queue pairs are not created during driver load time, instead they are created at the configuration time after chip reset. If a user tries to load/unload driver after queue pairs are created, then there would be mailbox failure, while deleting queue pairs. Flag is added to check if queue pairs are created or not. Queue pairs will be deleted only If they were created during target configuration. Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 2 ++ drivers/scsi/qla2xxx/qla_init.c | 10 ++++++++-- drivers/scsi/qla2xxx/qla_mid.c | 4 ++++ drivers/scsi/qla2xxx/qla_os.c | 1 + 4 files changed, 15 insertions(+), 2 deletions(-) commit e326d22af9653dd8eff05d71f0d1bad9174578a3 Author: Quinn Tran Date: Tue Jun 13 20:47:18 2017 -0700 scsi: qla2xxx: Enable Target Multi Queue Enable Multi Queue for Target mode. At Initiator LUN scan time, each LUN is assign to a QPair. Each QPair is affinitize to certain CPU. When new cmd arrives from the wire, the lunid is used to search for qpair. The qpair's affinitized cpuid will be used to queue up the work element. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 3 +- drivers/scsi/qla2xxx/qla_init.c | 3 + drivers/scsi/qla2xxx/qla_inline.h | 28 +++++++ drivers/scsi/qla2xxx/qla_isr.c | 21 +++-- drivers/scsi/qla2xxx/qla_os.c | 56 +++++++++----- drivers/scsi/qla2xxx/qla_target.c | 157 ++++++++++++++++++++++++++++++++++++-- drivers/scsi/qla2xxx/qla_target.h | 10 ++- 7 files changed, 240 insertions(+), 38 deletions(-) commit 82de802ad46e23820f7fcaddc45adde181d95562 Author: Quinn Tran Date: Tue Jun 13 20:47:17 2017 -0700 scsi: qla2xxx: Preparation for Target MQ. In Current code, Req Q 0, RespQ 0 & hardware_lock are the main resources for sending and process completion of Target IO. These resources are now referenced behind a new qpair/"struct qla_qpair base_qpair". Main path IO handle will access those resources via the qpair pointer in preparation for Target MQ. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 2 +- drivers/scsi/qla2xxx/qla_def.h | 17 +- drivers/scsi/qla2xxx/qla_gbl.h | 15 +- drivers/scsi/qla2xxx/qla_init.c | 11 +- drivers/scsi/qla2xxx/qla_iocb.c | 30 ++- drivers/scsi/qla2xxx/qla_isr.c | 11 +- drivers/scsi/qla2xxx/qla_mid.c | 40 +-- drivers/scsi/qla2xxx/qla_os.c | 23 +- drivers/scsi/qla2xxx/qla_target.c | 518 ++++++++++++++++++++------------------ drivers/scsi/qla2xxx/qla_target.h | 10 +- 10 files changed, 380 insertions(+), 297 deletions(-) commit c5419e2618b951a73d590e0752810686d52c45cf Author: Quinn Tran Date: Tue Jun 13 20:47:16 2017 -0700 scsi: qla2xxx: Combine Active command arrays. Merge active/outstanding cmd arrays from target side and initiator side together in prepration for Target Multi Queue support. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 15 +++- drivers/scsi/qla2xxx/qla_gbl.h | 2 - drivers/scsi/qla2xxx/qla_inline.h | 1 + drivers/scsi/qla2xxx/qla_isr.c | 48 +++++++++---- drivers/scsi/qla2xxx/qla_os.c | 75 ++++++++++++++------ drivers/scsi/qla2xxx/qla_target.c | 144 ++++++++++++-------------------------- drivers/scsi/qla2xxx/qla_target.h | 23 ++++-- 7 files changed, 164 insertions(+), 144 deletions(-) commit d644437a1dc6226afb7b8a814657961d8812f763 Author: Orson Zhai Date: Tue Jun 27 08:52:09 2017 +0800 tools/testing/selftests/sysctl: Add pre-check to the value of writes_strict Sysctl test will fail in some items if the value of /proc/sys/kernel /sysctrl_writes_strict is 0 as the default value in kernel older than v4.5. Make this test more robus and compatible with older kernel by checking and update writes_strict value and restore it when test is done. Signed-off-by: Orson Zhai Reviewed-by: Sumit Semwal Tested-by: Sumit Semwal Reviewed-by: Kees Cook Signed-off-by: Shuah Khan tools/testing/selftests/sysctl/common_tests | 22 ++++++++++++++++++++++ tools/testing/selftests/sysctl/run_numerictests | 2 +- tools/testing/selftests/sysctl/run_stringtests | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) commit 4625d752e600c116e6327f9d7fc16e8f5be107e9 Author: Lv Zheng Date: Wed Jun 14 13:59:18 2017 +0800 ACPI: EC: Fix EC command visibility for dynamic debug acpi_ec_cmd_string() currently is only enabled for "DEBUG" macro, but users trend to use CONFIG_DYNAMIC_DEBUG and enable ec.c pr_debug() print-outs by "dyndbg='file ec.c +p'". In this use case, all command names are turned into UNDEF and the log is confusing. This affects bugzilla triage work. This patch fixes this issue by enabling acpi_ec_cmd_string() for CONFIG_DYNAMIC_DEBUG. Tested-by: Wang Wendy Tested-by: Feng Chenzhou Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ab69f27cbb57e0f970bcd852d9f22ed34259b57 Author: Lv Zheng Date: Wed Jun 14 13:59:09 2017 +0800 ACPI: EC: Fix an EC event IRQ storming issue The EC event IRQ (SCI_EVT) can only be handled by submitting QR_EC. As the EC driver handles SCI_EVT in a workqueue, after SCI_EVT is flagged and before QR_EC is submitted, there is a period risking IRQ storming. EC IRQ must be masked for this period but linux EC driver never does so. No end user notices the IRQ storming and no developer fixes this known issue because: 1. The EC IRQ is always edge triggered GPE, and 2. The kernel can execute no-op EC IRQ handler very fast. For edge-triggered EC GPE platforms, it is only reported of post-resume EC event lost issues, there won't be an IRQ storming. For level triggered EC GPE platforms, fortunately the kernel is always fast enough to execute such a no-op EC IRQ handler so that the IRQ handler won't be accumulated to starve the task contexts, causing a real IRQ storming. But the IRQ storming actually can still happen when: 1. The EC IRQ performs like level triggered GPE, and 2. The kernel EC debugging log is turned on but the console is slow enough. There are more and more platforms using EC GPE as wake GPE where the EC GPE is likely designed as level triggered. Then when EC debugging log is enabled, the EC IRQ handler is no longer a no-op but dumps IRQ status to the consoles. If the consoles are slow enough, the EC IRQs can arrive much faster than executing the handler. Finally the accumulated EC event IRQ handlers starve the task contexts, causing the IRQ storming to occur, and the kernel hangs can be observed during boot/resume. This patch fixes this issue by masking EC IRQ for this period: 1. Begins when there is an SCI_EVT IRQ pending, and 2. Ends when there is a QR_EC completed (SCI_EVT acknowledged). Tested-by: Wang Wendy Tested-by: Feng Chenzhou Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0752e4028c003fba1e2b44c4b3cf6a4482e931b6 Author: Geliang Tang Date: Sat Apr 29 09:45:13 2017 +0800 powerpc/nvram: use memdup_user Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Kees Cook arch/powerpc/kernel/nvram_64.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 077090af337f7d833f82be3d556549512398de66 Author: Geliang Tang Date: Sat Apr 29 09:45:16 2017 +0800 pstore: use memdup_user Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Kees Cook fs/pstore/platform.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit e9d5d4a0c13f47e331e39a4c66a9b3da701b280b Author: Julia Lawall Date: Tue Jun 27 17:56:50 2017 -0600 drbd: Drop unnecessary static Drop static on a local variable, when the variable is initialized before any use, on every possible execution path through the function. The static has no benefit, and dropping it reduces the code size. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; // The change in code size is indicates by the following output from the size command. before: text data bss dec hex filename 67299 2291 1056 70646 113f6 drivers/block/drbd/drbd_nl.o after: text data bss dec hex filename 67283 2291 1056 70630 113e6 drivers/block/drbd/drbd_nl.o Signed-off-by: Julia Lawall Signed-off-by: Roland Kammerer Signed-off-by: Jens Axboe drivers/block/drbd/drbd_nl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de3ef1eb1cd0cc3a75f7a3661e10ed827f370ab8 Author: Rafael J. Wysocki Date: Sat Jun 24 01:58:53 2017 +0200 PM / core: Drop run_wake flag from struct dev_pm_info The run_wake flag in struct dev_pm_info is used to indicate whether or not the device is capable of generating remote wakeup signals at run time (or in the system working state), but the distinction between runtime remote wakeup and system wakeup signaling has always been rather artificial. The only practical reason for it to exist at the core level was that ACPI and PCI treated those two cases differently, but that's not the case any more after recent changes. For this reason, get rid of the run_wake flag and, when applicable, use device_set_wakeup_capable() and device_can_wakeup() instead of device_set_run_wake() and device_run_wake(), respectively. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Acked-by: Bjorn Helgaas Documentation/power/runtime_pm.txt | 7 ++----- drivers/acpi/pci_root.c | 5 ++--- drivers/pci/pci-acpi.c | 5 +---- drivers/pci/pci.c | 6 +++--- drivers/pci/pcie/pme.c | 2 +- drivers/usb/dwc3/dwc3-pci.c | 3 +-- drivers/usb/host/uhci-pci.c | 2 +- include/linux/pm.h | 1 - include/linux/pm_runtime.h | 12 ------------ 9 files changed, 11 insertions(+), 32 deletions(-) commit 0847684cfc5f0e9f009919bfdcb041d60e19b856 Author: Rafael J. Wysocki Date: Sat Jun 24 01:57:35 2017 +0200 PCI / PM: Simplify device wakeup settings code After previous changes it is not necessary to distinguish between device wakeup for run time and device wakeup from system sleep states any more, so rework the PCI device wakeup settings code accordingly. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Acked-by: Bjorn Helgaas drivers/pci/pci-acpi.c | 3 +-- drivers/pci/pci-driver.c | 2 +- drivers/pci/pci-mid.c | 10 ++-------- drivers/pci/pci.c | 36 ++++++++++-------------------------- drivers/pci/pci.h | 9 ++------- include/linux/pci.h | 9 +-------- 6 files changed, 17 insertions(+), 52 deletions(-) commit 8370c2dc4c7b91be7e1231130f0ae08b5aebecf4 Author: Rafael J. Wysocki Date: Sat Jun 24 01:56:13 2017 +0200 PCI / PM: Drop pme_interrupt flag from struct pci_dev The pme_interrupt flag in struct pci_dev is set when PMEs generated by the device are going to be signaled via root port PME interrupts. Ironically enough, that information is only used by the code setting up device wakeup through ACPI which returns as soon as it sees the pme_interrupt flag set while setting up "remote runtime wakeup". That is questionable, however, because in theory there may be PCIe devices using out-of-band PME signaling under root ports handled by the native PME code or devices requiring wakeup power setup to be carried out by AML. For such devices, ACPI wakeup should be invoked regardless of whether or not native PME signaling is used in general. For this reason, drop the pme_interrupt flag and rework the code using it which then allows the ACPI-based device wakeup handling in PCI to be consolidated to use one code path for both "runtime remote wakeup" and system wakeup (from sleep states). Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Acked-by: Bjorn Helgaas drivers/acpi/device_pm.c | 10 +++++-- drivers/pci/pci-acpi.c | 68 +++++++++++------------------------------------- drivers/pci/pcie/pme.c | 14 +++++----- include/acpi/acpi_bus.h | 5 ++++ include/linux/pci.h | 1 - 5 files changed, 34 insertions(+), 64 deletions(-) commit 4d183d04195318c8ee8bce048f3f9a89c0e2056d Author: Rafael J. Wysocki Date: Sat Jun 24 01:54:39 2017 +0200 ACPI / PM: Consolidate device wakeup settings code Currently, there are two separate ways of handling device wakeup settings in the ACPI core, depending on whether this is runtime wakeup or system wakeup (from sleep states). However, after the previous commit eliminating the run_wake ACPI device wakeup flag, there is no difference between the two any more at the ACPI level, so they can be combined. For this reason, introduce acpi_pm_set_device_wakeup() to replace both acpi_pm_device_run_wake() and acpi_pm_device_sleep_wake() and make it check the ACPI device object's wakeup.valid flag to determine whether or not the device can be set up to generate wakeup signals. Also notice that zpodd_enable/disable_run_wake() only call device_set_run_wake() because acpi_pm_device_run_wake() called device_run_wake(), which is not done by acpi_pm_set_device_wakeup(), so drop the now redundant device_set_run_wake() calls from there. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Acked-by: Bjorn Helgaas drivers/acpi/device_pm.c | 39 ++++++++------------------------------- drivers/ata/libata-zpodd.c | 9 +++------ drivers/pci/pci-acpi.c | 12 ++++++------ drivers/pnp/pnpacpi/core.c | 6 +++--- include/acpi/acpi_bus.h | 13 ++----------- 5 files changed, 22 insertions(+), 57 deletions(-) commit a1a66393e39a97433bcc1737133ba7478993d247 Author: Rafael J. Wysocki Date: Sat Jun 24 01:53:14 2017 +0200 ACPI / PM: Drop run_wake from struct acpi_device_wakeup_flags The run_wake flag in struct acpi_device_wakeup_flags stores the information on whether or not the device can generate wakeup signals at run time, but in ACPI that really is equivalent to being able to generate wakeup signals at all. In fact, run_wake will always be set after successful executeion of acpi_setup_gpe_for_wake(), but if that fails, the device will not be able to use a wakeup GPE at all, so it won't be able to wake up the systems from sleep states too. Hence, run_wake actually means that the device is capable of triggering wakeup and so it is equivalent to the valid flag. For this reason, drop run_wake from struct acpi_device_wakeup_flags and make sure that the valid flag is only set if acpi_setup_gpe_for_wake() has been successful. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Acked-by: Bjorn Helgaas drivers/acpi/pci_root.c | 2 +- drivers/acpi/proc.c | 4 ++-- drivers/acpi/scan.c | 23 ++++++++--------------- drivers/pci/pci-acpi.c | 3 +-- include/acpi/acpi_bus.h | 1 - 5 files changed, 12 insertions(+), 21 deletions(-) commit 5d61e43b3975c0582003329d9de9d5e85abf5d33 Author: Dan Williams Date: Tue Jun 27 13:06:22 2017 -0700 dax: remove default copy_from_iter fallback Require all dax-drivers to register a ->copy_from_iter() operation so that it is clear which dax_operations are optional and which must be implemented for filesystem-dax to operate. Cc: Gerald Schaefer Suggested-by: Christoph Hellwig Signed-off-by: Dan Williams arch/powerpc/sysdev/axonram.c | 8 ++++++++ drivers/block/brd.c | 8 ++++++++ drivers/dax/super.c | 2 -- drivers/s390/block/dcssblk.c | 8 ++++++++ include/linux/dax.h | 2 +- 5 files changed, 25 insertions(+), 3 deletions(-) commit c9e582aa689f5418ca30e1e7a975039772c3a757 Author: Dan Williams Date: Mon May 29 23:12:19 2017 -0700 libnvdimm, nfit: enable support for volatile ranges Allow volatile nfit ranges to participate in all the same infrastructure provided for persistent memory regions. A resulting resulting namespace device will still be called "pmem", but the parent region type will be "nd_volatile". This is in preparation for disabling the dax ->flush() operation in the pmem driver when it is hosted on a volatile range. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 9 ++++++++- drivers/nvdimm/bus.c | 8 ++++---- drivers/nvdimm/core.c | 2 +- drivers/nvdimm/dax_devs.c | 2 +- drivers/nvdimm/dimm_devs.c | 2 +- drivers/nvdimm/namespace_devs.c | 8 ++++---- drivers/nvdimm/nd-core.h | 9 +++++++++ drivers/nvdimm/pfn_devs.c | 4 ++-- drivers/nvdimm/region_devs.c | 27 ++++++++++++++------------- 9 files changed, 44 insertions(+), 27 deletions(-) commit c00b396ef782cb2296200d868a0013d8ca1d615e Author: Dan Williams Date: Mon May 29 23:11:57 2017 -0700 libnvdimm, pmem: fix persistence warning The pmem driver assumes if platform firmware describes the memory devices associated with a persistent memory range and CONFIG_ARCH_HAS_PMEM_API=y that it has all the mechanism necessary to flush data to a power-fail safe zone. We warn if the firmware does not describe memory devices, but we also need to warn if the architecture does not claim pmem support. Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Reviewed-by: Jan Kara Signed-off-by: Dan Williams drivers/nvdimm/region_devs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ca6a4657e5420dec727256717e905ebc3c751352 Author: Dan Williams Date: Fri Jan 13 20:36:58 2017 -0800 x86, libnvdimm, pmem: remove global pmem api Now that all callers of the pmem api have been converted to dax helpers that call back to the pmem driver, we can remove include/linux/pmem.h and asm/pmem.h. Cc: Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: Toshi Kani Cc: Oliver O'Halloran Cc: Ross Zwisler Reviewed-by: Jan Kara Signed-off-by: Dan Williams MAINTAINERS | 4 +-- arch/x86/include/asm/pmem.h | 47 -------------------------------- drivers/acpi/nfit/core.c | 3 +-- drivers/nvdimm/claim.c | 1 - drivers/nvdimm/dimm_devs.c | 8 ++++++ drivers/nvdimm/namespace_devs.c | 6 +---- drivers/nvdimm/pmem.c | 1 - drivers/nvdimm/pmem.h | 2 ++ drivers/nvdimm/region_devs.c | 1 - fs/dax.c | 1 - include/linux/libnvdimm.h | 1 + include/linux/pmem.h | 59 ----------------------------------------- 12 files changed, 14 insertions(+), 120 deletions(-) commit f2b612578e163b49661ece2fe01dfafb0e78f545 Author: Dan Williams Date: Mon May 29 23:00:34 2017 -0700 x86, libnvdimm, pmem: move arch_invalidate_pmem() to libnvdimm Kill this globally defined wrapper and move to libnvdimm so that we can ultimately remove include/linux/pmem.h and asm/pmem.h. Cc: Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Ross Zwisler Reviewed-by: Jan Kara Signed-off-by: Dan Williams arch/x86/include/asm/pmem.h | 5 ----- arch/x86/mm/pageattr.c | 6 ++++++ drivers/nvdimm/claim.c | 3 ++- drivers/nvdimm/pmem.c | 2 +- drivers/nvdimm/pmem.h | 4 ++++ include/linux/pmem.h | 19 ------------------- 6 files changed, 13 insertions(+), 26 deletions(-) commit 393958d0d9ba2b9fd77e39ce764aa10b2e56b701 Author: Logan Gunthorpe Date: Thu Jun 15 14:12:24 2017 -0600 switchtec: Add device IDs for additional Switchtec products The switchtec driver also supports the PAX, PFXL and PFXI products which have the same management interface. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Kurt Schwemmer drivers/pci/switch/switchtec.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 079e3bc588465f6216bfc5ad61540b5db4616598 Author: Logan Gunthorpe Date: Thu Jun 15 14:12:23 2017 -0600 switchtec: Add "running" status flag to fw partition info ioctl This flag lets userspace know which firmware partitions are currently in use as opposed to just active. "Active" means they will be in use for the next reboot, whereas "running" means they are currently in use. If an old kernel is in use, or the firmware doesn't support these fields, the new flag will not be set in the output. Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Kurt Schwemmer drivers/pci/switch/switchtec.c | 22 ++++++++++++++++++++-- include/uapi/linux/switchtec_ioctl.h | 3 +++ 2 files changed, 23 insertions(+), 2 deletions(-) commit b0af7b7dbedd45367f8f1d91049c30b251ad528f Author: Suman Anna Date: Tue Jun 27 17:46:10 2017 -0500 remoteproc/keystone: Fix circular dependencies for ARM configs Drop the dependency on RESET_CONTROLLER for the Keystone remoteproc driver to resolve some circular dependencies around different choices for RESET_CONTROLLER on common ARM configs. This dependency is inherent as the RESET_CONTROLLER will be enabled due to the enabled ARCH_HAS_RESET_CONTROLLER for ARCH_KEYSTONE. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit e3f37c5ed70ca3902ab84762763e18abb742f627 Author: Suman Anna Date: Tue Jun 27 17:46:09 2017 -0500 remoteproc: Drop redundant REMOTEPROC dependency from driver Kconfigs All the remoteproc platform driver Kconfig symbols are defined and included under an if REMOTEPROC condition, so the dependency on REMOTEPROC is implicit and they do not need an explicit 'depends on REMOTEPROC' line. So, clean these up. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 9 --------- 1 file changed, 9 deletions(-) commit 384700d4653e7ad6d774bf2f217aaca1bcbe62e8 Author: Suman Anna Date: Tue Jun 27 17:46:08 2017 -0500 remoteproc: Drop VIRTUALIZATION dependency from REMOTEPROC A dependency to VIRTUALIZATION has been added to REMOTEPROC in v3.10 kernel in commit b9777859ec01 ("remoteproc: fix kconfig dependencies for VIRTIO") to resolve Kconfig warnings due to the inclusion of the virtio configuration file from the ARM's KVM config file. The KVM config was fixed properly in the subsequent release in commit 8bd4ffd6b3a9 ("ARM: kvm: don't include drivers/virtio/Kconfig"). So, drop this unneeded VIRTUALIZATION dependency from REMOTEPROC. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 82e484dfef0bb29ca1a82740f2b8100cd0a64df3 Author: Suman Anna Date: Tue Jun 27 17:46:07 2017 -0500 rpmsg: Drop VIRTUALIZATION dependency from RPMSG_VIRTIO A dependency to VIRTUALIZATION has been added to RPMSG_VIRTIO (back when it was named RPMSG) in v3.10 kernel in commit 397944df3290 ("rpmsg: fix kconfig dependencies for VIRTIO") to resolve Kconfig warnings due to the inclusion of the virtio configuration file from the ARM's KVM config file. The KVM config was fixed properly in the subsequent release in commit 8bd4ffd6b3a9 ("ARM: kvm: don't include drivers/virtio/Kconfig"). So, drop this unneeded VIRTUALIZATION dependency from RPMSG_VIRTIO. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/rpmsg/Kconfig | 1 - 1 file changed, 1 deletion(-) commit dbb1d8b70c222544e9b54fdb3e22c15745be0155 Author: Arvind Yadav Date: Thu Jun 22 16:23:32 2017 +0530 PM / QoS: constify *_attribute_group. File size before: text data bss dec hex filename 3890 1152 8 5050 13ba drivers/base/power/sysfs.o File size After adding 'const': text data bss dec hex filename 4250 800 8 5058 13c2 drivers/base/power/sysfs.o Signed-off-by: Arvind Yadav Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki drivers/base/power/sysfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1a99d0c7962364d5fba5e0cfe5ced586e133f31a Author: David Wu Date: Fri Jun 9 17:36:14 2017 +0800 PM / AVS: rockchip-io: add io selectors and supplies for rk3228 This adds the necessary data for handling io voltage domains on the rk3228. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Rafael J. Wysocki .../devicetree/bindings/power/rockchip-io-domain.txt | 7 +++++++ drivers/power/avs/rockchip-io-domain.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+) commit edbdabc62328ec0ac98d83ca384bf9fd5251ade6 Author: Adam Lessnau Date: Thu Jun 1 11:21:50 2017 +0200 powercap/RAPL: prevent overridding bits outside of the mask Fixes wrong bits shift operation in the rapl_write_data_raw function, which might cause overridding bits outside of the mask. For example, writing new TIME_WINDOW1 value can override POWER_LIMIT1. Signed-off-by: Adam Lessnau Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cbcba35dba56f046bbd3437bd275ad3a7156cbc9 Author: Krzysztof Kozlowski Date: Mon Jun 12 17:19:33 2017 +0200 PM / sysfs: Constify attribute groups Local instances of struct attribute_group are not modified so they can be made const to increase code safeness. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rafael J. Wysocki drivers/base/power/sysfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e3771fa98e266aba29211c624ecf01200be497ad Author: Krzysztof Kozlowski Date: Mon Jun 12 17:19:32 2017 +0200 PM: Constify info string used in messages The 'info' string appearing in many places points to a .rodata string so it should be passes as pointer to const. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rafael J. Wysocki drivers/base/power/main.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 952856db9019f914227f5fbe24f7810e20fec0fd Author: Krzysztof Kozlowski Date: Mon Jun 12 17:19:31 2017 +0200 PM: Constify returned PM event name The pm_verb() returns a pointer to string from .rodata so it should be marked as const. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rafael J. Wysocki drivers/base/power/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8600c8b0cd11d2249e14bf8b2eccbf4fa0db770 Author: Krzysztof Kozlowski Date: Mon Jun 12 17:17:41 2017 +0200 PM / Domains: Constify genpd pointer Mark pointer to struct generic_pm_domain const (either passed in argument or used localy in a function), whenever it is not modifed by the function itself. Signed-off-by: Krzysztof Kozlowski Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 5b6d721b266acaef411520e28066e4624c6619e7 Author: Luis Oliveira Date: Thu Jun 22 11:17:33 2017 +0100 i2c: designware: enable SLAVE in platform module - Slave mode selected in platform module if the support is detected in the DT. Signed-off-by: Luis Oliveira Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 2 ++ drivers/i2c/busses/i2c-designware-platdrv.c | 41 +++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 5 deletions(-) commit 9f3e065c54b05b03bd39dbbcc5a44f2f1807994d Author: Luis Oliveira Date: Thu Jun 22 11:17:32 2017 +0100 i2c: designware: add SLAVE mode functions - Changes in Kconfig to enable I2C_DESIGNWARE_SLAVE support - Slave functions added to core library file - Slave abort sources added to common source file - New driver: i2c-designware-slave added - Changes in the Makefile to compile the I2C_DESIGNWARE_SLAVE module when supported by the architecture. All the SLAVE flow is added but it is not enabled via platform driver. Signed-off-by: Luis Oliveira Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula [wsa: made a function static and one-lined a message] Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 14 +- drivers/i2c/busses/Makefile | 3 + drivers/i2c/busses/i2c-designware-common.c | 6 + drivers/i2c/busses/i2c-designware-core.h | 2 + drivers/i2c/busses/i2c-designware-slave.c | 394 +++++++++++++++++++++++++++++ 5 files changed, 418 insertions(+), 1 deletion(-) commit 86766a3e15ac73dcf9542eebc60d3c34578d463a Author: Shawn Guo Date: Sat Jun 24 22:25:26 2017 +0800 i2c: zx2967: drop COMPILE_TEST dependency 0-DAY kernel test reports the following build issue on IA64 architecture with allmodconfig. drivers/i2c/busses/i2c-zx2967.c: In function 'zx2967_i2c_writesb': >> drivers/i2c/busses/i2c-zx2967.c:87:2: error: implicit declaration of function 'writesb' [-Werror=implicit-function-declaration] writesb(i2c->reg_base + reg, data, len); ^~~~~~~ drivers/i2c/busses/i2c-zx2967.c: In function 'zx2967_i2c_readsb': >> drivers/i2c/busses/i2c-zx2967.c:93:2: error: implicit declaration of function 'readsb' [-Werror=implicit-function-declaration] readsb(i2c->reg_base + reg, data, len); ^~~~~~ cc1: some warnings being treated as errors It's caused by that writesb/readsb are unavailable on IA64 architecture. Let's drop COMPILE_TEST dependency to avoid the build issue. Reported-by: kbuild test robot Signed-off-by: Shawn Guo Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3518a4ed8753a88b0dee614a64ffadd5f67386b Author: Wolfram Sang Date: Fri Jun 23 21:05:30 2017 +0200 i2c: zx2967: always use the same device when printing errors Let's always use the platform device for dev_* and not sometimes the adapter device as well. Also fix this checkpatch check: CHECK: Macro argument 'i2c' may be better as '(i2c)' to avoid precedence issues Signed-off-by: Wolfram Sang Acked-by: Shawn Guo Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-zx2967.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df40f247750cc6427216b3be2c0eebfd51a5c155 Author: Chris Packham Date: Mon Jun 26 12:44:34 2017 +1200 i2c: pca-platform: use dev_warn/dev_info instead of printk Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pca-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3d867f6c5fd6535cdeceef3170e5e84e5dd80fc1 Author: Kees Cook Date: Tue Jun 27 00:53:07 2017 +0200 ACPICA: Use designated initializers The struct layout randomization plugin detects and randomizes any structs that contain only function pointers. Once layout is randomized, all initialization must be designated or the compiler will misalign the assignments. This switches all the ACPICA function pointer struct to use designated initializers, using the proposed upstream ACPICA macro: https://github.com/acpica/acpica/pull/248/ Signed-off-by: Kees Cook Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/hwxfsleep.c | 14 +++++++++----- include/acpi/platform/acenv.h | 4 ++++ include/acpi/platform/aclinux.h | 2 ++ 3 files changed, 15 insertions(+), 5 deletions(-) commit a976c2951d8f376112361830aa7762beff83a205 Merge: 83848fb 16b9951 Author: Rafael J. Wysocki Date: Tue Jun 27 22:26:44 2017 +0200 Merge back ACPICA material for v4.13. commit 16b9951f656ea8f2b47546bd898325a7e256932f Author: Bob Moore Date: Mon Jun 5 16:42:34 2017 +0800 ACPICA: Update version to 20170531 ACPICA commit fde696a3f0aed66ff7439744bbcd23bc165deb88 Version 20170531. Link: https://github.com/acpica/acpica/commit/fde696a3 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1537f3037cd5ca0973cdb62a2648493491eb4522 Author: Bob Moore Date: Mon Jun 5 16:42:28 2017 +0800 ACPICA: Update a couple of debug output messages ACPICA commit 809c1766598c7f3decaeeba2c6ed603c538d0270 Cleanup output. Link: https://github.com/acpica/acpica/commit/809c1766 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbxface.c | 2 +- drivers/acpi/acpica/nsutils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fd13aaa850d6db06f90687486163d0dc609f2318 Author: Bob Moore Date: Mon Jun 5 16:42:23 2017 +0800 ACPICA: acpiexec: enhance local signal handler ACPICA commit ffef4ae9a1b6032ebadeab2c2b806f0e585f0006 Add support for SIGSEGV Improve/cleanup SIGINT handling Link: https://github.com/acpica/acpica/commit/ffef4ae9 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbexec.c | 12 ++++++++++++ drivers/acpi/acpica/dsmethod.c | 12 ++++++++---- drivers/acpi/acpica/psparse.c | 14 +++++++++++--- 3 files changed, 31 insertions(+), 7 deletions(-) commit 9c0b6c49e8ae8bcbceffb0a417e8c7c912718694 Author: Bob Moore Date: Mon Jun 5 16:42:17 2017 +0800 ACPICA: Simplify output for the ACPI Debug Object ACPICA commit ea08cda9859d9f758f4832400b2d559847c2d52a Cleanup the output, change [Acpi Debug] to Acpi Debug: Link: https://github.com/acpica/acpica/commit/ea08cda9 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exdebug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fdf8707bd56f0e29024f79fa42598b4c4e124f33 Author: Bob Moore Date: Mon Jun 5 16:42:07 2017 +0800 ACPICA: Unix application OSL: Correctly handle control-c (EINTR) ACPICA commit dfbb87c3a96cfd007375f34a96e6f4a8ee477f97 Handle EINTR from a sem_wait operation. Ignore a control-c. Link: https://github.com/acpica/acpica/commit/dfbb87c3 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki tools/power/acpi/os_specific/service_layers/osunixxf.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit b9ef2ab058620b6fc98df931bc6e03b21c9b373d Author: Bob Moore Date: Mon Jun 5 16:42:02 2017 +0800 ACPICA: Improvements for debug output only ACPICA commit c3f798b7b0e4f2403d3ce0cc1107ab0932efe1e3 Changes to debug print and debug function tracing. Link: https://github.com/acpica/acpica/commit/c3f798b7 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsargs.c | 5 +++-- drivers/acpi/acpica/dswexec.c | 4 ++-- drivers/acpi/acpica/exdump.c | 30 ++++++++++++++++++++---------- 3 files changed, 25 insertions(+), 14 deletions(-) commit a9d8ea79d7464352820973b237f1d192afc3c14c Author: Erik Schmauss Date: Mon Jun 5 16:41:55 2017 +0800 ACPICA: Disassembler: allow conflicting external declarations to be emitted. ACPICA commit 0ed9f2e2ccc112439eaa355b5952a05d6fdb7814 An external declaration is a conflicting declaration when a name has been declared as an external and a named object within the same file. Link: https://github.com/acpica/acpica/commit/0ed9f2e2 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/aclocal.h | 1 + drivers/acpi/acpica/nsaccess.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit bdcf4cdbdc889477cd945d487dbb31fef4977849 Author: Erik Schmauss Date: Mon Jun 5 16:41:49 2017 +0800 ACPICA: Disassembler: add external op to namespace on first pass ACPICA commit 117be4819588df3b7146f6f01723639b1d61e775 By doing so, external control method resolutions can be resolved like normal control methods. This eliminates the need to reparse the aml all over again for external control methods that were encoded within the aml with the 0x15 bytecode. Link: https://github.com/acpica/acpica/commit/117be481 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dswload.c | 40 +++++++++++++++++++++++++++++++++++++++- drivers/acpi/acpica/dswload2.c | 10 ++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) commit 2f8c1141da2f53989e1ace6806ab45a385d24487 Author: Erik Schmauss Date: Mon Jun 5 16:41:43 2017 +0800 ACPICA: Disassembler: prevent external op's from opening a new scope ACPICA commit c512c2bfcce65b8e8f37d549ac2fa4a1e0182e46 Since Externals could be of ACPI_TYPE_METHOD, there is a possibility that the acpi_ns_lookup may cause a new scope to be opened. Therefore, disable opening the scope for all acpi_ns_lookup invocations that deal with externals. Link: https://github.com/acpica/acpica/commit/c512c2bf Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dswload2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e6b6ea37b8e295ac9fa37081fb9a2d08a77a3dc6 Author: Erik Schmauss Date: Mon Jun 5 16:41:36 2017 +0800 ACPICA: Changed Gbl_disasm_flag to acpi_gbl_disasm_flag ACPICA commit 0e0a87111f280c197661689979b2c48443b0326c This is a name change as well as a change in the scope of this flag. This is done so that it can be referenced in the dispatcher. Link: https://github.com/acpica/acpica/commit/0e0a8711 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acglobal.h | 2 ++ 1 file changed, 2 insertions(+) commit d79e03892b9f0b37b2e99085412b582cba6fc59c Author: Erik Schmauss Date: Mon Jun 5 16:41:28 2017 +0800 ACPICA: Changing External to a named object ACPICA commit 0d5dd42fd7d5129835b6d92250378a962eb73cb3 This is done so that the aml parser will build the parse tree of External Op as a named object. This is done to streamline creation of external op parse nodes and facilitate namespace resolution of externals. Link: https://github.com/acpica/acpica/commit/0d5dd42f Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acopcode.h | 2 +- drivers/acpi/acpica/psopcode.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 2d2a954375a0405fc721928f0dcc5ad1418996bc Author: Bob Moore Date: Mon Jun 5 16:41:23 2017 +0800 ACPICA: Update two error messages to emit control method name ACPICA commit 73f7fab1376d5dbfda24cf51c1bb04df0d31b48e Intention is to improve debugging by clarifying which method has caused the error, in acpi_evaluate_object_typed. Link: https://github.com/acpica/acpica/commit/73f7fab1 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsxfeval.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 1d6e9cfa5a476e867c5571bce24aa5ce167896a8 Author: Bob Moore Date: Mon Jun 5 16:41:18 2017 +0800 ACPICA: Fix for Device/Thermal objects with ObjectType and DerefOf ACPICA commit 89565151aa4db7b546d4935b187bf2c4a86885ee These types must be special cased because the namespace node does not contain a subobject as do all other types. Link: https://github.com/acpica/acpica/commit/89565151 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exoparg1.c | 25 +++++++++++++++++++------ drivers/acpi/acpica/exresolv.c | 23 ++++++++++++++++++----- 2 files changed, 37 insertions(+), 11 deletions(-) commit c6915b3f29eb0911997efbf05b815a4e2b7ec1d0 Author: Bob Moore Date: Mon Jun 5 16:41:12 2017 +0800 ACPICA: Comment update: spelling/format. No functional change ACPICA commit d9861dae21b41d48745496bac2665f14e4e28c08 Fix some spelling errors and reformat some long lines. Link: https://github.com/acpica/acpica/commit/d9861dae Reported-by: Cao Jin Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/actypes.h | 64 +++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 30 deletions(-) commit 32d8004f2ebe310872440386fdcb5c90e43b55c3 Author: Cao Jin Date: Mon Jun 5 16:41:04 2017 +0800 ACPICA: Update comments, no functional change ACPICA commit 45eb6384fb47f4fdc5759f63c47a9b6799924972 Link: https://github.com/acpica/acpica/commit/45eb6384 Signed-off-by: Cao Jin Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbfadt.c | 4 ++-- drivers/acpi/acpica/tbutils.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit b7b7da2abe1fe02e989577293b9ece0fa15ccc31 Author: Bob Moore Date: Mon Jun 5 16:40:57 2017 +0800 ACPICA: Split resource descriptor decode strings to a new file ACPICA commit 00906ae0aff4c6b76abc232ef99700e7d7c0e325 There are enough of these strings to justify a separate file. Also, these strings are only used for the disassembler and the debugger. Thus, this change improves ACPICA modularity. Link: https://github.com/acpica/acpica/commit/00906ae0 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/utresdecode.c | 315 ++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/utresrc.c | 264 -------------------------------- 3 files changed, 316 insertions(+), 264 deletions(-) commit fa70ca7c287ee63b790fbb3de624a0c80a6e2be2 Author: Chris Packham Date: Mon Jun 26 12:44:33 2017 +1200 i2c: pca-platform: use device managed allocations Switch to using the devm_ APIs and remove the now unnecessary error handling and most of the device removal code. Signed-off-by: Chris Packham [wsa: adapted error handling I added in previous patch] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pca-platform.c | 59 +++++++---------------------------- 1 file changed, 12 insertions(+), 47 deletions(-) commit 9447332ffacceeb49467ae5314887a30f6c0aaa9 Author: Cyrille Pitchen Date: Mon Jun 26 15:09:59 2017 +0200 mtd: st_spi_fsm: remove SPINOR_OP_RDSR2 and use SPINOR_OP_RDCR instead The 35h instruction op code has two aliases/macro definitions: - SPINOR_OP_RDCR from include/linux/mtd/spi-nor.h - SPINOR_OP_RDSR2 from drivers/mtd/devices/serial_flash_cmds.h Actually, some manufacturers name the associated internal register Status Register 2 whereas other manufacturers name it Configuration Register hence the two different macros for the very same instruction op code. Since the spi-nor.h file is the reference file for all SPI NOR instruction op codes, this patch removes the definition of the SPINOR_OP_RDSR2 macro. Also the SPINOR_OP_RDSR2 macro will be associated to another instruction op code in a further patch so we need to avoid a conflict defining this macro twice. Indeed the JESD216 rev B specification, defining the SFDP tables, also refers to the 3Eh and 3Fh instruction op codes to write/read the Status Register 2 on some SPI NOR flash memories, the 35h op code still being used to read the Configuration Register/Status Register 2 on other memories. Signed-off-by: Cyrille Pitchen Acked-by: Marek Vasut drivers/mtd/devices/serial_flash_cmds.h | 1 - drivers/mtd/devices/st_spi_fsm.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 2ee87db3a287f81bf1bbc10ef52e7cb6d034ef92 Merge: ed9208b 57ae676 Author: David S. Miller Date: Tue Jun 27 15:48:50 2017 -0400 Merge branch 'nfp-get_phys_port_name-for-representors-and-SR-IOV-reorder' Jakub Kicinski says: ==================== nfp: get_phys_port_name for representors and SR-IOV reorder This series starts by making the error message if FW cannot be located easier to understand. Then I move some functions from PCI probe files into library code (nfpcore) where they belong, and remove one function which is never used. Next few patches equip representors with nfp_port structure and make their NDOs fully shared (not defined in apps), thanks to which we can easily determine which netdevs are NFP's by comparing the NDO pointers. 10th patch makes use of the shared NDOs and nfp_ports to deliver netdev-type independent .ndo_get_phys_port_name() implementation. Patches 11 and 12 reorder the nfp_app SR-IOV callbacks with enabling SR-IOV VFs. Unfortunately due to how PCI subsystem works we can't guarantee being able to disable SR-IOV at exit or that it will be disabled when we first probe... We must therefore make sure FW is able to deal with being loaded while SR-IOV is already on. Patch 13 fixes potential deadlock when enabling SR-IOV happens at the same time as port state refresh. Note that this can't happen at this point, since Flower doesn't refresh ports... but lockdep doesn't know about such details and we will have to deal with this sooner or later anyway. Last but not least a new Kconfig is added to make sure those who don't care about flower offloads have a way of not including the code in their kernels. Thanks to nfp_app separation this costs us a single ifdef and excluding flower files from the build. ==================== Signed-off-by: David S. Miller commit 57ae676ee63ec810c64aea67fc451ae0900a05f9 Author: Jakub Kicinski Date: Tue Jun 27 00:50:28 2017 -0700 nfp: flower: add Kconfig for flower app Give users an option not to build the flower-offload related code. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/Kconfig | 10 ++++++++++ drivers/net/ethernet/netronome/nfp/Makefile | 8 ++++++-- drivers/net/ethernet/netronome/nfp/nfp_app.c | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) commit 6d48ceb27af1420882f092495fc796cfcbf92a14 Author: Jakub Kicinski Date: Tue Jun 27 00:50:27 2017 -0700 nfp: allocate a private workqueue for driver work Since we grab pf->lock around pci_enable_sriov() we can no longer safely queue work which may also grab that lock onto system workqueue. pci_enable_sriov() will flush system workqueue as part to wait for VF probing. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 9 +++++++++ drivers/net/ethernet/netronome/nfp/nfp_main.h | 4 ++++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) commit e3f28473b8ed348f7c052fa1bf79edfde5efba48 Author: Jakub Kicinski Date: Tue Jun 27 00:50:26 2017 -0700 nfp: reorder SR-IOV config and nfp_app SR-IOV callbacks We previously assumed that app callback can be guaranteed to be executed before SR-IOV is actually enabled. Given that we can't guarantee that SR-IOV will be disabled during probe or that we will be able to disable it on remove, we should reorder the callbacks. We should also call the app's sriov_enable if SR-IOV was enabled during probe. Application FW must be able to disable VFs internally and not depend on them being removed at PCIe level. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 40 ++++++++++------------- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 10 ++++++ 2 files changed, 27 insertions(+), 23 deletions(-) commit 0dc78621918693face1700d1379c2b9f740282f5 Author: Jakub Kicinski Date: Tue Jun 27 00:50:25 2017 -0700 nfp: handle SR-IOV already enabled when driver is probing We assumed that when we probe number of enabled VFs will be at 0. This doesn't have to be the case for example if previous driver left SR-IOV enabled due to some VFs being assigned. Read the number of VFs enabled. Fail probe if it's above current FWs limit. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 168c478e107e790456cd6ebb308529756c21de3f Author: Jakub Kicinski Date: Tue Jun 27 00:50:24 2017 -0700 nfp: wire get_phys_port_name on representors Make nfp_port_get_phys_port_name() support new port types and wire it up to representors' struct net_device_ops. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_port.c | 30 +++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) commit 39ae7eb69db3a3daa3aa2f6c66e37dba1975ef00 Author: Jakub Kicinski Date: Tue Jun 27 00:50:23 2017 -0700 nfp: allow converting representor's netdev into nfp_port Based on struct net_device_ops figure out if netdev is a nfp_repr. Use this knowledge to convert netdev directly to nfp_port. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_repr.h | 7 +++++++ drivers/net/ethernet/netronome/nfp/nfp_port.c | 18 +++++++++++++----- 3 files changed, 21 insertions(+), 6 deletions(-) commit 5d7c64a70fa15aef903469b05ca664f7cd17d769 Author: Jakub Kicinski Date: Tue Jun 27 00:50:22 2017 -0700 nfp: move representors' struct net_device_ops to shared code Apps shouldn't declare their own struct net_device_ops for representors, this makes sharing code harder. Add necessary nfp_app callbacks and move the definition of representors' struct net_device_ops to common code. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 5 ++- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 2 +- drivers/net/ethernet/netronome/nfp/flower/main.c | 32 ++++++++---------- drivers/net/ethernet/netronome/nfp/nfp_app.h | 20 ++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 40 ++++++++++++++++++----- drivers/net/ethernet/netronome/nfp/nfp_net_repr.h | 8 ----- 6 files changed, 68 insertions(+), 39 deletions(-) commit 3238b250b7624a20756667032648263eb3dc1521 Author: Jakub Kicinski Date: Tue Jun 27 00:50:21 2017 -0700 nfp: make the representor get stats app-independent Thanks to the fact that all representors will now have an nfp_port, we can depend on information there to provide a app-independent .ndo_get_stats64(). Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 16 +------------ drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 28 +++++++++++++++-------- drivers/net/ethernet/netronome/nfp/nfp_net_repr.h | 4 ++-- 3 files changed, 22 insertions(+), 26 deletions(-) commit 38edbf6f5da4f87741e73b74dc323706827e83e0 Author: Jakub Kicinski Date: Tue Jun 27 00:50:20 2017 -0700 nfp: spawn nfp_ports for PF and VF ports nfp_port is an abstraction which is supposed to allow us sharing code between different netdev types (vNIC vs repr). Spawn ports for PFs and VFs to enable this sharing. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 19 +++++++++++++++++-- drivers/net/ethernet/netronome/nfp/nfp_port.h | 20 ++++++++++++++++++-- 2 files changed, 35 insertions(+), 4 deletions(-) commit 9ce6bbbb0503e58e8629ae0185e916b271237bc3 Author: Jakub Kicinski Date: Tue Jun 27 00:50:19 2017 -0700 nfp: add nfp_app cleanup callback and make flower use it Add a cleanup callback for undoing what app init callback did. Make flower allocate its private structure on init and free it from the new callback. While at it remember to set the app pointer to NULL on the error path to avoid any races while probe path unwinds. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 24 +++++++++++------------ drivers/net/ethernet/netronome/nfp/nfp_app.h | 10 +++++++++- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 6 +++++- 3 files changed, 26 insertions(+), 14 deletions(-) commit 8a119cef9a84c396c7de49da2fb4b8af09e96d2b Author: Jakub Kicinski Date: Tue Jun 27 00:50:18 2017 -0700 nfp: remove unused nfp_cpp_area_check_range() Remove unused nfp_cpp_area_check_range() function. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 2 -- .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 21 --------------------- 2 files changed, 23 deletions(-) commit f84730240735b15f725ce59d66a663de82650b46 Author: Jakub Kicinski Date: Tue Jun 27 00:50:17 2017 -0700 nfp: add helper for mapping runtime symbols Move most of the helper for mapping RTsyms from nfp_net_main.c to nfpcore. Use the new helper directly for mapping MAC statistics, since they don't need to include the PCIe interface ID in the symbol name. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 36 +++++----------------- .../net/ethernet/netronome/nfp/nfpcore/nfp_nffw.h | 4 +++ .../net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c | 27 ++++++++++++++++ 3 files changed, 39 insertions(+), 28 deletions(-) commit 064dc3196ebd2587ad9a4ca2d26629a20f819352 Author: Jakub Kicinski Date: Tue Jun 27 00:50:16 2017 -0700 nfp: move area mapping helper into nfpcore nfp_net_map_area() is a helper for mapping areas of NFP memory defined in nfp_net_main.c. Move it to nfpcore to allow reuse and rename accordingly. Create an additional helper - nfp_cpp_area_alloc_acquire() the opposite of already existing nfp_cpp_area_release_free(). Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 56 +--------------------- .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 7 +++ .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 35 ++++++++++++++ .../ethernet/netronome/nfp/nfpcore/nfp_cpplib.c | 40 ++++++++++++++++ 4 files changed, 84 insertions(+), 54 deletions(-) commit d557ee6bdc6dc4df2ab8e00c2127120b4acbdfca Author: Jakub Kicinski Date: Tue Jun 27 00:50:15 2017 -0700 nfp: explicitly check if application FW is loaded We support application FW being either loaded automatically at boot from flash or (more commonly) by the driver from disk. If FW is not found on disk and nothing is preloaded users are faced with this unintuitive error: nfp 0000:04:00.0: nfp: Failed to find PF symbol _pf0_net_bar0 We can do better. Since we rely on symbol table being present - check early if it could be correctly read out of from the device and if not print a more informative message. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 0e8ce93bdceb6d36a3c1db2227d3f51168fb796c Author: Chris Packham Date: Mon Jun 26 12:44:32 2017 +1200 i2c: pca-platform: add devicetree awareness Allow devices that use this driver to be registered via a devicetree. Signed-off-by: Chris Packham [wsa: fixed leakage when registering GPIO failed] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pca-platform.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit ed9208be8d8f3ce164892ba7ca484501c881de66 Merge: d97af30 67a5178 Author: David S. Miller Date: Tue Jun 27 15:43:57 2017 -0400 Merge branch 'udp-ipv6-use-scratch-helpers' Paolo Abeni says: ==================== ipv6: udp: exploit dev_scratch helpers When bringing in the recent cache optimization for the UDP protocol, I forgot to leverage the newly introduced scratched area helpers in the UDPv6 code path. As a result, the UDPv6 implementation suffers some unnecessary performance penality when compared to v4. This series aim to bring back UDPv6 on equal footing in respect to v4. The first patch moves the shared helpers to the common include files, while the second uses them in the UDPv6 code. This gives 5-8% performance improvement for a system under flood with small UDPv6 packets. The performance delta is less than the one reported on the original patch set because the UDPv6 code path already leveraged some of the optimization. ==================== Signed-off-by: David S. Miller commit 67a51780aebb683c3b217b2867e25102cdb0afbc Author: Paolo Abeni Date: Mon Jun 26 19:01:51 2017 +0200 ipv6: udp: leverage scratch area helpers The commit b65ac44674dd ("udp: try to avoid 2 cache miss on dequeue") leveraged the scratched area helpers for UDP v4 but I forgot to update accordingly the IPv6 code path. This change extends the scratch area usage to the IPv6 code, synching the two implementations and giving some performance benefit. IPv6 is again almost on the same level of IPv4, performance-wide. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv6/udp.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit b26bbdae460ba90fb8cda37123a66be15a43a2a9 Author: Paolo Abeni Date: Mon Jun 26 19:01:50 2017 +0200 udp: move scratch area helpers into the include file So that they can be later used by the IPv6 code, too. Also lift the comments a bit. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/net/udp.h | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/udp.c | 60 ------------------------------------------------------ 2 files changed, 61 insertions(+), 60 deletions(-) commit d97af30f615eea23ecfefd0e80b2f5f2f41afe55 Author: Dave Watson Date: Mon Jun 26 08:36:47 2017 -0700 tcp: fix null ptr deref in getsockopt(..., TCP_ULP, ...) If icsk_ulp_ops is unset, it dereferences a null ptr. Add a null ptr check. BUG: KASAN: null-ptr-deref in copy_to_user include/linux/uaccess.h:168 [inline] BUG: KASAN: null-ptr-deref in do_tcp_getsockopt.isra.33+0x24f/0x1e30 net/ipv4/tcp.c:3057 Read of size 4 at addr 0000000000000020 by task syz-executor1/15452 Signed-off-by: Dave Watson Reported-by: "Levin, Alexander (Sasha Levin)" Signed-off-by: David S. Miller net/ipv4/tcp.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4cc7229daa46d1867e66ba09929d936377ae4837 Author: Chris Packham Date: Mon Jun 26 12:44:31 2017 +1200 i2c: pca-platform: switch to struct gpio_desc Make use of struct gpio_desc which allows us to specify the active state of the reset pin. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pca-platform.c | 43 ++++++++++++++++------------------- 1 file changed, 19 insertions(+), 24 deletions(-) commit e00ad7ef68e4882a18ac78d82348be09e8d0263b Author: Chris Packham Date: Mon Jun 26 12:44:30 2017 +1200 dt-bindings: add bindings for i2c-pca-platform Signed-off-by: Chris Packham Acked-by: Rob Herring Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-pca-platform.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 315e9c767d9a4668ad68cde1b57a14f916c90668 Author: Arnd Bergmann Date: Tue Jun 27 17:34:19 2017 +0200 mtd: spi-nor: cqspi: remove duplicate const The variable was already marked 'const' before the previous patch, but the qualifier was in an unusual place, and now the extra 'const' causes a harmless warning: drivers/mtd/spi-nor/cadence-quadspi.c:1286:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] This removes the other 'const' instead. Fixes: f993c123b461 ("mtd: spi-nor: cqspi: make of_device_ids const") Signed-off-by: Arnd Bergmann Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/cadence-quadspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 019b13ae85260cfab9d7ccb6ca58f094d18a24fd Author: Matthias Schiffer Date: Tue Jun 27 14:42:43 2017 +0200 vxlan: fix incorrect nlattr access in MTU check The access to the wrong variable could lead to a NULL dereference and possibly other invalid memory reads in vxlan newlink/changelink requests with a IFLA_MTU attribute. Fixes: a985343ba906 "vxlan: refactor verification and application of configuration" Signed-off-by: Matthias Schiffer Signed-off-by: David S. Miller drivers/net/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c017ce0a9ad753e3835d7f8f5fca89960380e816 Author: Vincent Bernat Date: Tue Jun 27 15:42:57 2017 +0200 net: remove policy-routing.txt documentation It dates back from 2.1.16 and is obsolete since 2.1.68 when the current rule system has been introduced. Signed-off-by: Vincent Bernat Signed-off-by: David S. Miller Documentation/networking/policy-routing.txt | 150 ---------------------------- 1 file changed, 150 deletions(-) commit 13c931bd9a82d1a88e21f5904c5cdb0261b9d53c Author: Paolo Valente Date: Tue Jun 27 12:30:47 2017 -0600 block, bfq: update wr_busy_queues if needed on a queue split This commit fixes a bug triggered by a non-trivial sequence of events. These events are briefly described in the next two paragraphs. The impatiens, or those who are familiar with queue merging and splitting, can jump directly to the last paragraph. On each I/O-request arrival for a shared bfq_queue, i.e., for a bfq_queue that is the result of the merge of two or more bfq_queues, BFQ checks whether the shared bfq_queue has become seeky (i.e., if too many random I/O requests have arrived for the bfq_queue; if the device is non rotational, then random requests must be also small for the bfq_queue to be tagged as seeky). If the shared bfq_queue is actually detected as seeky, then a split occurs: the bfq I/O context of the process that has issued the request is redirected from the shared bfq_queue to a new non-shared bfq_queue. As a degenerate case, if the shared bfq_queue actually happens to be shared only by one process (because of previous splits), then no new bfq_queue is created: the state of the shared bfq_queue is just changed from shared to non shared. Regardless of whether a brand new non-shared bfq_queue is created, or the pre-existing shared bfq_queue is just turned into a non-shared bfq_queue, several parameters of the non-shared bfq_queue are set (restored) to the original values they had when the bfq_queue associated with the bfq I/O context of the process (that has just issued an I/O request) was merged with the shared bfq_queue. One of these parameters is the weight-raising state. If, on the split of a shared bfq_queue, 1) a pre-existing shared bfq_queue is turned into a non-shared bfq_queue; 2) the previously shared bfq_queue happens to be busy; 3) the weight-raising state of the previously shared bfq_queue happens to change; the number of weight-raised busy queues changes. The field wr_busy_queues must then be updated accordingly, but such an update was missing. This commit adds the missing update. Reported-by: Luca Miccio Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 8298912bb6de7e3c9f86ad19d6488ac88cd0e940 Author: Christoph Hellwig Date: Mon Jun 19 09:26:28 2017 +0200 mmc/block: remove a call to blk_queue_bounce_limit BLK_BOUNCE_ANY is the defauly now, so the call is superflous. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/mmc/core/queue.c | 1 - 1 file changed, 1 deletion(-) commit 41341afa0fd7b086a1327e2b76ab0eb7a3661f25 Author: Christoph Hellwig Date: Mon Jun 19 09:26:27 2017 +0200 dm: don't set bounce limit Now all queues allocators come without abounce limit by default, dm doesn't have to override this anymore. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/md/dm.c | 1 - 1 file changed, 1 deletion(-) commit 8fc450443e3c489af41a3c9c85b32d38625f2c2a Author: Christoph Hellwig Date: Mon Jun 19 09:26:26 2017 +0200 block: don't set bounce limit in blk_init_queue Instead move it to the callers. Those that either don't use bio_data() or page_address() or are specific to architectures that do not support highmem are skipped. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 5 ----- drivers/block/aoe/aoeblk.c | 1 + drivers/block/floppy.c | 1 + drivers/block/paride/pcd.c | 1 + drivers/block/paride/pd.c | 1 + drivers/block/paride/pf.c | 1 + drivers/block/skd_main.c | 1 + drivers/block/swim.c | 2 ++ drivers/block/swim3.c | 1 + drivers/block/xsysace.c | 1 + drivers/cdrom/gdrom.c | 1 + drivers/mtd/mtd_blkdevs.c | 1 + drivers/sbus/char/jsflash.c | 1 + 13 files changed, 13 insertions(+), 5 deletions(-) commit 0bf6595ec81d896451f0066c95f8cd34c74313dc Author: Christoph Hellwig Date: Mon Jun 19 09:26:25 2017 +0200 block: don't set bounce limit in blk_init_allocated_queue And just move it into scsi_transport_sas which needs it due to low-level drivers directly derferencing bio_data, and into blk_init_queue_node, which will need a further push into the callers. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 10 +++++----- drivers/scsi/scsi_transport_sas.c | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) commit 46685d1a9521054fa3a7a352f6bb54166cd5b2c5 Author: Christoph Hellwig Date: Mon Jun 19 09:26:24 2017 +0200 blk-mq: don't bounce by default For historical reasons we default to bouncing highmem pages for all block queues. But the blk-mq drivers are easy to audit to ensure that we don't need this - scsi and mtip32xx set explicit limits and everyone else doesn't have any particular ones. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 5 ----- drivers/block/virtio_blk.c | 3 --- drivers/block/xen-blkfront.c | 3 --- 3 files changed, 11 deletions(-) commit 0b0bcacc3b4300c4bba0bacb4c7a279b2728f331 Author: Christoph Hellwig Date: Mon Jun 19 09:26:23 2017 +0200 block: don't bother with bounce limits for make_request drivers We only call blk_queue_bounce for request-based drivers, so stop messing with it for make_request based drivers. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 5 +++++ block/blk-mq.c | 5 +++++ block/blk-settings.c | 5 ----- drivers/block/brd.c | 1 - drivers/block/drbd/drbd_main.c | 1 - drivers/block/rsxx/dev.c | 1 - drivers/nvdimm/blk.c | 1 - drivers/nvdimm/btt.c | 1 - drivers/nvdimm/pmem.c | 1 - 9 files changed, 10 insertions(+), 11 deletions(-) commit 1c4bc3ab9a064d98cdf6de6b44f89d5c3757fa32 Author: Christoph Hellwig Date: Mon Jun 19 09:26:22 2017 +0200 block: remove the queue_bounce_pfn helper Only used inside the bounce code, and opencoding it makes it more obvious what is going on. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bounce.c | 6 +++--- include/linux/blkdev.h | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) commit 3bce016a4c5975e4279bfb3cbd6d0332b856cc72 Author: Christoph Hellwig Date: Mon Jun 19 09:26:21 2017 +0200 block: move bounce declarations to block/blk.h Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk.h | 13 +++++++++++++ block/bounce.c | 1 + include/linux/blkdev.h | 13 ------------- 3 files changed, 14 insertions(+), 13 deletions(-) commit caa4b02476e31fc7933d2138062f7f355d3cd8f7 Author: Christoph Hellwig Date: Tue Jun 27 12:13:21 2017 -0600 blk-map: call blk_queue_bounce from blk_rq_append_bio This makes moves the knowledge about bouncing out of the callers into the block core (just like we do for the normal I/O path), and allows to unexport blk_queue_bounce. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-map.c | 7 +++---- block/bounce.c | 2 -- drivers/scsi/osd/osd_initiator.c | 5 +---- 3 files changed, 4 insertions(+), 10 deletions(-) commit e442cbf910c71fba5926cf757dd7f8fcce22fc5f Author: Christoph Hellwig Date: Mon Jun 19 09:26:19 2017 +0200 pktcdvd: remove the call to blk_queue_bounce pktcdvd is a make_request based stacking driver and thus doesn't have any addressing limits on it's own. It also doesn't use bio_data() or page_address(), so it doesn't need a lowmem bounce either. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/pktcdvd.c | 2 -- 1 file changed, 2 deletions(-) commit f5d118406247acfc4fc481e441e01ea4d6318fdc Author: Jens Axboe Date: Tue Jun 27 12:03:06 2017 -0600 nvme: add support for streams and directives This adds support for Directives in NVMe, particular for the Streams directive. Support for Directives is a new feature in NVMe 1.3. It allows a user to pass in information about where to store the data, so that it the device can do so most effiently. If an application is managing and writing data with different life times, mixing differently retentioned data onto the same locations on flash can cause write amplification to grow. This, in turn, will reduce performance and life time of the device. Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 151 +++++++++++++++++++++++++++++++++++++++++++++-- drivers/nvme/host/nvme.h | 4 ++ include/linux/nvme.h | 48 +++++++++++++++ 3 files changed, 199 insertions(+), 4 deletions(-) commit e6959b9350c6135b260d7b561153d9ad6c5d49ff Author: Jens Axboe Date: Tue Jun 27 11:51:28 2017 -0600 btrfs: add support for passing in write hints for buffered writes Reviewed-by: Andreas Dilger Signed-off-by: Chris Mason Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe fs/btrfs/extent_io.c | 1 + 1 file changed, 1 insertion(+) commit 31d7d58dcc228004fcd360448004e999d0bfb8f1 Author: Jens Axboe Date: Tue Jun 27 09:34:01 2017 -0600 xfs: add support for passing in write hints for buffered writes Reviewed-by: Andreas Dilger Reviewed-by: Martin K. Petersen Reviewed-by: Darrick J. Wong Signed-off-by: Jens Axboe fs/xfs/xfs_aops.c | 2 ++ 1 file changed, 2 insertions(+) commit 0127251c45ae74befb21db17754a66f55feff6a8 Author: Jens Axboe Date: Tue Jun 27 09:32:37 2017 -0600 ext4: add support for passing in write hints for buffered writes Reviewed-by: Andreas Dilger Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe fs/ext4/page-io.c | 2 ++ 1 file changed, 2 insertions(+) commit 8e8f9298818c4c2754182d544158cb182581a9ab Author: Jens Axboe Date: Tue Jun 27 09:30:05 2017 -0600 fs: add support for buffered writeback to pass down write hints Reviewed-by: Andreas Dilger Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe fs/buffer.c | 13 ++++++++----- fs/mpage.c | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) commit 45d06cf701a3866e0d246789039a46370af60223 Author: Jens Axboe Date: Tue Jun 27 11:01:22 2017 -0600 fs: add O_DIRECT and aio support for sending down write life time hints Reviewed-by: Andreas Dilger Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe fs/aio.c | 1 + fs/block_dev.c | 2 ++ fs/direct-io.c | 2 ++ fs/iomap.c | 1 + 4 files changed, 6 insertions(+) commit f793dfd3f39a3dc50468b06498606b3a906f42f1 Author: Jens Axboe Date: Mon Jun 26 08:15:27 2017 -0600 blk-mq: expose write hints through debugfs Useful to verify that things are working the way they should. Reading the file will return number of kb written with each write hint. Writing the file will reset the statistics. No care is taken to ensure that we don't race on updates. Drivers will write to q->write_hints[] if they handle a given write hint. Reviewed-by: Andreas Dilger Reviewed-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 24 ++++++++++++++++++++++++ include/linux/blkdev.h | 3 +++ 2 files changed, 27 insertions(+) commit cb6934f8ea1a595902ca37e250e0917d4dd7b2a7 Author: Jens Axboe Date: Tue Jun 27 09:22:02 2017 -0600 block: add support for write hints in a bio No functional changes in this patch, we just use up some holes in the bio and request structures to define a write hint that we psas down the stack. Ensure that we don't merge requests that have different life time hints assigned to them, and that we inherit the write hint when cloning a bio. Reviewed-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 2 ++ block/blk-core.c | 1 + block/blk-merge.c | 14 ++++++++++++++ include/linux/blk_types.h | 1 + include/linux/blkdev.h | 2 ++ 5 files changed, 20 insertions(+) commit c75b1d9421f80f4143e389d2d50ddfc8a28c8c35 Author: Jens Axboe Date: Tue Jun 27 11:47:04 2017 -0600 fs: add fcntl() interface for setting/getting write life time hints Define a set of write life time hints: RWH_WRITE_LIFE_NOT_SET No hint information set RWH_WRITE_LIFE_NONE No hints about write life time RWH_WRITE_LIFE_SHORT Data written has a short life time RWH_WRITE_LIFE_MEDIUM Data written has a medium life time RWH_WRITE_LIFE_LONG Data written has a long life time RWH_WRITE_LIFE_EXTREME Data written has an extremely long life time The intent is for these values to be relative to each other, no absolute meaning should be attached to these flag names. Add an fcntl interface for querying these flags, and also for setting them as well: F_GET_RW_HINT Returns the read/write hint set on the underlying inode. F_SET_RW_HINT Set one of the above write hints on the underlying inode. F_GET_FILE_RW_HINT Returns the read/write hint set on the file descriptor. F_SET_FILE_RW_HINT Set one of the above write hints on the file descriptor. The user passes in a 64-bit pointer to get/set these values, and the interface returns 0/-1 on success/error. Sample program testing/implementing basic setting/getting of write hints is below. Add support for storing the write life time hint in the inode flags and in struct file as well, and pass them to the kiocb flags. If both a file and its corresponding inode has a write hint, then we use the one in the file, if available. The file hint can be used for sync/direct IO, for buffered writeback only the inode hint is available. This is in preparation for utilizing these hints in the block layer, to guide on-media data placement. /* * writehint.c: get or set an inode write hint */ #include #include #include #include #include #include #ifndef F_GET_RW_HINT #define F_LINUX_SPECIFIC_BASE 1024 #define F_GET_RW_HINT (F_LINUX_SPECIFIC_BASE + 11) #define F_SET_RW_HINT (F_LINUX_SPECIFIC_BASE + 12) #endif static char *str[] = { "RWF_WRITE_LIFE_NOT_SET", "RWH_WRITE_LIFE_NONE", "RWH_WRITE_LIFE_SHORT", "RWH_WRITE_LIFE_MEDIUM", "RWH_WRITE_LIFE_LONG", "RWH_WRITE_LIFE_EXTREME" }; int main(int argc, char *argv[]) { uint64_t hint; int fd, ret; if (argc < 2) { fprintf(stderr, "%s: file \n", argv[0]); return 1; } fd = open(argv[1], O_RDONLY); if (fd < 0) { perror("open"); return 2; } if (argc > 2) { hint = atoi(argv[2]); ret = fcntl(fd, F_SET_RW_HINT, &hint); if (ret < 0) { perror("fcntl: F_SET_RW_HINT"); return 4; } } ret = fcntl(fd, F_GET_RW_HINT, &hint); if (ret < 0) { perror("fcntl: F_GET_RW_HINT"); return 3; } printf("%s: hint %s\n", argv[1], str[hint]); close(fd); return 0; } Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe fs/fcntl.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++ fs/inode.c | 1 + fs/open.c | 1 + include/linux/fs.h | 47 ++++++++++++++++++++++++++--------- include/uapi/linux/fcntl.h | 21 ++++++++++++++++ 5 files changed, 120 insertions(+), 12 deletions(-) commit ce4fecf1fe1518131ff80eebf412de0080fea049 Author: Pantelis Antoniou Date: Wed Jan 21 19:06:14 2015 +0200 vsprintf: Add %p extension "%pOF" for device tree 90% of the usage of device node's full_name is printing it out in a kernel message. However, storing the full path for every node is wasteful and redundant. With a custom format specifier, we can generate the full path at run-time and eventually remove the full path from every node. For instance typical use is: pr_info("Frobbing node %s\n", node->full_name); Which can be written now as: pr_info("Frobbing node %pOF\n", node); '%pO' is the base specifier to represent kobjects with '%pOF' representing struct device_node. Currently, struct device_node is the only supported type of kobject. More fine-grained control of formatting includes printing the name, flags, path-spec name and others, explained in the documentation entry. Originally written by Pantelis, but pretty much rewrote the core function using existing string/number functions. The 2 passes were unnecessary and have been removed. Also, updated the checkpatch.pl check. The unittest code was written by Grant Likely. Signed-off-by: Pantelis Antoniou Acked-by: Joe Perches Signed-off-by: Rob Herring Documentation/printk-formats.txt | 36 +++++++ drivers/of/unittest-data/tests-platform.dtsi | 4 +- drivers/of/unittest.c | 58 ++++++++++++ lib/vsprintf.c | 136 +++++++++++++++++++++++++++ scripts/checkpatch.pl | 2 +- 5 files changed, 234 insertions(+), 2 deletions(-) commit 165d1cc0074b2f938586274776d029b9bce914c4 Author: Luis R. Rodriguez Date: Fri Jun 23 12:19:12 2017 -0700 kmod: reduce atomic operations on kmod_concurrent and simplify When checking if we want to allow a kmod thread to kick off we increment, then read to see if we should enable a thread. If we were over the allowed limit limit we decrement. Splitting the increment far apart from decrement means there could be a time where two increments happen potentially giving a false failure on a thread which should have been allowed. CPU1 CPU2 atomic_inc() atomic_inc() atomic_read() atomic_read() atomic_dec() atomic_dec() In this case a read on CPU1 gets the atomic_inc()'s and we could negate it from getting a kmod thread. We could try to prevent this with a lock or preemption but that is overkill. We can fix by reducing the number of atomic operations. We do this by inverting the logic of of the enabler, instead of incrementing kmod_concurrent as we get new kmod users, define the variable kmod_concurrent_max as the max number of currently allowed kmod users and as we get new kmod users just decrement it if its still positive. This combines the dec and read in one atomic operation. In this case we no longer get the same false failure: CPU1 CPU2 atomic_dec_if_positive() atomic_dec_if_positive() atomic_inc() atomic_inc() The number of threads is computed at init, and since the current computation of kmod_concurrent includes the thread count we can avoid setting kmod_concurrent_max later in boot through an init call by simply sticking to 50 as the kmod_concurrent_max. The assumption here is a system with modules must at least have ~16 MiB of RAM. Suggested-by: Petr Mladek Suggested-by: Dmitry Torokhov Signed-off-by: Luis R. Rodriguez Reviewed-by: Petr Mladek Signed-off-by: Jessica Yu kernel/kmod.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit 93437353daeff31bd5b11810daa4d2d509d1a64e Author: Luis R. Rodriguez Date: Fri May 26 14:12:25 2017 -0700 module: use list_for_each_entry_rcu() on find_module_all() The module list has been using RCU in a lot of other calls for a while now, we just overlooked changing this one over to use RCU. Signed-off-by: Luis R. Rodriguez Signed-off-by: Jessica Yu kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5da8e47d849d3d37b14129f038782a095b9ad049 Author: Jeffy Chen Date: Tue Jun 27 17:34:44 2017 +0800 Bluetooth: hidp: fix possible might sleep error in hidp_session_thread It looks like hidp_session_thread has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE); if (condition) break; // may call might_sleep here schedule(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Tested-by: AL Yu-Chen Cho Tested-by: Rohit Vaswani Signed-off-by: Marcel Holtmann net/bluetooth/hidp/core.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit f06d977309d09253c744e54e75c5295ecc52b7b4 Author: Jeffy Chen Date: Tue Jun 27 17:34:43 2017 +0800 Bluetooth: cmtp: fix possible might sleep error in cmtp_session It looks like cmtp_session has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE); if (condition) break; // may call might_sleep here schedule(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Reviewed-by: AL Yu-Chen Cho Signed-off-by: Marcel Holtmann net/bluetooth/cmtp/core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 25717382c1dd0ddced2059053e3ca5088665f7a5 Author: Jeffy Chen Date: Tue Jun 27 17:34:42 2017 +0800 Bluetooth: bnep: fix possible might sleep error in bnep_session It looks like bnep_session has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE); if (condition) break; // may call might_sleep here schedule(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Reviewed-by: AL Yu-Chen Cho Signed-off-by: Marcel Holtmann net/bluetooth/bnep/core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 441dae8f2f2975c68101a84bc3f528ec95ecf7c3 Author: Joel Fernandes Date: Sun Jun 25 22:38:43 2017 -0700 tracing: Add support for display of tgid in trace output Earlier patches introduced ability to record the tgid using the 'record-tgid' option. Here we read the tgid and output it if the option is enabled. Link: http://lkml.kernel.org/r/20170626053844.5746-3-joelaf@google.com Cc: kernel-team@android.com Cc: Ingo Molnar Tested-by: Michael Sartain Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 36 ++++++++++++++++++++++-------------- kernel/trace/trace_output.c | 9 +++++++++ 2 files changed, 31 insertions(+), 14 deletions(-) commit d914ba37d7145acb9fd3bb23075c2d56e5a44eb6 Author: Joel Fernandes Date: Mon Jun 26 19:01:55 2017 -0700 tracing: Add support for recording tgid of tasks Inorder to support recording of tgid, the following changes are made: * Introduce a new API (tracing_record_taskinfo) to additionally record the tgid along with the task's comm at the same time. This has has the benefit of not setting trace_cmdline_save before all the information for a task is saved. * Add a new API tracing_record_taskinfo_sched_switch to record task information for 2 tasks at a time (previous and next) and use it from sched_switch probe. * Preserve the old API (tracing_record_cmdline) and create it as a wrapper around the new one so that existing callers aren't affected. * Reuse the existing sched_switch and sched_wakeup probes to record tgid information and add a new option 'record-tgid' to enable recording of tgid When record-tgid option isn't enabled to being with, we take care to make sure that there's isn't memory or runtime overhead. Link: http://lkml.kernel.org/r/20170627020155.5139-1-joelaf@google.com Cc: kernel-team@android.com Cc: Ingo Molnar Tested-by: Michael Sartain Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) include/linux/trace_events.h | 13 ++++- kernel/trace/trace.c | 105 ++++++++++++++++++++++++++++++++++---- kernel/trace/trace.h | 7 +++ kernel/trace/trace_events.c | 42 ++++++++++++++- kernel/trace/trace_sched_switch.c | 72 +++++++++++++++++++++----- 5 files changed, 213 insertions(+), 26 deletions(-) commit 83dd14933e33a45e9b366c572e15505982b46845 Author: Steven Rostedt (VMware) Date: Tue Jun 27 11:04:40 2017 -0400 ftrace: Decrement count for dyn_ftrace_total_info file The dyn_ftrace_total_info file is used to show how many functions have been converted into nops and can be used by ftrace. The problem is that it does not get decremented when functions are removed (init boot code being freed, and modules being freed). That means the number is very inaccurate everytime functions are removed from the ftrace tables. Decrement it when functions are removed. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 1 + 1 file changed, 1 insertion(+) commit 6a9c981b1e9657ca5866d10aa38b8a4fe1159138 Author: Steven Rostedt (VMware) Date: Tue Jun 27 11:02:49 2017 -0400 ftrace: Remove unused function ftrace_arch_read_dyn_info() ftrace_arch_read_dyn_info() was used so that archs could add its own debug information into the dyn_ftrace_total_info in the tracefs file system. That file is for debugging usage of dynamic ftrace. No arch uses that function anymore, so just get rid of it. This also allows for tracing_read_dyn_info() to be cleaned up a bit. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit cdd24a200a8fa39e383890bbf862c0aa83ba83f5 Author: Loic Poulain Date: Tue Jun 27 19:15:07 2017 +0200 Bluetooth: hci_bcm: Fix unwanted error reporting if no bcm dev The hci_bcm proto is able to operate without bcm platform device linked to its uart port. In that case, firmware can be applied, but there is no power operation (no gpio/irq resources mgmt). However, the current implementation breaks this use case because of reporting a ENODEV error in the bcm setup procedure if bcm_request_irq fails (which is the case if no bcm device linked). Fix this by removing bcm_request_irq error forwarding. Signed-off-by: Loic Poulain Reported-by: Ian Molton Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5d6a312e8f99f0a0bf793256c203fa17c97a15e1 Author: Arnd Bergmann Date: Tue Jun 27 17:36:36 2017 +0200 platform/chrome: cros_ec_lightbar - hide unused PM functions The only reference to the new functions is inside of an #ifdef, which now causes a harmless warning when CONFIG_PM_SLEEP is not set: chrome/cros_ec_dev.c:478:12: error: 'ec_device_resume' defined but not used [-Werror=unused-function] chrome/cros_ec_dev.c:469:12: error: 'ec_device_suspend' defined but not used [-Werror=unused-function] This marks the two functions as __maybe_unused so they can get silently dropped by the compiler. Fixes: 405c84308c43 ("platform/chrome: cros_ec_lightbar - Control of suspend/resume lightbar sequence") Signed-off-by: Arnd Bergmann Reviewed-by: Guenter Roeck Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29d99b966d60029a11d08b9b004cd84b21ce0d67 Author: Shawn Nematbakhsh Date: Tue Feb 14 20:58:02 2017 +0100 cros_ec: Don't signal wake event for non-wake host events The subset of wake-enabled host events is defined by the EC, but the EC may still send non-wake host events if we're in the process of suspending. Get the mask of wake-enabled host events from the EC and filter out non-wake events to prevent spurious aborted suspend attempts. Signed-off-by: Shawn Nematbakhsh Signed-off-by: Thierry Escande Acked-for-MFD-by: Lee Jones Signed-off-by: Benson Leung drivers/mfd/cros_ec.c | 13 ++++-- drivers/platform/chrome/cros_ec_lpc.c | 3 +- drivers/platform/chrome/cros_ec_proto.c | 76 ++++++++++++++++++++++++++++++--- include/linux/mfd/cros_ec.h | 5 ++- 4 files changed, 87 insertions(+), 10 deletions(-) commit f0d657e80d788c43ff4a5dbeb47d2ad60059f1c7 Author: Yuyang Du Date: Tue Jun 27 09:44:26 2017 -0600 usbip: Fix uninitialized variable bug in vhci The patch 03cd00d538a6: "usbip: vhci-hcd: Set the vhci structure up to work" introduced a bug which uses a vairable without initialization in error handling code. Fix it. Reported-by: Dan Carpenter Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f04c210d031667e503d6538a72345a36f3b5d71 Author: Rafał Miłecki Date: Thu Jun 8 18:08:32 2017 +0200 usb: core: read USB ports from DT in the usbport LED trigger driver This uses DT info to read relation description of LEDs and USB ports. If DT has properly described LEDs, trigger will know when to turn them on. Signed-off-by: Rafał Miłecki Signed-off-by: Greg Kroah-Hartman drivers/usb/core/ledtrig-usbport.c | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 80dc6e1cd85fc09dde37b262f1beb9f953e215e2 Author: Rafał Miłecki Date: Thu Jun 8 18:08:31 2017 +0200 dt-bindings: leds: document new trigger-sources property Some LEDs can be related to a specific device(s) described in the DT. This property allows specifying such relations. E.g. USB LED should usually be used to indicate some USB port(s) state. Please note this binding is designed to be generic and not influenced by any operating system design. Linux developers may find "trigger" part a bit confusing since in Linux triggers are separated drivers. It shouldn't define the binding though (we shouldn't add an extra level of indirection). Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/leds/common.txt | 35 +++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit 8243edf44152c08c3efa1d551fc48605d674ad18 Author: Heikki Krogerus Date: Fri Jun 16 11:21:25 2017 +0300 usb: typec: ucsi: Add ACPI driver Driver for ACPI UCSI interface method. This driver replaces the previous UCSI driver drivers/usb/misc/ucsi.c. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/Kconfig | 26 -- drivers/usb/misc/Makefile | 1 - drivers/usb/misc/ucsi.c | 478 ------------------------------------- drivers/usb/misc/ucsi.h | 215 ----------------- drivers/usb/typec/ucsi/Kconfig | 16 ++ drivers/usb/typec/ucsi/Makefile | 2 + drivers/usb/typec/ucsi/ucsi_acpi.c | 158 ++++++++++++ 7 files changed, 176 insertions(+), 720 deletions(-) commit c1b0bc2dabfa884dea49c02adaf3cd6b52b33d2f Author: Heikki Krogerus Date: Fri Jun 16 11:21:24 2017 +0300 usb: typec: Add support for UCSI interface UCSI - USB Type-C Connector System Software Interface - is a specification that defines set of registers and data structures for controlling the USB Type-C ports. It's designed for systems where an embedded controller (EC) is in charge of the USB Type-C PHY or USB Power Delivery controller. It is designed for systems with EC, but it is not limited to them, and for example some USB Power Delivery controllers will use it as their direct control interface. With UCSI the EC (or USB PD controller) acts as the port manager, implementing all USB Type-C and Power Delivery state machines. The OS can use the interfaces for reading the status of the ports and controlling basic operations like role swapping. The UCSI specification highlights the fact that it does not define the interface method (PCI/I2C/ACPI/etc.). Therefore the driver is implemented as library and every supported interface method needs its own driver. Driver for ACPI is provided in separate patch following this one. The initial driver includes support for all required features from UCSI specification version 1.0 (getting connector capabilities and status, and support for power and data role swapping), but none of the optional UCSI features (alternate modes, power source capabilities, and cable capabilities). Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/Kconfig | 2 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/ucsi/Kconfig | 23 ++ drivers/usb/typec/ucsi/Makefile | 7 + drivers/usb/typec/ucsi/debug.h | 64 ++++ drivers/usb/typec/ucsi/trace.c | 2 + drivers/usb/typec/ucsi/trace.h | 143 ++++++++ drivers/usb/typec/ucsi/ucsi.c | 790 ++++++++++++++++++++++++++++++++++++++++ drivers/usb/typec/ucsi/ucsi.h | 335 +++++++++++++++++ 9 files changed, 1367 insertions(+) commit c68bb0ef177bbcaba505ed492101095c613dafa6 Author: Gustavo A. R. Silva Date: Wed Jun 21 09:22:15 2017 -0500 usb: musb: compress return logic into one line Simplify return logic to avoid unnecessary variable assignment. Signed-off-by: Gustavo A. R. Silva Acked-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_host.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 17129d4702fa1969e2e20357e92cae0277819b47 Merge: 6e5c751 1f4be24 Author: Greg Kroah-Hartman Date: Tue Jun 27 17:37:15 2017 +0200 Merge tag 'extcon-next-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into usb-next Chanwoo writes: Update extcon for 4.13 Detailed description for this pull request: - Use devm_kcalloc() and fix typo for extcon core/extcon-arizona.c. - Add dependency ARCH_QCOM for extcon-qcom-spmi-misc.c - Use resource-managed devm_* function for gpios on extcon-int3496.c commit c048c984de38d906bb0df56ec2ae90eafc123d0a Merge: 38cb266 6d61e70 Author: Sean Paul Date: Tue Jun 27 11:36:28 2017 -0400 Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next-fixes Backmerge drm-next with rc7 commit 6e5c7514e77d168da79a9ad1a430bd702ccf1659 Merge: 9c691cc c4a0bbb Author: Greg Kroah-Hartman Date: Tue Jun 27 17:35:31 2017 +0200 Merge tag 'usb-ci-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: One patch to improve error handling at chipidea core commit b1ffbf854e0887e2b828b9a3343264453662dec6 Author: Minwoo Im Date: Sat Jun 24 03:41:10 2017 +0900 libata: Support for an ATA PASS-THROUGH(32) command. SAT-4(SCSI/ATA Translation) supports for an ata pass-thru(32). This patch will allow to translate an ata pass-thru(32) SCSI cmd to an ATA cmd. Signed-off-by: Minwoo Im Reviewed-by: Bart Van Assche Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 2 +- drivers/ata/libata-scsi.c | 72 +++++++++++++++++++++++++++++++++++++++++++---- include/scsi/scsi_proto.h | 1 + 3 files changed, 69 insertions(+), 6 deletions(-) commit d4da97e59e1004aa1a15dd75469def20cd84ab99 Author: Gwendal Grignou Date: Tue Feb 14 20:58:01 2017 +0100 cros_ec: Fix deadlock when EC is not responsive at probe When the EC is not responsive at probe, we try to get basic information (protocol to use) later on through cros_xfer_cmd() call. This patch makes sure there is no deadlock when re-probing the EC by replacing call to cros_xfer_cmd() with send_command() in the function cros_ec_get_host_command_version_mask(). Also, this patch adds the function header indicating it must be called protected. Signed-off-by: Gwendal Grignou Signed-off-by: Thierry Escande Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_proto.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 0ce968f3825153d570f6d765f2c0c79bcb1f0949 Author: Shawn Lin Date: Tue Jun 27 11:53:14 2017 +0800 ahci: Add Device ID for ASMedia 1061R and 1062R Adding ASMedia 1061R and 1062R platform device IDs for SATA. Signed-off-by: Shawn Lin Signed-off-by: Tejun Heo drivers/ata/ahci.c | 2 ++ 1 file changed, 2 insertions(+) commit a27b8f31cb7929bfb8dc6ca3e6b7a0a39609d7f3 Author: Thierry Escande Date: Tue Feb 14 20:58:00 2017 +0100 cros_ec: Don't return error when checking command version With this patch, cros_ec_query_all() does not return an error if it fails to check for MKBP events support. Instead, the EC device structure indicates that it does not support MKBP events (mkbp_event_supported field) and cros_ec_query_all() returns 0. Signed-off-by: Thierry Escande Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_proto.c | 2 ++ 1 file changed, 2 insertions(+) commit 47e780848e6229b102e601deeb1ce571dc69a84a Author: Adrian Hunter Date: Fri May 26 11:17:22 2017 +0300 perf script: Add 'synth' field for synthesized event payloads Add a field to display the content the raw_data of a synthesized event. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-22-git-send-email-adrian.hunter@intel.com [ Resolved conflict with 106dacd86f04 ("perf script: Support -F brstackoff,dso") ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 6 +++++- tools/perf/builtin-script.c | 20 ++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) commit 70d110d775993ff1f63905bbdbc70e3f6bd8da8a Author: Adrian Hunter Date: Fri May 26 11:17:25 2017 +0300 perf auxtrace: Add itrace option to output power events Add itrace option to output power events. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-25-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/itrace.txt | 5 +++-- tools/perf/util/auxtrace.c | 4 ++++ tools/perf/util/auxtrace.h | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) commit 3bdafdffa9baf2b34aebad1c98bc17b50202cb78 Author: Adrian Hunter Date: Fri May 26 11:17:24 2017 +0300 perf auxtrace: Add itrace option to output ptwrite events Add itrace option to output ptwrite events. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-24-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/itrace.txt | 7 ++++--- tools/perf/util/auxtrace.c | 4 ++++ tools/perf/util/auxtrace.h | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) commit 07fda552f14830e71f0b5e8e4e31124369903aa3 Author: Adrian Hunter Date: Fri May 26 11:17:23 2017 +0300 tools include: Add byte-swapping macros to kernel.h Add byte-swapping macros to kernel.h Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-23-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/kernel.h | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit 1405720d4f2669e5ebaed192bd727aca74f64732 Author: Adrian Hunter Date: Wed Jun 21 13:17:19 2017 +0300 perf script: Add 'synth' event type for synthesized events Instruction trace decoders such as Intel PT may have additional information recorded in the trace. For example, Intel PT has power information and a there is a new instruction 'ptwrite' that can write a value into a PTWRITE trace packet. Such information may be associated with an IP and so can be treated as a sample (PERF_RECORD_SAMPLE). Custom data can be incorporated in the sample as raw_data (PERF_SAMPLE_RAW). However a means of identifying the raw data format is needed. That will be done by synthesizing an attribute for it. So add an attribute type for custom synthesized events. Different synthesized events will be identified by the attribute 'config'. Committer notes: Start those PERF_TYPE_ after the PMU range, i.e. after (INT_MAX + 1U), i.e. after perf_pmu_register() -> idr_alloc(end=0). Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1498040239-32418-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 74 +++++++++++++++++++++++++++++++++++---------- tools/perf/util/event.h | 3 ++ 2 files changed, 61 insertions(+), 16 deletions(-) commit fbb789f0d631473585d17afb120d07561d329689 Author: Steven Rostedt Date: Mon Jun 26 18:17:49 2017 -0400 sh/ftrace: Remove only user of ftrace_arch_read_dyn_info() I noticed that there's only one user of ftrace_arch_read_dyn_info(). That was used a while ago during the NMI updating in x86, and superh copied it to implement its version of handling NMIs during stop_machine(). But that is a debug feature, and this code hasn't been touched since 2009. Also, x86 no longer does the ftrace updates with stop_machine() and instead uses breakpoints. If superh needs to modify its code, it should implement the breakpoint conversion, and remove stop_machine(). Which also gets rid of the NMI issue. Anyway, I want to nuke ftrace_arch_read_dyn_info() and this gets rid of the one user, which is for an arch that shouldn't need it anymore. Link: http://lkml.kernel.org/r/20170626181749.2ce954d1@gandalf.local.home Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Steven Rostedt Signed-off-by: Steven Rostedt (VMware) arch/sh/kernel/ftrace.c | 18 ------------------ 1 file changed, 18 deletions(-) commit d5b1a5f660b8594125ea2a372286d767e756102f Author: Adrian Hunter Date: Fri May 19 10:50:30 2017 +0300 x86/insn: perf tools: Add new ptwrite instruction Add ptwrite to the op code map and the perf tools new instructions test. To run the test: $ tools/perf/perf test "x86 ins" 39: Test x86 instruction decoder - new instructions : Ok Or to see the details: $ tools/perf/perf test -v "x86 ins" 2>&1 | grep ptwrite For information about ptwrite, refer the Intel SDM. Signed-off-by: Adrian Hunter Acked-by: Masami Hiramatsu Link: http://lkml.kernel.org/r/1495180230-19367-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo arch/x86/lib/x86-opcode-map.txt | 2 +- tools/objtool/arch/x86/insn/x86-opcode-map.txt | 2 +- tools/perf/arch/x86/tests/insn-x86-dat-32.c | 12 +++++++++ tools/perf/arch/x86/tests/insn-x86-dat-64.c | 30 ++++++++++++++++++++++ tools/perf/arch/x86/tests/insn-x86-dat-src.c | 30 ++++++++++++++++++++++ .../perf/util/intel-pt-decoder/x86-opcode-map.txt | 2 +- 6 files changed, 75 insertions(+), 3 deletions(-) commit 19f0edb980a0f66ccd80b712dadb0239782f8af5 Author: Colin Ian King Date: Tue Jun 27 13:49:17 2017 +0100 perf jit: fix typo: "incalid" -> "invalid" Trivial fix to typo in jvmti_close() warnx warning message. Signed-off-by: Colin King Cc: Alexander Shishkin Cc: Dan Carpenter Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20170627124917.19151-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/jvmti/jvmti_agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fef2a735167a827a65bbdf1791abe0dd070ce372 Author: Arnaldo Carvalho de Melo Date: Tue Jun 27 11:49:13 2017 -0300 perf tools: Kill die() Finally can nuke this function, no more users. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-eivvvzn8ie6w42gy3batxoy7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr.c | 10 +++++----- tools/perf/util/usage.c | 22 ---------------------- 2 files changed, 5 insertions(+), 27 deletions(-) commit 25ce4bb8c50513e922da2709fedc9db112452fbc Author: Arnaldo Carvalho de Melo Date: Tue Jun 27 11:44:58 2017 -0300 perf config: Do not die when parsing u64 or int config values Just warn the user and ignore those values. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-tbf60nj3ierm6hrkhpothymx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-diff.c | 5 ++++- tools/perf/builtin-report.c | 7 +++---- tools/perf/util/config.c | 34 ++++++++++++++++++++++------------ tools/perf/util/config.h | 4 ++-- tools/perf/util/data-convert-bt.c | 6 ++---- tools/perf/util/help-unknown-cmd.c | 2 +- 6 files changed, 34 insertions(+), 24 deletions(-) commit 5c1954d25d1b9e857be2a4c77437312075875589 Author: Stefan Raspl Date: Sun Jun 25 21:34:16 2017 +0200 tools/kvm_stat: add new interactive command 'b' Toggle display total number of events by guest (debugfs only). When switching to display of events by guest, field filters remain active. I.e. the number of events per guest reported considers only events matching the filters. Likewise with pid/guest filtering. Note that when switching to display of events by guest, DebugfsProvider remains to collect data for events as it did before, but the read() method summarizes the values by pid. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 87 ++++++++++++++++++++++++++++++++++++----- tools/kvm/kvm_stat/kvm_stat.txt | 2 + 2 files changed, 79 insertions(+), 10 deletions(-) commit ab7ef193fab628fc5da6fd4f4672ffd0d1bb53df Author: Stefan Raspl Date: Sun Jun 25 21:34:15 2017 +0200 tools/kvm_stat: add new command line switch '-i' It might be handy to display the full history of event stats to compare the current event distribution against any available historic data. Since we have that available for debugfs, we offer a respective command line option to display what's available. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 34 ++++++++++++++++++++++++++++++---- tools/kvm/kvm_stat/kvm_stat.txt | 4 ++++ 2 files changed, 34 insertions(+), 4 deletions(-) commit 61f381bb7e1a8e9250aa32b3963a7a5c4b92cbf5 Author: Stefan Raspl Date: Sun Jun 25 21:34:14 2017 +0200 tools/kvm_stat: fix error on interactive command 'g' Fix an instance where print_all_gnames() is called without the mandatory argument, resulting in a stack trace. To reproduce, simply press 'g' in interactive mode. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a5e1852941d0d8ae98a4b5c769ec998e3708158 Author: Ladi Prosek Date: Wed Jun 21 09:07:01 2017 +0200 KVM: SVM: suppress unnecessary NMI singlestep on GIF=0 and nested exit enable_nmi_window is supposed to be a no-op if we know that we'll see a VM exit by the time the NMI window opens. This commit adds two more cases: * We intercept stgi so we don't need to singlestep on GIF=0. * We emulate nested vmexit so we don't need to singlestep when nested VM exit is required. Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a12713c25b36cbbc1a3204b2a49a72f7bc8a8847 Author: Ladi Prosek Date: Wed Jun 21 09:07:00 2017 +0200 KVM: SVM: don't NMI singlestep over event injection Singlestepping is enabled by setting the TF flag and care must be taken to not let the guest see (and reuse at an inconvenient time) the modified rflag value. One such case is event injection, as part of which flags are pushed on the stack and restored later on iret. This commit disables singlestepping when we're about to inject an event and forces an immediate exit for us to re-evaluate the NMI related state. Suggested-by: Paolo Bonzini Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9b61174793f2aae1ef5ef843ef1cdbe52c2e36e8 Author: Ladi Prosek Date: Wed Jun 21 09:06:59 2017 +0200 KVM: SVM: hide TF/RF flags used by NMI singlestep These flags are used internally by SVM so it's cleaner to not leak them to callers of svm_get_rflags. This is similar to how the TF flag is handled on KVM_GUESTDBG_SINGLESTEP by kvm_get_rflags and kvm_set_rflags. Without this change, the flags may propagate from host VMCB to nested VMCB or vice versa while singlestepping over a nested VM enter/exit, and then get stuck in inappropriate places. Example: NMI singlestepping is enabled while running L1 guest. The instruction to step over is VMRUN and nested vmrun emulation stashes rflags to hsave->save.rflags. Then if singlestepping is disabled while still in L2, TF/RF will be cleared from the nested VMCB but the next nested VM exit will restore them from hsave->save.rflags and cause an unexpected DB exception. Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit ab2f4d73ebc33487930e7adf1dd8ed671c72827c Author: Ladi Prosek Date: Wed Jun 21 09:06:58 2017 +0200 KVM: nSVM: do not forward NMI window singlestep VM exits to L1 Nested hypervisor should not see singlestep VM exits if singlestepping was enabled internally by KVM. Windows is particularly sensitive to this and known to bluescreen on unexpected VM exits. Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) commit 4aebd0e9ca3776368813239018287021002b8973 Author: Ladi Prosek Date: Wed Jun 21 09:06:57 2017 +0200 KVM: SVM: introduce disable_nmi_singlestep helper Just moving the code to a new helper in preparation for following commits. Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 62d94b00f80b0ecb7fa9eea0539c59e9f82b0fcd Author: Arnaldo Carvalho de Melo Date: Tue Jun 27 11:22:31 2017 -0300 perf tools: Replace error() with pr_err() To consolidate the error reporting facility. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-b41iot1094katoffdf19w9zk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 4 ++-- tools/perf/builtin-help.c | 8 +++++--- tools/perf/builtin-kmem.c | 4 ++-- tools/perf/builtin-record.c | 4 ++-- tools/perf/builtin-sched.c | 2 +- tools/perf/builtin-stat.c | 4 ++-- tools/perf/builtin-top.c | 2 +- tools/perf/util/config.c | 3 ++- tools/perf/util/sort.c | 22 +++++++++++----------- tools/perf/util/usage.c | 16 ---------------- tools/perf/util/util.h | 1 - 11 files changed, 28 insertions(+), 42 deletions(-) commit 12e9a6d62236dacb87a6b2dd84dd9c29bb5be1de Author: Rakesh Pandit Date: Tue Jun 27 14:55:33 2017 +0300 lightnvm: if LUNs are already allocated fix return While creating new device with NVM_DEV_CREATE if LUNs are already allocated ioctl would return -ENOMEM which is wrong. This patch propagates -EBUSY from nvm_reserve_luns which is correct response. Fixes: ade69e243 ("lightnvm: merge gennvm with core") Reviewed-by: Frans Klaver Signed-off-by: Rakesh Pandit Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 57c00f2fac512837f8de73474ec1f54020015bae Author: Christophe Jaillet Date: Wed Jun 21 07:45:53 2017 +0200 brcmfmac: Fix a memory leak in error handling path in 'brcmf_cfg80211_attach' If 'wiphy_new()' fails, we leak 'ops'. Add a new label in the error handling path to free it in such a case. Cc: stable@vger.kernel.org Fixes: 5c22fb85102a7 ("brcmfmac: add wowl gtk rekeying offload support") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dca2307ed6250e7be6993e165570fa4097903a58 Author: Arend Van Spriel Date: Sat Jun 24 22:08:27 2017 +0100 brcmfmac: fix double free upon register_netdevice() failure The function brcmf_net_attach() can only fail when register_netdevice() fails. When this happens register_netdevice() calls priv_destructor, ie. brcmf_cfg80211_free_netdev() freeing the vif instance. Also upon this failure brcmf_net_attach() calls free_netdev(). However, callers are also doing cleanup resulting in double free. In some places they need netdev private space as it holds parameters to communicate with the device. So we want to do the cleanup only in callers of brcmf_net_attach() by making the following changes: - set priv_destructor after register_netdevice() succeeds. - remove call to free_netdev() in brcmf_net_attach(). - call free_netdev() in brcmf_net_detach() for unregistered netdev. - add free_netdev() if brcmf_net_attach() fails for a created interface. Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.") Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 ++--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) commit b211d79ac1ad43d6d8d82e7f1a5c26055a249135 Author: Arnaldo Carvalho de Melo Date: Tue Jun 27 11:13:20 2017 -0300 perf tools: Remove warning() Now everything uses pr_warning(), so ditch it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-hv8r0mgdhk73wtfq3zrhavgx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/parse-events.c | 13 ------------- tools/perf/util/usage.c | 20 -------------------- tools/perf/util/util.h | 3 --- 3 files changed, 36 deletions(-) commit d2a74d53aa896046abcd152c03777209c57b12a2 Author: Arnaldo Carvalho de Melo Date: Tue Jun 27 11:08:14 2017 -0300 perf event-parse: Use pr_warning() Convert sole user of warning() in this file to pr_warning(), consolidating error reporting facilities. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-3y7yf6v673ujl2rcs34tzv8n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/trace-event-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da72ca4d4090a8ab0e6b0a23682ef42d39d7ae00 Author: QingFeng Hao Date: Wed Jun 7 11:41:19 2017 +0200 KVM: s390: Backup the guest's machine check info When a machine check happens in the guest, related mcck info (mcic, external damage code, ...) is stored in the vcpu's lowcore on the host. Then the machine check handler's low-level part is executed, followed by the high-level part. If the high-level part's execution is interrupted by a new machine check happening on the same vcpu on the host, the mcck info in the lowcore is overwritten with the new machine check's data. If the high-level part's execution is scheduled to a different cpu, the mcck info in the lowcore is uncertain. Therefore, for both cases, the further reinjection to the guest will use the wrong data. Let's backup the mcck info in the lowcore to the sie page for further reinjection, so that the right data will be used. Add new member into struct sie_page to store related machine check's info of mcic, failing storage address and external damage code. Signed-off-by: QingFeng Hao Acked-by: Christian Borntraeger Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 17 ++++++++++++++++- arch/s390/kernel/nmi.c | 34 ++++++++++++++++++++++++++++++++++ arch/s390/kvm/kvm-s390.c | 1 + 3 files changed, 51 insertions(+), 1 deletion(-) commit c929500d7a5aaea4f2eeba10816bc5341c66ae57 Author: QingFeng Hao Date: Wed Jun 7 11:30:42 2017 +0200 s390/nmi: s390: New low level handling for machine check happening in guest Add the logic to check if the machine check happens when the guest is running. If yes, set the exit reason -EINTR in the machine check's interrupt handler. Refactor s390_do_machine_check to avoid panicing the host for some kinds of machine checks which happen when guest is running. Reinject the instruction processing damage's machine checks including Delayed Access Exception instead of damaging the host if it happens in the guest because it could be caused by improper update on TLB entry or other software case and impacts the guest only. Signed-off-by: QingFeng Hao Acked-by: Martin Schwidefsky Acked-by: Heiko Carstens Acked-by: Christian Borntraeger Signed-off-by: Christian Borntraeger arch/s390/include/asm/nmi.h | 7 ++++++ arch/s390/include/asm/processor.h | 2 ++ arch/s390/kernel/asm-offsets.c | 3 +++ arch/s390/kernel/entry.S | 13 +++++++++- arch/s390/kernel/nmi.c | 50 +++++++++++++++++++++++++++++++-------- 5 files changed, 64 insertions(+), 11 deletions(-) commit 4cf134e744ba46e5893f9600487c5f7f5eae0519 Author: Arnaldo Carvalho de Melo Date: Tue Jun 27 11:03:17 2017 -0300 perf config: Use pr_warning() warning() is going away, consolidating error reporting. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-5r3636cwl4z1varo90mervai@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/config.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 59913aabb06cb13f1bb09d4726a1a00d43d6cff2 Author: Arnaldo Carvalho de Melo Date: Tue Jun 27 11:01:17 2017 -0300 perf help: Use pr_warning() Complete the switch to using te pr_{warning,error,etc} error reporting facilities. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-3l9gr6237b4aqyo0rsspixe2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-help.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86e474ff870aded90c4ffa3f488cb5c093188ca4 Author: Arnaldo Carvalho de Melo Date: Tue Jun 27 10:59:28 2017 -0300 perf help: Elliminate dup code for reporting And switch from warning() to pr_warning(), to elliminate another duplication: too many error reporting facilities. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-pkzcjrhek3uuqc4i5i9ealwd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-help.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit cd83935be8f5c28ea099ad1efa6321c737e2e12a Author: Jérémy Lefaure Date: Fri Jun 23 11:21:43 2017 +0100 ARM: 8684/1: NOMMU: Remove unused KTHREAD_SIZE definition I didn't find any use of this macro in the current kernel tree (with git grep). KTHREAD_SIZE is no longer used for a very very long time. So let's remove this definition. Signed-off-by: Jérémy Lefaure Reviewed-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/page-nommu.h | 6 ------ 1 file changed, 6 deletions(-) commit b86a496a42064e2a864bae31306e0c78eced2a3b Author: kbuild test robot Date: Thu Jun 22 23:45:23 2017 +0800 ACPI: hns_dsaf_acpi_dsm_guid can be static Signed-off-by: Fengguang Wu Reviewed-by: Andy Shevchenko Signed-off-by: Christoph Hellwig drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 881c362d34ef76600b859e3a034d4155139bad2c Author: Arnaldo Carvalho de Melo Date: Tue Jun 27 10:52:57 2017 -0300 perf help: Introduce exec_failed() to avoid code duplication The warning(str_error_r(errno)) pattern can be replaced with a function, do it. And while at it use pr_warning(), we have way too many error reporting facilities, time to drop some, starting with the one we got from the git sources. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-lbak5npj1ri1uuvf1en3c0p0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-help.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 525df86145bf731af522ba9b3982c5b48078b81a Author: Paolo Bonzini Date: Tue Jun 27 15:45:09 2017 +0200 KVM: explain missing kvm_put_kvm in case of failure The call to kvm_put_kvm was removed from error handling in commit 506cfba9e726 ("KVM: don't use anon_inode_getfd() before possible failures"), but it is _not_ a memory leak. Reuse Al's explanation to avoid that someone else makes the same mistake. Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 039c5d1b2c5f249f5a291215eb5f0eb0afd54f81 Author: Roman Storozhenko Date: Tue Jun 27 12:51:18 2017 +0300 KVM: Replaces symbolic permissions with numeric Replaces "S_IRUGO | S_IWUSR" with 0644. The reason is that symbolic permissions considered harmful: https://lwn.net/Articles/696229/ Signed-off-by: Roman Storozhenko Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 164f16f7021406795729916e100c7edd53ae954f Author: Ilan Tayari Date: Thu Jun 22 12:01:17 2017 +0300 net/mlx5e: IPSec, Add IPSec ethtool stats Add Innova IPSec SBU counters to the ethtool -S stats. Add IPSec offload error counters to the ethtool -S stats. Signed-off-by: Ilan Tayari Reviewed-by: Boris Pismenny Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 +- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 43 +++++++ .../mellanox/mlx5/core/en_accel/ipsec_stats.c | 133 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +- 5 files changed, 190 insertions(+), 3 deletions(-) commit 2ac9cfe78223bb88be8cff3b59e0e13551b4e29c Author: Ilan Tayari Date: Tue Apr 18 16:08:23 2017 +0300 net/mlx5e: IPSec, Add Innova IPSec offload TX data path In the TX data path, prepend a special metadata ethertype which instructs the hardware to perform cryptography. In addition, fill Software-Parser segment in TX descriptor so that the hardware may parse the ESP protocol, and perform TX checksum offload on the inner payload. Support GSO, by providing the inverse of gso_size in the metadata. This allows the FPGA to update the ESP header (seqno and seqiv) on the resulting packets, by calculating the packet number within the GSO back from the TCP sequence number. Note that for GSO SKBs, the stack does not include an ESP trailer, unlike the non-GSO case. Signed-off-by: Ilan Tayari Signed-off-by: Yossi Kuperman Signed-off-by: Yevgeny Kliteynik Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 27 +++ .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 10 + .../mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 243 +++++++++++++++++++++ .../mellanox/mlx5/core/en_accel/ipsec_rxtx.h | 13 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 25 ++- 7 files changed, 319 insertions(+), 9 deletions(-) commit 899a59d301bc0ccd312dd23d58899cfbbc94bead Author: Ilan Tayari Date: Mon Jun 19 14:04:36 2017 +0300 net/mlx5e: IPSec, Add Innova IPSec offload RX data path In RX data path, the hardware prepends a special metadata ethertype which indicates that the packet underwent decryption, and the result of the authentication check. Communicate this to the stack in skb->sp. Make wqe_size large enough to account for the injected metadata. Support only Linked-list RQ type. IPSec offload RX packets may have useful CHECKSUM_COMPLETE information, which the stack may not be able to use yet. Signed-off-by: Ilan Tayari Signed-off-by: Yossi Kuperman Signed-off-by: Yevgeny Kliteynik Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 19 +++ .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 9 ++ .../mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 135 +++++++++++++++++++++ .../mellanox/mlx5/core/en_accel/ipsec_rxtx.h | 44 +++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 22 +++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 41 +++++++ 7 files changed, 269 insertions(+), 3 deletions(-) commit 547eede070eb981f1442e494f08f4567dcf1d1c7 Author: Ilan Tayari Date: Tue Apr 18 16:04:28 2017 +0300 net/mlx5e: IPSec, Innova IPSec offload infrastructure Add Innova IPSec ESP crypto offload configuration paths. Detect Innova IPSec device and set the NETIF_F_HW_ESP flag. Configure Security Associations using the API introduced in a previous patch. Add Software-parser hardware descriptor layout Software-Parser (swp) is a hardware feature in ConnectX which allows the host software to specify protocol header offsets in the TX path, thus overriding the hardware parser. This is useful for protocols that the ASIC may not be able to parse on its own. Note that due to inline metadata, XDP is not supported in Innova IPSec. Signed-off-by: Ilan Tayari Signed-off-by: Yossi Kuperman Signed-off-by: Yevgeny Kliteynik Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed MAINTAINERS | 10 + drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 12 + drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 + drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 + .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 415 +++++++++++++++++++++ .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 78 ++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 14 + include/linux/mlx5/mlx5_ifc.h | 8 +- include/linux/mlx5/qp.h | 14 +- 9 files changed, 552 insertions(+), 4 deletions(-) commit bebb23e6cb02d2fc752905e39d09ff6152852c6c Author: Ilan Tayari Date: Tue Apr 25 22:42:31 2017 +0300 net/mlx5: Accel, Add IPSec acceleration interface Add routines for manipulating the hardware IPSec SA database (SADB). In Innova IPSec, a Security Association (SA) is added or deleted via a command message over the SBU connection. The HW then sends a response message over the same connection. Add implementation for Innova IPSec (FPGA-based) hardware. These routines will be used by the IPSec offload support in a later patch However they may also be used by others such as RDMA and RoCE IPSec. mlx5/accel is a middle acceleration layer to allow mlx5e and other ULPs to work directly with mlx5_core rather than Innova FPGA or other mlx5 acceleration providers. In this patchset we add Innova IPSec support and mlx5/accel delegates IPSec offloads to Innova routines. In the future, when IPSec/TLS or any other acceleration gets integrated into ConnectX chip, mlx5/accel layer will provide the integrated acceleration, rather than the Innova one. Signed-off-by: Ilan Tayari Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 4 + drivers/net/ethernet/mellanox/mlx5/core/Makefile | 5 +- .../net/ethernet/mellanox/mlx5/core/accel/ipsec.c | 78 +++++ .../net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 138 ++++++++ .../net/ethernet/mellanox/mlx5/core/fpga/core.h | 2 + .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 376 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.h | 94 ++++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 9 + include/linux/mlx5/mlx5_ifc_fpga.h | 67 ++++ 9 files changed, 772 insertions(+), 1 deletion(-) commit a9956d35d199beb406727a4496bc5d7f09c82976 Author: Ilan Tayari Date: Tue Apr 18 13:10:41 2017 +0300 net/mlx5: FPGA, Add SBU infrastructure Add interface to initialize and interact with Innova FPGA SBU connections. A client driver may use these functions to set up a high-speed DMA connection with its SBU hardware logic, and send/receive messages over this connection. A later patch in this patchset will make use of these functions for Innova IPSec offload in mlx5 Ethernet driver. Add commands to retrieve Innova FPGA SBU capabilities, and to read/write Innova FPGA configuration space registers and memory, over internal I2C. At high level, the FPGA configuration space is divided such: 0x00000000 - 0x007fffff is reserved for the SBU 0x00800000 - 0xffffffff is reserved for the Shell 0x400000000 - ... is DDR memory A later patchset will add support for accessing FPGA CrSpace and memory over a high-speed connection. This is the reason for the ACCESS_TYPE enumeration, which currently only supports I2C. Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 65 ++++++++ drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.h | 3 + drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.c | 164 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h | 98 ++++++++++++ include/linux/mlx5/device.h | 3 + include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx5_ifc.h | 1 + include/linux/mlx5/mlx5_ifc_fpga.h | 13 ++ 9 files changed, 349 insertions(+), 1 deletion(-) commit c43051d72a8dc4a00d49db27292a76d26e8df7af Author: Ilan Tayari Date: Tue Apr 18 12:54:27 2017 +0300 net/mlx5: FPGA, Add SBU bypass and reset flows The Innova FPGA includes shell hardware and Sandbox-Unit (SBU) hardware. The shell hardware is handled by mlx5_core itself, while the SBU is handled by a client driver. Reset the SBU to a well-known initial state when initializing a new device, and set the FPGA to bypass mode when uninitializing a device. This allows the client driver to assume that its device has been reset when a new device is detected. During SBU reset, the FPGA is put into SBU-bypass mode. In this mode packets do not pass through the SBU, so it cannot affect the network data stream at all. A factory-image does not have an SBU, so skip these flows. Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 11 ++++++ drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.h | 1 + .../net/ethernet/mellanox/mlx5/core/fpga/core.c | 40 ++++++++++++++++++++++ include/linux/mlx5/mlx5_ifc_fpga.h | 9 +++++ 4 files changed, 61 insertions(+) commit 537a50574175a2b68b0612ffb48cb044a394c7b4 Author: Ilan Tayari Date: Mon Mar 27 14:48:38 2017 +0300 net/mlx5: FPGA, Add high-speed connection routines An FPGA high-speed connection has two endpoints, an FPGA QP and a ConnectX QP. Add library routines to create and connect the endpoints of an FPGA high-speed connection. These routines allow creating and interacting with both types of connections: Shell and Sandbox Unit (SBU). Shell connection provides an interface to the FPGA's address space, which includes the configuration space and the DDR. Use of the shell connection will be introduced in a later patchset. SBU connection provides a command and/or data interface to the application-specific logic within the FPGA. Use of the SBU connection will be introduced in a later patch in this patchset. Some struct definitions are added to a new header file sdk.h, which will be extended in later patches in the patchset. This header file will contain the in-kernel FPGA client driver API. Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/fpga/conn.c | 1042 ++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/fpga/conn.h | 96 ++ .../net/ethernet/mellanox/mlx5/core/fpga/core.c | 12 + .../net/ethernet/mellanox/mlx5/core/fpga/core.h | 7 + drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h | 106 ++ 6 files changed, 1264 insertions(+), 1 deletion(-) commit 6062118d5cd2b90369278cdf831aeffb84ae3943 Author: Ilan Tayari Date: Mon Mar 27 14:52:09 2017 +0300 net/mlx5: FPGA, Add FW commands for FPGA QPs The FPGA QP is a high-bandwidth communication channel between the host CPU and the FPGA device. It allows performing DMA operations between host memory and the FPGA logic via the ConnectX chip. Add ConnectX FW commands which create and manipulate FPGA QPs. Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 10 ++ drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 98 ++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.h | 21 +++ include/linux/mlx5/mlx5_ifc.h | 5 + include/linux/mlx5/mlx5_ifc_fpga.h | 199 +++++++++++++++++++++ 5 files changed, 333 insertions(+) commit 9410733c44d768b085af3877ccf63efa298168e9 Author: Ilan Tayari Date: Wed Jun 14 10:19:54 2017 +0300 net/mlx5: FPGA, Move FPGA init/cleanup to init_once The FPGA init and cleanup routines should be called just once per device. Move them to the init_once and cleanup_once routines. Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/fpga/core.h | 8 ++++---- drivers/net/ethernet/mellanox/mlx5/core/main.c | 21 ++++++++++----------- 3 files changed, 16 insertions(+), 17 deletions(-) commit 3f2b7edd7cf59c1ec886bd478b88cfb5d809040b Author: Ilan Tayari Date: Sun Mar 26 17:46:03 2017 +0300 net/mlx5: Add QP WQ support A QP in ConnectX is a concatenation of RQ and SQ which share a QP-number and work together. Add support for allocating and managing the work-queue buffer for a QP, in a similar way to how SQs and RQs are already supported. Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/wq.c | 46 ++++++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/wq.h | 10 ++++++ 2 files changed, 56 insertions(+) commit 4b67379376b3674c069477aa48fe8923f735247e Author: Ilan Tayari Date: Mon Jun 19 12:53:25 2017 +0300 net/mlx5: Make get_cqe routine not ethernet-specific Move mlx5e_get_cqe routine to wq.h and rename it to mlx5_cqwq_get_cqe. This allows it to be used by other CQ users outside of the ethernet driver code. A later patch in this patchset will make use of it from FPGA code for the FPGA high-speed connection. Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 19 +------------------ drivers/net/ethernet/mellanox/mlx5/core/wq.h | 17 +++++++++++++++++ 5 files changed, 21 insertions(+), 22 deletions(-) commit 095b0927f0ce74f7211b9046f8493dbba26ca930 Author: Ilan Tayari Date: Sun May 14 16:04:30 2017 +0300 IB/mlx5: Respect mlx5_core reserved GIDs Reserved gids are taken by the mlx5_core, report smaller GID table size to IB core. Set mlx5_query_roce_port's return value back to int. In case of error, return an indication. This rolls back some of the change in commit 50f22fd8ecf9 ("IB/mlx5: Set mlx5_query_roce_port's return value to void") Change set_roce_addr to use gid_set function, instead of directly sending the command. Signed-off-by: Ilan Tayari Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 119 +++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 66 deletions(-) commit a6f7d2aff623bb7572d4bca1caf5820e0cd5a586 Author: Ilan Tayari Date: Sun Mar 26 17:23:42 2017 +0300 net/mlx5: Add support for multiple RoCE enable Previously, only mlx5_ib enabled RoCE on the port, but FPGA needs it as well. Add support for counting number of enables, so that FPGA and IB can work in parallel and independently. Program the HW to enable RoCE on the first enable call, and program to disable RoCE on the last disable call. Signed-off-by: Ilan Tayari Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/vport.c | 4 ++++ include/linux/mlx5/driver.h | 1 + 2 files changed, 5 insertions(+) commit 52ec462eca9b87b8036209483efe1c6cf9c49d9a Author: Ilan Tayari Date: Sun Mar 26 17:01:57 2017 +0300 net/mlx5: Add reserved-gids support Reserved GIDs are entries in the GID table in use by the mlx5_core and its submodules (e.g. FPGA, SRIOV, E-Swtich, netdev). The entries are reserved at the high indexes of the GID table. A mlx5 submodule may reserve a certain amount of GIDs for its own use during the load sequence by calling mlx5_core_reserve_gids, and must also take care to un-reserve these GIDs when it closes. Reservation is only allowed during the load sequence and before any interfaces (e.g. mlx5_ib or mlx5_en) are up. After reservation, a submodule may call mlx5_core_reserved_gid_alloc/ free to allocate entries from the reserved GIDs pool. Reserve a GID table entry for every supported FPGA QP. A later patch in the patchset will remove them from being reported to IB core. Another such patch will make use of these for FPGA QPs in Innova NIC. Added lib/mlx5.h to serve as a library for mlx5 submodlues, and to expose only public mlx5 API, more mlx5 library files will be added in future submissions. Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/fpga/core.c | 31 ++++- .../net/ethernet/mellanox/mlx5/core/fpga/core.h | 5 + drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c | 154 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h | 43 ++++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 11 +- include/linux/mlx5/driver.h | 17 +++ 7 files changed, 260 insertions(+), 3 deletions(-) commit 9ade8c7c3c6feb2c477bc20b3458b5edbcf4a87e Author: Ilan Tayari Date: Thu May 25 08:42:07 2017 +0300 net/mlx5: Set interface flags before cleanup in unload_one In load_one, the interface flags are changed from down to up, only after initializing the interfaces. In unload_one, the flags are changed from up to down before the interface cleanup. Change the cleanup order to be opposite to initialization order. This fixes flag consistency between init and cleanup. Signed-off-by: Ilan Tayari Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 59baa24d8710add3689124fb2a232bac2decae9a Author: Krzysztof Kozlowski Date: Thu Jun 8 18:10:13 2017 +0200 MIPS: defconfig: Cleanup from old Kconfig options Remove old, dead Kconfig options (in order appearing in this commit): - EXPERIMENTAL is gone since v3.9; - INET_LRO: commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"); - MTD_CONCAT: commit f53fdebcc3e1 ("mtd: drop MTD_CONCAT from Kconfig entirely"); - MTD_CHAR: commit 660685d9d1b4 ("mtd: merge mtdchar module with mtdcore"); - NETDEV_1000 and NETDEV_10000: commit f860b0522f65 ("drivers/net: Kconfig and Makefile cleanup"); NET_ETHERNET should be replaced with just ETHERNET but that is separate change; - MISC_DEVICES: commit 7c5763b8453a ("drivers: misc: Remove MISC_DEVICES config option"); - HID_SUPPORT: commit 1f41a6a99476 ("HID: Fix the generic Kconfig options"); - BT_L2CAP and BT_SCO: commit f1e91e1640d8 ("Bluetooth: Always compile SCO and L2CAP in Bluetooth Core"); - DEBUG_ERRORS: commit b025a3f836d1 ("ARM: 6876/1: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS"); - USB_DEVICE_CLASS: commit 007bab91324e ("USB: remove CONFIG_USB_DEVICE_CLASS"); - RCU_CPU_STALL_DETECTOR: commit a00e0d714fbd ("rcu: Remove conditional compilation for RCU CPU stall warnings"); - IP_NF_QUEUE: commit 3dd6664fac7e ("netfilter: remove unused "config IP_NF_QUEUE""); - IP_NF_TARGET_ULOG: commit d4da843e6fad ("netfilter: kill remnants of ulog targets"); - IP6_NF_QUEUE: commit d16cf20e2f2f ("netfilter: remove ip_queue support"); - IP6_NF_TARGET_LOG: commit 6939c33a757b ("netfilter: merge ipt_LOG and ip6_LOG into xt_LOG"); - USB_LED: commit a335aaf3125c ("usb: misc: remove outdated USB LED driver"); - MMC_UNSAFE_RESUME: commit 2501c9179dff ("mmc: core: Use MMC_UNSAFE_RESUME as default behavior"); - AUTOFS_FS: commit 561c5cf9236a ("staging: Remove autofs3"); - VIDEO_OUTPUT_CONTROL: commit f167a64e9d67 ("video / output: Drop display output class support"); - USB_LIBUSUAL: commit f61870ee6f8c ("usb: remove libusual"); - CRYPTO_ZLIB: 110492183c4b ("crypto: compress - remove unused pcomp interface"); - BLK_DEV_UB: commit 68a5059ecf82 ("block: remove the deprecated ub driver"); Signed-off-by: Krzysztof Kozlowski Cc: Arnd Bergmann Cc: Florian Fainelli Cc: linux-kernel@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-mips@linux-mips.org Cc: linux-arm-kernel@lists.infradead.org Patchwork: https://patchwork.linux-mips.org/patch/16342/ Signed-off-by: Ralf Baechle arch/mips/configs/ar7_defconfig | 6 ------ arch/mips/configs/ath79_defconfig | 2 -- arch/mips/configs/bcm63xx_defconfig | 7 ------- arch/mips/configs/bigsur_defconfig | 4 ---- arch/mips/configs/bmips_be_defconfig | 1 - arch/mips/configs/capcella_defconfig | 4 ---- arch/mips/configs/cavium_octeon_defconfig | 1 - arch/mips/configs/ci20_defconfig | 1 - arch/mips/configs/cobalt_defconfig | 8 -------- arch/mips/configs/decstation_defconfig | 1 - arch/mips/configs/e55_defconfig | 2 -- arch/mips/configs/fuloong2e_defconfig | 11 ----------- arch/mips/configs/gpr_defconfig | 8 -------- arch/mips/configs/ip22_defconfig | 11 ----------- arch/mips/configs/ip27_defconfig | 5 ----- arch/mips/configs/ip28_defconfig | 5 ----- arch/mips/configs/ip32_defconfig | 8 -------- arch/mips/configs/jazz_defconfig | 6 ------ arch/mips/configs/jmr3927_defconfig | 7 ------- arch/mips/configs/lasat_defconfig | 5 ----- arch/mips/configs/lemote2f_defconfig | 12 ------------ arch/mips/configs/loongson3_defconfig | 3 --- arch/mips/configs/malta_kvm_defconfig | 1 - arch/mips/configs/malta_kvm_guest_defconfig | 1 - arch/mips/configs/malta_qemu_32r6_defconfig | 1 - arch/mips/configs/maltaaprp_defconfig | 2 -- arch/mips/configs/maltasmvp_defconfig | 1 - arch/mips/configs/maltasmvp_eva_defconfig | 2 -- arch/mips/configs/maltaup_defconfig | 2 -- arch/mips/configs/markeins_defconfig | 4 ---- arch/mips/configs/mips_paravirt_defconfig | 1 - arch/mips/configs/mpc30x_defconfig | 5 ----- arch/mips/configs/msp71xx_defconfig | 2 -- arch/mips/configs/mtx1_defconfig | 11 ----------- arch/mips/configs/nlm_xlp_defconfig | 5 ----- arch/mips/configs/nlm_xlr_defconfig | 9 --------- arch/mips/configs/pnx8335_stb225_defconfig | 7 ------- arch/mips/configs/qi_lb60_defconfig | 3 --- arch/mips/configs/rb532_defconfig | 6 ------ arch/mips/configs/rbtx49xx_defconfig | 7 ------- arch/mips/configs/rm200_defconfig | 8 -------- arch/mips/configs/rt305x_defconfig | 2 -- arch/mips/configs/sb1250_swarm_defconfig | 1 - arch/mips/configs/tb0219_defconfig | 6 ------ arch/mips/configs/tb0226_defconfig | 7 ------- arch/mips/configs/tb0287_defconfig | 5 ----- arch/mips/configs/workpad_defconfig | 4 ---- 47 files changed, 221 deletions(-) commit 12597988319c8943531c7b2183580231b08b7471 Author: Matt Redfearn Date: Mon May 15 10:46:35 2017 +0100 MIPS: Sort MIPS Kconfig Alphabetically. Sort the entries in config MIPS alphabetically so as to make entries easier to find. Signed-off-by: Matt Redfearn Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16068/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 98 +++++++++++++++++++++++++++---------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) commit b602aa8eb1a0f52f0f9a09728b3b1c9133136656 Author: Takashi Iwai Date: Tue Jun 27 11:54:37 2017 +0200 ALSA: pcm: Disable only control mmap for explicit appl_ptr sync Now that user-space (typically alsa-lib) can specify which protocol version it supports, we can optimize the kernel code depending on the reported protocol version. In this patch, we change the previous hack for enforcing the appl_ptr sync by disabling status/control mmap. Instead of forcibly disabling both mmaps, we disable only the control mmap when user-space declares the supported protocol version new enough. For older user-space, still both PCM status and control mmaps are disabled when requested by the driver due to the compatibility reason. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 4b671f57747468d7c810caaf955f79ff1aece4d4 Author: Takashi Iwai Date: Mon Jun 19 23:11:54 2017 +0200 ALSA: pcm: Add an ioctl to specify the supported protocol version We have an ioctl to inform the PCM protocol version the running kernel supports, but there is no way to know which protocol version the user-space can understand. This lack of information caused headaches in the past when we tried to extend the ABI. For example, because we couldn't guarantee the validity of the reserved bytes, we had to introduce a new ioctl SNDRV_PCM_IOCTL_STATUS_EXT for assigning a few new fields in the formerly reserved bits. If we could know that it's a new alsa-lib, we could assume the availability of the new fields, thus we could have reused the existing SNDRV_PCM_IOCTL_STATUS. In order to improve the ABI extensibility, this patch adds a new ioctl for user-space to inform its supporting protocol version to the kernel. By reporting the supported protocol from user-space, the kernel can judge which feature should be provided and which not. With the addition of the new ioctl, the PCM protocol version is bumped to 2.0.14, too. User-space checks the kernel protocol version via SNDRV_PCM_INFO_PVERSION, then it sets the supported version back via SNDRV_PCM_INFO_USER_PVERSION. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/pcm.h | 1 + include/uapi/sound/asound.h | 3 ++- sound/core/pcm_compat.c | 1 + sound/core/pcm_native.c | 7 +++++++ 4 files changed, 11 insertions(+), 1 deletion(-) commit 8ff93de7668bd81bc8efa819d1184ebd48fae72d Author: Gal Pressman Date: Sun Jun 25 16:46:25 2017 +0300 net/mlx5e: Fix TX carrier errors report in get stats ndo Symbol error during carrier counter from PPCNT was mistakenly reported as TX carrier errors in get_stats ndo, although it's an RX counter. Fixes: 269e6b3af3bf ("net/mlx5e: Report additional error statistics in get stats ndo") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 -- 1 file changed, 2 deletions(-) commit 2a0165a034ac024b60cca49c61e46f4afa2e4d98 Author: Mohamad Haj Yahia Date: Thu Mar 30 17:09:00 2017 +0300 net/mlx5: Cancel delayed recovery work when unloading the driver Draining the health workqueue will ignore future health works including the one that report hardware failure and thus we can't enter error state Instead cancel the recovery flow and make sure only recovery flow won't be scheduled. Fixes: 5e44fca50470 ('net/mlx5: Only cancel recovery work when cleaning up device') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 15 ++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- include/linux/mlx5/driver.h | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) commit 8ce59b16b4b6eacedaec1f7b652b4781cdbfe15f Author: Gal Pressman Date: Mon Jun 19 18:25:59 2017 +0300 net/mlx5: Fix driver load error flow when firmware is stuck When wait for firmware init fails, previous code would mistakenly return success and cause inconsistency in the driver state. Fixes: 6c780a0267b8 ("net/mlx5: Wait for FW readiness before initializing command interface") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5b816786f7687a2ec0f485a1138b009d2020352 Merge: 9902747 8c3ecd6 Author: Thomas Gleixner Date: Tue Jun 27 12:29:32 2017 +0200 Merge branch 'clockevents/4.13' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevents updates from Daniel Lezcano: - Made the tcb_clksrc endianess agnostic as the AVR32 support is gone (Alexandre Belloni) - Unmap io region on failure at init time in the fsl_ftm_timer (Arvind Yadav) - Fix a bad return value for the mips-gic-timer at init time (Christophe Jaillet) - Fix invalid iomap check and switch the sun4i timer to use the common timer init routine (Daniel Lezcano) commit 5ac5895a84d92bd2b3db490f8ee242ccb4d77e96 Author: yt.shen@mediatek.com Date: Fri Jun 16 22:02:16 2017 +0800 drm/mediatek: separate color module to fixup error memory reallocation Previous patch (c5f228ef6c drm/mediatek: add *driver_data for different hardware settings) calls devm_kfree() and then devm_kzalloc() to reallocate color module data structure. But this reallocation cannnot guarantee the new address is unchanged, but the caller will use the old address, which is wrong. Fix it by separate color module from general components, this patch separate color module to independent files, like mtk_disp_ovl.c and mtk_disp_rdma.c do Fixes: c5f228ef6ccd ("drm/mediatek: add *driver_data for different hardware settings") Signed-off-by: YT Shen Tested-by: Bibby Hsieh Signed-off-by: CK Hu drivers/gpu/drm/mediatek/Makefile | 3 +- drivers/gpu/drm/mediatek/mtk_disp_color.c | 176 ++++++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 80 +------------ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 6 +- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 + 5 files changed, 185 insertions(+), 81 deletions(-) commit 4a3bfb5c24306aa129c0de32e5d1ffb553a60a7c Author: Christophe Jaillet Date: Fri Jun 9 21:27:12 2017 +0200 drm/mediatek: check for memory allocation failure If 'devm_kmalloc_array' returns NULL, we should return -ENOMEM as already done a few lines above instead of deferencing a NULL pointer a few lines below. Signed-off-by: Christophe JAILLET Reviewed-by: Matthias Brugger Signed-off-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 ++ 1 file changed, 2 insertions(+) commit afd89636f1846ec2c340de894dac103cd336fcee Author: Colin Ian King Date: Tue Apr 11 14:44:19 2017 +0100 drm/mediatek: re-phrase DRM_INFO error message The current message contains a spelling mistake and is not easily parsable. Re-phrase it to be more understandable. Signed-off-by: Colin Ian King Signed-off-by: CK Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 446b8c542f8551b368dab1ff3539beb3aedb5928 Author: Philipp Zabel Date: Fri Mar 17 18:00:23 2017 +0100 drm/mediatek: use platform_register_drivers Use platform_register_drivers instead of open coding the iteration over component platform drivers in the mtk_drm_drv and mtk_hdmi modules. Signed-off-by: Philipp Zabel Signed-off-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_drv.c | 27 ++++----------------------- drivers/gpu/drm/mediatek/mtk_hdmi.c | 27 ++++----------------------- 2 files changed, 8 insertions(+), 46 deletions(-) commit 170748db2deb2dedcb405ae091dbc74a478842e5 Author: Bibby Hsieh Date: Tue Jan 24 12:40:58 2017 +0800 drm/mediatek: Support UYVY and YUYV format for overlay MT8173 overlay can support UYVY and YUYV format, we add the format in DRM driver. Signed-off-by: Bibby Hsieh Reviewed-by: Daniel Kurtz Signed-off-by: CK Hu drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 +++++++ drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 ++ 2 files changed, 9 insertions(+) commit 75e64ff2c2f5ce1ae5b47b2f372fe5b9dc99f5a9 Author: Xiong Zhang Date: Wed Jun 28 02:03:16 2017 +0800 drm/i915/gvt: Don't read ADPA_CRT_HOTPLUG_MONITOR from host When host connects a crt screen, linux guest will detect two screens: crt and dp. This is wrong as linux guest has only one dp. In order to avoid guest get host crt screen, we should set ADPA_CRT_HOTPLUG_MONITOR to none. But MMIO_RO(PCH_ADPA) prevent from that. So MMIO_DH should be used instead of MMIO_RO. v2: Clear its staus to none at initialize, so guest don't get host crt.(Zhangyu) v3: SKL doesn't have this register, limit it to pre_skl.(xiong) Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 4 ++++ drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 295a0d0b55269fce2290a7aebfcc8c2525866c33 Author: Xiong Zhang Date: Tue Jun 20 11:37:22 2017 +0800 drm/i915/gvt: Set initial PORT_CLK_SEL vreg for BDW On BDW, when host physical screen and guest virtual screen aren't on the same DDI port, guest i915 driver prints the following error and stop running. [ 6.775873] BUG: unable to handle kernel NULL pointer dereference at 0000000000000068 [ 6.775928] IP: intel_ddi_clock_get+0x81/0x430 [i915] [ 6.776206] Call Trace: [ 6.776233] ? vgpu_read32+0x4f/0x100 [i915] [ 6.776264] intel_ddi_get_config+0x11c/0x230 [i915] [ 6.776298] intel_modeset_setup_hw_state+0x313/0xd40 [i915] [ 6.776334] intel_modeset_init+0xe49/0x18d0 [i915] [ 6.776368] ? vgpu_write32+0x53/0x100 [i915] [ 6.776731] ? intel_i2c_reset+0x42/0x50 [i915] [ 6.777085] ? intel_setup_gmbus+0x32a/0x350 [i915] [ 6.777427] i915_driver_load+0xabc/0x14d0 [i915] [ 6.777768] i915_pci_probe+0x4f/0x70 [i915] The null pointer is guest intel_crtc_state->shared_dpll which is setted in haswell_get_ddi_pll(). When guest and host screen are on different DDI port, host driver won't set PORT_CLK_SET(guest_port), so haswell_get_ddi_pll() will return null and don't set pipe_config->shared_dpll, once the following program refernce this structure, it will print the above error. This patch set the initial val of guest PORT_CLK_SEL(guest_port) to LCPLL_810. And guest i915 driver will reset this value according to guest screen mode. Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 8c3ecd60e2ee6268e1735952e5b544f05b4dbb5a Author: Christophe Jaillet Date: Fri Jun 23 21:55:10 2017 +0200 clocksource/drivers/mips-gic-timer: Fix an error code in 'gic_clocksource_of_init()' 'clk' is a valid pointer at this point. So calling PTR_ERR on it is pointess. Return the error code from 'clk_prepare_enable()' if it fails instead. Signed-off-by: Christophe JAILLET Signed-off-by: Daniel Lezcano drivers/clocksource/mips-gic-timer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b70957f656cc070eaaac60b00dca5b40967cb8d6 Author: Arvind Yadav Date: Tue Jun 20 16:33:30 2017 +0530 clocksource/drivers/fsl_ftm_timer: Unmap region obtained by of_iomap In case of error at init time, rollback iomapping. Signed-off-by: Arvind Yadav Signed-off-by: Daniel Lezcano drivers/clocksource/fsl_ftm_timer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6ec8be251fb445dcc43086a485fec1b2708c09da Author: Alexandre Belloni Date: Fri Jun 23 17:03:31 2017 +0200 clocksource/drivers/tcb_clksrc: Make IO endian agnostic Now that AVR32 is gone, we can use the proper IO accessors that are correctly handling endianness. Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: Daniel Lezcano drivers/clocksource/tcb_clksrc.c | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit 75a5f3ac5c861e969e2379816709d55f1cb5e9f4 Author: Colin Ian King Date: Mon Jun 26 20:35:38 2017 +0100 HID: wacom: fix mistake in printk trivial fix to spelling mistake in hid_warn warning message Signed-off-by: Colin Ian King Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8a21ff775f5654eb078ae57ba64cdbd32b9297c4 Author: Okash Khawaja Date: Sun Jun 25 19:40:02 2017 +0100 staging: speakup: make ttyio synths use device name This patch introduces new module parameter, dev, which takes a string representing the device that the external synth is connected to, e.g. ttyS0, ttyUSB0 etc. This is then used to communicate with the synth. That way, speakup can support more than ttyS*. As of this patch, it only supports ttyS*, ttyUSB* and selected synths for lp*. dev parameter is only available for tty-migrated synths. Users will either use dev or ser as both serve same purpose. This patch maintains backward compatility by allowing ser to be specified. When both are specified, whichever is non-default, i.e. not ttyS0, is used. If both are non-default then dev is used. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_acntsa.c | 3 +++ drivers/staging/speakup/speakup_apollo.c | 3 +++ drivers/staging/speakup/speakup_audptr.c | 3 +++ drivers/staging/speakup/speakup_bns.c | 3 +++ drivers/staging/speakup/speakup_decext.c | 3 +++ drivers/staging/speakup/speakup_dectlk.c | 3 +++ drivers/staging/speakup/speakup_dummy.c | 3 +++ drivers/staging/speakup/speakup_ltlk.c | 3 +++ drivers/staging/speakup/speakup_spkout.c | 3 +++ drivers/staging/speakup/speakup_txprt.c | 3 +++ drivers/staging/speakup/spk_ttyio.c | 15 +++++++-------- 11 files changed, 37 insertions(+), 8 deletions(-) commit a5525dc0b8341cfa2d6c8bfe2796168a0ce83dfd Author: Okash Khawaja Date: Sun Jun 25 19:40:01 2017 +0100 staging: speakup: check and convert dev name or ser to dev_t This patch adds functionality to validate and convert either a device name or 'ser' memmber of synth into dev_t. Subsequent patch in this set will call it to convert user-specified device into device number. For device name, this patch does some basic sanity checks on the string passed in. It currently supports ttyS*, ttyUSB* and, for selected synths, lp*. The patch also introduces a string member variable named 'dev_name' to struct spk_synth. 'dev_name' represents the device name - ttyUSB0 etc - which needs conversion to dev_t. Signed-off-by: Okash Khawaja Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_priv.h | 2 ++ drivers/staging/speakup/spk_ttyio.c | 42 +++++++++++++++++++++++++++++++++++++ drivers/staging/speakup/spk_types.h | 1 + 3 files changed, 45 insertions(+) commit fc61ed51270e86440cf7cf84cbe1d86753592932 Author: Okash Khawaja Date: Sun Jun 25 19:40:00 2017 +0100 tty: add function to convert device name to number The function converts strings like ttyS0 and ttyUSB0 to dev_t like (4, 64) and (188, 0). It does this by scanning tty_drivers list for corresponding device name and index. If the driver is not registered, this function returns -ENODEV. It also acquires tty_mutex. Signed-off-by: Okash Khawaja Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/tty.h | 3 +++ 2 files changed, 53 insertions(+) commit 1fa67c675f6477ceb670f087a6f6739f7b3cb099 Author: Gregory CLEMENT Date: Wed May 17 11:06:35 2017 +0200 gpio: dt-bindings: Add documentation for gpio controllers on Armada 7K/8K Document the device tree binding for the gpio controllers found on the Marvell Armada 7K and Armada 8K SoCs. Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../arm/marvell/ap806-system-controller.txt | 20 ++++++++++++++++++ .../arm/marvell/cp110-system-controller0.txt | 24 +++++++++++++++++++++- .../devicetree/bindings/gpio/gpio-mvebu.txt | 24 +++++++++++++++------- 3 files changed, 60 insertions(+), 8 deletions(-) commit fa1b85914dfb1cf82edcc1fd5a1fa9d22e8c97e3 Author: Bjorn Andersson Date: Sun Jun 25 15:05:15 2017 -0700 rpmsg: Don't overwrite release op of rpdev b0b03b811963 ("rpmsg: Release rpmsg devices in backends") attempted to correct the ownership of freeing rpmsg device memory. But the patch is not complete, in that the rpmsg core will overwrite the release op as the device is being registered. Fixes: b0b03b811963 ("rpmsg: Release rpmsg devices in backends") Reported-by: Henri Roosen Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 8 -------- 1 file changed, 8 deletions(-) commit ba6d334ac230065243a92bb7cb3fd6a5f6a7f8ac Author: Benjamin Herrenschmidt Date: Sat Jun 24 12:29:01 2017 -0500 powerpc/64s: Invalidate ERAT on powersave wakeup for POWER9 On POWER9 the ERAT may be incorrect on wakeup from some stop states that lose state. This causes random segvs and illegal instructions when these stop states are enabled. This patch invalidates the ERAT on wakeup on POWER9 to prevent this from causing a problem. Signed-off-by: Michael Neuling Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Nicholas Piggin [mpe: Merge comment change with upstream changes] Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 8 +++++--- arch/powerpc/kernel/idle_book3s.S | 7 +++++++ 2 files changed, 12 insertions(+), 3 deletions(-) commit 74e27c6af56fe6898c3c8c451595746a992f0f0f Author: Benjamin Herrenschmidt Date: Sun Jun 25 15:08:46 2017 -0500 powerpc: Only do ERAT invalidate on radix context switch on P9 DD1 From: Michael Neuling On P9 (Nimbus) DD2 and later, in radix mode, the move to the PID register will implicitly invalidate the user space ERAT entries and leave the kernel ones alone. Thus the only thing needed is an isync() to synchronize this with subsequent uaccess's Signed-off-by: Michael Neuling Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/mm/mmu_context_book3s64.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 8c6657cb50cb037ff58b3f6a547c6569568f3527 Author: Al Viro Date: Mon Jun 26 23:51:31 2017 -0400 Switch flock copyin/copyout primitives to copy_{from,to}_user() ... and lose HAVE_ARCH_...; if copy_{to,from}_user() on an architecture sucks badly enough to make it a problem, we have a worse problem. Signed-off-by: Al Viro fs/fcntl.c | 59 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 29 insertions(+), 30 deletions(-) commit ca1579f6c6085ecb1838d9ee052e535682cc0e73 Merge: 20dcf8e f731273 Author: Al Viro Date: Mon Jun 26 23:52:33 2017 -0400 Merge remote-tracking branch 'jl/locks-4.13' into work.misc-set_fs commit 593814d1beae8ad91be6c90f95764e09fc7ca236 Author: Colin Ian King Date: Mon Jun 26 13:53:46 2017 +0100 net/mlx4: fix spelling mistake: "coalesing" -> "coalescing" Trivial fix to spelling mistake in en_dbg debug message Signed-off-by: Colin Ian King Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1f271d6b2201d713de3414c87b9007af1011c10 Merge: dacdbb4 d116ffc Author: David S. Miller Date: Mon Jun 26 23:13:23 2017 -0400 Merge branch 'net-add-netlink_ext_ack-support-to-rtnl_link_ops' Matthias Schiffer says: ==================== net: add netlink_ext_ack support to rtnl_link_ops Same changes as http://patchwork.ozlabs.org/patch/780351/ , split into separate patches for each rtnl_link_ops field as requested. ==================== Signed-off-by: David S. Miller commit d116ffc770d80f241f0d750d355205d83a9eca5a Author: Matthias Schiffer Date: Sun Jun 25 23:56:03 2017 +0200 net: add netlink_ext_ack argument to rtnl_link_ops.slave_validate Add support for extended error reporting. Signed-off-by: Matthias Schiffer Acked-by: David Ahern Signed-off-by: David S. Miller include/net/rtnetlink.h | 3 ++- net/core/rtnetlink.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 17dd0ec470f97518893a5ed7160a842a35482fb4 Author: Matthias Schiffer Date: Sun Jun 25 23:56:02 2017 +0200 net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink Add support for extended error reporting. Signed-off-by: Matthias Schiffer Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/bonding/bond_netlink.c | 3 ++- include/net/rtnetlink.h | 3 ++- net/bridge/br_netlink.c | 3 ++- net/core/rtnetlink.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) commit a8b8a889e369de82f295f55455adb4a7c31c458c Author: Matthias Schiffer Date: Sun Jun 25 23:56:01 2017 +0200 net: add netlink_ext_ack argument to rtnl_link_ops.validate Add support for extended error reporting. Signed-off-by: Matthias Schiffer Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/bonding/bond_netlink.c | 3 ++- drivers/net/can/dev.c | 3 ++- drivers/net/dummy.c | 3 ++- drivers/net/geneve.c | 3 ++- drivers/net/gtp.c | 3 ++- drivers/net/ifb.c | 3 ++- drivers/net/ipvlan/ipvlan_main.c | 3 ++- drivers/net/macsec.c | 3 ++- drivers/net/macvlan.c | 3 ++- drivers/net/nlmon.c | 3 ++- drivers/net/ppp/ppp_generic.c | 3 ++- drivers/net/team/team.c | 3 ++- drivers/net/tun.c | 3 ++- drivers/net/veth.c | 5 +++-- drivers/net/vrf.c | 3 ++- drivers/net/vxlan.c | 3 ++- include/net/rtnetlink.h | 3 ++- net/8021q/vlan_netlink.c | 3 ++- net/bridge/br_netlink.c | 4 +++- net/core/rtnetlink.c | 2 +- net/ieee802154/6lowpan/core.c | 3 ++- net/ipv4/ip_gre.c | 8 +++++--- net/ipv4/ip_vti.c | 3 ++- net/ipv4/ipip.c | 3 ++- net/ipv6/ip6_gre.c | 8 +++++--- net/ipv6/ip6_tunnel.c | 3 ++- net/ipv6/ip6_vti.c | 3 ++- net/ipv6/sit.c | 3 ++- 28 files changed, 63 insertions(+), 33 deletions(-) commit ad744b223c521b1e01752a826774545c3e3acd8e Author: Matthias Schiffer Date: Sun Jun 25 23:56:00 2017 +0200 net: add netlink_ext_ack argument to rtnl_link_ops.changelink Add support for extended error reporting. Signed-off-by: Matthias Schiffer Acked-by: David Ahern Signed-off-by: David S. Miller drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 7 ++++--- drivers/net/bonding/bond_netlink.c | 7 ++++--- drivers/net/caif/caif_hsi.c | 3 ++- drivers/net/can/dev.c | 5 +++-- drivers/net/ipvlan/ipvlan_main.c | 3 ++- drivers/net/macsec.c | 3 ++- drivers/net/macvlan.c | 3 ++- drivers/net/vxlan.c | 3 ++- include/net/rtnetlink.h | 3 ++- net/8021q/vlan_netlink.c | 7 ++++--- net/bridge/br_netlink.c | 5 +++-- net/caif/chnl_net.c | 3 ++- net/core/rtnetlink.c | 2 +- net/ipv4/ip_gre.c | 3 ++- net/ipv4/ip_vti.c | 3 ++- net/ipv4/ipip.c | 3 ++- net/ipv6/ip6_gre.c | 3 ++- net/ipv6/ip6_tunnel.c | 3 ++- net/ipv6/ip6_vti.c | 3 ++- net/ipv6/sit.c | 3 ++- 20 files changed, 47 insertions(+), 28 deletions(-) commit 7a3f4a185169b195c33f1c54f33a44eba2d6aa96 Author: Matthias Schiffer Date: Sun Jun 25 23:55:59 2017 +0200 net: add netlink_ext_ack argument to rtnl_link_ops.newlink Add support for extended error reporting. Signed-off-by: Matthias Schiffer Acked-by: David Ahern Signed-off-by: David S. Miller drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 3 ++- drivers/net/bonding/bond_netlink.c | 3 ++- drivers/net/caif/caif_hsi.c | 3 ++- drivers/net/can/dev.c | 3 ++- drivers/net/can/vxcan.c | 3 ++- drivers/net/geneve.c | 3 ++- drivers/net/gtp.c | 3 ++- drivers/net/ipvlan/ipvlan.h | 3 ++- drivers/net/ipvlan/ipvlan_main.c | 3 ++- drivers/net/ipvlan/ipvtap.c | 9 ++++----- drivers/net/macsec.c | 3 ++- drivers/net/macvlan.c | 3 ++- drivers/net/macvtap.c | 7 +++---- drivers/net/ppp/ppp_generic.c | 3 ++- drivers/net/team/team.c | 3 ++- drivers/net/veth.c | 3 ++- drivers/net/vrf.c | 3 ++- drivers/net/vxlan.c | 3 ++- include/net/rtnetlink.h | 3 ++- net/8021q/vlan_netlink.c | 3 ++- net/bridge/br_netlink.c | 3 ++- net/caif/chnl_net.c | 3 ++- net/core/rtnetlink.c | 3 ++- net/hsr/hsr_netlink.c | 3 ++- net/ieee802154/6lowpan/core.c | 3 ++- net/ipv4/ip_gre.c | 5 +++-- net/ipv4/ip_vti.c | 3 ++- net/ipv4/ipip.c | 3 ++- net/ipv6/ip6_gre.c | 3 ++- net/ipv6/ip6_tunnel.c | 3 ++- net/ipv6/ip6_vti.c | 3 ++- net/ipv6/sit.c | 3 ++- 32 files changed, 68 insertions(+), 40 deletions(-) commit c377a2c8eaaa6ef55dfe5806384214b4f304be5e Merge: 5965453 0b5fa22 Author: James Morris Date: Tue Jun 27 12:38:46 2017 +1000 Merge tag 'seccomp-next' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next commit 8e3f1b1d8255105f31556aacf8aeb6071b00d469 Author: Russell Currey Date: Wed Jun 21 17:18:04 2017 +1000 powerpc/powernv/pci: Enable 64-bit devices to access >4GB DMA space On PHB3/POWER8 systems, devices can select between two different sections of address space, TVE#0 and TVE#1. TVE#0 is intended for 32bit devices that aren't capable of addressing more than 4GB. Selecting TVE#1 instead, with the capability of addressing over 4GB, is performed by setting bit 59 of a PCI address. However, some devices aren't capable of addressing at least 59 bits, but still want more than 4GB of DMA space. In order to enable this, reconfigure TVE#0 to be suitable for 64-bit devices by allocating memory past the initial 4GB that is inaccessible by 64-bit DMAs. This bypass mode is only enabled if a device requests 4GB or more of DMA address space, if the system has PHB3 (POWER8 systems), and if the device does not share a PE with any devices from different vendors. Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 93 ++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) commit a0f98629f19943fb8387a7d5fd01e60178223c00 Author: Russell Currey Date: Wed Jun 21 17:18:03 2017 +1000 powerpc/powernv/pci: Add helper to check if a PE has a single vendor Add a helper that determines if all the devices contained in a given PE are all from the same vendor or not. This can be useful in determining if it's okay to make PE-wide changes that may be suitable for some devices but not for others. This is used later in the series. Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit a4b48ba9047dfdf99cf2316d21baac2791b3b14c Author: Russell Currey Date: Wed Jun 14 14:20:00 2017 +1000 powerpc/powernv/pci: Add support for PHB4 diagnostics As with P7IOC and PHB3, add kernel-side support for decoding and printing diagnostic data for PHB4. Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal-api.h | 75 ++++++++++++++++++++++++- arch/powerpc/platforms/powernv/pci.c | 105 +++++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+), 2 deletions(-) commit 5cb1f8fdddb7475f38ea9fba48da17c002eec90b Author: Russell Currey Date: Wed Jun 14 14:19:59 2017 +1000 powerpc/powernv/pci: Dynamically allocate PHB diag data Diagnostic data for PHBs currently works by allocated a fixed-sized buffer. This is simple, but either wastes memory (though only a few kilobytes) or in the case of PHB4 isn't enough to fit the whole data blob. For machines that don't describe the diagnostic data size in the device tree, use the hardcoded buffer size as before. For those that do, only allocate exactly what's needed. In the special case of P7IOC (which has two types of diag data), the larger should be specified in the device tree. Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/eeh-powernv.c | 16 +++++++++++----- arch/powerpc/platforms/powernv/pci-ioda.c | 15 ++++++++++++--- arch/powerpc/platforms/powernv/pci.c | 6 +++--- arch/powerpc/platforms/powernv/pci.h | 10 +++------- 4 files changed, 29 insertions(+), 18 deletions(-) commit 31bbd45af313c3b1cdaa98e5a2de65194cf7d948 Author: Russell Currey Date: Wed Jun 14 14:19:58 2017 +1000 powerpc/powernv/pci: Reduce spam when dumping PEST Dumping the PE State Tables (PEST) can be highly verbose if a number of PEs are affected, especially in the case where the whole PHB is frozen and 512 lines get printed. Check for duplicates when dumping the PEST to reduce useless output. For example: PE[0f8] A/B: 9700002600000000 80000080d00000f8 PE[0f9] A/B: 8000000000000000 0000000000000000 PE[..0fe] A/B: as above PE[0ff] A/B: 8440002b00000000 0000000000000000 instead of: PE[0f8] A/B: 9700002600000000 80000080d00000f8 PE[0f9] A/B: 8000000000000000 0000000000000000 PE[0fa] A/B: 8000000000000000 0000000000000000 PE[0fb] A/B: 8000000000000000 0000000000000000 PE[0fc] A/B: 8000000000000000 0000000000000000 PE[0fd] A/B: 8000000000000000 0000000000000000 PE[0fe] A/B: 8000000000000000 0000000000000000 PE[0ff] A/B: 8440002b00000000 0000000000000000 and you can imagine how much worse it can get for 512 PEs. Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci.c | 51 ++++++++++++++++++++++-------------- arch/powerpc/platforms/powernv/pci.h | 3 +++ 2 files changed, 34 insertions(+), 20 deletions(-) commit 2bafb7ffa3e0908ad2e69b94c436a0326ef2e7e1 Author: Michael Neuling Date: Mon May 8 16:18:31 2017 +1000 powerpc/tm: Fix comment Update to real function name. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kernel/tm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa9a95163638bd9acb3e1f61f48cd5a000e79f03 Author: Michael Neuling Date: Mon May 8 16:23:31 2017 +1000 powerpc: Fix asm offsets to point to actual FP and VMX regs The asm code assumes the FP regs are at the start of fp_state. While this is true now, it may not always be the case and there is nothing enforcing it. This fixes the asm-offsets to point to the actual FP registers inside the fp_state. Similarly for VMX. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kernel/asm-offsets.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 64ebb9a208c6e66316329a6d9101815d1ee06fa9 Author: Michael Neuling Date: Thu Jun 15 11:53:16 2017 +1000 powerpc: Fix /proc/cpuinfo revision for POWER9 DD2 The P9 PVR bits 12-15 don't indicate a revision but instead different chip configurations. From BookIV we have: Bits Configuration 0 : Scale out 12 cores 1 : Scale out 24 cores 2 : Scale up 12 cores 3 : Scale up 24 cores DD1 doesn't use this but DD2 does. Linux will mostly use the "Scale out 24 core" configuration (ie. SMT4 not SMT8) which results in a PVR of 0x004e1200. The reported revision in /proc/cpuinfo is hence reported incorrectly as "18.0". This patch fixes this to mask off only the relevant bits for the major revision (ie. bits 8-11) for POWER9. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup-common.c | 4 ++++ 1 file changed, 4 insertions(+) commit 19508c048a2f90facb64624340bf1b7ee555442e Author: Thomas Richter Date: Thu Jun 22 09:36:25 2017 +0200 perf tests: Add platform dependency to test 15 This patch adds platform dependency into the test case 15 (perf_event_attr). It is based on a suggestion from Jiri Olsa. Add a new optional attribute named 'arch' in the [config] section of the test case file. It is a comma separated list of architecture names this test can be executed on. For example: arch = x86_64,alpha,ppc If this attribute is missing the test is executed on any platform. This does not break existing behavior. The values listed for this attribute should be identical to uname -m output. If the list starts with an exclamation mark (!) the comparison is inverted, for example for arch = !s390x,ppc the test is not executed on s390x or ppc platforms. The exclamation mark must be at the beginnning of the list. Here is an example debug output: [root@s35lp76]# fgrep arch tests/attr/test-stat-C2 arch = x86_64,alpha,ppc [root@s35lp76]# PERF_TEST_ATTR=/tmp /usr/bin/python2 ./tests/attr.py \ -d ./tests/attr/ -p ./perf -vvvvv -t test-stat-C1 provides the following output: running './tests/attr//test-stat-C1' test limitation 'x86_64,alpha,ppc' <--- new loading expected events Event event:base-stat fd = 1 group_fd = -1 ..... Here is the output when a test is skipped: [root@s35lp76]# fgrep arch tests/attr/test-stat-C1 arch = !s390x [root@s35lp76]# PERF_TEST_ATTR=/tmp /usr/bin/python2 ./tests/attr.py \ -d ./tests/attr/ -p ./perf -vvvvv -t test-stat-C1 provides the following output: test limitation '!s390x' <--- new skipped [s390x] './tests/attr//test-stat-C1' <--- new The test is skipped with return code 0. Suggested-and-Acked-by: Jiri Olsa Reviewed-by: Arnaldo Carvalho de Melo Signed-off-by: Thomas Richter Cc: Hendrik Brueckner Cc: linux-s390@vger.kernel.org Link: http://lkml.kernel.org/r/20170622073625.86762-1-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 73808d0fd26b3d3f0f44cc7c469ad1d3c1b570b8 Author: Prakash, Prashanth Date: Thu May 11 16:39:44 2017 -0600 cpufreq / CPPC: Initialize policy->min to lowest nonlinear performance Description of Lowest Perfomance in ACPI 6.1 specification states: "Lowest Performance is the absolute lowest performance level of the platform. Selecting a performance level lower than the lowest nonlinear performance level may actually cause an efficiency penalty, but should reduce the instantaneous power consumption of the processor. In traditional terms, this represents the T-state range of performance levels." Set the default value of policy->min to Lowest Nonlinear Performance to avoid any potential efficiency penalty. Signed-off-by: Prashanth Prakash Acked-by: Viresh Kumar Acked-by: Alexey Klimov Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit eba74c294467d55c697e2199c37dfaf8126fe396 Author: BaoJun Luo Date: Tue Jun 27 02:10:44 2017 +0200 PM / hibernate: Drop redundant parameter of swsusp_alloc() The first parameter of swsusp_alloc is not used, so drop it. Signed-off-by: BaoJun Luo [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki kernel/power/snapshot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 49368a47f6dc1b256e3b83813da5c9b0731fe268 Author: Balbir Singh Date: Sat Jun 3 20:52:32 2017 +1000 PM / hibernate: Use CONFIG_HAVE_SET_MEMORY for include condition Kbuild reported a build failure when CONFIG_STRICT_KERNEL_RWX was enabled on powerpc. We don't yet have ARCH_HAS_SET_MEMORY and ppc32 saw a build failure. I've only done a basic compile test with a config that has hibernation enabled. Fixes: 50327ddfbc92 (kernel/power/snapshot.c: use set_memory.h header) Reported-by: Christophe Leroy Signed-off-by: Balbir Singh Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki kernel/power/snapshot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5209654a46ee71137ad9b06da99d4ef2794475af Author: Yazen Ghannam Date: Wed Jun 7 10:19:46 2017 -0500 x86/ACPI/cstate: Allow ACPI C1 FFH MWAIT use on AMD systems AMD systems support the Monitor/Mwait instructions and these can be used for ACPI C1 in the same way as on Intel systems. Three things are needed: 1) This patch. 2) BIOS that declares a C1 state in _CST to use FFH, with correct values. 3) CPUID_Fn00000005_EDX is non-zero on the system. The BIOS on AMD systems have historically not defined a C1 state in _CST, so the acpi_idle driver uses HALT for ACPI C1. Currently released systems have CPUID_Fn00000005_EDX as reserved/RAZ. If a BIOS is released for these systems that requests a C1 state with FFH, the FFH implementation in Linux will fail since CPUID_Fn00000005_EDX is 0. The acpi_idle driver will then fallback to using HALT for ACPI C1. Future systems are expected to have non-zero CPUID_Fn00000005_EDX and BIOS support for using FFH for ACPI C1. Allow ffh_cstate_init() to succeed on AMD systems. Tested on Fam15h and Fam17h systems. Signed-off-by: Yazen Ghannam Acked-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki arch/x86/kernel/acpi/cstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ea0212f40c6bc0594c8eff79266759e3ecd4bacc Author: Thomas Gleixner Date: Sun Jun 25 19:31:13 2017 +0200 PM / wakeirq: Convert to SRCU The wakeirq infrastructure uses RCU to protect the list of wakeirqs. That breaks the irq bus locking infrastructure, which is allows sleeping functions to be called so interrupt controllers behind slow busses, e.g. i2c, can be handled. The wakeirq functions hold rcu_read_lock and call into irq functions, which in case of interrupts using the irq bus locking will trigger a might_sleep() splat. Convert the wakeirq infrastructure to Sleepable RCU and unbreak it. Fixes: 4990d4fe327b (PM / Wakeirq: Add automated device wake IRQ handling) Reported-by: Brian Norris Suggested-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney Tested-by: Tony Lindgren Tested-by: Brian Norris Cc: 4.2+ # 4.2+ Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeup.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 82b4e03e01bc8def546b52707962809f04ae5c7a Author: Len Brown Date: Fri Jun 23 22:11:54 2017 -0700 intel_pstate: skip scheduler hook when in "performance" mode When the governor is set to "performance", intel_pstate does not need the scheduler hook for doing any calculations. Under these conditions, its only purpose is to continue to maintain cpufreq/scaling_cur_freq. The cpufreq/scaling_cur_freq sysfs attribute is now provided by shared x86 cpufreq code on modern x86 systems, including all systems supported by the intel_pstate driver. So in "performance" governor mode, the scheduler hook can be skipped. This applies to both in Software and Hardware P-state control modes. Suggested-by: Srinivas Pandruvada Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62611cb912f7cb08ef7815780bcc20a09abedd20 Author: Len Brown Date: Fri Jun 23 22:11:53 2017 -0700 intel_pstate: delete scheduler hook in HWP mode The cpufreq/scaling_cur_freq sysfs attribute is now provided by shared x86 cpufreq code on modern x86 systems, including all systems supported by the intel_pstate driver. In HWP mode, maintaining that value was the sole purpose of the scheduler hook, intel_pstate_update_util_hwp(), so it can now be removed. Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit f8475cef90082bf0902ddab106112de130d90395 Author: Len Brown Date: Fri Jun 23 22:11:52 2017 -0700 x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF The goal of this change is to give users a uniform and meaningful result when they read /sys/...cpufreq/scaling_cur_freq on modern x86 hardware, as compared to what they get today. Modern x86 processors include the hardware needed to accurately calculate frequency over an interval -- APERF, MPERF, and the TSC. Here we provide an x86 routine to make this calculation on supported hardware, and use it in preference to any driver driver-specific cpufreq_driver.get() routine. MHz is computed like so: MHz = base_MHz * delta_APERF / delta_MPERF MHz is the average frequency of the busy processor over a measurement interval. The interval is defined to be the time between successive invocations of aperfmperf_khz_on_cpu(), which are expected to to happen on-demand when users read sysfs attribute cpufreq/scaling_cur_freq. As with previous methods of calculating MHz, idle time is excluded. base_MHz above is from TSC calibration global "cpu_khz". This x86 native method to calculate MHz returns a meaningful result no matter if P-states are controlled by hardware or firmware and/or if the Linux cpufreq sub-system is or is-not installed. When this routine is invoked more frequently, the measurement interval becomes shorter. However, the code limits re-computation to 10ms intervals so that average frequency remains meaningful. Discerning users are encouraged to take advantage of the turbostat(8) utility, which can gracefully handle concurrent measurement intervals of arbitrary length. Signed-off-by: Len Brown Reviewed-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki arch/x86/kernel/cpu/Makefile | 1 + arch/x86/kernel/cpu/aperfmperf.c | 79 ++++++++++++++++++++++++++++++++++++++++ drivers/cpufreq/cpufreq.c | 12 +++++- include/linux/cpufreq.h | 2 + 4 files changed, 93 insertions(+), 1 deletion(-) commit 902bef73faa99b8c024e0f18c6199872b7cccb52 Author: Sherry Hurwitz Date: Tue Jun 20 02:08:42 2017 -0500 cpupower: Add support for new AMD family 0x17 Add support for new AMD family 0x17 - Add bit field changes to the msr_pstate structure - Add the new formula for the calculation of cof - Changed method to access to CpbDis Signed-off-by: Sherry Hurwitz Acked-by: Thomas Renninger Signed-off-by: Rafael J. Wysocki tools/power/cpupower/utils/helpers/amd.c | 31 +++++++++++++++++++++------- tools/power/cpupower/utils/helpers/helpers.h | 2 ++ tools/power/cpupower/utils/helpers/misc.c | 22 +++++++++++++++++--- 3 files changed, 44 insertions(+), 11 deletions(-) commit 6ae78b4e7c276e5306897269443f66cb4d86e47f Author: Sherry Hurwitz Date: Tue Jun 20 02:07:37 2017 -0500 cpupower: Fix bug where return value was not used Save return value from amd_pci_get_num_boost_states and remove redundant setting of *support Signed-off-by: Sherry Hurwitz Reviewed-by: Thomas Renninger Signed-off-by: Rafael J. Wysocki tools/power/cpupower/utils/helpers/misc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5422583bfa6cb09fdc6955b88f647011a83186fb Merge: a8a13bf a32f80b Author: Rafael J. Wysocki Date: Tue Jun 27 01:42:51 2017 +0200 Merge back PM tools material for v4.13. commit a8a13bfd5ac1a5ba63a722ae173cb2619db89c5c Merge: 3c2993b f7d44a8 Author: Rafael J. Wysocki Date: Tue Jun 27 01:42:28 2017 +0200 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat fixes from Len Brown. * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: update version number tools/power turbostat: decode MSR_IA32_MISC_ENABLE only on Intel tools/power turbostat: stop migrating, unless '-m' tools/power turbostat: if --debug, print sampling overhead tools/power turbostat: hide SKL counters, when not requested commit 6d61e70ccc21606ffb8a0a03bd3aba24f659502b Merge: 338ffbf c0bc126 Author: Dave Airlie Date: Tue Jun 27 07:24:49 2017 +1000 Backmerge tag 'v4.12-rc7' into drm-next Linux 4.12-rc7 Needed at least rc6 for drm-misc-next-fixes, may as well go to rc7 commit 588726d3ec68b66be2e2881d2b85060ff383078a Author: Javier González Date: Mon Jun 26 11:57:29 2017 +0200 lightnvm: pblk: fail gracefully on irrec. error Due to user writes being decoupled from media writes because of the need of an intermediate write buffer, irrecoverable media write errors lead to pblk stalling; user writes fill up the buffer and end up in an infinite retry loop. In order to let user writes fail gracefully, it is necessary for pblk to keep track of its own internal state and prevent further writes from being placed into the write buffer. This patch implements a state machine to keep track of internal errors and, in case of failure, fail further user writes in an standard way. Depending on the type of error, pblk will do its best to persist buffered writes (which are already acknowledged) and close down on a graceful manner. This way, data might be recovered by re-instantiating pblk. Such state machine paves out the way for a state-based FTL log. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-cache.c | 8 +- drivers/lightnvm/pblk-core.c | 280 ++++++++++++++++++++++++++++----------- drivers/lightnvm/pblk-init.c | 6 +- drivers/lightnvm/pblk-map.c | 23 +++- drivers/lightnvm/pblk-rb.c | 25 +++- drivers/lightnvm/pblk-read.c | 3 + drivers/lightnvm/pblk-recovery.c | 31 +++-- drivers/lightnvm/pblk-rl.c | 30 ++++- drivers/lightnvm/pblk-sysfs.c | 8 +- drivers/lightnvm/pblk-write.c | 5 +- drivers/lightnvm/pblk.h | 27 +++- 11 files changed, 332 insertions(+), 114 deletions(-) commit ef5764946b1314e0aa1ab261493de6b9aa482ff9 Author: Javier González Date: Mon Jun 26 11:57:28 2017 +0200 lightnvm: pblk: set mempool and workqueue params. Make constants to define sizes for internal mempools and workqueues. In this process, adjust the values to be more meaningful given the internal constrains of the FTL. In order to do this for workqueues, separate the current auxiliary workqueue into two dedicated workqueues to manage lines being closed and bad blocks. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 7 ++++--- drivers/lightnvm/pblk-init.c | 39 ++++++++++++++++++++++++++------------- drivers/lightnvm/pblk-write.c | 5 +++-- drivers/lightnvm/pblk.h | 13 +++++++++++-- 4 files changed, 44 insertions(+), 20 deletions(-) commit b20ba1bc749ce0cd7a74d24f23826a6462c3de53 Author: Javier González Date: Mon Jun 26 11:57:27 2017 +0200 lightnvm: pblk: redesign GC algorithm At the moment, in order to get enough read parallelism, we have recycled several lines at the same time. This approach has proven not to work well when reaching capacity, since we end up mixing valid data from all lines, thus not maintaining a sustainable free/recycled line ratio. The new design, relies on a two level workqueue mechanism. In the first level, we read the metadata for a number of lines based on the GC list they reside on (this is governed by the number of valid sectors in each line). In the second level, we recycle a single line at a time. Here, we issue reads in parallel, while a single GC write thread places data in the write buffer. This design allows to (i) only move data from one line at a time, thus maintaining a sane free/recycled ration and (ii) maintain the GC writer busy with recycled data. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 7 +- drivers/lightnvm/pblk-gc.c | 439 +++++++++++++++++++++++++----------------- drivers/lightnvm/pblk-rb.c | 21 +- drivers/lightnvm/pblk-rl.c | 62 +++--- drivers/lightnvm/pblk-sysfs.c | 51 +---- drivers/lightnvm/pblk.h | 66 +++++-- 6 files changed, 368 insertions(+), 278 deletions(-) commit 476118c981f0fd909cd95a1732073120c6806ac0 Author: Javier González Date: Mon Jun 26 11:57:26 2017 +0200 lightnvm: pblk: add lock assertions on helpers Add lockdep assertions on helper functions. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0c0ea8817e45faf1ae1daa28d102c1e2e695ce3a Author: Javier González Date: Mon Jun 26 11:57:25 2017 +0200 lightnvm: pblk: cleanup unnecessary code Cleanup unnecessary headers and code lines. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 1 - drivers/lightnvm/pblk-write.c | 6 ------ 2 files changed, 7 deletions(-) commit 63e3809cf70f66cbcfdb9ec48facf10660c2364b Author: Javier González Date: Mon Jun 26 11:57:24 2017 +0200 lightnvm: pblk: set metadata list for all I/Os Set a dma area for all I/Os in order to read/write from/to the metadata stored on the per-sector out-of-bound area. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 47 +++++++++++++++++++++++++++++++------------- drivers/lightnvm/pblk-read.c | 45 ++++++++++++++++++++---------------------- 2 files changed, 54 insertions(+), 38 deletions(-) commit d45ebd470bb6d41eb5294733bdba78a7ad69f1d0 Author: Javier González Date: Mon Jun 26 11:57:23 2017 +0200 lightnvm: pblk: choose optimal victim GC line At the moment, we separate the closed lines on three different list based on their number of valid sectors. GC recycles lines from each list based on capacity. Lines from each list are taken in a FIFO fashion. Since the number of lines is limited (it corresponds to the number of blocks in a LUN, which is somewhere between 1000-2000), we can afford scanning the lists to choose the optimal line to be recycled. This helps specially in lines with a high number of valid sectors. If the number of blocks per LUN increases, we will consider a more efficient policy. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit dffdd960ee16d0515d32701301760a817a25d52b Author: Javier González Date: Mon Jun 26 11:57:22 2017 +0200 lightnvm: pblk: decouple bad block from line alloc Decouple bad block discovery from line allocation logic. This allows to return meaningful error codes in case of bad block discovery failure. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 53 +++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 16 deletions(-) commit f680f19aa6dbbbabf499250d49f18a426b14f1c2 Author: Javier González Date: Mon Jun 26 11:57:21 2017 +0200 lightnvm: pblk: simplify meta. memory allocation smeta size will always be suitable for a kmalloc allocation. Simplify the code and leave the vmalloc fallback only for emeta, where the pblk configuration has an impact. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 3 ++- drivers/lightnvm/pblk-init.c | 9 ++++----- drivers/lightnvm/pblk-write.c | 3 ++- drivers/lightnvm/pblk.h | 1 - 4 files changed, 8 insertions(+), 8 deletions(-) commit f9c101523da75cd483b95f04c21242bb83960d93 Author: Javier González Date: Mon Jun 26 11:57:20 2017 +0200 lightnvm: pblk: issue multiplane reads if possible If a read request is sequential and its size aligns with a multi-plane page size, use the multi-plane hint to process the I/O in parallel in the controller. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 12 +++++++----- drivers/lightnvm/pblk-read.c | 11 +++++++++-- drivers/lightnvm/pblk-recovery.c | 18 +++++++++++++++--- drivers/lightnvm/pblk.h | 22 ++++++++++++++++++++-- 4 files changed, 51 insertions(+), 12 deletions(-) commit 0880a9aa2d91ff5131ecd0902a758afe760b9c1c Author: Javier González Date: Mon Jun 26 11:57:19 2017 +0200 lightnvm: pblk: delete redundant buffer pointer After refactoring the metadata path, the backpointer controlling synced I/Os in a line becomes unnecessary; metadata is scheduled on the write thread, thus we know when the end of the line is reached and act on it directly. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 18 +++--------------- drivers/lightnvm/pblk-init.c | 1 - drivers/lightnvm/pblk-map.c | 2 +- drivers/lightnvm/pblk-recovery.c | 2 -- drivers/lightnvm/pblk-sysfs.c | 10 ++++------ drivers/lightnvm/pblk-write.c | 13 +------------ drivers/lightnvm/pblk.h | 6 ++---- 7 files changed, 11 insertions(+), 41 deletions(-) commit fd1b0158f5f5937d73d5c61e229350c6b905d0da Author: Javier González Date: Mon Jun 26 11:57:18 2017 +0200 lightnvm: pblk: delete redundant debug line stat Remove a legacy variable that helped verifying the consistency of the run-time metadata for the free line list. With the new metadata layout, this check is no longer necessary. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-sysfs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit dd2a43437337a71c4e26fbbe93a423b731bf69c7 Author: Javier González Date: Mon Jun 26 11:57:17 2017 +0200 lightnvm: pblk: sched. metadata on write thread At the moment, line metadata is persisted on a separate work queue, that is kicked each time that a line is closed. The assumption when designing this was that freeing the write thread from creating a new write request was better than the potential impact of writes colliding on the media (user I/O and metadata I/O). Experimentation has proven that this assumption is wrong; collision can cause up to 25% of bandwidth and introduce long tail latencies on the write thread, which potentially cause user write threads to spend more time spinning to get a free entry on the write buffer. This patch moves the metadata logic to the write thread. When a line is closed, remaining metadata is written in memory and is placed on a metadata queue. The write thread then takes the metadata corresponding to the previous line, creates the write request and schedules it to minimize collisions on the media. Using this approach, we see that we can saturate the media's bandwidth, which helps reducing both write latencies and the spinning time for user writer threads. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 216 +++++++++++++++++++++------------ drivers/lightnvm/pblk-gc.c | 41 +++---- drivers/lightnvm/pblk-init.c | 240 ++++++++++++++++++++++--------------- drivers/lightnvm/pblk-map.c | 13 +- drivers/lightnvm/pblk-recovery.c | 67 ++++++----- drivers/lightnvm/pblk-sysfs.c | 16 ++- drivers/lightnvm/pblk-write.c | 251 +++++++++++++++++++++++++++++++++++---- drivers/lightnvm/pblk.h | 114 +++++++++++++----- 8 files changed, 673 insertions(+), 285 deletions(-) commit 084ec9ba07a00d5ee1218339aab4d52569e35c9b Author: Javier González Date: Mon Jun 26 16:27:13 2017 -0600 lightnvm: pblk: rename read request pool Read requests allocate some extra memory to store its per I/O context. Instead of requiring yet another memory pool for other type of requests, generalize this context allocation (and change naming accordingly). Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 12 ++++++------ drivers/lightnvm/pblk-init.c | 26 +++++++++++++------------- drivers/lightnvm/pblk-read.c | 17 +++++++++-------- drivers/lightnvm/pblk-recovery.c | 8 ++++---- drivers/lightnvm/pblk.h | 12 ++++++------ 5 files changed, 38 insertions(+), 37 deletions(-) commit d624f371d5c17a6e230ffed3f0371a4eb588bf45 Author: Javier González Date: Mon Jun 26 11:57:15 2017 +0200 lightnvm: pblk: generalize erase path Erase I/Os are scheduled with the following goals in mind: (i) minimize LUNs collisions with write I/Os, and (ii) even out the price of erasing on every write, instead of putting all the burden on when garbage collection runs. This works well on the current design, but is specific to the default mapping algorithm. This patch generalizes the erase path so that other mapping algorithms can select an arbitrary line to be erased instead. It also gets rid of the erase semaphore since it creates jittering for user writes. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 4 +- drivers/lightnvm/pblk-init.c | 9 ++-- drivers/lightnvm/pblk-map.c | 40 +++++++++++----- drivers/lightnvm/pblk-rb.c | 33 +++++++------ drivers/lightnvm/pblk-write.c | 109 +++++++++++++++++++++++------------------- drivers/lightnvm/pblk.h | 11 ++--- 6 files changed, 116 insertions(+), 90 deletions(-) commit c2e9f5d457ad6a75516e749a3e544165766ab1ce Author: Javier González Date: Mon Jun 26 11:57:14 2017 +0200 lightnvm: pblk: expose max sec per write on sysfs Allow to configure the number of maximum sectors per write command through sysfs. This makes it easier to tune write command sizes for different controller configurations. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 7 ++++++- drivers/lightnvm/pblk-init.c | 2 ++ drivers/lightnvm/pblk-sysfs.c | 38 ++++++++++++++++++++++++++++++++++++++ drivers/lightnvm/pblk.h | 2 ++ 4 files changed, 48 insertions(+), 1 deletion(-) commit db7ada33cdcae7fef0a088141b1e4ab8c25fd395 Author: Javier González Date: Mon Jun 26 11:57:13 2017 +0200 lightnvm: pblk: add debug stat for read cache hits Add a new debug counter to measure cache hits on the read path Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 1 + drivers/lightnvm/pblk-read.c | 6 ++++++ drivers/lightnvm/pblk-sysfs.c | 3 ++- drivers/lightnvm/pblk.h | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) commit caa69fa560025d12c276abd62d58a87b94324708 Author: Javier González Date: Mon Jun 26 11:57:12 2017 +0200 lightnvm: pblk: spare double cpu_to_le64 calc. Spare a double calculation on the fast write path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-map.c | 5 +++-- drivers/lightnvm/pblk-recovery.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit 613fa267c3fa2bdf92d005a4d0fa911bc84f17f4 Author: Javier González Date: Mon Jun 26 11:57:11 2017 +0200 lightnvm: propagate right error code to target If nvme_alloc_request fails, propagate the right error, instead of assuming ENOMEM. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e505afb45f57e84adabf7a3b0b705c7b04ad59c Author: Javier González Date: Mon Jun 26 11:57:10 2017 +0200 lightnvm: re-convert ppa format on I/O failure In case of a failure when submitting a request, convert the ppa_list addresses to the target format so that it can interpret ppas for recovery Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3fde00a014ed1b0716a1d73fdebd96188e2ff6fe Author: Florian Fainelli Date: Mon Jun 26 14:15:02 2017 -0700 dt-bindings: Document the Broadcom STB wake-up timer node Document the binding for the Broadcom STB SoCs wake-up timer node allowing the system to generate alarms and exit low power states. Acked-by: Rob Herring Signed-off-by: Florian Fainelli Signed-off-by: Alexandre Belloni .../bindings/rtc/brcm,brcmstb-waketimer.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit d8b494a32889eae6eebb71bb4de3e14025026fe5 Author: Harry Chou Date: Fri Jun 23 03:58:11 2017 +0800 mtd: spi-nor: Add support for Spansion S25FL064L It's an 8 MiB flash with 4 KiB erase sectors. Signed-off-by: Harry Chou Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) commit e5f699d443192001613df21f123c5c3483e55888 Author: Al Viro Date: Mon Jun 26 17:02:54 2017 -0400 ipmi: get rid of field-by-field __get_user() Signed-off-by: Al Viro drivers/char/ipmi/ipmi_devintf.c | 87 +++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 50 deletions(-) commit af18ba48420e39833ccaedfe98b98fdef040c6eb Author: Alexander Sverdlin Date: Thu Jun 22 13:20:36 2017 +0200 mtd: spi-nor: Add support for mx66u51235f This chip supports stateless 4-byte opcodes, dual and quad read and uniform 4K-byte erase. Signed-off-by: Alexander Sverdlin Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) commit 98633258935bd793793c5d53da889cf0b050b9e4 Author: Ondrej Zary Date: Sun Jun 25 22:25:36 2017 +0200 sata_via: Enable optional hotplug on VT6420 VT6420 seems to have the same hotplug capability as VT6421. However, enabling hotplug needs to expose SCR registers which can cause problems. It works for me but might break elsewhere. So add a module parameter vt6420_hotplug to enable this feature. Signed-off-by: Ondrej Zary Signed-off-by: Tejun Heo drivers/ata/sata_via.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 8b9e04f282c76786fad1a031b38e279bfababd9c Author: Al Viro Date: Mon Jun 26 16:47:01 2017 -0400 ipmi: get COMPAT_IPMICTL_RECEIVE_MSG in sync with the native one We want to know if copyout has succeeded before we commit to freeing msg. Signed-off-by: Al Viro drivers/char/ipmi/ipmi_devintf.c | 248 ++++++++++++++++++--------------------- 1 file changed, 115 insertions(+), 133 deletions(-) commit 11d2a2ffa881c971bab065d6e38c33849f35e7bc Author: Andrew F. Davis Date: Tue Jun 13 18:45:13 2017 -0500 remoteproc/keystone: Ensure the DSPs are in reset in probe The DSPs are expected to be in reset when the driver probes a device. If the DSPs are out of reset in probe, the system may crash when the firmware is being loaded. So, add a check to make sure the DSP resets are asserted, and if not, throw a eye-catchy warning and assert the resets specifically. Signed-off-by: Andrew F. Davis [s-anna@ti.com: replace warning with a WARN] Signed-off-by: Suman Anna Acked-by: Santosh Shilimkar Signed-off-by: Bjorn Andersson drivers/remoteproc/keystone_remoteproc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e88bb8f7a12c1325e312c214f157109d56b06f76 Author: Suman Anna Date: Tue Jun 13 18:45:12 2017 -0500 remoteproc/keystone: Add a remoteproc driver for Keystone 2 DSPs The Texas Instrument's Keystone 2 family of SoCs has 1 or more TMS320C66x DSP Core Subsystems (C66x CorePacs). Each subsystem has a C66x Fixed/Floating-Point DSP Core, with 32KB of L1P and L1D SRAMs, that can be configured and partitioned as either RAM and/or Cache, and 1 MB of L2 SRAM. The CorePac also includes an Internal DMA (IDMA), External Memory Controller (EMC), Extended Memory Controller (XMC) with a Memory Protection and Address Extension (MPAX) unit, a Bandwidth Management (BWM) unit, an Interrupt Controller (INTC) and a Powerdown Controller (PDC). A new remoteproc module is added to perform the device management of these DSP devices. The driver expects the firmware names to be of the form "keystone-dsp-fw", where X is the corresponding DSP number, and uses the standard remoteproc core ELF loader. The support is limited to images only using the DSP internal memories at the moment. This remoteproc driver is also designed to work with virtio, and uses the IPC Generation registers for performing the virtio signalling and getting notified of exceptions. The driver currently supports the 66AK2H/66AK2K, 66AK2L and 66AK2E SoCs. Signed-off-by: Suman Anna Signed-off-by: Sam Nelson Signed-off-by: Andrew F. Davis Acked-by: Santosh Shilimkar Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 13 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/keystone_remoteproc.c | 515 +++++++++++++++++++++++++++++++ 3 files changed, 529 insertions(+) commit fd7c7041a4c0b284fab2509aed4dc1151b4ca700 Author: Suman Anna Date: Tue Jun 13 18:45:11 2017 -0500 dt-bindings: remoteproc: Add Keystone DSP remoteproc binding Add the device tree bindings document for the Texas Instrument's Keystone 2 DSP remoteproc devices. Signed-off-by: Suman Anna Signed-off-by: Sam Nelson Acked-by: Rob Herring Acked-by: Santosh Shilimkar Signed-off-by: Bjorn Andersson .../bindings/remoteproc/ti,keystone-rproc.txt | 133 +++++++++++++++++++++ 1 file changed, 133 insertions(+) commit 8ba1ddb31f528cb45be39b7f3b600261afaa7920 Author: Matthew R. Ochs Date: Wed Jun 21 21:16:54 2017 -0500 scsi: cxlflash: Update TMF command processing Currently, the SCSI command presented to the device reset handler is used to send TMFs to the AFU for a device reset. This behavior is incorrect as the command presented is an actual command and not a special notification. As such, it should only be used for reference and not be acted upon. Additionally, the existing TMF transmission routine does not account for actual errors from the hardware, only reflecting failure when a timeout occurs. This can lead to a condition where the device reset handler is presented with a false 'success'. Update send_tmf() to dynamically allocate a private command for sending the TMF command and properly reflect failure when the completed command indicates an error or was aborted. Detect TMF commands during response processing and avoid scsi_done() for these types of commands. Lastly, update comments in the TMF processing paths to describe the new behavior. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 65 ++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 21 deletions(-) commit 479ad8e9d48c4d82c92417b012193e967fc33b8a Author: Matthew R. Ochs Date: Wed Jun 21 21:16:44 2017 -0500 scsi: cxlflash: Remove zeroing of private command data The SCSI core now zeroes the per-command private data area prior to calling into the LLD. Replace the clearing operation that takes place when the private command data reference is obtained with a routine that performs common initializations. The zeroing that takes place in the device reset path remains intact as the private command data associated with the specified SCSI command is not guaranteed to be cleared. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 11 +++++++++-- drivers/scsi/cxlflash/main.c | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) commit 3223c01aa1cec60d59bd218aca5e202b558d225a Author: Matthew R. Ochs Date: Wed Jun 21 21:16:33 2017 -0500 scsi: cxlflash: Support WS16 unmap The cxlflash driver supports performing a write-same16 to scrub virtual luns when they are released by a user. To date, AFUs for adapters that are supported by cxlflash do not have the capability to unmap as part of the WS operation. This can lead to fragmented flash devices which results in performance degradation. Future AFUs can optionally support unmap write-same commands and reflects this support via the context control register. This provides userspace applications with direct visibility such that they need not depend on a host API. Detect unmap support during cxlflash initialization by reading the context control register associated with the primary hardware queue. Update the existing write_same16() routine to set the unmap bit in the CDB when unmap is supported by the host. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 1 + drivers/scsi/cxlflash/main.c | 12 ++++++++++++ drivers/scsi/cxlflash/sislite.h | 1 + drivers/scsi/cxlflash/vlun.c | 1 + 4 files changed, 15 insertions(+) commit bc88ac47d5cb11c7dd9896781f793fae519d53fa Author: Matthew R. Ochs Date: Wed Jun 21 21:16:22 2017 -0500 scsi: cxlflash: Support AFU debug Adopt the SISLite AFU debug capability to allow future CXL Flash adapters the ability to better debug AFU issues. Update the SISLite header with the changes necessary to support AFU debug operations and create a host ioctl interface for user debug software. Also update the cxlflash documentation to describe this new host ioctl. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen Documentation/powerpc/cxlflash.txt | 14 ++++++ drivers/scsi/cxlflash/common.h | 5 ++ drivers/scsi/cxlflash/main.c | 96 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/cxlflash/main.h | 1 + drivers/scsi/cxlflash/sislite.h | 2 + include/uapi/scsi/cxlflash_ioctl.h | 37 +++++++++++++-- 6 files changed, 152 insertions(+), 3 deletions(-) commit 9cf43a360450ddd758b0021d1b55f1cc5643b9ed Author: Matthew R. Ochs Date: Wed Jun 21 21:16:13 2017 -0500 scsi: cxlflash: Support LUN provisioning Adopt the SISLite AFU LUN provisioning capability to allow future CXL Flash adapters the ability to better manage storage. Update the SISLite header with the changes necessary to support LUN provision operations and create a host ioctl interface for user LUN management software. Also update the cxlflash documentation to describe this new host ioctl. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen Documentation/powerpc/cxlflash.txt | 31 +++++++++++ drivers/scsi/cxlflash/common.h | 5 ++ drivers/scsi/cxlflash/main.c | 107 ++++++++++++++++++++++++++++++++++++- drivers/scsi/cxlflash/main.h | 5 ++ drivers/scsi/cxlflash/sislite.h | 22 +++++++- include/uapi/scsi/cxlflash_ioctl.h | 31 +++++++++-- 6 files changed, 192 insertions(+), 9 deletions(-) commit efa1c818d3458fe97d8f83f40051518b44183234 Author: Matthew R. Ochs Date: Wed Jun 21 21:16:02 2017 -0500 scsi: cxlflash: Refactor AFU capability checking The existing AFU capability checking infrastructure is closely tied to the command mode capability bits. In order to support new capabilities, refactor the existing infrastructure to be more generic. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d6e32f530df9827070c45b55a6c67dfa8562184c Author: Matthew R. Ochs Date: Wed Jun 21 21:15:42 2017 -0500 scsi: cxlflash: Introduce host ioctl support As staging for supporting various host management functions, add a host ioctl infrastructure to filter ioctl commands and perform operations that are common for all host ioctls. Also update the cxlflash documentation to create a new section for documenting host ioctls. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen Documentation/ioctl/ioctl-number.txt | 2 +- Documentation/powerpc/cxlflash.txt | 19 +++++- drivers/scsi/cxlflash/main.c | 121 ++++++++++++++++++++++++++++++++++- include/uapi/scsi/cxlflash_ioctl.h | 31 ++++++++- 4 files changed, 168 insertions(+), 5 deletions(-) commit cf2430279006e4afa67dfa4cf952ded38c7ed5b4 Author: Matthew R. Ochs Date: Wed Jun 21 21:15:31 2017 -0500 scsi: cxlflash: Separate AFU internal command handling from AFU sync specifics To date the only supported internal AFU command is AFU sync. The logic to send an internal AFU command is embedded in the specific AFU sync handler and would need to be duplicated for new internal AFU commands. In order to support new internal AFU commands, separate code that is common for AFU internal commands into a generic transmission routine and support passing back command status through an IOASA structure. The first user of this new routine is the existing AFU sync command. As a cleanup, use a descriptive name for the AFU sync command instead of a magic number. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 79 ++++++++++++++++++++++++++--------------- drivers/scsi/cxlflash/sislite.h | 2 ++ 2 files changed, 53 insertions(+), 28 deletions(-) commit a834a36b57d93b31f683a5d2cf7d87e3e617cb70 Author: Uma Krishnan Date: Wed Jun 21 21:15:18 2017 -0500 scsi: cxlflash: Create character device to provide host management interface The cxlflash driver currently lacks host management interface. Future devices supported by cxlflash will provide a variety of host-wide management functions. Examples include LUN provisioning, hardware debug support, and firmware download. In order to provide a way to manage the device, a character device will be created during probe of each adapter. This device will support a set of ioctls defined in the SISLite specification from which administrators can manage the adapter. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 6 +- drivers/scsi/cxlflash/main.c | 207 ++++++++++++++++++++++++++++++++++++++++- drivers/scsi/cxlflash/main.h | 1 + 3 files changed, 212 insertions(+), 2 deletions(-) commit 7c4c41f172b6d5dda1119ce5f59151bef732a058 Author: Uma Krishnan Date: Wed Jun 21 21:15:06 2017 -0500 scsi: cxlflash: Add scsi command abort handler To date, CXL flash devices do not support a single command abort operation. Instead, the SISLite specification provides a context reset operation to cleanup all pending commands for a given context. When a context reset is successful, it is guaranteed that the AFU has aborted all currently pending I/O. This sequence is less invasive than a device or host reset and can be executed to support scsi command abort requests. Add eh_abort_handler callback support to process command timeouts and abort requests. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit a1ea04b3ebd9ae5c1cd5bf48be37aba0d93c1acc Author: Uma Krishnan Date: Wed Jun 21 21:14:56 2017 -0500 scsi: cxlflash: Flush pending commands in cleanup path When the AFU is reset in an error path, pending scsi commands can be silently dropped without completion or a formal abort. This puts the onus on the cxlflash driver to notify mid-layer and indicating that the command can be retried. Once the card has been quiesced, the hardware send queue lock is acquired to prevent any data movement while the pending commands are processed. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 5 +++- drivers/scsi/cxlflash/main.c | 57 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 5 deletions(-) commit a002bf830f5df3e622e32fdbde1756bcbb6aedad Author: Uma Krishnan Date: Wed Jun 21 21:14:43 2017 -0500 scsi: cxlflash: Track pending scsi commands in each hardware queue Currently, there is no book keeping of the pending scsi commands in the cxlflash driver. This lack of tracking in-flight requests is too restrictive and requires a heavy-hammer reset each time an adapter error is encountered. Additionally, it does not allow for commands to be properly retried. In order to avoid this problem and to better handle error path command cleanup, introduce a linked list for each hardware queue that tracks pending commands. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c | 9 +++++++++ 2 files changed, 11 insertions(+) commit c2c292f45029a6850cd14c7c2fa4fc479b8f74aa Author: Uma Krishnan Date: Wed Jun 21 21:14:30 2017 -0500 scsi: cxlflash: Handle AFU sync failures AFU sync operations are not currently evaluated for failure. This is acceptable for paths where there is not a dependency on the AFU being consistent with the host. Examples include link reset events and LUN cleanup operations. On paths where there is a dependency, such as a LUN open, a sync failure should be acted upon. In the event of AFU sync failures, either log or cleanup as appropriate for operations that are dependent on a successful sync completion. Update documentation to reflect behavior in the event of an AFU sync failure. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen Documentation/powerpc/cxlflash.txt | 12 ++++++ drivers/scsi/cxlflash/superpipe.c | 34 +++++++++++++-- drivers/scsi/cxlflash/vlun.c | 88 +++++++++++++++++++++++++++----------- 3 files changed, 107 insertions(+), 27 deletions(-) commit 0b09e711189952ff9d411593a8d74ec12a956c57 Author: Uma Krishnan Date: Wed Jun 21 21:14:17 2017 -0500 scsi: cxlflash: Schedule asynchronous reset of the host A context reset failure indicates the AFU is in a bad state. At present, when such a situation occurs, no further action is taken. This leaves the adapter in an unusable state with no recoverable actions. To avoid this situation, context reset failures will be escalated to a host reset operation. This will be done asynchronously to allow the acting thread to return to the user with a failure. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 2 + drivers/scsi/cxlflash/main.c | 137 ++++++++++++++++++++++++++++++----------- 2 files changed, 104 insertions(+), 35 deletions(-) commit a96851d3372bf8ee7023712163ad3da9a3e30a29 Author: Uma Krishnan Date: Wed Jun 21 21:14:02 2017 -0500 scsi: cxlflash: Reset hardware queue context via specified register Per the SISLite specification, context_reset() writes 0x1 to the LSB of the reset register. When the AFU processes this reset request, it is expected to clear the bit after reset is complete. The current implementation simply checks that the entire value read back is not 1, instead of masking off the LSB and evaluating it for a change to 0. Should the AFU manipulate other bits during the reset (reading back a value of 0xF for example), successful completion will be prematurely indicated given the existing logic. Additionally, in the event that the context reset operation fails, there does not currently exist a way to provide feedback to the initiator of the reset. This poses a problem for the rare case that a context reset fails as the caller will proceed on the assumption that all is well. To remedy these issues, refactor the context reset routine to only mask off the LSB when evaluating for success and return status to the caller. Also update the context reset handler parameters to pass a hardware queue reference instead of a single command to better reflect that the entire queue associated with the context is impacted by the reset. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 2 +- drivers/scsi/cxlflash/main.c | 83 +++++++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 38 deletions(-) commit 539d890cecee6b5d7304914afc51b7f53150163d Author: Uma Krishnan Date: Wed Jun 21 21:13:48 2017 -0500 scsi: cxlflash: Update cxlflash_afu_sync() to return errno The cxlflash_afu_sync() routine returns a negative one to indicate any kind of failure. This makes it impossible to establish why the error occurred. Update the return codes to clearly indicate the failure cause to the caller. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 66ea9bcc392017b6df465b6f5847f6eac966a801 Author: Uma Krishnan Date: Wed Jun 21 21:13:32 2017 -0500 scsi: cxlflash: Combine the send queue locks Currently there are separate spin locks for the two supported I/O queueing models. This makes it difficult to serialize with paths outside the enqueue path. As a design simplification and to support serialization with enqueue operations, move to only a single lock that is used for enqueueing regardless of the queueing model. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 3 +-- drivers/scsi/cxlflash/main.c | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit d31b77911505bbd0cd06403bd5eff26d691ad62d Author: Christoph Hellwig Date: Fri Jun 16 09:17:11 2017 +0200 scsi: sgiwd93: switch to dma_alloc_attrs Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper. [mkp: fixed driver name] Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sgiwd93.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 106e97b92e644b7f90ce84ba02998c86b4ec747f Author: Christoph Hellwig Date: Fri Jun 16 09:17:12 2017 +0200 scsi: 53c700: switch to dma_alloc_attrs Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/53c700.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e365cab14fc8c15ad754039cde2f4e574453a61b Author: Christos Gkekas Date: Sat Jun 24 17:24:45 2017 +0100 scsi: qedi: Remove comparison of u16 idx with zero. Variable idx is defined as u16 thus statement (idx < 0) is always false and should be removed. Signed-off-by: Christos Gkekas Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_fw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba82d91b7567774242534460910530289192d212 Author: Colin Ian King Date: Mon Jun 26 14:31:10 2017 +0100 scsi: hpsa: fix spelling mistake: "encrypytion" -> "encryption" Trivial fix to spelling mistake in dev_info message Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0ef10c9a42ee2008a5106d04ed34a53b9c6e6c6 Author: John Garry Date: Mon Jun 26 18:27:28 2017 +0800 scsi: hisi_sas: redefine hisi_sas_phy.phy_type as u32 Element phy_type is a bitmask and it only ever has 2 bits possibly set, and it is overkill to define as a u64, so redefine as a u32. This change resolves static code check complaint that "phy->phy_type &= ~PORT_TYPE_SAS;" would unintentionally clear the high 32 bits as well. Structure hisi_sas_phy is also reordered to ensure packing efficiency. Reported-by: Dan Carpenter Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e9017feaaaaaaa02069cfb267b13f625f9cf6d7 Author: Bart Van Assche Date: Fri Jun 23 10:32:39 2017 -0700 scsi: Remove the definition of VLC_SA_RECEIVE_CREDENTIAL The symbolic name VLC_SA_RECEIVE_CREDENTIAL is not used anywhere in the kernel. Additionally, since SPC 5 the RECEIVE CREDENTIAL command is obsolete. The VLC_SA_RECEIVE_CREDENTIAL definition is misleading since it occurs outside the list of other variable length CDB service action codes (READ_32, WRITE_32, ...). Hence remove this definition. References: commit e9ccc998b70f ("[SCSI] Add missing SPC-4 CDB and MAINTENANCE_[IN,OUT] service action definitions") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen include/scsi/scsi_proto.h | 3 --- 1 file changed, 3 deletions(-) commit 342ffc26693b528648bdc9377e51e4f2450b4860 Author: Seth Forshee Date: Fri Jun 23 09:04:22 2017 -0500 scsi: aacraid: Don't copy uninitialized stack memory to userspace Both aac_send_raw_srb() and aac_get_hba_info() may copy stack allocated structs to userspace without initializing all members of these structs. Clear out this memory to prevent information leaks. Fixes: 423400e64d377 ("scsi: aacraid: Include HBA direct interface") Fixes: c799d519bf088 ("scsi: aacraid: Retrieve HBA host information ioctl") Signed-off-by: Seth Forshee Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commctrl.c | 2 ++ 1 file changed, 2 insertions(+) commit 1d32a62c74b3bcb69822b0f4745af5410cfec3a7 Author: Dan Carpenter Date: Fri Jun 23 10:02:00 2017 +0300 scsi: bnx2i: missing error code in bnx2i_ep_connect() If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead of an error pointer. It results in a NULL dereference in iscsi_if_ep_connect(). Fixes: cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.") Signed-off-by: Dan Carpenter Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/bnx2i/bnx2i_iscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 06d9eb4e71c316f231dc079e66b58592d733c737 Author: Colin Ian King Date: Thu Jun 22 16:52:19 2017 +0100 scsi: hptiop: make function hptiop_iop_request_callback_itl static The function hptiop_iop_request_callback_itl does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'hptiop_iop_request_callback_itl' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/hptiop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c9e27703594131d0f170f27ddb1c12a4eb599c6 Author: Varun Prakash Date: Thu Jun 22 15:47:49 2017 +0530 scsi: cxgb4i: assign rxqs in round robin mode Assign rxq to TCP connections in round robin mode to use all available rxqs. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 5 ++++- drivers/scsi/cxgbi/libcxgbi.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit 134699d2a896c68781da7416904787011988738b Author: Tyrel Datwyler Date: Wed Jun 21 16:24:39 2017 -0400 scsi: fix typos and grammar in comments of scsi_transport_fc.c Signed-off-by: Tyrel Datwyler Reviewed-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cb45e5295a21eba23edc64839cd60122805f37f3 Author: James Smart Date: Wed Jun 21 10:51:23 2017 -0700 scsi: lpfc: fix refcount error on node list A change in remote port removal introduced a spurious put which can cause a premature structure teardown. The affects were most notable when the driver attempted to unload as a null pointer would be hit. Fix by removing the unnecessary put. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 7 ------- 1 file changed, 7 deletions(-) commit 00cefeb964f525672b5344446e5bb72188b03e38 Author: James Smart Date: Wed Jun 21 10:37:58 2017 -0700 scsi: lpfc: Fix nvme io stoppage after link bounce On link down, transport is calling driver to abort outstanding ios. Driver erroneously rejects the abort if the port indicates it isn't logged in - which will be the case after the link down. Thus, the io can't clean up. This prevents reconnection at the transport level. Fix by allowing abort to proceed. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) commit e72c9a2a67a6400c8ef3d01d4c461dbbbfa0e1f0 Author: Paolo Bonzini Date: Wed Jun 21 16:35:46 2017 +0200 scsi: virtio_scsi: let host do exception handling virtio_scsi tries to do exception handling after the default 30 seconds timeout expires. However, it's better to let the host control the timeout, otherwise with a heavy I/O load it is likely that an abort will also timeout. This leads to fatal errors like filesystems going offline. Disable the 'sd' timeout and allow the host to do exception handling, following the precedent of the storvsc driver. Hannes has a proposal to introduce timeouts in virtio, but this provides an immediate solution for stable kernels too. [mkp: fixed typo] Reported-by: Douglas Miller Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Hannes Reinecke Cc: linux-scsi@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Martin K. Petersen drivers/scsi/virtio_scsi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 49541a04b12ff0f4086c41d71ee5d3000d64a387 Author: Johannes Berg Date: Wed Jun 21 13:40:05 2017 +0200 scsi: qla2xxx: don't include There's no need to use the static UTS_RELEASE string, since utsname()->release contains the same. This avoids rebuilding this file for every change of the release string. Signed-off-by: Johannes Berg Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/tcm_qla2xxx.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit d821bbdae4f3187ffd52877265f8eab25e21d3ba Author: Kefeng Wang Date: Wed Jun 21 10:48:30 2017 +0800 scsi: fc: drop residual tsk_mgmt_response and it_nexus_response After commit 556e26a70b64 ("scsi: remove tsk_mgmt_response and it_nexus_response transport methods"), the target driver support was removed totally. Drop the residual. Signed-off-by: Kefeng Wang Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen include/scsi/scsi_transport_fc.h | 4 ---- 1 file changed, 4 deletions(-) commit 054c62f5b7a45a7142982f68e5d05be158775fbf Author: Varun Prakash Date: Tue Jun 20 19:41:21 2017 +0530 scsi: csiostor: update module version Add -ko to the module version similar to module version of other Chelsio drivers. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c11712ad0e1aa38154854a2a3efb1f4a90a059d Author: Martin K. Petersen Date: Thu May 25 09:34:30 2017 -0400 scsi: sd: Use sysfs_match_string() Avoid unnecessary snprintf() when formatting variables for display in sysfs and switch to sysfs_match_string() for validating user input. Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 71 +++++++++++++++++++++++-------------------------------- 1 file changed, 29 insertions(+), 42 deletions(-) commit 6934be4f016311cf88c316dad5c75e4ccf8a7fc0 Author: Christoph Hellwig Date: Mon Jun 19 14:27:24 2017 +0200 scsi: scsi_dh_alua: remove synchronous STPG support Since 9c58b395 ("scsi: scsi_devinfo: remove synchronous ALUA for NETAPP devices") this code is unused. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 27 +++++---------------------- include/scsi/scsi_device.h | 1 - 2 files changed, 5 insertions(+), 23 deletions(-) commit 496c91bbc9109ff99907d2a94fccb7d8d4349010 Author: Christoph Hellwig Date: Mon Jun 19 14:27:23 2017 +0200 scsi: remove various unused blist flags Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 25 ++----------------------- include/scsi/scsi_devinfo.h | 9 --------- 2 files changed, 2 insertions(+), 32 deletions(-) commit 3930d7309807ba0bfa460dfa9ed68d5560347dd2 Author: Long Li Date: Tue Jun 13 14:34:05 2017 -0700 scsi: storvsc: use default I/O timeout handler for FC devices FC disks issue I/O directly to the host storage port driver, this is diffirent to VHD disks where I/O is virtualized and timeout is handled by the host VSP (Virtualization Service Provider). FC disks are usually setup in a multipath system, and they don't want to reset timer on I/O timeout. Timeout is detected by multipath as a good time to failover and recover. Signed-off-by: Long Li Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5cc973f09e21b5a2f746307641879bc9f1da623b Author: Colin Ian King Date: Mon May 15 15:56:05 2017 +0100 scsi: aacraid: fix leak of data from stack back to userspace The fields sense_data_size and sense_data are unitialized garbage from the stack and are being copied back to userspace. Fix this leak of stack information by ensuring they are zero'd. Detected by CoverityScan, CID#1435473 ("Uninitialized scalar variable") Fixes: 423400e64d377 ("scsi: aacraid: Include HBA direct interface") Signed-off-by: Colin Ian King Acked-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commctrl.c | 2 ++ 1 file changed, 2 insertions(+) commit 239751edad27d4fae964fb1f4ca1fedd742c8365 Author: Daniel Lezcano Date: Tue Jun 6 23:07:51 2017 +0200 clocksource/drivers/sun4i: Switch to the timer-of common init Previously a framework to factor out the drivers init function has been merged. Use this common framework in this driver, we get: Before: text data bss dec hex filename 1787 384 12 2183 887 drivers/clocksource/sun4i_timer.o After: text data bss dec hex filename 1407 512 0 1919 77f drivers/clocksource/sun4i_timer.o Signed-off-by: Daniel Lezcano Tested-by: Chen-Yu Tsai drivers/clocksource/Kconfig | 1 + drivers/clocksource/sun4i_timer.c | 171 +++++++++++++++++--------------------- 2 files changed, 78 insertions(+), 94 deletions(-) commit 22ece4e3df6335e691207de1198a609e761b8640 Author: Daniel Lezcano Date: Tue Jun 20 07:51:11 2017 +0200 clocksource/drivers/timer-of: Fix invalid iomap check A typo in the code checks the return value of iomap against !NULL and, thus, fails everytime the mapping succeed. Fix this by inverting the condition in the check. Signed-off-by: Daniel Lezcano drivers/clocksource/timer-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fde662d9c3e09ba54273785de4e12628b7bd9de1 Author: Mauro Carvalho Chehab Date: Sat Jun 17 12:26:40 2017 -0300 kselftest.rst: do some adjustments after ReST conversion Do some minor adjustments after ReST conversion: - On most documents, we use prepend a "$ " before command line arguments; - Prefer to use :: on the preceding line; - Split a multi-paragraph description as such. Signed-off-by: Mauro Carvalho Chehab Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/dev-tools/kselftest.rst | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 0b5fa2290637a3235898d18dc0e7a136783f1bd2 Author: Kees Cook Date: Mon Jun 26 09:24:00 2017 -0700 seccomp: Switch from atomic_t to recount_t This switches the seccomp usage tracking from atomic_t to refcount_t to gain refcount overflow protections. Cc: Elena Reshetova Cc: David Windsor Cc: Hans Liljestrand Signed-off-by: Kees Cook kernel/seccomp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 93bd70e3330be45542c455dde11d8dc657ab3044 Author: Kees Cook Date: Mon Mar 20 16:41:35 2017 -0700 seccomp: Adjust selftests to avoid double-join While glibc's pthread implementation is rather forgiving about repeat thread joining, Bionic has recently become much more strict. To deal with this, actually track which threads have been successfully joined and kill the rest at teardown. Based on a patch from Paul Lawrence. Cc: Paul Lawrence Signed-off-by: Kees Cook tools/testing/selftests/seccomp/seccomp_bpf.c | 51 ++++++++++++++++++--------- 1 file changed, 34 insertions(+), 17 deletions(-) commit 131b63515932d18a3b1a60db3958f3c0dd5462bc Author: Kees Cook Date: Thu Feb 23 09:24:24 2017 -0800 seccomp: Clean up core dump logic This just cleans up the core dumping logic to avoid the braces around the RET_KILL case. Signed-off-by: Kees Cook kernel/seccomp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8c08f0d5c6fb10ff93ffb1cbf416f4f1c3a52a80 Author: Steven Rostedt (VMware) Date: Mon Jun 26 11:47:31 2017 -0400 ftrace: Have cached module filters be an active filter When a module filter is added to set_ftrace_filter, if the module is not loaded, it is cached. This should be considered an active filter, and function tracing should be filtered by this. That is, if a cached module filter is the only filter set, then no function tracing should be happening, as all the functions available will be filtered out. This makes sense, as the reason to add a cached module filter, is to trace the module when you load it. There shouldn't be any other tracing happening until then. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 2 ++ kernel/trace/ftrace.c | 20 +++++++++++++++----- kernel/trace/trace.h | 7 ++++++- 3 files changed, 23 insertions(+), 6 deletions(-) commit d7fbf8df7ca0a5c7e85db79f7005f99cb461c525 Author: Steven Rostedt (VMware) Date: Mon Jun 26 10:57:21 2017 -0400 ftrace: Implement cached modules tracing on module load If a module is cached in the set_ftrace_filter, and that module is loaded, then enable tracing on that module as if the cached module text was written into set_ftrace_filter just as the module is loaded. # echo ":mod:kvm_intel" > # cat /sys/kernel/tracing/set_ftrace_filter #### all functions enabled #### :mod:kvm_intel # modprobe kvm_intel # cat /sys/kernel/tracing/set_ftrace_filter vmx_get_rflags [kvm_intel] vmx_get_pkru [kvm_intel] vmx_get_interrupt_shadow [kvm_intel] vmx_rdtscp_supported [kvm_intel] vmx_invpcid_supported [kvm_intel] [..] Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 5985ea8bd5d1b820b909af49fbc2767a990080a6 Author: Steven Rostedt (VMware) Date: Fri Jun 23 16:05:11 2017 -0400 ftrace: Have the cached module list show in set_ftrace_filter When writing in a module filter into set_ftrace_filter for a module that is not yet loaded, it it cached, and will be executed when the module is loaded (although that is not implemented yet at this commit). Display the list of cached modules to be traced. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 3 +- kernel/trace/ftrace.c | 112 +++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 102 insertions(+), 13 deletions(-) commit 673feb9d76ab3eddde7acfd94b206e321cfc90b9 Author: Steven Rostedt (VMware) Date: Fri Jun 23 15:26:26 2017 -0400 ftrace: Add :mod: caching infrastructure to trace_array This is the start of the infrastructure work to allow for tracing module functions before it is loaded. Currently the following command: # echo :mod:some-mod > set_ftrace_filter will enable tracing of all functions within the module "some-mod" if it is loaded. What we want, is if the module is not loaded, that line will be saved. When the module is loaded, then the "some-mod" will have that line executed on it, so that the functions within it starts being traced. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 142 +++++++++++++++++++++++++++++++++++++++++++++++--- kernel/trace/trace.h | 12 +++++ 2 files changed, 148 insertions(+), 6 deletions(-) commit 1ba5c08b58a0c21fca222f1bf2fde184aa26103f Author: Corentin Labbe Date: Tue Jun 6 14:17:39 2017 +0200 kernel/module.c: suppress warning about unused nowarn variable This patch fix the following warning: kernel/module.c: In function 'add_usage_links': kernel/module.c:1653:6: warning: variable 'nowarn' set but not used [-Wunused-but-set-variable] [jeyu: folded in first patch since it only swapped the function order so that del_usage_links can be called from add_usage_links] Signed-off-by: Corentin Labbe Signed-off-by: Jessica Yu kernel/module.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 77641dacead2cbfe22d10f4e7c07867d86900057 Author: Colin Ian King Date: Fri Jun 23 09:48:55 2017 +0100 EDAC, pnd2: Make function sbi_send() static The function sbi_send() is local to just pnd2_edac.c and does not need to be in global scope, so make it static. Signed-off-by: Colin Ian King Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170623084855.9197-1-colin.king@canonical.com Signed-off-by: Borislav Petkov drivers/edac/pnd2_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32288daf3f2439f57167c03cd679c2eba28923b7 Author: Christophe JAILLET Date: Mon Jun 26 14:35:32 2017 +0200 RAS/CEC: Check the correct variable in the debugfs error handling Check the correct variable when handling a potential error from debugfs_create_file(). Most likely a copy-paste botch. [ Rewrite commit message. ] Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector") Signed-off-by: Christophe JAILLET Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170623062440.6726-1-christophe.jaillet@wanadoo.fr drivers/ras/cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2de64ec52659870b4fdef5bf08f265ce5fe1ccc Author: Yazen Ghannam Date: Mon Jun 26 14:35:31 2017 +0200 x86/mce: Always save severity in machine_check_poll() The MCE severity gives a hint as to how to handle the error. The notifier blocks can then use the severity to decide on an action. It's not necessary for machine_check_poll() to filter errors for the notifier chain, since each block will check its own set of conditions before handling an error. Also, there isn't any urgency for machine_check_poll() to make decisions based on severity like in do_machine_check(). If we can assume that a severity is set then we can use it in more notifier blocks. For example, the CEC block could check for a "KEEP" severity rather than checking bits in the status. This isn't possible now since the severity is not set except for "DEFFRRED/UCNA" errors with a valid address. Save the severity since we have it, and let the notifier blocks decide if they want to do anything. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/1498074402-98633-1-git-send-email-Yazen.Ghannam@amd.com arch/x86/kernel/cpu/mcheck/mce.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d7f7dc7b88ed7e98f6e503f821b60ace206a35bc Author: Colin Ian King Date: Mon Jun 26 14:35:33 2017 +0200 x86/microcode: Make a couple of symbols static The helper function __load_ucode_amd() and pointer intel_ucode_patch do not need to be in global scope, so make them static. Fixes those sparse warnings: "symbol '__load_ucode_amd' was not declared. Should it be static?" "symbol 'intel_ucode_patch' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/20170622095736.11937-1-colin.king@canonical.com arch/x86/kernel/cpu/microcode/amd.c | 2 +- arch/x86/kernel/cpu/microcode/intel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bf22ff45bed664aefb5c4e43029057a199b7070c Author: Jeffy Chen Date: Mon Jun 26 19:33:34 2017 +0800 genirq: Avoid unnecessary low level irq function calls Check irq state in enable/disable/unmask/mask_irq to avoid unnecessary low level irq function calls. This has two advantages: - Conditionals are faster than hardware access - Solves issues with the underlying refcounting of the pinctrl infrastructure Suggested-by: Thomas Gleixner Signed-off-by: Jeffy Chen Signed-off-by: Thomas Gleixner Cc: tfiga@chromium.org Cc: briannorris@chromium.org Cc: dianders@chromium.org Link: http://lkml.kernel.org/r/1498476814-12563-2-git-send-email-jeffy.chen@rock-chips.com kernel/irq/chip.c | 53 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 20 deletions(-) commit d829b8fb2431595422289cfc210f0a955a8bec74 Author: Jeffy Chen Date: Mon Jun 26 19:33:33 2017 +0800 genirq: Set irq masked state when initializing irq_desc The irq default state is set to disabled when allocating irq desc, but the masked state flag is not set. This is inconsistent vs. the state tracking logic which is used to prevent unnecessary calls to hardware level irq chip functions. Set the masked state flag as well. Signed-off-by: Jeffy Chen Signed-off-by: Thomas Gleixner Cc: tfiga@chromium.org Cc: briannorris@chromium.org Cc: dianders@chromium.org Link: http://lkml.kernel.org/r/1498476814-12563-1-git-send-email-jeffy.chen@rock-chips.com kernel/irq/irqdesc.c | 1 + 1 file changed, 1 insertion(+) commit 97ae021ab818fe29ac78d3acc0ecc6d85fc7cd5b Author: Greg Kroah-Hartman Date: Mon Jun 26 13:51:14 2017 +0200 Revert "staging: fsl-mc: drop useless #includes" This reverts commit bb4a64b79f3b9973316e775f6c2910a98b6a562a. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 2 ++ 1 file changed, 2 insertions(+) commit 2246ad16be757e4eaa4a32114ae0b623bb4bf6e2 Author: Greg Kroah-Hartman Date: Mon Jun 26 13:51:11 2017 +0200 Revert "staging: fsl-mc: decouple the mc-bus public headers from dprc.h" This reverts commit c6ce019edb0c9c09b8150011d4f66181952631e9. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 38 ++++++++++++------------ drivers/staging/fsl-mc/bus/dprc.c | 3 +- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 12 ++++---- drivers/staging/fsl-mc/bus/fsl-mc-private.h | 2 +- drivers/staging/fsl-mc/include/dprc.h | 46 +++++++++++++++++++++++++++-- drivers/staging/fsl-mc/include/mc.h | 41 +------------------------ 6 files changed, 71 insertions(+), 71 deletions(-) commit e903e20d7e027a3d49b52dedf419cc25dffb537b Author: Greg Kroah-Hartman Date: Mon Jun 26 13:51:08 2017 +0200 Revert "staging: fsl-mc: delete duplicated function prototypes" This reverts commit 48d3cfb3189a88e1670f609f8bd7d55839d531cf. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit a39476d62acee1520a1e59cf72b8ff4de4e09ce0 Author: Greg Kroah-Hartman Date: Mon Jun 26 13:51:05 2017 +0200 Revert "staging: fsl-mc: delete prototype of unimplemented function" This reverts commit be6faff74cda2ac1838c0f85dca3c3ce4975fa73. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 2 ++ 1 file changed, 2 insertions(+) commit ae74754d5484b88bc9f5415254dc028cc24bbf65 Author: Greg Kroah-Hartman Date: Mon Jun 26 13:51:01 2017 +0200 Revert "staging: fsl-mc: turn several exported functions static" This reverts commit 10a8593a76c7719e110e334f84a6ef2068dd4c0f. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 8 +++++--- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 5 +++-- drivers/staging/fsl-mc/include/mc-bus.h | 8 ++++++++ 3 files changed, 16 insertions(+), 5 deletions(-) commit 3943749bc4518645c9440ed206f7e44038234f37 Author: Greg Kroah-Hartman Date: Mon Jun 26 13:50:58 2017 +0200 Revert "staging: fsl-mc: move irq domain creation prototype to public header" This reverts commit b32cdde14edec1c75a2190a39e810bf41fa29a7a. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 7 +++++++ drivers/staging/fsl-mc/include/mc.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) commit 2f81d686ad91d6ad4a2818a657500c80962cf25f Author: Greg Kroah-Hartman Date: Mon Jun 26 13:50:54 2017 +0200 Revert "staging: fsl-mc: move couple of definitions to public header" This reverts commit 7eba570ece326ea0da2da72f1d4142100c145827. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 9 +++++++++ drivers/staging/fsl-mc/include/mc.h | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 8a325e9f77fe3c1de760328c5e52ea48d617725f Author: Greg Kroah-Hartman Date: Mon Jun 26 13:50:51 2017 +0200 Revert "staging: fsl-mc: move rest of mc-bus.h to private header" This reverts commit af4376710cc5188c42eb473676f6c9d2a16692c4. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-private.h | 61 ----------------- .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 1 + drivers/staging/fsl-mc/bus/mc-io.c | 1 + drivers/staging/fsl-mc/include/mc-bus.h | 77 ++++++++++++++++++++++ 8 files changed, 83 insertions(+), 61 deletions(-) commit 1b06739ca6b47646af368635f393235eba82e749 Author: Greg Kroah-Hartman Date: Mon Jun 26 13:50:48 2017 +0200 Revert "staging: fsl-mc: remove dpmng API files" This reverts commit b065307fe0ad7859f01ce8560e6bdc590324561a. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpmng.c | 74 +++++++++++++++++++++++++++++++++ drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 53 +---------------------- drivers/staging/fsl-mc/include/dpmng.h | 67 +++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+), 52 deletions(-) commit 94ff934d8247bd9150142d31ef3d8ef898b6ba28 Author: Greg Kroah-Hartman Date: Mon Jun 26 13:50:45 2017 +0200 Revert "staging: fsl-mc: fix a few implicit includes" This reverts commit 5776aad3fe1bb87f3e4816cde8735647597da336. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpbp.c | 1 - drivers/staging/fsl-mc/bus/dpcon.c | 1 - drivers/staging/fsl-mc/bus/dpio/dpio.c | 1 - drivers/staging/fsl-mc/bus/dpmcp.c | 1 - drivers/staging/fsl-mc/bus/dprc.c | 1 - 5 files changed, 5 deletions(-) commit c409c18b1409c824736570a0e14a4255a8b1cf88 Author: Greg Kroah-Hartman Date: Mon Jun 26 13:50:41 2017 +0200 Revert "staging: fsl-mc: move mc-sys.h contents in the public header" This reverts commit 7d6e221d73904aedcbd46ce2db6a545be55d2296. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 1 + drivers/staging/fsl-dpaa2/ethernet/dpni.c | 2 +- drivers/staging/fsl-mc/bus/dpbp.c | 2 +- drivers/staging/fsl-mc/bus/dpcon.c | 2 +- drivers/staging/fsl-mc/bus/dpio/dpio.c | 2 +- drivers/staging/fsl-mc/bus/dpmcp.c | 2 +- drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +- drivers/staging/fsl-mc/bus/dprc.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 2 +- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 + drivers/staging/fsl-mc/bus/mc-io.c | 2 +- drivers/staging/fsl-mc/bus/mc-sys.c | 1 + drivers/staging/fsl-mc/include/mc-sys.h | 98 ++++++++++++++++++++++++++ drivers/staging/fsl-mc/include/mc.h | 53 -------------- 14 files changed, 110 insertions(+), 61 deletions(-) commit 57ebab2de359bb5def553ee3bdc7059b0f277bcb Author: Greg Kroah-Hartman Date: Mon Jun 26 13:50:33 2017 +0200 Revert "staging: fsl-mc: move mc-cmd.h contents in the public header" This reverts commit 9b1aa45539fb8389deb79e4a939bfc05ee45aeb5. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpni.c | 1 + drivers/staging/fsl-mc/bus/dpbp.c | 1 + drivers/staging/fsl-mc/bus/dpcon.c | 1 + drivers/staging/fsl-mc/bus/dpio/dpio.c | 1 + drivers/staging/fsl-mc/bus/dpmcp.c | 1 + drivers/staging/fsl-mc/bus/dprc.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 + drivers/staging/fsl-mc/bus/mc-sys.c | 1 + drivers/staging/fsl-mc/include/mc-cmd.h | 130 ++++++++++++++++++++++++++++++ drivers/staging/fsl-mc/include/mc.h | 95 +--------------------- 11 files changed, 140 insertions(+), 94 deletions(-) commit 63307cb1230f739c23d6b5c6a2127be4b6cd4574 Author: Greg Kroah-Hartman Date: Mon Jun 26 13:49:15 2017 +0200 Revert "staging: fsl-mc: make dprc.h header private" This reverts commit 1877e4ba2d0890244284eea101681b6f990aa2be. The whole series is broken, so back it all out. Reported-by: kbuild test robot Cc: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc.c | 2 +- drivers/staging/fsl-mc/bus/dprc.h | 268 ---------------------------- drivers/staging/fsl-mc/bus/fsl-mc-private.h | 1 - drivers/staging/fsl-mc/include/dprc.h | 268 ++++++++++++++++++++++++++++ drivers/staging/fsl-mc/include/mc.h | 1 + 5 files changed, 270 insertions(+), 270 deletions(-) commit 2748e76ddb2967c4030171342ebdd3faa6a5e8e8 Author: Jasmin Jessich Date: Sun Jun 25 18:37:11 2017 -0300 media: staging: cxd2099: Activate cxd2099 buffer mode Activate the cxd2099 buffer mode. Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/cxd2099/cxd2099.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3e8d8a085ff454527a422aafe9b7dcfa95c09cc5 Author: Jasmin Jessich Date: Sun Jun 25 18:37:10 2017 -0300 media: staging: cxd2099: Removed printing in write_block There were remaining debug prints which haven't been found earlier due to the disabled buffer mode. See commit 5abe108bdb67 ("media: staging: cxd2099: Removed useless printing in cxd2099 driver") for the already removed printings. Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/cxd2099/cxd2099.c | 3 --- 1 file changed, 3 deletions(-) commit 6475483734d86f88848fcd61db3d4c35123abcba Author: Ralph Metzler Date: Sun Jun 25 18:37:09 2017 -0300 media: staging: cxd2099: Removed useless printing in cxd2099 driver campoll and read_data are called very often and the printouts are very annoying and make the driver unusable. They seem to be left over from developing the buffer mode. Original code change by Ralph Metzler, modified by Jasmin Jessich to match current Kernel code. Signed-off-by: Ralph Metzler Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/cxd2099/cxd2099.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit dd3c5d0086e0285ba5f1fc4ce3abde0f5a4092bc Author: Ralph Metzler Date: Sun Jun 25 18:37:08 2017 -0300 media: staging: cxd2099: Fixed buffer mode The buffer mode was already implemented in this driver, but it did not work as expected. This has been fixed now, but it is still deactivated and can be activated by removing a comment at the begin of the file. Original code change by Ralph Metzler, modified by Jasmin Jessich and Daniel Scheller to match Kernel code style. Signed-off-by: Ralph Metzler Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-core.c | 1 + drivers/staging/media/cxd2099/cxd2099.c | 162 +++++++++++++++++++++-------- drivers/staging/media/cxd2099/cxd2099.h | 6 +- 3 files changed, 123 insertions(+), 46 deletions(-) commit f894165cb57922361a8cbe339e29b8c78ad4036a Author: Ralph Metzler Date: Sun Jun 25 18:37:07 2017 -0300 media: dvb_ca_en50221: Add block read/write functions Some lower level drivers may work better when sending blocks of data instead byte per byte. For this we need new function pointers in the dvb_ca_en50221 protocol structure (read_data, write_data) and the protocol needs to execute them, if they are defined. Block data transmission is done in all states except LINKINIT. Original code change by Ralph Metzler, modified by Jasmin Jessich and Daniel Scheller to match Kernel code style. Signed-off-by: Ralph Metzler Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ca_en50221.c | 137 ++++++++++++++++++++------------ drivers/media/dvb-core/dvb_ca_en50221.h | 7 ++ 2 files changed, 92 insertions(+), 52 deletions(-) commit 5dbddc99ec886b8382b0cfb9b9f52c830a344601 Author: Ralph Metzler Date: Sun Jun 25 18:37:06 2017 -0300 media: dvb_ca_en50221: Increase timeout for link init Some CAMs do a really slow initialization, which requires a longer timeout for the first response. Original code change by Ralph Metzler, modified by Jasmin Jessich to match Kernel code style. Signed-off-by: Ralph Metzler Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ca_en50221.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cb61488a2f42b14b64e8bc9496299718e92cd49a Author: Ralph Metzler Date: Sun Jun 25 18:37:05 2017 -0300 media: dvb_ca_en50221: State UNINITIALISED instead of INVALID In case of a linkinit failure change to state UNINITIALISED to re-init the CAM. Original code change by Ralph Metzler, modified by Jasmin Jessich to match Kernel code style. Signed-off-by: Ralph Metzler Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ca_en50221.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4ee92289c269dfe91e0e3858399c244dc92fa20e Author: Sakari Ailus Date: Mon Jun 26 06:26:24 2017 -0300 media: docs-rst: Document EBUSY for VIDIOC_S_FMT VIDIOC_S_FMT may return EBUSY if the device is streaming or there are buffers allocated. Document this. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit 3edb1dd13ce6f6480c1f2bffc47a49cf959fa9cb Merge: 9ad95c4 77b246b Author: Will Deacon Date: Mon Jun 26 10:54:27 2017 +0100 Merge branch 'aarch64/for-next/ras-apei' into aarch64/for-next/core Merge in arm64 ACPI RAS support (APEI/GHES) from Tyler Baicar. commit 9ad95c46c18ba828dfcf467024a45eb5b43ce769 Merge: bcde519 c0f7f7a Author: Will Deacon Date: Mon Jun 26 10:50:50 2017 +0100 Merge branch 'perf/updates' into aarch64/for-next/core Merge in arm64 perf updates: * xgene system PMUv3 support * 16-bit events for ARMv8.1 commit 532a7784c376f2332d38c4c1576843c66343713d Author: Hui Wang Date: Mon Jun 26 12:30:32 2017 +0800 ALSA: hda/realtek - There is no loopback mixer in the ALC234/274/294 We have a Lenovo machine with the codec ALC294 on it, without the patch, the Node 0x0b is regarded as the loopback mixer, but the Node 0x0b in this codec is "Vendor Defined Widget" instead of the audio mixer, please see the log below: Node 0x0b [Vendor Defined Widget] wcaps 0xf00000: Mono Control: name="Beep Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=4, ofs=0 Control: name="Beep Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=4, ofs=0 And I have consulted with Realtek, so far the ALC234/274/294 all don't have loopback mixer. Cc: Kailang Yang Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit bcde519e8c325f3cc1fcf443eb6466e6bb3a3aca Author: Luc Van Oostenryck Date: Sat Jun 24 17:42:11 2017 +0200 arm64: pass endianness info to sparse ARM64 depends on the macro __AARCH64EB__ being defined or not to correctly select or define endian-specific macros, structures or pieces of code. This macro is predefined by the compiler but sparse knows nothing about it and thus may pre-process files differently from what gcc would. Fix this by passing '-D__AARCH64EL__' or '-D__AARCH64EB__' to sparse depending of the endianness of the kernel, like defined by GCC. Note: In most case it won't change anything since most arm64 use little-endian (but an allyesconfig would use big-endian!). CC: Catalin Marinas CC: Will Deacon CC: linux-arm-kernel@lists.infradead.org Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 38cb266ad1a24e037220dc563ab46364595b17b6 Author: Jonathan Corbet Date: Fri Jun 23 14:00:13 2017 -0600 DRM: Fix an incorrectly formatted table The "supported input formats" table in dw_hdmi.h was incorrectly formatted, using "+" signs where "|" needs to be. That, in turn, causes the PDF build to fail. Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by: Jonathan Corbet Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170623140013.0703107a@lwn.net include/drm/bridge/dw_hdmi.h | 70 ++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 9902747ec57d11b27c98e53d66112ecceed43c82 Author: Thomas Gleixner Date: Mon Jun 26 10:24:27 2017 +0200 Revert "ktime: Simplify ktime_compare implementation" Thierry bisected boot failures to this simplification commit. Reverts: 3f1d472055bb ("ktime: Simplify ktime_compare implementation") Reported-by: Thierry Reding Signed-off-by: Thomas Gleixner Cc: Mariusz Skamra include/linux/ktime.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit bdbbf7d619d1fd2f1fa9eb529b7817e4faf73f5e Author: Chris Wilson Date: Thu Jun 22 11:47:22 2017 +0100 drm/i915: Clear execbuf's vma backpointer upon release commit 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array") jiggled around the error handling and replace a test that we cleaned up properly after ourselves with an assertion. That assertion failed because in the release function (moments after the assertion) we were indeed forgetting to mark the vma as cleared. The consequence was when testing an invalid relocation address, we would try to release the vma twice (following the couple of attempts to verify the address) and on the second release notice that the first release was incomplete. Testcase: igt/gem_reloc_overflow/invalid-address Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170622104722.2583-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit 51d05e1b29676a0425749a1533b87e3ad3c6f176) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 + 1 file changed, 1 insertion(+) commit b88eb199544bd23b709bd56bb9cae8bd114869b0 Author: Chris Wilson Date: Tue Jun 20 13:43:20 2017 +0100 drm/i915: Pass the right flags to i915_vma_move_to_active() i915_vma_move_to_active() takes the execobject flags and not a boolean! Instead of passing EXEC_OBJECT_WRITE we passed true [i.e. EXEC_OBJECT_NEEDS_FENCE] causing us to start tracking the vma->last_fence access and since we forgot to clear that on unbinding, we caused a use-after-free. [ 321.263854] BUG: KASAN: use-after-free in i915_gem_request_retire+0x1728/0x1740 [i915] [ 321.264001] Read of size 8 at addr ffff880100fc67d8 by task gem_exec_reloc/2868 [ 321.264181] CPU: 0 PID: 2868 Comm: gem_exec_reloc Not tainted 4.12.0-rc6-CI-Custom_2759+ #1 [ 321.264195] Hardware name: GIGABYTE GB-BXBT-1900/MZBAYAB-00, BIOS F6 02/17/2015 [ 321.264208] Call Trace: [ 321.264234] dump_stack+0x67/0x99 [ 321.264260] print_address_description+0x77/0x290 [ 321.264437] ? i915_gem_request_retire+0x1728/0x1740 [i915] [ 321.264459] kasan_report+0x269/0x350 [ 321.264487] __asan_report_load8_noabort+0x14/0x20 [ 321.264660] i915_gem_request_retire+0x1728/0x1740 [i915] [ 321.264841] ? intel_ring_context_pin+0x131/0x690 [i915] [ 321.265021] i915_gem_request_alloc+0x2c6/0x1220 [i915] [ 321.265044] ? _raw_spin_unlock_irqrestore+0x3d/0x60 [ 321.265226] i915_gem_do_execbuffer+0xac0/0x2a20 [i915] [ 321.265250] ? __lock_acquire+0xceb/0x5450 [ 321.265269] ? entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 321.265291] ? kvmalloc_node+0x6b/0x80 [ 321.265310] ? kvmalloc_node+0x6b/0x80 [ 321.265489] ? eb_relocate_slow+0xbe0/0xbe0 [i915] [ 321.265520] ? ___slab_alloc.constprop.28+0x2ab/0x3d0 [ 321.265549] ? debug_check_no_locks_freed+0x280/0x280 [ 321.265591] ? __might_fault+0xc6/0x1b0 [ 321.265782] i915_gem_execbuffer2+0x14a/0x3f0 [i915] [ 321.265815] drm_ioctl+0x4ba/0xaa0 [ 321.265986] ? i915_gem_execbuffer+0xde0/0xde0 [i915] [ 321.266017] ? drm_getunique+0x270/0x270 [ 321.266068] do_vfs_ioctl+0x17f/0xfa0 [ 321.266091] ? __fget+0x1ba/0x330 [ 321.266112] ? lock_acquire+0x390/0x390 [ 321.266133] ? ioctl_preallocate+0x1d0/0x1d0 [ 321.266164] ? __fget+0x1db/0x330 [ 321.266194] ? __fget_light+0x79/0x1f0 [ 321.266219] SyS_ioctl+0x3c/0x70 [ 321.266247] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 321.266265] RIP: 0033:0x7fcede207357 [ 321.266279] RSP: 002b:00007ffef0effe58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 321.266307] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fcede207357 [ 321.266321] RDX: 00007ffef0effef0 RSI: 0000000040406469 RDI: 0000000000000004 [ 321.266335] RBP: ffffffff812097c6 R08: 0000000000000008 R09: 0000000000000000 [ 321.266349] R10: 0000000000000008 R11: 0000000000000246 R12: ffff880116bcff98 [ 321.266363] R13: ffffffff81cb7cb3 R14: ffff880116bcff70 R15: 0000000000000000 [ 321.266385] ? __this_cpu_preempt_check+0x13/0x20 [ 321.266406] ? trace_hardirqs_off_caller+0x1d6/0x2c0 [ 321.266487] Allocated by task 2868: [ 321.266568] save_stack_trace+0x16/0x20 [ 321.266586] kasan_kmalloc+0xee/0x180 [ 321.266602] kasan_slab_alloc+0x12/0x20 [ 321.266620] kmem_cache_alloc+0xc7/0x2e0 [ 321.266795] i915_vma_instance+0x28c/0x1540 [i915] [ 321.266964] eb_lookup_vmas+0x5a7/0x2250 [i915] [ 321.267130] i915_gem_do_execbuffer+0x69a/0x2a20 [i915] [ 321.267296] i915_gem_execbuffer2+0x14a/0x3f0 [i915] [ 321.267315] drm_ioctl+0x4ba/0xaa0 [ 321.267333] do_vfs_ioctl+0x17f/0xfa0 [ 321.267350] SyS_ioctl+0x3c/0x70 [ 321.267369] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 321.267428] Freed by task 177: [ 321.267502] save_stack_trace+0x16/0x20 [ 321.267521] kasan_slab_free+0xad/0x180 [ 321.267539] kmem_cache_free+0xc5/0x340 [ 321.267710] i915_vma_unbind+0x666/0x10a0 [i915] [ 321.267880] i915_vma_close+0x23a/0x2f0 [i915] [ 321.268048] __i915_gem_free_objects+0x17d/0xc70 [i915] [ 321.268215] __i915_gem_free_work+0x49/0x70 [i915] [ 321.268234] process_one_work+0x66f/0x1410 [ 321.268252] worker_thread+0xe1/0xe90 [ 321.268269] kthread+0x304/0x410 [ 321.268285] ret_from_fork+0x27/0x40 [ 321.268346] The buggy address belongs to the object at ffff880100fc6640 which belongs to the cache i915_vma of size 656 [ 321.268550] The buggy address is located 408 bytes inside of 656-byte region [ffff880100fc6640, ffff880100fc68d0) [ 321.268741] The buggy address belongs to the page: [ 321.268837] page:ffffea000403f000 count:1 mapcount:0 mapping: (null) index:0xffff880100fc5980 compound_mapcount: 0 [ 321.269045] flags: 0x8000000000008100(slab|head) [ 321.269147] raw: 8000000000008100 0000000000000000 ffff880100fc5980 00000001001e001d [ 321.269312] raw: ffffea0004038e20 ffff880116b46240 ffff88011646c640 0000000000000000 [ 321.269484] page dumped because: kasan: bad access detected [ 321.269665] Memory state around the buggy address: [ 321.269778] ffff880100fc6680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 321.269949] ffff880100fc6700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 321.270115] >ffff880100fc6780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 321.270279] ^ [ 321.270410] ffff880100fc6800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 321.270576] ffff880100fc6880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 321.270740] ================================================================== [ 321.270903] Disabling lock debugging due to kernel taint Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101511 Fixes: 7dd4f6729f92 ("drm/i915: Async GPU relocation processing") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170620124321.1108-2-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit 25ffaa67459e988e73210543f7e05dfbf3f16163) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33b92c1e1f27078c83920fe2f38144f97536e248 Author: Rodrigo Vivi Date: Mon Jun 19 11:39:32 2017 -0700 drm/i915/cnl: Fix RMW on ddi vswing sequence. Paulo noticed that we were missing few bits clear before writing values back to the register on these RMW MMIO operations. v2: Remove "POST_" from CURSOR_COEFF_MASK. (Paulo). v3: Remove unnecessary braces. (Jani). Fixes: cf54ca8bc567 ("drm/i915/cnl: Implement voltage swing sequence.") Cc: Paulo Zanoni Cc: Manasi Navare Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1497897572-22520-1-git-send-email-rodrigo.vivi@intel.com (cherry picked from commit 1f588aeb60b4412019546ce596f179635abc2ac3) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_reg.h | 9 +++++++++ drivers/gpu/drm/i915/intel_ddi.c | 7 +++++++ 2 files changed, 16 insertions(+) commit f16bd3dda2c8bf6699e808cd9cc540cfab10e60e Author: Chuanxiao Dong Date: Mon Jun 26 15:20:50 2017 +0800 drm/i915/gvt: Fix inconsistent locks holding sequence There are two kinds of locking sequence. One is in the thread which is started by vfio ioctl to do the iommu unmapping. The locking sequence is: down_read(&group_lock) ----> mutex_lock(&cached_lock) The other is in the vfio release thread which will unpin all the cached pages. The lock sequence is: mutex_lock(&cached_lock) ---> down_read(&group_lock) And, the cache_lock is used to protect the rb tree of the cache node and doing vfio unpin doesn't require this lock. Move the vfio unpin out of the cache_lock protected region. v2: - use for style instead of do{}while(1). (Zhenyu) Fixes: f30437c5e7bf ("drm/i915/gvt: add KVMGT support") Signed-off-by: Chuanxiao Dong Cc: Zhenyu Wang Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 62d02fd1f807bf5a259a242c483c9fb98a242630 Author: Chuanxiao Dong Date: Mon Jun 26 15:20:49 2017 +0800 drm/i915/gvt: Fix possible recursive locking issue vfio_unpin_pages will hold a read semaphore however it is already hold in the same thread by vfio ioctl. It will cause below warning: [ 5102.127454] ============================================ [ 5102.133379] WARNING: possible recursive locking detected [ 5102.139304] 4.12.0-rc4+ #3 Not tainted [ 5102.143483] -------------------------------------------- [ 5102.149407] qemu-system-x86/1620 is trying to acquire lock: [ 5102.155624] (&container->group_lock){++++++}, at: [] vfio_unpin_pages+0x96/0xf0 [ 5102.165626] but task is already holding lock: [ 5102.172134] (&container->group_lock){++++++}, at: [] vfio_fops_unl_ioctl+0x5f/0x280 [ 5102.182522] other info that might help us debug this: [ 5102.189806] Possible unsafe locking scenario: [ 5102.196411] CPU0 [ 5102.199136] ---- [ 5102.201861] lock(&container->group_lock); [ 5102.206527] lock(&container->group_lock); [ 5102.211191] *** DEADLOCK *** [ 5102.217796] May be due to missing lock nesting notation [ 5102.225370] 3 locks held by qemu-system-x86/1620: [ 5102.230618] #0: (&container->group_lock){++++++}, at: [] vfio_fops_unl_ioctl+0x5f/0x280 [ 5102.241482] #1: (&(&iommu->notifier)->rwsem){++++..}, at: [] __blocking_notifier_call_chain+0x35/0x70 [ 5102.253713] #2: (&vgpu->vdev.cache_lock){+.+...}, at: [] intel_vgpu_iommu_notifier+0x77/0x120 [ 5102.265163] stack backtrace: [ 5102.270022] CPU: 5 PID: 1620 Comm: qemu-system-x86 Not tainted 4.12.0-rc4+ #3 [ 5102.277991] Hardware name: Intel Corporation S1200RP/S1200RP, BIOS S1200RP.86B.03.01.APER.061220151418 06/12/2015 [ 5102.289445] Call Trace: [ 5102.292175] dump_stack+0x85/0xc7 [ 5102.295871] validate_chain.isra.21+0x9da/0xaf0 [ 5102.300925] __lock_acquire+0x405/0x820 [ 5102.305202] lock_acquire+0xc7/0x220 [ 5102.309191] ? vfio_unpin_pages+0x96/0xf0 [ 5102.313666] down_read+0x2b/0x50 [ 5102.317259] ? vfio_unpin_pages+0x96/0xf0 [ 5102.321732] vfio_unpin_pages+0x96/0xf0 [ 5102.326024] intel_vgpu_iommu_notifier+0xe5/0x120 [ 5102.331283] notifier_call_chain+0x4a/0x70 [ 5102.335851] __blocking_notifier_call_chain+0x4d/0x70 [ 5102.341490] blocking_notifier_call_chain+0x16/0x20 [ 5102.346935] vfio_iommu_type1_ioctl+0x87b/0x920 [ 5102.351994] vfio_fops_unl_ioctl+0x81/0x280 [ 5102.356660] ? __fget+0xf0/0x210 [ 5102.360261] do_vfs_ioctl+0x93/0x6a0 [ 5102.364247] ? __fget+0x111/0x210 [ 5102.367942] SyS_ioctl+0x41/0x70 [ 5102.371542] entry_SYSCALL_64_fastpath+0x1f/0xbe put the vfio_unpin_pages in a workqueue can fix this. v2: - use for style instead of do{}while(1). (Zhenyu) v3: - rename gvt_cache_mark to gvt_cache_mark_remove. (Zhenyu) Fixes: 659643f7d814 ("drm/i915/gvt/kvmgt: add vfio/mdev support to KVMGT") Signed-off-by: Chuanxiao Dong Cc: Zhenyu Wang Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 3 +++ drivers/gpu/drm/i915/gvt/kvmgt.c | 55 ++++++++++++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 10 deletions(-) commit c03a133bba8662daecd7db09819fa369663d0ea7 Author: Laurent Pinchart Date: Sat Jun 24 13:18:54 2017 +0300 pinctrl: sh-pfc: r8a7795: Add PWM support Add pinctrl support for the PWM[0-6] pins. Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 153 +++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) commit dd36a2d9adfb03fb0ae08abe6372bcf05df38728 Merge: cbf4b38 881b556 Author: Greg Kroah-Hartman Date: Mon Jun 26 07:09:23 2017 +0200 Merge tag 'iio-for-4.13b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of IIO new device support, features and cleanups for the 4.13 cycle. A few reverts here. One was a general failure to notice a device was already supported by another driver. The second is due to a review comment pointing out that the original patch was a bad idea and would break existing systems. Reverts * bma180 - Revert addition of support for the BMA250E it is already supported by the bmc150-accel and better supported at that. Oops. * hi8435 - The fix for cleanup of the reset gpio stuff isn't a good way to go. It breaks systems where an inverting level convertor is used. The right fix is to make the original devicetree correct - even if it involves patching the devicetree in kernel. New Device Support * stm32-adc - STM32H7 support and bindings. Features * core - add a hardware triggered operating mode for systems in which the actual trigger is never seen by the kernel. This is typically only used when a device 'can' use other triggers, but if a particular magic one is enabled the interrupt is effectively handled in hardware and we never see it. * st-lsm6dsx - support active low interrupts. * stm32-adc - Make the core adc clock optional as not all hardware supported requires it. - Make the bus clock optional in the per instance driver as it may be shared by all instances of the ADC and is handled by the core. - Rework to have a data structure representing the device type specific elements. * stm32-trigger (and counter) - Use the INDIO_HARDWARE_TRIGGERED_MODE where appropriate. - Add an attribute to configure device modes for quadrature counting etc. Clean ups and minor fixes * IIO core. - use __sysfs_match_string() helper rather than open coding the same. * ad7791 - use sysfs_match_string() helper rather than open coding the same. * aspeed-adc - handle return value of clk_prepare_enable * cpcap - Fix default register values and ensure the battery thermistor is enabled correctly. - Fix the reported die temperature where we can - docs are lacking. - Remove the hung interrupt quirk as no longer happens due to fix in the mfd driver. * hi8435 - Remove &s from hi8435_info definition as unneeded and inconsistent. * hid-sensor-trgger - Add kconfig depends on IIO_BUFFER (fixes patch in previous series) * ina2xx - Make the use of iio_info_mask* elements consistent for all channels. This doesn't have any visible effect, but acts as clear documentation of which channels various resulting attributes apply to. * lpc32xx - handle the return value of clk_prepare_enable. * meson-saradc - NULL instead of 0 for pointer. * mma9551 - use NULL for GPIO connection ID to aid implementation fo ACPI support. Here the connection ID doesn't actually tell us anything and it is much easier to deal with the driver if it's not there. * mpu6050 - Fix lock issues through use of a local mux. - Replace sprintf with scnprintf as appropriate. - Check whoami against all known values. This allows for a small number of boards where we are really fishing for the part not being present at all. It is unfortunately common to have undescribed changes to use newer chips. We paper over this but just emitting a warning for those cases as long as we know about. * mxs-lradc - Fix some non static warnings. * rcar-adc - Part of making the naming for this part consistent across the kernel. * st_accel - drop some spi_device_id entries for variants with no SPI support * st_magn - drop some spi_device_id entries for variants with no SPI support. * sx9500 - Use devm_gpiod_get instead of indexed value with an index of 0 on all occasions. * twl4030 - Drop unused twl4030_get_madc_conversion as callers removed now throughout kernel. - Unexport twl4030_madc_conversion() as no used only within this driver. - Drop twl4030_madc_user_params as not used now. - Drop twl4030_madc_request.func_cb as not used now. - Fold the twl4030-madc.h header into the driver as no longer used anywhere else in the kernel. * xilinx - Handle the return value of clk_prepare_enable commit 13058e33040819c1e7da070769a3a0197dc9cdf1 Author: Sinan Kaya Date: Thu Jun 22 14:59:22 2017 -0400 dmaengine: qcom_hidma: allow ACPI/DT parameters to be overridden Parameters like maximum read/write request size and the maximum number of active transactions are currently configured in DT/ACPI. This patch allows a user to override these to fine tune performance for their application. Signed-off-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma.c | 7 +++++-- drivers/dma/qcom/hidma_mgmt.c | 47 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 3 deletions(-) commit a718d1392700bb7420ba26051ec35c20107ac981 Author: Pavel Tatashin Date: Sun Jun 25 19:27:06 2017 -0400 sparc64: fix typo in property There is a typo in a comment that propagated into code: upa-portis instead of upa-portid This problem was detected by code inspection. Fixes: eea9833453bd ("sparc64: broken %tick frequency on spitfire cpus" Signed-off-by: Pavel Tatashin Reported-by: Steven Sistare Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/kernel/prom_64.c | 2 +- arch/sparc/kernel/time_64.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 63a766a1780f9581e8885bdb64270a594a84f81a Author: Deepa Dinamani Date: Sat Jun 24 11:45:04 2017 -0700 posix-stubs: Conditionally include COMPAT_SYS_NI defines These apis only need to be defined if CONFIG_COMPAT is enabled. Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro kernel/time/posix-stubs.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit d5b7ffbfbdacc29e4db035f90665951668fa9c58 Author: Deepa Dinamani Date: Sat Jun 24 11:45:03 2017 -0700 time: introduce {get,put}_itimerspec64 As we change the user space type for the timerfd and posix timer functions to newer data types, we need some form of conversion helpers to avoid duplicating that logic. Suggested-by: Arnd Bergmann Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro include/linux/compat.h | 4 ++++ include/linux/posix-timers.h | 1 - include/linux/time.h | 13 +++++++++++++ kernel/compat.c | 21 +++++++++++++++++++++ kernel/time/time.c | 30 ++++++++++++++++++++++++++++++ 5 files changed, 68 insertions(+), 1 deletion(-) commit f59dd9c886acb3abb188e8e94a99436560976835 Author: Deepa Dinamani Date: Sat Jun 24 11:45:02 2017 -0700 time: add get_timespec64 and put_timespec64 Add helper functions to convert between struct timespec64 and struct timespec at userspace boundaries. This is a preparatory patch to use timespec64 as the basic type internally in the kernel as timespec is not y2038 safe on 32 bit systems. The patch helps the cause by containing all data conversions at the userspace boundaries within these functions. Suggested-by: Arnd Bergmann Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro include/linux/compat.h | 2 ++ include/linux/time.h | 5 +++++ kernel/compat.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ kernel/time/time.c | 28 ++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) commit 354b6382847d1d95b576d0c851df7a5743b8a2c2 Author: Krzysztof Kozlowski Date: Thu Jun 8 18:10:29 2017 +0200 m68k: defconfig: Cleanup from old Kconfig options Remove old, dead Kconfig option INET_LRO. It is gone since commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Greg Ungerer arch/m68k/configs/m5208evb_defconfig | 1 - arch/m68k/configs/m5249evb_defconfig | 1 - arch/m68k/configs/m5272c3_defconfig | 1 - arch/m68k/configs/m5275evb_defconfig | 1 - arch/m68k/configs/m5307c3_defconfig | 1 - arch/m68k/configs/m5407c3_defconfig | 1 - 6 files changed, 6 deletions(-) commit a66f9d93c18b37ac1a9a8fb710a5369b30a2f290 Author: Bjorn Andersson Date: Tue Jun 20 22:25:44 2017 -0700 MAINTAINERS: Add Qualcomm pinctrl drivers section Document the maintainership of the Qualcomm pinctrl drivers to improve the hitrate. Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij MAINTAINERS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit fcd02384f40985279a8c1e1a3994c214fe99df30 Author: Henri Roosen Date: Fri Jun 2 13:36:22 2017 +0200 rpmsg: virtio_rpmsg_bus: cleanup multiple assignment to ops Trivial cleanup: the .ops pointer is assigned twice. This patch removes the first assignment. Acked-by: Suman Anna Signed-off-by: Henri Roosen Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 3 --- 1 file changed, 3 deletions(-) commit 8578672490118fd79a0d27200f1c2e24c1444e1c Author: Henri Roosen Date: Fri Jun 2 13:36:42 2017 +0200 rpmsg: virtio_rpmsg_bus: fix nameservice address Commit 2a48d7322dc8 ("rpmsg: rpmsg_send() operations takes rpmsg_endpoint") only changed the nameservice address for virtio_rpmsg_announce_create() but did not do the same change for virtio_rpmsg_announce_destroy(). Signed-off-by: Henri Roosen Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6175294ab502f5f0d7200334c5e28d0c0f32be2 Author: Henri Roosen Date: Fri Jun 2 13:36:04 2017 +0200 rpmsg: cleanup incorrect function in dev_err message Trivial cleanup for incorrect function in dev_err message Signed-off-by: Henri Roosen Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b2599ebffb2d32e051669c0a94f8e363ad7a2e8b Author: Henri Roosen Date: Fri Jun 2 13:35:51 2017 +0200 rpmsg: virtio_rpmsg_bus: fix announce for devices without endpoint A device might not have an endpoint assigned. This patch checks if rpdev->ept has a value before dereferencing or using it. Signed-off-by: Henri Roosen Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a63c70d4dc93628147b76b4081838f913c0dbe6e Author: Suman Anna Date: Thu May 18 17:09:01 2017 -0500 remoteproc/davinci: fix unbalanced reset between start and stop ops The davinci remoteproc driver is currently de-asserting the reset in its rproc .start() ops, but is not asserting the reset in its .stop() ops. This leaves the remote processor to not boot properly when using the sysfs 'state' variable between multiple start and stop operations. On the other hand, a reset is being asserted unconditionally in the driver remove function to alleviate some of these issues. Move this reset assertion logic into the .stop() ops implementation to fix the sysfs state-machine and the unbalanced reset. The logic from remove is still effective since .stop() ops will be invoked during the remove due to the enabled 'auto-boot' support. The probe already has support for asserting the reset in case the DSP is not in reset for some reason. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/da8xx_remoteproc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 470ac62fe557b905324ccecb3a20ad686672d22e Author: Suman Anna Date: Thu May 18 17:09:00 2017 -0500 remoteproc/davinci: simplify the reset function The reset_assert() function is used to make sure the DSP remote processor is in a reset state regardless of its previous state. The driver relies on davinci_clk_reset_{assert,deassert}() functions for reset management which take in a clock parameter. The assert_reset() performs a clk_get()/clk_put() cycle to acquire the clock handle to use with this function. This is totally unnecessary and the code can be simplified to use the clock acquired during probe and directly use the reset functions, so simplify this logic. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/da8xx_remoteproc.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit c51e882cd711abfa11e29f46cd7a73ce41ba1cf4 Author: Suman Anna Date: Thu May 18 17:08:59 2017 -0500 remoteproc/davinci: Update Kconfig to depend on DMA_CMA The davinci remoteproc driver requires a CMA pool for allocating memory for virtio vrings/buffers and other sections of the firmware image. The allocations are done using the DMA API. The CMA option is currently selected automatically on systems with MMU when davinci remoteproc is enabled, switch this to a saner depends on dependency convention. The dependency is also updated to use the DMA_CMA kconfig symbol that is used for CMA allocations using the DMA API, the CMA dependency is inherited implicitly. Cc: Arnd Bergmann Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01bf693c80025a6fccc513cf99e36febc8abc3d3 Merge: 69f5797 15c35e4 Author: David S. Miller Date: Sun Jun 25 13:43:16 2017 -0700 Merge branch 'sparc64-add-MDESC-and-VIO-support-for-VCC' Jag Raman says: ==================== sparc64: Add MDESC & VIO support for VCC This series of patches is part of an effort to add VCC (Virtual Console Concentrator) support to Linux. VCC enables the virtualization of serial console on SPARC processors. VCC provides access to the guest domain's serial console. VCC depends on some core functionalities in the linux kernel for SPARC. The functionalities include LDC (Logical Domain Channels), MDESC (Machine Descriptor) and VIO (Virtual IO protocol). In order for VCC to be enabled, it requires that these core functionalities support them. This series of patches adds MDESC & VIO support to enable VCC on Linux. It is the second batch of changes to enable VCC. This version of the series addresses the following changes suggested by Dave Miller Patch 4/5: - "name" field in vdev_port md_node_info is declared as "const char *" - Code has been modified to dynamically allocate & free "name" in vdev_port md_node_info - Parameters to mdesc_get_node(), mdesc_get_node_info() & mdesc_get_node_ops() have been updated to use "const char *" Patch 6/5: - "node_name" parameter in vio_create_one() has been changed to "const char *" type from "char *" - Typecasts in vio_create_one() invocations to convert "const char *" to "char *" have been removed Patch 11/5: - Invocations of mdesc_node_get() & mdesc_get_node_info() have been updated to use the prototypes defined in patch 4/5 ==================== Signed-off-by: David S. Miller commit 15c35e4ebbe16a205856e033627e50936ab7cd99 Author: Jag Raman Date: Fri Jun 23 14:58:40 2017 -0400 sparc64: add port_id to VIO device metadata Add port_id field to VIO device metadata to identify the port of VIO device. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/include/asm/vio.h | 1 + arch/sparc/kernel/vio.c | 2 ++ 2 files changed, 3 insertions(+) commit f4d29ca7defdec9c8010a20a9ce10a71462a9978 Author: Jag Raman Date: Fri Jun 23 14:58:39 2017 -0400 sparc64: Enhance search for VIO device in MDESC Enhances search for VIO device in MDESC by leveraging already existing MDESC APIs. Enhances changes in earlier patch, "sparc: Machine description indices can vary", by using existing MD search functions. It also specifies a match function, thereby enabling device_find_child() to use it for the purpose of matching device nodes in MDESC. An API to find VDEV node in MDESC based on its md_node_info is also added. It is planned to be used by VIO device clients in the future. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/include/asm/vio.h | 5 +- arch/sparc/kernel/mdesc.c | 2 + arch/sparc/kernel/vio.c | 120 +++++++++++++++++++++---------------------- 3 files changed, 64 insertions(+), 63 deletions(-) commit aa512d5edeab267d612c6be93eb6a2368ee7a6d6 Author: Jag Raman Date: Fri Jun 23 14:58:38 2017 -0400 sparc64: enhance VIO device probing - Allocate IRQs for VIO devices during probing. - Allow clients to specify if IRQs would be allocated for a given VIO device. - Cache the device handle of the root node of channel-devices sub-tree in Machine Description (MDESC). Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/include/asm/vio.h | 5 +++++ arch/sparc/kernel/vio.c | 53 +++++++++++++++++++++++++++++++------------- 2 files changed, 42 insertions(+), 16 deletions(-) commit 110f2264b37674e99057acd249a930040fad55b1 Author: Jag Raman Date: Fri Jun 23 14:58:37 2017 -0400 sparc64: check if a client is allowed to register for MDESC notifications Check if a client is supported, by comparing against a whitelist, to register for notifications from Machine Description (MDESC) Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/kernel/mdesc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 0542eb7de7d5244d159f827a0c9bd8c01792bd13 Author: Jag Raman Date: Fri Jun 23 14:58:36 2017 -0400 sparc64: remove restriction on VIO device name size Removes restriction on VIO device's size limit. Since KOBJ_NAME_LEN has been dropped from kobject, there doesn't seem to be a restriction on the device name anymore. This limit therefore doesn't make sense. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/kernel/vio.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit e2169a32b4f03b926905be029169a8b9f0750a67 Author: Jag Raman Date: Fri Jun 23 14:58:35 2017 -0400 sparc64: refactor code to obtain cfg_handle property from MDESC Refactors code to get the cfg_handle property of a node from Machine Description (MDESC) Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/kernel/vio.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 06f3c3ac60111a2ebffdc6f6acf16847153c0589 Author: Jag Raman Date: Fri Jun 23 14:58:34 2017 -0400 sparc64: add MDESC node name property to VIO device metadata Add the MDESC node name of MDESC client to VIO device metadata. It is later used to uniquely identify a node in the MDESC. VIO & MDESC APIs are updated to handle this node name. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/include/asm/mdesc.h | 7 ++-- arch/sparc/include/asm/vio.h | 2 + arch/sparc/kernel/mdesc.c | 88 ++++++++++++++++++++++-------------------- arch/sparc/kernel/vio.c | 22 +++++++---- 4 files changed, 68 insertions(+), 51 deletions(-) commit 0ab2fcd69dbf1dad27a7cee0f608b48690134ced Author: Jag Raman Date: Fri Jun 23 14:58:33 2017 -0400 sparc64: mdesc: use __GFP_REPEAT action modifier for VM allocation During MDESC handle allocation, use the __GFP_REPEAT flag instead of __GFP_NOFAIL. If memory is not available, the caller expects a NULL pointer instead of waiting until memory is allocated. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/kernel/mdesc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 411cb4a0b3b12833731abc71059a7eeb04dc8477 Author: Jag Raman Date: Fri Jun 23 14:58:32 2017 -0400 sparc64: expand MDESC interface Add the following two APIs to Machine Description (MDESC) - mdesc_get_node: Searches for a node in the Machine Description tree based on given information about that node. - mdesc_get_node_info: Retrieves information about a given node. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/include/asm/mdesc.h | 17 ++++ arch/sparc/kernel/mdesc.c | 216 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 233 insertions(+) commit 01b7a471382c529f60f5965ecfed9a14bfccf1ab Author: Jag Raman Date: Fri Jun 23 14:58:31 2017 -0400 sparc64: skip handshake for LDC channels in RAW mode LDC channels in RAW mode does not provide any session management. No handshake protocol is defined for LDC channels in RAW mode. It's therefore skipped. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/kernel/ldc.c | 10 ++++++++++ arch/sparc/kernel/viohs.c | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit ac6bb0255430f701ea3723aac5dd06f528078567 Author: Jag Raman Date: Fri Jun 23 14:58:30 2017 -0400 sparc64: specify the device class in VIO version info. packet Specify the class of VIO device in the version info. packet. The device's class identifies the type of VIO device, whether it's DISK, CONSOLE, NETWORK, etc... This packet is used in the handshake between the client and server for this device. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/kernel/viohs.c | 1 + 1 file changed, 1 insertion(+) commit 7b6e04a3edc140a82f5e0e29e59d6dc90a629d34 Author: Jag Raman Date: Fri Jun 23 14:58:29 2017 -0400 sparc64: ensure VIO operations are defined while being used It's possible that VIO operations are not defined for some VIO clients. In that case, VIO ops pointer should be checked for NULL before being used Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/kernel/viohs.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 69f579786d2935989ab7005c7b5cdf9f06177689 Author: Arvind Yadav Date: Fri Jun 23 14:51:35 2017 +0530 sparc: kernel: apc: make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller arch/sparc/kernel/apc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1f338f8741365fd5f03ec1954e65b06ac26d60b Author: Arnd Bergmann Date: Sun Jun 25 22:30:05 2017 +0200 arm64: defconfig: remove duplicate entry This fixes a warning: warning: override: reassigning to symbol SPI_MESON_SPIFC Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 - 1 file changed, 1 deletion(-) commit dbd2667a4fb9ce4f547982b07cd69dda127c47ea Author: Nitin Gupta Date: Thu Jun 22 17:15:08 2017 -0700 sparc64: Fix gup_huge_pmd The function assumes that each PMD points to head of a huge page. This is not correct as a PMD can point to start of any 8M region with a, say 256M, hugepage. The fix ensures that it points to the correct head of any PMD huge page. Cc: Julian Calaby Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/mm/gup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dacdbb4dfc1a1a1378df8ebc914d4fe82259ed46 Author: Michael Grzeschik Date: Fri Jun 23 16:54:10 2017 +0200 net: macb: add fixed-link node support In case the MACB is directly connected to a non-mdio PHY/device, it should be possible to provide a fixed link configuration in the DT. Signed-off-by: Michael Grzeschik Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 98 ++++++++++++++++++++++--------------- drivers/net/ethernet/cadence/macb.h | 1 + 2 files changed, 60 insertions(+), 39 deletions(-) commit 24a72b77f3407a9ac173aa6978f44106ed0742d7 Merge: ca7bbc8 52f8c93 Author: David S. Miller Date: Sun Jun 25 14:45:34 2017 -0400 Merge tag 'wireless-drivers-next-for-davem-2017-06-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.13 New features and bug fixes to quite a few different drivers, but nothing really special standing out. What makes me happy that we have now more vendors actively contributing to upstream drivers. In this pull request we have patches from Broadcom, Intel, Qualcomm, Realtek and Redpine Signals, and I still have patches from Marvell and Quantenna pending in patchwork. Now that's something comparing to how things looked 11 years ago in Jeff Garzik's "State of the Union: Wireless" email: https://lkml.org/lkml/2006/1/5/671 Major changes: wil6210 * add low level RF sector interface via nl80211 vendor commands * add module parameter ftm_mode to load separate firmware for factory testing * support devices with different PCIe bar size * add support for PCIe D3hot in system suspend * remove ioctl interface which should not be in a wireless driver ath10k * go back to using dma_alloc_coherent() for firmware scratch memory * add per chain RSSI reporting brcmfmac * add support multi-scheduled scan * add scheduled scan support for specified BSSIDs * add support for brcm43430 revision 0 wlcore * add wil1285 compatible rsi * add RS9113 USB support iwlwifi * FW API documentation improvements (for tools and htmldoc) * continuing work for the new A000 family * bump the maximum supported FW API to 31 * improve the differentiation between 8000, 9000 and A000 families ==================== Signed-off-by: David S. Miller commit ca7bbc845e0aa2d9d6d252e72f0a2602ebd16361 Merge: f3ecab3 a02d036 Author: David S. Miller Date: Sun Jun 25 14:43:53 2017 -0400 Merge branch 'sctp-RFC-4960-Errata-fixes' Marcelo Ricardo Leitner says: ==================== sctp: RFC 4960 Errata fixes This patchset contains fixes for 4 Errata topics from https://tools.ietf.org/html/draft-ietf-tsvwg-rfc4960-errata-01 Namely, sections: 3.12. Order of Adjustments of partial_bytes_acked and cwnd 3.22. Increase of partial_bytes_acked in Congestion Avoidance 3.26. CWND Increase in Congestion Avoidance Phase 3.27. Refresh of cwnd and ssthresh after Idle Period Tests performed with netperf using net namespaces, with drop rates at 0%, 0.5% and 1% by netem, IPv4 and IPv6, 10 runs for each combination. I couldn't spot differences on the stats. With and without these patches the results vary in a similar way in terms of throughput and retransmissions. Tests with 20ms delay and 20ms delay + drops at 0.5% and 1% also had results in a similar way, no noticeable difference. Looking at cwnd, it was possible to notice slightly lower values being used while still sustaining same throughput profile. ==================== Signed-off-by: David S. Miller commit a02d036c027e9070ca27c156f59eb445d5405480 Author: Marcelo Ricardo Leitner Date: Fri Jun 23 19:59:36 2017 -0300 sctp: adjust ssthresh when transport is idle RFC 4960 Errata 3.27 identifies that ssthresh should be adjusted to cwnd because otherwise it could cause the transport to lock into congestion avoidance phase specially if ssthresh was previously reduced by some packet drop, leading to poor performance. The Errata says to adjust ssthresh to cwnd only once, though the same goal is achieved by updating it every time we update cwnd too. The caveat is that we could take longer to get back up to speed but that should be compensated by the fact that we don't adjust on RTO basis (as RFC says) but based on Heartbeats, which are usually way longer. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-rfc4960-errata-01#section-3.27 Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/transport.c | 2 ++ 1 file changed, 2 insertions(+) commit 4ccbd0b0b9b8b09d87c7e7b0f868eda2bed03189 Author: Marcelo Ricardo Leitner Date: Fri Jun 23 19:59:35 2017 -0300 sctp: adjust cwnd increase in Congestion Avoidance phase RFC4960 Errata 3.26 identified that at the same time RFC4960 states that cwnd should never grow more than 1*MTU per RTT, Section 7.2.2 was underspecified and as described could allow increasing cwnd more than that. This patch updates it so partial_bytes_acked is maxed to cwnd if flight_size doesn't reach cwnd, protecting it from such case. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-rfc4960-errata-01#section-3.26 Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/transport.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit e56f777af82ebbdf8302164b040128d890f100d8 Author: Marcelo Ricardo Leitner Date: Fri Jun 23 19:59:34 2017 -0300 sctp: allow increasing cwnd regardless of ctsn moving or not As per RFC4960 Errata 3.22, this condition is not needed anymore as it could cause the partial_bytes_acked to not consider the TSNs acked in the Gap Ack Blocks although they were received by the peer successfully. This patch thus drops the check for new Cumulative TSN Ack Point, leaving just the flight_size < cwnd one. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-rfc4960-errata-01#section-3.22 Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/transport.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit d0b53f40977446fdf2460b14d4544d1375a3138d Author: Marcelo Ricardo Leitner Date: Fri Jun 23 19:59:33 2017 -0300 sctp: update order of adjustments of partial_bytes_acked and cwnd RFC4960 Errata 3.12 says RFC4960 is unclear about the order of adjustments applied to partial_bytes_acked and cwnd in the congestion avoidance phase, and that the actual order should be: partial_bytes_acked is reset to (partial_bytes_acked - cwnd). Next, cwnd is increased by MTU. We were first increasing cwnd, and then subtracting the new value pba, which leads to a different result as pba is smaller than what it should and could cause cwnd to not grow as much. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-rfc4960-errata-01#section-3.12 Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/transport.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f3ecab38240b624b37e003b5089a93682b109699 Author: Mintz, Yuval Date: Sun Jun 25 11:09:12 2017 +0300 net: Remove ndo_dfwd_start_xmit Looks like commit f663dd9aaf9e ("net: core: explicitly select a txq before doing l2 forwarding") has removed the need for this dedicated xmit function [it even explicitly states so in its commit log message] but it hasn't removed the definition of the ndo. Signed-off-by: Yuval Mintz CC: Jason Wang CC: John Fastabend Signed-off-by: David S. Miller include/linux/netdevice.h | 9 --------- 1 file changed, 9 deletions(-) commit cb7257708bf89215b555d22d4f4eeaf59f5705e2 Merge: e3c42b6 ceef551 Author: David S. Miller Date: Sun Jun 25 11:44:29 2017 -0400 Merge branch 'qcom-emac-various-minor-improvements' Timur Tabi says: ==================== net: qcom/emac: various minor improvements A collection of minor fixes and features to the Qualcomm Technologies EMAC network driver. ==================== Signed-off-by: David S. Miller commit ceef551faacb1783040d9c1a10d4baad9548f37e Author: Timur Tabi Date: Fri Jun 23 14:33:30 2017 -0500 net: qcom/emac: add support for emulation systems On emulation systems, the EMAC's internal PHY ("SGMII") is not present, but is not needed for network functionality. So just display a warning message and ignore the SGMII. Tested-by: Philip Elcan Tested-by: Adam Wallis Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 867ae6abc24967188db0914de170512e36592eb3 Author: Timur Tabi Date: Fri Jun 23 14:33:29 2017 -0500 net: qcom/emac: do not reset the EMAC during initialization On ACPI systems, the driver depends on firmware pre-initializing the EMAC because we don't have access to the clocks, and the EMAC has specific clock programming requirements. Therefore, we don't want to reset the EMAC while we are completing the initialization. Tested-by: Richard Ruigrok Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 2 -- 1 file changed, 2 deletions(-) commit 03eb3eb4d4d56414efbe05a5521b2fc4ce175cb7 Author: Timur Tabi Date: Fri Jun 23 14:33:28 2017 -0500 net: qcom/emac: add shutdown function The shutdown function halts all DMA and interrupts, so that all operations are discontinued when the system shuts down, e.g. via kexec or a forced reboot. Tested-by: Tyler Baicar Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit e3c42b61ff813921ba58cfc0019e3fd63f651190 Author: Mateusz Jurczyk Date: Fri Jun 23 19:32:28 2017 +0200 af_iucv: Move sockaddr length checks to before accessing sa_family in bind and connect handlers Verify that the caller-provided sockaddr structure is large enough to contain the sa_family field, before accessing it in bind() and connect() handlers of the AF_IUCV socket. Since neither syscall enforces a minimum size of the corresponding memory region, very short sockaddrs (zero or one byte long) result in operating on uninitialized memory while referencing .sa_family. Fixes: 52a82e23b9f2 ("af_iucv: Validate socket address length in iucv_sock_bind()") Signed-off-by: Mateusz Jurczyk [jwi: removed unneeded null-check for addr] Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller net/iucv/af_iucv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 2e56c26b391810461170547509649f0c11717f65 Author: Hans Wippel Date: Fri Jun 23 19:32:27 2017 +0200 net/iucv: improve endianness handling Use proper endianness conversion for an skb protocol assignment. Given that IUCV is only available on big endian systems (s390), this simply avoids an endianness warning reported by sparse. Signed-off-by: Hans Wippel Reviewed-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller net/iucv/af_iucv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64b2f72671a9a8cbea1aa575d3ea3998987e8c53 Author: Dan Carpenter Date: Fri Jun 23 18:17:04 2017 +0300 net: dsa: mv88e6xxx: fix error code in mv88e6390_serdes_power() We're accidentally returning the wrong variable. "cmode" is uninitialized at this point so it causes a static checker warning. Fixes: 6335e9f2446b ("net: dsa: mv88e6xxx: mv88e6390X SERDES support") Signed-off-by: Dan Carpenter Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/serdes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74811a710e18c22eca1ffbf97ebd6201efea7d91 Merge: cf3db45 24a021e Author: David S. Miller Date: Sun Jun 25 11:42:09 2017 -0400 Merge branch 'nfp-add-flower-app-with-representors' Simon Horman says: ==================== nfp: add flower app with representors this series adds a flower app to the NFP driver. It initialises four types of netdevs: * PF netdev - lower-device for communication of packets to device * PF representor netdev * VF representor netdevs * Phys port representor netdevs The PF netdev acts as a lower-device which sends and receives packets to and from the firmware. The representors act as upper-devices. For TX representors attach a metadata dst to the skb which is used by the PF netdev to prepend metadata to the packet before forwarding the firmware. On RX the PF netdev looks up the representor based on the prepended metadata received from the firmware and forwards the skb to the representor after removing the metadata. Control queues are used to send and receive control messages which are used to communicate configuration information with the firmware. These are in separate vNIC to the queues belonging to the PF netdev. The control queues are not exposed to use-space via a netdev or any other means. The first 9 patches of this series provide app-independent infrastructure to instantiate representors and the remaining 3 patches provide an app which uses this infrastructure. As the name implies this app is targeted at providing offload of TC flower. Flower offload - allowing classifiers to be attached to representor netdevs - is intended to be provided by follow-up patches at which point it will become the dominant feature of the app. Minor changes since v2 noted in changelogs of individual patches. Review of v1 and v2 of this patchset have been addressed either through discussion on-list or changes in this patchset. ==================== Signed-off-by: David S. Miller commit 24a021ed77ef8d090bf15ad1ac24d29fcfe9a410 Author: Simon Horman Date: Fri Jun 23 22:12:09 2017 +0200 nfp: add VF and PF representors to flower app Initialise VF and PF representors in flower app. Based in part on work by Benjamin LaHaise, Bert van Leeuwen and Jakub Kicinski. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 85 +++++++++++++++++++++++- 1 file changed, 83 insertions(+), 2 deletions(-) commit 1025351a88a49cb2fed7d023858ce182718c0c43 Author: Simon Horman Date: Fri Jun 23 22:12:08 2017 +0200 nfp: add flower app Add app for flower offload. At this point the PF netdev and phys port representor netdevs are initialised. Follow-up work will add support for VF and PF representors and beyond that offloading the flower classifier. Based in part on work by Benjamin LaHaise and Bert van Leeuwen. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/flower/main.c | 294 +++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_app.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_app.h | 4 + 4 files changed, 300 insertions(+) commit 948faa46c05b5fb48f0bd39df426596197fa5d7e Author: Simon Horman Date: Fri Jun 23 22:12:07 2017 +0200 nfp: add support for control messages for flower app In preparation for adding a new flower app - targeted at offloading the flower classifier - provide support for control message that it will use to communicate with the NFP. Based in part on work by Bert van Leeuwen. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 159 +++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 116 +++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_app.c | 5 +- drivers/net/ethernet/netronome/nfp/nfp_app.h | 3 +- 5 files changed, 281 insertions(+), 3 deletions(-) commit 91bf82ca9eed1aa3e700a1b9fcaaa7922df6a4c7 Author: Simon Horman Date: Fri Jun 23 22:12:06 2017 +0200 nfp: add support for tx/rx with metadata portid Allow tx/rx with metadata port id. This will be used for tx/rx of representor netdevs acting as upper-devices while a pf netdev acts as a lower-device. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 1 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 57 +++++++++++++++++++--- 2 files changed, 52 insertions(+), 6 deletions(-) commit 93da7d9660ee6117672a4a9233d80600220de675 Author: Simon Horman Date: Fri Jun 23 22:12:05 2017 +0200 nfp: provide nfp_port to of nfp_net_get_mac_addr() Provide port rather than vNIC as parameter of nfp_net_get_mac_addr. This is to allow this function to be used by representor netdevs where a vNIC may have more than one physical port none of which are associated with the vNIC. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_main.h | 3 ++- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 25 +++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) commit 758238f2e7a645630c3fead7577c3fa5a36c6ad7 Author: Simon Horman Date: Fri Jun 23 22:12:04 2017 +0200 nfp: app callbacks for SRIOV Add app-callbacks for app-specific initialisation of SRIOV. Disabling SRIOV is brought forward in nfp_pci_remove() so that nfp_app_sriov_disable is called while the app still exists. This is intended to be used to implement representor netdevs for virtual ports. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app.h | 18 ++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_main.c | 42 +++++++++++++++++++++++---- 2 files changed, 55 insertions(+), 5 deletions(-) commit eadfa4c3be99eaf15670681e6ffa4d995b73594c Author: Simon Horman Date: Fri Jun 23 22:12:03 2017 +0200 nfp: add stats and xmit helpers for representors Provide helpers for stats and xmit on representor netdevs. Parts based on work by Bert van Leeuwen, Benjamin LaHaise and Jakub Kicinski. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 199 +++++++++++++++++++++- drivers/net/ethernet/netronome/nfp/nfp_net_repr.h | 28 +++ 2 files changed, 226 insertions(+), 1 deletion(-) commit 5de73ee46704c22097e46bfc276a05360d3a1ba7 Author: Simon Horman Date: Fri Jun 23 22:12:02 2017 +0200 nfp: general representor implementation Provide infrastructure to create and destroy representors of a given type. Parts based on work by Bert van Leeuwen, Benjamin LaHaise, and Jakub Kicinski. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfp_app.c | 20 +++ drivers/net/ethernet/netronome/nfp/nfp_app.h | 18 +++ drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 156 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_repr.h | 92 +++++++++++++ 5 files changed, 287 insertions(+) commit a5950182c00eb6d53a68db9f6b6c878f795657f6 Author: Simon Horman Date: Fri Jun 23 22:12:01 2017 +0200 nfp: map mac_stats and vf_cfg BARs If present map mac_stats and vf_cfg BARs. These will be used by representor netdevs to read statistics for phys port and vf representors. Also provide defines describing the layout of the mac_stats area. Similar defines are already present for the cf_cfg area. Based in part on work by Jakub Kicinski. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.h | 8 ++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 122 +++++++++++++++------ drivers/net/ethernet/netronome/nfp/nfp_port.h | 60 ++++++++++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 2 + .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 5 +- 5 files changed, 164 insertions(+), 33 deletions(-) commit a7ceb9905eed38454d28c293afc2f0acb7915d00 Author: Jakub Kicinski Date: Fri Jun 23 22:12:00 2017 +0200 nfp: move physical port init into a helper Move MAC/PHY port init into a helper to make it easier to reuse it in the representor code. Signed-off-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | 23 ++++++---------------- drivers/net/ethernet/netronome/nfp/nfp_port.c | 25 ++++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_port.h | 3 +++ 3 files changed, 34 insertions(+), 17 deletions(-) commit 9daee04ae17fb886008ba222fe8150fcc1d0d8cb Author: Jakub Kicinski Date: Fri Jun 23 22:11:59 2017 +0200 nfp: devlink add support for getting eswitch mode Add app callback for reporting eswitch mode. Non-SRIOV apps should not implement this callback, nfp_app code will then respond with -EOPNOTSUPP. Signed-off-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app.h | 15 +++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) commit 3fcece12bc1b6dcdf0986f2cd9e8f63b1f9b6aa0 Author: Jakub Kicinski Date: Fri Jun 23 22:11:58 2017 +0200 net: store port/representator id in metadata_dst Switches and modern SR-IOV enabled NICs may multiplex traffic from Port representators and control messages over single set of hardware queues. Control messages and muxed traffic may need ordered delivery. Those requirements make it hard to comfortably use TC infrastructure today unless we have a way of attaching metadata to skbs at the upper device. Because single set of queues is used for many netdevs stopping TC/sched queues of all of them reliably is impossible and lower device has to retreat to returning NETDEV_TX_BUSY and usually has to take extra locks on the fastpath. This patch attempts to enable port/representative devs to attach metadata to skbs which carry port id. This way representatives can be queueless and all queuing can be performed at the lower netdev in the usual way. Traffic arriving on the port/representative interfaces will be have metadata attached and will subsequently be queued to the lower device for transmission. The lower device should recognize the metadata and translate it to HW specific format which is most likely either a special header inserted before the network headers or descriptor/metadata fields. Metadata is associated with the lower device by storing the netdev pointer along with port id so that if TC decides to redirect or mirror the new netdev will not try to interpret it. This is mostly for SR-IOV devices since switches don't have lower netdevs today. Signed-off-by: Jakub Kicinski Signed-off-by: Sridhar Samudrala Signed-off-by: Simon Horman Signed-off-by: David S. Miller include/net/dst_metadata.h | 41 ++++++++++++++++++++++++++++++++--------- net/core/dst.c | 15 ++++++++++----- net/core/filter.c | 1 + net/ipv4/ip_tunnel_core.c | 6 ++++-- net/openvswitch/flow_netlink.c | 4 +++- 5 files changed, 50 insertions(+), 17 deletions(-) commit f91df2e4fcbfea816f8cb7e7d24d115ee56541d9 Author: Mauro Carvalho Chehab Date: Sun Jun 25 12:40:54 2017 -0300 media: dtv-core.rst: complete description of a demod driver A section talking about demod statistics implementation was recently added, but it seemed to start from nowere, without a previous description about how a demod driver would look like. Add such description, for completeness. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-core.rst | 139 +++++++++++++++++++++++++++++++++- 1 file changed, 137 insertions(+), 2 deletions(-) commit f495ab869a89caa580d201f7bf2d9944d3d9cb24 Author: Mauro Carvalho Chehab Date: Sun Jun 25 12:40:41 2017 -0300 media: dtv-core.rst: add an introduction to FE kAPI Instead of just start describing the kAPI functions, add an introduction giving a general line about a DVB driver's structure. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-core.rst | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit edfee3619c4955be38d414f25bd4f6c5c1b029ba Author: Xiaolei Li Date: Fri Jun 23 15:12:28 2017 +0800 mtd: nand: mtk: add ->setup_data_interface() hook Currently, we use the fixed ACC timing 0x10804211. This is not the best setting for each case. Actually, MTK NAND controller can adapt ACC timings dynamically according to nfi clock frequence. Implement the ->setup_data_interface() hook to optimize driver performance. Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_nand.c | 90 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 75 insertions(+), 15 deletions(-) commit c4ec13543e322d4cc68eb6018f5a8a8858d0053a Author: Xiaolei Li Date: Fri Jun 23 15:12:27 2017 +0800 mtd: nand: mtk: remove unneeded mtk_ecc_hw_init from mtk_ecc_resume There is no need to add mtk_ecc_hw_init during ecc resume, because there always takes mtk_ecc_wait_idle in the function mtk_ecc_enable. Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_ecc.c | 2 -- 1 file changed, 2 deletions(-) commit 777a8d92dfca26e63b0fe7ea9889618291512f1d Author: Xiaolei Li Date: Fri Jun 23 15:12:26 2017 +0800 mtd: nand: mtk: remove unneeded mtk_nfc_hw_init from mtk_nfc_resume chip->select_chip will do nfc runtime configuration. There is no need to do mtk_nfc_hw_init before it. Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_nand.c | 2 -- 1 file changed, 2 deletions(-) commit 88404312556c10e4bcd1aeeb75b1b7e9e3226160 Author: Xiaolei Li Date: Fri Jun 23 15:12:25 2017 +0800 mtd: nand: mtk: disable ecc irq when writing page with hwecc Currently, ecc encode irq is enabled when writing page with hwecc, but we actually do not wait for this irq done. Because NFI and ECC work in parallel, nfi irq and ecc irq almost come together. Now, there are two steps to check whether page data are totally written. First, wait for nfi irq INTR_AHB_DONE. This is to ensure all data in RAM are received by NFI. Second, polling the register NFI_ADDRCNTR till all data include ecc parity data runtime generated by ECC are sent to NAND device. So, it is redunant to enable ecc irq without waiting for it. Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_ecc.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 188986c70e09f0f3cd88e6fe14c89e439474e3ec Author: Xiaolei Li Date: Fri Jun 23 15:12:24 2017 +0800 mtd: nand: mtk: fix incorrect register setting order about ecc irq Currently, we trigger ECC HW before setting ecc irq. It is incorrect. Because ECC starts working once the register ECC_CTL_REG is set as ECC_OP_ENABLE. And this may lead an abnormal behavior of ecc irq. So, should enable ecc irq at first, then trigger ECC. Fixes: 1d6b1e464950 ("mtd: mediatek: driver for MTK Smart Device") Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_ecc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cbf4b3867875206aa548a8c6d7c886f3299d619e Author: Okash Khawaja Date: Sat Jun 17 22:32:55 2017 +0100 tty: define tty_open_by_driver when CONFIG_TTY is not defined This patch adds definition of tty_open_by_driver when CONFIG_TTY is not defined. This was supposed to have been included in commit 12e84c71b7d4ee38d51377fd494ac748ee4e6912 ("tty: export tty_open_by_driver"). The patch follows convention for other such functions and returns NULL. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman include/linux/tty.h | 3 +++ 1 file changed, 3 insertions(+) commit e4dd8bca3d5153503c1c923feb5c056124ea56ae Author: Okash Khawaja Date: Tue Jun 20 11:07:32 2017 +0100 staging: speakup: fix synth caching when synth init fails synths[] array caches currently loaded synths. synth_add checks synths[] before adding a new one. It however ignores the result of do_synth_init. So when do_synth_init fails, the failed synth is still cached. Since, as a result module loading fails too, synth_remove - which is responsible for removing the cached synth - is never called. Next time the failing synth is added again it succeeds because synth_add finds it cached inside synths[]. This patch fixes this by caching a synth only after do_synth_init succeeds. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/synth.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit eebdd3f61bac853e1a42acc59f18c642d2a02eef Author: Jaya Durga Date: Fri Jun 23 16:54:40 2017 +0530 Staging: rtl8712 : wifi.h: Fixed Macro argument reuse CHECK: Macro argument reuse 'pframe' - possible side-effects? Convert get_tofr_ds macro to inline functions to fix checkpatch check Signed-off-by: Jaya Durga Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/wifi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 24c8bd8feb30f9762ef6c37ada656f80c3871df7 Author: Derek Robson Date: Sun Jun 25 13:38:17 2017 +1200 staging: vt6655 - add parameter names Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.h | 30 ++++++++++----------- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 ++++++++++++++++++++-------------------- drivers/staging/vt6655/power.h | 16 +++-------- drivers/staging/vt6655/rf.h | 16 +++++------ 5 files changed, 57 insertions(+), 67 deletions(-) commit 178f5f0f08e3b19294faed627312876e95ba1a86 Author: Derek Robson Date: Sun Jun 25 14:00:12 2017 +1200 staging: rtl8192u - add parameter names Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 3fa4b5e58efd5c6278375be3ef30847a2914e9ce Author: Derek Robson Date: Sun Jun 25 13:54:59 2017 +1200 staging: sm750fb - add parameter names Fixed checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.h | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit d1c7b52c9695dc9449533b6b4cbbbf0589aa92ab Author: Derek Robson Date: Sun Jun 25 13:49:38 2017 +1200 staging: rtl8723bs - remove asm includes Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b8edc44c423cc5fbe42c42600c3254c51f5d8199 Author: Derek Robson Date: Sun Jun 25 13:43:56 2017 +1200 staging: unisys: visorhba - octal permissions Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81a6a4f0921249c24b490325a178d5ac3847ea55 Author: Galo Navarro Date: Sat Jun 24 20:32:55 2017 +0200 staging: rtl8188eu: style fixes Fix multiple style issues (CHECK spaces preferred around that $operator). Signed-off-by: Galo Navarro Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0f2f02d1b57220951b9ae69abbcaa403163ee41b Author: Gilad Ben-Yossef Date: Sun Jun 25 10:47:24 2017 +0300 staging: ccree: use signal safe completion wait We were waiting for a completion notification of HW DMA operation using an interruptible wait which can result in data corruption if a signal interrupted us while DMA was not yet completed. Fix this by moving to uninterrupted wait. Fixes: abefd6741d ("staging: ccree: introduce CryptoCell HW driver"). Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_request_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d255b343f52b78acff3d0af95b235a3b4f353377 Author: Gilad Ben-Yossef Date: Sun Jun 25 10:47:23 2017 +0300 staging: ccree: add DT bus coherency detection The ccree driver has build time configurable support to work on top of coherent (e.g. ACP) vs. none coherent bus connections. Turn it to run-time configurable option based on device tree. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/Kconfig | 9 --------- drivers/staging/ccree/ssi_buffer_mgr.c | 37 ++++++++++++++++++---------------- drivers/staging/ccree/ssi_config.h | 20 ------------------ drivers/staging/ccree/ssi_driver.c | 12 ++++++++--- drivers/staging/ccree/ssi_driver.h | 3 +++ 5 files changed, 32 insertions(+), 49 deletions(-) commit 675ef02fcb1b958eebbd6cd013ab227396f1d2d5 Author: Gilad Ben-Yossef Date: Sun Jun 25 10:47:22 2017 +0300 staging: ccree: add clock management support Some SoC which implement CryptoCell have a dedicated clock tied to it, some do not. Implement clock support if exists based on device tree data and tie power management to it. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/Makefile | 2 +- drivers/staging/ccree/ssi_driver.c | 43 +++++++++++++++++++++++---- drivers/staging/ccree/ssi_driver.h | 5 +++- drivers/staging/ccree/ssi_pm.c | 13 +++++---- drivers/staging/ccree/ssi_pm_ext.c | 60 -------------------------------------- drivers/staging/ccree/ssi_pm_ext.h | 33 --------------------- 6 files changed, 50 insertions(+), 106 deletions(-) commit b091fadb12b5544e632a5361302b5580b82bfa5b Author: Gilad Ben-Yossef Date: Sun Jun 25 10:47:21 2017 +0300 staging: ccree: remove unused function The function set_ack_last was not used anywhere. Remove it. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_hw_queue_defs.h | 12 ------------ 1 file changed, 12 deletions(-) commit c51831be99e13f117721d6e1908d12849e31cab9 Author: Gilad Ben-Yossef Date: Sun Jun 25 10:47:20 2017 +0300 staging: ccree: register setkey for none hash macs The original ccree driver was registering a useless setkey method even for non-MAC hash transformations. Somewhere around v4.9 a check was added that failed hash operations if a setkey method was registered but was not called, so during the initial upstream port code was added to only register the setkey method for MAC type hash transform. Unfortunately, the ccree driver also registers non-hash based MAC transforms and the code had a logic error that stopped it registering a setkey callback even for those, thus rendering them useless. This commit fixes the logic mistake, thus correctly registering a setkey method only for MAC transformations, leaving it out for non-MAC ones, whether they are hash based on not. Fixes: 50cfbbb7e627 ("staging: ccree: add ahash support"). Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_hash.c | 83 ++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 41 deletions(-) commit 454527d0d94f49f96d893e6aa6d6df1b90f2a45f Author: Gilad Ben-Yossef Date: Sun Jun 25 10:47:19 2017 +0300 staging: ccree: fix hash import/export Hash import and export was saving and restoring the wrong context and therefore disabled. Fix it by restoring intermediate digest and additional state needed. The hash and mac transform now pass testmgr partial hash tests. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_hash.c | 143 +++++++++++++++++++++++++++------------ drivers/staging/ccree/ssi_hash.h | 2 + 2 files changed, 101 insertions(+), 44 deletions(-) commit 430e29d9c0f65d9653a0b7f7a56f1c6cd374b84b Author: Mauro Carvalho Chehab Date: Sun Jun 25 08:26:43 2017 -0300 media: dvb-frontends/stv0367: Improve DVB-C/T frontend status The stv0367 driver provide a lot of status on its state machine. Change the logic to provide more information about frontend locking status. Also, while any detailed status isn't available, provide a more complete FE_STATUS for DVB-T. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Daniel Scheller drivers/media/dvb-frontends/stv0367.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 006fe8ee884a70f8014034fe67a8ea70c4bdbcac Author: Daniel Scheller Date: Sun Jun 25 08:26:45 2017 -0300 media: dvb-frontends/stv0367: DVB-C signal strength statistics Provide QAM/DVB-C signal strength in decibel scale. Values returned from stv0367cab_get_rf_lvl() are good but need to be multiplied as they're in 1dBm precision. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 87b467107438423b4dcbcece7ec1bced57992b25 Author: Daniel Scheller Date: Sun Jun 25 08:26:46 2017 -0300 media: dvb-frontends/stv0367: update UCB readout condition logic Since the other statistics are read when fe_status conditions are TRUE, change the ucblocks readout logic to match this aswell. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f5a1ba833ddfd801b4adc463b0705938a8ff632f Author: Mauro Carvalho Chehab Date: Sun Jun 25 09:07:45 2017 -0300 media: stv0367: prevent division by zero While there's a test at the SNR calculus to avoid division by zero, it will still follow the path that would do the division. So, add a missing break there. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d394ad12c2e0354a18e34ad803f685b795b01fc4 Author: Daniel Scheller Date: Sun Jun 25 08:26:44 2017 -0300 media: dvb-frontends/stv0367: SNR DVBv5 statistics for DVB-C and T Add signal-to-noise-ratio as provided by the demodulator in decibel scale. QAM/DVB-C needs some intlog calculation to have usable dB values, OFDM/ DVB-T values from the demod look alright already and are provided as-is. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 8982735f8dd02096b75255e3c0a0df28aeaa9955 Author: Daniel Scheller Date: Sun Jun 25 07:02:22 2017 -0300 media: dvb-frontends/cxd2841er: require STATE_ACTIVE_* for agc readout When the demod driver puts the demod into sleep or shutdown state and it's status is then polled e.g. via "dvb-fe-tool -m", i2c errors are printed to the kernel log. If the last delsys was DVB-T/T2: cxd2841er: i2c wr failed=-5 addr=6c reg=00 len=1 cxd2841er: i2c rd failed=-5 addr=6c reg=26 and if it was DVB-C: cxd2841er: i2c wr failed=-5 addr=6c reg=00 len=1 cxd2841er: i2c rd failed=-5 addr=6c reg=49 This happens when read_status unconditionally calls into the read_signal_strength() function which triggers the read_agc_gain_*() functions, where these registered are polled. This isn't a critical thing since when the demod is active again, no more such errors are logged, however this might make users suspecting defects. Fix this by requiring STATE_ACTIVE_* in priv->state. If it isn't in any active state, additionally set the strength scale to NOT_AVAILABLE. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 456698e93dd350d488fa877cda729f218dcbe030 Author: Daniel Scheller Date: Sun Jun 25 06:59:46 2017 -0300 media: ddbridge: dev_* logging fixup Fixup commit d52786ddd2d5 ("media: ddbridge: make (ddb)readl in while-loops fail-safe") after/wrt commit 11e358bf37e8 ("media: ddbridge: use dev_* macros in favor of printk") Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5d5f328b0e2baa5ee7c119fd66324eb79eeeb66 Author: Juergen Gross Date: Mon Jun 12 13:53:56 2017 +0200 xen: allocate page for shared info page from low memory In a HVM guest the kernel allocates the page for mapping the shared info structure via extend_brk() today. This will lead to a drop of performance as the underlying EPT entry will have to be split up into 4kB entries as the single shared info page is located in hypervisor memory. The issue has been detected by using the libmicro munmap test: unmapping 8kB of memory was faster by nearly a factor of two when no pv interfaces were active in the HVM guest. So instead of taking a page from memory which might be mapped via large EPT entries use a page which is already mapped via a 4kB EPT entry: we can take a page from the first 1MB of memory as the video memory at 640kB disallows using larger EPT entries. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_hvm.c | 31 ++++++++++++++++++++++++------- arch/x86/xen/enlighten_pv.c | 2 -- 2 files changed, 24 insertions(+), 9 deletions(-) commit 1a3fc2c402810bf336882e695abd1678dbc8d279 Author: Juergen Gross Date: Thu Jun 8 16:03:42 2017 +0200 xen: avoid deadlock in xenbus driver There has been a report about a deadlock in the xenbus driver: [ 247.979498] ====================================================== [ 247.985688] WARNING: possible circular locking dependency detected [ 247.991882] 4.12.0-rc4-00022-gc4b25c0 #575 Not tainted [ 247.997040] ------------------------------------------------------ [ 248.003232] xenbus/91 is trying to acquire lock: [ 248.007875] (&u->msgbuffer_mutex){+.+.+.}, at: [] xenbus_dev_queue_reply+0x3c/0x230 [ 248.017163] [ 248.017163] but task is already holding lock: [ 248.023096] (xb_write_mutex){+.+...}, at: [] xenbus_thread+0x5f0/0x798 [ 248.031267] [ 248.031267] which lock already depends on the new lock. [ 248.031267] [ 248.039615] [ 248.039615] the existing dependency chain (in reverse order) is: [ 248.047176] [ 248.047176] -> #1 (xb_write_mutex){+.+...}: [ 248.052943] __lock_acquire+0x1728/0x1778 [ 248.057498] lock_acquire+0xc4/0x288 [ 248.061630] __mutex_lock+0x84/0x868 [ 248.065755] mutex_lock_nested+0x3c/0x50 [ 248.070227] xs_send+0x164/0x1f8 [ 248.074015] xenbus_dev_request_and_reply+0x6c/0x88 [ 248.079427] xenbus_file_write+0x260/0x420 [ 248.084073] __vfs_write+0x48/0x138 [ 248.088113] vfs_write+0xa8/0x1b8 [ 248.091983] SyS_write+0x54/0xb0 [ 248.095768] el0_svc_naked+0x24/0x28 [ 248.099897] [ 248.099897] -> #0 (&u->msgbuffer_mutex){+.+.+.}: [ 248.106088] print_circular_bug+0x80/0x2e0 [ 248.110730] __lock_acquire+0x1768/0x1778 [ 248.115288] lock_acquire+0xc4/0x288 [ 248.119417] __mutex_lock+0x84/0x868 [ 248.123545] mutex_lock_nested+0x3c/0x50 [ 248.128016] xenbus_dev_queue_reply+0x3c/0x230 [ 248.133005] xenbus_thread+0x788/0x798 [ 248.137306] kthread+0x110/0x140 [ 248.141087] ret_from_fork+0x10/0x40 It is rather easy to avoid by dropping xb_write_mutex before calling xenbus_dev_queue_reply(). Fixes: fd8aa9095a95c02dcc35540a263267c29b8fda9d ("xen: optimize xenbus driver for multiple concurrent xenstore accesses"). Cc: # 4.11 Reported-by: Andre Przywara Signed-off-by: Juergen Gross Tested-by: Andre Przywara Signed-off-by: Juergen Gross drivers/xen/xenbus/xenbus_comms.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 39fd64ae9f471f2d0aee46c5bc8646e9f2494e64 Author: Tejun Heo Date: Sun Jun 25 00:27:17 2017 -0400 cgroup: "cgroup.subtree_control" should be writeable by delegatee "cgroup.subtree_control" determines which resource types a cgroup wants to control. Unlike actual resource knobs, this is an attribute which belongs to the cgroup itself instead of its parent and thus should be writeable by the delegatee in a delegated cgroup. Update delegation documentation accordingly. Signed-off-by: Tejun Heo Documentation/cgroup-v2.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d77698df39a512911586834d303275ea5fda74d0 Author: Matthias Kaehlcke Date: Wed Jun 21 16:28:05 2017 -0700 x86/build: Specify stack alignment for clang For gcc stack alignment is configured with -mpreferred-stack-boundary=N, clang has the option -mstack-alignment=N for that purpose. Use the same alignment as with gcc. If the alignment is not specified clang assumes an alignment of 16 bytes, as required by the standard ABI. However as mentioned in d9b0cde91c60 ("x86-64, gcc: Use -mpreferred-stack-boundary=3 if supported") the standard kernel entry on x86-64 leaves the stack on an 8-byte boundary, as a consequence clang will keep the stack misaligned. Signed-off-by: Matthias Kaehlcke Acked-by: Ingo Molnar Signed-off-by: Masahiro Yamada arch/x86/Makefile | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 032a2c4f65a2f81c93e161a11197ba19bc14a909 Author: Matthias Kaehlcke Date: Wed Jun 21 16:28:04 2017 -0700 x86/build: Use __cc-option for boot code compiler options cc-option is used to enable compiler options for the boot code if they are available. The macro uses KBUILD_CFLAGS and KBUILD_CPPFLAGS for the check, however these flags aren't used to build the boot code, in consequence cc-option can yield wrong results. For example -mpreferred-stack-boundary=2 is never set with a 64-bit compiler, since the setting is only valid for 16 and 32-bit binaries. This is also the case for 32-bit kernel builds, because the option -m32 is added to KBUILD_CFLAGS after the assignment of REALMODE_CFLAGS. Use __cc-option instead of cc-option for the boot mode options. The macro receives the compiler options as parameter instead of using KBUILD_C*FLAGS, for the boot code we pass REALMODE_CFLAGS. Also use separate statements for the __cc-option checks instead of performing them in the initial assignment of REALMODE_CFLAGS since the variable is an input of the macro. Signed-off-by: Matthias Kaehlcke Acked-by: Ingo Molnar Signed-off-by: Masahiro Yamada arch/x86/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9f3f1fd299768782465cb32cdf0dd4528d11f26b Author: Matthias Kaehlcke Date: Wed Jun 21 16:28:03 2017 -0700 kbuild: Add __cc-option macro cc-option uses KBUILD_CFLAGS and KBUILD_CPPFLAGS when it determines whether an option is supported or not. This is fine for options used to build the kernel itself, however some components like the x86 boot code use a different set of flags. Add the new macro __cc-option which is a more generic version of cc-option with additional parameters. One parameter is the compiler with which the check should be performed, the other the compiler options to be used instead KBUILD_C*FLAGS. Refactor cc-option and hostcc-option to use __cc-option and move hostcc-option to scripts/Kbuild.include. Suggested-by: Arnd Bergmann Suggested-by: Masahiro Yamada Signed-off-by: Matthias Kaehlcke Acked-by: Arnd Bergmann Acked-by: Michal Marek Signed-off-by: Masahiro Yamada Makefile | 2 +- scripts/Kbuild.include | 14 ++++++++++++-- scripts/Makefile.host | 6 ------ 3 files changed, 13 insertions(+), 9 deletions(-) commit 39a33ff80a259b2bddebb236549baee55f9b4f41 Author: Masahiro Yamada Date: Mon Jun 19 16:28:22 2017 +0900 kbuild: remove cc-option-align Documentation/kbuild/makefiles.txt says the change for align options occurred at GCC 3.0, and Documentation/process/changes.rst says the minimal supported GCC version is 3.2, so it should be safe to hard-code -falign* options. Fix the only user arch/x86/Makefile_32.cpu and remove cc-option-align. Signed-off-by: Masahiro Yamada Acked-by: Ingo Molnar Documentation/kbuild/makefiles.txt | 16 ---------------- arch/x86/Makefile_32.cpu | 7 +++---- scripts/Kbuild.include | 5 ----- 3 files changed, 3 insertions(+), 25 deletions(-) commit f7d44a8f3fd7f13770470a306a233acbaad5e96d Author: Len Brown Date: Sat May 27 21:24:58 2017 -0700 tools/power turbostat: update version number Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f26b151977447be3b86f92c91e1caedc9b5eb8bf Author: Len Brown Date: Fri Jun 23 20:45:54 2017 -0700 tools/power turbostat: decode MSR_IA32_MISC_ENABLE only on Intel otherwise, turbostat bails on on AMD Opteron boxes: turbostat: cpu26: msr offset 0x1a0 read failed: Input/output error Reported-by: Kamil Kolakowski Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 3 +++ 1 file changed, 3 insertions(+) commit c91fc8519d87715a3a173475ea3778794c139996 Author: Len Brown Date: Sat May 27 21:18:12 2017 -0700 tools/power turbostat: stop migrating, unless '-m' Turbostat has the capability to set its own affinity to each CPU so that its MSR accesses are on the local CPU. However, using the in-kernel cross-call in the msr driver tends to be less invasive, so do that -- by-default. '-m' remains to get the old behaviour. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b3d930aaf74f8b248edd7cfe7f35caefeff785bd Author: Gustavo A. R. Silva Date: Fri Jun 23 19:37:00 2017 -0300 media: i2c: tvp5150: remove useless variable assignment in tvp5150_set_vbi() Value assigned to variable _type_ at line 678 is overwritten at line 688 before it can be used. This makes such variable assignment useless. Remove this variable assignment and fix some coding style issues. Addresses-Coverity-ID: 1226968 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tvp5150.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit d83bc7b644004131185aaa875e52bdcc3cd5f031 Author: Gustavo A. R. Silva Date: Thu Jun 22 01:22:47 2017 -0300 media: dvb-usb-v2: lmedm04: remove unnecessary variable in lme2510_stream_restart() Remove unnecessary variable _ret_ and refactor the code. Addresses-Coverity-ID: 1226934 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/lmedm04.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ee0981be7704589635de23cc32556399c86653a8 Author: Marek Vasut Date: Sun Jun 18 22:55:28 2017 +0200 rtc: ds1307: Add support for Epson RX8130CE Add support for yet another RTC chip, Epson RX8130CE. This time around, the chip has slightly permutated registers and also the register starts at 0x10 instead of 0x0 . So far, we only support the RTC and NVRAM parts of the chip, Alarm and Timer is not supported. Signed-off-by: Marek Vasut Cc: Alexandre Belloni Cc: Arnd Bergmann Cc: Felipe Balbi Cc: Nishanth Menon Cc: Tony Lindgren Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) commit 498bcf313985c76c4572d8ce885a6480728d28f9 Author: Krzysztof Kozlowski Date: Fri Jun 16 21:28:07 2017 +0200 rtc: s3c: Handle clock enable failures clk_enable() can fail so handle such case. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s3c.c | 72 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 15 deletions(-) commit 9903f68af6ca9d9b25f5c50bfedd2e0cb899f848 Author: Krzysztof Kozlowski Date: Fri Jun 16 21:28:06 2017 +0200 rtc: s3c: Handle clock prepare failures in probe clk_prepare_enable() can fail so handle such case. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s3c.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6b72086d8594febb9e9d63cfb29d950da17e8f06 Author: Krzysztof Kozlowski Date: Fri Jun 16 21:28:05 2017 +0200 rtc: s3c: Do not remove const from rodata memory All instances of struct s3c_rtc_data are in fact static const thus put in rodata so we should not drop the const while getting the pointer to them. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s3c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 21df6fed0db35cf4382734126bd206b6c750e17c Author: Krzysztof Kozlowski Date: Fri Jun 16 21:28:04 2017 +0200 rtc: s3c: Drop unneeded cast to void pointer There is no need for casting to void pointer for of_device_id data. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s3c.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fc1afe60535eeb433648ebf80e23868cc6dd4fca Author: Krzysztof Kozlowski Date: Fri Jun 16 21:28:03 2017 +0200 rtc: s3c: Minor white-space cleanups Minor cleanups to make the code easier to read. No functional changes. 1. Remove one space before labels as this is nowadays mostly preferred. 2. Fix indentation of arguments in function calls. 3. Split structure member declaration. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s3c.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) commit 8768e7b3e3677fb51bf3ed5ceef174f40be4c287 Author: Krzysztof Kozlowski Date: Fri Jun 16 21:28:02 2017 +0200 rtc: s3c: Jump to central exit point on getting src clock error In other error paths in probe, centralized exit point was used so make this consistent. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s3c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b138afda3ca0450bcdbe4dd743b1952ea591a331 Author: Daniel Scheller Date: Wed Jun 21 16:45:42 2017 -0300 media: dvb-frontends/stv0367: split SNR determination into functions The read_snr() functions currently do some magic to return relative scale values when called. Split out register readouts into separate functions so the functionality can be reused in some other way. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 68 +++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 26 deletions(-) commit 4043eb2325f2e8b66ed9b6dd75cbd00420489de0 Author: Daniel Scheller Date: Wed Jun 21 16:45:41 2017 -0300 media: dvb-frontends/stv0367: initial DDB DVBv5 stats, implement ucblocks This adds the basics to stv0367ddb_read_status() to be able to properly provide signal statistics in DVBv5 format. Also adds UCB readout and provides those values. Also, don't return -EINVAL in ddb_read_status() if active_demod_state indicates no delivery system. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 54 ++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) commit e1bdf02488c98841484b28cea5b951701015948c Author: Daniel Scheller Date: Tue Jun 20 16:57:24 2017 -0300 media: dvb-frontends/lnbh25: improve kernellog output Use dev_dbg() in conjunction with the %*ph format macro to print the vmon status debug, thus hiding continuous hexdumping from default log levels. Also, change the attach success log line from error to info severity. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lnbh25.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit add6e6ab3ee0e237822e0951476d3df039b49ec8 Author: Lorenzo Bianconi Date: Thu Jun 22 19:46:43 2017 +0200 iio: pressure: st_pressure_core: disable multiread by default for LPS22HB Set multiread variable to false for LPS22HB pressure sensor since it is already enabled in CTRL_REG2. Previous configuration does not cause any issue in I2C communication since SUB Msb has no meaning whereas it breaks register address in SPI communication Fixes: e039e2f5b4da (iio:st_pressure:initial lps22hb sensor support) Signed-off-by: Lorenzo Bianconi Cc: Signed-off-by: Jonathan Cameron drivers/iio/pressure/st_pressure_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3507e48d3f99a93a3056a34a5365f310434570f Author: Akinobu Mita Date: Wed Jun 21 01:46:37 2017 +0900 iio: light: tsl2563: use correct event code The TSL2563 driver provides three iio channels, two of which are raw ADC channels (channel 0 and channel 1) in the device and the remaining one is calculated by the two. The ADC channel 0 only supports programmable interrupt with threshold settings and this driver supports the event but the generated event code does not contain the corresponding iio channel type. This is going to change userspace ABI. Hopefully fixing this to be what it should always have been won't break any userspace code. Cc: Jonathan Cameron Signed-off-by: Akinobu Mita Cc: Signed-off-by: Jonathan Cameron drivers/iio/light/tsl2563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd7a85d36363268266c5039bd31495d047acfb98 Author: Binoy Jayan Date: Tue Jun 13 05:58:50 2017 -0300 media: ngene: Replace semaphore i2c_switch_mutex with mutex The semaphore 'i2c_switch_mutex' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-core.c | 2 +- drivers/media/pci/ngene/ngene-i2c.c | 6 +++--- drivers/media/pci/ngene/ngene.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 90979f045513e7d3d7fb390dc26117ce95a31804 Author: Binoy Jayan Date: Tue Jun 13 05:58:49 2017 -0300 media: ngene: Replace semaphore stream_mutex with mutex The semaphore 'stream_mutex' is used as a simple mutex, so it should be written as one. Also moving the mutex_[lock/unlock] to the caller as it is anyway locked at the beginning of the callee thus avoiding repetition. Signed-off-by: Binoy Jayan Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-core.c | 18 +++++++----------- drivers/media/pci/ngene/ngene.h | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) commit 1439cdb0315cc3f1e86cf70de22c4a90c5ac48b1 Author: Binoy Jayan Date: Tue Jun 13 05:58:48 2017 -0300 media: ngene: Replace semaphore cmd_mutex with mutex The semaphore 'cmd_mutex' is used as a simple mutex, so it should be written as one. Also, replace down with mutex_destroy to ensure sane state when ngene_stop is called. Signed-off-by: Binoy Jayan Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-core.c | 12 ++++++------ drivers/media/pci/ngene/ngene.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit f7d84fa704ac8bf6145864d0ea204ca85816c15d Author: Mauro Carvalho Chehab Date: Thu May 18 11:06:43 2017 -0300 media: tw5864, fc0011: better handle WARN_ON() As such macro will check if the expression is true, it may fall through, as warned: In file included from ./include/uapi/linux/stddef.h:1:0, from ./include/linux/stddef.h:4, from ./include/uapi/linux/posix_types.h:4, from ./include/uapi/linux/types.h:13, from ./include/linux/types.h:5, from ./drivers/media/dvb-core/dvb_frontend.h:35, from drivers/media/tuners/fc0011.h:4, from drivers/media/tuners/fc0011.c:20: drivers/media/tuners/fc0011.c: In function 'fc0011_set_params': ./include/linux/compiler.h:179:22: warning: this statement may fall through [-Wimplicit-fallthrough=] # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/asm-generic/bug.h:109:2: note: in expansion of macro 'unlikely' unlikely(__ret_warn_on); \ ^~~~~~~~ drivers/media/tuners/fc0011.c:344:3: note: in expansion of macro 'WARN_ON' WARN_ON(1); ^~~~~~~ drivers/media/tuners/fc0011.c:345:2: note: here case 0: ^~~~ In file included from ./include/uapi/linux/stddef.h:1:0, from ./include/linux/stddef.h:4, from ./include/uapi/linux/posix_types.h:4, from ./include/uapi/linux/types.h:13, from ./include/linux/types.h:5, from ./include/linux/list.h:4, from ./include/linux/module.h:9, from drivers/media/pci/tw5864/tw5864-video.c:17: drivers/media/pci/tw5864/tw5864-video.c: In function 'tw5864_fmt_vid_cap': ./include/linux/compiler.h:179:22: warning: this statement may fall through [-Wimplicit-fallthrough=] # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/asm-generic/bug.h:68:2: note: in expansion of macro 'unlikely' unlikely(__ret_warn_on); \ ^~~~~~~~ drivers/media/pci/tw5864/tw5864-video.c:547:3: note: in expansion of macro 'WARN_ON_ONCE' WARN_ON_ONCE(1); ^~~~~~~~~~~~ drivers/media/pci/tw5864/tw5864-video.c:548:2: note: here case STD_NTSC: ^~~~ On both cases, it means an error, so, let's return an error code, to make gcc happy. Signed-off-by: Mauro Carvalho Chehab Acked-by: Michael Büsch Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-video.c | 1 + drivers/media/tuners/fc0011.c | 1 + 2 files changed, 2 insertions(+) commit e1d00cddfb61d2c55c6df5d638a9456bd979e01c Author: Martin Kepplinger Date: Wed May 3 10:43:09 2017 -0300 media: dvb-frontends: drx39xyj: remove obsolete sign extend macros DRX_S9TOS16 and DRX_S24TODRXFREQ are simply not used. Furthermore, sign_extend32() should be used for sign extension. (Also, the comment describing DRX_S24TODRXFREQ was wrong). So remove these macros. Signed-off-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/drx39xyj/drx_driver.h | 13 ------------- 1 file changed, 13 deletions(-) commit 6a1560ecaa8c6c775b16c928fc56fe8089a7f82e Author: Peter Ujfalusi Date: Wed May 3 08:08:51 2017 -0300 media: v4l: omap_vout: vrfb: Convert to dmaengine The dmaengine driver for sDMA now have support for interleaved transfer. This trasnfer type was open coded with the legacy omap-dma API, but now we can move it to dmaengine. Signed-off-by: Peter Ujfalusi Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap/omap_vout_vrfb.c | 133 ++++++++++++++++----------- drivers/media/platform/omap/omap_voutdef.h | 6 +- 2 files changed, 83 insertions(+), 56 deletions(-) commit 1250a85b1b5c6b40c2ae32cd61a7029094530d31 Author: Mauro Carvalho Chehab Date: Sat Jun 24 15:46:24 2017 -0300 media: Replace initalized ->initialized While committing a change on em28xx, I got a warning of a typo there. So, fix it on em28xx and on two other media drivers with the same typo. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/drx39xyj/drx_driver.h | 2 +- drivers/media/usb/au0828/au0828-input.c | 2 +- drivers/media/usb/em28xx/em28xx-input.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit d6a643275a3659946398cd42e5df805546f9e247 Author: Mauro Carvalho Chehab Date: Tue May 2 23:12:23 2017 -0300 media: em28xx: add support for new of Terratec H6 There's a new version of Terratec H6 with uses USB ID 0ccd:10b2. This version is similar to the old one (with is supported via the HTC entry), except that this one has the eeprom on the second bus. On this board, one side of this board is labeled with: dvbc v2.0 The other side with: 94V-0, MO2, RK-4221 with huge digits: 1107 With those patches, the board is properly detected: em28xx 1-1.5:1.0: New device TERRATEC TERRATCE H5 MKII @ 480 Mbps (0ccd:10b2, interface 0, class 0) em28xx 1-1.5:1.0: Audio interface 0 found (Vendor Class) em28xx 1-1.5:1.0: Video interface 0 found: isoc em28xx 1-1.5:1.0: DVB interface 0 found: isoc em28xx 1-1.5:1.0: chip ID is em2884 em28xx eeprom 00000000: 26 00 00 00 02 0b 0f e5 f5 64 01 60 09 e5 f5 64 &........d.`...d em28xx eeprom 00000010: 09 60 03 c2 c6 22 e5 f7 b4 03 13 e5 f6 b4 87 03 .`...".......... em28xx eeprom 00000020: 02 0a b9 e5 f6 b4 93 03 02 09 46 c2 c6 22 c2 c6 ..........F..".. em28xx eeprom 00000030: 22 00 60 00 ef 70 08 85 3d 82 85 3c 83 93 ff ef ".`..p..=..<.... em28xx eeprom 00000040: 60 19 85 3d 82 85 3c 83 e4 93 12 07 a3 12 0a fe `..=..<......... em28xx eeprom 00000050: 05 3d e5 3d 70 02 05 3c 1f 80 e4 22 12 0b 06 02 .=.=p..<...".... em28xx eeprom 00000060: 07 e2 01 00 1a eb 67 95 cd 0c b2 10 f0 13 6b 03 ......g.......k. em28xx eeprom 00000070: 98 22 6a 1c 86 12 27 57 4e 16 29 00 60 00 00 00 ."j...'WN.).`... em28xx eeprom 00000080: 02 00 00 00 5e 00 13 00 f0 10 44 82 82 00 00 00 ....^.....D..... em28xx eeprom 00000090: 5b 81 c0 00 00 00 20 40 20 80 02 20 10 01 00 00 [..... @ .. .... em28xx eeprom 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ em28xx eeprom 000000b0: c6 40 00 00 81 00 00 00 00 00 00 00 00 c4 00 00 .@.............. em28xx eeprom 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1c 03 ................ em28xx eeprom 000000d0: 31 00 32 00 33 00 34 00 35 00 36 00 37 00 38 00 1.2.3.4.5.6.7.8. em28xx eeprom 000000e0: 39 00 41 00 42 00 43 00 44 00 12 03 54 00 45 00 9.A.B.C.D...T.E. em28xx eeprom 000000f0: 52 00 52 00 41 00 54 00 45 00 43 00 22 03 54 00 R.R.A.T.E.C.".T. em28xx 1-1.5:1.0: eeprom 000100: ... (skipped) em28xx 1-1.5:1.0: EEPROM ID = 26 00 00 00, EEPROM hash = 0xbcd5a8cf em28xx 1-1.5:1.0: EEPROM info: em28xx 1-1.5:1.0: microcode start address = 0x0004, boot configuration = 0x00 em28xx 1-1.5:1.0: I2S audio, 5 sample rates em28xx 1-1.5:1.0: 500mA max power em28xx 1-1.5:1.0: Table at offset 0x27, strings=0x2298, 0x1c6a, 0x1286 em28xx 1-1.5:1.0: Identified as Terratec Cinergy H6 rev. 2 (card=101) em28xx 1-1.5:1.0: Currently, V4L2 is not supported on this model em28xx 1-1.5:1.0: dvb set to isoc mode. usbcore: registered new interface driver em28xx em28xx 1-1.5:1.0: Binding audio extension em28xx 1-1.5:1.0: em28xx-audio.c: Copyright (C) 2006 Markus Rechberger em28xx 1-1.5:1.0: em28xx-audio.c: Copyright (C) 2007-2016 Mauro Carvalho Chehab em28xx 1-1.5:1.0: Endpoint 0x83 high-speed on intf 0 alt 7 interval = 8, size 196 em28xx 1-1.5:1.0: Number of URBs: 1, with 64 packets and 192 size em28xx 1-1.5:1.0: Audio extension successfully initialized em28xx: Registered (Em28xx Audio Extension) extension em28xx 1-1.5:1.0: Binding DVB extension drxk: status = 0x639260d9 drxk: detected a drx-3926k, spin A3, xtal 20.250 MHz drxk: DRXK driver version 0.9.4300 drxk: frontend initialized. tda18271 4-0060: creating new instance tda18271: TDA18271HD/C2 detected @ 4-0060 dvbdev: DVB: registering new adapter (1-1.5:1.0) em28xx 1-1.5:1.0: DVB: registering adapter 0 frontend 0 (DRXK DVB-C DVB-T)... dvbdev: dvb_create_media_entity: media entity 'DRXK DVB-C DVB-T' registered. dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered. em28xx 1-1.5:1.0: DVB extension successfully initialized em28xx: Registered (Em28xx dvb Extension) extension em28xx 1-1.5:1.0: Registering input extension rc rc0: 1-1.5:1.0 IR as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/rc/rc0 Registered IR keymap rc-nec-terratec-cinergy-xs input: 1-1.5:1.0 IR as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/rc/rc0/input0 em28xx 1-1.5:1.0: Input extension successfully initalized em28xx: Registered (Em28xx Input Extension) extension tda18271: performing RF tracking filter calibration tda18271: RF tracking filter calibration complete Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 18 ++++++++++++++++++ drivers/media/usb/em28xx/em28xx-dvb.c | 1 + drivers/media/usb/em28xx/em28xx.h | 1 + 3 files changed, 20 insertions(+) commit b1e1d4532e073c4e6a47efd7e447fceb37528ad9 Author: Mauro Carvalho Chehab Date: Tue May 2 23:12:22 2017 -0300 media: em28xx: Ignore errors while reading from eeprom While testing support for Terratec H6 rev. 2, it was noticed that reading from eeprom there causes a timeout error. Apparently, this is due to the need of properly setting GPIOs. In any case, the driver doesn't really require eeprom reading to succeed, as this is currently used only for debug. So, Ignore such errors. Signed-off-by: Mauro Carvalho Chehab Acked-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-i2c.c | 2 -- 1 file changed, 2 deletions(-) commit 66083b49bd337e5f4dfa168c145ca38f8bcbe522 Author: Dan Carpenter Date: Fri Apr 28 09:53:31 2017 -0300 media: dib0700: fix error handling in dib0700_i2c_xfer_legacy() Mostly this adds some unlocks to error paths. But, if you see where there were "break;" statements before, I changed those paths to return error codes instead of returning success. Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dib0700_core.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit d18a6ef59c53022b4af222412dc494cfd21c298e Author: Dan Carpenter Date: Fri Apr 28 09:52:07 2017 -0300 media: dib0700: fix locking in dib0700_i2c_xfer_new() This patch mostly adds unlocks to error paths. But one additional small change is that I made the first "break;" a "goto unlock;" which means that now we return failure instead of success on that path. Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dib0700_core.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit dbe885a5dd86abc4bbcc72d17a6be4e92308c87f Author: Gustavo A. R. Silva Date: Thu Jun 22 00:20:59 2017 -0300 media: tuners: mxl5005s: remove useless variable assignments Values assigned to variables Fmax and Fmin at lines 2740 and 2741 are overwritten at lines 2754 and 2755 before they can be used. This makes such variable assignments useless. Addresses-Coverity-ID: 1226952 Addresses-Coverity-ID: 1226953 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/mxl5005s.c | 2 -- 1 file changed, 2 deletions(-) commit 39775431f82f890f4aaa08860a30883d081bffc7 Author: Brian Foster Date: Sat Jun 24 10:11:41 2017 -0700 xfs: free uncommitted transactions during log recovery Log recovery allocates in-core transaction and member item data structures on-demand as it processes the on-disk log. Transactions are allocated on first encounter on-disk and stored in a hash table structure where they are easily accessible for subsequent lookups. Transaction items are also allocated on demand and are attached to the associated transactions. When a commit record is encountered in the log, the transaction is committed to the fs and the in-core structures are freed. If a filesystem crashes or shuts down before all in-core log buffers are flushed to the log, however, not all transactions may have commit records in the log. As expected, the modifications in such an incomplete transaction are not replayed to the fs. The in-core data structures for the partial transaction are never freed, however, resulting in a memory leak. Update xlog_do_recovery_pass() to first correctly initialize the hash table array so empty lists can be distinguished from populated lists on function exit. Update xlog_recover_free_trans() to always remove the transaction from the list prior to freeing the associated memory. Finally, walk the hash table of transaction lists as the last step before it goes out of scope and free any transactions that may remain on the lists. This prevents a memory leak of partial transactions in the log. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 59a4fcf3a6aede21b34b7ecf275c27d87dfcb7bc Author: Mauro Carvalho Chehab Date: Sat Jun 24 13:15:49 2017 -0300 media: imx.rst: add it to v4l-drivers book Avoid the following warning when building documentation: checking consistency... /devel/v4l/patchwork/Documentation/media/v4l-drivers/imx.rst:: WARNING: document isn't included in any toctree While here, avoid placing all driver authors at just one line at the html/pdf output. Acked-by: Steve Longerbeam Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/imx.rst | 7 ++++--- Documentation/media/v4l-drivers/index.rst | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) commit 77f1f992f8069c870ac7e8867dcbfb3ea09209d7 Author: Mauro Carvalho Chehab Date: Sat Jun 24 13:02:01 2017 -0300 media: dtv-core.rst: explain how to get DVBv5 statistics It is not trivial to implement the logic that collects DVBv5 statistics. As we're seein lately too many implementations that are not quite right when reviewing patchsets, add a detailed explanation, adding a few examples about the right thing to be done. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-core.rst | 279 ++++++++++++++++++++++++++++++++++ 1 file changed, 279 insertions(+) commit 44b413661b57cbbb7e4c3adf7b087fada42a443e Author: Patrick Venture Date: Fri Jun 23 20:39:56 2017 -0700 hwmon: (aspeed-pwm-tacho) Poll with short sleeps. The reference driver polled but mentioned it was possible to sleep for a computed period to know when it's ready to read. However, polling with minimal sleeps is quick and works. This also improves responsiveness from the driver. Testing: tested on ast2400 on quanta-q71l Signed-off-by: Patrick Venture Signed-off-by: Guenter Roeck drivers/hwmon/aspeed-pwm-tacho.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit ece0c03a9e5f727435d19754411e59c3ae28cbb8 Author: Patrick Venture Date: Sat Jun 24 08:39:32 2017 -0700 hwmon: (aspeed-pwm-tacho) reduce fan_tach period Reduce the fan_tach period such that the fan controller uses a shorter period to measure the rpm. The original period of 0x1000 was chosen as a conversative value from the reference implementation. Through experimentation on the quanta-q71l board, I was able to drive the number down which ultimately reduced the time the controller would use to determine the fan_tach. This value was recently tested and accepted downstream on the IBM Zaius board which uses the ast2500. Future work: It may be worthwhile as this is a tunable parameter to the system, to allow overriding it through the device tree. Testing: Tested on an ast2400 sitting on a quanta-q71l and ast2500 on power9. Signed-off-by: Patrick Venture Signed-off-by: Guenter Roeck drivers/hwmon/aspeed-pwm-tacho.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5620df7e395465f4eee6c187a4f956b7100b794 Author: Palmer Dabbelt Date: Fri Jun 23 13:31:39 2017 -0700 Documentation: atomic_ops.txt is core-api/atomic_ops.rst I was reading the memory barries documentation in order to make sure the RISC-V barries were correct, and I found a broken link to the atomic operations documentation. Signed-off-by: Palmer Dabbelt Acked-by: Will Deacon Acked-by: Paul E. McKenney Signed-off-by: Jonathan Corbet Documentation/memory-barriers.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f9c1e254e1c3920cefe2aa4660091d7f5229615f Author: Daniel Scheller Date: Wed Jun 21 17:10:54 2017 -0300 media: dvb-frontends/stv0367: deduplicate DDB dvb_frontend_ops caps Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 11e358bf37e883528cffdc1c075b001aeeca30ad Author: Daniel Scheller Date: Wed Jun 21 13:53:47 2017 -0300 media: ddbridge: use dev_* macros in favor of printk Side effect: KERN_DEBUG messages aren't written to the kernel log anymore. This also improves the tda18212_ping reporting a bit so users know that if pinging wasn't successful, bad things will happen. Since in module_init_ddbridge() there's no dev yet, pr_info is used instead. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-core.c | 78 ++++++++++++++++++------------ 1 file changed, 46 insertions(+), 32 deletions(-) commit d52786ddd2d52f90db5ba30a185d641771e27167 Author: Daniel Scheller Date: Fri Jun 23 13:37:40 2017 -0300 media: ddbridge: make (ddb)readl in while-loops fail-safe Reported by smatch: drivers/media/pci/ddbridge/ddbridge-core.c:1246 input_tasklet() warn: this loop depends on readl() succeeding drivers/media/pci/ddbridge/ddbridge-core.c:1768 flashio() warn: this loop depends on readl() succeeding drivers/media/pci/ddbridge/ddbridge-core.c:1788 flashio() warn: this loop depends on readl() succeeding Fix this by introducing safe_ddbreadl() which will wrap ddbreadl and checks for all bits set in the return which indicates failure, and return 0 in that case. Usable as drop-in-replacement in all affected while loops w/o having to change the logic. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-core.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit cb778f5c8581c9c17cc4e420890e5589d948d584 Author: Philipp Zabel Date: Fri Jun 23 06:54:09 2017 -0300 media: coda: rename the picture run timeout error handler I would have liked the the picture run timeout error handler to be renamed to something a bit more descriptive in the original commit fb2be08f8cb3 ("[media] coda: first step at error recovery"). Somehow v1 [1] was merged instead of v2 [2]. [1] https://patchwork.kernel.org/patch/9663965/ [2] https://patchwork.kernel.org/patch/9774239/ Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 4 ++-- drivers/media/platform/coda/coda-common.c | 4 ++-- drivers/media/platform/coda/coda.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit bc8e2d627a5888c48d553abe534c341c1c096a5e Author: Colin Ian King Date: Thu Jun 22 14:27:21 2017 -0300 media: venus: fix loop wrap in cleanup of clks The current pre-decrement is incorrect and should be replaced with a post-decrement. Consider the case where the very first clk_prepare_enable fails when i is 0; in this case the error clean up will decrement the unsigned int which wraps to the largest unsigned int value causing an array out of bounds read on core->clks[i]. Detected by CoverityScan, CID#1446590 ("Out-of-bounds read") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13c2bede49f996ca34a368dfe05be53d6b2ccc22 Author: Gustavo A. R. Silva Date: Thu Jun 22 01:01:22 2017 -0300 media: radio: wl1273: add check on core->write() return value Check return value from call to core->write(), so in case of error print error message, jump to goto label fail and eventually return. Addresses-Coverity-ID: 1226943 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/radio-wl1273.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 0a0c1b823cbc0b72eb6e0c2cfe5704cf80fe842d Author: Arnd Bergmann Date: Wed Jun 21 19:10:32 2017 -0300 media: rainshadow-cec: avoid -Wmaybe-uninitialized warning again Back in April I created a patch to address a false-positive warning: drivers/media/usb/rainshadow-cec/rainshadow-cec.c: In function 'rain_irq_work_handler': drivers/media/usb/rainshadow-cec/rainshadow-cec.c:171:31: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized] My patch was totally wrong and introduced a real bug, and Colin Ian King thankfully noticed it now and fixed my mistake. Unfortunately, fixing the actual uninitialized data in this case brought back the original bogus warning. This is a new version of the patch, which simplifies the code to the point where gcc notices the behavior is correct. Fixes: ca33784ba494 ("[media] rainshadow-cec: ensure exit_loop is intialized") Fixes: ea6a69defd3311 ("[media] rainshadow-cec: avoid -Wmaybe-uninitialized warning") Cc: Colin Ian King Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/rainshadow-cec/rainshadow-cec.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 7ee88f8c6b0ce92c652cad7331e09c0ce8a9239b Author: Joe Perches Date: Fri Jun 9 16:09:08 2017 -0300 media: tuner-core: Remove unused #define PREFIX Commit 680d87c0a9e3 ("[media] tuner-core: use pr_foo, instead of internal printk macros") removed the use of PREFIX, remove the #define Signed-off-by: Joe Perches Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/tuner-core.c | 2 -- 1 file changed, 2 deletions(-) commit f1bd9bd69bf8ae96ada7e7f71415bb5f1db453cb Author: Joe Perches Date: Fri Jun 9 14:54:57 2017 -0300 media: stkwebcam: Use more common logging styles Convert STK_ to pr_ to use the typical kernel logging. Add a define for pr_fmt. No change in logging output. Miscellanea: o Remove now unused PREFIX and STK_ macros o Realign arguments o Use pr__ratelimited o Add a few missing newlines to formats Signed-off-by: Joe Perches Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/stkwebcam/stk-sensor.c | 32 ++++++++------- drivers/media/usb/stkwebcam/stk-webcam.c | 70 ++++++++++++++++---------------- drivers/media/usb/stkwebcam/stk-webcam.h | 6 --- 3 files changed, 52 insertions(+), 56 deletions(-) commit 9b80f12e319198cef65076654ccaa4b2783a2fa1 Author: Philipp Zabel Date: Thu Jun 8 06:21:13 2017 -0300 media: coda: ctx->codec is not NULL in coda_alloc_framebuffers This fixes a smatch warning: drivers/media/platform/coda/coda-bit.c:415 coda_alloc_framebuffers() error: we previously assumed 'ctx->codec' could be null (see line 396) coda_alloc_framebuffers() is called from coda_start_encoding() and __coda_start_decoding(). Both dereference ctx->codec before calling coda_alloc_framebuffers() in lines 935 and 1649, so ctx->codec can not be NULL. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be78b59e4806337b447a07a5042f4ef84b047c1a Author: Arnd Bergmann Date: Thu Jun 8 06:01:37 2017 -0300 media: Revert "[media] et8ek8: Export OF device ID as module aliases" This one got applied twice, causing a build error with clang: drivers/media/i2c/et8ek8/et8ek8_driver.c:1499:1: error: redefinition of '__mod_of__et8ek8_of_table_device_table' Fixes: 9ae05fd1e791 ("[media] et8ek8: Export OF device ID as module aliases") Signed-off-by: Arnd Bergmann Acked-by: Sakari Ailus Acked-by: Pavel Machek Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/et8ek8/et8ek8_driver.c | 1 - 1 file changed, 1 deletion(-) commit dbe127ecae5372d8dc3b1584534d8d442ccd0220 Author: Markus Elfring Date: Thu May 4 14:14:15 2017 -0300 media: bdisp-debug: Replace a seq_puts() call by seq_putc() in seven functions Seven single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/bdisp/bdisp-debug.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e1c921495534002d727b15a76a2f8c20b6b108b5 Author: Daniel Lezcano Date: Fri Jun 23 16:11:08 2017 +0200 genirq/timings: Add infrastructure for estimating the next interrupt arrival time An interrupt behaves with a burst of activity with periodic interval of time followed by one or two peaks of longer interval. As the time intervals are periodic, statistically speaking they follow a normal distribution and each interrupts can be tracked individually. Add a mechanism to compute the statistics on all interrupts, except the timers which are deterministic from a prediction point of view, as their expiry time is known. The goal is to extract the periodicity for each interrupt, with the last timestamp and sum them, so the next event can be predicted to a certain extent. Taking the earliest prediction gives the expected wakeup on the system (assuming a timer won't expire before). Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: Nicolas Pitre Cc: Jens Axboe Cc: Hannes Reinecke Cc: Vincent Guittot Cc: "Rafael J . Wysocki" Cc: Peter Zijlstra Cc: Bjorn Helgaas Link: http://lkml.kernel.org/r/1498227072-5980-2-git-send-email-daniel.lezcano@linaro.org include/linux/interrupt.h | 1 + kernel/irq/internals.h | 19 +++ kernel/irq/timings.c | 339 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 359 insertions(+) commit b2d3d61adb7b73cfe5f82404f7a130a76fc64232 Author: Daniel Lezcano Date: Fri Jun 23 16:11:07 2017 +0200 genirq/timings: Add infrastructure to track the interrupt timings The interrupt framework gives a lot of information about each interrupt. It does not keep track of when those interrupts occur though, which is a prerequisite for estimating the next interrupt arrival for power management purposes. Add a mechanism to record the timestamp for each interrupt occurrences in a per-CPU circular buffer to help with the prediction of the next occurrence using a statistical model. Each CPU can store up to IRQ_TIMINGS_SIZE events , the current value of IRQ_TIMINGS_SIZE is 32. Each event is encoded into a single u64, where the high 48 bits are used for the timestamp and the low 16 bits are for the irq number. A static key is introduced so when the irq prediction is switched off at runtime, the overhead is near to zero. It results in most of the code in internals.h for inline reasons and a very few in the new file timings.c. The latter will contain more in the next patch which will provide the statistical model for the next event prediction. Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Acked-by: Nicolas Pitre Cc: Jens Axboe Cc: Hannes Reinecke Cc: Vincent Guittot Cc: "Rafael J . Wysocki" Cc: Peter Zijlstra Cc: Bjorn Helgaas Link: http://lkml.kernel.org/r/1498227072-5980-1-git-send-email-daniel.lezcano@linaro.org include/linux/interrupt.h | 5 +++ kernel/irq/Kconfig | 3 ++ kernel/irq/Makefile | 1 + kernel/irq/handle.c | 2 ++ kernel/irq/internals.h | 90 +++++++++++++++++++++++++++++++++++++++++++++++ kernel/irq/manage.c | 3 ++ kernel/irq/timings.c | 30 ++++++++++++++++ 7 files changed, 134 insertions(+) commit c2ce34c0a0e5187195ecade872be950d2611ba68 Author: Thomas Gleixner Date: Sat Jun 24 11:05:59 2017 +0200 genirq/debugfs: Remove pointless NULL pointer check debugfs_remove() has it's own NULL pointer check. Remove the conditional and make irq_remove_debugfs_entry() an inline helper Reported-by: kbuild test robot Signed-off-by: Thomas Gleixner kernel/irq/debugfs.c | 7 ------- kernel/irq/internals.h | 7 ++++++- 2 files changed, 6 insertions(+), 8 deletions(-) commit 815abf5af45f04f759f12f3172afd15226fd7f71 Author: Rik van Riel Date: Fri Jun 23 12:55:30 2017 -0400 sched/fair: Remove effective_load() The effective_load() function was only used by the NUMA balancing code, and not by the regular load balancing code. Now that the NUMA balancing code no longer uses it either, get rid of it. Signed-off-by: Rik van Riel Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: jhladky@redhat.com Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20170623165530.22514-5-riel@redhat.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 124 +--------------------------------------------------- 1 file changed, 1 insertion(+), 123 deletions(-) commit 3fed382b46baac83703130fe4cd3d9147f427fb9 Author: Rik van Riel Date: Fri Jun 23 12:55:29 2017 -0400 sched/numa: Implement NUMA node level wake_affine() Since select_idle_sibling() can place a task anywhere on a socket, comparing loads between individual CPU cores makes no real sense for deciding whether to do an affine wakeup across sockets, either. Instead, compare the load between the sockets in a similar way the load balancer and the numa balancing code do. Signed-off-by: Rik van Riel Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: jhladky@redhat.com Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20170623165530.22514-4-riel@redhat.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 130 ++++++++++++++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 59 deletions(-) commit 7d894e6e34a5cdd12309c7e4a3f830277ad4b7bf Author: Rik van Riel Date: Fri Jun 23 12:55:28 2017 -0400 sched/fair: Simplify wake_affine() for the single socket case Then 'this_cpu' and 'prev_cpu' are in the same socket, select_idle_sibling() will do its thing regardless of the return value of wake_affine(). Just return true and don't look at all the other things. Signed-off-by: Rik van Riel Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: jhladky@redhat.com Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20170623165530.22514-3-riel@redhat.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 739294fb03f590401bbd7faa6d31a507e3ffada5 Author: Rik van Riel Date: Fri Jun 23 12:55:27 2017 -0400 sched/numa: Override part of migrate_degrades_locality() when idle balancing Several tests in the NAS benchmark seem to run a lot slower with NUMA balancing enabled, than with NUMA balancing disabled. The slower run time corresponds with increased idle time. Overriding the final test of migrate_degrades_locality (but still doing the other NUMA tests first) seems to improve performance of those benchmarks. Reported-by: Jirka Hladky Signed-off-by: Rik van Riel Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20170623165530.22514-2-riel@redhat.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1bc3cd4dfa9f2f5385ee15de2301d25e51cf43f0 Merge: 8887cd9 94a6df2 Author: Ingo Molnar Date: Sat Jun 24 08:57:20 2017 +0200 Merge branch 'linus' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit e8ad8bc403f49f8cb95448acfdeee39b459eded4 Author: Anton Vasilyev Date: Fri Jun 23 19:23:13 2017 +0300 x86/paravirt: Remove unnecessary return from void function The patch removes unnecessary return from void function. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Cc: Alok Kataria Cc: Chris Wright Cc: Jeremy Fitzhardinge Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rusty Russell Cc: Thomas Gleixner Cc: ldv-project@linuxtesting.org Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1498234993-1320-1-git-send-email-vasilyev@ispras.ru Signed-off-by: Ingo Molnar arch/x86/include/asm/paravirt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ec829a9d1c8562ac15c50402e5de550bb28161e Author: Tommy Nguyen Date: Fri Jun 23 10:36:01 2017 -0400 x86/boot: Add missing strchr() declaration The Sparse static analyzer emits this warning: symbol 'strchr' was not declared. Should it be static? This patch adds the appropriate extern declaration to string.h to fix the warning. Signed-off-by: Tommy Nguyen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170623143601.GA20743@NoChina Signed-off-by: Ingo Molnar arch/x86/boot/string.h | 1 + 1 file changed, 1 insertion(+) commit 4a06370bcb674af88679a4f2c5c87c3e40688935 Author: Michal Hocko Date: Wed Jun 14 10:22:18 2017 +0200 x86/mmap, ASLR: Do not treat unlimited-stack tasks as legacy mmap Since the following commit in 2008: cc503c1b43e0 ("x86: PIE executable randomization") We added a heuristics to treat applications with RLIMIT_STACK configured to unlimited as legacy. This means: a) set the mmap_base to 1/3 of address space + randomization and b) mmap from bottom to top. This makes some sense as it allows the stack to grow really large. On the other hand it reduces the address space usable for default mmaps (without address hint) quite a lot. We have received a bug report that SAP HANA workload has hit into this limitation. We could argue that the user just got what he asked for when setting up the unlimited stack but to be realistic growing stack up to 1/6 TASK_SIZE (allowed by mmap_base) is pretty much unimited in the real life. This would give mmap 20TB of additional address space which is quite nice. Especially when it is much more likely to use that address space than the reserved stack. Digging into the history the original implementation of the randomization: 8817210d4d96 ("[PATCH] x86_64: Flexmap for 32bit and randomized mappings for 64bit") didn't have this restriction. So let's try and remove this assumption - hopefully nothing breaks. Signed-off-by: Michal Hocko Acked-by: Jiri Kosina Acked-by: Oleg Nesterov Cc: Dave Jones Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: hughd@google.com Cc: linux-mm@kvack.org Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/tip-86b110d2ae6365ce91cabd37588bc8611770421a@git.kernel.org [ So I've applied this to tip:x86/mm with a wider Cc: list - if anyone objects to this change please holler. ] Signed-off-by: Ingo Molnar arch/x86/mm/mmap.c | 3 --- 1 file changed, 3 deletions(-) commit fe6d94fe66b50c10c94911e525ad680a8f2dfc21 Author: Diaz de Grenu, Jose Date: Thu May 11 17:38:39 2017 +0200 rtc: mxc: remove unused variable This variable was never used. With GCC 6.2, we get the following warning: drivers/rtc/rtc-mxc.c:44:18: warning: ‘PIE_BIT_DEF’ defined but not used [-Wunused-const-variable=] static const u32 PIE_BIT_DEF[MAX_PIE_NUM][2] = { Signed-off-by: Diaz de Grenu, Jose Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mxc.c | 11 ----------- 1 file changed, 11 deletions(-) commit 0ec7769a98b00866e37740328d65cba6594d178d Author: Vaibhav Jain Date: Wed May 31 18:39:01 2017 +0530 rtc: opal: Implement rtc_class_ops.alarm_irq_enable callback Provide an implementation of the callback rtc_class_ops.alarm_irq_enable for rtc-opal driver. This callback is called when the wake alarm is disabled via the command: 'echo 0 > /sys/class/rtc/rtc0/wakealarm' Without this the Timed-Power-On(TPO) config remains set even when its disabled by the above command and FSP will still force machine boot at previously configured alarm time. The callback is implemented as function opal_tpo_alarm_irq_enable() which calls opal_set_tpo_time() with alarm.enabled == 0. A branch is added to opal_set_tpo_time() to handle this case by passing y_m_d == h_m_s_ms == 0 to opal as arguments for opal_tpo_write() call. Signed-off-by: Vaibhav Jain Signed-off-by: Alexandre Belloni drivers/rtc/rtc-opal.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit f4fdf2b474606580b95eed95d06c762d4fd3f57b Author: Len Brown Date: Sat May 27 21:06:55 2017 -0700 tools/power turbostat: if --debug, print sampling overhead The --debug option now pre-pends each row with the number of micro-seconds [usec] to collect the finishing snapshot for that row. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit a99d87306f83d2a97c8c7e854b6583c4037ecf75 Author: Len Brown Date: Sat May 20 20:11:55 2017 -0400 tools/power turbostat: hide SKL counters, when not requested Skylake has some new counters, and they were erroneously exempt from --show and --hide eg. turbostat --quiet --show CPU CPU Totl%C0 Any%C0 GFX%C0 CPUGFX% - 116.73 90.56 85.69 79.00 0 117.78 91.38 86.47 79.71 2 1 3 is now CPU - 0 2 1 3 Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 58 +++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 13 deletions(-) commit c250b7dd8e73b5f7d88d231fbaac92e3360a7234 Author: Eric Biggers Date: Thu Jun 22 12:14:40 2017 -0700 fscrypt: make ->dummy_context() return bool This makes it consistent with ->is_encrypted(), ->empty_dir(), and fscrypt_dummy_context_enabled(). Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/super.c | 2 +- include/linux/fscrypt_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b7e7cf7a66a27e62c5f873a0068cee34094bf5d7 Author: Daniel Walter Date: Mon Jun 19 09:27:58 2017 +0200 fscrypt: add support for AES-128-CBC fscrypt provides facilities to use different encryption algorithms which are selectable by userspace when setting the encryption policy. Currently, only AES-256-XTS for file contents and AES-256-CBC-CTS for file names are implemented. This is a clear case of kernel offers the mechanism and userspace selects a policy. Similar to what dm-crypt and ecryptfs have. This patch adds support for using AES-128-CBC for file contents and AES-128-CBC-CTS for file name encryption. To mitigate watermarking attacks, IVs are generated using the ESSIV algorithm. While AES-CBC is actually slightly less secure than AES-XTS from a security point of view, there is more widespread hardware support. Using AES-CBC gives us the acceptable performance while still providing a moderate level of security for persistent storage. Especially low-powered embedded devices with crypto accelerators such as CAAM or CESA often only support AES-CBC. Since using AES-CBC over AES-XTS is basically thought of a last resort, we use AES-128-CBC over AES-256-CBC since it has less encryption rounds and yields noticeable better performance starting from a file size of just a few kB. Signed-off-by: Daniel Walter [david@sigma-star.at: addressed review comments] Signed-off-by: David Gstir Reviewed-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/Kconfig | 1 + fs/crypto/crypto.c | 23 ++++-- fs/crypto/fscrypt_private.h | 9 ++- fs/crypto/keyinfo.c | 173 ++++++++++++++++++++++++++++++++--------- fs/crypto/policy.c | 8 +- include/linux/fscrypt_common.h | 16 ++-- include/uapi/linux/fs.h | 2 + 7 files changed, 174 insertions(+), 58 deletions(-) commit 27e47a6342e21b005a15a1f0afea0b6f179e0a71 Author: Eric Biggers Date: Mon May 22 18:14:06 2017 -0700 fscrypt: inline fscrypt_free_filename() fscrypt_free_filename() only needs to do a kfree() of crypto_buf.name, which works well as an inline function. We can skip setting the various pointers to NULL, since no user cares about it (the name is always freed just before it goes out of scope). Signed-off-by: Eric Biggers Reviewed-by: David Gstir Signed-off-by: Theodore Ts'o fs/crypto/fname.c | 9 --------- include/linux/fscrypt_supp.h | 7 ++++++- 2 files changed, 6 insertions(+), 10 deletions(-) commit d50a7d8acd780f54c48703ab1069c2e64a24e4a0 Author: Daniel Lezcano Date: Mon Jun 12 17:55:10 2017 +0200 ARM: cpuidle: Support asymmetric idle definition Some hardware have clusters with different idle states. The current code does not support this and fails as it expects all the idle states to be identical. Because of this, the Mediatek mtk8173 had to create the same idle state for a big.Little system and now the Hisilicon 960 is facing the same situation. Solve this by simply assuming the multiple driver will be needed for all the platforms using the ARM generic cpuidle driver which makes sense because of the different topologies we can support with a single kernel for ARM32 or ARM64. Every CPU has its own driver, so every single CPU can specify in the DT the idle states. This simple approach allows to support the future dynamIQ system, current SMP and HMP. Tested on: - 96boards: Hikey 620 - 96boards: Hikey 960 - 96boards: dragonboard410c - Mediatek 8173 Tested-by: Leo Yan Signed-off-by: Daniel Lezcano Acked-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/cpuidle/Kconfig.arm | 1 + drivers/cpuidle/cpuidle-arm.c | 62 ++++++++++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 24 deletions(-) commit 63136858aecbe86dbd3c3289a3f46ba1b5f92239 Author: Eric Biggers Date: Fri Jun 23 19:48:44 2017 -0400 ext4: require key for truncate(2) of encrypted file Currently, filesystems allow truncate(2) on an encrypted file without the encryption key. However, it's impossible to correctly handle the case where the size being truncated to is not a multiple of the filesystem block size, because that would require decrypting the final block, zeroing the part beyond i_size, then encrypting the block. As other modifications to encrypted file contents are prohibited without the key, just prohibit truncate(2) as well, making it fail with ENOKEY. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1a4fe38add8be45eb3873ad756561b9baf6bcaef Author: Srinivas Pandruvada Date: Mon Jun 12 16:30:27 2017 -0700 cpufreq: intel_pstate: Remove max/min fractions to limit performance In the current model the max/min perf limits are a fraction of current user space limits to the allowed max_freq or 100% for global limits. This results in wrong ratio limits calculation because of rounding issues for some user space limits. Initially we tried to solve this issue by issue by having more shift bits to increase precision. Still there are isolated cases where we still have error. This can be avoided by using ratios all together. Since the way we get cpuinfo.max_freq is by multiplying scaling factor to max ratio, we can easily keep the max/min ratios in terms of ratios and not fractions. For example: if the max ratio = 36 cpuinfo.max_freq = 36 * 100000 = 3600000 Suppose user space sets a limit of 1200000, then we can calculate max ratio limit as = 36 * 1200000 / 3600000 = 12 This will be correct for any user limits. The other advantage is that, we don't need to do any calculation in the fast path as ratio limit is already calculated via set_policy() callback. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 114 +++++++++++++++++++++++------------------ 1 file changed, 63 insertions(+), 51 deletions(-) commit 51204e0639c49ada02fd823782ad673b6326d748 Author: Len Brown Date: Fri Jun 16 20:03:11 2017 -0700 x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz" cpufreq_quick_get() allows cpufreq drivers to over-ride cpu_khz that is otherwise reported in x86 /proc/cpuinfo "cpu MHz". There are four problems with this scheme, any of them is sufficient justification to delete it. 1. Depending on which cpufreq driver is loaded, the behavior of this field is different. 2. Distros complain that they have to explain to users why and how this field changes. Distros have requested a constant. 3. The two major providers of this information, acpi_cpufreq and intel_pstate, both "get it wrong" in different ways. acpi_cpufreq lies to the user by telling them that they are running at whatever frequency was last requested by software. intel_pstate lies to the user by telling them that they are running at the average frequency computed over an undefined measurement. But an average computed over an undefined interval, is itself, undefined... 4. On modern processors, user space utilities, such as turbostat(1), are more accurate and more precise, while supporing concurrent measurement over arbitrary intervals. Users who have been consulting /proc/cpuinfo to track changing CPU frequency will be dissapointed that it no longer wiggles -- perhaps being unaware of the limitations of the information they have been consuming. Yes, they can change their scripts to look in sysfs cpufreq/scaling_cur_frequency. Here they will find the same data of dubious quality here removed from /proc/cpuinfo. The value in sysfs will be addressed in a subsequent patch to address issues 1-3, above. Issue 4 will remain -- users that really care about accurate frequency information should not be using either proc or sysfs kernel interfaces. They should be using using turbostat(8), or a similar purpose-built analysis tool. Signed-off-by: Len Brown Reviewed-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki arch/x86/kernel/cpu/proc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 0370f0f975e5561c658aa86e2c372079e6a425eb Author: Colin Ian King Date: Thu Jun 15 10:55:59 2017 +0100 cpufreq: sfi: make freq_table static pointer freq_table can be made static as it does not need to be in global scope. Cleans up sparse warning: "symbol 'freq_table' was not declared. Should it be static?" Signed-off-by: Colin Ian King Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/sfi-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 829a4e8c0e9aab17bcfe2ddb070388b8ada26292 Author: Viresh Kumar Date: Wed Jun 21 10:29:13 2017 +0530 PM / OPP: Add dev_pm_opp_{set|put}_clkname() In order to support OPP switching, OPP layer needs to get pointer to the clock for the device. Simple cases work fine without using the routines added by this patch (i.e. by passing connection-id as NULL), but for a device with multiple clocks available, the OPP core needs to know the exact name of the clk to use. Add a new set of APIs to get that done. Tested-by: Rajendra Nayak Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 67 +++++++++++++++++++++++++++++++++++++++++++ include/linux/pm_opp.h | 9 ++++++ 2 files changed, 76 insertions(+) commit 66e0aaadce7fc99e91e0b427e2b177e14d0b951b Author: Eric Biggers Date: Fri Jun 23 19:41:38 2017 -0400 ext4: don't bother checking for encryption key in ->mmap() Since only an open file can be mmap'ed, and we only allow open()ing an encrypted file when its key is available, there is no need to check for the key again before permitting each mmap(). Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/file.c | 7 ------- 1 file changed, 7 deletions(-) commit e773f5c7e8c6279b2560ae1ca2a1d37cc12fe7c3 Author: Krzysztof Kozlowski Date: Wed Jun 7 20:13:24 2017 +0200 cpufreq: exynos5440: Fix inconsistent indenting Fix inconsistent indenting and unneeded white space in assignment. Signed-off-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/exynos5440-cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3fafb4e77279ed375077e95f54ee687b481c24d2 Author: Octavian Purdila Date: Tue May 30 18:57:18 2017 +0300 cpufreq: imx6q: imx6ull should use the same flow as imx6ul This fixes an issue with imx6ull where setting the frequency to 528Mhz would actually set the ARM clock to 324Mhz. Signed-off-by: Octavian Purdila Signed-off-by: Leonard Crestez Acked-by: Viresh Kumar Reviewed-by: Fabio Estevam Signed-off-by: Rafael J. Wysocki drivers/cpufreq/imx6q-cpufreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a0df77348ab37687c9513bc2dd772cbc6eadbe63 Author: Tao Wang Date: Tue May 23 16:13:18 2017 +0800 cpufreq: dt: Add support for hi3660 Add the compatible string for supporting the generic device tree cpufreq-dt driver on Hisilicon's 3660 SoC. Signed-off-by: Tao Wang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) commit b21569cf1de925e0a42c9964bd7f520cb4a4d875 Author: Viresh Kumar Date: Thu Jun 22 09:15:11 2017 +0530 PM / OPP: Use - instead of @ for DT entries Compiling the DT file with W=1, DTC warns like follows: Warning (unit_address_vs_reg): Node /opp_table0/opp@1000000000 has a unit name, but no reg property Fix this by replacing '@' with '-' as the OPP nodes will never have a "reg" property. Reported-by: Krzysztof Kozlowski Reported-by: Masahiro Yamada Suggested-by: Mark Rutland Signed-off-by: Viresh Kumar Acked-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki Documentation/devicetree/bindings/opp/opp.txt | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 995c0ec9a81f9e4e75f280f095534f4ed1a9ea9d Author: Jeffery Yu Date: Tue May 16 17:46:48 2017 +0200 platform/chrome: cros_ec_lightbar - Avoid I2C xfer to EC during suspend A Mutex lock in cros_ec_cmd_xfer which may be held by frozen Userspace thread during system suspending. So should not call this routine in suspend thread. Signed-off-by: Jeffery Yu Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_dev.c | 12 ++++-------- drivers/platform/chrome/cros_ec_lightbar.c | 13 +++++++++---- 2 files changed, 13 insertions(+), 12 deletions(-) commit abbb054d53266bfbd45ca9f2ba6522e3fd5b7f86 Author: Eric Caruso Date: Tue May 16 17:46:48 2017 +0200 platform/chrome: cros_ec_lightbar - Add userspace lightbar control bit to EC Some devices might want to turn off the lightbar if e.g. the system turns the screen off due to idleness. This prevents the kernel from going through its normal suspend/resume pathways. Signed-off-by: Eric Caruso Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_lightbar.c | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 405c84308c4335ee7cb58b9304b77b85e61f7129 Author: Eric Caruso Date: Tue May 16 17:46:48 2017 +0200 platform/chrome: cros_ec_lightbar - Control of suspend/resume lightbar sequence Don't let EC control suspend/resume sequence. If the EC controls the lightbar and sets the sequence when it notices the chipset transitioning between states, we can't make exceptions for cases where we don't want to activate the lightbar. Instead, let's move the suspend/resume notifications into the kernel so we can selectively play the sequences. Signed-off-by: Eric Caruso Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra Acked-by: Lee Jones Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_dev.c | 37 +++++++++++++ drivers/platform/chrome/cros_ec_dev.h | 6 +++ drivers/platform/chrome/cros_ec_lightbar.c | 85 ++++++++++++++++++++++++++++-- include/linux/mfd/cros_ec_commands.h | 11 +++- 4 files changed, 134 insertions(+), 5 deletions(-) commit be3ebebf4377fe924f0419f78fc82cf01a31e692 Author: Eric Caruso Date: Tue May 16 17:46:48 2017 +0200 platform/chrome: cros_ec_lightbar - Add lightbar program feature to sysfs Add a program feature so we can upload and run programs for lightbar sequences. We should be able to use this to shift sequences out of the EC and save space there. $ cat > /sys/devices/.../cros_ec/program $ echo program > /sys/devices/.../cros_ec/sequence Signed-off-by: Eric Caruso Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra Acked-by: Lee Jones Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_lightbar.c | 69 +++++++++++++++++++++++++++++- include/linux/mfd/cros_ec_commands.h | 12 +++++- 2 files changed, 79 insertions(+), 2 deletions(-) commit a6df7798d03b29095723c5fe9174ee2b53135ed0 Author: Gwendal Grignou Date: Tue May 16 17:46:48 2017 +0200 platform/chrome: cros_ec_lpc: Add MKBP events support over ACPI This patch installs a notify handler to process MKBP events for EC firmware directing them over ACPI. Signed-off-by: Gwendal Grignou Signed-off-by: Thierry Escande Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_lpc.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 450de8f43fa665189b8663ae54985152781fb6a4 Author: Archana Patni Date: Tue May 16 17:46:48 2017 +0200 platform/chrome: cros_ec_lpc: Add power management ops This patch adds suspend and resume pm ops to the LPC ChromeOS EC driver. These LPC handlers call the croc_ec generic handlers. Signed-off-by: Archana Patni Signed-off-by: Thierry Escande Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_lpc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 12278dc7c572e87727715ecce9cda15b70efeca5 Author: Gwendal Grignou Date: Tue May 16 17:46:48 2017 +0200 platform/chrome: cros_ec_lpc: Add support for GOOG004 ACPI device This patch removes platform_device_register() call and adds an ACPI device id structure. The driver is now automatically probed for devices with a GOOG0004 ACPI entry. Signed-off-by: Gwendal Grignou Signed-off-by: Thierry Escande Signed-off-by: Benson Leung drivers/platform/chrome/Kconfig | 2 +- drivers/platform/chrome/cros_ec_lpc.c | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) commit 8d4a3dc423a2695be51ac864eefb8ba7688b1240 Author: Shawn Nematbakhsh Date: Tue May 16 17:46:48 2017 +0200 platform/chrome: cros_ec_lpc: Add support for mec1322 EC This adds support for the ChromeOS LPC Microchip Embedded Controller (mec1322) variant. mec1322 accesses I/O region [800h, 9ffh] through embedded memory interface (EMI) rather than LPC. Signed-off-by: Shawn Nematbakhsh Signed-off-by: Thierry Escande Acked-by: Lee Jones Signed-off-by: Benson Leung drivers/platform/chrome/Kconfig | 12 +++ drivers/platform/chrome/Makefile | 1 + drivers/platform/chrome/cros_ec_lpc.c | 5 ++ drivers/platform/chrome/cros_ec_lpc_mec.c | 140 ++++++++++++++++++++++++++++++ drivers/platform/chrome/cros_ec_lpc_reg.c | 69 +++++++++++++++ include/linux/mfd/cros_ec_lpc_mec.h | 90 +++++++++++++++++++ include/linux/mfd/cros_ec_lpc_reg.h | 14 +++ 7 files changed, 331 insertions(+) commit bce70fef7279243d62adbf5f53998b8d3d016144 Author: Shawn Nematbakhsh Date: Tue May 16 17:46:48 2017 +0200 platform/chrome: cros_ec_lpc: Add R/W helpers to LPC protocol variants Call common functions for read / write to prepare support for future LPC protocol variants which use different I/O ops than inb / outb. Signed-off-by: Shawn Nematbakhsh Signed-off-by: Thierry Escande Acked-by: Lee Jones Signed-off-by: Benson Leung drivers/platform/chrome/Makefile | 3 +- drivers/platform/chrome/cros_ec_lpc.c | 88 +++++++++++++------------------ drivers/platform/chrome/cros_ec_lpc_reg.c | 64 ++++++++++++++++++++++ include/linux/mfd/cros_ec_lpc_reg.h | 47 +++++++++++++++++ 4 files changed, 151 insertions(+), 51 deletions(-) commit 52b3f239bb692d9b3a68461798fb15c011e4108e Author: Jonathan Corbet Date: Fri Jun 23 14:17:38 2017 -0600 Docs: clean up some DocBook loose ends There were a few bits and pieces left over from the now-disused DocBook toolchain; git rid of them. Reported-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/dontdiff | 1 - Documentation/sphinx/convert_template.sed | 18 - Documentation/sphinx/post_convert.sed | 23 - MAINTAINERS | 3 +- Makefile | 1 - scripts/.gitignore | 1 - scripts/Makefile | 7 +- scripts/docproc.c | 681 ------------------------------ scripts/kernel-doc-xml-ref | 198 --------- 9 files changed, 3 insertions(+), 930 deletions(-) commit 61ca5fd1927522b36d00e30c3523f2a03faf49fa Author: Konstantin Ryabitsev Date: Tue Jun 6 16:50:04 2017 -0400 Make the main documentation title less Geocities This is probably the lamest patch ever, but then again "Welcome to The Linux Kernel's documentation" is nearly equally lame. Really, we don't need to "Welcome" people to the documentation, just tell them what the site is about. Signed-off-by: Konstantin Ryabitsev Acked-by: Jani Nikula Signed-off-by: Jonathan Corbet Documentation/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af648bbe940b047152887e2333ae4aebd5eaaa5d Author: Jonathan Corbet Date: Sun Jun 18 17:33:00 2017 -0600 Docs: Use kernel-figure in vidioc-g-selection.rst ...otherwise the PDF build fails when it can't find constraints.pdf. Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/media/uapi/v4l/vidioc-g-selection.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82a1955162f72f251041da7840970f8612ebbb05 Author: Jonathan Corbet Date: Sun Jun 18 17:30:18 2017 -0600 Docs: fix table problems in ras.rst Two table problems caused the PDF build to fail: - Evidently multirow cells are not appreciated in table headers, so remove such from the "CS Rows" table. - The logging message structure table was incorrectly formatted, with two "+" instead of "|". The HTML build is forgiving of such things, but PDF is not. Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/admin-guide/ras.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 633d612bda6a37e1d5f5f878ec5a22a11599f800 Author: Mauro Carvalho Chehab Date: Mon Jun 19 07:49:06 2017 -0300 Docs: Fix breakage with Sphinx 1.5 and upper Commit 85c21e5c3ee7 (docs-rst: better adjust margins and font size) added a \usepackage{geometry} that conflicts with another inclusion deep within the dependencies with newer versions of Sphinx, causing the the PDF build to fail with a "conflicting parameters" error. Detect the Sphinx version, using sphinxsetup for Sphinx versions 1.5 and upper. Fixes: 85c21e5c3ee74fb75d690c57f7066bae7e2dca55 [jc: Tweaked logic to exclude 1.5.x for x < 3 ] Signed-off-by: Mauro Carvalho Chehab Documentation/conf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit cc110221918d5564c9dd415cebe62cae4f8d5df5 Author: Jonathan Corbet Date: Sun Jun 18 17:23:52 2017 -0600 Docs: Include the Latex "ifthen" package Otherwise we get PDF build failures when LaTeX refused to acknowledge the existence of \ifthenelse Fixes: 41cff161fe99d1c6a773becc2250a1dc3ac035ff Cc: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 1 + 1 file changed, 1 insertion(+) commit 6dff86a30d1475a42d9bc0f0b4bba9b8f51c3776 Author: SeongJae Park Date: Sun Jun 18 09:56:04 2017 +0900 selftest/net/Makefile: Specify output with $(OUTPUT) After commit a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT"), net selftest build fails because it points output file without $(OUTPUT) yet. This commit fixes the error. Signed-off-by: SeongJae Park Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Shuah Khan tools/testing/selftests/net/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dc816e5d84cbc28baf776799839a632d6002236f Author: SeongJae Park Date: Sun Jun 18 09:56:03 2017 +0900 selftest/intel_pstate/aperf: Use LDLIBS instead of LDFLAGS Build of aperf fails as below: ``` gcc -Wall -D_GNU_SOURCE -lm aperf.c -o /tools/testing/selftests/intel_pstate/aperf /tmp/ccKf3GF6.o: In function `main': aperf.c:(.text+0x278): undefined reference to `sqrt' collect2: error: ld returned 1 exit status ``` The faulure occurs because -lm was defined as LDFLAGS and implicit rule of make places LDFLAGS before source file. This commit fixes the problem by using LDLIBS instead of LDFLAGS. Signed-off-by: SeongJae Park Signed-off-by: Shuah Khan tools/testing/selftests/intel_pstate/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d02db4f5b2c9159a9c8e22c57b90b48268ccd6ee Author: SeongJae Park Date: Sun Jun 18 09:56:02 2017 +0900 selftest/memfd/Makefile: Fix build error Selftest for memfd shows build error as below: ``` gcc -D_FILE_OFFSET_BITS=64 -I../../../../include/uapi/ -I../../../../include/ -I../../../../usr/include/ fuse_mnt.c -o /home/sjpark/linux/tools/testing/selftests/memfd/fuse_mnt /tmp/cc6NHdwJ.o: In function `main': fuse_mnt.c:(.text+0x249): undefined reference to `fuse_main_real' collect2: error: ld returned 1 exit status ``` The build fails because output file is specified without $(OUTPUT) and LDFLAGS is used though Makefile implicit rule is used. This commit fixes the error by specifying output file path with $(OUTPUT) and using LDLIBS instead of LDFLAGS. Signed-off-by: SeongJae Park Signed-off-by: Shuah Khan tools/testing/selftests/memfd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf3db45dc1bedd628bae363a0d32d4ee11b4d9dd Merge: d4d0249 bedd00c Author: David S. Miller Date: Fri Jun 23 15:06:44 2017 -0400 Merge branch 'phy-internal' Florian Fainelli says: ==================== net: phy: Support "internal" PHY interface This makes the "internal" phy-mode property generally available and documented and this allows us to remove some custom parsing code we had for bcmgenet and bcm_sf2 which both used that specific value. ==================== Signed-off-by: David S. Miller commit bedd00c81b30a7c5f1fbe144f2db9c9864073b27 Author: Florian Fainelli Date: Fri Jun 23 10:33:16 2017 -0700 net: dsa: bcm_sf2: Remove special handling of "internal" phy-mode The PHY library now supports an "internal" phy-mode, thus making our custom parsing code now unnecessary. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 40bc8b065e8fd3928270481c89d78e317d62cf24 Author: Florian Fainelli Date: Fri Jun 23 10:33:15 2017 -0700 net: bcmgenet: Remove special handling of "internal" phy-mode The PHY library now supports an "internal" phy-mode, thus making our custom parsing code now unnecessary. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmmii.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 735d8a18433e8d953e4e2b92883bfcc566e382c2 Author: Florian Fainelli Date: Fri Jun 23 10:33:14 2017 -0700 net: phy: Support "internal" PHY interface Now that the Device Tree binding has been updated, update the PHY library phy_interface_t and phy_modes to support the "internal" PHY interface type. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/phy.h | 3 +++ 1 file changed, 3 insertions(+) commit 29b65f5f97632722bb80969377e5b0e2401fb392 Author: Florian Fainelli Date: Fri Jun 23 10:33:13 2017 -0700 dt-bindings: Add "internal" as a valid 'phy-mode' property A number of Ethernet MACs have internal Ethernet PHYs and the internal wiring makes it so that this knowledge needs to be available using the standard 'phy-mode' property. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ethernet.txt | 1 + 1 file changed, 1 insertion(+) commit 8064c616984eaa015f018dba595d78cd24a0cc8c Author: Matt Weber Date: Thu Jun 22 15:00:33 2017 -0500 i2c: cadance: fix ctrl/addr reg write order The driver was clearing the hold bit in the control register before writing to the address register which resulted in a stop condition being generated rather than a repeated start. This issue was only observed when a system was running much slower than a normal processor would execute. The IP data sheet mentions a ordering of writing to the address register before clearing the hold. Fixes: df8eb5691c4 ("i2c: Add driver for Cadence I2C controller") Signed-off-by: John Linn Signed-off-by: Paresh Chaudhary Signed-off-by: Matthew Weber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-cadence.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9615a01f71ca02858f5265b1b545280758562aa2 Author: Baoyou Xie Date: Thu Jun 22 20:56:55 2017 +0800 i2c: zx2967: add i2c controller driver for ZTE's zx2967 family This patch adds i2c controller driver for ZTE's zx2967 family. Signed-off-by: Baoyou Xie Reviewed-by: Andy Shevchenko Reviewed-by: Jun Nie Signed-off-by: Shawn Guo Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 9 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-zx2967.c | 609 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 619 insertions(+) commit c0022504b500c4394ff106f0f13acb879ab2c70f Author: Baoyou Xie Date: Thu Jun 22 20:56:54 2017 +0800 dt: bindings: add documentation for zx2967 family i2c controller This patch adds dt-binding documentation for zx2967 family i2c controller. Signed-off-by: Baoyou Xie Acked-by: Rob Herring Signed-off-by: Shawn Guo Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-zx2967.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 606fd2788b0fce6f5138078a4fbe8979ecba5697 Author: Jean Delvare Date: Wed Jun 21 09:24:02 2017 +0200 i2c: algo-bit: add support for I2C_M_STOP Support for enforced STOPs will allow us to use SCCB compatible devices. Based on a preliminary patch by Wolfram Sang. Signed-off-by: Jean Delvare Tested-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/algos/i2c-algo-bit.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 413dfbbfca54904760aa04af40ca26e2a70f3eda Author: Brendan Higgins Date: Tue Jun 20 14:15:13 2017 -0700 MAINTAINERS: add entry for Aspeed I2C driver Added myself as maintainer of the Aspeed I2C driver and the associated I2C interrupt controller and added Joel Stanley and Benjamin Herrenschmidt as reviewers. Signed-off-by: Brendan Higgins Signed-off-by: Wolfram Sang MAINTAINERS | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f9eb91350bb20b3e881bc59158071e14ee4f0326 Author: Brendan Higgins Date: Tue Jun 20 14:15:16 2017 -0700 i2c: aspeed: added slave support for Aspeed I2C driver Added slave support for Aspeed I2C controller. Supports fourteen busses present in AST24XX and AST25XX BMC SoCs by Aspeed. Signed-off-by: Brendan Higgins Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-aspeed.c | 201 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) commit f327c686d3ba44eda79a2d9e02a6a242e0b75787 Author: Brendan Higgins Date: Tue Jun 20 14:15:15 2017 -0700 i2c: aspeed: added driver for Aspeed I2C Added initial master support for Aspeed I2C controller. Supports fourteen busses present in AST24XX and AST25XX BMC SoCs by Aspeed. Signed-off-by: Brendan Higgins Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-aspeed.c | 690 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 701 insertions(+) commit 10a6218e382d9fafd4c2add1b171d89a079c5a47 Author: Brendan Higgins Date: Tue Jun 20 14:15:14 2017 -0700 i2c: aspeed: added documentation for Aspeed I2C driver Added device tree binding documentation for Aspeed I2C busses. Signed-off-by: Brendan Higgins Acked-by: Rob Herring Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-aspeed.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit b395ba21699dbbca2dbf05833a71f5fbf5245a3f Author: Wolfram Sang Date: Mon Jun 19 23:41:46 2017 +0200 i2c: rcar: document HW incapabilities Add recent findings (IGNORE_NAK) and document in a bit more detail why the feature is not possible. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rcar.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7f794788dbf9e1a9ca9a5c1cc0a90642f3b4e4ce Author: Bhushan Shah Date: Thu Jun 15 11:45:21 2017 +0530 ARM: qcom_defconfig: enable RPMSG_QCOM_SMD As of commit 5052de8deff56, QCOM_SMD_RPM and various other config options enabled in the qcom_defconfig depends on the RPMSG. If QCOM_SMD_RPM config option is not selected it disables the REGULATOR_QCOM_SMD_RPM and other essential config options. Signed-off-by: Bhushan Shah Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 1 + 1 file changed, 1 insertion(+) commit 0a932693c95ed5ed22506f09af084d8d3c299393 Merge: 2ea659a 1d91753 Author: Andy Gross Date: Fri Jun 23 13:29:31 2017 -0500 Merge tag 'qcom-defconfig-for-4.13' into defconfig-for-4.13-2 Qualcomm ARM Based defconfig Updates for v4.13 * Enable IPQ4019 clock and pinctrl commit d4d0249ae28a6d62647a894051634bb87c9b5953 Merge: 8f46d46 137ffd1 Author: David S. Miller Date: Fri Jun 23 14:24:28 2017 -0400 Merge tag 'mlx5-updates-2017-06-23' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-06-23 This series provides some updates to the mlx5 core and netdevice drivers. Three patches from Tariq, Introduces page reuse mechanism in non-Striding RQ RX datapath, we allow the the RX descriptor to reuse its allocated page as much as it could, until the page is fully consumed. RX page reuse reduces the stress on page allocator and improves RX performance especially with high speeds (100Gb/s). Next four patches of the series from Or allows to offload tc flower matching on ttl/hoplimit and header re-write of hoplimit. The rest of the series from Yotam and Or enhances mlx5 to support FW flashing through the mlxfw module, in a similar manner done by the mlxsw driver. Currently, only ethtool based flashing is implemented, where both Eth and IB ports are supported. ==================== Signed-off-by: David S. Miller commit 8f46d46715a12f509e13200033a1ed4d6cf335ff Author: Arjun Vynipadath Date: Fri Jun 23 19:14:37 2017 +0530 cxgb4: Use Firmware params to get buffer-group map Buffer group mappings can be obtained using FW_PARAMs cmd for newer FW. Since some of the bg_maps are obtained in atomic context, created another t4_query_params_ns(), that wont sleep when awaiting mbox cmd completion. Signed-off-by: Casey Leedom Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 10 ++- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 108 ++++++++++++++++++++++---- drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 1 + 3 files changed, 101 insertions(+), 18 deletions(-) commit 193c4c2845f7c6b37a4886d747f47b1dff64600a Author: Arjun Vynipadath Date: Fri Jun 23 19:14:36 2017 +0530 cxgb4: Update T6 Buffer Group and Channel Mappings We were using t4_get_mps_bg_map() for both t4_get_port_stats() to determine which MPS Buffer Groups to report statistics on for a given Port, and also for t4_sge_alloc_rxq() to provide a TP Ingress Channel Congestion Map. For T4/T5 these are actually the same values (because they are ~somewhat~ related), but for T6 they should return different values (T6 has Port 0 associated with MPS Buffer Group 0 (with MPS Buffer Group 1 silently cascading off) and Port 1 is associated with MPS Buffer Group 2 (with 3 cascading off)). Based on the original work by Casey Leedom Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 91 +++++++++++++++++++++---- 3 files changed, 80 insertions(+), 18 deletions(-) commit ac55cd619335c577f29eea599a6a35b6b48797e8 Author: Dan Carpenter Date: Fri Jun 23 13:15:44 2017 +0300 tls: return -EFAULT if copy_to_user() fails The copy_to_user() function returns the number of bytes remaining but we want to return -EFAULT here. Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Dan Carpenter Acked-by: Dave Watson Signed-off-by: David S. Miller net/tls/tls_main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 93bbbfbb4a5aa32a2375a86f3a23e48ea75e05db Merge: 408cf83 8bafd73 Author: David S. Miller Date: Fri Jun 23 14:17:31 2017 -0400 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 2017-06-23 1) Use memdup_user to spmlify xfrm_user_policy. From Geliang Tang. 2) Make xfrm_dev_register static to silence a sparse warning. From Wei Yongjun. 3) Use crypto_memneq to check the ICV in the AH protocol. From Sabrina Dubroca. 4) Remove some unused variables in esp6. From Stephen Hemminger. 5) Extend XFRM MIGRATE to allow to change the UDP encapsulation port. From Antony Antony. 6) Include the UDP encapsulation port to km_migrate announcements. From Antony Antony. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 408cf83f70b8a3d7038c775452c50da010cc580b Merge: 926f38e 8523899 Author: David S. Miller Date: Fri Jun 23 14:15:12 2017 -0400 Merge branch 'ena-new-features-and-improvements' Netanel Belgazal says: ==================== net: update ena ethernet driver to version 1.2.0 This patchset contains some new features/improvements that were added to the ENA driver to increase its robustness and are based on experience of wide ENA deployment. Change log: V2: * Remove patch that add inline to C-file static function (contradict coding style). * Remove patch that moves MTU parameter validation in ena_change_mtu() instead of using the network stack. * Use upper_32_bits()/lower_32_bits() instead of casting. ==================== Signed-off-by: David S. Miller commit 8523899912b6958ef471d2393c016f87dc4f0354 Author: Netanel Belgazal Date: Fri Jun 23 11:22:00 2017 +0300 net: ena: update ena driver to version 1.2.0 Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 11a9a460199f35f6cbd9d65516a262060cba4fec Author: Netanel Belgazal Date: Fri Jun 23 11:21:59 2017 +0300 net: ena: update driver's rx drop statistics rx drop counter is reported by the device in the keep-alive event. update the driver's counter with the device counter. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3ae5907c61587ed8327484bfdda87de0257ea73f Author: Netanel Belgazal Date: Fri Jun 23 11:21:58 2017 +0300 net: ena: use lower_32_bits()/upper_32_bits() to split dma address In ena_com_mem_addr_set(), use the above functions to split dma address to the lower 32 bits and the higher 16 bits. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4265114d5391ed92d7860472c7c8dfe866707106 Author: Netanel Belgazal Date: Fri Jun 23 11:21:57 2017 +0300 net: ena: separate skb allocation to dedicated function Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 44 +++++++++++++++++----------- 1 file changed, 27 insertions(+), 17 deletions(-) commit e745dafab0340edaa522b43fd36b38e646c2963d Author: Netanel Belgazal Date: Fri Jun 23 11:21:56 2017 +0300 net: ena: use napi_schedule_irqoff when possible Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06443684daede6ded1fab8f8729249436fb0cd8e Author: Netanel Belgazal Date: Fri Jun 23 11:21:55 2017 +0300 net: ena: allow the driver to work with small number of msix vectors Current driver tries to allocate msix vectors as the number of the negotiated io queues. (with another msix vector for management). If pci_alloc_irq_vectors() fails, the driver aborts the probe and the ENA network device is never brought up. With this patch, the driver's logic will reduce the number of IO queues to the number of allocated msix vectors (minus one for management) instead of failing probe(). Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 65 ++++++++++++++++++++-------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 ++- 2 files changed, 51 insertions(+), 20 deletions(-) commit ad974baef2a17a170fe837ad19f10dcab63e9470 Author: Netanel Belgazal Date: Fri Jun 23 11:21:54 2017 +0300 net: ena: add support for out of order rx buffers refill ENA driver post Rx buffers through the Rx submission queue for the ENA device to fill them with receive packets. Each Rx buffer is marked with req_id in the Rx descriptor. Newer ENA devices could consume the posted Rx buffer in out of order, and as result the corresponding Rx completion queue will have Rx completion descriptors with non contiguous req_id(s) In this change the driver holds two rings. The first ring (called free_rx_ids) is a mapping ring. It holds all the unused request ids. The values in this ring are from 0 to ring_size -1. When the driver wants to allocate a new Rx buffer it uses the head of free_rx_ids and uses it's value as the index for rx_buffer_info ring. The req_id is also written to the Rx descriptor Upon Rx completion, The driver took the req_id from the completion descriptor and uses it as index in rx_buffer_info. The req_id is then return to the free_rx_ids ring. This patch also adds statistics to inform when the driver receive out of range or unused req_id. Note: free_rx_ids is only accessible from the napi handler, so no locking is required Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_eth_com.c | 5 ++ drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 83 ++++++++++++++++++++++----- drivers/net/ethernet/amazon/ena/ena_netdev.h | 11 +++- 4 files changed, 83 insertions(+), 17 deletions(-) commit e2eed0e307f671e37f3829dfec5dbb1fba826a15 Author: Netanel Belgazal Date: Fri Jun 23 11:21:53 2017 +0300 net: ena: add reset reason for each device FLR For each device reset, log to the device what is the cause the reset occur. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 5 +++- drivers/net/ethernet/amazon/ena/ena_com.h | 4 +++- drivers/net/ethernet/amazon/ena/ena_netdev.c | 17 +++++++++---- drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 ++ drivers/net/ethernet/amazon/ena/ena_regs_defs.h | 32 +++++++++++++++++++++++++ 5 files changed, 54 insertions(+), 6 deletions(-) commit 917501109cf4ea4c47991f593111338811369bf5 Author: Netanel Belgazal Date: Fri Jun 23 11:21:52 2017 +0300 net: ena: change sizeof() argument to be the type pointer Instead of using: memset(ptr, 0x0, sizeof(struct ...)) use: memset(ptr, 0x0, sizeor(*ptr)) Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 82ef30f13be0b4fea70a9c6215f7cff40bb3be63 Author: Netanel Belgazal Date: Fri Jun 23 11:21:51 2017 +0300 net: ena: add hardware hints capability to the driver With this patch, ENA device can update the ena driver about the desired timeout values: These values are part of the "hardware hints" which are transmitted to the driver as Asynchronous event through ENA async event notification queue. In case the ENA device does not support this capability, the driver will use its own default values. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 31 +++++++++++ drivers/net/ethernet/amazon/ena/ena_com.c | 38 +++++++++++--- drivers/net/ethernet/amazon/ena/ena_com.h | 6 +++ drivers/net/ethernet/amazon/ena/ena_netdev.c | 66 ++++++++++++++++++++++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 5 ++ drivers/net/ethernet/amazon/ena/ena_regs_defs.h | 2 + 6 files changed, 137 insertions(+), 11 deletions(-) commit d1497638b6fedccaef875a5d9f09b3fe4ffbd22d Author: Netanel Belgazal Date: Fri Jun 23 11:21:50 2017 +0300 net: ena: change return value for unsupported features unsupported return value return -EOPNOTSUPP instead of -EPERM. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 22 +++++++++++----------- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 +++------- drivers/net/ethernet/amazon/ena/ena_netdev.c | 20 ++++++++++---------- 3 files changed, 24 insertions(+), 28 deletions(-) commit 926f38e9744b2ee6d92085c28ebb50744e9e1182 Author: Jakub Kicinski Date: Thu Jun 22 18:57:55 2017 -0700 tcp: fix out-of-bounds access in ULP sysctl KASAN reports out-of-bound access in proc_dostring() coming from proc_tcp_available_ulp() because in case TCP ULP list is empty the buffer allocated for the response will not have anything printed into it. Set the first byte to zero to avoid strlen() going out-of-bounds. Fixes: 734942cc4ea6 ("tcp: ULP infrastructure") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/ipv4/tcp_ulp.c | 1 + 1 file changed, 1 insertion(+) commit 239946314e57711d7da546b67964d0b387a3ee42 Author: Yonghong Song Date: Thu Jun 22 15:07:39 2017 -0700 bpf: possibly avoid extra masking for narrower load in verifier Commit 31fd85816dbe ("bpf: permits narrower load from bpf program context fields") permits narrower load for certain ctx fields. The commit however will already generate a masking even if the prog-specific ctx conversion produces the result with narrower size. For example, for __sk_buff->protocol, the ctx conversion loads the data into register with 2-byte load. A narrower 2-byte load should not generate masking. For __sk_buff->vlan_present, the conversion function set the result as either 0 or 1, essentially a byte. The narrower 2-byte or 1-byte load should not generate masking. To avoid unnecessary masking, prog-specific *_is_valid_access now passes converted_op_size back to verifier, which indicates the valid data width after perceived future conversion. Based on this information, verifier is able to avoid unnecessary marking. Since we want more information back from prog-specific *_is_valid_access checking, all of them are packed into one data structure for more clarity. Acked-by: Daniel Borkmann Signed-off-by: Yonghong Song Signed-off-by: David S. Miller include/linux/bpf.h | 11 +++++- include/linux/bpf_verifier.h | 3 +- kernel/bpf/verifier.c | 29 ++++++++++---- kernel/trace/bpf_trace.c | 17 +++++--- net/core/filter.c | 92 +++++++++++++++++++++++++------------------- 5 files changed, 97 insertions(+), 55 deletions(-) commit 72de46556f8a291b2c72ea1fa22275ffef85e4f9 Author: Colin Ian King Date: Thu Jun 22 17:17:29 2017 +0100 net: stmmac: make some functions static The functions dwmac4_dma_init_rx_chan, dwmac4_dma_init_tx_chan and dwmac4_dma_init_channel do not need to be in global scope, so them static. Cleans up sparse warnings: "symbol 'dwmac4_dma_init_rx_chan' was not declared. Should it be static?" "symbol 'dwmac4_dma_init_tx_chan' was not declared. Should it be static?" "symbol 'dwmac4_dma_init_channel' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c169e3d3c049d93929a92f909a4b80ba0f85a3c3 Author: Brian Norris Date: Thu Jun 22 14:09:18 2017 -0700 mtd: partitions: fixup some allocate_partition() whitespace Some recent patches caused churn around this area, and checkpatch noticed the existing issues. Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 58de51ca77e2166262b043b0ff93290b184a2364 Author: Rafał Miłecki Date: Fri Jun 23 07:07:14 2017 +0200 mtd: parsers: trx: fix pr_err format for printing offset This fixes following warning: include/linux/kern_levels.h:4:18: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=] Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris drivers/mtd/parsers/parser_trx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1847d3d0a4de609523a685d68458529caacacdcc Merge: 9bd780f 149d7a5 Author: David S. Miller Date: Fri Jun 23 13:42:21 2017 -0400 Merge branch 'xdp-offload-mode' Jakub Kicinski says: ==================== xdp: offload mode While we discuss the representors.. :) This set adds XDP flag for forcing offload and a attachment mode for reporting to user space that program has been offloaded. The nfp driver is modified to make use of the new flags, but also to adhere to the DRV_MODE flag which should disable the HW offload. The intended driver behaviour is: DRV mode offload no flags yes attempted DRV_MODE yes no HW_MODE no yes Where 'yes' means required, and error will be returned if setup fails. 'Attempted' means the offload will only happen automatically if HW is capable and offloading the program will cause no change in system behaviour (e.g. maps don't have to bound). Thanks to loading the program both to the driver and HW by default we can fallback to the driver mode without disruption in case user replaces the program with one which cannot be offloaded later. Note that the NFP driver currently claims XDP offload support but lacks most basic features like direct packet access. Only change compared to the RFC is fixing the double bpf_prog_put() which Daniel has spotted (patch 5). ==================== Signed-off-by: David S. Miller commit 149d7a572ae124385973bf1c8e4d80b3f07d8bd4 Author: Jakub Kicinski Date: Wed Jun 21 18:25:10 2017 -0700 nfp: xdp: report if program is offloaded Make use of just added XDP_ATTACHED_HW. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 ++ 1 file changed, 2 insertions(+) commit ce158e580a5bdc93286a3b630638bdd47d4ec663 Author: Jakub Kicinski Date: Wed Jun 21 18:25:09 2017 -0700 xdp: add reporting of offload mode Extend the XDP_ATTACHED_* values to include offloaded mode. Let drivers report whether program is installed in the driver or the HW by changing the prog_attached field from bool to u8 (type of the netlink attribute). Exploit the fact that the value of XDP_ATTACHED_DRV is 1, therefore since all drivers currently assign the mode with double negation: mode = !!xdp_prog; no drivers have to be modified. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/netdevice.h | 7 ++++--- include/uapi/linux/if_link.h | 1 + net/core/dev.c | 3 +-- net/core/rtnetlink.c | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) commit cafa92ac255337517ca2466ab05ca9f24c0ca9de Author: Jakub Kicinski Date: Wed Jun 21 18:25:08 2017 -0700 nfp: bpf: add support for XDP_FLAGS_HW_MODE Respect the XDP_FLAGS_HW_MODE. When it's set install the program on the NIC and skip enabling XDP in the driver. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 6a8ef5428c9fb5b589c2c912889d157abb50dd61 Author: Jakub Kicinski Date: Wed Jun 21 18:25:07 2017 -0700 nfp: bpf: release the reference on offloaded programs The xdp_prog member of the adapter's data path structure is used for XDP in driver mode. In case a XDP program is loaded with in HW-only mode, we need to store it somewhere else. Add a new XDP prog pointer in the main structure and use that when we need to know whether any XDP program is loaded, not only a driver mode one. Only release our reference on adapter free instead of immediately after netdev unregister to allow offload to be disabled first. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 ++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 34 +++++++++------------- 2 files changed, 15 insertions(+), 21 deletions(-) commit 9f82fca9422eab3877ab2b697ccc5eef44c63b54 Author: Jakub Kicinski Date: Wed Jun 21 18:25:06 2017 -0700 nfp: bpf: don't offload XDP programs in DRV_MODE DRV_MODE means that user space wants the program to be run in the driver. Do not try to offload. Only offload if no mode flags have been specified. Remember what the mode is when the program is installed and refuse new setup requests if there is already a program loaded in a different mode. This should leave it open for us to implement simultaneous loading of two programs - one in the drv path and another to the NIC later. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 +++ drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) commit c443b5accedaef8e1d6faf7a1bb921670a90a3d0 Author: Jakub Kicinski Date: Wed Jun 21 18:25:05 2017 -0700 nfp: xdp: move driver XDP setup into a separate function In preparation of XDP offload flags move the driver setup into a function. Otherwise the number of conditions in one function would make it slightly hard to follow. The offload handler may now be called with NULL prog, even if no offload is currently active, but that's fine, offload code can handle that. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit ee5d032f7d032e2cea354522a46b211de84c4e8c Author: Jakub Kicinski Date: Wed Jun 21 18:25:04 2017 -0700 xdp: add HW offload mode flag for installing programs Add an installation-time flag for requesting that the program be installed only if it can be offloaded to HW. Internally new command for ndo_xdp is added, this way we avoid putting checks into drivers since they all return -EINVAL on an unknown command. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/netdevice.h | 1 + include/uapi/linux/if_link.h | 7 +++++-- net/core/dev.c | 7 +++++-- net/core/rtnetlink.c | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) commit 32d602771b624e3a2fc86d5e220e9fa7dced767a Author: Jakub Kicinski Date: Wed Jun 21 18:25:03 2017 -0700 xdp: pass XDP flags into install handlers Pass XDP flags to the xdp ndo. This will allow drivers to look at the mode flags and make decisions about offload. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/netdevice.h | 1 + net/core/dev.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 18cd9021ea035db85519391dbc429a5b1d0dd25b Author: Suniel Mahesh Date: Fri Jun 16 11:01:45 2017 +0530 staging: wlan-ng: Fix struct definition's and variable type le16_to_cpu() accepts argument of type __le16 and cpu_to_le16() returns an argument of type __le16. This patch fixes: (a) the type of the variable that end's up getting return from cpu_to_le16(). (b) the member types of struct hfa384x_host_scan_request_data, struct hfa384x_bytestr32 and struct hfa384x_hscan_result_sub. The following type mismatch warnings reported by sparse have been fixed: warning: incorrect type in assignment (different base types) warning: cast to restricted __le16 Signed-off-by: Suniel Mahesh Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 18 +++++++++--------- drivers/staging/wlan-ng/prism2mgmt.c | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit 428715bac69b98253e33c0034c829114481d5b32 Author: Amitoj Kaur Chawla Date: Wed Jun 14 18:33:03 2017 -0400 staging: rtl8723bs: Remove unnecessary cast in kfree Remove unnecassary casts in the argument to kfree. Found using Coccinelle. The semantic patch used to find this is as follows: // @@ type T; expression *f; @@ - kfree((T *)(f)); + kfree(f); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7bb0dffd0516b07cf23fe5121a0b1d4f55566cf6 Author: simran singhal Date: Tue Jun 20 10:57:28 2017 +0530 staging: rtl8723bs: hal: Use (true/false) in assignment to bool This patch assigns (true/false) to boolean EDCCA_State instead of (1/0). And, there is no need of comparing EDCCA_State explicitly with constant 1. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/odm_DIG.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 888db9a6e02c8bf82c2753acf146c71b662c5ba5 Author: Sudip Mukherjee Date: Mon Jun 19 21:32:58 2017 +0100 staging: sm750fb: change default screen resolution The previous patch which updated screen resolution was tested under wrong environment. sm750 driver does not support 24bpp. It only supports 8bpp, 16bpp and 32bpp. Lets update the default screen resolution to use 32bpp for a better screen performance. Fixes: ac669251087d ("staging: sm750fb: change default screen resolution") Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ef61f593c3351e7df984f32b0a0fe7fa0fde2ac Author: Matthew Reed <4d5452@gmail.com> Date: Tue Jun 20 22:39:52 2017 -0400 staging: fb_xgi: vb_table: Remove white space after tabstop Remove white space after tabstop on closing bracket as suggested by checkpatch.pl. Additional white space removed for page consistency. Signed-off-by: Matthew Reed <4d5452@gmail.com> Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_table.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8486e54d30e170c969090f80bbdfa7142d33ed6a Author: Mark Rutland Date: Fri Jun 23 18:02:06 2017 +0100 arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels When a kernel is built without CONFIG_ARM64_MODULE_PLTS, we don't generate the expected branch instruction in ftrace_make_nop(). This means we pass zero (rather than a valid branch) to ftrace_modify_code() as the expected instruction to validate. This causes us to return -EINVAL to the core ftrace code for a valid case, resulting in a splat at boot time. This was an unintended effect of commit: 687644209a6e9557 ("arm64: ftrace: fix building without CONFIG_MODULES") ... which incorrectly moved the generation of the branch instruction into the ifdef for CONFIG_ARM64_MODULE_PLTS. This patch fixes the issue by moving the ifdef inside of the relevant if-else case, and always checking that the branch is in range, regardless of CONFIG_ARM64_MODULE_PLTS. This ensures that we generate the expected branch instruction, and also improves our sanity checks. For consistency, both ftrace_make_nop() and ftrace_make_call() are updated with this pattern. Fixes: 687644209a6e9557 ("arm64: ftrace: fix building without CONFIG_MODULES") Signed-off-by: Mark Rutland Reported-by: Marc Zyngier Reviewed-by: Ard Biesheuvel Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/ftrace.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 33f082614c3443d937f50fe936f284f62bbb4a1b Author: Dave Martin Date: Tue Jun 20 18:23:39 2017 +0100 arm64: signal: Allow expansion of the signal frame This patch defines an extra_context signal frame record that can be used to describe an expanded signal frame, and modifies the context block allocator and signal frame setup and parsing code to create, populate, parse and decode this block as necessary. To avoid abuse by userspace, parse_user_sigframe() attempts to ensure that: * no more than one extra_context is accepted; * the extra context data is a sensible size, and properly placed and aligned. The extra_context data is required to start at the first 16-byte aligned address immediately after the dummy terminator record following extra_context in rt_sigframe.__reserved[] (as ensured during signal delivery). This serves as a sanity-check that the signal frame has not been moved or copied without taking the extra data into account. Signed-off-by: Dave Martin Reviewed-by: Catalin Marinas [will: add __force annotation when casting extra_datap to __user pointer] Signed-off-by: Will Deacon arch/arm64/include/uapi/asm/sigcontext.h | 38 +++++- arch/arm64/kernel/signal.c | 195 ++++++++++++++++++++++++++++--- 2 files changed, 214 insertions(+), 19 deletions(-) commit f935448acf462c26142e8b04f1c8829b28d3b9d8 Author: Geetha Sowjanya Date: Fri Jun 23 19:04:36 2017 +0530 iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #126 Cavium ThunderX2 SMMU doesn't support MSI and also doesn't have unique irq lines for gerror, eventq and cmdq-sync. New named irq "combined" is set as a errata workaround, which allows to share the irq line by register single irq handler for all the interrupts. Acked-by: Lorenzo Pieralisi Signed-off-by: Geetha sowjanya [will: reworked irq equality checking and added SPI check] Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.txt | 1 + .../devicetree/bindings/iommu/arm,smmu-v3.txt | 6 ++ drivers/acpi/arm64/iort.c | 63 ++++++++++----- drivers/iommu/arm-smmu-v3.c | 94 ++++++++++++++++------ 4 files changed, 121 insertions(+), 43 deletions(-) commit 99caf177f6fd3e67575f6ce05b36e8e041bcef60 Author: shameer Date: Wed May 17 10:12:05 2017 +0100 iommu/arm-smmu-v3: Enable ACPI based HiSilicon CMD_PREFETCH quirk(erratum 161010701) HiSilicon SMMUv3 on Hip06/Hip07 platforms doesn't support CMD_PREFETCH command. The dt based support for this quirk is already present in the driver(hisilicon,broken-prefetch-cmd). This adds ACPI support for the quirk using the IORT smmu model number. Signed-off-by: shameer Signed-off-by: hanjun [will: rewrote patch] Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.txt | 1 + drivers/iommu/arm-smmu-v3.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit e5b829de053d9994dfc8652ce558e90e3406c578 Author: Linu Cherian Date: Thu Jun 22 17:35:37 2017 +0530 iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #74 Cavium ThunderX2 SMMU implementation doesn't support page 1 register space and PAGE0_REGS_ONLY option is enabled as an errata workaround. This option when turned on, replaces all page 1 offsets used for EVTQ_PROD/CONS, PRIQ_PROD/CONS register access with page 0 offsets. SMMU resource size checks are now based on SMMU option PAGE0_REGS_ONLY, since resource size can be either 64k/128k. For this, arm_smmu_device_dt_probe/acpi_probe has been moved before platform_get_resource call, so that SMMU options are set beforehand. Signed-off-by: Linu Cherian Signed-off-by: Geetha Sowjanya Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.txt | 1 + .../devicetree/bindings/iommu/arm,smmu-v3.txt | 6 ++ drivers/iommu/arm-smmu-v3.c | 68 ++++++++++++++++------ 3 files changed, 57 insertions(+), 18 deletions(-) commit 403e8c7c5bcaff3291a2c7012fe80f707a854d10 Author: Linu Cherian Date: Thu Jun 22 17:35:36 2017 +0530 ACPI/IORT: Fixup SMMUv3 resource size for Cavium ThunderX2 SMMUv3 model Cavium ThunderX2 implementation doesn't support second page in SMMU register space. Hence, resource size is set as 64k for this model. Signed-off-by: Linu Cherian Signed-off-by: Geetha Sowjanya Signed-off-by: Will Deacon drivers/acpi/arm64/iort.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 12275bf0a4deb690a5dc9903d207060737b7bae6 Author: Robert Richter Date: Thu Jun 22 21:20:54 2017 +0200 iommu/arm-smmu-v3, acpi: Add temporary Cavium SMMU-V3 IORT model number definitions The model number is already defined in acpica and we are actually waiting for the acpi maintainers to include it: https://github.com/acpica/acpica/commit/d00a4eb86e64 Adding those temporary definitions until the change makes it into include/acpi/actbl2.h. Once that is done this patch can be reverted. Acked-by: Lorenzo Pieralisi Signed-off-by: Robert Richter Signed-off-by: Will Deacon drivers/acpi/arm64/iort.c | 5 +++++ drivers/iommu/arm-smmu-v3.c | 5 +++++ 2 files changed, 10 insertions(+) commit 77f3445866c39d8866b31d8d9fa47c7c20938e05 Author: Will Deacon Date: Fri Jun 23 12:02:38 2017 +0100 iommu/io-pgtable-arm: Use dma_wmb() instead of wmb() when publishing table When writing a new table entry, we must ensure that the contents of the table is made visible to the SMMU page table walker before the updated table entry itself. This is currently achieved using wmb(), which expands to an expensive and unnecessary DSB instruction. Ideally, we'd just use cmpxchg64_release when writing the table entry, but this doesn't have memory ordering semantics on !SMP systems. Instead, use dma_wmb(), which emits DMB OSHST. Strictly speaking, this does more than we require (since it targets the outer-shareable domain), but it's likely to be significantly faster than the DSB approach. Reported-by: Linu Cherian Suggested-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 8 ++++++-- drivers/iommu/io-pgtable-arm.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) commit c1004803b40596c1aabbbc78a6b1b33e4dfd96c6 Author: Will Deacon Date: Fri Jun 23 11:45:57 2017 +0100 iommu/io-pgtable: depend on !GENERIC_ATOMIC64 when using COMPILE_TEST with LPAE The LPAE/ARMv8 page table format relies on the ability to read and write 64-bit page table entries in an atomic fashion. With the move to a lockless implementation, we also need support for cmpxchg64 to resolve races when installing table entries concurrently. Unfortunately, not all architectures support cmpxchg64, so the code can fail to compiler when building for these architectures using COMPILE_TEST. Rather than disable COMPILE_TEST altogether, instead check that GENERIC_ATOMIC64 is not selected, which is a reasonable indication that the architecture has support for 64-bit cmpxchg. Reported-by: kbuild test robot Signed-off-by: Will Deacon drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58188afeb727e0f73706f1460707bd3ba6ccc221 Author: Robin Murphy Date: Thu Jun 22 16:53:57 2017 +0100 iommu/arm-smmu-v3: Remove io-pgtable spinlock As for SMMUv2, take advantage of io-pgtable's newfound tolerance for concurrency. Unfortunately in this case the command queue lock remains a point of serialisation for the unmap path, but there may be a little more we can do to ameliorate that in future. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) commit 523d7423e21bfe78452a640878d1de189ac45d91 Author: Robin Murphy Date: Thu Jun 22 16:53:56 2017 +0100 iommu/arm-smmu: Remove io-pgtable spinlock With the io-pgtable code now robust against (valid) races, we no longer need to serialise all operations with a lock. This might make broken callers who issue concurrent operations on overlapping addresses go even more wrong than before, but hey, they already had little hope of useful or deterministic results. We do however still have to keep a lock around to serialise the ATS1* translation ops, as parallel iova_to_phys() calls could lead to unpredictable hardware behaviour otherwise. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 45 ++++++++++++++------------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) commit 119ff305b02793dc31eb1e921b85925ce10dc0a1 Author: Robin Murphy Date: Thu Jun 22 16:53:55 2017 +0100 iommu/io-pgtable-arm-v7s: Support lockless operation Mirroring the LPAE implementation, rework the v7s code to be robust against concurrent operations. The same two potential races exist, and are solved in the same manner, with the fixed 2-level structure making life ever so slightly simpler. What complicates matters compared to LPAE, however, is large page entries, since we can't update a block of 16 PTEs atomically, nor assume available software bits to do clever things with. As most users are never likely to do partial unmaps anyway (due to DMA API rules), it doesn't seem unreasonable for this case to remain behind a serialising lock; we just pull said lock down into the bowels of the implementation so it's well out of the way of the normal call paths. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 84 ++++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 21 deletions(-) commit 2c3d273eabe8b1ed3b3cffe2c79643b1bf7e2d4a Author: Robin Murphy Date: Thu Jun 22 16:53:54 2017 +0100 iommu/io-pgtable-arm: Support lockless operation For parallel I/O with multiple concurrent threads servicing the same device (or devices, if several share a domain), serialising page table updates becomes a massive bottleneck. On reflection, though, we don't strictly need to do that - for valid IOMMU API usage, there are in fact only two races that we need to guard against: multiple map requests for different blocks within the same region, when the intermediate-level table for that region does not yet exist; and multiple unmaps of different parts of the same block entry. Both of those are fairly easily solved by using a cmpxchg to install the new table, such that if we then find that someone else's table got there first, we can simply free ours and continue. Make the requisite changes such that we can withstand being called without the caller maintaining a lock. In theory, this opens up a few corners in which wildly misbehaving callers making nonsensical overlapping requests might lead to crashes instead of just unpredictable results, but correct code really does not deserve to pay a significant performance cost for the sake of masking bugs in theoretical broken code. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm.c | 72 +++++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 15 deletions(-) commit 81b3c25218447c65f93adf08b099a322b6803536 Author: Robin Murphy Date: Thu Jun 22 16:53:53 2017 +0100 iommu/io-pgtable: Introduce explicit coherency Once we remove the serialising spinlock, a potential race opens up for non-coherent IOMMUs whereby a caller of .map() can be sure that cache maintenance has been performed on their new PTE, but will have no guarantee that such maintenance for table entries above it has actually completed (e.g. if another CPU took an interrupt immediately after writing the table entry, but before initiating the DMA sync). Handling this race safely will add some potentially non-trivial overhead to installing a table entry, which we would much rather avoid on coherent systems where it will be unnecessary, and where we are stirivng to minimise latency by removing the locking in the first place. To that end, let's introduce an explicit notion of cache-coherency to io-pgtable, such that we will be able to avoid penalising IOMMUs which know enough to know when they are coherent. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 3 +++ drivers/iommu/arm-smmu.c | 3 +++ drivers/iommu/io-pgtable-arm-v7s.c | 17 ++++++++++------- drivers/iommu/io-pgtable-arm.c | 11 ++++++----- drivers/iommu/io-pgtable.h | 6 ++++++ 5 files changed, 28 insertions(+), 12 deletions(-) commit b9f1ef30ac2e9942b8628d551f4a21e8cec1415c Author: Robin Murphy Date: Thu Jun 22 16:53:52 2017 +0100 iommu/io-pgtable-arm-v7s: Refactor split_blk_unmap Whilst the short-descriptor format's split_blk_unmap implementation has no need to be recursive, it followed the pattern of the LPAE version anyway for the sake of consistency. With the latter now reworked for both efficiency and future scalability improvements, tweak the former similarly, not least to make it less obtuse. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 85 ++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 40 deletions(-) commit fb3a95795da53d05a4fc5fcdc0d3ec69e7163355 Author: Robin Murphy Date: Thu Jun 22 16:53:51 2017 +0100 iommu/io-pgtable-arm: Improve split_blk_unmap The current split_blk_unmap implementation suffers from some inscrutable pointer trickery for creating the tables to replace the block entry, but more than that it also suffers from hideous inefficiency. For example, the most pathological case of unmapping a level 3 page from a level 1 block will allocate 513 lower-level tables to remap the entire block at page granularity, when only 2 are actually needed (the rest can be covered by level 2 block entries). Also, we would like to be able to relax the spinlock requirement in future, for which the roll-back-and-try-again logic for race resolution would be pretty hideous under the current paradigm. Both issues can be resolved most neatly by turning things sideways: instead of repeatedly recursing into __arm_lpae_map() map to build up an entire new sub-table depth-first, we can directly replace the block entry with a next-level table of block/page entries, then repeat by unmapping at the next level if necessary. With a little refactoring of some helper functions, the code ends up not much bigger than before, but considerably easier to follow and to adapt in future. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm.c | 114 ++++++++++++++++++++++++----------------- 1 file changed, 67 insertions(+), 47 deletions(-) commit 9db829d2818501f07583542c05d01513b9161e14 Author: Robin Murphy Date: Thu Jun 22 16:53:50 2017 +0100 iommu/io-pgtable-arm-v7s: Check table PTEs more precisely Whilst we don't support the PXN bit at all, so should never encounter a level 1 section or supersection PTE with it set, it would still be wise to check both table type bits to resolve any theoretical ambiguity. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c2d0218290afa3c335f38583bf4f8e8adad4c76 Author: Arvind Yadav Date: Thu Jun 22 12:57:42 2017 +0530 iommu: arm-smmu: Handle return of iommu_device_register. iommu_device_register returns an error code and, although it currently never fails, we should check its return value anyway. Signed-off-by: Arvind Yadav [will: adjusted to follow arm-smmu.c] Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 4 ++++ 1 file changed, 4 insertions(+) commit ebdd13c93f8e878afcdba642f48cd1bd85619e2a Author: Arvind Yadav Date: Thu Jun 22 12:51:00 2017 +0530 iommu: arm-smmu-v3: make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84c24379a783c514e5ff7c8fc8a21cf8d64fd05f Author: Robin Murphy Date: Mon Jun 19 16:41:56 2017 +0100 iommu/arm-smmu: Plumb in new ACPI identifiers Revision C of IORT now allows us to identify ARM MMU-401 and the Cavium ThunderX implementation. Wire them up so that we can probe these models once firmware starts using the new codes in place of generic ones, and so that the appropriate features and quirks get enabled when we do. For the sake of backports and mitigating sychronisation problems with the ACPICA headers, we'll carry a backup copy of the new definitions locally for the short term to make life simpler. CC: stable@vger.kernel.org # 4.10 Acked-by: Robert Richter Tested-by: Robert Richter Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 60ab7a75c8d83049b0e6189b4128247513880b19 Author: Arvind Yadav Date: Tue Jun 13 15:58:30 2017 +0530 iommu/io-pgtable-arm-v7s: constify dummy_tlb_ops. File size before: text data bss dec hex filename 6146 56 9 6211 1843 drivers/iommu/io-pgtable-arm-v7s.o File size After adding 'const': text data bss dec hex filename 6170 24 9 6203 183b drivers/iommu/io-pgtable-arm-v7s.o Signed-off-by: Arvind Yadav Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b847de4e5087fc8577c38a697d14fd2a5ce93352 Author: Sunil Goutham Date: Fri May 5 16:47:46 2017 +0530 iommu/arm-smmu-v3: Increase CMDQ drain timeout value Waiting for a CMD_SYNC to be processed involves waiting for the command queue to drain, which can take an awful lot longer than waiting for a single entry to become available. Consequently, the common timeout value of 100us has been observed to be too short on some platforms when a CMD_SYNC is issued into a queued full of TLBI commands. This patch resolves the issue by using a different (1s) timeout when waiting for the CMDQ to drain and using a simple back-off mechanism when polling the cons pointer in the absence of WFE support. Signed-off-by: Sunil Goutham [will: rewrote commit message and cosmetic changes] Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b9e8caa7a67535fc544c2504fae3e71a02cfb01a Author: Frans Klaver Date: Fri Jun 16 19:45:56 2017 +0200 staging: fusb302: don't bitshift __le16 type The header field in struct pd_message is declared as an __le16 type. The data in the message is supposed to be little endian. This means we don't have to go and shift the individual bytes into position when we're filling the buffer, we can just copy the contents right away. As an added benefit we don't get fishy results on big endian systems anymore. Signed-off-by: Frans Klaver Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1877e4ba2d0890244284eea101681b6f990aa2be Author: Laurentiu Tudor Date: Thu Jun 22 16:36:00 2017 +0300 staging: fsl-mc: make dprc.h header private dprc.h is only used in the mc bus driver so move it together with the sources thus making it private. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc.c | 2 +- drivers/staging/fsl-mc/bus/dprc.h | 268 ++++++++++++++++++++++++++++ drivers/staging/fsl-mc/bus/fsl-mc-private.h | 1 + drivers/staging/fsl-mc/include/dprc.h | 268 ---------------------------- drivers/staging/fsl-mc/include/mc.h | 1 - 5 files changed, 270 insertions(+), 270 deletions(-) commit 9b1aa45539fb8389deb79e4a939bfc05ee45aeb5 Author: Laurentiu Tudor Date: Thu Jun 22 16:35:59 2017 +0300 staging: fsl-mc: move mc-cmd.h contents in the public header mc-cmd.h contains some low level functions used to encode and decode commands to the MC. They are used by the drivers so move them to the public headers and get rid of the mc-cmd.h header. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpni.c | 1 - drivers/staging/fsl-mc/bus/dpbp.c | 1 - drivers/staging/fsl-mc/bus/dpcon.c | 1 - drivers/staging/fsl-mc/bus/dpio/dpio.c | 1 - drivers/staging/fsl-mc/bus/dpmcp.c | 1 - drivers/staging/fsl-mc/bus/dprc.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 - drivers/staging/fsl-mc/bus/mc-sys.c | 1 - drivers/staging/fsl-mc/include/mc-cmd.h | 130 ------------------------------ drivers/staging/fsl-mc/include/mc.h | 95 +++++++++++++++++++++- 11 files changed, 94 insertions(+), 140 deletions(-) commit 7d6e221d73904aedcbd46ce2db6a545be55d2296 Author: Laurentiu Tudor Date: Thu Jun 22 16:35:58 2017 +0300 staging: fsl-mc: move mc-sys.h contents in the public header mc-sys.h contains the API to send commands to the MC and is used by drivers. Move it to the public headers and get rid of the mc-sys.h header. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 1 - drivers/staging/fsl-dpaa2/ethernet/dpni.c | 2 +- drivers/staging/fsl-mc/bus/dpbp.c | 2 +- drivers/staging/fsl-mc/bus/dpcon.c | 2 +- drivers/staging/fsl-mc/bus/dpio/dpio.c | 2 +- drivers/staging/fsl-mc/bus/dpmcp.c | 2 +- drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +- drivers/staging/fsl-mc/bus/dprc.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 2 +- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - drivers/staging/fsl-mc/bus/mc-io.c | 2 +- drivers/staging/fsl-mc/bus/mc-sys.c | 1 - drivers/staging/fsl-mc/include/mc-sys.h | 98 -------------------------- drivers/staging/fsl-mc/include/mc.h | 53 ++++++++++++++ 14 files changed, 61 insertions(+), 110 deletions(-) commit 5776aad3fe1bb87f3e4816cde8735647597da336 Author: Laurentiu Tudor Date: Thu Jun 22 16:35:57 2017 +0300 staging: fsl-mc: fix a few implicit includes Few files using byte order macros but did not explicitly included the required kernel header, so add it. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpbp.c | 1 + drivers/staging/fsl-mc/bus/dpcon.c | 1 + drivers/staging/fsl-mc/bus/dpio/dpio.c | 1 + drivers/staging/fsl-mc/bus/dpmcp.c | 1 + drivers/staging/fsl-mc/bus/dprc.c | 1 + 5 files changed, 5 insertions(+) commit b065307fe0ad7859f01ce8560e6bdc590324561a Author: Laurentiu Tudor Date: Thu Jun 22 16:35:56 2017 +0300 staging: fsl-mc: remove dpmng API files dpmng.h & dpmng.c files expose an API of just one function which is only used by the bus driver. Move that single API in the bus source as static and remove the two files. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpmng.c | 74 --------------------------------- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 53 ++++++++++++++++++++++- drivers/staging/fsl-mc/include/dpmng.h | 67 ----------------------------- 3 files changed, 52 insertions(+), 142 deletions(-) commit af4376710cc5188c42eb473676f6c9d2a16692c4 Author: Laurentiu Tudor Date: Thu Jun 22 16:35:55 2017 +0300 staging: fsl-mc: move rest of mc-bus.h to private header All the mc-bus.h contents is only used privately in the bus driver so move everything to the private header and get rid of the mc-bus.h header file. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-private.h | 61 +++++++++++++++++ .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 1 - drivers/staging/fsl-mc/bus/mc-io.c | 1 - drivers/staging/fsl-mc/include/mc-bus.h | 77 ---------------------- 8 files changed, 61 insertions(+), 83 deletions(-) commit 7eba570ece326ea0da2da72f1d4142100c145827 Author: Laurentiu Tudor Date: Thu Jun 22 16:35:54 2017 +0300 staging: fsl-mc: move couple of definitions to public header Define dev_is_fsl_mc() and the bus type definition (fsl_mc_bus_type) are used externally so move them to the public header. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 9 --------- drivers/staging/fsl-mc/include/mc.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit b32cdde14edec1c75a2190a39e810bf41fa29a7a Author: Laurentiu Tudor Date: Thu Jun 22 16:35:53 2017 +0300 staging: fsl-mc: move irq domain creation prototype to public header fsl_mc_msi_create_irq_domain() will is used from the irqchip glue code so it needs to be in the public headers. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 7 ------- drivers/staging/fsl-mc/include/mc.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit 10a8593a76c7719e110e334f84a6ef2068dd4c0f Author: Laurentiu Tudor Date: Thu Jun 22 16:35:52 2017 +0300 staging: fsl-mc: turn several exported functions static They are never used outside the source they are implemented in and very likely never will, so it's safe to make them static. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 8 +++----- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 5 ++--- drivers/staging/fsl-mc/include/mc-bus.h | 8 -------- 3 files changed, 5 insertions(+), 16 deletions(-) commit be6faff74cda2ac1838c0f85dca3c3ce4975fa73 Author: Laurentiu Tudor Date: Thu Jun 22 16:35:51 2017 +0300 staging: fsl-mc: delete prototype of unimplemented function The function fsl_mc_bus_exists() has a prototype but is never implemented so delete it from the header file. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 2 -- 1 file changed, 2 deletions(-) commit 48d3cfb3189a88e1670f609f8bd7d55839d531cf Author: Laurentiu Tudor Date: Thu Jun 22 16:35:50 2017 +0300 staging: fsl-mc: delete duplicated function prototypes These functions already have their prototypes in fsl-mc-private.h header file so delete them from mc-bus.h. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 8 -------- 1 file changed, 8 deletions(-) commit c6ce019edb0c9c09b8150011d4f66181952631e9 Author: Laurentiu Tudor Date: Thu Jun 22 16:35:49 2017 +0300 staging: fsl-mc: decouple the mc-bus public headers from dprc.h In its current form, the public headers of the mc-bus depend only on a structure "dprc_obj_desc" defined in dprc.h. Move it to the bus public header together with its associated defines and, in order to keep the naming prefixes consistent rename it to "fsl_mc_obj_desc". This will allow making dprc.h private in future patches. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 38 ++++++++++++------------ drivers/staging/fsl-mc/bus/dprc.c | 3 +- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 12 ++++---- drivers/staging/fsl-mc/bus/fsl-mc-private.h | 2 +- drivers/staging/fsl-mc/include/dprc.h | 46 ++--------------------------- drivers/staging/fsl-mc/include/mc.h | 41 ++++++++++++++++++++++++- 6 files changed, 71 insertions(+), 71 deletions(-) commit bb4a64b79f3b9973316e775f6c2910a98b6a562a Author: Laurentiu Tudor Date: Thu Jun 22 16:35:48 2017 +0300 staging: fsl-mc: drop useless #includes These couple of header files are not needed in the source so remove them. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 2 -- 1 file changed, 2 deletions(-) commit 410ab9b5f8a925ce082ddd001c4e73aab8b699de Author: Laurentiu Tudor Date: Thu Jun 22 16:35:47 2017 +0300 staging: fsl-mc: drop macros with possible side effects Several macros were triggering this checkpatch.pl warning: "Macro argument reuse '$arg' - possible side-effects?" Fix the warning by turning them into real functions. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 15 +++++++++------ drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 18 ++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) commit d2176b325f8a640d7adbf882f4e0f29767d04b8e Author: Laurentiu Tudor Date: Thu Jun 22 15:52:10 2017 +0300 staging: fsl-dpaa2/eth: fix a couple of implicit includes dpni.c is using byte order macros and error codes but does not explicitly include the required kernel header, so add it. Signed-off-by: Laurentiu Tudor Acked-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpni.c | 2 ++ 1 file changed, 2 insertions(+) commit 30c9dbf3174e75e8c721aa2c7d47bf8fcd40d8cb Author: Ioana Radulescu Date: Thu Jun 15 03:55:06 2017 -0500 staging: fsl-mc/dpio: Propagate error code dpaa2_io_service_register() returns zero even if qbman_swp_CDAN_set() encountered an error. Fix this by propagating the error code so the caller is informed data availability notifications are not properly set for a channel. Signed-off-by: Ioana Radulescu Acked-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 125178d1ebd6d76a5fb152cfb3cd50a3316cf3ba Author: Ian Abbott Date: Fri Jun 16 19:35:35 2017 +0100 staging: comedi: use centralized error clean-up in comedi_init() Centralize the "clean-up on error" handling in `comedi_init()` using `goto` statements. Also change some of the explicit `-EIO` return values to the error return values from the failing functions as there is no good reason to use `-EIO` explicitly. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 43 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) commit a9332e9ad09c2644c99058fcf6ae2f355e93ce74 Author: Ian Abbott Date: Fri Jun 16 19:35:34 2017 +0100 staging: comedi: fix clean-up of comedi_class in comedi_init() There is a clean-up bug in the core comedi module initialization functions, `comedi_init()`. If the `comedi_num_legacy_minors` module parameter is non-zero (and valid), it creates that many "legacy" devices and registers them in SysFS. A failure causes the function to clean up and return an error. Unfortunately, it fails to destroy the "comedi" class that was created earlier. Fix it by adding a call to `class_destroy(comedi_class)` at the appropriate place in the clean-up sequence. Signed-off-by: Ian Abbott Cc: # 3.9+ Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 1 + 1 file changed, 1 insertion(+) commit f0836fd2a683bafbf738672e429221e4e9a3d7a6 Author: Malcolm Priestley Date: Wed Jun 14 20:08:25 2017 +0100 staging: rtl8192e: remove dead code rtllib_wpa_supplicant_ioctl Following removal of _rtl92e_ioctl this function along with associated macros, structure ieee_param and functions become dead code. Remove functions rtllib_wpa_enable, rtllib_wpa_assoc_frame, rtllib_wpa_mlme, rtllib_wpa_set_wpa_ie, rtllib_wpa_set_auth_algs, rtllib_wpa_set_param, rtllib_wpa_set_encryption and rtllib_wpa_supplicant_ioctl. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib.h | 54 ----- drivers/staging/rtl8192e/rtllib_softmac.c | 383 ------------------------------ 2 files changed, 437 deletions(-) commit af8d0d97d6071babe4565bedfec97ea3d92e7663 Author: Malcolm Priestley Date: Wed Jun 14 20:08:24 2017 +0100 staging: rtl8192e: remove dead private call to _rtl92e_ioctl. A RTL_IOCTL_WPA_SUPPLICANT call is a proprietary version of wpa supplicant. All kernel calls use SIOCSIWENCODEEXT call via wireless handlers already used in this driver. Remove dead code. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 126 --------------------------- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 - 2 files changed, 128 deletions(-) commit 4271eabb487d72d7818e273a6dbf44bfb4253a44 Author: Andrey Shvetsov Date: Tue Jun 20 17:11:51 2017 +0200 staging: most: net: hold used net device This adds the dev_hold and dev_put calls to the functions aim_resume_tx_channel, aim_rx_data and on_netinfo to postpone the unregistration of the used net device. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-network/networking.c | 78 +++++++++++++++++++-------- 1 file changed, 55 insertions(+), 23 deletions(-) commit 2338652c3346df68f5b95a42d41e021e2977ddf0 Author: Andrey Shvetsov Date: Tue Jun 20 17:11:50 2017 +0200 staging: most: net: protect consistency of the state This introduces the mutex that protects the consistency between the tx.linked, rx.linked and the presence of the net divice. Additionally, this patch optimizes the setup of the ch->linked in the function aim_probe_channel. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-network/networking.c | 64 ++++++++++++++++++--------- 1 file changed, 42 insertions(+), 22 deletions(-) commit 606c21759774a6694d4219d5bb96704ab13e20a0 Author: Andrey Shvetsov Date: Tue Jun 20 17:11:49 2017 +0200 staging: most: net: make net device lifetime obvious The function aim_probe_channel calls only one of the functions alloc_netdev and register_netdev per run. Correspondingly, the function aim_disconnect_channel calls only one of the functions unregister_netdev and free_netdev per run. This patch makes it obvious by using the 'else' part of the 'if' statement. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-network/networking.c | 47 ++++++++++++++------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit 3c1746edd12d4e3279b47a9fb8dc0eedc77d679d Author: Andrey Shvetsov Date: Tue Jun 20 17:11:48 2017 +0200 staging: most: net: remove redundant traces This removes redundant netdev_info/pr_info. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-network/networking.c | 6 ------ 1 file changed, 6 deletions(-) commit d4f3d4b150cee6aad5d11d121189cb7e68b1bff1 Author: Jeremy Sowden Date: Sun Jun 18 17:58:02 2017 +0100 staging: ccree: removed spaces after opening parentheses. Removed spaces after opening parentheses in ssi_ivgen.c. Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_ivgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4f71fecd78ee0399fca91c56c857c947017e18c1 Author: Derek Robson Date: Sat Jun 17 14:44:05 2017 +1200 staging: ccree: - style fix, spaces and tabs Changed code indent to be tabs across whole driver Found using checkpatch Signed-off-by: Derek Robson Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.c | 45 +++++++++++++++++----------------- drivers/staging/ccree/ssi_driver.c | 6 ++--- drivers/staging/ccree/ssi_driver.h | 6 ++--- drivers/staging/ccree/ssi_fips.h | 8 +++--- drivers/staging/ccree/ssi_fips_ext.c | 4 +-- drivers/staging/ccree/ssi_fips_ll.c | 40 +++++++++++++++--------------- drivers/staging/ccree/ssi_fips_local.c | 28 ++++++++++----------- drivers/staging/ccree/ssi_fips_local.h | 12 ++++----- 8 files changed, 75 insertions(+), 74 deletions(-) commit 2bd251513051a9e287d9726e42ad8aea5c77c7c9 Author: Jhih-Ming Hunag Date: Tue Jun 20 22:52:04 2017 +0800 staging: ccree: move else to follow close brace '}' Move else to follow close brace '}' Signed-off-by: Jhih-Ming Hunag Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fe2d182332aac66573d51af437b5332b22acde4d Author: Jhih-Ming Hunag Date: Tue Jun 20 22:52:03 2017 +0800 staging: ccree: remove improper space Remove improper space. Signed-off-by: Jhih-Ming Hunag Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 134a8ca1c9b4fca4846995f5c06f90cdead6f920 Author: Jhih-Ming Hunag Date: Tue Jun 20 22:52:02 2017 +0800 staging: ccree: move * to close variable name instead of type. Move * to close variable name instead of type. Signed-off-by: Jhih-Ming Hunag Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e09b077a031097d755e9baf9ddee2b78e19c564 Author: Jhih-Ming Hunag Date: Tue Jun 20 22:52:01 2017 +0800 staging: ccree: move '{' to next line for function. Move '{' to next line for function. Signed-off-by: Jhih-Ming Hunag Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b803d57df57d2f61fe7e21a807d39ed6f5a67d94 Author: Jhih-Ming Hunag Date: Tue Jun 20 22:52:00 2017 +0800 staging: ccree: move brace { to previous line for if. Move brace { to previous line for if. Signed-off-by: Jhih-Ming Hunag Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b9778d910d58ab2b0fc36c20e762e95984035402 Author: Jhih-Ming Hunag Date: Tue Jun 20 22:51:59 2017 +0800 Staging: ccree: add space around comma, brace and operator. Add space around comma, brace, and opertor. Signed-off-by: Jhih-Ming Hunag Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 7f053a6a745557b3f3ad63e9d28ba85c3c0b1563 Author: Shaohua Li Date: Fri Jun 23 09:19:49 2017 -0700 MD: fix a null dereference rdev->mddev could be null in start time. Reported-by: Ming Lei Fix: 5a85071c2cbc(md: use a separate bio_set for synchronous IO.) Cc: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd9a53e67ee6c3c51f4d4b53a6f0753897e358ee Author: James Simmons Date: Wed Jun 14 11:01:19 2017 -0400 staging: lustre: lustre: add all missing indentifier names Create identifier names missing from function prototypes as reported by checkpatch. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/lprocfs_status.h | 4 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 27 ++++++++++++---------- .../staging/lustre/lustre/llite/llite_internal.h | 14 +++++------ drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 4 ++-- 5 files changed, 27 insertions(+), 24 deletions(-) commit e7738506c5f29e1877b39ebaaa550a476370336a Author: James Simmons Date: Wed Jun 14 11:01:18 2017 -0400 staging: lustre: lustre: fix all bare unsigned usage Turn all bare unsigned usage in the lustre code to proper unsigned int. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 4 ++-- drivers/staging/lustre/lustre/include/lu_object.h | 4 ++-- drivers/staging/lustre/lustre/llite/namei.c | 2 +- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_dev.c | 6 +++--- drivers/staging/lustre/lustre/osc/osc_cache.c | 6 +++--- drivers/staging/lustre/lustre/osc/osc_internal.h | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) commit ae839184d354b1251bf928307e663ed80806be6e Author: James Simmons Date: Wed Jun 14 11:01:17 2017 -0400 staging: lustre: lustre: make all struct file_operations constant Checkpatch reported several cases of struct file_operations not being const. This resolves those warnings. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fld/lproc_fld.c | 2 +- drivers/staging/lustre/lustre/include/lprocfs_status.h | 8 ++++---- drivers/staging/lustre/lustre/llite/file.c | 6 +++--- drivers/staging/lustre/lustre/llite/llite_internal.h | 8 ++++---- drivers/staging/lustre/lustre/llite/lproc_llite.c | 6 +++--- drivers/staging/lustre/lustre/lov/lov_pool.c | 2 +- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) commit 1ada25dc24466c3877a4119ed9d5092e1a143d63 Author: James Simmons Date: Wed Jun 14 11:01:16 2017 -0400 staging: lustre: lustre: resolve "use spaces between elements" checkpatch errors Due to the way the DFID was embedded in our debug strings checkpatch would report the following error: CHECK: Concatenated strings should use spaces between elements This patch introduces proper space to resolve these reports. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_request.c | 2 +- drivers/staging/lustre/lustre/fld/fld_cache.c | 6 ++-- .../lustre/lustre/include/lustre/lustre_idl.h | 6 ++-- .../lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 4 +-- drivers/staging/lustre/lustre/llite/dcache.c | 4 +-- drivers/staging/lustre/lustre/llite/dir.c | 12 +++---- drivers/staging/lustre/lustre/llite/file.c | 42 +++++++++++----------- .../staging/lustre/lustre/llite/llite_internal.h | 4 +-- drivers/staging/lustre/lustre/llite/llite_lib.c | 34 +++++++++--------- drivers/staging/lustre/lustre/llite/llite_mmap.c | 2 +- drivers/staging/lustre/lustre/llite/llite_nfs.c | 10 +++--- drivers/staging/lustre/lustre/llite/namei.c | 38 ++++++++++---------- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 14 ++++---- drivers/staging/lustre/lustre/llite/symlink.c | 4 +-- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_object.c | 2 +- drivers/staging/lustre/lustre/llite/xattr.c | 6 ++-- drivers/staging/lustre/lustre/llite/xattr_cache.c | 4 +-- drivers/staging/lustre/lustre/lmv/lmv_fld.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 6 ++-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 40 ++++++++++----------- drivers/staging/lustre/lustre/lov/lov_io.c | 2 +- drivers/staging/lustre/lustre/lov/lov_merge.c | 4 +-- drivers/staging/lustre/lustre/lov/lov_object.c | 7 ++-- drivers/staging/lustre/lustre/lov/lov_pack.c | 6 ++-- drivers/staging/lustre/lustre/lov/lov_pool.c | 8 ++--- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 6 ++-- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 16 ++++----- drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 12 +++---- drivers/staging/lustre/lustre/obdclass/llog_swab.c | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +- .../staging/lustre/lustre/obdecho/echo_client.c | 4 +-- drivers/staging/lustre/lustre/osc/osc_cache.c | 8 ++--- drivers/staging/lustre/lustre/osc/osc_request.c | 3 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 4 +-- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- 45 files changed, 175 insertions(+), 177 deletions(-) commit 7094576ccdc3acfe1e06a1e2ab547add375baf7f Author: Cyrille Pitchen Date: Fri Jun 23 17:39:16 2017 +0200 spi: atmel: fix corrupted data issue on SAM9 family SoCs This patch disables the use of the DMA for data transfer and forces the use of PIO transfers instead as a quick fixup to solve the cache aliasing issue on ARM9 based cores, which embeds a VIVT data cache. Indeed in the case of VIVT data caches, it is not safe to call dma_map_*() functions to map buffers for DMA transfers when those buffers have been allocated by vmalloc() or from any DMA-unsafe area. Further patches may propose a better solution based on the use of a bounce buffer at the SPI sub-system level but such solution needs more time to be discussed. Then the use of DMA transfers could be enabled again to improve the performances but before that, this patch already solves the issue. Signed-off-by: Cyrille Pitchen Acked-by: Nicolas Ferre Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-atmel.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit d97d0f1b4630d46976b7a275c1636229c3ebf4d0 Merge: f35b093 6932ec6 Author: Andreas Färber Date: Fri Jun 23 17:46:41 2017 +0200 Merge branch 'v4.13/sps' into v4.13/drivers This adds the SPS power domains driver. Signed-off-by: Andreas Färber commit b6a0e18ca690c2398661c42b942187621ab77e36 Author: Andreas Färber Date: Tue Feb 28 01:08:37 2017 +0100 ARM: owl: smp: Implement SPS power-gating for CPU2 and CPU3 Bring up the two remaining CPUs by calling into PM domain code. Signed-off-by: Andreas Färber arch/arm/mach-actions/Kconfig | 1 + arch/arm/mach-actions/platsmp.c | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) commit 4c0f860779e9835f87233d89319096501778430c Merge: ba2694de 6932ec6 Author: Andreas Färber Date: Fri Jun 23 17:59:12 2017 +0200 Merge branch 'v4.13/sps' into v4.13/arm+sps This adds drivers/soc/actions/ and the SPS power domains driver, to be reused in mach-actions SMP code. Signed-off-by: Andreas Färber commit 6932ec60cc0a71689150b16b71427cfdc6575602 Author: Andreas Färber Date: Mon Jun 5 21:04:21 2017 +0200 soc: actions: owl-sps: Factor out owl_sps_set_pg() for power-gating Allow the SMP code to reuse PM domain code for CPU2/CPU3 wakeup. Signed-off-by: Andreas Färber drivers/soc/actions/Kconfig | 4 +++ drivers/soc/actions/Makefile | 1 + drivers/soc/actions/owl-sps-helper.c | 51 ++++++++++++++++++++++++++++++++++++ drivers/soc/actions/owl-sps.c | 34 +++--------------------- include/linux/soc/actions/owl-sps.h | 11 ++++++++ 5 files changed, 70 insertions(+), 31 deletions(-) commit aa9f800ded78d530bb07104a4745e95af723abf6 Author: Andreas Färber Date: Sun Feb 26 04:09:57 2017 +0100 soc: actions: Add Owl SPS Implement S500 Smart Power System power-gating. For now flag PD_CPU2 and PD_CPU3 as always-on. Based on LeMaker linux-actions tree. Signed-off-by: Andreas Färber drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/actions/Kconfig | 12 ++ drivers/soc/actions/Makefile | 1 + drivers/soc/actions/owl-sps.c | 252 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 267 insertions(+) commit 4ca3fbd981efde78e64643672d493b4ede458e72 Author: Andreas Färber Date: Mon Feb 27 23:13:48 2017 +0100 dt-bindings: power: Add Owl SPS power domains Define power domains for all non-reserved S500 power gates. Acked-by: Rob Herring Signed-off-by: Andreas Färber .../devicetree/bindings/power/actions,owl-sps.txt | 17 +++++++++++++++++ include/dt-bindings/power/owl-s500-powergate.h | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+) commit e0912c0129038e1e8eb20e0441fc3d6b33215d68 Author: Sumit Semwal Date: Tue Jun 20 10:18:18 2017 +0530 selftests: lib: Skip tests on missing test modules With older kernels, printf.sh and bitmap.sh fail because they can't find the respective test modules they are looking for. Use modprobe dry run to check for missing test_XXX module. Error out with the same error code as prime_numbers.sh. Signed-off-by: Sumit Semwal Signed-off-by: Shuah Khan tools/testing/selftests/lib/bitmap.sh | 4 ++++ tools/testing/selftests/lib/printf.sh | 4 ++++ 2 files changed, 8 insertions(+) commit 8c66ac6a28a460273e1ad263bb05056dc0e68760 Author: Jens Axboe Date: Fri Jun 23 09:18:54 2017 -0600 mtip32xx: fix up the checking for internal command failure This fixes up two commits that have touched this driver. The command status field is now a blk_status_t, so we can't check for < 0 and we definitely can't assume it's holding -Exxxx error values. All we care about here is whether ->status is zero or not. Check for that, and remove the various attempts at smart error reporting. Just log to dmesg what command failed, and the blk_status_t value. Reported-by: Dan Carpenter Fixes: 2a842acab109 ("block: introduce new block status code type") Fixes: 3f5e6a35774c ("mtip32xx: convert internal command issue to block IO path") Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit 9bd780f5e0663035d41a95a6b87eced011ba7e2a Author: Paolo Abeni Date: Fri Jun 23 14:19:51 2017 +0200 udp: fix poll() Michael reported an UDP breakage caused by the commit b65ac44674dd ("udp: try to avoid 2 cache miss on dequeue"). The function __first_packet_length() can update the checksum bits of the pending skb, making the scratched area out-of-sync, and setting skb->csum, if the skb was previously in need of checksum validation. On later recvmsg() for such skb, checksum validation will be invoked again - due to the wrong udp_skb_csum_unnecessary() value - and will fail, causing the valid skb to be dropped. This change addresses the issue refreshing the scratch area in __first_packet_length() after the possible checksum update. Fixes: b65ac44674dd ("udp: try to avoid 2 cache miss on dequeue") Reported-by: Michael Ellerman Signed-off-by: Hannes Frederic Sowa Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/udp.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 0281bafa39198be39283543c90e490545901e1a5 Merge: e4fc0e5 2941be2 Author: Arnd Bergmann Date: Fri Jun 23 17:06:09 2017 +0200 Merge tag 'ccn/fixes-for-4.13-v2' of git://git.linaro.org/people/pawel.moll/linux into next/fixes-non-critical Pull "bus: ARM CCN PMU driver updates" from Paweł Moll: * Fixed missing module aliases, thus autoloading. * Use appropriate (c)allocation function for arrays of structures. * Add compatibility string (thus support) for CCN-502 variant. * tag 'ccn/fixes-for-4.13-v2' of git://git.linaro.org/people/pawel.moll/linux: bus: arm-ccn: Enable stats for CCN-502 interconnect dt-bindings: arm-ccn: Add bindings info for CCN-502 compatible string bus: arm-ccn: Use devm_kcalloc() in arm_ccn_probe() bus: arm-ccn: Fix module autoload commit 2941be2166c2146ded1d1806ae76e78c26b8d4fe Author: Velibor Markovski Date: Thu Jun 15 23:39:13 2017 -0700 bus: arm-ccn: Enable stats for CCN-502 interconnect Add compatible string for the ARM CCN-502 interconnect Signed-off-by: Velibor Markovski Acked-by: Mark Rutland Signed-off-by: Scott Branden Signed-off-by: Pawel Moll drivers/bus/arm-ccn.c | 1 + 1 file changed, 1 insertion(+) commit 6a7f6cf72b5808059c42c49fdc07fa6aebe241d7 Author: Velibor Markovski Date: Thu Jun 15 23:39:12 2017 -0700 dt-bindings: arm-ccn: Add bindings info for CCN-502 compatible string Add CCN-502 to the list of supported devices by ARM CCN PMU driver. Signed-off-by: Velibor Markovski Acked-by: Mark Rutland Signed-off-by: Scott Branden Signed-off-by: Pawel Moll Documentation/devicetree/bindings/arm/ccn.txt | 1 + 1 file changed, 1 insertion(+) commit 0a240c5b420194c24882748f1ea35f37643b032e Author: Markus Elfring Date: Wed Apr 19 09:12:43 2017 +0200 bus: arm-ccn: Use devm_kcalloc() in arm_ccn_probe() Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Pawel Moll drivers/bus/arm-ccn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 60aba820dec333eaa7a320de1403b77e444a178c Author: Javier Martinez Canillas Date: Mon Jan 2 10:02:29 2017 -0300 bus: arm-ccn: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/bus/arm-ccn.ko | grep alias $ After this patch: $ modinfo drivers/bus/arm-ccn.ko | grep alias alias: of:N*T*Carm,ccn-504C* alias: of:N*T*Carm,ccn-504 Signed-off-by: Javier Martinez Canillas Signed-off-by: Pawel Moll drivers/bus/arm-ccn.c | 1 + 1 file changed, 1 insertion(+) commit 30e3224e4ad3abe8438628b3df246ce53de1782e Merge: f61bbd3 3c56909 Author: Arnd Bergmann Date: Fri Jun 23 16:44:36 2017 +0200 Merge tag 'socfpga_dts_for_v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt Pull "SoCFPGA DTS updates for v4.13" from Dinh Nguyen: - Fix clocks node the EMACs - VINING board updtes - Remove I2C EEPROMs and LED node - Add QSPI device - Add 2nd ethernet alias - Add 'clock-frequency' binding for i2c node * tag 'socfpga_dts_for_v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: set the i2c frequency ARM: dts: socfpga: Add second ethernet alias to VINING FPGA ARM: dts: socfpga: Drop LED node from VINING FPGA ARM: dts: socfpga: Remove I2C EEPROMs from VINING FPGA ARM: dts: socfpga: Enable QSPI support on VINING FPGA ARM: dts: socfpga: Fix the ethernet clock phandle commit 2b29ca22ed8a79ef1942b6546ccab5953678028d Author: Arnd Bergmann Date: Fri Jun 23 16:33:43 2017 +0200 Revert "arm64: dts: marvell: add dma-mask in crypto nodes for 7k/8k" As I found by chance while merging another patch, the usage of a dma-mask in this DT node is wrong for multiple reasons: - dma-masks are a Linux specific concept, not a general hardware feature - In DT, we use the "dma-ranges" property to describe how DMA addresses related between devices. - The 40-bit mask appears to be completely unnecessary here, as the SoC cannot address that much memory anyway, so simply asking for a 64-bit mask (as supported by the device) should succeed anyway. The patch to remove the parsing of the property is getting merged through the crypto tree. Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 - arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 1 - 2 files changed, 2 deletions(-) commit 3c56909ec2672d74d30f32f1c0ed8cfd7d6e2b14 Author: Dinh Nguyen Date: Tue May 9 09:21:08 2017 -0500 ARM: dts: socfpga: set the i2c frequency Use 'clock-frequency' binding for the i2c node that will put the I2C driver into the standard operating mode. 'speed-mode' was not a valid binding for the I2C driver, remove it. Signed-off-by: Alan Tull Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 2 +- arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts | 2 +- arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 5b5ada57e4df56940d4855069754460b31666806 Author: Marek Vasut Date: Tue May 9 09:07:57 2017 -0500 ARM: dts: socfpga: Add second ethernet alias to VINING FPGA Add DT alias for the second ethernet present on mainboard rev 1.10. Signed-off-by: Marek Vasut Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 1 + 1 file changed, 1 insertion(+) commit 3ca65aa18f15c75677affcbc8654c86e5dc6d87f Author: Marek Vasut Date: Tue May 9 09:06:06 2017 -0500 ARM: dts: socfpga: Drop LED node from VINING FPGA Drop the LED node from VINing FPGA DT because the LED wiring is different on each mainboard revision. This wiring is therefore handled in mainboard DT Overlays. Signed-off-by: Marek Vasut Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 28 ---------------------- 1 file changed, 28 deletions(-) commit ff3d90decb64fd90598cca8244d2c67e452d793e Author: Marek Vasut Date: Tue May 9 09:02:33 2017 -0500 ARM: dts: socfpga: Remove I2C EEPROMs from VINING FPGA Remove the EEPROMs attached to the I2C expander ports which lead to the backplane slots from the main VIN|ING DTS file. These EEPROMs are bound using separate DTO files, which lets us handle both two-slot and six-slot configuration of the backplane. Signed-off-by: Marek Vasut Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 34 ++-------------------- 1 file changed, 2 insertions(+), 32 deletions(-) commit 79528279c0cc946d11c9920788391bcb24582991 Author: Marek Vasut Date: Tue May 9 08:58:50 2017 -0500 ARM: dts: socfpga: Enable QSPI support on VINING FPGA Enable the QSPI node and add the flash chips. Signed-off-by: Marek Vasut Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit b8d9b3e407d16ccdc7d256af449e7d250074b5f4 Author: Marek Vasut Date: Tue May 9 08:35:36 2017 -0500 ARM: dts: socfpga: Fix the ethernet clock phandle The ethernet block clock phandle must point to the clock node which represents the clock which directly supply the ethernet block. This is emac_x_clk , not emacx_clk , so fix this. From: Pavel Machek Signed-off-by: Marek Vasut Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42f945970af9df6216e3d771b4df371d02d8742c Author: Takashi Iwai Date: Mon Jun 19 22:39:18 2017 +0200 ALSA: pcm: Add the explicit appl_ptr sync support Currently x86 platforms use the PCM status/control mmaps for transferring the PCM status and appl_ptr between kernel and user-spaces. The mmap is a most efficient way of communication, but it has a drawback per its nature, namely, it can't notify the change explicitly to kernel. The lack of appl_ptr update notification is a problem on a few existing drivers, but it's mostly a small issue and negligible. However, a new type of driver that uses DSP for a deep buffer management requires the exact position of appl_ptr for calculating the buffer prefetch size, and the asynchronous appl_ptr update between kernel and user-spaces becomes a significant problem for it. How can we enforce user-space to report the appl_ptr update? The way is relatively simple. Just by disabling the PCM control mmap, the user-space is supposed to fall back to the mode using SYNC_PTR ioctl, and the kernel gets control over that. This fallback mode is used in all non-x86 platforms as default, and also in the 32bit compatible model on all platforms including x86. It's been implemented already over a decade, so we can say it's fairly safe and stably working. With the help of the knowledge above, this patch introduces a new PCM info flag SNDRV_PCM_INFO_SYNC_APPLPTR for achieving the appl_ptr sync from user-space. When a driver sets this flag at open, the PCM status / control mmap is disabled, which effectively switches to SYNC_PTR mode in user-space side. In this version, both PCM status and control mmaps are disabled although only the latter, control mmap, is the target. It's because the current alsa-lib implementation supposes that both status and control mmaps are always coupled, thus it handles a fatal error when only one of them fails. Of course, the disablement of the status/control mmaps may bring a slight performance overhead. Thus, as of now, this should be used only for the dedicated devices that deserves. Note that the disablement of mmap is a sort of workaround. In the later patch, we'll introduce the way to identify the protocol version alsa-lib supports, and keep mmap working while the sync_ptr is performed together. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/uapi/sound/asound.h | 1 + sound/core/pcm_native.c | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) commit 8110dd281e155e5010ffd657bba4742ebef7a93f Author: Rafael J. Wysocki Date: Fri Jun 23 15:24:32 2017 +0200 ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems Some recent Dell laptops, including the XPS13 model numbers 9360 and 9365, cannot be woken up from suspend-to-idle by pressing the power button which is unexpected and makes that feature less usable on those systems. Moreover, on the 9365 ACPI S3 (suspend-to-RAM) is not expected to be used at all (the OS these systems ship with never exercises the ACPI S3 path in the firmware) and suspend-to-idle is the only viable system suspend mechanism there. The reason why the power button wakeup from suspend-to-idle doesn't work on those systems is because their power button events are signaled by the EC (Embedded Controller), whose GPE (General Purpose Event) line is disabled during suspend-to-idle transitions in Linux. That is done on purpose, because in general the EC tends to be noisy for various reasons (battery and thermal updates and similar, for example) and all events signaled by it would kick the CPUs out of deep idle states while in suspend-to-idle, which effectively might defeat its purpose. Of course, on the Dell systems in question the EC GPE must be enabled during suspend-to-idle transitions for the button press events to be signaled while suspended at all, but fortunately there is a way out of this puzzle. First of all, those systems have the ACPI_FADT_LOW_POWER_S0 flag set in their ACPI tables, which means that the OS is expected to prefer the "low power S0 idle" system state over ACPI S3 on them. That causes the most recent versions of other OSes to simply ignore ACPI S3 on those systems, so it is reasonable to expect that it should not be necessary to block GPEs during suspend-to-idle on them. Second, in addition to that, the systems in question provide a special firmware interface that can be used to indicate to the platform that the OS is transitioning into a system-wide low-power state in which certain types of activity are not desirable or that it is leaving such a state and that (in principle) should allow the platform to adjust its operation mode accordingly. That interface is a special _DSM object under a System Power Management Controller device (PNP0D80). The expected way to use it is to invoke function 0 from it on system initialization, functions 3 and 5 during suspend transitions and functions 4 and 6 during resume transitions (to reverse the actions carried out by the former). In particular, function 5 from the "Low-Power S0" device _DSM is expected to cause the platform to put itself into a low-power operation mode which should include making the EC less verbose (so to speak). Next, on resume, function 6 switches the platform back to the "working-state" operation mode. In accordance with the above, modify the ACPI suspend-to-idle code to look for the "Low-Power S0" _DSM interface on platforms with the ACPI_FADT_LOW_POWER_S0 flag set in the ACPI tables. If it's there, use it during suspend-to-idle transitions as prescribed and avoid changing the GPE configuration in that case. [That should reflect what the most recent versions of other OSes do.] Also modify the ACPI EC driver to make it handle events during suspend-to-idle in the usual way if the "Low-Power S0" _DSM interface is going to be used to make the power button events work while suspended on the Dell machines mentioned above Link: http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 2 +- drivers/acpi/internal.h | 2 + drivers/acpi/sleep.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 112 insertions(+), 5 deletions(-) commit 3056bfb0d3e2e6fcffa99f37172200bdf4b09ab6 Merge: 4bff58b 29ad6bd Author: Arnd Bergmann Date: Fri Jun 23 15:09:32 2017 +0200 Merge tag 'mvebu-arm64-4.13-1' of git://git.infradead.org/linux-mvebu into next/arm64 Pull "mvebu arm64 for 4.13 (part 1)" from Gregory CLEMENT - enable the ICU and GICP drivers for Armada 7K/8K - enable the pinctrl driver for Armada 7K/8K * tag 'mvebu-arm64-4.13-1' of git://git.infradead.org/linux-mvebu: arm64: marvell: enable ICU and GICP drivers arm64: marvell: enable the Armada 7K/8K pinctrl driver commit b1cb5e669449e08580f9865c2c4674893c2fea7b Merge: 17bc093 139358b Author: Arnd Bergmann Date: Fri Jun 23 14:36:38 2017 +0200 Merge tag 'socfpga_updates_for_v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/soc Pull "SoCFPGA updates for v4.13" from Dinh Nguyen: - Increase number of available GPIOs in Kconfig * tag 'socfpga_updates_for_v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: socfpga: Increase max number of GPIOs commit 9b3088135aba74c177529096a6925f3c0af077c2 Merge: 30edd98 44f73dc Author: Arnd Bergmann Date: Fri Jun 23 14:29:17 2017 +0200 Merge tag 'mvebu-fixes-4.12-1' of git://git.infradead.org/linux-mvebu into next/dt64 mvebu fixes for 4.12 Fix the interrupt description of the crypto node for device tree of the Armada 7K/8K SoCs * tag 'mvebu-fixes-4.12-1' of git://git.infradead.org/linux-mvebu: arm64: marvell: dts: fix interrupts in 7k/8k crypto nodes commit 8d9d51b62e8558bbc11c6b978acad001f9ea7a42 Merge: 6a6544e 6c31e12 Author: Thomas Gleixner Date: Fri Jun 23 14:26:29 2017 +0200 Merge tag 'irqchip-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates for v4.13 from Marc Zyngier - support for the new Marvell wire-to-MSI bridge - support for the Aspeed I2C irqchip - Armada XP370 per-cpu interrupt fixes - GICv3 ITS ACPI NUMA support - sunxi-nmi cleanup and updates for new platform support - various GICv3 ITS cleanups and fixes - some constifying in various places commit 2a2599c663684a1142dae0bff7737e125891ae6d Author: Kieran Bingham Date: Tue Jan 3 11:12:11 2017 -0200 [media] media: entity: Catch unbalanced media_pipeline_stop calls Drivers must not perform unbalanced calls to stop the entity pipeline, however if they do they will fault in the core media code, as the entity->pipe will be set as NULL. We handle this gracefully in the core with a WARN for the developer. Replace the erroneous check on zero streaming counts, with a check on NULL pipe elements instead, as this is the symptom of unbalanced media_pipeline_stop calls. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8780f1d9d696c7f466a0ff2a2016476a7ebf42b6 Author: Hans Verkuil Date: Mon May 8 11:35:06 2017 -0300 [media] media/uapi/v4l: clarify cropcap/crop/selection behavior Unfortunately the use of 'type' was inconsistent for multiplanar buffer types. Starting with 4.13 both the normal and _MPLANE variants are allowed, thus making it possible to write sensible code. Yes, we messed up :-( Signed-off-by: Hans Verkuil Reviewed-by: Sylwester Nawrocki Acked-by: Sakari Ailus [hans.verkuil@cisco.com: 4.14 -> 4.13 since this would go in for 4.13 after all] Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-cropcap.rst | 23 ++++++++++++---------- Documentation/media/uapi/v4l/vidioc-g-crop.rst | 22 ++++++++++++--------- .../media/uapi/v4l/vidioc-g-selection.rst | 22 +++++++++++---------- 3 files changed, 38 insertions(+), 29 deletions(-) commit eaec420f530d376d6bb6e547a741203344619f47 Author: Hans Verkuil Date: Mon May 8 11:35:05 2017 -0300 [media] v4l2-ioctl/exynos: fix G/S_SELECTION's type handling The type field in struct v4l2_selection is supposed to never use the _MPLANE variants. E.g. if the driver supports V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, then userspace should still pass V4L2_BUF_TYPE_VIDEO_CAPTURE. The reasons for this are lost in the mists of time, but it is really annoying. In addition, the exynos drivers didn't follow this rule and instead expected the _MPLANE type. To fix that code is added to the v4l2 core that maps the _MPLANE buffer types to their regular equivalents before calling the driver. Effectively this allows for userspace to use either _MPLANE or the regular buffer type. This keeps backwards compatibility while making things easier for userspace. Since drivers now never see the _MPLANE buffer types the exynos drivers had to be adapted as well. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Acked-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-core.c | 4 +- drivers/media/platform/exynos-gsc/gsc-m2m.c | 8 ++-- drivers/media/platform/exynos4-is/fimc-capture.c | 4 +- drivers/media/platform/exynos4-is/fimc-lite.c | 4 +- drivers/media/v4l2-core/v4l2-ioctl.c | 53 +++++++++++++++++++++--- 5 files changed, 57 insertions(+), 16 deletions(-) commit 0e8298e58839cb0bb6aafdbae38e5f8b03a8ff20 Author: Helen Fornazier Date: Mon Jun 19 14:00:21 2017 -0300 [media] vimc: sen: Declare vimc_sen_video_ops as static Declare vimc_sen_video_ops as static, remove warning from sparse tool Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-sensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6856ba77607a467b0f8f94cc7f0dc6152f8786e5 Author: Helen Fornazier Date: Mon Jun 19 14:00:20 2017 -0300 [media] vimc: sca: Add scaler Implement scaler and integrated with the core Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/Makefile | 3 +- drivers/media/platform/vimc/vimc-common.c | 27 ++ drivers/media/platform/vimc/vimc-common.h | 1 + drivers/media/platform/vimc/vimc-scaler.c | 455 ++++++++++++++++++++++++++++++ 4 files changed, 485 insertions(+), 1 deletion(-) commit 88f42bf0b5bcab0ae1a9703d9636412785c1e680 Author: Helen Fornazier Date: Mon Jun 19 14:00:19 2017 -0300 [media] vimc: deb: Add debayer filter Implement the debayer filter and integrate it with the core Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/Makefile | 4 +- drivers/media/platform/vimc/vimc-common.h | 2 + drivers/media/platform/vimc/vimc-debayer.c | 601 +++++++++++++++++++++++++++++ 3 files changed, 606 insertions(+), 1 deletion(-) commit 4a29b70907496aa9da79112ec31cf9cf2b972c3f Author: Helen Fornazier Date: Mon Jun 19 14:00:18 2017 -0300 [media] vimc: Subdevices as modules Change the core structure for adding subdevices in the topology. Instead of calling the specific create function for each subdevice, inject a child platform_device with the driver's name. Each type of node in the topology (sensor, capture, debayer, scaler) will register a platform_driver with the corresponding name through the component subsystem. Implementing a new subdevice type doesn't require vimc-core to be altered. This facilitates future implementation of dynamic entities, where hotpluging an entity in the topology is just a matter of registering/unregistering a platform_device in the system. It also facilitates other implementations of different nodes without touching the core code and remove the need of a header file for each type of node. Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/Makefile | 7 +- drivers/media/platform/vimc/vimc-capture.c | 99 ++++--- drivers/media/platform/vimc/vimc-capture.h | 28 -- drivers/media/platform/vimc/vimc-common.c | 38 +-- drivers/media/platform/vimc/vimc-common.h | 29 ++- drivers/media/platform/vimc/vimc-core.c | 405 +++++++++++------------------ drivers/media/platform/vimc/vimc-sensor.c | 93 +++++-- drivers/media/platform/vimc/vimc-sensor.h | 28 -- 8 files changed, 339 insertions(+), 388 deletions(-) commit 535d296f4841ffbd7f773ff2a559daa6e117f315 Author: Helen Fornazier Date: Mon Jun 19 14:00:17 2017 -0300 [media] vimc: cap: Support several image formats Allow user space to change the image format as the frame size, the pixel format, colorspace, quantization, field YCbCr encoding and the transfer function Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-capture.c | 117 +++++++++++++++++++++++++---- 1 file changed, 101 insertions(+), 16 deletions(-) commit 88ad71aab1a7931ac3d35c3acaa431c3dc05afd9 Author: Helen Fornazier Date: Mon Jun 19 14:00:16 2017 -0300 [media] vimc: sen: Support several image formats Allow user space to change the image format as the frame size, the media bus pixel format, colorspace, quantization, field YCbCr encoding and the transfer function Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-common.c | 8 ++ drivers/media/platform/vimc/vimc-common.h | 12 +++ drivers/media/platform/vimc/vimc-sensor.c | 130 +++++++++++++++++++++++------- 3 files changed, 121 insertions(+), 29 deletions(-) commit 441c0db6e5a2f07f91b72e31a22a19180d28ebf5 Author: Helen Fornazier Date: Mon Jun 19 14:00:15 2017 -0300 [media] vimc: common: Add vimc_colorimetry_clamp Colorimetry value will always be checked in the same way. Adding a helper macro for that Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-common.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 30edd98b3b0edd0715ef736fd54d08a15cbc9462 Merge: efd8b0d 6ef84a8 Author: Arnd Bergmann Date: Fri Jun 23 14:06:00 2017 +0200 Merge tag 'mvebu-dt64-4.13-2' of git://git.infradead.org/linux-mvebu into next/dt64 Pull "mvebu dt64 for 4.13 (part 2)" from Gregory CLEMENT: - use new clock binding for Armada 7K/8K - add pinctrl on Armada 7K/8K - add GPIO on Armada 7K/8K - switch from GIC to ICU on CP110 (Armada 7K/8K) - enable the mdio node on the mcbin (Armada 8K based board) * tag 'mvebu-dt64-4.13-2' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: enable GICP and ICU on Armada 7K/8K arm64: dts: marvell: add gpio support for Armada 7K/8K arm64: dts: marvell: add pinctrl support for Armada 7K/8K arm64: dts: marvell: use new binding for the system controller on cp110 arm64: dts: marvell: remove *-clock-output-names on cp110 arm64: dts: marvell: use new bindings for xor clocks on ap806 arm64: dts: marvell: mcbin: enable the mdio node commit 288a22d45c631f5be5e1c8b83977a78841083d3c Author: Helen Fornazier Date: Mon Jun 19 14:00:14 2017 -0300 [media] vimc: common: Add vimc_link_validate All links will be checked in the same way. Adding a helper function for that Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-capture.c | 78 +++---------------- drivers/media/platform/vimc/vimc-common.c | 121 ++++++++++++++++++++++++++++- drivers/media/platform/vimc/vimc-common.h | 14 ++++ 3 files changed, 145 insertions(+), 68 deletions(-) commit bf5fb95c261de259e912e49973c66347a0a5b3d3 Author: Helen Fornazier Date: Mon Jun 19 14:00:13 2017 -0300 [media] vimc: common: Add vimc_pipeline_s_stream helper Move the vimc_cap_pipeline_s_stream from the vimc-cap.c to vimc-common.c as this core will be reused by other subdevices to activate the stream in their directly connected nodes Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-capture.c | 29 ++------------------------- drivers/media/platform/vimc/vimc-common.c | 32 ++++++++++++++++++++++++++++++ drivers/media/platform/vimc/vimc-common.h | 11 ++++++++++ 3 files changed, 45 insertions(+), 27 deletions(-) commit f1f940490d3ccff96da9cc81d57c2c083c398a18 Author: Kuninori Morimoto Date: Thu Jun 22 06:22:49 2017 +0000 ASoC: audio-graph-scu-card: support 2nd codec endpoint on DT audio-graph-scu-card can handle below connection which is mainly for sound mixing purpose. +----------+ +-------+ | CPU0--+--|-->| Codec | | | | +-------+ | CPU1--+ | +----------+ >From OF-graph point of view, it should have CPU0 <-> Codec, and CPU1 <-> Codec on DT. But current driver doesn't care about 2nd connection of Codec, because it is dummy from DPCM point of view. This patch can care 2nd Codec connection, and it should be supported from OF-graph point of view. It still have backward compatibility. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../bindings/sound/audio-graph-scu-card.txt | 9 +++++-- sound/soc/generic/audio-graph-scu-card.c | 28 +++++++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) commit 32f2bcce3ed10b93236d747701a9c04d51626cc2 Author: Kuninori Morimoto Date: Thu Jun 22 06:22:14 2017 +0000 ASoC: audio-graph-scu-card: tidyup asoc_simple_card_canonicalize_cpu() parameter asoc_simple_card_canonicalize_cpu() 2nd param is asking CPU component's DAI links, not Card links. This patch fixup it. Otherwise, audio-graph-card can't handle CPU component correctly if CPU has mult-DAIs and Card uses only one of them Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-scu-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47ca9593decee772a48d630af815aabedf99e694 Author: Kuninori Morimoto Date: Thu Jun 22 06:21:49 2017 +0000 ASoC: audio-graph-card: tidyup asoc_simple_card_canonicalize_cpu() parameter asoc_simple_card_canonicalize_cpu() 2nd param is asking CPU component's DAI links, not Card links. This patch fixup it. Otherwise, audio-graph-card can't handle CPU component correctly if CPU has mult-DAIs and Card uses only one of them Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c149543ef46e3dcc80280a4cc9fbcd05294d3c58 Author: Helen Fornazier Date: Mon Jun 19 14:00:12 2017 -0300 [media] vimc: common: Add vimc_ent_sd_* helper As all the subdevices in the topology will be initialized in the same way, to avoid code repetition the vimc_ent_sd_{register, unregister} helper functions were created Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-common.c | 66 +++++++++++++++++++++++++++++++ drivers/media/platform/vimc/vimc-common.h | 39 ++++++++++++++++++ drivers/media/platform/vimc/vimc-sensor.c | 58 +++++---------------------- 3 files changed, 114 insertions(+), 49 deletions(-) commit 2bda4288e771e51946e70329c9b79605e4612f10 Author: John Hsu Date: Thu Jun 22 11:57:55 2017 +0800 ASoC: nau8825: make crosstalk function optional Make crosstalk functoin optional. The jack detection can speed up without crosstalk detection. Let the decision of function usage to platform design. The patch helps the issue concern as follows: Google issue 35574278: Chell_headphone pop back from S3 There is a concern as follows: cras getting blocked for 2 seconds (worst-case 3 seconds) As I understand, ChromeOS expects resume finishes in 1 seconds. Video/Audio playing after 3 seconds of resume seems against the spec. If we really have to make the choice I would choose pop noise instead of waiting for 3 seconds. Signed-off-by: John Hsu Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 6 +++++- sound/soc/codecs/nau8825.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit 8fe19795da1b9dea2353f016622842a2f163039e Author: John Hsu Date: Thu Jun 22 11:21:01 2017 +0800 ASoC: nau8825: fix jack type detection issue after resume Fix the issue that mic type detection error after resume. The microphone type detection procedure will recognize testing signal on JKSLV pin, but before the procedure, JKSLV already had supply voltage, that results in the failure. Therefore, the patch turns off the power and reset the jack type configuration before suspend. Then redo the jack detection procedure after resume. The patch help to fix the issue as follows: Google issue 37973093: CTIA/OMTP jack type detection failure after resume Reported Issue Chrome OS Version : ChromeOS R59-9460.13.0 Type of hardware : DVT sample What steps will reproduce the problem? (1 Play a music (2 Insert a headphones (3 Close laptop lid 3 sec then open it What is the expected output? The music is normal in the headphones. What do you see instead? Singer voice in the music is not clear. How frequently does this problem reproduce? Always What is the impact to the user, and is there a workaround? If so, what is it? Re-insert the headset or close the laptop lid and then open it again can be repaired. Signed-off-by: John Hsu Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 403d2fef06104275dd4909d2684c86aabe25c917 Author: John Hsu Date: Thu Jun 22 10:41:51 2017 +0800 ASoC: nau8825: default value for property Assign default value for codec private data when property not given. If without those default value and property, the codec will work abnormally. Signed-off-by: John Hsu Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 53 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 12 deletions(-) commit 5ba0ae43dfdea82bd8f45883e604dcd43454cf24 Author: Helen Fornazier Date: Mon Jun 19 14:00:11 2017 -0300 [media] vimc: Move common code from the core Remove helper functions from vimc-core and add it in vimc-common to clean up the core. Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/Makefile | 2 +- drivers/media/platform/vimc/vimc-capture.h | 2 +- drivers/media/platform/vimc/vimc-common.c | 221 +++++++++++++++++++++++++++++ drivers/media/platform/vimc/vimc-common.h | 113 +++++++++++++++ drivers/media/platform/vimc/vimc-core.c | 205 +------------------------- drivers/media/platform/vimc/vimc-core.h | 112 --------------- drivers/media/platform/vimc/vimc-sensor.h | 2 +- 7 files changed, 338 insertions(+), 319 deletions(-) commit 4312fc34f6d000de0cc233dd442bc573d015b8a2 Merge: 2f1b526 35dfa3e Author: Arnd Bergmann Date: Fri Jun 23 13:45:19 2017 +0200 Merge tag 'qcom-drivers-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Pull "Qualcomm ARM Based Driver Updates for v4.13" from Andy Gross: * Improve QCOM SMSM error handling * tag 'qcom-drivers-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: soc: qcom: smsm: Improve error handling, quiesce probe deferral commit efd8b0ddafcc6ab010796d252ac54bb0515117fd Merge: 10c235c 61c9e029 Author: Arnd Bergmann Date: Fri Jun 23 13:43:43 2017 +0200 Merge tag 'zte-dt64-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64 Pull "ZTE arm64 device tree updates for 4.13" from Shawn Guo: - Fix DTC unit_address_vs_reg warnings in OPP entries by replacing '@' with '-' as the OPP nodes will never have a "reg" property. * tag 'zte-dt64-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: zte: Use - instead of @ for DT OPP entries commit 0e15bdfd8b1e3a94862522580161a2d1bb3882a7 Author: Baoyou Xie Date: Thu Jun 22 14:51:58 2017 +0800 ASoC: zx_aud96p22: add ZTE ZX AUD96P22 codec driver It adds ASoC driver for AUD96P22 stereo audio codec integrated on ZTE ZX family SoCs. The driver includes the support for a number of volume and mute controls, and power bits for various playback and recording components. Due to that the board for testing only supports playback, recording support is untested. Signed-off-by: Baoyou Xie Signed-off-by: Shawn Guo Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/zx_aud96p22.c | 403 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 410 insertions(+) commit 7de35c122e2dd8dc4d74b3782ced9c03115dc268 Author: Baoyou Xie Date: Thu Jun 22 14:51:57 2017 +0800 ASoC: add bindings for ZTE zx-aud96p22 audio codec It adds dt-bindings document for ZTE zx-aud96p22 audio codec. Signed-off-by: Baoyou Xie Acked-by: Rob Herring Signed-off-by: Shawn Guo Signed-off-by: Mark Brown .../devicetree/bindings/sound/zte,zx-aud96p22.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 554946c3665793e8fb03fef3401adbd99e271cf6 Author: Helen Fornazier Date: Mon Jun 19 14:00:10 2017 -0300 [media] vimc: sen: Integrate the tpg on the sensor Initialize the test pattern generator on the sensor Generate a colored bar image instead of a grey one Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/Kconfig | 1 + drivers/media/platform/vimc/vimc-sensor.c | 64 ++++++++++++++++++++++++------- 2 files changed, 52 insertions(+), 13 deletions(-) commit ab924af9acde26a5840b905c599dd4f3e10eaa00 Author: Jacopo Mondi Date: Fri May 12 09:36:59 2017 -0300 [media] media: i2c: ov772x: Force use of SCCB protocol Commit e78902976150 ("i2c: sh_mobile: don't send a stop condition by default inside transfers") makes the i2c_sh_mobile I2C-adapter emit a stop/start sequence between messages in a single transfer only when explicitly requested with I2C_M_STOP. This breaks the ov772x driver in the SH4 Migo-R board as the Omnivision sensor uses the I2C-like SCCB protocol that doesn't support repeated starts: i2c-sh_mobile i2c-sh_mobile.0: Transfer request timed out ov772x 0-0021: Product ID error 92:92 Fix it by marking the client as SCCB, forcing the emission of a stop/start sequence between all messages. As I2C_M_STOP requires the I2C adapter to support protocol mangling, ensure that the I2C_FUNC_PROTOCOL_MANGLING functionality is available. Tested on SH4 Migo-R board, with OV772x now successfully probing soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0 ov772x 0-0021: ov7725 Product ID 77:21 Manufacturer ID 7f:a2 Signed-off-by: Jacopo Mondi Suggested-by: Laurent Pinchart Acked-by: Wolfram Sang Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov772x.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a2f07d38d6981ed220d86b7df07e4ac6a1734443 Author: Colin Ian King Date: Thu Jun 22 17:34:49 2017 +0100 spi: stm32: fix error check on mbr being -ve The error check of mbr < 0 is always false because mbr is a u32. Make mbt an int so that a -ve error return from stm32_spi_prepare_mbr can be detected. Detected by CoverityScan, CID#1446586 ("Unsigned compared against 0") Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-stm32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit affd250dec1717e225fa2015ad6b238a43d5aca5 Author: Mauro Carvalho Chehab Date: Wed Jun 21 06:51:51 2017 -0300 [media] dvb uapi docs: enums are passed by value, not reference Since 2015, the documentation for FE_DISEQC_SEND_BURST, FE_SET_TONE and FE_SET_VOLTAGE are incorrectly saying that the enums are passed by reference. They aren't: they're passed by value. Fix the documentation to reflect reality. Fixes: 81959d996a3b ("[media] DocBook: better document FE_DISEQC_SEND_BURST ioctl") Fixes: d6b6d346e560 ("[media] DocBook: better document FE_SET_VOLTAGE ioctl") Fixes: 6dc59e7a195f ("[media] DocBook: better document FE_SET_TONE ioctl") Reported-by: Thierry Lelegard Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/fe-diseqc-send-burst.rst | 4 ++-- Documentation/media/uapi/dvb/fe-set-tone.rst | 4 ++-- Documentation/media/uapi/dvb/fe-set-voltage.rst | 7 ++----- 3 files changed, 6 insertions(+), 9 deletions(-) commit 0428491cba9277db42d66eb245d74255bd3dbfe7 Author: Balbir Singh Date: Tue Apr 11 15:23:25 2017 +1000 powerpc/mm: Trace tlbie(l) instructions Add a trace point for tlbie(l) (Translation Lookaside Buffer Invalidate Entry (Local)) instructions. The tlbie instruction has changed over the years, so not all versions accept the same operands. Use the ISA v3 field operands because they are the most verbose, we may change them in future. Example output: qemu-system-ppc-5371 [016] 1412.369519: tlbie: tlbie with lpid 0, local 1, rb=67bd8900174c11c1, rs=0, ric=0 prs=0 r=0 Signed-off-by: Balbir Singh [mpe: Add some missing trace_tlbie()s, reword change log] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/trace.h | 33 +++++++++++++++++++++++++++++++++ arch/powerpc/kvm/book3s_hv_rm_mmu.c | 11 +++++++++-- arch/powerpc/mm/hash_native_64.c | 3 +++ arch/powerpc/mm/hash_utils_64.c | 2 ++ arch/powerpc/mm/pgtable-radix.c | 5 +++++ arch/powerpc/mm/pgtable_64.c | 8 ++++++-- arch/powerpc/mm/tlb-radix.c | 9 +++++++++ 7 files changed, 67 insertions(+), 4 deletions(-) commit f61bbd39b47df6093685491daab9ef3d41abf99e Merge: 41b0681 a870271 Author: Arnd Bergmann Date: Fri Jun 23 12:34:53 2017 +0200 Merge tag 'pxa-dt-4.13' of https://github.com/rjarzmik/linux into next/dt Pull "pxa-dt for v4.13" from Robert Jarzmik: This device-tree pxa update brings : - cpu operating points renaming from Viresh * tag 'pxa-dt-4.13' of https://github.com/rjarzmik/linux: ARM: pxa: Use - instead of @ for DT OPP entries commit 10c235cdc9350c6da40760f7468d1189bfd4e7ff Author: Arnd Bergmann Date: Fri Jun 23 12:28:34 2017 +0200 arm64: dts: mediatek: don't include missing file This resolves a build error in the next/dt branch: In file included from arch/arm64/boot/dts/mediatek/mt6797-evb.dts:16:0: arch/arm64/boot/dts/mediatek/mt6797.dtsi:15:10: fatal error: dt-bindings/power/mt6797-power.h: No such file or directory 003f5d0c3462 ("arm64: dts: mediatek: add clk and scp nodes for MT6797") Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/mediatek/mt6797.dtsi | 1 - 1 file changed, 1 deletion(-) commit 41b068189d3096b78a029e48cb6f7e63a4e0cbd3 Merge: 2cb6115 bc8ebb8 Author: Arnd Bergmann Date: Fri Jun 23 12:15:05 2017 +0200 Merge tag 'samsung-dt-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Pull "Samsung DeviceTree update for v4.13, part two" from Krzysztof Kozłowski: 1. Add needed property for CEC on Odroid U3, 2. Fix reset GPIO polarity on Rinato. * tag 'samsung-dt-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Fix polarity of panel reset gpio in Rinato ARM: dts: exynos: add needs-hpd to &hdmicec for Odroid-U3 commit 6d759b02f4121595bf4212662e73c26573dab61a Author: Liad Kaufman Date: Mon May 15 18:26:33 2017 +0300 iwlwifi: mvm: support TX on MONITOR iface When trying to TX through a monitor interface, the conditions in iwl_mvm_tx_skb_non_sta() don't match and the frame tries to go out from an usued TXQ. Add a check for monitor iface, and use the AUX queue in such a case. In non-DQA mode the frame is sent through the static-allocated queues anyway, so the problem is in DQA mode only. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++ 1 file changed, 3 insertions(+) commit c00ee467b3bf73c9505b1ea308a263ae3c5aab5d Author: Johannes Berg Date: Tue May 9 15:35:06 2017 +0200 iwlwifi: pcie: work around suspend/resume issue In some platforms, having the device enabled with certain radio frontends causes the platform to not be able to resume properly from suspend, regardless of the wakeup cause. This was traced to a hardware issue with the integrated 9000-series A-step variant. Set the right hardware bit to disable the problematic state. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 4 ++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 11 +++++++++++ 2 files changed, 15 insertions(+) commit 3b9449bb1df756cd16bfe50616392fb7caa1211d Author: Chaya Rachel Ivgi Date: Mon May 8 15:14:01 2017 +0300 iwlwifi: mvm: fix typo in CTDP_CMD_OPERATION_REPORT description Signed-off-by: Chaya Rachel Ivgi Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d75f32e09c80da8e7ac383e07fb2bbdd8df4d56 Author: Emmanuel Grumbach Date: Wed May 10 13:03:01 2017 +0300 iwlwifi: pcie: delete the Tx queue timer earlier upon firmware crash When the firmware crashes, the transmit queues can't make any progress. This is why we stop the counter that monitor the transmit queues' activity. The call that notifies the error to the op_mode may take a bit of time, so stop the timer of the transmit queues earlier. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d74a61fc6bed9698b10427a2424556f1cefb6135 Author: Luca Coelho Date: Tue May 9 23:47:18 2017 +0300 iwlwifi: pcie: reduce unwanted noise in the logs The driver prints "L1 Enabled - LTR Enabled" all the time as dev_info, which is just useless noise in most cases. Convert this to IWL_DEBUG_POWER() so we don't pollute the log unnecessarily but still can get this info on demand. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4409e72b7113c891e4e28d432d4b459c02e88efb Author: Luca Coelho Date: Tue May 9 22:46:19 2017 +0300 iwlwifi: mvm: print base HW address during init It's sometimes hard to find out which HW address the iwlwifi device is using, for instance when reading crouded sniffer logs. To make it easier, print out an info level message with the HW address as soon as we know it. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 2 ++ 2 files changed, 4 insertions(+) commit a8d011446b4c62f5438b2a9724333c1efedfb26b Author: Luca Coelho Date: Wed May 10 11:24:58 2017 +0300 iwlwifi: mvm: document assoc_beacon_arrive_time Document the assoc_beacon_arrive_time element in the iwl_mac_data_sta struct. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-mac.h | 1 + 1 file changed, 1 insertion(+) commit d167e81ad452c317271078076a5999c820d28016 Author: Mordechai Goodstein Date: Wed May 10 16:42:53 2017 +0300 iwlwifi: mvm: support new flush API This new API allows flushing queues based on station ID and TID in A000 devices. One reason for using this is that tfd_queue_mask is only good for 32 queues, which is not enough for A000 devices. Signed-off-by: Sara Sharon Signed-off-by: Mordechai Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 19 ++++++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 14 +++++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 12 +++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 51 ++++++++++++---------- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 44 ++++++++++++++----- 6 files changed, 100 insertions(+), 42 deletions(-) commit 6c64447ec58b0bac612732303f7ab04562124587 Author: Daniel Kiper Date: Thu Jun 22 12:51:37 2017 +0200 x86/xen/efi: Initialize only the EFI struct members used by Xen The current approach, which is the wholesale efi struct initialization from a 'efi_xen' local template is not robust. Usually if new member is defined then it is properly initialized in drivers/firmware/efi/efi.c, but not in arch/x86/xen/efi.c. The effect is that the Xen initialization clears any fields the generic code might have set and the Xen code does not know about yet. I saw this happen a few times, so let's initialize only the EFI struct members used by Xen and maintain no local duplicate, to avoid such issues in the future. Signed-off-by: Daniel Kiper Reviewed-by: Boris Ostrovsky Acked-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: andrew.cooper3@citrix.com Cc: jgross@suse.com Cc: linux-efi@vger.kernel.org Cc: matt@codeblueprint.co.uk Cc: stable@vger.kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1498128697-12943-3-git-send-email-daniel.kiper@oracle.com [ Clarified the changelog. ] Signed-off-by: Ingo Molnar arch/x86/xen/efi.c | 45 ++++++++++++--------------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) commit 457ea3f7e97881f937136ce0ba1f29f82b9abdb0 Author: Daniel Kiper Date: Thu Jun 22 12:51:36 2017 +0200 efi: Process the MEMATTR table only if EFI_MEMMAP is enabled Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes. In theory we can check EFI_PARAVIRT too, however, EFI_MEMMAP looks more targeted and covers more cases. Signed-off-by: Daniel Kiper Reviewed-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: andrew.cooper3@citrix.com Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: linux-efi@vger.kernel.org Cc: matt@codeblueprint.co.uk Cc: stable@vger.kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1498128697-12943-2-git-send-email-daniel.kiper@oracle.com Signed-off-by: Ingo Molnar drivers/firmware/efi/efi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a509a248bb31ea013c4c2b6801297a2d82eecd43 Author: Emmanuel Grumbach Date: Wed May 10 08:49:41 2017 +0300 iwlwifi: mvm: reset the fw_dump_desc pointer after ASSERT When we get an ASSERT, the fw_dump_desc pointer points to iwl_mvm_dump_desc_assert which can't be freed since it is a global. We still need to NULL'ify the pointer when we call iwl_mvm_free_fw_dump_desc otherwise we will hit int iwl_mvm_fw_dbg_collect_desc(struct iwl_mvm *mvm, const struct iwl_mvm_dump_desc *desc, const struct iwl_fw_dbg_trigger_tlv *trigger) { if (WARN_ON(mvm->fw_dump_desc)) iwl_mvm_free_fw_dump_desc(mvm); Fixes: b6eaa45aa18b ("iwlwifi: mvm: add the cause of the firmware dump in the dump") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b56697272564ce9d073ad9159d28d123f3dcae8b Author: Avraham Stern Date: Tue May 9 16:40:01 2017 +0300 iwlwifi: mvm: set assoc_beacon_arrive_time When updating the mac context after association, assoc_beacon_arrive_time is not being set, which causes the FW to set a wrong TSF to the MAC. Fix this by setting the assoc_beacon_arrive_time when updating the mac context after association. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 ++ 1 file changed, 2 insertions(+) commit e8c8935efd7d47e8ae18067a898ee1a93dfbc5fc Author: Johannes Berg Date: Fri May 5 17:24:06 2017 +0200 iwlwifi: pcie: make iwl_pcie_apm_stop_master() return void Nothing ever checks the return value of iwl_pcie_apm_stop_master(), so there's no point in it having one - make it return void. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) commit dcfbd67b4b8d5223d5362aac9af267387a32f568 Author: Emmanuel Grumbach Date: Sun May 7 15:00:31 2017 +0300 iwlwifi: add a W/A for a scheduler hardware bug In case we need to move the scheduler write pointer by steps of 0x40, 0x80 or 0xc0, the scheduler gets stuck. This leads to hardware error interrupts with status: 0x5A5A5A5A or alike. In order to work around this, detect in the transport layer that we are going to hit this case and tell iwlmvm to increment the sequence number of the packets. This allows to keep the requirement that the WiFi sequence number is in sync with the index in the scheduler Tx queue and it also allows to avoid the problematic sequence. This means that from time to time, we will start a queue from ssn + 1, but that shouldn't be a problem since we don't switch to new queues for AMPDU now that we have DQA which allows to keep the same queue while toggling the AMPDU state. This bug has been fixed on 9000 devices and up. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 13 +++--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 17 ++++++-- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 50 ++++++++++++---------- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 22 +++++++++- 6 files changed, 72 insertions(+), 34 deletions(-) commit 59df97f7223636399f425a5e76586218c48d791e Author: Emmanuel Grumbach Date: Sun May 7 13:31:55 2017 +0300 iwlwifi: mvm: don't mark TIDs that are not idle wrt BA as inactive A TID may not have traffic but still have a BA agreement active (or being setup / torn down) since a BA agreement can be triggered by a debugfs hook. Just avoid to consider such a TID as inactive to make the logic safer. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6b54ebf73b3e5adc2cab3abc6cb37ca66fa74ae2 Author: Luca Coelho Date: Fri May 5 16:11:24 2017 +0300 iwlwifi: mvm: reset the HW before dumping if HW error is detected If the hardware is stuck, we can't read any of the memory we need to dump it, so we end up printing only 0xa5a5a5a5, which is useless. To solve this, poke the hardware by triggering a reset and re-enabling the clocks if we detect a HW error. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit ffd6fd45616672ee1ba122ea54d47fa8fe1dd8d8 Author: Luca Coelho Date: Fri May 5 17:55:24 2017 +0300 iwlwifi: pcie: don't disable bh when handling FW errors When we started using threaded irqs, all the opmode calls were changed to be called with local_bh disabled. The reason for this was it was that mac80211 needs that. When we are handling FW errors, mac80211 is not involved, so we don't need it. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 -- 1 file changed, 2 deletions(-) commit 6b28f9784c394f0692e160f81b07c82cb64af160 Author: Emmanuel Grumbach Date: Fri May 5 08:51:24 2017 +0300 iwlwifi: mvm: fix the recovery flow while connecting In BSS mode in the disconnection flow, mac80211 removes the AP station before the vif is set to unassociated. Our firmware wants it the other way around: first set the vif as unassociated, and then remove the AP station. In order to bridge between those two different behaviors, iwlmvm doesn't remove the station from the firmware when mac80211 removes it, but only after the vif is set to unassociated. The implementation is in iwl_mvm_bss_info_changed_station: if (assoc state was modified && mvmvif->ap_sta_id is VALID && assoc state is now UNASSC) remove_the_station_from_the_firmware() During the recovery flow, mac80211 re-adds the AP station and then reconfigures the vif. Since the vif is not associated, and then, we enter the if above (which was intended to be taken in the disconnection flow only) and remove the station we just added. This defeats the recovery flow. Fix this by not removing the AP station in this flow if we are in recovery flow. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 32 ++++++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) commit 946af0079cd260546d3773e7ff5409f49949371d Author: Luca Coelho Date: Wed May 3 15:12:09 2017 +0300 iwlwifi: mvm: fix nvm_data leak We allocate nvm_data in iwl_mvm_nvm_get_from_fw(). If something goes wrong after the allocation (i.e. if no valid MAC address is valid), we should free nvm_data before returning an error. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1dad3e0a313c42f8ade19f6987aedb857c4d07d0 Author: Luca Coelho Date: Wed May 3 15:09:52 2017 +0300 iwlwifi: remove useless iwl_free_nvm_data() function This function just calls kfree(), so it only obscures the code without bringing any benefits. Remove it. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/main.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h | 9 --------- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) commit d98d6fb9f167978eea79c7379301963053c5319c Author: Johannes Berg Date: Thu May 4 11:01:32 2017 +0200 iwlwifi: document transmit buffer bits better Properly document the transmit buffer bits using an enum and kernel-doc documentation. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit e6138c9ca59293052bae8d7e2db247ab3d0c3ee1 Author: Johannes Berg Date: Thu May 4 10:00:03 2017 +0200 iwlwifi: mvm: add documentation for enum iwl_debug_cmds Add kernel-doc documentation for enum iwl_debug_cmds, linking the structures used by the commands. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a6a621934e2e041ad4a8b55ef273731794e936ed Author: Johannes Berg Date: Wed May 3 21:56:04 2017 +0200 iwlwifi: mvm: disentangle union in TX status struct This improves documentation, since kernel-doc can't deal with the union well. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 73 ++++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 3 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 9 ++- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +- 4 files changed, 69 insertions(+), 19 deletions(-) commit 3e73148406c67615bbe8d166d2c22efc3995e305 Author: Liad Kaufman Date: Wed May 3 18:47:46 2017 +0300 iwlwifi: mvm: fix fw monitor 7000 HW recollecting To stop and start the FW monitor in the 7000 HW family we need to use a different bit, otherwise after stopping it for the first time - it won't get restarted. Use the correct bitmask. Note: This fix is only for DRAM collection mode. For other modes, an additional fix will be needed. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7b7cab79b8e7f904b22312b83989b2ba785a700c Author: Johannes Berg Date: Tue May 2 13:01:49 2017 +0200 iwlwifi: mvm: docs: fix enum link, provide TX response link Fix the enum link by adding the missing & and provide the link to the TX response documentation. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit d490e09784a9d0a63f831e5f1104b4826e666b0c Author: Johannes Berg Date: Wed May 3 12:16:48 2017 +0200 iwlwifi: pcie: fix command completion name debug When the command name is printed on command completion, the wrong group is used, leading to the wrong name being printed. Fix this by using the group ID without inappropriately mangling it through iwl_cmd_groupid() - it's already a u8. Also, while at it, use it from the same place as the command ID, everything else is just confusing. Fixes: ab02165ccec4 ("iwlwifi: add wide firmware command infrastructure for TX") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8790fce4f696ed55195283d26685cc0edaea63a8 Author: Johannes Berg Date: Wed May 3 13:04:40 2017 +0200 iwlwifi: fix TX tracing for non-linear SKBs When sending non-linear SKBs that should be included in the regular TX tracing completely (and not be pushed into the tx_data tracing), the (tracing) code didn't correctly take the fact that they were non-linear into account and added only the skb head portion. This probably never really triggered, since those frames we want traced fully are most likely linear anyway, but the code gets easier to understand and we lose an argument to the tracing function, so overall fixing this is better. Fixes: 206eea783385 ("iwlwifi: pcie: support frag SKBs") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/iwl-devtrace-iwlwifi.h | 19 ++++++++++++------- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 5 ++--- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 5 ++--- 3 files changed, 16 insertions(+), 13 deletions(-) commit 78c1acf35fcd528ff4c76057d5724ac00e0f7fff Author: Johannes Berg Date: Wed May 3 12:53:22 2017 +0200 iwlwifi: simplify data tracepoint There's no need to calculate the data_len outside of the tracepoint, since it's always skb->len - hdr_len, which are both available inside. Simplify the callers and move the calculation in. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-devtrace-data.h | 11 ++++++----- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 3 +-- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) commit 640e32c9ee55a7938eb7d629a87f46a94f77a87f Author: Colin Ian King Date: Fri Jun 23 09:37:38 2017 +0100 Bluetooth: hci_serdev: make hci_serdev_client_ops static The structure hci_serdev_client_ops does not need to be in global scope and is not modified, so make it static. Cleans up sparse warning: "symbol 'hci_serdev_client_ops' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_serdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8887cd99038bf242fb47f2d07fa0cf9371efa643 Author: Nicolas Pitre Date: Wed Jun 21 14:22:02 2017 -0400 sched/rt: Move RT related code from sched/core.c to sched/rt.c This helps making sched/core.c smaller and hopefully easier to understand and maintain. Signed-off-by: Nicolas Pitre Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170621182203.30626-3-nicolas.pitre@linaro.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 315 --------------------------------------------------- kernel/sched/rt.c | 310 ++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sched/sched.h | 5 + 3 files changed, 315 insertions(+), 315 deletions(-) commit 06a76fe08d4daaeea01ca0f175ad29f40c781ece Author: Nicolas Pitre Date: Wed Jun 21 14:22:01 2017 -0400 sched/deadline: Move DL related code from sched/core.c to sched/deadline.c This helps making sched/core.c smaller and hopefully easier to understand and maintain. Signed-off-by: Nicolas Pitre Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170621182203.30626-2-nicolas.pitre@linaro.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 343 +---------------------------------------------- kernel/sched/deadline.c | 344 ++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sched/sched.h | 17 ++- 3 files changed, 364 insertions(+), 340 deletions(-) commit e1d4eeec5aaa28d25f249c0195b0e1d9b9feb7bd Author: Nicolas Pitre Date: Wed Jun 14 13:19:23 2017 -0400 sched/cpuset: Only offer CONFIG_CPUSETS if SMP is enabled Make CONFIG_CPUSETS=y depend on SMP as this feature makes no sense on UP. This allows for configuring out cpuset_cpumask_can_shrink() and task_can_attach() entirely, which shrinks the kernel a bit. Signed-off-by: Nicolas Pitre Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170614171926.8345-2-nicolas.pitre@linaro.org Signed-off-by: Ingo Molnar init/Kconfig | 1 + kernel/sched/core.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4bff58bfb831061e86631241e643bcca5c7e9e0e Author: Timur Tabi Date: Wed Jun 21 12:30:47 2017 -0500 arm64: defconfig: enable Qualcomm Technologies EMAC and some PHY drivers The EMAC is present on Qualcomm Technologies' server and some mobile chips, and is used as the primary Ethernet interface. Systems that have these SOCs typically have an Atheros 803x or Marvell 88e1111 PHY in them, so enable those drivers too. Signed-off-by: Timur Tabi Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit fa8054ef45dba87311caefdbe333aa03734fd269 Author: Timur Tabi Date: Wed Jun 21 12:30:46 2017 -0500 arm64: defconfig: enable QCOM_L2_PMU and QCOM_L3_PMU Now that the drivers are available, enable support for L2 and L3 performance monitoring Qualcomm Datacenter Technologies Centriq SoCs. These PMU drivers provide support for performance optimization. Signed-off-by: Timur Tabi Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 5816dda135ac27d6ebcb562cd2644f8d6266c9e2 Author: Timur Tabi Date: Wed Jun 21 12:30:45 2017 -0500 arm64: defconfig: enable EDAC options Enable EDAC (Error Detection and Correction) support for ARM64 server systems that feature it, so that user space applications can be notified of memory errors. Signed-off-by: Timur Tabi Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit c792e5e644fd8cd38b963fd3b38f6bf57c530966 Author: Timur Tabi Date: Wed Jun 21 12:30:44 2017 -0500 arm64: defconfig: enable APEI and GHES features ARM64 server platforms can support ACPI Platform Error Interface (APEI) and Generic Hardware Error Source (GHES) features, so enable them. Platforms which support the firmware-first RAS error reporting model require APEI and GHES functionality for the OS to receive and report error records provided by the platform. PCIe AER functionality is required for PCIe AER errors to be properly reported and recovered from. Signed-off-by: Timur Tabi Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 23237ef3725de6e4f6f68cf11ae7cb52f8a5d60e Author: Timur Tabi Date: Wed Jun 21 12:30:43 2017 -0500 arm64: defconfig: enable support for PCIe hotplug Some ARM64 server systems support PCIe hotplug, so enable the options for that. Signed-off-by: Timur Tabi Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 5526dfc2a79ffccb50140ec08da2d588ba3528a6 Author: Timur Tabi Date: Wed Jun 21 12:30:42 2017 -0500 arm64: defconfig: enable EFI_CAPSULE_LOADER CONFIG_EFI_CAPSULE_LOADER allows the user to update the EFI firmware, which is useful on ARM64 server platforms. Signed-off-by: Timur Tabi Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 1176fb3c92dc0c4dd83bf45ea2e62791118abfc4 Author: Timur Tabi Date: Wed Jun 21 12:30:41 2017 -0500 arm64: defconfig: enable BLK_DEV_NVME NVME is non-volatile storage media attached via PCIe. NVME devices typically have much higher potential throughput than other block devices, like SATA, NVME is a must-have requirement for ARM64 based servers. Signed-off-by: Timur Tabi Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 51f2e0db4063da7010fa015ddbebdf49c6ee1bbb Author: Timur Tabi Date: Wed Jun 21 12:30:40 2017 -0500 arm64: defconfig: enable ACPI_CPPC_CPUFREQ The CPPC CPUFreq driver is used on many ACPI-based ARM64 server systems. Signed-off-by: Timur Tabi Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 9609827458c37d7b2c37f2a9255631c603a5004c Author: Benjamin Tissoires Date: Thu Jun 15 15:32:05 2017 +0200 HID: multitouch: optimize the sticky fingers timer Instead of unconditionally expiring the timer and calling a long mt_release_contacts(), we can check if some slots are used when the timer expires. We can also remove the timer if we happen to receive all the releases. The logic behind the MT_IO_FLAGS_PENDING_SLOTS could be implemented by counting how many slots are active, but using bits feels slightly more efficient. Signed-off-by: Benjamin Tissoires Tested-by: Arek Burdach Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 4f4001bc76fd1a138a501fbd3d68cce72cbf96ce Author: Benjamin Tissoires Date: Thu Jun 15 15:32:04 2017 +0200 HID: multitouch: fix rare Win 8 cases when the touch up event gets missing Instead of blindly trusting the hardware to send us release, we should consider some events can get lost and release them when we judge time has come. The Windows 8 spec allows to be confident in the fact that the device will continuously report events when a finger touches the surface. This has been tested on the HID recording database I have, and all of those devices behave properly. Also, Arek tested it on his Lenovo Yoga 910, which exports such bug in some situations, when the movements are rather slow. We use an atomic bit here to guard against concurrent accesses to the mt slots because both mt_process_mt_event() and mt_expired_timeout() are called in interrupt context. Signed-off-by: Arek Burdach Signed-off-by: Benjamin Tissoires Tested-by: Arek Burdach Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 102 +++++++++++++++++++++++++++++++++---------- 1 file changed, 79 insertions(+), 23 deletions(-) commit fd91189654a36f9566fedfd8ce6f4c5959c099bc Author: Benjamin Tissoires Date: Thu Jun 15 15:32:03 2017 +0200 HID: multitouch: use BIT macro (1 << X) is wrong. We should use BIT(X) Signed-off-by: Benjamin Tissoires Tested-by: Arek Burdach Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 6c31e123dc4c59eeaae6ac1cd08b929e8b6f7651 Author: Shanker Donthineni Date: Thu Jun 22 18:19:14 2017 -0500 irqchip/gic-v3-its: Don't assume GICv3 hardware supports 16bit INTID The current ITS driver is assuming every ITS hardware implementation supports minimum of 16bit INTID. But this is not true, as per GICv3 specification, INTID field is IMPLEMENTATION DEFINED in the range of 14-24 bits. We might see an unpredictable system behavior on systems where hardware support less than 16bits and software tries to use 64K LPI interrupts. On Qualcomm Datacenter Technologies QDF2400 platform, boot log shows confusing information about number of LPI chunks as shown below. The QDF2400 ITS hardware supports 24bit INTID. This patch allocates the memory resources for PEND/PROP tables based on discoverable value which is specified in GITS_TYPER.IDbits. Also it fixes the log message that reflects the correct number of LPI chunks were allocated. ITS@0xff7efe0000: allocated 524288 Devices @3c0400000 (indirect, esz 8, psz 64K, shr 1) ITS@0xff7efe0000: allocated 8192 Interrupt Collections @3c0130000 (flat, esz 8, psz 64K, shr 1) ITS@0xff7efe0000: allocated 8192 Virtual CPUs @3c0140000 (flat, esz 8, psz 64K, shr 1) ITS: Allocated 524032 chunks for LPIs PCI/MSI: ITS@0xff7efe0000 domain created Platform MSI: ITS@0xff7efe0000 domain created Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit dbd2b826723319eb6e4bee5214f8901e336c06be Author: Ganapatrao Kulkarni Date: Thu Jun 22 11:40:12 2017 +0530 irqchip/gic-v3-its: Add ACPI NUMA node mapping Add code to parse SRAT ITS Affinity sub table as defined in ACPI 6.2. Later in per device probe, ITS devices are mapped to numa node using ITS Id to proximity domain mapping. [maz: fix dependency on ACPICA, fixed structure name, minor cleanups] Reviewed-by: Lorenzo Pieralisi Signed-off-by: Ganapatrao Kulkarni Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 76 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) commit 5b8670612d4014f33d9f130693bfba5327726411 Author: Arvind Yadav Date: Thu Jun 22 16:11:13 2017 +0530 irqchip/gic-v3-its-platform-msi: Make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its-platform-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 935bba7ccf0246fae8247aa8dab7aa85c43de2d8 Author: Arvind Yadav Date: Thu Jun 22 16:05:30 2017 +0530 irqchip/gic-v3-its: Make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0de91a977bfe4c199138fa256a211a648ef6999 Author: Thomas Petazzoni Date: Wed Jun 21 15:29:15 2017 +0200 irqchip/irq-mvebu-icu: Add new driver for Marvell ICU The Marvell ICU unit is found in the CP110 block of the Marvell Armada 7K and 8K SoCs. It collects the wired interrupts of the devices located in the CP110 and turns them into SPI interrupts in the GIC located in the AP806 side of the SoC, by using a memory transaction. Until now, the ICU was configured in a static fashion by the firmware, and Linux was relying on this static configuration. By having Linux configure the ICU, we are more flexible, and we can allocate dynamically the GIC SPI interrupts only for devices that are actually in use. The driver was initially written by Hanna Hawa . Reviewed-by: Marc Zyngier Signed-off-by: Thomas Petazzoni Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 3 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-mvebu-icu.c | 289 +++++++++++++++++++++ .../dt-bindings/interrupt-controller/mvebu-icu.h | 15 ++ 4 files changed, 308 insertions(+) commit a68a63cb4dfc30e8a79b444aabc7747bb7621acf Author: Thomas Petazzoni Date: Wed Jun 21 15:29:14 2017 +0200 irqchip/irq-mvebu-gicp: Add new driver for Marvell GICP This commit adds a simple driver for the Marvell GICP, a hardware unit that converts memory writes into GIC SPI interrupts. The driver provides a number of functions to the ICU driver to allocate GICP interrupts, and get the physical addresses that the ICUs should write to to set/clear interrupts. Signed-off-by: Thomas Petazzoni Reviewed-by: Marc Zyngier Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 3 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-mvebu-gicp.c | 279 +++++++++++++++++++++++++++++++++++++++ drivers/irqchip/irq-mvebu-gicp.h | 11 ++ 4 files changed, 294 insertions(+) commit f39a29bb5ca3f1c54fa677d9de17a09079b7e898 Author: Thomas Petazzoni Date: Wed Jun 21 15:29:13 2017 +0200 dt-bindings/interrupt-controller: Add DT binding for the Marvell ICU This commit adds the Device Tree binding documentation for the Marvell ICU interrupt controller, which collects wired interrupts from the devices located into the CP110 hardware block of Marvell Armada 7K/8K, and converts them into SPI interrupts in the GIC located in the AP hardware block, using the GICP extension. Acked-by: Rob Herring Signed-off-by: Thomas Petazzoni Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/marvell,icu.txt | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit a4857add27d3e48b39e55269b616fe1b99ad3415 Merge: 125370a 794b777 Author: Arnd Bergmann Date: Fri Jun 23 09:57:59 2017 +0200 Merge tag 'samsung-defconfig-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/defconfig Pull "ARM defconfig cleanup" from Krzysztof Kozłowski: 1. Remove old Kconfig options from all ARM configs, 2. Update Samsung defconfigs to bring back options over time got disabled for some reason (configs were not updated along with the code), 3. Save defconfigs for Samsung. * tag 'samsung-defconfig-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: tct_hammer_defconfig: Save defconfig ARM: s5pv210_defconfig: Save defconfig ARM: s3c6400_defconfig: Save defconfig ARM: mini2440_defconfig: Save defconfig ARM: s3c2410_defconfig: Save defconfig ARM: exynos_defconfig: Save defconfig ARM: s5pv210_defconfig: Bring back lost (but wanted) options ARM: s3c6400_defconfig: Bring back lost (but wanted) options ARM: s3c2410_defconfig: Bring back lost (but wanted) options ARM: tct_hammer_defconfig: Bring back lost (but wanted) options ARM: mini2440_defconfig: Bring back lost (but wanted) options ARM: defconfig: samsung: Re-order entries to match savedefconfig ARM: defconfig: Cleanup from old Kconfig options commit ee514c7a2379385fcec363f2f5f8db4eb56bc48c Author: Gustavo A. R. Silva Date: Thu Jun 22 17:05:35 2017 -0500 EDAC, pnd2: Return proper error value from apl_rd_reg() Add code comment to make it clear that the fall-through is intentional and, OR ret with its previous value to avoid overwriting it so that callers can check the correct return value. Signed-off-by: Gustavo A. R. Silva Cc: Qiuxu Zhuo Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170622220535.GA4896@embeddedgus [ Massage a bit. ] Signed-off-by: Borislav Petkov drivers/edac/pnd2_edac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 08db141b5313ac2f64b844fb5725b8d81744b417 Author: Jeff Mahoney Date: Thu Jun 22 16:47:34 2017 -0400 reiserfs: fix race in prealloc discard The main loop in __discard_prealloc is protected by the reiserfs write lock which is dropped across schedules like the BKL it replaced. The problem is that it checks the value, calls a routine that schedules, and then adjusts the state. As a result, two threads that are calling reiserfs_prealloc_discard at the same time can race when one calls reiserfs_free_prealloc_block, the lock is dropped, and the other calls reiserfs_free_prealloc_block with the same block number. In the right circumstances, it can cause the prealloc count to go negative. Signed-off-by: Jeff Mahoney Signed-off-by: Jan Kara fs/reiserfs/bitmap.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 54930dfeb46e978b447af0fb8ab4e181c1bf9d7a Author: Jeff Mahoney Date: Thu Jun 22 16:35:04 2017 -0400 reiserfs: don't preallocate blocks for extended attributes Most extended attributes will fit in a single block. More importantly, we drop the reference to the inode while holding the transaction open so the preallocated blocks aren't released. As a result, the inode may be evicted before it's removed from the transaction's prealloc list which can cause memory corruption. Signed-off-by: Jeff Mahoney Signed-off-by: Jan Kara fs/reiserfs/bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e401f7a2e5199151f735aee6a5c6b4776e6a35e Author: Thiago Jung Bauermann Date: Tue Jun 20 19:08:30 2017 -0300 powerpc: Only obtain cpu_hotplug_lock if called by rtasd Calling arch_update_cpu_topology from a CPU hotplug state machine callback hits a deadlock because the function tries to get a read lock on cpu_hotplug_lock while the state machine still holds a write lock on it. Since all callers of arch_update_cpu_topology except rtasd already hold cpu_hotplug_lock, this patch changes the function to use stop_machine_cpuslocked and creates a separate function for rtasd which still tries to obtain the lock. Michael Bringmann investigated the bug and provided a detailed analysis of the deadlock on this previous RFC for an alternate solution: Signed-off-by: Thiago Jung Bauermann Signed-off-by: Thomas Gleixner Acked-by: Michael Ellerman Cc: John Allen Cc: Michael Bringmann Cc: Nathan Fontenot Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1497996510-4032-1-git-send-email-bauerman@linux.vnet.ibm.com Link: https://patchwork.ozlabs.org/patch/771293/ arch/powerpc/include/asm/topology.h | 6 ++++++ arch/powerpc/kernel/rtasd.c | 2 +- arch/powerpc/mm/numa.c | 22 +++++++++++++++++++--- 3 files changed, 26 insertions(+), 4 deletions(-) commit cabec749191adf9cf5ace25ec43331fd89cc2148 Author: Jacopo Mondi Date: Thu Jun 22 16:54:31 2017 +0200 arm: dts: dt-bindings: Add Renesas RZ/A1 pinctrl header Add dt-bindings for Renesas r7s72100 pin controller header file. Signed-off-by: Jacopo Mondi Signed-off-by: Geert Uytterhoeven include/dt-bindings/pinctrl/r7s72100-pinctrl.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7bb3e8b106b490b3d5b8416391a49fe785e30d57 Author: Jacopo Mondi Date: Thu Jun 22 16:54:30 2017 +0200 dt-bindings: pinctrl: Add RZ/A1 bindings doc Add device tree bindings documentation for Renesas RZ/A1 gpio and pin controller. Signed-off-by: Jacopo Mondi Acked-by: Rob Herring Signed-off-by: Geert Uytterhoeven .../bindings/pinctrl/renesas,rza1-pinctrl.txt | 221 +++++++++++++++++++++ 1 file changed, 221 insertions(+) commit 5a49b644b3075f88126918804601fef40368a4c3 Author: Jacopo Mondi Date: Thu Jun 22 16:54:29 2017 +0200 pinctrl: Renesas RZ/A1 pin and gpio controller Add combined gpio and pin controller driver for Renesas RZ/A1 r7s72100 SoC. Signed-off-by: Jacopo Mondi Signed-off-by: Geert Uytterhoeven drivers/pinctrl/Kconfig | 11 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-rza1.c | 1311 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1323 insertions(+) commit 1ea1516fbbab2b30bf98c534ecaacba579a35208 Author: Chao Yu Date: Fri Jun 23 01:08:22 2017 -0400 ext4: check return value of kstrtoull correctly in reserved_clusters_store kstrtoull returns 0 on success, however, in reserved_clusters_store we will return -EINVAL if kstrtoull returns 0, it makes us fail to update reserved_clusters value through sysfs. Fixes: 76d33bca5581b1dd5c3157fa168db849a784ada4 Cc: stable@vger.kernel.org # 4.4 Signed-off-by: Chao Yu Signed-off-by: Miao Xie Signed-off-by: Theodore Ts'o fs/ext4/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a4956249dac0b9b0027949907bff0cd1a9b57fa Author: Darrick J. Wong Date: Fri Jun 23 00:58:57 2017 -0400 ext4: fix off-by-one fsmap error on 1k block filesystems For 1k-block filesystems, the filesystem starts at block 1, not block 0. This fact is recorded in s_first_data_block, so use that to bump up the start_fsb before we start querying the filesystem for its space map. Without this, ext4/026 fails on 1k block ext4 because various functions (notably ext4_get_group_no_and_offset) don't know what to do with an fsblock that is "before" the start of the filesystem and return garbage results (blockgroup 2^32-1, etc.) that confuse fsmap. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o fs/ext4/fsmap.c | 4 ++++ 1 file changed, 4 insertions(+) commit 338ffbf7cb5eee0ed4600650d03cd2d7cd1cac9d Merge: 047b8e2 fee4964 Author: Dave Airlie Date: Fri Jun 23 14:53:44 2017 +1000 Merge tag 'hdlcd-for-v4.13-v3' of git://linux-arm.org/linux-ld into drm-next hdlcd fixes. * tag 'hdlcd-for-v4.13-v3' of git://linux-arm.org/linux-ld: drm/arm: hdlcd: remove unused variables drm/arm: hdlcd: Use CMA helper for plane buffer address calculation drm/arm: hdlcd: Set the CRTC's port before binding the encoder. commit bdddf342796765a1a946e7c4aed2574f4488e4e5 Author: Theodore Ts'o Date: Fri Jun 23 00:47:05 2017 -0400 ext4: return EFSBADCRC if a bad checksum error is found in ext4_find_entry() Previously a bad directory block with a bad checksum is skipped; we should be returning EFSBADCRC (aka EBADMSG). Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6febe6f253a5bb5c7ac2080d688bd4b75e019d4d Author: Khazhismel Kumykov Date: Fri Jun 23 00:29:05 2017 -0400 ext4: return EIO on read error in ext4_find_entry Previously, a read error would be ignored and we would eventually return NULL from ext4_find_entry, which signals "no such file or directory". We should be returning EIO. Signed-off-by: Khazhismel Kumykov fs/ext4/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ce0151a47f6fa8e4b3b35785aac0d51adbb06ca Author: Eric Biggers Date: Fri Jun 23 00:10:36 2017 -0400 ext4: forbid encrypting root directory Currently it's possible to encrypt all files and directories on an ext4 filesystem by deleting everything, including lost+found, then setting an encryption policy on the root directory. However, this is incompatible with e2fsck because e2fsck expects to find, create, and/or write to lost+found and does not have access to any encryption keys. Especially problematic is that if e2fsck can't find lost+found, it will create it without regard for whether the root directory is encrypted. This is wrong for obvious reasons, and it causes a later run of e2fsck to consider the lost+found directory entry to be corrupted. Encrypting the root directory may also be of limited use because it is the "all-or-nothing" use case, for which dm-crypt can be used instead. (By design, encryption policies are inherited and cannot be overridden; so the root directory having an encryption policy implies that all files and directories on the filesystem have that same encryption policy.) In any case, encrypting the root directory is broken currently and must not be allowed; so start returning an error if userspace requests it. For now only do this in ext4, because f2fs and ubifs do not appear to have the lost+found requirement. We could move it into fscrypt_ioctl_set_policy() later if desired, though. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger fs/ext4/super.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f95a0d6a95b12a79b7492da7ab687ae4cd741124 Merge: a9590fe 8e8320c Author: Jens Axboe Date: Thu Jun 22 21:55:24 2017 -0600 Merge commit '8e8320c9315c' into for-4.13/block Pull in the fix for shared tags, as it conflicts with the pending changes in for-4.13/block. We already pulled in v4.12-rc5 to solve other conflicts or get fixes that went into 4.12, so not a lot of changes in this merge. Signed-off-by: Jens Axboe commit a015434480dcdbfdc188df9b3633348af745e1b1 Author: Daeho Jeong Date: Thu Jun 22 23:54:33 2017 -0400 ext4: send parallel discards on commit completions Now, when we mount ext4 filesystem with '-o discard' option, we have to issue all the discard commands for the blocks to be deallocated and wait for the completion of the commands on the commit complete phase. Because this procedure might involve a lot of sequential combinations of issuing discard commands and waiting for that, the delay of this procedure might be too much long, even to 17.0s in our test, and it results in long commit delay and fsync() performance degradation. To reduce this kind of delay, instead of adding callback for each extent and handling all of them in a sequential manner on commit phase, we instead add a separate list of extents to free to the superblock and then process this list at once after transaction commits so that we can issue all the discard commands in a parallel manner like XFS filesystem. Finally, we could enhance the discard command handling performance. The result was such that 17.0s delay of a single commit in the worst case has been enhanced to 4.8s. Signed-off-by: Daeho Jeong Signed-off-by: Theodore Ts'o Tested-by: Hobin Woo Tested-by: Kitae Lee Reviewed-by: Jan Kara fs/ext4/ext4.h | 3 ++ fs/ext4/mballoc.c | 141 +++++++++++++++++++++++++++++++++++------------------- fs/ext4/mballoc.h | 6 +-- fs/ext4/super.c | 3 ++ 4 files changed, 100 insertions(+), 53 deletions(-) commit 3abb1a0fc2871f2db52199e1748a1d48a54a3427 Author: Jan Kara Date: Thu Jun 22 23:49:46 2017 -0400 ext4: avoid unnecessary stalls in ext4_evict_inode() These days inode reclaim calls evict_inode() only when it has no pages in the mapping. In that case it is not necessary to wait for transaction commit in ext4_evict_inode() as there can be no pages waiting to be committed. So avoid unnecessary transaction waiting in that case. We still have to keep the check for the case where ext4_evict_inode() gets called from other paths (e.g. umount) where inode still can have some page cache pages. Reported-by: Johannes Weiner Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5965453d5e3fb425e6f9d6b4fec403bda3f33107 Merge: fc26bd5 6a39118 Author: James Morris Date: Fri Jun 23 11:55:57 2017 +1000 Merge branch 'stable-4.13' of git://git.infradead.org/users/pcmoore/selinux into next commit 682430e87734799ff2d71311d29f04e86f10f2cc Author: Arnd Bergmann Date: Tue Jun 20 22:12:37 2017 +0200 clk: keystone: TI_SCI_PROTOCOL is needed for clk driver CONFIG_COMPILE_TEST allows building a configuration without TI_SCI_PROTOCOL, which then fails to link: drivers/clk/keystone/sci-clk.o: In function `ti_sci_clk_probe': sci-clk.c:(.text.ti_sci_clk_probe+0x4c): undefined reference to `devm_ti_sci_get_handle' This makes it a hard dependency. Right now, that means we can't actually compile-test the driver unless ARCH_KEYSTONE is set as well, but we can fix that by allowing TI_MESSAGE_MANAGER to be selected for COMPILE_TEST as well. Fixes: b745c0794e2f ("clk: keystone: Add sci-clk driver support") Signed-off-by: Arnd Bergmann Acked-by: Tero Kristo Signed-off-by: Stephen Boyd drivers/clk/keystone/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef884112e55c60d9e208b6524ae1841ae7e2fb2c Author: Rafael J. Wysocki Date: Thu Jun 8 02:16:13 2017 +0200 platform: x86: intel-hid: Wake up the system from suspend-to-idle Allow the intel-hid driver to wake up the system from suspend-to-idle by configuring its platform device as a wakeup one by default and switching it over to a system wakeup events triggering mode during system suspend transitions. Signed-off-by: Rafael J. Wysocki Acked-by: Andy Shevchenko drivers/platform/x86/intel-hid.c | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) commit 91f9e850d465147197280cbeaf51d3fb51f61ca0 Author: Rafael J. Wysocki Date: Thu Jun 8 02:15:52 2017 +0200 platform: x86: intel-vbtn: Wake up the system from suspend-to-idle Allow the intel-vbtn driver to wake up the system from suspend-to-idle by configuring its platform device as a wakeup one by default and switching it over to a system wakeup events triggering mode during system suspend transitions. Signed-off-by: Rafael J. Wysocki Acked-by: Andy Shevchenko drivers/platform/x86/intel-vbtn.c | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) commit 1854c19cae0d108637c40f90ee0bb9b7c1adbc0a Author: Kees Cook Date: Thu May 25 21:44:38 2017 -0700 randstruct: Whitelist NIU struct page overloading The NIU ethernet driver intentionally stores a page struct pointer on top of the "mapping" field. Whitelist this case: drivers/net/ethernet/sun/niu.c: In function ‘niu_rx_pkt_ignore’: drivers/net/ethernet/sun/niu.c:3402:10: note: found mismatched ssa struct pointer types: ‘struct page’ and ‘struct address_space’ *link = (struct page *) page->mapping; ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: David S. Miller Signed-off-by: Kees Cook scripts/gcc-plugins/randomize_layout_plugin.c | 2 ++ 1 file changed, 2 insertions(+) commit 802762cdfff256b6bf3fdb624ac2c56ec043c4f0 Author: Kees Cook Date: Thu May 25 21:40:22 2017 -0700 randstruct: Whitelist big_key path struct overloading The big_key payload structure intentionally stores a struct path in two void pointers to avoid header soup. Whitelist this case: security/keys/big_key.c: In function ‘big_key_read’: security/keys/big_key.c:293:16: note: found mismatched rhs struct pointer types: ‘struct path’ and ‘void *’ struct path *path = (struct path *)&key->payload.data[big_key_path]; ^~~~ Cc: David Howells Signed-off-by: Kees Cook scripts/gcc-plugins/randomize_layout_plugin.c | 2 ++ 1 file changed, 2 insertions(+) commit b07b65846ba33a4deba03eb6e39043c8bc70903b Author: Kees Cook Date: Tue Apr 4 21:35:22 2017 -0700 randstruct: Whitelist UNIXCB cast This is another false positive in bad cast detection: net/unix/af_unix.c: In function ‘unix_skb_scm_eq’: net/unix/af_unix.c:1621:31: note: found mismatched rhs struct pointer types: ‘struct unix_skb_parms’ and ‘char’ const struct unix_skb_parms *u = &UNIXCB(skb); ^ UNIXCB is: #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb)) And ->cb is: char cb[48] __aligned(8); This is a rather crazy cast, but appears to be safe in the face of randomization, so whitelist it in the plugin. Cc: Hannes Frederic Sowa Cc: David S. Miller Signed-off-by: Kees Cook scripts/gcc-plugins/randomize_layout_plugin.c | 2 ++ 1 file changed, 2 insertions(+) commit fd466e068e5adef5922b76f24374c96ba01faaa2 Author: Kees Cook Date: Tue Apr 4 16:50:45 2017 -0700 randstruct: Whitelist struct security_hook_heads cast The LSM initialization routines walk security_hook_heads as an array of struct list_head instead of via names to avoid a ton of needless source. Whitelist this to avoid the false positive warning from the plugin: security/security.c: In function ‘security_init’: security/security.c:59:20: note: found mismatched op0 struct pointer types: ‘struct list_head’ and ‘struct security_hook_heads’ struct list_head *list = (struct list_head *) &security_hook_heads; ^ Cc: Tetsuo Handa Cc: James Morris Signed-off-by: Kees Cook scripts/gcc-plugins/randomize_layout_plugin.c | 2 ++ 1 file changed, 2 insertions(+) commit 313dd1b629219db50cad532dba6a3b3b22ffe622 Author: Kees Cook Date: Fri May 5 23:37:45 2017 -0700 gcc-plugins: Add the randstruct plugin This randstruct plugin is modified from Brad Spengler/PaX Team's code in the last public patch of grsecurity/PaX based on my understanding of the code. Changes or omissions from the original code are mine and don't reflect the original grsecurity/PaX code. The randstruct GCC plugin randomizes the layout of selected structures at compile time, as a probabilistic defense against attacks that need to know the layout of structures within the kernel. This is most useful for "in-house" kernel builds where neither the randomization seed nor other build artifacts are made available to an attacker. While less useful for distribution kernels (where the randomization seed must be exposed for third party kernel module builds), it still has some value there since now all kernel builds would need to be tracked by an attacker. In more performance sensitive scenarios, GCC_PLUGIN_RANDSTRUCT_PERFORMANCE can be selected to make a best effort to restrict randomization to cacheline-sized groups of elements, and will not randomize bitfields. This comes at the cost of reduced randomization. Two annotations are defined,__randomize_layout and __no_randomize_layout, which respectively tell the plugin to either randomize or not to randomize instances of the struct in question. Follow-on patches enable the auto-detection logic for selecting structures for randomization that contain only function pointers. It is disabled here to assist with bisection. Since any randomized structs must be initialized using designated initializers, __randomize_layout includes the __designated_init annotation even when the plugin is disabled so that all builds will require the needed initialization. (With the plugin enabled, annotations for automatically chosen structures are marked as well.) The main differences between this implemenation and grsecurity are: - disable automatic struct selection (to be enabled in follow-up patch) - add designated_init attribute at runtime and for manual marking - clarify debugging output to differentiate bad cast warnings - add whitelisting infrastructure - support gcc 7's DECL_ALIGN and DECL_MODE changes (Laura Abbott) - raise minimum required GCC version to 4.7 Earlier versions of this patch series were ported by Michael Leibowitz. Signed-off-by: Kees Cook Documentation/dontdiff | 2 + arch/Kconfig | 39 + include/linux/compiler-gcc.h | 5 + include/linux/compiler.h | 8 + include/linux/vermagic.h | 9 +- scripts/Makefile.gcc-plugins | 4 + scripts/gcc-plugins/.gitignore | 1 + scripts/gcc-plugins/Makefile | 8 + scripts/gcc-plugins/gcc-common.h | 5 + scripts/gcc-plugins/gen-random-seed.sh | 8 + scripts/gcc-plugins/randomize_layout_plugin.c | 1020 +++++++++++++++++++++++++ 11 files changed, 1108 insertions(+), 1 deletion(-) commit f6a5885fc4d68e7f25ffb42b9d8d80aebb3bacbb Author: Mateusz Jurczyk Date: Tue Jun 13 18:44:28 2017 +0200 NFC: Add sockaddr length checks before accessing sa_family in bind handlers Verify that the caller-provided sockaddr structure is large enough to contain the sa_family field, before accessing it in bind() handlers of the AF_NFC socket. Since the syscall doesn't enforce a minimum size of the corresponding memory region, very short sockaddrs (zero or one byte long) result in operating on uninitialized memory while referencing .sa_family. Signed-off-by: Mateusz Jurczyk Signed-off-by: Samuel Ortiz net/nfc/llcp_sock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6f874bafacf053b87887f4149fc117e2b1096138 Author: Gustavo A. R. Silva Date: Tue May 30 15:43:07 2017 -0500 NFC: add NULL checks to avoid potential NULL pointer dereference NULL checks at line 457: if (!link0 || !link1) {, implies that both pointers link0 and link1 might be NULL. Function nfcsim_link_free() dereference pointers link0 and link1. Add NULL checks before calling nfcsim_link_free() to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1364857 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Samuel Ortiz drivers/nfc/nfcsim.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 03036184e9d4a5b2b42a70b66db9455808dd5da9 Author: Gustavo A. R. Silva Date: Tue Jun 13 11:37:18 2017 -0500 nfc: nci: remove unnecessary null check Remove unnecessary NULL check for pointer conn_info. conn_info is set in list_for_each_entry() using container_of(), which is never NULL. Addresses-Coverity-ID: 1362349 Reviewed-by: Guenter Roeck Signed-off-by: Gustavo A. R. Silva Signed-off-by: Samuel Ortiz net/nfc/nci/core.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a0323b979f81ad2deb2c8836eab506534891876a Author: Mateusz Jurczyk Date: Wed May 24 12:42:26 2017 +0200 nfc: Ensure presence of required attributes in the activate_target handler Check that the NFC_ATTR_TARGET_INDEX and NFC_ATTR_PROTOCOLS attributes (in addition to NFC_ATTR_DEVICE_INDEX) are provided by the netlink client prior to accessing them. This prevents potential unhandled NULL pointer dereference exceptions which can be triggered by malicious user-mode programs, if they omit one or both of these attributes. Signed-off-by: Mateusz Jurczyk Acked-by: Kees Cook Signed-off-by: Samuel Ortiz net/nfc/netlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 608c4adfcabab220142ee335a2a003ccd1c0b25b Author: Mateusz Jurczyk Date: Wed May 24 12:26:20 2017 +0200 nfc: Fix the sockaddr length sanitization in llcp_sock_connect Fix the sockaddr length verification in the connect() handler of NFC/LLCP sockets, to compare against the size of the actual structure expected on input (sockaddr_nfc_llcp) instead of its shorter version (sockaddr_nfc). Both structures are defined in include/uapi/linux/nfc.h. The fields specific to the _llcp extended struct are as follows: 276 __u8 dsap; /* Destination SAP, if known */ 277 __u8 ssap; /* Source SAP to be bound to */ 278 char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */; 279 size_t service_name_len; If the caller doesn't provide a sufficiently long sockaddr buffer, these fields remain uninitialized (and they currently originate from the stack frame of the top-level sys_connect handler). They are then copied by llcp_sock_connect() into internal storage (nfc_llcp_sock structure), and could be subsequently read back through the user-mode getsockname() function (handled by llcp_sock_getname()). This would result in the disclosure of up to ~70 uninitialized bytes from the kernel stack to user-mode clients capable of creating AFC_NFC sockets. Signed-off-by: Mateusz Jurczyk Acked-by: Kees Cook Signed-off-by: Samuel Ortiz net/nfc/llcp_sock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a81d1ab3cad77e20c2df8baef0a35a4980fc511c Author: Mark Greer Date: Thu Jun 15 10:46:17 2017 -0700 Revert "NFC: trf7970a: Handle extra byte in response to Type 5 RMB commands" This reverts commit ab714817d7e891608d31f6996b1e4c43cf2bf342. The original commit was designed to handle a bug in the trf7970a NFC controller where an extra byte was returned in Read Multiple Blocks (RMB) command responses. However, it has become less clear whether it is a bug in the trf7970a or in the tag. In addition, it was assumed that the extra byte was always returned but it turns out that is not always the case. The result is that a byte of good data is trimmed off when the extra byte is not present ultimately causing the neard deamon to fail the read. Since the trf7970a driver does not have the context to know when to trim the byte or not, remove the code from the trf7970a driver all together (and move it up to the neard daemon). This has the added benefit of simplifying the kernel driver and putting the extra complexity into userspace. CC: Rob Herring CC: devicetree@vger.kernel.org Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz .../devicetree/bindings/net/nfc/trf7970a.txt | 4 ---- drivers/nfc/trf7970a.c | 25 ++++------------------ 2 files changed, 4 insertions(+), 25 deletions(-) commit 1b609e4384a10bc4139ab6ca63caa809eb2d5d0c Author: Mark Greer Date: Thu Jun 15 10:46:16 2017 -0700 NFC: digital: NFC-DEP Target WT(nfcdep,max) is now 14 Version 1.1 of the NFC Forum's NFC Digital Protocol Technical Specification dated 2014-07-14 specifies that the NFC-DEP Protocol's Target WT(nfcdep,max) value is 14. In version 1.0 it was 8 so change the value in the Linux NFC-DEP Protocol code accordingly. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz net/nfc/digital_dep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f9f171336baec8ec71d57b6d329bf8cea5c1562 Author: Mark Greer Date: Thu Jun 15 10:46:15 2017 -0700 NFC: digital: NFC-A SEL_RES must be one byte Section 4.8.2 (SEL_RES Response) of NFC Forum's NFC Digital Protocol Technical Specification dated 2010-11-17 clearly states that the size of a SEL_RES Response is one byte. Enforce this restriction in the code. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz net/nfc/digital_technology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dcfca27faf6d19d2af530cfccee2fcdbcd836a2c Author: Markus Elfring Date: Mon May 22 14:24:24 2017 +0200 NFC: digital: Delete an error message for memory allocation failure Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Samuel Ortiz net/nfc/digital_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ae72c9910b170e55386586cf18ef9015a8d172e6 Author: Markus Elfring Date: Mon May 22 14:11:01 2017 +0200 NFC: digital: Improve a size determination in four functions Replace the specification of four data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Samuel Ortiz net/nfc/digital_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e1038535106e73e48204ec3bfe5a428fe6cb35cb Author: Colin Ian King Date: Mon Apr 24 14:36:02 2017 +0100 NFC: trf7970a: fix check of clock frequencies, use && instead of || The "or" condition (clk_freq != TRF7970A_27MHZ_CLOCK_FREQUENCY) || (clk_freq != TRF7970A_13MHZ_CLOCK_FREQUE) will always be true because clk_freq cannot be equal to two different values at the same time. Use the && operator instead of || to fix this. Detected by CoverityScan, CID#1430468 ("Constant expression result") Fixes: 837eb4d21ecde7 ("NFC: trf7970a: add device tree option for 27MHz clock") Signed-off-by: Colin Ian King Acked-by: Geoff Lansberry Signed-off-by: Samuel Ortiz drivers/nfc/trf7970a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bb4053b5993406935cc3b01cbf8b9f1e5803f4c Author: Krzysztof Kozlowski Date: Wed Jun 21 21:08:06 2017 +0200 clk: samsung: audss: Fix silent hang on Exynos4412 due to disabled EPLL Similarly to commit f1e9203e2366 ("clk: samsung: Fix Exynos 5420 pinctrl setup and clock disable failure due to domain being gated") for Exynos5420, the Exynos4412 also requires that EPLL is not disabled. Otherwise any access to MAUDIO block will silently halt. This was not visible before because EPLL on Exynos4 could not be disabled before commit 6edfa11cb396 ("clk: samsung: Add enable/disable operation for PLL36XX clocks"). After this commit, on Odroid U3 board one can see silent hang, usually with last (but unrelated) messages: [ 2.382741] input: gpio_keys as /devices/platform/gpio_keys/input/input0 [ 2.405686] usb 1-3: new high-speed USB device number 3 using exynos-ehci [ 2.419843] max77686-rtc max77686-rtc: setting system clock to 2017-06-21 17:04:13 UTC (1498064653) Mark Exynos4 variant as also needed EPLL to be enabled all the time. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-exynos-audss.c | 1 + 1 file changed, 1 insertion(+) commit 1e4179bc71aeaba81bcf42f5f23a9a3bb1219814 Author: Andy Shevchenko Date: Mon Jun 19 13:08:58 2017 +0300 MAINTAINERS: Remove non-existing NFC platform data files There are no longer platform data files for NFC drivers. Remove it from MAINTAINERS data base. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit c745120e343abfbcf5c9239e09cae4a3cf651fa0 Author: Andy Shevchenko Date: Mon Jun 19 13:08:57 2017 +0300 NFC: st-nci: Get rid of code duplication in ->probe() Since OF and ACPI case almost the same get rid of code duplication by moving gpiod_get() calls directly to ->probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st-nci/i2c.c | 61 +++++++----------------------------------------- drivers/nfc/st-nci/spi.c | 60 +++++++---------------------------------------- 2 files changed, 18 insertions(+), 103 deletions(-) commit 85d23e772931e347c145fa78db3c48f29e169838 Author: Andy Shevchenko Date: Mon Jun 19 13:08:56 2017 +0300 NFC: st-nci: Add GPIO ACPI mapping table In order to make GPIO ACPI library stricter prepare users of gpiod_get_index() to correctly behave when there no mapping is provided by firmware. Here we add explicit mapping between _CRS GpioIo() resources and their names used in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st-nci/i2c.c | 17 +++++++++++++---- drivers/nfc/st-nci/spi.c | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) commit 75719b2b7a03729f403aed55bec938c6d2784690 Author: Andy Shevchenko Date: Mon Jun 19 13:08:55 2017 +0300 NFC: st-nci: Use unified device properties API meaningfully Use unified device properties API in meaningful way. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st-nci/i2c.c | 30 ++++++------------------------ drivers/nfc/st-nci/spi.c | 29 +++++------------------------ 2 files changed, 11 insertions(+), 48 deletions(-) commit a89e68f118e96b165555f7c64fee8aaff7bb7fb3 Author: Andy Shevchenko Date: Mon Jun 19 13:08:54 2017 +0300 NFC: st-nci: Covert to use GPIO descriptor Since we got rid of platform data, the driver may use GPIO descriptor directly. Looking deeply to the use of the GPIO pin it looks like it should be a GPIO based reset control rather than custom GPIO handling. But this is out of scope of the change. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st-nci/i2c.c | 39 ++++++++++++--------------------------- drivers/nfc/st-nci/spi.c | 47 ++++++++++++++++------------------------------- 2 files changed, 28 insertions(+), 58 deletions(-) commit 1af9fea6be9de6e86f628e66c0eae996c49dbe80 Author: Andy Shevchenko Date: Mon Jun 19 13:08:53 2017 +0300 NFC: st-nci: Get rid of "interesting" use of interrupt polarity I2C and SPI frameworks followed by IRQ framework do set interrupt polarity correctly if it's properly specified in firmware (ACPI or DT). Get rid of the redundant trick when requesting interrupt. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st-nci/i2c.c | 8 +------- drivers/nfc/st-nci/spi.c | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) commit 61a04101c8a486dec586b2657bffede1b3b979f3 Author: Andy Shevchenko Date: Mon Jun 19 13:08:52 2017 +0300 NFC: st-nci: Get rid of platform data Legacy platform data must go away. We are on the safe side here since there are no users of it in the kernel. If anyone by any odd reason needs it the GPIO lookup tables and built-in device properties at your service. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz MAINTAINERS | 1 - drivers/nfc/st-nci/i2c.c | 43 ++---------------------------------- drivers/nfc/st-nci/spi.c | 43 ++---------------------------------- include/linux/platform_data/st-nci.h | 31 -------------------------- 4 files changed, 4 insertions(+), 114 deletions(-) commit a5d410949ab0a8934e9352dad08ad588beae3395 Author: Andy Shevchenko Date: Mon Jun 19 13:08:51 2017 +0300 NFC: fdp: Add GPIO ACPI mapping table In order to make GPIO ACPI library stricter prepare users of gpiod_get_index() to correctly behave when there no mapping is provided by firmware. Here we add explicit mapping between _CRS GpioIo() resources and their names used in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/fdp/i2c.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 7b9fcda91e18f13905e07f0145cc7efbe0e503dc Author: Andy Shevchenko Date: Mon Jun 19 13:08:50 2017 +0300 NFC: fdp: Convert to use devres API It looks like there are two leftovers, at least one of which can leak the resource (IRQ). Convert both places to use managed variants of the functions. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/fdp/fdp.c | 15 ++++----------- drivers/nfc/fdp/i2c.c | 10 +++++----- 2 files changed, 9 insertions(+), 16 deletions(-) commit 8597c0920d6f4af66d2100b93599b0c0850dffdd Author: Andy Shevchenko Date: Mon Jun 19 13:08:49 2017 +0300 NFC: fdp: Convert I2C driver to ->probe_new() There is no platform code that uses i2c module table. Remove it altogether and adjust ->probe() to be ->probe_new(). Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/fdp/i2c.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit d31748be2ba37b29bc051f1b5ce2f30294db2cc1 Author: Andy Shevchenko Date: Mon Jun 19 13:08:48 2017 +0300 NFC: st21nfca: Get rid of code duplication in ->probe() Since OF and ACPI case almost the same get rid of code duplication by moving gpiod_get() calls directly to ->probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/i2c.c | 62 ++++++++-------------------------------------- 1 file changed, 10 insertions(+), 52 deletions(-) commit 394671e79ee6e9e23ddd673ba5bbae5887f97182 Author: Andy Shevchenko Date: Mon Jun 19 13:08:47 2017 +0300 NFC: st21nfca: Add GPIO ACPI mapping table In order to make GPIO ACPI library stricter prepare users of gpiod_get_index() to correctly behave when there no mapping is provided by firmware. Here we add explicit mapping between _CRS GpioIo() resources and their names used in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/i2c.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 99f2064e15afcf81b5af22bc7c996cd5c182baf5 Author: Andy Shevchenko Date: Mon Jun 19 13:08:46 2017 +0300 NFC: pn544: Switch to devm_acpi_dev_add_driver_gpios() Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assignment if ->probe() fails. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/pn544/i2c.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6eab81e6358730fd566e2c069d7be2309713ac3a Author: Cyrille Pitchen Date: Tue Jun 13 21:46:24 2017 +0200 MAINTAINERS: Update SPI NOR subsystem git repositories SPI NOR branches are now hosted on MTD repos, spi-nor/next is on l2-mtd and spi-nor/fixes is on linux-mtd. Signed-off-by: Cyrille Pitchen Acked-by: Marek Vasut Signed-off-by: Brian Norris MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 550aba9b8dce109725a87cdcc8268f56dfd32af0 Author: Johannes Berg Date: Wed Apr 26 13:34:29 2017 +0200 iwlwifi: mvm: better link scan notification results length Show the name of the member (scanned_channels) that provides the length with some better markup. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 078f11311f40007a836467e7ab0b311978fe4adb Author: Johannes Berg Date: Tue Apr 25 11:37:40 2017 +0200 iwlwifi: pcie: use kstrtou32_from_user() Use kstrtou32_from_user() in debugfs instead of open-coding it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit dd32162da4e5b3c9c81adf9a1f6e3a839a35d5f0 Author: Liad Kaufman Date: Wed Apr 5 16:25:11 2017 +0300 iwlwifi: mvm: support aggregations on A000 HW On A000 HW, the SCD rdptr has only 8 bits allocated for it, thus when checking if a queue is full, or when checking if the SSN is equal to the TID's next_reclaimed, A000 HW should trim the SSN. Fix this by "normalizing" the SSN to wrap around 0xFF when comparing to the next_reclaimed on A000 HW. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 27 +++++++++++++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 8 ++----- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 15 ++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 +- 6 files changed, 42 insertions(+), 14 deletions(-) commit 87afe9b0f4af44443f88a29458fcebe56385d771 Author: Johannes Berg Date: Tue Apr 25 12:50:32 2017 +0200 iwlwifi: mvm: document status bits Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 302b5e9e7df00938720719d4371263e8e852e5ca Author: Johannes Berg Date: Tue Apr 25 11:38:29 2017 +0200 iwlwifi: pcie: remove pointless debugfs parsing for csr file We don't actually care about the value at all, just making sure that we can successfully parse a single integer value, but that's entirely pointless - remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 10 ---------- 1 file changed, 10 deletions(-) commit 326477e4858cd6b1e0e067ecf2d6a8252ef41994 Author: Johannes Berg Date: Tue Apr 25 13:41:20 2017 +0200 iwlwifi: pcie: don't report RF-kill enabled while shutting down When toggling the RF-kill pin quickly in succession, the driver can get rather confused because it might be in the process of shutting down, expecting all commands to go through quickly due to rfkill, but the transport already thinks the device is accessible again, even though it previously shut it down. This leads to bugs, and I even observed a kernel panic. Avoid this by making the PCIe code only report that the radio is enabled again after the higher layers actually decided to shut it off. This also pulls out this common RF-kill checking code into a common function called by both transport generations and also moves it to the direct method - in the internal helper we don't really care about the RF-kill status anymore since we won't report it up until the stop anyway. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 6 +- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 12 ++-- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 20 ++++-- .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 28 ++------ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 82 ++++++++++++++-------- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 4 +- 9 files changed, 88 insertions(+), 74 deletions(-) commit 6ad0435991482107664f65b7ae3fd588f10149d4 Author: Johannes Berg Date: Tue Apr 25 10:21:18 2017 +0200 iwlwifi: mvm: don't warn in queue sync on RF-kill If we happen to be in or get into the queue sync when RF-kill is asserted, we return from there and warn since there are still queue sync notifications outstanding. These can't ever come though, because we're in RF-kill, so don't WARN then. While at it, also move the warning to the appropriate place, if the request is not synchronous then we shouldn't warn, but currently always will. To make it fast, also trigger the waitq when on rfkill assert. Fixes: 0636b938214c ("iwlwifi: mvm: implement driver RX queues sync command") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 8 +++++--- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) commit fa4de7f7c349d0fca751d1ad331c1fa8f528a47d Author: Johannes Berg Date: Tue Apr 25 09:58:25 2017 +0200 iwlwifi: pcie: add fake RF-kill to debugfs In order to debug "hardware" RF-kill flows, add a low-level hook to allow changing the "hardware" RF-kill from debugfs. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 10 +++++- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 40 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) commit 3a6e168baa7097bcd747c1689cff509297c6d612 Author: Johannes Berg Date: Tue Apr 25 09:55:36 2017 +0200 iwlwifi: pcie: pull out common rfkill IRQ handling code There's no point in duplicating exactly the same code here for legacy and MSI-X interrupts, so pull it out into a new function to call in both places. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 82 +++++++++++----------------- 1 file changed, 33 insertions(+), 49 deletions(-) commit 8f6438f72a5f6f8c49a7d9b4a1e87f56d6faaf2b Author: Gregory Greenman Date: Mon Apr 24 09:24:37 2017 +0300 iwlwifi: mvm: rs: add logs for the wrong antenna case In case that rate's antenna is wrong at the init stage, it's very hard to say what went wrong. Add debug data to the already existing WARN_ON_ONCE. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 28269897c6cd668ff093da8a123099659376504b Author: Johannes Berg Date: Wed Apr 19 10:17:57 2017 +0200 iwlwifi: mvm: make iwl_mvm_update_mcc() easier to follow Some static checkers (e.g. smatch) complain about the logic, saying that resp_cp might be leaked. Clearly that isn't true, but making the logic easier to follow does not result in any significant code changes and makes the code more readable by moving the NULL check closer to its source. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 29 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit e9eb0fa247cc61858e2b61e7242f870b1bfb67c2 Author: Mordechai Goodstein Date: Thu Mar 30 14:43:15 2017 +0300 iwlwifi: mvm: change the firmware name loading The firmware moved the development from a0 MAC to z0. z0 is using the same RFID and device ID as a0 so we only need to switch the name. Signed-off-by: Mordechai Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcea37b2cf23f615252c424c217975f08da3c50d Author: Luca Coelho Date: Wed Apr 12 16:33:41 2017 +0300 iwlwifi: mvm: support D0I3_END_CMD at the start of resume New FW versions require the D0I3_END_CMD to be sent as the first command to the FW in the resume flow. If the TLV is set, send that command first, otherwise keep the original behavior (i.e. send last). Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) commit f28b9361247360b64e0c6cf0bdd72ff5b5815a33 Author: Luca Coelho Date: Wed Apr 12 12:42:12 2017 +0300 iwlwifi: mvm: make D0I3_END_CMD sync during system resume There is no need to send D0I3_END_CMD as ASYNC during the system resume flow. Additionally, the other flags used are meaningless in this case (they were just copied from the runtime resume flow), so remove them all. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2f0282db41194c0099a019b2761911d6c69cbdb9 Author: Johannes Berg Date: Thu Apr 20 10:29:03 2017 +0200 iwlwifi: mvm: track and report IBSS manager status to mac80211 Shaul reported that when iwlmvm was sending beacons, it didn't properly also take ownership of the probe responses. This is because the whole mac80211 callback (tx_last_beacon) wasn't implemented. Fix that to make IBSS discovery work better. Reported-by: Shaul Triebitz Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 +++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 +++ 3 files changed, 13 insertions(+) commit f3779f476b85701acc3d7ec0eb9b099c2060e7c9 Author: Johannes Berg Date: Thu Mar 9 11:22:54 2017 +0100 iwlwifi: use bitfield.h for some registers Letting the preprocessor/compiler generate the shift/mask by itself is a win for readability, so use bitfield.h for some registers. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 10 +++++----- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 17 +++++++++-------- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 14 +++++++------- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 6 ++---- 4 files changed, 23 insertions(+), 24 deletions(-) commit 40e86a3619a1e84ad73c716c943f65fc38eb1e28 Author: Johannes Berg Date: Wed Apr 19 09:58:50 2017 +0200 iwlwifi: mvm: use scnprintf() instead of snprintf() It's safer to use scnprintf() here because the buffer might be too short for the full format strings. In most cases this isn't true because of external limits on the values. In one case, this fixes a stack data leak. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit a9c50726ce3279646e2e22314b0917455a3c5e86 Author: Johannes Berg Date: Wed Apr 19 11:14:28 2017 +0200 iwlwifi: mvm: avoid variable shadowing Avoid one kind of symbol shadowing another in iwl_mvm_flush_sta() by renaming the function parameter. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit f8565f3329d62dab724b43db3f6ed60b608333fa Author: Johannes Berg Date: Wed Apr 19 10:29:06 2017 +0200 iwlwifi: pcie: fix TVQM queue ID range check The queue ID should never be 512 either, so correct the check to be >= instead of just >. Fixes: 310181ec34e2 ("iwlwifi: move to TVQM mode") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aeb8012cdfb5dded160295c92e6bfdb6ae5e8aa1 Author: Johannes Berg Date: Wed Apr 19 09:45:18 2017 +0200 iwlwifi: mvm: remove pointless num_stored condition Since we exit if buf->num_stored is 0, there's no need to check it again later. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f2f019495f637375b6d9dbbfa164b5b1e9d5583 Author: Emmanuel Grumbach Date: Thu Mar 30 23:08:03 2017 +0300 iwlwifi: mvm: avoid unnecessary cache trashing in Tx path When sending a Tx Command with a Tx packet, we allocate the Tx command separately from the payload of the packet. The WiFi MAC header is then copied into the buffer that was allocated for the Tx Command. This means that this buffer needs to be big enough to contain both. This is why it is allocated with iwl_trans_alloc_tx_cmd which returns a pointer to a newly allocated not zeroed struct iwl_device_cmd. The Tx command has a few bit fields and hence it needs to be zeroed, but all the rest of the buffer doesn't need to be zeroed since it will either be memcopy'ed with the MAC header, or not even sent to the device. This means that we don't need to zero all the iwl_device_cmd structure, but rather only the size of the iwl_tx_cmd structure. Since sizeof(iwl_tx_cmd) - sizeof(iwl_tx_cmd) is about 260 bytes, this can avoid touching 4 cache lines for each packet. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 85aeb58cec1a7a0395e14b45a7c6c1a9dad209fe Author: David Spinadel Date: Thu Mar 30 19:43:53 2017 +0300 iwlwifi: mvm: Enable security on new TX API Install GTKs on AP side for new TX API. Don't add IV space, it's added by the HW. While at that fix GCMP abnd GCMP-256 GTK installation which work similarly to the new TX API. Signed-off-by: David Spinadel Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 ++- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 108 ++++++++++++++-------- 2 files changed, 80 insertions(+), 40 deletions(-) commit f45f979dc208c96bb13a229381be2c1e4bf3afb3 Author: Liad Kaufman Date: Thu Mar 23 11:08:59 2017 +0200 iwlwifi: mvm: disable dbg data collect when fw isn't alive If FW isn't alive, trying to collect debug data will result in errors both in driver and in the collected data, so just warn and leave the collecting function in this case. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0ec971fdaddfcab72e5104e35774f489991f1f68 Author: Johannes Berg Date: Mon Apr 10 10:32:58 2017 +0200 iwlwifi: remove resp_pkt NULL checks Contrary to what some of the comments say, if rfkill was asserted the transport will return -ERFKILL instead of success, if CMD_WANT_SKB was set, so it's not necessary to check cmd.resp_pkt for being NULL if the return code was success. Validate that this is true in iwl_trans_send_cmd(). Most of the other code modifications were done with the following spatch: @@ struct iwl_host_cmd cmd; identifier pkt; @@ <... ( pkt = cmd.resp_pkt; ... -if (!pkt) { ... } | pkt = cmd.resp_pkt; ... -if (WARN_ON(!pkt)) { ... } | -if (!cmd.resp_pkt) { ... } ) ...> Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 12 ------------ drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 4 ---- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 3 --- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 5 ----- 5 files changed, 3 insertions(+), 24 deletions(-) commit 664e968be329352d2ed2566e43965a25421b1646 Author: Liad Kaufman Date: Wed Apr 5 10:35:18 2017 +0300 iwlwifi: mvm: remove txq EMPTYING_DELBA state for DQA In DQA mode, there is no need to wait for the TXQ to clear out after getting a DELBA, since traffic can continue running on the queue. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit feaf1283d11794b9d518fcfd54b6bf8bee1f0b4b Author: Steven Rostedt (VMware) Date: Thu Jun 22 17:04:55 2017 -0400 tracing: Show address when function names are not found Currently, when a function is not found in kallsyms, instead of simply showing the function address, it shows nothing at all: # echo ':mod:kvm_intel' > /sys/kernel/tracing/set_ftrace_filter # echo function > /sys/kernel/tracing/set_ftrace_filter # qemu -enable-kvm /home/my-qemu-image # rmmod kvm_intel # cat /sys/kernel/tracing/trace qemu-system-x86-2408 [001] d..2 135.013238: <-kvm_arch_hardware_enable qemu-system-x86-2408 [001] .... 135.014574: <-kvm_arch_vm_ioctl qemu-system-x86-2408 [001] .... 135.015420: <-kvm_vm_ioctl_check_extension qemu-system-x86-2408 [001] .... 135.045411: <-__do_cpuid_ent qemu-system-x86-2408 [001] .... 135.045412: <-__do_cpuid_ent qemu-system-x86-2408 [001] .... 135.045412: <-__do_cpuid_ent qemu-system-x86-2408 [001] .... 135.045412: <-__do_cpuid_ent qemu-system-x86-2408 [001] ...1 135.045413: <-__do_cpuid_ent qemu-system-x86-2408 [001] .... 135.045413: <-__do_cpuid_ent When it should show: qemu-system-x86-2408 [001] d..2 135.013238: 0xffffffffa02a39f0 <-kvm_arch_hardware_enable qemu-system-x86-2408 [001] .... 135.014574: 0xffffffffa02a2ba0 <-kvm_arch_vm_ioctl qemu-system-x86-2408 [001] .... 135.015420: 0xffffffffa029e4e0 <-kvm_vm_ioctl_check_extension qemu-system-x86-2408 [001] .... 135.045411: 0xffffffffa02a1380 <-__do_cpuid_ent qemu-system-x86-2408 [001] .... 135.045412: 0xffffffffa029e160 <-__do_cpuid_ent qemu-system-x86-2408 [001] .... 135.045412: 0xffffffffa029e180 <-__do_cpuid_ent qemu-system-x86-2408 [001] .... 135.045412: 0xffffffffa029e520 <-__do_cpuid_ent qemu-system-x86-2408 [001] ...1 135.045413: 0xffffffffa02a13b0 <-__do_cpuid_ent qemu-system-x86-2408 [001] .... 135.045413: 0xffffffffa02a1380 <-__do_cpuid_ent instead. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_output.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 99352afe8f169c95b294b6b9a8d0e18cd9e3c2a0 Author: Rafał Miłecki Date: Wed Jun 21 08:26:47 2017 +0200 mtd: extract TRX parser out of bcm47xxpart into a separated module This makes TRX parsing code reusable with other platforms and parsers. Please note this patch doesn't really change anything in the existing code, just moves it. There is still some place for improvement (e.g. working on non-hacky method of checking rootfs format) but it's not really a subject of this change. Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris drivers/mtd/Kconfig | 4 ++ drivers/mtd/Makefile | 1 + drivers/mtd/bcm47xxpart.c | 99 ++---------------------------- drivers/mtd/parsers/Kconfig | 8 +++ drivers/mtd/parsers/Makefile | 1 + drivers/mtd/parsers/parser_trx.c | 126 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 145 insertions(+), 94 deletions(-) commit 1a0915be192606fee64830b9c5d70b7ed59426b6 Author: Rafał Miłecki Date: Wed Jun 21 08:26:46 2017 +0200 mtd: partitions: add support for partition parsers Some devices have partitions that are kind of containers with extra subpartitions / volumes instead of e.g. a simple filesystem data. To support such cases we need to first create normal flash device partitions and then take care of these special ones. It's very common case for home routers. Depending on the vendor there are formats like TRX, Seama, TP-Link, WRGG & more. All of them are used to embed few partitions into a single one / single firmware file. Ideally all vendors would use some well documented / standardized format like UBI (and some probably start doing so), but there are still countless devices on the market using these poor vendor specific formats. This patch extends MTD subsystem by allowing to specify list of parsers that should be tried for a given partition. Supporting such poor formats is highly unlikely to be the top priority so these changes try to minimize maintenance cost to the minimum. It reuses existing code for these new parsers and just adds a one property and one new function. This implementation requires setting partition parsers in a flash parser. A proper change of bcm47xxpart will follow and in the future we will hopefully also find a solution for doing it with ofpart ("fixed-partitions"). Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 31 +++++++++++++++++++++++++++++++ include/linux/mtd/partitions.h | 7 +++++++ 2 files changed, 38 insertions(+) commit 97519dc52b44af054d7654776e78eaa211cf1842 Author: Rafał Miłecki Date: Wed Jun 21 08:26:45 2017 +0200 mtd: partitions: add support for subpartitions Some flash device partitions can be containers with extra subpartitions (volumes). All callbacks are already capable of this additional level of indirection. This patch makes sure we always display subpartitions using a tree structure and takes care of deleting subpartitions when parent gets removed. Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 0a9d72b69da6d8dae1abd7990c6c4c749846ef3e Author: Rafał Miłecki Date: Wed Jun 21 08:26:44 2017 +0200 mtd: partitions: rename "master" to the "parent" where appropriate This prepares mtd subsystem for the new feature: subpartitions. In some cases flash device partition can be a container with extra subpartitions (volumes). So far there was a flat structure implemented. One master (flash device) could be partitioned into few partitions. Every partition got its master and it was enough to get things running. To support subpartitions we need to store pointer to the parent for each partition. This is required to implement more natural tree structure and handle all recursion and offsets calculation. To make code consistent this patch renamed "master" to the "parent" in places where we can be dealing with subpartitions. Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 204 ++++++++++++++++++++++++++------------------------ 1 file changed, 105 insertions(+), 99 deletions(-) commit c5ceaba74083daf619bdb34d4871e297a177eebf Author: Rafał Miłecki Date: Wed Jun 21 08:26:43 2017 +0200 mtd: partitions: remove sysfs files when deleting all master's partitions When support for sysfs "offset" file was added it missed to update the del_mtd_partitions function. It deletes partitions just like mtd_del_partition does so both should also take care of removing sysfs files. This change moves sysfs_remove_files call to the shared function to fix this issue. Fixes: a62c24d755291 ("mtd: part: Add sysfs variable for offset of partition") Cc: Dan Ehrenberg Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08263a9ae664b24fa777d20b365601534842b236 Author: Rafał Miłecki Date: Wed Jun 21 08:26:42 2017 +0200 mtd: partitions: add helper for deleting partition There are two similar functions handling deletion. One handles single partition and another the whole MTD flash device. They share (duplicate) some code so it makes sense to add a small helper for that part. Function del_mtd_partitions has been moved a bit to keep all deleting stuff together. Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 75 +++++++++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 32 deletions(-) commit da8fa9cca5b760cb8e5ab16ce7e1941cfc3e04cc Author: Doug Berger Date: Wed Jun 21 16:20:14 2017 -0700 ata: ahci_brcm: Avoid writing to read-only registers This commit makes use of the AHCI_HFLAG_YES_ALPM flag to prevent the driver from writing to the read-only Host Capability register. It also sets the AHCI_HFLAG_NO_WRITE_TO_RO flag to prevent the AHCI library from writing to read-only registers. Signed-off-by: Doug Berger Signed-off-by: Tejun Heo drivers/ata/ahci_brcm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 7fab72f85d862572ed3281860dc550b7e737ac52 Author: Doug Berger Date: Wed Jun 21 16:20:13 2017 -0700 libata: Add the AHCI_HFLAG_NO_WRITE_TO_RO flag While most hardware will simply ignore a write to a read-only register, some hardware will signal an abort if this occurs. This commit introduces the flag AHCI_HFLAG_NO_WRITE_TO_RO to prevent the AHCI library from attempting to write to the HOST_CAP, HOST_CAP2, and HOST_PORTS_IMPL registers which may be read-only. Signed-off-by: Doug Berger Signed-off-by: Tejun Heo drivers/ata/ahci.h | 2 ++ drivers/ata/libahci.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit ef0da1bf767d9e557c6375c7066717eead54cb15 Author: Doug Berger Date: Wed Jun 21 16:20:12 2017 -0700 libata: Add the AHCI_HFLAG_YES_ALPM flag Some hardware is capable of supporting Aggresive Link Power Management even though it is not indicated by the Host Capability register. This commit adds the AHCI_HFLAG_YES_ALPM flag to the AHCI library to allow indication of this quirk when the Host Capability register is Read Only and therefore cannot be changed. Signed-off-by: Doug Berger Signed-off-by: Tejun Heo drivers/ata/ahci.h | 1 + drivers/ata/libahci.c | 5 +++++ 2 files changed, 6 insertions(+) commit 77b246b32b2c4bc21e352dcb8b53a8aba81ee5a4 Author: Tyler Baicar Date: Wed Jun 21 12:17:15 2017 -0600 acpi: apei: check for pending errors when probing GHES entries Check for pending errors when probing GHES entries. It is possible that a fatal error is already pending at this point, so we should handle it as soon as the driver is probed. This also avoids a potential issue if there was an interrupt that was already cleared for an error since the GHES driver wasn't present. Signed-off-by: Tyler Baicar Signed-off-by: Will Deacon drivers/acpi/apei/ghes.c | 3 +++ 1 file changed, 3 insertions(+) commit a57ce439505da3801e264656a3bdf746505c77ec Author: Masahiro Yamada Date: Wed Jun 21 18:23:11 2017 +0900 MAINTAINERS: add entry for Denali NAND controller driver The Denali NAND controller driver (drivers/mtd/nand/denali*) has been largely reworked by me. Add myself as its maintainer now. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit c0f7f7acdecdd7cf9a19c0af5c3dc649e1b934f7 Author: Hoan Tran Date: Thu Jun 22 19:26:05 2017 +0100 perf: xgene: Add support for SoC PMU version 3 This patch adds support for SoC-wide (AKA uncore) Performance Monitoring Unit version 3. It can support up to - 2 IOB PMU instances - 8 L3C PMU instances - 2 MCB PMU instances - 8 MCU PMU instances and these PMUs support 64 bit counter Signed-off-by: Hoan Tran [Mark: stop counters in _xgene_pmu_isr()] Signed-off-by: Mark Rutland [will: make xgene_pmu_v3_ops static] Signed-off-by: Will Deacon drivers/perf/xgene_pmu.c | 563 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 534 insertions(+), 29 deletions(-) commit e35e0a04a9965bcb4fffe4375baaecd408ad2357 Author: Hoan Tran Date: Thu Jun 22 19:26:04 2017 +0100 perf: xgene: Move PMU leaf functions into function pointer structure This patch moves PMU leaf functions into a function pointer structure. It helps code maintain and expasion easier. Signed-off-by: Hoan Tran [Mark: remove redundant cast] Signed-off-by: Mark Rutland [will: make xgene_pmu_ops static] Signed-off-by: Will Deacon drivers/perf/xgene_pmu.c | 83 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 18 deletions(-) commit a7adb70a73b7cb220f4515745d2671d2226e0097 Author: Tom Rini Date: Wed Jun 21 08:14:54 2017 -0400 dt-bindings: gpmc: Correct location of generic gpmc binding The binding bus/ti-gpmc.txt has been moved to memory-controllers/omap-gpmc.txt. Update all references to this in order to make reading and understanding a given binding easier. Cc: David Woodhouse Cc: Brian Norris Cc:Boris Brezillon Cc: Marek Vasut Cc: Richard Weinberger Cc: Cyrille Pitchen Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Tom Rini Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +- Documentation/devicetree/bindings/mtd/gpmc-nor.txt | 4 ++-- Documentation/devicetree/bindings/mtd/gpmc-onenand.txt | 2 +- Documentation/devicetree/bindings/net/gpmc-eth.txt | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit fe496e23b74852cbb2df7e0a6e26752131c41bb6 Author: Tom Rini Date: Wed Jun 21 08:22:06 2017 -0400 dt-bindings: mtd: elm: Correct compatible string requirement The binding says that the compatible string must be "ti,am33xx-elm" but the code checks only for, and all functioning users set, this as "ti,am3352-elm" so correct the binding. Cc: David Woodhouse Cc: Brian Norris Cc: Boris Brezillon Cc: Marek Vasut Cc: Richard Weinberger Cc: Cyrille Pitchen Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Tom Rini Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/elm.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd84aff1d981bc34ed3166f3071916ca9ceefadf Author: Jerome Brunet Date: Mon Jun 19 11:04:40 2017 +0200 ARM64: dts: meson-gxl: Add Libre Technology CC support Add support for the CC board from Shenzhen Libre Technology More information about the board are available here: https://libre.computer/blog/ Cc: Neil Armstrong Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 92 ++++++++++++++++++++++ 2 files changed, 93 insertions(+) commit cb1f2c086b5d62ab6d68821b3d0d1d1929250f2a Author: Jerome Brunet Date: Mon Jun 19 11:04:39 2017 +0200 dt-bindings: arm: amlogic: Add Libre Technology CC board Add bindings documentation for the CC board from Shenzhen Libre Technology Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 1 + 1 file changed, 1 insertion(+) commit 4ed38e43cfa94e26702396bf9d7230fb4934ddaf Author: Jerome Brunet Date: Mon Jun 19 11:04:38 2017 +0200 dt-bindings: add Libre Technology vendor prefix Shenzhen Libre Technology Co., Ltd is a single board computer manufacturer Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 838955e2a3c010aff9089fd705ae2cd5638cdee8 Author: Hoan Tran Date: Thu Jun 22 19:26:03 2017 +0100 perf: xgene: Parse PMU subnode from the match table This patch parses PMU Subnode from a match table. Signed-off-by: Hoan Tran Signed-off-by: Mark Rutland Signed-off-by: Will Deacon drivers/perf/xgene_pmu.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit 4b943faedfc29eda882851b772c06cecdf78d8e3 Author: Paolo Abeni Date: Thu Jun 22 15:01:22 2017 +0200 udp/v6: prefetch rmem_alloc in udp6_queue_rcv_skb() very similar to commit dd99e425be23 ("udp: prefetch rmem_alloc in udp_queue_rcv_skb()"), this allows saving a cache miss when the BH is bottle-neck for UDP over ipv6 packet processing, e.g. for small packets when a single RX NIC ingress queue is in use. Performances under flood when multiple NIC RX queues used are unaffected, but when a single NIC rx queue is in use, this gives ~8% performance improvement. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv6/udp.c | 1 + 1 file changed, 1 insertion(+) commit ea9fc3c5b299a95dacb0a85745c078ce7aa678ca Merge: 0c461e0 7d7627b Author: David S. Miller Date: Thu Jun 22 13:42:57 2017 -0400 Merge branch 'net-mvpp2-misc-improvements' Thomas Petazzoni says: ==================== net: mvpp2: misc improvements Here are a few patches making various small improvements/refactoring in the mvpp2 driver. They are based on today's net-next. ==================== Signed-off-by: David S. Miller commit 7d7627ba1cb4d1e364e7ba9c3f57947b411424e3 Author: Thomas Petazzoni Date: Thu Jun 22 14:23:20 2017 +0200 net: mvpp2: remove mvpp2_pool_refill() When all a function does is calling another function with the exact same arguments, in the exact same order, you know it's time to remove said function. Which is exactly what this commit does. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 8f3f6e5fd19fab5708d56601e360b92076b1eb82 Author: Thomas Petazzoni Date: Thu Jun 22 14:23:19 2017 +0200 net: mvpp2: remove unused mvpp2_bm_cookie_pool_set() function This function is not used in the driver, remove it. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 11 ----------- 1 file changed, 11 deletions(-) commit e0af22d9fd16d1cc2910a68d204e1767be2f8f14 Author: Thomas Petazzoni Date: Thu Jun 22 14:23:18 2017 +0200 net: mvpp2: add comments about smp_processor_id() usage A previous commit modified a number of smp_processor_id() used in migration-enabled contexts into get_cpu/put_cpu sections. However, a few smp_processor_id() calls remain in the driver, and this commit adds comments explaining why they can be kept. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit 0c461e050c618149ada385dca664fcd3f73055a7 Merge: 53fa1a6 8d78b69 Author: David S. Miller Date: Thu Jun 22 13:39:58 2017 -0400 Merge branch 'stmmac-pci-Refactor-DMI-probing' Jan Kiszka says: ==================== stmmac: pci: Refactor DMI probing Some cleanups of the way we probe DMI platforms in the driver. Reduces a bit of open-coding and makes the logic easier reusable for any potential DMI platform != Quark. Tested on IOT2000 and Galileo Gen2. Changes in v5: - fixed a remaining issue in patch 5 - dropped patch 6 for now ==================== Signed-off-by: David S. Miller commit 8d78b69091845386b6096f3adae98f28b9bf96ed Author: Jan Kiszka Date: Thu Jun 22 08:18:01 2017 +0200 stmmac: pci: Use dmi_system_id table for retrieving PHY addresses Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr. Signed-off-by: Jan Kiszka Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 97 ++++++++++++++++-------- 1 file changed, 64 insertions(+), 33 deletions(-) commit 7bc519b3ea04026877242328d2fe73cc8e6102bd Author: Jan Kiszka Date: Thu Jun 22 08:18:00 2017 +0200 stmmac: pci: Select quark_pci_dmi_data from quark_default_data No need to carry this reference in stmmac_pci_info - the Quark-specific setup handler knows that it needs to use the Quark-specific DMI table. This also allows to drop the stmmac_pci_info reference from the setup handler parameter list. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 83 +++++++++++------------- 1 file changed, 39 insertions(+), 44 deletions(-) commit c5f657e49c878756f21349f9e4b0f1c9631d5352 Author: Jan Kiszka Date: Thu Jun 22 08:17:59 2017 +0200 stmmac: pci: Make stmmac_pci_find_phy_addr truly generic Move the special case for the early Galileo firmware into quark_default_setup. This allows to use stmmac_pci_find_phy_addr for non-quark cases. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit b6a4c8f013ea2dd1ead7ee14b44712189a7bc6c6 Author: Jan Kiszka Date: Thu Jun 22 08:17:58 2017 +0200 stmmac: pci: Use stmmac_pci_info for all devices Make stmmac_default_data compatible with stmmac_pci_info.setup and use an info structure for all devices. This allows to make the probing more regular. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 36 +++++++++++++++--------- 1 file changed, 23 insertions(+), 13 deletions(-) commit c5d5287ef0f763e836bf94659b3a6080358373f1 Author: Jan Kiszka Date: Thu Jun 22 08:17:57 2017 +0200 stmmac: pci: Make stmmac_pci_info structure constant By removing the PCI device reference from the structure and passing it as parameters to the interested functions, we can make quark_pci_info const. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 27497e11b56a072dfd80e9f1f229049b2921a1a6 Author: Rob Herring Date: Fri Jun 2 12:43:18 2017 -0500 of: find_node_by_full_name rewrite to compare each level find_node_by_full_name() does the same thing as of_find_node_by_path(), but takes no locks and doesn't work on aliases. Refactor of_find_node_opts_by_path() into __of_find_node_by_full_path() and replace find_node_by_full_name() with it. Signed-off-by: Rob Herring drivers/of/base.c | 29 +++++++++++++++++++---------- drivers/of/of_private.h | 3 +++ drivers/of/resolver.c | 30 +++--------------------------- 3 files changed, 25 insertions(+), 37 deletions(-) commit 95e6b1fa3311c8a7b151d38540695409048d1495 Author: Rob Herring Date: Thu Jun 1 18:00:00 2017 -0500 of: use kbasename instead of open coding Several places in DT code open code the equivalent of kbasename. Replace them. The behavior for root nodes in node_name_cmp will be slightly different. Instead of comparing "/", "" will be compared. The comparison will be the same. Reviewed-by: Andy Shevchenko Signed-off-by: Rob Herring drivers/of/base.c | 5 +---- drivers/of/platform.c | 2 +- drivers/of/resolver.c | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) commit 53fa1a6f33520f01f9dbee48369074b34d77616b Author: Haiyang Zhang Date: Wed Jun 21 16:40:47 2017 -0700 hv_netvsc: Fix the carrier state error when data path is off When the VF NIC is opened, the synthetic NIC's carrier state is set to off. This tells the host to transitions data path to the VF device. But if startup script or user manipulates the admin state of the netvsc device directly for example: # ifconfig eth0 down # ifconfig eth0 up Then the carrier state of the synthetic NIC would be on, even though the data path was still over the VF NIC. This patch sets the carrier state of synthetic NIC with consideration of the related VF state. Signed-off-by: Haiyang Zhang Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 ++ drivers/net/hyperv/netvsc.c | 2 ++ drivers/net/hyperv/netvsc_drv.c | 8 +++++--- 3 files changed, 9 insertions(+), 3 deletions(-) commit dedb459e13f05824bc33d2d861e9b576bfc8d0bb Author: Haiyang Zhang Date: Wed Jun 21 16:40:46 2017 -0700 hv_netvsc: Remove unnecessary var link_state from struct netvsc_device_info We simply use rndis_device->link_state in the netdev_dbg. The variable, link_state from struct netvsc_device_info, is not used anywhere else. Signed-off-by: Haiyang Zhang Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 5 +++-- drivers/net/hyperv/rndis_filter.c | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) commit 621f48e40ee9b0100a802531069166d7d94796e0 Author: Tyler Baicar Date: Wed Jun 21 12:17:14 2017 -0600 arm/arm64: KVM: add guest SEA support Currently external aborts are unsupported by the guest abort handling. Add handling for SEAs so that the host kernel reports SEAs which occur in the guest kernel. When an SEA occurs in the guest kernel, the guest exits and is routed to kvm_handle_guest_abort(). Prior to this patch, a print message of an unsupported FSC would be printed and nothing else would happen. With this patch, the code gets routed to the APEI handling of SEAs in the host kernel to report the SEA information. Signed-off-by: Tyler Baicar Acked-by: Catalin Marinas Acked-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Will Deacon arch/arm/include/asm/kvm_arm.h | 10 ++++++++++ arch/arm/include/asm/system_misc.h | 5 +++++ arch/arm64/include/asm/kvm_arm.h | 10 ++++++++++ arch/arm64/include/asm/system_misc.h | 2 ++ arch/arm64/mm/fault.c | 22 ++++++++++++++++++++-- drivers/acpi/apei/ghes.c | 17 +++++++++++------ include/acpi/ghes.h | 2 +- virt/kvm/arm/mmu.c | 36 +++++++++++++++++++++++++++++++++--- 8 files changed, 92 insertions(+), 12 deletions(-) commit e9279e83ad1f4b5af541a522a81888f828210b40 Author: Tyler Baicar Date: Wed Jun 21 12:17:13 2017 -0600 trace, ras: add ARM processor error trace event Currently there are trace events for the various RAS errors with the exception of ARM processor type errors. Add a new trace event for such errors so that the user will know when they occur. These trace events are consistent with the ARM processor error section type defined in UEFI 2.6 spec section N.2.4.4. Signed-off-by: Tyler Baicar Acked-by: Steven Rostedt Reviewed-by: Xie XiuQi Signed-off-by: Will Deacon drivers/acpi/apei/ghes.c | 6 +++++- drivers/firmware/efi/cper.c | 1 + drivers/ras/ras.c | 6 ++++++ include/linux/ras.h | 3 +++ include/ras/ras_event.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) commit 297b64c74385fc7ea5dfff66105ab6465f2df49a Author: Tyler Baicar Date: Wed Jun 21 12:17:12 2017 -0600 ras: acpi / apei: generate trace event for unrecognized CPER section The UEFI spec includes non-standard section type support in the Common Platform Error Record. This is defined in section N.2.3 of UEFI version 2.5. Currently if the CPER section's type (UUID) does not match any section type that the kernel knows how to parse, a trace event is not generated. Generate a trace event which contains the raw error data for non-standard section type error records. Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang Tested-by: Shiju Jose Signed-off-by: Will Deacon drivers/acpi/apei/ghes.c | 18 ++++++++++++++++++ drivers/ras/ras.c | 10 +++++++++- include/linux/ras.h | 12 ++++++++++++ include/linux/uuid.h | 4 +++- include/ras/ras_event.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 87 insertions(+), 2 deletions(-) commit 0fc300f414519b10c146fc3329a1b3094e4b6d52 Author: Tyler Baicar Date: Wed Jun 21 12:17:11 2017 -0600 efi: print unrecognized CPER section UEFI spec allows for non-standard section in Common Platform Error Record. This is defined in section N.2.3 of UEFI version 2.5. Currently if the CPER section's type (UUID) does not match with one of the section types that the kernel knows how to parse, the section is skipped. Therefore, user is not able to see such CPER data, for instance, error record of non-standard section. This change prints out the raw data in hex in the dmesg buffer so that non-standard sections are reported to the user. Non-standard section type errors should be reported to the user because these can include errors which are vendor specific. The data length is taken from Error Data length field of Generic Error Data Entry. The following is a sample output from dmesg: Hardware error from APEI Generic Hardware Error Source: 2 It has been corrected by h/w and requires no further action event severity: corrected time: precise 2017-03-15 20:37:35 Error 0, type: corrected section type: unknown, d2e2621c-f936-468d-0d84-15a4ed015c8b section length: 0x238 00000000: 4d415201 4d492031 453a4d45 435f4343 .RAM1 IMEM:ECC_C 00000010: 53515f45 44525f42 00000000 00000000 E_QSB_RD........ 00000020: 00000000 00000000 00000000 00000000 ................ 00000030: 00000000 00000000 01010000 01010000 ................ 00000040: 00000000 00000000 00000005 00000000 ................ 00000050: 01010000 00000000 00000001 00dddd00 ................ ... The raw data from the error can then be decoded using vendor specific tools. Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang Reviewed-by: James Morse Signed-off-by: Will Deacon drivers/firmware/efi/cper.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2fb5853e4442334cb66fc2ab33a51c91d4434769 Author: Jonathan (Zhixiong) Zhang Date: Wed Jun 21 12:17:10 2017 -0600 acpi: apei: panic OS with fatal error status block Even if an error status block's severity is fatal, the kernel does not honor the severity level and panic. With the firmware first model, the platform could inform the OS about a fatal hardware error through the non-NMI GHES notification type. The OS should panic when a hardware error record is received with this severity. Call panic() after CPER data in error status block is printed if severity is fatal, before each error section is handled. Signed-off-by: Jonathan (Zhixiong) Zhang Signed-off-by: Tyler Baicar Reviewed-by: James Morse Signed-off-by: Will Deacon drivers/acpi/apei/ghes.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit 7edda0886bc3d1e5418951558a2555af1bc73b0a Author: Tyler Baicar Date: Wed Jun 21 12:17:09 2017 -0600 acpi: apei: handle SEA notification type for ARMv8 ARM APEI extension proposal added SEA (Synchronous External Abort) notification type for ARMv8. Add a new GHES error source handling function for SEA. If an error source's notification type is SEA, then this function can be registered into the SEA exception handler. That way GHES will parse and report SEA exceptions when they occur. An SEA can interrupt code that had interrupts masked and is treated as an NMI. To aid this the page of address space for mapping APEI buffers while in_nmi() is always reserved, and ghes_ioremap_pfn_nmi() is changed to use the helper methods to find the prot_t to map with in the same way as ghes_ioremap_pfn_irq(). Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang Reviewed-by: James Morse Acked-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/Kconfig | 2 ++ arch/arm64/mm/fault.c | 17 ++++++++++++ drivers/acpi/apei/Kconfig | 15 ++++++++++ drivers/acpi/apei/ghes.c | 70 +++++++++++++++++++++++++++++++++++++++++++---- include/acpi/ghes.h | 7 +++++ 5 files changed, 105 insertions(+), 6 deletions(-) commit 32015c235603a209697d1228667b1fb1cc8a8d06 Author: Tyler Baicar Date: Wed Jun 21 12:17:08 2017 -0600 arm64: exception: handle Synchronous External Abort SEA exceptions are often caused by an uncorrected hardware error, and are handled when data abort and instruction abort exception classes have specific values for their Fault Status Code. When SEA occurs, before killing the process, report the error in the kernel logs. Update fault_info[] with specific SEA faults so that the new SEA handler is used. Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang Reviewed-by: James Morse Acked-by: Catalin Marinas [will: use NULL instead of 0 when assigning si_addr] Signed-off-by: Will Deacon arch/arm64/include/asm/esr.h | 1 + arch/arm64/mm/fault.c | 45 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 10 deletions(-) commit 8ee8a0e795e7a41078aa8eceb1dac1656975b9a6 Author: Markus Mayer Date: Fri Jun 2 10:31:39 2017 -0700 dt-bindings: thermal: add file extension to brcm,ns-thermal Add the missing .txt extension to the Broadcom Northstar binding document. Signed-off-by: Markus Mayer Signed-off-by: Rob Herring .../devicetree/bindings/thermal/brcm,ns-thermal | 37 ---------------------- .../bindings/thermal/brcm,ns-thermal.txt | 37 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 37 deletions(-) commit d38338e396ee0571b3502962fd2fbaec4d2d9a8f Author: Stefan Traby Date: Tue Jun 20 15:30:42 2017 +0200 arm64: Remove a redundancy in sysreg.h This is really trivial; there is a dup (1 << 16) in the code Acked-by: Will Deacon Signed-off-by: Stefan Traby Signed-off-by: Marc Zyngier arch/arm64/include/asm/sysreg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 196f878a7ac2e727a1ded5197e552e6e2d3dfe2c Author: James Morse Date: Tue Jun 20 17:11:48 2017 +0100 KVM: arm/arm64: Signal SIGBUS when stage2 discovers hwpoison memory Once we enable ARCH_SUPPORTS_MEMORY_FAILURE on arm64, notifications for broken memory can call memory_failure() in mm/memory-failure.c to offline pages of memory, possibly signalling user space processes and notifying all the in-kernel users. memory_failure() has two modes, early and late. Early is used by machine-managers like Qemu to receive a notification when a memory error is notified to the host. These can then be relayed to the guest before the affected page is accessed. To enable this, the process must set PR_MCE_KILL_EARLY in PR_MCE_KILL_SET using the prctl() syscall. Once the early notification has been handled, nothing stops the machine-manager or guest from accessing the affected page. If the machine-manager does this the page will fail to be mapped and SIGBUS will be sent. This patch adds the equivalent path for when the guest accesses the page, sending SIGBUS to the machine-manager. These two signals can be distinguished by the machine-manager using their si_code: BUS_MCEERR_AO for 'action optional' early notifications, and BUS_MCEERR_AR for 'action required' synchronous/late notifications. Do as x86 does, and deliver the SIGBUS when we discover pfn == KVM_PFN_ERR_HWPOISON. Use the hugepage size as si_addr_lsb if this vma was allocated as a hugepage. Transparent hugepages will be split by memory_failure() before we see them here. Cc: Punit Agrawal Signed-off-by: James Morse Signed-off-by: Marc Zyngier virt/kvm/arm/mmu.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 6a6544e520abecd484ab8b67fb50d1fc003f3275 Author: Marc Zyngier Date: Tue Jun 20 22:17:44 2017 +0100 genirq/irqdomain: Remove auto-recursive hierarchy support It did seem like a good idea at the time, but it never really caught on, and auto-recursive domains remain unused 3 years after having been introduced. Oh well, time for a late spring cleanup. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner include/linux/irqdomain.h | 9 +++----- kernel/irq/irqdomain.c | 55 +++++++++++------------------------------------ kernel/irq/msi.c | 2 +- 3 files changed, 17 insertions(+), 49 deletions(-) commit 96f0d93a487e13233c95397aa3ecaf9cc8ff04bf Author: Marc Zyngier Date: Thu Jun 22 11:42:50 2017 +0100 irqchip/MSI: Use irq_domain_update_bus_token instead of an open coded access Now that we have irq_domain_update_bus_token(), switch everyone over to it. The debugfs code thanks you for your continued support. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner drivers/base/platform-msi.c | 2 +- drivers/irqchip/irq-armada-370-xp.c | 2 +- drivers/irqchip/irq-gic-v2m.c | 2 +- drivers/irqchip/irq-gic-v3-its.c | 2 +- drivers/irqchip/irq-mips-cpu.c | 2 +- drivers/irqchip/irq-mips-gic.c | 2 +- drivers/pci/msi.c | 2 +- drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 61d0a000b7746665c7cfcff766532f6f2a922a61 Author: Marc Zyngier Date: Thu Jun 22 11:34:57 2017 +0100 genirq/irqdomain: Add irq_domain_update_bus_token helper We can have irq domains that are identified by the same fwnode (because they are serviced by the same HW), and yet have different functionnality (because they serve different busses, for example). This is what we use the bus_token field. Since we don't use this field when generating the domain name, all the aliasing domains will get the same name, and the debugfs file creation fails. Also, bus_token is updated by individual drivers, and the core code is unaware of that update. In order to sort this mess, let's introduce a helper that takes care of updating bus_token, and regenerate the debugfs file. A separate patch will update all the individual users. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner include/linux/irqdomain.h | 3 +++ kernel/irq/irqdomain.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 46962d3ef2816e7bcc4dd30480ed3b802ae3b546 Author: SeongJae Park Date: Fri Jun 16 20:34:32 2017 +0900 doc/kokr/howto: Only send regression fixes after -rc1 This commit applies commit 388f9b20f98d ("Documentation/process/howto: Only send regression fixes after -rc1") to Korean translation. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Documentation/translations/ko_KR/howto.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 787e30750d60b4384d34e2dbe0ebe07e09adde15 Author: Steffen Maier Date: Wed Jun 14 12:24:12 2017 +0200 docs-rst: fix broken links to dynamic-debug-howto in kernel-parameters Another place in lib/Kconfig.debug was already fixed in commit f8998c226587 ("lib/Kconfig.debug: correct documentation paths"). Fixes: 9d85025b0418 ("docs-rst: create an user's manual book") Signed-off-by: Steffen Maier Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e34e20e0034323c917323116dee7c40a9a37f39b Author: Stewart Smith Date: Mon Jun 19 15:31:22 2017 +1000 doc: Document suitability of IBM Verse for kernel development IBM Verse is a web UI around Lotus Domino mail servers (much like the Lotus Notes client talks to Domino servers). For various reasons, it is not at all suitable for kernel development, all of which have been raised (repeatedly) internally. Signed-off-by: Stewart Smith Acked-by: Samuel Mendoza-Jonas Signed-off-by: Jonathan Corbet Documentation/process/email-clients.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 076fb0c4b6e1f6883477d1e4ee89464924e64737 Author: Frank Rowand Date: Thu Jun 22 09:15:39 2017 -0700 of: update ePAPR references to point to Devicetree Specification The Devicetree Specification has superseded the ePAPR as the base specification for bindings. Update files in Documentation to reference the new document. First reference to ePAPR in Documentation/devicetree/bindings/arm/cci.txt is generic, remove it. Some files are not updated because there is no hypervisor chapter in the Devicetree Specification: Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt Documenation/virtual/kvm/api.txt Documenation/virtual/kvm/ppc-pv.txt Signed-off-by: Frank Rowand Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/cci.txt | 15 ++++----------- Documentation/devicetree/bindings/arm/cpus.txt | 13 +++++++------ Documentation/devicetree/bindings/arm/idle-states.txt | 4 ++-- Documentation/devicetree/bindings/arm/l2c2x0.txt | 4 ++-- Documentation/devicetree/bindings/arm/topology.txt | 4 ++-- Documentation/devicetree/bindings/bus/simple-pm-bus.txt | 2 +- Documentation/devicetree/bindings/chosen.txt | 3 ++- Documentation/devicetree/bindings/common-properties.txt | 2 +- Documentation/devicetree/bindings/crypto/fsl-sec4.txt | 4 ++-- Documentation/devicetree/bindings/crypto/fsl-sec6.txt | 4 ++-- .../devicetree/bindings/interrupt-controller/open-pic.txt | 5 ++--- Documentation/devicetree/bindings/net/ethernet.txt | 9 ++++++--- Documentation/devicetree/bindings/powerpc/fsl/cpus.txt | 6 +++--- Documentation/devicetree/bindings/powerpc/fsl/l2cache.txt | 2 +- .../devicetree/bindings/powerpc/fsl/srio-rmu.txt | 4 ++-- Documentation/devicetree/bindings/powerpc/fsl/srio.txt | 3 ++- Documentation/devicetree/booting-without-of.txt | 2 +- Documentation/devicetree/usage-model.txt | 2 +- Documentation/xtensa/mmu.txt | 6 +++--- 19 files changed, 46 insertions(+), 48 deletions(-) commit 9a0ef98e186d86fb3c1ff3ec267a76f067005f74 Author: Christoph Hellwig Date: Tue Jun 20 01:37:55 2017 +0200 genirq/affinity: Assign vectors to all present CPUs Currently the irq vector spread algorithm is restricted to online CPUs, which ties the IRQ mapping to the currently online devices and doesn't deal nicely with the fact that CPUs could come and go rapidly due to e.g. power management. Instead assign vectors to all present CPUs to avoid this churn. Build a map of all possible CPUs for a given node, as the architectures only provide a map of all onlines CPUs. Do this dynamically on each call for the vector assingments, which is a bit suboptimal and could be optimized in the future by provinding a mapping from the arch code. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Sagi Grimberg Cc: Marc Zyngier Cc: Michael Ellerman Cc: linux-nvme@lists.infradead.org Cc: Keith Busch Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170603140403.27379-5-hch@lst.de kernel/irq/affinity.c | 76 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 63 insertions(+), 13 deletions(-) commit 3ca57222c36ba31b80aa25de313f3c8ab26a8102 Author: Thomas Gleixner Date: Tue Jun 20 01:37:54 2017 +0200 x86/apic: Mark single target interrupts If the interrupt destination mode of the APIC is physical then the effective affinity is restricted to a single CPU. Mark the interrupt accordingly in the domain allocation code, so the core code can avoid pointless affinity setting attempts. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235447.508846202@linutronix.de arch/x86/kernel/apic/vector.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8f31a9845db348f5781df47ce04c79e4cfe90016 Author: Thomas Gleixner Date: Tue Jun 20 01:37:53 2017 +0200 genirq/cpuhotplug: Avoid irq affinity setting for single targets Avoid trying to add a newly online CPU to the effective affinity mask of an started up interrupt. That interrupt will either stay on the already online CPU or move around for no value. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235447.431321047@linutronix.de kernel/irq/cpuhotplug.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d52dd44175bd27ad9d8e34a994fb80877c1f6d61 Author: Thomas Gleixner Date: Tue Jun 20 01:37:52 2017 +0200 genirq: Introduce IRQD_SINGLE_TARGET flag Many interrupt chips allow only a single CPU as interrupt target. The core code has no knowledge about that. That's unfortunate as it could avoid trying to readd a newly online CPU to the effective affinity mask. Add the status flag and the necessary accessors. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235447.352343969@linutronix.de include/linux/irq.h | 16 ++++++++++++++++ kernel/irq/debugfs.c | 1 + 2 files changed, 17 insertions(+) commit c5cb83bb337c25caae995d992d1cdf9b317f83de Author: Thomas Gleixner Date: Tue Jun 20 01:37:51 2017 +0200 genirq/cpuhotplug: Handle managed IRQs on CPU hotplug If a CPU goes offline, interrupts affine to the CPU are moved away. If the outgoing CPU is the last CPU in the affinity mask the migration code breaks the affinity and sets it it all online cpus. This is a problem for affinity managed interrupts as CPU hotplug is often used for power management purposes. If the affinity is broken, the interrupt is not longer affine to the CPUs to which it was allocated. The affinity spreading allows to lay out multi queue devices in a way that they are assigned to a single CPU or a group of CPUs. If the last CPU goes offline, then the queue is not longer used, so the interrupt can be shutdown gracefully and parked until one of the assigned CPUs comes online again. Add a graceful shutdown mechanism into the irq affinity breaking code path, mark the irq as MANAGED_SHUTDOWN and leave the affinity mask unmodified. In the online path, scan the active interrupts for managed interrupts and if the interrupt is functional and the newly online CPU is part of the affinity mask, restart the interrupt if it is marked MANAGED_SHUTDOWN or if the interrupts is started up, try to add the CPU back to the effective affinity mask. Originally-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170619235447.273417334@linutronix.de include/linux/cpuhotplug.h | 1 + include/linux/irq.h | 5 +++++ kernel/cpu.c | 5 +++++ kernel/irq/cpuhotplug.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+) commit 761ea388e8c4e3ac883a94e16bcc8c51fa419d4f Author: Thomas Gleixner Date: Tue Jun 20 01:37:50 2017 +0200 genirq: Handle managed irqs gracefully in irq_startup() Affinity managed interrupts should keep their assigned affinity accross CPU hotplug. To avoid magic hackery in device drivers, the core code shall manage them transparently and set these interrupts into a managed shutdown state when the last CPU of the assigned affinity mask goes offline. The interrupt will be restarted when one of the CPUs in the assigned affinity mask comes back online. Add the necessary logic to irq_startup(). If an interrupt is requested and started up, the code checks whether it is affinity managed and if so, it checks whether a CPU in the interrupts affinity mask is online. If not, it puts the interrupt into managed shutdown state. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235447.189851170@linutronix.de include/linux/irq.h | 2 +- kernel/irq/chip.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 4 deletions(-) commit 4cde9c6b826834b861a2b58653ab33150f562064 Author: Thomas Gleixner Date: Tue Jun 20 01:37:49 2017 +0200 genirq: Add force argument to irq_startup() In order to handle managed interrupts gracefully on irq_startup() so they won't lose their assigned affinity, it's necessary to allow startups which keep the interrupts in managed shutdown state, if none of the assigend CPUs is online. This allows drivers to request interrupts w/o the CPUs being online, which avoid online/offline churn in drivers. Add a force argument which can override that decision and let only request_irq() and enable_irq() allow the managed shutdown handling. enable_irq() is required, because the interrupt might be requested with IRQF_NOAUTOEN and enable_irq() invokes irq_startup() which would then wreckage the assignment again. All other callers force startup and potentially break the assigned affinity. No functional change as this only adds the function argument. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235447.112094565@linutronix.de kernel/irq/autoprobe.c | 4 ++-- kernel/irq/chip.c | 4 ++-- kernel/irq/internals.h | 9 ++++++++- kernel/irq/manage.c | 4 ++-- 4 files changed, 14 insertions(+), 7 deletions(-) commit 708d174b6c32bffc5d73793bc7a267bcafeb6558 Author: Thomas Gleixner Date: Tue Jun 20 01:37:48 2017 +0200 genirq: Split out irq_startup() code Split out the inner workings of irq_startup() so it can be reused to handle managed interrupts gracefully. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235447.033235144@linutronix.de kernel/irq/chip.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 54fdf6a0875ca380647ac1cc9b5b8f2dbbbfa131 Author: Thomas Gleixner Date: Tue Jun 20 01:37:47 2017 +0200 genirq: Introduce IRQD_MANAGED_SHUTDOWN Affinity managed interrupts should keep their assigned affinity accross CPU hotplug. To avoid magic hackery in device drivers, the core code shall manage them transparently. This will set these interrupts into a managed shutdown state when the last CPU of the assigned affinity mask goes offline. The interrupt will be restarted when one of the CPUs in the assigned affinity mask comes back online. Introduce the necessary state flag and the accessor functions. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.954523476@linutronix.de include/linux/irq.h | 8 ++++++++ kernel/irq/internals.h | 10 ++++++++++ 2 files changed, 18 insertions(+) commit c7d6c9dd871f42c4e0ce5563d2f684e78ea673cf Author: Thomas Gleixner Date: Tue Jun 20 01:37:46 2017 +0200 x86/apic: Implement effective irq mask update Add the effective irq mask update to the apic implementations and enable effective irq masks for x86. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.878370703@linutronix.de arch/x86/Kconfig | 1 + arch/x86/kernel/apic/apic.c | 3 +++ arch/x86/kernel/apic/x2apic_cluster.c | 4 ++++ 3 files changed, 8 insertions(+) commit ef1c2cc88531a967fa97d1ac1f3f8a64ee6910b4 Author: Thomas Gleixner Date: Tue Jun 20 01:37:45 2017 +0200 xen/events: Add support for effective affinity mask Update the effective affinity mask when an interrupt was successfully targeted to a CPU. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.799944725@linutronix.de drivers/xen/events/events_base.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0e24f7c9f67e218546ad44160d2a12d9d8be0171 Author: Thomas Gleixner Date: Tue Jun 20 01:37:44 2017 +0200 x86/apic: Add irq_data argument to apic->cpu_mask_to_apicid() The decision to which CPUs an interrupt is effectively routed happens in the various apic->cpu_mask_to_apicid() implementations To support effective affinity masks this information needs to be updated in irq_data. Add a pointer to irq_data to the callbacks and feed it through the call chain. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.720739075@linutronix.de arch/x86/include/asm/apic.h | 5 +++++ arch/x86/kernel/apic/apic.c | 9 +++++++-- arch/x86/kernel/apic/vector.c | 25 +++++++++++++++---------- arch/x86/kernel/apic/x2apic_cluster.c | 3 ++- arch/x86/kernel/apic/x2apic_uv_x.c | 5 +++-- 5 files changed, 32 insertions(+), 15 deletions(-) commit 91cd9cb7ee1c081304d0e61f09e9faccb33d3df7 Author: Thomas Gleixner Date: Tue Jun 20 01:37:43 2017 +0200 x86/apic: Move cpumask and to core code All implementations of apic->cpu_mask_to_apicid_and() and the two incoming cpumasks to search for the target. Move that operation to the call site and rename it to cpu_mask_to_apicid() Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.641575516@linutronix.de arch/x86/include/asm/apic.h | 15 ++++++--------- arch/x86/kernel/apic/apic.c | 14 ++++---------- arch/x86/kernel/apic/apic_flat_64.c | 4 ++-- arch/x86/kernel/apic/apic_noop.c | 2 +- arch/x86/kernel/apic/apic_numachip.c | 4 ++-- arch/x86/kernel/apic/bigsmp_32.c | 2 +- arch/x86/kernel/apic/probe_32.c | 2 +- arch/x86/kernel/apic/vector.c | 6 +++--- arch/x86/kernel/apic/x2apic_cluster.c | 10 ++++------ arch/x86/kernel/apic/x2apic_phys.c | 2 +- arch/x86/kernel/apic/x2apic_uv_x.c | 8 +++----- arch/x86/xen/apic.c | 2 +- 12 files changed, 29 insertions(+), 42 deletions(-) commit 52b166af40faec9813cd5ac26d6ba9adec2e3a9d Author: Thomas Gleixner Date: Tue Jun 20 01:37:42 2017 +0200 x86/apic: Move online masking to core code All implementations of apic->cpu_mask_to_apicid_and() mask out the offline cpus. The callsite already has a mask available, which has the offline CPUs removed. Use that and remove the extra bits. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.560868224@linutronix.de arch/x86/kernel/apic/apic.c | 27 +++++++++------------------ arch/x86/kernel/apic/vector.c | 5 ++++- arch/x86/kernel/apic/x2apic_cluster.c | 25 +++++++++---------------- 3 files changed, 22 insertions(+), 35 deletions(-) commit bbcf9574bc6fb85d22f2718d48da7f98830a7870 Author: Thomas Gleixner Date: Tue Jun 20 01:37:41 2017 +0200 x86/uv: Use default_cpu_mask_to_apicid_and() Same functionality except the extra bits ored on the apicid. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.482841015@linutronix.de arch/x86/kernel/apic/x2apic_uv_x.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit ad95212ee6e0b62f38b287b40c9ab6a1ba3e892b Author: Thomas Gleixner Date: Tue Jun 20 01:37:40 2017 +0200 x86/apic: Move flat_cpu_mask_to_apicid_and() into C source No point in having inlines assigned to function pointers at multiple places. Just bloats the text. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.405975721@linutronix.de arch/x86/include/asm/apic.h | 28 ++++++---------------------- arch/x86/kernel/apic/apic.c | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) commit 415fcf1a2293046e0c1f4ab8558a87bad66652b1 Author: Thomas Gleixner Date: Tue Jun 20 01:37:39 2017 +0200 genirq/cpuhotplug: Use effective affinity mask If the architecture supports the effective affinity mask, migrating interrupts away which are not targeted by the effective mask is pointless. They can stay in the user or system supplied affinity mask, but won't be targetted at any given point as the affinity setter functions need to validate against the online cpu mask anyway. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.328488490@linutronix.de kernel/irq/cpuhotplug.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 0d3f54257dc300f2db480d6a46b34bdb87f18c1b Author: Thomas Gleixner Date: Tue Jun 20 01:37:38 2017 +0200 genirq: Introduce effective affinity mask There is currently no way to evaluate the effective affinity mask of a given interrupt. Many irq chips allow only a single target CPU or a subset of CPUs in the affinity mask. Updating the mask at the time of setting the affinity to the subset would be counterproductive because information for cpu hotplug about assigned interrupt affinities gets lost. On CPU hotplug it's also pointless to force migrate an interrupt, which is not targeted at the CPU effectively. But currently the information is not available. Provide a seperate mask to be updated by the irq_chip->irq_set_affinity() implementations. Implement the read only proc files so the user can see the effective mask as well w/o trying to deduce it from /proc/interrupts. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.247834245@linutronix.de include/linux/irq.h | 29 +++++++++++++++++ kernel/irq/Kconfig | 4 +++ kernel/irq/debugfs.c | 4 +++ kernel/irq/irqdesc.c | 14 ++++++++ kernel/irq/proc.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++---- 5 files changed, 134 insertions(+), 7 deletions(-) commit c1a80386965e9fa3c2f8d1d57966216fe02c9124 Author: Thomas Gleixner Date: Tue Jun 20 01:37:37 2017 +0200 genirq/proc: Replace ever repeating type cast The proc file setup repeats the same ugly type cast for the irq number over and over. Do it once and hand in the local void pointer. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.160866358@linutronix.de kernel/irq/proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4ab764c336123157690ee0000a1dcf81851c58d1 Author: Thomas Gleixner Date: Tue Jun 20 01:37:36 2017 +0200 genirq: Remove pointless gfp argument All callers hand in GPF_KERNEL. No point to have an extra argument for that. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.082544752@linutronix.de kernel/irq/irqdesc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 047dc6331de58da51818582c0db0dbfcb837e614 Author: Thomas Gleixner Date: Tue Jun 20 01:37:35 2017 +0200 genirq: Remove pointless arg from show_irq_affinity The third argument of the internal helper function is unused. Remove it. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.004958600@linutronix.de kernel/irq/proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 36d84fb45140f151fa4e145381dbce5e5ffed24d Author: Thomas Gleixner Date: Tue Jun 20 01:37:34 2017 +0200 genirq: Move irq_fixup_move_pending() to core Now that x86 uses the generic code, the function declaration and inline stub can move to the core internal header. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.928156166@linutronix.de include/linux/irq.h | 5 ----- kernel/irq/internals.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) commit ad7a929fa4bb1143357aa83043a149d5c27c68fd Author: Thomas Gleixner Date: Tue Jun 20 01:37:33 2017 +0200 x86/irq: Use irq_migrate_all_off_this_cpu() The generic migration code supports all the required features already. Remove the x86 specific implementation and use the generic one. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.851311033@linutronix.de arch/x86/Kconfig | 1 + arch/x86/kernel/irq.c | 89 ++------------------------------------------------- 2 files changed, 3 insertions(+), 87 deletions(-) commit 654abd0a7baf144998147787121da0f9422dafc8 Author: Thomas Gleixner Date: Tue Jun 20 01:37:32 2017 +0200 x86/irq: Restructure fixup_irqs() Reorder fixup_irqs() so it matches the flow in the generic migration code. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.774272454@linutronix.de arch/x86/kernel/irq.c | 46 ++++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) commit 77f85e66aa8be563ae5804eebf74a78ec6ef5555 Author: Thomas Gleixner Date: Tue Jun 20 01:37:31 2017 +0200 genirq/cpuhotplug: Set force affinity flag on hotplug migration Set the force migration flag when migrating interrupts away from an outgoing CPU. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.681874648@linutronix.de kernel/irq/cpuhotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47a06d3a783217acae02976f15ca07ddc1ac024f Author: Thomas Gleixner Date: Tue Jun 20 01:37:30 2017 +0200 genirq/cpuhotplug: Add support for conditional masking Interrupts which cannot be migrated in process context, need to be masked before the affinity is changed forcefully. Add support for that. Will be compiled out for architectures which do not have this x86 specific issue. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.604565591@linutronix.de kernel/irq/cpuhotplug.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit f0383c24b4855f6a4b5a358c7b2d2c16e0437e9b Author: Thomas Gleixner Date: Tue Jun 20 01:37:29 2017 +0200 genirq/cpuhotplug: Add support for cleaning up move in progress In order to move x86 to the generic hotplug migration code, add support for cleaning up move in progress bits. On architectures which have this x86 specific (mis)feature not enabled, this is optimized out by the compiler. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.525817311@linutronix.de arch/x86/include/asm/irq.h | 1 - include/linux/irq.h | 2 ++ kernel/irq/cpuhotplug.c | 28 ++++++++++++++++++++++++++-- kernel/irq/internals.h | 10 +++++++++- 4 files changed, 37 insertions(+), 4 deletions(-) commit 91f26cb4cd3c22bd656ab46c49329aacaaab5504 Author: Thomas Gleixner Date: Tue Jun 20 01:37:28 2017 +0200 genirq/cpuhotplug: Do not migrated shutdown irqs Interrupts, which are shut down are tried to be migrated as well. That's pointless because the interrupt cannot fire and the next startup will move it to the proper place anyway. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.447550992@linutronix.de kernel/irq/cpuhotplug.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit e8a7035039306c90bcc99129ffc18e0be052bbb9 Author: Thomas Gleixner Date: Tue Jun 20 01:37:27 2017 +0200 genirq/cpuhotplug: Reorder check logic Move the checks for a valid irq chip and the irq_set_affinity() callback right in front of the whole migration logic. No point in doing a gazillion of other things when the interrupt cannot be migrated at all. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.354181630@linutronix.de kernel/irq/cpuhotplug.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 735c09524d3e7c92315e8e2699a1b9acb4fb415c Author: Thomas Gleixner Date: Tue Jun 20 01:37:26 2017 +0200 genirq/cpuhotplug: Dont claim success on error In case the affinity of an interrupt was broken, a printk is emitted. But if the affinity cannot be set at all due to a missing irq_set_affinity() callback or due to a failing callback, the message is still printed preceeded by a warning/error. That makes no sense whatsoever. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.274852976@linutronix.de kernel/irq/cpuhotplug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0dd945ff4647a1f29c6ae8f4f9a69c8f37c994cf Author: Thomas Gleixner Date: Tue Jun 20 01:37:25 2017 +0200 genirq/cpuhotplug: Remove irq disabling logic This is called from stop_machine() with interrupts disabled. No point in disabling them some more. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.198042748@linutronix.de kernel/irq/cpuhotplug.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 137221df69c6f8a7002f82dc3d95052d34f5667e Author: Christoph Hellwig Date: Tue Jun 20 01:37:24 2017 +0200 genirq: Move pending helpers to internal.h So that the affinity code can reuse them. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170619235445.109426284@linutronix.de kernel/irq/internals.h | 38 ++++++++++++++++++++++++++++++++++++++ kernel/irq/manage.c | 28 ---------------------------- 2 files changed, 38 insertions(+), 28 deletions(-) commit 2e051552df69af6d134c2592d0d6f1ac80f01190 Author: Thomas Gleixner Date: Tue Jun 20 01:37:23 2017 +0200 genirq: Move initial affinity setup to irq_startup() The startup vs. setaffinity ordering of interrupts depends on the IRQF_NOAUTOEN flag. Chained interrupts are not getting any affinity assignment at all. A regular interrupt is started up and then the affinity is set. A IRQF_NOAUTOEN marked interrupt is not started up, but the affinity is set nevertheless. Move the affinity setup to startup_irq() so the ordering is always the same and chained interrupts get the proper default affinity assigned as well. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235445.020534783@linutronix.de kernel/irq/chip.c | 2 ++ kernel/irq/manage.c | 15 ++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) commit 43564bd97d0e6182bbd43b51b33254c728832551 Author: Thomas Gleixner Date: Tue Jun 20 01:37:22 2017 +0200 genirq: Rename setup_affinity() to irq_setup_affinity() Rename it with a proper irq_ prefix and make it available for other files in the core code. Preparatory patch for moving the irq affinity setup around. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.928501004@linutronix.de kernel/irq/internals.h | 6 ++++++ kernel/irq/manage.c | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) commit cba4235e6031e9318d68186f6d765c531cbea4e1 Author: Thomas Gleixner Date: Tue Jun 20 01:37:21 2017 +0200 genirq: Remove mask argument from setup_affinity() No point to have this alloc/free dance of cpumasks. Provide a static mask for setup_affinity() and protect it proper. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.851571573@linutronix.de kernel/irq/internals.h | 2 +- kernel/irq/manage.c | 53 ++++++++++++++++++++++---------------------------- kernel/irq/proc.c | 8 +++++--- 3 files changed, 29 insertions(+), 34 deletions(-) commit 8e7b632237df8b17526411d1d98f838580bb6aa3 Author: Thomas Gleixner Date: Tue Jun 20 01:37:20 2017 +0200 x86/irq: Cleanup pending irq move in fixup_irqs() If an CPU goes offline, the interrupts are migrated away, but a eventually pending interrupt move, which has not yet been made effective is kept pending even if the outgoing CPU is the sole target of the pending affinity mask. What's worse is, that the pending affinity mask is discarded even if it would contain a valid subset of the online CPUs. Use the newly introduced helper to: - Discard a pending move when the outgoing CPU is the only target in the pending mask. - Use the pending mask instead of the affinity mask to find a valid target for the CPU if the pending mask intersects with the online CPUs. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.774068557@linutronix.de arch/x86/kernel/irq.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit cdd16365b0bd7c0cd19e2cc768b6bdc8021f32c3 Author: Thomas Gleixner Date: Tue Jun 20 01:37:19 2017 +0200 genirq: Provide irq_fixup_move_pending() If an CPU goes offline, the interrupts are migrated away, but a eventually pending interrupt move, which has not yet been made effective is kept pending even if the outgoing CPU is the sole target of the pending affinity mask. What's worse is, that the pending affinity mask is discarded even if it would contain a valid subset of the online CPUs. Implement a helper function which allows to avoid these issues. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.691345468@linutronix.de include/linux/irq.h | 5 +++++ kernel/irq/migration.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit 1bb0401680da156ce1549e915e711bf5b2534cc5 Author: Thomas Gleixner Date: Tue Jun 20 01:37:18 2017 +0200 genirq: Add missing comment for IRQD_STARTED Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Jens Axboe Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.614913014@linutronix.de include/linux/irq.h | 1 + 1 file changed, 1 insertion(+) commit 087cdfb662ae50e3826e7cd2e54b6519d07b60f0 Author: Thomas Gleixner Date: Tue Jun 20 01:37:17 2017 +0200 genirq/debugfs: Add proper debugfs interface Debugging (hierarchical) interupt domains is tedious as there is no information about the hierarchy and no information about states of interrupts in the various domain levels. Add a debugfs directory 'irq' and subdirectories 'domains' and 'irqs'. The domains directory contains the domain files. The content is information about the domain. If the domain is part of a hierarchy then the parent domains are printed as well. # ls /sys/kernel/debug/irq/domains/ default INTEL-IR-2 INTEL-IR-MSI-2 IO-APIC-IR-2 PCI-MSI DMAR-MSI INTEL-IR-3 INTEL-IR-MSI-3 IO-APIC-IR-3 unknown-1 INTEL-IR-0 INTEL-IR-MSI-0 IO-APIC-IR-0 IO-APIC-IR-4 VECTOR INTEL-IR-1 INTEL-IR-MSI-1 IO-APIC-IR-1 PCI-HT # cat /sys/kernel/debug/irq/domains/VECTOR name: VECTOR size: 0 mapped: 216 flags: 0x00000041 # cat /sys/kernel/debug/irq/domains/IO-APIC-IR-0 name: IO-APIC-IR-0 size: 24 mapped: 19 flags: 0x00000041 parent: INTEL-IR-3 name: INTEL-IR-3 size: 65536 mapped: 167 flags: 0x00000041 parent: VECTOR name: VECTOR size: 0 mapped: 216 flags: 0x00000041 Unfortunately there is no per cpu information about the VECTOR domain (yet). The irqs directory contains detailed information about mapped interrupts. # cat /sys/kernel/debug/irq/irqs/3 handler: handle_edge_irq status: 0x00004000 istate: 0x00000000 ddepth: 1 wdepth: 0 dstate: 0x01018000 IRQD_IRQ_DISABLED IRQD_SINGLE_TARGET IRQD_MOVE_PCNTXT node: 0 affinity: 0-143 effectiv: 0 pending: domain: IO-APIC-IR-0 hwirq: 0x3 chip: IR-IO-APIC flags: 0x10 IRQCHIP_SKIP_SET_WAKE parent: domain: INTEL-IR-3 hwirq: 0x20000 chip: INTEL-IR flags: 0x0 parent: domain: VECTOR hwirq: 0x3 chip: APIC flags: 0x0 This was developed to simplify the debugging of the managed affinity changes. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: Jens Axboe Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.537566163@linutronix.de Signed-off-by: Thomas Gleixner include/linux/irqdesc.h | 4 + include/linux/irqdomain.h | 4 + kernel/irq/Kconfig | 11 +++ kernel/irq/Makefile | 1 + kernel/irq/debugfs.c | 215 ++++++++++++++++++++++++++++++++++++++++++++++ kernel/irq/internals.h | 22 +++++ kernel/irq/irqdesc.c | 1 + kernel/irq/irqdomain.c | 87 ++++++++++++++++++- kernel/irq/manage.c | 1 + 9 files changed, 345 insertions(+), 1 deletion(-) commit 9dc6be3d419398eae9a19cd09b7969ceff8eaf10 Author: Thomas Gleixner Date: Tue Jun 20 01:37:16 2017 +0200 genirq/irqdomain: Add map counter Add a map counter instead of counting radix tree entries for diagnosis. That also gives correct information for linear domains. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: Jens Axboe Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.459397746@linutronix.de include/linux/irqdomain.h | 2 ++ kernel/irq/irqdomain.c | 4 ++++ 2 files changed, 6 insertions(+) commit ae904cafd59d7120ef2afb97b252eadeba45e95f Author: Thomas Gleixner Date: Tue Jun 20 01:37:15 2017 +0200 PCI/vmd: Create named irq domain Use the fwnode to create a named domain so diagnosis works. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: linux-pci@vger.kernel.org Cc: Bjorn Helgaas Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.379861978@linutronix.de drivers/pci/host/vmd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f8f37ca78915b51a73bf240409fcda30d811b76b Author: Thomas Gleixner Date: Tue Jun 20 01:37:14 2017 +0200 x86/msi: Create named irq domains Use the fwnode to create named irq domains so diagnosis works. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.299024560@linutronix.de arch/x86/kernel/apic/msi.c | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) commit 0323b9690448e1d1ada91dac9d8fa62f7285751a Author: Thomas Gleixner Date: Tue Jun 20 01:37:13 2017 +0200 x86/msi: Remove unused remap irq domain interface Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.221049665@linutronix.de arch/x86/include/asm/irq_remapping.h | 1 - arch/x86/kernel/apic/msi.c | 6 ------ 2 files changed, 7 deletions(-) commit 3e49a8182277ea57736285aede5f43bfa6aa11b1 Author: Thomas Gleixner Date: Tue Jun 20 01:37:12 2017 +0200 iommu/amd: Use named irq domain interface Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.142270582@linutronix.de drivers/iommu/amd_iommu.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit cea29b656a5e5f1a7b7de42795c3ae6fc417ab0b Author: Thomas Gleixner Date: Tue Jun 20 01:37:11 2017 +0200 iommu/vt-d: Use named irq domain interface Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235444.063083997@linutronix.de drivers/iommu/intel_irq_remapping.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 667724c5a3109675cf3bfe7d75795b8608d1bcbe Author: Thomas Gleixner Date: Tue Jun 20 01:37:10 2017 +0200 x86/msi: Provide new iommu irqdomain interface Provide a new interface for creating the iommu remapping domains, so that the caller can supply a name and a id in order to create named irqdomains. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Joerg Roedel Cc: Keith Busch Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.986661206@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/irq_remapping.h | 2 ++ arch/x86/kernel/apic/msi.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) commit f8409a6a4bf86e2d90ec8460df2874e4e19ebb27 Author: Thomas Gleixner Date: Tue Jun 20 01:37:09 2017 +0200 x86/uv: Create named irq domain Use the fwnode to create a named domain so diagnosis works. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.907511074@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/platform/uv/uv_irq.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 5f432711ba94400fb39e9be81913ced81c141758 Author: Thomas Gleixner Date: Tue Jun 20 01:37:08 2017 +0200 x86/htirq: Create named domain Use the fwnode to create a named domain so diagnosis works. Mark the init function __init while at it. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.829047007@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/htirq.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 1b604745c8474c76e5fd1682ea5b7da0a1c6d440 Author: Thomas Gleixner Date: Tue Jun 20 01:37:07 2017 +0200 x86/ioapic: Create named irq domain Use the fwnode to create a named domain so diagnosis works, but only when the the ioapic is not device tree based. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.752782603@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/io_apic.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 9d35f859590efa48be51b8ccded6550e0440e2c7 Author: Thomas Gleixner Date: Tue Jun 20 01:37:06 2017 +0200 x86/vector: Create named irq domain Use the fwnode to create a named domain so diagnosis works. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.673635238@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit d59f6617eef0f76e34f7a9993f5645c5ef467e42 Author: Thomas Gleixner Date: Tue Jun 20 01:37:05 2017 +0200 genirq: Allow fwnode to carry name information only In order to provide proper debug interface it's required to have domain names available when the domain is added. Non fwnode based architectures like x86 have no way to do so. It's not possible to use domain ops or host data for this as domain ops might be the same for several instances, but the names have to be unique. Extend the irqchip fwnode to allow transporting the domain name. If no node is supplied, create a 'unknown-N' placeholder. Warn if an invalid node is supplied and treat it like no node. This happens e.g. with i2 devices on x86 which hand in an ACPI type node which has no interface for retrieving the name. [ Folded a fix from Marc to make DT name parsing work ] Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: Jens Axboe Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.588784933@linutronix.de include/linux/irqdomain.h | 31 +++++++++++++- kernel/irq/irqdomain.c | 105 ++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 122 insertions(+), 14 deletions(-) commit 0165308a2f994939d2e1b36624f5a8f57746bc88 Author: Thomas Gleixner Date: Tue Jun 20 01:37:04 2017 +0200 genirq/msi: Prevent overwriting domain name Prevent overwriting an already assigned domain name. Remove the extra check for chip->name, because if domain->name is NULL overwriting it with NULL is not a problem. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: Jens Axboe Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.510684976@linutronix.de kernel/irq/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1bb3a5a76386ba2886ee44b903eeff5765bd71d4 Author: Thomas Gleixner Date: Tue Jun 20 01:37:03 2017 +0200 iommu/vt-d: Add name to irq chip Add the missing name, so debugging will work proper. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.431939968@linutronix.de drivers/iommu/intel_irq_remapping.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 290be194ba9d489e1857cc45d0dd24bf3429156b Author: Thomas Gleixner Date: Tue Jun 20 01:37:02 2017 +0200 iommu/amd: Add name to irq chip Add the missing name, so debugging will work proper. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.343236995@linutronix.de drivers/iommu/amd_iommu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 8947dfb257eb91d7487e06b7d2a069d82e7c19a2 Author: Thomas Gleixner Date: Tue Jun 20 01:37:01 2017 +0200 x86/apic: Add name to irq chip Add the missing name, so debugging will work proper. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.266561988@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 1 + 1 file changed, 1 insertion(+) commit 7782b1444645768f5f213eaff6994604c6c0e635 Author: Geert Uytterhoeven Date: Thu Jun 22 15:07:06 2017 +0200 scripts/dtc: dtx_diff - Show real file names in diff header As the comparison uses process substitution to pass files after conversion to DTS format, the diff header doesn't show the real filenames, but the names of the file descriptors used: --- /dev/fd/63 2017-06-22 11:21:47.531637188 +0200 +++ /dev/fd/62 2017-06-22 11:21:47.531637188 +0200 This is especially annoying when comparing a bunch of DT files in a loop, as the output doesn't show a clue about which files it refers to. Fix this by explicitly passing the original file names to the diff command using the --label option, giving e.g.: --- arch/arm/boot/dts/r8a7791-koelsch.dtb +++ arch/arm/boot/dts/r8a7791-porter.dtb Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Signed-off-by: Rob Herring scripts/dtc/dtx_diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a12f459896ae1acf1d826d90b33ecff6f4508c2 Author: Frank Rowand Date: Wed Jun 21 12:21:56 2017 -0700 of: detect invalid phandle in overlay Overlays are not allowed to modify phandle values of previously existing nodes because there is no information available to allow fixup up properties that use the previously existing phandle. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7ace5f4806e895b2227f3ebb00d1fe24f60596c4 Author: Frank Rowand Date: Wed Jun 21 12:20:03 2017 -0700 of: be consistent in form of file mode checkpatch whined about using S_IRUGO instead of octal equivalent when adding phandle sysfs code, so used octal in that pending patch. Change other instances of the S_* constants in the same file to the octal form. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 249969514e23b07d1872fc614bb5cfd3577bde35 Author: Frank Rowand Date: Wed Jun 21 12:16:38 2017 -0700 of: make __of_attach_node() static __of_attach_node() is not used outside of drivers/of/dynamic.c. Make it static and remove it from drivers/of/of_private.h. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/dynamic.c | 2 +- drivers/of/of_private.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 7602f422cf757d93a29d4e56bb5bcc053d657f1b Author: Frank Rowand Date: Tue Jun 20 16:50:11 2017 -0700 of: address.c header comment typo Fix typo in header comment for of_address_to_resource() Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ef5adca5b212c705a7c61cf721db223fafecf07 Author: Frank Rowand Date: Tue Jun 20 16:46:28 2017 -0700 of: fdt.c header comment typo Fix typo in header comment for early_init_dt_scan_memory() Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92af08990cc49408119ca2549dfe9e37235864d8 Author: Frank Rowand Date: Tue Jun 20 16:38:28 2017 -0700 of: make of_fdt_is_compatible() static The callers of of_fdt_is_compatible() are all in fdt.c so make it static. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/fdt.c | 2 +- include/linux/of_fdt.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit 3bd79768f61ee3ae93a3ed1cc0ae11fb4474323a Author: Frank Rowand Date: Tue Jun 20 16:18:15 2017 -0700 dt-bindings: display-timing.txt convert non-ascii characters to ascii Convert non-ascii up and down arrows to '^' and 'v' Signed-off-by: Frank Rowand Signed-off-by: Rob Herring .../devicetree/bindings/display/panel/display-timing.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ce013f137498249a8c6a199fb862357dd72f492f Author: Frank Rowand Date: Tue Jun 20 15:40:53 2017 -0700 Documentation: remove overlay-notes reference to non-existent file File dt-object-internal.txt does not exist. Remove a reference to it and fix up tags for references to other files. Reported-by: afaerber@suse.de Signed-off-by: Frank Rowand Signed-off-by: Rob Herring Documentation/devicetree/overlay-notes.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit cdb7ee4c632759075866bb8da5fb16b764e66ded Author: Tahsin Erdogan Date: Thu Jun 22 11:55:14 2017 -0400 ext4: add nombcache mount option The main purpose of mb cache is to achieve deduplication in extended attributes. In use cases where opportunity for deduplication is unlikely, it only adds overhead. Add a mount option to explicitly turn off mb cache. Suggested-by: Andreas Dilger Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 1 + fs/ext4/super.c | 34 +++++++++++++++++++++++----------- fs/ext4/xattr.c | 52 +++++++++++++++++++++++++++++++++++----------------- 3 files changed, 59 insertions(+), 28 deletions(-) commit b9fc761ea2d82e910e92f83d01bbbbe1f5e99bfc Author: Tahsin Erdogan Date: Thu Jun 22 11:53:15 2017 -0400 ext4: strong binding of xattr inode references To verify that a xattr entry is not pointing to the wrong xattr inode, we currently check that the target inode has EXT4_EA_INODE_FL flag set and also the entry size matches the target inode size. For stronger validation, also incorporate crc32c hash of the value into the e_hash field. This is done regardless of whether the entry lives in the inode body or external attribute block. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 104 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 39 deletions(-) commit daf8328172dffabb4a6b5e1970d6e9628669f51c Author: Tahsin Erdogan Date: Thu Jun 22 11:52:03 2017 -0400 ext4: eliminate xattr entry e_hash recalculation for removes When an extended attribute block is modified, ext4_xattr_hash_entry() recalculates e_hash for the entry that is pointed by s->here. This is unnecessary if the modification is to remove an entry. Currently, if the removed entry is the last one and there are other entries remaining, hash calculation targets the just erased entry which has been filled with zeroes and effectively does nothing. If the removed entry is not the last one and there are more entries, this time it will recalculate hash on the next entry which is totally unnecessary. Fix these by moving the decision on when to recalculate hash to ext4_xattr_set_entry(). Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) commit 9c6e7853c531c7cecca8c257bde767d089e5c880 Author: Tahsin Erdogan Date: Thu Jun 22 11:48:53 2017 -0400 ext4: reserve space for xattr entries/names New ea_inode feature allows putting large xattr values into external inodes. struct ext4_xattr_entry and the attribute name however have to remain in the inode extra space or external attribute block. Once that space is exhausted, no further entries can be added. Some of that space could also be used by values that fit in there at the time of addition. So, a single xattr entry whose value barely fits in the external block could prevent further entries being added. To mitigate the problem, this patch introduces a notion of reserved space in the external attribute block that cannot be used by value data. This reserve is enforced when ea_inode feature is enabled. The amount of reserve is arbitrarily chosen to be min(block_size/8, 1024). The table below shows how much space is reserved for each block size and the guaranteed mininum number of entries that can be placed in the external attribute block. block size reserved bytes entries (name length = 16) 1k 128 3 2k 256 7 4k 512 15 8k 1024 31 16k 1024 31 32k 1024 31 64k 1024 31 Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7a9ca53aea10ad4677a0f347ad7639c304b80194 Author: Tahsin Erdogan Date: Thu Jun 22 11:46:48 2017 -0400 quota: add get_inode_usage callback to transfer multi-inode charges Ext4 ea_inode feature allows storing xattr values in external inodes to be able to store values that are bigger than a block in size. Ext4 also has deduplication support for these type of inodes. With deduplication, the actual storage waste is eliminated but the users of such inodes are still charged full quota for the inodes as if there was no sharing happening in the background. This design requires ext4 to manually charge the users because the inodes are shared. An implication of this is that, if someone calls chown on a file that has such references we need to transfer the quota for the file and xattr inodes. Current dquot_transfer() function implicitly transfers one inode charge. With ea_inode feature, we would like to transfer multiple inode charges. Add get_inode_usage callback which can interrogate the total number of inodes that were charged for a given inode. [ Applied fix from Colin King to make sure the 'ret' variable is initialized on the successful return path. Detected by CoverityScan, CID#1446616 ("Uninitialized scalar variable") --tytso] Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o Signed-off-by: Colin Ian King Acked-by: Jan Kara fs/ext4/inode.c | 7 +++++++ fs/ext4/ioctl.c | 6 ++++++ fs/ext4/super.c | 21 ++++++++++---------- fs/ext4/xattr.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ext4/xattr.h | 2 ++ fs/quota/dquot.c | 16 +++++++++++---- include/linux/quota.h | 2 ++ 7 files changed, 95 insertions(+), 14 deletions(-) commit dec214d00e0d78a08b947d7dccdfdb84407a9f4d Author: Tahsin Erdogan Date: Thu Jun 22 11:44:55 2017 -0400 ext4: xattr inode deduplication Ext4 now supports xattr values that are up to 64k in size (vfs limit). Large xattr values are stored in external inodes each one holding a single value. Once written the data blocks of these inodes are immutable. The real world use cases are expected to have a lot of value duplication such as inherited acls etc. To reduce data duplication on disk, this patch implements a deduplicator that allows sharing of xattr inodes. The deduplication is based on an in-memory hash lookup that is a best effort sharing scheme. When a xattr inode is read from disk (i.e. getxattr() call), its crc32c hash is added to a hash table. Before creating a new xattr inode for a value being set, the hash table is checked to see if an existing inode holds an identical value. If such an inode is found, the ref count on that inode is incremented. On value removal the ref count is decremented and if it reaches zero the inode is deleted. The quota charging for such inodes is manually managed. Every reference holder is charged the full size as if there was no sharing happening. This is consistent with how xattr blocks are also charged. [ Fixed up journal credits calculation to handle inline data and the rare case where an shared xattr block can get freed when two thread race on breaking the xattr block sharing. --tytso ] Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/acl.c | 5 +- fs/ext4/ext4.h | 23 +- fs/ext4/inode.c | 13 +- fs/ext4/super.c | 37 +- fs/ext4/xattr.c | 1052 +++++++++++++++++++++++++++++++++++++++++-------------- fs/ext4/xattr.h | 17 +- fs/mbcache.c | 9 +- 7 files changed, 862 insertions(+), 294 deletions(-) commit 30a7eb970c3aae6f1b74b2edea896fdca1cbea38 Author: Tahsin Erdogan Date: Thu Jun 22 11:42:09 2017 -0400 ext4: cleanup transaction restarts during inode deletion During inode deletion, the number of journal credits that will be needed is hard to determine. For that reason we have journal extend/restart calls in several places. Whenever a transaction is restarted, filesystem must be in a consistent state because there is no atomicity guarantee beyond a restart call. Add ext4_xattr_ensure_credits() helper function which takes care of journal extend/restart logic. It also handles getting jbd2 write access and dirty metadata calls. This function is called at every iteration of handling an ea_inode reference. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 66 ++++----------- fs/ext4/xattr.c | 258 ++++++++++++++++++++++++++++++++++++-------------------- fs/ext4/xattr.h | 3 +- 3 files changed, 184 insertions(+), 143 deletions(-) commit 00a3855d68bd1ae633c94b13b8b404a5a238b135 Author: Yonghong Song Date: Wed Jun 21 13:48:27 2017 -0700 samples/bpf: fix a build problem tracex5_kern.c build failed with the following error message: ../samples/bpf/tracex5_kern.c:12:10: fatal error: 'syscall_nrs.h' file not found #include "syscall_nrs.h" The generated file syscall_nrs.h is put in build/samples/bpf directory, but this directory is not in include path, hence build failed. The fix is to add $(obj) into the clang compilation path. Signed-off-by: Yonghong Song Signed-off-by: David S. Miller samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2de18105a8219bde0cc4947729d5f00ecb39179f Merge: 6d65923 c14b036 Author: David S. Miller Date: Thu Jun 22 11:34:05 2017 -0400 Merge branch 'rds-tcp-fixes' Sowmini Varadhan says: ==================== rds: tcp: fixes Patch1 is a bug fix for correct reconnect when a connection is restarted. Patch 2 accelerates cleanup by setting linger to 1 and sending a RST to the peer. ==================== Signed-off-by: David S. Miller commit c14b0366813a8f6df7de181d8a333af7db6fb84e Author: Sowmini Varadhan Date: Wed Jun 21 13:40:13 2017 -0700 rds: tcp: set linger to 1 when unloading a rds-tcp If we are unloading the rds_tcp module, we can set linger to 1 and drop pending packets to accelerate reconnect. The peer will end up resetting the connection based on new generation numbers of the new incarnation, so hanging on to unsent TCP packets via linger is mostly pointless in this case. Signed-off-by: Sowmini Varadhan Tested-by: Jenny Xu Signed-off-by: David S. Miller net/rds/connection.c | 1 + net/rds/rds.h | 3 ++- net/rds/tcp.h | 1 + net/rds/tcp_connect.c | 2 ++ net/rds/tcp_listen.c | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) commit 69b92b5b7419846e2a0d61a097b11b17a089e046 Author: Sowmini Varadhan Date: Wed Jun 21 13:40:12 2017 -0700 rds: tcp: send handshake ping-probe from passive endpoint The RDS handshake ping probe added by commit 5916e2c1554f ("RDS: TCP: Enable multipath RDS for TCP") is sent from rds_sendmsg() before the first data packet is sent to a peer. If the conversation is not bidirectional (i.e., one side is always passive and never invokes rds_sendmsg()) and the passive side restarts its rds_tcp module, a new HS ping probe needs to be sent, so that the number of paths can be re-established. This patch achieves that by sending a HS ping probe from rds_tcp_accept_one() when c_npaths is 0 (i.e., we have not done a handshake probe with this peer yet). Signed-off-by: Sowmini Varadhan Tested-by: Jenny Xu Signed-off-by: David S. Miller net/rds/rds.h | 1 + net/rds/recv.c | 6 +++--- net/rds/send.c | 14 ++++++-------- net/rds/tcp_listen.c | 2 ++ 4 files changed, 12 insertions(+), 11 deletions(-) commit 6d659237657c64e9e2a930865da4c777239b678e Author: Nathan Fontenot Date: Wed Jun 21 15:41:02 2017 -0500 ibmvnic: Correct return code checking for ibmvnic_init during probe The update to ibmvnic_init to allow an EAGAIN return code broke the calling of ibmvnic_init from ibmvnic_probe. The code now will return from this point in the probe routine if anything other than EAGAIN is returned. The check should be to see if rc is non-zero and not equal to EAGAIN. Without this fix, the vNIC driver can return 0 (success) from its probe routine due to ibmvnic_init returning zero, but before completing the probe process and registering with the netdev layer. Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for kdump/kexec) Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9995bac58514928dd59ab916abfe66b2afcb3d07 Merge: 8fac365 f3be0cb Author: David S. Miller Date: Thu Jun 22 11:31:35 2017 -0400 Merge branch 'ibmvnic-Correct-long-term-mapped-buffer-error-handling' Thomas Falcon says: ==================== ibmvnic: Correct long-term-mapped buffer error handling This patch set fixes the error-handling of long-term-mapped buffers during adapter initialization and reset. The first patch fixes a bug in an incorrectly defined descriptor that was keeping the return codes from the VIO server from being properly checked. The second patch fixes and cleans up the error-handling implementation. ==================== Signed-off-by: David S. Miller commit f3be0cbc722c8de2f45c5d9f71f1b21da85554fd Author: Thomas Falcon Date: Wed Jun 21 14:53:01 2017 -0500 ibmvnic: Fix error handling when registering long-term-mapped buffers The patch stores the return code of the REQUEST_MAP_RSP sub-CRQ command in the private data structure, where it can be later checked during device open or a reset. In the case of a reset, the mapping request to the vNIC Server may fail, especially in the case of a partition migration. The driver attempts to handle this by re-allocating the buffer and re-sending the mapping request. The original error handling implementation was removed. The separate function handling the REQUEST_MAP response message was also removed, since it is now simple enough to be handled in the ibmvnic_handle_crq function. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 79 ++++++++++++++++---------------------- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 35 insertions(+), 45 deletions(-) commit 288ccb75b8fbf554d3fe21d1f91dbf489f10c6d4 Author: Thomas Falcon Date: Wed Jun 21 14:53:00 2017 -0500 ibmvnic: Fix incorrectly defined ibmvnic_request_map_rsp structure This reserved area should be eight bytes in length instead of four. As a result, the return codes in the REQUEST_MAP_RSP descriptors were not being properly handled. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02749a4c20827649859bf7e2435f1b238c24f935 Author: Tahsin Erdogan Date: Thu Jun 22 11:31:25 2017 -0400 ext4: add ext4_is_quota_file() IS_NOQUOTA() indicates whether quota is disabled for an inode. Ext4 also uses it to check whether an inode is for a quota file. The distinction currently doesn't matter because quota is disabled only for the quota files. When we start disabling quota for other inodes in the future, we will want to make the distinction clear. Replace IS_NOQUOTA() call with ext4_is_quota_file() at places where we are checking for quota files. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 2 ++ fs/ext4/inode.c | 2 +- fs/ext4/ioctl.c | 4 ++-- fs/ext4/mballoc.c | 2 +- fs/ext4/move_extent.c | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) commit 47387409ee2e09db6d0e79a026a02073dc56bb8c Author: Tahsin Erdogan Date: Thu Jun 22 11:28:55 2017 -0400 ext2, ext4: make mb block cache names more explicit There will be a second mb_cache instance that tracks ea_inodes. Make existing names more explicit so that it is clear that they refer to xattr block cache. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext2/ext2.h | 2 +- fs/ext2/super.c | 16 ++++++------- fs/ext2/xattr.c | 36 +++++++++++++++-------------- fs/ext4/ext4.h | 2 +- fs/ext4/super.c | 18 +++++++-------- fs/ext4/xattr.c | 71 ++++++++++++++++++++++++++++++--------------------------- 6 files changed, 75 insertions(+), 70 deletions(-) commit a9590fe148c03cb4157b56255357419cb4e14124 Author: weiping Date: Thu Jun 22 23:06:56 2017 +0800 blk-mq: remove double set queue_num hwctx's queue_num has been set prior call blk_mq_init_hctx, so no need set it again. Signed-off-by: weiping Signed-off-by: Jens Axboe block/blk-mq.c | 1 - 1 file changed, 1 deletion(-) commit 8fac365f63c866a00015fa13932d8ffc584518b8 Author: Chenbo Feng Date: Tue Jun 20 19:06:40 2017 -0700 tcp: Add a tcp_filter hook before handle ack packet Currently in both ipv4 and ipv6 code path, the ack packet received when sk at TCP_NEW_SYN_RECV state is not filtered by socket filter or cgroup filter since it is handled from tcp_child_process and never reaches the tcp_filter inside tcp_v4_rcv or tcp_v6_rcv. Adding a tcp_filter hooks here can make sure all the ingress tcp packet can be correctly filtered. Signed-off-by: Chenbo Feng Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 2 ++ net/ipv6/tcp_ipv6.c | 2 ++ 2 files changed, 4 insertions(+) commit 2da55390a96ad2245edfaca77669c10088523d39 Author: Arnd Bergmann Date: Tue Jun 20 22:40:46 2017 +0200 net: phy: smsc: fix buffer overflow in memcpy The memcpy annotation triggers for a fixed-length buffer copy: In file included from /git/arm-soc/arch/arm64/include/asm/processor.h:30:0, from /git/arm-soc/arch/arm64/include/asm/spinlock.h:21, from /git/arm-soc/include/linux/spinlock.h:87, from /git/arm-soc/include/linux/seqlock.h:35, from /git/arm-soc/include/linux/time.h:5, from /git/arm-soc/include/linux/stat.h:21, from /git/arm-soc/include/linux/module.h:10, from /git/arm-soc/drivers/net/phy/smsc.c:20: In function 'memcpy', inlined from 'smsc_get_strings' at /git/arm-soc/drivers/net/phy/smsc.c:166:3: /git/arm-soc/include/linux/string.h:309:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter Using strncpy instead of memcpy should do the right thing here. Fixes: 030a89028db0 ("net: phy: smsc: Implement PHY statistics") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/phy/smsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbad7c2138d494f8af1d48f2140228633535dd14 Author: Myron Stowe Date: Tue Jun 20 11:21:26 2017 -0600 net/mlx5e: Use device ID defines Use Mellanox device ID definitions in the driver's mlx5 ID table so tools such as 'grep' and 'cscope' can be used to help find correlated material (such as INTx Masking quirks: d76d2fe05fd PCI: Convert Mellanox broken INTx quirks to be for listed devices only). No functional change intended. Signed-off-by: Myron Stowe Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b381f783baa5b755f065df347f738f303b62e948 Author: Denys Vlasenko Date: Mon Jun 19 21:50:52 2017 +0200 liquidio: stop using huge static buffer, save 4096k in .data Only compile-tested - I don't have the hardware. >From code inspection, octeon_pci_write_core_mem() appears to be safe wrt unaligned source. In any case, u8 fbuf[] was not guaranteed to be aligned anyway. Signed-off-by: Denys Vlasenko CC: Felix Manlunas CC: Prasad Kanneganti CC: Derek Chickles CC: David Miller CC: netdev@vger.kernel.org CC: linux-kernel@vger.kernel.org Acked-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/octeon_console.c | 6 +----- drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c | 4 ++-- drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.h | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) commit 8effeaaf2cacc8a8007d3089e253e7baaff57bb7 Author: Mark Rutland Date: Wed Jun 21 18:11:23 2017 +0100 arm64: dump cpu_hwcaps at panic time When debugging a kernel panic(), it can be useful to know which CPU features have been detected by the kernel, as some code paths can depend on these (and may have been patched at runtime). This patch adds a notifier to dump the detected CPU caps (as a hex string) at panic(), when we log other information useful for debugging. On a Juno R1 system running v4.12-rc5, this looks like: [ 615.431249] Kernel panic - not syncing: Fatal exception in interrupt [ 615.437609] SMP: stopping secondary CPUs [ 615.441872] Kernel Offset: disabled [ 615.445372] CPU features: 0x02086 [ 615.448522] Memory Limit: none A developer can decode this by looking at the corresponding bits. For example, the above decodes as: * bit 1: ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE * bit 2: ARM64_WORKAROUND_845719 * bit 7: ARM64_WORKAROUND_834220 * bit 13: ARM64_HAS_32BIT_EL0 Signed-off-by: Mark Rutland Acked-by: Steve Capper Cc: Catalin Marinas Cc: Suzuki K Poulose Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 936eb65ca22ad856cb3a995e8cd742e982dc2dd0 Author: Dave Martin Date: Wed Jun 21 16:00:44 2017 +0100 arm64: ptrace: Flush user-RW TLS reg to thread_struct before reading When reading current's user-writable TLS register (which occurs when dumping core for native tasks), it is possible that userspace has modified it since the time the task was last scheduled out. The new TLS register value is not guaranteed to have been written immediately back to thread_struct in this case. As a result, a coredump can capture stale data for this register. Reading the register for a stopped task via ptrace is unaffected. For native tasks, this patch explicitly flushes the TPIDR_EL0 register back to thread_struct before dumping when operating on current, thus ensuring that coredump contents are up to date. For compat tasks, the TLS register is not user-writable and so cannot be out of sync, so no flush is required in compat_tls_get(). Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/include/asm/processor.h | 3 +++ arch/arm64/kernel/process.c | 8 ++++++-- arch/arm64/kernel/ptrace.c | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) commit e1d5a8fb73e6c65280c21ec188180345649ee650 Author: Dave Martin Date: Wed Jun 21 16:00:43 2017 +0100 arm64: ptrace: Flush FPSIMD regs back to thread_struct before reading When reading the FPSIMD state of current (which occurs when dumping core), it is possible that userspace has modified the FPSIMD registers since the time the task was last scheduled out. Such changes are not guaranteed to be reflected immedately in thread_struct. As a result, a coredump can contain stale values for these registers. Reading the registers of a stopped task via ptrace is unaffected. This patch explicitly flushes the CPU state back to thread_struct before dumping when operating on current, thus ensuring that coredump contents are up to date. Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/ptrace.c | 7 +++++++ 1 file changed, 7 insertions(+) commit af66b2d88a76574d55e81d712292abd34beb6178 Author: Dave Martin Date: Wed Jun 21 16:00:42 2017 +0100 arm64: ptrace: Fix VFP register dumping in compat coredumps Currently, VFP registers are omitted from coredumps for compat processes, due to a bug in the REGSET_COMPAT_VFP regset implementation. compat_vfp_get() needs to transfer non-contiguous data from thread_struct.fpsimd_state, and uses put_user() to handle the offending trailing word (FPSCR). This fails when copying to a kernel address (i.e., kbuf && !ubuf), which is what happens when dumping core. As a result, the ELF coredump core code silently omits the NT_ARM_VFP note from the dump. It would be possible to work around this with additional special case code for the put_user(), but since user_regset_copyout() is explicitly designed to handle this scenario it is cleaner to port the put_user() to a user_regset_copyout() call, which this patch does. Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/ptrace.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 2f74f09bce4f8d0236f20174a6daae63e10fe733 Author: Tyler Baicar Date: Wed Jun 21 12:17:07 2017 -0600 efi: parse ARM processor error Add support for ARM Common Platform Error Record (CPER). UEFI 2.6 specification adds support for ARM specific processor error information to be reported as part of the CPER records. This provides more detail on for processor error logs. Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang Reviewed-by: James Morse Reviewed-by: Ard Biesheuvel Signed-off-by: Will Deacon drivers/firmware/efi/cper.c | 129 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/cper.h | 54 +++++++++++++++++++ 2 files changed, 183 insertions(+) commit 8a94471fb73fd53589746561a2dba29e073ed829 Author: Tyler Baicar Date: Wed Jun 21 12:17:06 2017 -0600 cper: add timestamp print to CPER status printing The ACPI 6.1 spec added a timestamp to the generic error data entry structure. Print the timestamp out when printing out the error information. Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang Signed-off-by: Will Deacon drivers/firmware/efi/cper.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit bbcc2e7b642ed241651fee50ac6ed59643cb1736 Author: Tyler Baicar Date: Wed Jun 21 12:17:05 2017 -0600 ras: acpi/apei: cper: add support for generic data v3 structure The ACPI 6.1 spec adds a new revision of the generic error data entry structure. Add support to handle the new structure as well as properly verify and iterate through the generic data entries. Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang Signed-off-by: Will Deacon drivers/acpi/apei/ghes.c | 11 +++++------ drivers/firmware/efi/cper.c | 37 ++++++++++++++++++++++--------------- include/acpi/ghes.h | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 21 deletions(-) commit 42aa560446622da6c33dce54fc8f4cd81516e906 Author: Tyler Baicar Date: Wed Jun 21 12:17:04 2017 -0600 acpi: apei: read ack upon ghes record consumption A RAS (Reliability, Availability, Serviceability) controller may be a separate processor running in parallel with OS execution, and may generate error records for consumption by the OS. If the RAS controller produces multiple error records, then they may be overwritten before the OS has consumed them. The Generic Hardware Error Source (GHES) v2 structure introduces the capability for the OS to acknowledge the consumption of the error record generated by the RAS controller. A RAS controller supporting GHESv2 shall wait for the acknowledgment before writing a new error record, thus eliminating the race condition. Add support for parsing of GHESv2 sub-tables as well. Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang Reviewed-by: James Morse Signed-off-by: Will Deacon drivers/acpi/apei/ghes.c | 59 +++++++++++++++++++++++++++++++++++++++++++++--- drivers/acpi/apei/hest.c | 7 ++++-- include/acpi/ghes.h | 5 +++- 3 files changed, 65 insertions(+), 6 deletions(-) commit c07dfcb45877fbc6798fa042bab3c4b85378efd4 Author: Tahsin Erdogan Date: Thu Jun 22 10:29:53 2017 -0400 mbcache: make mbcache naming more generic Make names more generic so that mbcache usage is not limited to block sharing. In a subsequent patch in the series ("ext4: xattr inode deduplication"), we start using the mbcache code for sharing xattr inodes. With that patch, old mb_cache_entry.e_block field could be holding either a block number or an inode number. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext2/xattr.c | 18 +++++++++--------- fs/ext4/xattr.c | 10 +++++----- fs/mbcache.c | 43 +++++++++++++++++++++---------------------- include/linux/mbcache.h | 11 +++++------ 4 files changed, 40 insertions(+), 42 deletions(-) commit b6d9029df083c0a9ce1d4eda1480105e635e0d61 Author: Tahsin Erdogan Date: Thu Jun 22 10:28:38 2017 -0400 ext4: move struct ext4_xattr_inode_array to xattr.h Since this is a xattr specific data structure it is cleaner to keep it in xattr header file. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 4 ---- fs/ext4/xattr.h | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) commit d07ff6523b1ed24d636365f8479b0db70946dc14 Merge: 33e4f80 87085ff Author: Rafael J. Wysocki Date: Thu Jun 22 16:28:35 2017 +0200 Merge branch 'uuid-types' Merge branch 'uuid-types' from git://git.infradead.org/users/hch/uuid.git to satisfy dependencies. commit 0421a189bc8cdefa18a34aee962ac0558679b944 Author: Tahsin Erdogan Date: Thu Jun 22 10:26:31 2017 -0400 ext4: modify ext4_xattr_ino_array to hold struct inode * Tracking struct inode * rather than the inode number eliminates the repeated ext4_xattr_inode_iget() call later. The second call cannot fail in practice but still requires explanation when it wants to ignore the return value. Avoid the trouble and make things simple. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 6 ++-- fs/ext4/inode.c | 8 ++--- fs/ext4/xattr.c | 93 ++++++++++++++++++++++++++++----------------------------- fs/ext4/xattr.h | 5 ++-- 4 files changed, 53 insertions(+), 59 deletions(-) commit a1272dd5531b259bf7313ac7597a67362698038c Author: Zhenzhong Duan Date: Wed Jun 21 01:23:37 2017 -0700 x86/tsc: Call check_system_tsc_reliable() before unsynchronized_tsc() tsc_clocksource_reliable is initialized in check_system_tsc_reliable(), but it is checked in unsynchronized_tsc() which is called before the initialization. In practice that's not an issue because systems which mark the TSC reliable have X86_FEATURE_CONSTANT_TSC set as well, which is evaluated in unsynchronized_tsc() before tsc_clocksource_reliable. Reorder the calls so initialization happens before usage. [ tglx: Massaged changelog ] Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/b1532ef7-cd9f-45f7-9f49-48dd2a5c2495@default arch/x86/kernel/tsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14ef905bb2eecb02f7ce31b8fbedd4a75ddf0f57 Author: Michal Simek Date: Wed Feb 24 11:30:04 2016 +0100 microblaze: Fix MSR flags when returning from exception The issue was that the service routine was sometimes returning with the wrong flags set in the MSR. In this case, EIP bit was set while returning to User Mode which is an illegal combination since exceptions are always handled in privileged mode. In order for MicroBlaze to take an interrupt, the MSR must have IE=1, BIP=0 and EIP=0. Signed-off-by: Stefan Asserhall Signed-off-by: Goran Bilski Signed-off-by: Michal Simek arch/microblaze/kernel/entry.S | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit faf154cd49ba99b24f45a65b18b0deca0bfed8ee Author: Michal Simek Date: Wed Feb 24 11:31:14 2016 +0100 microblaze: Separate GP registers from MSR handling Separate general purpose register restoring from MSR handling. Signed-off-by: Michal Simek arch/microblaze/kernel/entry.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e16f1ad442e2f0f1b36e0372ca84aa3c2a923ae7 Author: Vineeth Chowdary Karumanchi Date: Mon Sep 19 15:02:44 2016 +0530 microblaze: Enabling CONFIG_BRIDGE in mmu_defconfig This patch enables CONFIG_BRIDGE=m by default to be aligned with Xilinx defaults. Signed-off-by: Vineeth Chowdary Karumanchi Signed-off-by: Michal Simek arch/microblaze/configs/mmu_defconfig | 1 + 1 file changed, 1 insertion(+) commit 17f4977ccd2b4c005f2cc2a543fbd20efb2b3b0a Author: Vineeth Chowdary Karumanchi Date: Tue Nov 22 16:46:04 2016 +0530 microblaze: Enabling CONFIGS related to MTD Add support for Intel and AMD flash devices by default for mmu configuration. Signed-off-by: Vineeth Chowdary Karumanchi Signed-off-by: Michal Simek arch/microblaze/configs/mmu_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit e0d4fa5f7a500cb5d1909b1bc3257031d73c2759 Author: Michal Simek Date: Tue May 30 08:30:35 2017 +0200 microblaze: Update defconfigs Run "make savedefconfig" to bring up to date. Signed-off-by: Michal Simek arch/microblaze/configs/mmu_defconfig | 12 +++--------- arch/microblaze/configs/nommu_defconfig | 17 +++-------------- 2 files changed, 6 insertions(+), 23 deletions(-) commit a753499d43603d7b882cdd835aea9bc7183457fc Author: Michal Simek Date: Wed Jan 13 19:37:25 2016 +0100 microblaze: mm: Flush TLB to ensure correct mapping when higmem ON MMU contains invalid mapping which wasn't flushed and new mapping is using the same addresses as previous one. That's why TLB miss is not happening to get new correct TLB entry and MMU points to incorrect area. This is replicatable when large files(256MB and more) are copied and checked. Signed-off-by: Michal Simek arch/microblaze/mm/highmem.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 71c2a2d0a81f096a2932fccb39a500116fece554 Author: Vitaly Kuznetsov Date: Thu Jun 22 18:07:30 2017 +0800 x86/hyperv: Read TSC frequency from a synthetic MSR It was found that SMI_TRESHOLD of 50000 is not enough for Hyper-V guests in nested environment and falling back to counting jiffies is not an option for Gen2 guests as they don't have PIT. As Hyper-V provides TSC frequency in a synthetic MSR we can just use this information instead of doing a error prone calibration. Reported-and-tested-by: Ladi Prosek Signed-off-by: Vitaly Kuznetsov Signed-off-by: Thomas Gleixner Cc: Stephen Hemminger Cc: Haiyang Zhang Cc: Jork Loeser Cc: devel@linuxdriverproject.org Cc: "K. Y. Srinivasan" Link: http://lkml.kernel.org/r/20170622100730.18112-3-vkuznets@redhat.com arch/x86/kernel/cpu/mshyperv.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 2cf0284223a40773bd0ec76a409a7cbf0607ca28 Author: Vitaly Kuznetsov Date: Thu Jun 22 18:07:29 2017 +0800 x86/hyperv: Check frequency MSRs presence according to the specification Hyper-V TLFS specifies two bits which should be checked before accessing frequency MSRs: - AccessFrequencyMsrs (BIT(11) in EAX) which indicates if we have access to frequency MSRs. - FrequencyMsrsAvailable (BIT(8) in EDX) which indicates is these MSRs are present. Rename and specify these bits accordingly. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Thomas Gleixner Cc: Stephen Hemminger Cc: Haiyang Zhang Cc: Ladi Prosek Cc: Jork Loeser Cc: devel@linuxdriverproject.org Cc: "K. Y. Srinivasan" Link: http://lkml.kernel.org/r/20170622100730.18112-2-vkuznets@redhat.com arch/x86/include/uapi/asm/hyperv.h | 15 ++++++--------- arch/x86/kernel/cpu/mshyperv.c | 3 ++- 2 files changed, 8 insertions(+), 10 deletions(-) commit 52f8c9380f2eb051581628782a4917f2c3f9751f Merge: 3f426c9 a520b49 Author: Kalle Valo Date: Thu Jun 22 16:29:52 2017 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.13. Major changes: wil6210 * add low level RF sector interface via nl80211 vendor commands * add module parameter ftm_mode to load separate firmware for factory testing * support devices with different PCIe bar size * add support for PCIe D3hot in system suspend * remove ioctl interface which should not be in a wireless driver ath10k * go back to using dma_alloc_coherent() for firmware scratch memory * add per chain RSSI reporting commit 11f69da0dada3e4472b5b1319fae9b1df194e3d6 Author: Thomas Petazzoni Date: Wed Jun 21 15:29:12 2017 +0200 dt-bindings/interrupt-controller: Add DT binding for the Marvell GICP This commit adds the Device Tree binding documentation for the Marvell GICP, an extension to the GIC that allows to trigger GIC SPI interrupts using memory transactions. It is used by the ICU unit in the Marvell CP110 block to turn wired interrupts inside the CP into SPI interrupts at the GIC level in the AP. Signed-off-by: Thomas Petazzoni Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/marvell,gicp.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit a1628366227aff3433f646cec2beb36d1f018f86 Author: Wei Yongjun Date: Tue Apr 25 16:12:23 2017 +0000 irqchip/qcom: Use builtin_platform_driver to simplify the code Use the builtin_platform_driver() macro to make the code simpler. Signed-off-by: Wei Yongjun Signed-off-by: Marc Zyngier drivers/irqchip/qcom-irq-combiner.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit f48e699ddf7056f83bb8e2dbe3c2ae8d1ff1a31a Author: Brendan Higgins Date: Fri Jun 2 18:29:49 2017 -0700 irqchip/aspeed-i2c-ic: Add I2C IRQ controller for Aspeed The Aspeed 24XX/25XX chips share a single hardware interrupt across 14 separate I2C busses. This adds a dummy irqchip which maps the single hardware interrupt to software interrupts for each of the busses. Signed-off-by: Brendan Higgins Signed-off-by: Marc Zyngier drivers/irqchip/Makefile | 2 +- drivers/irqchip/irq-aspeed-i2c-ic.c | 115 ++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 1 deletion(-) commit 0a56f9eebe6320980b68c60c852436cbf2a14b61 Author: Brendan Higgins Date: Fri Jun 2 18:29:48 2017 -0700 irqchip/aspeed-i2c-ic: Add binding docs for Aspeed I2C Interrupt Controller Added device tree binding documentation for Aspeed I2C Interrupt Controller. Signed-off-by: Brendan Higgins Acked-by: Rob Herring Signed-off-by: Marc Zyngier .../interrupt-controller/aspeed,ast2400-i2c-ic.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit fa776a3f2b1b62970179bcefc55fae85e5700746 Author: Andrew Jeffery Date: Tue May 16 15:57:47 2017 +0800 irqchip/aspeed-vic: Add AST2500 compatible string In addition to introducing the new compatible string the bindings description is reworked to be more generic. Acked-by: Rob Herring Signed-off-by: Andrew Jeffery Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/aspeed,ast2400-vic.txt | 9 +++++---- drivers/irqchip/irq-aspeed-vic.c | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) commit 13dcf12bf877b9ed8845c7a68390702e368ec622 Author: Tobias Klauser Date: Fri Jun 2 10:20:52 2017 +0200 irqchip/aspeed-vic: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Cc: Joel Stanley Signed-off-by: Tobias Klauser Signed-off-by: Marc Zyngier drivers/irqchip/irq-aspeed-vic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1957b7bfa65893ee282e9901b2132d87c2720e07 Author: Thomas Petazzoni Date: Thu May 18 10:07:40 2017 +0200 Revert "irqchip/armada-370-xp: Fix regression by clearing IRQ_NOAUTOEN" This reverts commit 353d6d6c82e5d2533ba22e7f9fb081582bf50dc2, which is no longer needed, now that the irq-armada-370-xp driver properly re-enables per-CPU interrupt on both the boot CPU and secondary CPUs after resume. Signed-off-by: Thomas Petazzoni Signed-off-by: Marc Zyngier drivers/irqchip/irq-armada-370-xp.c | 1 - 1 file changed, 1 deletion(-) commit 0fa4ce746d1d8c8aa3d09fbc675497fa4c4a5475 Author: Thomas Petazzoni Date: Thu May 18 10:07:39 2017 +0200 irqchip/armada-370-xp: Re-enable per-CPU interrupts at resume time Commit d17cab4451df1 ("irqchip: Kill off set_irq_flags usage") changed the code of armada_370_xp_mpic_irq_map() from using set_irq_flags() to irq_set_probe(). While the commit log seems to imply that there are no functional changes, there are indeed functional changes introduced by this commit: the IRQ_NOAUTOEN flag is no longer cleared. This functional change caused a regression on Armada XP, which no longer works properly after suspend/resume because per-CPU interrupts remain disabled. This regression was temporarly worked around in commit 353d6d6c82e5d ("irqchip/armada-370-xp: Fix regression by clearing IRQ_NOAUTOEN"), but it is not the most satisfying solution. This commit implements the solution that was initially discussed with Thomas Gleixner. Due to how the hardware registers work, the irq-armada-370-xp cannot simply save/restore a bunch of registers at suspend/resume to make sure that the interrupts remain in the same state after resuming. Therefore, it relies on the kernel to say whether the interrupt is disabled or not, using the irqd_irq_disabled() function. This was all working fine while the IRQ_NOAUTOEN flag was cleared. With the change introduced by Rob Herring in d17cab4451df1, the IRQ_NOAUTOEN flag is now set for all interrupts. irqd_irq_disabled() returns false for per-CPU interrupts, and therefore our per-CPU interrupts are no longer re-enabled after resume. This commit fixes that by using irqd_irq_disabled() only for global interrupts, and using the newly introduced irq_percpu_is_enabled() for per-CPU interrupts. Also, it fixes a related problems that per-CPU interrupts were only re-enabled on the boot CPU and not other CPUs. Until now this wasn't a problem since on this platform, only the local timers are using per-CPU interrupts and the local timers of secondary CPUs are turned off/on during CPU hotplug before suspend, after after resume. However, since Linux 4.4, we are also be using per-CPU interrupts for the network controller, so we need to properly restore the per-CPU interrupts on secondary CPUs as well. Signed-off-by: Thomas Petazzoni Signed-off-by: Marc Zyngier drivers/irqchip/irq-armada-370-xp.c | 46 ++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) commit 054ea4ce0016bcb560a25e6e94de95538954a4a8 Author: Thomas Petazzoni Date: Thu May 18 10:07:38 2017 +0200 irqchip/armada-370-xp: Document the overall driver logic Since the overall logic of the driver to handle the global and per-CPU masking of the interrupts is far from trivial, this commit adds a long comment detailing how the hardware operates and what strategy the driver implements on top of that. Acked-by: Gregory CLEMENT Signed-off-by: Thomas Petazzoni Signed-off-by: Marc Zyngier drivers/irqchip/irq-armada-370-xp.c | 80 +++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 9a234c9c0a8de4245d5db788bcbbbaa35dcbe0a6 Author: Thomas Petazzoni Date: Thu May 18 10:07:37 2017 +0200 irqchip/armada-370-xp: Re-order register definitions In order to clarify to which register base the various register definitions apply, this commit re-orders them, and adds a comment that clearly indicate which registers are relative to "main_int_base" and which registers are relative to "per_cpu_int_base". Acked-by: Gregory CLEMENT Signed-off-by: Thomas Petazzoni Signed-off-by: Marc Zyngier drivers/irqchip/irq-armada-370-xp.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 8b8d94a72fd4e773320173efbc745ed8fe677ac5 Author: MaJun Date: Thu May 18 16:19:13 2017 +0800 irqchip/gicv3-its: Skip irq affinity setting when target cpu is the same as current setting Just skip the irq affinity setting when the target cpu is the same as current setting. This is a small optimization for irq affinity setting logic. Signed-off-by: MaJun Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 3403b0259d152c3ca67b32bb710f826bc17c0d16 Author: Robin Murphy Date: Wed May 31 18:52:27 2017 +0100 irqchip/gic-v3-its: Fix MSI alias accounting The call to pci_for_each_dma_alias() in the ITS PCI code has aroused suspicion in the past, and upon closer inspection does turn out to be completely backwards. Rather than iterating through each RID alias of the given device, what we actually want to be doing here is iterating through all the *other* devices which may also alias the same RID, in order to size the table for the worst case. Do the right thing by ignoring the initial DMA aliases themselves and just using that walk to detect an aliasing bridge, then walking back down the bus topology as necessary to actually count everything else. Our alias handling still isn't perfect, since we don't account for the cases of certain bridges only taking ownership of transactions under particular circumstances, but without completely reworking the ITS code to cope with the notion of multiple DevIDs per device, it'll have to do. Signed-off-by: Robin Murphy Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its-pci-msi.c | 35 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 18 deletions(-) commit c9262475fa592c1f7777edbc2689589a5ce7266e Author: Tobias Klauser Date: Fri Jun 2 10:20:58 2017 +0200 irqchip/irq-renesas-h8s: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Cc: Yoshinori Sato Cc: uclinux-h8-devel@lists.sourceforge.jp Signed-off-by: Tobias Klauser Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-h8s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 580393cc10f9a05a4f3b2e09fb066456f97d5b8d Author: Tobias Klauser Date: Fri Jun 2 10:20:57 2017 +0200 irqchip/irq-renesas-h8300h: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Cc: Yoshinori Sato Cc: uclinux-h8-devel@lists.sourceforge.jp Signed-off-by: Tobias Klauser Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-h8300h.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b7e815aaa3bb7c89b05a4f092835a7391c0724c Author: Tobias Klauser Date: Fri Jun 2 10:20:56 2017 +0200 irqchip/irq-mips-gic: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e183c2a3ea1996932fef7d5867df387793b1941f Author: Tobias Klauser Date: Fri Jun 2 10:20:55 2017 +0200 irqchip/irq-mbigen: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Signed-off-by: Marc Zyngier drivers/irqchip/irq-mbigen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcbbefceb27d53379be96979480a7e7d5de59ab8 Author: Tobias Klauser Date: Fri Jun 2 10:20:54 2017 +0200 irqchip/irq-imx-gpcv2: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Signed-off-by: Marc Zyngier drivers/irqchip/irq-imx-gpcv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53ccf3310d271facca17a2766bd4020811ada6a4 Author: Tobias Klauser Date: Fri Jun 2 10:20:53 2017 +0200 irqchip/i8259: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Signed-off-by: Marc Zyngier drivers/irqchip/irq-i8259.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 173bda53b3403d7278d74c4dabedf3d4325a2f89 Author: Chen-Yu Tsai Date: Tue Jun 6 13:59:28 2017 +0800 irqchip/sunxi-nmi: Support sun6i-a31-r-intc compatible The R_INTC on the A31 is undocumented. It was previously supported by the sun6i-a31-sc-nmi compatible. This compatible however required the register region to start at the first used register, rather than the boundaries laid out in the SoC's memory map. The new compatible fixes the alignment, while also naming it properly. Since the only difference between the old and new compatibles are a fixed offset for the registers, and since the old one is deprecated, this patch adds a set of register defines for the new compatible, while modifying the old set to reference the new set minus a fixed offset. Signed-off-by: Chen-Yu Tsai Signed-off-by: Marc Zyngier drivers/irqchip/irq-sunxi-nmi.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit cd647575ac2f0c72dfded033f1d8c36c4cf13aa6 Author: Chen-Yu Tsai Date: Tue Jun 6 13:59:27 2017 +0800 dt-bindings/interrupt-controller: sunxi-nmi: Add compatible for A31 R_INTC The A31 and later have an R_INTC block which handles the NMI interrupt pin on the SoC. This interrupt pin is used by the external PMIC to signal interrupts to the SoC. While this hardware block is undocumented, the interrupt offsets combined with the register regions for the existing "sun6i-a31-sc-nmi" compatible line up with the old interrupt controller found on the A10. Experiments show that only the first 32 interrupt lines can be enabled, and only the first (NMI) interrupt is actually connected. This patch adds a new, properly named compatible for the A31 R_INTC block, which requires the register region to be properly aligned to the block boundary. For comparison, the old "sun6i-a31-sc-nmi" compatible had its register region aligned with the first used register. This didn't match up with the memory map in the SoC's datasheet/user manual. Since the new compatible supercedes the old one, deprecate the old one. Signed-off-by: Chen-Yu Tsai Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/allwinner,sunxi-nmi.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 11b345ab79a1986fd9da365f646621d9ced9dcfb Author: Chen-Yu Tsai Date: Tue Jun 6 13:59:26 2017 +0800 irqchip/sunxi-nmi: Const-ify sunxi_sc_nmi_reg_offs structures The sunxi_sc_nmi_reg_offs, which hold the register offsets for the various variants, is never modified, and only used at init time within the init functions referenced by IRQCHIP_DECLARE, which themselves are tagged __init. Const-ify the sunxi_sc_nmi_reg_offs structures, and tag them as __initconst. Signed-off-by: Chen-Yu Tsai Signed-off-by: Marc Zyngier drivers/irqchip/irq-sunxi-nmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c81a248069cd2f48f6326c35e2cdbd181cbc403c Author: Chen-Yu Tsai Date: Tue Jun 6 13:59:25 2017 +0800 irqchip/sunxi-nmi: Reorder sunxi_sc_nmi_reg_offs' in ascending order This is a pure code move to reorder the various sunxi_sc_nmi_reg_offs' by family and alphabetical order. No functionality changes. Signed-off-by: Chen-Yu Tsai Signed-off-by: Marc Zyngier drivers/irqchip/irq-sunxi-nmi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e3ece0d5a31a588ced938d09f30c870ed9b2a2a6 Author: Chen-Yu Tsai Date: Tue Jun 6 13:59:24 2017 +0800 irqchip/sunxi-nmi: Document interrupt disabling and clearing at probe time The sunxi-nmi disables all its interrupts and clears any pending interrupts at probe time. Add comments documenting it, just to make it clear. Signed-off-by: Chen-Yu Tsai Signed-off-by: Marc Zyngier drivers/irqchip/irq-sunxi-nmi.c | 3 +++ 1 file changed, 3 insertions(+) commit 9ce18f6f0b0c7463fcdce70c35db17a891adc90d Author: Chen-Yu Tsai Date: Tue Jun 6 13:59:23 2017 +0800 irqchip/sunxi-nmi: Convert magic numbers to defines The sunxi-nmi driver has a bunch of raw register offsets and bit values. Convert them into define macros for better readability. Signed-off-by: Chen-Yu Tsai Signed-off-by: Marc Zyngier drivers/irqchip/irq-sunxi-nmi.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit ccc077292733f3143b444255fa5ec49a8ff2763b Author: Thomas Breitung Date: Mon Jun 19 16:40:04 2017 +0200 dmaengine: fsldma: set BWC, DAHTS and SAHTS values correctly The bits of BWC, DAHTS and SAHTS in the DMA mode register must be cleared before a new value can be or-ed in. Signed-off-by: Thomas Breitung Signed-off-by: Wolfgang Ocker Signed-off-by: Vinod Koul drivers/dma/fsldma.c | 5 ++++- drivers/dma/fsldma.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 13b2e1ba486f07ccd26e01c563b52a9171b2c255 Author: Bastien Nocera Date: Tue Jun 20 18:13:37 2017 +0200 HID: Add driver for Retrode2 joypad adapter This driver does 2 things: - Apply the MULTI_INPUT quirk to create separate joypad device nodes for each one of the 4 connectors. - Rename the input devices so that their names are different, and allow users to recognise which device corresponds to which physical port, including the SNES (Mario Paint) Mouse. Signed-off-by: Bastien Nocera Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 8 ++++ drivers/hid/Makefile | 1 + drivers/hid/hid-core.c | 3 ++ drivers/hid/hid-ids.h | 3 ++ drivers/hid/hid-retrode.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 115 insertions(+) commit 137ffd15f71ec29ff1a57728081569698591225a Author: Or Gerlitz Date: Tue Jun 13 18:12:13 2017 +0300 net/mlx5: Fix offset of hca cap reserved field The offending commit pushed fwd the field by two bits but didn't increment the offset, fix that. Currently, no damage was done b/c this is just a field name, but lets have it right. Fixes: f32f5bd2eb7e ('net/mlx5: Configure cache line size for start and end padding') Signed-off-by: Or Gerlitz Reported-by: Saeed Mahameed Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2e086c196b297f84c625d53471e3edc022db565 Author: Or Gerlitz Date: Sun May 21 18:25:46 2017 +0300 net/mlx5e: IPoIB, Support the flash device ethtool callback This callback further invokes the mlxfw module to flash the new firmware file to the device. Signed-off-by: Or Gerlitz Signed-off-by: Yotam Gigi Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3ffaabecd1a1a014a484f293c311b8ecb0545541 Author: Or Gerlitz Date: Tue Apr 18 17:48:46 2017 +0300 net/mlx5e: Support the flash device ethtool callback This callback further invokes the mlxfw module to flash the new firmware file to the device. As the firmware flash process takes about 20 seconds and ethtool takes the rtnl lock during the flash_device callback, we release the rtnl lock at the beginning of the flash process and take it again before leaving the callback. This way, rtnl is not held during the process. To make sure the device does not get deleted while being flashed, we take a reference to it before releasing rtnl lock. Signed-off-by: Or Gerlitz Signed-off-by: Yotam Gigi Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 35 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 62bd22cf326dc4ac5be673c11cef4602dc1f5e47 Author: Or Gerlitz Date: Tue Apr 18 15:55:33 2017 +0300 net/mlx5: Add mlxfw callbacks Add mlx5 implementation for the ones defined by the mlxfw shared module to be used while flashing the device firmware. The callbacks do their job through the MCQI, MCC and MCDA registers. Signed-off-by: Or Gerlitz Signed-off-by: Yotam Gigi Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fw.c | 154 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 + 2 files changed, 157 insertions(+) commit d2ad488b0073bd1a2c3f5d2ea50a7eb632103e5d Author: Or Gerlitz Date: Tue Apr 18 16:41:57 2017 +0300 net/mlx5: Add helper functions to set/query MCC/MCDA/MCQI registers To be used by the mlx5 callbacks exposed to the mlxfw module. Signed-off-by: Or Gerlitz Signed-off-by: Yotam Gigi Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fw.c | 114 +++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit 0ab87743cc8c5bcd482daf71961ed5fc45349e01 Author: Or Gerlitz Date: Sun Jun 11 15:25:38 2017 +0300 net/mlx5: Enhance MCAM reg to allow query on access reg support Enhance MCAM to allow the driver to query which access regs are supported. For now, expose the regs needed for FW flashing. Signed-off-by: Or Gerlitz Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 3 +++ include/linux/mlx5/mlx5_ifc.h | 13 +++++++++++++ 2 files changed, 16 insertions(+) commit 4717628938423fcba0aa8fa889e9fed4eb6a655f Author: Or Gerlitz Date: Tue Apr 18 13:35:39 2017 +0300 net/mlx5: Add MCC (Management Component Control) register definitions MCC (Management Component Control) allows to control a firmware component update. MCDA (Management Component Data Access) allows to read and write a firmware component. MCQI (Management Component Query Information) allows to query information about firmware components. Signed-off-by: Or Gerlitz Signed-off-by: Yotam Gigi Signed-off-by: Saeed Mahameed include/linux/mlx5/driver.h | 3 ++ include/linux/mlx5/mlx5_ifc.h | 82 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) commit c2df61376bf68c6532f75916a66c1473e1c99866 Author: Or Gerlitz Date: Tue Jun 6 17:40:54 2017 +0300 mlxfw: Make the module selectable There are upcoming NIC (mlx5) use-cases where people want to avoid building the mlxfw module, allow for that. The mlxsw module is untouched and keeps selecting mlxfw. Signed-off-by: Or Gerlitz Acked-by: Yotam Gigi Reviewed-by: Jiri Pirko Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlxfw/Kconfig | 8 +++++++- drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 0c0316f516f51e6fcd0b23d61c37f9f5f846f978 Author: Or Gerlitz Date: Tue Jun 13 11:09:57 2017 +0300 net/mlx5e: Add header re-write offloading of IPv6 hop-limit For environments where flow-based ipv6 router is offloaded. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 1 + include/linux/mlx5/mlx5_ifc.h | 1 + 2 files changed, 2 insertions(+) commit a8e4f0c4ced7cd41c61ebe5b8fef37f8a5fda8b5 Author: Or Gerlitz Date: Tue Jun 13 11:30:01 2017 +0300 net/mlx5e: Use macro for TC header re-write offload field mapping Use a macro for the static mapping between the enumeration of field supported by the firmware for header re-write to the corresponding network header field. This improves the readability of the code and doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 54 +++++++++++++------------ 1 file changed, 29 insertions(+), 25 deletions(-) commit a8ade55ffd1c1acef053a2d05f30e91a1c114f58 Author: Or Gerlitz Date: Wed Jun 7 17:49:56 2017 +0300 net/mlx5e: Offload TC matching on ip ttl Enable offloading of TC matching on ip ttl / hop-limit As matching on ttl is supported only by newer HW brands (ConnectX-5), we should do capability check before attempting to offload that. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 11 ++++++++--- include/linux/mlx5/mlx5_ifc.h | 5 +++-- 2 files changed, 11 insertions(+), 5 deletions(-) commit 1f97a5265f1ba990c8ac200fb1e31db4f6ff5bea Author: Or Gerlitz Date: Tue Jun 6 20:13:08 2017 +0300 net/mlx5e: Relocate the TC match on ip tos offload code section The code section for offloading matches on ip tos (L3) should come before and not after the one that deals with tcp/udp (L4) matches. Otherwise, we might come up with wrong min-inline requirement, when one attempts to match on both L3 and L4. Fixes: fd7da28b280d ('net/mlx5e: Offload TC matching on ip tos / traffic-class') Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 46 ++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit accd58833237d4ad835f7f176303ac2b582704e3 Author: Tariq Toukan Date: Sun Jan 29 17:42:26 2017 +0200 net/mlx5e: Introduce RX Page-Reuse Introduce a Page-Reuse mechanism in non-Striding RQ RX datapath. A WQE (RX descriptor) buffer is a page, that in most cases was fully wasted on a packet that is much smaller, requiring a new page for the next round. In this patch, we implement a page-reuse mechanism, that resembles a `SW Striding RQ`. We allow the WQE to reuse its allocated page as much as it could, until the page is fully consumed. In each round, the WQE is capable of receiving packet of maximal size (MTU). Yet, upon the reception of a packet, the WQE knows the actual packet size, and consumes the exact amount of memory needed to build a linear SKB. Then, it updates the buffer pointer within the page accordingly, for the next round. Feature is mutually exclusive with XDP (packet-per-page) and LRO (session size is a power of two, needs unused page). Performance tests: iperf tcp tests show huge gain: -------------------------------------------- num streams | BW before | BW after | ratio | 1 | 22.2 | 30.9 | 1.39x | 8 | 64.2 | 93.6 | 1.46x | 64 | 56.7 | 91.4 | 1.61x | -------------------------------------------- Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 12 ++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 28 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 119 ++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 4 + 4 files changed, 126 insertions(+), 37 deletions(-) commit bce2b2bf66825a56f66229980a30884704cba3d2 Author: Tariq Toukan Date: Tue Jan 31 16:48:59 2017 +0200 net/mlx5e: Enhance RX SKB headroom logic In the RX memory scheme of non Striding RQ, we use linear SKBs. Keeping NET_IP_ALIGN in headroom can improve performance on some archs. In addition, take this headroom into account when calculating the LRO WQE size. These are not needed in Striding RQ as they're done implicitly within the non-linear SKB allocation. Fixes: 1bfecfca565c ("net/mlx5e: Build RX SKB on demand") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) commit 78aedd327982ddd3cbb6ffc58f6fe0179cb6238b Author: Tariq Toukan Date: Wed Jan 18 14:28:53 2017 +0200 net/mlx5e: Build SKB with exact frag_size Build the SKB over the receive packet instead of the whole page. Getting the SKB's linear data and shared_info closer improves locality. In addition, this opens up the possibility to make use of other parts of the page in the downstream page-reuse patch. Fixes: 1bfecfca565c ("net/mlx5e: Build RX SKB on demand") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +----- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 +++- 3 files changed, 6 insertions(+), 6 deletions(-) commit 9ce3a72cd7f7e0b9ba1c5952e4461b363824bca9 Author: Joerg Roedel Date: Thu Jun 22 12:16:33 2017 +0200 iommu/amd: Free already flushed ring-buffer entries before full-check To benefit from IOTLB flushes on other CPUs we have to free the already flushed IOVAs from the ring-buffer before we do the queue_ring_full() check. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit ffa080ebb5405b27b0b84a3a75c9cdf4ed3d28da Author: Joerg Roedel Date: Fri Jun 16 16:10:00 2017 +0200 iommu/amd: Remove amd_iommu_disabled check from amd_iommu_detect() This check needs to happens later now, when all previously enabled IOMMUs have been disabled. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 3 --- 1 file changed, 3 deletions(-) commit 7ad820e43330bbf974792c5ab4e2c2355e08d597 Author: Joerg Roedel Date: Fri Jun 16 16:09:59 2017 +0200 iommu/amd: Free IOMMU resources when disabled on command line After we made sure that all IOMMUs have been disabled we need to make sure that all resources we allocated are released again. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f601927136d69be49f0a14ae820b44c02fa591ba Author: Joerg Roedel Date: Fri Jun 16 16:09:58 2017 +0200 iommu/amd: Set global pointers to NULL after freeing them Avoid any tries to double-free these pointers. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 5 +++++ 1 file changed, 5 insertions(+) commit 151b09031a76ba6b6b83f94953074d6f10aa30b3 Author: Joerg Roedel Date: Fri Jun 16 16:09:57 2017 +0200 iommu/amd: Check for error states first in iommu_go_to_state() Check if we are in an error state already before calling into state_next(). Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b1e942e344d3d41de187c1275024e915cb15844 Author: Joerg Roedel Date: Fri Jun 16 16:09:56 2017 +0200 iommu/amd: Add new init-state IOMMU_CMDLINE_DISABLED This will be used when during initialization we detect that the iommu should be disabled. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 90b3eb03e1b2b2ece299c485ae9da0cd221e700d Author: Joerg Roedel Date: Fri Jun 16 16:09:55 2017 +0200 iommu/amd: Rename free_on_init_error() The function will also be used to free iommu resources when amd_iommu=off was specified on the kernel command line. So rename the function to reflect that. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 111237415393acdef9b4f700c747a2e92c9be62e Author: Joerg Roedel Date: Fri Jun 16 16:09:54 2017 +0200 iommu/amd: Disable IOMMUs at boot if they are enabled When booting, make sure the IOMMUs are disabled. They could be previously enabled if we boot into a kexec or kdump kernel. So make sure they are off. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 3 +++ 1 file changed, 3 insertions(+) commit 664d00d187608c66904e62ff2f24e7df49611ba5 Author: Arnd Bergmann Date: Thu Jun 22 00:09:23 2017 +0200 ASoC: es8316: add I2C dependency Without CONFIG_I2C, we get a build failure: sound/soc/codecs/es8316.c:633:1: error: data definition has no type or storage class [-Werror] sound/soc/codecs/es8316.c:633:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int] sound/soc/codecs/es8316.c:633:1: error: parameter names (without types) in function declaration [-Werror] sound/soc/codecs/es8316.c:623:26: error: 'es8316_i2c_driver' defined but not used [-Werror=unused-variable] This adds the required Kconfig dependency. Fixes: b8b88b70875a ("ASoC: add es8316 codec driver") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1943b0661184a5d17f31624dc8ac2c02a086c998 Author: Colin Ian King Date: Thu Jun 22 10:32:31 2017 +0100 ASoC: max9867: make array ni_div static const The array ni_div does not need to be in global scope and is not modified, so make it static const. Cleans up sparse warning: "symbol 'ni_div' was not declared. Should it be static?" Signed-off-by: Colin Ian King Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cae025577f447fa69e55f194b1f3b078f5fbc25 Author: Martin Schwidefsky Date: Wed Jun 21 16:49:15 2017 +0200 KVM: s390: avoid packed attribute For naturally aligned and sized data structures avoid superfluous packed and aligned attributes. Signed-off-by: Martin Schwidefsky Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 18 +++++++++--------- arch/s390/kvm/gaccess.c | 4 ++-- arch/s390/kvm/vsie.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) commit 2c1a48f2e5ed31b881eaa003a6276818a4794485 Author: Yi Min Zhao Date: Wed Jun 7 16:09:52 2017 +0800 KVM: S390: add new group for flic In some cases, userspace needs to get or set all ais states for example migration. So we introduce a new group KVM_DEV_FLIC_AISM_ALL to provide interfaces to get or set the adapter-interruption-suppression mode for all ISCs. The corresponding documentation is updated. Signed-off-by: Yi Min Zhao Reviewed-by: Halil Pasic Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/devices/s390_flic.txt | 15 ++++++++ arch/s390/include/uapi/asm/kvm.h | 6 ++++ arch/s390/kvm/interrupt.c | 48 +++++++++++++++++++++++++ 3 files changed, 69 insertions(+) commit 6ae1574c2a24eec5efa8bac305a8f87c839acc64 Author: Christian Borntraeger Date: Wed Jun 7 12:45:22 2017 +0200 KVM: s390: implement instruction execution protection for emulated ifetch While currently only used to fetch the original instruction on failure for getting the instruction length code, we should make the page table walking code future proof. Suggested-by: Heiko Carstens Signed-off-by: Christian Borntraeger Reviewed-by: Heiko Carstens Signed-off-by: Christian Borntraeger arch/s390/include/asm/ctl_reg.h | 4 +++- arch/s390/kvm/gaccess.c | 39 +++++++++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 11 deletions(-) commit 4036e3874a1ce41a4f7267289f9a0d8e5cd49408 Author: Claudio Imbrenda Date: Thu Aug 4 17:58:47 2016 +0200 KVM: s390: ioctls to get and set guest storage attributes * Add the struct used in the ioctls to get and set CMMA attributes. * Add the two functions needed to get and set the CMMA attributes for guest pages. * Add the two ioctls that use the aforementioned functions. Signed-off-by: Claudio Imbrenda Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/api.txt | 135 +++++++++++++++++++++++++ arch/s390/kvm/kvm-s390.c | 202 +++++++++++++++++++++++++++++++++++++- include/uapi/linux/kvm.h | 33 +++++++ 3 files changed, 369 insertions(+), 1 deletion(-) commit 190df4a212a708fdd18f6cabfdd82594c91fdf25 Author: Claudio Imbrenda Date: Thu Aug 4 17:54:42 2016 +0200 KVM: s390: CMMA tracking, ESSA emulation, migration mode * Add a migration state bitmap to keep track of which pages have dirty CMMA information. * Disable CMMA by default, so we can track if it's used or not. Enable it on first use like we do for storage keys (unless we are doing a migration). * Creates a VM attribute to enter and leave migration mode. * In migration mode, CMMA is disabled in the SIE block, so ESSA is always interpreted and emulated in software. * Free the migration state on VM destroy. Signed-off-by: Claudio Imbrenda Acked-by: Cornelia Huck Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/devices/vm.txt | 33 +++++++ arch/s390/include/asm/kvm_host.h | 9 ++ arch/s390/include/uapi/asm/kvm.h | 6 ++ arch/s390/kvm/kvm-s390.c | 159 ++++++++++++++++++++++++++++++- arch/s390/kvm/priv.c | 103 +++++++++++++++++++- 5 files changed, 304 insertions(+), 6 deletions(-) commit 387bc8b5536eeb0a92f4b4ab553539eaea2ac0ba Author: Frederic Weisbecker Date: Mon Jun 19 04:12:02 2017 +0200 sched/fair: Spare idle load balancing on nohz_full CPUs Although idle load balancing obviously only concerns idle CPUs, it can be a disturbance on a busy nohz_full CPU. Indeed a CPU can only get rid of an idle load balancing duty once a tick fires while it runs a task and this can take a while on a nohz_full CPU. We could fix that and escape the idle load balancing duty from the very idle exit path but that would bring unecessary overhead. Lets just not bother and leave that job to housekeeping CPUs (those outside nohz_full range). The nohz_full CPUs simply don't want any disturbance. Signed-off-by: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1497838322-10913-4-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 4 ++++ 1 file changed, 4 insertions(+) commit a0db971e4eb69fc84eb3d7ef94f718b483550b4a Author: Frederic Weisbecker Date: Mon Jun 19 04:12:01 2017 +0200 nohz: Move idle balancer registration to the idle path The idle load balancing registration path assumes that we only stop the tick when the CPU is idle, ignoring the nohz full case. As a result, a nohz full CPU that is running a task may be chosen to perform idle load balancing. Lets make sure that only CPUs in dynticks idle mode can be picked as idle load balancers. Signed-off-by: Frederic Weisbecker Acked-by: Rik van Riel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1497838322-10913-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/time/tick-sched.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3c85d6db5e5f05ae6c3d7f5a0ceceb43746a5ca7 Author: Frederic Weisbecker Date: Mon Jun 19 04:12:00 2017 +0200 sched/loadavg: Generalize "_idle" naming to "_nohz" The loadavg naming code still assumes that nohz == idle whereas its code is actually handling well both nohz idle and nohz full. So lets fix the naming according to what the code actually does, to unconfuse the reader. Signed-off-by: Frederic Weisbecker Acked-by: Rik van Riel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1497838322-10913-2-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar Documentation/trace/ftrace.txt | 2 +- include/linux/sched/nohz.h | 8 +++---- kernel/sched/loadavg.c | 51 +++++++++++++++++++++--------------------- kernel/time/tick-sched.c | 4 ++-- 4 files changed, 33 insertions(+), 32 deletions(-) commit fe2d48b805d01e14ddb8144de01de43171eb516f Author: Jiri Bohac Date: Fri Jun 16 18:16:02 2017 +0200 x86/debug: Extend the lower bound of crash kernel low reservations The following change in 2013: 0212f9159694 ("x86: Add Crash kernel low reservation") ... introduced reserve_crashkernel_low(). This function is used to reserve crash kernel memory either if crashkernel=size,low is given on the command line or if the region reserved by reserve_crashkernel is entirely above 4G. reserve_crashkernel_low() tries to find a block of 'low_size' bytes. But there seems to be no good reason to restrict the lower bound of the range to 'low_size'. Make memblock_find_in_range() search from the start of memory. Signed-off-by: Jiri Bohac Cc: Eric Biederman Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yinghai Lu Link: http://lkml.kernel.org/r/20170616161602.2r7birrf2y3ylv6v@dwarf.suse.cz Signed-off-by: Ingo Molnar arch/x86/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d54368127a11c6da0776c109a4c65a7b6a815f32 Author: Andy Lutomirski Date: Tue Jun 20 22:22:09 2017 -0700 x86/mm: Remove reset_lazy_tlbstate() The only call site also calls idle_task_exit(), and idle_task_exit() puts us into a clean state by explicitly switching to init_mm. Signed-off-by: Andy Lutomirski Reviewed-by: Rik van Riel Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Mel Gorman Cc: Nadav Amit Cc: Peter Zijlstra Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/3acc7ad02a2ec060d2321a1e0f6de1cb90069517.1498022414.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 8 -------- arch/x86/kernel/smpboot.c | 1 - 2 files changed, 9 deletions(-) commit 7353425881b170a24990b4d3bdcd14b1156fa8bd Author: Andy Lutomirski Date: Tue Jun 20 22:22:08 2017 -0700 x86/ldt: Simplify the LDT switching logic Originally, Linux reloaded the LDT whenever the prev mm or the next mm had an LDT. It was changed in 2002 in: 0bbed3beb4f2 ("[PATCH] Thread-Local Storage (TLS) support") (commit from the historical tree), like this: - /* load_LDT, if either the previous or next thread - * has a non-default LDT. + /* + * load the LDT, if the LDT is different: */ - if (next->context.size+prev->context.size) + if (unlikely(prev->context.ldt != next->context.ldt)) load_LDT(&next->context); The current code is unlikely to avoid any LDT reloads, since different mms won't share an LDT. When we redo lazy mode to stop flush IPIs without switching to init_mm, though, the current logic would become incorrect: it will be possible to have real_prev == next but nonetheless have a stale LDT descriptor. Simplify the code to update LDTR if either the previous or the next mm has an LDT, i.e. effectively restore the historical logic.. While we're at it, clean up the code by moving all the ifdeffery to a header where it belongs. Signed-off-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Acked-by: Rik van Riel Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Mel Gorman Cc: Nadav Amit Cc: Peter Zijlstra Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/2a859ac01245f9594c58f9d0a8b2ed8a7cd2507e.1498022414.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 26 ++++++++++++++++++++++++++ arch/x86/mm/tlb.c | 20 ++------------------ 2 files changed, 28 insertions(+), 18 deletions(-) commit a4eb8b993554d374002663200bf5721f7f2ee259 Merge: 2617967 8d829b9 Author: Ingo Molnar Date: Thu Jun 22 10:57:28 2017 +0200 Merge branch 'linus' into x86/mm, to pick up fixes Signed-off-by: Ingo Molnar commit 30b4c54ccdebfc5a0210d9a4d77cc3671c9d1576 Author: Gary R Hook Date: Mon Jun 19 12:31:17 2017 -0500 crypto: ccp - Release locks before returning krobot warning: make sure that all error return paths release locks. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-debugfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f2339eb9b9b01c6728ed36c274ca381bc6c452c0 Author: Dan Carpenter Date: Mon Jun 19 13:51:25 2017 +0300 crypto: cavium/nitrox - dma_mapping_error() returns bool We want to return negative error codes here, but we're accidentally propogating the "true" return from dma_mapping_error(). Fixes: 14fa93cdcd9b ("crypto: cavium - Add support for CNN55XX adapters.") Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu drivers/crypto/cavium/nitrox/nitrox_reqmgr.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 8bd1d400f6a4d1fdcf79c64012602518781573e5 Author: Benjamin Peterson Date: Sun Jun 18 23:53:41 2017 -0700 crypto: doc - fix typo in docs Signed-off-by: Benjamin Peterson Signed-off-by: Herbert Xu Documentation/crypto/userspace-if.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f89b39bc60a8ea42e9e4b0f2e80659e7b22b003 Author: Antoine Ténart Date: Wed May 24 16:10:31 2017 +0200 Documentation/bindings: Document the SafeXel cryptographic engine driver The Inside Secure Safexcel cryptographic engine is found on some Marvell SoCs (7k/8k). Document the bindings used by its driver. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu .../bindings/crypto/inside-secure-safexcel.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 019d62db54017f4639fd7d4f6592f5a116a16695 Author: Horia Geantă Date: Mon Jun 19 11:44:46 2017 +0300 crypto: caam - fix gfp allocation flags (part II) This is the 2nd part of fixing the usage of GFP_KERNEL for memory allocations, taking care off all the places that haven't caused a real problem / failure. Again, the issue being fixed is that GFP_KERNEL should be used only when MAY_SLEEP flag is set, i.e. MAY_BACKLOG flag usage is orthogonal. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 7 +++---- drivers/crypto/caam/caamalg_qi.c | 10 ++++------ drivers/crypto/caam/caamhash.c | 32 ++++++++++++++++---------------- drivers/crypto/caam/caampkc.c | 4 ++-- 4 files changed, 25 insertions(+), 28 deletions(-) commit 42cfcafb91dabb0f9d9e08396c39824535948c67 Author: Horia Geantă Date: Mon Jun 19 11:44:45 2017 +0300 crypto: caam - fix gfp allocation flags (part I) Changes in the SW cts (ciphertext stealing) code in commit 0605c41cc53ca ("crypto: cts - Convert to skcipher") revealed a problem in the CAAM driver: when cts(cbc(aes)) is executed and cts runs in SW, cbc(aes) is offloaded in CAAM; cts encrypts the last block in atomic context and CAAM incorrectly decides to use GFP_KERNEL for memory allocation. Fix this by allowing GFP_KERNEL (sleeping) only when MAY_SLEEP flag is set, i.e. remove MAY_BACKLOG flag. We split the fix in two parts - first is sent to -stable, while the second is not (since there is no known failure case). Link: http://lkml.kernel.org/g/20170602122446.2427-1-david@sigma-star.at Cc: # 4.8+ Reported-by: David Gstir Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b61929c654f2e725644935737c4c1ea9c741e2f8 Author: Stephan Mueller Date: Fri May 26 12:11:31 2017 +0200 crypto: drbg - Fixes panic in wait_for_completion call Initialise ctr_completion variable before use. Cc: Signed-off-by: Harsh Jain Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/drbg.c | 1 + 1 file changed, 1 insertion(+) commit 538ac46c64a6bc61e71982091fc1eef0026f322e Author: Dou Liyang Date: Thu Jun 22 11:15:41 2017 +0800 x86/apic: Make arch_init_msi/htirq_domain __init These two functions are only called by arch_early_irq_init(), which is an __init function, so mark them __init as well. Signed-off-by: Dou Liyang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1498101341-10182-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/htirq.c | 2 +- arch/x86/kernel/apic/msi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a884d25f383133c845d23c2cce929ba15994ca62 Author: Dou Liyang Date: Wed Jun 21 18:14:21 2017 +0800 x86/apic: Make init_legacy_irqs() __init This function is only called by arch_early_irq_init(), which is an __init function, so mark the child function __init as well. In addition mark it inline for the !CONFIG_X86_IO_APIC case. Signed-off-by: Dou Liyang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1498040061-5332-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/vector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f9e169883164390a15b56d00cb7e22c2e72f4dba Merge: cde50a6 8d829b9 Author: Ingo Molnar Date: Thu Jun 22 10:19:14 2017 +0200 Merge branch 'linus' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit d4cfb11387ee29ba4626546c676fd25c7abbbbb2 Author: Paul Mackerras Date: Sat May 27 18:04:52 2017 +1000 powerpc: Convert VDSO update function to use new update_vsyscall interface This converts the powerpc VDSO time update function to use the new interface introduced in commit 576094b7f0aa ("time: Introduce new GENERIC_TIME_VSYSCALL", 2012-09-11). Where the old interface gave us the time as of the last update in seconds and whole nanoseconds, with the new interface we get the nanoseconds part effectively in a binary fixed-point format with tk->tkr_mono.shift bits to the right of the binary point. With the old interface, the fractional nanoseconds got truncated, meaning that the value returned by the VDSO clock_gettime function would have about 1ns of jitter in it compared to the value computed by the generic timekeeping code in the kernel. The powerpc VDSO time functions (clock_gettime and gettimeofday) already work in units of 2^-32 seconds, or 0.23283 ns, because that makes it simple to split the result into seconds and fractional seconds, and represent the fractional seconds in either microseconds or nanoseconds. This is good enough accuracy for now, so this patch avoids changing how the VDSO works or the interface in the VDSO data page. This patch converts the powerpc update_vsyscall_old to be called update_vsyscall and use the new interface. We convert the fractional second to units of 2^-32 seconds without truncating to whole nanoseconds. (There is still a conversion to whole nanoseconds for any legacy users of the vdso_data/systemcfg stamp_xtime field.) In addition, this improves the accuracy of the computation of tb_to_xs for those systems with high-frequency timebase clocks (>= 268.5 MHz) by doing the right shift in two parts, one before the multiplication and one after, rather than doing the right shift before the multiplication. (We can't do all of the right shift after the multiplication unless we use 128-bit arithmetic.) Signed-off-by: Paul Mackerras Acked-by: John Stultz Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 2 +- arch/powerpc/kernel/time.c | 68 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 53 insertions(+), 17 deletions(-) commit c1a5d5f6ab21eb7e6ff8cb99489d9001cf2a2850 Author: Tahsin Erdogan Date: Wed Jun 21 22:28:40 2017 -0400 ext4: improve journal credit handling in set xattr paths Both ext4_set_acl() and ext4_set_context() need to be made aware of ea_inode feature when it comes to credits calculation. Also add a sufficient credits check in ext4_xattr_set_handle() right after xattr write lock is grabbed. Original credits calculation is done outside the lock so there is a possiblity that the initially calculated credits are not sufficient anymore. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/acl.c | 7 ++++--- fs/ext4/ext4_jbd2.h | 14 -------------- fs/ext4/super.c | 6 +++--- fs/ext4/xattr.c | 55 +++++++++++++++++++++++++++++++++++++++++------------ fs/ext4/xattr.h | 1 + 5 files changed, 51 insertions(+), 32 deletions(-) commit 65d3000520c50f3c160403a210a7504d789eafca Author: Tahsin Erdogan Date: Wed Jun 21 22:24:38 2017 -0400 ext4: ext4_xattr_delete_inode() should return accurate errors In a few places the function returns without trying to pass the actual error code to the caller. Fix those. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit b347e2bcd18eba7ed44659d12e4a39a9b5bdc873 Author: Tahsin Erdogan Date: Wed Jun 21 22:20:32 2017 -0400 ext4: retry storing value in external inode with xattr block too When value size is <= EXT4_XATTR_MIN_LARGE_EA_SIZE(), and it doesn't fit in either inline or xattr block, a second try is made to store it in an external inode while storing the entry itself in inline area. There should also be an attempt to store the entry in xattr block. This patch adds a retry loop to do that. It also makes the caller the sole decider on whether to store a value in an external inode. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit b3155298910c64a312620309f320d26e9461eb19 Author: Tahsin Erdogan Date: Wed Jun 21 22:16:20 2017 -0400 ext4: fix credits calculation for xattr inode When there is no space for a value in xattr block, it may be stored in an xattr inode even if the value length is less than EXT4_XATTR_MIN_LARGE_EA_SIZE(). So the current assumption in credits calculation is wrong. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7cec191894e4e2200d942415c3ebccb146214d26 Author: Tahsin Erdogan Date: Wed Jun 21 22:14:30 2017 -0400 ext4: fix ext4_xattr_cmp() When a xattr entry refers to an external inode, the value data is not available in the inline area so we should not attempt to read it using value offset. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f6109100ba8692c677cfdc88af1887a43263e63a Author: Tahsin Erdogan Date: Wed Jun 21 22:11:54 2017 -0400 ext4: fix ext4_xattr_move_to_block() When moving xattr entries from inline area to a xattr block, entries that refer to external xattr inodes need special handling because value data is not available in the inline area but rather should be read from its external inode. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 9bb21cedda7cd69789e1f93d7d918f5ca48ba165 Author: Tahsin Erdogan Date: Wed Jun 21 22:05:44 2017 -0400 ext4: fix ext4_xattr_make_inode_space() value size calculation ext4_xattr_make_inode_space() is interested in calculating the inline space used in an inode. When a xattr entry refers to an external inode the value size indicates the external inode size, not the value size in the inline area. Change the function to take this into account. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 0bd454c04f02e7bb101d8ff510b54826eda4a5f0 Author: Tahsin Erdogan Date: Wed Jun 21 22:02:06 2017 -0400 ext4: ext4_xattr_value_same() should return false for external data ext4_xattr_value_same() is used as a quick optimization in case the new xattr value is identical to the previous value. When xattr value is stored in a xattr inode the check becomes expensive so it is better to just assume that they are not equal. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 3 +++ 1 file changed, 3 insertions(+) commit 990461dd85d57875accc798919e6fe42ab7e294d Author: Tahsin Erdogan Date: Wed Jun 21 21:59:30 2017 -0400 ext4: add missing le32_to_cpu(e_value_inum) conversions Two places in code missed converting xattr inode number using le32_to_cpu(). Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 909666933210eb145bc93426ce07f66bf3d1f798 Author: Tahsin Erdogan Date: Wed Jun 21 21:57:36 2017 -0400 ext4: clean up ext4_xattr_inode_get() The input and output values of *size parameter are equal on successful return from ext4_xattr_inode_get(). On error return, the callers ignore the output value so there is no need to update it. Also check for NULL return from ext4_bread(). If the actual xattr inode size happens to be smaller than the expected size, ext4_bread() may return NULL which would indicate data corruption. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit bab79b04999ccbbf59f1693d0783cd6ae27e4278 Author: Tahsin Erdogan Date: Wed Jun 21 21:49:53 2017 -0400 ext4: change ext4_xattr_inode_iget() signature In general, kernel functions indicate success/failure through their return values. This function returns the status as an output parameter and reserves the return value for the inode. Make it follow the general convention. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 73 +++++++++++++++++++++++++++++++-------------------------- fs/ext4/xattr.h | 2 -- 2 files changed, 40 insertions(+), 35 deletions(-) commit 0eefb10758e696616f19a84d8c5f15b9ffc0dccd Author: Tahsin Erdogan Date: Wed Jun 21 21:41:37 2017 -0400 ext4: extended attribute value size limit is enforced by vfs EXT4_XATTR_MAX_LARGE_EA_SIZE definition in ext4 is currently unused. Besides, vfs enforces its own 64k limit which makes the 1MB limit in ext4 redundant. Remove it. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 6 ------ 1 file changed, 6 deletions(-) commit 1e7d359d710e84b996bd034f4ecc7c721e445603 Author: Tahsin Erdogan Date: Wed Jun 21 21:39:38 2017 -0400 ext4: fix ref counting for ea_inode The ref count on ea_inode is incremented by ext4_xattr_inode_orphan_add() which is supposed to be decremented by ext4_xattr_inode_array_free(). The decrement is conditioned on whether the ea_inode is currently on the orphan list. However, the orphan list addition only happens when journaling is enabled. In non-journaled case,r we fail to release the ref count causing an error message like below. "VFS: Busy inodes after unmount of sdb. Self-destruct in 5 seconds. Have a nice day..." Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ddfa17e4adc4bd19c32216aaa6250dc38b0579df Author: Tahsin Erdogan Date: Wed Jun 21 21:36:51 2017 -0400 ext4: call journal revoke when freeing ea_inode blocks ea_inode contents are treated as metadata, that's why it is journaled during initial writes. Failing to call revoke during freeing could cause user data to be overwritten with original ea_inode contents during journal replay. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 3 ++- fs/ext4/indirect.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 9e1ba00161a6f3bec8d4e7912025cbf889878e59 Author: Tahsin Erdogan Date: Wed Jun 21 21:27:00 2017 -0400 ext4: ea_inode owner should be the same as the inode owner Quota charging is based on the ownership of the inode. Currently, the xattr inode owner is set to the caller which may be different from the parent inode owner. This is inconsistent with how quota is charged for xattr block and regular data block writes. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2ed4f9dd19c0f76f7fb56c4b201696d29149325c Author: Paul Mackerras Date: Wed Jun 21 16:01:27 2017 +1000 KVM: PPC: Book3S HV: Add capability to report possible virtual SMT modes Now that userspace can set the virtual SMT mode by enabling the KVM_CAP_PPC_SMT capability, it is useful for userspace to be able to query the set of possible virtual SMT modes. This provides a new capability, KVM_CAP_PPC_SMT_POSSIBLE, to provide this information. The return value is a bitmap of possible modes, with bit N set if virtual SMT mode 2^N is available. That is, 1 indicates SMT1 is available, 2 indicates that SMT2 is available, 3 indicates that both SMT1 and SMT2 are available, and so on. Signed-off-by: Paul Mackerras Documentation/virtual/kvm/api.txt | 11 +++++++++++ arch/powerpc/kvm/powerpc.c | 10 ++++++++++ include/uapi/linux/kvm.h | 1 + 3 files changed, 22 insertions(+) commit e20bbd3d8d5c4432db8fd6f091b096963236064f Author: Aravinda Prasad Date: Thu May 11 16:33:37 2017 +0530 KVM: PPC: Book3S HV: Exit guest upon MCE when FWNMI capability is enabled Enhance KVM to cause a guest exit with KVM_EXIT_NMI exit reason upon a machine check exception (MCE) in the guest address space if the KVM_CAP_PPC_FWNMI capability is enabled (instead of delivering a 0x200 interrupt to guest). This enables QEMU to build error log and deliver machine check exception to guest via guest registered machine check handler. This approach simplifies the delivery of machine check exception to guest OS compared to the earlier approach of KVM directly invoking 0x200 guest interrupt vector. This design/approach is based on the feedback for the QEMU patches to handle machine check exception. Details of earlier approach of handling machine check exception in QEMU and related discussions can be found at: https://lists.nongnu.org/archive/html/qemu-devel/2014-11/msg00813.html Note: This patch now directly invokes machine_check_print_event_info() from kvmppc_handle_exit_hv() to print the event to host console at the time of guest exit before the exception is passed on to the guest. Hence, the host-side handling which was performed earlier via machine_check_fwnmi is removed. The reasons for this approach is (i) it is not possible to distinguish whether the exception occurred in the guest or the host from the pt_regs passed on the machine_check_exception(). Hence machine_check_exception() calls panic, instead of passing on the exception to the guest, if the machine check exception is not recoverable. (ii) the approach introduced in this patch gives opportunity to the host kernel to perform actions in virtual mode before passing on the exception to the guest. This approach does not require complex tweaks to machine_check_fwnmi and friends. Signed-off-by: Aravinda Prasad Reviewed-by: David Gibson Signed-off-by: Mahesh Salgaonkar Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 2 ++ arch/powerpc/include/uapi/asm/kvm.h | 6 ++++ arch/powerpc/kvm/book3s_hv.c | 23 +++++++++------ arch/powerpc/kvm/book3s_hv_ras.c | 18 +++++++++++- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 52 +++++++++++++++++++-------------- 5 files changed, 69 insertions(+), 32 deletions(-) commit bd3b963b273e247e13979f98812a6e4979b5c1e4 Author: Tahsin Erdogan Date: Wed Jun 21 21:24:31 2017 -0400 ext4: attach jinode after creation of xattr inode In data=ordered mode jinode needs to be attached to the xattr inode when writing data to it. Attachment normally occurs during file open for regular files. Since we are not using file interface to write to the xattr inode, the jinode attach needs to be done manually. Otherwise the following crash occurs in data=ordered mode. BUG: unable to handle kernel NULL pointer dereference at (null) IP: jbd2_journal_file_inode+0x37/0x110 PGD 13b3c0067 P4D 13b3c0067 PUD 137660067 PMD 0 Oops: 0000 [#1] SMP CPU: 3 PID: 1877 Comm: python Not tainted 4.12.0-rc1+ #749 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff88010e368980 task.stack: ffffc90000374000 RIP: 0010:jbd2_journal_file_inode+0x37/0x110 RSP: 0018:ffffc90000377980 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff880123b06230 RCX: 0000000000280000 RDX: 0000000000000006 RSI: 0000000000000000 RDI: ffff88012c8585d0 RBP: ffffc900003779b0 R08: 0000000000000202 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000400 R12: ffff8801111f81c0 R13: ffff88013b2b6800 R14: ffffc90000377ab0 R15: 0000000000000001 FS: 00007f0c99b77740(0000) GS:ffff88013fd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000136d91000 CR4: 00000000000006e0 Call Trace: jbd2_journal_inode_add_write+0xe/0x10 ext4_map_blocks+0x59e/0x620 ext4_xattr_set_entry+0x501/0x7d0 ext4_xattr_block_set+0x1b2/0x9b0 ext4_xattr_set_handle+0x322/0x4f0 ext4_xattr_set+0x144/0x1a0 ext4_xattr_user_set+0x34/0x40 __vfs_setxattr+0x66/0x80 __vfs_setxattr_noperm+0x69/0x1c0 vfs_setxattr+0xa2/0xb0 setxattr+0x12e/0x150 path_setxattr+0x87/0xb0 SyS_setxattr+0xf/0x20 entry_SYSCALL_64_fastpath+0x18/0xad Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1b917ed8ae0d4ce2ee3d6c56ac6748cd1cd92d4b Author: Tahsin Erdogan Date: Wed Jun 21 21:21:39 2017 -0400 ext4: do not set posix acls on xattr inodes We don't need acls on xattr inodes because they are not directly accessible from user mode. Besides lockdep complains about recursive locking of xattr_sem as seen below. ============================================= [ INFO: possible recursive locking detected ] 4.11.0-rc8+ #402 Not tainted --------------------------------------------- python/1894 is trying to acquire lock: (&ei->xattr_sem){++++..}, at: [] ext4_xattr_get+0x66/0x270 but task is already holding lock: (&ei->xattr_sem){++++..}, at: [] ext4_xattr_set_handle+0xa0/0x5d0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ei->xattr_sem); lock(&ei->xattr_sem); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by python/1894: #0: (sb_writers#10){.+.+.+}, at: [] mnt_want_write+0x1f/0x50 #1: (&sb->s_type->i_mutex_key#15){+.+...}, at: [] vfs_setxattr+0x57/0xb0 #2: (&ei->xattr_sem){++++..}, at: [] ext4_xattr_set_handle+0xa0/0x5d0 stack backtrace: CPU: 0 PID: 1894 Comm: python Not tainted 4.11.0-rc8+ #402 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x67/0x99 __lock_acquire+0x5f3/0x1830 lock_acquire+0xb5/0x1d0 down_read+0x2f/0x60 ext4_xattr_get+0x66/0x270 ext4_get_acl+0x43/0x1e0 get_acl+0x72/0xf0 posix_acl_create+0x5e/0x170 ext4_init_acl+0x21/0xc0 __ext4_new_inode+0xffd/0x16b0 ext4_xattr_set_entry+0x5ea/0xb70 ext4_xattr_block_set+0x1b5/0x970 ext4_xattr_set_handle+0x351/0x5d0 ext4_xattr_set+0x124/0x180 ext4_xattr_user_set+0x34/0x40 __vfs_setxattr+0x66/0x80 __vfs_setxattr_noperm+0x69/0x1c0 vfs_setxattr+0xa2/0xb0 setxattr+0x129/0x160 path_setxattr+0x87/0xb0 SyS_setxattr+0xf/0x20 entry_SYSCALL_64_fastpath+0x18/0xad Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 11 ++++++----- fs/ext4/ialloc.c | 14 +++++++++----- fs/ext4/migrate.c | 2 +- fs/ext4/xattr.c | 3 ++- 4 files changed, 18 insertions(+), 12 deletions(-) commit 0de5983d354adbf1c9fa57eca8b5dd8155132fb1 Author: Tahsin Erdogan Date: Wed Jun 21 21:19:16 2017 -0400 ext4: lock inode before calling ext4_orphan_add() ext4_orphan_add() requires caller to be holding the inode lock. Add missing lock statements. WARNING: CPU: 3 PID: 1806 at fs/ext4/namei.c:2731 ext4_orphan_add+0x4e/0x240 CPU: 3 PID: 1806 Comm: python Not tainted 4.12.0-rc1+ #746 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff880135d466c0 task.stack: ffffc900014b0000 RIP: 0010:ext4_orphan_add+0x4e/0x240 RSP: 0018:ffffc900014b3d50 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8801348fe1f0 RCX: ffffc900014b3c64 RDX: 0000000000000000 RSI: ffff8801348fe1f0 RDI: ffff8801348fe1f0 RBP: ffffc900014b3da0 R08: 0000000000000000 R09: ffffffff80e82025 R10: 0000000000004692 R11: 000000000000468d R12: ffff880137598000 R13: ffff880137217000 R14: ffff880134ac58d0 R15: 0000000000000000 FS: 00007fc50f09e740(0000) GS:ffff88013fd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000008bc2e0 CR3: 00000001375ac000 CR4: 00000000000006e0 Call Trace: ext4_xattr_inode_orphan_add.constprop.19+0x9d/0xf0 ext4_xattr_delete_inode+0x1c4/0x2f0 ext4_evict_inode+0x15a/0x7f0 evict+0xc0/0x1a0 iput+0x16a/0x270 do_unlinkat+0x172/0x290 SyS_unlink+0x11/0x20 entry_SYSCALL_64_fastpath+0x18/0xad Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 2 ++ 1 file changed, 2 insertions(+) commit 33d201e0277b2d496f66b621f63693ced2da4198 Author: Tahsin Erdogan Date: Wed Jun 21 21:17:10 2017 -0400 ext4: fix lockdep warning about recursive inode locking Setting a large xattr value may require writing the attribute contents to an external inode. In this case we may need to lock the xattr inode along with the parent inode. This doesn't pose a deadlock risk because xattr inodes are not directly visible to the user and their access is restricted. Assign a lockdep subclass to xattr inode's lock. ============================================ WARNING: possible recursive locking detected 4.12.0-rc1+ #740 Not tainted -------------------------------------------- python/1822 is trying to acquire lock: (&sb->s_type->i_mutex_key#15){+.+...}, at: [] ext4_xattr_set_entry+0x65a/0x7b0 but task is already holding lock: (&sb->s_type->i_mutex_key#15){+.+...}, at: [] vfs_setxattr+0x57/0xb0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sb->s_type->i_mutex_key#15); lock(&sb->s_type->i_mutex_key#15); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by python/1822: #0: (sb_writers#10){.+.+.+}, at: [] mnt_want_write+0x1f/0x50 #1: (&sb->s_type->i_mutex_key#15){+.+...}, at: [] vfs_setxattr+0x57/0xb0 #2: (jbd2_handle){.+.+..}, at: [] start_this_handle+0xf0/0x420 #3: (&ei->xattr_sem){++++..}, at: [] ext4_xattr_set_handle+0x9a/0x4f0 stack backtrace: CPU: 0 PID: 1822 Comm: python Not tainted 4.12.0-rc1+ #740 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x67/0x9e __lock_acquire+0x5f3/0x1750 lock_acquire+0xb5/0x1d0 down_write+0x2c/0x60 ext4_xattr_set_entry+0x65a/0x7b0 ext4_xattr_block_set+0x1b2/0x9b0 ext4_xattr_set_handle+0x322/0x4f0 ext4_xattr_set+0x144/0x1a0 ext4_xattr_user_set+0x34/0x40 __vfs_setxattr+0x66/0x80 __vfs_setxattr_noperm+0x69/0x1c0 vfs_setxattr+0xa2/0xb0 setxattr+0x12e/0x150 path_setxattr+0x87/0xb0 SyS_setxattr+0xf/0x20 entry_SYSCALL_64_fastpath+0x18/0xad Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 2 ++ fs/ext4/xattr.c | 8 ++++++++ fs/ext4/xattr.h | 6 ++++++ 3 files changed, 16 insertions(+) commit 1fae788ed640e2a961c2edab54bfd56c73e2506a Author: Viresh Kumar Date: Tue May 23 09:32:13 2017 +0530 PM / OPP: Don't create debugfs "supply-0" directory unnecessarily We create "supply-0" debugfs directory even if the device doesn't do voltage scaling. That looks confusing, as if the regulator is found but we never managed to get voltage levels for it. Avoid creating such a directory unnecessarily. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/debugfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 688a48b0d27000167e0450bc1243e29a560395ca Author: Viresh Kumar Date: Tue May 23 09:32:12 2017 +0530 PM / OPP: opp-microvolt is not optional if regulators are set If dev_pm_opp_set_regulators() is called for a device and its regulators are set in the OPP core, the OPP nodes for the device must contain the "opp-microvolt" property, otherwise there is something wrong and we better error out. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/of.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 478256bddb0323898694bd22acdf42a70d4ff024 Author: Viresh Kumar Date: Tue May 23 09:32:11 2017 +0530 PM / OPP: Don't create copy of regulators unnecessarily This code was required while the OPP core was managed with help of RCUs, but not anymore. Get rid of unnecessary alloc/memcpy operations. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit c74b32fadc00f2412d86a19295eb867b1a772948 Author: Viresh Kumar Date: Tue May 23 09:32:10 2017 +0530 PM / OPP: Reorganize _generic_set_opp_regulator() The code was overly complicated here because of the limitations that we had with RCUs (Couldn't use opp-table and OPPs outside RCU protected section and can't call sleep-able routines from within that). But that is long gone now. Reorganize _generic_set_opp_regulator() in order to avoid using "struct dev_pm_set_opp_data" and copying data into it for the case where opp_table->set_opp is not set. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 73 ++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 39 deletions(-) commit b4883ca449473e8879a062c1f55f9d062c168ae5 Author: Viresh Kumar Date: Tue May 16 10:52:43 2017 +0530 PM / Domains: pdd->dev can't be NULL in genpd_dev_pm_qos_notifier() The pm_domain_data (pdd) pointer is set from genpd_alloc_dev_data() and pdd->dev is guaranteed to be valid. There is no need to check pdd and pdd->dev in rest of the code as pdd->dev will always be valid for a non NULL pdd pointer. Signed-off-by: Viresh Kumar Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e50e5129f384ae282adebfb561189cdb19b81cee Author: Andreas Dilger Date: Wed Jun 21 21:10:32 2017 -0400 ext4: xattr-in-inode support Large xattr support is implemented for EXT4_FEATURE_INCOMPAT_EA_INODE. If the size of an xattr value is larger than will fit in a single external block, then the xattr value will be saved into the body of an external xattr inode. The also helps support a larger number of xattr, since only the headers will be stored in the in-inode space or the single external block. The inode is referenced from the xattr header via "e_value_inum", which was formerly "e_value_block", but that field was never used. The e_value_size still contains the xattr size so that listing xattrs does not need to look up the inode if the data is not accessed. struct ext4_xattr_entry { __u8 e_name_len; /* length of name */ __u8 e_name_index; /* attribute name index */ __le16 e_value_offs; /* offset in disk block of value */ __le32 e_value_inum; /* inode in which value is stored */ __le32 e_value_size; /* size of attribute value */ __le32 e_hash; /* hash value of name and value */ char e_name[0]; /* attribute name */ }; The xattr inode is marked with the EXT4_EA_INODE_FL flag and also holds a back-reference to the owning inode in its i_mtime field, allowing the ext4/e2fsck to verify the correct inode is accessed. [ Applied fix by Dan Carpenter to avoid freeing an ERR_PTR. ] Lustre-Jira: https://jira.hpdd.intel.com/browse/LU-80 Lustre-bugzilla: https://bugzilla.lustre.org/show_bug.cgi?id=4424 Signed-off-by: Kalpak Shah Signed-off-by: James Simmons Signed-off-by: Andreas Dilger Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o Signed-off-by: Dan Carpenter fs/ext4/ext4.h | 12 ++ fs/ext4/ialloc.c | 1 - fs/ext4/inline.c | 2 +- fs/ext4/inode.c | 49 ++++- fs/ext4/xattr.c | 563 ++++++++++++++++++++++++++++++++++++++++++++++++++----- fs/ext4/xattr.h | 33 +++- 6 files changed, 604 insertions(+), 56 deletions(-) commit c0944883c97c0ddc71da67cc731590a7c878a1a2 Author: Kees Cook Date: Tue May 9 14:00:51 2017 -0700 x86/power/64: Use char arrays for asm function names This switches the hibernate_64.S function names into character arrays to match other areas of the kernel where this is done (e.g., linker scripts). Specifically this fixes a compile-time error noticed by the future CONFIG_FORTIFY_SOURCE routines that complained about PAGE_SIZE being copied out of the "single byte" core_restore_code variable. Additionally drops the "acpi_save_state_mem" exern which does not appear to be used anywhere else in the kernel. Signed-off-by: Kees Cook Acked-by: Ingo Molnar Signed-off-by: Rafael J. Wysocki arch/x86/include/asm/suspend_64.h | 5 ++--- arch/x86/power/hibernate_64.c | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) commit e08ac99fa2a25626f573cfa377ef3ddedf2cfe8f Author: Artem Blagodarenko Date: Wed Jun 21 21:09:57 2017 -0400 ext4: add largedir feature This INCOMPAT_LARGEDIR feature allows larger directories to be created in ldiskfs, both with directory sizes over 2GB and and a maximum htree depth of 3 instead of the current limit of 2. These features are needed in order to exceed the current limit of approximately 10M entries in a single directory. This patch was originally written by Yang Sheng to support the Lustre server. [ Bumped the credits needed to update an indexed directory -- tytso ] Signed-off-by: Liang Zhen Signed-off-by: Yang Sheng Signed-off-by: Artem Blagodarenko Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger fs/ext4/ext4.h | 23 +++++++--- fs/ext4/ext4_jbd2.h | 9 +++- fs/ext4/inode.c | 4 +- fs/ext4/namei.c | 124 +++++++++++++++++++++++++++++++++++----------------- 4 files changed, 113 insertions(+), 47 deletions(-) commit 6a71d8d77795e0f7d887baa95bfc0d1d2bc74899 Author: Kieran Bingham Date: Tue Jun 6 12:37:41 2017 +0300 device property: Add fwnode_graph_get_port_parent Provide a helper to obtain the parent device fwnode without first parsing the remote-endpoint as per fwnode_graph_get_remote_port_parent. Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 28 ++++++++++++++++++++++++---- include/linux/property.h | 2 ++ 2 files changed, 26 insertions(+), 4 deletions(-) commit 125ee6b3b0fa920c730b0991e6f083a9f5b1e4c3 Author: Sakari Ailus Date: Tue Jun 6 12:37:40 2017 +0300 device property: Add FW type agnostic fwnode_graph_get_remote_node Add fwnode_graph_get_remote_node() function which is equivalent to of_graph_get_remote_node() on OF. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 37 +++++++++++++++++++++++++++++++++++++ include/linux/property.h | 2 ++ 2 files changed, 39 insertions(+) commit 2294b3af05e9b3fe0b84a78971e709037bd7593c Author: Sakari Ailus Date: Tue Jun 6 12:37:39 2017 +0300 device property: Introduce fwnode_device_is_available() Add fwnode_device_is_available() to tell whether the device corresponding to a certain fwnode_handle is available for use. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Acked-by: Rob Herring Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 9 +++++++++ drivers/base/property.c | 10 ++++++++++ drivers/of/property.c | 6 ++++++ include/linux/fwnode.h | 1 + include/linux/property.h | 1 + 5 files changed, 27 insertions(+) commit 3b27d00e7b6d7c889d87fd00df600c495b968e30 Author: Sakari Ailus Date: Tue Jun 6 12:37:38 2017 +0300 device property: Move fwnode graph ops to firmware specific locations Move firmware specific implementations of the fwnode graph operations to firmware specific locations. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Acked-by: Rob Herring Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 40 ++++++++++++++++++++++ drivers/base/property.c | 91 +++++-------------------------------------------- drivers/of/property.c | 52 ++++++++++++++++++++++++++++ include/linux/fwnode.h | 14 ++++++++ 4 files changed, 114 insertions(+), 83 deletions(-) commit 3708184afc77bb67709a67a35d9f367ebd32cbc4 Author: Sakari Ailus Date: Tue Jun 6 12:37:37 2017 +0300 device property: Move FW type specific functionality to FW specific files The device and fwnode property API supports Devicetree, ACPI and pset properties. The implementation of this functionality for each firmware type was embedded in the fwnode property core. Move it out to firmware type specific locations, making it easier to maintain. Depends-on: ("of: Move OF property and graph API from base.c to property.c") Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Acked-by: Rob Herring Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 68 ++++++++++++++++ drivers/acpi/scan.c | 1 + drivers/base/property.c | 208 +++++++++++++++++++----------------------------- drivers/of/property.c | 90 +++++++++++++++++++++ include/linux/acpi.h | 4 + include/linux/fwnode.h | 54 +++++++++++++ include/linux/of.h | 2 + 7 files changed, 302 insertions(+), 125 deletions(-) commit cde1f95f407a593ad6baf1b7b01daa2c6cbd34fd Author: Sakari Ailus Date: Tue Jun 6 12:37:36 2017 +0300 ACPI: Constify argument to acpi_device_is_present() This will be needed in constifying the fwnode API. The side effects the function had have been moved to the callers. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/device_pm.c | 4 +++- drivers/acpi/internal.h | 2 +- drivers/acpi/scan.c | 9 +++------ 3 files changed, 7 insertions(+), 8 deletions(-) commit 2b8153421de8c29864cb147f241804858440bfa1 Merge: 41f1830 d20dc14 Author: Rafael J. Wysocki Date: Thu Jun 22 02:54:52 2017 +0200 Merge branch 'dt/property-move' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DT-related device properties changes from Rob Herring. * 'dt/property-move' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: Support const and non-const use for to_of_node() of: Make of_fwnode_handle() safer of: Move OF property and graph API from base.c to property.c commit 772bf1e2878ecfca0d1f332071c83e021dd9cf01 Author: Jan Kiszka Date: Fri Jun 9 20:36:31 2017 +0200 ACPI: configfs: Unload SSDT on configfs entry removal Call directly into acpica to load a table to obtain its index on return. We choose the direct call of acpica internal functions to avoid having to modify its API which is used outside of Linux as well. Use that index to unload the table again when the corresponding directory in configfs gets removed. This allows to change SSDTs without rebooting the system. It also allows to destroy devices again that a dynamically loaded SSDT created. This is widely similar to the DT overlay behavior. Signed-off-by: Jan Kiszka Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_configfs.c | 20 +++++++++++++++++++- drivers/acpi/acpica/tbdata.c | 4 ++++ 2 files changed, 23 insertions(+), 1 deletion(-) commit b6aeab44ed387e5264d2969bc7deee993b29a515 Author: Vincent Legoll Date: Sat May 20 20:38:13 2017 +0200 ACPI: fix whitespace in pr_fmt() to align log entries See this dmesg extract before the patch: [ 0.679466] ACPI: Dynamic OEM Table Load: [ 0.679470] ACPI: SSDT 0xFFFF910F6B497E00 00018A (v02 PmRef ApCst 00003000 INTL 20160422) [ 0.679579] ACPI: Executed 1 blocks of module-level executable AML code [ 0.681477] ACPI : EC: EC started [ 0.681478] ACPI : EC: interrupt blocked [ 0.684798] ACPI: Interpreter enabled [ 0.684835] ACPI: (supports S0 S3 S4 S5) Signed-off-by: Vincent Legoll Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_dbg.c | 2 +- drivers/acpi/button.c | 2 +- drivers/acpi/ec.c | 2 +- drivers/acpi/ioapic.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 72ebe5a0b3505019d4e7592c0dd9281e0b9e44c7 Author: Hans de Goede Date: Sun May 14 23:35:39 2017 +0200 ACPI / PMIC: xpower: Add support for the GPI1 regulator to the OpRegion handler Some Bay Trail devices use a GPI1 regulator field (address 0x4c) in their 0x8d power OpRegion, add support for this. This fixes AE_BAD_PARAMETER errors getting thrown on these devices and fixes these errors causing these devices to not suspend. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/pmic/intel_pmic_xpower.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit ae3f4151737d2aad271e5b1f2553c5d56e52850c Author: Masahiro Yamada Date: Fri Jun 9 17:29:52 2017 +0900 kbuild: replace genhdr-y with generated-y Originally, generated-y and genhdr-y had different meaning, like follows: - generated-y: generated headers (other than asm-generic wrappers) - header-y : headers to be exported - genhdr-y : generated headers to be exported (generated-y + header-y) Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), headers under UAPI directories are all exported. So, there is no more difference between generated-y and genhdr-y. We see two users of genhdr-y, arch/{arm,x86}/include/uapi/asm/Kbuild. They generate some headers in arch/{arm,x86}/include/generated/uapi/asm directories, which are obviously exported. Replace them with generated-y, and abolish genhdr-y. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Dichtel Documentation/kbuild/makefiles.txt | 25 ++++++------------------- arch/arm/include/uapi/asm/Kbuild | 6 +++--- arch/x86/include/uapi/asm/Kbuild | 6 +++--- scripts/Makefile.asm-generic | 2 +- 4 files changed, 13 insertions(+), 26 deletions(-) commit bfb38988c51e440fd7062ddf3157f7d8b1dd5d70 Author: Matthias Kaehlcke Date: Fri Apr 21 14:39:30 2017 -0700 kbuild: clang: Disable 'address-of-packed-member' warning clang generates plenty of these warnings in different parts of the code, to an extent that the warnings are little more than noise. Disable the 'address-of-packed-member' warning. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Masahiro Yamada Makefile | 1 + 1 file changed, 1 insertion(+) commit 7ef0e5e16d18a38af489bea7193ba3b2be31ee58 Author: Cédric Le Goater Date: Thu Apr 20 13:56:36 2017 +0200 mtd: spi-nor: aspeed: configure chip window on AHB bus The segment registers of the SMC controller provide a way to configure the mapping windows of the chips on the AHB bus. The settings are required to be correct when the controller operates in Command mode, which is the case for DMAs and the LPC mapping. This tries to set the segment registers of each chip depending on the size of the flash device and depending on the previous segment settings, in order to have a contiguous window across multiple chips. Unfortunately, the AST2500 SPI controller has a bug and it is not possible to configure a full 128MB window for a chip of the same size. The window size needs to be restricted to 120MB. This issue only applies to CE0. Signed-off-by: Cédric Le Goater Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/aspeed-smc.c | 157 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 154 insertions(+), 3 deletions(-) commit d0318fb3c388a4082a4ea2b94fc242cd5c064cea Author: Arnd Bergmann Date: Thu Jun 22 00:00:55 2017 +0200 ata: ftide010: fix resource printing The new driver uses an incorrect format string for resource_size_t: drivers/ata/pata_ftide010.c: In function 'pata_ftide010_probe': drivers/ata/pata_ftide010.c:520:17: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=] The nicest way to print the address is to pretty-print the resource using %pR. Fixes: be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010") Signed-off-by: Arnd Bergmann Signed-off-by: Tejun Heo drivers/ata/pata_ftide010.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7dcc4eacc45263ac5d3a0bd78c64e9ff7c94c13 Author: Arnd Bergmann Date: Wed Jun 21 23:49:54 2017 +0200 clocksource/drivers: Fix uninitialized variable use in timer_of_init If none of the flags are set, 'ret' is uninitialized as pointed out by gcc: drivers/clocksource/timer-of.c: In function 'timer_of_init': drivers/clocksource/timer-of.c:160:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] Since calling the function without any of the flags is an error, set the return value to -EINVAL for that case. [ tglx: Get rid of the silly backwards goto while at it ] Fixes: dc11bae78529 ("clocksource/drivers: Add timer-of common init routine") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: Daniel Lezcano Link: http://lkml.kernel.org/r/20170621215005.3870011-1-arnd@arndb.de drivers/clocksource/timer-of.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3d09198243b89457649241fb63f809a96a22a8ce Merge: 52f80dc 48b6bbe Author: David S. Miller Date: Wed Jun 21 17:35:22 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Two entries being added at the same time to the IFLA policy table, whilst parallel bug fixes to decnet routing dst handling overlapping with the dst gc removal in net-next. Signed-off-by: David S. Miller commit 20485a565de73c58d39b74501b451b40bd817195 Author: Bhumika Goyal Date: Wed Jun 21 12:34:17 2017 +0530 platform/x86: intel_menlow: Add const to thermal_cooling_device_ops structure Declare thermal_cooling_device_ops structure as const as it is only passed as an argument to the function thermal_cooling_device_register and this argument is of type const. So, declare the structure as const. Signed-off-by: Bhumika Goyal Signed-off-by: Darren Hart (VMware) drivers/platform/x86/intel_menlow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adee455112190a4a1ed5d01badcac59278c55d9c Author: Bhumika Goyal Date: Wed Jun 21 12:34:16 2017 +0530 platform/x86: acerhdf: Add const to thermal_cooling_device_ops structure Declare thermal_cooling_device_ops structure as const as it is only passed as an argument to the function thermal_cooling_device_register and this argument is of type const. So, declare the structure as const. Signed-off-by: Bhumika Goyal Signed-off-by: Darren Hart (VMware) drivers/platform/x86/acerhdf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52f80dca7a1a9f4ad6f6bd5a9b9d25851e3d670a Merge: e862830 7003cdd Author: David S. Miller Date: Wed Jun 21 15:33:00 2017 -0400 Merge branch 'qed-File-split-and-rename-towards-iWARP-support' Michal Kalderon says: ==================== qed*: File split and rename towards iWARP support This patch series makes a few more infrastructure changes towards adding iWARP support. Hopefully this is the last infrastructure change prior to the iWARP RFC. Patch #1-3 take care of taking all the common iWARP/RoCE code out of qed_roce.[ch] and placing it in qed_rdma.[ch] Patch #4 renames the roce interface file as it is common for RoCE and iWARP. This patch touches qedr as well. ==================== Signed-off-by: David S. Miller commit 7003cdd6a121e7bdb8a05eb1931f9549a36ea723 Author: Kalderon, Michal Date: Wed Jun 21 16:22:46 2017 +0300 qed*: Rename qed_roce_if.h to qed_rdma_if.h Rename the qed_roce_if file to qed_rdma_if as it represents a common interface for RoCE and iWARP. this commit affects RDMA/qedr as well. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/qedr.h | 2 +- drivers/infiniband/hw/qedr/qedr_cm.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_rdma.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_roce.c | 2 +- include/linux/qed/qed_rdma_if.h | 582 +++++++++++++++++++++++++++++ include/linux/qed/qed_roce_if.h | 582 ----------------------------- 7 files changed, 587 insertions(+), 587 deletions(-) commit b71b9afdf6d6c1ca728fde2aa14bc71721cab34e Author: Kalderon, Michal Date: Wed Jun 21 16:22:45 2017 +0300 qed: Split rdma content between qed_rdma and qed_roce This patch places common iWARP / RoCE code in qed_rdma and roce specific code in qed_roce There is one new function ( qed_roce_setup ) added, the rest of the patch removes content from the files and removes some static definitions. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/Makefile | 2 +- drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 1123 +----------------- drivers/net/ethernet/qlogic/qed/qed_rdma.h | 39 +- drivers/net/ethernet/qlogic/qed/qed_roce.c | 1746 +--------------------------- drivers/net/ethernet/qlogic/qed/qed_roce.h | 151 +-- drivers/net/ethernet/qlogic/qed/qed_spq.c | 2 +- 9 files changed, 118 insertions(+), 2951 deletions(-) commit f1372ee11901336d287a4032fabe433d33586753 Author: Kalderon, Michal Date: Wed Jun 21 16:22:44 2017 +0300 qed: Duplicate qed_roce.[ch] to qed_rdma.[ch] This patch adds files that will contain common code for RoCE/iWARP. The files are currently identical to qed_roce.c / qed_roce.h and intentionally not added to the makefile. The next patch in the series will modify the files so that roce specific code is left in qed_roce and common roce/iwarp code will be placed in qed_rdma This patch is the result of a simple cp qed_rdma.c qed_roce.c cp qed_rdma.h qed_roce.h Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_rdma.c | 2805 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_rdma.h | 178 ++ 2 files changed, 2983 insertions(+) commit 8e8dddba72d81b78742b002bebc3cce1b23d3f84 Author: Kalderon, Michal Date: Wed Jun 21 16:22:43 2017 +0300 qed: Cleanup qed_roce before duplicating it The next patch in the series will duplicate qed_roce as part of code preprations for iWARP support. Do some cleanup before duplicating Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 51 +++++++----------------------- 1 file changed, 12 insertions(+), 39 deletions(-) commit e86283071fb0eed28136adb52997888f4beb202b Author: Daniel Borkmann Date: Wed Jun 21 20:16:11 2017 +0200 bpf: expose prog id for cls_bpf and act_bpf In order to be able to retrieve the attached programs from cls_bpf and act_bpf, we need to expose the prog ids via netlink so that an application can later on get an fd based on the id through the BPF_PROG_GET_FD_BY_ID command, and dump related prog info via BPF_OBJ_GET_INFO_BY_FD command for bpf(2). Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 1 + include/uapi/linux/tc_act/tc_bpf.h | 1 + net/sched/act_bpf.c | 3 +++ net/sched/cls_bpf.c | 3 +++ 4 files changed, 8 insertions(+) commit fc26bd50539b6f52aa75ffbaec7b083825ec5451 Author: Eric Richter Date: Thu Jun 15 16:02:52 2017 -0500 IMA: update IMA policy documentation to include pcr= option Commit 0260643ce "ima: add policy support for extending different pcrs" introduced a new IMA policy option "pcr=". Missing was the documentation for this option. This patch updates ima_policy to include this option, as well as an example. Signed-off-by: Eric Richter Signed-off-by: Mimi Zohar Documentation/ABI/testing/ima_policy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 915d9d255defeba80e1331a2b8bb8a79c0ca4db7 Author: Thiago Jung Bauermann Date: Wed Jun 7 22:49:12 2017 -0300 ima: Log the same audit cause whenever a file has no signature If the file doesn't have an xattr, ima_appraise_measurement sets cause to "missing-hash" while if there's an xattr but it's a digest instead of a signature it sets cause to "IMA-signature-required". Fix it by setting cause to "IMA-signature-required" in both cases. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar security/integrity/ima/ima_appraise.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2663218ba6e3dd6f27df9664e00fa3eb63be3a3f Author: Thiago Jung Bauermann Date: Wed Jun 7 22:49:11 2017 -0300 ima: Simplify policy_func_show. If the func_tokens array uses the same indices as enum ima_hooks, policy_func_show can be a lot simpler, and the func_* enum becomes unnecessary. Also, if we use the same macro trick used by kernel_read_file_id_str we can use one hooks list for both the enum and the string array, making sure they are always in sync (suggested by Mimi Zohar). Finally, by using the printf pattern for the function token directly instead of using the pt macro we can simplify policy_func_show even further and avoid needing a temporary buffer. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar security/integrity/ima/ima.h | 25 +++++++++------- security/integrity/ima/ima_policy.c | 58 ++++--------------------------------- 2 files changed, 21 insertions(+), 62 deletions(-) commit bb543e3959b5909e7b5db4a216018c634a9d9898 Author: Thiago Jung Bauermann Date: Wed Jun 7 22:49:10 2017 -0300 integrity: Small code improvements These changes are too small to warrant their own patches: The keyid and sig_size members of struct signature_v2_hdr are in BE format, so use a type that makes this assumption explicit. Also, use beXX_to_cpu instead of __beXX_to_cpu to read them. Change integrity_kernel_read to take a void * buffer instead of char * buffer, so that callers don't have to use a cast if they provide a buffer that isn't a char *. Add missing #endif comment in ima.h pointing out which macro it refers to. Add missing fall through comment in ima_appraise.c. Constify mask_tokens and func_tokens arrays. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar security/integrity/digsig_asymmetric.c | 4 ++-- security/integrity/iint.c | 2 +- security/integrity/ima/ima.h | 2 +- security/integrity/ima/ima_appraise.c | 1 + security/integrity/ima/ima_policy.c | 4 ++-- security/integrity/integrity.h | 7 ++++--- 6 files changed, 11 insertions(+), 9 deletions(-) commit e4586c79d4ba24a02f63a17e49207007c3bbdaea Author: Roberto Sassu Date: Tue May 16 14:53:47 2017 +0200 ima: fix get_binary_runtime_size() Remove '+ 1' from 'size += strlen(entry->template_desc->name) + 1;', as the template name is sent to userspace without the '\0' character. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar security/integrity/ima/ima_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28a8dc41279de2a8a635df51ad33d3cee7e0c0d1 Author: Roberto Sassu Date: Tue May 16 14:53:43 2017 +0200 ima: use ima_parse_buf() to parse template data The binary_field_data structure definition has been removed from ima_restore_template_data(). The lengths and data pointers are directly stored into the template_data array of the ima_template_entry structure. For template data, both the number of fields and buffer end checks can be done, as these information are known (respectively from the template descriptor, and from the measurement header field). Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar security/integrity/ima/ima_template.c | 44 +++++++++++------------------------ 1 file changed, 13 insertions(+), 31 deletions(-) commit 47fdee60b47fc2836b256761ab60ada26788b323 Author: Roberto Sassu Date: Tue May 16 14:53:42 2017 +0200 ima: use ima_parse_buf() to parse measurements headers The binary_hdr_v1 and binary_data_v1 structures defined in ima_restore_measurement_list() have been replaced with an array of four ima_field_data structures where pcr, digest, template name and template data lengths and pointers are stored. The length of pcr and digest in the ima_field_data array and the bits in the bitmap are set before ima_parse_buf() is called. The ENFORCE_FIELDS bit is set for all entries except the last one (there is still data to parse), and ENFORCE_BUFEND is set only for the last entry. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar security/integrity/ima/ima_template.c | 80 ++++++++++++----------------------- 1 file changed, 28 insertions(+), 52 deletions(-) commit b17fd9ecf854e8f695e911d3ff9e1fe33bb1c76c Author: Roberto Sassu Date: Tue May 16 14:53:41 2017 +0200 ima: introduce ima_parse_buf() ima_parse_buf() takes as input the buffer start and end pointers, and stores the result in a static array of ima_field_data structures, where the len field contains the length parsed from the buffer, and the data field contains the address of the buffer just after the length. Optionally, the function returns the current value of the buffer pointer and the number of array elements written. A bitmap has been added as parameter of ima_parse_buf() to handle the cases where the length is not prepended to data. Each bit corresponds to an element of the ima_field_data array. If a bit is set, the length is not parsed from the buffer, but is read from the corresponding element of the array (the length must be set before calling the function). ima_parse_buf() can perform three checks upon request by callers, depending on the enforce mask passed to it: - ENFORCE_FIELDS: matching of number of fields (length-data combination) - there must be enough data in the buffer to parse the number of fields requested (output: current value of buffer pointer) - ENFORCE_BUFEND: matching of buffer end - the ima_field_data array must be large enough to contain lengths and data pointers for the amount of data requested (output: number of fields written) - ENFORCE_FIELDS | ENFORCE_BUFEND: matching of both Use cases - measurement entry header: ENFORCE_FIELDS | ENFORCE_BUFEND - four fields must be parsed: pcr, digest, template name, template data - ENFORCE_BUFEND is enforced only for the last measurement entry - template digest (Crypto Agile): ENFORCE_BUFEND - since only the total template digest length is known, the function parses length-data combinations until the buffer end is reached - template data: ENFORCE_FIELDS | ENFORCE_BUFEND - since the number of fields and the total template data length are known, the function can perform both checks Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar security/integrity/ima/ima_template_lib.c | 61 +++++++++++++++++++++++++++++++ security/integrity/ima/ima_template_lib.h | 6 +++ 2 files changed, 67 insertions(+) commit 82e3bb4d44be21daefe8af857a68d3c9118c1048 Author: Laura Abbott Date: Tue May 9 11:25:27 2017 -0700 ima: Add cgroups2 to the defaults list cgroups2 is beginning to show up in wider usage. Add it to the default nomeasure/noappraise list like other filesystems. Signed-off-by: Laura Abbott Signed-off-by: Mimi Zohar security/integrity/ima/ima_policy.c | 3 +++ 1 file changed, 3 insertions(+) commit b4e280304ddb2fb5b6970524e901fc8ae8ec6337 Author: Geliang Tang Date: Sat May 6 23:40:18 2017 +0800 ima: use memdup_user_nul Use memdup_user_nul() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Mimi Zohar security/integrity/ima/ima_fs.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 5d659f286d58d76064168c4cd7aad61a30d20c44 Author: Tycho Andersen Date: Fri May 5 11:15:47 2017 -0600 ima: fix up #endif comments While reading the code, I noticed that these #endif comments don't match how they're actually nested. This patch fixes that. Signed-off-by: Tycho Andersen Signed-off-by: Mimi Zohar security/integrity/ima/ima.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38d192684e8b1811c352c208447d565f8f0a309f Author: Ben Hutchings Date: Tue May 2 19:27:00 2017 +0100 IMA: Correct Kconfig dependencies for hash selection IMA uses the hash algorithm too early to be able to use a module. Require the selected hash algorithm to be built-in. Signed-off-by: Ben Hutchings Signed-off-by: Mimi Zohar security/integrity/ima/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6f6723e21589f4594bb72b27ddbb2f75defb33bb Author: Mimi Zohar Date: Mon Apr 24 22:43:52 2017 -0400 ima: define is_ima_appraise_enabled() Only return enabled if in enforcing mode, not fix or log modes. Signed-off-by: Mimi Zohar Changes: - Define is_ima_appraise_enabled() as a bool (Thiago Bauermann) include/linux/ima.h | 6 ++++++ security/integrity/ima/ima_appraise.c | 10 ++++++++++ 2 files changed, 16 insertions(+) commit e1f5e01f4b035ced1c71b40866e4e5c0508fbb0b Author: Mimi Zohar Date: Mon Apr 24 22:06:49 2017 -0400 ima: define Kconfig IMA_APPRAISE_BOOTPARAM option Permit enabling the different "ima_appraise=" modes (eg. log, fix) from the boot command line. Signed-off-by: Mimi Zohar security/integrity/ima/Kconfig | 8 ++++++++ security/integrity/ima/ima_appraise.c | 2 ++ 2 files changed, 10 insertions(+) commit 503ceaef8e2e7dbbdb04a867acc6fe4c548ede7f Author: Mimi Zohar Date: Fri Apr 21 18:58:27 2017 -0400 ima: define a set of appraisal rules requiring file signatures The builtin "ima_appraise_tcb" policy should require file signatures for at least a few of the hooks (eg. kernel modules, firmware, and the kexec kernel image), but changing it would break the existing userspace/kernel ABI. This patch defines a new builtin policy named "secure_boot", which can be specified on the "ima_policy=" boot command line, independently or in conjunction with the "ima_appraise_tcb" policy, by specifing ima_policy="appraise_tcb | secure_boot". The new appraisal rules requiring file signatures will be added prior to the "ima_appraise_tcb" rules. Signed-off-by: Mimi Zohar Changelog: - Reference secure boot in the new builtin policy name. (Thiago Bauermann) Documentation/admin-guide/kernel-parameters.txt | 6 +++++- security/integrity/ima/ima_policy.c | 26 ++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) commit 33ce9549cfa1e71d77bc91a2e67e65d693e2e53f Author: Mimi Zohar Date: Mon Apr 24 12:04:09 2017 -0400 ima: extend the "ima_policy" boot command line to support multiple policies Add support for providing multiple builtin policies on the "ima_policy=" boot command line. Use "|" as the delimitor separating the policy names. Signed-off-by: Mimi Zohar Documentation/admin-guide/kernel-parameters.txt | 17 +++++++++++------ security/integrity/ima/ima_policy.c | 15 ++++++++++----- 2 files changed, 21 insertions(+), 11 deletions(-) commit 8e70e8409102a37ab066bd91007b75fd5d113931 Merge: 007b811 701516a Author: Ingo Molnar Date: Wed Jun 21 20:11:53 2017 +0200 Merge tag 'perf-core-for-mingo-4.13-20170621' 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: New features: - Add support to measure SMI cost in 'perf stat' (Kan Liang) - Add support for unwinding callchains in powerpc with libdw (Paolo Bonzini) Fixes: - Fix message: cpu list option is -C not -c (Adrian Hunter) - Fix 'perf script' message: field list option is -F not -f (Adrian Hunter) - Intel PT fixes: (Adrian Hunter) o Fix missing stack clear o Ensure IP is zero when state is INTEL_PT_STATE_NO_IP o Fix last_ip usage o Ensure never to set 'last_ip' when packet 'count' is zero o Clear FUP flag on error o Fix transactions_sample_type Infrastructure changes: - Intel PT cleanups/refactorings (Adrian Hunter) o Use FUP always when scanning for an IP o Add missing __fallthrough o Remove redundant initial_skip checks o Allow decoding with branch tracing disabled o Add default config for pass-through branch enable o Add documentation for new config terms o Add decoder support for ptwrite and power event packets o Add reserved byte to CBR packet payload o Add decoder support for CBR events - Move find_process() to the only place that uses it, skimming some more fat from util.[ch] (Arnaldo Carvalho de Melo) - Do parameter validation earlier on fetch_kernel_version() (Arnaldo Carvalho de Melo) - Remove unused _ALL_SOURCE define (Arnaldo Carvalho de Melo) - Add sysfs__write_int function (Kan Liang) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 852ec80983d682dc08a0573d37eeaa9814c4f6b1 Author: Bart Van Assche Date: Wed Jun 21 10:55:47 2017 -0700 blk-mq: Make it safe to quiesce and unquiesce from an interrupt handler Since blk_mq_quiesce_queue_nowait() can be called from interrupt context, make this safe. Since this function is not in the hot path, uninline it. Fixes: commit f4560ffe8cec ("blk-mq: use QUEUE_FLAG_QUIESCED to quiesce queue") Signed-off-by: Bart Van Assche Cc: Ming Lei Cc: Hannes Reinecke Cc: Martin K. Petersen Signed-off-by: Jens Axboe block/blk-mq.c | 20 ++++++++++++++++++-- include/linux/blk-mq.h | 10 +--------- 2 files changed, 19 insertions(+), 11 deletions(-) commit 34bd9c1c4f62e936d8865e6442f332cd85bdfc95 Author: Bart Van Assche Date: Wed Jun 21 10:55:46 2017 -0700 block: Fix off-by-one errors in blk_status_to_errno() and print_req_error() This was detected by the smatch static analyzer. Fixes: commit 2a842acab109 ("block: introduce new block status code type") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0fc443a8643d4c9b330a637a1e6a422a44dde2a Author: Bart Van Assche Date: Wed Jun 21 10:55:45 2017 -0700 block: Declare local symbols static Avoid that building with W=1 causes the compiler to complain that a declaration for bounce_bio_set and bounce_bio_split is missing. References: commit a8821f3f32be ("block: Improvements to bounce-buffer handling") Signed-off-by: Bart Van Assche Cc: Neil Brown Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Signed-off-by: Jens Axboe block/bounce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 303abfdf76ea41c228e8b3da73ed3807121a9ca6 Author: Dennis Zhou Date: Wed Jun 21 13:52:46 2017 -0400 percpu: fix early calls for spinlock in pcpu_stats From 2c06e795162cb306c9707ec51d3e1deadb37f573 Mon Sep 17 00:00:00 2001 From: Dennis Zhou Date: Wed, 21 Jun 2017 10:17:09 -0700 Commit 30a5b5367ef9 ("percpu: expose statistics about percpu memory via debugfs") introduces percpu memory statistics. pcpu_stats_chunk_alloc takes the spin lock and disables/enables irqs on creation of a chunk. Irqs are not enabled when the first chunk is initialized and thus kernels are failing to boot with kernel debugging enabled. Fixed by changing _irq to _irqsave and _irqrestore. Fixes: 30a5b5367ef9 ("percpu: expose statistics about percpu memory via debugfs") Signed-off-by: Dennis Zhou Reported-by: Alexander Levin Signed-off-by: Tejun Heo mm/percpu-internal.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5a85071c2cbcc7d8d8f764b33bf64c76e47d268d Author: NeilBrown Date: Wed Jun 21 09:12:21 2017 +1000 md: use a separate bio_set for synchronous IO. md devices allocate a bio_set and use it for two distinct purposes. mddev->bio_set is used to clone bios as part of sending upper level requests down to lower level devices, and it is also use for synchronous IO such as superblock and bitmap updates, and for correcting read errors. This multiple usage can lead to deadlocks. It is likely that cloned bios might be queued for write and to be waiting for a metadata update before the write can be permitted. If the cloning exhausted mddev->bio_set, the metadata update may not be able to proceed. This scenario has been seen during heavy testing, with lots of IO and lots of memory pressure. Address this by adding a new bio_set specifically for synchronous IO. All synchronous IO goes directly to the underlying device and is not queued at the md level, so request using entries from the new mddev->sync_set will complete in a timely fashion. Requests that use mddev->bio_set will sometimes need to wait for synchronous IO, but will no longer risk deadlocking that iO. Also: small simplification in mddev_put(): there is no need to wait until the spinlock is released before calling bioset_free(). Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 27 ++++++++++++++++++++------- drivers/md/md.h | 3 +++ 2 files changed, 23 insertions(+), 7 deletions(-) commit 72d0d8672cf6bd06a99e81324a673287d50b9b71 Author: Masahiro Yamada Date: Wed Jun 21 00:06:03 2017 +0900 clk: uniphier: provide NAND controller clock rate This allows the NAND driver to get the clock rate via clk_get_rate(). Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 0d84659619696b42417c0d6c2eb7661a3ce254c0 Author: Jiancheng Xue Date: Wed Jun 21 17:00:41 2017 +0800 clk: hisilicon: add usb2 clocks for hi3798cv200 SoC Add usb2 clocks for hi3798cv200 SoC. Signed-off-by: Jiancheng Xue Reviewed-by: Daniel Thompson Signed-off-by: Stephen Boyd drivers/clk/hisilicon/crg-hi3798cv200.c | 21 +++++++++++++++++++++ include/dt-bindings/clock/histb-clock.h | 9 ++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit e29387ebd86e903702422a8361fd3e03aca25573 Author: Bart Van Assche Date: Wed Jun 21 09:40:11 2017 -0700 block: Add fallthrough markers to switch statements This patch suppresses gcc 7 warnings about falling through in switch statements when building with W=1. From the gcc documentation: The -Wimplicit-fallthrough=3 warning is enabled by -Wextra. See also https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Warning-Options.html. Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/badblocks.c | 1 + block/elevator.c | 1 + block/ioprio.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) commit 846423f96721d5c1c2fad6b43b3f1359002907d5 Author: Linus Walleij Date: Wed Jun 21 09:59:52 2017 +0200 clk: Add Gemini SoC clock controller The Cortina Systems Gemini (SL3516/CS3516) has an on-chip clock controller that derive all clocks from a single crystal, using some documented and some undocumented PLLs, half dividers, counters and gates. This is a best attempt to construct a clock driver for the clocks so at least we can gate off unused hardware and driver the PCI bus clock. Acked-by: Philipp Zabel Signed-off-by: Linus Walleij [sboyd@codeaurora.org: Fix devm_ioremap_resource() return value checking] Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 9 + drivers/clk/Makefile | 1 + drivers/clk/clk-gemini.c | 454 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 464 insertions(+) commit d0ba52f1d7649a3f088e410e860559cf36d479d0 Author: Steven Rostedt (VMware) Date: Wed Jun 21 13:39:13 2017 -0400 ftrace: Add missing comment for FTRACE_OPS_FL_RCU All the enum flags for FTRACE_OPS has a comment except for the RCU one. Add the comment for that. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 1 + 1 file changed, 1 insertion(+) commit fbc326159a01104db6163bc8e5f0a4c0ab11864d Author: Su Yue Date: Tue Jun 6 17:57:08 2017 +0800 btrfs: Verify dir_item in iterate_object_props Call verify_dir_item before memcmp_extent_buffer reading name from dir_item. Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/props.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 64c7b01446f4f1cea3cc4be041001f415ebfdc61 Author: Su Yue Date: Tue Jun 6 17:57:07 2017 +0800 btrfs: Check name_len before in btrfs_del_root_ref btrfs_del_root_ref calls btrfs_search_slot and reads name from root_ref. Call btrfs_is_name_len_valid before memcmp. Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/root-tree.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 488d7c4566536b8807381bc54e559fd43decd26a Author: Su Yue Date: Tue Jun 6 17:57:06 2017 +0800 btrfs: Check name_len before reading btrfs_get_name In btrfs_get_name, there's btrfs_search_slot and reads name from inode_ref/root_ref. Call btrfs_is_name_len_valid in btrfs_get_name. Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/export.c | 5 +++++ 1 file changed, 5 insertions(+) commit 59b0a7f2c7c1bf374db319fcc2c99305133d00d5 Author: Su Yue Date: Tue Jun 6 17:57:05 2017 +0800 btrfs: Check name_len before read in iterate_dir_item Since iterate_dir_item checks name_len in its own way, so use btrfs_is_name_len_valid not 'verify_dir_item' to make more strict name_len check. Signed-off-by: Su Yue Reviewed-by: David Sterba [ switched ENAMETOOLONG to EIO ] Signed-off-by: David Sterba fs/btrfs/send.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3c1d41844896f59ac771daf146a5329525dc87c5 Author: Su Yue Date: Tue Jun 6 17:57:04 2017 +0800 btrfs: Check name_len in btrfs_check_ref_name_override In btrfs_log_inode, btrfs_search_forward gets the buffer and then btrfs_check_ref_name_override will read name from ref/extref for the first time. Call btrfs_is_name_len_valid before reading name. Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-log.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8ee8c2d62d5f9e7d1e592426d3d0b941df29f688 Author: Su Yue Date: Tue Jun 6 17:57:03 2017 +0800 btrfs: Verify dir_item in replay_xattr_deletes replay_xattr_deletes calls btrfs_search_slot to get buffer and reads name. Call verify_dir_item to check name_len in replay_xattr_deletes to avoid reading out of boundary. Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-log.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 26a836cec2ea38329ddf3f049c78e9b94e500670 Author: Su Yue Date: Tue Jun 6 17:57:02 2017 +0800 btrfs: Check name_len on add_inode_ref call path replay_one_buffer first reads buffers and dispatches items accroding to the item type. In this patch, add_inode_ref handles inode_ref and inode_extref. Then add_inode_ref calls ref_get_fields and extref_get_fields to read ref/extref name for the first time. So checking name_len before reading those two is fine. add_inode_ref also calls inode_in_dir to match ref/extref in parent_dir. The call graph includes btrfs_match_dir_item_name to read dir_item name in the parent dir. Checking first dir_item is not enough. Change it to verify every dir_item while doing matches. Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dir-item.c | 4 ++-- fs/btrfs/tree-log.c | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) commit e79a33270d05f711e985b9524a392fd45ad3e93f Author: Su Yue Date: Tue Jun 6 17:57:01 2017 +0800 btrfs: Check name_len with boundary in verify dir_item Originally, verify_dir_item verifies name_len of dir_item with fixed values but not item boundary. If corrupted name_len was not bigger than the fixed value, for example 255, the function will think the dir_item is fine. And then reading beyond boundary will cause crash. Example: 1. Corrupt one dir_item name_len to be 255. 2. Run 'ls -lar /mnt/test/ > /dev/null' dmesg: [ 48.451449] BTRFS info (device vdb1): disk space caching is enabled [ 48.451453] BTRFS info (device vdb1): has skinny extents [ 48.489420] general protection fault: 0000 [#1] SMP [ 48.489571] Modules linked in: ext4 jbd2 mbcache btrfs xor raid6_pq [ 48.489716] CPU: 1 PID: 2710 Comm: ls Not tainted 4.10.0-rc1 #5 [ 48.489853] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 [ 48.490008] task: ffff880035df1bc0 task.stack: ffffc90004800000 [ 48.490008] RIP: 0010:read_extent_buffer+0xd2/0x190 [btrfs] [ 48.490008] RSP: 0018:ffffc90004803d98 EFLAGS: 00010202 [ 48.490008] RAX: 000000000000001b RBX: 000000000000001b RCX: 0000000000000000 [ 48.490008] RDX: ffff880079dbf36c RSI: 0005080000000000 RDI: ffff880079dbf368 [ 48.490008] RBP: ffffc90004803dc8 R08: ffff880078e8cc48 R09: ffff880000000000 [ 48.490008] R10: 0000160000000000 R11: 0000000000001000 R12: ffff880079dbf288 [ 48.490008] R13: ffff880078e8ca88 R14: 0000000000000003 R15: ffffc90004803e20 [ 48.490008] FS: 00007fef50c60800(0000) GS:ffff88007d400000(0000) knlGS:0000000000000000 [ 48.490008] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 48.490008] CR2: 000055f335ac2ff8 CR3: 000000007356d000 CR4: 00000000001406e0 [ 48.490008] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 48.490008] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 48.490008] Call Trace: [ 48.490008] btrfs_real_readdir+0x3b7/0x4a0 [btrfs] [ 48.490008] iterate_dir+0x181/0x1b0 [ 48.490008] SyS_getdents+0xa7/0x150 [ 48.490008] ? fillonedir+0x150/0x150 [ 48.490008] entry_SYSCALL_64_fastpath+0x18/0xad [ 48.490008] RIP: 0033:0x7fef5032546b [ 48.490008] RSP: 002b:00007ffeafcdb830 EFLAGS: 00000206 ORIG_RAX: 000000000000004e [ 48.490008] RAX: ffffffffffffffda RBX: 00007fef5061db38 RCX: 00007fef5032546b [ 48.490008] RDX: 0000000000008000 RSI: 000055f335abaff0 RDI: 0000000000000003 [ 48.490008] RBP: 00007fef5061dae0 R08: 00007fef5061db48 R09: 0000000000000000 [ 48.490008] R10: 000055f335abafc0 R11: 0000000000000206 R12: 00007fef5061db38 [ 48.490008] R13: 0000000000008040 R14: 00007fef5061db38 R15: 000000000000270e [ 48.490008] RIP: read_extent_buffer+0xd2/0x190 [btrfs] RSP: ffffc90004803d98 [ 48.499455] ---[ end trace 321920d8e8339505 ]--- Fix it by adding a parameter @slot and check name_len with item boundary by calling btrfs_is_name_len_valid. Signed-off-by: Su Yue rev Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/dir-item.c | 10 +++++++++- fs/btrfs/inode.c | 2 +- fs/btrfs/tree-log.c | 4 ++-- fs/btrfs/xattr.c | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) commit 19c6dcbfa74674ac5ab5d18096ee813f858668c3 Author: Su Yue Date: Tue Jun 6 17:57:00 2017 +0800 btrfs: Introduce btrfs_is_name_len_valid to avoid reading beyond boundary Introduce function btrfs_is_name_len_valid. The function compares parameter @name_len with item boundary then returns true if name_len is valid. Signed-off-by: Su Yue Reviewed-by: David Sterba [ s/btrfs_leaf_data/BTRFS_LEAF_DATA_OFFSET/ ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 ++ fs/btrfs/dir-item.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) commit 66b4993e95c17e0ee30f0d72f0d6e00e5c035a98 Author: David Sterba Date: Thu Jun 15 16:20:43 2017 +0200 btrfs: move dev stats accounting out of wait_dev_flush We should really just wait in wait_dev_flush and let the caller decide what to do with the error value. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/disk-io.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 2980d5745fa0beeaab4c22e25bea4faa54f7d9f7 Author: David Sterba Date: Thu Jun 15 16:04:26 2017 +0200 btrfs: account as waiting for IO, while waiting fot the flush bio completion Similar to what submit_bio_wait does, we should account for IO while waiting for a bio completion. This has marginal visible effects, flush bio is short-lived. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0ae999414238aa9c0a116844813982effb68a02 Author: David Sterba Date: Tue Jun 6 17:06:06 2017 +0200 btrfs: preallocate device flush bio For devices that support flushing, we allocate a bio, submit, wait for it and then free it. The bio allocation does not fail so ENOMEM is not a problem but we still may unnecessarily stress the allocation subsystem. Instead, we can allocate the bio at the same time we allocate the device and reuse it each time we need to flush the barriers. The bio is reset before each use. Reference counting is simplified to just device allocation (get) and freeing (put). The bio used to be submitted through the integrity checker which will find out that bio has no data attached and call submit_bio. Status of the bio in flight needs to be tracked separately in case the device caches get switched off between write and wait. Signed-off-by: David Sterba fs/btrfs/disk-io.c | 25 +++++++------------------ fs/btrfs/volumes.c | 12 ++++++++++++ fs/btrfs/volumes.h | 1 + 3 files changed, 20 insertions(+), 18 deletions(-) commit ba2694def2361d9b8d944f6df4aa077ad7290746 Author: Andreas Färber Date: Tue Jun 6 00:51:56 2017 +0200 MAINTAINERS: Update Actions Semi section with SPS Add file patterns to cover the SPS power domain driver and DT binding. Signed-off-by: Andreas Färber MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit 172067e0bc8721af3e8626596f91b03f691e88a8 Author: Andreas Färber Date: Sun Feb 26 17:25:21 2017 +0100 ARM: owl: Implement CPU enable-method for S500 Allow to bring up CPU1. Based on LeMaker linux-actions tree. Signed-off-by: Andreas Färber arch/arm/mach-actions/Makefile | 3 + arch/arm/mach-actions/headsmp.S | 68 ++++++++++++++++ arch/arm/mach-actions/platsmp.c | 166 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 237 insertions(+) commit e293915a6edf3c57bd9f8101249221f5fc5f8bfe Author: Stephen Boyd Date: Wed Jun 21 09:10:47 2017 -0700 clk: iproc: Remove __init marking on iproc_pll_clk_setup() Now that this function is called from driver probe routines, it needs to drop the __init marking because it isn't just called from init code. Reported-by: Stephen Rothwell Cc: Sandeep Tripathy Cc: Anup Patel Cc: Ray Jui Cc: Scott Branden Fixes: 654cdd3229cd ("clk: bcm: Add clocks for Stingray SOC") Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-iproc-pll.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 872d1ba47bdc0d96f74a0172c226c81555b27b29 Author: Andreas Färber Date: Wed Feb 22 04:33:34 2017 +0100 MAINTAINERS: Add Actions Semi Owl section Add myself as maintainer. Signed-off-by: Andreas Färber MAINTAINERS | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6bb8536cba152edee005668bc57cfe6198b73f0f Author: Andreas Färber Date: Wed Feb 15 11:03:22 2017 +0100 ARM: Prepare Actions Semi S500 Add ARCH_ACTIONS and mach-actions/owl.c for "actions,s500". Signed-off-by: Andreas Färber arch/arm/Kconfig | 2 ++ arch/arm/Makefile | 1 + arch/arm/mach-actions/Kconfig | 15 +++++++++++++++ arch/arm/mach-actions/Makefile | 1 + arch/arm/mach-actions/owl.c | 28 ++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+) commit 11df02bf9bc1f6fd8416d22c08275e31f8c4f30d Author: Dennis Zhou Date: Wed Jun 21 11:51:09 2017 -0400 percpu: resolve err may not be initialized in pcpu_alloc From 4a42ecc735cff0015cc73c3d87edede631f4b885 Mon Sep 17 00:00:00 2001 From: Dennis Zhou Date: Wed, 21 Jun 2017 08:07:15 -0700 Add error message to out of space failure for atomic allocations in percpu allocation path to fix -Wmaybe-uninitialized. Signed-off-by: Dennis Zhou Reported-by: Stephen Rothwell Signed-off-by: Tejun Heo mm/percpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 29ad6bd9ada2629fe1b7b30d6d08259005abcb8a Author: Thomas Petazzoni Date: Wed Jun 21 15:29:16 2017 +0200 arm64: marvell: enable ICU and GICP drivers This commit enables the newly introduced Marvell GICP and ICUs driver for the 64-bit Marvell EBU platforms. Signed-off-by: Thomas Petazzoni Acked-by: Marc Zyngier Signed-off-by: Gregory CLEMENT arch/arm64/Kconfig.platforms | 2 ++ 1 file changed, 2 insertions(+) commit 34cfb542b5b1762c73479a4a61e0a3b77253f876 Author: Paolo Abeni Date: Wed Jun 21 11:45:31 2017 +0200 sock: avoid dirtying incoming_cpu if not needed for connected socket, the incoming_cpu field in the sock struct is not going to change frequently, but we are setting it unconditionally for each packet. Since sk_incoming_cpu and sk_flags share the same cacheline, and the latter is access by udp_recvmsg(), this cause a cache miss for each packet for UDP connected socket. With this patch, we set the incoming cpu field only when the ingress cpu really changes. This gives a small but measurable performance improvement for connected UDP socket. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/net/sock.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 28b5ba2aa0f55d80adb2624564ed2b170c19519e Author: David Herrmann Date: Wed Jun 21 10:47:15 2017 +0200 net: introduce SO_PEERGROUPS getsockopt This adds the new getsockopt(2) option SO_PEERGROUPS on SOL_SOCKET to retrieve the auxiliary groups of the remote peer. It is designed to naturally extend SO_PEERCRED. That is, the underlying data is from the same credentials. Regarding its syntax, it is based on SO_PEERSEC. That is, if the provided buffer is too small, ERANGE is returned and @optlen is updated. Otherwise, the information is copied, @optlen is set to the actual size, and 0 is returned. While SO_PEERCRED (and thus `struct ucred') already returns the primary group, it lacks the auxiliary group vector. However, nearly all access controls (including kernel side VFS and SYSVIPC, but also user-space polkit, DBus, ...) consider the entire set of groups, rather than just the primary group. But this is currently not possible with pure SO_PEERCRED. Instead, user-space has to work around this and query the system database for the auxiliary groups of a UID retrieved via SO_PEERCRED. Unfortunately, there is no race-free way to query the auxiliary groups of the PID/UID retrieved via SO_PEERCRED. Hence, the current user-space solution is to use getgrouplist(3p), which itself falls back to NSS and whatever is configured in nsswitch.conf(3). This effectively checks which groups we *would* assign to the user if it logged in *now*. On normal systems it is as easy as reading /etc/group, but with NSS it can resort to quering network databases (eg., LDAP), using IPC or network communication. Long story short: Whenever we want to use auxiliary groups for access checks on IPC, we need further IPC to talk to the user/group databases, rather than just relying on SO_PEERCRED and the incoming socket. This is unfortunate, and might even result in dead-locks if the database query uses the same IPC as the original request. So far, those recursions / dead-locks have been avoided by using primitive IPC for all crucial NSS modules. However, we want to avoid re-inventing the wheel for each NSS module that might be involved in user/group queries. Hence, we would preferably make DBus (and other IPC that supports access-management based on groups) work without resorting to the user/group database. This new SO_PEERGROUPS ioctl would allow us to make dbus-daemon work without ever calling into NSS. Cc: Michal Sekletar Cc: Simon McVittie Reviewed-by: Tom Gundersen Signed-off-by: David Herrmann Signed-off-by: David S. Miller arch/alpha/include/uapi/asm/socket.h | 2 ++ arch/frv/include/uapi/asm/socket.h | 2 ++ arch/ia64/include/uapi/asm/socket.h | 2 ++ arch/m32r/include/uapi/asm/socket.h | 2 ++ arch/mips/include/uapi/asm/socket.h | 2 ++ arch/mn10300/include/uapi/asm/socket.h | 2 ++ arch/parisc/include/uapi/asm/socket.h | 2 ++ arch/s390/include/uapi/asm/socket.h | 2 ++ arch/sparc/include/uapi/asm/socket.h | 2 ++ arch/xtensa/include/uapi/asm/socket.h | 2 ++ include/uapi/asm-generic/socket.h | 2 ++ net/core/sock.c | 33 +++++++++++++++++++++++++++++++++ 12 files changed, 55 insertions(+) commit dd99e425be23294a9a91b365bd04f9b255fb72e8 Author: Paolo Abeni Date: Wed Jun 21 10:24:40 2017 +0200 udp: prefetch rmem_alloc in udp_queue_rcv_skb() On UDP packets processing, if the BH is the bottle-neck, it always sees a cache miss while updating rmem_alloc; try to avoid it prefetching the value as soon as we have the socket available. Performances under flood with multiple NIC rx queues used are unaffected, but when a single NIC rx queue is in use, this gives ~10% performance improvement. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/udp.c | 1 + 1 file changed, 1 insertion(+) commit da2e9cf03b8fccbb69dd1e215bb1e554ce8e8cbe Author: Chad Dupuis Date: Wed Jun 21 08:26:34 2017 +0300 qede: Fix compilation without QED_RDMA When CONFIG_QED_RDMA isn't defined, we'd hit the following: /include/linux/qed/qede_rdma.h:84:19: warning: ‘qede_rdma_dev_add’ used but never defined [enabled by default] static inline int qede_rdma_dev_add(struct qede_dev *dev); Fixes: bbfcd1e8e167 ("qed*: Set rdma generic functions prefix") Signed-off-by: Chad Dupuis Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller include/linux/qed/qede_rdma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b65c0c9b65a8fe2434bdc0a94e3767940f69aae9 Author: hayeswang Date: Wed Jun 21 11:25:18 2017 +0800 r8152: correct the definition Replace VLAN_HLEN and CRC_SIZE with ETH_FCS_LEN. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit adff41f938c7ac62a2261a0e7ad3044ad4b02309 Merge: 2f89a79 dfc4ff6 Author: David S. Miller Date: Wed Jun 21 11:31:46 2017 -0400 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 2017-06-20 This series contains updates to i40e and i40evf only. Björn adds additional XDP support for i40e, by adding pass and drop actions and XDP_TX action support. Jake fixes a possible NULL pointer dereference in i40evf_get_ethtool_stats() which could occur if the VF fails to recover from a reset, and then a user requests statistics. Changed the use of dev_info() to dev_dbg() for vf_capability client routine so that the standard log is not spammed with this information which "might" cause administrators to worry. Also added more code comments to help explain why udp_port has be in host byte order and to avoid future changes which may cause this to break. Fixed the holding of the RTNL lock for the entire reset routine, reduced the scope so that the reset function will handle its own lock, so that we do not have to wrap every reference to i40e_do_reset() with RTNL lock/unlock. Alice updates flags related to firmware interactions for WoL and admin queue command address with the correct value. Sudheer makes a fix to ensure that the array is not accessed past the size of the array. Greg fixes the parsing of firmware 4.33 admin queue commmand "Get CEE DCBX PER CFG" because the firmware now creates the oper_prio_tc nibbles reversed from those in the CDD Priority Group sub-TLV. Carolyn adds a check and message to let users know that when in MFP mode, changing RSS hash input set is not supported. Shannon makes the partition bandwidth control more generic since it is not in just one form of multi-function partitioning (MFP). Also fixes a bug which was causing the firmware confusion in some reset sequences, when we were disabling interrupts and we were clearing the whole register. Instead we should only be clearing the CAUSE_ENA bit when disabling interrupts. Filip adds support for OEM firmware version, so that if a OEM specific adapter is detected, ethtool reports the OEM product version in the firmware version string instead of etrack id. Alan fixes a bug where the driver was not correctly exiting overflow promiscuous mode, which can happen if "too many" MAC filters are added, putting the driver into overflow promiscuous mode, and the filters are then removed. The bug occurs because the conditional for toggling promiscuous mode was only be executed when enabled and not when it was disabled. ==================== Signed-off-by: David S. Miller commit 3f426c96895556bb49adfa52f3aeafdedb2d02e7 Author: Michał Mirosław Date: Tue Jun 13 18:02:03 2017 +0200 brcmfmac: initialize oob irq data before request_irq() This fixes spin-forever in irq handler when IRQ is already asserted at request_irq() time. Signed-off-by: Michał Mirosław Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 42213f2f359069eabf174dae3ffd2313d7d40996 Author: Ping-Ke Shih Date: Sun Jun 18 11:12:49 2017 -0500 rtlwifi: btcoexist control to enter/leave LPS To yield better user experience, have btcoex control LPS's parameters. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 8 +++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 7 ++- .../wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 18 ++++++ .../wireless/realtek/rtlwifi/btcoexist/rtl_btc.h | 3 + .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 63 ++++++++++++++++++--- .../net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 63 ++++++++++++++++++--- .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 64 +++++++++++++++++++--- drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 + 8 files changed, 203 insertions(+), 26 deletions(-) commit c692205da18b53cedd965168470813fa1ea67f25 Author: Ping-Ke Shih Date: Sun Jun 18 11:12:48 2017 -0500 rtlwifi: add btc_is_bt_lps_on() for btcoexist If LPS is controlled by btcoex, this function tell driver LPS is on or off. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 6 ++++++ drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h | 1 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 3 files changed, 8 insertions(+) commit 2635664e6e4a691ad6f1e0c13a04623cac3794da Author: Ping-Ke Shih Date: Sun Jun 18 11:12:47 2017 -0500 rtlwifi: Add rx ampdu cfg for btcoexist. If RX ampdu is too long, BT will have less time. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 27 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtlwifi/base.h | 1 + .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 16 +++++++++++-- .../wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 12 ++++++++++ .../wireless/realtek/rtlwifi/btcoexist/rtl_btc.h | 2 ++ drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 ++ 6 files changed, 58 insertions(+), 2 deletions(-) commit 54685f9c7af17e2430deb289b4f255ea0dec42c9 Author: Ping-Ke Shih Date: Sun Jun 18 11:12:46 2017 -0500 rtlwifi: Add btcoex record_pwr_mode Add btcoex record pwr mode to control LPS's parameters and share time with BT. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 13 +++++++++++++ drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 7 ++++++- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.h | 4 +++- drivers/net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 8 +++++++- drivers/net/wireless/realtek/rtlwifi/rtl8723be/fw.h | 4 +++- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 7 ++++++- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.h | 4 +++- drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 9 files changed, 43 insertions(+), 6 deletions(-) commit 5b757ba757d4bcb0ea0ece2630b1d162dbd06d3e Author: Ping-Ke Shih Date: Sun Jun 18 11:12:45 2017 -0500 rtlwifi: Revise special packet notification to be readable format. We extend types of special packets to a enumeration from boolean value. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 8479580b5267b40c4072ee57519f18f2b0359fbd Author: Ping-Ke Shih Date: Sun Jun 18 11:12:44 2017 -0500 rtlwifi: Add TX report and disable key to force wait until report acked. When using EAPOL to do a PTK rekey, there is a possible race condition. When msg 3/4 is received, the supplicant will send msg 4/4 and install the new key immediately; however, the driver must make sure that msg 4/4 is sent before installing the new key. We use TX report to ensure it is sent. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 128 +++++++++++++++++++-- drivers/net/wireless/realtek/rtlwifi/base.h | 13 +++ drivers/net/wireless/realtek/rtlwifi/core.c | 2 + drivers/net/wireless/realtek/rtlwifi/debug.h | 1 + .../net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 2 +- .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 1 + .../net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 2 +- .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 3 + .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.h | 14 +-- .../net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 1 + .../net/wireless/realtek/rtlwifi/rtl8723be/trx.c | 3 + .../net/wireless/realtek/rtlwifi/rtl8723be/trx.h | 16 ++- .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 3 + .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 3 + .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 17 ++- drivers/net/wireless/realtek/rtlwifi/wifi.h | 10 ++ 16 files changed, 194 insertions(+), 25 deletions(-) commit 79b64ed7a6b26fd896a8c0ba410e9704decf9c1f Author: Ping-Ke Shih Date: Sun Jun 18 11:12:43 2017 -0500 rtlwifi: extend debug_comp to u64 The number of debugging conditions now exceeds the capabilities of a 32-bit word. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/debug.c | 2 +- drivers/net/wireless/realtek/rtlwifi/debug.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit e332e2a29448065bbdf298d4dc21ed4cc3bebb3f Author: Ping-Ke Shih Date: Sun Jun 18 11:12:42 2017 -0500 rtlwifi: Correct power save capability while init mac80211 Since the driver itself will enter power saving mode dynamically according to the traffic, we set hw capability SUPPORTS_PS and SUPPORTS_DYNAMIC_PS in case of fwctrl_lps. The process IEEE80211_CONF_CHANGE_PS in op_config is used by SW-LPS only, so we add constraints to avoid errors. Signed-off-by: Ping-Ke Shih Signed-off-by: vincent_fann Signed-off-by: shaofu Signed-off-by: Larry Finger Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 4 ++++ drivers/net/wireless/realtek/rtlwifi/core.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit f95d95a7cd5514549dcf6ba754f0ee834cce3e1f Author: Ping-Ke Shih Date: Sun Jun 18 11:12:41 2017 -0500 rtlwifi: btcoex: rtl8723be: fix ant_sel not work To make ant_sel work, we should call power_on_setting to set antenna correctly. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 3 +++ drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 2 files changed, 4 insertions(+) commit 43f5644a90a030d6b801d5a6eb1e00914b816cae Author: Ping-Ke Shih Date: Sun Jun 18 11:12:40 2017 -0500 rtlwifi: btcoex: set correct interface type and parameter. This commit fixies two problems. The first one is interface types (e.g. PCI) that are used to switch antenna, and the second is to add wifi_only parameter to give correct state. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 18 +++++++++++++----- .../wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 +- .../net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) commit 87d8a9f35202c20411eaada9f4aced6e1781fb51 Author: Ping-Ke Shih Date: Sun Jun 18 11:12:39 2017 -0500 rtlwifi: btcoex: call bind to setup btcoex New btcoex add a function 'bind' to connect adapter, so we should call it during initializing. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 + drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 1 + 2 files changed, 2 insertions(+) commit 9920322ccd8e04733335d8f9c1ad34c2aae34951 Author: Prameela Rani Garnepudi Date: Fri Jun 16 20:12:05 2017 +0530 rsi: add tx frame for common device configuration After successful loading of firmware, a CARD READY indication is received by host. Common device configuration parameters are sent to the device after this. It includes information like device operating mode (Wi-Fi alone or BT coex), power save related parameters, GPIO information etc. As device supports BT coex, this frame is send in COEX queue initially. Based on the operating mode, CARD READY indication is received from each protocol module in firmware i.e. WLAN, BT. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_hal.c | 3 +- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 100 ++++++++++++++++++++++++++++---- drivers/net/wireless/rsi/rsi_hal.h | 3 + drivers/net/wireless/rsi/rsi_main.h | 10 +++- drivers/net/wireless/rsi/rsi_mgmt.h | 76 ++++++++++++++++++++++++ 5 files changed, 178 insertions(+), 14 deletions(-) commit 1b1bed016509d08e6d286a90b9e37898d0774ef3 Author: Prameela Rani Garnepudi Date: Fri Jun 16 20:05:40 2017 +0530 rsi: configure new boot parameters to device Boot parameters are changed in new firmware. Also three new sdio sleep parameters are added for ultra low power save. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mgmt.c | 20 +++++++++++++------- drivers/net/wireless/rsi/rsi_boot_params.h | 15 +++++++++------ 2 files changed, 22 insertions(+), 13 deletions(-) commit 61f2a6fcaab186e06dd8f2df0e40bc90b5111e60 Author: Prameela Rani Garnepudi Date: Fri Jun 16 20:05:39 2017 +0530 rsi: receive path enhancement for RS9113 RS9113 chipset supports Coex feature. Initial frame exchanges during device initialization happens on coex queue. This patch adds the handling for coex queue. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_main.c | 9 ++++++++- drivers/net/wireless/rsi/rsi_main.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) commit 015e367494c1d5f5d6405eae5419f7932e96139a Author: Prameela Rani Garnepudi Date: Fri Jun 16 20:05:38 2017 +0530 rsi: Register interrupt handler before firmware load Before firmware load, sometimes false interrupts are received. System hang is observed if interrupt handler is not registered to receive these interrupts. Hence interrupt handler registration is moved before firmware load. We will drop these false interrupts as these are not from the device. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_hal.c | 1 + drivers/net/wireless/rsi/rsi_91x_sdio.c | 21 +++++++++++---------- drivers/net/wireless/rsi/rsi_main.h | 1 + 3 files changed, 13 insertions(+), 10 deletions(-) commit 4833c953fd25389403102cede312d211248c3350 Author: Amitkumar Karwar Date: Fri Jun 16 20:05:37 2017 +0530 rsi: use enum for FSM states Currently macros are used for FSM states. We will replace it with enum so that new state can be added easily without worrying about macro value. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_main.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit d2d1831723df183bcb37e008ec707ee3c3fddcef Author: Prameela Rani Garnepudi Date: Fri Jun 16 20:05:36 2017 +0530 rsi: add usb RS9113 chipset support usb device id and vendor id for RS9113 chipset are included. So it can be used through usb interface. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 1 + 1 file changed, 1 insertion(+) commit 7c26029f87a3865c0dd9e63c306314196cc48587 Author: Shawn Lin Date: Thu Jun 15 16:59:25 2017 +0800 mwifiex: debugfs: remove redunant check of mwifiex_dfs_dir debugfs_remove already check mwifiex_dfs_dir, so remove it. Signed-off-by: Shawn Lin Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 421ba82c676b21f706f9e26d24c8c2596810e599 Author: Caesar Wang Date: Wed Jun 14 19:06:56 2017 +0800 mwifiex: fixes the unexpected be printed log by default This patch uses WARN level is not printed by default. In some cases, some boards have always met the unused log be printed as follows. ... [23193.523182] mwifiex_pcie 0000:01:00.0: mwifiex_get_cfp: cannot find cfp by band 2 & channel=13 freq=0 [23378.633684] mwifiex_pcie 0000:01:00.0: mwifiex_get_cfp: cannot find cfp by band 2 & channel=13 freq=0 Due to we used the wifi default area was US and didn't support 12~14 channels. As Frequencies: * 2412 MHz [1] (30.0 dBm) * 2417 MHz [2] (30.0 dBm) * 2422 MHz [3] (30.0 dBm) * 2427 MHz [4] (30.0 dBm) * 2432 MHz [5] (30.0 dBm) * 2437 MHz [6] (30.0 dBm) * 2442 MHz [7] (30.0 dBm) * 2447 MHz [8] (30.0 dBm) * 2452 MHz [9] (30.0 dBm) * 2457 MHz [10] (30.0 dBm) * 2462 MHz [11] (30.0 dBm) * 2467 MHz [12] (disabled) * 2472 MHz [13] (disabled) * 2484 MHz [14] (disabled) Also, as the commit 1b499cb72f26b ("mwifiex: disable channel filtering feature in firmware"), it proved to be a feature to get better scan result from overlapping channel. Even there could be AP from overlapping channel (might be 12/13/14 in this case), it will be filtered depend on reg domain rules. e.g: ... if (ch->flags & IEEE80211_CHAN_DISABLED) continue; So it should not been an ERROR, use the WARN level to instead it for now. Signed-off-by: Caesar Wang Acked-by: Xinming Hu Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9da96c5e7edd38f8f7457d86efb60d0e8a07191f Author: Kevin Lo Date: Fri May 19 23:02:40 2017 +0800 rtlwifi: fix REG_USTIME_TSF register definition The REG_USTIME_TSF (US Time Tuning for TSF) definition of Realtek chips should be 0x55C. Signed-off-by: Kevin Lo Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8188ee/reg.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/reg.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192de/reg.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/reg.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723be/reg.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 2f89a7953b0d6cab49725eb4c0d1f05a93ecdb99 Merge: 083a032 dd12d15 Author: David S. Miller Date: Wed Jun 21 11:22:54 2017 -0400 Merge branch 'ipmr-ip6mr-add-Netlink-notifications-on-cache-reports' Julien Gomes says: ==================== ipmr/ip6mr: add Netlink notifications on cache reports Currently, all ipmr/ip6mr cache reports are sent through the mroute/mroute6 socket only. This forces the use of a single socket for mroute programming, cache reports and, regarding ipmr, IGMP messages without Router Alert option reception. The present patches are aiming to send Netlink notifications in addition to the existing igmpmsg/mrt6msg to give user programs a way to handle cache reports in parallel with multiple sockets other than the mroute/mroute6 socket. Changes in v2: - Changed attributes naming from {IPMRA,IP6MRA}_CACHEREPORTA_* to {IPMRA,IP6MRA}_CREPORT_* - Improved packet data copy to handle non-linear packets in ipmr/ip6mr cache report Netlink notification creation - Added two rtnetlink groups with restricted-binding - Changed cache report notified groups from RTNL_{IPV4,IPV6}_MROUTE to the new restricted groups in ipmr/ip6mr Changes in v3: - Put message size calculation for {igmp,mrt6}msg_netlink_event in separate functions - Increased vif id attributes size from u8 to u32 ==================== Signed-off-by: David S. Miller commit dd12d15c9a5b422331426980ddf70522c57c3392 Author: Julien Gomes Date: Tue Jun 20 13:54:18 2017 -0700 ip6mr: add netlink notifications on mrt6msg cache reports Add Netlink notifications on cache reports in ip6mr, in addition to the existing mrt6msg sent to mroute6_sk. Send RTM_NEWCACHEREPORT notifications to RTNLGRP_IPV6_MROUTE_R. MSGTYPE, MIF_ID, SRC_ADDR and DST_ADDR Netlink attributes contain the same data as their equivalent fields in the mrt6msg header. PKT attribute is the packet sent to mroute6_sk, without the added mrt6msg header. Suggested-by: Ryan Halbrook Signed-off-by: Julien Gomes Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/mroute6.h | 12 ++++++++ net/ipv6/ip6mr.c | 71 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 81 insertions(+), 2 deletions(-) commit 5a645dd86c1be64728578bcb1bdfb96e21815acb Author: Julien Gomes Date: Tue Jun 20 13:54:17 2017 -0700 ipmr: add netlink notifications on igmpmsg cache reports Add Netlink notifications on cache reports in ipmr, in addition to the existing igmpmsg sent to mroute_sk. Send RTM_NEWCACHEREPORT notifications to RTNLGRP_IPV4_MROUTE_R. MSGTYPE, VIF_ID, SRC_ADDR and DST_ADDR Netlink attributes contain the same data as their equivalent fields in the igmpmsg header. PKT attribute is the packet sent to mroute_sk, without the added igmpmsg header. Suggested-by: Ryan Halbrook Signed-off-by: Julien Gomes Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/mroute.h | 12 ++++++++ net/ipv4/ipmr.c | 69 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 79 insertions(+), 2 deletions(-) commit 5f729eaabef9308cfaa4b27c9b3f120253eff79b Author: Julien Gomes Date: Tue Jun 20 13:54:16 2017 -0700 rtnetlink: add restricted rtnl groups for ipv4 and ipv6 mroute Add RTNLGRP_{IPV4,IPV6}_MROUTE_R as two new restricted groups for the NETLINK_ROUTE family. Binding to these groups specifically requires CAP_NET_ADMIN to allow multicast of sensitive messages (e.g. mroute cache reports). Suggested-by: Nikolay Aleksandrov Signed-off-by: Julien Gomes Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/rtnetlink.h | 4 ++++ net/core/rtnetlink.c | 13 +++++++++++++ 2 files changed, 17 insertions(+) commit 94df30a6521becea7fda16f2c12ff9a01cac1da7 Author: Julien Gomes Date: Tue Jun 20 13:54:15 2017 -0700 rtnetlink: add NEWCACHEREPORT message type New NEWCACHEREPORT message type to be used for cache reports sent via Netlink, effectively allowing splitting cache report reception from mroute programming. Suggested-by: Ryan Halbrook Signed-off-by: Julien Gomes Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/rtnetlink.h | 3 +++ security/selinux/nlmsgtab.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 1278bd149839f2281db45a910082ba143546a148 Author: Hans de Goede Date: Fri Jun 16 15:14:49 2017 +0200 brcmfmac: Use separate firmware for revision 0 of the brcm43430 chip The brcm43430 chip needs different firmware files for chip revision 0 and 1. The file currently in linux-firmware is for revision 1 only. This commit makes brcmfmac request brcmfmac43430a0-sdio.bin instead of brcmfmac43430-sdio.bin for revision 0 chips. Note that the behavior for revision 1 chips is not changed, ideally those would load brcmfmac43430a1-sdio.bin, but that will break existing setups. Signed-off-by: Hans de Goede Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 083a0326aee480008d52612d5118ff9c13301f6a Author: Arnd Bergmann Date: Tue Jun 20 22:11:21 2017 +0200 tcp: md5: hide unused variable Changing from a memcpy to per-member comparison left the size variable unused: net/ipv4/tcp_ipv4.c: In function 'tcp_md5_do_lookup': net/ipv4/tcp_ipv4.c:910:15: error: unused variable 'size' [-Werror=unused-variable] This does not show up when CONFIG_IPV6 is enabled, but the variable can be removed either way, along with the now unused assignment. Fixes: 6797318e623d ("tcp: md5: add an address prefix for key lookup") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 139358be24e526bc8d050e319cdd4e2d1941503e Author: Marek Vasut Date: Tue May 9 08:20:03 2017 -0500 ARM: socfpga: Increase max number of GPIOs Increase the maximum number of GPIOs on SoCFPGA as this platform can have many GPIO controllers in the FPGA part. Signed-off-by: Marek Vasut Signed-off-by: Dinh Nguyen arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit dcbe0d84dfa5a3e72b8e6ce622cd5ac78abbcab8 Author: Amelie Delaunay Date: Wed Jun 21 16:32:06 2017 +0200 spi: add driver for STM32 SPI controller The STM32 Serial Peripheral Interface (SPI) can be used to communicate with external devices while using the specific synchronous protocol. It supports a half-duplex, full-duplex and simplex synchronous, serial communication with external devices with 4-bit to 16/32-bit per word. It has two 8x/16x 8-bit embedded Rx and TxFIFOs with DMA capability. It can operate in master or slave mode. Signed-off-by: Amelie Delaunay Signed-off-by: Mark Brown drivers/spi/Kconfig | 10 + drivers/spi/Makefile | 1 + drivers/spi/spi-stm32.c | 1266 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1277 insertions(+) commit 82a29bf9952acd1be7e76783604686abeb4e5b1d Author: Amelie Delaunay Date: Wed Jun 21 16:32:05 2017 +0200 spi: Document the STM32 SPI bindings This patch adds the documentation of device tree bindings for the STM32 SPI controller. Signed-off-by: Amelie Delaunay Signed-off-by: Mark Brown .../devicetree/bindings/spi/spi-stm32.txt | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 6ef84a827c37547504514a80bdb35f74a67df5a3 Author: Thomas Petazzoni Date: Wed Jun 21 15:29:17 2017 +0200 arm64: dts: marvell: enable GICP and ICU on Armada 7K/8K This commit modifies the Marvell EBU Armada 7K and 8K Device Tree files to describe the ICU and GICP units, and use ICU interrupts for all devices in the CP110 blocks. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 7 +++ .../boot/dts/marvell/armada-cp110-master.dtsi | 59 +++++++++++++--------- .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 55 +++++++++++--------- 3 files changed, 73 insertions(+), 48 deletions(-) commit fdb1388994e2ed0e1512006244022c721c650c5b Author: Filipe Manana Date: Tue Jun 13 14:13:11 2017 +0100 Btrfs: incremental send, fix invalid path for unlink commands An incremental send can contain unlink operations with an invalid target path when we rename some directory inode A, then rename some file inode B to the old name of inode A and directory inode A is an ancestor of inode B in the parent snapshot (but not anymore in the send snapshot). Consider the following example scenario where this issue happens. Parent snapshot: . (ino 256) | |--- dir1/ (ino 257) |--- dir2/ (ino 258) | |--- file1 (ino 259) | |--- file3 (ino 261) | |--- dir3/ (ino 262) |--- file22 (ino 260) |--- dir4/ (ino 263) Send snapshot: . (ino 256) | |--- dir1/ (ino 257) |--- dir2/ (ino 258) |--- dir3 (ino 260) |--- file3/ (ino 262) |--- dir4/ (ino 263) |--- file11 (ino 269) |--- file33 (ino 261) When attempting to apply the corresponding incremental send stream, an unlink operation contains an invalid path which makes the receiver fail. The following is verbose output of the btrfs receive command: receiving snapshot snap2 uuid=7d5450da-a573-e043-a451-ec85f4879f0f (...) utimes utimes dir1 utimes dir1/dir2 link dir1/dir3/dir4/file11 -> dir1/dir2/file1 unlink dir1/dir2/file1 utimes dir1/dir2 truncate dir1/dir3/dir4/file11 size=0 utimes dir1/dir3/dir4/file11 rename dir1/dir3 -> o262-7-0 link dir1/dir3 -> o262-7-0/file22 unlink dir1/dir3/file22 ERROR: unlink dir1/dir3/file22 failed. Not a directory The following steps happen during the computation of the incremental send stream the lead to this issue: 1) Before we start processing the new and deleted references for inode 260, we compute the full path of the deleted reference ("dir1/dir3/file22") and cache it in the list of deleted references for our inode. 2) We then start processing the new references for inode 260, for which there is only one new, located at "dir1/dir3". When processing this new reference, we check that inode 262, which was not yet processed, collides with the new reference and because of that we orphanize inode 262 so its new full path becomes "o262-7-0". 3) After the orphanization of inode 262, we create the new reference for inode 260 by issuing a link command with a target path of "dir1/dir3" and a source path of "o262-7-0/file22". 4) We then start processing the deleted references for inode 260, for which there is only one with the base name of "file22", and issue an unlink operation containing the target path computed at step 1, which is wrong because that path no longer exists and should be replaced with "o262-7-0/file22". So fix this issue by recomputing the full path of deleted references if when we processed the new references for an inode we ended up orphanizing any other inode that is an ancestor of our inode in the parent snapshot. A test case for fstests follows soon. Signed-off-by: Filipe Manana [ adjusted after prev patch removed fs_path::dir_path and dir_path_len ] Signed-off-by: David Sterba fs/btrfs/send.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) commit 72c3668fed2b3eec7c6fc059e7b54855361e3011 Author: Filipe Manana Date: Wed Jun 7 11:41:29 2017 +0100 Btrfs: send, fix invalid path after renaming and linking file Currently an incremental snapshot can generate link operations which contain an invalid target path. Such case happens when in the send snapshot a file was renamed, a new hard link added for it and some other inode (with a lower number) got renamed to the former name of that file. Example: Parent snapshot . (ino 256) | |--- f1 (ino 257) |--- f2 (ino 258) |--- f3 (ino 259) Send snapshot . (ino 256) | |--- f2 (ino 257) |--- f3 (ino 258) |--- f4 (ino 259) |--- f5 (ino 258) The following steps happen when computing the incremental send stream: 1) When processing inode 257, inode 258 is orphanized (renamed to "o258-7-0"), because its current reference has the same name as the new reference for inode 257; 2) When processing inode 258, we iterate over all its new references, which have the names "f3" and "f5". The first iteration sees name "f5" and renames the inode from its orphan name ("o258-7-0") to "f5", while the second iteration sees the name "f3" and, incorrectly, issues a link operation with a target name matching the orphan name, which no longer exists. The first iteration had reset the current valid path of the inode to "f5", but in the second iteration we lost it because we found another inode, with a higher number of 259, which has a reference named "f3" as well, so we orphanized inode 259 and recomputed the current valid path of inode 258 to its old orphan name because inode 259 could be an ancestor of inode 258 and therefore the current valid path could contain the pre-orphanization name of inode 259. However in this case inode 259 is not an ancestor of inode 258 so the current valid path should not be recomputed. This makes the receiver fail with the following error: ERROR: link f3 -> o258-7-0 failed: No such file or directory So fix this by not recomputing the current valid path for an inode whenever we find a colliding reference from some not yet processed inode (inode number higher then the one currently being processed), unless that other inode is an ancestor of the one we are currently processing. A test case for fstests will follow soon. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 609805d809733d0c669f21f710bdac308cc63cba Author: Filipe Manana Date: Tue May 30 05:29:09 2017 +0100 Btrfs: fix invalid extent maps due to hole punching While punching a hole in a range that is not aligned with the sector size (currently the same as the page size) we can end up leaving an extent map in memory with a length that is smaller then the sector size or with a start offset that is not aligned to the sector size. Both cases are not expected and can lead to problems. This issue is easily detected after the patch from commit a7e3b975a0f9 ("Btrfs: fix reported number of inode blocks"), introduced in kernel 4.12-rc1, in a scenario like the following for example: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ xfs_io -c "pwrite -S 0xaa -b 100K 0 100K" /mnt/foo $ xfs_io -c "fpunch 60K 90K" /mnt/foo $ xfs_io -c "pwrite -S 0xbb -b 100K 50K 100K" /mnt/foo $ xfs_io -c "pwrite -S 0xcc -b 50K 100K 50K" /mnt/foo $ umount /mnt After the unmount operation we can see several warnings emmitted due to underflows related to space reservation counters: [ 2837.443299] ------------[ cut here ]------------ [ 2837.447395] WARNING: CPU: 8 PID: 2474 at fs/btrfs/inode.c:9444 btrfs_destroy_inode+0xe8/0x27e [btrfs] [ 2837.452108] Modules linked in: dm_flakey dm_mod ppdev parport_pc psmouse parport sg pcspkr acpi_cpufreq tpm_tis tpm_tis_core i2c_piix4 i2c_core evdev tpm button se rio_raw sunrpc loop autofs4 ext4 crc16 jbd2 mbcache btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c crc32c_gene ric raid1 raid0 multipath linear md_mod sr_mod cdrom sd_mod ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring virtio e1000 scsi_mod floppy [ 2837.458389] CPU: 8 PID: 2474 Comm: umount Tainted: G W 4.10.0-rc8-btrfs-next-43+ #1 [ 2837.459754] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [ 2837.462379] Call Trace: [ 2837.462379] dump_stack+0x68/0x92 [ 2837.462379] __warn+0xc2/0xdd [ 2837.462379] warn_slowpath_null+0x1d/0x1f [ 2837.462379] btrfs_destroy_inode+0xe8/0x27e [btrfs] [ 2837.462379] destroy_inode+0x3d/0x55 [ 2837.462379] evict+0x177/0x17e [ 2837.462379] dispose_list+0x50/0x71 [ 2837.462379] evict_inodes+0x132/0x141 [ 2837.462379] generic_shutdown_super+0x3f/0xeb [ 2837.462379] kill_anon_super+0x12/0x1c [ 2837.462379] btrfs_kill_super+0x16/0x21 [btrfs] [ 2837.462379] deactivate_locked_super+0x30/0x68 [ 2837.462379] deactivate_super+0x36/0x39 [ 2837.462379] cleanup_mnt+0x58/0x76 [ 2837.462379] __cleanup_mnt+0x12/0x14 [ 2837.462379] task_work_run+0x77/0x9b [ 2837.462379] prepare_exit_to_usermode+0x9d/0xc5 [ 2837.462379] syscall_return_slowpath+0x196/0x1b9 [ 2837.462379] entry_SYSCALL_64_fastpath+0xab/0xad [ 2837.462379] RIP: 0033:0x7f3ef3e6b9a7 [ 2837.462379] RSP: 002b:00007ffdd0d8de58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 [ 2837.462379] RAX: 0000000000000000 RBX: 0000556f76a39060 RCX: 00007f3ef3e6b9a7 [ 2837.462379] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000556f76a3f910 [ 2837.462379] RBP: 0000556f76a3f910 R08: 0000556f76a3e670 R09: 0000000000000015 [ 2837.462379] R10: 00000000000006b4 R11: 0000000000000246 R12: 00007f3ef436ce64 [ 2837.462379] R13: 0000000000000000 R14: 0000556f76a39240 R15: 00007ffdd0d8e0e0 [ 2837.519355] ---[ end trace e79345fe24b30b8d ]--- [ 2837.596256] ------------[ cut here ]------------ [ 2837.597625] WARNING: CPU: 8 PID: 2474 at fs/btrfs/extent-tree.c:5699 btrfs_free_block_groups+0x246/0x3eb [btrfs] [ 2837.603547] Modules linked in: dm_flakey dm_mod ppdev parport_pc psmouse parport sg pcspkr acpi_cpufreq tpm_tis tpm_tis_core i2c_piix4 i2c_core evdev tpm button serio_raw sunrpc loop autofs4 ext4 crc16 jbd2 mbcache btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod sr_mod cdrom sd_mod ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring virtio e1000 scsi_mod floppy [ 2837.659372] CPU: 8 PID: 2474 Comm: umount Tainted: G W 4.10.0-rc8-btrfs-next-43+ #1 [ 2837.663359] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [ 2837.663359] Call Trace: [ 2837.663359] dump_stack+0x68/0x92 [ 2837.663359] __warn+0xc2/0xdd [ 2837.663359] warn_slowpath_null+0x1d/0x1f [ 2837.663359] btrfs_free_block_groups+0x246/0x3eb [btrfs] [ 2837.663359] close_ctree+0x1dd/0x2e1 [btrfs] [ 2837.663359] ? evict_inodes+0x132/0x141 [ 2837.663359] btrfs_put_super+0x15/0x17 [btrfs] [ 2837.663359] generic_shutdown_super+0x6a/0xeb [ 2837.663359] kill_anon_super+0x12/0x1c [ 2837.663359] btrfs_kill_super+0x16/0x21 [btrfs] [ 2837.663359] deactivate_locked_super+0x30/0x68 [ 2837.663359] deactivate_super+0x36/0x39 [ 2837.663359] cleanup_mnt+0x58/0x76 [ 2837.663359] __cleanup_mnt+0x12/0x14 [ 2837.663359] task_work_run+0x77/0x9b [ 2837.663359] prepare_exit_to_usermode+0x9d/0xc5 [ 2837.663359] syscall_return_slowpath+0x196/0x1b9 [ 2837.663359] entry_SYSCALL_64_fastpath+0xab/0xad [ 2837.663359] RIP: 0033:0x7f3ef3e6b9a7 [ 2837.663359] RSP: 002b:00007ffdd0d8de58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 [ 2837.663359] RAX: 0000000000000000 RBX: 0000556f76a39060 RCX: 00007f3ef3e6b9a7 [ 2837.663359] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000556f76a3f910 [ 2837.663359] RBP: 0000556f76a3f910 R08: 0000556f76a3e670 R09: 0000000000000015 [ 2837.663359] R10: 00000000000006b4 R11: 0000000000000246 R12: 00007f3ef436ce64 [ 2837.663359] R13: 0000000000000000 R14: 0000556f76a39240 R15: 00007ffdd0d8e0e0 [ 2837.739445] ---[ end trace e79345fe24b30b8e ]--- [ 2837.745595] ------------[ cut here ]------------ [ 2837.746412] WARNING: CPU: 8 PID: 2474 at fs/btrfs/extent-tree.c:5700 btrfs_free_block_groups+0x261/0x3eb [btrfs] [ 2837.747955] Modules linked in: dm_flakey dm_mod ppdev parport_pc psmouse parport sg pcspkr acpi_cpufreq tpm_tis tpm_tis_core i2c_piix4 i2c_core evdev tpm button serio_raw sunrpc loop autofs4 ext4 crc16 jbd2 mbcache btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod sr_mod cdrom sd_mod ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring virtio e1000 scsi_mod floppy [ 2837.755395] CPU: 8 PID: 2474 Comm: umount Tainted: G W 4.10.0-rc8-btrfs-next-43+ #1 [ 2837.756769] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [ 2837.758526] Call Trace: [ 2837.758925] dump_stack+0x68/0x92 [ 2837.759383] __warn+0xc2/0xdd [ 2837.759383] warn_slowpath_null+0x1d/0x1f [ 2837.759383] btrfs_free_block_groups+0x261/0x3eb [btrfs] [ 2837.759383] close_ctree+0x1dd/0x2e1 [btrfs] [ 2837.759383] ? evict_inodes+0x132/0x141 [ 2837.759383] btrfs_put_super+0x15/0x17 [btrfs] [ 2837.759383] generic_shutdown_super+0x6a/0xeb [ 2837.759383] kill_anon_super+0x12/0x1c [ 2837.759383] btrfs_kill_super+0x16/0x21 [btrfs] [ 2837.759383] deactivate_locked_super+0x30/0x68 [ 2837.759383] deactivate_super+0x36/0x39 [ 2837.759383] cleanup_mnt+0x58/0x76 [ 2837.759383] __cleanup_mnt+0x12/0x14 [ 2837.759383] task_work_run+0x77/0x9b [ 2837.759383] prepare_exit_to_usermode+0x9d/0xc5 [ 2837.759383] syscall_return_slowpath+0x196/0x1b9 [ 2837.759383] entry_SYSCALL_64_fastpath+0xab/0xad [ 2837.759383] RIP: 0033:0x7f3ef3e6b9a7 [ 2837.759383] RSP: 002b:00007ffdd0d8de58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 [ 2837.759383] RAX: 0000000000000000 RBX: 0000556f76a39060 RCX: 00007f3ef3e6b9a7 [ 2837.759383] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000556f76a3f910 [ 2837.759383] RBP: 0000556f76a3f910 R08: 0000556f76a3e670 R09: 0000000000000015 [ 2837.759383] R10: 00000000000006b4 R11: 0000000000000246 R12: 00007f3ef436ce64 [ 2837.759383] R13: 0000000000000000 R14: 0000556f76a39240 R15: 00007ffdd0d8e0e0 [ 2837.777063] ---[ end trace e79345fe24b30b8f ]--- [ 2837.778235] ------------[ cut here ]------------ [ 2837.778856] WARNING: CPU: 8 PID: 2474 at fs/btrfs/extent-tree.c:9825 btrfs_free_block_groups+0x348/0x3eb [btrfs] [ 2837.791385] Modules linked in: dm_flakey dm_mod ppdev parport_pc psmouse parport sg pcspkr acpi_cpufreq tpm_tis tpm_tis_core i2c_piix4 i2c_core evdev tpm button serio_raw sunrpc loop autofs4 ext4 crc16 jbd2 mbcache btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod sr_mod cdrom sd_mod ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring virtio e1000 scsi_mod floppy [ 2837.797711] CPU: 8 PID: 2474 Comm: umount Tainted: G W 4.10.0-rc8-btrfs-next-43+ #1 [ 2837.798594] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [ 2837.800118] Call Trace: [ 2837.800515] dump_stack+0x68/0x92 [ 2837.801015] __warn+0xc2/0xdd [ 2837.801471] warn_slowpath_null+0x1d/0x1f [ 2837.801698] btrfs_free_block_groups+0x348/0x3eb [btrfs] [ 2837.801698] close_ctree+0x1dd/0x2e1 [btrfs] [ 2837.801698] ? evict_inodes+0x132/0x141 [ 2837.801698] btrfs_put_super+0x15/0x17 [btrfs] [ 2837.801698] generic_shutdown_super+0x6a/0xeb [ 2837.801698] kill_anon_super+0x12/0x1c [ 2837.801698] btrfs_kill_super+0x16/0x21 [btrfs] [ 2837.801698] deactivate_locked_super+0x30/0x68 [ 2837.801698] deactivate_super+0x36/0x39 [ 2837.801698] cleanup_mnt+0x58/0x76 [ 2837.801698] __cleanup_mnt+0x12/0x14 [ 2837.801698] task_work_run+0x77/0x9b [ 2837.801698] prepare_exit_to_usermode+0x9d/0xc5 [ 2837.801698] syscall_return_slowpath+0x196/0x1b9 [ 2837.801698] entry_SYSCALL_64_fastpath+0xab/0xad [ 2837.801698] RIP: 0033:0x7f3ef3e6b9a7 [ 2837.801698] RSP: 002b:00007ffdd0d8de58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 [ 2837.801698] RAX: 0000000000000000 RBX: 0000556f76a39060 RCX: 00007f3ef3e6b9a7 [ 2837.801698] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000556f76a3f910 [ 2837.801698] RBP: 0000556f76a3f910 R08: 0000556f76a3e670 R09: 0000000000000015 [ 2837.801698] R10: 00000000000006b4 R11: 0000000000000246 R12: 00007f3ef436ce64 [ 2837.801698] R13: 0000000000000000 R14: 0000556f76a39240 R15: 00007ffdd0d8e0e0 [ 2837.818441] ---[ end trace e79345fe24b30b90 ]--- [ 2837.818991] BTRFS info (device sdc): space_info 1 has 7974912 free, is not full [ 2837.819830] BTRFS info (device sdc): space_info total=8388608, used=417792, pinned=0, reserved=0, may_use=18446744073709547520, readonly=0 What happens in the above example is the following: 1) When punching the hole, at btrfs_punch_hole(), the variable tail_len is set to 2048 (as tail_start is 148Kb + 1 and offset + len is 150Kb). This results in the creation of an extent map with a length of 2Kb starting at file offset 148Kb, through find_first_non_hole() -> btrfs_get_extent(). 2) The second write (first write after the hole punch operation), sets the range [50Kb, 152Kb[ to delalloc. 3) The third write, at btrfs_find_new_delalloc_bytes(), sees the extent map covering the range [148Kb, 150Kb[ and ends up calling set_extent_bit() for the same range, which results in splitting an existing extent state record, covering the range [148Kb, 152Kb[ into two 2Kb extent state records, covering the ranges [148Kb, 150Kb[ and [150Kb, 152Kb[. 4) Finally at lock_and_cleanup_extent_if_need(), immediately after calling btrfs_find_new_delalloc_bytes() we clear the delalloc bit from the range [100Kb, 152Kb[ which results in the btrfs_clear_bit_hook() callback being invoked against the two 2Kb extent state records that cover the ranges [148Kb, 150Kb[ and [150Kb, 152Kb[. When called against the first 2Kb extent state, it calls btrfs_delalloc_release_metadata() with a length argument of 2048 bytes. That function rounds up the length to a sector size aligned length, so it ends up considering a length of 4096 bytes, and then calls calc_csum_metadata_size() which results in decrementing the inode's csum_bytes counter by 4096 bytes, so after it stays a value of 0 bytes. Then the same happens when btrfs_clear_bit_hook() is called against the second extent state that has a length of 2Kb, covering the range [150Kb, 152Kb[, the length is rounded up to 4096 and calc_csum_metadata_size() ends up being called to decrement 4096 bytes from the inode's csum_bytes counter, which at that time has a value of 0, leading to an underflow, which is exactly what triggers the first warning, at btrfs_destroy_inode(). All the other warnings relate to several space accounting counters that underflow as well due to similar reasons. A similar case but where the hole punching operation creates an extent map with a start offset not aligned to the sector size is the following: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ xfs_io -f -c "fpunch 695K 820K" $SCRATCH_MNT/bar $ xfs_io -c "pwrite -S 0xaa 1008K 307K" $SCRATCH_MNT/bar $ xfs_io -c "pwrite -S 0xbb -b 630K 1073K 630K" $SCRATCH_MNT/bar $ xfs_io -c "pwrite -S 0xcc -b 459K 1068K 459K" $SCRATCH_MNT/bar $ umount /mnt During the unmount operation we get similar traces for the same reasons as in the first example. So fix the hole punching operation to make sure it never creates extent maps with a length that is not aligned to the sector size nor with a start offset that is not aligned to the sector size, as this breaks all assumptions and it's a land mine. Fixes: d77815461f04 ("btrfs: Avoid trucating page or punching hole in a already existed hole.") Cc: Signed-off-by: Filipe Manana Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 701516ae3dec801084bc913d21e03fce15c61a0b Author: Adrian Hunter Date: Fri May 26 11:17:20 2017 +0300 perf script: Fix message because field list option is -F not -f Fix message because field list option is -F not -f. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-20-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30795467e54f3fe0d00f2dba4e58e6475b8fd2e7 Author: Adrian Hunter Date: Fri May 26 11:17:19 2017 +0300 perf tools: Fix message because cpu list option is -C not -c Fix message because cpu list option is -C not -c Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-19-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2116074898ff9ff093963adc0fefcabbbbd7ec41 Author: Adrian Hunter Date: Fri May 26 11:17:18 2017 +0300 perf intel-pt: Fix transactions_sample_type 'transactions_sample_type' is needed to correctly inject transactions samples but it was not being set. Set it from the event sample type. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-18-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 1 + 1 file changed, 1 insertion(+) commit 5da3b23b3b03d34fbb8cb9947c1a99ea77c2203f Author: Adrian Hunter Date: Fri May 26 11:17:17 2017 +0300 perf intel-pt: Remove redundant initial_skip checks 'initial_skip' is checked inside the sample synthesis functions which means it is actually being done twice for 'instructions' and 'transactions' samples. Remove the redundant checks. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-17-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 0a7c700d23450bd4467855d5162920d5edf314b0 Author: Adrian Hunter Date: Fri May 26 11:17:16 2017 +0300 perf intel-pt: Add decoder support for CBR events Add decoder support for informing the tools of changes to the core-to-bus ratio (CBR). Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-16-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 19 +++++++++++++++++++ tools/perf/util/intel-pt-decoder/intel-pt-decoder.h | 2 ++ 2 files changed, 21 insertions(+) commit 26fb2fb19c28ec692d6604bb01cbb4f03a4ee009 Author: Adrian Hunter Date: Fri May 26 11:17:15 2017 +0300 perf intel-pt: Add reserved byte to CBR packet payload Future proof CBR packet decoding by passing through also the undefined 'reserved' byte in the packet payload. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-15-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 +- tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a472e65fc490ab87e30b7fecb8981f02dbb2b865 Author: Adrian Hunter Date: Fri May 26 11:17:14 2017 +0300 perf intel-pt: Add decoder support for ptwrite and power event packets Add decoder support for PTWRITE, MWAIT, PWRE, PWRX and EXSTOP packets. This patch only affects the decoder, so the tools still do not select or consume the new information. That is added in subsequent patches. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-14-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 176 ++++++++++++++++++++- .../perf/util/intel-pt-decoder/intel-pt-decoder.h | 10 ++ .../util/intel-pt-decoder/intel-pt-pkt-decoder.c | 108 +++++++++++++ .../util/intel-pt-decoder/intel-pt-pkt-decoder.h | 7 + 4 files changed, 293 insertions(+), 8 deletions(-) commit 2bc60ffd663fc706ba70e603c369ae8ba0523b25 Author: Adrian Hunter Date: Fri May 26 11:17:13 2017 +0300 perf intel-pt: Add documentation for new config terms Add documentation for new config terms. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-13-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/intel-pt.txt | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 9fd629f9a6d0eded133f5f9866226f6bbfe5f50d Author: Adrian Hunter Date: Fri May 26 11:17:12 2017 +0300 perf intel-pt: Add default config for pass-through branch enable Branch tracing is enabled by default, so a fake config bit called 'pt' (pass-through) was added to allow the 'branch enable' bit to have affect. Add default config 'pt,branch' which will allow users to disable branch tracing using 'branch=0' instead of having to specify 'pt,branch=0'. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-12-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/intel-pt.c | 5 +++++ 1 file changed, 5 insertions(+) commit 839598176b0554967238234e1e92c7d1e3f0d53d Author: Adrian Hunter Date: Fri May 26 11:17:11 2017 +0300 perf intel-pt: Allow decoding with branch tracing disabled The kernel now supports the disabling of branch tracing, however the decoder assumes branch tracing is always enabled. Pass through a parameter to indicate whether branch tracing is enabled and use it to avoid cases when the decoder is expecting branch packets. There are 2 such cases. First, FUP packets which can bind to an IP even when there is no branch tracing. Secondly, the decoder will try to use branch packets to find an IP to start decoding or to recover from errors. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-11-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 13 +++++++++++++ tools/perf/util/intel-pt-decoder/intel-pt-decoder.h | 1 + tools/perf/util/intel-pt.c | 14 ++++++++++++++ 3 files changed, 28 insertions(+) commit 04194207fe6424c7a1bfd6f43ef7deb90cdf716f Author: Adrian Hunter Date: Fri May 26 11:17:10 2017 +0300 perf intel-pt: Add missing __fallthrough perf tools uses __fallthrough. Add missing __fallthrough to a switch statement. Signed-off-by: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-10-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a558f12dbe85437acbdec5e149ea07b5554eced Author: Adrian Hunter Date: Fri May 26 11:17:09 2017 +0300 perf intel-pt: Clear FUP flag on error Sometimes a FUP packet is associated with a TSX transaction and a flag is set to indicate that. Ensure that flag is cleared on any error condition because at that point the decoder can no longer assume it is correct. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1495786658-18063-9-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 ++ 1 file changed, 2 insertions(+) commit 622b7a47b843c78626f40c1d1aeef8483383fba2 Author: Adrian Hunter Date: Fri May 26 11:17:08 2017 +0300 perf intel-pt: Use FUP always when scanning for an IP The decoder will try to use branch packets to find an IP to start decoding or to recover from errors. Currently the FUP packet is used only in the case of an overflow, however there is no reason for that to be a special case. So just use FUP always when scanning for an IP. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1495786658-18063-8-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit f952eaceb089b691eba7c4e13686e742a8f26bf5 Author: Adrian Hunter Date: Fri May 26 11:17:07 2017 +0300 perf intel-pt: Ensure never to set 'last_ip' when packet 'count' is zero Intel PT uses IP compression based on the last IP. For decoding purposes, 'last IP' is not updated when a branch target has been suppressed, which is indicated by IPBytes == 0. IPBytes is stored in the packet 'count', so ensure never to set 'last_ip' when packet 'count' is zero. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1495786658-18063-7-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ee14ac0ef6827cd6f9a572cc83dd0191ea17812c Author: Adrian Hunter Date: Fri May 26 11:17:06 2017 +0300 perf intel-pt: Fix last_ip usage Intel PT uses IP compression based on the last IP. For decoding purposes, 'last IP' is considered to be reset to zero whenever there is a synchronization packet (PSB). The decoder wasn't doing that, and was treating the zero value to mean that there was no last IP, whereas compression can be done against the zero value. Fix by setting last_ip to zero when a PSB is received and keep track of have_last_ip. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1495786658-18063-6-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit ad7167a8cd174ba7d8c0d0ed8d8410521206d104 Author: Adrian Hunter Date: Fri May 26 11:17:05 2017 +0300 perf intel-pt: Ensure IP is zero when state is INTEL_PT_STATE_NO_IP A value of zero is used to indicate that there is no IP. Ensure the value is zero when the state is INTEL_PT_STATE_NO_IP. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1495786658-18063-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 + 1 file changed, 1 insertion(+) commit 12b7080609097753fd8198cc1daf589be3ec1cca Author: Adrian Hunter Date: Fri May 26 11:17:04 2017 +0300 perf intel-pt: Fix missing stack clear The return compression stack must be cleared whenever there is a PSB. Fix one case where that was not happening. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1495786658-18063-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 + 1 file changed, 1 insertion(+) commit 3f04d98e972b59706bd43d6cc75efac91f8fba50 Author: Adrian Hunter Date: Fri May 26 11:17:03 2017 +0300 perf intel-pt: Improve sample timestamp The decoder uses its current timestamp in samples. Usually that is a timestamp that has already passed, but in some cases it is a timestamp for a branch that the decoder is walking towards, and consequently hasn't reached. Improve that situation by using the pkt_state to determine when to use the current or previous timestamp. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1495786658-18063-3-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 34 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) commit 22c06892332d8916115525145b78e606e9cc6492 Author: Adrian Hunter Date: Fri May 26 11:17:02 2017 +0300 perf intel-pt: Move decoder error setting into one condition Move decoder error setting into one condition. Cc'ed to stable because later fixes depend on it. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1495786658-18063-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a7f0fda085870312ab694b19a1304ece161a1217 Author: Paolo Bonzini Date: Thu Jun 1 12:24:41 2017 +0200 perf unwind: Support for powerpc Porting PPC to libdw only needs an architecture-specific hook to move the register state from perf to libdw. The ARM and x86 architectures already use libdw, and it is useful to have as much common code for the unwinder as possible. Mark Wielaard has contributed a frame-based unwinder to libdw, so that unwinding works even for binaries that do not have CFI information. In addition, libunwind is always preferred to libdw by the build machinery so this cannot introduce regressions on machines that have both libunwind and libdw installed. Signed-off-by: Paolo Bonzini Acked-by: Jiri Olsa Acked-by: Milian Wolff Acked-by: Ravi Bangoria Cc: Naveen N. Rao Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1496312681-20133-1-git-send-email-pbonzini@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- tools/perf/arch/powerpc/util/Build | 2 + tools/perf/arch/powerpc/util/unwind-libdw.c | 73 +++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) commit daefd0bc0bd28cea2e6b2f3e1a9da005cd4f58fc Author: Kan Liang Date: Fri May 26 12:05:38 2017 -0700 perf stat: Add support to measure SMI cost Implementing a new --smi-cost mode in perf stat to measure SMI cost. During the measurement, the /sys/device/cpu/freeze_on_smi will be set. The measurement can be done with one counter (unhalted core cycles), and two free running MSR counters (IA32_APERF and SMI_COUNT). In practice, the percentages of SMI core cycles should be more useful than absolute value. So the output will be the percentage of SMI core cycles and SMI#. metric_only will be set by default. SMI cycles% = (aperf - unhalted core cycles) / aperf Here is an example output. Performance counter stats for 'sudo echo ': SMI cycles% SMI# 0.1% 1 0.010858678 seconds time elapsed Users who wants to get the actual value can apply additional --no-metric-only. Signed-off-by: Kan Liang Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Cc: Robert Elliott Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1495825538-5230-3-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 14 ++++++++++ tools/perf/builtin-stat.c | 49 ++++++++++++++++++++++++++++++++++ tools/perf/util/stat-shadow.c | 33 +++++++++++++++++++++++ tools/perf/util/stat.c | 2 ++ tools/perf/util/stat.h | 2 ++ 5 files changed, 100 insertions(+) commit 3b00ea938653d136c8e4bcbe9722d954e128ce2e Author: Kan Liang Date: Fri May 26 12:05:37 2017 -0700 tools lib api fs: Add sysfs__write_int function Add sysfs__write_int() to ease up writing int to sysfs. New interface is: int sysfs__write_int(const char *entry, int value); Also, introducing filename__write_int() which is useful for new helpers to write sysctl values. Signed-off-by: Kan Liang Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Cc: Robert Elliott Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1495825538-5230-2-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/fs/fs.c | 30 ++++++++++++++++++++++++++++++ tools/lib/api/fs/fs.h | 4 ++++ 2 files changed, 34 insertions(+) commit 30fd8fc5c91973485705f83c7efe9588b8e6f371 Author: Bartosz Golaszewski Date: Wed May 31 18:07:00 2017 +0200 irq/generic-chip: Provide devm_irq_setup_generic_chip() Provide a resource managed variant of irq_setup_generic_chip(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Link: http://lkml.kernel.org/r/1496246820-13250-6-git-send-email-brgl@bgdev.pl Documentation/driver-model/devres.txt | 1 + include/linux/irq.h | 3 ++ kernel/irq/devres.c | 52 +++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) commit 1c3e36309fe2e94b8a889fa32cb5c871434f8ed6 Author: Bartosz Golaszewski Date: Wed May 31 18:06:59 2017 +0200 irq/generic-chip: Provide devm_irq_alloc_generic_chip() Provide a resource managed variant of irq_alloc_generic_chip(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Link: http://lkml.kernel.org/r/1496246820-13250-5-git-send-email-brgl@bgdev.pl Documentation/driver-model/devres.txt | 1 + include/linux/irq.h | 5 +++++ kernel/irq/devres.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) commit f160203986a6ad23ab8077c4a25b260fe55d6e26 Author: Bartosz Golaszewski Date: Wed May 31 18:06:58 2017 +0200 irq/generic-chip: Export irq_init_generic_chip() locally This function will be used in the devres variant of irq_alloc_generic_chip(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Link: http://lkml.kernel.org/r/1496246820-13250-4-git-send-email-brgl@bgdev.pl kernel/irq/generic-chip.c | 7 +++---- kernel/irq/internals.h | 11 +++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) commit 32bb6cbb3b4ea5ca24e3fa13e11772c192616e04 Author: Bartosz Golaszewski Date: Wed May 31 18:06:57 2017 +0200 irq/generic-chip: Provide irq_destroy_generic_chip() Most users of irq_alloc_generic_chip() call irq_setup_generic_chip() too. To simplify the cleanup provide a function that both removes a generic chip and frees its memory. Signed-off-by: Bartosz Golaszewski Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Link: http://lkml.kernel.org/r/1496246820-13250-3-git-send-email-brgl@bgdev.pl include/linux/irq.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 707188f5f2421a304324e6ef3aaf4413cfab0f3d Author: Bartosz Golaszewski Date: Wed May 31 18:06:56 2017 +0200 irq/generic-chip: Provide irq_free_generic_chip() Currently there's no way for users of irq_alloc_generic_chip() to free the allocated memory other than calling kfree() manually on the returned pointer. This may lead to errors if the internals of irq_alloc_generic_chip() ever change. Provide a routine to free the generic chip. Signed-off-by: Bartosz Golaszewski Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Link: http://lkml.kernel.org/r/1496246820-13250-2-git-send-email-brgl@bgdev.pl include/linux/irq.h | 6 ++++++ 1 file changed, 6 insertions(+) commit cddf3b2cb33e01087e82580a4a7d508f08ba59e4 Author: Jeff Mahoney Date: Tue Jun 20 08:15:26 2017 -0400 btrfs: add cond_resched to btrfs_qgroup_trace_leaf_items On an uncontended system, we can end up hitting soft lockups while doing replace_path. At the core, and frequently called is btrfs_qgroup_trace_leaf_items, so it makes sense to add a cond_resched there. Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/qgroup.c | 1 + 1 file changed, 1 insertion(+) commit 0e9350de2ecdf22f003107d3d21db59e17c521ad Author: Dan Carpenter Date: Mon Jun 19 13:55:37 2017 +0300 btrfs: use new block error code This function is supposed to return blk_status_t error codes now but there was a stray -ENOMEM left behind. Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t") Signed-off-by: Dan Carpenter Acked-by: Christoph Hellwig Acked-by: David Sterba Signed-off-by: Jens Axboe fs/btrfs/compression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1d20e22dd67cc2df0c235668ed42e91e6dddd58 Author: yuan linyu Date: Wed Jun 21 20:04:40 2017 +0800 idsn: fix wrong skb_put() used in my commit b952f4dff2751252db073c27c0f8a16a416a2ddc, - *(u8 *)skb_put(skb_out, 1) = (u8)(accm >> 24); \ + skb_put(skb_out, (u8)(accm >> 24)); \ it should skb_put_u8() Fixes: b952f4dff275 ("net: manual clean code which call skb_put_[data:zero])") Signed-off-by: yuan linyu Signed-off-by: David S. Miller drivers/isdn/i4l/isdn_bsdcomp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a520b49ec15576784774f77c914d7020fa7aef13 Author: Maya Erez Date: Fri Jun 16 10:38:05 2017 +0300 wil6210: remove ioctl interface Wireless drivers should not be using ioctl interface, hence remove this interface for wil6210 driver. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/Makefile | 1 - drivers/net/wireless/ath/wil6210/ioctl.c | 180 ----------------------------- drivers/net/wireless/ath/wil6210/netdev.c | 8 -- drivers/net/wireless/ath/wil6210/wil6210.h | 1 - include/uapi/linux/wil6210_uapi.h | 87 -------------- 5 files changed, 277 deletions(-) commit fe9ee51e6a43a79d9c6bf92124b4db542157aed3 Author: Maya Erez Date: Fri Jun 16 10:38:04 2017 +0300 wil6210: add support for PCIe D3hot in system suspend In order to preserve the connection in suspend/resume flow, wil6210 host allows going to PCIe D3hot state in suspend, instead of performing a full wil6210 device reset. This requires the platform ability to initiate wakeup in case of RX data. To check that, a new platform API is added. In addition, add cfg80211 suspend/resume callbacks implementation. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 38 ++++ drivers/net/wireless/ath/wil6210/debugfs.c | 49 +++++ drivers/net/wireless/ath/wil6210/interrupt.c | 6 + drivers/net/wireless/ath/wil6210/main.c | 7 +- drivers/net/wireless/ath/wil6210/pcie_bus.c | 50 ++++-- drivers/net/wireless/ath/wil6210/pm.c | 228 ++++++++++++++++++++++-- drivers/net/wireless/ath/wil6210/txrx.c | 71 ++++++++ drivers/net/wireless/ath/wil6210/wil6210.h | 26 +++ drivers/net/wireless/ath/wil6210/wil_platform.h | 7 +- drivers/net/wireless/ath/wil6210/wmi.c | 143 +++++++++++++++ drivers/net/wireless/ath/wil6210/wmi.h | 27 +-- 11 files changed, 603 insertions(+), 49 deletions(-) commit 5b49ee9f13c7c3079117fc07ee603656c809e6c2 Author: Dedy Lansky Date: Fri Jun 16 10:38:03 2017 +0300 wil6210: prevent platform callbacks after uninit After calling platform_ops.uninit() it is still possible to invoke platform callbacks. To prevent this, zero platform_ops right after invoking uninit. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/pcie_bus.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 6824834946a61cdbb1d7e4102c3931785b4ce733 Author: Sven Eckelmann Date: Fri Jun 16 10:37:46 2017 +0300 ath10k: set rxnss_override for QCA9888 QCA9888 supports VHT80 with 2x2. But it only support 1x1 with VHT160 or VHT80+80. Inform userspace and the the QCA firmware about that limitation whenever VHT80+80 or VHT160 is configured. Signed-off-by: Sven Eckelmann [kvalo@qca.qualcomm.com: use hw_params] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit cc914a55006eb16f0d46188fd1f50d1fa014dbc8 Author: Ben Greear Date: Fri Jun 16 10:37:45 2017 +0300 ath10k: configure rxnss_override for QCA9984 QCA9984 hardware can do 4x4 at 80Mhz, but only 2x2 at 160Mhz. First, report this to user-space by setting the max-tx-speed and max-rx-speed vht capabilities. Second, if the peer rx-speed is configured, and if we are in 160 or 80+80 mode, and the peer rx-speed matches the max speed for 2x2 or 1x1 at 160Mhz (long guard interval), then use that info to set the peer_bw_rxnss_override appropriately. Without this, a 9984 firmware will not use 2x2 ratesets when transmitting to peer (it will be stuck at 1x1), because the firmware would not have configured the rxnss_override. Signed-off-by: Ben Greear [sven.eckelmann@openmesh.com: rebase, cleanup, drop 160Mhz workaround cleanup] Signed-off-by: Sven Eckelmann [kvalo@qca.qualcomm.com: use hw_params, rename the title] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 28 ++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 6 ++++++ drivers/net/wireless/ath/ath10k/mac.c | 26 ++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 7 ++++++- drivers/net/wireless/ath/ath10k/wmi.h | 3 +++ 5 files changed, 69 insertions(+), 1 deletion(-) commit e509e59477083b09e808c8c20562983d34172bb9 Author: Ben Greear Date: Fri Jun 16 10:37:44 2017 +0300 ath10k: use complete VHT chan width for 160MHz workaround The ath10k firmware doesn't announce its VHT channel width capabilities in the vht_cap information from the "service ready event" arguments. The driver must therefore check whether the 160MHz short GI bit is set and whether the driver still doesn't set the bits for the 160/80+80 MHz capabilities. The two bits for the channel width are a two bit integer and not two separate bits which cannot be parsed without the knowledge of the other bit. Using IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ (b10..) as a mask for this task doesn't make any sense. The correct mask for the VHT channel width should be used instead to make this check more readable. Signed-off-by: Ben Greear [sven.eckelmann@openmesh.com: separate 160Mhz workaround cleanup, add commit message] Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4c14365853f192ceb6e11b4cd6de55ef209744d Author: Gregory CLEMENT Date: Mon Jun 12 17:34:55 2017 +0200 arm64: marvell: enable the Armada 7K/8K pinctrl driver This commit makes sure the drivers for the Armada 7K/8K pin controllers are enabled. Reviewed-by: Thomas Petazzoni Acked-by: Linus Walleij Signed-off-by: Gregory CLEMENT arch/arm64/Kconfig.platforms | 2 ++ 1 file changed, 2 insertions(+) commit a87027196803227dd9f4ee848f4aa2dbfe699c4c Author: Viresh Kumar Date: Thu Apr 20 16:25:08 2017 +0530 ARM: pxa: Use - instead of @ for DT OPP entries Compiling the DT file with W=1, DTC warns like follows: Warning (unit_address_vs_reg): Node /opp_table0/opp@1000000000 has a unit name, but no reg property Fix this by replacing '@' with '-' as the OPP nodes will never have a "reg" property. Reported-by: Krzysztof Kozlowski Reported-by: Masahiro Yamada Suggested-by: Mark Rutland Signed-off-by: Viresh Kumar Acked-by: Rob Herring Signed-off-by: Robert Jarzmik arch/arm/boot/dts/pxa25x.dtsi | 8 ++++---- arch/arm/boot/dts/pxa27x.dtsi | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 280e87e98c09b85b617c7b2752c8b504c4ea98f6 Author: Dmitry Safonov Date: Mon Jun 19 17:32:42 2017 +0100 ARM: 8683/1: ARM32: Support mremap() for sigpage/vDSO CRIU restores application mappings on the same place where they were before Checkpoint. That means, that we need to move vDSO and sigpage during restore on exactly the same place where they were before C/R. Make mremap() code update mm->context.{sigpage,vdso} pointers during VMA move. Sigpage is used for landing after handling a signal - if the pointer is not updated during moving, the application might crash on any signal after mremap(). vDSO pointer on ARM32 is used only for setting auxv at this moment, update it during mremap() in case of future usage. Without those updates, current work of CRIU on ARM32 is not reliable. Historically, we error Checkpointing if we find vDSO page on ARM32 and suggest user to disable CONFIG_VDSO. But that's not correct - it goes from x86 where signal processing is ended in vDSO blob. For arm32 it's sigpage, which is not disabled with `CONFIG_VDSO=n'. Looks like C/R was working by luck - because userspace on ARM32 at this moment always sets SA_RESTORER. Signed-off-by: Dmitry Safonov Acked-by: Andy Lutomirski Cc: linux-arm-kernel@lists.infradead.org Cc: Will Deacon Cc: Thomas Gleixner Cc: Cyrill Gorcunov Cc: Pavel Emelyanov Cc: Christopher Covington Signed-off-by: Russell King arch/arm/kernel/process.c | 8 ++++++++ arch/arm/kernel/vdso.c | 18 ++++++++++++++++++ arch/x86/entry/vdso/vma.c | 3 --- mm/mmap.c | 4 ++++ 4 files changed, 30 insertions(+), 3 deletions(-) commit b85d65dd47e1606299dc054d2162b795df65c94a Author: Aravind Thokala Date: Mon Jun 19 23:47:48 2017 +0530 spi/bcm63xx: Fix checkpatch warnings This patch fixes the checkpatch.pl warnings on the driver file. Signed-off-by: Aravind Thokala Reviewed-by: Florian Fainelli Signed-off-by: Mark Brown drivers/spi/spi-bcm63xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 947f4eb58d2054b10a1d8146d0ab90b0e7fd3494 Author: Kuninori Morimoto Date: Fri Jun 16 00:02:59 2017 +0000 ASoC: rsnd: fixup unsigned expression compared with zero: main_rate This patch fixes this WARNING sound/soc/sh/rcar/ssi.c:285:5-14: WARNING: Unsigned expression\ compared with zero: main_rate < 0 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 +- sound/soc/sh/rcar/rsnd.h | 2 +- sound/soc/sh/rcar/ssi.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit 03e4d5d56fa5cbd47d0a8964db3722e7977723a3 Author: olivier moysan Date: Tue Jun 20 11:58:47 2017 +0200 ASoC: stm32: Add SPDIFRX support Add SPDIFRX support to STM32. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/Kconfig | 10 + sound/soc/stm/Makefile | 4 + sound/soc/stm/stm32_spdifrx.c | 998 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1012 insertions(+) commit 0507cb0226acfd7ba114c59f6a76fdc7a1c6b01e Author: olivier moysan Date: Tue Jun 20 11:58:46 2017 +0200 ASoC: stm32: Add DT bindings for SPDIFRX interface Add documentation of device tree bindings for the STM32 SPDIFRX interface. Signed-off-by: olivier moysan Signed-off-by: Mark Brown .../devicetree/bindings/sound/st,stm32-spdifrx.txt | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 2c147776dc8b3d67ec42605dcba4deb98f2d0536 Author: Fabio Estevam Date: Tue Jun 20 13:50:55 2017 -0300 spi: imx: Check for allocation failure earlier In case of spi_alloc_master() failure it is better to return the error immediately, so move the error check right after the allocation. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 61c9e029912d4962c52361f0f7cb5f77c405f08b Author: Viresh Kumar Date: Thu Apr 20 16:25:11 2017 +0530 arm64: dts: zte: Use - instead of @ for DT OPP entries Compiling the DT file with W=1, DTC warns like follows: Warning (unit_address_vs_reg): Node /opp_table0/opp@1000000000 has a unit name, but no reg property Fix this by replacing '@' with '-' as the OPP nodes will never have a "reg" property. Reported-by: Krzysztof Kozlowski Reported-by: Masahiro Yamada Suggested-by: Mark Rutland Signed-off-by: Viresh Kumar Acked-by: Rob Herring Signed-off-by: Shawn Guo arch/arm64/boot/dts/zte/zx296718.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 73d7ee2e831f106ca5c745b2cf4fdbac5a4e9e4e Author: Kuninori Morimoto Date: Wed Jun 21 04:38:13 2017 +0000 ASoC: pxa: add COMPILE_TEST on SND_PXA2XX_SOC It doesn't use asm header. We can add COMPILE_TEST Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 372f69a01be178b896ebb8ef7021e0b165084b25 Author: Kuninori Morimoto Date: Wed Jun 21 04:37:18 2017 +0000 ASoC: fsl: mpc5200_dma: remove unused psc_dma linux/sound/soc/fsl/mpc5200_dma.c:305:18: warning: unused variable \ psc_dma’ [-Wunused-variable] Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/mpc5200_dma.c | 1 - 1 file changed, 1 deletion(-) commit 6b847d795cf4ab3e574f4fcf7193fe245908a195 Author: Santosh Sivaraj Date: Tue Jun 20 13:14:47 2017 +0530 powerpc/time: Fix tracing in time.c Since trace_clock is in a different file and already marked with notrace, enable tracing in time.c by removing it from the disabled list in Makefile. Also annotate clocksource read functions and sched_clock with notrace. Testing: Timer and ftrace selftests run with different trace clocks. Acked-by: Naveen N. Rao Signed-off-by: Santosh Sivaraj Signed-off-by: Michael Ellerman arch/powerpc/kernel/Makefile | 2 -- arch/powerpc/kernel/time.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) commit e6f0acb2f0da89625aefc84b448f457b9161436b Author: Eric Anholt Date: Thu Jun 15 10:54:23 2017 -0700 bridge: Fix panel-bridge error return on !panel. ERR_PTR() needs a negative errno argument. Signed-off-by: Eric Anholt Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170615175423.17954-1-eric@anholt.net drivers/gpu/drm/bridge/panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fee4964f0a6cd2ce6368d2c69e9ec8e6f44fb0ec Author: Arnd Bergmann Date: Tue Jun 20 22:30:38 2017 +0200 drm/arm: hdlcd: remove unused variables The last rework left behind two unused variables: drm/arm/hdlcd_crtc.c: In function 'hdlcd_plane_atomic_update': drm/arm/hdlcd_crtc.c:264:13: warning: unused variable 'src_y' [-Wunused-variable] drm/arm/hdlcd_crtc.c:264:6: warning: unused variable 'src_x' [-Wunused-variable] This removes them. Fixes: b2ae06ae9834 ("drm/arm: hdlcd: Use CMA helper for plane buffer address calculation") Signed-off-by: Arnd Bergmann Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e82232c420e9bd40813000e82233e4b206d38d1 Author: Wei-Ning Huang Date: Wed Jun 21 10:43:25 2017 +0800 HID: multitouch: Add support for Google Rose Touchpad Add Google Rose Touchpad USB PID and required quirks. Signed-off-by: Wei-Ning Huang Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-multitouch.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) commit 49a58f26af7b5ee28ea8788fcd2bb7b590c711c5 Author: Liviu Dudau Date: Tue Jun 13 12:18:03 2017 +0100 drm/arm: hdlcd: Use CMA helper for plane buffer address calculation CMA has gained a recent helper function for calculating the start of the plane buffer's physical address. Use that instead of the hand rolled version. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_crtc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit de5cc8155cd250a31da67dea49aff7637ce98887 Author: Liviu Dudau Date: Tue Jun 6 15:05:21 2017 +0100 drm/arm: hdlcd: Set the CRTC's port before binding the encoder. The component-based encoder(s) used by HDLCD expect the CRTC port to be set before binding in order to find the right endpoint. Without this patch, the TDA19988 encoder driver prints a warning "Falling back to first CRTC". Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_drv.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 504c932c7c47a6b4c572302a13873f7d83af1ff3 Author: Masaki Ota Date: Fri Jun 16 09:29:39 2017 +0900 HID: multitouch: Support PTP Stick and Touchpad device Support PTP Stick and Touchpad device. This Touchpad is Precision Touchpad (PTP), and Stick Pointer data is the same as Mouse; Stick Pointer works as Mouse. [jkosina@suse.cz: changelog deuglification] Signed-off-by: Masaki Ota Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 2 ++ drivers/hid/hid-multitouch.c | 23 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) commit c2d6af53a43fd8bb528eac8f31ffb666e9c74cf7 Author: Kailang Yang Date: Wed Jun 21 14:50:54 2017 +0800 ALSA: hda/realtek - Add default procedure for suspend and resume state Except ALC269. This will reduce pop noise from headset or headphone. If codec enter to power save state, when plug headset or headphone.... It has a chance to cut off power by system. Our new codec use this procedure will be more stable during suspend and resume state. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 65 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) commit c22ac6d29f18d3210c545f77e4f95b856ab5f983 Author: Johan Hovold Date: Tue Jun 20 12:52:03 2017 +0200 USB: serial: propagate late probe errors Propagate errnos for late probe errors (e.g. -ENOMEM on allocation failures) instead of always returning -EIO. Note that some drivers are currently returning -ENODEV from their attach callbacks when a device is not supported, but this has also been mapped to -EIO. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 45e5d4d418f37cb9b2746c1fc63ab89b7b521d78 Author: Johan Hovold Date: Tue Jun 20 12:52:02 2017 +0200 USB: serial: refactor port endpoint setup Make the probe callback more readable by refactoring the port endpoint-resource setup by adding four helper functions. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 222 +++++++++++++++++++++++----------------- 1 file changed, 130 insertions(+), 92 deletions(-) commit 5c7f2c76cd6245d64afc09b1b5c8145adc2fd907 Author: Keerthy Date: Thu Jun 15 12:03:11 2017 +0530 gpio: lp87565: Add support for GPIO Add driver for lp87565 PMIC family GPIOs. Three GPIOs are supported and can be configured in Open-drain output or Push-pull output. Signed-off-by: Keerthy Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 10 +++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-lp87565.c | 190 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+) commit edadced2bc7012108b05b47c0649c257ad28f03c Author: Xiaoguang Chen Date: Fri Jun 2 07:27:15 2017 +0800 gpio: dwapb: fix missing first irq for edgeboth irq type dwapb_irq_set_type overwrites polarity register value for IRQ_TYPE_EDGE_BOTH case. If the polarity of one gpio is 0 by default, then it will set falling edge irq trigger. and the gpio may requires rising edge irq for the first time, and it will be missed. Do not overwrite polarity register for IRQ_TYPE_EDGE_BOTH case can solve this issue. Signed-off-by: Xiaoguang Chen Tested-by: Jisheng Zhang [Fix some really weird text encoding problem] Signed-off-by: Linus Walleij drivers/gpio/gpio-dwapb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e1045f65605165d17dec5e0d027ca4ba24b70da6 Author: Ulrich Hecht Date: Tue Jun 20 15:31:22 2017 +0200 pinctrl: sh-pfc: r8a7792: Add SCIF1 and SCIF2 pin groups Add SCIF1 and SCIF2 pin groups to the R8A7792 PFC driver. Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 17d9d6875ce89c0c98bb54d4d5649efb22986bf3 Merge: f0cd9ae 7673925 Author: Thomas Gleixner Date: Wed Jun 21 09:08:13 2017 +0200 Merge branch 'fortglx/4.13/time' of https://git.linaro.org/people/john.stultz/linux into timers/core Merge time(keeping) updates from John Stultz: "Just a small set of changes, the biggest changes being the MONOTONIC_RAW handling cleanup, and a new kselftest from Miroslav. Also a a clear warning deprecating CONFIG_GENERIC_TIME_VSYSCALL_OLD, which affects ppc and ia64." commit f0cd9ae5d0df8668e76359a3e0e99856aa9c53b9 Merge: 098b0e0 8e6cec1c Author: Thomas Gleixner Date: Wed Jun 21 09:07:52 2017 +0200 Merge branch 'timers/urgent' into timers/core Pick up dependent changes. commit fd88b945c18866962645d09dfc401e91e13b1909 Author: Michael Ellerman Date: Mon Jun 19 21:57:33 2017 +1000 powerpc/64s: Rename slb_allocate_realmode() to slb_allocate() As for slb_miss_realmode(), rename slb_allocate_realmode() to avoid confusion over whether it runs in real or virtual mode - it runs in both. Signed-off-by: Michael Ellerman Reviewed-by: Nicholas Piggin arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/mm/slb.c | 10 +--------- arch/powerpc/mm/slb_low.S | 6 +++--- 3 files changed, 5 insertions(+), 13 deletions(-) commit 442b6e8e03e44dc3a33142ab3b8d0b3395053274 Author: Michael Ellerman Date: Mon Jun 19 21:52:03 2017 +1000 powerpc/64s: Rename slb_miss_realmode() to slb_miss_common() slb_miss_realmode() doesn't always runs in real mode, which is what the name implies. So rename it to avoid confusing people. Signed-off-by: Michael Ellerman Reviewed-by: Nicholas Piggin arch/powerpc/kernel/exceptions-64s.S | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit b102063b47d59752e113c5588422279c75eadd4d Author: Michael Ellerman Date: Mon Jun 19 21:47:11 2017 +1000 powerpc/64s: Use BRANCH_TO_COMMON() for slb_miss_realmode All the callers of slb_miss_realmode currently open code the #ifndef CONFIG_RELOCATABLE check and the branch via CTR in the RELOCATABLE case. We have a macro to do this, BRANCH_TO_COMMON(), so use it. Signed-off-by: Michael Ellerman Reviewed-by: Nicholas Piggin arch/powerpc/kernel/exceptions-64s.S | 42 ++++-------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) commit 767392565a3e618950fe1a5ff1ba11295f6332f4 Author: Miroslav Lichvar Date: Fri Jun 9 13:43:17 2017 +0200 kselftests: timers: Add test for frequency step This test checks the response of the system clock to frequency steps made with adjtimex(). The frequency error and stability of the CLOCK_MONOTONIC clock relative to the CLOCK_MONOTONIC_RAW clock is measured in two intervals following the step. The test fails if values from the second interval exceed specified limits. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Shuah Khan Signed-off-by: Miroslav Lichvar Signed-off-by: John Stultz tools/testing/selftests/timers/Makefile | 5 +- tools/testing/selftests/timers/freq-step.c | 268 +++++++++++++++++++++++++++++ 2 files changed, 271 insertions(+), 2 deletions(-) commit 7a5de5512296fd2ab7a497e4a576196b1f046e78 Author: Miroslav Lichvar Date: Tue Jun 13 12:57:07 2017 +0200 kselftests: timers: Fix inconsistency-check to not ignore first timestamp When the first timestamp in the list of clock readings was later than the second timestamp and all other timestamps were in order, the inconsistency was not reported because the index of the out-of-order timestamp was equal to the default value. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Shuah Khan Signed-off-by: Miroslav Lichvar Signed-off-by: John Stultz tools/testing/selftests/timers/inconsistency-check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 369adf04d80a7e179b9ea6d74cc01c233f142f47 Author: John Stultz Date: Fri May 12 10:58:18 2017 -0700 time: Add warning about imminent deprecation of CONFIG_GENERIC_TIME_VSYSCALL_OLD CONFIG_GENERIC_TIME_VSYSCALL_OLD was introduced five years ago to allow a transition from the old vsyscall implementations to the new method (which simplified internal accounting and made timekeeping more precise). However, PPC and IA64 have yet to make the transition, despite in some cases me sending test patches to try to help it along. http://patches.linaro.org/patch/30501/ http://patches.linaro.org/patch/35412/ If its helpful, my last pass at the patches can be found here: https://git.linaro.org/people/john.stultz/linux.git dev/oldvsyscall-cleanup So I think its time to set a deadline and make it clear this is going away. So this patch adds warnings about this functionality being dropped. Likely to be in v4.15. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Marcelo Tosatti Cc: Paul Mackerras Cc: Anton Blanchard Cc: Benjamin Herrenschmidt Cc: Tony Luck Cc: Michael Ellerman Cc: Fenghua Yu Signed-off-by: John Stultz kernel/time/timekeeping.c | 1 + 1 file changed, 1 insertion(+) commit fc6eead7c1e2e5376c25d2795d4539fdacbc0648 Author: John Stultz Date: Mon May 22 17:20:20 2017 -0700 time: Clean up CLOCK_MONOTONIC_RAW time handling Now that we fixed the sub-ns handling for CLOCK_MONOTONIC_RAW, remove the duplicitive tk->raw_time.tv_nsec, which can be stored in tk->tkr_raw.xtime_nsec (similarly to how its handled for monotonic time). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Kevin Brodsky Cc: Will Deacon Cc: Daniel Mentz Tested-by: Daniel Mentz Signed-off-by: John Stultz arch/arm64/kernel/vdso.c | 6 ++--- include/linux/timekeeper_internal.h | 4 ++-- kernel/time/timekeeping.c | 45 ++++++++++++++++++++----------------- 3 files changed, 29 insertions(+), 26 deletions(-) commit 8aa586c6880442c7b288bea28d6eba039411915a Author: Mahesh Salgaonkar Date: Thu May 11 16:33:12 2017 +0530 powerpc/book3s: EXPORT_SYMBOL_GPL machine_check_print_event_info It will be used in arch/powerpc/kvm/book3s_hv.c KVM module. Signed-off-by: Mahesh Salgaonkar Acked-by: Michael Ellerman Signed-off-by: Paul Mackerras arch/powerpc/kernel/mce.c | 1 + 1 file changed, 1 insertion(+) commit 134764ed6e12d9f99b3de68b8aaeae1ba842d91c Author: Aravinda Prasad Date: Thu May 11 16:32:48 2017 +0530 KVM: PPC: Book3S HV: Add new capability to control MCE behaviour This introduces a new KVM capability to control how KVM behaves on machine check exception (MCE) in HV KVM guests. If this capability has not been enabled, KVM redirects machine check exceptions to guest's 0x200 vector, if the address in error belongs to the guest. With this capability enabled, KVM will cause a guest exit with the exit reason indicating an NMI. The new capability is required to avoid problems if a new kernel/KVM is used with an old QEMU, running a guest that doesn't issue "ibm,nmi-register". As old QEMU does not understand the NMI exit type, it treats it as a fatal error. However, the guest could have handled the machine check error if the exception was delivered to guest's 0x200 interrupt vector instead of NMI exit in case of old QEMU. [paulus@ozlabs.org - Reworded the commit message to be clearer, enable only on HV KVM.] Signed-off-by: Aravinda Prasad Reviewed-by: David Gibson Signed-off-by: Mahesh Salgaonkar Signed-off-by: Paul Mackerras Documentation/virtual/kvm/api.txt | 11 +++++++++++ arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kvm/powerpc.c | 14 ++++++++++++++ include/uapi/linux/kvm.h | 1 + 5 files changed, 28 insertions(+) commit cdac74ddf28e2f07319cc89446f9dea35d22d999 Merge: e4b0852 f28e783 Author: James Morris Date: Wed Jun 21 11:30:20 2017 +1000 Merge branch 'smack-for-4.13' of git://github.com/cschaufler/smack-next into next commit 5435c023b92ee1cfb896d924d28c6d31d8386aa0 Author: Bart Van Assche Date: Tue Jun 20 11:15:49 2017 -0700 blk-mq: Warn when attempting to run a hardware queue that is not mapped A queue must be frozen while the mapped state of a hardware queue is changed. Additionally, any change of the mapped state is followed by a call to blk_mq_map_swqueue() (see also blk_mq_init_allocated_queue() and blk_mq_update_nr_hw_queues()). Since blk_mq_map_swqueue() does not map any unmapped hardware queue onto any software queue, no attempt will be made to run an unmapped hardware queue. Hence issue a warning upon attempts to run an unmapped hardware queue. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit edf8ff558887364714e115d396b2d06949cf1e07 Author: Bart Van Assche Date: Tue Jun 20 11:15:48 2017 -0700 block: Constify disk_type The variable 'disk_type' is never modified so constify it. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Signed-off-by: Jens Axboe block/genhd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b6078146ccbe9bd165d578586b10ea092ac489e Author: Bart Van Assche Date: Tue Jun 20 11:15:47 2017 -0700 blk-mq: Document locking assumptions Document the locking assumptions in functions that modify blk_mq_ctx.rq_list to make it easier for humans to verify this code. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 2 ++ block/blk-mq.c | 4 ++++ 2 files changed, 6 insertions(+) commit 332ebbf7f9efb31ffc363b99da548963ee3fd66d Author: Bart Van Assche Date: Tue Jun 20 11:15:46 2017 -0700 block: Document what queue type each function is intended for Some functions in block/blk-core.c must only be used on blk-sq queues while others are safe to use against any queue type. Document which functions are intended for blk-sq queues and issue a warning if the blk-sq API is misused. This does not only help block driver authors but will also make it easier to remove the blk-sq code once that code is declared obsolete. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 33 +++++++++++++++++++++++++++++++++ block/blk.h | 2 ++ 2 files changed, 35 insertions(+) commit 2fff8a924d4c614b5a17b2a236a2cf09aa51af5f Author: Bart Van Assche Date: Tue Jun 20 11:15:45 2017 -0700 block: Check locking assumptions at runtime Instead of documenting the locking assumptions of most block layer functions as a comment, use lockdep_assert_held() to verify locking assumptions at runtime. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 71 +++++++++++++++++++++++++++++++++++------------------ block/blk-flush.c | 8 +++--- block/blk-merge.c | 3 +++ block/blk-tag.c | 15 +++++------ block/blk-timeout.c | 4 ++- 5 files changed, 64 insertions(+), 37 deletions(-) commit 9e0c829906b9aa1e7ad84689f2bcd56457bdb417 Author: Bart Van Assche Date: Tue Jun 20 11:15:44 2017 -0700 block: Add a comment above queue_lockdep_assert_held() Add a comment above the queue_lockdep_assert_held() macro that explains the purpose of the q->queue_lock test. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Signed-off-by: Jens Axboe include/linux/blkdev.h | 7 +++++++ 1 file changed, 7 insertions(+) commit c3a148d20affcc334348402865169a61000d3905 Author: Bart Van Assche Date: Tue Jun 20 11:15:43 2017 -0700 blk-mq: Initialize .rq_flags in blk_mq_rq_ctx_init() Initialization of blk-mq requests is a bit weird: blk_mq_rq_ctx_init() is called after a value has been assigned to .rq_flags and .rq_flags is initialized in __blk_mq_finish_request(). Initialize .rq_flags in blk_mq_rq_ctx_init() instead of relying on __blk_mq_finish_request(). Moving the initialization of .rq_flags is fine because all changes and tests of .rq_flags occur between blk_get_request() and finishing a request. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c8d9cf22cf0f89d1249a57ade5a1949c62075ce6 Author: Bart Van Assche Date: Tue Jun 20 11:15:42 2017 -0700 block: Change argument type of scsi_req_init() Since scsi_req_init() works on a struct scsi_request, change the argument type into struct scsi_request *. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe block/scsi_ioctl.c | 10 +++++++--- drivers/ide/ide-atapi.c | 2 +- drivers/ide/ide-probe.c | 2 +- drivers/scsi/scsi_lib.c | 4 +++- include/scsi/scsi_request.h | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) commit ca18d6f769d22e931d3ba1e8d1ae81953547a417 Author: Bart Van Assche Date: Tue Jun 20 11:15:41 2017 -0700 block: Make most scsi_req_init() calls implicit Instead of explicitly calling scsi_req_init() after blk_get_request(), call that function from inside blk_get_request(). Add an .initialize_rq_fn() callback function to the block drivers that need it. Merge the IDE .init_rq_fn() function into .initialize_rq_fn() because it is too small to keep it as a separate function. Keep the scsi_req_init() call in ide_prep_sense() because it follows a blk_rq_init() call. References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Nicholas Bellinger Signed-off-by: Jens Axboe block/bsg.c | 1 - block/scsi_ioctl.c | 3 --- drivers/block/pktcdvd.c | 1 - drivers/cdrom/cdrom.c | 1 - drivers/ide/ide-atapi.c | 1 - drivers/ide/ide-cd.c | 1 - drivers/ide/ide-cd_ioctl.c | 1 - drivers/ide/ide-devsets.c | 1 - drivers/ide/ide-disk.c | 1 - drivers/ide/ide-ioctls.c | 2 -- drivers/ide/ide-park.c | 2 -- drivers/ide/ide-pm.c | 2 -- drivers/ide/ide-probe.c | 6 +++--- drivers/ide/ide-tape.c | 1 - drivers/ide/ide-taskfile.c | 1 - drivers/scsi/osd/osd_initiator.c | 2 -- drivers/scsi/osst.c | 1 - drivers/scsi/scsi_error.c | 1 - drivers/scsi/scsi_lib.c | 15 ++++++++++++++- drivers/scsi/scsi_transport_sas.c | 2 ++ drivers/scsi/sg.c | 2 -- drivers/scsi/st.c | 1 - drivers/target/target_core_pscsi.c | 2 -- fs/nfsd/blocklayout.c | 1 - include/scsi/scsi_cmnd.h | 1 + 25 files changed, 20 insertions(+), 33 deletions(-) commit d280bab305431c1836423f3cd6a5ff0e35a601ef Author: Bart Van Assche Date: Tue Jun 20 11:15:40 2017 -0700 block: Introduce request_queue.initialize_rq_fn() Several block drivers need to initialize the driver-private request data after having called blk_get_request() and before .prep_rq_fn() is called, e.g. when submitting a REQ_OP_SCSI_* request. Avoid that that initialization code has to be repeated after every blk_get_request() call by adding new callback functions to struct request_queue and to struct blk_mq_ops. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Signed-off-by: Jens Axboe block/blk-core.c | 17 +++++++++++++---- include/linux/blk-mq.h | 2 ++ include/linux/blkdev.h | 4 ++++ 3 files changed, 19 insertions(+), 4 deletions(-) commit cd6ce1482fd9e691bb68c660fa918c90f6b1bc25 Author: Bart Van Assche Date: Tue Jun 20 11:15:39 2017 -0700 block: Make request operation type argument declarations consistent Instead of declaring the second argument of blk_*_get_request() as int and passing it to functions that expect an unsigned int, declare that second argument as unsigned int. Also because of consistency, rename that second argument from 'rw' into 'op'. This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 13 +++++++------ block/blk-mq.c | 10 +++++----- include/linux/blk-mq.h | 6 +++--- include/linux/blkdev.h | 3 ++- 4 files changed, 17 insertions(+), 15 deletions(-) commit 073196787727e454e17a96d222ea55eba2000978 Author: Bart Van Assche Date: Tue Jun 20 11:15:38 2017 -0700 blk-mq: Reduce blk_mq_hw_ctx size Since the srcu structure is rather large (184 bytes on an x86-64 system with kernel debugging disabled), only allocate it if needed. Reported-by: Ming Lei Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Cc: Hannes Reinecke Cc: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 30 ++++++++++++++++++++++-------- include/linux/blk-mq.h | 5 +++-- 2 files changed, 25 insertions(+), 10 deletions(-) commit efbeccdb59d666b9c77d505af01097cc0a9d102b Author: Christoph Hellwig Date: Mon Jun 19 09:24:41 2017 +0200 block: stop using bio_data() in blk_write_same_mergeable While the Write Same page currently always is in low-level it is just as easy and safer to just compare the page and offset directly. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe include/linux/blkdev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 80ab6af432523b33352771b1eca1cee793cc7c81 Author: Christoph Hellwig Date: Mon Jun 19 09:24:40 2017 +0200 block: remove the unused bio_to_phys macro Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe include/linux/bio.h | 1 - 1 file changed, 1 deletion(-) commit dfc4ff644674a133878aded9a86ab36c358f3138 Author: Jacob Keller Date: Wed Jun 7 05:43:13 2017 -0400 i40e: don't hold RTNL lock for the entire reset We recently refactored i40e_do_reset() and its friends to be able to hold the RTNL lock only for the portions that actually need to be protected. However, a separate refactoring added several new callers of these functions during the PCIe error recovery and suspend/resume cycles. When merging the changes together, it was not noticed that we could reduce the RTNL scope by letting the reset function handle the lock itself, as previously it was not possible. Fix this by replacing these call sites to indicate that the reset function should handle its own lock. This enables multiple PFs to reset or resume simultaneously without serializing the resets via the RTNL lock. The end result is that on systems with lots of PFs and VFs the resets don't stall waiting for each other to finish. It is probable that we can also do the same for i40e_do_reset_safe, but this author did not research that change carefully enough to be confident. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit 7642984b08760b8d0ff7f4cfbe524bb53eb4cec2 Author: Catherine Sullivan Date: Wed Jun 7 05:43:12 2017 -0400 i40e: Handle PE_CRITERR properly with IWARP enabled When IWARP is enabled, we weren't clearing the PE_CRITERR, just logging it and removing it from the mask. We need to do a corer to reset the PE_CRITERR register, so set the bit for that as we handle the interrupt. We should also be checking for the error against the PFINT_ICR0 register, and only need to clear it in the value getting written to PFINT_ICR0_ENA. Signed-off-by: Catherine Sullivan Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e5c26ea0d0843074a1b8c868aae5c828c155569 Author: Shannon Nelson Date: Wed Jun 7 05:43:11 2017 -0400 i40e: clear only cause_ena bit When disabling interrupts, we should only be clearing the CAUSE_ENA bit, not clearing the whole register. Clearing the whole register sets the NEXTQ_IDX field to 0 instead of 0x7ff which can confuse the Firmware in some reset sequences. Signed-off-by: Shannon Nelson Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e588723986845457942e8a1acb1e31cf18e8eb08 Author: Alan Brady Date: Wed Jun 7 05:43:10 2017 -0400 i40e: fix disabling overflow promiscuous mode There exists a bug in which the driver does not correctly exit overflow promiscuous mode. This can occur if "too many" mac filters are added, putting the driver into overflow promiscuous mode, and the filters are then removed. When the failed filters are removed, the driver reports exiting overflow promiscuous mode which is correct, however traffic continues to be received as if in promiscuous mode still. The bug occurs because the conditional for toggling promiscuous mode was set to only execute when promiscuous mode was enabled and not when it was disabled as well. This patch fixes the conditional to correctly execute when promiscuous mode is toggled and not just enabled. Without this patch, the driver is unable to correctly exit overflow promiscuous mode. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5bbb2e2045449706a6daf092e5727998e4984c0b Author: Filip Sadowski Date: Wed Jun 7 05:43:09 2017 -0400 i40e: Add support for OEM firmware version This patch adds support for OEM firmware version. If OEM specific adapter is detected ethtool reports OEM product version in firmware version string instead of etrack id. Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 48 ++++++++++++++++++++--------- drivers/net/ethernet/intel/i40e/i40e_main.c | 47 ++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 14 deletions(-) commit 4fc8c67639575e38fff41bb4bd01c601aba930ff Author: Shannon Nelson Date: Wed Jun 7 05:43:08 2017 -0400 i40e: genericize the partition bandwidth control Partition bandwidth control is not in just one form of MFP (multi-function partitioning), so make the code more generic and be sure to nudge the Tx scheduler for all MFP. Copyright updated to 2017. Signed-off-by: Shannon Nelson Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 13 +++++---- drivers/net/ethernet/intel/i40e/i40e_main.c | 41 ++++++++++++++--------------- 2 files changed, 26 insertions(+), 28 deletions(-) commit 83d14c595e011f96c47e5fb09ddb51902e8367aa Author: Carolyn Wyborny Date: Wed Jun 7 05:43:07 2017 -0400 i40e: Add message for unsupported MFP mode This patch adds a check and message if the device is in MFP mode as changing RSS input set is not supported in MFP mode. Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 68fb13a7677475e5470ef6aba585da5c609ea2cb Author: Greg Bowers Date: Wed Jun 7 05:43:06 2017 -0400 i40e: Support firmware CEE DCB UP to TC map re-definition Changes parsing of FW 4.33 AQ command Get CEE DCBX OPER CFG (0x0A07). Change is required because FW now creates the oper_prio_tc nibbles reversed from those in the CEE Priority Group sub-TLV. This change will only apply to FW 4.33 as future FW versions will use a different function to parse the CEE data. Signed-off-by: Greg Bowers Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_dcb.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 1e99854715c79b3e2ebe09d80006aaff0f5c2335 Author: Sudheer Mogilappagari Date: Wed Jun 7 05:43:05 2017 -0400 i40e: Fix potential out of bound array access This is a fix for the static code analysis issue where dcbcfg->numapps could be greater than size of array (i.e dcbcfg->app[I40E_DCBX_MAX_APPS]). The fix makes sure that the array is not accessed past the size of of the array (i.e. I40E_DCBX_MAX_APPS). Copyright updated to 2017. Signed-off-by: Sudheer Mogilappagari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_dcb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 15d23b4c361f1449d44249bea127d2bdb981aa01 Author: Jacob Keller Date: Wed Jun 7 05:43:04 2017 -0400 i40e: comment that udp_port must be in host byte order The firmware expects the port number passed when setting up the UDP tunnel configuration to be in Little Endian format. The i40e_aq_add_udp_tunnel command byte swaps the value from host order to Little Endian. Since commit fe0b0cd97b4f ("i40e: send correct port number to AdminQ when enabling UDP tunnels") we've correctly sent the value in host order. Let's also add a comment to the function explaining that it must be in host order, as the port numbers are commonly stored as Big Endian values. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 59e331e36ef934791947a616cc578bf3c62a019c Author: Jacob Keller Date: Wed Jun 7 05:43:03 2017 -0400 i40e: use dev_dbg instead of dev_info when warning about missing routine When searching for the vf_capability client routine, dev_info() was used, instead of the normal dev_dbg(). This causes the message to be displayed at standard log levels which can cause administrators to worry. Avoid this by using dev_dbg instead. Copyright updated to 2017. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7c32b1e650752408a8dcc7a85f1776c2e24ea1da Author: Alice Michael Date: Wed Jun 7 05:43:02 2017 -0400 i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flags Update a few flags related to FW interactions. Copyright updated to 2017. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 4 ++-- drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit 65c7006f234c9ede887d468f595f259a5c5cc552 Author: Jacob Keller Date: Wed Jun 7 05:43:01 2017 -0400 i40evf: assign num_active_queues inside i40evf_alloc_queues The variable num_active_queues represents the number of active queues we have for the device. We assign this pretty early in i40evf_init_subtask. Several code locations are written with loops over the tx_rings and rx_rings structures, which don't get allocated until i40evf_alloc_queues, and which get freed by i40evf_free_queues. These call sites were written under the assumption that tx_rings and rx_rings would always be allocated at least when num_active_queues is non-zero. Lets fix this by moving the assignment into the function where we allocate queues. We'll use a temporary variable for storage so that we don't assign the value in the adapter structure until after the rings have been set up. Finally, when we free the queues, we'll clear the value to ensure that we do not loop over the rings memory that no longer exists. This resolves a possible NULL pointer dereference in i40evf_get_ethtool_stats which could occur if the VF fails to recover from a reset, and then a user requests statistics. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 74608d17fe29b2cddceea609033019b32e8a0650 Author: Björn Töpel Date: Wed May 24 07:55:35 2017 +0200 i40e: add support for XDP_TX action This patch adds proper XDP_TX action support. For each Tx ring, an additional XDP Tx ring is allocated and setup. This version does the DMA mapping in the fast-path, which will penalize performance for IOMMU enabled systems. Further, debugfs support is not wired up for the XDP Tx rings. Signed-off-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 42 +++- drivers/net/ethernet/intel/i40e/i40e_main.c | 299 +++++++++++++++++++------ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 118 +++++++++- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 11 + 5 files changed, 384 insertions(+), 87 deletions(-) commit 0c8493d90b6bb0f5c4fe9217db8f7203f24c0f28 Author: Björn Töpel Date: Wed May 24 07:55:34 2017 +0200 i40e: add XDP support for pass and drop actions This commit adds basic XDP support for i40e derived NICs. All XDP actions will end up in XDP_DROP. Signed-off-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 7 ++ drivers/net/ethernet/intel/i40e/i40e_main.c | 87 +++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 130 +++++++++++++++++++++------- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 + 4 files changed, 194 insertions(+), 31 deletions(-) commit 047b8e21e3bfa9faa4ed9a0c337fe0c687710251 Merge: 296923e 34c8ea4 Author: Dave Airlie Date: Wed Jun 21 08:57:34 2017 +1000 Merge tag 'drm-misc-next-2017-06-19_0' of git://anongit.freedesktop.org/git/drm-misc into drm-next UAPI Changes: - vc4: Add get/set tiling format ioctls (Eric) Driver Changes: - vc4: Add tiling T-format support for scanout (Eric) - vc4: Use atomic helpers in commit (Boris) Cc: Boris Brezillon Cc: Eric Anholt * tag 'drm-misc-next-2017-06-19_0' of git://anongit.freedesktop.org/git/drm-misc: drm/vc4: Mimic drm_atomic_helper_commit() behavior drm/vc4: Add get/set tiling ioctls. drm/vc4: Add T-format scanout support. commit 296923e121693015d1140c42ce14f478d5b24376 Author: Dave Airlie Date: Wed Jun 21 08:56:54 2017 +1000 drm/i915: remove rate_to_index, messed up merge. This was from a merge I did incorrectly. Signed-off-by: Dave Airlie drivers/gpu/drm/i915/intel_dp.c | 11 ----------- 1 file changed, 11 deletions(-) commit 305b9eddeec6d47778aafeded63ee8f37b9ddce0 Merge: eafae13 9ddb8e1 Author: Dave Airlie Date: Wed Jun 21 08:55:22 2017 +1000 Merge tag 'drm-intel-next-2017-06-19' of git://anongit.freedesktop.org/git/drm-intel into drm-next Final pile of features for 4.13 New uabi: - batch bo in first slot, for faster execbuf assembly in userspace (Chris Wilson) - (sub)slice getparam, needed for mesa perf support (Robert Bragg) First pile of patches for cnl/cfl support, maintained by Rodrigo but with lots of contributions from others. Still incomplete since public review still ongoing. Features/refactoring: - Make execbuf faster (Chris Wilson), a pile of series to make execbuf buffer handling have fewer passes, use less list walking, postpone more work to async workers and shuffle buffers less, all to make the common case much faster (in some cases at least). - cold boot support for glk dsi (Madhav Chauhan) - Clean up pipe A quirk and related old platform hacks (Ville) - perf sampling support for kbl/glk (Lionel) - perf cleanups (Robert Bragg) - wire atomic state to backlight code, to avoid pipe lookup hacks (Maarten) - reduce request waiting latency/overhead to remove the spinning and associated cpu cycle wasting (Chris) - fix 90/270 rotation wm computation (Ville) - new ddb allocation algo for skl (Kumar Mahesh) - fix regression due to system suspend optimiazatino (Imre) - the usual pile of small cleanups and refactors all over GVT updates contained in this tag: - optimization for per-VM mmio save/restore (Changbin) - optimization for mmio hash table (Changbin) - scheduler optimization with event (Ping) - vGPU reset refinement (Fred) - other misc refactor and cleanups, etc. * tag 'drm-intel-next-2017-06-19' of git://anongit.freedesktop.org/git/drm-intel: (170 commits) drm/i915: Update DRIVER_DATE to 20170619 drm/i915/cfl: Introduce Coffee Lake workarounds. drm/i915: Store 9 bits of PCI Device ID for platforms with a LP PCH drm/i915: Stash a pointer to the obj's resv in the vma drm/i915: Async GPU relocation processing drm/i915: Allow execbuffer to use the first object as the batch drm/i915: Wait upon userptr get-user-pages within execbuffer drm/i915: First try the previous execbuffer location drm/i915: Store a persistent reference for an object in the execbuffer cache drm/i915: Eliminate lots of iterations over the execobjects array drm/i915: Disable EXEC_OBJECT_ASYNC when doing relocations drm/i915: Pass vma to relocate entry drm/i915: Store a direct lookup from object handle to vma drm/i915: Fix retrieval of hangcheck stats drm/i915: Store i915_gem_object_is_coherent() as a bit next to cache-dirty drm/i915: Mark CPU cache as dirty on every transition for CPU writes drm/i915: Make i915_vma_destroy() static drm/i915: Actually attach the tv_format property to the SDVO connector Revert "drm/i915/skl: New ddb allocation algorithm" drm/i915/glk: Add cold boot sequence for GLK DSI ... commit eafae133e48c9e5f5537d5c6df34eab912336b9a Merge: 8c52f36 4a630fa Author: Dave Airlie Date: Wed Jun 21 08:49:54 2017 +1000 Merge tag 'drm-msm-next-2017-06-20' of git://people.freedesktop.org/~robclark/linux into drm-next This time around, the biggest thing is a bunch of GEM rework for more fine grained locking and prep work to handle multiple address spaces (ie. per-process pagetables). Also some HDMI fixes for 8x96 (snapdragon 820). One unrelated bus patch, for something that seems to get merged through whatever random tree (and has all the right ack's). * tag 'drm-msm-next-2017-06-20' of git://people.freedesktop.org/~robclark/linux: drm/msm: Fix potential buffer overflow issue bus: SIMPLE_PM_BUS does not depend on ARCH_RENESAS drm/msm: Separate locking of buffer resources from struct_mutex drm/msm/hdmi: Fix HDMI pink strip issue seen on 8x96 drm/msm/hdmi: 8996 PLL: Populate unprepare drm/msm/hdmi: Use bitwise operators when building register values drm/msm: update generated headers drm/msm: remove address-space id drm/msm: support for an arbitrary number of address spaces drm/msm: refactor how we handle vram carveout buffers drm/msm: pass address-space to _get_iova() and friends drm/msm/mdp4+5: move aspace/id to base class drm/msm/mdp5: kill pipe_lock drm/msm: fix locking inconsistency for gpu->hw_init() drm/msm: Remove memptrs->wptr drm/msm: Add a struct to pass configuration to msm_gpu_init() drm/msm: Add hint to DRM_IOCTL_MSM_GEM_INFO to return an object IOVA drm/msm: Remove idle function hook drm/msm: Remove DRM_MSM_NUM_IOCTLS drm/msm: gpu: Enable zap shader for A5XX commit a9f127bb5f92379ecb135a66bb89f8403e998d96 Author: Cédric Le Goater Date: Thu Apr 20 13:56:34 2017 +0200 mtd: spi-nor: aspeed: remove dummies from keep mask There is no need to keep the dummy bytes in the control register if the command mode is not kept also. This could lead to an inconsistent setting : normal read mode (command 0x3) and dummy bytes. It is to be noted that the HW allows such a configuration. Signed-off-by: Cédric Le Goater Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/aspeed-smc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d7c9ade2e31dbae4deaa8a5198107ecde4c56968 Author: Cédric Le Goater Date: Wed Apr 19 16:00:20 2017 +0200 mtd: spi-nor: add Dual and Quad read mode support to some flash devices These devices are used on OpenPOWER systems. The SPI_NOR_DUAL_READ flags is added for the Aspeed SoCs which do not support QUAD reads. Signed-off-by: Cédric Le Goater Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ce398a8141b485e4c97bd313c4c06cb6f64a22d7 Author: Cédric Le Goater Date: Wed Apr 19 16:00:19 2017 +0200 mtd: spi-nor: Add support for Macronix mx66l1g45g spi flash These modules are used on the OpenPOWER Witherspoon systems to hold the POWER9 host firmware image. The SPI_NOR_DUAL_READ flags is added for the Aspeed SoCs which do not support QUAD reads. Signed-off-by: Cédric Le Goater Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) commit f993c123b461ff47c10edfee65465fe651d0521f Author: Arvind Yadav Date: Fri Jun 16 15:05:17 2017 +0530 mtd: spi-nor: cqspi: make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/cadence-quadspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cbef932bd82857823c0e52b08218b0c9920a475 Author: Benjamin Herrenschmidt Date: Wed Jun 21 00:18:43 2017 +0930 spi-nor: Add Winbond w25m512jv Similar to the other ones, different size. The "JV" suffix is in the datasheet, I haven't seen mentions of a different one. The datasheet indicates DUAL and QUAD are supported. http://www.winbond.com/resource-files/w25m512jv%20revc%2001062017.pdf Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Joel Stanley Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 2 ++ 1 file changed, 2 insertions(+) commit b867059018a5254cca14450eefb6fb8effa0f6dd Author: Juergen Gross Date: Tue Jun 20 23:16:37 2017 +0200 x86/MCE, xen/mcelog: Make /dev/mcelog registration messages more precise When running under Xen as dom0, /dev/mcelog is being provided by Xen instead of the normal mcelog character device of the MCE core. Convert an error message being issued by the MCE core in this case to an informative message that Xen has registered the device. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170614084059.19294-1-jgross@suse.com arch/x86/kernel/cpu/mcheck/dev-mcelog.c | 8 +++++++- drivers/xen/mcelog.c | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 3a2b3d37e1eecb75d792db2588b9eb7a471632cd Author: Shilpasri G Bhat Date: Tue Jun 20 10:38:13 2017 +0530 hwmon: (ibmpowernv) Add current(A) sensor This patch exports current(A) sensors in inband sensors copied to main memory by OCC. Signed-off-by: Shilpasri G Bhat Reviewed-by: Cédric Le Goater Signed-off-by: Guenter Roeck drivers/hwmon/ibmpowernv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3ab521601dc0273b553d203f6bd1d02319a011b9 Author: Cédric Le Goater Date: Tue Jun 20 10:38:12 2017 +0530 hwmon: (ibmpowernv) introduce a legacy_compatibles array Today, the type of a PowerNV sensor system is determined with the "compatible" property for legacy Firmwares and with the "sensor-type" for newer ones. The same array of strings is used for both to do the matching and this raises some issue to introduce new sensor types. Let's introduce two different arrays (legacy and current) to make things easier for new sensor types. Signed-off-by: Cédric Le Goater Tested-by: Shilpasri G Bhat Signed-off-by: Guenter Roeck drivers/hwmon/ibmpowernv.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 82f402fefa50f1675bf918bcd009981bd6b30ac8 Author: Jens Axboe Date: Tue Jun 20 14:22:01 2017 -0600 null_blk: add support for shared tags Some storage drivers need to share tag sets between devices. It's useful to be able to model that with null_blk, to find hangs or performance issues. Add a 'shared_tags' bool module parameter that. If that is set to true and nr_devices is bigger than 1, all devices allocated will share the same tag set. Signed-off-by: Jens Axboe drivers/block/null_blk.c | 112 +++++++++++++++++++++++++++++------------------ 1 file changed, 70 insertions(+), 42 deletions(-) commit b50fb7c99217922ea36d6e38bae34d84c0587cad Merge: 04c848d 41f1830 Author: Thomas Gleixner Date: Tue Jun 20 22:08:32 2017 +0200 Merge branch 'linus' into irq/core Get upstream changes so pending patches won't conflict. commit 01f9c7240a900d5676a8496496f2974dd36996b1 Author: Brian Norris Date: Tue May 23 07:30:20 2017 +0200 mtd: partitions: factor out code calling parser This code is going to be reused for parsers matched using OF so let's factor it out to make this easier. Signed-off-by: Brian Norris Signed-off-by: Rafał Miłecki Acked-by: Brian Norris drivers/mtd/mtdpart.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit df1d178879f53d7f790d4bc372aa0fc5d5423328 Author: Brian Norris Date: Tue May 23 07:30:19 2017 +0200 dt-bindings: mtd: make partitions doc a bit more generic Currently the only documented partitioning is "fixed-partitions" but there are more methods in use that we may want to support in the future. Mention them and make it clear Fixed Partitions are just a single case. Signed-off-by: Brian Norris Signed-off-by: Rafał Miłecki Acked-by: Rob Herring .../devicetree/bindings/mtd/partition.txt | 32 ++++++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) commit 6a3911837da0a90ed599fd0a9836472f5e7ddf1b Author: Jeff Vander Stoep Date: Tue Jun 20 09:35:33 2017 -0700 selinux: enable genfscon labeling for tracefs In kernel version 4.1, tracefs was separated from debugfs into its own filesystem. Prior to this split, files in /sys/kernel/debug/tracing could be labeled during filesystem creation using genfscon or later from userspace using setxattr. This change re-enables support for genfscon labeling. Signed-off-by: Jeff Vander Stoep Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 1 + 1 file changed, 1 insertion(+) commit f5c306470ed0a8f03ba7017f397da2555b5800d4 Merge: 8abd559 1170fbd Author: David S. Miller Date: Tue Jun 20 15:47:15 2017 -0400 Merge tag 'mlx5-updates-2017-06-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-06-20 (mlx5 IPoIB updates) This series includes updates to mlx5 IPoIB netdevice driver (mlx5i), 1. We move ipoib files into separate directory, to allow it to grow separately in its own space 2. Remove HW update carrier logic from IPoIB and VF representors profiles. 3. Add basic ethtool support. (Rings options/statistics and driver info). 4. Change MTU support. 5. Xmit path statistics reporting. 6. add PTP support. For the new ethtool ops, PTP (ioctl) and change_mtu ndos in IPoIB, we didn't add new implementation or new logic, we only reused those callbacks from the already existing mlx5e (ethernet netdevice profile) and exposed them in IPoIB netdevice/ethtool ops. ==================== Signed-off-by: David S. Miller commit 8abd5599a520e9f188a750f1bde9dde5fb856230 Merge: 5ee8aa6 ec61bd2 Author: David S. Miller Date: Tue Jun 20 15:44:22 2017 -0400 Merge branch 's390-net-updates-part-2' Julian Wiedmann says: ==================== s390/net updates, part 2 (v2) thanks for the feedback. Here's an updated patchset that honours the reverse christmas tree and drops the __packed attribute. Please apply. ==================== Signed-off-by: David S. Miller commit ec61bd2fd2a27bf7368261b230ef54fe34d1cce3 Author: Julian Wiedmann Date: Tue Jun 20 16:00:34 2017 +0200 s390/qeth: use diag26c to get MAC address on L2 When a s390 guest runs on a z/VM host that's part of a SSI cluster, it can be migrated to a different host. In this case, the MAC address it originally obtained on the old host may be re-assigned to a new guest. This would result in address conflicts between the two guests. When running as z/VM guest, use the diag26c MAC Service to obtain a hypervisor-managed MAC address. The MAC Service is SSI-aware, and won't re-assign the address after the guest is migrated to a new host. This patch adds support for the z/VM MAC Service on L2 devices. Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 1 + drivers/s390/net/qeth_core_main.c | 61 +++++++++++++++++++++++++++++++++++++++ drivers/s390/net/qeth_l2_main.c | 16 ++++++++-- 3 files changed, 76 insertions(+), 2 deletions(-) commit 1b030478166cdbdffe9bcffadc32558b4b511869 Author: Julian Wiedmann Date: Tue Jun 20 16:00:33 2017 +0200 s390/diag: add diag26c support Implement support for the hypervisor diagnose 0x26c ('Access Certain System Information'). It passes a request buffer and a subfunction code, and receives a response buffer and a return code. Also add the scaffolding for the 'MAC Services' subfunction. It may be used by network devices to obtain a hypervisor-managed MAC address. Signed-off-by: Julian Wiedmann Acked-by: Heiko Carstens Signed-off-by: David S. Miller arch/s390/include/asm/diag.h | 26 ++++++++++++++++++++++++++ arch/s390/kernel/diag.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit 3cdc8a25297e4e0646c3e72671c95f065117a9fd Author: Julian Wiedmann Date: Tue Jun 20 16:00:32 2017 +0200 s390/qeth: fix packing buffer statistics There's two spots in qeth_send_packet() where we don't accurately account for transmitted packing buffers in qeth's performance statistics: 1) when flushing the current buffer due to insufficient size, and the next buffer is not EMPTY, we need to account for that flushed buffer. 2) when synchronizing with the TX completion code, we reset flush_count and thus forget to account for any previously flushed buffers. Reported-by: Nils Hoppmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 2063a5f52ad8006db90bb84b4d75bdfee842af28 Author: Kittipon Meesompop Date: Tue Jun 20 16:00:31 2017 +0200 s390/qeth: add ipa return codes for bridgeport add ipa return codes for Bridgeport (HiperSockets and OSA) according to system level design. Signed-off-by: Kittipon Meesompop Reviewed-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_mpc.c | 14 ++++++++++++++ drivers/s390/net/qeth_core_mpc.h | 18 ++++++++++++++++++ drivers/s390/net/qeth_l2_main.c | 34 +++++++++++++++++----------------- 3 files changed, 49 insertions(+), 17 deletions(-) commit 104b4e5139fe384431ac11c3b8a6cf4a529edf4a Author: Nikolay Borisov Date: Tue Jun 20 21:01:20 2017 +0300 percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch Currently, percpu_counter_add is a wrapper around __percpu_counter_add which is preempt safe due to explicit calls to preempt_disable. Given how __ prefix is used in percpu related interfaces, the naming unfortunately creates the false sense that __percpu_counter_add is less safe than percpu_counter_add. In terms of context-safety, they're equivalent. The only difference is that the __ version takes a batch parameter. Make this a bit more explicit by just renaming __percpu_counter_add to percpu_counter_add_batch. This patch doesn't cause any functional changes. tj: Minor updates to patch description for clarity. Cosmetic indentation updates. Signed-off-by: Nikolay Borisov Signed-off-by: Tejun Heo Cc: Chris Mason Cc: Josef Bacik Cc: David Sterba Cc: Darrick J. Wong Cc: Jan Kara Cc: Jens Axboe Cc: linux-mm@kvack.org Cc: "David S. Miller" fs/btrfs/disk-io.c | 12 ++++++------ fs/btrfs/extent_io.c | 6 +++--- fs/btrfs/inode.c | 8 ++++---- fs/xfs/xfs_mount.c | 4 ++-- include/linux/backing-dev.h | 2 +- include/linux/blk-cgroup.h | 6 +++--- include/linux/mman.h | 2 +- include/linux/percpu_counter.h | 7 ++++--- include/net/inet_frag.h | 4 ++-- lib/flex_proportions.c | 6 +++--- lib/percpu_counter.c | 4 ++-- 11 files changed, 31 insertions(+), 30 deletions(-) commit 098b0e01a91c42aaaf0425605cd126b03fcb0bcf Author: Thomas Gleixner Date: Tue Jun 20 17:37:36 2017 +0200 posix-cpu-timers: Make timespec to nsec conversion safe The expiry time of a posix cpu timer is supplied through sys_timer_set() via a struct timespec. The timespec is validated for correctness. In the actual set timer implementation the timespec is converted to a scalar nanoseconds value. If the tv_sec part of the time spec is large enough the conversion to nanoseconds (sec * NSEC_PER_SEC) overflows 64bit. Mitigate that by using the timespec_to_ktime() conversion function, which checks the tv_sec part for a potential mult overflow and clamps the result to KTIME_MAX, which is about 292 years. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Xishi Qiu Cc: John Stultz Link: http://lkml.kernel.org/r/20170620154113.588276707@linutronix.de kernel/time/posix-cpu-timers.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 35eb7258c009dc478338e674a5a84d25d0929c56 Author: Thomas Gleixner Date: Tue Jun 20 17:37:35 2017 +0200 itimer: Make timeval to nsec conversion range limited The expiry time of a itimer is supplied through sys_setitimer() via a struct timeval. The timeval is validated for correctness. In the actual set timer implementation the timeval is converted to a scalar nanoseconds value. If the tv_sec part of the time spec is large enough the conversion to nanoseconds (sec * NSEC_PER_SEC) overflows 64bit. Mitigate that by using the timeval_to_ktime() conversion function, which checks the tv_sec part for a potential mult overflow and clamps the result to KTIME_MAX, which is about 292 years. Reported-by: Xishi Qiu Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170620154113.505981643@linutronix.de kernel/time/itimer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d15bc69affc57d7985a01745ca28eafa0772325b Author: Peter Meerwald-Stadler Date: Tue May 30 21:41:03 2017 +0200 timers: Fix parameter description of try_to_del_timer_sync() Signed-off-by: Peter Meerwald-Stadler Link: http://lkml.kernel.org/r/20170530194103.7454-1-pmeerw@pmeerw.net Cc: John Stultz Cc: trivial@rustcorp.com.au Signed-off-by: Thomas Gleixner kernel/time/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f1d472055bbe914c9e54715fdbf2272851e23ff Author: Mariusz Skamra Date: Fri May 26 15:00:47 2017 +0200 ktime: Simplify ktime_compare implementation ktime_sub can be used here instread of two conditional checks. Signed-off-by: Mariusz Skamra Signed-off-by: Thomas Gleixner Acked-by: Kuppuswamy Sathyanarayanan Link: http://lkml.kernel.org/r/1495803647-9504-1-git-send-email-mariuszx.skamra@intel.com include/linux/ktime.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5ee8aa689780f2c19702fe3768a3103b9c07d72e Author: Xin Long Date: Tue Jun 20 16:05:11 2017 +0800 sctp: handle errors when updating asoc It's a bad thing not to handle errors when updating asoc. The memory allocation failure in any of the functions called in sctp_assoc_update() would cause sctp to work unexpectedly. This patch is to fix it by aborting the asoc and reporting the error when any of these functions fails. Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 4 ++-- net/sctp/associola.c | 25 ++++++++++++++----------- net/sctp/sm_sideeffect.c | 24 +++++++++++++++++++++++- 3 files changed, 39 insertions(+), 14 deletions(-) commit 8cd5c25f2db03306727d2f6b8f28956169dc1123 Author: Xin Long Date: Tue Jun 20 16:01:55 2017 +0800 sctp: uncork the old asoc before changing to the new one local_cork is used to decide if it should uncork asoc outq after processing some cmds, and it is set when replying or sending msgs. local_cork should always have the same value with current asoc q->cork in some way. The thing is when changing to a new asoc by cmd SET_ASOC, local_cork may not be consistent with the current asoc any more. The cmd seqs can be: SCTP_CMD_UPDATE_ASSOC (asoc) SCTP_CMD_REPLY (asoc) SCTP_CMD_SET_ASOC (new_asoc) SCTP_CMD_DELETE_TCB (new_asoc) SCTP_CMD_SET_ASOC (asoc) SCTP_CMD_REPLY (asoc) The 1st REPLY makes OLD asoc q->cork and local_cork both are 1, and the cmd DELETE_TCB clears NEW asoc q->cork and local_cork. After asoc goes back to OLD asoc, q->cork is still 1 while local_cork is 0. The 2nd REPLY will not set local_cork because q->cork is already set and it can't be uncorked and sent out because of this. To keep local_cork consistent with the current asoc q->cork, this patch is to uncork the old asoc if local_cork is set before changing to the new one. Note that the above cmd seqs will be used in the next patch when updating asoc and handling errors in it. Suggested-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/sm_sideeffect.c | 4 ++++ 1 file changed, 4 insertions(+) commit df95e795a722892a9e0603ce4b9b62fab9f02967 Author: Dennis Zhou Date: Mon Jun 19 19:28:32 2017 -0400 percpu: add tracepoint support for percpu memory Add support for tracepoints to the following events: chunk allocation, chunk free, area allocation, area free, and area allocation failure. This should let us replay percpu memory requests and evaluate corresponding decisions. Signed-off-by: Dennis Zhou Signed-off-by: Tejun Heo include/trace/events/percpu.h | 125 ++++++++++++++++++++++++++++++++++++++++++ mm/percpu-km.c | 2 + mm/percpu-vm.c | 2 + mm/percpu.c | 12 ++++ 4 files changed, 141 insertions(+) commit a0f9a4c2ffefec4b647622064d4dcc8a7529f6ad Author: Xin Long Date: Tue Jun 20 15:44:44 2017 +0800 dccp: call inet_add_protocol after register_pernet_subsys in dccp_v6_init Patch "call inet_add_protocol after register_pernet_subsys in dccp_v4_init" fixed a null pointer dereference issue for dccp_ipv4 module. The same fix is needed for dccp_ipv6 module. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/dccp/ipv6.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit d5494acb88aa9dd1325079c9b8855008a52c19b3 Author: Xin Long Date: Tue Jun 20 15:42:38 2017 +0800 dccp: call inet_add_protocol after register_pernet_subsys in dccp_v4_init Now dccp_ipv4 works as a kernel module. During loading this module, if one dccp packet is being recieved after inet_add_protocol but before register_pernet_subsys in which v4_ctl_sk is initialized, a null pointer dereference may be triggered because of init_net.dccp.v4_ctl_sk is 0x0. Jianlin found this issue when the following call trace occurred: [ 171.950177] BUG: unable to handle kernel NULL pointer dereference at 0000000000000110 [ 171.951007] IP: [] dccp_v4_ctl_send_reset+0xc4/0x220 [dccp_ipv4] [...] [ 171.984629] Call Trace: [ 171.984859] [ 171.985061] [ 171.985213] [] dccp_v4_rcv+0x383/0x3f9 [dccp_ipv4] [ 171.985711] [] ip_local_deliver_finish+0xb4/0x1f0 [ 171.986309] [] ip_local_deliver+0x59/0xd0 [ 171.986852] [] ? update_curr+0x104/0x190 [ 171.986956] [] ip_rcv_finish+0x8a/0x350 [ 171.986956] [] ip_rcv+0x2b6/0x410 [ 171.986956] [] ? task_cputime+0x44/0x80 [ 171.986956] [] __netif_receive_skb_core+0x572/0x7c0 [ 171.986956] [] ? trigger_load_balance+0x61/0x1e0 [ 171.986956] [] __netif_receive_skb+0x18/0x60 [ 171.986956] [] process_backlog+0xae/0x180 [ 171.986956] [] net_rx_action+0x16d/0x380 [ 171.986956] [] __do_softirq+0xef/0x280 [ 171.986956] [] call_softirq+0x1c/0x30 This patch is to move inet_add_protocol after register_pernet_subsys in dccp_v4_init, so that v4_ctl_sk is initialized before any incoming dccp packets are processed. Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/dccp/ipv4.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 30a5b5367ef9d5c9055414e12ec2f02d9de2e70f Author: Dennis Zhou Date: Mon Jun 19 19:28:31 2017 -0400 percpu: expose statistics about percpu memory via debugfs There is limited visibility into the use of percpu memory leaving us unable to reason about correctness of parameters and overall use of percpu memory. These counters and statistics aim to help understand basic statistics about percpu memory such as number of allocations over the lifetime, allocation sizes, and fragmentation. New Config: PERCPU_STATS Signed-off-by: Dennis Zhou Signed-off-by: Tejun Heo mm/Kconfig | 8 ++ mm/Makefile | 1 + mm/percpu-internal.h | 131 ++++++++++++++++++++++++++++++ mm/percpu-km.c | 4 + mm/percpu-stats.c | 222 +++++++++++++++++++++++++++++++++++++++++++++++++++ mm/percpu-vm.c | 5 ++ mm/percpu.c | 9 +++ 7 files changed, 380 insertions(+) commit 8fa3ed8014ac792a4c76d585b5c0f68bd202ff6b Author: Dennis Zhou Date: Mon Jun 19 19:28:30 2017 -0400 percpu: migrate percpu data structures to internal header Migrates pcpu_chunk definition and a few percpu static variables to an internal header file from mm/percpu.c. These will be used with debugfs to expose statistics about percpu memory improving visibility regarding allocations and fragmentation. Signed-off-by: Dennis Zhou Signed-off-by: Tejun Heo mm/percpu-internal.h | 33 +++++++++++++++++++++++++++++++++ mm/percpu.c | 30 +++++++----------------------- 2 files changed, 40 insertions(+), 23 deletions(-) commit 7044f429e70d987cdc780f26a9b9951970645966 Author: Govindarajulu Varadarajan Date: Mon Jun 19 16:28:44 2017 -0700 enic: Fix format truncation warning With -Wformat-truncation, gcc throws the following warning. Fix this by increasing the size of devname to accommodate 15 character netdev interface name and description. Remove length format precision for %s. We can fit entire name. Also increment the version. drivers/net/ethernet/cisco/enic/enic_main.c: In function ‘enic_open’: drivers/net/ethernet/cisco/enic/enic_main.c:1740:15: warning: ‘%u’ directive output may be truncated writing between 1 and 2 bytes into a region of size between 1 and 12 [-Wformat-truncation=] "%.11s-rx-%u", netdev->name, i); ^~ drivers/net/ethernet/cisco/enic/enic_main.c:1740:5: note: directive argument in the range [0, 16] "%.11s-rx-%u", netdev->name, i); ^~~~~~~~~~~~~ drivers/net/ethernet/cisco/enic/enic_main.c:1738:4: note: ‘snprintf’ output between 6 and 18 bytes into a destination of size 16 snprintf(enic->msix[intr].devname, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sizeof(enic->msix[intr].devname), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%.11s-rx-%u", netdev->name, i); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic.h | 4 ++-- drivers/net/ethernet/cisco/enic/enic_main.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 9edfa7dab8112a012b349b7937f5444fdc21e8f9 Author: Niklas Cassel Date: Mon Jun 19 18:36:44 2017 +0200 net: stmmac: enable TSO for IPv6 There is nothing in the IP that prevents us from enabling TSO for IPv6. Before patch: ftp fe80::2aa:bbff:fecc:1336%eth0 ftp> get /dev/zero 882512708 bytes received in 00:14 (56.11 MiB/s) After patch: ftp fe80::2aa:bbff:fecc:1336%eth0 ftp> get /dev/zero 1203326784 bytes received in 00:12 (94.52 MiB/s) Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb89ba243baf6e5f7ee1ddf491fa45e0cabccdd1 Author: John Allen Date: Mon Jun 19 11:27:53 2017 -0500 ibmvnic: Return from ibmvnic_resume if not in VNIC_OPEN state If the ibmvnic driver is not in the VNIC_OPEN state, return from ibmvnic_resume callback. If we are not in the VNIC_OPEN state, interrupts may not be initialized and directly calling the interrupt handler will cause a crash. Signed-off-by: John Allen Reviewed-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 3 +++ 1 file changed, 3 insertions(+) commit dd19802f2a224486c7f9a43bccd92e36c25afed9 Merge: 3c2993b 87085ff Author: Will Deacon Date: Tue Jun 20 19:11:48 2017 +0100 Merge branch 'uuid-types' of git://git.infradead.org/users/hch/uuid into aarch64/for-next/ras-apei Pull in uuid-types branch from Christoph, since this conflicts heavily with the ACPI/APEI RAS work from Tyler Baicer and was created as an immutable branch to avoid conflicts with ACPI development. commit 61d819e7bcb7f33da710bf3f5dcb2bcf1e48203c Author: Darrick J. Wong Date: Mon Jun 19 13:19:08 2017 -0700 xfs: don't allow bmap on rt files bmap returns a dumb LBA address but not the block device that goes with that LBA. Swapfiles don't care about this and will blindly assume that the data volume is the correct blockdev, which is totally bogus for files on the rt subvolume. This results in the swap code doing IOs to arbitrary locations on the data device(!) if the passed in mapping is a realtime file, so just turn off bmap for rt files. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_aops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5da8f2f8908aabcfa4113d37d470039c79962ba9 Author: Darrick J. Wong Date: Fri Jun 16 11:00:15 2017 -0700 xfs: allow reading of already-locked remote symbolic link Expose the readlink variant that doesn't take the inode lock so that the scrubber can inspect symlink contents. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_symlink.c | 6 +++--- fs/xfs/xfs_symlink.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit ad017f6537dee30a67b89f937a16e2f6c82e3774 Author: Darrick J. Wong Date: Fri Jun 16 11:00:14 2017 -0700 xfs: pass along transaction context when reading xattr block buffers Teach the extended attribute reading functions to pass along a transaction context if one was supplied. The extended attribute scrub code will use transactions to lock buffers and avoid deadlocking with itself in the case of loops; since it will already have the inode locked, also create xattr get/list helpers that don't take locks. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_attr.c | 26 ++++++++++++------ fs/xfs/libxfs/xfs_attr_remote.c | 5 ++-- fs/xfs/xfs_attr.h | 3 +++ fs/xfs/xfs_attr_list.c | 59 +++++++++++++++++++++++------------------ 4 files changed, 57 insertions(+), 36 deletions(-) commit acb9553cab552cf17154814f079f54401eefa474 Author: Darrick J. Wong Date: Fri Jun 16 11:00:14 2017 -0700 xfs: pass along transaction context when reading directory block buffers Teach the directory reading functions to pass along a transaction context if one was supplied. The directory scrub code will use transactions to lock buffers and avoid deadlocking with itself in the case of loops. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_dir2_priv.h | 4 ++-- fs/xfs/xfs_dir2_readdir.c | 15 +++++++++++---- fs/xfs/xfs_file.c | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) commit 8e8877e6edf2b593fe488b6efa8b3b7cfba96738 Author: Darrick J. Wong Date: Fri Jun 16 11:00:13 2017 -0700 xfs: return the hash value of a leaf1 directory block Modify the existing dir leafn lasthash function to enable us to calculate the highest hash value of a leaf1 block. This will be used by the directory scrubbing code to check the sanity of hashes in leaf1 directory blocks. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_da_btree.c | 10 +++++----- fs/xfs/libxfs/xfs_dir2_node.c | 10 ++++++---- fs/xfs/libxfs/xfs_dir2_priv.h | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) commit e7f5d5ca36e29fa3c9702f236b0ab73f63336080 Author: Darrick J. Wong Date: Fri Jun 16 11:00:12 2017 -0700 xfs: refactor the ifork block counting function Refactor the inode fork block counting function to count extents for us at the same time. This will be used by the bmbt scrubber function. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_bmap_util.c | 109 ++++++++++++++++++++++++++++++------------------- fs/xfs/xfs_bmap_util.h | 4 ++ 2 files changed, 70 insertions(+), 43 deletions(-) commit d29cb3e45e923715f74d8a08d5c1ea996dce5a59 Author: Darrick J. Wong Date: Fri Jun 16 11:00:12 2017 -0700 xfs: make _bmap_count_blocks consistent wrt delalloc extent behavior There is an inconsistency in the way that _bmap_count_blocks deals with delalloc reservations -- if the specified fork is in extents format, *count is set to the total number of blocks referenced by the in-core fork, including delalloc extents. However, if the fork is in btree format, *count is set to the number of blocks referenced by the on-disk fork, which does /not/ include delalloc extents. For the lone existing caller of _bmap_count_blocks this hasn't been an issue because the function is only used to count xattr fork blocks (where there aren't any delalloc reservations). However, when scrub comes along it will use this same function to check di_nblocks against both on-disk extent maps, so we need this behavior to be consistent. Therefore, fix _bmap_count_leaves not to include delalloc extents and remove unnecessary parameters. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_bmap_util.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 5ccd30e40e731051f6d1eb02f7ac073c1ef9deba Author: Dennis Zhou Date: Mon Jun 19 19:28:29 2017 -0400 percpu: add missing lockdep_assert_held to func pcpu_free_area Add a missing lockdep_assert_held for pcpu_lock to improve consistency and safety throughout mm/percpu.c. Signed-off-by: Dennis Zhou Signed-off-by: Tejun Heo mm/percpu.c | 2 ++ 1 file changed, 2 insertions(+) commit ca83697cdc9a2fe67957161933abeb703d7aff89 Author: Thomas Bogendoerfer Date: Mon Jun 19 16:00:22 2017 +0200 net: phy: lxt: Export link partner advertising Provide link partner advertising information. Removed testing for gigabit modes, which is useless for a fast ethernet phy. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/lxt.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit c036cab4ee7ba946a29ce0bdce5ad758347a11d2 Merge: cf67beb a2d5e7b Author: David S. Miller Date: Tue Jun 20 13:40:36 2017 -0400 Merge branch 'mediatek-various-performance-improvements' John Crispin says: ==================== net-next: mediatek: various performance improvements During development we mainly ran testing using iperf doing 1500 byte tcp frames. It was pointed out recently, that the driver does not perform very well when using 512 byte udp frames. The biggest problem was that RPS was not working as no rx queue was being set. fixing this more than doubled the throughput. Additionally the IRQ mask register is now locked independently for RX and TX. RX IRQ aggregation is also added. With all these patches applied we can almost triple the throughput. While at it we also add PHY status change reporting for GMACs connecting directly to a PHY. ==================== Signed-off-by: David S. Miller commit a2d5e7b4102deac784373464a8fd9f3eaa53afc0 Author: John Crispin Date: Mon Jun 19 15:37:06 2017 +0200 net-next: mediatek: set the rx_queue to 0 The get_rps_cpu() function will not do any RPS on the data flow when no queue is setup and always use the current cpu where the IRQ was handled to also handle the backlog. As we only have one physical queue we always set this to 0 unconditionally. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + 1 file changed, 1 insertion(+) commit 5cce0322cf8cd2c8073b2f8dac08c56e3f5f4acb Author: John Crispin Date: Mon Jun 19 15:37:05 2017 +0200 net-next: mediatek: split IRQ register locking into TX and RX Originally the driver only utilised the new QDMA engine. The current code still assumes this is the case when locking the IRQ mask register. Since RX now runs on the old style PDMA engine we can add a second lock. This patch reduces the IRQ latency as the TX and RX path no longer need to wait on each other under heavy load. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 79 ++++++++++++++++++----------- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 5 +- 2 files changed, 54 insertions(+), 30 deletions(-) commit 671d41e60dbd8943ce069137b312f834a483c582 Author: John Crispin Date: Mon Jun 19 15:37:04 2017 +0200 net-next: mediatek: add RX IRQ delay support The PDMA engine used for RX allows IRQ aggregation. The patch sets up the corresponding registers to aggregate 4 IRQs into one. Using aggregation reduces the load on the core handling to a quarter thus reducing IRQ latency and increasing RX performance by around 10%. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +++- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) commit 5969c42768ed6d19e8a61d1ac60e5c8bee8fe9d0 Author: John Crispin Date: Mon Jun 19 15:37:03 2017 +0200 net-next: mediatek: print phy status changes for non DSA GMACs Currently PHY status changes are only printed for DSA ports. This patch adds code to also print status changes for non-fixed links. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++ 1 file changed, 3 insertions(+) commit cf67bebecb4b5564586a4674646382ca380ec205 Merge: c0ca9e7 49f810f Author: David S. Miller Date: Tue Jun 20 13:37:04 2017 -0400 Merge branch 'vxlan-cleanup-and-IPv6-link-local-support' Matthias Schiffer says: ==================== vxlan: cleanup and IPv6 link-local support Running VXLANs over IPv6 link-local addresses allows to use them as a drop-in replacement for VLANs, avoiding to allocate additional outer IP addresses to run the VXLAN over. Since v1, I have added a lot more consistency checks to the address configuration, making sure address families and scopes match. To simplify the implementation, I also did some general refactoring of the configuration handling in the new first patch of the series. The second patch is more cleanup; is slightly touches OVS code, so that list is in CC this time, too. As in v1, the last two patches actually make VXLAN over IPv6 link-local work, and allow multiple VXLANs with the same VNI and port, as long as link-local addresses on different interfaces are used. As suggested, I now store in the flags field if the VXLAN uses link-local addresses or not. v3 removes log messages as suggested by Roopa Prabhu (as it is very unusual for errors in netlink requests to be printed to the kernel log.) The commit message of patch 5 has been extended to add a note about IPv4. ==================== Signed-off-by: David S. Miller commit 49f810f00fa347427fa8cba2197b303234842d25 Author: Matthias Schiffer Date: Mon Jun 19 10:04:00 2017 +0200 vxlan: allow multiple VXLANs with same VNI for IPv6 link-local addresses As link-local addresses are only valid for a single interface, we can allow to use the same VNI for multiple independent VXLANs, as long as the used interfaces are distinct. This way, VXLANs can always be used as a drop-in replacement for VLANs with greater ID space. This also extends VNI lookup to respect the ifindex when link-local IPv6 addresses are used, so using the same VNI on multiple interfaces can actually work. Signed-off-by: Matthias Schiffer Signed-off-by: David S. Miller drivers/net/vxlan.c | 68 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 23 deletions(-) commit 87613de95041a88e426105d05a53acece52fd81e Author: Matthias Schiffer Date: Mon Jun 19 10:03:59 2017 +0200 vxlan: fix snooping for link-local IPv6 addresses If VXLAN is run over link-local IPv6 addresses, it is necessary to store the ifindex in the FDB entries. Otherwise, the used interface is undefined and unicast communication will most likely fail. Support for link-local IPv4 addresses should be possible as well, but as the semantics aren't as well defined as for IPv6, and there doesn't seem to be much interest in having the support, it's not implemented for now. Signed-off-by: Matthias Schiffer Signed-off-by: David S. Miller drivers/net/vxlan.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 0f22a3c68d5fd1696dbc15c45d7ea375c865b7a1 Author: Matthias Schiffer Date: Mon Jun 19 10:03:58 2017 +0200 vxlan: check valid combinations of address scopes * Multicast addresses are never valid as local address * Link-local IPv6 unicast addresses may only be used as remote when the local address is link-local as well * Don't allow link-local IPv6 local/remote addresses without interface We also store in the flags field if link-local addresses are used for the follow-up patches that actually make VXLAN over link-local IPv6 work. Signed-off-by: Matthias Schiffer Signed-off-by: David S. Miller drivers/net/vxlan.c | 29 +++++++++++++++++++++++++++++ include/net/vxlan.h | 2 ++ 2 files changed, 31 insertions(+) commit ce44a4aea5e4203147013759a363c17b2ee5132b Author: Matthias Schiffer Date: Mon Jun 19 10:03:57 2017 +0200 vxlan: improve validation of address family configuration Address families of source and destination addresses must match, and changelink operations can't change the address family. In addition, always use the VXLAN_F_IPV6 to check if a VXLAN device uses IPv4 or IPv6. Signed-off-by: Matthias Schiffer Signed-off-by: David S. Miller drivers/net/vxlan.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit dc5321d79697db1b610c25fa4fad1aec7533ea3e Author: Matthias Schiffer Date: Mon Jun 19 10:03:56 2017 +0200 vxlan: get rid of redundant vxlan_dev.flags There is no good reason to keep the flags twice in vxlan_dev and vxlan_config. Signed-off-by: Matthias Schiffer Signed-off-by: David S. Miller drivers/net/vxlan.c | 76 +++++++++++++++++++++---------------------- include/net/vxlan.h | 1 - net/openvswitch/vport-vxlan.c | 4 +-- 3 files changed, 39 insertions(+), 42 deletions(-) commit a985343ba90635cda3f3704f71021254c91cebbd Author: Matthias Schiffer Date: Mon Jun 19 10:03:55 2017 +0200 vxlan: refactor verification and application of configuration The vxlan_dev_configure function was mixing validation and application of the vxlan configuration; this could easily lead to bugs with the changelink operation, as it was hard to see if the function wcould return an error after parts of the configuration had already been applied. This commit splits validation and application out of vxlan_dev_configure as separate functions to make it clearer where error returns are allowed and where the vxlan_dev or net_device may be configured. Log messages in these functions are removed, as it is generally unexpected to find error output for netlink requests in the kernel log. Userspace should be able to handle errors based on the error codes returned via netlink just fine. In addition, some validation and initialization is moved to vxlan_validate and vxlan_setup respectively to improve grouping of similar settings. Finally, this also fixes two actual bugs: * if set, conf->mtu would overwrite dev->mtu in each changelink operation, reverting other changes of dev->mtu * the "if (!conf->dst_port)" branch would never be run, as conf->dst_port was set in vxlan_setup before. This caused VXLAN-GPE to use the same default port as other VXLAN sockets instead of the intended IANA-assigned 4790. Signed-off-by: Matthias Schiffer Signed-off-by: David S. Miller drivers/net/vxlan.c | 208 ++++++++++++++++++++++++++++------------------------ 1 file changed, 111 insertions(+), 97 deletions(-) commit 01efd6006d19848084b9fcba7f3963ed38c1cd6c Author: Minwoo Im Date: Tue Jun 20 19:21:30 2017 +0900 libata: make the function name in comment match the actual function The function name used to be ata_scsiop_mode_select() but renamed to ata_scsi_mode_select_xlat(). Update the comment accordingly. tj: Minor commit desc update. Signed-off-by: Minwoo Im Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0ca9e7201c4507e70c4d71c1997c410651fe3c5 Merge: ddcbabf b952f4d Author: David S. Miller Date: Tue Jun 20 13:30:16 2017 -0400 Merge branch 'net-more-skb_put-work' yuan linyu says: ==================== net: more skb_put_[data:zero] related work yuan linyu (3): net: introduce __skb_put_[zero, data, u8] net: replace more place to skb_put_[data:zero] net: manual clean code which call skb_put_[data:zero] ==================== Signed-off-by: David S. Miller commit b952f4dff2751252db073c27c0f8a16a416a2ddc Author: yuan linyu Date: Sun Jun 18 22:52:04 2017 +0800 net: manual clean code which call skb_put_[data:zero] Signed-off-by: yuan linyu Signed-off-by: David S. Miller drivers/isdn/hysdn/hycapi.c | 8 ++++---- drivers/isdn/i4l/isdn_bsdcomp.c | 2 +- drivers/isdn/i4l/isdn_ppp.c | 2 +- drivers/net/bonding/bond_alb.c | 3 +-- drivers/net/caif/caif_hsi.c | 6 ++---- drivers/net/caif/caif_serial.c | 3 +-- drivers/net/caif/caif_spi.c | 3 +-- drivers/net/ethernet/nxp/lpc_eth.c | 7 +++---- drivers/net/ethernet/packetengines/hamachi.c | 4 ++-- drivers/net/ppp/ppp_synctty.c | 2 +- drivers/net/usb/asix_common.c | 5 ++--- drivers/net/usb/hso.c | 13 ++++++------- drivers/net/wireless/ath/ath9k/wmi.c | 3 +-- drivers/net/wireless/marvell/libertas/if_sdio.c | 3 +-- drivers/net/wireless/quantenna/qtnfmac/qlink_util.h | 4 +--- drivers/net/wireless/realtek/rtlwifi/pci.c | 3 +-- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 10 +++------- drivers/net/wireless/ti/wlcore/rx.c | 3 +-- drivers/nfc/pn533/pn533.c | 4 ++-- drivers/staging/rtl8188eu/core/rtw_recv.c | 4 +--- drivers/staging/rtl8192e/rtllib_rx.c | 5 ++--- drivers/staging/rtl8192e/rtllib_softmac.c | 11 ++++++----- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 4 +--- .../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 11 +++++------ drivers/staging/rtl8192u/r819xU_cmdpkt.c | 3 +-- drivers/staging/rtl8712/rtl8712_recv.c | 4 ++-- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 4 +--- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- drivers/usb/gadget/function/f_ncm.c | 11 +++++------ lib/nlattr.c | 6 +----- net/bridge/netfilter/nft_reject_bridge.c | 6 ++---- net/dsa/tag_trailer.c | 3 +-- net/hsr/hsr_device.c | 6 +++--- net/irda/irlap_frame.c | 5 ++--- net/mac80211/mlme.c | 12 ++++-------- net/mac80211/tdls.c | 19 +++++++++---------- net/sctp/sm_make_chunk.c | 3 +-- net/vmw_vsock/virtio_transport_common.c | 5 ++--- net/x25/x25_subr.c | 16 ++++++++-------- 39 files changed, 93 insertions(+), 135 deletions(-) commit ad941e693b24ad8b13c28382d323552ef6fb434b Author: yuan linyu Date: Sun Jun 18 22:49:30 2017 +0800 net: replace more place to skb_put_[data:zero] spatch file, @@ expression skb, len, data; type t; @@ -memcpy((t *)skb_put(skb, len), data, len); +skb_put_data(skb, data, len); @@ identifier p; expression skb, len, data; type t; @@ -p = (t *)memset(skb_put(skb, len), data, len); +p = skb_put_zero(skb, len); @@ expression skb, len, data; type t; @@ -memcpy((t *)__skb_put(skb, len), data, len); +__skb_put_data(skb, data, len); @@ identifier p; expression skb, len, data; type t; @@ -p = (t *)memset(__skb_put(skb, len), data, len); +p = __skb_put_zero(skb, len); Signed-off-by: yuan linyu Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 6 ++---- 7 files changed, 9 insertions(+), 16 deletions(-) commit de77b966ce8adcb4c58d50e2f087320d5479812a Author: yuan linyu Date: Sun Jun 18 22:48:17 2017 +0800 net: introduce __skb_put_[zero, data, u8] follow Johannes Berg, semantic patch file as below, @@ identifier p, p2; expression len; expression skb; type t, t2; @@ ( -p = __skb_put(skb, len); +p = __skb_put_zero(skb, len); | -p = (t)__skb_put(skb, len); +p = __skb_put_zero(skb, len); ) ... when != p ( p2 = (t2)p; -memset(p2, 0, len); | -memset(p, 0, len); ) @@ identifier p; expression len; expression skb; type t; @@ ( -t p = __skb_put(skb, len); +t p = __skb_put_zero(skb, len); ) ... when != p ( -memset(p, 0, len); ) @@ type t, t2; identifier p, p2; expression skb; @@ t *p; ... ( -p = __skb_put(skb, sizeof(t)); +p = __skb_put_zero(skb, sizeof(t)); | -p = (t *)__skb_put(skb, sizeof(t)); +p = __skb_put_zero(skb, sizeof(t)); ) ... when != p ( p2 = (t2)p; -memset(p2, 0, sizeof(*p)); | -memset(p, 0, sizeof(*p)); ) @@ expression skb, len; @@ -memset(__skb_put(skb, len), 0, len); +__skb_put_zero(skb, len); @@ expression skb, len, data; @@ -memcpy(__skb_put(skb, len), data, len); +__skb_put_data(skb, data, len); @@ expression SKB, C, S; typedef u8; identifier fn = {__skb_put}; fresh identifier fn2 = fn ## "_u8"; @@ - *(u8 *)fn(SKB, S) = C; + fn2(SKB, C); Signed-off-by: yuan linyu Signed-off-by: David S. Miller drivers/crypto/chelsio/chcr_algo.c | 15 +++++---------- drivers/infiniband/hw/cxgb4/cm.c | 6 ++---- drivers/infiniband/hw/cxgb4/cq.c | 6 ++---- drivers/infiniband/hw/cxgb4/mem.c | 6 ++---- drivers/infiniband/hw/cxgb4/qp.c | 3 +-- drivers/isdn/gigaset/asyncdata.c | 4 ++-- drivers/isdn/gigaset/isocdata.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 12 ++++-------- drivers/net/ethernet/chelsio/cxgb3/sge.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 3 +-- drivers/net/usb/int51x1.c | 2 +- drivers/staging/octeon/ethernet-tx.c | 3 +-- drivers/target/iscsi/cxgbit/cxgbit_cm.c | 12 ++++-------- include/linux/skbuff.h | 22 ++++++++++++++++++++++ lib/test_bpf.c | 2 +- net/802/garp.c | 2 +- net/bluetooth/bnep/core.c | 15 ++++++--------- net/bluetooth/bnep/netdev.c | 12 ++++++------ net/bridge/br_stp_bpdu.c | 2 +- 19 files changed, 64 insertions(+), 67 deletions(-) commit ddcbabf4404606fcc3edf6e48caa9707b33d3df4 Author: Vivien Didelot Date: Sat Jun 17 23:07:14 2017 -0400 net: dsa: mv88e6xxx: better IEEE Prio Mapping Table description Kill the remaining shift macro in favor of calculating at compile time its value from the more descriptive mask, which gives us a better representation of the register layout. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 11 +++++------ drivers/net/dsa/mv88e6xxx/port.h | 4 +++- 2 files changed, 8 insertions(+), 7 deletions(-) commit 1b1ffc57a1b2edf58e803e463980b326765a237f Author: Kai Heng Feng Date: Tue Jun 20 11:05:19 2017 +0800 platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface Dell Latitude 3160 does not have keyboard backlight, but there is a sysfs interface for it, which does nothing at all. KBD_LED_ON_TOKEN is the only token can be found. Since it doesn't have KBD_LED_OFF_TOKEN or KBD_LED_AUTO_*_TOKEN, it should be safe to assume at least two tokens should be present to support keyboard backlight. Not all models have ON token - they may have multiple AUTO tokens instead. Models which do not use SMBIOS token to control keyboard backlight, also have this issue. Brightness level is 0 on these models. Verified on Dell Inspiron 3565. Reports keyboard backlight is supported only when at least two modes are present. Signed-off-by: Kai-Heng Feng Reviewed-by: Pali Rohár Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-laptop.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit da16349d7e46a168417bae8dab447bf866b5e77c Merge: cc07cb9 1d90016 Author: David S. Miller Date: Tue Jun 20 13:24:44 2017 -0400 Merge branch 'net-dsa-Global-2-cosmetics' Vivien Didelot says: ==================== net: dsa: Global 2 cosmetics Similarly to what has been done for the Port and Global 1 registers, this patch series prefixes and documents the macros of Global 2. It brings no functional changes except for 1/10 which fixes the IRL init for 88E6390 family. Changes in v2: make *_g2_irl_init_all static inline without NET_DSA_MV88E6XXX_GLOBAL2 and compile test with and without the symbol. ==================== Signed-off-by: David S. Miller commit 1d90016d094b5896e43d61e8b9d5ab5312fe4f30 Author: Vivien Didelot Date: Mon Jun 19 10:55:45 2017 -0400 net: dsa: mv88e6xxx: prefix Global 2 remaining macros Prefix and document the remaining Global 2 registers macros. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 27 ++++++++------- drivers/net/dsa/mv88e6xxx/global2.h | 65 +++++++++++++++++++++++++------------ 2 files changed, 57 insertions(+), 35 deletions(-) commit 3b19df73bab2a66b1ea174b063e3a7dfeb732ad7 Author: Vivien Didelot Date: Mon Jun 19 10:55:44 2017 -0400 net: dsa: mv88e6xxx: prefix Global 2 Watchdog macros The Marvell 88E6352 family has a Global 2 register dedicated to the watchdog setup. But the 88E6390 turned it into an indirect table. Prefix and document that. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 48 +++++++++++++++++++------------------ drivers/net/dsa/mv88e6xxx/global2.h | 47 ++++++++++++++++++++---------------- 2 files changed, 52 insertions(+), 43 deletions(-) commit ed44152f21281120b421b0606ad255ce810a8043 Author: Vivien Didelot Date: Mon Jun 19 10:55:43 2017 -0400 net: dsa: mv88e6xxx: prefix Global 2 Switch MAC macros Prefix and document the Global 2 Switch MAC registers macros. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 2 +- drivers/net/dsa/mv88e6xxx/global2.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 7fc8c9d5206e8c17eb6d938717dc3cc692d9d72c Author: Vivien Didelot Date: Mon Jun 19 10:55:42 2017 -0400 net: dsa: mv88e6xxx: prefix Global 2 EEPROM macros Prefix and document the Global 2 EEPROM registers macros. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 32 +++++++++++++++++--------------- drivers/net/dsa/mv88e6xxx/global2.h | 31 +++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 25 deletions(-) commit 67d1ea8e847c699ce638165bff7da2480590d3bf Author: Vivien Didelot Date: Mon Jun 19 10:55:41 2017 -0400 net: dsa: mv88e6xxx: prefix Global 2 PVT macros Prefix and document the Global 2 Cross-chip Port VLAN registers macros. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 14 ++++++++------ drivers/net/dsa/mv88e6xxx/global2.h | 19 +++++++++++++------ 2 files changed, 21 insertions(+), 12 deletions(-) commit 6bff47bec258ef9edba192674fe7366898af137f Author: Vivien Didelot Date: Mon Jun 19 10:55:40 2017 -0400 net: dsa: mv88e6xxx: prefix Global 2 MGMT macros Prefix and document the Global 2 MGMT registers macros. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 11 ++++++----- drivers/net/dsa/mv88e6xxx/global2.h | 23 +++++++++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) commit 067e474a03c03e0b667cc2ec5ae6a56b8af5ad7d Author: Vivien Didelot Date: Mon Jun 19 10:55:39 2017 -0400 net: dsa: mv88e6xxx: prefix Global 2 Device Mapping macros Prefix and document the Global 2 Device Mapping macros. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 2 +- drivers/net/dsa/mv88e6xxx/global2.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) commit 56dc734712233417ecbf22f2a52b6151c0af29f7 Author: Vivien Didelot Date: Mon Jun 19 10:55:38 2017 -0400 net: dsa: mv88e6xxx: prefix Global 2 Trunk macros Prefix and document the Global 2 Trunk registers macros. At the same time, fix the hask -> hash typo and use the mv88e6xxx_port_mask helper. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 13 ++++++------- drivers/net/dsa/mv88e6xxx/global2.h | 18 +++++++++++------- 2 files changed, 17 insertions(+), 14 deletions(-) commit e289ef0ded13021db292be9aef134451546e7c60 Author: Vivien Didelot Date: Mon Jun 19 10:55:37 2017 -0400 net: dsa: mv88e6xxx: clarify SMI PHY functions Marvell chips with an SMI PHY access in Global 2 registers handle both Clause 22 and Clause 45 of IEEE 802.3. The 88E6390 family has addition bits to target the internal or external PHYs connected to the device, and a Setup function in addition to the default (register) Access function. Prefix the SMI PHY Command and Data registers macros, implement clear helpers for Clause 22 and 44 Access functions, rename variable to match the SMI and switch vocabulary (device and register addresses for Clause 22 and port and device class for Clause 45.) Finally do not use complex macros but simple 16-bit mask to document the registers organization. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 200 +++++++++++++++++++++--------------- drivers/net/dsa/mv88e6xxx/global2.h | 43 ++++---- 2 files changed, 143 insertions(+), 100 deletions(-) commit cd8da8bb0ec199d00f055fb6ceb4c15ce0aaf562 Author: Vivien Didelot Date: Mon Jun 19 10:55:36 2017 -0400 net: dsa: mv88e6xxx: add irl_init_all op Some Marvell chips have an Ingress Rate Limit unit. But the command values slightly differs between models: 88E6352 use 3-bit for operations while 88E6390 use different 2-bit operations. This commit kills the IRL flags in favor of a new operation implementing the "Init all resources to the initial state" operation. This fixes the operation of 88E6390 family where 0x1000 means Read the selected resource 0, register 0 on port 16, instead of init all. A mv88e6xxx_irl_setup helper is added to wrap the operation call. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 47 ++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/chip.h | 19 +++---------- drivers/net/dsa/mv88e6xxx/global2.c | 54 ++++++++++++++++++------------------- drivers/net/dsa/mv88e6xxx/global2.h | 46 ++++++++++++++++++++++++++----- 4 files changed, 116 insertions(+), 50 deletions(-) commit 62fc743cafd07e134292d510827a80b3c01df784 Author: Lee, Chun-Yi Date: Tue Jun 20 17:06:23 2017 +0800 platform/x86: acer-wmi: Using zero as first WMI instance number Pali Rohár found that there have some wmi query/evaluation code that they used 'one' as the first WMI instance number. But the number is indexed from zero that it's must less than the instance_count in _WDG. This patch changes those instance number from one to zero. Cc: Darren Hart Cc: Andy Shevchenko Reviewed-by: Pali Rohár Signed-off-by: "Lee, Chun-Yi" Signed-off-by: Andy Shevchenko drivers/platform/x86/acer-wmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cc07cb935aec4f608e059f3dcd6242a7ecc4a59b Merge: 708d32e 57fde47 Author: David S. Miller Date: Tue Jun 20 13:23:06 2017 -0400 Merge branch 'net-next-stmmac-dwmac-sun8i-add-support-for-V3s' Icenowy Zheng says: ==================== net-next: stmmac: dwmac-sun8i: add support for V3s Allwinner V3s features an EMAC like the on in H3, but without external MII interfaces, so being not able really to use RMII/RGMII. And it has a different default value of syscon (0x38000 instead of 0x58000 on H3), which shows a problem that the EMAC clock freq should be 24MHz. (Both H3 and V3s SoCs doesn't have extra xtal input for EPHY, and the main xtal is 24MHz. The default value of H3 is set to 24MHz, but the V3s default value is set to 25MHz). First two patches are device tree binding patches, the third forces the frequency to 24MHz and the fourth really add the V3s support. ==================== Signed-off-by: David S. Miller commit 57fde47db808346287fbe931d0346d90c4229387 Author: Icenowy Zheng Date: Sat Jun 17 22:07:37 2017 +0800 net-next: stmmac: dwmac-sun8i: add support for V3s EMAC Allwinner V3s SoC has an Ethernet MAC and an internal PHY like the ones in H3 SoC, however the MAC has no external *MII interfaces available at GPIOs, thus only MII connection to internal PHY is supported. Add this variant of EMAC to dwmac-sun8i driver. The default value of the syscon EMAC-related register seems to have changed from H3, but it seems to be a harmless change. Signed-off-by: Icenowy Zheng Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 ++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 + 2 files changed, 9 insertions(+) commit 1450ba8a61a96a7f7f9742e149ea6aaf90817e20 Author: Icenowy Zheng Date: Sat Jun 17 22:07:36 2017 +0800 net-next: stmmac: dwmac-sun8i: force EPHY clock freq to 24MHz The EPHY control part of the EMAC syscon register has a bit called CLK_SEL. On the datasheet it says that if it's 0 the EPHY clock is 25MHz and if it's 1 the clock is 24MHz. However, according to the datasheets, no Allwinner SoC with EPHY has any extra xtal input pins for the EPHY, and the system xtal is 24MHz. That means the EPHY is not possible to get a 25MHz xtal input, and thus the frequency can only be 24MHz. It doesn't matter on H3 as the default value of H3 is 24MHz, however on V3s the default value is wrongly set to 25MHz, which prevented the EPHY from working properly. Force the EPHY clock frequency to 24MHz. Signed-off-by: Icenowy Zheng Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2b5bdebd00cca9cc5c6159b998b91f2f2a412aa2 Author: Icenowy Zheng Date: Sat Jun 17 22:07:35 2017 +0800 dt-bindings: syscon: Add DT bindings documentation for Allwinner V3s syscon Allwinner V3s SoC has a syscon like the one in H3. Add its compatible string. Signed-off-by: Icenowy Zheng Signed-off-by: David S. Miller Documentation/devicetree/bindings/misc/allwinner,syscon.txt | 1 + 1 file changed, 1 insertion(+) commit e29602b03fe00a25fdede76e4c4a9d8f240a04a0 Author: Icenowy Zheng Date: Sat Jun 17 22:07:34 2017 +0800 dt-bindings: net-next: Add DT bindings documentation for Allwinner V3s EMAC Allwinner V3s SoC has a Ethernet MAC like the one in Allwinner H3, but have no external MII capability. That means that it can only use the EPHY and cannot do Gbps transmission. Add binding for it. Signed-off-by: Icenowy Zheng Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dwmac-sun8i.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 708d32e4e5ef025ff3d6d5610876f4d39f62865d Merge: 93dda1e 76b903e Author: David S. Miller Date: Tue Jun 20 13:15:11 2017 -0400 Merge branch 'net-Introduction-of-the-tc-tests' Lucas Bates says: ==================== net: Introduction of the tc tests Apologies for sending this as one big patch. I've been sitting on this a little too long, but it's ready and I wanted to get it out. There are a limited number of tests to start - I plan to add more on a regular basis. ==================== Signed-off-by: David S. Miller commit 76b903ee198d7216af5de844fc6cc00d7ffd54fd Author: Lucas Bates Date: Fri Jun 16 17:22:35 2017 -0400 selftests: Introduce tc testsuite Add the beginnings of a testsuite for tc functionality in the kernel. These are a series of unit tests that use the tc executable and verify the success of those commands by checking both the exit codes and the output from tc's 'show' operation. To run the tests: # cd tools/testing/selftests/tc-testing # sudo ./tdc.py You can specify the tc executable to use with the -p argument on the command line or editing the 'TC' variable in tdc_config.py. Refer to the README for full details on how to run. The initial complement of test cases are limited mostly to tc actions. Test cases are most welcome; see the creating-testcases subdirectory for help in creating them. Signed-off-by: Lucas Bates Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/.gitignore | 1 + tools/testing/selftests/tc-testing/README | 102 ++ tools/testing/selftests/tc-testing/TODO.txt | 10 + .../creating-testcases/AddingTestCases.txt | 69 ++ .../tc-testing/creating-testcases/template.json | 40 + .../tc-testing/tc-tests/actions/tests.json | 1115 ++++++++++++++++++++ .../tc-testing/tc-tests/filters/tests.json | 21 + tools/testing/selftests/tc-testing/tdc.py | 413 ++++++++ tools/testing/selftests/tc-testing/tdc_config.py | 17 + tools/testing/selftests/tc-testing/tdc_helper.py | 75 ++ 10 files changed, 1863 insertions(+) commit 93dda1e0d6f47cca4dd4f4335f85386c5ee51bfa Merge: 8917a77 6c9e80e Author: David S. Miller Date: Tue Jun 20 12:34:09 2017 -0400 Merge branch 'qed-RDMA-and-infrastructure-for-iWARP' Yuval Mintz says: ==================== qed*: RDMA and infrastructure for iWARP This series focuses on RDMA in general with emphasis on required changes toward adding iWARP support. The vast majority of the changes introduced are in qed/qede, with a couple of small changes to qedr [mentioned below]. The infrastructure changes: - Patch #1 adds the ability to pass PBL memory externally for a newly created chain. - Patches #4, #5 rename qede_roce.[ch] into qede_rdma.[ch] + change prefixes from _roce_ to _rdma_, as the API between qede and qedr is agnostic to the variant of the RDMA protocol used. These patches also touch qedr [basically to align it with the renaming, nothing more]. - Patch #7 replaces the current SPQ async mechanism into serving registered callbacks [before adding iWARP which would add another client in need of this sort of functionallity]. The non-infrastrucutre changes: - Patches #2, #3 contain DCB-related changes to better align RDMA with configured DCB. - Patch #6 contains a minor [mostly theoretical fix] to release flow. Changes from previous versions ------------------------------ - V4: This is actually a repost of V3 due to some confusion regarding the sent cover-letter - V3: Add commit log message in #4 indicating change in header inclusion - V2: Add several inclusion into qede_rdma.h to have proper declarations of all variable types used in it ==================== Signed-off-by: David S. Miller commit 6c9e80ea571db545a0baff1e0f48ae75a7ed127d Author: Michal Kalderon Date: Tue Jun 20 16:00:06 2017 +0300 qed: SPQ async callback registration Whenever firmware indicates that there's an async indication it needs to handle, there's a switch-case where the right functionality is called based on function's personality and information. Before iWARP is added [as yet another client], switch over the SPQ into a callback-registered mechanism, allowing registration of the relevant event-processing logic based on the function's personality. This allows us to tidy the code by removing protocol-specifics from a common file. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 24 ++++++++++++- drivers/net/ethernet/qlogic/qed/qed_roce.c | 16 ++++++--- drivers/net/ethernet/qlogic/qed/qed_roce.h | 6 ---- drivers/net/ethernet/qlogic/qed/qed_sp.h | 17 +++++++++ drivers/net/ethernet/qlogic/qed/qed_spq.c | 54 ++++++++++++++++------------- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 16 +++++++-- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 18 ---------- 7 files changed, 96 insertions(+), 55 deletions(-) commit 898fff120d9e73c2432432d4e457bf584b2a9df7 Author: Michal Kalderon Date: Tue Jun 20 16:00:05 2017 +0300 qed: Wait for resources before FUNC_CLOSE Driver needs to wait for all resources to return from FW before it can send the FUNC_CLOSE ramrod. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 35 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit bbfcd1e8e1677b1e692144c5709945e1dfe1ed30 Author: Michal Kalderon Date: Tue Jun 20 16:00:04 2017 +0300 qed*: Set rdma generic functions prefix Rename the functions common to both iWARP and RoCE to have a prefix of _rdma_ instead of _roce_. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/main.c | 6 +- drivers/net/ethernet/qlogic/qede/qede.h | 4 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 12 +-- drivers/net/ethernet/qlogic/qede/qede_rdma.c | 142 +++++++++++++-------------- include/linux/qed/qede_rdma.h | 37 +++---- 5 files changed, 101 insertions(+), 100 deletions(-) commit b262a06e642cfb1eeb6c2c772f76dad674ada57e Author: Michal Kalderon Date: Tue Jun 20 16:00:03 2017 +0300 qed*: qede_roce.[ch] -> qede_rdma.[ch] Once we have iWARP support, the qede portion of the qedr<->qede would serve all the RDMA protocols - so rename the file to be appropriate to its function. While we're at it, we're also moving a couple of inclusions to it into .h files and adding includes to make sure it contains all type definitions it requires. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/main.c | 2 +- drivers/infiniband/hw/qedr/qedr.h | 2 +- drivers/net/ethernet/qlogic/qede/Makefile | 2 +- drivers/net/ethernet/qlogic/qede/qede.h | 1 + drivers/net/ethernet/qlogic/qede/qede_main.c | 1 - drivers/net/ethernet/qlogic/qede/qede_rdma.c | 314 +++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qede/qede_roce.c | 314 --------------------------- include/linux/qed/qede_rdma.h | 93 ++++++++ include/linux/qed/qede_roce.h | 88 -------- 9 files changed, 411 insertions(+), 406 deletions(-) commit 9331dad1bb7f3438c27e4f57136b6ad683d11fe0 Author: Mintz, Yuval Date: Tue Jun 20 16:00:02 2017 +0300 qed: Disable RoCE dpm when DCBx change occurs If DCBx update occurs while QPs are open, stop sending edpms until all QPs are closed. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 8 +++++++ drivers/net/ethernet/qlogic/qed/qed_roce.c | 36 ++++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_roce.h | 5 +++++ 3 files changed, 49 insertions(+) commit 26462ad9c7ea18643f1a37adeab8b7eff6c5f5f4 Author: Mintz, Yuval Date: Tue Jun 20 16:00:01 2017 +0300 qed: RoCE EDPM to honor PFC Configure device according to DCBx results so that EDPMs made by RoCE would honor flow-control. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 16 ++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 6 ++++++ 2 files changed, 22 insertions(+) commit 1a4a69751f4d24ffd3530f5a9694636db1566a3b Author: Mintz, Yuval Date: Tue Jun 20 16:00:00 2017 +0300 qed: Chain support for external PBL iWARP would require the chains to allocate/free their PBL memory independently, so add the infrastructure to provide it externally. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/main.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 6 ++--- drivers/net/ethernet/qlogic/qed/qed_dev.c | 35 ++++++++++++++++++++------- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 5 +++- drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 6 ++--- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 6 ++--- drivers/net/ethernet/qlogic/qed/qed_spq.c | 6 ++--- drivers/net/ethernet/qlogic/qede/qede_main.c | 8 +++--- include/linux/qed/qed_chain.h | 7 ++++++ include/linux/qed/qed_if.h | 3 ++- 10 files changed, 56 insertions(+), 28 deletions(-) commit 64da710d1da5c5174c0b6bacbd6202d99624eeed Merge: b15cdca 34c8ea4 Author: Sean Paul Date: Tue Jun 20 11:52:09 2017 -0400 Merge tag 'drm-misc-next-2017-06-19_0' of git://anongit.freedesktop.org/git/drm-misc into drm-misc-next-fixes UAPI Changes: - vc4: Add get/set tiling format ioctls (Eric) Driver Changes: - vc4: Add tiling T-format support for scanout (Eric) - vc4: Use atomic helpers in commit (Boris) Cc: Boris Brezillon Cc: Eric Anholt Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170620151126.zobksbwjgtp5wawe@art_vandelay commit b15cdca5b5de52dc2262c41917e8727b96b30fb0 Merge: d4e0045 8c52f36 Author: Sean Paul Date: Tue Jun 20 11:50:41 2017 -0400 Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next-fixes Backmerging airlied/drm-next commit f5d284900c0f960e318a063f4c40826b6e3aa6a8 Author: Luc Van Oostenryck Date: Tue Jun 20 14:24:43 2017 +0200 arm64: pass machine size to sparse When using sparse on the arm64 tree we get many thousands of warnings like 'constant ... is so big it is unsigned long long' or 'shift too big (32) for type unsigned long'. This happens because by default sparse considers the machine as 32bit and defines the size of the types accordingly. Fix this by passing the '-m64' flag to sparse so that sparse can correctly define longs as being 64bit. CC: Catalin Marinas CC: Will Deacon CC: linux-arm-kernel@lists.infradead.org Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon arch/arm64/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd25bf8b8c577aef8c0156eddaf63f3e862c659c Author: Arnaldo Carvalho de Melo Date: Tue Jun 20 12:30:07 2017 -0300 perf tools: Remove unused _ALL_SOURCE define Curious as to what this was for I looked at /usr/include/ and only some python headers define this, and it ends up being to enable "extensions" on some old OSes: /* Enable extensions on AIX 3, Interix */ I guess we can remove this one safely. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-omnundlxo2brs552bdl6m0j1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.h | 1 - 1 file changed, 1 deletion(-) commit 44b58e06e8e3872b6741e5aee59a7a93dfe3834a Author: Arnaldo Carvalho de Melo Date: Tue Jun 20 12:19:16 2017 -0300 perf tools: Do parameter validation earlier on fetch_kernel_version() While trying to reduce util.[ch] I noticed that fetch_kernel_version() and fetch_ubuntu_kernel_version() do lots of operations only to check if they are needed, i.e. it checks if the pointer where to return the kernel version is NULL only after obtaining the kernel version from /proc/version_signature or by parsing the results from uname(). Do it earlier not to confuse people reading this code in the future :-) Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-i94qwyekk4tzbu0b9ce1r1mz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 2157f6ee18ce5224eea2b27582368b60d940bef6 Author: Arnaldo Carvalho de Melo Date: Tue Jun 20 12:05:38 2017 -0300 perf evsel: Adopt find_process() And make it static, nobody else uses it, if we ever need it in more places we can carve a new source file for process related methods, for now lets reduce util.{c,h} a tad more. Link: http://lkml.kernel.org/n/tip-zgb28rllvypjibw52aaz9p15@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 39 +++++++++++++++++++++++++++++++++++++++ tools/perf/util/util.c | 37 ------------------------------------- tools/perf/util/util.h | 2 -- 3 files changed, 39 insertions(+), 39 deletions(-) commit 722f6f62a563108dc0f311bd86120b8fbfa0c6df Author: Bob Peterson Date: Tue Jun 20 09:52:57 2017 -0500 GFS2: Eliminate vestigial sd_log_flush_wrapped Superblock variable sd_log_flush_wrapped is set, but never referenced, so this patch eliminates it. Signed-off-by: Bob Peterson fs/gfs2/incore.h | 1 - fs/gfs2/log.c | 3 --- fs/gfs2/lops.c | 4 +--- 3 files changed, 1 insertion(+), 7 deletions(-) commit 63dac0f4924b97a6b91b86259cdc4520b4d6254e Author: Gregory CLEMENT Date: Mon Jun 12 17:35:00 2017 +0200 arm64: dts: marvell: add gpio support for Armada 7K/8K Enable gpio support for CP and AP on the Marvell Armada 7K/8K SoCs. The Armada 8K has two CP110 blocks, each having two GPIO controllers. However, in each CP110 block, one of the GPIO controller cannot be used: in the master CP110, only the second GPIO controller can be used, while on the slave CP110, only the first GPIO controller can be used. On the other side, the Armada 7K has only one CP110, but both its GPIO controllers can be used. For this reason, the GPIO controllers are marked as "disabled" in the armada-cp110-master.dtsi and armada-cp110-slave.dtsi files, and only enabled in the per-SoC dtsi files. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-70x0.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/marvell/armada-80x0.dtsi | 16 ++++++++++++++++ arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 10 ++++++++++ .../boot/dts/marvell/armada-cp110-master.dtsi | 21 +++++++++++++++++++++ .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 22 ++++++++++++++++++++++ 5 files changed, 84 insertions(+) commit ae701b60028f4e0f6714276fd6790b5126975021 Author: Gregory CLEMENT Date: Mon Jun 12 17:34:58 2017 +0200 arm64: dts: marvell: add pinctrl support for Armada 7K/8K Enable pinctrl support for CP and AP on the Armada 7K/8K SoCs. The CP master being different between Armada 7k and Armada 8k. This commit introduces the intermediates files armada-70x0.dtsi and armada-80x0.dtsi. These new files will provide different compatible strings depending of the SoC family. They will also be the location for the pinmux configuration at the SoC level. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7020.dtsi | 2 +- arch/arm64/boot/dts/marvell/armada-7040.dtsi | 2 +- arch/arm64/boot/dts/marvell/armada-70x0.dtsi | 53 +++++++++++++++++++++++ arch/arm64/boot/dts/marvell/armada-8020.dtsi | 3 +- arch/arm64/boot/dts/marvell/armada-8040.dtsi | 3 +- arch/arm64/boot/dts/marvell/armada-80x0.dtsi | 60 +++++++++++++++++++++++++++ arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 4 ++ 7 files changed, 121 insertions(+), 6 deletions(-) commit d320695add65d8f909e4edbdcc8b66ae504854a6 Author: Arnd Bergmann Date: Thu Sep 17 18:19:34 2015 -0300 [media] dvb: don't use 'time_t' in event ioctl 'struct video_event' is used for the VIDEO_GET_EVENT ioctl, implemented by drivers/media/pci/ivtv/ivtv-ioctl.c and drivers/media/pci/ttpci/av7110_av.c. The structure contains a 'time_t', which will be redefined in the future to be 64-bit wide, causing an incompatible ABI change for this ioctl. As it turns out, neither of the drivers currently sets the timestamp field, and it is presumably useless anyway because of the limited resolutions (no sub-second times). This means we can simply change the structure definition to use a 'long' instead of 'time_t' and remain compatible with all existing user space binaries when time_t gets changed. If anybody ever starts using this field, they have to make sure not to use 1970 based seconds in there, as those overflow in 2038. Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/dvb/video.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit db7bc1ba9100c54236958ab60e1feecd7b203f12 Author: Gregory CLEMENT Date: Thu Jun 1 16:55:42 2017 +0200 arm64: dts: marvell: use new binding for the system controller on cp110 The new binding for the system controller on cp110 moved the clock controller into a subnode. This preliminary step will allow to add gpio and pinctrl subnodes. Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT .../boot/dts/marvell/armada-cp110-master.dtsi | 43 ++++++++++++---------- .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 41 +++++++++++---------- 2 files changed, 45 insertions(+), 39 deletions(-) commit 8dcd4ab00424da31c47ca788b0ddf1b6d7b1d7ff Author: Gregory CLEMENT Date: Thu Jun 1 16:55:41 2017 +0200 arm64: dts: marvell: remove *-clock-output-names on cp110 The *-clock-output-names of the cp110-system-controller0 node are not used anymore, so remove them. Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 13 ------------- arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 13 ------------- 2 files changed, 26 deletions(-) commit 76724b30f222067faf00874dc277f6c99d03d800 Author: Stanimir Varbanov Date: Tue Jun 20 10:13:50 2017 -0300 [media] media: venus: enable building with COMPILE_TEST We want all media drivers to build with COMPILE_TEST, as the Coverity instance we use on Kernel works only for x86. Also, our test workflow relies on it, in order to identify git bisect breakages. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Stanimir Varbanov drivers/media/platform/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cdd19b526f5b806ff0468cec1d429feffaf10c89 Author: Antti Palosaari Date: Tue Jun 13 22:58:06 2017 -0300 [media] af9013: refactor power control Move power-up and power-down functionality to init/sleep ops and get rid of old function. Fixes and simplifies power-up functionality slightly. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 93 ++++++++++++++---------------------- 1 file changed, 36 insertions(+), 57 deletions(-) commit 96700d248e7cb47cf5a9e392f8331ed50670d39d Author: Antti Palosaari Date: Tue Jun 13 21:49:33 2017 -0300 [media] af9013: refactor firmware download routine Refactor firmware download routine. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 65 +++++++++++++++++------------------- 1 file changed, 30 insertions(+), 35 deletions(-) commit b5e0e1a3177150fb4758e1ff5f78ca49041a8a8f Author: Antti Palosaari Date: Tue Jun 13 21:32:08 2017 -0300 [media] af9015: move 2nd demod power-up wait different location We need to wait 2nd demod power-up before download firmware. Move that wait to more correct location. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b2c952377593d0fe0bf1c8d27bd51678979ed34d Author: Antti Palosaari Date: Tue Jun 13 20:42:52 2017 -0300 [media] af9013: remove unneeded register writes Removed register writes are already chip defaults, are not required, are set later or belong to AF9015 USB interface. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 42 ------------------------------------ 1 file changed, 42 deletions(-) commit eaa455f023c3ac62f99dcb0aed1bd3986b61f71e Author: Antti Palosaari Date: Tue Jun 13 20:32:15 2017 -0300 [media] af9013: add configurable TS output pin On serial TS mode output pin could be selected from D0 or D7. Add configuration option to for it. Rename TS mode config option prefix from AF9013_TS_ to AF9013_TS_MODE_. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 27 ++++++++++++++------------- drivers/media/dvb-frontends/af9013.h | 2 ++ 2 files changed, 16 insertions(+), 13 deletions(-) commit e94db976b736d3cac6dc23021e2508de65190f54 Author: Antti Palosaari Date: Tue Jun 13 05:29:50 2017 -0300 [media] af9015: enable 2nd TS flow control when dual mode It needs to be enabled in order to get stream from slave af9013 demod. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit d83886ff118cd93d85617362a582beec20c9e92d Author: Antti Palosaari Date: Mon Jun 12 17:06:19 2017 -0300 [media] af9015: fix and refactor i2c adapter algo logic * fix write+read when write has more than one byte * remove lock, not needed on that case * remove useless i2c msg send loop, as we support only write, read and write+read as one go and nothing more Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 153 ++++++++++++++++++---------------- 1 file changed, 79 insertions(+), 74 deletions(-) commit d029799b2f52e98f4b0920ed9b80b169f522e0cb Author: Antti Palosaari Date: Mon Jun 12 15:10:08 2017 -0300 [media] af9013: add dvbv5 cnr Add support for DVBv5 CNR. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit bf69e07262f69da5893faca8b696d1a561b0dd24 Author: Antti Palosaari Date: Mon Jun 12 14:32:36 2017 -0300 [media] af9013: fix error handling Use typical (return 0/goto err/return err) error handling everywhere. Add missing error handling where missing. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 84 +++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 35 deletions(-) commit f458a1bc671c38a7819be7f047d47dedcbc16aca Author: Antti Palosaari Date: Mon Jun 12 02:49:33 2017 -0300 [media] af9013: convert to regmap api Use regmap for register access. Own low level i2c read and write routines for regmap is still needed because chip uses single command byte in addition to typical i2c register access. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 1 + drivers/media/dvb-frontends/af9013.c | 598 +++++++++++++++--------------- drivers/media/dvb-frontends/af9013_priv.h | 1 + 3 files changed, 294 insertions(+), 306 deletions(-) commit cbb2a2999c0f43920ef83f6e895819474823f6ea Author: Antti Palosaari Date: Sat Jun 10 22:04:30 2017 -0300 [media] af9013: fix logging We can simplify logging as we now have a proper i2c client to pass for kernel dev_* logging functions. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 202 +++++++++++++++++------------------ 1 file changed, 100 insertions(+), 102 deletions(-) commit 903b0e58d890ab9052eef1dbbddcac0f357410b8 Author: Antti Palosaari Date: Sat Jun 10 21:12:14 2017 -0300 [media] af9013: use kernel 64-bit division Replace own binary division with 64-bit multiply and division. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 34 +++---------------------------- drivers/media/dvb-frontends/af9013_priv.h | 1 + 2 files changed, 4 insertions(+), 31 deletions(-) commit 82d1ce3eba6952929efa770e693d3be6e55bd7ab Author: Antti Palosaari Date: Sat Jun 10 20:53:42 2017 -0300 [media] af9013: add i2c client bindings Add kernel i2c driver bindings. That allows dev_* logging, regmap and more. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 321 ++++++++++++++++++++++------------- drivers/media/dvb-frontends/af9013.h | 84 +++++---- 2 files changed, 241 insertions(+), 164 deletions(-) commit a4e2b6fe0edc16a80a3879bab409e18203c57a07 Author: Antti Palosaari Date: Sat Jun 10 19:24:34 2017 -0300 [media] af9013: move config values directly under driver state It shorten, as typed chars, access to config values as there is one pointer less. Also, when config/platform data is passed to driver there could be some values that are not relevant to store state as such or not needed to store at all. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 62 ++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 24 deletions(-) commit 5ded0eb7f820039f4de06b5ec2a175b5dd9ddc1a Author: Antti Palosaari Date: Sun Feb 5 18:09:38 2017 -0200 [media] af9015: use correct 7-bit i2c addresses Driver was using wrong "8-bit" i2c addresses for demods and tuners. Internal demod i2c address was not set at all. These are needed to be fixed before proper i2c client binding is used. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 24 +++++++++++++----------- drivers/media/usb/dvb-usb-v2/af9015.h | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) commit edf064e7c6fec3646b06c944a8e35d1a3de5c2c3 Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:49 2017 -0500 btrfs: nowait aio support Return EAGAIN if any of the following checks fail + i_rwsem is not lockable + NODATACOW or PREALLOC is not set + Cannot nocow at the desired location + Writing beyond end of file which is not allocated Acked-by: David Sterba Signed-off-by: Goldwyn Rodrigues Signed-off-by: Jens Axboe fs/btrfs/file.c | 33 +++++++++++++++++++++++++++------ fs/btrfs/inode.c | 3 +++ 2 files changed, 30 insertions(+), 6 deletions(-) commit 29a5d29ec181ebdc98a26cedbd76ce9870248892 Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:48 2017 -0500 xfs: nowait aio support If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable immediately. IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin if it needs allocation either due to file extension, writing to a hole, or COW or waiting for other DIOs to finish. Return -EAGAIN if we don't have extent list in memory. Signed-off-by: Goldwyn Rodrigues Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Jens Axboe fs/xfs/xfs_file.c | 32 ++++++++++++++++++++++++++------ fs/xfs/xfs_iomap.c | 22 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 6 deletions(-) commit 728fbc0e10b7f3ce2ee043b32e3453fd5201c055 Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:47 2017 -0500 ext4: nowait aio support Return EAGAIN if any of the following checks fail for direct I/O: + i_rwsem is lockable + Writing beyond end of file (will trigger allocation) + Blocks are not allocated at the write location Signed-off-by: Goldwyn Rodrigues Reviewed-by: Jan Kara Signed-off-by: Jens Axboe fs/ext4/file.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit 03a07c92a9ed9938d828ca7f1d11b8bc63a7bb89 Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:46 2017 -0500 block: return on congested block device A new bio operation flag REQ_NOWAIT is introduced to identify bio's orignating from iocb with IOCB_NOWAIT. This flag indicates to return immediately if a request cannot be made instead of retrying. Stacked devices such as md (the ones with make_request_fn hooks) currently are not supported because it may block for housekeeping. For example, an md can have a part of the device suspended. For this reason, only request based devices are supported. In the future, this feature will be expanded to stacked devices by teaching them how to handle the REQ_NOWAIT flags. Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Goldwyn Rodrigues Signed-off-by: Jens Axboe block/blk-core.c | 22 ++++++++++++++++++++-- block/blk-mq.c | 4 ++++ fs/direct-io.c | 10 ++++++++-- include/linux/bio.h | 6 ++++++ include/linux/blk_types.h | 4 ++++ 5 files changed, 42 insertions(+), 4 deletions(-) commit a38d1243704f501a4c42de1db1062ff6eba83453 Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:45 2017 -0500 fs: Introduce IOMAP_NOWAIT IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps. This is used by XFS in the XFS patch. Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Goldwyn Rodrigues Signed-off-by: Jens Axboe fs/iomap.c | 8 ++++++++ include/linux/iomap.h | 1 + 2 files changed, 9 insertions(+) commit 6be96d3ad34a124450028dabba43f07fe1d0c86d Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:44 2017 -0500 fs: return if direct I/O will trigger writeback Find out if the I/O will trigger a wait due to writeback. If yes, return -EAGAIN. Return -EINVAL for buffered AIO: there are multiple causes of delay such as page locks, dirty throttling logic, page loading from disk etc. which cannot be taken care of. Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Goldwyn Rodrigues Signed-off-by: Jens Axboe mm/filemap.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit b745fafaf70c0a98a2e1e7ac8cb14542889ceb0e Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:43 2017 -0500 fs: Introduce RWF_NOWAIT and FMODE_AIO_NOWAIT RWF_NOWAIT informs kernel to bail out if an AIO request will block for reasons such as file allocations, or a writeback triggered, or would block while allocating requests while performing direct I/O. RWF_NOWAIT is translated to IOCB_NOWAIT for iocb->ki_flags. FMODE_AIO_NOWAIT is a flag which identifies the file opened is capable of returning -EAGAIN if the AIO call will block. This must be set by supporting filesystems in the ->open() call. Filesystems xfs, btrfs and ext4 would be supported in the following patches. Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Goldwyn Rodrigues Signed-off-by: Jens Axboe fs/aio.c | 6 ++++++ include/linux/fs.h | 9 +++++++++ include/uapi/linux/fs.h | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) commit 9830f4be159b29399d107bffb99e0132bc5aedd4 Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:42 2017 -0500 fs: Use RWF_* flags for AIO operations aio_rw_flags is introduced in struct iocb (using aio_reserved1) which will carry the RWF_* flags. We cannot use aio_flags because they are not checked for validity which may break existing applications. Note, the only place RWF_HIPRI comes in effect is dio_await_one(). All the rest of the locations, aio code return -EIOCBQUEUED before the checks for RWF_HIPRI. Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Goldwyn Rodrigues Signed-off-by: Jens Axboe fs/aio.c | 8 +++++++- include/uapi/linux/aio_abi.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) commit 7fc9e4722435cd8459182c4975f48934f2bb1274 Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:41 2017 -0500 fs: Introduce filemap_range_has_page() filemap_range_has_page() return true if the file's mapping has a page within the range mentioned. This function will be used to check if a write() call will cause a writeback of previous writes. Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Goldwyn Rodrigues Signed-off-by: Jens Axboe include/linux/fs.h | 2 ++ mm/filemap.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit fdd2f5b7de2afaa931e5f7bad7bcda35d1f1b479 Author: Goldwyn Rodrigues Date: Tue Jun 20 07:05:40 2017 -0500 fs: Separate out kiocb flags setup based on RWF_* flags Also added RWF_SUPPORTED to encompass all flags. Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Goldwyn Rodrigues Signed-off-by: Jens Axboe fs/read_write.c | 12 +++--------- include/linux/fs.h | 14 ++++++++++++++ include/uapi/linux/fs.h | 2 ++ 3 files changed, 19 insertions(+), 9 deletions(-) commit 88c0530f65e622a96a431b63e3feb707303bc9fc Author: Gustavo A. R. Silva Date: Thu Jun 15 17:42:44 2017 -0300 [media] af9013: add check on af9013_wr_regs() return value Check return value from call to af9013_wr_regs(), so in case of error print debug message and return. Addresses-Coverity-ID: 1227035 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 2 ++ 1 file changed, 2 insertions(+) commit 6acb191f923582a7cb2f84709a2731b49343f7f0 Author: Daniel Scheller Date: Sun Apr 9 16:38:28 2017 -0300 [media] ddbridge: hardware IDs for new C2T2 cards and other devices Adds hardware IDs for all Sony CXD-based Cine-cards and MaxA8 devices, also adds some other yet missing IDs like the Octopus V3, Octopus OEM and Octopus Mini, as well as cards with unknown/deleted sub-ids. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/Kconfig | 3 +- drivers/media/pci/ddbridge/ddbridge-core.c | 84 +++++++++++++++++++++++++++++- drivers/media/pci/ddbridge/ddbridge.h | 5 +- 3 files changed, 88 insertions(+), 4 deletions(-) commit 69e1749c6ca4b4cc3ff2da57ed60ed9c953e9a2c Author: Daniel Scheller Date: Sun Apr 9 16:38:27 2017 -0300 [media] ddbridge: support for Sony CXD28xx C/C2/T/T2 tuner modules Properly detect and attach Ports and Flex modules with the Sony CXD28xxER series demods. This makes newer Cine cards and most DuoFlex C/C2/T/T2 (or any combination of these systems) work, PCI IDs need to be added though. Note: This utilises the CXD2841ER demod driver, which requires the changes from this patch series to properly work. Without those changes, it won't function properly (if at all). Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/Kconfig | 2 + drivers/media/pci/ddbridge/ddbridge-core.c | 130 +++++++++++++++++++++++++++-- drivers/media/pci/ddbridge/ddbridge.h | 14 ++-- 3 files changed, 132 insertions(+), 14 deletions(-) commit e933a6f1af4648c6a0023795d99aa5470fd2f49d Author: Daniel Scheller Date: Sun Apr 9 16:38:26 2017 -0300 [media] ddbridge: add I2C functions, add XO2 module support Some Flex modules (mostly with anyof C/C2/T/T2 demods based on the Sony CXD28xxER series) are equipped with an interface named XO2 (which appears to be the Lattice MachXO2). Add functionality to detect such links and initialise them, so any tuner module with such an interface can be used. This also adds dummy detection for any possible connected module, telling the user it isn't supported at this very moment. Also adds i2c_io(), i2c_write() and i2c_write_reg(), all required for the XO2 handling functionality. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-core.c | 147 +++++++++++++++++++++++++++++ drivers/media/pci/ddbridge/ddbridge.h | 11 +++ 2 files changed, 158 insertions(+) commit 1b58a5a4b5fea0be8ae625a945f9662af2edf9a5 Author: Daniel Scheller Date: Sun Apr 9 16:38:25 2017 -0300 [media] ddbridge: board control setup, ts quirk flags This is a backport of the board control setup from the vendor provided dddvb driver package, which does additional device initialisation based on the board_control device info values. Also backports the TS quirk flags which is used to control setup and usage of the tuner modules soldered on the bridge cards (e.g. CineCTv7, CineS2 V7, MaxA8 and the likes). Functionality originates from ddbridge vendor driver. Permission for reuse and kernel inclusion was formally granted by Ralph Metzler . Cc: Ralph Metzler Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-core.c | 13 +++++++++++++ drivers/media/pci/ddbridge/ddbridge-regs.h | 4 ++++ drivers/media/pci/ddbridge/ddbridge.h | 10 ++++++++++ 3 files changed, 27 insertions(+) commit df61f828d4e5f6db7936a21afeef1d5cb6248b4b Author: Daniel Scheller Date: Sun Apr 9 16:38:24 2017 -0300 [media] dvb-frontends/cxd2841er: improved snr reporting On DVB-T/T2 at least, SNR might be reported as >2500dB, which not only is just wrong but also ridiculous, so fix this by improving the conversion of the register value. The INTLOG10X100 function/macro and the way the values are converted were both taken from DD's cxd2843 driver. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bf51bbb0448e919181294c268a15a2d119ed9a4e Author: Daniel Scheller Date: Sun Apr 9 16:38:23 2017 -0300 [media] dvb-frontends/cxd2841er: more configurable TSBITS Bits 3 and 4 of the TSCONFIG register are important for certain hardware constellations, in that they need to be zeroed. Add a configuration flag to toggle this. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 4 ++++ drivers/media/dvb-frontends/cxd2841er.h | 1 + 2 files changed, 5 insertions(+) commit 14fd86290df1d2505556fddd895470860182dc22 Author: Daniel Scheller Date: Sun Apr 9 16:38:22 2017 -0300 [media] dvb-frontends/cxd2841er: configurable IFAGCNEG Adds a flag to enable or disable the IFAGCNEG bit in cxd2841er_init_tc(). Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 5 +++-- drivers/media/dvb-frontends/cxd2841er.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit e3943aa6d8023bbd0ce972367b8c9eb1b43321e0 Author: Daniel Scheller Date: Sun Apr 9 16:38:21 2017 -0300 [media] dvb-frontends/cxd2841er: make lock wait in set_fe_tc() optional Don't wait for FE_HAS_LOCK in set_frontend_tc() and thus don't hammer the lock status register with inquiries when CXD2841ER_NO_WAIT_LOCK is set in the configuration, which also unneccessarily blocks applications until a TS LOCK has been acquired. Rather, API and applications will check for a TS LOCK by utilising the tune fe_op, read_status and get_frontend ops, which is sufficient. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 4 ++++ drivers/media/dvb-frontends/cxd2841er.h | 1 + 2 files changed, 5 insertions(+) commit 763f857e40f3711355f42e666cfdd232390d4e55 Author: Daniel Scheller Date: Sun Apr 9 16:38:20 2017 -0300 [media] dvb-frontends/cxd2841er: optionally tune earlier in set_frontend() When AUTO_IFHZ is set and the tuner is supposed to provide proper IF speed values, it should be possible to have the tuner setup take place before the demod is configured, else the demod might be configured with either wrong (old), or even no values at all, which obviously will cause issues. To set this behaviour in the most flexible way, this is done with a separate flag instead of making this depend on AUTO_IFHZ. It should be evaluated if tuning shouldn't take place earlier in all cases and hardware constellations. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 14 ++++++++++++-- drivers/media/dvb-frontends/cxd2841er.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) commit 7afe510ab23781d5453101c43756dcd922f0e351 Author: Daniel Scheller Date: Sun Apr 9 16:38:19 2017 -0300 [media] dvb-frontends/cxd2841er: make ASCOT use optional The Sony CXD28xx demods may have other tuner types attached to them (e.g. NXP TDA18212), so don't mandatorily configure and enable the ASCOT functionality, but make this conditional by a config flag. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 70 ++++++++++++++-------- drivers/media/dvb-frontends/cxd2841er.h | 1 + drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 +- 3 files changed, 46 insertions(+), 27 deletions(-) commit 03ab1bd5c278d6f5516bb2b08bbbc531cc4891c5 Author: Daniel Scheller Date: Sun Apr 9 16:38:18 2017 -0300 [media] dvb-frontends/cxd2841er: TS_SERIAL config flag Some constellations work/need a serial TS transport mode. This adds a flag that will toggle set up of such mode. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 18 ++++++++++++++++-- drivers/media/dvb-frontends/cxd2841er.h | 5 +++-- 2 files changed, 19 insertions(+), 4 deletions(-) commit 4b866c4e656956d060cb1c46eb1b8b711c6e7ad7 Author: Daniel Scheller Date: Sun Apr 9 16:38:17 2017 -0300 [media] dvb-frontends/cxd2841er: support IF speed calc from tuner values Add a AUTO_IFHZ flag and a function that will read IF speed values from any attached tuner if the tuner supports this and if AUTO_IFHZ is enabled, and else the passed default value (which probably matches Sony ASCOT tuners) will be passed back. The returned value is then used to calculate the iffeq which the demod will be programmed with. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 64 +++++++++++++++++++++++---------- drivers/media/dvb-frontends/cxd2841er.h | 1 + 2 files changed, 47 insertions(+), 18 deletions(-) commit c7518d13f70e62e2af3a30858a977365811783df Author: Daniel Scheller Date: Sun Apr 9 16:38:16 2017 -0300 [media] dvb-frontends/cxd2841er: make call to i2c_gate_ctrl optional Some cards/bridges wrap i2c_gate_ctrl handling with a mutex_lock(). This is e.g. done in ddbridge to protect against concurrent tuner access with regards to the dual tuner HW, where concurrent tuner reconfiguration can result in tuning fails or bad reception quality. When the tuner driver additionally tries to open the I2C gate (which e.g. the tda18212 driver does) when the demod already did this, this will lead to a deadlock. This makes the calls to i2c_gatectrl from the demod driver optional when the flag is set, leaving this to the tuner driver. For readability reasons and to not have the check duplicated multiple times, the setup is factored into cxd2841er_tuner_set(). This commit also updates the netup card driver (which seems to be the only consumer of the cxd2841er as of now). Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 32 ++++++++++++++-------- drivers/media/dvb-frontends/cxd2841er.h | 2 ++ drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 3 +- 3 files changed, 24 insertions(+), 13 deletions(-) commit 050863aac09453d74be9f8b3c6b91fb1af92c5c3 Author: Daniel Scheller Date: Sun Apr 9 16:38:15 2017 -0300 [media] dvb-frontends/cxd2841er: add variable for configuration flags Throughout the patch series some configuration flags will be added to the demod driver. This patch prepares this by adding the flags var to struct cxd2841er_config, which will serve as a bitmask to toggle various options and behaviour in the driver. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 2 ++ drivers/media/dvb-frontends/cxd2841er.h | 1 + 2 files changed, 3 insertions(+) commit cbc85a47365a643046f4c6808fc0d99cd17a013f Author: Daniel Scheller Date: Sun Apr 9 16:38:14 2017 -0300 [media] dvb-frontends/cxd2841er: replace IFFREQ calc macros into functions The way the MAKE_IFFREQ_CONFIG macros are written make it impossible to pass regular integers for iffreq calculation, since this will cause "SSE register return with SSE disabled" compile errors. This changes the calculation into C functions which also might help when debugging. Also, expand all passed frequencies from MHz to Hz scale. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 48 ++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 19 deletions(-) commit 1ecda28c0dc2fc953f2bb4258b191e2dba5d539c Author: Daniel Scheller Date: Sun Apr 9 16:38:13 2017 -0300 [media] dvb-frontends/cxd2841er: support CXD2837/38/43ER demods/Chip IDs Those demods are programmed in the same way as the CXD2841ER/54ER and can be handled by this driver. Support added in a way matching the existing code, supported delivery systems are set according to what each demod supports. Updates the type string setting used for printing the "attaching..." log line aswell. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 24 +++++++++++++++++++++++- drivers/media/dvb-frontends/cxd2841er_priv.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) commit 6ccf821c3408447ee67839d093965ab438960234 Author: Daniel Scheller Date: Sun Apr 9 16:38:12 2017 -0300 [media] dvb-frontends/cxd2841er: immediately unfreeze regs when done Do unfreeze_regs() directly when accessing the demod registers is done, and don't have multiple unfreeze's on different conditions, which even can get prone to errors. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 725e93eba1769b61545da06366be908eedd688a0 Author: Daniel Scheller Date: Sun Apr 9 16:38:11 2017 -0300 [media] dvb-frontends/cxd2841er: do I2C reads in one go Doing the I2C read operation with two calls to i2c_transfer() causes the exclusive I2C bus lock of the underlying adapter to be released. While this isn't an issue if only one demodulator is attached to the bus, having two or even more causes troubles in that concurrent accesses to the different demods will cause all kinds of issues due to wrong data being returned on read operations (for example, the TS config register will be set wrong). This changes the read_regs() function to do the operation in one go (by calling i2c_transfer with the whole msg list instead of one by one) to not loose the I2C bus lock, fixing all sorts of random runtime failures. Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit b6b1f2d9cf796c3555734949b5e7a74fa2ceeb6c Author: leilk.liu@mediatek.com Date: Tue Jun 20 16:21:07 2017 +0800 spi: mediatek: add spi support for mt2712 IC this patch add support for mt2712 IC. Signed-off-by: Leilk Liu Reviewed-by: Matthias Brugger Signed-off-by: Mark Brown drivers/spi/spi-mt65xx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7383674c9be3efc171cb2f6daaccb4c503ea4b6b Author: leilk.liu@mediatek.com Date: Tue Jun 20 16:21:06 2017 +0800 spi: mediatek: Add bindings for mediatek MT2712 soc platform This patch adds a DT binding documentation for the MT2712 soc. Signed-off-by: Leilk Liu Reviewed-by: Matthias Brugger Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 + 1 file changed, 1 insertion(+) commit 5d6d93a123c76ffd73667e87483756f0deb41214 Author: Daniel Scheller Date: Sun Apr 9 16:38:10 2017 -0300 [media] dvb-frontends/cxd2841er: remove kernel log spam in non-debug levels This moves the I2C debug dump into the preceding dev_dbg() call by utilising the %*ph format macro and removes the call to print_hex_debug_bytes(). Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 42f1ea48efd99394a4790e8ab956f1fb8e0a931e Author: Keerthy Date: Tue Jun 20 09:06:55 2017 +0530 regulator: lp87565: Fix the initial voltage range The latest documentation reveals that initial voltage range that is supported is starting from 0.6V for all the PMICs belonging to lp87565 family. Fix the same. Signed-off-by: Keerthy Fixes: f0168a9bf ("regulator: lp87565: Add support for lp87565 PMIC regulators") Signed-off-by: Mark Brown drivers/regulator/lp87565-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05da9437f2258903759b8fc60bcef5ab3d90c29a Author: Daniel Scheller Date: Wed Mar 29 13:43:13 2017 -0300 [media] ddbridge: support STV0367-based cards and modules This adds detection and activation for STV0367-based tuner hardware (namely CineCTv6 bridge cards and older DuoFlex CT addon modules). Utilises the extended stv0367 demod driver. TDA18212 i2c_client/regmap-api code was originally implemented by Antti Palosaari in a variant to update the ddbridge code from the vendor dddvb package (formal ack for these parts received). Original patch at [1]. When boards with STV0367 are cold-started, there might be issues with the I2C gate, causing the TDA18212 detection/probe to fail. For these demods, a workaround (tuner_tda18212_ping) is implemented which probes the tuner twice on this hardware constellation which will resolve the problem and put all components into a working state. Other demod/port types won't be retried. [1] https://patchwork.linuxtv.org/patch/25146/ Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/Kconfig | 3 + drivers/media/pci/ddbridge/ddbridge-core.c | 158 ++++++++++++++++++++++++++++- drivers/media/pci/ddbridge/ddbridge.h | 1 + 3 files changed, 161 insertions(+), 1 deletion(-) commit 6b1256b7becbf737cf220d011b0f732136ef63a5 Author: Daniel Scheller Date: Wed Mar 29 13:43:12 2017 -0300 [media] ddbridge: add i2c_read_regs() Adds new i2c_read_regs() function and make i2c_read_reg() wrap into this with len=1. Required for the tuner_tda18212_ping() and XO2 handling functions (part of the Sony CXD28xx support patch series). Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit dbbac11e1de1250ad39bbc15490c8614ac7f9def Author: Daniel Scheller Date: Wed Mar 29 13:43:11 2017 -0300 [media] dvb-frontends/stv0367: add Digital Devices compatibility This - in conjunction with the previous changes - makes it possible to use the STV0367 DVB-C/T demodulator driver with Digital Devices hardware having this demodulator soldered on them (namely CineCTv6 bridges and some earlier DuoFlex CT addon modules). The changes do the following: - add a third *_attach function which will make use of a third frontend_ops struct which announces both -C and -T support (the same as with DD's own driver stv0367dd). This is necessary to support both delivery systems on one FE without having to do large conversions to VB2 or the need to select either -C or -T mode via modparams and the like. Additionally, the frontend_ops point to new "glue" functions which will then call into the existing functionality depending on the active delivery system/demod state (all used functionality works almost OOTB). - Demod initialisation has been ported from stv0367dd. DD's driver always does a full init of both OFDM and QAM cores, with some additional things. The active delivery system is remembered and upon switch, the Demod will be reconfigured to work in OFDM or QAM mode (that's what the ddb_setup_XX functions are used for). Note that in QAM mode, the DD demods work with an IC speed of 58Mhz. It's not very good to perform full reinits upon Demod mode changes since in very rare occasions this can lead to the I2C interface or the whole Demod to crash, requiring a powercycle, thus the flag to perform full reinit is set to disabled. - A little enum is added for named identifiers of the current Demod state. Initialisation code/register writes originate from stv0367dd. Permission to reuse was formally granted by Ralph Metzler . Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 324 ++++++++++++++++++++++++++++++++++ drivers/media/dvb-frontends/stv0367.h | 10 ++ 2 files changed, 334 insertions(+) commit 2cafa6b288b61137dc2525efa18d1004fdeb783b Author: Daniel Scheller Date: Wed Mar 29 13:43:10 2017 -0300 [media] dvb-frontends/stv0367: add defaults for use w/DD-branded devices Digital Devices uses defaults tables in their stv0367dd demod driver variant which differ in a few registers, at least enough that no stable operation can be provided with the tables already present in the driver (init succeeds and DVB reception works but at least when the driver is reloaded using rmmod/modprobe, the demod goes into a crashed state in a way it doesn't react on any I2C command anymore, while even more side-effects may occur), so there's a good reason to better have another set of defaults. Defaults originating from the stv0367dd driver. Permission to reuse them was formally granted by Ralph Metzler . Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367_defs.h | 610 ++++++++++++++++++++++++++++- 1 file changed, 609 insertions(+), 1 deletion(-) commit 8b39f076211664400cd3f182752cfc72b17605ed Author: Daniel Scheller Date: Wed Mar 29 13:43:09 2017 -0300 [media] dvb-frontends/stv0367: fix symbol rate conditions in cab_SetQamSize() The values used for comparing symbol rates and the resulting conditional reg writes seem wrong (rates multiplied by ten), so fix those values. While this doesn't seem to influence operation, it should be fixed anyway. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cae7a901cd630b3df37e4b8dea0be3cc489a51be Author: Daniel Scheller Date: Wed Mar 29 13:43:08 2017 -0300 [media] dvb-frontends/stv0367: selectable QAM FEC Lock status register In some configurations (due to different PIN config, wiring or so), the QAM FECLock might be signalled using a different register than F367CAB_QAMFEC_LOCK (e.g. F367CAB_DESCR_SYNCSTATE on Digital Devices hw), so make that register selectable. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b16338e3d346ced3956e21408f265c7f308f9ba4 Author: Daniel Scheller Date: Wed Mar 29 13:43:07 2017 -0300 [media] dvb-frontends/stv0367: support reading if_khz from tuner config Currently, if_khz is set and provided using the configuration var in struct stv0367_config. However, in some constellations, the value might be different for differing channel bandwidths or even -T and -C operation. When e.g. used in conjunction with TDA18212 tuners, the tuner frontend might be aware of the different freqs. This factors if_khz retrieval in a function, which checks a new flag if an automatic retrieval attempt should be made, and if the tuner provides it, use it whenever needed. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 45 +++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 13 deletions(-) commit 7dfb8be11b5d1db4325414ce16b8c164e08f52d8 Author: Nikolay Borisov Date: Fri Jun 16 14:39:20 2017 +0300 btrfs: Round down values which are written for total_bytes_size We got an internal report about a file system not wanting to mount following 99e3ecfcb9f4 ("Btrfs: add more validation checks for superblock"). BTRFS error (device sdb1): super_total_bytes 1000203816960 mismatch with fs_devices total_rw_bytes 1000203820544 Subtracting the numbers we get a difference of less than a 4kb. Upon closer inspection it became apparent that mkfs actually rounds down the size of the device to a multiple of sector size. However, the same cannot be said for various functions which modify the total size and are called from btrfs_balance as well as when adding a new device. So this patch ensures that values being saved into on-disk data structures are always rounded down to a multiple of sectorsize. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 + fs/btrfs/volumes.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) commit eca152edf57e04f61d5a79e404d8e6c147278fdf Author: Nikolay Borisov Date: Fri Jun 16 14:39:19 2017 +0300 btrfs: Manually implement device_total_bytes getter/setter The device->total_bytes member needs to always be rounded down to sectorsize so that it corresponds to the value of super->total_bytes. However, there are multiple places where the setter is fed a value which is not rounded which can cause a fs to be unmountable due to the check introduced in 99e3ecfcb9f4 ("Btrfs: add more validation checks for superblock"). This patch implements the getter/setter manually so that in a later patch I can add necessary code to catch offenders. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 0d0c71b317207082856f40dbe8a2bac813f49677 Author: David Sterba Date: Thu Jun 15 01:30:06 2017 +0200 btrfs: obsolete and remove mount option alloc_start The mount option alloc_start was used in the past for debugging and stressing the chunk allocator. Not meant to be used by users, so we're not breaking anybody's setup. There was some added complexity handling changes of the value and when it was not same as default. Such code has likely been untested and I think it's better to remove it. This patch kills all use of alloc_start, and by doing that also fixes a bug when alloc_size is set, potentially called from statfs: in btrfs_calc_avail_data_space, traversing the list in RCU, the RCU protection is temporarily dropped so btrfs_account_dev_extents_size can be called and then RCU is locked again! Doing that inside list_for_each_entry_rcu is just asking for trouble, but unlikely to be observed in practice. Signed-off-by: David Sterba fs/btrfs/ctree.h | 12 +---------- fs/btrfs/super.c | 61 +++++------------------------------------------------- fs/btrfs/volumes.c | 4 +--- 3 files changed, 7 insertions(+), 70 deletions(-) commit fac03c8daeb581e2bc38e5a8c0c6a42cf87cf1c3 Author: David Sterba Date: Thu Jun 15 19:10:03 2017 +0200 btrfs: move fs_info::fs_frozen to the flags We can keep the state among the other fs_info flags, there's no reason why fs_frozen would need to be separate. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 5 ++--- fs/btrfs/disk-io.c | 1 - fs/btrfs/super.c | 6 ++++-- fs/btrfs/transaction.c | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) commit 7718dcf06ed17b18e8a4c6d78f10235eac02414b Author: Daniel Scheller Date: Wed Mar 29 13:43:06 2017 -0300 [media] dvb-frontends/stv0367: make full reinit on set_frontend() optional Every time dvb_frontend_ops.set_frontend() is called, an almost full reinit of the demodulator will be performed. While this might cause a slight delay when switching channels due to all involved tables being rewritten, it can even be dangerous in certain causes in that the demod may lock up and requires to be powercycled (this can happen on Digital Devices hardware). So this adds a flag if it should be done, and to not change behaviour with existing card support, it'll be enabled in all cases. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 79b4f4c605b76194448315865ebcf6fcb0844fc5 Author: David Sterba Date: Thu Jun 15 19:09:51 2017 +0200 btrfs: cleanup duplicate return value in insert_inline_extent The pattern when err is used for function exit and ret is used for return values of callees is not used here. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8568f1e02624e6ce34644369e6ca137d10e32a88 Author: Nicholas Piggin Date: Sun May 21 23:15:50 2017 +1000 powerpc/64s/paca: EX_CTR is not used with RELOCATABLE=n, remove it Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 635942ae53cc5d4049c2c4a5bd2ad819e3a47ee5 Author: Nicholas Piggin Date: Sun May 21 23:15:49 2017 +1000 powerpc/64s/paca: EX_R3 can be merged with EX_DAR EX_R3 is used only for a small section of the bad stack handler. Merge it with EX_DAR. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit dbeea1d6b4bd9fff10e125e5516156fb52ddeae8 Author: Nicholas Piggin Date: Sun May 21 23:15:48 2017 +1000 powerpc/64s/paca: EX_LR can be merged with EX_DAR EX_LR is used only for a small section of the SLB miss handler. Merge it with EX_DAR. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 36670fcf01aa22c7de2e96b4a6fb5fbd4dfe4a33 Author: Nicholas Piggin Date: Sun May 21 23:15:47 2017 +1000 powerpc/64s/paca: EX_SRR0 is unused, remove it Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 8c3885141537966065e3d2b9be03e574ae381c79 Author: Nicholas Piggin Date: Sun May 21 23:15:46 2017 +1000 powerpc/64s: Add EX_SIZE definition for paca exception save areas Rather than open-coding it 4 times. Signed-off-by: Nicholas Piggin [mpe: Move __ASSEMBLY__ guards into head-64.h where they're really needed] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 3 +++ arch/powerpc/include/asm/head-64.h | 3 +++ arch/powerpc/include/asm/paca.h | 12 ++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) commit 4d7cd3b956713d3dfbc3028ad1251b3f6b416a53 Author: Nicholas Piggin Date: Sun May 21 23:15:45 2017 +1000 powerpc/64s: Avoid r3 save/restore in SLB miss handler The SLB miss handler uses r3 for the faulting address but r12 is mostly able to be freed up to save r3 in. It just requires SRR1 be reloaded again on error. It would be more conventional to use r12 for SRR1 (and use r11 to save r3), but slb_allocate_realmode clobbers r11 and not r12. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 41 +++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit fe5482c04312791bb19202e47f8a7751d476251e Author: Nicholas Piggin Date: Sun May 21 23:15:44 2017 +1000 powerpc/64s: SLB miss already has CTR saved for relocatable kernel The EXCEPTION_PROLOG_1 used by SLB miss already saves CTR when the kernel is built with CONFIG_RELOCATABLE. So it does not have to be saved and reloaded when branching to slb_miss_realmode. It can be restored from the PACA as usual. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 7c28f04828dc8321cb234b2ad57266b9f902add0 Author: Nicholas Piggin Date: Sun May 21 23:15:43 2017 +1000 powerpc/64s: Avoid saving faulting address into EX_DAR in SLB miss The EX_DAR save area is only used in exceptional cases. With r3 no longer clobbered by slb_allocate_realmode, saving faulting address to EX_DAR can be deferred to those cases. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 8a9c07359ce5eddb40da444a01aabe177d370b3a Author: Daniel Scheller Date: Wed Mar 29 13:43:05 2017 -0300 [media] dvb-frontends/stv0367: make PLLSETUP a function, add 58MHz IC speed This moves the PLL SETUP code from stv0367ter_init() into a dedicated function, and also make it possible to configure 58Mhz IC speed at 27MHz Xtal (used on STV0367-based DDB cards/modules in QAM mode). Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 73 +++++++++++++++++++++++------------ drivers/media/dvb-frontends/stv0367.h | 3 ++ 2 files changed, 51 insertions(+), 25 deletions(-) commit 8881ceb86f235ef0209d17f8e6498483badc348f Author: Daniel Scheller Date: Wed Mar 29 13:43:04 2017 -0300 [media] dvb-frontends/stv0367: move out tables, support multiple tab variants Move the *ter and *cab st_register tables into a separate header file and additionally organize them via a multidimensional array, allowing to add more tables with differing init values, and also prepare for a base init table which should contain general setup values. Also add a state var to store the table triplet to be used. Also fixes three minor style problems reported by checkpatch. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 658 +-------------------------- drivers/media/dvb-frontends/stv0367_defs.h | 693 +++++++++++++++++++++++++++++ 2 files changed, 701 insertions(+), 650 deletions(-) commit 41727cbb203cd6606a0ea835d867060f27d57737 Author: Daniel Scheller Date: Wed Mar 29 13:43:03 2017 -0300 [media] dvb-frontends/stv0367: refactor defaults table handling Change defaults table writing so tables can be of dynamic length without having to keep track of their lengths by adding and evaluating an end marker (reg 0x0000), also move table writing to a dedicated function to remove code duplication. Additionally mark st_register tables const since they're used read-only. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 30 ++++++++++++++++++++---------- drivers/media/dvb-frontends/stv0367_regs.h | 4 ---- 2 files changed, 20 insertions(+), 14 deletions(-) commit df5a38e9131c2fbe46ef95d536d35191b774d433 Author: Daniel Scheller Date: Wed Mar 29 13:43:02 2017 -0300 [media] dvb-frontends/stv0367: print CPAMP status only if stv_debug is enabled The CPAMP log lines generated in stv0367_ter_check_cpamp() are printed everytime tuning succeeds or fails, quite cluttering the normal kernel log. Use dprintk() instead of printk(KERN_ERR...) so that if the information is needed, it'll be printed when the stv_debug modparam is enabled. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d59afffdf04c66c09085160706297ec55833533c Author: Nicholas Piggin Date: Sun May 21 23:15:42 2017 +1000 powerpc/64s: Preserve r3 in slb_allocate_realmode() One fewer registers clobbered by this function means the SLB miss handler can save one fewer. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/slb_low.S | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit f61c2991e6ee6753be35193aa46ed6fd4a77dc25 Author: Daniel Scheller Date: Wed Mar 29 13:43:01 2017 -0300 [media] dvb-frontends/stv0367: add flag to make i2c_gatectrl optional Some hardware and bridges (namely ddbridge) require that tuner access is limited to one concurrent access and wrap i2c gate control with a mutex_lock when attaching frontends. According to vendor information, this is required as concurrent tuner reconfiguration can interfere each other and at worst cause tuning fails or bad reception quality. If the demod driver does gate_ctrl before setting up tuner parameters, and the tuner does another I2C enable, it will deadlock forever when gate_ctrl is wrapped into the mutex_lock. This adds a flag and a conditional before triggering gate_ctrl in the demodulator driver. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 8108f7f432e420e8de6428b3a4edec606bb627a3 Author: Marek Szyprowski Date: Mon Jun 19 09:19:46 2017 -0300 [media] s5p-cec: update MAINTAINERS entry I would like to replace Kyungmin Park, who is no longer interested in maintaining S5P-CEC driver. I have access to various Exynos boards. I also already did some tests of this driver and helped enabling it on various Exynos boards. The driver itself is no longer in staging, so lets fix the path too and add DT bindings file pattern match. Also change the mailing list from ARM generic to Samsung SoC specific to get more attention and easier review in the future. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 758d90e161382c134b7cbd5f724df4de02f3c67e Author: Tomasz Figa Date: Mon Jun 19 00:53:43 2017 -0300 [media] v4l2-core: Use kvmalloc() for potentially big allocations There are multiple places where arrays or otherwise variable sized buffer are allocated through V4L2 core code, including things like controls, memory pages, staging buffers for ioctls and so on. Such allocations can potentially require an order > 0 allocation from the page allocator, which is not guaranteed to be fulfilled and is likely to fail on a system with severe memory fragmentation (e.g. a system with very long uptime). Since the memory being allocated is intended to be used by the CPU exclusively, we can consider using vmalloc() as a fallback and this is exactly what the recently merged kvmalloc() helpers do. A kmalloc() call is still attempted, even for order > 0 allocations, but it is done with __GFP_NORETRY and __GFP_NOWARN, with expectation of failing if requested memory is not available instantly. Only then the vmalloc() fallback is used. This should give us fast and more reliable allocations even on systems with higher memory pressure and/or more fragmentation, while still retaining the same performance level on systems not suffering from such conditions. While at it, replace explicit array size calculations on changed allocations with kvmalloc_array(). Purposedly not touching videobuf1, as it is deprecated, has only few users remaining and would rather be seen removed instead. Signed-off-by: Tomasz Figa Acked-by: Marek Szyprowski Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 5 +++-- drivers/media/v4l2-core/v4l2-ctrls.c | 26 ++++++++++++++------------ drivers/media/v4l2-core/v4l2-event.c | 8 +++++--- drivers/media/v4l2-core/v4l2-ioctl.c | 7 ++++--- drivers/media/v4l2-core/v4l2-subdev.c | 8 +++++--- drivers/media/v4l2-core/videobuf2-dma-sg.c | 8 ++++---- 6 files changed, 35 insertions(+), 27 deletions(-) commit d295c6a460cd2ac63597691288ed044f5cfa8a6e Author: Niklas Söderlund Date: Thu Jun 15 06:17:26 2017 -0300 [media] media: entity: Add media_entity_get_fwnode_pad() function This is a wrapper around the media entity get_fwnode_pad operation. Signed-off-by: Niklas Söderlund Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 36 ++++++++++++++++++++++++++++++++++++ include/media/media-entity.h | 23 +++++++++++++++++++++++ 2 files changed, 59 insertions(+) commit ae45cd5efc1202448e4df97e342727f025f35444 Author: Niklas Söderlund Date: Thu Jun 15 06:17:25 2017 -0300 [media] media: entity: Add get_fwnode_pad entity operation The optional operation can be used by entities to report how it maps its fwnode endpoints to media pad numbers. This is useful for devices which require advanced mappings of pads. Signed-off-by: Niklas Söderlund Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 5 +++++ 1 file changed, 5 insertions(+) commit fbf1e94f0055d825f8d56b3abe322f37ba818d5a Author: Niklas Söderlund Date: Tue Jun 13 11:30:35 2017 -0300 [media] v4l: async: check for v4l2_dev in v4l2_async_notifier_register() Add a check for v4l2_dev to v4l2_async_notifier_register() as to fail as early as possible since this will fail later in v4l2_async_test_notify(). Signed-off-by: Niklas Söderlund Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 31165ad4c2c18e0e186dd66e920c2b69de5bd0af Author: Kieran Bingham Date: Mon Jun 12 07:30:16 2017 -0300 [media] media: fdp1: Support ES2 platforms The new Renesas R-Car H3 ES2.0 platforms have a new hw version register. Update the driver accordingly, defaulting to the new hw revision, and differentiating the older revision as ES1 Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar_fdp1.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit c21e8b594c92eda3b04a31556277a9d72ca441b7 Author: Gustavo A. R. Silva Date: Thu Jun 15 13:49:14 2017 -0300 [media] i2c: tc358743: remove useless variable assignment in tc358743_isr Remove useless variable assignment in function tc358743_isr(). The value stored in variable _intstatus_ at line 1299 is overwritten at line 1302, just before it can be used. Addresses-Coverity-ID: 1397678 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 1 - 1 file changed, 1 deletion(-) commit 5c1d604586b5384aecdc622b8f0a79c12dc752ad Author: Andrey Utkin Date: Sun Jun 11 18:38:39 2017 -0300 [media] MAINTAINERS: solo6x10: update Andrey Utkin email Updating my personal email address in solo6x10. Signed-off-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40662e72dc71b1a95512232e84f80c723524159a Author: Andrey Utkin Date: Sun Jun 11 18:38:38 2017 -0300 [media] MAINTAINERS: solo6x10, tw5864: add Anton Sviridenko Anton Sviridenko is now in charge of drivers in Bluecherry. Signed-off-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 479f7a1181058689435baddc16a6a42e1a8ff0e8 Author: Kevin Hilman Date: Fri Jun 9 13:10:26 2017 -0300 [media] davinci: vpif: adaptions for DT support The davinci VPIF is a single hardware block, but the existing driver is broken up into a common library (vpif.c), output (vpif_display.c) and intput (vpif_capture.c). When migrating to DT, to better model the hardware, and because registers, interrupts, etc. are all common,it was decided to have a single VPIF hardware node[1]. Because davinci uses legacy, non-DT boot on several SoCs still, the platform_drivers need to remain. But they are also needed in DT boot. Since there are no DT nodes for the display/capture parts in DT boot (there is a single node for the parent/common device) we need to create platform_devices somewhere to instantiate the platform_drivers. When VPIF display/capture are needed for a DT boot, the VPIF node will have endpoints defined for its subdevs. Therefore, vpif_probe() checks for the presence of endpoints, and if detected manually creates the platform_devices for the display and capture platform_drivers. [1] Documentation/devicetree/bindings/media/ti,da850-vpif.txt Signed-off-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif.c | 57 ++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) commit 72b7876c2e3b6087c72ce030d8145ec4a7328121 Author: Christophe JAILLET Date: Sun Apr 23 18:40:30 2017 -0300 [media] vb2: Fix error handling in '__vb2_buf_mem_alloc' 'call_ptr_memop' can return NULL, so we must test its return value with 'IS_ERR_OR_NULL'. Otherwise, the test 'if (mem_priv)' is meaningless. Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b8470fdf4ce059460ffc6dd54a350df9ac87ad3 Author: Lucas Stach Date: Wed Apr 5 10:09:55 2017 -0300 [media] coda/imx-vdoa: always wait for job completion As long as only one CODA context is running we get alternating device_run() and wait_for_completion() calls, but when more then one CODA context is active, other VDOA slots can be inserted between those calls for one context. Make sure to wait on job completion before running a different context and before destroying the currently active context. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/imx-vdoa.c | 49 +++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 16 deletions(-) commit fb2be08f8cb332ef142314cc58a0f9e68406588c Author: Lucas Stach Date: Wed Apr 5 10:09:54 2017 -0300 [media] coda: first step at error recovery This implements a simple handler for the case where decode did not finish sucessfully. This might be helpful during normal streaming, but for now it only handles the case where the context would deadlock with userspace, i.e. userspace issued DEC_CMD_STOP and waits for EOS, but after the failed decode run we would hold the context and wait for userspace to queue more buffers. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 20 ++++++++++++++++++++ drivers/media/platform/coda/coda-common.c | 3 +++ drivers/media/platform/coda/coda.h | 1 + 3 files changed, 24 insertions(+) commit f2011e40b67c10c7698a2e266672fa81b4b7ec47 Author: Lucas Stach Date: Wed Apr 5 10:09:53 2017 -0300 [media] coda: use correct offset for mvcol buffer The mvcol buffer needs to be placed behind the chroma plane(s), so use the real offset including any required rounding. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 50058a9a589154121a798dd16ef9199bf607bdc5 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:59 2017 -0300 [media] media: venus: update firmware path with linux-firmware place This makes firmware name and path part of venus_resources structure and initialize it properly depending on the SoC and firmware version. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/core.c | 6 ++++-- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/platform/qcom/venus/firmware.c | 9 ++++----- drivers/media/platform/qcom/venus/firmware.h | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) commit ebebc5939e15e12b4a226552574408772cda5ced Author: Stanimir Varbanov Date: Thu Jun 15 13:31:58 2017 -0300 [media] media: venus: vdec: add support for min buffers for capture This adds support for V4L2_CID_MIN_BUFFERS_FOR_CAPTURE get control in venus decoder, it is usable in case when the userspace wants to know minimum capture buffers before calling request_buf for capture queue in mem2mem drivers. Also this will fix an issue found gstreamer v4l2videodec element, i.e. the video decoder element cannot continue because the buffers are insufficient. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/vdec.c | 7 +++++++ drivers/media/platform/qcom/venus/vdec_ctrls.c | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit c3eb9e51c86bae9c482d28f9a73c06cf2ae6c73b Author: Stanimir Varbanov Date: Thu Jun 15 13:31:57 2017 -0300 [media] media: venus: venc: fix compile error in venc_close This fixes the following compile error ocured when building with gcc7: drivers/media/platform/qcom/venus/venc.c:1150 venc_close() error: dereferencing freed memory 'inst' by moving kfree as a last call. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/venc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17571ed6e238ef1353595a87b40414d12b0e0275 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:56 2017 -0300 [media] media: venus: vdec: fix compile error in vdec_close This fixes the following compile error ocured when building with gcc7: drivers/media/platform/qcom/venus/vdec.c:1022 vdec_close() error: dereferencing freed memory 'inst' by moving kfree as a last call. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/vdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 832d467115787472140fb254f24f17398aed8d39 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:55 2017 -0300 [media] media: venus: hfi_msgs: fix set but not used variables This fixes a warning found when building with gcc7: drivers/media/platform/qcom/venus/hfi_msgs.c:465:40: warning: variable 'domain' set but not used [-Wunused-but-set-variable] u32 rem_bytes, num_props, codecs = 0, domain = 0; ^~~~~~ drivers/media/platform/qcom/venus/hfi_msgs.c:465:28: warning: variable 'codecs' set but not used [-Wunused-but-set-variable] u32 rem_bytes, num_props, codecs = 0, domain = 0; The warning is avoided by deleting the variables declaration. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi_msgs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4cb3548a87c4a3650ab9c4587abfcf5fe6fa7542 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:54 2017 -0300 [media] media: venus: hfi_venus: fix variable dereferenced before check This fixes a warning found when building with gcc7: drivers/media/platform/qcom/venus/hfi_venus.c:998 venus_isr_thread() warn: variable dereferenced before check 'hdev' (see line 994) Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi_venus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4ba59616879217a7659a6cf343284aecb9a65ec2 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:53 2017 -0300 [media] media: venus: helpers: fix variable dereferenced before check This fixes a warning found when building the driver with gcc7: drivers/media/platform/qcom/venus/helpers.c:157 load_per_instance() warn: variable dereferenced before check 'inst' (see line 153) Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/helpers.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2b2e6488c0a8d4b9b2e20d117228925b80dbc24b Author: Stanimir Varbanov Date: Thu Jun 15 13:31:52 2017 -0300 [media] media: venus: hfi_cmds: fix variable dereferenced before check This fixes a warning found when building the driver with gcc7: drivers/media/platform/qcom/venus/hfi_cmds.c:415 pkt_session_set_property_1x() warn: variable dereferenced before check 'pkt' (see line 412) drivers/media/platform/qcom/venus/hfi_cmds.c:1177 pkt_session_set_property_3xx() warn: variable dereferenced before check 'pkt' (see line 1174) Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi_cmds.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8a5aebf12703c0b580076b10a8b307b6a40f7b21 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:51 2017 -0300 [media] media: venus: hfi: fix mutex unlock This fixed a warning when build driver with gcc7: drivers/media/platform/qcom/venus/hfi.c:171 hfi_core_ping() warn: inconsistent returns 'mutex:&core->lock'. Locked on: line 159 Unlocked on: line 171 Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 703528005e5861ed81f694368cfe80e6829d570f Author: Stanimir Varbanov Date: Thu Jun 15 13:31:50 2017 -0300 [media] media: venus: enable building of Venus video driver This adds Venus driver Makefile and changes v4l2 platform Makefile/Kconfig in order to enable building of the driver. Note that in this initial version the COMPILE_TEST-ing is not supported because the drivers specific to ARM builds are still in process of enabling the aforementioned compile testing. Once that disadvantage is fixed the Venus driver compile testing will be possible with follow-up changes. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 13 +++++++++++++ drivers/media/platform/Makefile | 2 ++ drivers/media/platform/qcom/venus/Makefile | 11 +++++++++++ 3 files changed, 26 insertions(+) commit d96d3f30c0f2f564f6922bf4ccdf4464992e31fb Author: Stanimir Varbanov Date: Thu Jun 15 13:31:49 2017 -0300 [media] media: venus: hfi: add Venus HFI files Here is the implementation of Venus video accelerator low-level functionality. It contanins code which setup the registers and startup uthe processor, allocate and manipulates with the shared memory used for sending commands and receiving messages. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi_venus.c | 1571 ++++++++++++++++++++++ drivers/media/platform/qcom/venus/hfi_venus.h | 23 + drivers/media/platform/qcom/venus/hfi_venus_io.h | 113 ++ 3 files changed, 1707 insertions(+) commit 09c2845e8fe4fcab942929480203f504a6e0a114 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:48 2017 -0300 [media] media: venus: hfi: add Host Firmware Interface (HFI) This is the implementation of HFI. It is charged with the responsibility to comunicate with the firmware through an interface commands and messages. - hfi.c has interface functions used by the core, decoder and encoder parts to comunicate with the firmware. For example there are functions for session and core initialisation. - hfi_cmds has packetization operations which preparing packets to be send from host to firmware. - hfi_msgs takes care of messages sent from firmware to the host. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi.c | 522 ++++++++++ drivers/media/platform/qcom/venus/hfi.h | 175 ++++ drivers/media/platform/qcom/venus/hfi_cmds.c | 1255 ++++++++++++++++++++++++ drivers/media/platform/qcom/venus/hfi_cmds.h | 304 ++++++ drivers/media/platform/qcom/venus/hfi_helper.h | 1050 ++++++++++++++++++++ drivers/media/platform/qcom/venus/hfi_msgs.c | 1054 ++++++++++++++++++++ drivers/media/platform/qcom/venus/hfi_msgs.h | 283 ++++++ 7 files changed, 4643 insertions(+) commit aaaa93eda64b004c20d55049c3b7b61c4d647559 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:47 2017 -0300 [media] media: venus: venc: add video encoder files This adds encoder part of the driver plus encoder controls. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/venc.c | 1283 ++++++++++++++++++++++++ drivers/media/platform/qcom/venus/venc.h | 23 + drivers/media/platform/qcom/venus/venc_ctrls.c | 270 +++++ 3 files changed, 1576 insertions(+) commit 7472c1c69138183fdf90b9850a0f7aad3b66365f Author: Stanimir Varbanov Date: Thu Jun 15 13:31:46 2017 -0300 [media] media: venus: vdec: add video decoder files This consists of video decoder implementation plus decoder controls. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/vdec.c | 1154 ++++++++++++++++++++++++ drivers/media/platform/qcom/venus/vdec.h | 23 + drivers/media/platform/qcom/venus/vdec_ctrls.c | 150 +++ 3 files changed, 1327 insertions(+) commit af2c3834c8ca7cc65d15592ac671933df8848115 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:45 2017 -0300 [media] media: venus: adding core part and helper functions * core.c has implemented the platform driver methods, file operations and v4l2 registration. * helpers.c has implemented common helper functions for: - buffer management - vb2_ops and functions for format propagation, - functions for allocating and freeing buffers for internal usage. The buffer parameters describing internal buffers depends on current format, resolution and codec. - functions for calculation of current load of the hardware. Depending on the count of instances and resolutions it selects the best clock rate for the video core. * firmware loader Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/core.c | 388 ++++++++++++++ drivers/media/platform/qcom/venus/core.h | 323 ++++++++++++ drivers/media/platform/qcom/venus/firmware.c | 109 ++++ drivers/media/platform/qcom/venus/firmware.h | 22 + drivers/media/platform/qcom/venus/helpers.c | 727 +++++++++++++++++++++++++++ drivers/media/platform/qcom/venus/helpers.h | 45 ++ 6 files changed, 1614 insertions(+) commit 097748eb6478607ba73089c9e7b3775bbb01466c Author: Stanimir Varbanov Date: Thu Jun 15 13:31:44 2017 -0300 [media] MAINTAINERS: Add Qualcomm Venus video accelerator driver Add an entry for Venus video encoder/decoder accelerator driver. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2f7c8e0e3625dacc2cdad56b721192d141d0e29b Author: Stanimir Varbanov Date: Thu Jun 15 13:31:43 2017 -0300 [media] doc: DT: venus: binding document for Qualcomm video driver Add binding document for Venus video encoder/decoder driver Cc: Rob Herring Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/qcom,venus.txt | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) commit d498756451a93e233eb980e03905f5f8950ad159 Author: Stanimir Varbanov Date: Thu Jun 15 13:31:42 2017 -0300 [media] media: v4l2-mem2mem: extend m2m APIs for more accurate buffer management this add functions for: - remove buffers from src/dst queue by index - remove exact buffer from src/dst queue also extends m2m API to iterate over a list of src/dst buffers in safely and non-safely manner. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-mem2mem.c | 37 ++++++++++++++ include/media/v4l2-mem2mem.h | 92 ++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) commit ff6ccad361df4dfda42b60897cb7e55b3ba13439 Merge: 3bd30b2 41f1830 Author: Mauro Carvalho Chehab Date: Tue Jun 20 08:51:56 2017 -0300 Merge tag 'v4.12-rc6' into patchwork Linux 4.12-rc6 * tag 'v4.12-rc6': (813 commits) Linux 4.12-rc6 mm: larger stack guard gap, between vmas virtio_balloon: disable VIOMMU support mm: correct the comment when reclaimed pages exceed the scanned pages userfaultfd: shmem: handle coredumping in handle_userfault() mm: numa: avoid waiting on freed migrated pages swap: cond_resched in swap_cgroup_prepare() mm/memory-failure.c: use compound_head() flags for huge pages perf unwind: Report module before querying isactivation in dwfl unwind fs: pass on flags in compat_writev objtool: Add fortify_panic as __noreturn function powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks drm: mxsfb_crtc: Reset the eLCDIF controller drm/mgag200: Fix to always set HiPri for G200e4 V2 i2c: ismt: fix wrong device address when unmap the data buffer i2c: rcar: use correct length when unmapping DMA powerpc/xive: Fix offset for store EOI MMIOs drm/tegra: Correct idr_alloc() minimum id drm/tegra: Fix lockup on a use of staging API ... Signed-off-by: Mauro Carvalho Chehab commit 3bd30b24efa6b3339e4344a7db39e594f06d5128 Author: Mauro Carvalho Chehab Date: Tue Jun 20 08:19:56 2017 -0300 [media] ov13858: remove duplicated const declaration As reported by gcc: drivers/media/i2c/ov13858.c:953:20: warning: duplicate const drivers/media/i2c/ov13858.c:953:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] static const const s64 link_freq_menu_items[OV13858_NUM_OF_LINK_FREQS] = { ^~~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb4322f74340de578bc61ed0cfb9690ddeb9ef76 Author: Dave Martin Date: Thu Jun 15 15:03:41 2017 +0100 arm64: signal: factor out signal frame record allocation This patch factors out the allocator for signal frame optional records into a separate function, to ensure consistency and facilitate later expansion. No overrun checking is currently done, because the allocation is in user memory and anyway the kernel never tries to allocate enough space in the signal frame yet for an overrun to occur. This behaviour will be refined in future patches. The approach taken in this patch to allocation of the terminator record is not very clean: this will also be replaced in subsequent patches. For future extension, a comment is added in sigcontext.h documenting the current static allocations in __reserved[]. This will be important for determining under what circumstances userspace may or may not see an expanded signal frame. Reviewed-by: Catalin Marinas Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/include/uapi/asm/sigcontext.h | 19 ++++++++++++++ arch/arm64/kernel/signal.c | 43 ++++++++++++++++++++++++++------ 2 files changed, 55 insertions(+), 7 deletions(-) commit bb4891a6c3551f27fa4d548b87a66c258bdb100b Author: Dave Martin Date: Thu Jun 15 15:03:40 2017 +0100 arm64: signal: factor frame layout and population into separate passes In preparation for expanding the signal frame, this patch refactors the signal frame setup code in setup_sigframe() into two separate passes. The first pass, setup_sigframe_layout(), determines the size of the signal frame and its internal layout, including the presence and location of optional records. The resulting knowledge is used to allocate and locate the user stack space required for the signal frame and to determine which optional records to include. The second pass, setup_sigframe(), is called once the stack frame is allocated in order to populate it with the necessary context information. As a result of these changes, it becomes more natural to represent locations in the signal frame by a base pointer and an offset, since the absolute address of each location is not known during the layout pass. To be more consistent with this logic, parse_user_sigframe() is refactored to describe signal frame locations in a similar way. This change has no effect on the signal ABI, but will make it easier to expand the signal frame in future patches. Reviewed-by: Catalin Marinas Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 111 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 88 insertions(+), 23 deletions(-) commit 47ccb02868cead34578d953b5fe0cdd58394605e Author: Dave Martin Date: Thu Jun 15 15:03:39 2017 +0100 arm64: signal: Refactor sigcontext parsing in rt_sigreturn Currently, rt_sigreturn does very limited checking on the sigcontext coming from userspace. Future additions to the sigcontext data will increase the potential for surprises. Also, it is not clear whether the sigcontext extension records are supposed to occur in a particular order. To allow the parsing code to be extended more easily, this patch factors out the sigcontext parsing into a separate function, and adds extra checks to validate the well-formedness of the sigcontext structure. Reviewed-by: Catalin Marinas Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 86 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 6 deletions(-) commit 20987de3c2c45c314e0386f724aa85f55d984ef2 Author: Dave Martin Date: Thu Jun 15 15:03:38 2017 +0100 arm64: signal: split frame link record from sigcontext structure In order to be able to increase the amount of the data currently written to the __reserved[] array in the signal frame, it is necessary to overwrite the locations currently occupied by the {fp,lr} frame link record pushed at the top of the signal stack. In order for this to work, this patch detaches the frame link record from struct rt_sigframe and places it separately at the top of the signal stack. This will allow subsequent patches to insert data between it and __reserved[]. This change relies on the non-ABI status of the placement of the frame record with respect to struct sigframe: this status is undocumented, but the placement is not declared or described in the user headers, and known unwinder implementations (libgcc, libunwind, gdb) appear not to rely on it. Reviewed-by: Catalin Marinas Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 50 +++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 18 deletions(-) commit 8f36094802e4e6de180b36bcac4cfd9d319e1b64 Author: Ard Biesheuvel Date: Wed Jun 14 12:43:55 2017 +0200 arm64: mm: select CONFIG_ARCH_PROC_KCORE_TEXT To avoid issues with the /proc/kcore code getting confused about the kernels block mappings in the VMALLOC region, enable the existing facility that describes the [_text, _end) interval as a separate KCORE_TEXT region, which supersedes the KCORE_VMALLOC region that it intersects with on arm64. Reported-by: Tan Xiaojun Tested-by: Tan Xiaojun Tested-by: Mark Rutland Acked-by: Mark Rutland Reviewed-by: Laura Abbott Reviewed-by: Jiri Olsa Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 737326aa510b5f7d2f38ded739914a9d5e4e4cea Author: Ard Biesheuvel Date: Wed Jun 14 12:43:54 2017 +0200 fs/proc: kcore: use kcore_list type to check for vmalloc/module address Instead of passing each start address into is_vmalloc_or_module_addr() to decide whether it falls into either the VMALLOC or the MODULES region, we can simply check the type field of the current kcore_list entry, since it will be set to KCORE_VMALLOC based on exactly the same conditions. As a bonus, when reading the KCORE_TEXT region on architectures that have one, this will avoid using vread() on the region if it happens to intersect with a KCORE_VMALLOC region. This is due the fact that the KCORE_TEXT region is the first one to be added to the kcore region list. Reported-by: Tan Xiaojun Tested-by: Tan Xiaojun Tested-by: Mark Rutland Acked-by: Mark Rutland Reviewed-by: Laura Abbott Reviewed-by: Jiri Olsa Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon fs/proc/kcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06c35ef1fdf8d955684448683f7e48ac5f15ccfd Author: Ard Biesheuvel Date: Tue Jun 20 08:59:00 2017 +0200 drivers/char: kmem: disable on arm64 As it turns out, arm64 deviates from other architectures in the way it maps the VMALLOC region: on most (all?) other architectures, it resides strictly above the kernel's direct mapping of DRAM, but on arm64, this is the other way around. For instance, for a 48-bit VA configuration, we have modules : 0xffff000000000000 - 0xffff000008000000 ( 128 MB) vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000 (129022 GB) ... vmemmap : 0xffff7e0000000000 - 0xffff800000000000 ( 2048 GB maximum) 0xffff7e0000000000 - 0xffff7e0003ff0000 ( 63 MB actual) memory : 0xffff800000000000 - 0xffff8000ffc00000 ( 4092 MB) This has mostly gone unnoticed until now, but it does appear that it breaks an assumption in the kmem read/write code, which does something like if (p < (unsigned long) high_memory) { ... use straight copy_[to|from]_user() using p as virtual address ... } ... if (count > 0) { ... use vread/vwrite for accesses past high_memory ... } The first condition will inadvertently hold for the VMALLOC region if VMALLOC_START < PAGE_OFFSET [which is the case on arm64], but the read or write will subsequently fail the virt_addr_valid() check, resulting in a -ENXIO return value. Given how kmem seems to be living in borrowed time anyway, and given the fact that nobody noticed that the read/write interface is broken on arm64 in the first place, let's not bother trying to fix it, but simply disable the /dev/kmem interface entirely for arm64. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon drivers/char/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 4ac299414bfc0c796c22810854f738c280bdeaa0 Author: Andy Shevchenko Date: Sun Jun 4 15:29:18 2017 -0300 [media] as3645a: Join string literals back There is no need to split long string literals. Join them back. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/as3645a.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cc95d3423c6786d61e3c52898ed69955077f41a6 Author: Rajmohan Mani Date: Sat Jun 3 05:11:40 2017 -0300 [media] dw9714: Initial driver for dw9714 VCM DW9714 is a 10 bit DAC, designed for linear control of voice coil motor. This driver creates a V4L2 subdevice and provides control to set the desired focus. [Sakari Ailus: Add MAINTAINERS entry.] Signed-off-by: Rajmohan Mani Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 ++ drivers/media/i2c/Kconfig | 10 ++ drivers/media/i2c/Makefile | 1 + drivers/media/i2c/dw9714.c | 291 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 309 insertions(+) commit 5fcf092e0c9fb4895096c8809cf1fb9ba1349653 Author: Hyungwoo Yang Date: Tue Jun 13 19:06:16 2017 -0300 [media] ov13858: add support for OV13858 sensor This patch adds driver for Omnivision's ov13858 sensor, the driver supports following features: - manual exposure/gain(analog and digital) control support - two link frequencies - VBLANK/HBLANK support - test pattern support - media controller support - runtime pm support - supported resolutions + 4224x3136 at 30FPS + 2112x1568 at 30FPS(default) and 60FPS + 2112x1188 at 30FPS(default) and 60FPS + 1056x784 at 30FPS(default) and 60FPS [Sakari Ailus: use V4L2_CID_DIGITAL_GAIN instead, add MAINTAINERS entry.] Signed-off-by: Hyungwoo Yang Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 8 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov13858.c | 1816 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1832 insertions(+) commit 371f94490ea97e1bf766ba0d33ffb62f5f5a4ed1 Author: Sakari Ailus Date: Fri Jun 9 10:15:50 2017 -0300 [media] v4l: controls: Improve documentation for V4L2_CID_GAIN Elaborate the differences between V4L2_CID_GAIN and gain-type specific V4L2_CID_DIGITAL_GAIN and V4L2_CID_ANALOGUE_GAIN. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/control.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit e72cb0e79475b0d26625e802846e281a84304c07 Author: Sakari Ailus Date: Thu Jun 8 16:59:58 2017 -0300 [media] v4l: ctrls: Add a control for digital gain Add V4L2_CID_DIGITAL_GAIN to control explicitly digital gain. We already have analogue gain control which the digital gain control complements. Typically higher quality images are obtained using analogue gain only as the digital gain does not add information to the image (rather it may remove it). Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 7 +++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 1 + include/uapi/linux/v4l2-controls.h | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) commit 8e792f5287a99ba314c1ddb2b12a09f9c045b753 Author: Steve Longerbeam Date: Mon Jun 12 13:36:51 2017 -0300 [media] MAINTAINERS: add entry for Freescale i.MX media driver Add maintainer entry for the imx-media driver. Signed-off-by: Steve Longerbeam Acked-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit de2e04569d341988465dbd4651193942e8c6db6b Author: Marek Vasut Date: Wed Jun 7 15:34:12 2017 -0300 [media] media: imx: Drop warning upon multiple S_STREAM disable calls Calling S_STREAM OFF multiple times on a video device is valid, although dubious, practice. Instead of warning about it and setting stream count lower than zero, just ignore the subsequent S_STREAM calls and correct the stream count to zero. Signed-off-by: Marek Vasut Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prp.c | 3 ++- drivers/staging/media/imx/imx-ic-prpencvf.c | 3 ++- drivers/staging/media/imx/imx-media-csi.c | 3 ++- drivers/staging/media/imx/imx-media-vdic.c | 3 ++- drivers/staging/media/imx/imx6-mipi-csi2.c | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) commit 5a9b73832e9e10df3ffea332373c2d5486764e5f Author: Mauro Carvalho Chehab Date: Sat Jun 17 12:03:01 2017 -0300 pinctrl.txt: move it to the driver-api book As pinctrl describes a feature from drivers/base, place it at the right book. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Linus Walleij Documentation/driver-api/index.rst | 1 + Documentation/driver-api/pinctl.rst | 1439 +++++++++++++++++++++++++++++++++++ Documentation/pinctrl.txt | 1439 ----------------------------------- 3 files changed, 1440 insertions(+), 1439 deletions(-) commit 21e54111d2558fa774aec998bba25c6fa5b61791 Author: Steve Longerbeam Date: Wed Jun 7 15:34:11 2017 -0300 [media] media: imx: set and propagate default field, colorimetry This patch adds a call to imx_media_fill_default_mbus_fields() in the *_try_fmt() functions at the sink pads, to set empty field order and colorimetry parameters. If the field order is set to ANY, choose the currently set field order at the sink pad. If the colorspace is set to DEFAULT, choose the current colorspace at the sink pad. If any of xfer_func, ycbcr_enc or quantization are set to DEFAULT, either choose the current sink pad setting, or the default setting for the new colorspace, if non-DEFAULT colorspace was given. If a format is destined to be routed through the Image Converter, fixed quantization and Y`CbCr encoding must be set. Colorimetry is also propagated from sink to source pads anywhere this has not already been done. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prp.c | 10 +++-- drivers/staging/media/imx/imx-ic-prpencvf.c | 17 ++++++-- drivers/staging/media/imx/imx-media-csi.c | 14 ++++++- drivers/staging/media/imx/imx-media-utils.c | 62 +++++++++++++++++++++++++++++ drivers/staging/media/imx/imx-media-vdic.c | 8 +++- drivers/staging/media/imx/imx-media.h | 4 +- 6 files changed, 103 insertions(+), 12 deletions(-) commit c24858c3070d7bff7f8d02c05595d4978e7198b6 Author: Russell King Date: Wed Jun 7 15:34:10 2017 -0300 [media] media: imx: capture: add frame sizes/interval enumeration Add support for enumerating frame sizes and frame intervals from the first subdev via the V4L2 interfaces. Signed-off-by: Russell King Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-capture.c | 73 +++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 949ffdbfdb505708f4c308f79312d9d3ea6c3c28 Author: Russell King Date: Wed Jun 7 15:34:09 2017 -0300 [media] media: imx: csi: add frame size/interval enumeration Add frame size and frame interval enumeration to CSI. CSI can downscale the image independently horizontally and vertically by a factor of two, which enumerates to four different frame sizes at the output pads. The input pad supports a range of frame sizes. CSI can also drop frames, resulting in frame rate reduction, so enumerate the resulting possible output frame rates. Signed-off-by: Russell King Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 70 +++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 26179670a68b7b365fbfe38afb043dcd2e1a4678 Author: Kirill A. Shutemov Date: Fri Jun 16 14:30:24 2017 +0300 x86/boot/64: Put __startup_64() into .head.text Put __startup_64() and fixup_pointer() into .head.text section to make sure it's always near startup_64() and always callable. Signed-off-by: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel test robot Cc: wfg@linux.intel.com Link: http://lkml.kernel.org/r/20170616113024.ajmif63cmcszry5a@black.fi.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/head64.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bd20733045d5db55515442d828376a3a71d6be48 Author: Borislav Petkov Date: Wed Jun 14 16:06:26 2017 +0200 x86/microcode/intel: Save pointer to ucode patch for early AP loading Normally, when the initrd is gone, we can't search it for microcode blobs to apply anymore. For that we need to stash away the patch in our own storage. And save_microcode_in_initrd_intel() looks like the proper place to do that from. So in order for early loading to work, invalidate the intel_ucode_patch pointer to the patch *before* scanning the initrd one last time. If the scanning code finds a microcode patch, it will assign that pointer again, this time with our own storage's address. This way, early microcode application during resume-from-RAM works too, even after the initrd is long gone. Tested-by: Dominik Brodowski Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170614140626.4462-2-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/microcode/intel.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit a3d98c9358e3be28282ff60dcca01dbc9f402f30 Author: Borislav Petkov Date: Wed Jun 14 16:06:25 2017 +0200 x86/microcode: Look for the initrd at the correct address on 32-bit Early during boot, the BSP finds the ramdisk's position from boot_params but by the time the APs get to boot, the BSP has continued in the mean time and has potentially managed to relocate that ramdisk. And in that case, the APs need to find the ramdisk at its new position, in *physical* memory as they're running before paging has been enabled. Thus, get the updated physical location of the ramdisk which is in the relocated_ramdisk variable. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170614140626.4462-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/microcode/core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 69e78611ffc84be13cf96781e10521103dfe50dd Author: Philipp Zabel Date: Wed Jun 7 15:34:08 2017 -0300 [media] media: imx: csi: add sink selection rectangles Move the crop rectangle to the sink pad and add a sink compose rectangle to configure scaling. Also propagate rectangles from sink pad to crop rectangle, to compose rectangle, and to the source pads both in ACTIVE and TRY variants of set_fmt/selection, and initialize the default crop and compose rectangles. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 153 +++++++++++++++++++++++------- 1 file changed, 117 insertions(+), 36 deletions(-) commit c133c7615751008f6c32ccae7cdfc5ff6e989c35 Author: Dan Carpenter Date: Mon Jun 19 13:53:04 2017 +0300 x86/nmi: Fix timeout test in test_nmi_ipi() We're supposed to exit the loop with "timeout" set to zero. Signed-off-by: Dan Carpenter Acked-by: Don Zickus Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Fixes: 99e8b9ca90d6 ("x86, NMI: Add NMI IPI selftest") Link: http://lkml.kernel.org/r/20170619105304.GA23995@elgon.mountain Signed-off-by: Ingo Molnar arch/x86/kernel/nmi_selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f11cc0760b8397e0d230122606421b6a96e9f869 Author: Davidlohr Bueso Date: Wed Jun 14 19:37:30 2017 -0700 sched/core: Drop the unused try_get_task_struct() helper function This function was introduced by: 150593bf8693 ("sched/api: Introduce task_rcu_dereference() and try_get_task_struct()") ... to allow easier usage of task_rcu_dereference(), however no users were ever added. Drop the helper. Signed-off-by: Davidlohr Bueso Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Link: http://lkml.kernel.org/r/20170615023730.22827-1-dave@stgolabs.net Signed-off-by: Ingo Molnar include/linux/sched/task.h | 2 -- kernel/exit.c | 13 ------------- 2 files changed, 15 deletions(-) commit fb30ee795576a349e86577d06e1bb4a5ce19ba52 Author: Philipp Zabel Date: Wed Jun 7 15:34:07 2017 -0300 [media] media: imx: csi: add frame skipping support The CSI can skip any out of up to 6 input frames, allowing to reduce the frame rate at the output pads by small fractions. Signed-off-by: Philipp Zabel Signed-off-by: Steve Longerbeam Signed-off-by: Russell King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 167 ++++++++++++++++++++++++++---- 1 file changed, 146 insertions(+), 21 deletions(-) commit 6f303592392967a27bb2b0d7e744f4348f0d4647 Author: Philipp Zabel Date: Wed Jun 7 15:34:06 2017 -0300 [media] media: imx: csi: increase burst size for YUV formats The IDMAC supports burst sizes of up to 32 pixels for interleaved YUV formats and up to 64 pixels for planar YUV formats. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c8da8c03d2e45aa4f0d1b48e3ab8990ef3349179 Author: Russell King Date: Wed Jun 7 15:34:05 2017 -0300 [media] media: imx: csi: add support for bayer formats Bayer formats must be treated as generic data and passthrough mode must be used. Add the correct setup for these formats. - added check to csi_link_validate() to verify that destination is IDMAC output pad when passthrough conditions exist: bayer formats and 16-bit parallel buses. Signed-off-by: Russell King Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 74 ++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 17 deletions(-) commit f5138526e4270617ec9d96d5fd2f095bae420b08 Author: Steve Longerbeam Date: Wed Jun 7 15:34:04 2017 -0300 [media] media: imx: Add MIPI CSI-2 Receiver subdev driver Adds MIPI CSI-2 Receiver subdev driver. This subdev is required for sensors with a MIPI CSI2 interface. - Switch from the v4l2_of_ APIs to the v4l2_fwnode_ APIs. - Add the function csi2ipu_gasket_init() to initialize the gasket at s_power(ON). The gasket needs to be programmed with the correct color component ordering to handle UYVY vs. YUYV ordered mbus formats from sensors. Note that the description of the CSI2IPU_GASKET register in the i.MX6 reference manual is wrong w.r.t bit 2 (the manual refers to this register as CSI2_SW_RST): setting bit 2 selects YUYV order, not UYVY. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel Suggested-by: Marek Vasut Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Makefile | 1 + drivers/staging/media/imx/imx6-mipi-csi2.c | 697 +++++++++++++++++++++++++++++ 2 files changed, 698 insertions(+) commit f0d9c8924e2c33764dca0c3a4f693a345ecf6579 Author: Steve Longerbeam Date: Wed Jun 7 15:34:03 2017 -0300 [media] media: imx: Add IC subdev drivers This is a set of three media entity subdevice drivers for the i.MX Image Converter: - Pre-process Router: Takes input frames from CSI0, CSI1, or VDIC. Two output pads enable either or both of the preprocess tasks below. If the input is from one of the CSIs, both proprocess task links can be enabled to process frames from that CSI simultaneously. If the input is the VDIC, only the Pre-processing Viewfinder task link can be enabled. - Pre-processing Encode task: video frames are routed directly from the CSI and can be scaled, color-space converted, and rotated. Scaled output is limited to 1024x1024 resolution. Output frames are routed to the prpenc capture device. - Pre-processing Viewfinder task: this task can perform the same conversions as the pre-process encode task, but in addition can be used for hardware motion compensated deinterlacing. Frames can come either directly from the CSI or from the VDIC. Scaled output is limited to 1024x1024 resolution. Output frames are routed to the prpvf capture device. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Makefile | 2 + drivers/staging/media/imx/imx-ic-common.c | 113 +++ drivers/staging/media/imx/imx-ic-prp.c | 513 +++++++++++ drivers/staging/media/imx/imx-ic-prpencvf.c | 1299 +++++++++++++++++++++++++++ drivers/staging/media/imx/imx-ic.h | 38 + 5 files changed, 1965 insertions(+) commit 93dae31149bff7213baa38ffdf98cdff8ddbf130 Author: Steve Longerbeam Date: Wed Jun 7 15:34:02 2017 -0300 [media] media: imx: Add VDIC subdev driver This is a media entity subdevice driver for the i.MX Video De-Interlacing or Combining Block. So far this entity does not implement the Combining function but only motion compensated deinterlacing. Video frames are received from the CSI and are routed to the IC PRPVF entity. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Makefile | 1 + drivers/staging/media/imx/imx-media-vdic.c | 1004 ++++++++++++++++++++++++++++ 2 files changed, 1005 insertions(+) commit 4a34ec8e470cb126b85f737d73a879726c66259e Author: Steve Longerbeam Date: Wed Jun 7 15:34:01 2017 -0300 [media] media: imx: Add CSI subdev driver This is a media entity subdevice for the i.MX Camera Sensor Interface module. - Added support for negotiation of frame intervals. - Fixed cropping rectangle negotiation at input and output pads. - Added support for /2 downscaling, if the output pad dimension(s) are 1/2 the crop dimension(s) at csi_setup() time. Signed-off-by: Steve Longerbeam Signed-off-by: Russell King Signed-off-by: Philipp Zabel [hans.verkuil@cisco.com: add linux/pinctrl/consumer.h include] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Kconfig | 14 + drivers/staging/media/imx/Makefile | 2 + drivers/staging/media/imx/imx-media-csi.c | 1473 +++++++++++++++++++++++++++++ 3 files changed, 1489 insertions(+) commit e707eb762cf38b63402c1a124192f648a0629168 Merge: 938e7cf c477990 Author: Thomas Gleixner Date: Tue Jun 20 12:35:36 2017 +0200 Merge branch 'clockevents/4.13' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent changes from Daniel Lezcano: - Factored out moxart, aspeed, cortina drivers into a generic timer fttrm010. Take the opportunity to add the delay timer (Linus Walleij) - Saved / restored tcb atmel context at suspend/resume (Alexandre Belloni) - Added ast2500 compatible string and fixed aspeed2500 initialization (Daniel Lezcano) - Added clock names property for aspeed (Andrew Jeffery) - Renamed clocksource_of to timer_of (Daniel Lezcano) - Added a common timer init routine (Daniel Lezcano) commit 64b5a49df486bd457f0be6d7a09f65c006d36f24 Author: Steve Longerbeam Date: Wed Jun 7 15:34:00 2017 -0300 [media] media: imx: Add Capture Device Interface This is the capture device interface driver that provides the v4l2 user interface. Frames can be received from various sources: - directly from CSI for capturing unconverted images directly from camera sensors. - from the IC pre-process encode task. - from the IC pre-process viewfinder task. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Makefile | 1 + drivers/staging/media/imx/imx-media-capture.c | 702 ++++++++++++++++++++++++++ 2 files changed, 703 insertions(+) commit 543933ee346e99130b64576e5dd9d3ccf19dbda1 Author: Steve Longerbeam Date: Wed Jun 7 15:33:59 2017 -0300 [media] media: imx: Add a TODO file Add a TODO file. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/TODO | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit e130291212df5ce8160cd2e35387c96439863ad3 Author: Steve Longerbeam Date: Sat Jun 10 16:00:29 2017 -0300 [media] media: Add i.MX media core driver Add the core media driver for i.MX SOC. Switch from the v4l2_of_ APIs to the v4l2_fwnode_ APIs. Add the bayer formats to imx-media's list of supported pixel and bus formats. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel Signed-off-by: Russell King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/imx.rst | 614 ++++++++++++++++ drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile | 1 + drivers/staging/media/imx/Kconfig | 7 + drivers/staging/media/imx/Makefile | 5 + drivers/staging/media/imx/imx-media-dev.c | 667 +++++++++++++++++ drivers/staging/media/imx/imx-media-fim.c | 494 +++++++++++++ drivers/staging/media/imx/imx-media-internal-sd.c | 349 +++++++++ drivers/staging/media/imx/imx-media-of.c | 270 +++++++ drivers/staging/media/imx/imx-media-utils.c | 834 ++++++++++++++++++++++ drivers/staging/media/imx/imx-media.h | 323 +++++++++ include/media/imx.h | 15 + include/uapi/linux/v4l2-controls.h | 4 + 13 files changed, 3585 insertions(+) commit 902b31941327a0e9c0ca9eb7750414ae41bf8a89 Merge: c5ae366 2055da9 Author: Ingo Molnar Date: Tue Jun 20 12:28:21 2017 +0200 Merge branch 'WIP.sched/core' into sched/core Conflicts: kernel/sched/Makefile Pick up the waitqueue related renames - it didn't get much feedback, so it appears to be uncontroversial. Famous last words? ;-) Signed-off-by: Ingo Molnar commit c5ae366e12b2bd56fc7d7e9d484836bec9ddc110 Author: Daniel Axtens Date: Thu May 11 06:11:39 2017 +1000 sched/fair: WARN() and refuse to set buddy when !se->on_rq If we set a next or last buddy for a se that is not on_rq, we will end up taking a NULL pointer dereference in wakeup_preempt_entity via pick_next_task_fair. Detect when we would be about to do that, throw a warning and then refuse to actually set it. This has been suggested at least twice: https://marc.info/?l=linux-kernel&m=146651668921468&w=2 https://lkml.org/lkml/2016/6/16/663 I recently had to debug a problem with these (we hadn't backported Konstantin's patches in this area) and this would have saved a lot of time/pain. Just do it. Signed-off-by: Daniel Axtens Cc: Ben Segall Cc: Konstantin Khlebnikov Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170510201139.16236-1-dja@axtens.net Signed-off-by: Ingo Molnar kernel/sched/fair.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6d3aed3d8a0573d0a6eb1160ccd0a0713f4dbc2f Author: Ingo Molnar Date: Tue Jun 20 12:24:42 2017 +0200 sched/debug: Fix SCHED_WARN_ON() to return a value on !CONFIG_SCHED_DEBUG as well This definition of SCHED_WARN_ON(): #define SCHED_WARN_ON(x) ((void)(x)) is not fully compatible with the 'real' WARN_ON_ONCE() primitive, as it has no return value, so it cannot be used in conditionals. Fix it. Cc: Daniel Axtens Cc: Konstantin Khlebnikov Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Thomas Gleixner Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b3b22507e0d45dedc6a54b26d56e0b8c4d36875 Author: Tony Lindgren Date: Fri Jun 16 01:22:38 2017 -0700 ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init Recent change to use cpuhp_setup_state_cpuslocked() with commit fe2a5cd8aa03 ("ARM/hw_breakpoint: Use cpuhp_setup_state_cpuslocked()") missed to change the related paired cpuhp_remove_state_nocalls_cpuslocked(). Now if arch_hw_breakpoint_init() fails, we get "WARNING: possible recursive locking detected" on the exit path. Fixes: fe2a5cd8aa03 ("ARM/hw_breakpoint: Use cpuhp_setup_state_cpuslocked()") Signed-off-by: Tony Lindgren Acked-by: Sebastian Andrzej Siewior Cc: Mark Rutland Cc: linux-omap@vger.kernel.org Cc: Peter Zijlstra Cc: Will Deacon Cc: Steven Rostedt Cc: Russell King Cc: "Paul E . McKenney" Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170616082238.15553-1-tony@atomide.com Signed-off-by: Thomas Gleixner arch/arm/kernel/hw_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2bce3794a2122425abce5b0359d075b790930bc Author: Steve Longerbeam Date: Wed Jun 7 15:33:57 2017 -0300 [media] media: Add userspace header file for i.MX This adds a header file for use by userspace programs wanting to interact with the i.MX media driver. It defines custom events and v4l2 controls for the i.MX v4l2 subdevices. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/linux/imx-media.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit bb9e07713581df054e2f64be70a1ed19f3f44e9e Author: Steve Longerbeam Date: Sat Jun 10 15:56:24 2017 -0300 [media] dt-bindings: Add bindings for i.MX media driver Add bindings documentation for the i.MX media driver. Signed-off-by: Steve Longerbeam Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/imx.txt | 53 +++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 2d77a2a6a6570eb5afc26bb3ec53537dc06c4596 Author: Steve Longerbeam Date: Sun Jun 11 14:46:11 2017 -0300 [media] MAINTAINERS: add entry for OV5640 sensor driver Add maintainer entry for the OV5640 V4L2 sensor driver. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 19a81c1426c185cf9e902e1a33a9eacc6c6040cc Author: Steve Longerbeam Date: Wed Jun 7 15:33:56 2017 -0300 [media] add Omnivision OV5640 sensor driver This driver is based on ov5640_mipi.c from Freescale imx_3.10.17_1.0.0_beta branch, modified heavily to bring forward to latest interfaces and code cleanup. Signed-off-by: Steve Longerbeam Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 10 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov5640.c | 2344 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2355 insertions(+) commit 803ff8a7a6c9f89945edc07c5e969c2e11e2209b Author: Borislav Petkov Date: Tue Jun 20 11:31:54 2017 +0200 x86/hpet: Do not use smp_processor_id() in preemptible code When hpet=force is supplied on the kernel command line and the HPET supports the Legacy Replacement Interrupt Route option (HPET_ID_LEGSUP), the legacy interrupts init code uses the boot CPU's mask initially by calling smp_processor_id() assuming that it is running on the BSP. It does run on the BSP but the code region is preemptible and the preemption check fires. Simply use the BSP's id directly to avoid the warning. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170620093154.18472-1-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8de73374f8451ca0c83105719761d3572762dfeb Author: Steve Longerbeam Date: Wed Jun 7 15:33:42 2017 -0300 [media] dt/bindings: Add bindings for OV5640 Add device tree binding documentation for the OV5640 camera sensor. Signed-off-by: Steve Longerbeam Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ov5640.txt | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit e014a63cc685e8133d9d46d0ca41eceb279614f5 Author: Philipp Zabel Date: Mon Jun 12 09:24:24 2017 -0300 [media] MAINTAINERS: add maintainer entry for video multiplexer v4l2 subdevice driver Add maintainer entry for the video multiplexer v4l2 subdevice driver that will control video bus multiplexers via the multiplexer framework. Signed-off-by: Philip Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 68803ad4522f5defc091c29f75665d942f2d5e82 Author: Philipp Zabel Date: Wed Jun 7 15:33:55 2017 -0300 [media] platform: add video-multiplexer subdevice driver This driver can handle SoC internal and external video bus multiplexers, controlled by mux controllers provided by the mux controller framework, such as MMIO register bitfields or GPIOs. The subdevice passes through the mbus configuration of the active input to the output side. Since the mux framework is not yet merged, this driver contains temporary mmio-mux support to work without the framework. The driver should be converted to use the multiplexer API once the "mux: minimal mux subsystem" and "mux: mmio-based syscon mux controller" patches are merged. Signed-off-by: Sascha Hauer Signed-off-by: Philipp Zabel Signed-off-by: Steve Longerbeam Acked-by: Sakari Ailus Acked-by: Pavel Machek [hans.verkuil@cisco.com: add 'select REGMAP' to Kconfig] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 7 + drivers/media/platform/Makefile | 2 + drivers/media/platform/video-mux.c | 334 +++++++++++++++++++++++++++++++++++++ 3 files changed, 343 insertions(+) commit 2055da97389a605c8a00d163d40903afbe413921 Author: Ingo Molnar Date: Tue Jun 20 12:06:46 2017 +0200 sched/wait: Disambiguate wq_entry->task_list and wq_head->task_list naming So I've noticed a number of instances where it was not obvious from the code whether ->task_list was for a wait-queue head or a wait-queue entry. Furthermore, there's a number of wait-queue users where the lists are not for 'tasks' but other entities (poll tables, etc.), in which case the 'task_list' name is actively confusing. To clear this all up, name the wait-queue head and entry list structure fields unambiguously: struct wait_queue_head::task_list => ::head struct wait_queue_entry::task_list => ::entry For example, this code: rqw->wait.task_list.next != &wait->task_list ... is was pretty unclear (to me) what it's doing, while now it's written this way: rqw->wait.head.next != &wait->entry ... which makes it pretty clear that we are iterating a list until we see the head. Other examples are: list_for_each_entry_safe(pos, next, &x->task_list, task_list) { list_for_each_entry(wq, &fence->wait.task_list, task_list) { ... where it's unclear (to me) what we are iterating, and during review it's hard to tell whether it's trying to walk a wait-queue entry (which would be a bug), while now it's written as: list_for_each_entry_safe(pos, next, &x->head, entry) { list_for_each_entry(wq, &fence->wait.head, entry) { Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar block/blk-mq.c | 2 +- block/blk-wbt.c | 2 +- block/kyber-iosched.c | 8 ++++---- drivers/gpu/drm/i915/i915_sw_fence.c | 21 ++++++++++----------- drivers/rtc/rtc-imxdi.c | 2 +- fs/cachefiles/rdwr.c | 2 +- fs/eventpoll.c | 2 +- fs/fs_pin.c | 2 +- fs/nilfs2/segment.c | 3 +-- fs/orangefs/orangefs-bufmap.c | 8 ++++---- fs/userfaultfd.c | 22 +++++++++++----------- include/linux/wait.h | 20 ++++++++++---------- include/linux/wait_bit.h | 4 ++-- kernel/sched/wait.c | 24 ++++++++++++------------ kernel/sched/wait_bit.c | 4 ++-- mm/filemap.c | 2 +- mm/memcontrol.c | 2 +- mm/shmem.c | 4 ++-- 18 files changed, 66 insertions(+), 68 deletions(-) commit 5822a454d6d22297c5fcd66264120587b2ec21cd Author: Ingo Molnar Date: Sun Mar 5 13:09:07 2017 +0100 sched/wait: Move bit_wait_table[] and related functionality from sched/core.c to sched/wait_bit.c The key hashed waitqueue data structures and their initialization was done in the main scheduler file for no good reason, move them to sched/wait_bit.c instead. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/wait_bit.h | 1 + kernel/sched/core.c | 18 ++---------------- kernel/sched/wait_bit.c | 23 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 16 deletions(-) commit 5dd43ce2f69d42a71dcacdb13d17d8c0ac1fe8f7 Author: Ingo Molnar Date: Tue Jun 20 12:19:09 2017 +0200 sched/wait: Split out the wait_bit*() APIs from into The wait_bit*() types and APIs are mixed into wait.h, but they are a pretty orthogonal extension of wait-queues. Furthermore, only about 50 kernel files use these APIs, while over 1000 use the regular wait-queue functionality. So clean up the main wait.h by moving the wait-bit functionality out of it, into a separate .h and .c file: include/linux/wait_bit.h for types and APIs kernel/sched/wait_bit.c for the implementation Update all header dependencies. This reduces the size of wait.h rather significantly, by about 30%. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/cachefiles/internal.h | 2 +- fs/cifs/inode.c | 1 + fs/nfs/internal.h | 1 + include/linux/fs.h | 2 +- include/linux/sunrpc/sched.h | 2 +- include/linux/wait.h | 250 ---------------------------------------- include/linux/wait_bit.h | 260 ++++++++++++++++++++++++++++++++++++++++++ kernel/sched/Makefile | 2 +- kernel/sched/wait.c | 257 ------------------------------------------ kernel/sched/wait_bit.c | 263 +++++++++++++++++++++++++++++++++++++++++++ security/keys/internal.h | 1 + 11 files changed, 530 insertions(+), 511 deletions(-) commit 4b1c480bfa3b246e292f4d50167756252a9717ed Author: Ingo Molnar Date: Sun Mar 5 12:07:33 2017 +0100 sched/wait: Re-adjust macro line continuation backslashes in So there's over 300 CPP macro line-continuation backslashes in include/linux/wait.h (!!), which are aligned vertically to make the macro maze a bit more navigable. The recent renames and reorganization broke some of them, and instead of re-aligning them in every patch (which would add a lot of stylistic noise to the patches and make them less readable), I just ignored them - and fixed them up in a single go in this patch. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/wait.h | 645 +++++++++++++++++++++++++-------------------------- 1 file changed, 322 insertions(+), 323 deletions(-) commit 939798a072300698870b96756c38bb34c20f6c71 Author: Ingo Molnar Date: Sun Mar 5 11:54:46 2017 +0100 sched/wait: Improve the bit-wait API parameter names in the API function prototypes Contrary to kernel tradition, most of the bit-wait function prototypes in don't fully define the parameter names, they only list the types: int out_of_line_wait_on_bit_timeout(void *, int, wait_bit_action_f *, unsigned, unsigned long); ... which is pretty passive-aggressive in terms of informing the reader about what these functions are doing. Fill in the parameter names, such as: int out_of_line_wait_on_bit_timeout(void *word, int, wait_bit_action_f *action, unsigned int mode, unsigned long timeout); Also turn spurious (and inconsistently utilized) cases of 'unsigned' into 'unsigned int'. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/wait.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 76c85ddc4695bb7b8209bfeff11f5156088f9197 Author: Ingo Molnar Date: Sun Mar 5 11:35:27 2017 +0100 sched/wait: Standardize wait_bit_queue naming So wait-bit-queue head variables are often named: struct wait_bit_queue *q ... which is a bit ambiguous and super confusing, because they clearly suggest wait-queue head semantics and behavior (they rhyme with the old wait_queue_t *q naming), while they are extended wait-queue _entries_, not heads! They are misnomers in two ways: - the 'wait_bit_queue' leaves open the question of whether it's an entry or a head - the 'q' parameter and local variable naming falsely implies that it's a 'queue' - while it's an entry. This resulted in sometimes confusing cases such as: finish_wait(wq, &q->wait); where the 'q' is not a wait-queue head, but a wait-bit-queue entry. So improve this all by standardizing wait-bit-queue nomenclature similar to wait-queue head naming: struct wait_bit_queue => struct wait_bit_queue_entry q => wbq_entry Which makes it all a much clearer: struct wait_bit_queue_entry *wbq_entry ... and turns the former confusing piece of code into: finish_wait(wq_head, &wbq_entry->wq_entry; which IMHO makes it apparently clear what we are doing, without having to analyze the context of the code: we are adding a wait-queue entry to a regular wait-queue head, which entry is embedded in a wait-bit-queue entry. I'm not a big fan of acronyms, but repeating wait_bit_queue_entry in field and local variable names is too long, so Hopefully it's clear enough that 'wq_' prefixes stand for wait-queues, while 'wbq_' prefixes stand for wait-bit-queues. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/wait.h | 8 ++++---- kernel/sched/wait.c | 41 ++++++++++++++++++++--------------------- 2 files changed, 24 insertions(+), 25 deletions(-) commit 2141713616c652aeabf2dd5c1e89bc601c4fed6a Author: Ingo Molnar Date: Sun Mar 5 11:25:39 2017 +0100 sched/wait: Standardize 'struct wait_bit_queue' wait-queue entry field name Rename 'struct wait_bit_queue::wait' to ::wq_entry, to more clearly name it as a wait-queue entry. Propagate it to a couple of usage sites where the wait-bit-queue internals are exposed. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/inode.c | 8 ++++---- fs/jbd2/journal.c | 4 ++-- fs/xfs/xfs_icache.c | 4 ++-- fs/xfs/xfs_inode.c | 8 ++++---- include/linux/wait.h | 6 +++--- kernel/sched/wait.c | 41 ++++++++++++++++++++--------------------- 6 files changed, 35 insertions(+), 36 deletions(-) commit 9d9d676f595b5081326be7a17dc681fcb38fb3b2 Author: Ingo Molnar Date: Sun Mar 5 11:10:18 2017 +0100 sched/wait: Standardize internal naming of wait-queue heads The wait-queue head parameters and variables are named in a couple of ways, we have the following variants currently: wait_queue_head_t *q wait_queue_head_t *wq wait_queue_head_t *head In particular the 'wq' naming is ambiguous in the sense whether it's a wait-queue head or entry name - as entries were often named 'wait'. ( Not to mention the confusion of any readers coming over from workqueue-land. ) Standardize all this around a single, unambiguous parameter and variable name: struct wait_queue_head *wq_head which is easy to grep for and also rhymes nicely with the wait-queue entry naming: struct wait_queue_entry *wq_entry Also rename: struct __wait_queue_head => struct wait_queue_head ... and use this struct type to migrate from typedefs usage to 'struct' usage, which is more in line with existing kernel practices. Don't touch any external users and preserve the main wait_queue_head_t typedef. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/wait.h | 76 ++++++++++++------------- kernel/sched/wait.c | 154 +++++++++++++++++++++++++-------------------------- 2 files changed, 115 insertions(+), 115 deletions(-) commit 50816c48997af857d4bab3dca1aba90339705e96 Author: Ingo Molnar Date: Sun Mar 5 10:33:16 2017 +0100 sched/wait: Standardize internal naming of wait-queue entries So the various wait-queue entry variables in include/linux/wait.h and kernel/sched/wait.c are named in a colorfully inconsistent way: wait_queue_entry_t *wait wait_queue_entry_t *__wait (even in plain C code!) wait_queue_entry_t *q (!) wait_queue_entry_t *new (making anyone who knows C++ cringe) wait_queue_entry_t *old I think part of the reason for the inconsistency is the constant apparent confusion about what a wait queue 'head' versus 'entry' is. ( Some of the documentation talks about a 'wait descriptor', which is the wait-queue entry itself - further adding to the confusion. ) The most common name is 'wait', but that in itself is somewhat ambiguous as well, as it does not really make it clear whether it's a wait-queue entry or head. To improve all this name the wait-queue entry structure parameters and variables consistently and push through this naming into all the wait.h and wait.c code: struct wait_queue_entry *wq_entry The 'wq_' prefix makes it easy to grep for, and we also use the opportunity to move away from the typedef to a plain 'struct' naming: in the kernel we typically reserve typedefs for cases where a C structure is really small and somewhat opaque - such as pte_t. wait-queue entries are neither small nor opaque, so use the more standard 'struct xxx_entry' list management code nomenclature instead. ( We don't touch external users, and we preserve the typedef as well for actual wait-queue users, to reduce unnecessary churn. ) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/wait.h | 84 ++++++++++++++++++++++---------------------- kernel/sched/wait.c | 98 ++++++++++++++++++++++++++-------------------------- 2 files changed, 91 insertions(+), 91 deletions(-) commit ac6424b981bce1c4bc55675c6ce11bfe1bbfa64f Author: Ingo Molnar Date: Tue Jun 20 12:06:13 2017 +0200 sched/wait: Rename wait_queue_t => wait_queue_entry_t Rename: wait_queue_t => wait_queue_entry_t 'wait_queue_t' was always a slight misnomer: its name implies that it's a "queue", but in reality it's a queue *entry*. The 'real' queue is the wait queue head, which had to carry the name. Start sorting this out by renaming it to 'wait_queue_entry_t'. This also allows the real structure name 'struct __wait_queue' to lose its double underscore and become 'struct wait_queue_entry', which is the more canonical nomenclature for such data types. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Documentation/DocBook/kernel-hacking.tmpl | 2 +- Documentation/filesystems/autofs4.txt | 12 ++-- block/blk-mq.c | 2 +- block/blk-wbt.c | 2 +- block/kyber-iosched.c | 8 +-- drivers/bluetooth/btmrvl_main.c | 2 +- drivers/char/ipmi/ipmi_watchdog.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.h | 2 +- drivers/gpu/drm/i915/i915_sw_fence.c | 14 ++--- drivers/gpu/drm/i915/i915_sw_fence.h | 2 +- drivers/gpu/drm/radeon/radeon.h | 2 +- drivers/gpu/drm/radeon/radeon_fence.c | 2 +- drivers/gpu/vga/vgaarb.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +- drivers/md/bcache/btree.h | 2 +- drivers/net/ethernet/cavium/liquidio/octeon_main.h | 4 +- drivers/net/wireless/cisco/airo.c | 2 +- .../net/wireless/intersil/hostap/hostap_ioctl.c | 2 +- drivers/net/wireless/marvell/libertas/main.c | 2 +- drivers/scsi/dpt/dpti_i2o.h | 2 +- drivers/scsi/ips.c | 12 ++-- drivers/scsi/ips.h | 4 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 6 +- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 +- drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- drivers/staging/lustre/lnet/libcfs/tracefile.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-eq.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-socket.c | 2 +- drivers/staging/lustre/lustre/fid/fid_request.c | 6 +- drivers/staging/lustre/lustre/include/lustre_lib.h | 4 +- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 2 +- .../staging/lustre/lustre/lov/lov_cl_internal.h | 2 +- drivers/staging/lustre/lustre/lov/lov_object.c | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 6 +- drivers/tty/synclink_gt.c | 2 +- drivers/vfio/virqfd.c | 2 +- drivers/vhost/vhost.c | 2 +- drivers/vhost/vhost.h | 2 +- fs/autofs4/autofs_i.h | 2 +- fs/autofs4/waitq.c | 18 +++--- fs/cachefiles/internal.h | 2 +- fs/cachefiles/namei.c | 2 +- fs/cachefiles/rdwr.c | 2 +- fs/dax.c | 4 +- fs/eventfd.c | 2 +- fs/eventpoll.c | 10 ++-- fs/fs_pin.c | 2 +- fs/nfs/nfs4proc.c | 4 +- fs/nilfs2/segment.c | 2 +- fs/orangefs/orangefs-bufmap.c | 4 +- fs/reiserfs/journal.c | 2 +- fs/select.c | 4 +- fs/signalfd.c | 2 +- fs/userfaultfd.c | 8 +-- include/linux/blk-mq.h | 2 +- include/linux/eventfd.h | 4 +- include/linux/kvm_irqfd.h | 2 +- include/linux/pagemap.h | 2 +- include/linux/poll.h | 2 +- include/linux/vfio.h | 2 +- include/linux/wait.h | 67 +++++++++++----------- include/net/af_unix.h | 2 +- include/uapi/linux/auto_fs.h | 4 +- include/uapi/linux/auto_fs4.h | 4 +- kernel/exit.c | 4 +- kernel/futex.c | 2 +- kernel/sched/completion.c | 2 +- kernel/sched/core.c | 2 +- kernel/sched/wait.c | 42 +++++++------- kernel/workqueue.c | 4 +- mm/filemap.c | 10 ++-- mm/memcontrol.c | 8 +-- mm/mempool.c | 2 +- mm/shmem.c | 2 +- net/9p/trans_fd.c | 4 +- net/bluetooth/bnep/core.c | 2 +- net/bluetooth/cmtp/core.c | 2 +- net/bluetooth/hidp/core.c | 2 +- net/core/datagram.c | 2 +- net/unix/af_unix.c | 4 +- sound/core/control.c | 2 +- sound/core/hwdep.c | 2 +- sound/core/init.c | 2 +- sound/core/oss/pcm_oss.c | 4 +- sound/core/pcm_lib.c | 2 +- sound/core/pcm_native.c | 4 +- sound/core/rawmidi.c | 8 +-- sound/core/seq/seq_fifo.c | 2 +- sound/core/seq/seq_memory.c | 2 +- sound/core/timer.c | 2 +- sound/isa/wavefront/wavefront_synth.c | 2 +- sound/pci/mixart/mixart_core.c | 4 +- sound/pci/ymfpci/ymfpci_main.c | 2 +- virt/kvm/eventfd.c | 2 +- 94 files changed, 216 insertions(+), 213 deletions(-) commit b45cd756368823ce9e19bcb8c69d575595df5c5a Author: Philipp Zabel Date: Wed Jun 7 15:33:54 2017 -0300 [media] add mux and video interface bridge entity functions Add two new media entity function definitions for video multiplexers and video interface bridges. - renamed MEDIA_ENT_F_MUX to MEDIA_ENT_F_VID_MUX Signed-off-by: Philipp Zabel Signed-off-by: Steve Longerbeam Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-types.rst | 21 +++++++++++++++++++++ include/uapi/linux/media.h | 6 ++++++ 2 files changed, 27 insertions(+) commit 4e12ad40b76b76dc81413ab9e52b9f12465341a9 Author: Philipp Zabel Date: Wed Jun 7 15:33:40 2017 -0300 [media] dt-bindings: Add bindings for video-multiplexer device Add bindings documentation for the video multiplexer device. Signed-off-by: Sascha Hauer Signed-off-by: Philipp Zabel Signed-off-by: Steve Longerbeam Acked-by: Sakari Ailus Reviewed-by: Sebastian Reichel Acked-by: Rob Herring Acked-by: Pavel Machek Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/video-mux.txt | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 8ca00927d61eb4dafe823387f1fb23913ffed5f0 Author: Mauro Carvalho Chehab Date: Tue Jun 20 07:11:15 2017 -0300 [media] max2175: remove an useless comparision load is an unsigned integer. So, it is always bigger or equal to zero, as reported by gcc: drivers/media/i2c/max2175.c: In function 'max2175_refout_load_to_bits': drivers/media/i2c/max2175.c:1272:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if (load >= 0 && load <= 40) ^~ Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/max2175.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbe19d1f060794c001def92a18d3d80ce0083b28 Author: Ramesh Shanmugasundaram Date: Mon Jun 12 10:26:20 2017 -0300 [media] MAINTAINERS: Add entry for R-Car DRIF & MAX2175 drivers Add maintainter entry for the R-Car DRIF and MAX2175 drivers. Signed-off-by: Ramesh Shanmugasundaram Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 7625ee981af166ddb569e2e6c0006e2af471326f Author: Ramesh Shanmugasundaram Date: Mon Jun 12 10:26:19 2017 -0300 [media] media: platform: rcar_drif: Add DRIF support This patch adds Digital Radio Interface (DRIF) support to R-Car Gen3 SoCs. The driver exposes each instance of DRIF as a V4L2 SDR device. A DRIF device represents a channel and each channel can have one or two sub-channels respectively depending on the target board. DRIF supports only Rx functionality. It receives samples from a RF frontend tuner chip it is interfaced with. The combination of DRIF and the tuner device, which is registered as a sub-device, determines the receive sample rate and format. In order to be compliant as a V4L2 SDR device, DRIF needs to bind with the tuner device, which can be provided by a third party vendor. DRIF acts as a slave device and the tuner device acts as a master transmitting the samples. The driver allows asynchronous binding of a tuner device that is registered as a v4l2 sub-device. The driver can learn about the tuner it is interfaced with based on port endpoint properties of the device in device tree. The V4L2 SDR device inherits the controls exposed by the tuner device. The device can also be configured to use either one or both of the data pins at runtime based on the master (tuner) configuration. Signed-off-by: Ramesh Shanmugasundaram Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 25 + drivers/media/platform/Makefile | 1 + drivers/media/platform/rcar_drif.c | 1498 ++++++++++++++++++++++++++++++++++++ 3 files changed, 1524 insertions(+) commit 54a707ea011601f06cc5ef7fe6d0daac71ab0622 Author: Ramesh Shanmugasundaram Date: Mon Jun 12 10:26:18 2017 -0300 [media] dt-bindings: media: Add Renesas R-Car DRIF binding Add binding documentation for Renesas R-Car Digital Radio Interface (DRIF) controller. Signed-off-by: Ramesh Shanmugasundaram Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/renesas,drif.txt | 176 +++++++++++++++++++++ 1 file changed, 176 insertions(+) commit e744ee280311ac220930ae49417b79165c887a3a Author: Ramesh Shanmugasundaram Date: Mon Jun 12 10:26:17 2017 -0300 [media] doc_rst: media: New SDR formats PC16, PC18 & PC20 This patch adds documentation for the three new SDR formats V4L2_SDR_FMT_PCU16BE V4L2_SDR_FMT_PCU18BE V4L2_SDR_FMT_PCU20BE Signed-off-by: Ramesh Shanmugasundaram Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/uapi/v4l/pixfmt-sdr-pcu16be.rst | 55 ++++++++++++++++++++++ .../media/uapi/v4l/pixfmt-sdr-pcu18be.rst | 55 ++++++++++++++++++++++ .../media/uapi/v4l/pixfmt-sdr-pcu20be.rst | 54 +++++++++++++++++++++ Documentation/media/uapi/v4l/sdr-formats.rst | 3 ++ 4 files changed, 167 insertions(+) commit c28f2118a2129f8e2c1cdf2454ffe4833885edff Author: Ramesh Shanmugasundaram Date: Mon Jun 12 10:26:16 2017 -0300 [media] media: Add new SDR formats PC16, PC18 & PC20 This patch adds support for the three new SDR formats. These formats were prefixed with "planar" indicating I & Q data are not interleaved as in other formats. Here, I & Q data constitutes the top half and bottom half of the received buffer respectively. V4L2_SDR_FMT_PCU16BE - 14-bit complex (I & Q) unsigned big-endian sample inside 16-bit. V4L2 FourCC: PC16 V4L2_SDR_FMT_PCU18BE - 16-bit complex (I & Q) unsigned big-endian sample inside 18-bit. V4L2 FourCC: PC18 V4L2_SDR_FMT_PCU20BE - 18-bit complex (I & Q) unsigned big-endian sample inside 20-bit. V4L2 FourCC: PC20 Signed-off-by: Ramesh Shanmugasundaram Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 3 +++ include/uapi/linux/videodev2.h | 3 +++ 2 files changed, 6 insertions(+) commit b47b79d8a231d137ec9f9a5bef05f9e2f19a4347 Author: Ramesh Shanmugasundaram Date: Tue Jun 13 09:54:47 2017 -0300 [media] media: i2c: max2175: Add MAX2175 support This patch adds driver support for the MAX2175 chip. This is Maxim Integrated's RF to Bits tuner front end chip designed for software-defined radio solutions. This driver exposes the tuner as a sub-device instance with standard and custom controls to configure the device. Signed-off-by: Ramesh Shanmugasundaram Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/index.rst | 1 + Documentation/media/v4l-drivers/max2175.rst | 62 ++ drivers/media/i2c/Kconfig | 12 + drivers/media/i2c/Makefile | 2 + drivers/media/i2c/max2175.c | 1453 +++++++++++++++++++++++++++ drivers/media/i2c/max2175.h | 109 ++ include/uapi/linux/max2175.h | 28 + 7 files changed, 1667 insertions(+) commit a45509c080a13a2cd7f3a4f5ab8733f57dd8f1a3 Author: Ramesh Shanmugasundaram Date: Mon Jun 12 10:26:14 2017 -0300 [media] dt-bindings: media: Add MAX2175 binding description Add device tree binding documentation for MAX2175 RF to bits tuner device. Signed-off-by: Ramesh Shanmugasundaram Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/max2175.txt | 59 ++++++++++++++++++++++ .../devicetree/bindings/property-units.txt | 1 + 2 files changed, 60 insertions(+) commit 8d67ae25a9ea206f1ad53561511c1810d7838666 Author: Ramesh Shanmugasundaram Date: Mon Jun 12 10:26:13 2017 -0300 [media] media: v4l2-ctrls: Reserve controls for MAX217X Reserve controls for MAX217X RF to Bits tuner family. These hybrid radio receiver chips are highly programmable and hence reserving 32 controls. Signed-off-by: Ramesh Shanmugasundaram Acked-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/v4l2-controls.h | 5 +++++ 1 file changed, 5 insertions(+) commit 94cce93c3da70ee1fbc44b1fdb6874128212b10d Author: Hans Verkuil Date: Fri Jun 9 14:54:01 2017 -0300 [media] dt-bindings: media/s5p-cec.txt, media/stih-cec.txt: refer to cec.txt Now that there is a cec.txt with common CEC bindings, update the two driver-specific bindings to refer to cec.txt. Signed-off-by: Hans Verkuil Acked-by: Benjamin Gaignard Acked-by: Sylwester Nawrocki Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/s5p-cec.txt | 6 ++---- Documentation/devicetree/bindings/media/stih-cec.txt | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit af15e32fc9b1fd805d72b54524198612ac628b4d Author: Hans Verkuil Date: Fri Jun 9 14:54:00 2017 -0300 [media] dt-bindings: add media/cec.txt Document common HDMI CEC bindings. Add this to the MAINTAINERS file as well. Signed-off-by: Hans Verkuil Acked-by: Benjamin Gaignard Acked-by: Sylwester Nawrocki Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/cec.txt | 8 ++++++++ MAINTAINERS | 1 + 2 files changed, 9 insertions(+) commit d0703944c19c423fa4fa047795147e786553ff1c Author: Hans Verkuil Date: Wed Jun 7 11:46:15 2017 -0300 [media] s5p_cec: set the CEC_CAP_NEEDS_HPD flag if needed Use the needs-hpd DT property to determine if the CEC_CAP_NEEDS_HPD should be set. Signed-off-by: Hans Verkuil Acked-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-cec/s5p_cec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e8537b35bf48979803958c489876952d100afa0a Author: Hans Verkuil Date: Wed Jun 7 11:46:14 2017 -0300 [media] dt-bindings: media/s5p-cec.txt: document needs-hpd property Needed for boards that wire the CEC pin in such a way that it is unavailable when the HPD is low. Signed-off-by: Hans Verkuil Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/s5p-cec.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 41c01d6582977c76f4ce827cc74e94d1892f9141 Author: Hans Verkuil Date: Wed Jun 7 11:46:13 2017 -0300 [media] cec-ioc-adap-g-caps.rst: document CEC_CAP_NEEDS_HPD Document the new CEC_CAP_NEEDS_HPD capability. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst | 8 ++++++++ 1 file changed, 8 insertions(+) commit f902c1e95d5dfe5102f8467d69dc51d505f832ee Author: Hans Verkuil Date: Wed Jun 7 11:46:12 2017 -0300 [media] cec: add CEC_CAP_NEEDS_HPD Add a new capability CEC_CAP_NEEDS_HPD. If this capability is set then the hardware can only use CEC if the HDMI Hotplug Detect pin is high. Such hardware cannot handle the corner case in the CEC specification where it is possible to transmit messages even if no hotplug signal is present (needed for some displays that turn off the HPD when in standby, but still have CEC enabled). Typically hardware that needs this capability have the HPD wired to the CEC block, often to a 'power' or 'active' pin. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 20 ++++++++++++++------ drivers/media/cec/cec-api.c | 5 ++++- drivers/media/cec/cec-core.c | 1 + include/media/cec.h | 1 + include/uapi/linux/cec.h | 2 ++ 5 files changed, 22 insertions(+), 7 deletions(-) commit 2613cc6fd32c4997d8e9473f8249601a5e088ee7 Author: Hans Verkuil Date: Wed Jun 7 11:46:11 2017 -0300 [media] stih-cec/vivid/pulse8/rainshadow: use cec_transmit_attempt_done Use the helper function cec_transmit_attempt_done instead of cec_transmit_done to simplify the code. Signed-off-by: Hans Verkuil Acked-by: Benjamin Gaignard Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/cec/stih-cec.c | 9 ++++----- drivers/media/platform/vivid/vivid-cec.c | 6 +++--- drivers/media/usb/pulse8-cec/pulse8-cec.c | 9 +++------ drivers/media/usb/rainshadow-cec/rainshadow-cec.c | 9 +++------ 4 files changed, 13 insertions(+), 20 deletions(-) commit cde50a67397c0da7d11795d4b4418384022ab8e6 Author: Levin, Alexander (Sasha Levin) Date: Sun Jun 18 14:06:01 2017 +0000 locking/rtmutex: Don't initialize lockdep when not required pi_mutex isn't supposed to be tracked by lockdep, but just passing NULLs for name and key will cause lockdep to spew a warning and die, which is not what we want it to do. Skip lockdep initialization if the caller passed NULLs for name and key, suggesting such initialization isn't desired. Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: f5694788ad8d ("rt_mutex: Add lockdep annotations") Link: http://lkml.kernel.org/r/20170618140548.4763-1-alexander.levin@verizon.com Signed-off-by: Ingo Molnar kernel/locking/rtmutex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c94cdc1e0c3589856de9d4ecafeeffdb349a8e0b Author: Hans Verkuil Date: Wed Jun 7 11:46:10 2017 -0300 [media] cec: add cec_transmit_attempt_done helper function A simpler variant of cec_transmit_done to be used where the HW does just a single attempt at a transmit. So if the status indicates an error, then the corresponding error count will always be 1 and this function figures that out based on the status argument. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/cec-core.rst | 10 ++++++++++ drivers/media/cec/cec-adap.c | 26 ++++++++++++++++++++++++++ include/media/cec.h | 6 ++++++ 3 files changed, 42 insertions(+) commit 135327899d2874f2b65b3a3626b37d87df9e6a05 Author: Hans Verkuil Date: Wed Jun 7 11:46:09 2017 -0300 [media] cec: add cec_phys_addr_invalidate() helper function Simplifies setting the physical address to CEC_PHYS_ADDR_INVALID. Signed-off-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/cec.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 23111ec304166750479e17318b7175ff7db0d6ac Author: Hans Verkuil Date: Wed Jun 7 11:46:08 2017 -0300 [media] cec: add cec_s_phys_addr_from_edid helper function This function simplifies the integration of CEC in DRM drivers. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/cec-core.rst | 8 ++++++++ drivers/media/cec/cec-adap.c | 14 ++++++++++++++ include/media/cec.h | 9 +++++++++ 3 files changed, 31 insertions(+) commit a6d8bd919a1245ca759e8abc25a78811dec1d03f Author: Antoine Tenart Date: Tue Jun 20 08:38:38 2017 +0200 arm64: dts: marvell: use new bindings for xor clocks on ap806 New bindings are used for the system controller on the ap806, which means all clock properties must be converted. Use the new bindings in the xor nodes. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6691565fb8b7c426adf369b7130944a179af9e69 Author: Antoine Tenart Date: Mon Jun 19 09:37:29 2017 +0200 arm64: dts: marvell: mcbin: enable the mdio node Since the mdio nodes are disabled by default now, we should explicitly enable these nodes at the board level when they are used. Enable the cpm_mdio node for the 8040-mcbin. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 2 ++ 1 file changed, 2 insertions(+) commit e7f4c4bf99ad5edca35ccc18105daf5279b54919 Author: Dan Carpenter Date: Wed Jun 14 12:12:09 2017 +0300 pinctrl: ingenic: checking for NULL instead of IS_ERR() devm_pinctrl_register() returns error pointers, it doesn't return NULL. Fixes: b5c23aa46537 ("pinctrl: add a pinctrl driver for the Ingenic jz47xx SoCs") Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-ingenic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1bd303dc04c3f744474e77c153575087b657f7e1 Author: Masahiro Yamada Date: Wed Jun 14 13:49:30 2017 +0900 pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD20 The pingroups dump of debugfs hits WARN_ON() in pinctrl_groups_show(). Filling non-existing ports with '-1' turned out a bad idea. Fixes: 336306ee1f2d ("pinctrl: uniphier: add UniPhier PH1-LD20 pinctrl driver") Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 383 ++++++++++++----------- 1 file changed, 194 insertions(+), 189 deletions(-) commit 9592bc256d50481dfcdba93890e576a728fb373c Author: Masahiro Yamada Date: Wed Jun 14 13:49:29 2017 +0900 pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD11 The pingroups dump of debugfs hits WARN_ON() in pinctrl_groups_show(). Filling non-existing ports with '-1' turned out a bad idea. Fixes: 70f2f9c4cf25 ("pinctrl: uniphier: add UniPhier PH1-LD11 pinctrl driver") Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 364 ++++++++++++----------- 1 file changed, 192 insertions(+), 172 deletions(-) commit e0d60ac10ec01647bbdd3963831515dde17f2d70 Author: Christoph Hellwig Date: Sun May 21 12:21:50 2017 +0200 arm64: remove DMA_ERROR_CODE The dma alloc interface returns an error by return NULL, and the mapping interfaces rely on the mapping_error method, which the dummy ops already implement correctly. Thus remove the DMA_ERROR_CODE define. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/arm64/include/asm/dma-mapping.h | 1 - arch/arm64/mm/dma-mapping.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) commit 50f5c08b016bb4c6d34667d7ab9d5ee35e85261f Author: Christoph Hellwig Date: Sun May 21 12:49:22 2017 +0200 xtensa: remove DMA_ERROR_CODE xtensa already implements the mapping_error method for its only dma_map_ops instance. Signed-off-by: Christoph Hellwig arch/xtensa/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit f2a80aedb20c0513b4e127d1fe1cecf936a25ba0 Author: Christoph Hellwig Date: Sun May 21 12:48:09 2017 +0200 sh: remove DMA_ERROR_CODE sh does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig arch/sh/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit d7950f8347483c773534c0d98044a0863a9a24a7 Author: Christoph Hellwig Date: Sun May 21 12:32:27 2017 +0200 openrisc: remove DMA_ERROR_CODE openrisc does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig arch/openrisc/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit b0230a695232679d5bbf9af8499801ff90cee80d Author: Christoph Hellwig Date: Sun May 21 12:30:35 2017 +0200 microblaze: remove DMA_ERROR_CODE microblaze does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig arch/microblaze/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit 7c72e0d557c0c93d22f179dd5a64e6bc475810c2 Author: Christoph Hellwig Date: Sun May 21 12:29:17 2017 +0200 m32r: remove DMA_ERROR_CODE dma-noop is the only dma_mapping_ops instance for m32r and does not return errors. Signed-off-by: Christoph Hellwig arch/m32r/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit 75fbede1cf8415d23fe1cb59cd70faa4d08813ab Author: Christoph Hellwig Date: Sun May 21 12:28:08 2017 +0200 ia64: remove DMA_ERROR_CODE All ia64 dma_mapping_ops instances already have a mapping_error member. Signed-off-by: Christoph Hellwig arch/ia64/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit fb9ef14b7f7275e8bd081d2450a983589e787d0e Author: Christoph Hellwig Date: Sun May 21 12:23:05 2017 +0200 c6x: remove DMA_ERROR_CODE Signed-off-by: Christoph Hellwig arch/c6x/include/asm/dma-mapping.h | 5 ----- 1 file changed, 5 deletions(-) commit 4d048dbc057b989966b25011385bb9d825e932ea Author: Christoph Hellwig Date: Sun May 21 13:23:27 2017 +0200 xen-swiotlb: implement ->mapping_error DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig Reviewed-by: Konrad Rzeszutek Wilk drivers/xen/swiotlb-xen.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit dceb1a6819ab2c8b5564354543447b1af4fccedd Author: Christoph Hellwig Date: Sun May 21 13:15:13 2017 +0200 xen-swiotlb: consolidate xen_swiotlb_dma_ops ARM and x86 had duplicated versions of the dma_ops structure, the only difference is that x86 hasn't wired up the set_dma_mask, mmap, and get_sgtable ops yet. On x86 all of them are identical to the generic version, so they aren't needed but harmless. All the symbols used only for xen_swiotlb_dma_ops can now be marked static as well. Signed-off-by: Christoph Hellwig Reviewed-by: Konrad Rzeszutek Wilk arch/arm/xen/mm.c | 17 -------- arch/x86/xen/pci-swiotlb-xen.c | 14 ------- drivers/xen/swiotlb-xen.c | 93 ++++++++++++++++++++++-------------------- include/xen/swiotlb-xen.h | 62 +--------------------------- 4 files changed, 49 insertions(+), 137 deletions(-) commit 81a5a316756b23cd0264627366ba32b337b8fa24 Author: Christoph Hellwig Date: Mon May 22 10:55:30 2017 +0200 iommu/dma: don't rely on DMA_ERROR_CODE DMA_ERROR_CODE is not a public API and will go away soon. dma dma-iommu driver already implements a proper ->mapping_error method, so it's only using the value internally. Add a new local define using the value that arm64 which is the only current user of dma-iommu. Signed-off-by: Christoph Hellwig drivers/iommu/dma-iommu.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit b400585720820077704c84813930a3e255f87a23 Author: Christoph Hellwig Date: Mon May 22 10:46:22 2017 +0200 drm/armada: don't abuse DMA_ERROR_CODE dev_addr isn't even a dma_addr_t, and DMA_ERROR_CODE has never been a valid driver API. Add a bool mapped flag instead. Signed-off-by: Christoph Hellwig drivers/gpu/drm/armada/armada_fb.c | 2 +- drivers/gpu/drm/armada/armada_gem.c | 5 ++--- drivers/gpu/drm/armada/armada_gem.h | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) commit e0c7a510aea75db4927d810fb0a84233641b53c3 Author: Christoph Hellwig Date: Mon May 22 10:40:52 2017 +0200 drm/exynos: don't use DMA_ERROR_CODE DMA_ERROR_CODE already isn't a valid API to user for drivers and will go away soon. exynos_drm_fb_dma_addr uses it a an error return when the passed in index is invalid, but the callers never check for it but instead pass the address straight to the hardware. Add a WARN_ON instead and just return 0. Signed-off-by: Christoph Hellwig drivers/gpu/drm/exynos/exynos_drm_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4734b3f5ffc42d821a316383222d71dce7d5c9e Author: Christoph Hellwig Date: Sun May 21 12:54:31 2017 +0200 dmaengine: ioat: don't use DMA_ERROR_CODE DMA_ERROR_CODE is not a public API and will go away. Instead properly unwind based on the loop counter. Signed-off-by: Christoph Hellwig Acked-by: Dave Jiang Acked-By: Vinod Koul drivers/dma/ioat/init.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit d43732ce021f4244a4c53a45d57ad0c13c30ed94 Author: Christoph Hellwig Date: Sun May 21 12:45:58 2017 +0200 ibmveth: properly unwind on init errors That way the driver doesn't have to rely on DMA_ERROR_CODE, which is not a public API and going away. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller drivers/net/ethernet/ibm/ibmveth.c | 159 +++++++++++++++++-------------------- 1 file changed, 74 insertions(+), 85 deletions(-) commit 54ed812162148ec7819a33b4fe112b8dc9d1cd00 Author: Christoph Hellwig Date: Sun May 21 12:33:39 2017 +0200 firmware/ivc: use dma_mapping_error DMA_ERROR_CODE is not supposed to be used by drivers. Signed-off-by: Christoph Hellwig Acked-by: Thierry Reding drivers/firmware/tegra/ivc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71683c32dee66cdb244a25490823731db1401dce Author: Kailang Yang Date: Tue Jun 20 16:33:50 2017 +0800 ALSA: hda/realtek - Support headset mode for ALC234/ALC274/ALC294 This patch will enable headset mode for ALC234/ALC274/ALC294 platform. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 68 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) commit 007b811b4041989ec2dc91b9614aa2c41332723e Merge: 2eb0fc9 dfe1c6d Author: Ingo Molnar Date: Tue Jun 20 10:49:08 2017 +0200 Merge tag 'perf-core-for-mingo-4.13-20170719' 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: User visible changes: - Allow adding and removing fields to the default 'perf script' columns, using + or - as field prefixes to do so (Andi Kleen) - Display titles in left frame in the annotate browser (Jin Yao) - Allow resolving the DSO name with 'perf script -F brstack{sym,off},dso' (Mark Santaniello) - Support function filtering in 'perf ftrace' (Namhyung Kim) - Allow specifying function call depth in 'perf ftrace' (Namhyumg Kim) Infrastructure changes: - Adopt __noreturn, __printf, __scanf, noinline, __packed and __aligned __alignment__(()) markers, to make the tools/ source code base to be more compact and look more like kernel code (Arnaldo Carvalho de Melo) - Remove unnecessary check in annotate_browser_write() (Jin Yao) - Return arch from symbol__disassemble() so that callers, such as the annotate TUI browser to use arch specific formattings, such as the upcoming instruction micro-op fusion on Intel Core (Jin Yao) - Remove superfluous check before use in the coresight code base (Kim Phillips) - Remove unused SAMPLE_SIZE defines and BTS priv array (Kim Phillips) - Error handling fix/tidy ups in 'perf config' (Taeung Song) - Avoid error in the BPF proggie built with clang in 'perf test llvm' when PROFILE_ALL_BRANCHES is set (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit eb2ec49b0d64475be6ada37bcd70a4230f07ae70 Author: Andy Shevchenko Date: Mon Jun 12 11:52:12 2017 +0300 MAINTAINERS: Take maintainership for GPIO ACPI support We will help Linus to maintain GPIO ACPI support. Append a dedicated record to the MAINTAINERS data base. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2eb0fc9bfe7485fec16030b85ff586e7aaea2b6f Merge: d0fabd1 41f1830 Author: Ingo Molnar Date: Tue Jun 20 10:48:44 2017 +0200 Merge tag 'v4.12-rc6' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 2fe35968feccaee61413edbe54bec66bc80a67a7 Author: Simon Horman Date: Fri Jun 16 18:11:04 2017 +0200 mmc: renesas-sdhi: improve checkpatch cleanness Trivial updates to improve checkpatch cleanness. Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi.h | 2 +- drivers/mmc/host/renesas_sdhi_core.c | 43 ++++++++++++++++---------------- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 25 +++++++++++-------- 3 files changed, 37 insertions(+), 33 deletions(-) commit f2218db81548544bf7349911546a94bfaabbd697 Author: Simon Horman Date: Fri Jun 16 18:11:03 2017 +0200 mmc: tmio: improve checkpatch cleanness Trivial updates to improve checkpatch cleanness. Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi.h | 2 +- drivers/mmc/host/tmio_mmc.c | 8 ++--- drivers/mmc/host/tmio_mmc.h | 17 ++++++----- drivers/mmc/host/tmio_mmc_core.c | 66 +++++++++++++++++++++------------------- include/linux/mfd/tmio.h | 33 ++++++++++---------- 5 files changed, 66 insertions(+), 60 deletions(-) commit 6cf4156c0988fe9ee14f24144dcfcac35b177d85 Author: Adrian Hunter Date: Tue Jun 13 15:07:52 2017 +0300 mmc: sdhci-pci: Enable card detect wake for Intel BYT-related SD controllers Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03dbaa04a2e5bac0ae907a9ed31472bc4bb56fd3 Author: Adrian Hunter Date: Tue Jun 13 15:07:51 2017 +0300 mmc: slot-gpio: Add support to enable irq wake on cd_irq Add host capability MMC_CAP_CD_WAKE to enable irq wake on the card detect irq. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 5 ++++- drivers/mmc/core/slot-gpio.c | 2 ++ include/linux/mmc/host.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) commit d2a47176a877b1eccd3086a4c8d790d644d594cb Author: Ulf Hansson Date: Thu Jun 8 15:23:08 2017 +0200 mmc: core: Remove MMC_CAP2_HC_ERASE_SZ The MMC_CAP2_HC_ERASE_SZ is used only by a few mmc host drivers. Its intent is to enable eMMC's high-capacity erase size, as to improve the behaviour of the erase operations. We should strive to avoid software configuration options that aren't necessary, but instead deploy common behaviours. For these reasons, let's remove the capability bit for MMC_CAP2_HC_ERASE_SZ and make it the default behaviour. Note that this change doesn't affect eMMCs supporting trim/discard, because these commands operates on sectors and takes precedence over erase commands. Signed-off-by: Ulf Hansson Acked-by: Adrian Hunter Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Tested-by: Shawn Lin drivers/mmc/core/mmc.c | 8 ++------ drivers/mmc/host/sdhci-acpi.c | 1 - drivers/mmc/host/sdhci-brcmstb.c | 3 --- drivers/mmc/host/sdhci-pci-core.c | 4 +--- include/linux/mmc/host.h | 1 - 5 files changed, 3 insertions(+), 14 deletions(-) commit 9820a5b1110126142c50a779622abab560d3fcc1 Author: Wolfram Sang Date: Sat Apr 8 22:20:06 2017 +0200 mmc: core: for data errors, take response of stop cmd into account Some errors are flagged only with the next command after a multiblock transfer, e.g. ECC error. So, when checking for data transfer errors, we check the result from the stop command as well. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a04e6bae9e6f12c3a2aa4c84d50d1dcb79ce9814 Author: Wolfram Sang Date: Sat Apr 8 22:20:05 2017 +0200 mmc: core: check also R1 response for stop commands To detect errors like ECC errors, we must parse the R1 response bits. Introduce a helper function to also set the error value of a command when R1 error bits are set. Add ECC error to list of flags checked. Use the new helper for the stop command to call mmc_blk_recovery when detecting ECC errors which are only flagged on the next command after multiblock. Signed-off-by: Wolfram Sang Tested-by: Yoshihiro Shimoda Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 0796e439c5cc4ceeb84e08479c5ee1a4ebab5549 Author: Ulf Hansson Date: Thu Jun 8 15:27:45 2017 +0200 mmc: core: Clarify code for sending CSD To make the code more consistent and to increase readability, add an mmc_spi_send_csd() function, which gets called from mmc_send_csd() in case of SPI mode. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/mmc_ops.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit c92e68d8a6595fec3e1f778edb4760507aef18d2 Author: Ulf Hansson Date: Thu Jun 8 15:27:44 2017 +0200 mmc: core: Drop mmc_all_send_cid() and use mmc_send_cxd_native() instead Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/mmc_ops.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit a1473732507499ec4002ad8cd33e645579d61a26 Author: Ulf Hansson Date: Thu Jun 8 15:27:43 2017 +0200 mmc: core: Re-factor code for sending CID Instead of having the caller to check for SPI mode, let's leave that to internals of mmc_send_cid(). In this way the code gets cleaner and it becomes clear what is specific to SPI and non-SPI mode. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/mmc.c | 5 +---- drivers/mmc/core/mmc_ops.c | 12 ++++++++++-- drivers/mmc/core/mmc_ops.h | 1 - drivers/mmc/core/sd.c | 6 +----- 4 files changed, 12 insertions(+), 12 deletions(-) commit 3df66e77e10a1eac51854dc91b0d0875897f2e4c Author: Ulf Hansson Date: Thu Jun 8 15:27:42 2017 +0200 mmc: core: Remove redundant code in mmc_send_cid() The mmc_send_cid() is never called using non SPI mode. Thus, let's remove the redundant code dealing with this. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/mmc_ops.c | 7 ------- 1 file changed, 7 deletions(-) commit 88bed3a6a00a33b4b0c71efeb4523a694c3fe47b Author: Ulf Hansson Date: Thu Jun 8 15:27:41 2017 +0200 mmc: core: Make mmc_can_reset() static Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/mmc.c | 3 +-- drivers/mmc/core/mmc_ops.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit d9df1737583ed34bf470d87dbb6f9d0a42718b40 Author: Ulf Hansson Date: Thu Jun 8 15:27:40 2017 +0200 mmc: core: Move mmc_flush_cache() from core.c to mmc_ops.c The mmc_flush_cache() is a eMMC specific function, let's move it to mmc_ops.c to make that clear. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/core.c | 21 --------------------- drivers/mmc/core/mmc_ops.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) commit 0f2c05125ef98f062c256c6d150ff372125bf523 Author: Ulf Hansson Date: Thu Jun 8 15:27:39 2017 +0200 mmc: core: Move mmc_interrupt_hpi() from core.c to mmc_ops.c The mmc_interrupt_hpi() is a eMMC specific function, let's move it to mmc_ops.c to make that clear. The move also enables us to make mmc_send_hpi_cmd() static, so let's do that change as well. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/core.c | 64 -------------------------------------------- drivers/mmc/core/mmc_ops.c | 66 +++++++++++++++++++++++++++++++++++++++++++++- drivers/mmc/core/mmc_ops.h | 1 - 3 files changed, 65 insertions(+), 66 deletions(-) commit 1cf8f7e5af3910781a21b84f13a34851aa228fe3 Author: Ulf Hansson Date: Fri Jun 9 14:15:01 2017 +0200 mmc: core: Move mmc bkops functions from core.c to mmc_ops.c The mmc_start_bkops(), mmc_stop_bkops() and mmc_read_bkops_status() functions are all specific to eMMCs. To make this clear, let's move them from from core.c to mmc_ops.c and take the opportunity to make mmc_read_bkops_status() static. While moving them, get rid of MMC_BKOPS_MAX_TIMEOUT (4 min) and use the common default timeout MMC_OPS_TIMEOUT_MS (10 min) instead, as there is no need to have specific default timeout for bkops. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin drivers/mmc/core/core.c | 118 --------------------------------------------- drivers/mmc/core/mmc_ops.c | 113 +++++++++++++++++++++++++++++++++++++++++++ drivers/mmc/core/mmc_ops.h | 1 - 3 files changed, 113 insertions(+), 119 deletions(-) commit 066d9cc546c20e5f4f3c3c4ca08c107506728dcb Author: Ulf Hansson Date: Thu Jun 8 15:27:37 2017 +0200 mmc: core: Don't export some eMMC specific functions from core.c The mmc_start|stop_bkops(), mmc_read_bkops_status() and mmc_interrupt_hpi() functions are all used from within the mmc core module, thus there are no need to use EXPORT_SYMBOL() for them, so let's remove it. Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin drivers/mmc/core/core.c | 4 ---- 1 file changed, 4 deletions(-) commit 3aa9995136cdaecf7dd7b4f50a5a272f71054c33 Author: Kishon Vijay Abraham I Date: Wed Jun 7 14:06:12 2017 +0530 Documentation: dt-bindings: Document deprecation of "vmmc_aux" and using "vqmmc" Document deprecation of "vmmc_aux" for io regulator and use of generic mmc binding "vqmmc" in omap-hsmmc. Signed-off-by: Kishon Vijay Abraham I Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13ab2a66d862e00f55ae0ba46e61117c50dbdb17 Author: Kishon Vijay Abraham I Date: Wed Jun 7 14:06:11 2017 +0530 mmc: host: omap_hsmmc: use mmc_regulator_get_supply() to get regulators In preparation for using the generic mmc binding for io regulator ("vqmmc"), use mmc_regulator_get_supply() to get vmmc and vqmmc regulators. Only if "vqmmc" regulator isn't found, fallback to use "vmmc_aux" regulator. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) commit 86d79da0aadde60e4f84fe8cf7a75d4db2a79968 Author: Kishon Vijay Abraham I Date: Wed Jun 7 14:06:10 2017 +0530 mmc: host: omap_hsmmc: Do not initialize MMC regulators to NULL on error Do not initialize MMC regulators to NULL on error in omap_hsmmc driver similar to what is done in mmc_regulator_get_supply(). This is in preparation for using mmc_regulator_get_supply() to get MMC regulators. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit ab723a6d9e22f5c1d82e34159c48c24febe79f77 Author: Kishon Vijay Abraham I Date: Fri Jun 9 14:11:41 2017 +0530 ARM: dts: omap3-overo: Remove "vqmmc-supply" property from MMC dt node commit 94647a30124e2c7 ("ARM: dts: omap3-overo: Enable WiFi/BT combo") while enabling WiFi/BT combo added regulator to trigger the nReset signal of the Bluetooth module in vqmmc-supply. However BT should be handled by UART. Moreover "vqmmc" is not a defined binding for omap_hsmmc. While "vqmmc" in mmc2 hasn't caused any issues so far, mmc2 will start to mis-behave once omap_hsmmc defines "vqmmc" binding. Remove "vqmmc-supply" property in mmc2 here. Signed-off-by: Kishon Vijay Abraham I Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson arch/arm/boot/dts/omap3-overo-base.dtsi | 11 ----------- 1 file changed, 11 deletions(-) commit 4760257cb54e29e9a90e0ce849f4efcd67718816 Author: Adrian Hunter Date: Fri Jun 9 15:27:18 2017 +0300 mmc: sdio: Keep card runtime resumed while adding function devices Drivers core will runtime suspend a device with no driver. That means the SDIO card will be runtime suspended as soon as it is added. It is then runtime resumed to add each function. That is entirely pointless, so add pm runtime get/put to keep the SDIO card runtime resumed until the function devices have been added. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/sdio.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 82e7edc216f1a066da10f224ae2e4cd83e53fc13 Author: Adrian Hunter Date: Fri Jun 9 15:27:17 2017 +0300 mmc: sdio: Tidy error path in mmc_attach_sdio() The error path deletes the device by calling mmc_sdio_remove() which must be called without the host claimed. Simplify the error path so it does just that and add a comment about why we don't disable runtime PM. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/sdio.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bc55dcd822f98cd7c170d0aeac4ed4fb79c86bda Author: Adrian Hunter Date: Thu Jun 1 12:10:07 2017 +0300 mmc: sdhci-pci: Add support for Intel CNP Add PCI ids and enhanced strobe support for Intel CNP. This is combined with GLK due to the pending CMDQ support which they both share. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 46 ++++++++++++++++++++++++++++++++++++++- drivers/mmc/host/sdhci-pci.h | 3 +++ 2 files changed, 48 insertions(+), 1 deletion(-) commit 87317c4d28a762510b273601f00e77423bb3518f Author: Simon Horman Date: Tue May 30 14:50:52 2017 +0200 mmc: tmio, renesas-sdhi: update Renesas related copyrights Update copyrights to reflect work by Wolfram Sang and myself since last year. Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 5 +++-- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 +++ drivers/mmc/host/tmio_mmc.c | 2 ++ drivers/mmc/host/tmio_mmc.h | 5 +++-- drivers/mmc/host/tmio_mmc_core.c | 5 +++-- 5 files changed, 14 insertions(+), 6 deletions(-) commit 6106ecf3bb26af7e13685f10318109f6c56c5ded Author: Simon Horman Date: Tue May 30 14:50:51 2017 +0200 mmc: tmio: use EXPORT_SYMBOL_GPL Use EXPORT_SYMBOL_GPL rather than the non _GPL variant as there seems to be no reason not to. Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c57adc50ae1ab2535d0782ac53716406cef262e7 Author: Simon Horman Date: Tue May 30 14:50:50 2017 +0200 MAINTAINERS: Update files for TMIO/SDHI MMC driver Update files for tmio/sdhi MMC driver to reflect recent filename changes. Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7244ac0eb47678472a199aeb925f5550837f2844 Author: Hans de Goede Date: Wed May 24 12:47:53 2017 +0200 mmc: sdhci-acpi: Remove unneeded acpi_bus_get_status() call The acpi-subsys already calls acpi_bus_get_status() and checks that device->status.present is set before even registering the platform_device so out probe function will never get called if device->status.present is false and there is no need for this check. Signed-off-by: Hans de Goede Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 3 --- 1 file changed, 3 deletions(-) commit 86beb538fa5f9bf6820ed4249332ba22a9fafe99 Author: Wolfram Sang Date: Tue May 23 15:34:08 2017 +0200 mmc: tmio: make sure SDIO gets reinitialized after resume To achieve that, we set the registers in the generic HW reset routine which gets called at both, init and resume. We also make sure to move SDIO initialization before reset gets called in probe(). Signed-off-by: Wolfram Sang Tested-by: Masaharu Hayakawa Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit c949c907497267a97639fee858de9d6691296b99 Author: Matthias Kraemer Date: Mon May 15 23:44:17 2017 +0200 mmc: sdhci-pci: Use macros in pci_ids definition This patch applies customized PCI_DEVICE_ macros to specify the pci_ids instead of open-coding them within the sdhci-pci driver. By introducing device specific macros the pci_ids table becomes much shorter and easier to comprehend than it would be possible using the generic version of the PCI_DEVICE_ macros. Signed-off-by: Matthias Kraemer Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 618 +++++--------------------------------- drivers/mmc/host/sdhci-pci.h | 43 ++- 2 files changed, 112 insertions(+), 549 deletions(-) commit 667123f6c99741bd872d1ff4d7e31bdc4c8139c5 Author: Benoît Thébaudeau Date: Tue May 30 11:14:11 2017 +0200 mmc: sdhci-esdhc-imx: Remove the ENGcm07207 workaround The SDHCI_QUIRK_NO_MULTIBLOCK quirk was used as a workaround for the ENGcm07207 erratum. However, it caused excruciatingly slow SD transfers (300 kB/s on average), and this erratum actually does not imply that multiple-block transfers are not supported, so this was overkill. The suggested workaround for this erratum is to set SYSCTL.RSTA, but the simple DAT line software reset (which resets the DMA circuit among others) triggered by sdhci_finish_data() in case of errors seems to be sufficient. Indeed, generating errors in a controlled manner on i.MX25 using the FEVT register right in the middle of read data transfers without this quirk shows that nothing is written to the buffer by the eSDHC past CMD12, and no extra Auto CMD12 is sent with AC12EN set, so the data transfers on AHB are properly aborted. For write data transfers, neither extra data nor extra Auto CMD12 is sent, as expected. Moreover, after intensive stress tests on i.MX25, removing SDHCI_QUIRK_NO_MULTIBLOCK seems to be safe. SDHCI_QUIRK_BROKEN_ADMA has nothing to do with ENGcm07207, so set ESDHC_FLAG_ERR004536 for the devices that had ESDHC_FLAG_ENGCM07207 set in order to continue getting SDHCI_QUIRK_BROKEN_ADMA. Signed-off-by: Benoît Thébaudeau Acked-by: Adrian Hunter Reviewed-by: Fabio Estevam Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 5143c953a7864c7abacf1c167c4350d641626949 Author: Benoît Thébaudeau Date: Tue May 30 11:14:10 2017 +0200 mmc: sdhci-esdhc-imx: Allow all supported prescaler values On i.MX, SYSCTL.SDCLKFS may always be set to 0 in order to make the SD clock frequency prescaler divide by 1 in SDR mode, even with the eSDHC. The previous minimum prescaler value of 2 in SDR mode with the eSDHC was a code remnant from PowerPC, which actually has this limitation on earlier revisions. In DDR mode, the prescaler can divide by up to 512. The maximum SD clock frequency in High Speed mode is 50 MHz. On i.MX25, this change makes it possible to get 48 MHz from the USB PLL (240 MHz / 5 / 1) instead of only 40 MHz from the USB PLL (240 MHz / 3 / 2) or 33.25 MHz from the AHB clock (133 MHz / 2 / 2). Signed-off-by: Benoît Thébaudeau Acked-by: Adrian Hunter Reviewed-by: Fabio Estevam Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 81a0a8bc380d847fc62605c27067b5c1d025bea2 Author: Benoît Thébaudeau Date: Tue May 30 11:14:09 2017 +0200 mmc: sdhci-esdhc-imx: Fix DAT line software reset On i.MX25, the eSDHC DAT line software reset (SYSCTL.RSTD) unexpectedly clears at least the data transfer width (PROCTL.DTW), which then results in data CRC errors. This behavior is not documented, but it has actually been observed. Consequently, the DAT line software resets triggered by sdhci.c in case of errors caused unrecoverable errors. Fix this by making sure that the DAT line software reset does not alter the Host Control register. This behavior being undocumented, it may also be present on other i.MX SoCs, so apply this fix for the whole i.MX family. Signed-off-by: Benoît Thébaudeau Acked-by: Adrian Hunter Reviewed-by: Fabio Estevam Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 59 ++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 21 deletions(-) commit cbb4509374963bea440c15ff26e2501d15e7927a Author: Benoît Thébaudeau Date: Tue May 30 11:14:08 2017 +0200 mmc: sdhci-esdhc: Add SDHCI_QUIRK_32BIT_DMA_ADDR The eSDHC can only DMA from 32-bit-aligned addresses. This fixes the following test cases of mmc_test: 11: Badly aligned write 12: Badly aligned read 13: Badly aligned multi-block write 14: Badly aligned multi-block read Signed-off-by: Benoît Thébaudeau Acked-by: Adrian Hunter Reviewed-by: Fabio Estevam Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc.h | 1 + 1 file changed, 1 insertion(+) commit d04f8d5b949d972918ef8174d7702275ff6dbb08 Author: Benoît Thébaudeau Date: Tue May 30 11:14:07 2017 +0200 mmc: sdhci-esdhc-imx: Fix some English mistakes and typos Fix various English mistakes and typos in comments and in printed strings. Signed-off-by: Benoît Thébaudeau Acked-by: Adrian Hunter Reviewed-by: Fabio Estevam Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 49 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 24 deletions(-) commit 16f2e0c6ffdfaf964bb0a6d5e67253a1c8116f0e Author: Phong LE Date: Wed May 24 09:53:52 2017 +0200 mmc: mediatek: Fixed size in dma_free_coherent The dma gpd dma_free_coherent call size in invalid. Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Signed-off-by: Phong LE Signed-off-by: Neil Armstrong Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c00a231ba053a9b0be8d512957b99395b92bc620 Author: Gustavo A. R. Silva Date: Thu May 25 12:04:55 2017 -0500 mmc: bcm2835: fix potential null pointer dereferences Null check at line 1165: if (mrq->cmd), implies that mrq->cmd might be NULL. Add null checks before dereferencing pointer mrq->cmd in order to avoid any potential NULL pointer dereference. Addresses-Coverity-ID: 1408740 Tested-by: Stefan Wahren Signed-off-by: Gustavo A. R. Silva Signed-off-by: Ulf Hansson drivers/mmc/host/bcm2835.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit d63c2bf49c0de83e88153da3af9970f68c633257 Author: Wolfram Sang Date: Sun May 28 11:30:47 2017 +0200 mmc: use proper name for the R-Car SoC It is 'R-Car', not 'RCar'. No code or binding changes, only descriptive text. Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 2 +- include/linux/mfd/tmio.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 73a47a9bb3e2c4a9c553c72456e63ab991b1a4d9 Author: David Woods Date: Fri May 26 17:53:21 2017 -0400 mmc: core: Use device_property_read instead of of_property_read Using the device_property interfaces allows mmc drivers to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods Reviewed-by: Chris Metcalf Cc: stable@vger.linux.org Signed-off-by: Ulf Hansson drivers/mmc/core/host.c | 72 ++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 37 deletions(-) commit 852ff5fea9eb6a9799f1881d6df2cd69a9e6eed5 Author: David Woods Date: Fri May 26 17:53:20 2017 -0400 mmc: dw_mmc: Use device_property_read instead of of_property_read Using the device_property interfaces allows the dw_mmc driver to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods Reviewed-by: Chris Metcalf Cc: stable@vger.linux.org Acked-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 55d4d1e34195bf6a0aa0473345bdc9108e6d6625 Author: Shawn Lin Date: Wed May 24 08:34:48 2017 +0800 Documentation: rockchip-dw-mshc: add description for rk3328 Add "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc" for dwmmc on rk3328 platform. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt | 1 + 1 file changed, 1 insertion(+) commit 17b1eb7f0bf3dca2ee2baa283d04187207de5b83 Author: Fabio Estevam Date: Tue May 16 19:08:31 2017 -0300 mmc: sdhci-esdhc-imx: Check the return value from clk_prepare_enable() clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 54 +++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 13 deletions(-) commit 7322238f166c7af8245b5da76d70229d25465142 Author: Wu Fengguang Date: Tue May 23 05:11:33 2017 +0800 mmc: block: fix semicolon.cocci warnings drivers/mmc/core/block.c:1929:3-4: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Linus Walleij Signed-off-by: Fengguang Wu Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2185bc2cd617de0a0b3b7c5a0ca42c82d0a15cff Author: Ulf Hansson Date: Mon May 22 10:23:58 2017 +0200 mmc: block: Use __mmc_send_status() and drop get_card_status() The only reason to why the mmc block device driver needs to implements its own version of how to get the status of the card, is that it needs to specify a different amount of retries. Therefore add a new exported function which allows the caller to specify the number of retries and convert everybody to use it, as this simplifies the code. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij drivers/mmc/core/block.c | 22 +++------------------- drivers/mmc/core/mmc_ops.c | 10 ++++++++-- drivers/mmc/core/mmc_ops.h | 1 + 3 files changed, 12 insertions(+), 21 deletions(-) commit 0493f6fe5bdee8ac101a1a0c449971c2d4665e99 Author: Linus Walleij Date: Fri May 19 15:37:30 2017 +0200 mmc: block: Move boot partition locking into a driver op This moves the boot partition lock command (issued from sysfs) into a custom block layer request, just like the ioctl()s, getting rid of yet another instance of mmc_get_card(). Since we now have two operations issuing special DRV_OP's, we rename the result variable ->drv_op_result. Tested by locking the boot partition from userspace: > cd /sys/devices/platform/soc/80114000.sdi4_per2/mmc_host/mmc3/ mmc3:0001/block/mmcblk3/mmcblk3boot0 > echo 1 > ro_lock_until_next_power_on [ 178.645324] mmcblk3boot1: Locking boot partition ro until next power on [ 178.652221] mmcblk3boot0: Locking boot partition ro until next power on Also tested this with a huge dd job in the background: it is now possible to lock the boot partitions on the card even under heavy I/O. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 53 +++++++++++++++++++++++++++--------------------- drivers/mmc/core/queue.h | 4 +++- 2 files changed, 33 insertions(+), 24 deletions(-) commit 5ec1239694c74e8feebe967bf467081445622004 Author: Linus Walleij Date: Fri May 19 15:37:29 2017 +0200 mmc: block: Move DRV OP issue function We will need to access static functions above the pure block layer operations in the file, so move the driver operations issue function down so we can see all non-blocklayer symbols. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 74 ++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 37 deletions(-) commit 02166a01f8113c6374d6f1512befa9233c837fa0 Author: Linus Walleij Date: Fri May 19 15:37:28 2017 +0200 mmc: block: Tag DRV_OPs with a driver operation type We will expand the DRV_OP usage, so we need to know which operation we're performing. Tag the operations with an enum:ed type and rename the function so it is clear that it deals with any command and put a switch statement in it. Currently only ioctls are supported. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 37 ++++++++++++++++++++++++------------- drivers/mmc/core/queue.h | 9 +++++++++ 2 files changed, 33 insertions(+), 13 deletions(-) commit 67e69d5220c904238f94bb2e6001d7c590f5a0bb Author: Linus Walleij Date: Fri May 19 15:37:27 2017 +0200 mmc: block: remove req back pointer Just as we can use blk_mq_rq_from_pdu() to get the per-request tag we can use blk_mq_rq_to_pdu() to get a request from a tag. Introduce a static inline helper so we are on the clear what is happening. Suggested-by: Christoph Hellwig Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 8 ++++---- drivers/mmc/core/queue.c | 13 +++++-------- drivers/mmc/core/queue.h | 8 +++++++- 3 files changed, 16 insertions(+), 13 deletions(-) commit 921579b22f99170c6bc2d57f2720b54e017e99cc Author: Wolfram Sang Date: Fri May 19 15:31:55 2017 +0200 mmc: sdhi: add CMD23 support to R-Car Gen2 & Gen3 Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_sys_dmac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8b22c3c18be5e7b538e80e103d850bc994f2a73e Author: Wolfram Sang Date: Fri May 19 15:31:54 2017 +0200 mmc: tmio: add CMD23 support Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 41 +++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit f5fdcd1d55c7249f1e1595f5c61e972879bbef7e Author: Wolfram Sang Date: Fri May 19 15:31:53 2017 +0200 mmc: tmio: move finish_request function further down Plain code move with no changes. Needed for refactoring. Also, looks nicer if request and finish_request are next to each other. Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 76 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit c592742468517228faf3688d64f0cee109816de4 Author: Wolfram Sang Date: Fri May 19 15:31:52 2017 +0200 mmc: tmio: remove outdated comment The obviously wrong comment was added in 2011 with commit df3ef2d3c92c0a ("mmc: protect the tmio_mmc driver against a theoretical race") but already obsoleted half a year later with commit b9269fdd4f61aa ("mmc: tmio: fix recursive spinlock, don't schedule with interrupts disabled"). Fixes: b9269fdd4f61aa ("mmc: tmio: fix recursive spinlock, don't schedule with interrupts disabled") Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 1 - 1 file changed, 1 deletion(-) commit de2a6bb91367ff51ac6654f2126fe27f92c3ba28 Author: Wolfram Sang Date: Fri May 19 15:31:51 2017 +0200 mmc: tmio: refactor handling mrq Split handling mrq into a seperate function. We need to call it from another place soon. Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 46 +++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) commit 10c998ef97278c803edd9e2297113896436ef3c8 Author: Wolfram Sang Date: Fri May 19 15:31:50 2017 +0200 mmc: tmio: make tmio_mmc_request function more readable This part confused me and I had to read it twice until I got it. Let's follow the standard pattern to bail out if something is wrong and keep in the body of the function when everything is as expected. Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e1df7ae30b430a3183d2a0a9b3e0b802f9d5ff49 Author: Markus Elfring Date: Fri May 19 13:15:27 2017 +0200 mmc: core: Delete error messages for failed memory allocations Omit an extra message for memory allocation failures. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 2 -- drivers/mmc/core/sd.c | 16 +++------------- 2 files changed, 3 insertions(+), 15 deletions(-) commit 9b344ba4205ee19dec1a57dd7bdc38473336e19e Author: Markus Elfring Date: Sat May 13 15:05:28 2017 +0200 mmc: atmel-mci: Delete an error message for a failed memory allocation Omit an extra message for a memory allocation failure. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Ulf Hansson drivers/mmc/host/atmel-mci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b428e712e1c684a17d788f8e29c7e61f0d92b690 Author: Linus Walleij Date: Thu May 18 11:29:36 2017 +0200 mmc: queue: delete mmc_req_is_special() commit cdf8a6fb48882651049e468e6b16956fb83db86c "mmc: block: Introduce queue semantics" deleted the last user of mmc_req_is_special() and it was a horrible hack to classify requests as "special" or "not special" to begin with, so delete the helper. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/queue.h | 8 -------- 1 file changed, 8 deletions(-) commit 3ecd8cf23f88d5df1c545a5c04217987abb28575 Author: Linus Walleij Date: Thu May 18 11:29:35 2017 +0200 mmc: block: move multi-ioctl() to use block layer This switches also the multiple-command ioctl() call to issue all ioctl()s through the block layer instead of going directly to the device. We extend the passed argument with an argument count and loop over all passed commands in the ioctl() issue function called from the block layer. By doing this we are again loosening the grip on the big host lock, since two calls to mmc_get_card()/mmc_put_card() are removed. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson Tested-by: Avri Altman drivers/mmc/core/block.c | 38 +++++++++++++++++++++++++------------- drivers/mmc/core/queue.h | 3 ++- 2 files changed, 27 insertions(+), 14 deletions(-) commit 614f0388f580c436d2cf6dc0855de91d13ddc23d Author: Linus Walleij Date: Thu May 18 11:29:34 2017 +0200 mmc: block: move single ioctl() commands to block requests This wraps single ioctl() commands into block requests using the custom block layer request types REQ_OP_DRV_IN and REQ_OP_DRV_OUT. By doing this we are loosening the grip on the big host lock, since two calls to mmc_get_card()/mmc_put_card() are removed. We are storing the ioctl() in/out argument as a pointer in the per-request struct mmc_blk_request container. Since we now let the block layer allocate this data, blk_get_request() will allocate it for us and we can immediately dereference it and use it to pass the argument into the block layer. We refactor the if/else/if/else ladder in mmc_blk_issue_rq() as part of the job, keeping some extra attention to the case when a NULL req is passed into this function and making that pipeline flush more explicit. Tested on the ux500 with the userspace: mmc extcsd read /dev/mmcblk3 resulting in a successful EXTCSD info dump back to the console. This commit fixes a starvation issue in the MMC/SD stack that can be easily provoked in the following way by issueing the following commands in sequence: > dd if=/dev/mmcblk3 of=/dev/null bs=1M & > mmc extcs read /dev/mmcblk3 Before this patch, the extcsd read command would hang (starve) while waiting for the dd command to finish since the block layer was holding the card/host lock. After this patch, the extcsd ioctl() command is nicely interpersed with the rest of the block commands and we can issue a bunch of ioctl()s from userspace while there is some busy block IO going on without any problems. Conversely userspace ioctl()s can no longer starve the block layer by holding the card/host lock. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson Tested-by: Avri Altman drivers/mmc/core/block.c | 111 ++++++++++++++++++++++++++++++++++++----------- drivers/mmc/core/queue.h | 3 ++ 2 files changed, 88 insertions(+), 26 deletions(-) commit 829043c48e5d7169d45a04027a787b55133f4cf6 Author: Linus Walleij Date: Thu May 18 11:29:33 2017 +0200 mmc: block: Tag is_rpmb as bool The variable is_rpmb is clearly a bool and even assigned true and false, yet declared as an int. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 304419d8a7e9204c5d19b704467b814df8c8f5b1 Author: Linus Walleij Date: Thu May 18 11:29:32 2017 +0200 mmc: core: Allocate per-request data using the block layer core The mmc_queue_req is a per-request state container the MMC core uses to carry bounce buffers, pointers to asynchronous requests and so on. Currently allocated as a static array of objects, then as a request comes in, a mmc_queue_req is assigned to it, and used during the lifetime of the request. This is backwards compared to how other block layer drivers work: they usally let the block core provide a per-request struct that get allocated right beind the struct request, and which can be obtained using the blk_mq_rq_to_pdu() helper. (The _mq_ infix in this function name is misleading: it is used by both the old and the MQ block layer.) The per-request struct gets allocated to the size stored in the queue variable .cmd_size initialized using the .init_rq_fn() and cleaned up using .exit_rq_fn(). The block layer code makes the MMC core rely on this mechanism to allocate the per-request mmc_queue_req state container. Doing this make a lot of complicated queue handling go away. We only need to keep the .qnct that keeps count of how many request are currently being processed by the MMC layer. The MQ block layer will replace also this once we transition to it. Doing this refactoring is necessary to move the ioctl() operations into custom block layer requests tagged with REQ_OP_DRV_[IN|OUT] instead of the custom code using the BigMMCHostLock that we have today: those require that per-request data be obtainable easily from a request after creating a custom request with e.g.: struct request *rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM); struct mmc_queue_req *mq_rq = req_to_mq_rq(rq); And this is not possible with the current construction, as the request is not immediately assigned the per-request state container, but instead it gets assigned when the request finally enters the MMC queue, which is way too late for custom requests. Signed-off-by: Linus Walleij [Ulf: Folded in the fix to drop a call to blk_cleanup_queue()] Signed-off-by: Ulf Hansson Tested-by: Heiner Kallweit drivers/mmc/core/block.c | 38 ++------ drivers/mmc/core/queue.c | 220 ++++++++++++----------------------------------- drivers/mmc/core/queue.h | 22 ++--- include/linux/mmc/card.h | 2 - 4 files changed, 78 insertions(+), 204 deletions(-) commit c3dccb74be28a345a2ebcc224e41b774529b8b8f Author: Linus Walleij Date: Thu May 18 11:29:31 2017 +0200 mmc: core: Delete bounce buffer Kconfig option This option is activated by all multiplatform configs and what not so we almost always have it turned on, and the memory it saves is negligible, even more so moving forward. The actual bounce buffer only gets allocated only when used, the only thing the ifdefs are saving is a little bit of code. It is highly improper to have this as a Kconfig option that get turned on by Kconfig, make this a pure runtime-thing and let the host decide whether we use bounce buffers. We add a new property "disable_bounce" to the host struct. Notice that mmc_queue_calc_bouncesz() already disables the bounce buffers if host->max_segs != 1, so any arch that has a maximum number of segments higher than 1 will have bounce buffers disabled. The option CONFIG_MMC_BLOCK_BOUNCE is default y so the majority of platforms in the kernel already have it on, and it then gets turned off at runtime since most of these have a host->max_segs > 1. The few exceptions that have host->max_segs == 1 and still turn off the bounce buffering are those that disable it in their defconfig. Those are the following: arch/arm/configs/colibri_pxa300_defconfig arch/arm/configs/zeus_defconfig - Uses MMC_PXA, drivers/mmc/host/pxamci.c - Sets host->max_segs = NR_SG, which is 1 - This needs its bounce buffer deactivated so we set host->disable_bounce to true in the host driver arch/arm/configs/davinci_all_defconfig - Uses MMC_DAVINCI, drivers/mmc/host/davinci_mmc.c - This driver sets host->max_segs to MAX_NR_SG, which is 16 - That means this driver anyways disabled bounce buffers - No special action needed for this platform arch/arm/configs/lpc32xx_defconfig arch/arm/configs/nhk8815_defconfig arch/arm/configs/u300_defconfig - Uses MMC_ARMMMCI, drivers/mmc/host/mmci.[c|h] - This driver by default sets host->max_segs to NR_SG, which is 128, unless a DMA engine is used, and in that case the number of segments are also > 1 - That means this driver already disables bounce buffers - No special action needed for these platforms arch/arm/configs/sama5_defconfig - Uses MMC_SDHCI, MMC_SDHCI_PLTFM, MMC_SDHCI_OF_AT91, MMC_ATMELMCI - Uses drivers/mmc/host/sdhci.c - Normally sets host->max_segs to SDHCI_MAX_SEGS which is 128 and thus disables bounce buffers - Sets host->max_segs to 1 if SDHCI_USE_SDMA is set - SDHCI_USE_SDMA is only set by SDHCI on PCI adapers - That means that for this platform bounce buffers are already disabled at runtime - No special action needed for this platform arch/blackfin/configs/CM-BF533_defconfig arch/blackfin/configs/CM-BF537E_defconfig - Uses MMC_SPI (a simple MMC card connected on SPI pins) - Uses drivers/mmc/host/mmc_spi.c - Sets host->max_segs to MMC_SPI_BLOCKSATONCE which is 128 - That means this platform already disables bounce buffers at runtime - No special action needed for these platforms arch/mips/configs/cavium_octeon_defconfig - Uses MMC_CAVIUM_OCTEON, drivers/mmc/host/cavium.c - Sets host->max_segs to 16 or 1 - Setting host->disable_bounce to be sure for the 1 case arch/mips/configs/qi_lb60_defconfig - Uses MMC_JZ4740, drivers/mmc/host/jz4740_mmc.c - This sets host->max_segs to 128 so bounce buffers are already runtime disabled - No action needed for this platform It would be interesting to come up with a list of the platforms that actually end up using bounce buffers. I have not been able to infer such a list, but it occurs when host->max_segs == 1 and the bounce buffering is not explicitly disabled. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/Kconfig | 18 ------------------ drivers/mmc/core/queue.c | 15 +-------------- drivers/mmc/host/cavium.c | 4 +++- drivers/mmc/host/pxamci.c | 6 +++++- include/linux/mmc/host.h | 1 + 5 files changed, 10 insertions(+), 34 deletions(-) commit 9d08428afb722fedaea699a32aaf603a8f1ebd5a Author: Simon Horman Date: Wed May 10 11:25:30 2017 +0200 mmc: renesas-sdhi: make renesas_sdhi_sys_dmac main module file Make renesas_sdhi_sys_dmac.c a top-level module file that makes use of library code supplied by renesas_sdhi_core.c This is in order to facilitate adding other variants of SDHI; in particular SDHI using different DMA controllers. Signed-off-by: Simon Horman Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson [Arnd: Fixed module build error] Signed-off-by: Arnd Bergmann drivers/mmc/host/renesas_sdhi.h | 23 +++++- drivers/mmc/host/renesas_sdhi_core.c | 134 ++----------------------------- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 109 ++++++++++++++++++++++++- 3 files changed, 137 insertions(+), 129 deletions(-) commit b5b6a5f4f06c0624886b2166e2e8580327f0b943 Author: Simon Horman Date: Wed May 10 11:25:29 2017 +0200 mmc: renesas-sdhi: rename sh_mobile_sdhi.c => renesas_sdhi_core.c Rename the source file SDHI. A follow-up patch will make it a library file used by a different top-level module file. The name "renesas" is chosen as the SDHI driver is applicable to a wider range of SoCs than SH-Mobile it seems to be a more appropriate name. However, the SDHI driver source itself, is left as sh_mobile_sdhi to avoid unnecessary churn. the name "core" was chosen to reflect the desired role of this file, to provide core functionality to the sdhi driver. A follow-up patch will move the file into that role. Internal symbols have also been renamed to reflect the filename change. The .name member of struct platform_driver and parameter to MODULE_ALIAS() have not been changed in order to avoid the complication of potentially breaking SH SoCs which still use platform drivers. Signed-off-by: Simon Horman Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 4 +- drivers/mmc/host/Makefile | 2 +- drivers/mmc/host/renesas_sdhi_core.c | 770 +++++++++++++++++++++++++++++++++++ drivers/mmc/host/sh_mobile_sdhi.c | 770 ----------------------------------- 4 files changed, 773 insertions(+), 773 deletions(-) commit c2a96987c76f093be50550130f5629723b091176 Author: Simon Horman Date: Wed May 10 11:25:28 2017 +0200 mmc: renesas-sdhi: rename tmio_mmc_dma.c => renesas_sdhi_sys_dmac.c Rename the source file for DMA for SDHI as a follow-up to attaching DMA code to the SDHI driver rather than the tmio_core driver. The name "renesas" is chosen as the SDHI driver is applicable to a wider range of SoCs than SH-Mobile it seems to be a more appropriate name. However, the SDHI driver source itself, is left as sh_mobile_sdhi to avoid unnecessary churn. The name sys_dmac was chosen to reflect the type of DMA used. Internal symbols have also been renamed to reflect the filename change. A follow-up patch will re-organise the SDHI driver removing the need for renesas_sdhi_get_dma_ops(). Signed-off-by: Simon Horman Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/Makefile | 2 +- drivers/mmc/host/renesas_sdhi.h | 18 ++ drivers/mmc/host/renesas_sdhi_sys_dmac.c | 371 +++++++++++++++++++++++++++++++ drivers/mmc/host/sh_mobile_sdhi.c | 3 +- drivers/mmc/host/tmio_mmc.h | 9 - drivers/mmc/host/tmio_mmc_dma.c | 368 ------------------------------ 6 files changed, 392 insertions(+), 379 deletions(-) commit 426e95d1766bad20e59f219af64fdd50c39bcfee Author: Simon Horman Date: Wed May 10 11:25:27 2017 +0200 mmc: tmio: rename tmio_mmc_{pio => core}.c Rename tmio_mmc_pio.c to tmio_mmc_core.c to more accurately reflect its function: to provide core code for the tmio-mmc and sh-mobole-sdhi drivers. Signed-off-by: Simon Horman Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/Makefile | 1 - drivers/mmc/host/tmio_mmc_core.c | 1390 ++++++++++++++++++++++++++++++++++++++ drivers/mmc/host/tmio_mmc_pio.c | 1390 -------------------------------------- 3 files changed, 1390 insertions(+), 1391 deletions(-) commit 631fa73cfba8dcfd0d1db8eb608527183ed95648 Author: Simon Horman Date: Wed May 10 11:25:26 2017 +0200 mmc: renesas-sdhi, tmio: make dma more modular Refactor DMA support to allow it to be provided by a set of call-backs that are provided by a host driver. The motivation is to allow multiple DMA implementations to be provided and instantiated at run-time. Instantiate the existing DMA implementation from the sh_mobile_sdhi driver which appears to match the current use-case. This has the side effect of moving the DMA code from the tmio_core to the sh_mobile_sdhi driver. A follow-up patch will change the source file for the SDHI DMA implementation accordingly. Another follow-up patch will re-organise the SDHI driver removing the need for tmio_mmc_get_dma_ops(). Signed-off-by: Simon Horman Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/Makefile | 3 +-- drivers/mmc/host/sh_mobile_sdhi.c | 2 +- drivers/mmc/host/tmio_mmc.c | 2 +- drivers/mmc/host/tmio_mmc.h | 55 ++++++++++++++++----------------------- drivers/mmc/host/tmio_mmc_dma.c | 24 +++++++++++++---- drivers/mmc/host/tmio_mmc_pio.c | 43 +++++++++++++++++++++++++++++- 6 files changed, 86 insertions(+), 43 deletions(-) commit b21f13d8f7bf1b65b2e5396fbd8bfb857627b666 Author: Simon Horman Date: Wed May 10 11:25:25 2017 +0200 mmc: tmio: drop filenames from comment at top of source Reshuffle the comment at the top of the source dropping filenames and moving up human readable strings. This seems to be somewhat more useful information to start the source file with. It is also less fragile, f.e. to file renames. Signed-off-by: Simon Horman Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.c | 8 +++----- drivers/mmc/host/tmio_mmc.h | 7 +++---- drivers/mmc/host/tmio_mmc_dma.c | 4 +--- drivers/mmc/host/tmio_mmc_pio.c | 8 +++----- 4 files changed, 10 insertions(+), 17 deletions(-) commit 0eebf9b9084f97905f77bb5d6d9ea7aa17427509 Author: Ulf Hansson Date: Wed Apr 19 22:41:43 2017 +0200 Revert "mmc: dw_mmc: Don't allow Runtime PM for SDIO cards" This reverts commit a6db2c86033b ("mmc: dw_mmc: Don't allow Runtime PM for SDIO cards")' As dw_mmc now is capable of preventing runtime PM suspend while SDIO IRQs are enabled, let's drop the less fine-grained method, which is preventing runtime PM suspend for all SDIO cards - no matter of whether SDIO IRQs are being enabled or not. In this way we don't keep the host runtime PM resumed, unless it's really needed, thus avoiding to waste power. Especially when SDIO IRQs is supported via a separate out-of-band IRQ line, which isn't defined by the SDIO standard, typically the SDIO func driver doesn't enable SDIO IRQs via sdio_claim_irq(). So, for these cases we can now allow the dwmmc device to be runtime PM suspended in-between requests. Signed-off-by: Ulf Hansson Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson drivers/mmc/host/dw_mmc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit ca8971ca5753e95da978e7941f0228120b6bbb96 Author: Ulf Hansson Date: Tue Apr 18 13:37:32 2017 +0200 mmc: dw_mmc: Prevent runtime PM suspend when SDIO IRQs are enabled To be able to handle SDIO IRQs the dw_mmc device needs to be powered and providing clock to the SDIO card. Therefore, we must not allow the device to be runtime PM suspended while SDIO IRQs are enabled. To fix this, let's increase the runtime PM usage count while the mmc core enables SDIO IRQs. Later when the mmc core tells dw_mmc to disable SDIO IRQs, we drop the usage count to again allow runtime PM suspend. This now becomes the default behaviour for dw_mmc. In cases where SDIO IRQs can be re-routed as GPIO wake-ups during runtime PM suspend, one could potentially allow runtime PM suspend. However, that will have to be addressed as a separate change on top of this one. Signed-off-by: Ulf Hansson Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson drivers/mmc/host/dw_mmc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 32dba73772f8bf156bb3bd002b3334178a43032f Author: Ulf Hansson Date: Tue Apr 18 13:29:20 2017 +0200 mmc: dw_mmc: Convert to use MMC_CAP2_SDIO_IRQ_NOTHREAD for SDIO IRQs Convert to use the more lightweight method for processing SDIO IRQs, which involves the following changes: - Enable MMC_CAP2_SDIO_IRQ_NOTHREAD when SDIO IRQ is supported and use sdio_signal_irq() instead of mmc_signal_sdio_irq(). - Mask the SDIO IRQ before signaling a new one to be processed. - Implement the ->ack_sdio_irq() callback to unmask the SDIO IRQ. Signed-off-by: Ulf Hansson Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson drivers/mmc/host/dw_mmc.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 682696605c7093d2800c498c04166831e5aedf87 Author: Ulf Hansson Date: Thu Apr 13 16:48:11 2017 +0200 mmc: sdio: Add API to manage SDIO IRQs from a workqueue For hosts not supporting MMC_CAP2_SDIO_IRQ_NOTHREAD but MMC_CAP_SDIO_IRQ, the SDIO IRQs are processed from a dedicated kernel thread. For these cases, the host calls mmc_signal_sdio_irq() from its ISR to signal a new SDIO IRQ. Signaling an SDIO IRQ makes the host's ->enable_sdio_irq() callback to be invoked to temporary disable the IRQs, before the kernel thread is woken up to process it. When processing of the IRQs are completed, they are re-enabled by the kernel thread, again via invoking the host's ->enable_sdio_irq(). The observation from this, is that the execution path is being unnecessary complex, as the host driver already knows that it needs to temporary disable the IRQs before signaling a new one. Moreover, replacing the kernel thread with a work/workqueue would not only greatly simplify the code, but also make it more robust. To address the above problems, let's continue to build upon the support for MMC_CAP2_SDIO_IRQ_NOTHREAD, as it already implements SDIO IRQs to be processed without using the clumsy kernel thread and without the ping-pong calls of the host's ->enable_sdio_irq() callback for each processed IRQ. Therefore, let's add new API sdio_signal_irq(), which enables hosts to signal/process SDIO IRQs by using a work/workqueue, rather than using the kernel thread. Add also a new host callback ->ack_sdio_irq(), which the work invokes when the SDIO IRQs have been processed. This informs the host about when it shall re-enable the SDIO IRQs. Potentially, we could re-use the existing ->enable_sdio_irq() callback instead of adding a new one, however it has turned out that it's more convenient for hosts to get this information via a separate callback. Hosts that wants to use this new method to signal/process SDIO IRQs, must enable MMC_CAP2_SDIO_IRQ_NOTHREAD and implement the ->ack_sdio_irq() callback. Signed-off-by: Ulf Hansson Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson drivers/mmc/core/host.c | 2 ++ drivers/mmc/core/sdio_irq.c | 16 ++++++++++++++++ drivers/mmc/core/sdio_ops.h | 2 ++ include/linux/mmc/host.h | 3 +++ 4 files changed, 23 insertions(+) commit e3a84267ab3184656929b4cbf03fca4d446125dd Author: Ulf Hansson Date: Wed Apr 19 21:52:29 2017 +0200 mmc: core: Prevent processing SDIO IRQs when none is claimed In cases when MMC_CAP2_SDIO_IRQ_NOTHREAD is set, there is a minor window for when the mmc host could call sdio_run_irqs(), while in fact an SDIO func driver could have decided to released the SDIO IRQ via a call to sdio_release_irq(). In this scenario, processing of the SDIO IRQs are done even if there is none IRQ claimed, which is not what we want. To prevent this from happen, close the window by validating that at least one SDIO IRQs is claimed, before deciding to process them. Signed-off-by: Ulf Hansson Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson drivers/mmc/core/sdio_irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 52c8212d80b69d2197bb8506384b6e6a0aef7fb7 Author: Ulf Hansson Date: Mon May 8 23:52:04 2017 +0200 mmc: core: Don't do eMMC HW reset when resuming the eMMC card In case if a pwrseq-emmc has been bound to the host, a call to mmc_power_up() triggers an eMMC HW reset via the pwrseq_emmc's ->post_power_on() callback. This isn't really what we want, as mmc_power_up() is called each time when resuming the card. As a matter of fact, the current approach may also violate the eMMC spec, as the involved delays managed in pwrseq_emmc assumes both VCC and VCCQ has been turned on, which isn't the case for VCCQ, unless the regulator is always on. Fix this behaviour by aligning to the same procedure used when the mmc host implements the ->hw_reset() callback and has the MMC_CAP_HW_RESET flag set. In this way the eMMC HW reset is issued at card detection scan, to cope with bogus bootloaders and in the error recovery path via the mmc specific bus_ops->reset() callback. Signed-off-by: Ulf Hansson Tested-by: Marek Szyprowski drivers/mmc/core/core.c | 2 ++ drivers/mmc/core/mmc.c | 2 ++ drivers/mmc/core/pwrseq_emmc.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) commit 773a9ef85f02f6a82f58244f33cb628ad1ecac21 Author: Ulf Hansson Date: Mon May 8 23:49:12 2017 +0200 mmc: pwrseq: Add reset callback to the struct mmc_pwrseq_ops The ->reset() callback is needed to implement a better support for eMMC HW reset. The following changes will take advantage of the new callback. Suggested-by: Heiner Kallweit Signed-off-by: Ulf Hansson Tested-by: Marek Szyprowski drivers/mmc/core/pwrseq.c | 8 ++++++++ drivers/mmc/core/pwrseq.h | 3 +++ 2 files changed, 11 insertions(+) commit dada0194ab45b896c6bae5ce89eb78cf52e215d4 Author: Johan Hovold Date: Fri May 12 12:03:35 2017 +0200 mmc: vub3000: add missing USB-descriptor endianness conversions Add the missing endianness conversions when printing the USB device-descriptor idVendor and idProduct fields during probe. Signed-off-by: Johan Hovold Signed-off-by: Ulf Hansson drivers/mmc/host/vub300.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef4b160f280f81cab477ba733177c3a658e60a1c Author: Andy Shevchenko Date: Tue May 9 20:21:17 2017 +0300 mmc: atmel-mci: Remove AVR32 bits from the driver AVR32 is gone. Now it's time to clean up the driver by removing leftovers that was used by AVR32 related code. Signed-off-by: Andy Shevchenko Acked-by: Ludovic Desroches Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 8 ++++---- drivers/mmc/host/atmel-mci.c | 24 ++---------------------- 2 files changed, 6 insertions(+), 26 deletions(-) commit 675a7da857146338d047d1a63247bb48e7d5fed5 Author: Colin Ian King Date: Tue May 9 16:45:04 2017 +0100 mmc: sdricoh_cs: remove redundant check if len is non-zero At the end of either of the read or write loops len is always zero and hence the non-zero check on len and return of -EIO is redundant and can be removed. Detected by CoverityScan, CID#114293 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson drivers/mmc/host/sdricoh_cs.c | 3 --- 1 file changed, 3 deletions(-) commit 940e698c902537dac147752d787ff95aad4b6dc5 Author: Shubhrajyoti Datta Date: Tue May 2 15:49:56 2017 +0530 mmc: sdhci-of-arasan: Trivial print fix ret is signed however is printed as unsigned fix the same. If printed as a negative number the result is easier to read. No functional change. Signed-off-by: Shubhrajyoti Datta Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f45a875da46a112f781c25cfa9bcb93aaed4712 Author: Jan Kiszka Date: Fri Jun 9 20:33:13 2017 +0200 gpio: exar: Fix reading of directions and values First, the logic for translating a register bit to the return code of exar_get_direction and exar_get_value were wrong. And second, there was a flip regarding the register bank in exar_get_direction. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Signed-off-by: Linus Walleij drivers/gpio/gpio-exar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5dab5872e59390aa9cca26ee629b95f7179f6c77 Author: Jan Kiszka Date: Fri Jun 9 20:33:11 2017 +0200 gpio: exar: Allocate resources on behalf of the platform device Do not allocate resources on behalf of the parent device but on our own. Otherwise, cleanup does not properly work if gpio-exar is removed but not the parent device. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Signed-off-by: Linus Walleij drivers/gpio/gpio-exar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3936d7437e388f3a91995e8f07fb82affff2f0d Author: Jan Kiszka Date: Fri Jun 9 20:33:10 2017 +0200 gpio-exar/8250-exar: Fix passing in of parent PCI device This fixes reloading of the GPIO driver for the same platform device instance as created by the exar UART driver: First of all, the driver sets drvdata to its own value during probing and does not restore the original value on exit. But this won't help anyway as the core clears drvdata after the driver left. Set the platform device parent instead. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Greg Kroah-Hartman Signed-off-by: Linus Walleij drivers/gpio/gpio-exar.c | 2 +- drivers/tty/serial/8250/8250_exar.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6efaf7cbe6686ea5b066331af3ac06d69a76cd02 Merge: def8e22 a453f36 Author: Linus Walleij Date: Tue Jun 20 10:07:34 2017 +0200 Merge tag 'samsung-pinctrl-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel Samsung pinctrl drivers update for v4.13: 1. Split drivers per ARMv7 and ARMv8 architectures because there is no need to compile everything on each of them. 2. Fix for possible NULL-pointer dereference after memory allocation failure. 3. Cleanups (silencing cast warnings, constify, removal of unneeded casts, removal of modular boiler-plate). commit f6ac438e5e9d8052b07ebe43673b88f0496fed8d Author: Bartosz Golaszewski Date: Fri Jun 9 13:41:32 2017 +0200 gpio: mockup: use devm_kcalloc() where applicable When allocating a zeroed array of objects use devm_kcalloc() instead of manually calculating the required size and using devm_kzalloc(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c60c7f4c6b679822da0033b3b7c077b0a36fd8e9 Author: Bartosz Golaszewski Date: Fri Jun 9 13:41:31 2017 +0200 gpio: mockup: add myself as author Just taking credit for the recent changes and new features. :) Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 2 ++ 1 file changed, 2 insertions(+) commit ec604f151ec01c5c646e73a46620750395a46b60 Author: Bartosz Golaszewski Date: Fri Jun 9 13:41:30 2017 +0200 gpio: mockup: improve the error message Indicate the error number and make the message a bit more elaborate. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4dc9d76c983db100ec91b65f6cee804871e5102f Author: Bartosz Golaszewski Date: Fri Jun 9 13:41:29 2017 +0200 gpio: mockup: don't return magic numbers from probe() When the requested number of GPIO lines is 0, return -EINVAL, not -1 which is -EPERM. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b652336d3fb70b95a5b0a5ea3a32e7116b15be29 Author: Bartosz Golaszewski Date: Fri Jun 9 13:41:28 2017 +0200 gpio: mockup: improve readability We currently shift bits here and there without actually explaining what we're doing. Add some helper variables with names indicating their purpose to improve the code readability. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit b6c2e77d34ff775e4cf4ca803877dafd74737551 Author: Bartosz Golaszewski Date: Fri Jun 9 13:41:27 2017 +0200 gpio: mockup: refuse to accept an odd number of GPIO ranges Currently we ignore the last odd range value, since each chip is described by two values. Be more strict and require the user to pass an even number of ranges. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 650b57b083ef22208c1d10e554f964571221bca4 Author: Bartosz Golaszewski Date: Fri Jun 9 13:41:26 2017 +0200 gpio: mockup: tweak gpio_mockup_event_write() Invert the logic of the irq_enabled check and only access the private data after the input is sanitized. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 6f9b3e776d171636ccafbcb39a8210b4fa37136b Author: Bartosz Golaszewski Date: Fri Jun 9 13:41:25 2017 +0200 gpio: mockup: improve the debugfs input sanitization We're currently only checking the first character of the input to the debugfs event files, so a string like '0sdfdsf' is valid and indicates a falling edge event. Be more strict and only allow '0', '1', '0\n' & '1\n'. While we're at it: move the sanitization code before the irq_enabled check so that we indicate an error on invalid input even if nobody is waiting for events. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit d1ab0da84dcbac30a9039ccef72d69bf0a68bfc7 Author: Prabhakar Kushwaha Date: Fri Jun 9 16:27:21 2017 +0530 mtd: nand: ifc: Initialize SRAM for all version >= 1.0 All IFC version >= 1.0 use 28nm technology for SRAM. Here SRAM has a requirement to initialize before any read operation performed for avoiding ECC Error. So update condition check to initialize SRAM for all IFC version >= 1.0.0 Signed-off-by: Prabhakar Kushwaha Signed-off-by: Boris Brezillon drivers/mtd/nand/fsl_ifc_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d3a966d2b34f449df7859fa39e3db5b71da2bfa Author: Masahiro Yamada Date: Fri Jun 16 14:36:39 2017 +0900 mtd: nand: denali: avoid magic numbers and rename for clarification Introduce some macros and helpers to avoid magic numbers and rename macros/functions for clarification. - We see '| 2' in several places. This means Data Cycle in MAP11 mode. The Denali User's Guide says bit[1:0] of MAP11 is like follows: b'00 = Command Cycle b'01 = Address Cycle b'10 = Data Cycle So, this commit added DENALI_MAP11_{CMD,ADDR,DATA} macros. - We see 'denali->flash_mem + 0x10' in several places, but 0x10 is a magic number. Actually, this accesses the data port of the Host Data/Command Interface. So, this commit added DENALI_HOST_DATA. On the other hand, 'denali->flash_mem' gets access to the address port, so DENALI_HOST_ADDR was also added. - We see 'index_addr(denali, cmd, 0x1)' in denali_erase(), but 0x1 is a magic number. 0x1 means the erase operation. Replace 0x1 with DENALI_ERASE. - Rename index_addr() to denali_host_write() for clarification - Denali User's Guide says MAP{00,01,10,11} for access mode. Match the macros with terminology in the IP document. - Rename struct members as follows: flash_bank -> active_bank (currently selected bank) flash_reg -> reg (base address of registers) flash_mem -> host (base address of host interface) devnum -> devs_per_cs (devices connected in parallel) bbtskipbytes -> oob_skip_bytes (number of bytes to skip in OOB) Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 247 +++++++++++++++++++++--------------------- drivers/mtd/nand/denali.h | 15 +-- drivers/mtd/nand/denali_dt.c | 12 +- drivers/mtd/nand/denali_pci.c | 16 +-- 4 files changed, 144 insertions(+), 146 deletions(-) commit 777f2d49e8e9fbb5d00f54c496877220b6e6ff6c Author: Masahiro Yamada Date: Tue Jun 13 22:45:49 2017 +0900 mtd: nand: denali: enable bad block table scan Now this driver is ready to remove NAND_SKIP_BBTSCAN. The BBT descriptors in denali.c are equivalent to the ones in nand_bbt.c. There is no need to duplicate the equivalent structures. The with-oob decriptors do not work for this driver anyway. The bbt_pattern (offs = 8) and the version (veroffs = 12) area overlaps the ECC area. Set NAND_BBT_NO_OOB flag to use the no_oob variant of the BBT descriptors. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) commit 7d370b2c255612569818134ae0a6d0e46eabfe8b Author: Masahiro Yamada Date: Tue Jun 13 22:45:48 2017 +0900 mtd: nand: denali: use non-managed kmalloc() for DMA buffer As Russell and Lars stated in the discussion [1], using devm_k*alloc() with DMA is not a good idea. Let's use kmalloc (not kzalloc because no need for zero-out). Also, allocate the buffer as late as possible because it must be freed for any error that follows. [1] https://lkml.org/lkml/2017/3/8/693 Signed-off-by: Masahiro Yamada Cc: Russell King Cc: Lars-Peter Clausen Acked-by: Robin Murphy Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 997cde2a222091270ce0c276e567b68e5615f577 Author: Masahiro Yamada Date: Tue Jun 13 22:45:47 2017 +0900 mtd: nand: denali: skip driver internal bounce buffer when possible For ecc->read_page() and ecc->write_page(), it is possible to call dma_map_single() against the given buffer. This bypasses the driver internal bounce buffer and save the memcpy(). Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) commit 57a4d8b5f6482718f17c08f2cdfea085b1d3c12a Author: Masahiro Yamada Date: Tue Jun 13 22:45:46 2017 +0900 mtd: nand: denali: support hardware-assisted erased page detection Recent versions of this IP support automatic erased page detection. If an erased page is detected on reads, the controller does not set INTR__ECC_UNCOR_ERR, but INTR__ERASED_PAGE. The detection of erased pages is based on the number of zeros in a page; if the number of zeros is less than the value in the field ERASED_THRESHOLD, the page is assumed as erased. Please note ERASED_THRESHOLD specifies the number of zeros in a _page_ instead of an ECC chunk. Moreover, the controller does not provide a way to know the actual number of bitflips. Actually, an erased page (all 0xff) is not an ECC correctable pattern on the Denali ECC engine. In other words, there may be overlap between the following two: [1] a bit pattern reachable from a valid payload + ECC pattern within ecc.strength bitflips [2] a bit pattern reachable from an erased state (all 0xff) within ecc.strength bitflips So, this feature may intercept ECC correctable patterns, then replace [1] with [2]. After all, this feature can work safely only when ECC_THRESHOLD == 1, i.e. detect erased pages without any bitflips. This should be the case most of the time. If there is a bitflip or more, the driver will fallback to the software method by using nand_check_erased_ecc_chunk(). Strangely enough, the driver still has to fill the buffer with 0xff in case of INTR__ERASED_PAGE because the ECC correction engine has already manipulated the data in the buffer before it judges erased pages. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 9 ++++++++- drivers/mtd/nand/denali.h | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit 26d266e10e5eb59cfbcc47922655dc3149e1bd59 Author: Masahiro Yamada Date: Tue Jun 13 22:45:45 2017 +0900 mtd: nand: denali: fix raw and oob accessors for syndrome page layout The Denali IP adopts the syndrome page layout; payload and ECC are interleaved, with BBM area always placed at the beginning of OOB. The figure below shows the page organization for ecc->steps == 2: |----------------| |-----------| | | | | | | | | | Payload0 | | | | | | | | | | | | | | | |----------------| | in-band | | ECC0 | | area | |----------------| | | | | | | | | | | | Payload1 | | | | | | | | | | | |----------------| |-----------| | BBM | | | |----------------| | | |Payload1 (cont.)| | | |----------------| |out-of-band| | ECC1 | | area | |----------------| | | | OOB free | | | |----------------| |-----------| The current raw / oob accessors do not take that into consideration, so in-band and out-of-band data are transferred as stored in the device. In the case above, in-band: Payload0 + ECC0 + Payload1(partial) out-of-band: BBM + Payload1(cont.) + ECC1 + OOB-free This is wrong. As the comment block of struct nand_ecc_ctrl says, driver callbacks must hide the specific layout used by the hardware and always return contiguous in-band and out-of-band data. The current implementation is completely screwed-up, so read/write callbacks must be re-worked. Also, it is reasonable to support PIO transfer in case DMA may not work for some reasons. Actually, the Data DMA may not be equipped depending on the configuration of the RTL. This can be checked by reading the bit 4 of the FEATURES register. Even if the controller has the DMA support, dma_set_mask() and dma_map_single() could fail. In either case, the driver can fall back to the PIO transfer. Slower access would be better than giving up. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 610 ++++++++++++++++++++++++++-------------------- drivers/mtd/nand/denali.h | 3 +- 2 files changed, 344 insertions(+), 269 deletions(-) commit 96a376bd93bb76945fce61e2e17ddc7f152b31c6 Author: Masahiro Yamada Date: Tue Jun 13 22:45:44 2017 +0900 mtd: nand: denali: use flag instead of register macro for direction It is not a good idea to re-use macros that represent a specific register bit field for the transfer direction. It is true that bit 8 indicates the direction for the MAP10 pipeline operation and the data DMA operation, but this is not valid across the IP. Use a simple flag (write: 1, read: 0) for the direction. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit 00fc615fd671877cd6e52b556a9d097223b6804e Author: Masahiro Yamada Date: Tue Jun 13 22:45:43 2017 +0900 mtd: nand: denali: merge struct nand_buf into struct denali_nand_info Now struct nand_buf has only two members, so I see no reason for the separation. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 29 ++++++++++++++--------------- drivers/mtd/nand/denali.h | 8 ++------ 2 files changed, 16 insertions(+), 21 deletions(-) commit 2291cb89680637f8f965371973273be312f2cede Author: Masahiro Yamada Date: Tue Jun 13 22:45:42 2017 +0900 mtd: nand: denali: propagate page to helpers via function argument This driver stores the currently addressed page into denali->page, which is later read out by helper functions. While I am tackling on this driver, I often missed to insert "denali->page = page;" where needed. This makes page_read/write callbacks to get access to a wrong page, which is a bug hard to figure out. Instead, I'd rather pass the page via function argument because the compiler's prototype checks will help to detect bugs. For the same reason, propagate dma_addr to the DMA helpers instead of denali->buf.dma_buf . Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 58 ++++++++++++++++++++--------------------------- drivers/mtd/nand/denali.h | 1 - 2 files changed, 24 insertions(+), 35 deletions(-) commit d49f5790278d18fd6b8e474397d9abfdf29a48f2 Author: Masahiro Yamada Date: Tue Jun 13 22:45:41 2017 +0900 mtd: nand: denali: use interrupt instead of polling for bank reset The current bank reset implementation polls the INTR_STATUS register until interested bits are set. This is not good because: - polling simply wastes time-slice of the thread - The while() loop may continue eternally if no bit is set, for example, due to the controller problem. The denali_wait_for_irq() uses wait_for_completion_timeout(), which is safer. We can use interrupt by moving the denali_reset_bank() call below the interrupt setup. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit f486287d2372422d68768c88fe54e80a48aee8ec Author: Masahiro Yamada Date: Tue Jun 13 22:45:40 2017 +0900 mtd: nand: denali: fix bank reset function to detect the number of chips The nand_scan_ident() iterates over maxchips, and calls nand_reset() for each. This driver currently passes the maximum number of banks (=chip selects) supported by the controller as maxchips. So, maxchips is typically 4 or 8. Usually, less number of NAND chips are connected to the controller. This can be a problem for ONFi devices. Now, this driver implements ->setup_data_interface() hook, so nand_setup_data_interface() issues Set Features (0xEF) command, which waits until the chip returns R/B# response. If no chip there, we know it never happens, but the driver still ends up with waiting for a long time. It will finally bail-out with timeout error and the driver will work with existing chips, but unnecessary wait will give a bad user experience. The denali_nand_reset() polls the INTR__RST_COMP and INTR__TIME_OUT bits, but they are always set even if not NAND chip is connected to that bank. To know the chip existence, INTR__INT_ACT bit must be checked; this flag is set only when R/B# is toggled. Since the Reset (0xFF) command toggles the R/B# pin, this can be used to know the actual number of chips, and update denali->max_banks. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 52 +++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) commit fa6134e5457d3177b82b35fa4004505f2571150a Author: Masahiro Yamada Date: Tue Jun 13 22:45:39 2017 +0900 mtd: nand: denali: switch over to cmd_ctrl instead of cmdfunc The NAND_CMD_SET_FEATURES support is missing from denali_cmdfunc(). We also see /* TODO: Read OOB data */ comment. It would be possible to add more commands along with the current implementation, but having ->cmd_ctrl() seems a better approach from the discussion with Boris [1]. Rely on the default ->cmdfunc() from the framework and implement the driver's own ->cmd_ctrl(). This transition also fixes NAND_CMD_STATUS and NAND_CMD_PARAM handling. NAND_CMD_STATUS was just faked by the register read, so the only valid bit was the WP bit. NAND_CMD_PARAM was completely broken; not only the command sent on the bus was NAND_CMD_STATUS instead of NAND_CMD_PARAM, but also the driver was only reading 8 bytes, while the parameter page contains several hundreds of bytes. Also add ->write_byte(), which is needed for write direction commands, ->read/write_buf(16), which will be used some commits later. ->read_word() is not used for now, but the core may call it in the future. Now, this driver can drop nand_onfi_get_set_features_notsupp(). [1] https://lkml.org/lkml/2017/3/15/97 Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 232 ++++++++++++++++++++++++---------------------- drivers/mtd/nand/denali.h | 2 - 2 files changed, 123 insertions(+), 111 deletions(-) commit c19e31d0a32dd3ee555a536414104acf86b9a884 Author: Masahiro Yamada Date: Tue Jun 13 22:45:38 2017 +0900 mtd: nand: denali: rework interrupt handling Simplify the interrupt handling and fix issues: - The register field view of INTR_EN / INTR_STATUS is different among IP versions. The global macro DENALI_IRQ_ALL is hard-coded for Intel platforms. The interrupt mask should be determined at run-time depending on the running platform. - wait_for_irq() loops do {} while() until interested flags are asserted. The logic can be simplified. - The spin_lock() guard seems too complex (and suspicious in a race condition if wait_for_completion_timeout() bails out by timeout). - denali->complete is reused again and again, but reinit_completion() is missing. Add it. Re-work the code to make it more robust and easier to handle. While we are here, also rename the jump label "failed_req_irq" to more appropriate "disable_irq". Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 317 +++++++++++++++++----------------------------- drivers/mtd/nand/denali.h | 1 + 2 files changed, 117 insertions(+), 201 deletions(-) commit 1bb88666775e50fdef1d915d395eca9267bd3ab1 Author: Masahiro Yamada Date: Tue Jun 13 22:45:37 2017 +0900 mtd: nand: denali: handle timing parameters by setup_data_interface() Handling timing parameters in a driver's own way should be avoided because it duplicates efforts of drivers/mtd/nand/nand_timings.c Besides, this driver hard-codes Intel specific parameters such as CLK_X=5, CLK_MULTI=4. Taking a certain device (Samsung K9WAG08U1A) into account by get_samsung_nand_para() is weird as well. Now, the core framework provides .setup_data_interface() hook, which handles timing parameters in a generic manner. While I am working on this, I found even more issues in the current code, so fixed the following as well: - In recent IP versions, WE_2_RE and TWHR2 share the same register. Likewise for ADDR_2_DATA and TCWAW, CS_SETUP_CNT and TWB. When updating one, the other must be masked. Otherwise, the other will be set to 0, then timing settings will be broken. - The recent IP release expanded the ADDR_2_DATA to 7-bit wide. This register is related to tADL. As commit 74a332e78e8f ("mtd: nand: timings: Fix tADL_min for ONFI 4.0 chips") addressed, the ONFi 4.0 increased the minimum of tADL to 400 nsec. This may not fit in the 6-bit ADDR_2_DATA in older versions. Check the IP revision and handle this correctly, otherwise the register value would wrap around. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 345 +++++++++++++++--------------------------- drivers/mtd/nand/denali.h | 26 ++-- drivers/mtd/nand/denali_dt.c | 3 +- drivers/mtd/nand/denali_pci.c | 6 +- 4 files changed, 139 insertions(+), 241 deletions(-) commit 959e9f2ae9dac4821d7da354a37272650febebbe Author: Masahiro Yamada Date: Tue Jun 13 22:45:36 2017 +0900 mtd: nand: denali: remove unneeded find_valid_banks() The function find_valid_banks() issues the Read ID (0x90) command, then compares the first byte (Manufacturer ID) of each bank with the one of bank0. This is equivalent to what nand_scan_ident() does. The number of chips is detected there, so this is unneeded. What is worse for find_valid_banks() is that, if multiple chips are connected to INTEL_CE4100 platform, it crashes the kernel by BUG(). This is what we should avoid. This function is just harmful and unneeded. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 47 ----------------------------------------------- drivers/mtd/nand/denali.h | 1 - 2 files changed, 48 deletions(-) commit b21ff825d6b7fa7122f9c4455f9a0f157b9fb225 Author: Masahiro Yamada Date: Tue Jun 13 22:45:35 2017 +0900 mtd: nand: denali: set NAND_ECC_CUSTOM_PAGE_ACCESS The denali_cmdfunc() actually does nothing valuable for NAND_CMD_{PAGEPROG,READ0,SEQIN}. For NAND_CMD_{READ0,SEQIN}, it copies "page" to "denali->page", then denali_read_page(_raw) compares them just for the sanity check. (Inconsistently, this check is missing from denali_write_page(_raw).) The Denali controller is equipped with high level read/write interface, so let's skip unneeded call of cmdfunc(). If NAND_ECC_CUSTOM_PAGE_ACCESS is set, nand_write_page() will not call ->waitfunc hook. So, ->write_page(_raw) hooks should directly return -EIO on failure. The error handling of page writes will be much simpler. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 41 ++++++++++++----------------------------- drivers/mtd/nand/denali.h | 1 - 2 files changed, 12 insertions(+), 30 deletions(-) commit c37f69ff2e6a4cfe6794c825b3b5b59e9429bdec Author: Colin Ian King Date: Mon Jun 19 11:55:21 2017 +0100 mmc: sdhci-pci: make guid intel_dsm_guid static The guid intel_dsm_guid does not need to be in global scope, so make it static. Signed-off-by: Colin Ian King Acked-by: Adrian Hunter Acked-by: Ulf Hansson Signed-off-by: Christoph Hellwig drivers/mmc/host/sdhci-pci-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63709fd4296221aa4ebd06230bce3eed70ddd927 Author: Andy Shevchenko Date: Fri Jun 16 21:13:38 2017 +0300 uuid: Take const on input of uuid_is_null() and guid_is_null() The null check functions do not and must not modify contents of the UUID or GUID supplied. Mark argument explicitly to reflect that. Signed-off-by: Andy Shevchenko Signed-off-by: Christoph Hellwig include/linux/uuid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa30db060121f688d01f74f8d3fe603f7c4c731c Author: Takashi Iwai Date: Fri Jun 16 22:29:55 2017 +0200 ALSA: pcm: Fix possible inconsistent appl_ptr update via mmap The ALSA PCM core refers to the appl_ptr value stored on the mmapped page that is shared between kernel and user-space. Although the reference is performed in the PCM stream lock, it doesn't guarantee the atomic access when the value gets updated concurrently from the user-space on another CPU. In most of codes, this is no big problem, but still there are a few places that may result in slight inconsistencies because they access runtime->control->appl_ptr multiple times; that is, the second read might be a different value from the first value. It can be even backward or jumping, as we have no control for it. Hence, the calculation may give an unexpected value. Luckily, there is no security vulnerability by that, as far as I've checked. But still we should address it. This patch tries to reduce such possible cases. The fix is simple -- we just read once, store it to a local variable and use it for the rest calculations. The READ_ONCE() macro is used for it in order to avoid the ill-effect by possible compiler optimizations. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit eb8d0eaaf84b0398533a7c091a0b65663f2fd7ea Author: Takashi Iwai Date: Mon Jun 19 17:49:48 2017 +0200 ALSA: hda: Fix potential race at unregistration and unsol events When the codec device is unregistered / freed, it may release the resource while being used in an unsolicited event like the jack detection work. This leads to use-after-free. The fix here is to unregister the device at first, i.e. removing the codec from the list, then flushing the pending works to assure that all unsol events are gone. After this point, we're free from accessing the codec via unsol events, thus can release the resources gracefully. The issue was spotted originally by Intel CI, but it couldn't be reproduced reliably by its nature. So let's hope this fix really addresses the whole issues. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196045 Reported-by: Martin Peres Signed-off-by: Takashi Iwai sound/hda/hdac_bus.c | 1 + sound/hda/hdac_device.c | 1 + 2 files changed, 2 insertions(+) commit a4b4793f640b72af3e2bb2a1ad79725c103d5e40 Author: Takashi Iwai Date: Wed Jun 14 07:26:00 2017 +0200 ALSA: hda - Add AZX_DRIVER_SKL for simplification We checked the quirks specific to the recent Intel chips by checking the PCI IDs manually, but it's becoming messy with lots of IS_SKL() and other macros, as the amount accumulated. For simplification, here the new AZX_DRIVER_SKL type is introduced, and check chip->driver_type instead of the manual PCI ID. The short name for this is still "HDA Intel PCH", so that it doesn't break the existing user-space unnecessarily. Suggested-by: Vinod Koul Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) commit 7fc8e7c1d9787ab8cb0f91adb3bc9c2c64c00ef8 Merge: 8cad7a3 c7ecb90 Author: Takashi Iwai Date: Tue Jun 20 07:53:07 2017 +0200 Merge branch 'for-linus' into for-next commit 8cad7a3db658a0652e4ced46dc44fbc7872f0823 Author: Hans P. Möller Ebner Date: Fri Jun 16 14:14:17 2017 -0400 ALSA: line6: remove unnecessary initialization to PODHD500X Remove Initialization from POD HD500X because it's not needed. Every time the device is connected dmesg gives the following output: "receive length failed (error -11)". To solve this problem, another flags is introduced (LINE6_CAP_CONTROL_INFO) and it is only used for PODX3 in: sysfs entries, call podhd_startup_finalize(pod) and disconnection. With this patch the error disappear. Signed-off-by: Hans P. Moller Signed-off-by: Takashi Iwai sound/usb/line6/driver.h | 2 ++ sound/usb/line6/podhd.c | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) commit c1d25075f4684a3a9a74e1668bdf147f879c5c3c Author: Hans P. Möller Ebner Date: Fri Jun 16 14:14:16 2017 -0400 ALSA: line6: add support for POD HD500X Add support for the Line6 POD HD500X multi effect processor for playback and capture (in/out audio) through USB. Signed-off-by: Hans P. Moller Signed-off-by: Takashi Iwai sound/usb/line6/podhd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit ee3308a254ec339b8d7c29e20274391685e58de1 Author: Paul Mackerras Date: Tue Jun 20 15:46:12 2017 +1000 KVM: PPC: Book3S HV: Don't sleep if XIVE interrupt pending on POWER9 On a POWER9 system, it is possible for an interrupt to become pending for a VCPU when that VCPU is about to cede (execute a H_CEDE hypercall) and has already disabled interrupts, or in the H_CEDE processing up to the point where the XIVE context is pulled from the hardware. In such a case, the H_CEDE should not sleep, but should return immediately to the guest. However, the conditions tested in kvmppc_vcpu_woken() don't include the condition that a XIVE interrupt is pending, so the VCPU could sleep until the next decrementer interrupt. To fix this, we add a new xive_interrupt_pending() helper which looks in the XIVE context that was pulled from the hardware to see if the priority of any pending interrupt is higher (numerically lower than) the CPU priority. If so then kvmppc_vcpu_woken() will return true. If the XIVE context has never been used, then both the pipr and the cppr fields will be zero and the test will indicate that no interrupt is pending. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 9c691cc9f8b5f2f866f1235800f03a1d7a06c1af Author: Peter Ujfalusi Date: Fri Jun 16 10:41:03 2017 -0500 usb: musb: tusb6010_omap: Convert to DMAengine API With the port_window support in DMAengine and the sDMA driver we can convert the driver to DMAengine. Signed-off-by: Peter Ujfalusi Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/tusb6010_omap.c | 201 ++++++++++++++++----------------------- 1 file changed, 80 insertions(+), 121 deletions(-) commit 868772d89d08a7743d24babbde33abea61022590 Author: Peter Ujfalusi Date: Fri Jun 16 10:41:02 2017 -0500 ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines The external request lines are used by tusb6010 on OMAP24xx platforms. Update the map so the driver can use dmaengine API to request the DMA channel. At the same time add temporary map containing only the external DMA request numbers for DT booted case on omap24xx since the tusb6010 stack is not yet supports DT boot. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman arch/arm/mach-omap2/dma.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 47699b0aaa585d769b1d8c1ca6b579d3676779db Author: Peter Ujfalusi Date: Fri Jun 16 10:41:01 2017 -0500 usb: musb: tusb6010: Handle DMA TX completion in DMA callback as well Handle the DMA TX in a similar way as we do for the RX: in the DMA completion callback. Since we are no longer using DMA completion interrupt for the TX we can as wall keep these interrupts disabled, but keep the handler for debug purposes. Signed-off-by: Peter Ujfalusi Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/tusb6010.c | 18 +++--------------- drivers/usb/musb/tusb6010_omap.c | 34 +--------------------------------- 2 files changed, 4 insertions(+), 48 deletions(-) commit 4cadc711cdc7a845cc5263c594ac3882027beadf Author: Peter Ujfalusi Date: Fri Jun 16 10:41:00 2017 -0500 usb: musb: tusb6010_omap: Allocate DMA channels upfront Instead of requesting the DMA channel in tusb_omap_dma_allocate() do it when the controller is created and in runtime work from the DMA channel pool. This change is needed for the DMAengine conversion of the driver since the tusb_omap_dma_allocate() is called in interrupt context which might lead to lock within the DMAengine API when requesting channel. Signed-off-by: Peter Ujfalusi Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/tusb6010_omap.c | 185 +++++++++++++++++++-------------------- 1 file changed, 92 insertions(+), 93 deletions(-) commit 1df9d9ec34e809ec227c2f13ec9d8cc479f22f5e Author: Peter Ujfalusi Date: Fri Jun 16 10:40:59 2017 -0500 usb: musb: tusb6010_omap: Create new struct for DMA data/parameters For the DMA we have ch (channel), dmareq and sync_dev parameters both within the tusb_omap_dma_ch and tusb_omap_dma struct. By creating a common struct the code can be simplified when selecting between the shared or multichannel DMA parameters. Signed-off-by: Peter Ujfalusi Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/tusb6010_omap.c | 164 ++++++++++++++++++++------------------- 1 file changed, 85 insertions(+), 79 deletions(-) commit 3565b787fdf0ed52c94072b8f363a3b15b52d646 Author: Peter Ujfalusi Date: Fri Jun 16 10:40:58 2017 -0500 usb: musb: tusb6010_omap: Use one musb_ep_select call in tusb_omap_dma_program Having one musb_ep_select() instead the two calls in if/else is the same thing, but makes the code a bit simpler to follow. Signed-off-by: Peter Ujfalusi Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/tusb6010_omap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0efc1356393a5149287c51addc4242ce51aa867c Author: Peter Ujfalusi Date: Fri Jun 16 10:40:57 2017 -0500 usb: musb: tusb6010: Add MUSB_G_NO_SKB_RESERVE to quirks When using the g_ncm for networking this flag will make sure that the buffer is aligned to 32bit so the DMA can be used to offload the data movement. Signed-off-by: Peter Ujfalusi Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/tusb6010.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1fa07c370bba23aa596ca143b90b64cd35918ec2 Author: Peter Ujfalusi Date: Fri Jun 16 10:40:56 2017 -0500 usb: musb: Add quirk to avoid skb reserve in gadget mode For tusb6010 the DMA functionality only possible if the buffer is 32bit aligned (SYNC access to FIFO) since with ASYNC access the TX/RX offset registers will corrupt eventually. The MUSB_G_NO_SKB_RESERVE will set the quirk_avoids_skb_reserve flag in usb_gadget struct to provide correctly aligned buffer. Signed-off-by: Peter Ujfalusi Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 3 +++ drivers/usb/musb/musb_core.h | 1 + 2 files changed, 4 insertions(+) commit 9816c09e2c889dfc962f142805eb03fba32debb3 Author: Peter Ujfalusi Date: Fri Jun 16 10:40:55 2017 -0500 dmaengine: omap-dma: port_window support correction for both direction When the port_window support was verified it was done on setup where only the MEM_TO_DEV direction was enabled. This got un-noticed and thus only this direction worked. Now that I have managed to get a setup to verify both direction it turned out that the setup was incorrect: omap_desc members are settings for the slave port while the omap_sg members apply to the memory side of the sDMA setup. Fixes: 527a27591312 ("dmaengine: omap-dma: Fix the port_window support") Signed-off-by: Peter Ujfalusi Cc: Russell King Cc: dmaengine@vger.kernel.org Cc: dan.j.williams@intel.com Cc: vinod.koul@intel.com Tested-by: Tony Lindgren Acked-by: Vinod Koul Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/dma/omap-dma.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) commit a70df14602b33f645d1eb69aad536ec29457a006 Author: Alexandre Bailon Date: Fri Jun 16 10:40:54 2017 -0500 usb: musb: musb_cppi41: Defer probe only if DMA is not ready If dma_request_slave_channel() failed to return a channel, then the driver will print an error and request to defer probe, regardless of the cause of the failure. Defer if the DMA is not ready yet otherwise print an error. Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_cppi41.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 24040a58379e2f2fa6aa9466911b758073b6bdfa Merge: 571949a 0591bc2 Author: Greg Kroah-Hartman Date: Tue Jun 20 11:39:34 2017 +0800 Merge tag 'usb-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing Felipe writes: usb: changes for v4.13 merge window This time around we have a total of 57 non-merge commits. A list of most important changes follows: - Improvements to dwc3 tracing interface - Initial dual-role support for dwc3 - Improvements to how we handle DMA resources in dwc3 - A new f_uac1 implementation which much more flexible - Removal of AVR32 bits - Improvements to f_mass_storage driver commit 52a33d99882291808681af8582358ddca5b0d0bc Author: Arvind Yadav Date: Fri Jun 16 14:46:44 2017 +0530 crypto: caam - make of_device_ids const. of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 2376 808 128 3312 cf0 drivers/crypto/caam/jr.o File size after constify caam_jr_match: text data bss dec hex filename 2976 192 128 3296 ce0 drivers/crypto/caam/jr.o Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/caam/jr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78557e77b25a98c153f87182a0f48b63e474ac9f Author: Tudor-Dan Ambarus Date: Fri Jun 16 11:39:48 2017 +0300 crypto: vmx - remove unnecessary check You can't reach init() if parent alg_name is invalid. Moreover, cypto_alloc_base() will return ENOENT if alg_name is NULL. Found while grasping the fallback mechanism. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/vmx/aes.c | 7 +------ drivers/crypto/vmx/aes_cbc.c | 7 +------ drivers/crypto/vmx/aes_ctr.c | 7 +------ drivers/crypto/vmx/aes_xts.c | 7 +------ 4 files changed, 4 insertions(+), 24 deletions(-) commit 4914b90b7baa8f21a4bb4ddc3d92b92e3324767e Author: Arvind Yadav Date: Thu Jun 15 17:28:10 2017 +0530 crypto: n2 - make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 2001 2168 48 4217 1079 drivers/crypto/n2_core.o File size after constify dummy_tlb_ops.: text data bss dec hex filename 3601 536 48 4185 1059 drivers/crypto/n2_core.o Signed-off-by: Arvind Yadav Acked-by: David S. Miller Signed-off-by: Herbert Xu drivers/crypto/n2_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfb73f89534fb246155a05a52d63559cb5d58749 Author: Antoine Ténart Date: Thu Jun 15 09:56:29 2017 +0200 crypto: inside-secure - use the base_end pointer in ring rollback A base_end pointer is set and provided. Use it in the ring rollback function to avoid using build-in defines. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e826934e359efa75bade6e3603432e31d5794281 Author: Antoine Ténart Date: Thu Jun 15 09:56:28 2017 +0200 crypto: inside-secure - increase the batch size Increase the batch size to the maximum number of requests a ring can handle at a time (its size). This is possible now that the request queues are per hw ring. This improves performances. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5eb0cc66f3a3cad46c2e432342f2a3c20c992b94 Author: Antoine Ténart Date: Thu Jun 15 09:56:27 2017 +0200 crypto: inside-secure - only dequeue when needed This force the need_dequeue flag to be unset whenever the dequeue function is called, to avoid calling it when it is not necessary. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b1deb47ad10b71a7d62dfdb049735a1be2214eb2 Author: Antoine Ténart Date: Thu Jun 15 09:56:26 2017 +0200 crypto: inside-secure - get the backlog before dequeueing the request Get the backlog before dequeuing the request otherwise we'll miss the first request in line. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5acabd33c85e501f8838af12491f7143b2a9051 Author: Antoine Ténart Date: Thu Jun 15 09:56:25 2017 +0200 crypto: inside-secure - stop requeueing failed requests This update the dequeue function of the inside-secure safexcel driver so that failed requests aren't requeued when they fail (for whatever reason, which can be because the hw ring is full). Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 86671abbbbfc959c4e4cbd2c618d5868a6f8dcf2 Author: Antoine Ténart Date: Thu Jun 15 09:56:24 2017 +0200 crypto: inside-secure - use one queue per hw ring Update the inside-secure safexcel driver from using one global queue to one queue per hw ring. This ease the request management and keep the hw in sync with what's done in sw. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 86 ++++++++++++-------------- drivers/crypto/inside-secure/safexcel.h | 12 ++-- drivers/crypto/inside-secure/safexcel_cipher.c | 38 +++++++----- drivers/crypto/inside-secure/safexcel_hash.c | 38 +++++++----- 4 files changed, 89 insertions(+), 85 deletions(-) commit 9785843424c803cbe9515c477a6b89181914ea09 Author: Antoine Ténart Date: Thu Jun 15 09:56:23 2017 +0200 crypto: inside-secure - update the context and request later This move the context and request updates at the end of the cipher and hash send() functions. This way the context and request fields are set only when everything else was successful in the send() functions. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 7 +++---- drivers/crypto/inside-secure/safexcel_hash.c | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) commit 152bdf4cdb9c20e1858bc1b754c7bfb984a6ea14 Author: Ofer Heifetz Date: Thu Jun 15 09:56:22 2017 +0200 crypto: inside-secure - align the cipher and hash send functions The cipher and hash send functions both set the results variable, to be used later by the caller. Align the way they're setting this variable. Signed-off-by: Ofer Heifetz Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee1fd870ee09ea5636b3d7a73769cd699241c77c Author: Igal Liberman Date: Thu Jun 15 09:56:21 2017 +0200 crypto: inside-secure - optimize DSE bufferability control Configure the data write bufferability to always buffer packets in the DSE. This change slightly improves performance. Signed-off-by: Igal Liberman Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 1 + drivers/crypto/inside-secure/safexcel.h | 1 + 2 files changed, 2 insertions(+) commit c87925bfd234f09b1b423f7a466a998d398f5a56 Author: Igal Liberman Date: Thu Jun 15 09:56:20 2017 +0200 crypto: inside-secure - enable single WR in DSE configuration When enable_single_wr is not enabled, the DSE will only write those parts of a result descriptor that need updating, which means a final result descriptor will be written in 2 or 3 smaller transfers. When enable_single_wr is enabled the DSE will combine these 2-3 updates into one large write transfer, generally improving performance. Signed-off-by: Igal Liberman Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 1 + drivers/crypto/inside-secure/safexcel.h | 1 + 2 files changed, 2 insertions(+) commit 39ba1bb4a4624bc0215531e0d5fdbbf0325c0c0e Author: Antoine Ténart Date: Thu Jun 15 09:56:19 2017 +0200 crypto: inside-secure - fix incorrect DSE data cache setting Set the correct value to the DSE data cache, using WR_CACHE_3BITS instead of RD_CACHE_3BITS. This fixes an incorrect setting and helps improving performances. Reported-by: Igal Liberman Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aefa794efed40cc6f8225646d75deda879b98256 Author: Antoine Ténart Date: Thu Jun 15 09:56:18 2017 +0200 crypto: inside-secure - fix the ring wr_cache offset The EIP197_HIA_xDR_CFG_WR_CACHE macro was defined to use an offset of 23, which is wrong as it's actually 25. Fix this. Reported-by: Igal Liberman Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aed3731e9039285c1d98f7636f5be92ea5db9e6a Author: Antoine Ténart Date: Thu Jun 15 09:56:17 2017 +0200 crypto: inside-secure - use hmac ipad/opad constants Replace the hmac ipad/opad values by their defined constants. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 14c19b178a012dd984721c1312114d4b8f3b4e81 Author: Harsh Jain Date: Thu Jun 15 12:43:47 2017 +0530 crypto: chcr - Select device in Round Robin fashion When multiple devices are present in system select device in round-robin fashion for crypto operations Signed-off-by: Atul Gupta Reviewed-by: Ganesh Goudar Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 8 ++-- drivers/crypto/chelsio/chcr_core.c | 53 ++++++++++++++++++-------- drivers/crypto/chelsio/chcr_core.h | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + 5 files changed, 44 insertions(+), 21 deletions(-) commit 738bff48871902bd37c56e6c6b492bb8e37315d5 Author: Harsh Jain Date: Thu Jun 15 12:43:46 2017 +0530 crypto: chcr - Ensure Destination sg entry size less than 2k Allocate new sg list in case received destination sg list has entry greater that 2k. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 153 +++++++++++++++++++++++++++++++---- drivers/crypto/chelsio/chcr_crypto.h | 6 ++ 2 files changed, 142 insertions(+), 17 deletions(-) commit 72cb471c13c5df00cc85dcfe5a2849db79570e4e Author: Harsh Jain Date: Thu Jun 15 12:43:45 2017 +0530 MAINTAINERS: Add maintainer for chelsio crypto driver Add myself as maintainer for chcr. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit ee0863ba118d37609a795a15c08e9acf6809c038 Author: Harsh Jain Date: Thu Jun 15 12:43:44 2017 +0530 chcr - Add debug counters Count types of operation done by HW. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 16 +++++++++- drivers/crypto/chelsio/chcr_core.c | 2 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 35 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 9 ++++++ 5 files changed, 62 insertions(+), 1 deletion(-) commit b8fd1f4170e7e8bda45d7bcc750e909c859ec714 Author: Harsh Jain Date: Thu Jun 15 12:43:43 2017 +0530 crypto: chcr - Add ctr mode and process large sg entries for cipher It send multiple WRs to H/W to handle large sg lists. Adds ctr(aes) and rfc(ctr(aes)) modes. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 786 ++++++++++++++++++++++++++++------- drivers/crypto/chelsio/chcr_algo.h | 26 +- drivers/crypto/chelsio/chcr_core.c | 1 - drivers/crypto/chelsio/chcr_core.h | 3 + drivers/crypto/chelsio/chcr_crypto.h | 19 +- 5 files changed, 690 insertions(+), 145 deletions(-) commit d600fc8aae746de71631b52ff40d02cf90dd3b74 Author: Harsh Jain Date: Thu Jun 15 12:43:42 2017 +0530 crypto: chcr - Avoid changing request structure Do not update assoclen received in aead_request. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit 5fe8c7117d78dea231bc7a546a68c1af9fd37cc0 Author: Harsh Jain Date: Thu Jun 15 12:43:41 2017 +0530 crypto: chcr - Return correct error code Return correct error instead of EINVAL. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 76 +++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 34 deletions(-) commit 4dbeae4237c15d3104147ab5f79ecbde9511f49f Author: Harsh Jain Date: Thu Jun 15 12:43:40 2017 +0530 crypto: chcr - Fix fallback key setting Set key of fallback tfm for rfc4309. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 2512a62414235be0cf4c2529f468546c57b96f60 Author: Harsh Jain Date: Thu Jun 15 12:43:39 2017 +0530 crypto: chcr - Pass lcb bit setting to firmware GCM and CBC mode of operation requires Last Cipher Block. This patch set lcb bit in WR header when required. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 18 +++++++++++------- drivers/crypto/chelsio/chcr_algo.h | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) commit 7c742df55035ce566b2ca7d4125d1202d41a99f3 Author: Colin Ian King Date: Tue Jun 13 09:52:54 2017 +0100 crypto: cavium - fix spelling mistake "Revsion" -> "Revision" Trivial fix to spelling mistake in seq_printf message Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu drivers/crypto/cavium/nitrox/nitrox_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 783a5665ca06a71defc0685d9f86be244b5efb1b Author: Colin Ian King Date: Tue Jun 13 09:46:47 2017 +0100 crypto: omap-aes - fix spelling mistake "Encryptio" -> "Encryption" Trivial fix to spelling mistake in pr_err message Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu drivers/crypto/omap-aes-gcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1207107c7168f779643c91e30f8d6c2f8a4afd4d Author: Stephan Mueller Date: Mon Jun 12 23:27:51 2017 +0200 crypto: testmgr - add testvector for pkcs1pad(rsa) The PKCS#1 RSA implementation is provided with a self test with RSA 2048 and SHA-256. This self test implicitly covers other RSA keys and other hashes. Also, this self test implies that the pkcs1pad(rsa) is FIPS 140-2 compliant. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/testmgr.c | 33 ++++++++++++++++--- crypto/testmgr.h | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 4 deletions(-) commit c4a29891161b7fd8666263b78918f051f8703424 Author: Sean Wang Date: Mon Jun 12 23:56:56 2017 +0800 MAINTAINERS: add entry for MediaTek Random Number Generator I work for MediaTek on maintaining the MediaTek RNG driver for the existing SoCs and adding support for the following SoCs. Signed-off-by: Sean Wang Signed-off-by: Herbert Xu MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) commit 81d2b34508c6a35dd1525ee08e3439dce14e0615 Author: Sean Wang Date: Mon Jun 12 23:56:55 2017 +0800 hwrng: mtk - add runtime PM support Add runtime PM support. There will be the benefit on SoCs where the clock to the RNG used can be shutdown. Signed-off-by: Sean Wang Signed-off-by: Herbert Xu drivers/char/hw_random/mtk-rng.c | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 34194913ea6eae8b7df439d01e85ad20c6d0ab7b Author: Sean Wang Date: Mon Jun 12 23:56:54 2017 +0800 dt-bindings: rng: add MediaTek MT7622 Hardware Random Generator bindings Document the bindings used by MediaTek MT7622 SoC hardware random number generator. Signed-off-by: Sean Wang Reviewed-by: Matthias Brugger Acked-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/mtk-rng.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fec17cb2231733174e039ad9054fa16bb358e2ec Author: Jason A. Donenfeld Date: Sun Jun 11 23:20:23 2017 +0200 crypto: rsa-pkcs1pad - use constant time memory comparison for MACs Otherwise, we enable all sorts of forgeries via timing attack. Signed-off-by: Jason A. Donenfeld Suggested-by: Stephan Müller Cc: stable@vger.kernel.org Cc: Herbert Xu Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu crypto/rsa-pkcs1pad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffe55266e36bef40b940b38bfef4fcff4957624d Author: Christophe Jaillet Date: Sat Jun 10 14:54:33 2017 +0200 crypto: crypto4xx - fix an error code If 'kzalloc' fails, we return 0 which means success. return -ENOMEM instead as already done a few lines above. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 1 + 1 file changed, 1 insertion(+) commit dec08194ffeccfa1cf085906b53d301930eae18f Author: Jiahau Chang Date: Mon Jun 19 13:08:30 2017 +0300 xhci: Limit USB2 port wake support for AMD Promontory hosts For AMD Promontory xHCI host, although you can disable USB 2.0 ports in BIOS settings, those ports will be enabled anyway after you remove a device on that port and re-plug it in again. It's a known limitation of the chip. As a workaround we can clear the PORT_WAKE_BITS. This will disable wake on connect, disconnect and overcurrent on AMD Promontory USB2 ports [checkpatch cleanup and commit message reword -Mathias] Cc: Cc: Tsai Nicholas Signed-off-by: Jiahau Chang Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 3 +++ drivers/usb/host/xhci-pci.c | 12 ++++++++++++ drivers/usb/host/xhci.h | 1 + 3 files changed, 16 insertions(+) commit eb7316161d889952de31b786acc40375b2c3ce15 Merge: 41f1830 996fab5 Author: Greg Kroah-Hartman Date: Tue Jun 20 11:12:58 2017 +0800 Merge tag 'usb-serial-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.12-rc6 Here are some new modem device ids. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit 9f60e0e7aea66e87948fcde05fc873988e881c93 Author: Helmut Klein Date: Wed Jun 14 10:29:15 2017 +0200 tty/serial: meson_uart: update to stable bindings This patch handle the stable UART bindings but also keeps compatibility with the legacy non-stable bindings until all boards uses them. Reviewed-by: Jerome Brunet Signed-off-by: Helmut Klein Signed-off-by: Neil Armstrong Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/meson_uart.c | 90 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 6 deletions(-) commit 45d7b247c606fbbc83dfc96b2d60ac963672d1ca Author: Helmut Klein Date: Wed Jun 14 10:29:14 2017 +0200 dt-bindings: serial: Add bindings for the Amlogic Meson UARTs Add the documentation for the device tree binding of Amlogic Meson Serial UART. Signed-off-by: Helmut Klein Signed-off-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../bindings/serial/amlogic,meson-uart.txt | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 1104321a7b3bb670dc614ffa7958c553e7b3b836 Author: Matthias Brugger Date: Fri Jun 16 17:17:14 2017 +0200 serial: Delete dead code for CIR serial ports Commit e4fda3a04275 ("serial: don't register CIR serial ports") adds a check for PORT_8250_CIR to serial8250_register_8250_port(). But the code isn't needed as the function never takes the branch when the port is CIR serial port. This patch deletes the dead code. Signed-off-by: Matthias Brugger Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 519495431d04acc8bfb681a5455f163c6a14206b Author: Arvind Yadav Date: Thu Jun 15 17:08:40 2017 +0530 serial: sirf: make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sirfsoc_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b45fff006dd17ca7752e772bf9d347266e081b1 Author: Christoph Hellwig Date: Fri Jun 16 09:17:10 2017 +0200 serial/mpsc: switch to dma_alloc_attrs Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mpsc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e36361d70e9729ee2334fcb260014a3ff275c2e0 Author: Andreas Färber Date: Mon Jun 19 03:46:40 2017 +0200 tty: serial: Add Actions Semi Owl UART earlycon This implements an earlycon for Actions Semi S500/S900 SoCs. Based on LeMaker linux-actions tree. Signed-off-by: Andreas Färber Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/kernel-parameters.txt | 6 ++ drivers/tty/serial/Kconfig | 19 ++++ drivers/tty/serial/Makefile | 1 + drivers/tty/serial/owl-uart.c | 135 ++++++++++++++++++++++++ 4 files changed, 161 insertions(+) commit 80b208ed7bd1b54db96a77fe5b78899240a45bda Author: Andreas Färber Date: Mon Jun 19 03:46:39 2017 +0200 dt-bindings: serial: Document Actions Semi Owl UARTs This UART is found on S500 and S900 SoCs. Acked-by: Rob Herring Signed-off-by: Andreas Färber Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/serial/actions,owl-uart.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit d06838de4a015c7c4844ad3fcf63ad5e2c17b234 Merge: d567b0f 41f1830 Author: Greg Kroah-Hartman Date: Tue Jun 20 10:17:45 2017 +0800 Merge 4.12-rc6 into staging-next We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 571949a40a9c00fdaa3d0256cf43c9e0c25ff2d1 Merge: 21bdb3b 41f1830 Author: Greg Kroah-Hartman Date: Tue Jun 20 10:16:07 2017 +0800 Merge 4.12-rc6 into usb-next We want the USB fixes in here. Signed-off-by: Greg Kroah-Hartman commit d06bfd1989fe97623b32d6df4ffa6e4338c99dc8 Author: Jason A. Donenfeld Date: Wed Jun 7 23:06:55 2017 -0400 random: warn when kernel uses unseeded randomness This enables an important dmesg notification about when drivers have used the crng without it being seeded first. Prior, these errors would occur silently, and so there hasn't been a great way of diagnosing these types of bugs for obscure setups. By adding this as a config option, we can leave it on by default, so that we learn where these issues happen, in the field, will still allowing some people to turn it off, if they really know what they're doing and do not want the log entries. However, we don't leave it _completely_ by default. An earlier version of this patch simply had `default y`. I'd really love that, but it turns out, this problem with unseeded randomness being used is really quite present and is going to take a long time to fix. Thus, as a compromise between log-messages-for-all and nobody-knows, this is `default y`, except it is also `depends on DEBUG_KERNEL`. This will ensure that the curious see the messages while others don't have to. Signed-off-by: Jason A. Donenfeld Signed-off-by: Theodore Ts'o drivers/char/random.c | 15 +++++++++++++-- lib/Kconfig.debug | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) commit 7aed9f72c3c70bdc18e72ec086c1a0eafdcd273f Author: Jason A. Donenfeld Date: Wed Jun 7 23:01:20 2017 -0400 net/route: use get_random_int for random counter Using get_random_int here is faster, more fitting of the use case, and just as cryptographically secure. It also has the benefit of providing better randomness at early boot, which is when many of these structures are assigned. Also, semantically, it's not really proper to have been assigning an atomic_t in this way before, even if in practice it works fine. Signed-off-by: Jason A. Donenfeld Cc: David Miller Signed-off-by: Theodore Ts'o net/ipv4/route.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b3d0f7895d1251f0af0dd38410e7be3e52be4a1d Author: Jason A. Donenfeld Date: Wed Jun 7 23:00:05 2017 -0400 net/neighbor: use get_random_u32 for 32-bit hash random Using get_random_u32 here is faster, more fitting of the use case, and just as cryptographically secure. It also has the benefit of providing better randomness at early boot, which is when many of these structures are assigned. Signed-off-by: Jason A. Donenfeld Cc: David Miller Signed-off-by: Theodore Ts'o net/core/neighbour.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d48ad080ec0101c2cca92926bed64993ab565c3d Author: Jason A. Donenfeld Date: Wed Jun 7 22:47:13 2017 -0400 rhashtable: use get_random_u32 for hash_rnd This is much faster and just as secure. It also has the added benefit of probably returning better randomness at early-boot on systems with architectural RNGs. Signed-off-by: Jason A. Donenfeld Cc: Thomas Graf Cc: Herbert Xu Signed-off-by: Theodore Ts'o lib/rhashtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae5b806a3d3c23d9d3b57aecbe687a0bd82ab086 Author: Jason A. Donenfeld Date: Wed Jun 7 22:44:54 2017 -0400 ceph: ensure RNG is seeded before using Ceph uses the RNG for various nonce generations, and it shouldn't accept using bad randomness. So, we wait for the RNG to be properly seeded. We do this by calling wait_for_random_bytes() in a function that is certainly called in process context, early on, so that all subsequent calls to get_random_bytes are necessarily acceptable. Signed-off-by: Jason A. Donenfeld Cc: Ilya Dryomov Cc: "Yan, Zheng" Cc: Sage Weil Signed-off-by: Theodore Ts'o net/ceph/ceph_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6787ab81b29115b6d2e7d17fe8a8017da66197d6 Author: Jason A. Donenfeld Date: Wed Jun 7 22:34:26 2017 -0400 iscsi: ensure RNG is seeded before use It's not safe to use weak random data here, especially for the challenge response randomness. Since we're always in process context, it's safe to simply wait until we have enough randomness to carry out the authentication correctly. While we're at it, we clean up a small memleak during an error condition. Signed-off-by: Jason A. Donenfeld Cc: "Nicholas A. Bellinger" Cc: Lee Duncan Cc: Chris Leech Signed-off-by: Theodore Ts'o drivers/target/iscsi/iscsi_target_auth.c | 14 +++++++++++--- drivers/target/iscsi/iscsi_target_login.c | 22 ++++++++++++++-------- 2 files changed, 25 insertions(+), 11 deletions(-) commit 51b0817b0d23d51223575eff14629b3602a93cd4 Author: Jason A. Donenfeld Date: Wed Jun 7 20:42:50 2017 -0400 cifs: use get_random_u32 for 32-bit lock random Using get_random_u32 here is faster, more fitting of the use case, and just as cryptographically secure. It also has the benefit of providing better randomness at early boot, which is sometimes when this is used. Signed-off-by: Jason A. Donenfeld Cc: Steve French Signed-off-by: Theodore Ts'o fs/cifs/cifsfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da9ba564bd683374b8d319756f312821b8265b06 Author: Jason A. Donenfeld Date: Wed Jun 7 20:05:02 2017 -0400 random: add get_random_{bytes,u32,u64,int,long,once}_wait family These functions are simple convenience wrappers that call wait_for_random_bytes before calling the respective get_random_* function. Signed-off-by: Jason A. Donenfeld Signed-off-by: Theodore Ts'o include/linux/net.h | 2 ++ include/linux/once.h | 2 ++ include/linux/random.h | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+) commit e297a783e41560b44e3c14f38e420cba518113b8 Author: Jason A. Donenfeld Date: Wed Jun 7 19:58:56 2017 -0400 random: add wait_for_random_bytes() API This enables users of get_random_{bytes,u32,u64,int,long} to wait until the pool is ready before using this function, in case they actually want to have reliable randomness. Signed-off-by: Jason A. Donenfeld Signed-off-by: Theodore Ts'o drivers/char/random.c | 41 +++++++++++++++++++++++++++++++---------- include/linux/random.h | 1 + 2 files changed, 32 insertions(+), 10 deletions(-) commit 654cdd3229cd1d3f2bfb9df57baf88ba382a52be Author: Sandeep Tripathy Date: Tue Jun 6 09:53:58 2017 +0530 clk: bcm: Add clocks for Stingray SOC This patch adds support for Stingray clocks in iproc ccf. The Stingray SOC has various plls based on iproc pll architecture. Signed-off-by: Sandeep Tripathy Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Stephen Boyd drivers/clk/bcm/Kconfig | 8 ++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-sr.c | 327 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 336 insertions(+) commit 25146e1e8f03b0306cf42cd323819a567d139afb Author: Sandeep Tripathy Date: Fri Jun 2 12:04:26 2017 +0530 dt-bindings: clk: Extend binding doc for Stingray SOC Update iproc clock dt-binding documentation with Stingray pll and clock details. Signed-off-by: Sandeep Tripathy Reviewed-by: Ray Jui Reviewed-by: Scott Branden Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/clock/brcm,iproc-clocks.txt | 76 ++++++++++++++++ include/dt-bindings/clock/bcm-sr.h | 101 +++++++++++++++++++++ 2 files changed, 177 insertions(+) commit 567bf2ed86d13aecfb7d3c1ab75166193ce37213 Author: Sean Wang Date: Fri May 5 23:26:11 2017 +0800 clk: mediatek: export cpu multiplexer clock for MT8173 SoCs The patch enables CPU multiplexer clock on MT8173 SoC which fixes up cpufreq driver fails at acquiring intermediate clock source when driver probe is called. Signed-off-by: Pi-Cheng Chen Signed-off-by: Sean Wang Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt8173.c | 23 +++++++++++++++++++++++ include/dt-bindings/clock/mt8173-clk.h | 4 +++- 2 files changed, 26 insertions(+), 1 deletion(-) commit 43ed50ee5a181fcfbdeb7566f5e8122bad182889 Author: Sean Wang Date: Fri May 5 23:26:10 2017 +0800 clk: mediatek: export cpu multiplexer clock for MT2701/MT7623 SoCs The patch enables CPU multiplexer clock on MT2701/MT7623 SoC which fixes up cpufreq driver fails at acquiring intermediate clock source when driver probe is called. Signed-off-by: Pi-Cheng Chen Signed-off-by: Sean Wang Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt2701.c | 8 ++++++++ include/dt-bindings/clock/mt2701-clk.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 1e17de9049da5ef482ec8f6a875a83bec96bed3e Author: Sean Wang Date: Fri May 5 23:26:09 2017 +0800 clk: mediatek: add missing cpu mux causing Mediatek cpufreq can't work This patch adds CPU multiplexer clocks which are essential for Mediatek cpufreq driver. It would use the CPU clock multiplexer to switch to the intermediate clock source temporarily and then wait for the primary clock changing getting stable. Signed-off-by: Pi-Cheng Chen Signed-off-by: Sean Wang Signed-off-by: Stephen Boyd drivers/clk/mediatek/Makefile | 2 +- drivers/clk/mediatek/clk-cpumux.c | 120 ++++++++++++++++++++++++++++++++++++++ drivers/clk/mediatek/clk-cpumux.h | 30 ++++++++++ 3 files changed, 151 insertions(+), 1 deletion(-) commit 34deaff763d41b5f73723a71c5f45383374dc7eb Author: Geert Uytterhoeven Date: Fri Jun 9 14:49:43 2017 +0200 clk: renesas: cpg-mssr: Use of_device_get_match_data() helper If CONFIG_OF=n: drivers/clk/renesas/renesas-cpg-mssr.c: In function ‘cpg_mssr_probe’: drivers/clk/renesas/renesas-cpg-mssr.c:702: warning: dereferencing ‘void *’ pointer drivers/clk/renesas/renesas-cpg-mssr.c:702: error: request for member ‘data’ in something not a structure or union To fix this, use the of_device_get_match_data() helper, for which a dummy version is provided if CONFIG_OF=n. Signed-off-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd drivers/clk/renesas/renesas-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ff77275f770679f1a3a2d8667f8c52522ba7074 Author: Zhangfei Gao Date: Wed May 31 09:45:38 2017 +0800 clk: hi6220: add acpu clock Add acpu clock, including sft clock controlling hi6220 coresight module Signed-off-by: Zhangfei Gao Signed-off-by: Li Pengcheng Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/hi6220-clock.txt | 1 + drivers/clk/hisilicon/clk-hi6220.c | 22 ++++++++++++++++++++++ include/dt-bindings/clock/hi6220-clock.h | 4 ++++ 3 files changed, 27 insertions(+) commit 6454504c8003fd1c720bab618da8a2aedd30d367 Author: Shawn Guo Date: Sat Jun 17 22:21:05 2017 +0800 clk: zx296718: export I2S mux clocks Export I2S mux clocks, so that device tree can refer to them for setting a better parent clock for I2S work clock. Signed-off-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/zte/clk-zx296718.c | 8 ++++---- include/dt-bindings/clock/zx296718-clock.h | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) commit 22039d150f716e4e56215d70ad23fb92caa4476e Author: Stefan Agner Date: Thu Jun 8 15:34:47 2017 -0700 clk: imx7d: create clocks behind rawnand clock gate The rawnand clock gate gates two clocks, NAND_USDHC_BUS_CLK_ROOT and NAND_CLK_ROOT. However, the gate has been in the chain of the latter only. This does not allow to use the NAND_USDHC_BUS_CLK_ROOT only, e.g. as required by APBH-Bridge-DMA. Add new clocks which represent the clock after the gate, and use a shared clock gate to correctly model the hardware. Signed-off-by: Stefan Agner Tested-by: Fabio Estevam Acked-by: Han Xu Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 6 ++++-- include/dt-bindings/clock/imx7d-clock.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 2a8e44dffb152343ccf2ecd26b8a88f999edfd49 Author: Zhong Kaihua Date: Fri May 26 15:38:21 2017 +0800 clk: hi3660: Set PPLL2 to 2880M Set PPLL2 to 2880M. With this patch, we saw better compatibility on various 1080p HDMI monitors. Signed-off-by: Zhong Kaihua Signed-off-by: Zheng Shaobo Acked-by: Zhangfei Gao [sboyd@codeaurora.org: Add UL to long number to silence C90 warning] Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi3660.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b609b1c753364c6bf6f8666c82047d239fba6889 Author: James Smart Date: Thu Jun 15 22:56:51 2017 -0700 scsi: lpfc: update to revision to 11.4.0.1 Set lpfc driver revision to 11.4.0.1 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6564e52605c55e9d63441782b634b6f131b73c9 Author: James Smart Date: Thu Jun 15 22:56:50 2017 -0700 scsi: lpfc: Driver responds LS_RJT to Beacon Off ELS - Linux Beacon OFF from switch is rejected by driver. Driver fails Beacon OFF if frequency is set to 0. As per fc-ls spec, status, capability, frequency and duration fields are only applicable for Beacon ON. Remove frequency and type checks. Reject Beacon ON if duration is non zero. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 4550f9c75e6abdc1f80170adf74d7610d059afd7 Author: James Smart Date: Thu Jun 15 22:56:49 2017 -0700 scsi: lpfc: Fix crash in lpfc_sli_ringtxcmpl_put when nvmet gets an abort request. When running nvme detach-ns /dev/nvme0n1 -n 1 command, the nvmet lpfc driver crashes with this stack dump: kernel BUG at /root/NVME/lpfc_8.4/lpfc_sli.c:1393! invalid opcode: 0000 [#1] SMP Workqueue: nvmet-fc-cpu0 nvmet_fc_do_work_on_cpu [nvmet_fc] lpfc_sli4_issue_wqe+0x357/0x440 [lpfc] lpfc_nvmet_xmt_fcp_abort+0x36b/0x5c0 [lpfc] nvmet_fc_abort_op+0x30/0x50 [nvmet_fc] nvmet_fc_do_work_on_cpu+0xd9/0x130 [nvmet_fc] process_one_work+0x14e/0x410 worker_thread+0x116/0x490 kthread+0xc7/0xe0 ret_from_fork+0x3f/0x70 Crash is due to an uninitialized iocbq->vport pointer. Explicitly set the iocbq->vport field to phba->pport in lpfc_nvmet_sol_fcp_issue_abort as it does all abort iocbq initialization in the routine. Using phba->pport is ok because target does not support NPIV instances. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 1 + 1 file changed, 1 insertion(+) commit 11e644e2a2afa34a4d0ca896cf722572317b21ed Author: James Smart Date: Thu Jun 15 22:56:48 2017 -0700 scsi: lpfc: Fix crash doing IO with resets During every reset, IOCBs are allocated. So, at one point, number of allocated IOCBs reaches maximum limit and lpfc_sli_next_iotag fails. Allocate IOCBs only during initialization. Reuse them after every reset instead of allocating new set of IOCBs. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 569dbe84a3e769009aa4a5d1030d000168889580 Author: James Smart Date: Thu Jun 15 22:56:47 2017 -0700 scsi: lpfc: Fix crash after firmware flash when IO is running. OS crashes after the completion of firmware download. Failure in posting SCSI SGL buffers because number of SGL buffers is less than total count. Some of the pending IOs are not completed by driver. SGL buffers for these IOs are not added back to the list. Pending IOs are not completed because lpfc_wq_list list is initialized before completion of pending IOs. Postpone lpfc_wq_list reinitialization by moving lpfc_sli4_queue_destroy() after lpfc_hba_down_post(). Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09559e81121f9663e8f1f6ed05672c49e31be3db Author: James Smart Date: Thu Jun 15 22:56:46 2017 -0700 scsi: lpfc: Fix SLI3 drivers attempting NVME ELS commands. In a server with an 8G adapter and a 32G adapter, running NVME and FCP, the server would crash with the following stack. RIP: 0010: ... lpfc_nvme_register_port+0x38/0x420 [lpfc] lpfc_nlp_state_cleanup+0x154/0x4f0 [lpfc] lpfc_nlp_set_state+0x9d/0x1a0 [lpfc] lpfc_cmpl_prli_prli_issue+0x35f/0x440 [lpfc] lpfc_disc_state_machine+0x78/0x1c0 [lpfc] lpfc_cmpl_els_prli+0x17c/0x1f0 [lpfc] lpfc_sli_sp_handle_rspiocb+0x39b/0x6b0 [lpfc] lpfc_sli_handle_slow_ring_event_s3+0x134/0x2d0 [lpfc] lpfc_work_done+0x8ac/0x13b0 [lpfc] lpfc_do_work+0xf1/0x1b0 [lpfc] Crash, on the 8G adapter, is due to a vport which does not have a nvme local port structure. It's not supposed to have one. NVME is not supported on the 8G adapter, so the NVME PRLI, which started this flow shouldn't have been sent in the first place. Correct discovery engine to recognize when on an SLI3 rport, which doesn't support SLI3, if the rport supports only NVME, don't send a NVME PRLI. Instead, as no FC4 will be used, a LOGO is sent. If rport is FCP and NVME, only execute the SCSI PRLI. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 16 +++++++++++++++- drivers/scsi/lpfc/lpfc_hbadisc.c | 3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) commit 966bb5b7119607cf3d9a0d668eb67af67c2bab45 Author: James Smart Date: Thu Jun 15 22:56:45 2017 -0700 scsi: lpfc: Break up IO ctx list into a separate get and put list Since unsol rcv ISR and command cmpl ISR both access/lock this list, separate get/put lists will reduce contention. Replaced struct list_head lpfc_nvmet_ctx_list; with struct list_head lpfc_nvmet_ctx_get_list; struct list_head lpfc_nvmet_ctx_put_list; and all correpsonding locks and counters. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 11 ++++-- drivers/scsi/lpfc/lpfc_debugfs.c | 11 ++++-- drivers/scsi/lpfc/lpfc_init.c | 16 +++++--- drivers/scsi/lpfc/lpfc_nvmet.c | 82 +++++++++++++++++++++++++++++----------- drivers/scsi/lpfc/lpfc_sli4.h | 9 +++-- 5 files changed, 89 insertions(+), 40 deletions(-) commit 810ffa4789c8453caf0b876619c428bf64fef304 Author: James Smart Date: Thu Jun 15 22:56:44 2017 -0700 scsi: lpfc: Reduce time spent in IRQ for received NVME commands Removed unnecessary bzero of context area. Due to size of sg list, added a substantial delay and played havoc on cpu caches. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 2 -- 1 file changed, 2 deletions(-) commit 56bc802842839174befc97749ea01d4004275c14 Author: James Smart Date: Thu Jun 15 22:56:43 2017 -0700 scsi: lpfc: Vport creation is failing with "Link Down" error Vport creation fails for SLI-3 adapters. Mailbox submission fails because mailbox interrupt is disabled. Mailbox interrupt is disabled during port reset. Do reset only for physical port. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit b4fd681e8a353b1d492c159d6effa070c3c00c23 Author: James Smart Date: Thu Jun 15 22:56:42 2017 -0700 scsi: lpfc: Fix nvme_info sysfs output to be consistent First line of nvme_info output is not consistent. There is an Extra colon in the format. First line of output will contain one of the following strings: NVME Initiator Enabled NVME Target Enabled NVME Disabled Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d41b65bcdc43fed82ea6b3c006a268df6c53e80d Author: James Smart Date: Thu Jun 15 22:56:41 2017 -0700 scsi: lpfc: Fix system panic when express lane enabled. There is a null pointer dereference that can happen in the FOF interrupt handler. The driver was not setting up cq->assoc_qp_for sli4_hba->oas_cq. Initialize cq->assoc_qp before accessing it. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 3 +++ 1 file changed, 3 insertions(+) commit d30ff2632333dab794d3be14e16ca8c42dfc294d Author: Xiang Chen Date: Wed Jun 14 23:33:32 2017 +0800 scsi: hisi_sas: modify internal abort dev flow for v3 hw There is a change for abort dev for v3 hw: add registers to configure unaborted iptt for a device, and then inform this to logic. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 15 +++++++++++++++ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) commit 402cd9f0ae9eefcdf9b6c0c87aadc32faec086ff Author: Xiang Chen Date: Wed Jun 14 23:33:31 2017 +0800 scsi: hisi_sas: add v3 code to fill some more hw function pointers Add code to fill the interface of phy_hard_reset, phy_get_max_linkrate, and phy enable/disable. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit f771d3b08fe0e3ee9ac0226cc8f9d7930eb925da Author: Xiang Chen Date: Wed Jun 14 23:33:30 2017 +0800 scsi: hisi_sas: add get_wideport_bitmap_v3_hw() Add code for interface get_wideport_bitmap. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4de0ca69e58d26c9038d4d4c290f3ed6a24a897a Author: Xiang Chen Date: Wed Jun 14 23:33:29 2017 +0800 scsi: hisi_sas: add v3 code to send internal abort command Add code to prepare internal abort command. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 182e7222ebe0e638f8e22a1ad6724e8d128e96f2 Author: Xiang Chen Date: Wed Jun 14 23:33:28 2017 +0800 scsi: hisi_sas: add v3 code for itct setup and free Add code to itct setup and free for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 114 +++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit ce60689e12ddfee94afaaa23089e1131f892839a Author: Xiang Chen Date: Wed Jun 14 23:33:27 2017 +0800 scsi: hisi_sas: add v3 code to send ATA frame Add code to prepare ATA frame for v3 hw Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 106 +++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) commit fa913de23aa2e7443ff34a61eadab37b6b20797d Author: Xiang Chen Date: Wed Jun 14 23:33:26 2017 +0800 scsi: hisi_sas: add v3 code to send SMP frame Add code to prepare SMP frame. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit a2204723acefd504561b5dbc53d9c0a1c2528eab Author: Xiang Chen Date: Wed Jun 14 23:33:25 2017 +0800 scsi: hisi_sas: add v3 code to send SSP frame Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 208 +++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) commit 60b4a5ee90349a50fc7e199d3dd37dfd7e2c51a5 Author: Xiang Chen Date: Wed Jun 14 23:33:24 2017 +0800 scsi: hisi_sas: add v3 cq interrupt handler Add v3 cq interrupt handler slot_complete_v3_hw(). Note: The slot error handling needs to be further refined in the future to examine all fields in the error record, and handle appropriately, instead of current solution - just report SAS_OPEN_REJECT. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 340 +++++++++++++++++++++++++++++++++ 1 file changed, 340 insertions(+) commit 54edeee1e1f3621632308212daf383ed6688e955 Author: Xiang Chen Date: Wed Jun 14 23:33:23 2017 +0800 scsi: hisi_sas: add phy up/down/bcast and channel ISR Add code to initialise interrupts and add some interrupt handlers. Also add function hisi_sas_v3_destroy_irqs() to clean-up irqs upon module unloading. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 283 +++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) commit 3975f6054e31c55c7e73faa342780e2af2f30872 Author: Xiang Chen Date: Wed Jun 14 23:33:22 2017 +0800 scsi: hisi_sas: add v3 hw PHY init Add code to configure PHYs for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 127 ++++++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 1 deletion(-) commit c94d8ca2b1a810649a20deae54751d94db716042 Author: Xiang Chen Date: Wed Jun 14 23:33:21 2017 +0800 scsi: hisi_sas: add v3 hw init Add code to initialise v3 hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 277 +++++++++++++++++++++++++++++++++ 1 file changed, 277 insertions(+) commit e21fe3a52692f554efd67957c772c702de627a3a Author: John Garry Date: Wed Jun 14 23:33:20 2017 +0800 scsi: hisi_sas: add initialisation for v3 pci-based controller Add the code to initialise the controller which is based on pci device in hisi_sas_v3_hw.c The core controller routines are still in hisi_sas_main.c; some common initialisation functions are also exported from hisi_sas_main.c For pci-based controller, the device properties, like phy count and sas address are read from the firmware, same as platform device-based controller. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 6 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 18 ++-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 154 +++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 6 deletions(-) commit 92f61e3bc24a0d42c9ede86ff6f211ef07022dd7 Author: John Garry Date: Wed Jun 14 23:33:19 2017 +0800 scsi: hisi_sas: add skeleton v3 hw driver Add skeleton driver for v3 hw in hisi_sas_v3_hw.c File hisi_sas_v3_hw.c will serve 2 purposes: - probing and initialisation of the controller based on pci device - hw layer for v3-based controllers The controller design is quite similar to v2 hw in hip07. However key differences include: -All v2 hw bugs are fixed (hopefully), so workarounds are not required -support for device deregistration -some interrupt modifications -configurable max device support Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/Kconfig | 10 +++++++- drivers/scsi/hisi_sas/Makefile | 1 + drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 47 ++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) commit 0fa24c19d844945b6edf981ff425c93f20085f10 Author: John Garry Date: Wed Jun 14 23:33:18 2017 +0800 scsi: hisi_sas: create hisi_sas_get_fw_info() Move the functionality to retrieve the fw info into a dedicated device type-agnostic function, hisi_sas_get_fw_info(). The reasoning is that this function will be required for future pci-based platforms. Also add some debug logs for failure. Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 107 ++++++++++++++++++++++------------ 2 files changed, 71 insertions(+), 37 deletions(-) commit 11b752490a051b79de183fee73706e13d80d3998 Author: John Garry Date: Wed Jun 14 23:33:17 2017 +0800 scsi: hisi_sas: add pci_dev in hisi_hba struct Since hip08 SAS controller is based on pci device, add hisi_hba.pci_dev for hip08 (will be v3), and also rename hisi_hba.pdev to .platform_dev for clarity. In addition, for common code which wants to reference the controller device struct, add hisi_hba.dev, and change the common code to use it. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 6 ++++- drivers/scsi/hisi_sas/hisi_sas_main.c | 36 ++++++++++++++-------------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 28 +++++++++++----------- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 44 +++++++++++++++++----------------- 4 files changed, 59 insertions(+), 55 deletions(-) commit 318913c63c5d435cba30c7f744bd0f24d7295516 Author: Xiang Chen Date: Wed Jun 14 23:33:16 2017 +0800 scsi: hisi_sas: relocate get_ncq_tag_v2_hw() Relocate get_ncq_tag_v2_hw() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 15 +++++++++++++++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 16 +--------------- 3 files changed, 17 insertions(+), 15 deletions(-) commit 759040770dbc7c8c53aa23552d2d955e80c91ce6 Author: Xiang Chen Date: Wed Jun 14 23:33:15 2017 +0800 scsi: hisi_sas: relocate sata_done_v2_hw() Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 15 +++++++++++++++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 18 ++---------------- 3 files changed, 19 insertions(+), 16 deletions(-) commit 6c7bb8a1942a2a11b77f208910fc57047c62c77b Author: Xiang Chen Date: Wed Jun 14 23:33:14 2017 +0800 scsi: hisi_sas: relocate get_ata_protocol() Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 7 ++++ drivers/scsi/hisi_sas/hisi_sas_main.c | 59 ++++++++++++++++++++++++++++++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 67 +--------------------------------- 3 files changed, 68 insertions(+), 65 deletions(-) commit b1a49412f0aed757e7632f9276acdf2fb8f3832e Author: Xiang Chen Date: Wed Jun 14 23:33:13 2017 +0800 scsi: hisi_sas: optimise the usage of hisi_hba.lock Currently hisi_hba.lock is locked to deliver and receive a command to/from any hw queue. This causes much contention at high data-rates. To boost performance, lock on a per queue basis for sending and receiving commands to/from hw. Certain critical regions still need to be locked in the delivery and completion stages with hisi_hba.lock. New element hisi_sas_device.dq is added to store the delivery queue for a device, so it does not need to be needlessly re-calculated for every task. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 9 +++-- drivers/scsi/hisi_sas/hisi_sas_main.c | 69 +++++++++++++++++++++++----------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 23 ++++-------- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 34 ++++++++--------- 4 files changed, 77 insertions(+), 58 deletions(-) commit ad6048325c7807818c6c49e485660143d97a622e Author: John Garry Date: Wed Jun 14 23:33:12 2017 +0800 scsi: hisi_sas: define hisi_sas_device.device_id as int Currently hisi_sas_device.device_id is a u64. This can create a problem in selecting the queue for a device, in that this code does a 64b division on device id. For some 32b systems, 64b division is slow and the lib reference must be explicitly included. The device id does not need to be 64b in size, so, as a solution, just make as an int. Also, struct hisi_sas_device elements are re-ordered to improve packing efficiency. Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 8 ++++---- drivers/scsi/hisi_sas/hisi_sas_main.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) commit f64a6988268aae866bb6ce6edb910d454ccef331 Author: Xiang Chen Date: Wed Jun 14 23:33:11 2017 +0800 scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort() We need to check for timeout before task status, or the task will be mistook as completed internal abort command. Also add protection for sas_task.task_state_flags in hisi_sas_tmf_timedout(). Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 8c52f36413063bedbb3d31a65048a61ea2f1e169 Merge: 3aaf4d9 5ac5562 Author: Dave Airlie Date: Tue Jun 20 11:19:08 2017 +1000 Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next A few more things for 4.13: - Semaphore support using sync objects - Drop fb location programming - Optimize bo list ioctl * 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: Optimize mutex usage (v4) drm/amdgpu: Optimization of AMDGPU_BO_LIST_OP_CREATE (v2) amdgpu: use drm sync objects for shared semaphores (v6) amdgpu/cs: split out fence dependency checking (v2) drm/amdgpu: don't check the default value for vm size commit 3aaf4d95b07333af27c050511898d74a299fc743 Merge: d02b0ff e40eda3 Author: Dave Airlie Date: Tue Jun 20 11:17:30 2017 +1000 Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next Here are the Mali DP driver changes. They include the mali-dp specific changes from Jose Abreu on crtc->mode_valid() as well as a couple of patches for fixing the sharing of IRQ lines and use of DRM CMA helper for framebuffer physical address calculation. Please pull! * 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld: drm/arm: mali-dp: Use CMA helper for plane buffer address calculation drm/mali-dp: Check PM status when sharing interrupt lines drm/arm: malidp: Use crtc->mode_valid() callback commit d02b0ffb005469ef4ee73610fb08dff45e4487f8 Merge: 4a525ba 7df1bb8 Author: Dave Airlie Date: Tue Jun 20 11:10:49 2017 +1000 Merge branch 'linux-4.13' of git://github.com/skeggsb/linux into drm-next - HDMI stereoscopic support - Rework of display code to properly support SOR pad macro routing on >=GM20x GPUs - Various other fixes/improvements. * 'linux-4.13' of git://github.com/skeggsb/linux: (73 commits) drm/nouveau/disp/nv50-: avoid creating ORs that aren't present on HW drm/nouveau: use proper prototype in nouveau_pmops_runtime() definition drm/nouveau: Skip vga_fini on non-PCI device drm/nouveau/tegra: Don't leave GPU in reset drm/nouveau/tegra: Skip manual unpowergating when not necessary drm/nouveau/hwmon: Change permissions to numeric drm/nouveau/hwmon: expose the auto_point and pwm_min/max attrs drm/nouveau/hwmon: Remove old code, add .write/.read operations drm/nouveau/hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string drm/nouveau/hwmon: Add config for all sensors and their settings drm/nouveau/disp/gm200-: allow non-identity mapping of SOR <-> macro links drm/nouveau/disp/nv50-: implement a common supervisor 3.0 drm/nouveau/disp/nv50-: implement a common supervisor 2.2 drm/nouveau/disp/nv50-: implement a common supervisor 2.1 drm/nouveau/disp/nv50-: implement a common supervisor 2.0 drm/nouveau/disp/nv50-: implement a common supervisor 1.0 drm/nouveau/disp/nv50-gt21x: remove workaround for dp->tmds hotplug issues drm/nouveau/disp/dp: use new devinit script interpreter entry-point drm/nouveau/disp/dp: determine link bandwidth requirements from head state drm/nouveau/disp: introduce acquire/release display path methods ... commit 4a525bad68b424d167042342db19d0c0e80e8b29 Merge: 925344c 43240bb Author: Dave Airlie Date: Tue Jun 20 11:07:03 2017 +1000 Merge tag 'drm/tegra/for-4.13-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.13-rc1 This starts off with the addition of more documentation for the host1x and DRM drivers and finishes with a slew of fixes and enhancements for the staging IOCTLs as a result of the awesome work done by Dmitry and Erik on the grate reverse-engineering effort. * tag 'drm/tegra/for-4.13-rc1' of git://anongit.freedesktop.org/tegra/linux: gpu: host1x: At first try a non-blocking allocation for the gather copy gpu: host1x: Refactor channel allocation code gpu: host1x: Remove unused host1x_cdma_stop() definition gpu: host1x: Remove unused 'struct host1x_cmdbuf' gpu: host1x: Check waits in the firewall gpu: host1x: Correct swapped arguments in the is_addr_reg() definition gpu: host1x: Forbid unrelated SETCLASS opcode in the firewall gpu: host1x: Forbid RESTART opcode in the firewall gpu: host1x: Forbid relocation address shifting in the firewall gpu: host1x: Do not leak BO's phys address to userspace gpu: host1x: Correct host1x_job_pin() error handling gpu: host1x: Initialize firewall class to the job's one drm/tegra: dc: Disable plane if it is invisible drm/tegra: dc: Apply clipping to the plane drm/tegra: dc: Avoid reset asserts on Tegra20 drm/tegra: Check syncpoint ID in the 'submit' IOCTL drm/tegra: Correct copying of waitchecks and disable them in the 'submit' IOCTL drm/tegra: Check for malformed offsets and sizes in the 'submit' IOCTL drm/tegra: Add driver documentation gpu: host1x: Flesh out kerneldoc commit dfe1c6d7efa8ead6878b73216d4c891a28207528 Author: Taeung Song Date: Sat Jun 17 12:46:42 2017 +0900 perf config: Refactor the code using 'ret' variable in cmd_config() To simplify the code related to 'ret' variable in cmd_config(), initialize 'ret' with -1 instead of 0 and use goto to perform resource release at the end of the function, setting ret to zero just before the out_err label, as usual in the kernel sources. Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1497671202-20495-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-config.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 4f1fd74283582f3f5c34d1c9ed55117d775b4a20 Author: Taeung Song Date: Sat Jun 17 12:46:37 2017 +0900 perf config: Check error cases of {show_spec, set}_config() show_spec_config() and set_config() can be called multiple times in the loop in cmd_config(). However, The error cases of them wasn't checked, so fix it. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1497671197-20450-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-config.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 1096c35aa821cc4789a64232a0e210bb87a0e5e8 Author: Namhyung Kim Date: Sun Jun 18 23:23:02 2017 +0900 perf ftrace: Add -D option for depth filter The -D/--graph-depth option is to set max graph depth. The following example traces max 2-depth of page fault handler. $ sudo perf ftrace -G __do_page_fault -D 2 -- hello ... 0) | __do_page_fault() { 0) 0.063 us | down_read_trylock(); 0) 0.251 us | find_vma(); 0) 5.374 us | handle_mm_fault(); 0) 0.054 us | up_read(); 0) 7.463 us | } ... Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170618142302.25390-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-ftrace.txt | 3 +++ tools/perf/builtin-ftrace.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 78b83e8b12b4467540ca501c7c019e9d46051957 Author: Namhyung Kim Date: Sun Jun 18 23:23:01 2017 +0900 perf ftrace: Add option for function filtering The -T/--trace-funcs and -N/--notrace-funcs options are to specify functions to enable/disable tracing dynamically. The -G/--graph-funcs and -g/--nograph-funcs options are to set filters for function graph tracer. For example, to trace fault handling functions only: $ sudo perf ftrace -T *fault hello 0) | __do_page_fault() { 0) | handle_mm_fault() { 0) 2.117 us | __handle_mm_fault(); 0) 3.627 us | } 0) 7.811 us | } 0) | __do_page_fault() { 0) | handle_mm_fault() { 0) 2.014 us | __handle_mm_fault(); 0) 2.424 us | } 0) 2.951 us | } ... To trace all functions executed in __do_page_fault: $ sudo perf ftrace -G __do_page_fault hello 2) | __do_page_fault() { 3) 0.060 us | down_read_trylock(); 3) | find_vma() { 3) 0.075 us | vmacache_find(); 3) 0.053 us | vmacache_update(); 3) 1.246 us | } 3) | handle_mm_fault() { 3) 0.063 us | __rcu_read_lock(); 3) 0.056 us | mem_cgroup_from_task(); 3) 0.057 us | __rcu_read_unlock(); 3) | __handle_mm_fault() { 3) | filemap_map_pages() { 3) 0.058 us | __rcu_read_lock(); 3) | alloc_set_pte() { ... But don't want to show details in handle_mm_fault: $ sudo perf ftrace -G __do_page_fault -g handle_mm_fault hello 3) | __do_page_fault() { 3) 0.049 us | down_read_trylock(); 3) | find_vma() { 3) 0.048 us | vmacache_find(); 3) 0.041 us | vmacache_update(); 3) 0.680 us | } 3) 0.036 us | up_read(); 3) 4.547 us | } /* __do_page_fault */ ... Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170618142302.25390-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-ftrace.txt | 30 ++++++++ tools/perf/builtin-ftrace.c | 117 +++++++++++++++++++++++++++++-- 2 files changed, 141 insertions(+), 6 deletions(-) commit 29681bc5bb4326c2f9eac5dc68d8fad3e88b4bb5 Author: Namhyung Kim Date: Sun Jun 18 23:23:00 2017 +0900 perf ftrace: Move setup_pager before opening trace_pipe The 'perf ftrace' command fails to reset tracer after finishing recording like below: $ sudo perf ftrace -v hello write 'nop' to tracing/current_tracer failed: Device or resource busy ... This is because the trace_pipe file is open in pager process. Move the pager setup to before opening the file. Signed-off-by: Namhyung Kim Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: kernel-team@lge.com Fixes: 583359646fde ("perf ftrace: Use pager for displaying result") Link: http://lkml.kernel.org/r/20170618142302.25390-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e7bd9ba20a9ec7024a0566a93c22b9571a48939a Author: Namhyung Kim Date: Sun Jun 18 23:22:59 2017 +0900 perf ftrace: Show error message when fails to set ftrace files It'd be better for debugging to show an error message when it fails to setup ftrace for some reason. Signed-off-by: Namhyung Kim Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170618142302.25390-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 106dacd86f042968e0bb974490fcb9cd017cd03a Author: Mark Santaniello Date: Mon Jun 19 09:38:25 2017 -0700 perf script: Support -F brstackoff,dso The idea here is to make AutoFDO easier in cloud environment with ASLR. It's easiest to show how this is useful by example. I built a small test akin to "while(1) { do_nothing(); }" where the do_nothing function is loaded from a dso: $ cat burncpu.cpp #include int main() { void* handle = dlopen("./dso.so", RTLD_LAZY); if (!handle) return -1; typedef void (*fp)(); fp do_nothing = (fp) dlsym(handle, "do_nothing"); while(1) { do_nothing(); } } $ cat dso.cpp extern "C" void do_nothing() {} $ cat build.sh #!/bin/bash g++ -shared dso.cpp -o dso.so g++ burncpu.cpp -o burncpu -ldl I sampled the execution of this program with perf record -b. Using the existing "brstack,dso", we get absolute addresses that are affected by ASLR, and could be different on different hosts. The address does not uniquely identify a branch/target in the binary: $ perf script -F brstack,dso | sed 's/\/0 /\/0\n/g' | grep burncpu | grep dso.so | head -n 1 0x7f967139b6aa(/tmp/burncpu/dso.so)/0x4006b1(/tmp/burncpu/exe)/P/-/-/0 Using the existing "brstacksym,dso" is a little better, because the symbol plus offset and dso name *does* uniquely identify a branch/target in the binary. Ultimately, however, AutoFDO wants a simple offset into the binary, so we'd have to undo all the work perf did to symbolize in the first place: $ perf script -F brstacksym,dso | sed 's/\/0 /\/0\n/g' | grep burncpu | grep dso.so | head -n 1 do_nothing+0x5(/tmp/burncpu/dso.so)/main+0x44(/tmp/burncpu/exe)/P/-/-/0 With the new "brstackoff,dso" we get what we need: a simple offset into a specific dso/binary that uniquely identifies a branch/target: $ perf script -F brstackoff,dso | sed 's/\/0 /\/0\n/g' | grep burncpu | grep dso.so | head -n 1 0x6aa(/tmp/burncpu/dso.so)/0x4006b1(/tmp/burncpu/exe)/P/-/-/0 Signed-off-by: Mark Santaniello Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170619163825.2012979-2-marksan@fb.com [ Updated documentation about 'brstackoff' using text from above ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 4 ++- tools/perf/builtin-script.c | 56 +++++++++++++++++++++++++++++--- 2 files changed, 55 insertions(+), 5 deletions(-) commit 55b9b50811ca459e4688543b688b7b2b85ec5ea8 Author: Mark Santaniello Date: Mon Jun 19 09:38:24 2017 -0700 perf script: Support -F brstack,dso and brstacksym,dso Perf script can report the dso for "addr" and "ip" fields. This adds the same support for the "brstack" and "brstacksym" fields. This can be helpful for AutoFDO: we can ignore LBR entries unless the source and target address are both in the target module we are about to build. I built a small test akin to "while(1) { do_nothing(); }" where the do_nothing function is loaded from a dso: $ cat burncpu.cpp #include int main() { void* handle = dlopen("./dso.so", RTLD_LAZY); if (!handle) return -1; typedef void (*fp)(); fp do_nothing = (fp) dlsym(handle, "do_nothing"); while(1) { do_nothing(); } } $ cat dso.cpp extern "C" void do_nothing() {} $ cat build.sh #!/bin/bash g++ -shared dso.cpp -o dso.so g++ burncpu.cpp -o burncpu -ldl I sampled the execution with perf record -b. Using the new perf script functionality I can easily find cases where there was a transition from one dso to another: $ perf record -a -b -- sleep 5 [ perf record: Woken up 55 times to write data ] [ perf record: Captured and wrote 18.815 MB perf.data (43593 samples) ] $ perf script -F brstack,dso | sed 's/\/0 /\/0\n/g' | grep burncpu | grep dso.so | head -n 1 0x7f967139b6aa(/tmp/burncpu/dso.so)/0x4006b1(/tmp/burncpu/exe)/P/-/-/0 $ perf script -F brstacksym,dso | sed 's/\/0 /\/0\n/g' | grep burncpu | grep dso.so | head -n 1 do_nothing+0x5(/tmp/burncpu/dso.so)/main+0x44(/tmp/burncpu/exe)/P/-/-/0 Signed-off-by: Mark Santaniello Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170619163825.2012979-1-marksan@fb.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 61 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 12 deletions(-) commit 9357c150e60492fb865aeae52b6e9132c8fac4e4 Author: Chen Jun Date: Fri May 26 15:38:20 2017 +0800 clk: hi3660: add clocks for video encoder, decoder and ISP This patch adds more clocks for hi3660, including: - video encoder and decoder - ISP (Image Signal Processing) Signed-off-by: Chen Jun Signed-off-by: Zhong Kaihua Signed-off-by: Guodong Xu Reviewed-by: Zhangfei Gao Acked-by: Zhangfei Gao Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi3660.c | 40 ++++++++++++++++++++++++++++++++ include/dt-bindings/clock/hi3660-clock.h | 17 ++++++++++++++ 2 files changed, 57 insertions(+) commit 73908acb1e4afc7bc55354239597ac5e77098fb2 Author: Chen Jun Date: Fri May 26 15:38:19 2017 +0800 clk: hi3660: fix wrong parent name of clk_mux_sysbus Parent name of clk_mux_sysbus is not correct. This patch fixes it. Signed-off-by: Chen Jun Signed-off-by: John Stultz Signed-off-by: Guodong Xu Acked-by: Zhangfei Gao Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi3660.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a94fafb7be9d847bcb1b293a509b92e939eb9ffa Author: Srinivas Kandagatla Date: Mon Jun 12 10:41:22 2017 +0100 clk: gcc-msm8916: add support to 9.6MHz codec clk MCLK for internal audio codec is expected to be at 9.6MHz by default. This patch adds support to 9.6MHz to make the default case possible. Signed-off-by: Srinivas Kandagatla Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8916.c | 1 + 1 file changed, 1 insertion(+) commit 371a95074558a08d47e3acaa29f810aae6f03d0a Author: Abhishek Sahu Date: Fri Jun 9 15:11:57 2017 +0530 clk: qcom: Add ipq8074 Global Clock Controller support This patch adds support for the global clock controller found on the ipq8074 based devices. This includes UART, I2C, SPI etc. Signed-off-by: Abhishek Sahu Signed-off-by: Varadarajan Narayanan Signed-off-by: Stephen Boyd drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gcc-ipq8074.c | 1007 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1017 insertions(+) commit bcb486f02622e763ef17badffceb0cae82e4ca56 Author: Abhishek Sahu Date: Fri Jun 9 15:11:56 2017 +0530 clk: qcom: Add DT bindings for ipq8074 gcc clock controller Add the compatible strings and the include file for ipq8074 gcc clock controller. Acked-by: Rob Herring (bindings) Signed-off-by: Varadarajan Narayanan Signed-off-by: Abhishek Sahu Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/qcom,gcc.txt | 1 + include/dt-bindings/clock/qcom,gcc-ipq8074.h | 152 +++++++++++++++++++++ 2 files changed, 153 insertions(+) commit 8b979d625882e655d9c3ee51efdcd5517bdf32d4 Author: Linus Walleij Date: Sun Jun 18 23:55:49 2017 +0200 clk: add DT bindings header for Gemini clock controller This adds the DT binding macros used by the clock controller. Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd include/dt-bindings/clock/cortina,gemini-clock.h | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit d8e349af86fbd3b0ea5cd846f910093cc5501713 Author: Linus Walleij Date: Sun Jun 18 23:55:48 2017 +0200 reset: add DT bindings header for Gemini reset controller This adds the DT binding macros used by the reset controller. Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd include/dt-bindings/reset/cortina,gemini-reset.h | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 4a5aa069601f4a5b72b1e2238b2f8f1eff9c1b4c Author: Stephen Boyd Date: Mon Jun 19 17:11:47 2017 -0700 clk: mvebu: cp110: Minor cleanups Mark an array of strings static const and remove the dereference of a function pointer when assigning to the platform driver probe struct member. drivers/clk/mvebu/cp110-system-controller.c:89:12: warning: symbol 'gate_base_names' was not declared. Should it be static? drivers/clk/mvebu/cp110-system-controller.c:447:18: error: cannot dereference this type Signed-off-by: Stephen Boyd drivers/clk/mvebu/cp110-system-controller.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4d4f9a6a192d4e580d27208e7c49dfda12cabb59 Merge: b7f8101 a45af6d Author: Stephen Boyd Date: Mon Jun 19 17:05:01 2017 -0700 Merge branch 'clk-cp110' of git://git.infradead.org/linux-mvebu into clk-next Pull improved Marvel Armada 7K/8K cp110 clk support from Gregory CLEMENT: We got more information about the clock controllers and the clock tree of the CP110 part that we find in the Marvell Armada 7K/8K SoCs. The clk driver is modified accordingly from this new information. * 'clk-cp110' of git://git.infradead.org/linux-mvebu: clk: mvebu: cp110: add sdio clock to cp-110 system controller clk: mvebu: cp110: introduce a new binding clk: mvebu: cp110: do not depend anymore of the *-clock-output-names clk: mvebu: cp110: make failure labels more meaningful commit b7f8101d6e75fefd22c39624a30c9ed3d7a72463 Author: Dinh Nguyen Date: Thu Jun 8 09:18:39 2017 -0500 clk: socfpga: Fix the smplsel on Arria10 and Stratix10 The smplsel bits for the SDMMC clock on Arria10 and Stratix10 platforms are offset by 1 additional bit. Add a new macro SYSMGR_SDMMC_CTRL_SET_AS10 for usage on the Arria10 and Stratix10 platforms. Fixes: 5611a5ba8e54 ("clk: socfpga: update clk.h so for Arria10 platform to use") Signed-off-by: Dinh Nguyen Signed-off-by: Stephen Boyd drivers/clk/socfpga/clk-gate-a10.c | 2 +- drivers/clk/socfpga/clk.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 4a630fadbb29d9efaedb525f1a8f7449ad107641 Author: Kasin Li Date: Mon Jun 19 15:36:53 2017 -0600 drm/msm: Fix potential buffer overflow issue In function submit_create, if nr_cmds or nr_bos is assigned with negative value, the allocated buffer may be small than intended. Using this buffer will lead to buffer overflow issue. Signed-off-by: Kasin Li Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit a925810f6ebb89ef94977c4f499264c8fd199dff Author: Leo Yan Date: Mon May 22 12:52:27 2017 +0800 clk: Hi3660: register fixed_rate_clks with CLK_OF_DECLARE_DRIVER The timer will register into system at very early phase at kernel boot; if timer needs to use clock, the clock should be get ready in function of_clk_init() so later the timer driver probe can retrieve clock successfully. This is finished in below flow on arm64: start_kernel() `-> time_init() `-> of_clk_init(NULL) => register timer's clock `-> clocksource_probe() => register timer On Hi3660 the sp804 timer uses clock "osc32k", this clock is registered as platform driver rather than CLK_OF_DECLARE_DRIVER method. As result, sp804 timer probe returns failure due if cannot bind clock properly. To fix the failure, this patch is to split crgctrl clocks into two subsets. One part is for fixed_rate_clks which includes pre-defined fixed rate clocks, and "osc32k" clock is in this category; So we change their registration to CLK_OF_DECLARE_DRIVER method, as result the clocks can be registered ahead with function of_clk_init() and timer driver can bind timer clock successfully; the rest of the crgctrl clocks are still registered by the probe of the platform driver. This patch also adds checking for all crgctrl clocks registration and print out log if any clock has failure. Signed-off-by: Leo Yan Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi3660.c | 48 ++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 10 deletions(-) commit 56c1af4606f04048e3ae9ab2027a708b9684ff37 Author: Wong Vee Khee Date: Thu Jun 1 17:43:06 2017 +0800 PCI: Add sysfs max_link_speed/width, current_link_speed/width, etc Expose PCIe bridges attributes such as secondary bus number, subordinate bus number, max link speed and link width, current link speed and link width via sysfs in /sys/bus/pci/devices/... This information is available via lspci, but that requires root privilege. Signed-off-by: Wong Vee Khee Signed-off-by: Hui Chun Ong [bhelgaas: changelog, return errors early to unindent usual case, return errors with same style throughout] Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 199 +++++++++++++++++++++++++++++++++++++++++- include/uapi/linux/pci_regs.h | 1 + 2 files changed, 196 insertions(+), 4 deletions(-) commit 5ac55629d6b3fcde69f46aa772c6e83be0bdcbbf Author: Alex Xie Date: Fri Jun 16 09:07:29 2017 -0400 drm/amdgpu: Optimize mutex usage (v4) In original function amdgpu_bo_list_get, the waiting for result->lock can be quite long while mutex bo_list_lock was holding. It can make other tasks waiting for bo_list_lock for long period. Secondly, this patch allows several tasks(readers of idr) to proceed at the same time. v2: use rcu and kref (Dave Airlie and Christian König) v3: update v1 commit message (Michel Dänzer) v4: rebase on upstream (Alex Deucher) Signed-off-by: Alex Xie Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 40 ++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 12 deletions(-) commit 99eea4df901907b9121ad1c726d86c352a5eaca5 Author: Alex Xie Date: Fri Jun 16 00:23:41 2017 -0400 drm/amdgpu: Optimization of AMDGPU_BO_LIST_OP_CREATE (v2) v2: Remove duplication of zeroing of bo list (Christian König) Move idr_alloc function to end of ioctl (Christian König) Call kfree bo_list when amdgpu_bo_list_set return error. Combine the previous two patches into this patch. Add amdgpu_bo_list_set function prototype. Signed-off-by: Alex Xie Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 53 ++++++++++++++++------------- 1 file changed, 30 insertions(+), 23 deletions(-) commit ea7cdd7b7baffc40d1e60de7c93e5b1aabb3d081 Author: Darrick J. Wong Date: Fri Jun 16 11:00:11 2017 -0700 xfs: separate function to check if inode shares extents Separate the "clear reflink flag" function into one function that checks if the flag is needed, and a second function that checks and clears the flag. The inode scrub code will want to check the necessity of the flag without clearing it. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_reflink.c | 88 +++++++++++++++++++++++++++++++--------------------- fs/xfs/xfs_reflink.h | 2 ++ 2 files changed, 54 insertions(+), 36 deletions(-) commit 92ff7285f1df5590d53ab7031f0b86552b59121d Author: Darrick J. Wong Date: Fri Jun 16 11:00:10 2017 -0700 xfs: reflink find shared should take a transaction Adapt _reflink_find_shared to take an optional transaction pointer. The inode scrubber code will need to decide (within transaction context) if a file has shared blocks. To avoid buffer deadlocks, we must pass the tp through to this function's utility calls. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_bmap_util.c | 4 ++-- fs/xfs/xfs_reflink.c | 15 ++++++++------- fs/xfs/xfs_reflink.h | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) commit 378f681c4b588c0432236e5517bf47b7e54ff2dc Author: Darrick J. Wong Date: Mon Jun 19 08:58:56 2017 -0700 xfs: check if an inode is cached and allocated Check the inode cache for a particular inode number. If it's in the cache, check that it's not currently being reclaimed. If it's not being reclaimed, return zero if the inode is allocated. This function will be used by various scrubbers to decide if the cache is more up to date than the disk in terms of checking if an inode is allocated. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_icache.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- fs/xfs/xfs_icache.h | 4 ++++ 2 files changed, 54 insertions(+), 2 deletions(-) commit e936945ee49693f40217db82a7db55c94e34ce4c Author: Darrick J. Wong Date: Fri Jun 16 11:00:08 2017 -0700 xfs: export _inobt_btrec_to_irec and _ialloc_cluster_alignment for scrub Create a function to extract an in-core inobt record from a generic btree_rec union so that scrub will be able to check inobt records and check inode block alignment. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_ialloc.c | 44 +++++++++++++++++++++++++++----------------- fs/xfs/libxfs/xfs_ialloc.h | 5 +++++ 2 files changed, 32 insertions(+), 17 deletions(-) commit 118bb47e281cde728608633f1a358fb9f2ac0adc Author: Darrick J. Wong Date: Fri Jun 16 11:00:08 2017 -0700 xfs: plumb in needed functions for range querying of various btrees Plumb in the pieces (init_high_key, diff_two_keys) necessary to call query_range on the inode space and block mapping btrees and to extract raw btree records. This will eventually be used by the inobt and bmbt scrubbers. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_bmap_btree.c | 22 ++++++++++++++++++++++ fs/xfs/libxfs/xfs_ialloc_btree.c | 26 ++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 2678809799e6e37db0800725157f5ebfc03a9df7 Author: Darrick J. Wong Date: Fri Jun 16 11:00:07 2017 -0700 xfs: export various function for the online scrubber Export various internal functions so that the online scrubber can use them to check the state of metadata. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_alloc.c | 2 +- fs/xfs/libxfs/xfs_alloc.h | 2 ++ fs/xfs/libxfs/xfs_btree.c | 12 ++++++------ fs/xfs/libxfs/xfs_btree.h | 13 +++++++++++++ fs/xfs/libxfs/xfs_dir2_leaf.c | 2 +- fs/xfs/libxfs/xfs_dir2_priv.h | 2 ++ fs/xfs/libxfs/xfs_inode_buf.c | 2 +- fs/xfs/libxfs/xfs_inode_buf.h | 3 +++ fs/xfs/libxfs/xfs_rmap.c | 3 ++- fs/xfs/libxfs/xfs_rmap.h | 3 +++ fs/xfs/libxfs/xfs_rtbitmap.c | 2 +- fs/xfs/xfs_itable.c | 2 +- fs/xfs/xfs_itable.h | 2 ++ fs/xfs/xfs_rtalloc.h | 3 +++ 14 files changed, 41 insertions(+), 12 deletions(-) commit 38dee376d67047e9877a34e408013852c9729eb8 Author: Darrick J. Wong Date: Fri Jun 16 11:00:06 2017 -0700 xfs: always compile the btree inorder check functions The btree record and key inorder check functions will be used by the btree scrubber code, so make sure they're always built. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_alloc_btree.c | 6 ------ fs/xfs/libxfs/xfs_bmap_btree.c | 4 ---- fs/xfs/libxfs/xfs_btree.h | 2 -- fs/xfs/libxfs/xfs_ialloc_btree.c | 6 ------ fs/xfs/libxfs/xfs_refcount_btree.c | 4 ---- fs/xfs/libxfs/xfs_rmap_btree.c | 4 ---- 6 files changed, 26 deletions(-) commit c8ce540db5f67d254aafb14b5d76422c62a906df Author: Darrick J. Wong Date: Fri Jun 16 11:00:05 2017 -0700 xfs: remove double-underscore integer types This is a purely mechanical patch that removes the private __{u,}int{8,16,32,64}_t typedefs in favor of using the system {u,}int{8,16,32,64}_t typedefs. This is the sed script used to perform the transformation and fix the resulting whitespace and indentation errors: s/typedef\t__uint8_t/typedef __uint8_t\t/g s/typedef\t__uint/typedef __uint/g s/typedef\t__int\([0-9]*\)_t/typedef int\1_t\t/g s/__uint8_t\t/__uint8_t\t\t/g s/__uint/uint/g s/__int\([0-9]*\)_t\t/__int\1_t\t\t/g s/__int/int/g /^typedef.*int[0-9]*_t;$/d Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_alloc_btree.c | 20 +-- fs/xfs/libxfs/xfs_attr_remote.c | 8 +- fs/xfs/libxfs/xfs_attr_sf.h | 10 +- fs/xfs/libxfs/xfs_bit.h | 24 ++-- fs/xfs/libxfs/xfs_bmap_btree.c | 8 +- fs/xfs/libxfs/xfs_btree.c | 22 ++-- fs/xfs/libxfs/xfs_btree.h | 18 +-- fs/xfs/libxfs/xfs_cksum.h | 16 +-- fs/xfs/libxfs/xfs_da_btree.c | 2 +- fs/xfs/libxfs/xfs_da_btree.h | 8 +- fs/xfs/libxfs/xfs_da_format.c | 28 ++-- fs/xfs/libxfs/xfs_da_format.h | 64 +++++----- fs/xfs/libxfs/xfs_dir2.h | 8 +- fs/xfs/libxfs/xfs_dir2_leaf.c | 12 +- fs/xfs/libxfs/xfs_dir2_priv.h | 2 +- fs/xfs/libxfs/xfs_dir2_sf.c | 2 +- fs/xfs/libxfs/xfs_format.h | 112 ++++++++-------- fs/xfs/libxfs/xfs_fs.h | 12 +- fs/xfs/libxfs/xfs_ialloc.c | 6 +- fs/xfs/libxfs/xfs_ialloc_btree.c | 4 +- fs/xfs/libxfs/xfs_inode_buf.c | 2 +- fs/xfs/libxfs/xfs_inode_buf.h | 28 ++-- fs/xfs/libxfs/xfs_log_format.h | 256 ++++++++++++++++++------------------- fs/xfs/libxfs/xfs_log_recover.h | 2 +- fs/xfs/libxfs/xfs_quota_defs.h | 4 +- fs/xfs/libxfs/xfs_refcount_btree.c | 8 +- fs/xfs/libxfs/xfs_rmap.c | 8 +- fs/xfs/libxfs/xfs_rmap.h | 8 +- fs/xfs/libxfs/xfs_rmap_btree.c | 30 ++--- fs/xfs/libxfs/xfs_rtbitmap.c | 2 +- fs/xfs/libxfs/xfs_sb.c | 4 +- fs/xfs/libxfs/xfs_types.h | 46 +++---- fs/xfs/xfs_aops.c | 4 +- fs/xfs/xfs_attr_list.c | 2 +- fs/xfs/xfs_bmap_util.c | 24 ++-- fs/xfs/xfs_buf.c | 2 +- fs/xfs/xfs_dir2_readdir.c | 8 +- fs/xfs/xfs_discard.c | 4 +- fs/xfs/xfs_dquot.c | 2 +- fs/xfs/xfs_fsops.c | 16 +-- fs/xfs/xfs_fsops.h | 4 +- fs/xfs/xfs_inode.c | 6 +- fs/xfs/xfs_inode.h | 4 +- fs/xfs/xfs_ioctl.c | 20 +-- fs/xfs/xfs_ioctl.h | 10 +- fs/xfs/xfs_ioctl32.h | 6 +- fs/xfs/xfs_linux.h | 20 +-- fs/xfs/xfs_log.c | 20 +-- fs/xfs/xfs_log.h | 2 +- fs/xfs/xfs_log_priv.h | 2 +- fs/xfs/xfs_log_recover.c | 28 ++-- fs/xfs/xfs_mount.c | 16 +-- fs/xfs/xfs_mount.h | 34 ++--- fs/xfs/xfs_qm_bhv.c | 2 +- fs/xfs/xfs_rtalloc.c | 8 +- fs/xfs/xfs_stats.c | 8 +- fs/xfs/xfs_stats.h | 190 +++++++++++++-------------- fs/xfs/xfs_super.c | 26 ++-- fs/xfs/xfs_trace.h | 20 +-- fs/xfs/xfs_trans.h | 2 +- fs/xfs/xfs_trans_rmap.c | 2 +- 61 files changed, 634 insertions(+), 642 deletions(-) commit 5a4c73342ad493c61f19a1406f47dcd35e18030f Author: Darrick J. Wong Date: Fri Jun 16 11:00:04 2017 -0700 xfs: optimize _btree_query_all Don't bother wandering our way through the leaf nodes when the caller issues a query_all; just zoom down the left side of the tree and walk rightwards along level zero. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_btree.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f64622167f4aa5124fed264d481509829d34e126 Author: Arvind Yadav Date: Wed May 24 19:31:06 2017 +0530 i2c: emev2: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-emev2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f136e090c73ed2ed568dcd013c8e51ed4693a279 Author: Jean Delvare Date: Mon Apr 24 08:52:37 2017 +0200 Fix English in description of GCC_PLUGIN_STRUCTLEAK Signed-off-by: Jean Delvare Fixes: c61f13eaa1ee ("gcc-plugins: Add structleak for more stack initialization") Cc: Kees Cook Signed-off-by: Kees Cook arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b57fb7e35957c6838f89f4ed7e3f8433a4bbfc5 Author: Wang Nan Date: Wed Jun 21 02:32:03 2017 +0800 perf test llvm: Avoid error when PROFILE_ALL_BRANCHES is set The 'if' keyword is a define that expands to complex code when CONFIG_PROFILE_ALL_BRANCHES is selected, which causes a 'perf test LLVM' failure like: $ ./perf test LLVM 35: LLVM search and compile : 35.1: Basic BPF llvm compile : Ok 35.2: kbuild searching : Ok 35.3: Compile source for BPF prologue generation: FAILED! 35.4: Compile source for BPF relocation : Skip The only affected test case is bpf-script-test-prologue.c because it uses kernel headers and has 'if' inside. This patch undefines 'if' to make it passes perf test. More detailed analysis from a message in this thread, also by Wang: The problem is caused by following relocation information: $ readelf -a ./llvmsubtest3 ... [ 5] _ftrace_branch PROGBITS 0000000000000000 00000260 00000000000000a0 0000000000000000 WA 0 0 4 ... Relocation section '.relfunc=null_lseek file->f_mode offset orig' at offset 0x490 contains 4 entries: Offset Info Type Sym. Value Sym. Name 000000000038 000b00000001 unrecognized: 1 0000000000000000 _ftrace_branch 0000000000b0 000b00000001 unrecognized: 1 0000000000000000 _ftrace_branch 000000000128 000b00000001 unrecognized: 1 0000000000000000 _ftrace_branch 0000000001c0 000b00000001 unrecognized: 1 0000000000000000 _ftrace_branch Relocation section '.rel_ftrace_branch' at offset 0x4d0 contains 8 entries: Offset Info Type Sym. Value Sym. Name 000000000000 000200000001 unrecognized: 1 0000000000000000 .L__func__.bpf_func__n 000000000008 000100000001 unrecognized: 1 0000000000000015 .L.str 000000000028 000200000001 unrecognized: 1 0000000000000000 .L__func__.bpf_func__n 000000000030 000100000001 unrecognized: 1 0000000000000015 .L.str 000000000050 000200000001 unrecognized: 1 0000000000000000 .L__func__.bpf_func__n 000000000058 000100000001 unrecognized: 1 0000000000000015 .L.str 000000000078 000200000001 unrecognized: 1 0000000000000000 .L__func__.bpf_func__n 000000000080 000100000001 unrecognized: 1 0000000000000015 .L.str ... So I think the failure is because you enabled CONFIG_PROFILE_ALL_BRANCHES. I can reproduce your buggy result by selecting CONFIG_PROFILE_ALL_BRANCHES in my kbuild: $ ./perf test LLVM 35: LLVM search and compile : 35.1: Basic BPF llvm compile : Ok 35.2: kbuild searching : Ok 35.3: Compile source for BPF prologue generation: FAILED! 35.4: Compile source for BPF relocation : Skip Simply undef CONFIG_PROFILE_ALL_BRANCHES in clang opts not working because it is introduced by "#include ", which override cmdline options. So I think the best way is to undefine 'if' inside BPF script. Reported-and-Tested-by: Thomas-Mich Richter Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: Hendrik Brueckner Cc: Zefan Li Link: http://lkml.kernel.org/r/20170620183203.2517-1-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bpf-script-test-prologue.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 64601cb1343f1b740aa7a612a1aec778a8163445 Author: Paul Burton Date: Fri Jun 2 15:00:07 2017 -0700 leds: Remove SEAD-3 driver SEAD3 is using the generic syscon & regmap based register-bit-led driver as of commit c764583f40b8 ("MIPS: SEAD3: Use register-bit-led driver via DT for LEDs") merged in the v4.9 cycle. As such the custom SEAD-3 LED driver is now unused, so remove it. Signed-off-by: Paul Burton Cc: Jacek Anaszewski Cc: Pavel Machek Cc: Ralf Baechle Cc: Richard Purdie Cc: linux-leds@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 10 ------ drivers/leds/Makefile | 1 - drivers/leds/leds-sead3.c | 78 ----------------------------------------------- 3 files changed, 89 deletions(-) commit dcaa394807ac219d8597d25bad3fe1bc6c86123b Author: Jin Yao Date: Mon Jun 19 10:55:56 2017 +0800 perf annotate: Return arch from symbol__disassemble() and save it in browser In annotate browser, we will add support to check fused instructions. While this is x86-specific feature so we need the annotate browser to know what the arch it runs on. symbol__disassemble() has figured out the arch. This patch just lets the arch return from symbol__disassemble and save the arch in annotate browser. Signed-off-by: Yao Jin Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1497840958-4759-2-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 2 +- tools/perf/ui/browsers/annotate.c | 6 +++++- tools/perf/ui/gtk/annotate.c | 3 ++- tools/perf/util/annotate.c | 10 ++++++++-- tools/perf/util/annotate.h | 4 +++- 5 files changed, 19 insertions(+), 6 deletions(-) commit d3cef7fe5151eabcd97ad8f9e595ec55f6ffb318 Author: Kim Phillips Date: Fri Jun 16 11:23:39 2017 -0500 perf intel-pt/bts: Remove unused SAMPLE_SIZE defines and bts priv array These defines were probably dragged in from sampling support in earlier patches. They can be put back when needed. Signed-off-by: Kim Phillips Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170616112339.3fb6986e4ff33e353008244b@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/intel-bts.c | 4 ---- tools/perf/arch/x86/util/intel-pt.c | 4 ---- tools/perf/util/intel-bts.c | 2 -- 3 files changed, 10 deletions(-) commit 0c788d4726c916544490c17cdbfd1ae2a6347fa8 Author: Kim Phillips Date: Thu Jun 15 12:55:21 2017 -0500 perf coresight: Remove superfluous check before use The cs_etm_evsel variable is guaranteed to be set at this point in cs_etm_recording_options(). Signed-off-by: Kim Phillips Acked-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170615125521.80cc128dc856bc1f2e61b730@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/cs-etm.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 5c97cac63ac24c78c8126958a453774e49e706dd Author: Arnaldo Carvalho de Melo Date: Fri Jun 16 11:39:15 2017 -0300 tools: Adopt __aligned from kernel sources To have a more compact way to ask the compiler to use a specific alignment, making tools/ look more like kernel source code. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-8jiem6ubg9rlpbs7c2p900no@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 1 + tools/perf/util/evlist.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit c9f5da742fa3dfebc49d03deb312522e5db643ed Author: Arnaldo Carvalho de Melo Date: Fri Jun 16 11:39:15 2017 -0300 tools: Adopt __packed from kernel sources To have a more compact way to ask the compiler to not insert alignment paddings in a struct, making tools/ look more like kernel source code. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-byp46nr7hsxvvyc9oupfb40q@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 2 ++ tools/perf/util/genelf_debug.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 9dd4ca470e03334f95cc96529ba090921aac8eab Author: Arnaldo Carvalho de Melo Date: Fri Jun 16 11:39:15 2017 -0300 tools: Adopt noinline from kernel sources To have a more compact way to ask the compiler not to inline a function and to make tools/ source code look like kernel code. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-bis4pqxegt6gbm5dlqs937tn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 2 ++ tools/include/linux/compiler.h | 4 ++++ tools/perf/tests/bp_signal.c | 3 +-- tools/perf/tests/bp_signal_overflow.c | 3 +-- tools/perf/tests/dwarf-unwind.c | 15 +++++---------- 5 files changed, 13 insertions(+), 14 deletions(-) commit 0353631aa73e5e468fae1cd699bf860b59ba100d Author: Arnaldo Carvalho de Melo Date: Fri Jun 16 12:18:27 2017 -0300 perf tools: Use __maybe_unused consistently Instead of defining __unused or redefining __maybe_unused. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-4eleto5pih31jw1q4dypm9pf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 2 +- tools/perf/jvmti/jvmti_agent.h | 2 -- tools/perf/jvmti/libjvmti.c | 5 +++-- tools/perf/pmu-events/jevents.c | 4 ---- tools/perf/util/evsel.c | 3 ++- tools/perf/util/header.c | 3 ++- 6 files changed, 8 insertions(+), 11 deletions(-) commit 3ee350fb8a2b30fe47dd9e3b299dff0178fc8c88 Author: Arnaldo Carvalho de Melo Date: Fri Jun 16 11:57:54 2017 -0300 tools: Adopt __scanf from kernel sources To have a more compact way to ask the compiler to perform scanf like argument validation. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-yzqrhfjrn26lqqtwf55egg0h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 1 + tools/perf/util/pmu.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit afaed6d3e4aa56e939b496aafa5c97852e223122 Author: Arnaldo Carvalho de Melo Date: Fri Jun 16 11:57:54 2017 -0300 tools: Adopt __printf from kernel sources To have a more compact way to ask the compiler to perform printf like vargargs validation. v2: Fixed up build on arm, squashing a patch by Kim Phillips, thanks! Cc: Adrian Hunter Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Kim Phillips Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-dopkqmmuqs04cxzql0024nnu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 2 ++ tools/perf/arch/arm/util/cs-etm.c | 4 ++-- tools/perf/util/cache.h | 3 ++- tools/perf/util/debug.h | 11 ++++++----- tools/perf/util/intel-pt-decoder/intel-pt-log.h | 4 ++-- tools/perf/util/probe-event.h | 4 ++-- tools/perf/util/strbuf.h | 4 ++-- tools/perf/util/util.h | 12 +++--------- 8 files changed, 21 insertions(+), 23 deletions(-) commit 6c3466435b03fb84647f5ad413f98f2ccb12b5c2 Author: Arnaldo Carvalho de Melo Date: Fri Jun 16 11:39:15 2017 -0300 tools: Adopt __noreturn from kernel sources To have a more compact way to specify that a function doesn't return, instead of the open coded: __attribute__((noreturn)) And use it instead of the tools/perf/ specific variation, NORETURN. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-l0y144qzixcy5t4c6i7pdiqj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 2 ++ tools/perf/util/scripting-engines/trace-event-python.c | 3 ++- tools/perf/util/usage.c | 6 +++--- tools/perf/util/util.h | 10 ++++------ 4 files changed, 11 insertions(+), 10 deletions(-) commit 36ce565114b4e7e3b83f40309675f6b1720957e4 Author: Andi Kleen Date: Fri Jun 2 08:48:10 2017 -0700 perf script: Allow adding and removing fields With 'perf script' it is common that we just want to add or remove a field. Currently this requires figuring out the long list of default fields and specifying them first, and then adding/removing the new field. This patch adds a new + - syntax to merely add or remove fields, that allows more succint and clearer command lines For example to remove the comm field from PMU samples: Previously $ perf script -F tid,cpu,time,event,sym,ip,dso,period | head -1 swapper 0 [000] 504345.383126: 1 cycles: ffffffff90060c66 native_write_msr ([kernel.kallsyms]) with the new syntax perf script -F -comm | head -1 0 [000] 504345.383126: 1 cycles: ffffffff90060c66 native_write_msr ([kernel.kallsyms]) The new syntax cannot be mixed with normal overriding. v2: Fix example in description. Use tid vs pid. No functional changes. v3: Don't skip initialization when user specified explicit type. v4: Rebase. Remove empty line. Committer testing: # perf record -a usleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.748 MB perf.data (14 samples) ] Without a explicit field list specified via -F, defaults to: # perf script | head -2 perf 6338 [000] 18467.058607: 1 cycles: ffffffff89060c36 native_write_msr (/lib/modules/4.11.0-rc8+/build/vmlinux) swapper 0 [001] 18467.058617: 1 cycles: ffffffff89060c36 native_write_msr (/lib/modules/4.11.0-rc8+/build/vmlinux) # Which is equivalent to: # perf script -F comm,tid,cpu,time,period,event,ip,sym,dso | head -2 perf 6338 [000] 18467.058607: 1 cycles: ffffffff89060c36 native_write_msr (/lib/modules/4.11.0-rc8+/build/vmlinux) swapper 0 [001] 18467.058617: 1 cycles: ffffffff89060c36 native_write_msr (/lib/modules/4.11.0-rc8+/build/vmlinux) # So if we want to remove the comm, as in your original example, we would have to figure out the default field list and remove ' comm' from it: # perf script -F tid,cpu,time,period,event,ip,sym,dso | head -2 6338 [000] 18467.058607: 1 cycles: ffffffff89060c36 native_write_msr (/lib/modules/4.11.0-rc8+/build/vmlinux) 0 [001] 18467.058617: 1 cycles: ffffffff89060c36 native_write_msr (/lib/modules/4.11.0-rc8+/build/vmlinux) # With your patch this becomes simpler, one can remove fields by prefixing them with '-': # perf script -F -comm | head -2 6338 [000] 18467.058607: 1 cycles: ffffffff89060c36 native_write_msr (/lib/modules/4.11.0-rc8+/build/vmlinux) 0 [001] 18467.058617: 1 cycles: ffffffff89060c36 native_write_msr (/lib/modules/4.11.0-rc8+/build/vmlinux) # Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: Milian Wolff Link: http://lkml.kernel.org/r/20170602154810.15875-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 8 +++++++ tools/perf/builtin-script.c | 37 +++++++++++++++++++++++++++++--- 2 files changed, 42 insertions(+), 3 deletions(-) commit 8c1cedb4466809f9d741a4088314783cb88680a9 Author: Taeung Song Date: Mon May 8 20:07:30 2017 +0900 perf config: Invert an if statement to reduce nesting in cmd_config() Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1494241650-32210-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-config.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit ec27ae1892f7f8119ce82535ffcc2889ea3bb3d8 Author: Jin Yao Date: Thu May 4 22:58:15 2017 +0800 perf annotate browser: Display titles in left frame The annotate browser is divided into 2 frames. Left frame contains 3 columns (some platforms only have one column). For example: │26 int compute_flag() │27 { 22.80 1.20 │ sub $0x8,%rsp │25 int i; │ │27 i = rand() % 2; 22.78 1.20 1 │ → callq rand@plt While it's hard for user to understand what the data is. This patch adds the titles "Percent", "IPC" and "Cycle" on columns. Percent IPC Cycle │ │25 __attribute__((noinline)) │26 int compute_flag() │27 { 22.80 1.20 │ sub $0x8,%rsp │25 int i; │ │27 i = rand() % 2; 22.78 1.20 1 │ → callq rand@plt The titles are displayed at row 0 of annotate browser if row 0 doesn't have values of percent, ipc and cycle. Signed-off-by: Yao Jin Acked-by: Milian Wolff Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/1493909895-9668-3-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit c564f0db92b7f8d734ce530e42a540e12ae3d583 Author: Jin Yao Date: Thu May 4 22:58:14 2017 +0800 perf report: Remove unnecessary check in annotate_browser_write() In annotate_browser_write(), if (dl->offset != -1 && percent_max != 0.0) { if (percent_max != 0.0) { ... } ... } The second check of (percent_max != 0.0) is not necessary, remove it. Signed-off-by: Yao Jin Acked-by: Milian Wolff Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/1493909895-9668-2-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 8052bd8243e823a0954bcbafda8f91072598f13d Merge: d0fabd1 531c221 Author: Arnaldo Carvalho de Melo Date: Mon Jun 19 15:14:35 2017 -0300 Merge remote-tracking branch 'tip/perf/urgent' into perf/core Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Arnaldo Carvalho de Melo commit d8f431a0de4099c80fe38d65432853682c05d67b Merge: 5faab9e f5a651f Author: David S. Miller Date: Mon Jun 19 11:13:13 2017 -0700 Merge branch 'sparc-Suppressing-version-generation-failed-warnings-in-sparc' Nagarathnam Muthusamy says: ==================== sparc: Suppressing version generation failed warnings in sparc Compiling the sparc build of upstream kernel generates lots of warnings regarding version generation failure for functions defined in assembly files. This can be easily suppressed by adding those function prototypes to asm/asm-prototypes.h as in powerpc architecture. The following series of patches aims to clean the following warnings. WARNING: EXPORT symbol "atomic_add" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_niagara_4" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_sub_return" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_sub" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_vis_3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_xor" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_niagara2_getperf" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_xor" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_xor" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__bzero" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_and" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "raw_copy_to_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__flushw_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_niagara2_setperf" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__arch_hweight64" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__ffs" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "prom_root_node" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "csum_partial_copy_nocheck" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "memcpy" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_or" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_vis_4" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__arch_hweight32" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "ffs" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_and" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_niagara_3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_and" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "real_hard_smp_processor_id" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "clear_user_page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "memmove" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "raw_copy_from_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_add_return" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__memscan_generic" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_sub" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__memscan_zero" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_add" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "strncmp" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_sub" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_vis_5" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "ip_fast_csum" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "test_and_change_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__arch_hweight8" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "strlen" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_niagara_2" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_or" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_or" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_sub" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_add" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "clear_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_mach_set_watchdog" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "set_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__csum_partial_copy_from_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "memset" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__csum_partial_copy_to_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_add" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "change_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__clear_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_sub_return" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__arch_hweight16" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "tlb_type" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "VISenter" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "test_and_set_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_niagara_5" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "_clear_page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_vis_2" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_xor" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "test_and_clear_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "csum_partial" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_and" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "copy_user_page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_chip_type" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "raw_copy_in_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "memcmp" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_add_return" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_or" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_dec_if_positive" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_niagara_setperf" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_niagara_getperf" [vmlinux] version generation failed, symbol will not be versioned. With the fix, all these warnings will be removed during compilation. ==================== Signed-off-by: David S. Miller commit f5a651f1d5e524cab345250a783702fb6a3f14d6 Author: Nagarathnam Muthusamy Date: Mon Jun 19 13:08:50 2017 -0400 Adding the type of exported symbols Missing symbol type for few functions prevents genksyms from generating symbol versions for those functions. This patch fixes them. Signed-off-by: Nagarathnam Muthusamy Reviewed-by: Babu Moger Signed-off-by: David S. Miller arch/sparc/lib/checksum_64.S | 1 + arch/sparc/lib/csum_copy.S | 1 + arch/sparc/lib/memscan_64.S | 2 ++ arch/sparc/lib/memset.S | 1 + 4 files changed, 5 insertions(+) commit d16c0649feb4fe4e814f44803df5a617769c3233 Author: Nagarathnam Muthusamy Date: Mon Jun 19 13:08:49 2017 -0400 sed regex in Makefile.build requires line break between exported symbols The following regex in Makefile.build matches only one ___EXPORT_SYMBOL per line. sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ATOMIC_OPS macro in atomic_64.S expands multiple symbols in same line hence version generation is done only for the last matched symbol. This patch adds new line between the symbol expansions. Signed-off-by: Nagarathnam Muthusamy Reviewed-by: Babu Moger Signed-off-by: David S. Miller arch/sparc/lib/atomic_64.S | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) commit bdca8cc096203b17ad0ac4e19f50578207e054d2 Author: Nagarathnam Muthusamy Date: Mon Jun 19 13:08:48 2017 -0400 Adding asm-prototypes.h for genksyms to generate crc This patch adds the prototypes of assembly defined functions to asm-prototypes.h. Some prototypes are directly added as they are not present in any existing header files. Signed-off-by: Nagarathnam Muthusamy Reviewed-by: Babu Moger Signed-off-by: David S. Miller arch/sparc/include/asm/asm-prototypes.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit a5893870f8145b782e42d5ff187ae1dee6f2b650 Author: Arvind Yadav Date: Fri Jun 16 17:32:21 2017 +0530 ata: sata_rcar: make of_device_ids const. of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 3946 2296 0 6242 1862 drivers/ata/sata_rcar.o File size after constify sata_rcar_match. text data bss dec hex filename 5554 696 0 6250 186a drivers/ata/sata_rcar.o Signed-off-by: Arvind Yadav Signed-off-by: Tejun Heo drivers/ata/sata_rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79af3ae6e293855321dcd1a43c73be316fdff1a9 Author: Arvind Yadav Date: Fri Jun 16 17:24:41 2017 +0530 ata: pata_octeon_cf: make of_device_ids const. of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 465 696 4 1165 48d drivers/ata/pata_octeon_cf.o File size after constify octeon_cf_match. text data bss dec hex filename 865 280 4 1149 47d drivers/ata/pata_octeon_cf.o Signed-off-by: Arvind Yadav Signed-off-by: Tejun Heo drivers/ata/pata_octeon_cf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8917a777be3ba566377be05117f71b93a5fd909d Author: Ivan Delalande Date: Thu Jun 15 18:07:07 2017 -0700 tcp: md5: add TCP_MD5SIG_EXT socket option to set a key address prefix Replace first padding in the tcp_md5sig structure with a new flag field and address prefix length so it can be specified when configuring a new key for TCP MD5 signature. The tcpm_flags field will only be used if the socket option is TCP_MD5SIG_EXT to avoid breaking existing programs, and tcpm_prefixlen only when the TCP_MD5SIG_FLAG_PREFIX flag is set. Signed-off-by: Bob Gilligan Signed-off-by: Eric Mowat Signed-off-by: Ivan Delalande Signed-off-by: David S. Miller include/net/tcp.h | 1 + include/uapi/linux/tcp.h | 11 ++++++++--- net/ipv4/tcp.c | 3 ++- net/ipv4/tcp_ipv4.c | 16 ++++++++++++---- net/ipv6/tcp_ipv6.c | 25 ++++++++++++++++++------- 5 files changed, 41 insertions(+), 15 deletions(-) commit 6797318e623da68dfbacd0cb5c246f5ecd2baf6e Author: Ivan Delalande Date: Thu Jun 15 18:07:06 2017 -0700 tcp: md5: add an address prefix for key lookup This allows the keys used for TCP MD5 signature to be used for whole range of addresses, specified with a prefix length, instead of only one address as it currently is. Signed-off-by: Bob Gilligan Signed-off-by: Eric Mowat Signed-off-by: Ivan Delalande Signed-off-by: David S. Miller include/net/tcp.h | 6 +++-- net/ipv4/tcp_ipv4.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++------- net/ipv6/tcp_ipv6.c | 12 ++++++---- 3 files changed, 70 insertions(+), 16 deletions(-) commit 0944d889a237b6107f9ceeee053fe7221cdd1089 Author: Corey Minyard Date: Wed Feb 3 10:45:28 2016 -0600 ipmi: Convert DMI handling over to a platform device Now that the IPMI DMI code creates a platform device for IPMI devices in the firmware, use that instead of handling all the DMI work in the IPMI drivers themselves. Signed-off-by: Corey Minyard Cc: Andy Lutomirski drivers/char/ipmi/ipmi_si_intf.c | 261 ++++++++++++++++++--------------------- drivers/char/ipmi/ipmi_ssif.c | 162 +++++++++++++++--------- 2 files changed, 219 insertions(+), 204 deletions(-) commit 9f88145f1871456de67ae6a242ac2661187bd4ff Author: Corey Minyard Date: Fri Jun 9 21:19:52 2017 -0500 ipmi: Create a platform device for a DMI-specified IPMI interface Create a platform device for each IPMI device in the DMI table, a separate kind of device for SSIF types and for KCS, BT, and SMIC types. This is so auto-loading IPMI devices will work from just SMBIOS tables. This also adds the ability to extract the slave address from the SMBIOS tables, so that when the driver uses ACPI-specified interfaces, it can still extract the slave address from SMBIOS. Signed-off-by: Corey Minyard Cc: Andy Lutomirski drivers/char/ipmi/Kconfig | 4 + drivers/char/ipmi/Makefile | 1 + drivers/char/ipmi/ipmi_dmi.c | 273 +++++++++++++++++++++++++++++++++++++++++++ drivers/char/ipmi/ipmi_dmi.h | 12 ++ 4 files changed, 290 insertions(+) commit cdea46566bb21ce309725a024208322a409055cc Author: Tony Camuso Date: Mon Jun 19 13:17:33 2017 -0400 ipmi: use rcu lock around call to intf->handlers->sender() A vendor with a system having more than 128 CPUs occasionally encounters the following crash during shutdown. This is not an easily reproduceable event, but the vendor was able to provide the following analysis of the crash, which exhibits the same footprint each time. crash> bt PID: 0 TASK: ffff88017c70ce70 CPU: 5 COMMAND: "swapper/5" #0 [ffff88085c143ac8] machine_kexec at ffffffff81059c8b #1 [ffff88085c143b28] __crash_kexec at ffffffff811052e2 #2 [ffff88085c143bf8] crash_kexec at ffffffff811053d0 #3 [ffff88085c143c10] oops_end at ffffffff8168ef88 #4 [ffff88085c143c38] no_context at ffffffff8167ebb3 #5 [ffff88085c143c88] __bad_area_nosemaphore at ffffffff8167ec49 #6 [ffff88085c143cd0] bad_area_nosemaphore at ffffffff8167edb3 #7 [ffff88085c143ce0] __do_page_fault at ffffffff81691d1e #8 [ffff88085c143d40] do_page_fault at ffffffff81691ec5 #9 [ffff88085c143d70] page_fault at ffffffff8168e188 [exception RIP: unknown or invalid address] RIP: ffffffffa053c800 RSP: ffff88085c143e28 RFLAGS: 00010206 RAX: ffff88017c72bfd8 RBX: ffff88017a8dc000 RCX: ffff8810588b5ac8 RDX: ffff8810588b5a00 RSI: ffffffffa053c800 RDI: ffff8810588b5a00 RBP: ffff88085c143e58 R8: ffff88017c70d408 R9: ffff88017a8dc000 R10: 0000000000000002 R11: ffff88085c143da0 R12: ffff8810588b5ac8 R13: 0000000000000100 R14: ffffffffa053c800 R15: ffff8810588b5a00 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 [exception RIP: cpuidle_enter_state+82] RIP: ffffffff81514192 RSP: ffff88017c72be50 RFLAGS: 00000202 RAX: 0000001e4c3c6f16 RBX: 000000000000f8a0 RCX: 0000000000000018 RDX: 0000000225c17d03 RSI: ffff88017c72bfd8 RDI: 0000001e4c3c6f16 RBP: ffff88017c72be78 R8: 000000000000237e R9: 0000000000000018 R10: 0000000000002494 R11: 0000000000000001 R12: ffff88017c72be20 R13: ffff88085c14f8e0 R14: 0000000000000082 R15: 0000001e4c3bb400 ORIG_RAX: ffffffffffffff10 CS: 0010 SS: 0018 This is the corresponding stack trace It has crashed because the area pointed with RIP extracted from timer element is already removed during a shutdown process. The function is smi_timeout(). And we think ffff8810588b5a00 in RDX is a parameter struct smi_info crash> rd ffff8810588b5a00 20 ffff8810588b5a00: ffff8810588b6000 0000000000000000 .`.X............ ffff8810588b5a10: ffff880853264400 ffffffffa05417e0 .D&S......T..... ffff8810588b5a20: 24a024a000000000 0000000000000000 .....$.$........ ffff8810588b5a30: 0000000000000000 0000000000000000 ................ ffff8810588b5a30: 0000000000000000 0000000000000000 ................ ffff8810588b5a40: ffffffffa053a040 ffffffffa053a060 @.S.....`.S..... ffff8810588b5a50: 0000000000000000 0000000100000001 ................ ffff8810588b5a60: 0000000000000000 0000000000000e00 ................ ffff8810588b5a70: ffffffffa053a580 ffffffffa053a6e0 ..S.......S..... ffff8810588b5a80: ffffffffa053a4a0 ffffffffa053a250 ..S.....P.S..... ffff8810588b5a90: 0000000500000002 0000000000000000 ................ Unfortunately the top of this area is already detroyed by someone. But because of two reasonns we think this is struct smi_info 1) The address included in between ffff8810588b5a70 and ffff8810588b5a80: are inside of ipmi_si_intf.c see crash> module ffff88085779d2c0 2) We've found the area which point this. It is offset 0x68 of ffff880859df4000 crash> rd ffff880859df4000 100 ffff880859df4000: 0000000000000000 0000000000000001 ................ ffff880859df4010: ffffffffa0535290 dead000000000200 .RS............. ffff880859df4020: ffff880859df4020 ffff880859df4020 @.Y.... @.Y.... ffff880859df4030: 0000000000000002 0000000000100010 ................ ffff880859df4040: ffff880859df4040 ffff880859df4040 @@.Y....@@.Y.... ffff880859df4050: 0000000000000000 0000000000000000 ................ ffff880859df4060: 0000000000000000 ffff8810588b5a00 .........Z.X.... ffff880859df4070: 0000000000000001 ffff880859df4078 ........x@.Y.... If we regards it as struct ipmi_smi in shutdown process it looks consistent. The remedy for this apparent race is affixed below. Signed-off-by: Tony Camuso Cc: stable@vger.kernel.org # 3.19 This was first introduced in 7ea0ed2b5be817 ipmi: Make the message handler easier to use for SMI interfaces where some code was moved outside of the rcu_read_lock() and the lock was not added. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 5 +++++ 1 file changed, 5 insertions(+) commit 204a2be30a7a8a8d12642f23f3fbdc8b9923b500 Author: Andreas Schwab Date: Wed Jun 7 00:11:44 2017 +0200 m68k: Remove ptrace_signal_deliver This fixes debugger syscall restart interactions. A debugger that modifies the tracee's program counter is expected to set the orig_d0 pseudo register to -1, to disable a possible syscall restart. This removes the last user of the ptrace_signal_deliver hook in the ptrace signal handling, so remove that as well. Signed-off-by: Andreas Schwab Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/signal.h | 5 ----- arch/m68k/kernel/signal.c | 16 ---------------- include/linux/ptrace.h | 4 ---- kernel/signal.c | 1 - 4 files changed, 26 deletions(-) commit d4e0045c4ed300781d2d4cbab57d05ed5e665a37 Merge: 2d7b563 41f1830 Author: Sean Paul Date: Mon Jun 19 13:39:28 2017 -0400 Merge remote-tracking branch 'origin/master' into drm-misc-next-fixes Backmerge 4.12-rc6 into -next-fixes. -next-fixes will contain find patches for 4.13 merge window commit 04ba724b659c6808b0ca31528121bdb2f2807e00 Author: Pablo Neira Ayuso Date: Mon Jun 19 18:35:46 2017 +0100 netfilter: nfnetlink: extended ACK reporting Pass down struct netlink_ext_ack as parameter to all of our nfnetlink subsystem callbacks, so we can work on follow up patches to provide finer grain error reporting using the new infrastructure that 2d4bc93368f5 ("netlink: extended ACK reporting") provides. No functional change, just pass down this new object to callbacks. Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nfnetlink.h | 10 +++--- net/netfilter/ipset/ip_set_core.c | 39 ++++++++++++++++-------- net/netfilter/nf_conntrack_netlink.c | 39 ++++++++++++++++-------- net/netfilter/nf_tables_api.c | 59 ++++++++++++++++++++++++------------ net/netfilter/nfnetlink.c | 21 +++++++++---- net/netfilter/nfnetlink_acct.c | 9 ++++-- net/netfilter/nfnetlink_cthelper.c | 9 ++++-- net/netfilter/nfnetlink_cttimeout.c | 15 ++++++--- net/netfilter/nfnetlink_log.c | 6 ++-- net/netfilter/nfnetlink_queue.c | 12 +++++--- net/netfilter/nft_compat.c | 3 +- net/netfilter/xt_osf.c | 6 ++-- 12 files changed, 152 insertions(+), 76 deletions(-) commit d8297d4f3ebd7a47f443ab66276bb774749612ba Author: Florian Westphal Date: Wed Jun 14 11:51:29 2017 +0200 netfilter: nf_tables: reduce chain type table size text data bss dec hex filename old: 151590 2240 1152 154982 25d66 net/netfilter/nf_tables_api.o new: 151666 2240 416 154322 25ad2 net/netfilter/nf_tables_api.o Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b7b5fda4686874c9b9b8c27ba9d57a8534f48a70 Author: Florian Westphal Date: Wed Jun 14 11:54:07 2017 +0200 netfilter: conntrack: use NFPROTO_MAX to size array We don't support anything larger than NFPROTO_MAX, so we can shrink this a bit: text data dec hex filename old: 8259 1096 9355 248b net/netfilter/nf_conntrack_proto.o new: 8259 624 8883 22b3 net/netfilter/nf_conntrack_proto.o Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l3proto.h | 4 ++-- net/netfilter/nf_conntrack_proto.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) commit d53e3fc3906c7fe82ff436e889c8416649268007 Author: Liping Zhang Date: Sun Jun 4 23:25:05 2017 +0800 netfilter: use nf_conntrack_helpers_register when possible amanda_helper, nf_conntrack_helper_ras and nf_conntrack_helper_q931 are all arrays, so we can use nf_conntrack_helpers_register to register the ct helper, this will help us to eliminate some "goto errX" statements. Also introduce h323_helper_init/exit helper function to register the ct helpers, this is prepared for the followup patch, which will add net namespace support for ct helper. Signed-off-by: Liping Zhang Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_amanda.c | 12 +++---- net/netfilter/nf_conntrack_h323_main.c | 63 +++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 35 deletions(-) commit 2becbbc547aa5ae7b92b35e71bee33706fb1b826 Author: Jike Song Date: Fri Jun 2 17:35:37 2017 +0800 netfilter, kbuild: use canonical method to specify objs. Should use ":=" instead of "+=". Signed-off-by: Jike Song Signed-off-by: Pablo Neira Ayuso net/netfilter/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e15b9c50c4555e30be3c4f26aab7aeb10aee7aa6 Author: Gao Feng Date: Wed May 31 16:55:43 2017 +0800 netfilter: ebt: Use new helper ebt_invalid_target to check target Use the new helper function ebt_invalid_target instead of the old macro INVALID_TARGET and other duplicated codes to enhance the readability. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso include/linux/netfilter_bridge/ebtables.h | 2 -- net/bridge/netfilter/ebt_dnat.c | 2 +- net/bridge/netfilter/ebt_mark.c | 2 +- net/bridge/netfilter/ebt_redirect.c | 2 +- net/bridge/netfilter/ebt_snat.c | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) commit 7866cc57b51c1e118e5d78d1a8f721f378eec5c4 Author: Florian Westphal Date: Tue May 30 11:38:12 2017 +0200 netns: add and use net_ns_barrier Quoting Joe Stringer: If a user loads nf_conntrack_ftp, sends FTP traffic through a network namespace, destroys that namespace then unloads the FTP helper module, then the kernel will crash. Events that lead to the crash: 1. conntrack is created with ftp helper in netns x 2. This netns is destroyed 3. netns destruction is scheduled 4. netns destruction wq starts, removes netns from global list 5. ftp helper is unloaded, which resets all helpers of the conntracks via for_each_net() but because netns is already gone from list the for_each_net() loop doesn't include it, therefore all of these conntracks are unaffected. 6. helper module unload finishes 7. netns wq invokes destructor for rmmod'ed helper CC: "Eric W. Biederman" Reported-by: Joe Stringer Signed-off-by: Florian Westphal Acked-by: David S. Miller Acked-by: "Eric W. Biederman" Signed-off-by: Pablo Neira Ayuso include/net/net_namespace.h | 3 +++ net/core/net_namespace.c | 17 +++++++++++++++++ net/netfilter/nf_conntrack_core.c | 9 +++++++++ 3 files changed, 29 insertions(+) commit 2c41f33c1b7030448212cdacd40e80796e347eac Author: Florian Westphal Date: Tue May 30 11:31:06 2017 +0200 netfilter: move table iteration out of netns exit paths We only need to iterate & remove in case of module removal; for netns destruction all conntracks will be removed anyway. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 202f59afd441474cc4c3752d2417cc05dd68ffe5 Author: Xin Long Date: Wed May 24 21:24:37 2017 +0800 netfilter: ipt_CLUSTERIP: do not hold dev It's a terrible thing to hold dev in iptables target. When the dev is being removed, unregister_netdevice has to wait for the dev to become free. dmesg will keep logging the err: kernel:unregister_netdevice: waiting for veth0_in to become free. \ Usage count = 1 until iptables rules with this target are removed manually. The worse thing is when deleting a netns, a virtual nic will be deleted instead of reset to init_net in default_device_ops exit/exit_batch. As it is earlier than to flush the iptables rules in iptable_filter_net_ops exit, unregister_netdevice will block to wait for the nic to become free. As unregister_netdevice is actually waiting for iptables rules flushing while iptables rules have to be flushed after unregister_netdevice. This 'dead lock' will cause unregister_netdevice to block there forever. As the netns is not available to operate at that moment, iptables rules can not even be flushed manually either. The reproducer can be: # ip netns add test # ip link add veth0_in type veth peer name veth0_out # ip link set veth0_in netns test # ip netns exec test ip link set lo up # ip netns exec test ip link set veth0_in up # ip netns exec test iptables -I INPUT -d 1.2.3.4 -i veth0_in -j \ CLUSTERIP --new --clustermac 89:d4:47:eb:9a:fa --total-nodes 3 \ --local-node 1 --hashmode sourceip-sourceport # ip netns del test This issue can be triggered by all virtual nics with ipt_CLUSTERIP. This patch is to fix it by not holding dev in ipt_CLUSTERIP, but saving the dev->ifindex instead of the dev. As Pablo Neira Ayuso's suggestion, it will refresh c->ifindex and dev's mc by registering a netdevice notifier, just as what xt_TEE does. So it removes the old codes updating dev's mc, and also no need to initialize c->ifindex with dev->ifindex. But as one config can be shared by more than one targets, and the netdev notifier is per config, not per target. It couldn't get e->ip.iniface in the notifier handler. So e->ip.iniface has to be saved into config. Note that for backwards compatibility, this patch doesn't remove the codes checking if the dev exists before creating a config. v1->v2: - As Pablo Neira Ayuso's suggestion, register a netdevice notifier to manage c->ifindex and dev's mc. Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_CLUSTERIP.c | 101 +++++++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 28 deletions(-) commit 740f6beb57b579ee69a3793dff1462a4020ec500 Author: Andreas Färber Date: Sun Feb 26 04:08:53 2017 +0100 ARM: dts: owl-s500: Add SPS node Add Smart Power System node for PM domains. Signed-off-by: Andreas Färber arch/arm/boot/dts/owl-s500.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit ad90c2bc1e67e43243376c981ab856a4134d5dcc Author: Andreas Färber Date: Sun Feb 26 17:24:54 2017 +0100 ARM: dts: owl-s500: Set CPU enable-method Use a custom S500 enable-method for all CPUs. Signed-off-by: Andreas Färber arch/arm/boot/dts/owl-s500.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 04606ccc84e3c799ede8ad19fe0409c5a4892cc4 Author: Luis Oliveira Date: Wed Jun 14 11:43:24 2017 +0100 i2c: designware: introducing I2C_SLAVE definitions - Definitions were added to core library - A example was added to designware-core.txt Documentation that shows how the slave can be setup using DTS SLAVE related definitions were added to the core of the controller. Signed-off-by: Luis Oliveira Reviewed-by: Andy Shevchenko Acked-by: Rob Herring Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-designware.txt | 16 ++++++++++- drivers/i2c/busses/i2c-designware-core.h | 33 ++++++++++++++++++++-- 2 files changed, 46 insertions(+), 3 deletions(-) commit 6165572c1139dd694afb8e382a5f06e7e0fa4ad8 Author: David Sterba Date: Thu Jun 15 17:16:43 2017 +0200 btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev The function is called from ioctl context and we don't hold any locks that take part in writeback. Right now it's only fs_info::volume_mutex. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a44517d79a394b7f317d782ed47fd4c4bccf7e8 Author: David Sterba Date: Thu Jun 15 15:04:04 2017 +0200 btrfs: use GFP_KERNEL in btrfs_calc_avail_data_space We don't hold any locks here. Inidirectly called from statfs. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0eee8a494e786672c57d86c445e24e678d562bf4 Author: Nikolay Borisov Date: Wed Jun 14 11:35:34 2017 +0300 btrfs: Use btrfs_space_info_used instead of opencoding it Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 4fc6441aac75893b4f32415f693d001f290d7d5b Author: Anand Jain Date: Tue Jun 13 17:05:41 2017 +0800 btrfs: wait part of the write_dev_flush() can be separated out Submit and wait parts of write_dev_flush() can be split into two separate functions for better readability. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 59 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) commit cea7c8bf77209ba11350e9c6f541064c820a174c Author: Anand Jain Date: Tue Jun 13 17:05:40 2017 +0800 btrfs: remove redundant null bdev counting during flush submission There is no extra benefit to count null bdev during the submit loop, as these null devices will be anyway checked during command completion device loop just after the submit loop. We are holding the device_list_mutex, the device->bdev status won't change in between. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 12b9bf0b942ecca695fe709ea754091918d88b01 Author: Anand Jain Date: Tue Jun 13 17:32:29 2017 +0800 btrfs: write_dev_flush does not return ENOMEM anymore Since commit "btrfs: btrfs_io_bio_alloc never fails, skip error handling" write_dev_flush will not return ENOMEM in the sending part. We do not need to check for it in the callers. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ updated changelog ] Signed-off-by: David Sterba fs/btrfs/disk-io.c | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) commit 170607ebd9c891d6765445434460065b2e73ca51 Author: Timofey Titovets Date: Tue Jun 6 14:41:15 2017 +0300 Btrfs: compression must free at least one sector size We already skip storing data where compression does not make the result at least one byte less. Let's make the logic better and check that compression frees at least one sector size of bytes, otherwise it's not that useful. Signed-off-by: Timofey Titovets Reviewed-by: David Sterba [ changelog updated ] Signed-off-by: David Sterba fs/btrfs/inode.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c5e4c3d7503453832444475641988ffa02b88b6d Author: David Sterba Date: Mon Jun 12 17:29:41 2017 +0200 btrfs: sink gfp parameter to btrfs_io_bio_alloc We can hardcode GFP_NOFS to btrfs_io_bio_alloc, although it means we change it back from GFP_KERNEL in scrub. I'd rather save a few stack bytes from not passing the gfp flags in the remaining, more imporatant, contexts and the bio allocating API now looks more consistent. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent_io.c | 8 ++++---- fs/btrfs/extent_io.h | 2 +- fs/btrfs/raid56.c | 2 +- fs/btrfs/scrub.c | 16 +++++++--------- 6 files changed, 15 insertions(+), 17 deletions(-) commit 184f999e12152d1b1f284792ba4e82ef453ce7b7 Author: David Sterba Date: Mon Jun 12 17:29:39 2017 +0200 btrfs: add helper to initialize the non-bio part of btrfs_io_bio We use btrfs_bioset for bios and ask to allocate the entire size of btrfs_io_bio from btrfs bio_alloc_bioset. The member 'bio' is initialized but the bytes from 0 to offset of 'bio' are left uninitialized. Although we initialize some of the members in our helpers, we should initialize the whole structures. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit fa1bcbe0a54c67a293c557a21641565516c96a8f Author: David Sterba Date: Mon Jun 12 17:29:36 2017 +0200 btrfs: document mandatory order of bio in btrfs_io_bio Signed-off-by: David Sterba fs/btrfs/volumes.h | 4 ++++ 1 file changed, 4 insertions(+) commit 1a63143dc18b2c6a2233d1c5afce95205d2676f4 Author: Hans van Kranenburg Date: Tue Jun 6 00:20:32 2017 +0200 Btrfs: btrfs_ioctl_search_key documentation A programmer who is trying to implement calling the btrfs SEARCH or SEARCH_V2 ioctl will probably soon end up reading this struct definition. Properly document the input fields to prevent common misconceptions: 1. The search space is linear, not 3 dimensional. The invidual min/max values for objectid, type and offset cannot be used to filter the result, they only define the endpoints of an interval. 2. The transaction id (a.k.a. generation) filter applies only on transaction id of the last COW operation on a whole metadata page, not on individual items. Ad 1. The first misunderstanding was helped by the previous misleading comments on min/max type and offset: "keys returned will be >= min and <= max". Ad 2. For example, running btrfs balance will happily cause rewriting of metadata pages that contain a filesystem tree of a read only subvolume, causing transids to be increased. Also, improve descriptions of tree_id and nr_items and add in/out annotations. Signed-off-by: Hans van Kranenburg Signed-off-by: David Sterba include/uapi/linux/btrfs.h | 63 +++++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 20 deletions(-) commit ef7cdac101602844a4179f7d2d9e26bd20a0edf9 Author: Liu Bo Date: Thu Apr 13 18:11:48 2017 -0700 Btrfs: skip checksum verification if IO error occurs Currently dio read also goes to verify checksum if -EIO has been returned, although it usually fails on checksum, it's not necessary at all, we could directly check if there is another copy to read. And with this, the behavior of dio read is now consistent with that of buffered read. Signed-off-by: Liu Bo Reviewed-by: David Sterba [ use bool for uptodate ] Signed-off-by: David Sterba fs/btrfs/inode.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e3d37faba2eb19a1d459917bbf54ac1c65711510 Author: Liu Bo Date: Wed May 17 15:42:00 2017 -0600 Btrfs: tolerate errors if we have retried successfully With raid1 profile, dio read isn't tolerating IO errors if read length is less than the stripe length (64K). Our bio didn't get split in btrfs_submit_direct_hook() if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED) is true and that happens when the read length is less than 64k. In this case, if the underlying device returns error somehow, bio->bi_error has recorded that error. If we could recover the correct data from another copy in profile raid1/10/5/6, with btrfs_subio_endio_read() returning 0, bio would have the correct data in its vector, but bio->bi_error is not updated accordingly so that the following dio_end_io(dio_bio, bio->bi_error) makes directIO think this read has failed. This fixes the problem by setting bio's error to 0 if a good copy has been found. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c821e7f3daa4d02d6303f4f97a3243ea8a6f9411 Author: David Sterba Date: Fri Jun 2 18:35:36 2017 +0200 btrfs: pass bytes to btrfs_bio_alloc Most callers of btrfs_bio_alloc convert from bytes to sectors. Hide that in the helper and simplify the logic in the callsers. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/compression.c | 8 ++++---- fs/btrfs/extent_io.c | 6 +++--- fs/btrfs/extent_io.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 9886b1743350db379f7845715e39d0cbe0e0de88 Author: David Sterba Date: Fri Jun 2 18:01:51 2017 +0200 btrfs: opencode trivial compressed_bio_alloc, simplify error handling compressed_bio_alloc is now a trivial wrapper around btrfs_bio_alloc, no point keeping it. The error handling can be simplified, as we know btrfs_bio_alloc will never fail. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/compression.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit 9f2179a5e72b794f8af22a6818d83d1600050c5c Author: David Sterba Date: Fri Jun 2 17:55:44 2017 +0200 btrfs: remove redundant parameters from btrfs_bio_alloc All callers pass gfp_flags=GFP_NOFS and nr_vecs=BIO_MAX_PAGES. submit_extent_page adds __GFP_HIGH that does not make a difference in our case as it allows access to memory reserves but otherwise does not change the constraints. Signed-off-by: David Sterba fs/btrfs/compression.c | 2 +- fs/btrfs/extent_io.c | 9 +++------ fs/btrfs/extent_io.h | 4 +--- 3 files changed, 5 insertions(+), 10 deletions(-) commit 8b6c1d56f2f5094b14b22a226b798ca3d186c0e9 Author: David Sterba Date: Fri Jun 2 17:48:13 2017 +0200 btrfs: sink gfp parameter to btrfs_bio_clone All callers pass GFP_NOFS. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 4 ++-- fs/btrfs/extent_io.h | 2 +- fs/btrfs/inode.c | 2 +- fs/btrfs/volumes.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit e4f56903863c793bc1d181f7f0b6244ea5753338 Author: David Sterba Date: Fri Jun 2 17:38:30 2017 +0200 btrfs: btrfs_io_bio_alloc never fails, skip error handling Update direct callers of btrfs_io_bio_alloc that do error handling, that we can now remove. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 5 ----- fs/btrfs/disk-io.c | 3 --- fs/btrfs/extent_io.c | 5 ----- fs/btrfs/raid56.c | 3 --- fs/btrfs/scrub.c | 25 ------------------------- 5 files changed, 41 deletions(-) commit 3aa8e074ab2ec507b7380dd5d460fea83d92b66b Author: David Sterba Date: Fri Jun 2 17:38:30 2017 +0200 btrfs: btrfs_bio_clone never fails, skip error handling Update direct callers of btrfs_bio_clone that do error handling, that we can now remove. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 4 ---- fs/btrfs/volumes.c | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) commit 0c4dd97c5efddd6cac144d73635962ce6e48165b Author: David Sterba Date: Fri Jun 2 17:38:30 2017 +0200 btrfs: btrfs_bio_alloc never fails, skip error handling Update direct callers of btrfs_bio_alloc that do error handling, that we can now remove. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 3 --- 1 file changed, 3 deletions(-) commit 6e707bcd1f71949c7fc0520c388c64aae91b2d77 Author: David Sterba Date: Fri Jun 2 17:26:26 2017 +0200 btrfs: bioset allocations will never fail, adapt our helpers Christoph pointed out that bio allocations backed by a bioset will never fail. As we always use a bioset for all bio allocations, we can skip the error handling. This patch adjusts our low-level helpers, the cascaded changes to all callers will come next. CC: Liu Bo Reviewed-by: Christoph Hellwig Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 52 ++++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) commit 6acafd1eff426ac21dbf70498d8739304c4bf928 Author: David Sterba Date: Wed May 31 17:21:15 2017 +0200 btrfs: switch to kvmalloc and GFP_KERNEL in lzo/zlib alloc_workspace The compression workspace buffers are larger than a page so we use vmalloc, unconditionally. This is not always necessary as there might be contiguous memory available. Let's use the kvmalloc helpers that will try kmalloc first and fallback to vmalloc. For that they require GFP_KERNEL flags. As we now have the alloc_workspace calls protected by memalloc_nofs in the critical contexts, we can safely use GFP_KERNEL. Signed-off-by: David Sterba fs/btrfs/lzo.c | 14 +++++++------- fs/btrfs/zlib.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) commit 389a6cfc2afb833e65b93ad6d8220ad1a84538a2 Author: David Sterba Date: Wed May 31 17:21:15 2017 +0200 btrfs: switch kmallocs to GFP_KERNEL in lzo/zlib alloc_workspace As alloc_workspace is now protected by memalloc_nofs where needed, we can switch the kmalloc to use GFP_KERNEL. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/lzo.c | 2 +- fs/btrfs/zlib.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit fe30853307559c3ec237391507c2b395095aa151 Author: David Sterba Date: Wed May 31 17:14:56 2017 +0200 btrfs: add memalloc_nofs protections around alloc_workspace callback The workspaces are preallocated at the beginning where we can safely use GFP_KERNEL, but in some cases the find_workspace might reach the allocation again, now in a more restricted context when the bios or pages are being compressed. To avoid potential lockup when alloc_workspace -> vmalloc would silently use the GFP_KERNEL, add the memalloc_nofs helpers around the critical call site. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/compression.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit adf0212396e3af238e25e7c54ecb2959f19def24 Author: David Sterba Date: Wed May 31 19:44:31 2017 +0200 btrfs: adjust includes after vmalloc removal As we don't use vmalloc/vzalloc/vfree directly in ctree.c, we can now use the proper header that defines kvmalloc. Signed-off-by: David Sterba fs/btrfs/ctree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f54de068dda73e337972481eabd103671859b2aa Author: David Sterba Date: Wed May 31 19:32:09 2017 +0200 btrfs: use GFP_KERNEL in init_ipath Now that init_ipath is called either from a safe context or with memalloc_nofs protection, we can switch to GFP_KERNEL allocations in init_path and init_data_container. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/backref.c | 10 +++++----- fs/btrfs/ioctl.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit de2491fdefe7e599fa08a81a1b89d03c96c9cbc3 Author: David Sterba Date: Wed May 31 19:21:38 2017 +0200 btrfs: scrub: add memalloc_nofs protection around init_ipath init_ipath is called from a safe ioctl context and from scrub when printing an error. The protection is added for three reasons: * init_data_container calls vmalloc and this does not work as expected in the GFP_NOFS context, so this silently does GFP_KERNEL and might deadlock in some cases * keep the context constraint of GFP_NOFS, used by scrub * we want to use GFP_KERNEL unconditionally inside init_ipath or its callees Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/scrub.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f11f74416ae6e63a6d6db9c5b22666a0aa57b881 Author: David Sterba Date: Wed May 31 18:40:02 2017 +0200 btrfs: send: use kvmalloc in iterate_dir_item We use a growing buffer for xattrs larger than a page size, at some point vmalloc is unconditionally used for larger buffers. We can still try to avoid it using the kvmalloc helper. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 818e010bf9d02b144569898506995bcff8918875 Author: David Sterba Date: Wed May 31 18:40:02 2017 +0200 btrfs: replace opencoded kvzalloc with the helper The logic of kmalloc and vmalloc fallback is opencoded in several places, we can now use the existing helper. Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 11 ++++------- fs/btrfs/raid56.c | 11 ++++------- fs/btrfs/send.c | 9 +++------ 3 files changed, 11 insertions(+), 20 deletions(-) commit 1e9d7291e50178699b87656488912eba235c7679 Author: Timofey Titovets Date: Tue May 30 02:18:04 2017 +0300 Btrfs: lzo: compressed data size must be less then input size Logic already skips if compression makes data bigger, let's sync lzo with zlib and also return error if compressed size is equal to input size. Signed-off-by: Timofey Titovets Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/lzo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 054ec2f626ed5bc1633addfabb1d8de1b56f949d Author: Guoqing Jiang Date: Fri Jun 2 16:08:50 2017 +0800 btrfs: simplify code with bio_io_error bio_io_error was introduced in the commit 4246a0b63bd8f56a1469b ("block: add a bi_error field to struct bio"), so use it to simplify code. Signed-off-by: Guoqing Jiang Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 25ff17e82f9612dcd1cf4668acb2148e18305507 Author: Omar Sandoval Date: Mon Jun 5 00:12:31 2017 -0700 Btrfs: use memalloc_nofs and kvzalloc() for free space tree bitmaps First, instead of open-coding the vmalloc() fallback, use the new kvzalloc() helper. Second, use memalloc_nofs_{save,restore}() instead of GFP_NOFS, as vmalloc() uses some GFP_KERNEL allocations internally which could lead to deadlocks. Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/free-space-tree.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 4b5faeac4688174fd523f2a22b7d70d5a96842fb Author: David Sterba Date: Tue Mar 28 12:06:05 2017 +0200 btrfs: use generic slab for for btrfs_transaction Observing the number of slab objects of btrfs_transaction, there's just one active on an almost quiescent filesystem, and the number of objects goes to about ten when sync is in progress. Then the nubmer goes down to 1. This matches the expectations of the transaction lifetime. For such use the separate slab cache is not justified, as we do not reuse objects frequently. For the shortlived transaction, the generic slab (size 512) should be ok. We can optimistically expect that the 512 slabs are not all used (fragmentation) and there are free slots to take when we do the allocation, compared to potentially allocating a whole new page for the separate slab. We'll lose the stats about the object use, which could be added later if we really need them. Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - fs/btrfs/disk-io.c | 5 ----- fs/btrfs/inode.c | 8 -------- fs/btrfs/transaction.c | 8 ++++---- 4 files changed, 4 insertions(+), 18 deletions(-) commit 3fb99303c64e31f668c110fd956cfc61b108e3e4 Author: David Sterba Date: Tue May 16 19:10:32 2017 +0200 btrfs: scrub: embed scrub_wr_ctx into scrub context The structure scrub_wr_ctx is not used anywhere just the scrub context, we can move the members there. The tgtdev is renamed so it's more clear that it belongs to the "wr" part. Signed-off-by: David Sterba fs/btrfs/scrub.c | 103 ++++++++++++++++++++++++++----------------------------- 1 file changed, 49 insertions(+), 54 deletions(-) commit 25cc1226c121ae4e5c9a1525eda4ddada7f47a00 Author: David Sterba Date: Tue May 16 19:10:41 2017 +0200 btrfs: scrub: use fs_info::sectorsize and drop it from scrub context As we now have the node/block sizes in fs_info, we can use them and can drop the local copies. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/scrub.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 04a87e3472828f769a93655d7c64a27573bdbc2c Author: Yonghong Song Date: Fri May 12 15:07:43 2017 -0700 Btrfs: add statx support Return enhanced file attributes from the btrfs, including: (1). inode creation time as stx_btime, and (2). Certain BTRFS_INODE_xxx flags are mapped to stx_attributes flags. Example output: [root@localhost ~]# cat t.sh touch t chattr +aic t ~/linux/samples/statx/test-statx t chattr -aic t touch t echo "========================================" ~/linux/samples/statx/test-statx t /bin/rm t [root@localhost ~]# ./t.sh statx(t) = 0 results=fff Size: 0 Blocks: 0 IO Block: 4096 regular file Device: 00:1c Inode: 63962 Links: 1 Access: (0644/-rw-r--r--) Uid: 0 Gid: 0 Access: 2017-05-11 16:03:13.999856591-0700 Modify: 2017-05-11 16:03:13.999856591-0700 Change: 2017-05-11 16:03:14.000856663-0700 Birth: 2017-05-11 16:03:13.999856591-0700 Attributes: 0000000000000034 (........ ........ ........ ........ ........ ........ ........ .-ai.c..) ======================================== statx(t) = 0 results=fff Size: 0 Blocks: 0 IO Block: 4096 regular file Device: 00:1c Inode: 63962 Links: 1 Access: (0644/-rw-r--r--) Uid: 0 Gid: 0 Access: 2017-05-11 16:03:14.006857097-0700 Modify: 2017-05-11 16:03:14.006857097-0700 Change: 2017-05-11 16:03:14.006857097-0700 Birth: 2017-05-11 16:03:13.999856591-0700 Attributes: 0000000000000000 (........ ........ ........ ........ ........ ........ ........ .---.-..) [root@localhost ~]# Reviewed-by: Omar Sandoval Signed-off-by: Yonghong Song Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 036b0217ade892066dcab6afc5de22b6791ef0ef Author: Timofey Titovets Date: Thu May 25 21:12:19 2017 +0300 Btrfs: lzo: fix typo in error message after failed deflate Fix copy paste typo in debug message for lzo.c, lzo is not deflate. Signed-off-by: Timofey Titovets Signed-off-by: David Sterba fs/btrfs/lzo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3189ff778630d9ce8a9f2fda9f8ae4510cceb154 Author: Jeff Layton Date: Thu May 25 06:39:52 2017 -0400 btrfs: btrfs_wait_tree_block_writeback can be void return Nothing checks its return value. Is it safe to skip checking return value of btrfs_wait_tree_block_writeback? Liu Bo: I think yes, it's used in walk_log_tree which is called in two places, free_log_tree and log replay. For free_log_tree, it waits for any running writeback of the extent buffer under freeing to finish in case we need to access the eb pointer from page->private, and it's OK to not check the return value, while for log replay, it's doesn't wait because wc->wait is not set. So neither cares about the writeback error. Signed-off-by: Jeff Layton Reviewed-by: Jan Kara Reviewed-by: Liu Bo [ added more explanation to changelog, from Liu Bo ] Signed-off-by: David Sterba fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/disk-io.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 118c701e20ad6edfb35fd83ec6989991714b1d89 Author: Nikolay Borisov Date: Mon May 22 13:16:11 2017 +0300 btrfs: remove __BTRFS_LEAF_DATA_SIZE __BTRFS_LAF_DATA_SIZE is used only by BTRFS_LEAF_DATA_SIZE. Make the latter subsume the former. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 3d9ec8c49ad16a5c113e8d23ba07abb96518a586 Author: Nikolay Borisov Date: Mon May 29 09:43:43 2017 +0300 btrfs: rename btrfs_leaf_data to BTRFS_LEAF_DATA_OFFSET Commit 5f39d397dfbe ("Btrfs: Create extent_buffer interface for large blocksizes") refactored btrfs_leaf_data function to take extent_buffer rather than struct btrfs_leaf. However, as it turns out the parameter being passed is never used. Furthermore this function no longer returns the leaf data but rather the offset to it. So rename the function to BTRFS_LEAF_DATA_OFFSET to make it consistent with other BTRFS_LEAF_* helpers and turn it into a macro. Signed-off-by: Nikolay Borisov [ removed () from the macro ] Signed-off-by: David Sterba fs/btrfs/ctree.c | 40 ++++++++++++++++++++-------------------- fs/btrfs/ctree.h | 10 ++++------ fs/btrfs/extent_io.c | 2 +- 3 files changed, 25 insertions(+), 27 deletions(-) commit e1ddce71d6cab53c28353c081af7692169417d1b Author: Anand Jain Date: Fri May 26 15:44:59 2017 +0800 btrfs: reduce arguments for decompress_bio ops struct compressed_bio pointer can be used instead. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/compression.c | 46 ++-------------------------------------------- fs/btrfs/compression.h | 44 ++++++++++++++++++++++++++++++++++++++++---- fs/btrfs/lzo.c | 11 ++++++----- fs/btrfs/zlib.c | 10 ++++++---- 4 files changed, 54 insertions(+), 57 deletions(-) commit 8140dc30a432694d851c1b24b8eda95acd494e16 Author: Anand Jain Date: Fri May 26 15:44:58 2017 +0800 btrfs: btrfs_decompress_bio() could accept compressed_bio instead Instead of sending each argument of struct compressed_bio, send the compressed_bio itself. Also by having struct compressed_bio in btrfs_decompress_bio() it would help tracing. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/compression.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit d2006e6d28ae2182db9f12dc686cfca78e878f52 Author: Nikolay Borisov Date: Mon May 22 09:35:50 2017 +0300 btrfs: Refactor update_space_info Following the factoring out of the creation code udpate_space_info can only be called for already-existing space_info structs. As such it cannot fail. Remove superfluous error handling and make the function return void. Signed-off-by: Nikolay Borisov Reviewed-by: Jeff Mahoney Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 58 ++++++++++++++++---------------------------------- 1 file changed, 18 insertions(+), 40 deletions(-) commit 2be12ef79fe9f5333cb9fadc85ef20b6832a56d7 Author: Nikolay Borisov Date: Mon May 22 09:35:49 2017 +0300 btrfs: Separate space_info create/update Currently the struct space_info creation code is intermixed in the udpate_space_info function. There are well-defined points at which the we actually want to create brand-new space_info structs (e.g. during mount of the filesystem as well as sometimes when adding/initialising new chunks). In such cases update_space_info is called with 0 as the bytes parameter. All of this makes for spaghetti code. Fix it by factoring out the creation code in a separate create_space_info structure. This also allows to simplify the internals. Also remove BUG_ON from do_alloc_chunk since the callers handle errors. Furthermore it will make the update_space_info function not fail, allowing us to remove error handling in callers. This will come in a follow up patch. Signed-off-by: Nikolay Borisov Reviewed-by: Jeff Mahoney Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 132 ++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 66 deletions(-) commit 555ba411aa33c9241e78ff37afc40f6a33721620 Author: Liu Bo Date: Thu May 25 18:08:12 2017 -0600 Btrfs: let btrfs_print_leaf print more about block group This adds chunk_objectid and flags, with flags we can recognize whether the block group is about data or metadata. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/print-tree.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 28785f70ef882e4798cd5706066a55dbf7adf80e Author: Liu Bo Date: Fri May 19 11:39:15 2017 -0600 Btrfs: skip commit transaction if we don't have enough pinned bytes We commit transaction in order to reclaim space from pinned bytes because it could process delayed refs, and in may_commit_transaction(), we check first if pinned bytes are enough for the required space, we then check if that plus bytes reserved for delayed insert are enough for the required space. This changes the code to the above logic. Fixes: b150a4f10d87 ("Btrfs: use a percpu to keep track of possibly pinned bytes") Tested-by: Nikolay Borisov Reported-by: Nikolay Borisov Reviewed-by: Nikolay Borisov Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e2814ef04080fae123edf8fcef555f5a424e7ba Author: David Sterba Date: Tue May 16 19:10:29 2017 +0200 btrfs: scrub: simplify cleanup of wr_ctx in scrub_free_ctx We don't need to take the mutex and zero out wr_cur_bio, as this is called after the scrub finished. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/scrub.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e241ddeb9c6c9df05911fb156baa4fb442b74983 Author: David Sterba Date: Tue May 16 19:10:26 2017 +0200 btrfs: scrub: inline helper scrub_free_wr_ctx The helper scrub_free_wr_ctx is used only once and fits into scrub_free_ctx as it continues sctx shutdown, no need to keep it separate. Signed-off-by: David Sterba fs/btrfs/scrub.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 8fcdac3f208009a2103c11569b25ae2083016a9c Author: David Sterba Date: Tue May 16 19:10:23 2017 +0200 btrfs: scrub: inline helper scrub_setup_wr_ctx The helper scrub_setup_wr_ctx is used only once and fits into scrub_setup_ctx as it continues intialization, no need to keep it separate. Signed-off-by: David Sterba fs/btrfs/scrub.c | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) commit c1c4919b112d2591bea5c68b54a24f083619f81b Author: Jeff Mahoney Date: Wed May 17 11:38:36 2017 -0400 btrfs: remove root usage from can_overcommit can_overcommit using the root to determine the allocation profile is the only use of a root in the call graph below reserve_metadata_bytes. It turns out that we only need to know whether the allocation is for the chunk root or not -- and we can pass that around as a bool instead. This allows us to pull root usage out of the reservation path all the way up to reserve_metadata_bytes itself, which uses it only to compare against fs_info->chunk_root to set the bool. In turn, this eliminates a bunch of races where we use a particular root too early in the mount process. Signed-off-by: Jeff Mahoney Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 82 ++++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 36 deletions(-) commit 1b86826d12dc4acf9576cad9c43da74025dc8074 Author: Jeff Mahoney Date: Wed May 17 11:38:35 2017 -0400 btrfs: cleanup root usage by btrfs_get_alloc_profile There are two places where we don't already know what kind of alloc profile we need before calling btrfs_get_alloc_profile, but we need access to a root everywhere we call it. This patch adds helpers for btrfs_{data,metadata,system}_alloc_profile() and relegates btrfs_system_alloc_profile to a static for use in those two cases. The next patch will eliminate one of those. Signed-off-by: Jeff Mahoney Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.h | 4 +++- fs/btrfs/extent-tree.c | 28 +++++++++++++++++++++------- fs/btrfs/inode.c | 3 +-- fs/btrfs/super.c | 3 +-- fs/btrfs/volumes.c | 5 ++--- 5 files changed, 28 insertions(+), 15 deletions(-) commit e03733da5aa68fa2ae3f8d1ab12a570c823a647f Author: David Sterba Date: Fri May 12 01:02:22 2017 +0200 btrfs: fix bool type in btrfs_page_exists_in_range We use only a simple bool indicator, int is not a problem here. Signed-off-by: David Sterba fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9fed2bb61c4050ff01c4337e880a546fde5677d Author: David Sterba Date: Thu Apr 13 19:11:04 2017 +0200 btrfs: remove unused member list from btrfs_end_io_wq The end io work queue items have been tracked by the work queues since "Btrfs: Add async worker threads for pre and post IO checksumming" (8b7128429235d9bd72cfd5e) (2008). Signed-off-by: David Sterba fs/btrfs/disk-io.c | 1 - 1 file changed, 1 deletion(-) commit ee4ea69852409d9e102d4d61020c9a7370146edf Author: David Sterba Date: Thu Apr 13 19:11:04 2017 +0200 btrfs: remove unused members dir_path from recorded_ref The two members do not seem to be used since the initial commit. Signed-off-by: David Sterba fs/btrfs/send.c | 8 -------- 1 file changed, 8 deletions(-) commit b297c9f68f4ac61c259dbe529ceb74910f25e281 Author: David Sterba Date: Thu Apr 13 19:11:04 2017 +0200 btrfs: remove unused member list from async_submit_bio The list used to track checksums in the early version (2.6.29), but I was able not pinpoint the commit that stopped using it. Everything apparently works without it for a long time. Signed-off-by: David Sterba fs/btrfs/disk-io.c | 1 - 1 file changed, 1 deletion(-) commit 106204f191774d427a1992d76410d6d8a0006568 Author: David Sterba Date: Thu Apr 13 19:11:04 2017 +0200 btrfs: remove unused member err from reada_extent Seems to be unused since the initial commit, we ignore readahead errors anyway, the full read will handle that if necessary. Signed-off-by: David Sterba fs/btrfs/reada.c | 1 - 1 file changed, 1 deletion(-) commit 0bef71093d4461659643ddcef431d88a078e0407 Author: Sahil Kang Date: Wed May 17 03:33:45 2017 -0700 btrfs: Remove unnecessary branching in free-space-tree.c Both btrfs_create_free_space_tree and btrfs_clear_free_space_tree contain: if (ret) return ret; return 0; The if statement is only false when ret equals zero, and since we return zero in such cases, we can safely remove the branching. Signed-off-by: Sahil Kang Signed-off-by: David Sterba fs/btrfs/free-space-tree.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit e477094f0d3ce35b30d230bda3f31fc060cfe93b Author: Liu Bo Date: Tue May 16 10:57:14 2017 -0700 Btrfs: hardcode GFP_NOFS for btrfs_bio_clone_partial We only pass GFP_NOFS to btrfs_bio_clone_partial, so lets hardcode it. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 5 ++--- fs/btrfs/extent_io.h | 3 +-- fs/btrfs/inode.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) commit 3c91ee6964114b1a4f54ae6b397c889576d91cf4 Author: Arnd Bergmann Date: Thu May 18 15:33:29 2017 +0200 Btrfs: work around maybe-uninitialized warning A rewrite of btrfs_submit_direct_hook appears to have introduced a warning: fs/btrfs/inode.c: In function 'btrfs_submit_direct_hook': fs/btrfs/inode.c:8467:14: error: 'bio' may be used uninitialized in this function [-Werror=maybe-uninitialized] Where the 'bio' variable was previously initialized unconditionally, it is now set in the "while (submit_len > 0)" loop that would never execute if submit_len is zero. Assuming this cannot happen in practice, we can avoid the warning by simply replacing the while{} loop with a do{}while() loop so the compiler knows that it will always be entered at least once. Fixes changes introduced in "Btrfs: use bio_clone_bioset_partial to simplify DIO submit". Signed-off-by: Arnd Bergmann Signed-off-by: David Sterba fs/btrfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3892ac9086a82c29a6ce71f8b54f820129947119 Author: Liu Bo Date: Mon Apr 17 15:00:28 2017 -0700 Btrfs: unify naming of btrfs_io_bio All dio endio functions are using io_bio for struct btrfs_io_bio, this makes btrfs_submit_direct to follow this convention. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 11b5616516171851b7fcbddc2366aeeef3fa1e53 Author: Liu Bo Date: Fri Apr 14 16:11:52 2017 -0700 Btrfs: check-integrity use bvec_iter Some check-integrity code depends on bio->bi_vcnt, this changes it to use bio segments because some bios passing here may not have a reliable bi_vcnt. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 629ebf4fadbc647e2118ef9c94b038eeef178e9c Author: Liu Bo Date: Mon May 15 17:20:07 2017 -0700 Btrfs: record error if one block has failed to retry In the nocsum case of dio read endio, it returns immediately if an error gets returned when repairing, which leaves the rest blocks unrepaired. The behavior is different from how buffered read endio works in the same case. This changes it to record error only and go on repairing the rest blocks. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 17347cec15f919901c90cdbf98af47ed2ed28b9f Author: Liu Bo Date: Mon May 15 15:33:27 2017 -0700 Btrfs: change how we iterate bios in endio Since dio submit has used bio_clone_fast, the submitted bio may not have a reliable bi_vcnt, for the bio vector iterations in checksum related functions, bio->bi_iter is not modified yet and it's safe to use bio_for_each_segment, while for those bio vector iterations in dio read's endio, we now save a copy of bvec_iter in struct btrfs_io_bio when cloning bios and use the helper __bio_for_each_segment with the saved bvec_iter to access each bvec. Also for dio reads which don't get split, we also need to save a copy of bio iterator in btrfs_bio_clone to let __bio_for_each_segments to access each bvec in dio read's endio. Note that it doesn't affect other calls of btrfs_bio_clone() because they don't need to use this iterator. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 ++ fs/btrfs/file-item.c | 31 +++++++++++++++---------------- fs/btrfs/inode.c | 35 +++++++++++++++++++---------------- fs/btrfs/volumes.h | 1 + 4 files changed, 37 insertions(+), 32 deletions(-) commit 725130bac5857ac035cf9f47d2973ee4e734db54 Author: Liu Bo Date: Tue May 16 09:51:39 2017 -0700 Btrfs: use bio_clone_bioset_partial to simplify DIO submit Currently when mapping bio to limit bio to a single stripe length, we split bio by adding page to bio one by one, but later we don't modify the vector of bio at all, thus we can use bio_clone_fast to use the original bio vector directly. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 119 +++++++++++++++++++++---------------------------------- 1 file changed, 45 insertions(+), 74 deletions(-) commit 2f8e9140426dff6091b7a40d441befc791882658 Author: Liu Bo Date: Mon May 15 17:43:31 2017 -0700 Btrfs: new helper btrfs_bio_clone_partial This adds a new helper btrfs_bio_clone_partial, it'll allocate a cloned bio that only owns a part of the original bio's data. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 18 ++++++++++++++++++ fs/btrfs/extent_io.h | 2 ++ 2 files changed, 20 insertions(+) commit 015c1bd9f162a00934dd71859f36b12d03c8e771 Author: Liu Bo Date: Tue Apr 4 12:23:25 2017 -0700 Btrfs: use bio_clone_fast to clone our bio For raid1 and raid10, we clone the original bio to the bios which are then sent to different disks. Right now we use bio_clone_bioset to create a clone bio with iterating bi_io_vec to initialize it. This changes it to use bio_clone_fast() which creates a clone bio but only copies the bi_io_vec pointer instead of iterating bi_io_vec. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7870d0822be99bdb9353b542007c046966ec18f3 Author: Josef Bacik Date: Fri May 5 11:57:15 2017 -0400 Btrfs: don't pass the inode through clean_io_failure Instead pass around the failure tree and the io tree. Signed-off-by: Josef Bacik Reviewed-by: Chandan Rajendra Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 51 ++++++++++++++++++++++++++++----------------------- fs/btrfs/extent_io.h | 10 +++++++--- fs/btrfs/inode.c | 37 ++++++++++++++++++++++++++----------- 3 files changed, 61 insertions(+), 37 deletions(-) commit 6ec656bc0fde92c3cb14d5dc9dca69ec8cce68c6 Author: Josef Bacik Date: Fri May 5 11:57:14 2017 -0400 btrfs: remove inode argument from repair_io_failure Once we remove the btree_inode we won't have an inode to pass anymore, just pass the fs_info directly and the inum since we use that to print out the repair message. Signed-off-by: Josef Bacik Reviewed-by: Chandan Rajendra Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 16 +++++++--------- fs/btrfs/extent_io.h | 6 +++--- fs/btrfs/scrub.c | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) commit c6100a4b4e3d1650deafda45e49571b83270c714 Author: Josef Bacik Date: Fri May 5 11:57:13 2017 -0400 Btrfs: replace tree->mapping with tree->private_data For extent_io tree's we have carried the address_mapping of the inode around in the io tree in order to pull the inode back out for calling into various tree ops hooks. This works fine when everything that has an extent_io_tree has an inode. But we are going to remove the btree_inode, so we need to change this. Instead just have a generic void * for private data that we can initialize with, and have all the tree ops use that instead. This had a lot of cascading changes but should be relatively straightforward. Signed-off-by: Josef Bacik Reviewed-by: Chandan Rajendra Reviewed-by: David Sterba [ minor reordering of the callback prototypes ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 + fs/btrfs/disk-io.c | 50 ++++++++++++++---------- fs/btrfs/disk-io.h | 6 +-- fs/btrfs/extent_io.c | 52 ++++++++----------------- fs/btrfs/extent_io.h | 21 +++++----- fs/btrfs/inode.c | 82 +++++++++++++++++++++++++++++++--------- fs/btrfs/relocation.c | 3 +- fs/btrfs/tests/extent-io-tests.c | 2 +- fs/btrfs/transaction.c | 2 +- 9 files changed, 128 insertions(+), 91 deletions(-) commit 2723480a0f8fe6c045d23715eaa28f208644f42a Author: Sargun Dhillon Date: Thu May 11 21:18:03 2017 +0000 btrfs: Add quota_override knob into sysfs This patch adds the read-write attribute quota_override into sysfs. Any process which has CAP_SYS_RESOURCE can set this flag to on, and once it is set to true, processes with CAP_SYS_RESOURCE can exceed the quota. Signed-off-by: Sargun Dhillon Reviewed-by: David Sterba [ minor changelog edits ] Signed-off-by: David Sterba fs/btrfs/sysfs.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit f29efe292198b9dbf67fb79ec9ffb5865ca29fb8 Author: Sargun Dhillon Date: Thu May 11 21:17:33 2017 +0000 btrfs: add quota override flag to enable quota override for CAP_SYS_RESOURCE This patch introduces the quota override flag to btrfs_fs_info, and a change to quota limit checking code to temporarily allow for quota to be overridden for processes with CAP_SYS_RESOURCE. It's useful for administrative programs, such as log rotation, that may need to temporarily use more disk space in order to free up a greater amount of overall disk space without yielding more disk space to the rest of userland. Eventually, we may want to add the idea of an operator-specific quota, operator reserved space, or something else to allow for administrative override, but this is perhaps the simplest solution. Signed-off-by: Sargun Dhillon Reviewed-by: David Sterba [ minor changelog edits ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 ++ fs/btrfs/qgroup.c | 5 +++++ 2 files changed, 7 insertions(+) commit a5ed45f8224f2c7e4ad5a9673cb50e8e3128bd88 Author: Nikolay Borisov Date: Thu May 11 09:17:46 2017 +0300 btrfs: Convert fs_info->free_chunk_space to atomic64_t The ->free_chunk_space variable is used to track the unallocated space and access to it is protected by a spinlock, which is not used for anything else. Make the code a bit self-explanatory by switching the variable to an atomic64_t type and kill the spinlock. Signed-off-by: Nikolay Borisov [ not a performance critical code, use of atomic type is ok ] Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- fs/btrfs/disk-io.c | 3 +-- fs/btrfs/extent-tree.c | 4 +--- fs/btrfs/volumes.c | 26 +++++++------------------- 4 files changed, 10 insertions(+), 26 deletions(-) commit 401b41e5a85a635fd9888ba8969c5006a5dbd399 Author: Anand Jain Date: Sat May 6 07:17:54 2017 +0800 btrfs: add framework to handle device flush error as a volume This adds comments to the flush error handling part of the code, and hopes to maintain the same logic with a framework which can be used to handle the errors at the volume level. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++---- fs/btrfs/volumes.h | 1 + 2 files changed, 54 insertions(+), 4 deletions(-) commit 6b349dfe80ded8ef06cd67d6b0a795c1fea82cbe Author: Daichou Date: Mon May 8 10:10:02 2017 +0800 Btrfs: remove obsolete FIXMEs in qgroup ioctls These FIXMEs were already addressed in 2013. All functions check for qgroup existence: * btrfs_add_qgroup_relation * btrfs_ioctl_qgroup_create * btrfs_limit_qgroup * btrfs_del_qgroup_relation Signed-off-by: Daichou [ enhance and reformat changelog ] Signed-off-by: David Sterba fs/btrfs/ioctl.c | 3 --- 1 file changed, 3 deletions(-) commit 62b163f07774e48369a72f2890fce8d7a212a7aa Author: Anand Jain Date: Fri May 5 10:09:36 2017 +0800 btrfs: cleanup unused qgroup trace event Commit 81fb6f77a026 (btrfs: qgroup: Add new trace point for qgroup data reserve) added the following events which aren't used. btrfs__qgroup_data_map btrfs_qgroup_init_data_rsv_map btrfs_qgroup_free_data_rsv_map So remove them. CC: quwenruo@cn.fujitsu.com Signed-off-by: Anand Jain Reviewed-by: Qu Wenruo Signed-off-by: David Sterba include/trace/events/btrfs.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit 97d038562a85e64e9929b9cc91f2b35d5f7bf160 Author: Dan Carpenter Date: Tue May 2 12:25:27 2017 +0300 Btrfs: remove an unused variable "item" is never used. Signed-off-by: Dan Carpenter Signed-off-by: David Sterba fs/btrfs/inode.c | 2 -- 1 file changed, 2 deletions(-) commit 977ec79271fb6dfa0f853ea5aa3c80d3202893ee Author: Fabian Frederick Date: Tue Apr 25 20:11:02 2017 +0200 btrfs: kmap() can't fail Remove NULL test on kmap() as it will always return a valid pointer. Signed-off-by: Fabian Frederick Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 90312351fd1e47183662a6abf159cbf751ea62f1 Author: Luis Oliveira Date: Wed Jun 14 11:43:23 2017 +0100 i2c: designware: MASTER mode as separated driver - The functions related to I2C master mode of operation were transformed in a single driver. - Common definitions were moved to i2c-designware-core.h - The i2c-designware-core is now only a library file, the functions associated are in a source file called i2c-designware-common and are used by both i2c-designware-master and i2c-designware-slave. - To decrease noise in namespace common i2c_dw_*() functions are now using ops to keep them private. - Designware PCI driver had to be changed to match the previous ops functions implementation. Almost all of the "core" source is now part of the "master" source. The difference is the functions used by both modes and they are in the "common" source file. Signed-off-by: Luis Oliveira Acked-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-designware-common.c | 275 +++++++ drivers/i2c/busses/i2c-designware-core.c | 1024 --------------------------- drivers/i2c/busses/i2c-designware-core.h | 143 +++- drivers/i2c/busses/i2c-designware-master.c | 673 ++++++++++++++++++ drivers/i2c/busses/i2c-designware-pcidrv.c | 9 +- drivers/i2c/busses/i2c-designware-platdrv.c | 6 +- 7 files changed, 1098 insertions(+), 1033 deletions(-) commit 89a1e1bd7ba9a6711908bb79af0af6cbdf4a7e79 Author: Luis Oliveira Date: Wed Jun 14 11:43:22 2017 +0100 i2c: designware: refactoring of the i2c-designware - Factor out all _master() part of code from i2c-designware-core and i2c-designware-platdrv to separate functions. - Standardize all code related with MASTER mode. - I have to take off DW_IC_INTR_TX_EMPTY from DW_IC_INTR_DEFAULT_MASK because it is master specific. The purpose of this is to prepare the controller to have is I2C MASTER flow in a separate driver. To do this first all the functions/definitions related to the MASTER flow were identified. Signed-off-by: Luis Oliveira Acked-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 56 +++++++++++++++++------------ drivers/i2c/busses/i2c-designware-platdrv.c | 31 +++++++++------- 2 files changed, 52 insertions(+), 35 deletions(-) commit e393f674c5fedced24432138a8fc40c3d7a628b8 Author: Luis Oliveira Date: Wed Jun 14 11:43:21 2017 +0100 i2c: designware: Cleaning and comment style fixes. The purpose of this commit is to fix some comments and styling in the existing code due to the need of reuse this code. What is being made here is: - Sorted the headers files - Corrected some comments style (capital letters, lowcase i2c) - Reverse tree in the variables declaration - Add/remove empty lines and tabs where needed - Fix of misspelled word "endianness" and "transferred" - Replaced the return variable "r" with the more standard "ret" The value of this, besides the rules of coding style, is because I will use this code after and it will make my future patch a lot bigger and complicated to review. The work here won't bring any additional work to backported fixes because is just style and reordering. Signed-off-by: Luis Oliveira Acked-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 78 ++++++++++++++--------------- drivers/i2c/busses/i2c-designware-core.h | 2 +- drivers/i2c/busses/i2c-designware-platdrv.c | 43 ++++++++-------- 3 files changed, 62 insertions(+), 61 deletions(-) commit a205c159f9e2db586a5ea475f4d22fa22e78fed8 Author: Shawn Guo Date: Sat Jun 17 22:25:28 2017 +0800 ASoC: zx-i2s: flip I2S master/slave mode The SND_SOC_DAIFMT_MASTER bits are defined to specify the master/slave mode for Codec, not I2S. So the I2S master/slave mode should be flipped according to SND_SOC_DAIFMT_MASTER bits. Signed-off-by: Shawn Guo Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/zte/zx-i2s.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 01b8cedfd0422326caae308641dcadaa85e0ca72 Author: Satish Babu Patakokila Date: Fri Jun 16 17:33:40 2017 -0700 ASoC: compress: Derive substream from stream based on direction Currently compress driver hardcodes direction as playback to get substream from the stream. This results in getting the incorrect substream for compressed capture usecase. To fix this, remove the hardcoding and derive substream based on the stream direction. Signed-off-by: Satish Babu Patakokila Signed-off-by: Banajit Goswami Acked-By: Vinod Koul Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/soc-compress.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3d4b4a3e30ae7a949c31e1e10268a3da4723d290 Author: Brian Foster Date: Wed Jun 14 21:35:35 2017 -0700 xfs: remove bli from AIL before release on transaction abort When a buffer is modified, logged and committed, it ultimately ends up sitting on the AIL with a dirty bli waiting for metadata writeback. If another transaction locks and invalidates the buffer (freeing an inode chunk, for example) in the meantime, the bli is flagged as stale, the dirty state is cleared and the bli remains in the AIL. If a shutdown occurs before the transaction that has invalidated the buffer is committed, the transaction is ultimately aborted. The log items are flagged as such and ->iop_unlock() handles the aborted items. Because the bli is clean (due to the invalidation), ->iop_unlock() unconditionally releases it. The log item may still reside in the AIL, however, which means the I/O completion handler may still run and attempt to access it. This results in assert failure due to the release of the bli while still present in the AIL and a subsequent NULL dereference and panic in the buffer I/O completion handling. This can be reproduced by running generic/388 in repetition. To avoid this problem, update xfs_buf_item_unlock() to first check whether the bli is aborted and if so, remove it from the AIL before it is released. This ensures that the bli is no longer accessed during the shutdown sequence after it has been freed. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 79e641ce29cfae5b8fc55fb77ac62d11d2d849c0 Author: Brian Foster Date: Wed Jun 14 21:35:35 2017 -0700 xfs: release bli from transaction properly on fs shutdown If a filesystem shutdown occurs with a buffer log item in the CIL and a log force occurs, the ->iop_unpin() handler is generally expected to tear down the bli properly. This entails freeing the bli memory and releasing the associated hold on the buffer so it can be released and the filesystem unmounted. If this sequence occurs while ->bli_refcount is elevated (i.e., another transaction is open and attempting to modify the buffer), however, ->iop_unpin() may not be responsible for releasing the bli. Instead, the transaction may release the final ->bli_refcount reference and thus xfs_trans_brelse() is responsible for tearing down the bli. While xfs_trans_brelse() does drop the reference count, it only attempts to release the bli if it is clean (i.e., not in the CIL/AIL). If the filesystem is shutdown and the bli is sitting dirty in the CIL as noted above, this ends up skipping the last opportunity to release the bli. In turn, this leaves the hold on the buffer and causes an unmount hang. This can be reproduced by running generic/388 in repetition. Update xfs_trans_brelse() to handle this shutdown corner case correctly. If the final bli reference is dropped and the filesystem is shutdown, remove the bli from the AIL (if necessary) and release the bli to drop the buffer hold and ensure an unmount does not hang. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_trans_buf.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 0cbe48cc5814ae26e4058c5d666914c86a4a6b5d Author: Arnd Bergmann Date: Wed Jun 14 21:35:34 2017 -0700 xfs: avoid harmless gcc-7 warnings gcc-7 flags the use of integer math inside of a condition as a potential bug: fs/xfs/xfs_bmap_util.c: In function 'xfs_swap_extents_check_format': fs/xfs/xfs_bmap_util.c:1619:8: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] fs/xfs/xfs_bmap_util.c:1629:8: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] There is already a helper function for testing the di_forkoff field for zero, so let's use that instead to shut up the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f990fc5ad13b8fecdf154f36c252d49d7e9bdfab Author: Shan Hai Date: Wed Jun 14 21:35:07 2017 -0700 xfs: remove lsn relevant fields from xfs_trans structure and its users The t_lsn is not used anymore and the t_commit_lsn is used as a tmp storage for the checkpoint sequence number only in the current code. And the start/commit lsn are tracked as a transaction group tag in the xfs_cil_ctx instead of a single transaction, so remove them from the xfs_trans structure and their users to match with the design. Signed-off-by: Shan Hai Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 7 ++++--- fs/xfs/xfs_trace.h | 19 ------------------- fs/xfs/xfs_trans.h | 4 ---- 3 files changed, 4 insertions(+), 26 deletions(-) commit 3398a4005f0c8ced67a9071475562d435d88b7a6 Author: Christoph Hellwig Date: Wed Jun 14 21:30:44 2017 -0700 xfs: remove XFS_HSIZE XFS_HSIZE is an extremly confusing way to calculate the size of handle_t. Given that handle_t always only had two sizes, and one of them isn't even covered by XFS_HSIZE to start with just remove the macro and use a constant sizeof expression. Note that XFS_HSIZE isn't used in xfsprogs, xfsdump or xfstests either. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_fs.h | 4 ---- fs/xfs/xfs_ioctl.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) commit d4ca1d550d052accec85ae26ac5b9d3d8b8f81f1 Author: Brian Foster Date: Wed Jun 14 21:29:50 2017 -0700 xfs: dump transaction usage details on log reservation overrun If a transaction log reservation overrun occurs, the ticket data associated with the reservation is dumped in xfs_log_commit_cil(). This occurs long after the transaction items and details have been removed from the transaction and effectively lost. This limited set of ticket data provides very little information to support debugging transaction overruns based on the typical report. To improve transaction log reservation overrun reporting, create a helper to dump transaction details such as log items, log vector data, etc., as well as the underlying ticket data for the transaction. Move the overrun detection from xfs_log_commit_cil() to xlog_cil_insert_items() so it occurs prior to migration of the logged items to the CIL. Call the new helper such that it is able to dump this transaction data before it is lost. Also, warn on overrun to provide callstack context for the offending transaction and include a few additional messages from xlog_cil_insert_items() to display the reservation consumed locally for overhead such as log vector headers, split region headers and the context ticket. This provides a complete general breakdown of the reservation consumption of a transaction when/if it happens to overrun the reservation. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_log_cil.c | 24 ++++++++++++++++++------ fs/xfs/xfs_log_priv.h | 1 + 3 files changed, 68 insertions(+), 6 deletions(-) commit e2f2342639a414b60de3876a8b437eac2b795dbe Author: Brian Foster Date: Wed Jun 14 21:29:49 2017 -0700 xfs: refactor xlog_cil_insert_items() to facilitate transaction dump Transaction reservation overrun detection currently occurs too late to print useful information about the offending transaction. Ideally, the transaction data is printed before the associated log items are moved from the transaction to the CIL, which occurs in xlog_cil_insert_items(), such that details of the items logged by the transaction are available for analysis. Refactor xlog_cil_insert_items() to facilitate moving tx overrun detection to this function. Update the function to track each bit of extra log reservation stolen from the transaction (i.e., such as for the CIL context ticket) and perform the log item migration as the last operation before the CIL lock is released. This creates a context where the transaction reservation consumption has been fully calculated when the log items are moved to the CIL. This patch makes no functional changes. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 62 +++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) commit 7d2d5653460443e0586bd7d2e07811b4f4095e36 Author: Brian Foster Date: Wed Jun 14 21:29:48 2017 -0700 xfs: separate shutdown from ticket reservation print helper xlog_print_tic_res() pre-dates delayed logging and the committed items list (CIL) and thus retains some factoring warts, such as hard coded function names in the output and the fact that it induces a shutdown. In preparation for more detailed logging of regular transaction overrun situations, refactor xlog_print_tic_res() to be slightly more generic. Reword some of the warning messages and pull the shutdown into the callers. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 12 ++++++------ fs/xfs/xfs_log_cil.c | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) commit 1040960efaabb8e6c87633c7becbb51fc99d4b9b Author: Brian Foster Date: Wed Jun 14 21:29:13 2017 -0700 xfs: define fatal assert build time tunable While configurable at runtime, the DEBUG mode assert failure behavior is usually either desired or not for a particular situation. For example, developers using kernel modules may prefer for fatal asserts to remain disabled across module reloads while QE engineers doing broad regression testing may prefer to have fatal asserts enabled on boot to facilitate data collection for bug reports. To provide a compromise/convenience for developers, create a Kconfig option that sets the default value of the DEBUG mode 'bug_on_assert' sysfs tunable. The default behavior remains to trigger kernel BUGs on assert failures to preserve existing behavior across kernel configuration updates with DEBUG mode enabled. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/Kconfig | 13 +++++++++++++ fs/xfs/xfs.h | 4 ++++ fs/xfs/xfs_globals.c | 7 +++++-- 3 files changed, 22 insertions(+), 2 deletions(-) commit ccdab3d6e881649f05110d9098fd248d2753aaf3 Author: Brian Foster Date: Wed Jun 14 21:29:12 2017 -0700 xfs: define bug_on_assert debug mode sysfs tunable In DEBUG mode, assert failures unconditionally trigger a kernel BUG. This is useful in diagnostic situations to panic a system and collect detailed state information at the time of a failure. This can also cause problems in cases where DEBUG mode code is desired but it is preferable not trigger kernel BUGs on assert failure. For example, during development of new code or during certain xfstests tests that intentionally cause corruption and test the kernel for survival (but otherwise may expect to trigger assert failures). To provide additional flexibility, create the /fs/xfs/debug/bug_on_assert tunable to configure assert failure behavior at runtime. This tunable is only available in DEBUG mode and is enabled by default to preserve existing default behavior. When disabled, assert failures in DEBUG mode result in kernel warnings. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_globals.c | 2 ++ fs/xfs/xfs_message.c | 5 ++++- fs/xfs/xfs_sysctl.h | 1 + fs/xfs/xfs_sysfs.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) commit e1a4e37cc7b665b6804fba812aca2f4d7402c249 Author: Darrick J. Wong Date: Wed Jun 14 21:25:57 2017 -0700 xfs: try to avoid blowing out the transaction reservation when bunmaping a shared extent In a pathological scenario where we are trying to bunmapi a single extent in which every other block is shared, it's possible that trying to unmap the entire large extent in a single transaction can generate so many EFIs that we overflow the transaction reservation. Therefore, use a heuristic to guess at the number of blocks we can safely unmap from a reflink file's data fork in an single transaction. This should prevent problems such as the log head slamming into the tail and ASSERTs that trigger because we've exceeded the transaction reservation. Note that since bunmapi can fail to unmap the entire range, we must also teach the deferred unmap code to roll into a new transaction whenever we get low on reservation. Signed-off-by: Darrick J. Wong [hch: random edits, all bugs are my fault] Signed-off-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 38 ++++++++++++++++++++++++++++++-------- fs/xfs/libxfs/xfs_bmap.h | 2 +- fs/xfs/libxfs/xfs_refcount.c | 10 +--------- fs/xfs/libxfs/xfs_refcount.h | 16 ++++++++++++++++ fs/xfs/xfs_bmap_item.c | 17 +++++++++++++++-- fs/xfs/xfs_trans.h | 2 +- fs/xfs/xfs_trans_bmap.c | 11 +++++++++-- 7 files changed, 73 insertions(+), 23 deletions(-) commit d205a7d0ec47d11977882b5e910ad35f7be912b4 Author: Darrick J. Wong Date: Wed Jun 14 21:23:05 2017 -0700 xfs: refactor dir2 leaf readahead shadow buffer cleverness Currently, the dir2 leaf block getdents function uses a complex state tracking mechanism to create a shadow copy of the block mappings and then uses the shadow copy to schedule readahead. Since the read and readahead functions are perfectly capable of reading the mappings themselves, we can tear all that out in favor of a simpler function that simply keeps pushing the readahead window further out. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig fs/xfs/xfs_dir2_readdir.c | 318 ++++++++++++---------------------------------- 1 file changed, 84 insertions(+), 234 deletions(-) commit 7912e7fef2aebe577f0b46d3cba261f2783c5695 Author: Brian Foster Date: Wed Jun 14 21:21:45 2017 -0700 xfs: push buffer of flush locked dquot to avoid quotacheck deadlock Reclaim during quotacheck can lead to deadlocks on the dquot flush lock: - Quotacheck populates a local delwri queue with the physical dquot buffers. - Quotacheck performs the xfs_qm_dqusage_adjust() bulkstat and dirties all of the dquots. - Reclaim kicks in and attempts to flush a dquot whose buffer is already queud on the quotacheck queue. The flush succeeds but queueing to the reclaim delwri queue fails as the backing buffer is already queued. The flush unlock is now deferred to I/O completion of the buffer from the quotacheck queue. - The dqadjust bulkstat continues and dirties the recently flushed dquot once again. - Quotacheck proceeds to the xfs_qm_flush_one() walk which requires the flush lock to update the backing buffers with the in-core recalculated values. It deadlocks on the redirtied dquot as the flush lock was already acquired by reclaim, but the buffer resides on the local delwri queue which isn't submitted until the end of quotacheck. This is reproduced by running quotacheck on a filesystem with a couple million inodes in low memory (512MB-1GB) situations. This is a regression as of commit 43ff2122e6 ("xfs: on-stack delayed write buffer lists"), which removed a trylock and buffer I/O submission from the quotacheck dquot flush sequence. Quotacheck first resets and collects the physical dquot buffers in a delwri queue. Then, it traverses the filesystem inodes via bulkstat, updates the in-core dquots, flushes the corrected dquots to the backing buffers and finally submits the delwri queue for I/O. Since the backing buffers are queued across the entire quotacheck operation, dquot reclaim cannot possibly complete a dquot flush before quotacheck completes. Therefore, quotacheck must submit the buffer for I/O in order to cycle the flush lock and flush the dirty in-core dquot to the buffer. Add a delwri queue buffer push mechanism to submit an individual buffer for I/O without losing the delwri queue status and use it from quotacheck to avoid the deadlock. This restores quotacheck behavior to as before the regression was introduced. Reported-by: Martin Svec Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_buf.h | 1 + fs/xfs/xfs_qm.c | 28 ++++++++++++++++++++++++- fs/xfs/xfs_trace.h | 1 + 4 files changed, 89 insertions(+), 1 deletion(-) commit 1170fbd8ff43ff7808ae4a698054762b8bfae340 Author: Feras Daoud Date: Thu Jun 1 14:56:17 2017 +0300 net/mlx5e: IPoIB, Add ioctl support to IPoIB device driver Add ioctl support to IPoIB device driver. For now, this ioctl will support timestamp get and set. Signed-off-by: Feras Daoud Signed-off-by: Eitan Rabin Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 10 ++++------ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 ++++-- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 16 ++++++++++++++++ 4 files changed, 26 insertions(+), 10 deletions(-) commit 3844b07ee4c96d0cf8886611c21bb3a367b759e1 Author: Feras Daoud Date: Thu Jun 1 14:43:43 2017 +0300 net/mlx5e: IPoIB, Add PTP support to IPoIB device driver Enable PTP for IPoIB rdma_netdev and add the ability to get the time stamping parameters using ethtool. Signed-off-by: Feras Daoud Signed-off-by: Eitan Rabin Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 15 +++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 9 +++++++++ drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 ++ 5 files changed, 28 insertions(+), 4 deletions(-) commit 4ec5cf781b13ef9bcacfd96e108adb61629aa97a Author: Erez Shitrit Date: Sun May 21 16:28:07 2017 +0300 net/mlx5e: IPoIB, Get more TX statistics Add misses counters (bytes, packet, gso, xmit_more) in TX flow for ipoib traffic. Fixes: 58545449b7b ("net/mlx5e: IPoIB, Xmit flow") Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 5 +++++ 1 file changed, 5 insertions(+) commit 807c4415974ff0d0bd101fd99ff6152feb22b0ac Author: Erez Shitrit Date: Sun May 21 08:56:20 2017 +0300 net/mlx5e: IPoIB, Handle change_mtu Add the ndo that supports change mtu for IPoIB. The callback called from the ipoib ULP driver, that gives the ability to change the SW and HW resources accordingly in the lower driver. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit c139dbfddd2c7848550ed06345060aa87701e818 Author: Erez Shitrit Date: Thu May 18 17:03:21 2017 +0300 net/mlx5e: Use hard_mtu as part of the mlx5e_priv struct The mtu extra space that kept for the HW is specific for each link type, and it is different in mlx5e and mlx5i modules. Now it is kept in the priv structures, set by the mlx5e/mlx5i driver accordingly. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 +++++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 ++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 6 +----- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 6 ++++-- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 5 +++++ 6 files changed, 24 insertions(+), 13 deletions(-) commit b6dc510fac4796a57527667d47c48ef57a578dfc Author: Erez Shitrit Date: Thu May 18 14:44:15 2017 +0300 net/mlx5e: IPoIB, Change parameters default values Add function that sets the default values for ipoib, setting/clearing abilities that IPoIB doesn't support, like RQ size in this case. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 7ca42c8094a4e265b8007a6776380f57cf093624 Author: Erez Shitrit Date: Thu May 18 14:32:11 2017 +0300 net/mlx5e: Add new profile function update_carrier Updating the carrier involves specific HW setting, each profile should use its own function for that. Both IPoIB and VF representor don't need carrier update function, since VF representor has only a logical link to VF and IPoIB manages its own link via ib_core upper layer. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 14 ++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 ++ 4 files changed, 14 insertions(+), 4 deletions(-) commit 076b0936e5fb8dd5513c1472a2c1d487b64d1580 Author: Erez Shitrit Date: Mon May 15 13:32:28 2017 +0300 net/mlx5e: IPoIB, Add ethtool support Add support for the following: "ethtool -S" (statistics). "ethtool -i" (driver info). "ethtool -g/G" (rings parameters). "ethtool -l/L" (channels parameters). "ethtool -c/C" (coalesce options). Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 21 ++++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 138 +++++++++++++++------ .../ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 127 +++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 +- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 2 + 6 files changed, 255 insertions(+), 37 deletions(-) commit c66f2091c9248ddf42504c74cd327ae8619b04a4 Author: Feras Daoud Date: Sun Jun 4 17:45:02 2017 +0300 net/mlx5e: Prevent PFC call for non ethernet ports Port flow control supported only for ethernet ports, therefore, prevent any call if the port type differs from MLX5_CAP_PORT_TYPE_ETH. Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4301ba7b3ed9d3ffbaebc295413fcd3e8ab34949 Author: Saeed Mahameed Date: Sun Jun 18 17:13:44 2017 +0300 net/mlx5e: IPoIB, Move to a separate directory IPoIB netdevice driver was only introduced in previous kernel release and it is growing in terms of features and LOC, move it to a separate directory. Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 513 --------------------- drivers/net/ethernet/mellanox/mlx5/core/ipoib.h | 56 --- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 513 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 56 +++ 7 files changed, 572 insertions(+), 572 deletions(-) commit fd0f237572ada2b18fe1e8684ae9fa131b577a17 Author: Adam Thomson Date: Mon Jun 19 10:56:34 2017 +0100 ASoC: Intel: bxt: Move codec sysclk config to codec_init function The MCLK for DA7219 does not change in this platform, but is currently being configured everytime as part of the platform_clock event handler for DAPM. The upshot of this is that we have unnecessary calls to this function, and it also means that if a stream hasn't yet been started, DA7219 driver does not have the correct MCLK rates programmed and so the HP detection feature does not operate as expected. This patch rectifies this issue by moving the sysclk call to codec_init function so it's only called once at initialisation. Signed-off-by: Adam Thomson Acked-by: Sathyanarayana Nujella Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 2a0c2189d8170d52da64543cbf955f0908c15e70 Author: Adam Thomson Date: Mon Jun 19 10:56:33 2017 +0100 ASoC: da7219: Fix HP detection procedure for all MCLK frequencies Currently when HP detection procedure runs for certain MCLK frequencies, when PLL is bypassed, the procedure will incorrectly report Lineout instead of Headphones due to timing incosistencies. To avoid this problem, the PLL is temporarily enabled (if currently bypassed and MCLK present) to provide consistent timings for the procedure, regardless of MCLK frequency. Signed-off-by: Adam Thomson Acked-by: Sathyanarayana Nujella Signed-off-by: Mark Brown sound/soc/codecs/da7219-aad.c | 31 +++++++++++++++++++------ sound/soc/codecs/da7219.c | 53 +++++++++++++++++++++++++++++-------------- sound/soc/codecs/da7219.h | 5 +++- 3 files changed, 64 insertions(+), 25 deletions(-) commit 1f0f8bde45a7ea843bb2e7a8f45f255b23cdc2e7 Author: Subhransu S. Prusty Date: Mon Jun 19 11:59:21 2017 +0530 ASoC: skl_rt286: Add deepbuffer dai link This patch adds the deepbuffer device which can be opened with a bigger buffer size. The application can disable interrupts and sleep for longer duration. Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/skl_rt286.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit f6e6ab1d16ec9dafa65557b5637f5217b32702ef Author: Ramesh Babu Date: Mon Jun 19 11:59:20 2017 +0530 ASoC: Intel: Skylake: Fix dma buffer size calculation DMA buffer size for gateway copier will be calculated based on: For host DMA copier: Input buffer size (ibs) for output direction (playback) Output buffer size (obs) for input direction (capture) For link DMA copier: IBS for input direction (capture) OBS for output direction (playback) Update the driver to use the above. Signed-off-by: Ramesh Babu Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 939df3ada789ccd61a01721df8fc7955aab3aad7 Author: Ramesh Babu Date: Mon Jun 19 11:59:19 2017 +0530 ASoC: Intel: Skylake: Add deep buffer support With this patch, the dma buffer size is fetched from topology binary. This buffer size is applicable for gateway copier modules. Now that we can configure DSP dma buffer size, the device can support deep buffer playback. DSP fetches large buffer and can result fewer wakes, which helps in power reduction. Signed-off-by: Ramesh Babu Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul Signed-off-by: Mark Brown include/uapi/sound/snd_sst_tokens.h | 5 ++++- sound/soc/intel/skylake/skl-topology.c | 4 ++++ sound/soc/intel/skylake/skl-topology.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) commit 5561b66bd0297b029d2aba40b044ac191fcca98c Author: olivier moysan Date: Mon Jun 19 11:09:55 2017 +0200 ASoC: stm32: change configuration flag Use a specific flag for SAI and I2S interfaces, instead of common flag. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/Kconfig | 19 ++++++++++++++++--- sound/soc/stm/Makefile | 6 +++--- 2 files changed, 19 insertions(+), 6 deletions(-) commit a45af6d3a98b4d8a2746de13a8db52fb4123bb56 Author: Konstantin Porotchkin Date: Wed May 31 15:19:15 2017 +0200 clk: mvebu: cp110: add sdio clock to cp-110 system controller This commit updates the CP110 system controller driver to add the definition for a missing clock. The SDIO clock is dedicated driving the SDHCI interface and its frequency is 400MHz (2/5 of PLL source clock). The SDIO interface should be bound to this clock and not the core clock as in the older code. Using the wrong clock lead to a maximum SDHCI frequency of 250 Mhz, while the HW really supports up to 400 Mhz. This patch also fixes the NAND clock relationship documentation. Signed-off-by: Konstantin Porotchkin [gregory.clement@free-electrons.com: - use sdio instead of emmc to name the clock] Reviewed-by: Thomas Petazzoni Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT drivers/clk/mvebu/cp110-system-controller.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 5ffeb5f5a77adc925699bbd9da198e5b8a4eec5a Author: Gregory CLEMENT Date: Tue May 30 17:46:06 2017 +0200 clk: mvebu: cp110: introduce a new binding The initial intent when the binding of the cp110 system controller was to have one flat node. The idea being that what is currently a clock-only driver in drivers would become a MFD driver, exposing the clock, GPIO and pinctrl functionality. However, after taking a step back, this would lead to a messy binding. Indeed, a single node would be a GPIO controller, clock controller, pinmux controller, and more. This patch adopts a more classical solution of a top-level syscon node with sub-nodes for the individual devices. The main benefit will be to have each functional block associated to its own sub-node where we can put its own properties. The introduction of the Armada 7K/8K is still in the early stage so the plan is to remove the old binding. However, we don't want to break the device tree compatibility for the few devices already in the field. For this we still keep the support of the legacy compatible string with a big warning in the kernel about updating the device tree. Reviewed-by: Thomas Petazzoni Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT drivers/clk/mvebu/cp110-system-controller.c | 63 ++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 15 deletions(-) commit f5667274ba9e73a740210ed996cc0f63c8d2f601 Author: Gregory CLEMENT Date: Wed May 31 15:11:09 2017 +0200 clk: mvebu: cp110: do not depend anymore of the *-clock-output-names Using the *-clock-output-names property was a convenient way to have a unique name for each clock even when there are multiple cp110 blocks as we can find on Armada 8K. However it has some drawbacks: the main one being a stronger link than necessary between the driver and the device tree. For example the clock name can't be changed, removed or moved. It is still the early stage of introduction of the Armada 7K/8K and the hardware is still not totally documented, especially for the clock part. By removing the use of *-clock-output-names it will be easier to add new clocks without breaking the compatibility. The name of each clock is now created by using its physical address as a prefix (as it was done for the platform device names). Thanks to this we have an automatic way to compute a unique name. Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT drivers/clk/mvebu/cp110-system-controller.c | 105 +++++++++++++++++----------- 1 file changed, 65 insertions(+), 40 deletions(-) commit f853e9a028ddf6bc83ac24f5de87207b98a133ee Author: Gregory CLEMENT Date: Tue May 9 18:30:24 2017 +0200 pinctrl: dt-bindings: add documentation for CP110 pin controllers Document the device tree binding for the pin controllers found on the Armada 7K and Armada 8K SoCs. Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../arm/marvell/cp110-system-controller0.txt | 101 +++++++++++++++++++-- 1 file changed, 94 insertions(+), 7 deletions(-) commit e88e2cd70102d937d46b7bfe56c5cb46801f2fe2 Author: Gregory CLEMENT Date: Tue May 9 18:27:47 2017 +0200 pinctrl: dt-bindings: add documentation for AP806 pin controllers Document the device tree binding for the pin controllers found on the Armada 7K and Armada 8K SoCs. Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../arm/marvell/ap806-system-controller.txt | 53 +++++++++++++++++++--- 1 file changed, 46 insertions(+), 7 deletions(-) commit bbc6fd0a0981b1c971ba8bc1ab37260ae125e4c9 Author: Gregory CLEMENT Date: Wed May 31 15:16:36 2017 +0200 dt-bindings: cp110: add sdio clock to cp-110 system controller This patch updates the documentation according to the change made in the patch "clk: mvebu: cp110: add sdio clock to cp-110 system controller" Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../devicetree/bindings/arm/marvell/cp110-system-controller0.txt | 1 + 1 file changed, 1 insertion(+) commit 04c623c90767c496cc82ba70a22b1543b0b7a924 Author: Gregory CLEMENT Date: Tue May 30 17:47:08 2017 +0200 dt-bindings: cp110: introduce a new binding This patch updates the documentation according to the change made in the patch "pinctrl: dt-bindings: cp110: introduce a new binding". Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../bindings/arm/marvell/cp110-system-controller0.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 981282065a35cbb78cce8d83f6a7f67e1e96bb8a Author: Gregory CLEMENT Date: Wed May 31 14:49:11 2017 +0200 dt-bindings: cp110: do not depend anymore of the *-clock-output-names This patch updates the documentation according to the change made in the patch "clk: mvebu: cp110: do not depend anymore of the *-clock-output-names": the clock names are no more part of the binding. Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../bindings/arm/marvell/cp110-system-controller0.txt | 14 -------------- 1 file changed, 14 deletions(-) commit 3b1a94c88b798d4f3bd1a5b61f5c8fb9d987c242 Author: Damien Le Moal Date: Wed Jun 7 15:55:39 2017 +0900 dm zoned: drive-managed zoned block device target The dm-zoned device mapper target provides transparent write access to zoned block devices (ZBC and ZAC compliant block devices). dm-zoned hides to the device user (a file system or an application doing raw block device accesses) any constraint imposed on write requests by the device, equivalent to a drive-managed zoned block device model. Write requests are processed using a combination of on-disk buffering using the device conventional zones and direct in-place processing for requests aligned to a zone sequential write pointer position. A background reclaim process implemented using dm_kcopyd_copy ensures that conventional zones are always available for executing unaligned write requests. The reclaim process overhead is minimized by managing buffer zones in a least-recently-written order and first targeting the oldest buffer zones. Doing so, blocks under regular write access (such as metadata blocks of a file system) remain stored in conventional zones, resulting in no apparent overhead. dm-zoned implementation focus on simplicity and on minimizing overhead (CPU, memory and storage overhead). For a 14TB host-managed disk with 256 MB zones, dm-zoned memory usage per disk instance is at most about 3 MB and as little as 5 zones will be used internally for storing metadata and performing buffer zone reclaim operations. This is achieved using zone level indirection rather than a full block indirection system for managing block movement between zones. dm-zoned primary target is host-managed zoned block devices but it can also be used with host-aware device models to mitigate potential device-side performance degradation due to excessive random writing. Zoned block devices can be formatted and checked for use with the dm-zoned target using the dmzadm utility available at: https://github.com/hgst/dm-zoned-tools Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche [Mike Snitzer partly refactored Damien's original work to cleanup the code] Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-zoned.txt | 144 ++ drivers/md/Kconfig | 17 + drivers/md/Makefile | 2 + drivers/md/dm-zoned-metadata.c | 2509 ++++++++++++++++++++++++++++++ drivers/md/dm-zoned-reclaim.c | 570 +++++++ drivers/md/dm-zoned-target.c | 967 ++++++++++++ drivers/md/dm-zoned.h | 228 +++ 7 files changed, 4437 insertions(+) commit b73c67c2cbb0004e6da9720a167fe42e31f7a6e8 Author: Damien Le Moal Date: Mon May 8 16:40:51 2017 -0700 dm kcopyd: add sequential write feature When copyying blocks to host-managed zoned block devices, writes must be sequential. However, dm_kcopyd_copy() does not guarantee this as writes are issued in the completion order of reads, and reads may complete out of order despite being issued sequentially. Fix this by introducing the DM_KCOPYD_WRITE_SEQ feature flag. This can be specified when calling dm_kcopyd_copy() and should be set automatically if one of the destinations is a host-managed zoned block device. For a split job, the master job maintains the write position at which writes must be issued. This is checked with the pop() function which is modified to not return any write I/O sub job that is not at the correct write position. When DM_KCOPYD_WRITE_SEQ is specified for a job, errors cannot be ignored and the flag DM_KCOPYD_IGNORE_ERROR is ignored, even if specified by the user. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm-kcopyd.c | 65 +++++++++++++++++++++++++++++++++++++++++++++-- include/linux/dm-kcopyd.h | 1 + 2 files changed, 64 insertions(+), 2 deletions(-) commit 0be12c1c7fce7e0f464861a7752d489860c376f9 Author: Damien Le Moal Date: Mon May 8 16:40:50 2017 -0700 dm linear: add support for zoned block devices Add support for zoned block devices by allowing host-managed zoned block device mapped targets, the remapping of REQ_OP_ZONE_RESET and the post processing (reply remapping) of REQ_OP_ZONE_REPORT. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm-linear.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 124c44546d0cbf6dc2daf92cba80cf556e9039c3 Author: Damien Le Moal Date: Mon May 8 16:40:49 2017 -0700 dm flakey: add support for zoned block devices With the development of file system support for zoned block devices (e.g. f2fs), having dm-flakey support these devices is interesting to improve testing. Add host-aware and host-managed zoned block devices support to in dm-flakey. The target type feature is set to DM_TARGET_ZONED_HM to indicate support for host-managed models. Also add hooks for remapping of REQ_OP_ZONE_RESET and REQ_OP_ZONE_REPORT bios. Additionally, in the bio completion path, (backward) remapping of a zone report reply is added. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm-flakey.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 10999307c14eac281fbec3ada73bee7a05bd41dc Author: Damien Le Moal Date: Mon May 8 16:40:48 2017 -0700 dm: introduce dm_remap_zone_report() A target driver support zoned block devices and exposing it as such may receive REQ_OP_ZONE_REPORT request for the user to determine the mapped device zone configuration. To process properly such request, the target driver may need to remap the zone descriptors provided in the report reply. The helper function dm_remap_zone_report() does this generically using only the target start offset and length and the start offset within the target device. dm_remap_zone_report() will remap the start sector of all zones reported. If the report includes sequential zones, the write pointer position of these zones will also be remapped. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm.c | 79 +++++++++++++++++++++++++++++++++++++++++++ include/linux/device-mapper.h | 2 ++ 2 files changed, 81 insertions(+) commit 264c869d44dcff17e3b108dbb2fbea24bed08538 Author: Damien Le Moal Date: Mon May 8 16:40:47 2017 -0700 dm: fix REQ_OP_ZONE_REPORT bio handling A REQ_OP_ZONE_REPORT bio is not a medium access command. Its number of sectors indicates the maximum size allowed for the report reply size and not an amount of sectors accessed from the device. REQ_OP_ZONE_REPORT bios should thus not be split depending on the target device maximum I/O length but passed as-is. Note that it is the responsability of the target to remap and format the report reply. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit a4aa5e56e5189b88a2891cdcc350dac618810354 Author: Damien Le Moal Date: Mon May 8 16:40:46 2017 -0700 dm: fix REQ_OP_ZONE_RESET bio handling The REQ_OP_ZONE_RESET bio has no payload and zero sectors. Its position is the only information used to indicate the zone to reset on the device. Due to its zero length, this bio is not cloned and sent to the target through the non-flush case in __split_and_process_bio(). Add an additional case in that function to call __split_and_process_non_flush() without checking the clone info size. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit dd88d313bef0277e27597aa394607ed26c658724 Author: Damien Le Moal Date: Mon May 8 16:40:43 2017 -0700 dm table: add zoned block devices validation 1) Introduce DM_TARGET_ZONED_HM feature flag: The target drivers currently available will not operate correctly if a table target maps onto a host-managed zoned block device. To avoid problems, introduce the new feature flag DM_TARGET_ZONED_HM to allow a target to explicitly state that it supports host-managed zoned block devices. This feature is checked for all targets in a table if any of the table's block devices are host-managed. Note that as host-aware zoned block devices are backward compatible with regular block devices, they can be used by any of the current target types. This new feature is thus restricted to host-managed zoned block devices. 2) Check device area zone alignment: If a target maps to a zoned block device, check that the device area is aligned on zone boundaries to avoid problems with REQ_OP_ZONE_RESET operations (resetting a partially mapped sequential zone would not be possible). This also facilitates the processing of zone report with REQ_OP_ZONE_REPORT bios. 3) Check block devices zone model compatibility When setting the DM device's queue limits, several possibilities exists for zoned block devices: 1) The DM target driver may want to expose a different zone model (e.g. host-managed device emulation or regular block device on top of host-managed zoned block devices) 2) Expose the underlying zone model of the devices as-is To allow both cases, the underlying block device zone model must be set in the target limits in dm_set_device_limits() and the compatibility of all devices checked similarly to the logical block size alignment. For this last check, introduce validate_hardware_zoned_model() to check that all targets of a table have the same zone model and that the zone size of the target devices are equal. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche [Mike Snitzer refactored Damien's original work to simplify the code] Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 162 ++++++++++++++++++++++++++++++++++++++++++ include/linux/device-mapper.h | 6 ++ 2 files changed, 168 insertions(+) commit d2c3c8dcb5987b8352e82089c79a41b6e17e28d2 Author: Joe Perches Date: Thu Apr 20 10:46:07 2017 -0700 dm: convert DM printk macros to pr_ macros Using pr_ is the more common logging style. Standardize style and use new macro DM_FMT. Use no_printk in DMDEBUG macros when CONFIG_DM_DEBUG is not #defined. Signed-off-by: Joe Perches Signed-off-by: Mike Snitzer include/linux/device-mapper.h | 71 +++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 39 deletions(-) commit 7e3fd855ad66ffc0dd926911da23dd21e59f9462 Author: Milan Broz Date: Tue Jun 6 09:07:01 2017 +0200 dm crypt: add big-endian variant of plain64 IV The big-endian IV (plain64be) is needed to map images from extracted disks that are used in some external (on-chip FDE) disk encryption drives, e.g.: data recovery from external USB/SATA drives that support "internal" encryption. Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 6e333d0be346372390785ecd9a0ddcf7ea9f82ed Author: Geliang Tang Date: Sat May 6 23:39:10 2017 +0800 dm bio prison: use rb_entry() rather than container_of() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Acked-by: Coly Li Signed-off-by: Mike Snitzer drivers/md/dm-bio-prison-v1.c | 2 +- drivers/md/dm-bio-prison-v2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 23d70c5e52dd68448bb14fdef5efe04d81973b31 Author: Mikulas Patocka Date: Mon Jan 16 16:07:01 2017 -0500 dm ioctl: report event number in DM_LIST_DEVICES Report the event numbers for all the devices, so that the user doesn't have to ask them one by one. The event number is reported after the name field in the dm_name_list structure. The location of the next record is specified in the dm_name_list->next field, that means that we can put the new data after the end of name and it is backward compatible with the old code. The old code just skips the event number without interpreting it. Signed-off-by: Mikulas Patocka Signed-off-by: Andy Grover Signed-off-by: Mike Snitzer drivers/md/dm-ioctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fc1841e1c15d72b0897ecfc1627ecdc284f0ec95 Author: Mikulas Patocka Date: Fri May 5 11:12:52 2017 -0700 dm ioctl: add a new DM_DEV_ARM_POLL ioctl This ioctl will record the current global event number in the structure dm_file, so that next select or poll call will wait until new events arrived since this ioctl. The DM_DEV_ARM_POLL ioctl has the same effect as closing and reopening the handle. Using the DM_DEV_ARM_POLL ioctl is optional - if the userspace is OK with closing and reopening the /dev/mapper/control handle after select or poll, there is no need to re-arm via ioctl. Usage: 1. open the /dev/mapper/control device 2. send the DM_DEV_ARM_POLL ioctl 3. scan the event numbers of all devices we are interested in and process them 4. call select, poll or epoll on the handle (it waits until some new event happens since the DM_DEV_ARM_POLL ioctl) 5. go to step 2 Signed-off-by: Mikulas Patocka Signed-off-by: Andy Grover Signed-off-by: Mike Snitzer drivers/md/dm-ioctl.c | 56 +++++++++++++++++++++++++++---------------- include/uapi/linux/dm-ioctl.h | 4 +++- 2 files changed, 38 insertions(+), 22 deletions(-) commit 93e6442c76a0d26ad028c5df9b4a1e3096d9c36b Author: Mikulas Patocka Date: Mon Jan 16 16:05:59 2017 -0500 dm: add basic support for using the select or poll function Add the ability to poll on the /dev/mapper/control device. The select or poll function waits until any event happens on any dm device since opening the /dev/mapper/control device. When select or poll returns the device as readable, we must close and reopen the device to wait for new dm events. Usage: 1. open the /dev/mapper/control device 2. scan the event numbers of all devices we are interested in and process them 3. call select, poll or epoll on the handle (it waits until some new event happens since opening the device) 4. close the /dev/mapper/control handle 5. go to step 1 The next commit allows to re-arm the polling without closing and reopening the device. Signed-off-by: Mikulas Patocka Signed-off-by: Andy Grover Signed-off-by: Mike Snitzer drivers/md/dm-core.h | 3 +++ drivers/md/dm-ioctl.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- drivers/md/dm.c | 5 +++++ 3 files changed, 56 insertions(+), 1 deletion(-) commit 910603818c6c0558fe9b5e056a3bd5195aaae1a5 Author: Raju Rangoju Date: Mon Jun 19 17:40:48 2017 +0530 cxgb4: notify uP to route ctrlq compl to rdma rspq During the module initialisation there is a possible race (basically race between uld and lld) where neither the uld nor lld notifies the uP about where to route the ctrl queue completions. LLD skips notifying uP as the rdma queues were not created by then (will leave it to ULD to notify the uP). As the ULD comes up, it also skips notifying the uP as the flag FULL_INIT_DONE is not set yet (ULD assumes that the interface is not up yet). Consequently, this race between uld and lld leaves uP unnotified about where to send the ctrl queue completions to, leading to iwarp RI_RES WR failure. Here is the race: CPU 0 CPU1 - allocates nic rx queus - t4_sge_alloc_ctrl_txq() (if rdma rsp queues exists, tell uP to route ctrl queue compl to rdma rspq) - acquires the mutex_lock - allocates rdma response queues - if FULL_INIT_DONE set, tell uP to route ctrl queue compl to rdma rspq - relinquishes mutex_lock - acquires the mutex_lock - enable_rx() - set FULL_INIT_DONE - relinquishes mutex_lock This patch fixes the above issue. Fixes: e7519f9926f1('cxgb4: avoid enabling napi twice to the same queue') Signed-off-by: Raju Rangoju Acked-by: Steve Wise CC: Stable # 4.9+ Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 94d68594a7b4fd2eec457f22110de644e1c4ee57 Author: Kuppuswamy Sathyanarayanan Date: Mon Jun 5 12:08:06 2017 -0700 platform/x86: intel_bxtwc_tmu: Remove first level IRQ unmask Currently in WCOVE PMIC MFD driver, all second level IRQ chips are chained to the respective first level IRQs. So there is no need for explicitly unmasking the first level IRQ in this driver. This patches removes this level 1 IRQ unmask support. Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Darren Hart (VMware) Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/platform/x86/intel_bxtwc_tmu.c | 4 ---- 1 file changed, 4 deletions(-) commit 57129044f5044dcd73c22d91491906104bd331fd Author: Kuppuswamy Sathyanarayanan Date: Mon Jun 5 12:08:05 2017 -0700 mfd: intel_soc_pmic_bxtwc: Use chained IRQs for second level IRQ chips Whishkey cove PMIC has support to mask/unmask interrupts at two levels. At first level we can mask/unmask interrupt domains like TMU, GPIO, ADC, CHGR, BCU THERMAL and PWRBTN and at second level, it provides facility to mask/unmask individual interrupts belong each of this domain. For example, in case of TMU, at first level we have TMU interrupt domain, and at second level we have two interrupts, wake alarm, system alarm that belong to the TMU interrupt domain. Currently, in this driver all first level IRQs are registered as part of IRQ chip(bxtwc_regmap_irq_chip). By default, after you register the IRQ chip from your driver, all IRQs in that chip will masked and can only be enabled if that IRQ is requested using request_irq() call. This is the default Linux IRQ behavior model. And whenever a dependent device that belongs to PMIC requests only the second level IRQ and not explicitly unmask the first level IRQ, then in essence the second level IRQ will still be disabled. For example, if TMU device driver request wake_alarm IRQ and not explicitly unmask TMU level 1 IRQ then according to the default Linux IRQ model, wake_alarm IRQ will still be disabled. So the proper solution to fix this issue is to use the chained IRQ chip concept. We should chain all the second level chip IRQs to the corresponding first level IRQ. To do this, we need to create separate IRQ chips for every group of second level IRQs. In case of TMU, when adding second level IRQ chip, instead of using PMIC IRQ we should use the corresponding first level IRQ. So the following code will change from ret = regmap_add_irq_chip(pmic->regmap, pmic->irq, ...) to, virq = regmap_irq_get_virq(&pmic->irq_chip_data, BXTWC_TMU_LVL1_IRQ); ret = regmap_add_irq_chip(pmic->regmap, virq, ...) In case of Whiskey Cove Type-C driver, Since USBC IRQ is moved under charger level2 IRQ chip. We should use charger IRQ chip(irq_chip_data_chgr) to get the USBC virtual IRQ number. Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko Revieved-by: Heikki Krogerus Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_bxtwc.c | 168 ++++++++++++++++++++++++++++++------- drivers/usb/typec/typec_wcove.c | 2 +- include/linux/mfd/intel_soc_pmic.h | 5 +- 3 files changed, 143 insertions(+), 32 deletions(-) commit 5131f072e5bff3a6a1da6b8f4882b6747e8c2a49 Author: Kuppuswamy Sathyanarayanan Date: Mon Jun 5 12:08:04 2017 -0700 mfd: intel_soc_pmic_bxtwc: Utilize devm_* functions in driver probe Cleanup the resource allocation/free code in probe function by using devm_* calls. Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_bxtwc.c | 54 +++++++++++++------------------------- 1 file changed, 18 insertions(+), 36 deletions(-) commit a1d28c5991137f789162f412764dd7471aca6ec0 Author: Kuppuswamy Sathyanarayanan Date: Mon Jun 5 12:08:03 2017 -0700 mfd: intel_soc_pmic_bxtwc: Remove second level IRQ for gpio device Currently all PMIC GPIO domain IRQs are consumed by the same device(bxt_wcove_gpio), so there is no need to export them as separate interrupts. We can just export only the first level GPIO IRQ(BXTWC_GPIO_LVL1_IRQ) as an IRQ resource and let the GPIO device driver(bxt_wcove_gpio) handle the GPIO sub domain IRQs based on status value of GPIO level2 interrupt status register. Also, just using only the first level IRQ will eliminate the bug involved in requesting only the second level IRQ and not explicitly enable the first level IRQ. For more info on this issue please read the details at, https://lkml.org/lkml/2017/2/27/148 This patch also makes relevant change in Whiskey cove GPIO driver to use only first level PMIC GPIO IRQ. Signed-off-by: Kuppuswamy Sathyanarayanan Acked-by: Linus Walleij Acked-for-MFD-by: Lee Jones Signed-off-by: Lee Jones drivers/gpio/gpio-wcove.c | 14 +++++++++++++- drivers/mfd/intel_soc_pmic_bxtwc.c | 7 +------ 2 files changed, 14 insertions(+), 7 deletions(-) commit c4949630fe437bc15346abbd1a92dee8e80a85d4 Author: Kuppuswamy Sathyanarayanan Date: Mon Jun 5 12:08:02 2017 -0700 mfd: intel_soc_pmic_bxtwc: Remove thermal second level IRQs Since all second level thermal IRQs are consumed by the same device(bxt_wcove_thermal), there is no need to expose them as separate interrupts. We can just export only the first level IRQs for thermal and let the device(bxt_wcove_thermal) driver handle the second level IRQs based on thermal interrupt status register. Also, just using only the first level IRQ will eliminate the bug involved in requesting only the second level IRQ and not explicitly enable the first level IRQ. For more info on this issue please read the details at, https://lkml.org/lkml/2017/2/27/148 This patch also makes relevant change in bxt_wcove_thermal driver to use only first level PMIC thermal IRQ. Signed-off-by: Kuppuswamy Sathyanarayanan Acked-by: Zhang Rui Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_bxtwc.c | 32 ++++++++++++-------------------- drivers/thermal/intel_bxt_pmic_thermal.c | 2 +- 2 files changed, 13 insertions(+), 21 deletions(-) commit 4533d8551b7dc594f5d203c1dc6c1527a21ad61d Author: Kuppuswamy Sathyanarayanan Date: Mon Jun 5 12:08:01 2017 -0700 mfd: intel_soc_pmic_bxtwc: Fix TMU interrupt index TMU interrupts are registered as a separate interrupt chip, and hence it should start its interrupt index(BXTWC_TMU_IRQ) number from 0. But currently, BXTWC_TMU_IRQ is defined as part of enum bxtwc_irqs_level2 and its index value is 11. Since this index value is used when calculating .num_irqs of regmap_irq_chip_tmu, it incorrectly reports number of IRQs as 12 instead of actual value of 1. This patch fixes this issue by creating new enum of tmu IRQs and resetting its starting index to 0. Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_bxtwc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 89ff67718c900754d2aa5c8e37efbe607be36154 Author: Ganesh Goudar Date: Mon Jun 19 15:37:13 2017 +0530 cxgb4: add new T6 pci device id's Add 0x6082, 0x6083 and 0x6084 T6 device id's Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 3 +++ 1 file changed, 3 insertions(+) commit f27e7805ba6274dc544a8ad85490160c5b535955 Author: Arvind Yadav Date: Wed May 31 12:45:38 2017 +0530 i2c: at91: Fix compilation warning. Replace '%d' by '%zu' to fix the following type of compilation warnings: drivers/i2c/busses/i2c-at91.c:277:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=] dev_dbg(dev->dev, "wrote 0x%x, to go %d\n", *dev->buf, dev->buf_len); ^ Signed-off-by: Arvind Yadav Acked-by: Ludovic Desroches Tested-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-at91.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 56a6cb88657557edd84eabddd9f509d13b5b81c5 Author: Arvind Yadav Date: Wed May 31 12:27:44 2017 +0530 i2c: at91: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Also, add a missing clk_disable_unprepare(). Signed-off-by: Arvind Yadav Acked-by: Ludovic Desroches Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-at91.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5c8e3ab146de92800d516386cbb7040c90210b27 Author: Wolfram Sang Date: Sun May 28 11:30:45 2017 +0200 i2c: use proper name for the R-Car SoC It is 'R-Car', not 'RCar'. No code or binding changes, only descriptive text. Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 227855b95411572c3936228e8eb87f2688da2c03 Author: George Cherian Date: Thu May 25 11:42:15 2017 +0000 i2c: xlp9xx: Enable HWMON class probing for xlp9xx Set I2C_CLASS_HWMON for xlp9xx to enable automatic probing of BMC devices by the ipmi-ssif driver. Signed-off-by: George Cherian Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xlp9xx.c | 1 + 1 file changed, 1 insertion(+) commit 09a1de04d59870b34b2a8106671c7bdea4ca9a90 Author: Srinivas Pandruvada Date: Thu May 18 11:23:06 2017 +0300 i2c: i801: Add support for Intel Cannon Lake Added SMBUS PCI Ids for SMBUS for Cannon Lake PCH. Signed-off-by: Srinivas Pandruvada [jarkko.nikula@linux.intel.com: Add entries to Documentation and Kconfig. Cover Cannon Lake-H too] Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang Documentation/i2c/busses/i2c-i801 | 2 ++ drivers/i2c/busses/Kconfig | 2 ++ drivers/i2c/busses/i2c-i801.c | 8 ++++++++ 3 files changed, 12 insertions(+) commit adcc3f7cee29eb831f79f4ac7ba6a0fbce7ac936 Author: Jonathan Liu Date: Mon Jun 12 18:23:17 2017 +1000 scripts/mkcompile_h: Remove trailing spaces from compiler version Improves the output of "cat /proc/version" by getting rid of the trailing space at the end of the compiler version when the kernel is compiled using GCC. Signed-off-by: Jonathan Liu Signed-off-by: Masahiro Yamada scripts/mkcompile_h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40d24343a8926b6998a13d04aa54e04961d1f5ed Author: Nicholas Piggin Date: Tue Jun 13 23:05:57 2017 +1000 powerpc/64s/idle: Run latch switch is done with MSR[EE]=0 In the idle sleep/wake code we know that MSR[EE] is clear, so we can avoid 2 x mfmsr and 2 x mtmsr by calling the double-underscore versions of the run latch routines which assume interrupts are already disabled. Acked-by: Vaidyanathan Srinivasan Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 95acdc07124f329ef3088a9bc68af905804b2e6b Author: Nicholas Piggin Date: Tue Jun 13 23:05:52 2017 +1000 powerpc/64s/idle: Predict HMI wakeup as unlikely In a busy system, idle wakeups can be expected from IPIs and device interrupts. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d29250136f60438fc0839871bae0a0e9cbbd47e Author: Nicholas Piggin Date: Tue Jun 13 23:05:51 2017 +1000 powerpc/64s/idle: Avoid SRR usage in idle sleep/wake paths Idle code now always runs at the 0xc... effective address whether in real or virtual mode. This means rfid can be ditched, along with a lot of SRR manipulations. In the wakeup path, carry SRR1 around in r12. Use mtmsrd to change MSR states as required. This also balances the return prediction for the idle call, by doing blr rather than rfid to return to the idle caller. On POWER9, 2-process context switch on different cores, with snooze disabled, increases performance by 2%. Signed-off-by: Nicholas Piggin [mpe: Incorporate v2 fixes from Nick] Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 1 + arch/powerpc/kernel/idle_book3s.S | 57 ++++++++++++++++----------------- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 12 +++++-- 3 files changed, 38 insertions(+), 32 deletions(-) commit b51351e264009e890936af83b8d800b32034273d Author: Nicholas Piggin Date: Tue Jun 13 23:05:50 2017 +1000 powerpc/64s/idle: Branch to handler with virtual mode offset Have the system reset idle wakeup handlers branched to in real mode with the 0xc... kernel address applied. This allows simplifications of avoiding rfid when switching to virtual mode in the wakeup handler. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 13 +++++++++++++ arch/powerpc/kernel/exceptions-64s.S | 6 ++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit b48bbb82e2b83537c500417d60218ad44446e572 Author: Nicholas Piggin Date: Tue Jun 13 23:05:49 2017 +1000 powerpc/64s: Don't unbalance the return branch predictor in __replay_interrupt() The __replay_interrupt() code is branched to with bl, but the caller is returned to directly with rfid from the interrupt. Instead, rfid to a stub that returns to the caller with blr, which should keep the return branch predictor balanced. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a9af97aa0a12c30178dd7ad9af8887d5b9c4647b Author: Nicholas Piggin Date: Tue Jun 13 23:05:48 2017 +1000 powerpc/64s: msgclr when handling doorbell exceptions from system reset msgsnd doorbell exceptions are cleared when the doorbell interrupt is taken. However if a doorbell exception causes a system reset interrupt wake from power saving state, the message is not cleared. Processing the doorbell from the system reset interrupt requires msgclr to avoid taking the exception again. Testing this plus the previous wakup direct patch gives: original wakeup direct msgclr Different threads, same core: 315k/s 264k/s 345k/s Different cores: 235k/s 242k/s 242k/s Net speedup is +10% for same core, and +3% for different core. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/dbell.h | 13 +++++++++++++ arch/powerpc/include/asm/ppc-opcode.h | 3 +++ arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/exceptions-64s.S | 23 +++++++++++++++++++++-- 4 files changed, 38 insertions(+), 2 deletions(-) commit 771d4304d07f080b6ce751e12f3579cb012a1b22 Author: Nicholas Piggin Date: Tue Jun 13 23:05:47 2017 +1000 powerpc/64s/idle: Process interrupts from system reset wakeup When the CPU wakes from low power state, it begins at the system reset interrupt with the exception that caused the wakeup encoded in SRR1. Today, powernv idle wakeup ignores the wakeup reason (except a special case for HMI), and the regular interrupt corresponding to the exception will fire after the idle wakeup exits. Change this to replay the interrupt from the idle wakeup before interrupts are hard-enabled. Test on POWER8 of context_switch selftests benchmark with polling idle disabled (e.g., always nap, giving cross-CPU IPIs) gives the following results: original wakeup direct Different threads, same core: 315k/s 264k/s Different cores: 235k/s 242k/s There is a slowdown for doorbell IPI (same core) case because system reset wakeup does not clear the message and the doorbell interrupt fires again needlessly. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hw_irq.h | 1 + arch/powerpc/kernel/irq.c | 29 +++++++++++++++++++++++++++++ arch/powerpc/platforms/powernv/idle.c | 10 ++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) commit 2525db04d1cc53e1951143d1829aa75a78cc7f76 Author: Nicholas Piggin Date: Tue Jun 13 23:05:46 2017 +1000 powerpc/powernv: Simplify lazy IRQ handling in CPU offline Rather than concern ourselves with any soft-mask logic in the CPU hotplug handler, just hard disable interrupts. This ensures there are no lazy-irqs pending, which means we can call directly to idle instruction in order to sleep. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 23 +++++++++++++++-------- arch/powerpc/platforms/powernv/smp.c | 29 ++++++++++++++--------------- 2 files changed, 29 insertions(+), 23 deletions(-) commit 2201f994a5742c03e660623c385fd6897dd1fa2f Author: Nicholas Piggin Date: Tue Jun 13 23:05:45 2017 +1000 powerpc/64s/idle: Move soft interrupt mask logic into C code This simplifies the asm and fixes irq-off tracing over sleep instructions. Also move powersave_nap check for POWER8 into C code, and move PSSCR register value calculation for POWER9 into C. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hw_irq.h | 3 ++ arch/powerpc/include/asm/machdep.h | 1 + arch/powerpc/include/asm/processor.h | 10 ++-- arch/powerpc/kernel/idle_book3s.S | 82 ++++++-------------------------- arch/powerpc/kernel/irq.c | 33 ++++++++++++- arch/powerpc/platforms/powernv/idle.c | 71 ++++++++++++++++++++++++--- arch/powerpc/platforms/powernv/smp.c | 2 - arch/powerpc/platforms/powernv/subcore.c | 3 +- drivers/cpuidle/cpuidle-powernv.c | 12 ++--- 9 files changed, 128 insertions(+), 89 deletions(-) commit 5e2feac330953fe75197aecb20c781400e2bf606 Author: Kuninori Morimoto Date: Fri Jun 16 01:41:20 2017 +0000 arm64: renesas: salvator-common: sound clock-frequency needs descending order It will be used ADG clock initial settings, and will be sound codec's initial system clock which needs maximum clock frequency. Thus, descending order is required Fixes: d37d2b3c0ec2708a ("arm64: dts: salvator-x: add 12288000 for sound ADG") Fixes: 0b03c32db03d63de ("arm64: dts: r8a7795: salvator-x: Add support for R-Car H3 ES2.0") Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ddb8e1743cdde5ce01234cb1c563f601086b5e3 Author: Daniel Vetter Date: Mon Jun 19 09:31:38 2017 +0200 drm/i915: Update DRIVER_DATE to 20170619 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0591bc2360152f851e29246884805bb77a2c3b9d Author: Ruslan Bilovol Date: Sun Jun 18 16:23:54 2017 +0300 usb: gadget: add f_uac1 variant based on a new u_audio api This patch adds a new function 'f_uac1' (f_uac1 with virtual "ALSA card") that uses recently created u_audio API. Comparing to legacy f_uac1 function implementation it doesn't require any real Audio codec to be present on the device. In f_uac1 audio streams are simply sinked to and sourced from a virtual ALSA sound card created using u_audio API. Legacy f_uac1 approach is to write audio samples directly to existing ALSA sound card f_uac1 approach is more generic/flexible one - create an ALSA sound card that represents USB Audio function and allows to be used by userspace application that may choose to do whatever it wants with the data received from the USB Host and choose to provide whatever it wants as audio data to the USB Host. f_uac1 also has capture support (gadget->host) thanks to easy implementation via u_audio. By default, capture interface has 48000kHz/2ch configuration, same as playback channel has. f_uac1 descriptors naming convention uses f_uac2 driver naming convention that makes it more common and meaningful. Comparing to f_uac1_legacy, the f_uac1 doesn't have volume/mute functionality. This is because the f_uac1 volume/mute feature unit was dummy implementation since that driver creation (2009) and never had any real volume control or mute functionality, so there is no any difference here. Since f_uac1 functionality, exposed interface to userspace (virtual ALSA card), input parameters are so different comparing to f_uac1_legacy, that there is no any reason to keep them in the same file/module, and separate function was created. g_audio can be built using one of existing UAC functions (f_uac1, f_uac1_legacy or f_uac2) Signed-off-by: Ruslan Bilovol Signed-off-by: Felipe Balbi Documentation/ABI/testing/configfs-usb-gadget-uac1 | 14 + Documentation/usb/gadget-testing.txt | 44 ++ drivers/usb/gadget/Kconfig | 25 +- drivers/usb/gadget/function/Makefile | 2 + drivers/usb/gadget/function/f_uac1.c | 802 +++++++++++++++++++++ drivers/usb/gadget/function/u_uac1.h | 41 ++ drivers/usb/gadget/legacy/Kconfig | 18 +- drivers/usb/gadget/legacy/audio.c | 69 +- 8 files changed, 1000 insertions(+), 15 deletions(-) commit d355339eecd986648420e05f8c958fbc78dbb382 Author: Ruslan Bilovol Date: Sun Jun 18 16:23:53 2017 +0300 usb: gadget: function: make current f_uac1 implementation legacy Before introducing new f_uac1 function (with virtual ALSA card) make current implementation legacy. This includes renaming of existing files, some variables, config options and documentation Signed-off-by: Ruslan Bilovol Signed-off-by: Felipe Balbi Documentation/ABI/testing/configfs-usb-gadget-uac1 | 12 - .../ABI/testing/configfs-usb-gadget-uac1_legacy | 12 + Documentation/usb/gadget-testing.txt | 9 +- drivers/usb/gadget/Kconfig | 8 +- drivers/usb/gadget/function/Makefile | 4 +- drivers/usb/gadget/function/f_uac1.c | 1020 ------------------- drivers/usb/gadget/function/f_uac1_legacy.c | 1021 ++++++++++++++++++++ drivers/usb/gadget/function/u_uac1.c | 314 ------ drivers/usb/gadget/function/u_uac1.h | 82 -- drivers/usb/gadget/function/u_uac1_legacy.c | 315 ++++++ drivers/usb/gadget/function/u_uac1_legacy.h | 82 ++ drivers/usb/gadget/legacy/Kconfig | 6 +- drivers/usb/gadget/legacy/audio.c | 26 +- 13 files changed, 1457 insertions(+), 1454 deletions(-) commit eb9fecb9e69b0be8c267c55b0bb52a08e8fb6bee Author: Ruslan Bilovol Date: Sun Jun 18 16:23:52 2017 +0300 usb: gadget: f_uac2: split out audio core Abstract the peripheral side ALSA sound card code from the f_uac2 function into a component that can be called by various functions, so the various flavors can be split apart and selectively reused. Visible changes: - add uac_params structure to pass audio paramteres for g_audio_setup - make ALSA sound card's name configurable - add [in/out]_ep_maxpsize - allocate snd_uac_chip structure during g_audio_setup - add u_audio_[start/stop]_[capture/playback] functions Signed-off-by: Ruslan Bilovol Signed-off-by: Felipe Balbi drivers/usb/gadget/Kconfig | 4 + drivers/usb/gadget/function/Makefile | 1 + drivers/usb/gadget/function/f_uac2.c | 718 ++++------------------------------ drivers/usb/gadget/function/u_audio.c | 662 +++++++++++++++++++++++++++++++ drivers/usb/gadget/function/u_audio.h | 95 +++++ drivers/usb/gadget/legacy/Kconfig | 1 + 6 files changed, 845 insertions(+), 636 deletions(-) commit 7158b57a495635c04507d986117ae26b2eb5e4e5 Author: Ruslan Bilovol Date: Sun Jun 18 16:23:51 2017 +0300 usb: gadget: f_uac2: remove platform driver/device creation Simplify f_uac2 by removing platform driver/device creation; use composite's usb_gadget device as parent for sound card and for debug prints. This removes extra layer of code without any functional change. Signed-off-by: Ruslan Bilovol Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_uac2.c | 107 +++++++++-------------------------- 1 file changed, 28 insertions(+), 79 deletions(-) commit 1fc4926d92b9515b44f35b339bab5d2ca474a723 Author: Ruslan Bilovol Date: Sun Jun 18 00:23:58 2017 +0300 usb: gadget: function: f_uac1: implement get_alt() After commit 7e4da3fcf7c9 ("usb: gadget: composite: Test get_alt() presence instead of set_alt()") f_uac1 function became broken because it doesn't have get_alt() callback implementation and composite framework never set altsetting 1 for audiostreaming interface. On host site it looks like: [424339.017711] 21:1:1: usb_set_interface failed (-32) Since host can't set altsetting 1, it can't start playing audio. In order to fix it implemented get_alt along with minor improvements (error conditions checking) similar to what existing f_uac2 has. Cc: Krzysztof Opasiak Signed-off-by: Ruslan Bilovol Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_uac1.c | 40 +++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit d423b9657f27c0e7de514a8bce8bb71a31a7549b Author: Alexandre Belloni Date: Fri Jun 16 13:30:18 2017 +0200 usb: gadget: udc: atmel: Remove unnecessary macros commit 46ddd79e893b ("usb: gadget: udc: atmel: Remove AVR32 bits from the driver") left the accessor macros introduced by commit a3dd3befd7cb ("usb: gadget: atmel_usba: use endian agnostic IO on ARM"). They can now be removed. Signed-off-by: Alexandre Belloni Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 4 ++-- drivers/usb/gadget/udc/atmel_usba_udc.h | 16 ++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) commit c8e4e5bdb62a5ac6f860ebcaaf7b467b62f453f1 Author: Srinath Mannam Date: Thu Jun 15 14:39:22 2017 +0530 usb: gadget: bdc: 64-bit pointer capability check Corrected the register to check the 64-bit pointer capability state. 64-bit pointer implementation capability was checking in wrong register, which causes the BDC enumeration failure in 64-bit memory address. Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC") Reviewed-by: Florian Fainelli Signed-off-by: Srinath Mannam Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/bdc/bdc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88d58ef891d868303acd7951cb1282c911f736ac Author: Corentin LABBE Date: Tue Jun 6 15:44:16 2017 +0200 crypto: engine - replace pr_xxx by dev_xxx By adding a struct device *dev to struct engine, we could store the device used at register time and so use all dev_xxx functions instead of pr_xxx. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu crypto/crypto_engine.c | 23 +++++++++++++---------- include/crypto/engine.h | 1 + 2 files changed, 14 insertions(+), 10 deletions(-) commit cf3f9609c9b2f36760f8181d11b8085c357c27ee Author: Gilad Ben-Yossef Date: Mon Jun 5 08:33:43 2017 +0300 crypto: testmgr - use consistent format for errors Fix inconsistent format and spelling in hash tests error messages. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/testmgr.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit b1a4b182c1a529a19c600fa4e9b1c44fa44132bc Author: Colin Ian King Date: Sun Jun 4 19:29:20 2017 +0100 crypto: brcm - fix spelling mistake: "fallbck" -> "fallback" Trivial fix to spelling mistake in flow_log message Signed-off-by: Colin Ian King Reviewed-by: Steve Lin Signed-off-by: Herbert Xu drivers/crypto/bcm/cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 049655499e2ecc4d7d3920da44f117e091a2240b Author: Antoine Ténart Date: Thu Jun 1 21:39:03 2017 +0200 crypto: sun4i-ss - fix large block size support The run-time self-tests fail quite early, as soon as the input block size is larger than 64 bytes: alg: hash: Test 4 failed for sha1-sun4i-ss 00000000: b9 c9 1e 52 c0 26 d8 39 81 ff f2 3c 99 b1 27 b2 00000010: 30 d6 c9 85 One thing to notice is the value of the last word, which is the one expected (it can sometime be the last two words). The datasheet isn't very clear about when the digest is ready to retrieve and is seems the bit SS_DATA_END is cleared when the digest was computed *but* that doesn't mean the digest is ready to retrieve in the registers. A ndelay(1) is added before reading the computed digest to ensure it is available in the SS_MD[] registers. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 0d9c68a9bfc7259f847704f28c64549fc4078aa2 Author: Antoine Ténart Date: Thu Jun 1 21:39:02 2017 +0200 crypto: sun4i-ss - add the CRYPTO_ALG_KERN_DRIVER_ONLY flag The CRYPTO_ALG_KERN_DRIVER_ONLY flag is set for hardware accelerated ciphers accessible through a kernel driver only. This is the case for ciphers exposed by the sun4i-ss driver. This patch sets this flag. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-core.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 317cbacf720c35c3c47e9d167c1946fa144a1e07 Author: Antoine Ténart Date: Thu Jun 1 21:39:01 2017 +0200 crypto: sun4i-ss - move from ablkcipher to skcipher API Update the sun4i-ss driver to use the skcipher API instead of the old ablkcipher one. It's a bit more tricky than s/ablkcipher/skcipher/, but still nothing special and the driver's logic stays the same. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 189 ++++++++++++------------- drivers/crypto/sunxi-ss/sun4i-ss-core.c | 222 +++++++++++++++--------------- drivers/crypto/sunxi-ss/sun4i-ss.h | 34 ++--- 3 files changed, 221 insertions(+), 224 deletions(-) commit d78867a94ea74b8d2dafdbf370e0707f37a58f4a Author: Antoine Ténart Date: Thu Jun 1 21:39:00 2017 +0200 crypto: sun4i-ss - use GENMASK to generate masks Use the GENMASK helper instead of custom calculations to generate masks, It also helps the readability. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 303391d69b6ae7dff30f7886b717e39f47067d6d Author: Antoine Ténart Date: Thu Jun 1 21:38:59 2017 +0200 crypto: sun4i-ss - simplify the appended bit assignment A bit is appended at the end of the input buffer for sha1. Simplify the code assigning it. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 214a9bd0f8dec468de6a32f445c540f786773ee8 Author: Antoine Ténart Date: Thu Jun 1 21:38:58 2017 +0200 crypto: sun4i-ss - simplify the pad length calculation When sending the last block of data to the engine, it should be padded so that the total length of the request can be given to the engine as the last 2 words of the last 64 bytes block. Simplify the calculation of this pad offset. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 7e6df1f7a3a5f379b04eee177be0571beb32b811 Author: Antoine Ténart Date: Thu Jun 1 21:38:57 2017 +0200 crypto: sun4i-ss - do not dynamically set parts of the last buffer to 0 Parts of the bf buffer were dynamically set to 0. Change this to set the whole buffer to 0 by default to avoid any mistake. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0f52ddaed6500d0b74fcaf5568726068d385129f Author: Antoine Ténart Date: Thu Jun 1 21:38:56 2017 +0200 crypto: sun4i-ss - cannot use DMA is the request is 0 length Do not use DMA is the request is 0 length. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11be0107ab1a893121ff31325e1bf82d843ea4dc Author: Antoine Ténart Date: Thu Jun 1 21:38:55 2017 +0200 crypto: sun4i-ss - use lower/upper_32_bits helpers Replace custom bit shifts and masks with lower/upper_32_bits helpers. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a595e60a70c0d035b5a088f90ae3fde475c7e755 Author: Antoine Ténart Date: Thu Jun 1 21:38:54 2017 +0200 crypto: sun4i-ss - remove conditional checks against 0 Cosmetic clean up if conditional checks on 0s values. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 28 +++++++++++----------- drivers/crypto/sunxi-ss/sun4i-ss-core.c | 10 ++++---- drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 40 +++++++++++++++---------------- 3 files changed, 39 insertions(+), 39 deletions(-) commit e3f9490e89c2240f87c6d040575cdc11dd405afc Author: Antoine Ténart Date: Thu Jun 1 21:38:53 2017 +0200 crypto: sun4i-ss - group variable definitions in sun4i_hash() Cosmetic change to avoid having a full screen a variable definitions. It also helps to see which variables share the same type. Signed-off-by: Antoine Tenart Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit 17bc093e18a6e7c453ebbfff81c74531e7933897 Merge: 67a87a9 cc7a938 Author: Olof Johansson Date: Sun Jun 18 23:12:36 2017 -0700 Merge tag 'at91-4.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/soc Bring in the fixes branch to avoid a merge conflict between new SoC options and the build fix adding CONFIG_AMR_CPU_SUSPEND. Fixes for 4.12: Fix two compilation issues * tag 'at91-4.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: at91: select CONFIG_ARM_CPU_SUSPEND memory: atmel-ebi: mark PM ops as __maybe_unused Signed-off-by: Olof Johansson commit c72358571aaadf46755d3e38f671233a7dd48f00 Author: Karim Eshapa Date: Sat May 13 21:05:19 2017 +0200 crypto: algapi - Use pr_err common logging style. Use more common error logging style. Signed-off-by: Karim Eshapa Signed-off-by: Herbert Xu crypto/algapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea644b8ca44b9fcbb41c58e1d51a0c8cdad0a61b Author: Kamil Konieczny Date: Fri May 12 17:38:02 2017 +0200 crypto: doc - Fixed bugs, added example usage of calc_hash(). - Fixed bugs in example for shash and rng (added missing "*" and " *"). - Corrected pr_info() in calc_hash(). - Added example usage of calc_hash(). - No need for negate PTR_ERR to get error code, as crypto_alloc_rng already returns negative values like ERR_PTR(-ENOMEM). Fixed. Signed-off-by: Kamil Konieczny Signed-off-by: Herbert Xu Documentation/crypto/api-samples.rst | 38 ++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) commit 8270f5d799c946d7636ef317eff990830d2fe89f Author: Dan Carpenter Date: Wed May 10 08:52:26 2017 +0300 crypto: glue_helper - Delete some dead code We checked (nbytes < bsize) inside the loops so it's not possible to hit the "goto done;" here. This code is cut and paste from other slightly different loops where we don't have the check inside the loop. Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu arch/x86/crypto/glue_helper.c | 3 --- 1 file changed, 3 deletions(-) commit fa598d0a7026219461a1ad76e27117ce325fa0e4 Author: Eric Biggers Date: Tue May 9 17:20:27 2017 -0700 crypto: aes_ti - fix comment for MixColumns step mix_columns() contains a comment which shows the matrix used by the MixColumns step of AES, but the last entry in this matrix was incorrect Signed-off-by: Herbert Xu crypto/aes_ti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9162917fafd36690491af35a262e628c2ffd8a7 Author: Geliang Tang Date: Sat May 6 23:35:29 2017 +0800 crypto: mediatek - drop .owner field in mtk_crypto_driver Drop .owner field in mtk_crypto_driver, since platform_driver_register() will set it automatically. Signed-off-by: Geliang Tang Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-platform.c | 1 - 1 file changed, 1 deletion(-) commit 10d82222d9411dcc0ebcb11ca110597246696af4 Author: George Cherian Date: Thu May 4 11:34:46 2017 +0000 crypto: cavium - Add more algorithms Add more algorithm support for the driver. Add support for ecb(aes), cfb(aes) and ecb(des3_ede). Signed-off-by: George Cherian Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptvf_algs.c | 81 ++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit e2eb769ed0bdc06cb523f475db411ce3a5f1c465 Author: George Cherian Date: Thu May 4 11:34:45 2017 +0000 crypto: cavium - Remove the individual encrypt/decrypt function for each algorithm Remove the individual encrypt/decrypt function for easch algorithm. This is in prepration of adding more crypto algorithms supported by hardware. While at that simplify create_ctx_hdr/create_input_list function interfaces. Signed-off-by: George Cherian Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptvf_algs.c | 153 ++++++++++++++++----------------- drivers/crypto/cavium/cpt/cptvf_algs.h | 7 ++ 2 files changed, 83 insertions(+), 77 deletions(-) commit cc53e92ab36fdadfc9ecf97ff6f711691f49d3a1 Author: George Cherian Date: Thu May 4 11:34:44 2017 +0000 crypto: cavium - Downgrade the annoying misc interrupt print from dev_err to dev_dbg Mailbox interrupt is common and it is not an error interrupt. So downgrade the print from dev_err to dev_dbg. Signed-off-by: George Cherian Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptvf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d1fb19668207b66bc54f8e10fa91a2fcff061e4 Author: pjambhlekar Date: Wed May 3 09:32:09 2017 +0530 crypto: ccp - return NULL instead of 0 This change is to handle sparse warning. Return type of function is a pointer to the structure and it returns 0. Instead it should return NULL. Signed-off-by: Pushkar Jambhlekar Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3cdbe346ed3f380eae1cb3e9febfe703e7d8a7b0 Author: Gary R Hook Date: Tue May 2 17:33:40 2017 -0500 crypto: ccp - Add debugfs entries for CCP information Expose some data about the configuration and operation of the CCP through debugfs entries: device name, capabilities, configuration, statistics. Allow the user to reset the counters to zero by writing (any value) to the 'stats' file. This can be done per queue or per device. Changes from V1: - Correct polarity of test when destroying devices at module unload Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/Makefile | 3 +- drivers/crypto/ccp/ccp-debugfs.c | 345 +++++++++++++++++++++++++++++++++++++++ drivers/crypto/ccp/ccp-dev-v5.c | 28 +++- drivers/crypto/ccp/ccp-dev.c | 2 +- drivers/crypto/ccp/ccp-dev.h | 20 +++ 5 files changed, 395 insertions(+), 3 deletions(-) commit 03d2c5114c95797c0aa7d9f463348b171a274fd4 Author: Martin Hicks Date: Tue May 2 09:38:35 2017 -0400 crypto: talitos - Extend max key length for SHA384/512-HMAC and AEAD An updated patch that also handles the additional key length requirements for the AEAD algorithms. The max keysize is not 96. For SHA384/512 it's 128, and for the AEAD algorithms it's longer still. Extend the max keysize for the AEAD size for AES256 + HMAC(SHA512). Cc: # 3.6+ Fixes: 357fb60502ede ("crypto: talitos - add sha224, sha384 and sha512 to existing AEAD algorithms") Signed-off-by: Martin Hicks Acked-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 125370a9288fcc5ca09d64942fed44f73277c6c3 Merge: de9761a 6db5337 Author: Olof Johansson Date: Sun Jun 18 23:09:48 2017 -0700 Merge tag 'imx-defconfig-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/defconfig The i.MX defconfig updates for 4.13: - Enable i.MX7 ADC driver support. - Enable THERMAL_WRITABLE_TRIPS, so that i.MX thermal driver can set trip points for testing. - CONFIG_DEBUG_FS gets lost by accident because of a change around CONFIG_RCU_TRACE. Re-enable it explicitly. - Enable MXS LRADC driver and CONFIG_CGROUPS for mxs_defconfig. - Enable more common cpufreq governors to help test cpufreq driver. * tag 'imx-defconfig-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Select CONFIG_IMX7D_ADC ARM: imx_v6_v7_defconfig: Set THERMAL_WRITABLE_TRIPS=y for testing ARM: imx_v6_v7_defconfig: Explicitly restore CONFIG_DEBUG_FS ARM: mxs_defconfig: Re-enable MXS LRADC ARM: mxs_defconfig: Enable CONFIG_CGROUPS ARM: imx_v6_v7_defconfig: Enable cpufreq governors Signed-off-by: Olof Johansson commit b87a08f962f4dbaeb8f975fffd882e74aa2b5c02 Merge: 4623e69 375b675 Author: Olof Johansson Date: Sun Jun 18 23:07:59 2017 -0700 Merge tag 'imx-dt64-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64 The Freescale arm64 device tree updates for 4.13: - A series from NXP employee Li Yang that updates the copyright claims to comply with company policy. - A patch-set from Madalin Bucur that adds Data Path Acceleration Architecture (DPAA) QBMan and FMan. Quite a few .dtsi files are created for SoCs with different DPAA configuration to include the devices as needed. - Enable UHS-I SD and eMMC support for LS1046A and LS208xA RDB/QDS boards. - Enable TMU device for thermal management support on LS1088A. - Update SATA device node for LS1088A with correct compatible and ECC register bit. - A few small random device tree updates. * tag 'imx-dt64-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (22 commits) arm64: dts: ls1088a: update sata node dt-bindings: ahci-fsl-qoriq: add ls1088a chip name to the list arm64: dts: ls1012a: Add coreclk arm64: dts: ls1046a: Add dis_rxdet_inp3_quirk property to USB3 node arm64: dts: ls208xa: disable SD UHS-I modes by default on RDB arm64: dts: ls1043a: Add generic compatible string for I2C EEPROM arm64: dts: add LS1046A DPAA FMan nodes arm64: dts: add LS1043A DPAA FMan support arm64: dts: add DPAA FMan nodes arm64: dts: add LS1046A DPAA QBMan nodes arm64: dts: add LS1043A DPAA QBMan nodes arm64: dts: add DPAA QBMan portals arm64: dts: ls1088a: Add TMU device tree support arm64: dts: ls1088a: update the sata node arm64: dts: Add flash node for ls1088a qds and rdb arm64: dts: ls1088a: add esdhc node arm64: dts: ls1012a: add eSDHC nodes arm64: dts: ls208xa: support SD UHS-I on RDB and eMMC HS200 on QDS arm64: dts: ls1046a: support SD UHS-I and eMMC HS200 on RDB mmc: dt: add compatible into eSDHC required properties ... Signed-off-by: Olof Johansson commit 2cb6115deba000ee97359dc6cc85ad92ebb0bdaa Merge: ae1d266 d8710c3 Author: Olof Johansson Date: Sun Jun 18 23:06:36 2017 -0700 Merge tag 'imx-dt-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt The i.MX device tree updates for 4.13: - New board support: Gateworks Ventana GW5600, Technexion Pico i.MX7D Board. - A series from Alexandre Belloni to correct the vendor prefix for rv4162 compatible. - A patch-set from Andrey Smirnov ot enable PCIe support for i.MX7 and imx7d-sdb board. - Increase the SGTL5000 LRCLK pad strength to fix a random audio channel swapping seen on imx6qdl-wandboard and imx6qdl-colibri boards. - Clean up non-existing property 'enable-active-low' from fixed regulator device nodes. - Correct GPIO polarity for Ethernet PHY and PCI reset lines, even though device drivers do not use the polarity for now. - Add Wifi and Bluetooth support for imx7d-sdb board. - Adopt the i.MX6Q/DL DT to the new and more flexible GPC binding. - Update zii-rdu2 device tree source to use #include "..." for local inclusion. - A series from Philipp Zabel and Steve Longerbeam to enable video capture support for imx6qdl platforms. - A number of small random updates on various board support. * tag 'imx-dt-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (47 commits) ARM: dts: imx6q-cm-fx6: add sdio wifi/bt nodes ARM: dts: ls1021a: update the clockgen node ARM: dts: imx6-sabreauto: add the ADV7180 video decoder ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b ARM: dts: imx6-sabreauto: create i2cmux for i2c3 ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors ARM: dts: imx6qdl-sabrelite: remove erratum ERR006687 workaround ARM: dts: imx6qdl: add capture-subsystem device ARM: dts: imx6qdl: Add video multiplexers, mipi_csi, and their connections ARM: dts: imx6qdl: Add compatible, clocks, irqs to MIPI CSI-2 node ARM: dts: imx6qdl: add multiplexer controls ARM: dts: imx6: Fix PCI GPIO reset polarity ARM: dts: imx7d-sdb: Add Bluetooth support ARM: dts: imx7d-sdb: Add Wifi support ARM: dts: imx7d-sdb: Adjust the regulator nodes ARM: dts: imx: Fix Ethernet PHY reset polarity ARM: dts: imx7: Fix typo in watchdog pin name ARM: dts: vf610-zii: Add switch eeprom-length properties ... Signed-off-by: Olof Johansson commit 67a87a94f9c8a7bf776a04821158b0c7913a5284 Merge: 5a55029 bf5a01d Author: Olof Johansson Date: Sun Jun 18 23:06:06 2017 -0700 Merge tag 'imx-soc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc The i.MX SoC updates for 4.13: - Select GPCv2 for i.MX7 SoCs to get imx-gpcv2 irqchip driver built for i.MX7 platforms by default. - A couple of patches from Leonard to add IMX6ULL cpu check and get suspend/resume work on IMX6ULL. * tag 'imx-soc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx6ull: Make suspend/resume work like on 6ul ARM: imx: Add MXC_CPU_IMX6ULL and cpu_is_imx6ull ARM: imx: Select GPCv2 for i.MX7 Signed-off-by: Olof Johansson commit 2f1b526e83a618521a00618e4b8986dd3ade0b8d Merge: a32e6a3 c465a32 Author: Olof Johansson Date: Sun Jun 18 23:05:10 2017 -0700 Merge tag 'imx-drivers-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/drivers The i.MX drivers update for 4.13: - Add CONFIG_HAVE_IMX_GPC to control the build of GPC driver, so that it doesn't build for platforms that do not have it. * tag 'imx-drivers-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: gpc: build gpc only if hardware has gpc Signed-off-by: Olof Johansson commit 4623e69d1ccf6ba84d8295ea2da01d20ce5c5b8b Merge: 5d518c8 f66b2af Author: Olof Johansson Date: Sun Jun 18 22:59:47 2017 -0700 Merge tag 'mvebu-dt64-4.13-1' of git://git.infradead.org/linux-mvebu into next/dt64 mvebu dt64 for 4.13 (part 1) - Improve the mcbin support (Armada 8040 based board): add sdhci and the second 1G port - Improve crypro nodes description on Aramda 7K/8K - Use new binding for ap806 clocks - Improve mdio nodes and add xmdio on Aramda 7K/8K - Add second SGCI node on Armada 37xx - Improve the description of the Armada 3720 DB board * tag 'mvebu-dt64-4.13-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: add xmdio nodes for 7k/8k arm64: dts: marvell: add a comment on the cp110 slave node status arm64: dts: marvell: remove cpm crypto nodes from dts files arm64: dts: marvell: cp110: enable the crypto engine at the SoC level arm64: dts: marvell: armada-3720-db: Add vqmmc regulator for SD slot arm64: dts: marvell: Enable second SDHCI controller in Armada 37xx arm64: dts: marvell: armada-37xx: Use angle bracket for each register set arm64: dts: marvell: armada-37xx: Align the compatible string arm64: dts: marvell: armada-3720-db: Add information about the V2 board arm64: dts: marvell: armada-3720-db: Sort the dts node alphabetically arm64: dts: marvell: disable the mdio nodes by default arm64: dts: marvell: explicitly enable the mdio nodes for 7k/8k DB arm64: dts: marvell: add dma-mask in crypto nodes for 7k/8k arm64: dts: marvell: 8040-mcbin: Enable 1GB Ethernet arm64: dts: marvell: cp110: add required clocks for mdio interface arm64: dts: marvell: use new binding for the system controller on ap806 arm64: dts: marvell: remove clock-output-names on ap806 arm64: dts: marvell: add second 1G port on the Armada 8040 DB arm64: dts: marvell: mcbin: add sdhci arm64: dts: marvell: add clocks for Armada AP806 XOR engines Signed-off-by: Olof Johansson commit ae1d266305f5da054a29589634ab7d21c295439d Merge: c9487f0 97800cf Author: Olof Johansson Date: Sun Jun 18 22:58:00 2017 -0700 Merge tag 'mvebu-dt-4.13-1' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt for 4.13 (part 1) - Add Linksys WRT3200ACM (Rango) support - Add PWM properties for gpio on Aramda XP and 38x - A couple of minor updates for the 98dx3236 and 98dx4251 * tag 'mvebu-dt-4.13-1' of git://git.infradead.org/linux-mvebu: ARM: dts: turris-omnia: Add generic compatible string for I2C EEPROM ARM: dts: mvebu: add support for Linksys WRT3200ACM (Rango) ARM: dts: armada-385-linksys: fixup button node names ARM: dts: armada-385-linksys: group pins in pinctrl ARM: dts: armada-385-linksys: partition layout is board specific ARM: dts: armada-385-linksys: use binary unit prefixes ARM: dts: armada-385-linksys: drop legacy DSA bindings ARM: dts: armada-385-linksys: usb3 label cleanup ARM: dts: armada-385-linksys: bm pools by label order ARM: dts: armada-385-linksys: drop redundant properties in dependants ARM: dts: armada-385-linksys: flatten dependants ARM: dts: armada-385-linksys: label nodes ARM: dts: armada-385-linksys: flatten dtsi ARM: dts: mvebu: disable the rtc on 98dx3236 SoC ARM: dts: mvebu: add missing interrupt to 98dx4251 switch ARM: dts: armada-xp: Use pwm-fan rather than gpio-fan ARM: dts: mvebu: Add PWM properties for armada-38x ARM: dts: mvebu: Add PWM properties to .dtsi files Signed-off-by: Olof Johansson commit de9761ad4e599216ecaa9f3a373369453dd7837f Merge: 3414b86 4cdcf1e Author: Olof Johansson Date: Sun Jun 18 22:56:48 2017 -0700 Merge tag 'mvebu-defconfig-4.13-1' of git://git.infradead.org/linux-mvebu into next/defconfig mvebu defconfig for 4.13 Enable the SENSORS_PWM_FAN in mvebu_v7_defconfig support by gpio driver since the previous release * tag 'mvebu-defconfig-4.13-1' of git://git.infradead.org/linux-mvebu: ARM: mvebu: Enable SENSORS_PWM_FAN in defconfig Signed-off-by: Olof Johansson commit c9487f03875a229ee37528ab4e84ce543b25d57c Merge: 1161a0d bc03ce0 Author: Olof Johansson Date: Sun Jun 18 22:54:10 2017 -0700 Merge tag 'at91-ab-4.13-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/dt DT for 4.13 - Switch to the new NAND binding - A few non urgent fixes * tag 'at91-ab-4.13-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: sama5d2_xplained: remove wrong memory node ARM: dts: at91: sama5d2_xplained: add pwm controller ARM: dts: at91: Add the NOR flash available on sama5d3 dev kits ARM: dts: at91: Switch to the new NAND bindings ARM: dts: at91: Declare EBI/NAND controllers dt-bindings: mtd: atmel-nand: Document the nfc-io bindings ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags dts: gpio_atmel: adapt binding doc to reality ARM: dts: at91: sama5d2: add m_can nodes ARM: dts: at91: Add generic compatible string for I2C EEPROM Signed-off-by: Olof Johansson commit 5a55029f46d636ffed430d47c7fc1bfa0e64a3b6 Merge: 5168357 8a3d809 Author: Olof Johansson Date: Sun Jun 18 22:53:20 2017 -0700 Merge tag 'at91-ab-4.13-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/soc SoC for 4.13: - New suspend/resume mode for sama5d2 - Initial support for armv7m based SoCs * tag 'at91-ab-4.13-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: at91: remove atmel_nand_data ARM: at91: fix at91_suspend_entering_slow_clock link error ARM: at91: debug: add samv7x support ARM: at91: add armv7m SoC detection ARM: at91: handle CONFIG_PM for armv7m configurations ARM: at91: Add armv7m support ARM: at91: Document armv7m compatibles ARM: at91: Documentation: add armv7m families ARM: at91: pm: fallback to slowclock when backup mode fails ARM: at91: pm: allow selecting standby and suspend modes ARM: at91: pm: Add sama5d2 backup mode Signed-off-by: Olof Johansson commit 516835714ae25b35fe8c894b976c873f7d8f7acb Merge: 6a5ba72 fd8cf82 Author: Olof Johansson Date: Sun Jun 18 22:52:14 2017 -0700 Merge tag 'renesas-soc-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Renesas ARM Based SoC Updates for v4.13 * Use GENPD_FLAG_ALWAYS_ON in pm-rmobile * tag 'renesas-soc-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ALWAYS_ON Signed-off-by: Olof Johansson commit a32e6a353dac8641dcdc25854d2c64134839c07f Merge: 8c5c250 980532a Author: Olof Johansson Date: Sun Jun 18 22:51:43 2017 -0700 Merge tag 'renesas-rcar-sysc-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Renesas ARM Based SoC R-Car SYSC Updates for v4.13 Use GENPD_FLAG_ALWAYS_ON in R-Car SYSC driver * tag 'renesas-rcar-sysc-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON Signed-off-by: Olof Johansson commit 1161a0d50a0253ff92e649578f1af688ca9bd1ba Merge: 878e917 521ec12 Author: Olof Johansson Date: Sun Jun 18 22:50:49 2017 -0700 Merge tag 'renesas-dt-bindings2-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Second Round of Renesas ARM Based SoC DT Bindings Updates for v4.13 * Document: - Add Renesas H3-based Salvator-XS board DT bindings - Add iW-RainboW-G20D-Qseven-RZG1M board - Add iW-RainboW-G20M-Qseven-RZG1M system on module - Update R-Car Gen3 ULCB board part numbers * Add clock bit definitions for r7s72100 SoC * tag 'renesas-dt-bindings2-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: Document Renesas H3-based Salvator-XS board DT bindings ARM: shmobile: Update R-Car Gen3 ULCB board part numbers ARM: shmobile: document iW-RainboW-G20D-Qseven-RZG1M board ARM: shmobile: document iW-RainboW-G20M-Qseven-RZG1M system on module ARM: dts: r7s72100: add clock bit definitions Signed-off-by: Olof Johansson commit 878e91731527b7c385aaa954c482ad9c7b751b73 Merge: bf671ec f7d569c Author: Olof Johansson Date: Sun Jun 18 22:49:57 2017 -0700 Merge tag 'renesas-dt2-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Second Round of Renesas ARM Based SoC DT Updates for v4.13 Cleanup: * Correct PCI bus dtc warnings for r8a779x SoCs Enhancements: * Add support for iWave G20D-Q7 board based on RZ/G1M SoC * Add support for GR-Peach board based on r7s72100 SoC * Add composite video and HDMI input to gose board * tag 'renesas-dt2-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: r8a779x: Fix PCI bus dtc warnings ARM: dts: iwg20d-q7: Add support for iWave G20D-Q7 board based on RZ/G1M ARM: dts: iwg20m: Add iWave RZG1M Qseven SOM ARM: dts: gose: add composite video input ARM: dts: r7s72100: Add support for GR-Peach ARM: dts: gose: add HDMI input Signed-off-by: Olof Johansson commit 8c5c25067044b7bcb2201e761483ef4cacc970d8 Merge: 43e68aa 8be381a Author: Olof Johansson Date: Sun Jun 18 22:45:08 2017 -0700 Merge tag 'renesas-drivers-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Renesas ARM Based SoC Drivers Updates for v4.13 * Rework Kconfig and Makefile logic * tag 'renesas-drivers-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: Rework Kconfig and Makefile logic Signed-off-by: Olof Johansson commit 5d518c8aa3513d59576e26a6612bf6385cdee164 Merge: 9d03b29 4d1255e Author: Olof Johansson Date: Sun Jun 18 22:40:59 2017 -0700 Merge tag 'renesas-arm64-dt2-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt64 Second Round of Renesas ARM64 Based SoC DT Updates for v4.13 * Add reset control properties for audio to r9a779[56] SoCs * Add add DMA for IIC_DVFS to r9a779[56] SoCs * Add support for Salvator-XS and H3ULCB with R-Car H3 (r8a7795) ES2 * Add missing index to PWM pinctrl subnode name to Salvator-X board * Add 12288000 for sound ADG to Salvator-X and ULCB boards * tag 'renesas-arm64-dt2-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: r8a7796: Add reset control properties for audio arm64: dts: r8a7795: Add reset control properties for audio arm64: dts: renesas: Add support for Salvator-XS with R-Car H3 ES2.0 arm64: dts: renesas: Add common Salvator-XS board support arm64: dts: renesas: Extract common Salvator-X/XS board support arm64: dts: salvator-x: Add missing index to PWM pinctrl subnode name arm64: dts: r8a7795: h3ulcb: Add support for R-Car H3 ES2.0 arm64: dts: r8a7796: add DMA for IIC_DVFS arm64: dts: r8a7795: add DMA for IIC_DVFS arm64: dts: ulcb: add 12288000 for sound ADG arm64: dts: salvator-x: add 12288000 for sound ADG Signed-off-by: Olof Johansson commit e4140e649e5a7b48b7ae7a4fc01ab5f18ff1d1b1 Merge: 77b0611 b27866e Author: Olof Johansson Date: Sun Jun 18 22:40:28 2017 -0700 Merge tag 'renesas-arm64-defconfig-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/arm64 Renesas ARM64 Based SoC Defconfig Updates for v4.13 * Enable Simple Sound Card support * tag 'renesas-arm64-defconfig-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: defconfig: enable Simple Sound Card support Signed-off-by: Olof Johansson commit 3414b86354985a339bba54f0bf47e061b9077740 Merge: afa0e3f 0f286c4 Author: Olof Johansson Date: Sun Jun 18 22:38:37 2017 -0700 Merge tag 'at91-ab-4.13-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/defconfig defconfig for 4.13: - Switch sama5 to be tickless in idle and enable hrtimer - Add MCAN * tag 'at91-ab-4.13-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: configs: at91: add MCAN driver to sama5_defconfig ARM: configs: at91: enable HIGH_RES_TIMERS ARM: configs: at91: make system tickless when idle Signed-off-by: Olof Johansson commit 6a5ba7267f221068045410ccb5bb26bb9133684e Merge: f7b2211 7b87fe9 Author: Olof Johansson Date: Sun Jun 18 22:38:05 2017 -0700 Merge tag 'qcom-soc-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/soc Qualcomm ARM Based SoC Updates for v4.13 * Add debug UART addresses for IPQ4019 * tag 'qcom-soc-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: debug: qcom: add UART addresses to Kconfig help for IPQ4019 Signed-off-by: Olof Johansson commit bf671ec65a11e87464b5bfcf4b41b0d23ec5e751 Merge: 5088774 cff9488 Author: Olof Johansson Date: Sun Jun 18 22:37:31 2017 -0700 Merge tag 'qcom-dts-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Qualcomm Device Tree Changes for v4.13 * Fix IPQ4019 i2c0 node * Add GSBI7 on IPQ8064 * Add misc APQ8060 devices * Fixup USB related devices on APQ8064 and MSM8974 * tag 'qcom-dts-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: dts: add core I2C devices to the APQ8060 Dragonboard ARM: dts: add GSBI8 defines to the MSM8660 family ARM: dts: Qualcomm APQ8060 DragonBoard ALS sensor ARM: dts: add XOADC and IIO HWMON to MSM8660/APQ8060 ARM: dts: qcom: ipq4019: fix i2c_0 node ARM: dts: qcom: add gsbi7 serial to ipq8064 SoC device tree ARM: dts: qcom-apq8064: Collapse usb support into one node ARM: dts: qcom-msm8974: Add HS usb node and OTG detection mechanisms ARM: dts: qcom: add charger otg regulator ARM: dts: qcom: Remove s4/5vs1,2 from RPM pm8941 control Signed-off-by: Olof Johansson commit afa0e3fe34c7c6060f8879b5cc26d57a41ceebaf Merge: f8a2608 1d91753 Author: Olof Johansson Date: Sun Jun 18 22:29:29 2017 -0700 Merge tag 'qcom-defconfig-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/defconfig Qualcomm ARM Based defconfig Updates for v4.13 * Enable IPQ4019 clock and pinctrl * tag 'qcom-defconfig-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: qcom_defconfig: Enable IPQ4019 clock and pinctrl Signed-off-by: Olof Johansson commit 9d03b29694638a61879fcaddcdf8992d00cc9dcc Merge: e4b79c3 20afb8e Author: Olof Johansson Date: Sun Jun 18 22:28:48 2017 -0700 Merge tag 'qcom-arm64-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt64 Qualcomm ARM64 Updates for v4.13 * Fix APQ8016 SBC WLAN LED * Add MSM8996 CPU node * Add MSM8992 SMEM and fixed regulator * Fixup MSM8916 USB support * tag 'qcom-arm64-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: apq8016-sbc: Correct WLAN LED default-trigger arm64: dts: msm8996: Add CPU clock controller node arm64: dts: smem enablement for msm8992 arm64: dts: msm8992 add fixed regulator arm64: dts: qcom: Collapse usb support into one node Signed-off-by: Olof Johansson commit 579006944e0d675361e987c646b83d2d1725966c Author: Paul Mackerras Date: Tue May 16 16:41:20 2017 +1000 KVM: PPC: Book3S HV: Virtualize doorbell facility on POWER9 On POWER9, we no longer have the restriction that we had on POWER8 where all threads in a core have to be in the same partition, so the CPU threads are now independent. However, we still want to be able to run guests with a virtual SMT topology, if only to allow migration of guests from POWER8 systems to POWER9. A guest that has a virtual SMT mode greater than 1 will expect to be able to use the doorbell facility; it will expect the msgsndp and msgclrp instructions to work appropriately and to be able to read sensible values from the TIR (thread identification register) and DPDES (directed privileged doorbell exception status) special-purpose registers. However, since each CPU thread is a separate sub-processor in POWER9, these instructions and registers can only be used within a single CPU thread. In order for these instructions to appear to act correctly according to the guest's virtual SMT mode, we have to trap and emulate them. We cause them to trap by clearing the HFSCR_MSGP bit in the HFSCR register. The emulation is triggered by the hypervisor facility unavailable interrupt that occurs when the guest uses them. To cause a doorbell interrupt to occur within the guest, we set the DPDES register to 1. If the guest has interrupts enabled, the CPU will generate a doorbell interrupt and clear the DPDES register in hardware. The DPDES hardware register for the guest is saved in the vcpu->arch.vcore->dpdes field. Since this gets written by the guest exit code, other VCPUs wishing to cause a doorbell interrupt don't write that field directly, but instead set a vcpu->arch.doorbell_request flag. This is consumed and set to 0 by the guest entry code, which then sets DPDES to 1. Emulating reads of the DPDES register is somewhat involved, because it requires reading the doorbell pending interrupt status of all of the VCPU threads in the virtual core, and if any of those VCPUs are running, their doorbell status is only up-to-date in the hardware DPDES registers of the CPUs where they are running. In order to get a reasonable approximation of the current doorbell status, we send those CPUs an IPI, causing an exit from the guest which will update the vcpu->arch.vcore->dpdes field. We then use that value in constructing the emulated DPDES register value. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 2 + arch/powerpc/include/asm/ppc-opcode.h | 2 + arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kvm/book3s_hv.c | 133 ++++++++++++++++++++++++++++++-- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 17 ++++ arch/powerpc/kvm/powerpc.c | 9 ++- 6 files changed, 153 insertions(+), 11 deletions(-) commit 3c313524605a6afd8207448a8e9967f5e8cba734 Author: Paul Mackerras Date: Mon Feb 6 13:24:41 2017 +1100 KVM: PPC: Book3S HV: Allow userspace to set the desired SMT mode This allows userspace to set the desired virtual SMT (simultaneous multithreading) mode for a VM, that is, the number of VCPUs that get assigned to each virtual core. Previously, the virtual SMT mode was fixed to the number of threads per subcore, and if userspace wanted to have fewer vcpus per vcore, then it would achieve that by using a sparse CPU numbering. This had the disadvantage that the vcpu numbers can get quite large, particularly for SMT1 guests on a POWER8 with 8 threads per core. With this patch, userspace can set its desired virtual SMT mode and then use contiguous vcpu numbering. On POWER8, where the threading mode is "strict", the virtual SMT mode must be less than or equal to the number of threads per subcore. On POWER9, which implements a "loose" threading mode, the virtual SMT mode can be any power of 2 between 1 and 8, even though there is effectively one thread per subcore, since the threads are independent and can all be in different partitions. Signed-off-by: Paul Mackerras Documentation/virtual/kvm/api.txt | 15 ++++++++ arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/include/asm/kvm_ppc.h | 2 ++ arch/powerpc/kvm/book3s_hv.c | 71 +++++++++++++++++++++++++++++++------ arch/powerpc/kvm/powerpc.c | 13 ++++++- 5 files changed, 90 insertions(+), 12 deletions(-) commit b64052fc9bcb4fa3ca8701e74c1aac0e2847b724 Author: Pablo Cascón Date: Thu Jun 15 16:22:15 2017 -0700 nfp: add VLAN filtering support Add general use per-vNIC mailbox area and use it for VLAN filtering support. Initially proto is hardcoded to 802.1q. Signed-off-by: Pablo Cascón Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 74 +++++++++++++++++++++- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 27 ++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) commit 769377f77ca2087baeaf97ce0b7026abeba3b581 Author: Paul Mackerras Date: Wed Feb 15 14:30:17 2017 +1100 KVM: PPC: Book3S HV: Context-switch HFSCR between host and guest on POWER9 This adds code to allow us to use a different value for the HFSCR (Hypervisor Facilities Status and Control Register) when running the guest from that which applies in the host. The reason for doing this is to allow us to trap the msgsndp instruction and related operations in future so that they can be virtualized. We also save the value of HFSCR when a hypervisor facility unavailable interrupt occurs, because the high byte of HFSCR indicates which facility the guest attempted to access. We save and restore the host value on guest entry/exit because some bits of it affect host userspace execution. We only do all this on POWER9, not on POWER8, because we are not intending to virtualize any of the facilities controlled by HFSCR on POWER8. In particular, the HFSCR bit that controls execution of msgsndp and related operations does not exist on POWER8. The HFSCR doesn't exist at all on POWER7. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kvm/book3s_hv.c | 10 ++++++++++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 17 ++++++++++++++++- 4 files changed, 28 insertions(+), 1 deletion(-) commit 1da4e2f4fbd99f3fbf4275fc89617ffd671af95d Author: Paul Mackerras Date: Fri May 19 16:26:16 2017 +1000 KVM: PPC: Book3S HV: Don't let VCPU sleep if it has a doorbell pending It is possible, through a narrow race condition, for a VCPU to exit the guest with a H_CEDE hypercall while it has a doorbell interrupt pending. In this case, the H_CEDE should return immediately, but in fact it puts the VCPU to sleep until some other interrupt becomes pending or a prod is received (via another VCPU doing H_PROD). This fixes it by checking the DPDES (Directed Privileged Doorbell Exception Status) bit for the thread along with the other interrupt pending bits. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit f8a26083ec10d5ca14551e62bbfbfd34b0fd2296 Merge: 29b5f29 82cc56c Author: Olof Johansson Date: Sun Jun 18 21:03:10 2017 -0700 Merge tag 'davinci-for-v4.13/defconfig-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/defconfig Enable mtdtests and USB NCM gadget in DaVinci kernel (as modules). * tag 'davinci-for-v4.13/defconfig-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: enable USB CDC NCM gadget ARM: davinci_all_defconfig: enable mtdtests Signed-off-by: Olof Johansson commit f7b22111c7de28c24d939b8db33380c42bd8ed7e Merge: da82480 231ce27 Author: Olof Johansson Date: Sun Jun 18 21:02:46 2017 -0700 Merge tag 'davinci-for-v4.13/soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc A patch to fix warnings resulting from DT conversion of VPIF driver. * tag 'davinci-for-v4.13/soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: fix const warnings Signed-off-by: Olof Johansson commit d427caee5a3f04938f47bec6fdec97a52668ee53 Author: Ganesh Goudar Date: Fri Jun 16 15:36:09 2017 +0530 cxgb4: fix a NULL dereference Avoid NULL dereference in setup_sge_queues() when the adapter is in non offload mode. Fixes: 0fbc81b3ad51 ('chcr/cxgb4i/cxgbit/RDMA/cxgb4: Allocate resources dynamically for all cxgb4 ULD's') Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e4b79c3b6b24173ccc2873abd249dcf3ea3f2011 Merge: 010da09 475d99f Author: Olof Johansson Date: Sun Jun 18 21:02:19 2017 -0700 Merge tag 'tegra-for-4.13-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt64 arm64: tegra: Device tree changes for v4.13-rc1 This adds the CCPLEX cluster on Tegra186, which is used to initiate CPU frequency and voltage transitions. Also included is a bit of cleanup for PCI related device tree content, in preparation for a future DTC release that has additional checks for the PCI bus. * tag 'tegra-for-4.13-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: dts: nvidia: fix PCI bus dtc warnings arm64: tegra: Add CCPLEX_CLUSTER area in Tegra186 Signed-off-by: Olof Johansson commit 1bc3fe818c9e823248f6ec299b1c518aa2df347c Author: Paul Mackerras Date: Mon May 22 16:55:16 2017 +1000 KVM: PPC: Book3S HV: Enable guests to use large decrementer mode on POWER9 This allows userspace (e.g. QEMU) to enable large decrementer mode for the guest when running on a POWER9 host, by setting the LPCR_LD bit in the guest LPCR value. With this, the guest exit code saves 64 bits of the guest DEC value on exit. Other places that use the guest DEC value check the LPCR_LD bit in the guest LPCR value, and if it is set, omit the 32-bit sign extension that would otherwise be done. This doesn't change the DEC emulation used by PR KVM because PR KVM is not supported on POWER9 yet. This is partly based on an earlier patch by Oliver O'Halloran. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 2 +- arch/powerpc/kvm/book3s_hv.c | 6 ++++++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 29 ++++++++++++++++++++++++----- arch/powerpc/kvm/emulate.c | 4 ++-- 4 files changed, 33 insertions(+), 8 deletions(-) commit 5088774b8fd052fde39ab3321b8cab2f734facd9 Merge: 0d81776 508d690 Author: Olof Johansson Date: Sun Jun 18 21:01:58 2017 -0700 Merge tag 'tegra-for-4.13-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt ARM: tegra: Device tree changes for v4.13-rc1 This removes support for the Whistler board, which only a handful of people ever had access to and which doesn't provide any features over other Tegra20 devices that we support. Also this cleans up some PCI related device tree content in preparation for a future DTC release that has additional checks for the PCI bus. * tag 'tegra-for-4.13-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: dts: tegra: fix PCI bus dtc warnings ARM: tegra: remove Whistler support Signed-off-by: Olof Johansson commit 43e68aa7b58f0f2d9abb79ca03c397f4f00d9238 Merge: f39b24e cd30712 Author: Olof Johansson Date: Sun Jun 18 21:01:15 2017 -0700 Merge tag 'tegra-for-4.13-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers firmware: tegra: Changes for v4.13-rc1 This contains a fix for missing semaphore release in error paths as well as a bogus error code return in the BPMP firmware implementation. * tag 'tegra-for-4.13-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Fix locking bugs in BPMP Signed-off-by: Olof Johansson commit f39b24e0b4d812da9658033621d3992959ae6d32 Merge: 93c452f da1dbec Author: Olof Johansson Date: Sun Jun 18 21:01:02 2017 -0700 Merge tag 'tegra-for-4.13-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers soc/tegra: Changes for v4.13-rc1 This contains an implementation of generic PM domains for Tegra186, based on the BPMP powergate request. * tag 'tegra-for-4.13-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: flowctrl: Fix error handling soc/tegra: bpmp: Implement generic PM domains soc/tegra: bpmp: Update ABI header PM / Domains: Allow overriding the ->xlate() callback Signed-off-by: Olof Johansson commit 010da09e267d1a2dd219385a3d12a8776d100399 Merge: 2003c78 0cf6a8e Author: Olof Johansson Date: Sun Jun 18 20:56:42 2017 -0700 Merge tag 'hisi-arm64-dt-for-4.13-v2' of git://github.com/hisilicon/linux-hisi into next/dt64 ARM64: DT: Hisilicon SoC DT updates for 4.13 - Add and update Hi3660-Hikey960 board, Hi3660 PCIe RC, Hi6421v530 MFD and Hi3660 MMC binding - Add and refine devices support for Hi3660-Hikey 960 including clock, reset, I2C, GPIO, UART, Bluetooth, RTC, Power Key, LED, SPI, timer, PMIC, regulator, sd/sdio and WiFi - Add k3-dma and i2s/hdmi audio support based on audio-card-graph method for Hikey board * tag 'hisi-arm64-dt-for-4.13-v2' of git://github.com/hisilicon/linux-hisi: (21 commits) arm64: dts: hi6220: Add k3-dma and i2s/hdmi audio support arm64: dts: hi3660-hikey960: add nodes for WiFi arm64: dts: hi3660: add sd/sdio device nodes dt-bindings: mmc: dw_mmc-k3: add document of hi3660 mmc arm64: dts: hikey960: add device node for pmic and regulators dt-bindings: mfd: hi6421: Add hi6421v530 compatible string arm64: dts: hisi: add kirin pcie node dt-bindings: PCI: hisi: Add document for PCIe of Kirin SoCs arm64: dts: hi3660: add sp804 timer node arm64: dts: hi3660: add spi device nodes arm64: dts: hikey960: add LED nodes arm64: dts: hi3660: add power key dts node arm64: dts: hi3660: Add pl031 rtc node arm64: dts: hikey960: add WL1837 Bluetooth device node arm64: dts: hi3660: Add uarts nodes arm64: dts: hi3660: add gpio dtsi file for Hisilicon Hi3660 SOC arm64: dts: Add I2C nodes for Hi3660 arm64: dts: hi3660: add resources for clock and reset arm64: dts: hikey960: pinctrl: add more pinmux and pinconfig arm64: dts: hisilicon: update compatible string for hikey960 ... Signed-off-by: Olof Johansson commit 2003c78b3cfaf752d1301b8dd15a27803624ea86 Merge: b69cfb5 6806f2c Author: Olof Johansson Date: Sun Jun 18 20:55:51 2017 -0700 Merge tag 'juno-updates-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/dt64 ARMv8 Vexpress/Juno DT updates for v4.13 1. Adds support for Coresight CPU debug MMIO interface on all Juno variants. 2. Enables support for few SMMUs on Juno which were previously disabled waiting for IOMMU-backed DMA API support to be stabilised. * tag 'juno-updates-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: enable some SMMUs arm64: dts: juno: add coresight CPU debug nodes Signed-off-by: Olof Johansson commit c4ee5d8103ed78502170e9f0c22dc31cb335c412 Author: Prasad Kanneganti Date: Sun Jun 18 05:04:11 2017 -0700 liquidio: replace info-pointer mode with buffer-pointer-only mode Each Octeon output ring can DMA packets to host memory in two modes: info- pointer mode and buffer-pointer-only mode. In info-pointer mode, Octeon takes two buffer pointers for each packet and places the length of the packet along with specified number of bytes from the beginning of the packet into one buffer and the rest of the packet in a separate buffer. In buffer-pointer-only mode, Octeon takes single buffer pointer and places the length of the packet at the beginning of the buffer followed by the packet data. This patch switches all Octeon output rings from info-pointer mode to buffer-pointer-only mode. This results in fewer DMA setups and cache line snoops. Signed-off-by: Prasad Kanneganti Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller .../ethernet/cavium/liquidio/cn23xx_pf_device.c | 10 +++--- .../ethernet/cavium/liquidio/cn23xx_vf_device.c | 7 ++-- .../net/ethernet/cavium/liquidio/cn66xx_device.c | 8 ++--- drivers/net/ethernet/cavium/liquidio/lio_main.c | 7 ++-- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 5 +-- .../net/ethernet/cavium/liquidio/liquidio_common.h | 2 ++ .../net/ethernet/cavium/liquidio/octeon_config.h | 13 ++------ .../net/ethernet/cavium/liquidio/octeon_device.c | 10 +++--- drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 37 ++++++---------------- drivers/net/ethernet/cavium/liquidio/octeon_droq.h | 18 ++--------- .../net/ethernet/cavium/liquidio/octeon_network.h | 29 ----------------- 11 files changed, 37 insertions(+), 109 deletions(-) commit 93c452f5d396175b4bfbc989e379c47761af7271 Merge: 8c2f8a2 c0f2e21 Author: Olof Johansson Date: Sun Jun 18 20:55:07 2017 -0700 Merge tag 'scpi-updates-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers SCPI update for v4.13 Adds support to get DVFS transition latency and OPP for any device whose DVFS are managed by SCPI. This avoids code duplication in both cpufreq and devfreq SCPI drivers. * tag 'scpi-updates-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: cpufreq: scpi: use new scpi_ops functions to remove duplicate code firmware: arm_scpi: add support to populate OPPs and get transition latency Signed-off-by: Olof Johansson commit 47b3e2f701b93c57abcb3ba1f9f2041abd6b9147 Author: Christos Gkekas Date: Sun Jun 18 16:41:40 2017 +0100 pptp: Remove unused variable in pptp_release() Variable opt in pptp_release() is set but never used, thus needs to be removed. Signed-off-by: Christos Gkekas Signed-off-by: David S. Miller drivers/net/ppp/pptp.c | 2 -- 1 file changed, 2 deletions(-) commit 836d57e5c08e13bb206dcd559d96ee9355e8316e Author: Prasad Kanneganti Date: Sun Jun 18 12:41:34 2017 -0700 liquidio: implement vlan filter enable and disable Add implementation to support ethtool -K ethX rx-vlan-filter on/off. Rename OCTNET_CMD_ENABLE_VLAN_FILTER command to OCTNET_CMD_VLAN_FILTER_CTL and add OCTNET_CMD_VLAN_FILTER_ENABLE and OCTNET_CMD_VLAN_FILTER_DISABLE parameters so that it can be used to enable or disable the filter. Signed-off-by: Prasad Kanneganti Signed-off-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 10 +++++--- drivers/net/ethernet/cavium/liquidio/lio_main.c | 28 +++++++++++++++++----- .../net/ethernet/cavium/liquidio/liquidio_common.h | 4 +++- 3 files changed, 32 insertions(+), 10 deletions(-) commit da82480d453ef404b1ab0e0c449af2ab8282791b Merge: 2b1ee30 ce3de60 Author: Olof Johansson Date: Sun Jun 18 20:48:34 2017 -0700 Merge tag 'pxa-for-4.13' of https://github.com/rjarzmik/linux into next/soc This is the pxa changes for v4.13 cycle. This cycle is a minor fixes one, with : - Coccinelle found improvements - magician getting touchscreen driver support. * tag 'pxa-for-4.13' of https://github.com/rjarzmik/linux: ARM: pxa: Delete an error message for a failed memory allocation in pxa3xx_u2d_probe() ARM: pxa: Improve a size determination in pxa3xx_u2d_probe() ARM: pxa: Delete an error message for a failed memory allocation in pxa_pm_init() ARM: pxa: magician: Add support for ADS7846 touchscreen Signed-off-by: Olof Johansson commit 2b1ee3061f09bd90a5c659b9cb45fcbf49c5fd4c Merge: 6198c74 1df5eaa Author: Olof Johansson Date: Sun Jun 18 20:46:30 2017 -0700 Merge tag 'omap-for-v4.13/soc-v4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc SoC changes for omap variants for v4.13 merge window: - PM clean-up in preparation of adding am335x/am437x PM support - Fixes for issues found by Coccinelle - Legacy code removal now that everything boots in device tree only mode - Interconnect changes in preparation of moving clkctrl clocks to be managed by clkctrl clock driver - Interconnect changes to add omap4 crypto acceclerator support * tag 'omap-for-v4.13/soc-v4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (27 commits) ARM: OMAP4: hwmod_data: add SHAM crypto accelerator ARM: OMAP4: hwmod data: add des ARM: OMAP4: hwmod data: add aes2 ARM: OMAP4: hwmod data: add aes1 ARM: OMAP2+: Remove unused legacy code for n8x0 ARM: OMAP2+: Remove unused legacy code for watchdog ARM: OMAP2+: Remove unused legacy code for interconnects ARM: OMAP2+: Remove unused legacy code for PRM ARM: OMAP2+: Remove unused legacy code for io.c ARM: OMAP2+: Remove unused legacy code for McBSP ARM: OMAP2+: SmartReflex: Delete an error message for a failed memory allocation in two functions ARM: OMAP2+: Use kcalloc() in sr_set_nvalues() ARM: OMAP2+: Improve a size determination in sr_dev_init() ARM: OMAP2+: Delete an error message for a failed memory allocation in two functions ARM: OMAP2+: Remove unused legacy code for device init ARM: OMAP2+: Remove unused legacy code for PMU ARM: OMAP2+: Remove unused legacy code for opp ARM: OMAP2+: hwmod: populate clkctrl clocks for hwmods if available ARM: OMAP4: cminst: add support for clkdm_xlate_address ARM: omap2+: clockdomain: add clkdm_xlate_address ... Signed-off-by: Olof Johansson commit 0d817768c09baf1a71fd2ff8e146c1f869eef0a7 Merge: 4daea49 45f1d5e Author: Olof Johansson Date: Sun Jun 18 20:46:06 2017 -0700 Merge tag 'omap-for-v4.13/dt-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Second set of device tree changes for omaps for v4.13 merge window: - Updates for droid 4 proximity sensor, WLAN and battery - Configure clocks for remoteproc devices for omap5 and dra7 - Configure omap4 crypto accelerators * tag 'omap-for-v4.13/dt-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap4: add SHAM node ARM: dts: omap4: add aes2 instance ARM: dts: omap4.dtsi: remove aes[12]_fck ARM: dts: omap4: Fix aes entry ARM: dts: omap4-droid4: Configure CPCAP battery driver ARM: dts: dra7xx-clocks: Use DPLL_GPU for GPU clocks ARM: dts: dra7xx-clocks: Set IVA DPLL and its output clock rates ARM: dts: dra7xx-clocks: Set DSP DPLL and its output clock rates ARM: dts: dra7xx-clocks: Source IPU1 functional clock from CORE DPLL ARM: dts: omap54xx-clocks: Set IVA DPLL and its output clock rates ARM: dts: omap44xx-clocks: Set IVA DPLL and its output clock rates ARM: dts: omap4-droid4: Fix WLAN compatible ARM: dts: omap4-droid4: Add isl29030 ALS/proximity sensor Signed-off-by: Olof Johansson commit b69cfb5abfb271e7d7aa872b2dd0921089ae7349 Merge: 08d13c7 ea43d9b Author: Olof Johansson Date: Sun Jun 18 20:45:17 2017 -0700 Merge tag 'sunxi-dt-h5-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt64 Allwinner H5 DT changes for 4.13 Just like the H3, this is mostly about enabling the EMAC on the H5, and also has a new board, the Orange Pi Zero Plus 2 * tag 'sunxi-dt-h5-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: allwinner: h5: Add initial Orangepi Zero Plus 2 support arm64: allwinner: h5: enable dwmac-sun8i for Nano Pi NEO2 arm64: allwinner: h5: enable dwmac-sun8i for Orange Pi Prime arm64: allwinner: h5: sort the device nodes in / part for some boards arm64: allwinner: h5: add support for NanoPi NEO2 board arm64: allwinner: h5: add support for Orange Pi Prime board arm64: allwinner: orangepi-pc2: Enable dwmac-sun8i arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros Signed-off-by: Olof Johansson commit 4daea499411855fefe707631227fd69b622d4cc2 Merge: bcab84f 7a78ef9 Author: Olof Johansson Date: Sun Jun 18 20:43:28 2017 -0700 Merge tag 'sunxi-dt-h3-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner H3 changes for 4.13 This tag is about bringing the EMAC support to the H3 boards. * tag 'sunxi-dt-h3-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: sun8i: h3: Enable EMAC with external PHY on Orange Pi Plus 2E arm: sun8i: orangepi-zero: Enable dwmac-sun8i ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i ARM: sun8i: orangepi-plus: Enable dwmac-sun8i arm: sun8i: nanopi-neo: Enable dwmac-sun8i arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high arm: sun8i: orangepi-2: Enable dwmac-sun8i arm: sun8i: orangepi-one: Enable dwmac-sun8i arm: sun8i: orangepi-pc: Enable dwmac-sun8i arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros Signed-off-by: Olof Johansson commit 08d13c7028121e166cddb88466462595ec206d09 Merge: 0fd5e85 bdecc9c Author: Olof Johansson Date: Sun Jun 18 20:41:35 2017 -0700 Merge tag 'sunxi-dt64-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt64 Allwinner arm64 DT changes for 4.13 Our usual arm64 changes. The most notable things are the EMAC support and USB support enhancements. There's also support for the SoPine SoM, and the OrangePi Win. * tag 'sunxi-dt64-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support arm64: allwinner: a64: add device tree for SoPine with baseboard arm64: allwinner: bananapi-m64: Enable dwmac-sun8i arm64: allwinner: pine64-plus: Enable dwmac-sun8i arm64: allwinner: pine64: Enable dwmac-sun8i arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver arm64: allwinner: sun50i-a64: Add dt node for the syscon control module arm64: allwinner: a64: add DTSI file for SoPine SoM arm64: allwinner: a64: Convert CCU raw number references to macros arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl arm64: allwinner: a64: enable RSB on A64 arm64: dts: allwinner: pine64: Add remaining UART aliases arm64: dts: allwinner: a64: Add UART2 pin nodes arm64: allwinner: a64: enable EHCI0/OHCI0 for Pine64 arm64: allwinner: a64: add EHCI0/OHCI0 nodes to A64 DTSI Signed-off-by: Olof Johansson commit bcab84fb9f359dcb63fed625f6793750d619f04e Merge: ada0cc63 d5e9edf Author: Olof Johansson Date: Sun Jun 18 20:40:35 2017 -0700 Merge tag 'sunxi-dt-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner DT changes for 4.13 The usual chunk of patches. The most notable improvements are the power supplies improvements (battery and AC-IN), crypto support for the sun5i family, HDMI support for the A10s, plus a lot of new things for the V3S and the A83T. * tag 'sunxi-dt-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (47 commits) ARM: sun6i: a31s: primo81: Enable battery power supply ARM: sun6i: a31s: primo81: Change USB OTG to OTG mode ARM: sun8i: a83t: Add dt node for the syscon control module ARM: sun8i: a83t: Add device node for R_PIO ARM: sun8i: v3s: add device nodes for DE2 display pipeline ARM: dts: sunxi: add SoC specific compatibles for the crypto nodes ARM: sun5i: add a cryptographic engine node ARM: sun8i: a83t: Add device node for PRCM ARM: dts: sun8i: h3: Add initial NanoPi M1 Plus support ARM: dts: orange-pi-zero: add node for SPI NOR ARM: sun7i: a20: cubietruck: Tie AXP209's USB power supply to USB PHY ARM: sun6i: a31: hummingbird: Enable AXP221's ACIN power supply ARM: sun4i: a10: cubieboard: Enable AXP209's ACIN power supply ARM: sun7i: a20: bananapi-m1-plus: Enable AXP209's ACIN power supply ARM: sun7i: a20: cubieboard2: Enable AXP209's ACIN power supply ARM: sun7i: a20: cubieboard2: Move usb_otg node for alphabetical ordering ARM: sun8i: a83t: cubietruck-plus: Enable SPDIF output ARM: sun8i: a83t: cubietruck-plus: Add LED device nodes ARM: sun8i: a83t: Add device node for SPDIF transmitter ARM: sun8i: a83t: Add device node for DMA controller ... Signed-off-by: Olof Johansson commit 0fd5e8526771629e0bf969617fc8a6e40733487f Merge: 8aba614 27f87bd Author: Olof Johansson Date: Sun Jun 18 20:38:22 2017 -0700 Merge tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt64 Amlogic 64-bit DT changes for v4.13 - cleanup/reorganize alphabetically to better avoid conflicts - add HDMI and CVBS nodes for multiple boards - new pinctrl pins: SPI, HDMI CEC - SCPI: fix thermal sensor reporting New board support - NanoPi K2 (GXBB) - R-Box Pro (GXM) * tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (36 commits) ARM64: dts: meson-gxl-s905x-p212: Add HDMI and CVBS nodes ARM64: dts: meson-gxl-s905x-khadas-vim: Add HDMI nodes ARM64: dts: meson-gxl-s905d-p230: Add HDMI nodes ARM64: dts: meson-gxbb-wetek-play2: Add HDMI and CVBS Nodes ARM64: dts: meson-gx: Fix sensors reporting from SCP ARM64: dts: meson-gxl: Add SPI pinctrl nodes ARM64: dts: meson-gxbb: Add SPI pinctrl nodes ARM64: dts: meson-gxl: Add Ethernet PHY LEDS pins nodes ARM64: dts: meson-gxl: Add CEC pins nodes ARM64: dts: meson-gxbb: Add CEC pins nodes ARM64: dts: Fix GXBB periphs pinctrl pull-enable register base ARM64: dts: Fix GXL periphs pinctrl pull-enable register base ARM64: dts: meson-gxl: Fix pinctrl periphs gpio-ranges arm64: dts: amlogic: Add NanoPi K2 dt-bindings: arm: amlogic: Add NanoPi K2 arm64: dts: meson-gxm: Add R-Box Pro dt-bindings: arm: amlogic: Add R-Box Pro dt-bindings: Add Kingnovel vendor prefix arm64: dts: meson-gx-p23x-q20x: Fix node order arm64: dts: meson-gxm-nexbox-a1: Fix node order ... Signed-off-by: Olof Johansson commit ada0cc63dcf7a1137c7e51234021ea8f17506d20 Merge: 392366c 2c323c4 Author: Olof Johansson Date: Sun Jun 18 20:37:56 2017 -0700 Merge tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Amlogic 32-bit DT changes for v4.13: - minor reorganization to support different busses - add/use real clock controller * tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson8: add and use the real clock controller ARM: dts: meson: Extend L2 cache controller node for Meson8 and Meson8b ARM: dts: meson8b: inherit meson.dtsi from meson8b.dtsi ARM: dts: meson: organize devices in their corresponding busses Signed-off-by: Olof Johansson commit 77b0611f7754c78b703623c209d6efc2ceecc527 Merge: a91ca5e b4cb6f0 Author: Olof Johansson Date: Sun Jun 18 20:36:59 2017 -0700 Merge tag 'amlogic-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/arm64 Amlogic arm64 defconfig changes for v4.13 - enable meson SPICC as module - enable IR core, decoders and Meson IR device * tag 'amlogic-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: defconfig: enable meson SPICC as module ARM64: defconfig: enable IR core, decoders and Meson IR device Signed-off-by: Olof Johansson commit 6198c74939c085fbd31fab3ba6f1eb2ce2820b39 Merge: 92042d2 2dda2de Author: Olof Johansson Date: Sun Jun 18 20:36:21 2017 -0700 Merge tag 'amlogic-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/soc Amlogic SoC updates for v4.13 - enable the clock controller for 32-bit Meson8 * tag 'amlogic-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm: meson: select the clock controller for Meson8 Signed-off-by: Olof Johansson commit 92042d292d89c79a7c874dc706c2b96b81010cdd Merge: b9e44dd 764e4ef Author: Olof Johansson Date: Sun Jun 18 20:32:44 2017 -0700 Merge tag 'omap-for-v4.13/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc A series of omap1 changes for issues found by Coccinelle. * tag 'omap-for-v4.13/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: Fix a typo in a comment line ARM: OMAP1: Delete an error message for a failed memory allocation in omap1_dm_timer_init() ARM: OMAP1: DMA: Delete an unnecessary return statement in omap1_show_dma_caps() ARM: OMAP1: DMA: Delete an error message for a failed memory allocation in omap1_system_dma_init() ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init() Signed-off-by: Olof Johansson commit 392366c34c364e4cc20cb6a9967caf76b71e2fd0 Merge: 2a65ec8 0d7a2c3 Author: Olof Johansson Date: Sun Jun 18 20:31:59 2017 -0700 Merge tag 'gemini-v4.13-dts-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/dt Gemini DTS patches for v4.13, take 2: - Add DMA controller - Add PATA controller and SATA bridge * tag 'gemini-v4.13-dts-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: add Gemini PATA/SATA support ARM: dts: Add Gemini DMA controller Signed-off-by: Olof Johansson commit 8c2f8a2fb1248d5b8eda6271f095e7703fd133dd Merge: 7a699a8 1f6ab20 Author: Olof Johansson Date: Sun Jun 18 20:30:52 2017 -0700 Merge tag 'arm-soc/for-4.13/drivers' of http://github.com/Broadcom/stblinux into next/drivers This pull request contains Broadcom ARM/ARM64 SoCs specific driver changes for 4.13, please pull the following: - Doug adds support for the latest generation GISB bus arbiter (v7), he starts by fixing two issues in how registers are written, and how 64-bit addresses are captured and then he simplifies the error interception by using notifiers, which allows him to add support for ARM64 - Markus updates the SOC_BRCMSTB Kconfig depends to cover ARM64 and BMIPS_GENERIC systems where this code is now also used * tag 'arm-soc/for-4.13/drivers' of http://github.com/Broadcom/stblinux: soc: brcmstb: enable drivers for ARM64 and BMIPS bus: brcmstb_gisb: update to support new revision bus: brcmstb_gisb: enable driver for ARM64 architecture bus: brcmstb_gisb: remove low-level ARM hooks bus: brcmstb_gisb: add notifier handling bus: brcmstb_gisb: correct support for 64-bit address output bus: brcmstb_gisb: Use register offsets with writes too Signed-off-by: Olof Johansson commit 29b5f29894ac75570ae30cd9e0604d350fcc3412 Merge: 35a0a55 e4269eb Author: Olof Johansson Date: Sun Jun 18 20:29:37 2017 -0700 Merge tag 'arm-soc/for-4.13/defconfig' of http://github.com/Broadcom/stblinux into next/defconfig This pull request contains Broadcom ARM-based SoCs defconfig updates for 4.13, please pull the following: - Stefan updates the bcm2835_defconfig to include serial, Ethernet and USB gadget support which is needed for the Raspberry Pi Zero OTG changes * tag 'arm-soc/for-4.13/defconfig' of http://github.com/Broadcom/stblinux: ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support Signed-off-by: Olof Johansson commit e4fc0e50af8b65d6d936c528018415eb55e38933 Merge: 3325a5c a6adb15 Author: Olof Johansson Date: Sun Jun 18 20:25:28 2017 -0700 Merge tag 'arm-soc/for-4.13/maintainers' of http://github.com/Broadcom/stblinux into next/fixes-non-critical This pull request contains Broadcom ARM-based SoCs MAINTAINERS file updates for 4.13, please pull the following: - Eric updates the BCM283X section and removes Lee Jones who has not been active for over a year in the Raspberry Pi kernel development * tag 'arm-soc/for-4.13/maintainers' of http://github.com/Broadcom/stblinux: MAINTAINERS: Remove Lee Jones from bcm2835. Signed-off-by: Olof Johansson commit a91ca5e37614e2193efe36db09d12a76c37b50da Merge: 88e98d3 747868a Author: Olof Johansson Date: Sun Jun 18 20:19:30 2017 -0700 Merge tag 'arm-soc/for-4.13/defconfig-arm64' of http://github.com/Broadcom/stblinux into next/arm64 This pull request contains ARM64 defconfig changes for 4.13, please pull the following: - Florian enables ARCH_BRCMSTB in the arm64 defconfig to get more build coverage * tag 'arm-soc/for-4.13/defconfig-arm64' of http://github.com/Broadcom/stblinux: arm64: defconfig: Enable ARCH_BRCMSTB Signed-off-by: Olof Johansson commit 8aba614385fa72c8585ebb049e02656c14431037 Merge: d828e97 39b1aae Author: Olof Johansson Date: Sun Jun 18 20:18:44 2017 -0700 Merge tag 'arm-soc/for-4.13/devicetree-arm64' of http://github.com/Broadcom/stblinux into next/dt64 This pull request contains Broadcom ARM64-based SoCs Device Tree changes for 4.13. Please note the following from Eric: I've based this summary on the bcm2835-dt-next tag, to clarify what's in this patch series, but it does require being careful since it involves a cross-merge between branches. - Anup documents the Broadcom Stingray binding, common clocks, adds initial support for the Stingray DTSI and DTS files and adds support for the PL022, PL330 and SP805 - Sandeep adds the clock nodes to the Stingray Device Tree nodes - Pramod adds support for the NAND, pinctrl, GPIO to the Stingray Device Tree nodes - Oza adds I2C Device Tree nodes to the Stingray DTSes - Srinath adds PWM and SDHCI Device Tree nodes for the Stingray SoC - Ravijeta adds support for the USB Dual Role PHY on Northstar 2 - Gerd starts adding references to the sdhost and sdhci controllers, and then switches the sdcard to to use the SDHOST (faster than SDHCI) - Stefan defines the BCM2837 thermal coefficients in order for the Raspberry Pi thermal driver to work correctly * tag 'arm-soc/for-4.13/devicetree-arm64' of http://github.com/Broadcom/stblinux: arm64: dts: NS2: Add USB DRD PHY device tree node ARM64: dts: bcm2837: Define CPU thermal coefficients arm64: dts: Add PWM and SDHCI DT nodes for Stingray SOC arm64: dts: Add PL022, PL330 and SP805 DT nodes for Stingray arm64: dts: Add I2C DT nodes for Stingray SoC arm64: dts: Add GPIO DT nodes for Stingray SOC arm64: dts: Add pinctrl DT nodes for Stingray SOC arm64: dts: Add NAND DT nodes for Stingray SOC arm64: dts: Add clock DT nodes for Stingray SOC arm64: dts: Initial DTS files for Broadcom Stingray SOC dt-bindings: clk: Extend binding doc for Stingray SOC dt-bindings: bcm: Add Broadcom Stingray bindings document ARM: dts: bcm283x: switch from &sdhci to &sdhost arm64: dts: bcm2837: add &sdhci and &sdhost ARM: dts: bcm283x: Add CPU thermal zone with 1 trip point ARM: dts: Add devicetree for the Raspberry Pi 3, for arm32 (v6) Signed-off-by: Olof Johansson commit 2a65ec81b750d24e1310546852c5166d622609b2 Merge: 1830893 4a579ec Author: Olof Johansson Date: Sun Jun 18 20:15:54 2017 -0700 Merge tag 'arm-soc/for-4.13/devicetree' of http://github.com/Broadcom/stblinux into next/dt This pull request contains Broadcom ARM-based Device Tree changes for 4.13. Note that Baruch's changes are fixes that are currently included in v4.12-rc2, but they are also included here in order to keep this tag based off v4.12-rc1. Please pull the following: - Rafal adds CPU and thermal zones to the Northstar (BCM5301X) Device Tree and he also adds the MDIO controller nodes for later use by USB PHYs - Eric adds support for the V3D engine and Ethernet switch on the Cygnus platforms, he also adds a set of Device Tree sources and include files for the Raspberry Pi 3 (BCM2837) to be used with the ARM/Linux kernel, - Jon adds CPU and thermal zones to the Northstar Plus Device Tree files - Stefan updates the Raspberry Pi DTS files with thermal trip points and zones, adds support for the USB OTG on the Raspberry Pi Zero which includes the proper dwc2 configuration, a generic USB PHY and finally the enabling of the OTG controller by including the proper DTS include file - Gerd switches the Raspberry Pi DTS files to use the SDHOST controller (faster than the SDHCI) * tag 'arm-soc/for-4.13/devicetree' of http://github.com/Broadcom/stblinux: ARM: dts: bcm2835-rpi-zero: Enable OTG mode ARM: dts: bcm283x: Add generic USB PHY ARM: dts: bcm283x: Add dtsi for OTG mode ARM: dts: Cygnus: Add the ethernet switch and ethernet PHY ARM: dts: NSP: Add Thermal Support ARM: dts: Cygnus: Add BCM11360's V3D device ARM: dts: BCM5301X: Specify MDIO bus in the DT ARM: dts: BCM5301X: Add CPU thermal sensor and zone ARM: dts: bcm283x: switch from &sdhci to &sdhost ARM: dts: bcm283x: Add CPU thermal zone with 1 trip point ARM: dts: Add devicetree for the Raspberry Pi 3, for arm32 (v6) Signed-off-by: Olof Johansson commit b9e44ddbe528217090a8d8c54fc99cc71885949f Merge: d28bcd5 27d9fa0 Author: Olof Johansson Date: Sun Jun 18 20:14:46 2017 -0700 Merge tag 'arm-soc/for-4.13/soc' of http://github.com/Broadcom/stblinux into next/soc This pull request contains Broadcom ARM-based SoCs (non Device Tree) changes: - Jon updates the Kconfig entry for Northstar Plus to have THERMAL and THERMAL_OF selected in order to get the NS/NSP thermal driver dependencies to be satistfied * tag 'arm-soc/for-4.13/soc' of http://github.com/Broadcom/stblinux: ARM: BCM: Enable thermal support for NSP SoCs Signed-off-by: Olof Johansson commit d828e97815f7aa7dd7d3e26a23073a7776ffa7b9 Merge: d8a4109 1b6d58a Author: Olof Johansson Date: Sun Jun 18 20:12:57 2017 -0700 Merge tag 'uniphier-dt64-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt64 UniPhier ARM64 SoC DT updates for v4.13 - specify timing delay properties of eMMC - fix W=1 build warnings - increase memory reserve size - use SPDX License Identifier - add new board support (LD11/LD20 global) * tag 'uniphier-dt64-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add support for LD20 Global board arm64: dts: uniphier: add support for LD11 Global board arm64: dts: uniphier: use SPDX-License-Identifier arm64: dts: uniphier: reserve more memory for LD11/LD20 arm64: dts: uniphier: fix simple-bus unit address format error arm64: dts: uniphier: Use - instead of @ for DT OPP entries arm64: dts: uniphier: add cdns, phy-dll-delay-sdclk(-hsmmc) for eMMC arm64: dts: uniphier: add input-delay properties to Cadence eMMC node Signed-off-by: Olof Johansson commit 1830893b427262e12c923364b987f5b3f8ccda9d Merge: d25b455 73f9de0 Author: Olof Johansson Date: Sun Jun 18 20:11:08 2017 -0700 Merge tag 'uniphier-dt-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt UniPhier ARM SoC DT updates for v4.13 - fix W=1 build warnings - use SPDX License Identifier - add generic compatible string for I2C EEPROM * tag 'uniphier-dt-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: Add generic compatible string for I2C EEPROM ARM: dts: uniphier: use SPDX-License-Identifier ARM: dts: uniphier: fix simple-bus unit address format error ARM: dts: uniphier: Use - instead of @ for DT OPP entries Signed-off-by: Olof Johansson commit d28bcd53fa90549e00f7dbcdfc885dfe8409e8a2 Author: Alexandre TORGUE Date: Mon Jun 12 14:22:45 2017 +0200 ARM: stm32: Introduce MACH_STM32F469 flag This patch introduces the MACH_STM32F469 to make possible to only select STM32F469 pinctrl driver By default, all the MACH_STM32Fxxx flags will be set with STM32 defconfig. Signed-off-by: Alexandre TORGUE Signed-off-by: Olof Johansson arch/arm/mach-stm32/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 35a0a5545dabb203195a4fd8ad8f379b02fa0925 Merge: c186dbe d81cd7d Author: Olof Johansson Date: Sun Jun 18 20:09:57 2017 -0700 Merge tag 'stm32-defconfig-for-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/defconfig STM32 defconfig updates for v4.13, round 1 Highlights: ---------- - Enable STMPE1600 IO expander - Enable Watchdog support * tag 'stm32-defconfig-for-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: configs: stm32: STMPE1600 GPIO expander ARM: configs: stm32: Add watchdog support in STM32 defconfig Signed-off-by: Olof Johansson commit d25b45539b902ad383f230709a2bed2e32100cb6 Merge: 226fe7c 4370746 Author: Olof Johansson Date: Sun Jun 18 20:06:32 2017 -0700 Merge tag 'stm32-dt-for-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/dt STM32 DT updates for v4.13, round 1 Highlights: ---------- - Add stm32h743-disco board support - Add stm32f746-disco board support - Add stm32f769-disco board support - Enable LTDC & simple pannel on stm32f429-eval - Enable Watchdog on stm32f429-eval - Enable DCMI on stm32f429-eval - Enable STMPE1600 io expander on stm32f429-eval - Enable OV2640 camera on stm32f429-eval - Enable CRC on stm32f429-eval & stm32f429-disco * tag 'stm32-dt-for-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: Add stm32h743i-disco board ARM: dts: stm32: Add usart2 support on stm32h743 ARM: dts: stm32: Add usart2_pins on stm32h743 ARM: dts: stm32: enable CRC32 on stm32429i-eval board ARM: dts: stm32: enable CRC32 on stm32429-disco board ARM: dts: stm32: Add CRC support to stm32f429 ARM: dts: stm32: Enable OV2640 camera support of STM32F429-EVAL board ARM: dts: stm32: Enable STMPE1600 gpio expander of STM32F429-EVAL board ARM: dts: stm32: Enable DCMI camera interface on STM32F429-EVAL board ARM: dts: stm32: Enable DCMI support on STM32F429 MCU ARM: dts: stm32: Add missing reset-cells node in stm32f746 ARM: dts: stm32: Set gpio controller as interrupt controller on F4 and F7 ARM: dts: stm32: Add watchdog support for STM32F429 eval board ARM: dts: stm32: Add watchdog support for STM32F429 SoC ARM: dts: stm32: Enable ltdc & simple panel on stm32f429-Eval board ARM: dts: stm32: Add ltdc support on stm32f429 MCU ARM: dts: stm32: add stm32f769I & stm32f746 discovery board support Signed-off-by: Olof Johansson commit 443bd90f2cca9dec3db9ef9460a9c2a6f095f789 Author: Ming Lei Date: Mon Jun 19 10:21:08 2017 +0800 nvme: host: unquiesce queue in nvme_kill_queues() When nvme_kill_queues() is run, queues may be in quiesced state, so we forcibly unquiesce queues to avoid blocking dispatch, and I/O hang can be avoided in remove path. Peviously we use blk_mq_start_stopped_hw_queues() as counterpart of blk_mq_quiesce_queue(), now we have introduced blk_mq_unquiesce_queue(), so use it explicitly. Cc: linux-nvme@lists.infradead.org Signed-off-by: Ming Lei Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7a699a85e1411130960b9821c4498d7c1a81295a Merge: f44a12d 58a823d Author: Olof Johansson Date: Sun Jun 18 19:35:48 2017 -0700 Merge tag 'v4.12-next-soc' of https://github.com/mbgg/linux-mediatek into next/drivers - enhance scpsys to support mt6797 - add mt6797 support to scpsys - fix error path in pmic-wrapper - fix possible NULL pointer dereference in pmic-wrapper * tag 'v4.12-next-soc' of https://github.com/mbgg/linux-mediatek: soc: mediatek: PMIC wrap: Fix possible NULL derefrence. soc: mediatek: PMIC wrap: Fix error handling soc: mediatek: add MT6797 scpsys support soc: mediatek: add vdec item for scpsys soc: mediatek: avoid using fixed spm power status defines Signed-off-by: Olof Johansson commit d8a4109634d69e4022c72354ce6a5204161b8fe8 Merge: c740428 5f00474 Author: Olof Johansson Date: Sun Jun 18 19:35:00 2017 -0700 Merge tag 'v4.12-next-dts64' of https://github.com/mbgg/linux-mediatek into next/dt64 Add device tree nodes for mt8173: - split USB SuperSpeed port in HighSpeed and SuperSpeed ports. - move USB phy clocks up in hierarchy to met new bindings description - move MDP nodes up in hierarchy to met new bindings description mt6797: - add basic SoC support - add clock driver - add power domain dt-bindings: - clean-up i2c binding description - add binding for mt2701 i2c node - add fallback compatible to scpsys binding description - add bindings description for mt7622 and mt6796 * tag 'v4.12-next-dts64' of https://github.com/mbgg/linux-mediatek: dt-bindings: mediatek: add bindings for MediaTek MT7622 SoC arm64: dts: mt8173: Fix mdp device tree dt-bindings: i2c: Add Mediatek MT2701 i2c binding dt-bindings: i2c-mtk: Add mt7623 binding dt-bindings: i2c-mtk: Delete bindings dt-bindings: i2c-mt6577: Rename file to reflect bindings dt-bindings: mtk-sysirq: Correct bindings for supported SoCs arm64: dts: mediatek: add clk and scp nodes for MT6797 dt-bindings: mediatek: add MT6797 power dt-bindings arm64: dts: mediatek: add mt6797 support dt-bindings: mediatek: Add bindings for mediatek MT6797 Platform arm64: dts: mt8173: move clock from phy node into port nodes arm64: dts: mt8173: split usb SuperSpeed port into two ports Signed-off-by: Olof Johansson commit 226fe7c14d08de5f684f61af0b8de19ca68464ce Merge: 3a1fc4d aac5e97 Author: Olof Johansson Date: Sun Jun 18 19:22:03 2017 -0700 Merge tag 'v4.12-next-dts32' of https://github.com/mbgg/linux-mediatek into next/dt Add device tree nodes for mt7623: - clocks - power domain - pmic-wrapper - pinctrl - i2c - spi - nand - mmc - usb - pwm - ethernet - crypto engine - infared remote control - audio controller - ADC - efuse - thermal driver - HW random generator mt2701: - NOR flash - JPEG decoder - i2c - audio controller * tag 'v4.12-next-dts32' of https://github.com/mbgg/linux-mediatek: (25 commits) arm: dts: mediatek: Add audio driver node for MT2701 arm: dts: Add Mediatek MT2701 i2c device node arm: dts: mt2701: Add node for Mediatek JPEG Decoder arm: dts: mt2701: add nor flash node ARM: dts: mt2701: Add mtk-cirq node for mt2701 arm: dts: mt7623: add Sean as one of authors for mt7623.dtsi files arm: dts: mt7623: add thermal nodes to the mt7623.dtsi file arm: dts: mt7623: add efuse nodes to the mt7623.dtsi file arm: dts: mt7623: add auxadc nodes to the mt7623.dtsi file arm: dts: mt7623: add rng nodes to the mt7623.dtsi file arm: dts: mt7623: add afe nodes to the mt7623.dtsi file arm: dts: mt7623: add ir nodes to the mt7623.dtsi file arm: dts: mt7623: add crypto engine nodes to the mt7623.dtsi file arm: dts: mt7623: add ethernet nodes to the mt7623.dtsi file arm: dts: mt7623: add pwm nodes to the mt7623.dtsi file arm: dts: mt7623: add usb nodes to the mt7623.dtsi file arm: dts: mt7623: add mmc nodes to the mt7623.dtsi file arm: dts: mt7623: add nand nodes to the mt7623.dtsi file arm: dts: mt7623: add spi nodes to the mt7623.dtsi file arm: dts: mt7623: add i2c nodes to the mt7623.dtsi file ... Signed-off-by: Olof Johansson commit 3325a5ce0f92a415001fc17d508471d9e466f3a9 Merge: 2b503be 13132b3 Author: Olof Johansson Date: Sun Jun 18 19:19:11 2017 -0700 Merge tag 'renesas-fixes2-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/fixes-non-critical Second Round of Renesas ARM Based SoC Fixes for v4.12 * Split LCD mux and gpio on armadillo800eva board * tag 'renesas-fixes2-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: armadillo800eva: Split LCD mux and gpio Signed-off-by: Olof Johansson commit 3a1fc4d2044e136974af61bbe292c4a1a3cc73d6 Merge: c3e81b9 84e00e2 Author: Olof Johansson Date: Sun Jun 18 19:14:52 2017 -0700 Merge tag 'keystone_dts_for_4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/dt ARM: dts: Keystone K2G ICE EVM support for v4.13 * tag 'keystone_dts_for_4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: dts: keystone: Add minimum support for K2G ICE evm ARM: keystone: Create new binding for K2G ICE evm ARM: dts: k2g-evm: Add unit address to memory node ARM: dts: keystone-k2g: Remove skeleton.dtsi Signed-off-by: Olof Johansson commit 4435f5dc5cf7b919c96ae0b283d3cca77d069682 Author: Masahiro Yamada Date: Sun Feb 26 12:07:00 2017 +0900 ARM: prima2: remove redundant select CPU_V7 , Barry Song , linux-kernel@vger.kernel.org ARCH_ATLAS7 resides in "if ARCH_SIRF ... end", and ARCH_SIRF depends on ARCH_MULTI_V7, which selects CPU_V7. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm/mach-prima2/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 23dbd13d778d879f686e231c101478aa355b4ec5 Merge: 19cfdfd 44fc41f Author: Olof Johansson Date: Sun Jun 18 19:11:30 2017 -0700 Merge tag 'samsung-soc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Samsung mach/soc update for v4.13: 1. Fix possible circular Kconfig dependency on S3C64xx. * tag 'samsung-soc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c64xx: Do not select ARM_AMBA from S3C64XX_PL080 Signed-off-by: Olof Johansson commit c7404287ebfb906d5cb92198673ae7e323ff620e Merge: b21af97 2f7337c Author: Olof Johansson Date: Sun Jun 18 19:11:03 2017 -0700 Merge tag 'samsung-dt64-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt64 Samsung DeviceTree ARM64 update for v4.13: 1. Remove unneeded TE interrupt gpio property. * tag 'samsung-dt64-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Remove the te-gpios property in the TM2 boards Signed-off-by: Olof Johansson commit c3e81b9dd52db3cfd431db317e4fe8284b36889a Merge: 63a677b c92a4fb Author: Olof Johansson Date: Sun Jun 18 19:10:31 2017 -0700 Merge tag 'samsung-dt-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DeviceTree update for v4.13: 1. Add HDMI CEC to Exynos5 SoCs. 2. Minor cleanups and readability improvements. * tag 'samsung-dt-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Use human-friendly symbols for GIC interrupt properties ARM: dts: exynos: Use human-friendly symbols for interrupt flags in board sources ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family ARM: dts: exynos: Remove MFC reserved buffers Signed-off-by: Olof Johansson commit c186dbe463d860fee1ce5f6b77ffd2f95e1e4168 Merge: f9928af f33160d Author: Olof Johansson Date: Sun Jun 18 19:10:07 2017 -0700 Merge tag 'samsung-defconfig-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/defconfig Samsung defconfig ARM update for v4.13: 1. Enable Exynos PRNG along with user-space crypto API. * tag 'samsung-defconfig-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: multi_v7_defconfig: Enable Exynos RNG and user-space crypto API ARM: exynos_defconfig: Enable Exynos RNG and user-space crypto API Signed-off-by: Olof Johansson commit 19cfdfd66841af00913d11f6076deee08fec6b75 Merge: 7c3b54a 51f6bfc Author: Olof Johansson Date: Sun Jun 18 19:08:43 2017 -0700 Merge tag 'v4.13-rockchip-soc32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/soc Add support for the RV1108 and its debug uart * tag 'v4.13-rockchip-soc32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: rockchip: enable support for RV1108 SoC ARM: debug: add low level debug uart for rv1108 Signed-off-by: Olof Johansson commit b21af9751afab281d88617ff68cdca64bab88d4d Merge: 704ffd7 5fd3ffb Author: Olof Johansson Date: Sun Jun 18 19:08:10 2017 -0700 Merge tag 'v4.13-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64 Support for the new rk3399 firefly board; extending the pcie ranges to make usage of pci switches possible; some more qos and pinctrl nodes on rk3399; updates for the rk3399 cpu operating points including separate opps for the higher rates OP1 variant of the chip and mmc-nodes for the rk3328. * tag 'v4.13-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: update common rk3399 operating points arm64: dts: rockchip: introduce rk3399-op1 operating points arm64: dts: rockchip: enable usb3 controllers on rk3399-firefly arm64: dts: rockchip: add ethernet0 alias on rk3399 arm64: dts: rockchip: bring rk3399-firefly power-tree in line arm64: dts: rockchip: add sdmmc/sdio/emmc nodes for RK3328 SoCs arm64: dts: rockchip: extent IORESOURCE_MEM_64 of PCIe for rk3399 arm64: dts: rockchip: extent bus-ranges of PCIe for rk3399 arm64: dts: rockchip: add pinctrl settings for some rk3399 peripherals arm64: dts: rockchip: add some missing qos nodes on rk3399 arm64: dts: rockchip: add support for firefly-rk3399 board dt-bindings: add firefly-rk3399 board support Signed-off-by: Olof Johansson commit 63a677bca242c9744d3532786b620679f7dd45c7 Merge: 23aaaf8 81b61d3 Author: Olof Johansson Date: Sun Jun 18 19:07:25 2017 -0700 Merge tag 'v4.13-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt A bunch of changes including mali gpu nodes for rk3288 boards following (and including) the new Mali Midgard binding; a lot of improvements for the rk3228/rk3229 socs (tsadc, operating points, usb, clock-rates, pinctrl, watchdog); finalizing the rk1108->rv1108 rename and adc buttons for the rk3288 firefly boards. * tag 'v4.13-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: enable usb for rk3229 evb board ARM: dts: rockchip: add usb nodes on rk322x ARM: dts: rockchip: add adc button for Firefly ARM: dts: rockchip: enable ARM Mali GPU on rk3288-veyron ARM: dts: rockchip: enable ARM Mali GPU on rk3288-firefly ARM: dts: rockchip: enable ARM Mali GPU on rk3288-rock2-som ARM: dts: rockchip: add ARM Mali GPU node for rk3288 dt-bindings: gpu: add bindings for the ARM Mali Midgard GPU ARM: dts: rockchip: set a sane frequence for tsadc on rk322x ARM: dts: rockchip: add operating-points-v2 for cpu on rk322x ARM: dts: rockchip: set default rates for core clocks on rk322x ARM: dts: rockchip: add second uart2 pinctrl on rk322x ARM: dts: rockchip: correct rk322x uart2 pinctrl ARM: dts: rockchip: add watchdog device node on rk322x clk: rockchip: add clock-ids for more rk3228 clocks clk: rockchip: add ids for camera on rk3399 ARM: dts: rockchip: fix rk322x i2s1 pinctrl error ARM: dts: rockchip: rename RK1108-evb to RV1108-evb ARM: dts: rockchip: rename core dtsi from RK1108 to RV1108 ARM: dts: rockchip: Setup usb vbus-supply on rk3288-rock2 Signed-off-by: Olof Johansson commit f9928af64be853d0f92751fda69d17b3cace4d3c Merge: 5ed02db 0b997c8c Author: Olof Johansson Date: Sun Jun 18 19:05:52 2017 -0700 Merge tag 'davinci-for-v4.13/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/defconfig Re-sync of davinci_all_defconfig with savedefconfig and enable CPPI 4.1 DMA for MUSB, some commonly used USB devices, and Lego Mindstorms EV3 battery driver. * tag 'davinci-for-v4.13/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: Enable CPPI 4.1 USB OTG DMA ARM: davinci_all_defconfig: enable USB audio/video device support ARM: davinci_all_defconfig: cleanup with savedefconfig ARM: davinci_all_defconfig: enable LEGO MINDSTORMS EV3 battery module Signed-off-by: Olof Johansson commit 23aaaf8d9f322f7d2fe25064da14711e6f99ea91 Merge: fe6d719 65878b1 Author: Olof Johansson Date: Sun Jun 18 19:05:14 2017 -0700 Merge tag 'davinci-for-v4.13/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt Miscellaneous DT support updates for DA850. Includes Lego mindstorms EV3 battery support, DMA support for MUSB, and non-critical fixes to GPIO nodes of DA850's GPIO controller and GPIO expander available on DA850 EVM. * tag 'davinci-for-v4.13/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-evm: fix tca6416 for use with GPIO hogs ARM: dts: da850: Add interrupt-controller property to gpio node ARM: dts: da850: Add CPPI 4.1 DMA to USB OTG controller ARM: dts: da850-lego-ev3: Add node for LEGO MINDSTORMS EV3 Battery Signed-off-by: Olof Johansson commit 7c3b54a55091d25f706b30a90271be5e4cc99163 Merge: 5ed02db 14ff86b Author: Olof Johansson Date: Sun Jun 18 19:04:47 2017 -0700 Merge tag 'davinci-for-v4.13/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc DaVinci SoC support updates enhancing DSP remoteproc support for DA850 SoC. This lays the foundation for DT conversion of da8xx remoteproc driver. * tag 'davinci-for-v4.13/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: da8xx: Add DSP internal RAM memories as IOMEM resources ARM: davinci: da8xx: Add names to DSP IOMEM resources ARM: davinci: da8xx: Create DSP device only when assigned memory Signed-off-by: Olof Johansson commit b84d7bf655b0d96c1c96310a698a015579526ab4 Author: Andreas Färber Date: Tue Feb 28 07:12:04 2017 +0100 dt-bindings: arm: cpus: Add S500 enable-method The Actions Semi S500 SoC requires a special secondary CPU boot procedure. Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+) commit f44a12dcd9b8490bf520b6c3bd3982761fc7fdad Merge: 8b4a358 28df169 Author: Olof Johansson Date: Sun Jun 18 19:03:45 2017 -0700 Merge tag 'reset-for-4.13-2' of git://git.pengutronix.de/git/pza/linux into next/drivers Reset controller changes for v4.13, part 2 - Add reset manager offsets for Stratix10 - Use kref for reset contol reference counting - Add new TI SCI reset driver for TI Keystone SoCs * tag 'reset-for-4.13-2' of git://git.pengutronix.de/git/pza/linux: reset: Add the TI SCI reset driver dt-bindings: reset: Add TI SCI reset binding reset: use kref for reference counting dt-bindings: reset: Add reset manager offsets for Stratix10 Signed-off-by: Olof Johansson commit 8b4a35876d7fadc6138ee0b12342cab622981dbd Merge: cd8eb62 2acb037 Author: Olof Johansson Date: Sun Jun 18 19:03:39 2017 -0700 Merge tag 'reset-for-4.13' of git://git.pengutronix.de/git/pza/linux into next/drivers Reset controller changes for v4.13 - Use devm_kcalloc to allocate the channels array in sti/reset-syscfg - Rename the TI_SYSCON_RESET Kconfig option to RESET_TI_SYSCON for consistency - Add new reset driver and DT bindings for Cortina Systems Gemini reset controller * tag 'reset-for-4.13' of git://git.pengutronix.de/git/pza/linux: reset: Add a Gemini reset controller reset: add DT bindings header for Gemini reset controller reset: ti_syscon: Rename TI_SYSCON_RESET to RESET_TI_SYSCON reset: sti: Use devm_kcalloc() in syscfg_reset_controller_register() Signed-off-by: Olof Johansson commit fdfe7f4f9d856f98119132319512eba51cbee593 Author: Andreas Färber Date: Wed Feb 15 11:15:20 2017 +0100 ARM: dts: Add Actions Semi S500 and LeMaker Guitar Add Device Trees for Actions Semiconductor S500 SoC and LeMaker Guitar SoM and base board. Signed-off-by: Andreas Färber arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/owl-s500-guitar-bb-rev-b.dts | 26 ++++ arch/arm/boot/dts/owl-s500-guitar.dtsi | 22 ++++ arch/arm/boot/dts/owl-s500.dtsi | 176 +++++++++++++++++++++++++ 4 files changed, 226 insertions(+) commit fe6d7199fc543b7ee4df15f1ddff3ad6be220872 Merge: f46b563 de09eb5 Author: Olof Johansson Date: Sun Jun 18 18:56:35 2017 -0700 Merge tag 'omap-for-v4.13/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Device tree changes for omaps for v4.13 merge window. This adds support for am335x-boneblue. The rest of the changes are for enabling features on various devices with the git shortlog describing the changes. * tag 'omap-for-v4.13/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: arm: dts: am33xx: Remove redundant interrupt-parent property ARM: dts: bonegreen-wireless: add WL1835 Bluetooth device node ARM: dts: AM43XX: Remove min and max voltage values for dcdc3 ARM: dts: Add am335x-boneblue ARM: dts: twl4030: Add missing madc reference for bci subnode ARM: dts: am43xx-clocks: Add support for CLKOUT2 ARM: dts: Configure USB host for 37xx-evm ARM: dts: omap: Add generic compatible string for I2C EEPROM ARM: dts: Enable earlycon stdout path for LogicPD torpedo ARM: dts: Enable earlycon stdout path for duovero arm: dts: boneblack-wireless: add WL1835 Bluetooth device node ARM: dts: am571x-idk: Enable the system mailboxes 5 and 6 ARM: dts: am572x-idk: Enable the system mailboxes 5 and 6 ARM: dts: omap4-devkit8000: fix gpmc ranges property ARM: dts: omap3: Remove 'enable-active-low' property ARM: dts: OMAP5: uevm: add µSD card detect ARM: dts: omap4-droid4: Add bluetooth ARM: dts: dra7x-evm: Enable dual-role mode for USB1 ARM: dts: Use - instead of @ for DT OPP entries for TI SoCs ARM: dts: am335x-phycore-som: fix rv4162 compatible Signed-off-by: Olof Johansson commit cd8eb6291d5323477c342778548e262e8c97cef2 Merge: 5ed02db c9eabf4 Author: Olof Johansson Date: Sun Jun 18 18:55:59 2017 -0700 Merge tag 'omap-for-v4.13/gpmc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers Few improvments for GPMC (General Purpose Memory Controller) found on TI SoCs to produce an error for missing bank-width and to make the bootloader timing debug output usable for device tree timings. * tag 'omap-for-v4.13/gpmc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: memory: omap-gpmc: add error message if bank-width property is absent memory: omap-gpmc: make dts snippet include semicolon Signed-off-by: Olof Johansson commit 2b503be33237a6dfc7c406319115aeb35ff5d098 Author: Heiko Stuebner Date: Wed Jun 7 13:06:27 2017 +0200 MAINTAINERS: add RV1108 Rockchip soc to maintained files The RV1108, as a soc targetted at visual applications, does not follow the usual RKxxxx naming scheme and thus falls through the cracks of the current file list for Rockchip socs in MAINTAINERS. The driver side does not pose a problem, as the rv1108 shares most functionality with other Rockchip socs as usual, so we only need to add an expression catching the rv1108* arm32 devicetree files. Signed-off-by: Heiko Stuebner Signed-off-by: Olof Johansson MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c88cc3ee1b2045ccff904f1187d62fdc3895a532 Author: Andreas Färber Date: Tue Feb 14 22:22:09 2017 +0100 arm64: Prepare Actions Semi S900 Add ARCH_ACTIONS. Signed-off-by: Andreas Färber arch/arm64/Kconfig.platforms | 6 ++++++ 1 file changed, 6 insertions(+) commit e4b0852798bc15ed1a3ed6768ef2c4d2a1cb7599 Author: Gustavo A. R. Silva Date: Tue Jun 13 14:55:42 2017 -0500 tpm/tpm_atmel: remove unnecessary NULL check Remove unnecessary NULL check. Pointer _chip_ cannot be NULL in this instance. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen (compilation) Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_atmel.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 23c3beae581f7cee193c078093a4696040dd380a Author: Andy Shevchenko Date: Mon Jun 12 18:44:16 2017 +0300 tpm/st33zp24: Switch to devm_acpi_dev_add_driver_gpios() Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assignment if ->probe() fails. Signed-off-by: Andy Shevchenko Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen (compilation) Signed-off-by: Jarkko Sakkinen drivers/char/tpm/st33zp24/i2c.c | 3 +-- drivers/char/tpm/st33zp24/spi.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit be19788c73d382f66dd3fba3c5ccef59cf12a126 Author: Benjamin Valentin Date: Sun Jun 18 15:41:20 2017 -0700 Input: xpad - sync supported devices with XBCD XBCD [0][1] is an OpenSource driver for Xbox controllers on Windows. Later it also started supporting Xbox360 controllers (presumably before the official Windows driver was released). It contains a couple device IDs unknown to the Linux driver, so I extracted those from xbcd.inf and added them to our list. It has a special type for Wheels and I have the feeling they might need some extra handling. They all have 'Wheel' in their name, so that information is available for future improvements. [0] https://www.s-config.com/xbcd-original-xbox-controllers-win10/ [1] http://www.redcl0ud.com/xbcd.html Reviewed-by: Cameron Gutman Signed-off-by: Benjamin Valentin Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit c225370e01b87d3c4ef40d98295ac0bb1e5a3116 Author: Benjamin Valentin Date: Sun Jun 18 15:40:37 2017 -0700 Input: xpad - sync supported devices with 360Controller 360Controller [0] is an OpenSource driver for Xbox/Xbox360/XboxOne controllers on macOS. It contains a couple device IDs unknown to the Linux driver, so I wrote a small Python script [1] to extract them and feed them into my previous script [2] to compare them with the IDs known to Linux. For most devices, this information is not really needed as xpad is able to automatically detect the type of an unknown Xbox Controller at run-time. I've therefore stripped all the generic/vague entries. I've excluded the Logitech G920, it's handled by a HID driver already. I've also excluded the Scene It! Big Button IR, it's handled by an out-of-tree driver. [3] [0] https://github.com/360Controller/360Controller [1] http://codepad.org/v9GyLKMq [2] http://codepad.org/qh7jclpD [3] https://github.com/micolous/xbox360bb Reviewed-by: Cameron Gutman Signed-off-by: Benjamin Valentin Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 06edb80f8c79f457983c9af93c1364fc1077c190 Author: Andreas Färber Date: Tue Feb 14 22:24:21 2017 +0100 arm64: dts: Add Actions Semi S900 and Bubblegum-96 Add Device Trees for Actions Semiconductor S900 SoC and uCRobotics Bubblegum-96 board. UART0/1/4/6 interrupts are guesses. Cc: 96boards@ucrobotics.com Signed-off-by: Andreas Färber arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/actions/Makefile | 5 + arch/arm64/boot/dts/actions/s900-bubblegum-96.dts | 35 +++++ arch/arm64/boot/dts/actions/s900.dtsi | 164 ++++++++++++++++++++++ 4 files changed, 205 insertions(+) commit d84e8c0982adbfda605b3921a038dbd8ddbb8dec Author: Andreas Färber Date: Wed Feb 15 13:47:34 2017 +0100 dt-bindings: arm: Document Actions Semi S900 The Actions Semi S900 is a quad-core ARM Cortex-A53 SoC. The Bubblegum-96 is a 96Boards Consumer Edition compliant board (4/96). Cc: 96boards@ucrobotics.com Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/arm/actions.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1c750fc116e1fcb01a57a8dbabef4ab35ac71e05 Author: Andreas Färber Date: Tue Feb 14 22:33:46 2017 +0100 dt-bindings: Add vendor prefix for uCRobotics Cc: 96boards@ucrobotics.com Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit e33a3f84f88f13eab6a45c5230c9b9ee9ac78e60 Author: Johan Hovold Date: Thu Mar 30 12:15:42 2017 +0200 NFC: nfcmrvl: allow gpio 0 for reset signalling Allow gpio 0 to be used for reset signalling, and instead use negative errnos to disable the reset functionality. Signed-off-by: Johan Hovold Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/main.c | 9 ++++----- include/linux/platform_data/nfcmrvl.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) commit 0d1ca88bbfdfdad4f6fc0421da5e4ea9a13a0d42 Author: Johan Hovold Date: Thu Mar 30 12:15:41 2017 +0200 NFC: nfcmrvl_usb: use interface as phy device Use the USB-interface rather than parent USB-device device, which is what this driver binds to, when registering the nci device. Note that using the right device is important when dealing with device- managed resources as the interface can be unbound independently of the parent device. Also note that private device pointer had already been set by nfcmrvl_nci_register_dev() so the redundant assignment can therefore be removed. Signed-off-by: Johan Hovold Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d0607aa4aee88cb097b694caa619e68f1e0a39c6 Author: Johan Hovold Date: Thu Mar 30 12:15:40 2017 +0200 NFC: nfcmrvl_uart: fix device-node leak during probe Make sure to release the device-node reference when done parsing the node. Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver") Cc: Vincent Cuissard Signed-off-by: Johan Hovold Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/uart.c | 3 +++ 1 file changed, 3 insertions(+) commit 45dd39b974f6632222dd5cdcbea7358a077ab0b0 Author: Johan Hovold Date: Thu Mar 30 12:15:39 2017 +0200 NFC: nfcmrvl: fix firmware-management initialisation The nci-device was never deregistered in the event that fw-initialisation failed. Fix this by moving the firmware initialisation before device registration since the firmware work queue should be available before registering. Note that this depends on a recent fix that moved device-name initialisation back to to nci_allocate_device() as the firmware-workqueue name is now derived from the nfc-device name. Fixes: 3194c6870158 ("NFC: nfcmrvl: add firmware download support") Cc: stable # 4.4 Cc: Vincent Cuissard Signed-off-by: Johan Hovold Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/main.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit e5834ac22948169bbd7c45996d8d4905edd20f5e Author: Johan Hovold Date: Thu Mar 30 12:15:38 2017 +0200 NFC: nfcmrvl: use nfc-device for firmware download Use the nfc- rather than phy-device in firmware-management code that needs a valid struct device. This specifically fixes a NULL-pointer dereference in nfcmrvl_fw_dnld_init() during registration when the underlying tty is one end of a Unix98 pty. Note that the driver still uses the phy device for any debugging, which is fine for now. Fixes: 3194c6870158 ("NFC: nfcmrvl: add firmware download support") Cc: stable # 4.4 Cc: Vincent Cuissard Signed-off-by: Johan Hovold Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/fw_dnld.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0cbe40112f42cf5e008f9127f6cd5952ba3946c7 Author: Johan Hovold Date: Thu Mar 30 12:15:37 2017 +0200 NFC: nfcmrvl: do not use device-managed resources This specifically fixes resource leaks in the registration error paths. Device-managed resources is a bad fit for this driver as devices can be registered from the n_nci line discipline. Firstly, a tty may not even have a corresponding device (should it be part of a Unix98 pty) something which would lead to a NULL-pointer dereference when registering resources. Secondly, if the tty has a class device, its lifetime exceeds that of the line discipline, which means that resources would leak every time the line discipline is closed (or if registration fails). Currently, the devres interface was only being used to request a reset gpio despite the fact that it was already explicitly freed in nfcmrvl_nci_unregister_dev() (along with the private data), something which also prevented the resource leak at close. Note that the driver treats gpio number 0 as invalid despite it being perfectly valid. This will be addressed in a follow-up patch. Fixes: b2fe288eac72 ("NFC: nfcmrvl: free reset gpio") Fixes: 4a2b947f56b3 ("NFC: nfcmrvl: add chip reset management") Cc: stable # 4.2: b2fe288eac72 Cc: Vincent Cuissard Signed-off-by: Johan Hovold Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 15e0c59f1535926a939d1df66d6edcf997d7c1b9 Author: Johan Hovold Date: Thu Mar 30 12:15:36 2017 +0200 NFC: nfcmrvl_uart: add missing tty-device sanity check Make sure to check the tty-device pointer before trying to access the parent device to avoid dereferencing a NULL-pointer when the tty is one end of a Unix98 pty. Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver") Cc: stable # 4.2 Cc: Vincent Cuissard Signed-off-by: Johan Hovold Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/uart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 20777bc57c346b6994f465e0d8261a7fbf213a09 Author: Johan Hovold Date: Thu Mar 30 12:15:35 2017 +0200 NFC: fix broken device allocation Commit 7eda8b8e9677 ("NFC: Use IDR library to assing NFC devices IDs") moved device-id allocation and struct-device initialisation from nfc_allocate_device() to nfc_register_device(). This broke just about every nfc-device-registration error path, which continue to call nfc_free_device() that tries to put the device reference of the now uninitialised (but zeroed) struct device: kobject: '(null)' (ce316420): is not initialized, yet kobject_put() is being called. The late struct-device initialisation also meant that various work queues whose names are derived from the nfc device name were also misnamed: 421 root 0 SW< [(null)_nci_cmd_] 422 root 0 SW< [(null)_nci_rx_w] 423 root 0 SW< [(null)_nci_tx_w] Move the id-allocation and struct-device initialisation back to nfc_allocate_device() and fix up the single call site which did not use nfc_free_device() in its error path. Fixes: 7eda8b8e9677 ("NFC: Use IDR library to assing NFC devices IDs") Cc: stable # 3.8 Cc: Samuel Ortiz Signed-off-by: Johan Hovold Signed-off-by: Samuel Ortiz net/nfc/core.c | 31 ++++++++++++++++++------------- net/nfc/nci/core.c | 3 +-- 2 files changed, 19 insertions(+), 15 deletions(-) commit e2f0f67108a8f8ec23e2e530a1a52c97595a6f96 Author: Mark Greer Date: Tue Apr 25 15:43:56 2017 -0700 NFC: trf7970a: Clean up coding style issues Clean up coding style issues according to scripts/Lindent. Some scripts/Lindent changes were reverted when it appeared to make the code less readable or when it made the line run over 80 characters. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz drivers/nfc/trf7970a.c | 291 +++++++++++++++++++++++++------------------------ 1 file changed, 147 insertions(+), 144 deletions(-) commit d34e48d6a62a06eb7f72c7dc534c4c318a163dad Author: Mark Greer Date: Tue Apr 25 15:43:55 2017 -0700 NFC: trf7970a: Convert to descriptor based GPIO interface The trf7970a driver uses the deprecated integer-based GPIO consumer interface so convert it to use the new descriptor-based GPIO consumer interface. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz drivers/nfc/Kconfig | 2 +- drivers/nfc/trf7970a.c | 61 +++++++++++++++++++++----------------------------- 2 files changed, 26 insertions(+), 37 deletions(-) commit 1877d2c5f5cff2f4115d702a1223a0f0d66cdb36 Author: Mark Greer Date: Tue Apr 25 15:43:54 2017 -0700 NFC: trf7970a: Enable pins are active high not active low The example DTS code for the trf7970a sets the GPIOs for the EN and EN2 pins to active low when they are really active high so correct the error. Acked-by: Rob Herring Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz Documentation/devicetree/bindings/net/nfc/trf7970a.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a34631c2723797dd31e6f83538899eeb4c03b753 Author: Mark Greer Date: Tue Apr 25 15:43:53 2017 -0700 NFC: trf7970a: Remove support for 'vin-voltage-override' DT property The 'vin-voltage-override' DT property is used by the trf7970a driver to override the voltage presented to the driver by the regulator subsystem. This is unnecessary as properly specifying the regulator chain via DT properties will accomplish the same thing. Therefore, remove support for 'vin-voltage-override'. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz Documentation/devicetree/bindings/net/nfc/trf7970a.txt | 2 -- drivers/nfc/trf7970a.c | 11 +---------- 2 files changed, 1 insertion(+), 12 deletions(-) commit fcc652f6885cd37a0c3f3b1ed572d3544c3240c4 Author: Mark Greer Date: Tue Apr 25 15:43:52 2017 -0700 NFC: trf7970a: Remove useless comment The last entry in the trf7970a_of_match[] table must be an empty entry to demarcate the end of the table. Currently, there is a comment indicating this but it is obvious so remove the comment. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz drivers/nfc/trf7970a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afcb9fbdba71cd39daefaff1e288472565df6af2 Author: Mark Greer Date: Tue Apr 25 15:43:51 2017 -0700 NFC: trf7970a: Only check 'en2-rf-quirk' if EN2 is specified The quirk indicated by the 'en2-rf-quirk' device tree property is only relevant when there is a GPIO connected to the EN2 pin of the trf7970a. This means we should only check for 'en2-rf-quirk' when EN2 is specified in the 'ti,enable-gpios' property of the device tree. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz drivers/nfc/trf7970a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 69f984f037a869477cac654a834e8b5435bb35b6 Author: Mark Greer Date: Tue Apr 25 15:43:50 2017 -0700 NFC: trf7970a: Fix inaccurate comment in trf7970a_probe() As of commit ce69b95ca4e4 ("NFC: Make EN2 pin optional in the TRF7970A driver"), only the GPIO for the 'EN' enable pin needs to be specified in the device tree so update the comments that says both 'EN' and 'EN2' must be specified. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz drivers/nfc/trf7970a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67dec1928d08b6ca7dc9bebc4d3fe2d54da4b108 Author: Mark Greer Date: Tue Apr 25 15:43:49 2017 -0700 NFC: trf7970a: Don't de-assert EN2 unless it was asserted When the trf7970a part has the bug related to 'en2-rf-quirk', the GPIO connected to the EN2 pin will not be asserted by the driver when powering up so it shouldn't be de-asserted when powering down. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz drivers/nfc/trf7970a.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 581132b6aecf90581fa277820d33054960e91163 Author: Mark Greer Date: Tue Apr 25 15:43:48 2017 -0700 MAINTAINERS: NFC: trf7970a: Add Mark Greer as maintainer Add Mark Greer as the maintainer of the trf7970a NFC driver. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2d618fee6984c5124f8e66972df5b1262ac7836e Author: Marc Gonzalez Date: Tue May 30 16:41:31 2017 +0100 ARM: 8679/1: bitops: Align prototypes to generic API include/asm-generic/bitops/find.h declares: extern unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size); while arch/arm/include/asm/bitops.h declares: #define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz) extern int _find_first_zero_bit_le(const void * p, unsigned size); Align the arm prototypes to the generic API, to have gcc report inadequate arguments, such as pointer to u32. Signed-off-by: Marc Gonzalez Signed-off-by: Russell King arch/arm/include/asm/bitops.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 620176f335017fbfcbc79d26a8c9beb6e64f4868 Author: Abel Vesa Date: Fri May 26 21:49:47 2017 +0100 ARM: 8678/1: ftrace: Adds support for CONFIG_DYNAMIC_FTRACE_WITH_REGS The DYNAMIC_FTRACE_WITH_REGS configuration makes it possible for a ftrace operation to specify if registers need to saved/restored by the ftrace handler. This is needed by kgraft and possibly other ftrace-based tools, and the ARM architecture is currently lacking this feature. It would also be the first step to support the "Kprobes-on-ftrace" optimization on ARM. This patch introduces a new ftrace handler that stores the registers on the stack before calling the next stage. The registers are restored from the stack before going back to the instrumented function. A side-effect of this patch is to activate the support for ftrace_modify_call() as it defines ARCH_SUPPORTS_FTRACE_OPS for the ARM architecture. Signed-off-by: Abel Vesa Signed-off-by: Russell King arch/arm/Kconfig | 1 + arch/arm/include/asm/ftrace.h | 4 ++ arch/arm/kernel/entry-ftrace.S | 100 +++++++++++++++++++++++++++++++++++++++++ arch/arm/kernel/ftrace.c | 37 +++++++++++++++ 4 files changed, 142 insertions(+) commit 641a9ed60f3620936921a58fb21d9f3aa891f3a4 Author: Ming Lei Date: Tue Jun 6 23:22:10 2017 +0800 Revert "blk-mq: don't use sync workqueue flushing from drivers" This patch reverts commit 2719aa217e0d02(blk-mq: don't use sync workqueue flushing from drivers) because only blk_mq_quiesce_queue() need the sync flush, and now we don't need to stop queue any more, so revert it. Also changes to cancel_delayed_work() in blk_mq_stop_hw_queue(). Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit 39a70c76b89b81db91a72a86b6c6a9b239013417 Author: Ming Lei Date: Tue Jun 6 23:22:09 2017 +0800 blk-mq: clarify dispatch may not be drained/blocked by stopping queue BLK_MQ_S_STOPPED may not be observed in other concurrent I/O paths, we can't guarantee that dispatching won't happen after returning from the APIs of stopping queue. So clarify the fact and avoid potential misuse. Signed-off-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 1d9e9bc6b56e1bb7e33e7e2e1b99d7088356c006 Author: Ming Lei Date: Tue Jun 6 23:22:08 2017 +0800 blk-mq: don't stop queue for quiescing Queue can be started by other blk-mq APIs and can be used in different cases, this limits uses of blk_mq_quiesce_queue() if it is based on stopping queue, and make its usage very difficult, especially users have to use the stop queue APIs carefully for avoiding to break blk_mq_quiesce_queue(). We have applied the QUIESCED flag for draining and blocking dispatch, so it isn't necessary to stop queue any more. After stopping queue is removed, blk_mq_quiesce_queue() can be used safely and easily, then users won't worry about queue restarting during quiescing at all. Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 9 +++------ include/linux/blk-mq.h | 2 -- 2 files changed, 3 insertions(+), 8 deletions(-) commit 69e07c4adb8669fd77f3b59abdb436aca9f1bee9 Author: Ming Lei Date: Tue Jun 6 23:22:07 2017 +0800 blk-mq: update comments on blk_mq_quiesce_queue() Actually what we want to get from blk_mq_quiesce_queue() isn't only to wait for completion of all ongoing .queue_rq(). In the typical context of canceling requests, we need to make sure that the following is done in the dispatch path before starting to cancel requests: - failed dispatched request is finished - busy dispatched request is requeued, and the STARTED flag is cleared So update comment to keep code, doc and our expection consistent. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f4560ffe8cec1361b1021d81aca6a4173f8e7c87 Author: Ming Lei Date: Sun Jun 18 14:24:27 2017 -0600 blk-mq: use QUEUE_FLAG_QUIESCED to quiesce queue It is required that no dispatch can happen any more once blk_mq_quiesce_queue() returns, and we don't have such requirement on APIs of stopping queue. But blk_mq_quiesce_queue() still may not block/drain dispatch in the the case of BLK_MQ_S_START_ON_RUN, so use the new introduced flag of QUEUE_FLAG_QUIESCED and evaluate it inside RCU read-side critical sections for fixing this issue. Also blk_mq_quiesce_queue() is implemented via stopping queue, which limits its uses, and easy to cause race, because any queue restart in other paths may break blk_mq_quiesce_queue(). With the introduced flag of QUEUE_FLAG_QUIESCED, we don't need to depend on stopping queue for quiescing any more. Signed-off-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq-sched.c | 3 ++- block/blk-mq.c | 11 ++++++++++- include/linux/blk-mq.h | 4 ++++ include/linux/blkdev.h | 2 ++ 4 files changed, 18 insertions(+), 2 deletions(-) commit f660174e8bcdb2bf99129f9f7c86e5fc0e830f85 Author: Ming Lei Date: Tue Jun 6 23:22:04 2017 +0800 blk-mq: use the introduced blk_mq_unquiesce_queue() blk_mq_unquiesce_queue() is used for unquiescing the queue explicitly, so replace blk_mq_start_stopped_hw_queues() with it. For the scsi part, this patch takes Bart's suggestion to switch to block quiesce/unquiesce API completely. Cc: linux-nvme@lists.infradead.org Cc: linux-scsi@vger.kernel.org Cc: dm-devel@redhat.com Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Jens Axboe drivers/md/dm-rq.c | 2 +- drivers/nvme/host/core.c | 2 +- drivers/scsi/scsi_lib.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit e4e739131ac93d373cd2d2fd92820a6a39115ba5 Author: Ming Lei Date: Tue Jun 6 23:22:03 2017 +0800 blk-mq: introduce blk_mq_unquiesce_queue blk_mq_start_stopped_hw_queues() is used implictly as counterpart of blk_mq_quiesce_queue() for unquiescing queue, so we introduce blk_mq_unquiesce_queue() and make it as counterpart of blk_mq_quiesce_queue() explicitly. This function is for improving the current quiescing mechanism in the following patches. Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 13 +++++++++++++ include/linux/blk-mq.h | 1 + 2 files changed, 14 insertions(+) commit 4f084b41a0c04a69067be98a210e6b50969f9945 Author: Ming Lei Date: Tue Jun 6 23:22:02 2017 +0800 blk-mq: introduce blk_mq_quiesce_queue_nowait() This patch introduces blk_mq_quiesce_queue_nowait() so that we can workaround mpt3sas for quiescing its queue. Once mpt3sas is fixed, we can remove this helper. Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Jens Axboe include/linux/blk-mq.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 97e0120990f4a7037f72c0e115e5c7f514025738 Author: Ming Lei Date: Tue Jun 6 23:22:01 2017 +0800 blk-mq: move blk_mq_quiesce_queue() into include/linux/blk-mq.h We usually put blk_mq_*() into include/linux/blk-mq.h, so move this API into there. Signed-off-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe include/linux/blk-mq.h | 1 + include/linux/blkdev.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit f35b0936151ed5711fb63e8c866f0202883600e1 Author: Andreas Färber Date: Mon Feb 27 21:22:51 2017 +0100 clocksource: owl: Add S900 support The Actions Semi S900 SoC provides four 32-bit timers, TIMER0/1/2/3, but no 2Hz timers. An S900 datasheet can be found in 96Boards documentation: https://github.com/96boards/documentation/blob/master/ConsumerEdition/Bubblegum-96/HardwareDocs/SoC_bubblegum96.pdf Acked-by: Daniel Lezcano Signed-off-by: Andreas Färber drivers/clocksource/owl-timer.c | 1 + 1 file changed, 1 insertion(+) commit 4be78a86c5063a50782dd2f16bd76df6a1771d77 Author: Andreas Färber Date: Thu Feb 23 19:27:12 2017 +0100 clocksource: Add Owl timer The Actions Semi S500 SoC provides four timers, 2Hz0/1 and 32-bit TIMER0/1. Use TIMER0 as clocksource and TIMER1 as clockevents. Based on LeMaker linux-actions tree. An S500 datasheet can be found on the LeMaker Guitar pages: http://www.lemaker.org/product-guitar-download-29.html Acked-by: Daniel Lezcano Signed-off-by: Andreas Färber drivers/clocksource/Kconfig | 7 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/owl-timer.c | 171 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 179 insertions(+) commit d16b9377266b0ce07007937e70f25822c6bbe0ce Author: Andreas Färber Date: Fri Feb 24 03:39:49 2017 +0100 dt-bindings: timer: Document Owl timer The Actions Semi S500 SoC contains a timer block with two 2 Hz and two 32-bit timers. The S900 SoC timer block has four 32-bit timers. Acked-by: Rob Herring Signed-off-by: Andreas Färber .../devicetree/bindings/timer/actions,owl-timer.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 58c94cc19e0800e8c0d0d708e37eeb4dee564ba9 Author: NeilBrown Date: Sun Jun 18 14:38:59 2017 +1000 block: don't check for BIO_MAX_PAGES in blk_bio_segment_split() blk_bio_segment_split() makes sure bios have no more than BIO_MAX_PAGES entries in the bi_io_vec. This was done because bio_clone_bioset() (when given a mempool bioset) could not handle larger io_vecs. No driver uses bio_clone_bioset() any more, they all use bio_clone_fast() if anything, and bio_clone_fast() doesn't clone the bi_io_vec. The main user of of bio_clone_bioset() at this level is bounce.c, and bouncing now happens before blk_bio_segment_split(), so that is not of concern. So remove the big helpful comment and the code. Reviewed-by: Christoph Hellwig Signed-off-by: NeilBrown Signed-off-by: Jens Axboe block/blk-merge.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 9b10f6a9c2aaab49c56b8cff0facdc1b64ed7e1c Author: NeilBrown Date: Sun Jun 18 14:38:59 2017 +1000 block: remove bio_clone() and all references. bio_clone() is no longer used. Only bio_clone_bioset() or bio_clone_fast(). This is for the best, as bio_clone() used fs_bio_set, and filesystems are unlikely to want to use bio_clone(). So remove bio_clone() and all references. This includes a fix to some incorrect documentation. Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: NeilBrown Signed-off-by: Jens Axboe Documentation/block/biodoc.txt | 2 +- block/bio.c | 2 +- block/blk-merge.c | 6 +++--- drivers/md/md.c | 2 +- include/linux/bio.h | 5 ----- 5 files changed, 6 insertions(+), 11 deletions(-) commit 5a136fdf5a0ab3c021ef6d989bb56a361e132234 Author: NeilBrown Date: Sun Jun 18 14:38:59 2017 +1000 bcache: use kmalloc to allocate bio in bch_data_verify() This function allocates a bio, then a collection of pages. It copes with failure. It currently uses a mempool() to allocate the bio, but alloc_page() to allocate the pages. These fail in different ways, so the usage is inconsistent. Change the bio_clone() to bio_clone_kmalloc() so that no pool is used either for the bio or the pages. Reviewed-by: Christoph Hellwig Acked-by: Kent Overstreet Reviewed-by : Ming Lei Signed-off-by: NeilBrown Signed-off-by: Jens Axboe drivers/md/bcache/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4559fa55193f71d715319b841f8613d8442283d6 Author: NeilBrown Date: Sun Jun 18 14:38:59 2017 +1000 xen-blkfront: remove bio splitting. bios that are re-submitted will pass through blk_queue_split() when blk_queue_bio() is called, and this will split the bio if necessary. There is no longer any need to do this splitting in xen-blkfront. Acked-by: Roger Pau Monné Reviewed-by: Christoph Hellwig Signed-off-by: NeilBrown Signed-off-by: Jens Axboe drivers/block/xen-blkfront.c | 54 +++----------------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) commit b25d52379ad87800a93311c42e36f8dd1d7d8e98 Author: NeilBrown Date: Sun Jun 18 14:38:58 2017 +1000 lightnvm/pblk-read: use bio_clone_fast() pblk_submit_read() uses bio_clone_bioset() but doesn't change the io_vec, so bio_clone_fast() is a better choice. It also uses fs_bio_set which is intended for filesystems. Using it in a device driver can deadlock. So allocate a new bioset, and and use bio_clone_fast(). Reviewed-by: Christoph Hellwig Reviewed-by: Javier González Tested-by: Javier González Signed-off-by: NeilBrown Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 12 +++++++++++- drivers/lightnvm/pblk-read.c | 2 +- drivers/lightnvm/pblk.h | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) commit a1d91404cb69daee07282b331ce58c4ab2e7a620 Author: NeilBrown Date: Sun Jun 18 14:38:58 2017 +1000 pktcdvd: use bio_clone_fast() instead of bio_clone() pktcdvd doesn't change the bi_io_vec of the clone bio, so it is more efficient to use bio_clone_fast(), and not clone the bi_io_vec. This requires providing a bio_set, and it is safest to provide a dedicated bio_set rather than sharing fs_bio_set, which filesytems use. This new bio_set, pkt_bio_set, can also be use for the bio_split() call as the two allocations (bio_clone_fast, and bio_split) are independent, neither can block a bio allocated by the other. Reviewed-by: Christoph Hellwig Signed-off-by: NeilBrown Signed-off-by: Jens Axboe drivers/block/pktcdvd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 8cb0defbaa8d4778c7474677cbb93d8cd602a2a6 Author: NeilBrown Date: Sun Jun 18 14:38:58 2017 +1000 drbd: use bio_clone_fast() instead of bio_clone() drbd does not modify the bi_io_vec of the cloned bio, so there is no need to clone that part. So bio_clone_fast() is the better choice. For bio_clone_fast() we need to specify a bio_set. We could use fs_bio_set, which bio_clone() uses, or drbd_md_io_bio_set, which drbd uses for metadata, but it is generally best to avoid sharing bio_sets unless you can be certain that there are no interdependencies. So create a new bio_set, drbd_io_bio_set, and use bio_clone_fast(). Also remove a "XXX cannot fail ???" comment because it definitely cannot fail - bio_clone_fast() doesn't fail if the GFP flags allow for sleeping. Reviewed-by: Christoph Hellwig Signed-off-by: NeilBrown Signed-off-by: Jens Axboe drivers/block/drbd/drbd_int.h | 3 +++ drivers/block/drbd/drbd_main.c | 9 +++++++++ drivers/block/drbd/drbd_req.h | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) commit f856dc36b6db4cbe757f95787136087fb37af2af Author: NeilBrown Date: Sun Jun 18 14:38:58 2017 +1000 rbd: use bio_clone_fast() instead of bio_clone() bio_clone() makes a copy of the bi_io_vec, but rbd never changes that, so there is no need for a copy. bio_clone_fast() can be used instead, which avoids making the copy. This requires that we provide a bio_set. bio_clone() uses fs_bio_set, but it isn't, in general, safe to use the same bio_set at different levels of the stack, as that can lead to deadlocks. As filesystems use fs_bio_set, block devices shouldn't. As rbd never stacks, it is safe to have a single global bio_set for all rbd devices to use. So allocate that when the module is initialised, and use it with bio_clone_fast(). Reviewed-by: Christoph Hellwig Signed-off-by: NeilBrown Signed-off-by: Jens Axboe drivers/block/rbd.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit a8821f3f32bea173c7f9546b3b025898f0e09f58 Author: NeilBrown Date: Sun Jun 18 14:38:58 2017 +1000 block: Improvements to bounce-buffer handling Since commit 23688bf4f830 ("block: ensure to split after potentially bouncing a bio") blk_queue_bounce() is called *before* blk_queue_split(). This means that: 1/ the comments blk_queue_split() about bounce buffers are irrelevant, and 2/ a very large bio (more than BIO_MAX_PAGES) will no longer be split before it arrives at blk_queue_bounce(), leading to the possibility that bio_clone_bioset() will fail and a NULL will be dereferenced. Separately, blk_queue_bounce() shouldn't use fs_bio_set as the bio being copied could be from the same set, and this could lead to a deadlock. So: - allocate 2 private biosets for blk_queue_bounce, one for splitting enormous bios and one for cloning bios. - add code to split a bio that exceeds BIO_MAX_PAGES. - Fix up the comments in blk_queue_split() Credit-to: Ming Lei (suggested using single bio_for_each_segment loop) Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: NeilBrown Signed-off-by: Jens Axboe block/blk-merge.c | 14 ++++---------- block/bounce.c | 32 ++++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 16 deletions(-) commit 93b27e72904a9869e648c870bf0d04b124fda1c7 Author: NeilBrown Date: Sun Jun 18 14:38:57 2017 +1000 blk: use non-rescuing bioset for q->bio_split. A rescuing bioset is only useful if there might be bios from that same bioset on the bio_list_on_stack queue at a time when bio_alloc_bioset() is called. This never applies to q->bio_split. Allocations from q->bio_split are only ever made from blk_queue_split() which is only ever called early in each of various make_request_fn()s. The original bio (call this A) is then passed to generic_make_request() and is placed on the bio_list_on_stack queue, and the bio that was allocated from q->bio_split (B) is processed. The processing of this may cause other bios to be passed to generic_make_request() or may even cause the bio B itself to be passed, possible after some prefix has been split off (using some other bioset). generic_make_request() now guarantees that all of these bios (B and dependants) will be fully processed before the tail of the original bio A gets handled. None of these early bios can possible trigger an allocation from the original q->bio_split as they are either too small to require splitting or (more likely) are destined for a different queue. The next time that the original q->bio_split might be used by this thread is when A is processed again, as it might still be too big to handle directly. By this time there cannot be any other bios allocated from q->bio_split in the generic_make_request() queue. So no rescuing will ever be needed. Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: NeilBrown Signed-off-by: Jens Axboe block/blk-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 47e0fb461fca1a68a566c82fcc006cc787312d8c Author: NeilBrown Date: Sun Jun 18 14:38:57 2017 +1000 blk: make the bioset rescue_workqueue optional. This patch converts bioset_create() to not create a workqueue by default, so alloctions will never trigger punt_bios_to_rescuer(). It also introduces a new flag BIOSET_NEED_RESCUER which tells bioset_create() to preserve the old behavior. All callers of bioset_create() that are inside block device drivers, are given the BIOSET_NEED_RESCUER flag. biosets used by filesystems or other top-level users do not need rescuing as the bio can never be queued behind other bios. This includes fs_bio_set, blkdev_dio_pool, btrfs_bioset, xfs_ioend_bioset, and one allocated by target_core_iblock.c. biosets used by md/raid do not need rescuing as their usage was recently audited and revised to never risk deadlock. It is hoped that most, if not all, of the remaining biosets can end up being the non-rescued version. Reviewed-by: Christoph Hellwig Credit-to: Ming Lei (minor fixes) Reviewed-by: Ming Lei Signed-off-by: NeilBrown Signed-off-by: Jens Axboe block/bio.c | 13 +++++++++++-- block/blk-core.c | 3 ++- drivers/block/drbd/drbd_main.c | 4 +++- drivers/md/bcache/super.c | 8 ++++++-- drivers/md/dm-crypt.c | 3 ++- drivers/md/dm-io.c | 3 ++- drivers/md/dm.c | 5 +++-- include/linux/bio.h | 1 + 8 files changed, 30 insertions(+), 10 deletions(-) commit 011067b05668b05aae88e5a24cff0ca0a67ca0b0 Author: NeilBrown Date: Sun Jun 18 14:38:57 2017 +1000 blk: replace bioset_create_nobvec() with a flags arg to bioset_create() "flags" arguments are often seen as good API design as they allow easy extensibility. bioset_create_nobvec() is implemented internally as a variation in flags passed to __bioset_create(). To support future extension, make the internal structure part of the API. i.e. add a 'flags' argument to bioset_create() and discard bioset_create_nobvec(). Note that the bio_split allocations in drivers/md/raid* do not need the bvec mempool - they should have used bioset_create_nobvec(). Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: NeilBrown Signed-off-by: Jens Axboe block/bio.c | 60 ++++++++++++++----------------------- block/blk-core.c | 2 +- drivers/block/drbd/drbd_main.c | 2 +- drivers/md/bcache/super.c | 4 +-- drivers/md/dm-crypt.c | 2 +- drivers/md/dm-io.c | 2 +- drivers/md/dm.c | 2 +- drivers/md/md.c | 2 +- drivers/md/raid1.c | 2 +- drivers/md/raid10.c | 2 +- drivers/md/raid5-cache.c | 2 +- drivers/md/raid5-ppl.c | 2 +- drivers/md/raid5.c | 2 +- drivers/target/target_core_iblock.c | 2 +- fs/block_dev.c | 2 +- fs/btrfs/extent_io.c | 3 +- fs/xfs/xfs_super.c | 3 +- include/linux/bio.h | 6 ++-- 18 files changed, 45 insertions(+), 57 deletions(-) commit af67c31fba3b879b241536a48df703a2eee18ebf Author: NeilBrown Date: Sun Jun 18 14:38:57 2017 +1000 blk: remove bio_set arg from blk_queue_split() blk_queue_split() is always called with the last arg being q->bio_split, where 'q' is the first arg. Also blk_queue_split() sometimes uses the passed-in 'bs' and sometimes uses q->bio_split. This is inconsistent and unnecessary. Remove the last arg and always use q->bio_split inside blk_queue_split() Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Credit-to: Javier González (Noticed that lightnvm was missed) Reviewed-by: Javier González Tested-by: Javier González Signed-off-by: NeilBrown Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-merge.c | 9 ++++----- block/blk-mq.c | 2 +- drivers/block/drbd/drbd_req.c | 2 +- drivers/block/pktcdvd.c | 2 +- drivers/block/ps3vram.c | 2 +- drivers/block/rsxx/dev.c | 2 +- drivers/block/umem.c | 2 +- drivers/lightnvm/pblk-init.c | 4 ++-- drivers/lightnvm/rrpc.c | 2 +- drivers/md/md.c | 2 +- drivers/s390/block/dcssblk.c | 2 +- drivers/s390/block/xpram.c | 2 +- include/linux/blkdev.h | 3 +-- 14 files changed, 18 insertions(+), 20 deletions(-) commit e4cdf1a1cb161a648cc1ed7d6148fc3b99a1b3f5 Author: Christoph Hellwig Date: Fri Jun 16 18:15:27 2017 +0200 blk-mq: remove __blk_mq_alloc_request Move most code into blk_mq_rq_ctx_init, and the rest into blk_mq_get_request. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 68 +++++++++++++++++++++++----------------------------------- block/blk-mq.h | 6 ------ 2 files changed, 27 insertions(+), 47 deletions(-) commit 5bbf4e5a8e3a780874b2ed77bd1bd57850f3f6da Author: Christoph Hellwig Date: Fri Jun 16 18:15:26 2017 +0200 blk-mq-sched: unify request prepare methods This patch makes sure we always allocate requests in the core blk-mq code and use a common prepare_request method to initialize them for both mq I/O schedulers. For Kyber and additional limit_depth method is added that is called before allocating the request. Also because none of the intializations can really fail the new method does not return an error - instead the bfq finish method is hardened to deal with the no-IOC case. Last but not least this removes the abuse of RQF_QUEUE by the blk-mq scheduling code as RQF_ELFPRIV is all that is needed now. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bfq-iosched.c | 19 ++++++++++++------- block/blk-mq.c | 22 ++++++---------------- block/kyber-iosched.c | 23 +++++++++++------------ include/linux/elevator.h | 4 ++-- 4 files changed, 31 insertions(+), 37 deletions(-) commit 44e8c2bff80bb384a608406009948f90a78bf8a3 Author: Christoph Hellwig Date: Fri Jun 16 18:15:25 2017 +0200 blk-mq: refactor blk_mq_sched_assign_ioc blk_mq_sched_assign_ioc now only handles the assigned of the ioc if the schedule needs it (bfq only at the moment). The caller to the per-request initializer is moved out so that it can be merged with a similar call for the kyber I/O scheduler. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq-sched.c | 28 ++++------------------------ block/blk-mq-sched.h | 3 +-- block/blk-mq.c | 14 ++++++++++++-- 3 files changed, 17 insertions(+), 28 deletions(-) commit 9f2107382636cf9a71951eb71ec04f2fb3641b37 Author: Christoph Hellwig Date: Fri Jun 16 18:15:24 2017 +0200 bfq-iosched: fix NULL ioc check in bfq_get_rq_private icq_to_bic is a container_of operation, so we need to check for NULL before it. Also move the check outside the spinlock while we're at it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bfq-iosched.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 037cebb85b94027a52be69d72068e6f6d0dca3a3 Author: Christoph Hellwig Date: Fri Jun 16 18:15:23 2017 +0200 blk-mq: streamline blk_mq_get_request Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 6af54051a07041d8d4e36b1b01136a0db4eb7e23 Author: Christoph Hellwig Date: Fri Jun 16 18:15:22 2017 +0200 blk-mq: simplify blk_mq_free_request Merge three functions only tail-called by blk_mq_free_request into blk_mq_free_request. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 50 +++++++++++++++----------------------------------- block/blk-mq.h | 3 --- 2 files changed, 15 insertions(+), 38 deletions(-) commit 7b9e93616399638521aafd1f01dfcf474c736393 Author: Christoph Hellwig Date: Fri Jun 16 18:15:21 2017 +0200 blk-mq-sched: unify request finished methods No need to have two different callouts of bfq vs kyber. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bfq-iosched.c | 6 +++--- block/blk-mq.c | 11 ++++------- block/kyber-iosched.c | 8 +++----- include/linux/elevator.h | 3 +-- 4 files changed, 11 insertions(+), 17 deletions(-) commit ea511e3c28c892f689173c91662437c4ddb2ab38 Author: Christoph Hellwig Date: Fri Jun 16 18:15:20 2017 +0200 blk-mq: remove blk_mq_sched_{get,put}_rq_priv Having these as separate helpers in a header really does not help readability, or my chances to refactor this code sanely. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq-sched.c | 10 ++++++---- block/blk-mq-sched.h | 21 --------------------- block/blk-mq.c | 3 ++- 3 files changed, 8 insertions(+), 26 deletions(-) commit d2c0d3832469b947ca158e8977e66e8e2e64d8dd Author: Christoph Hellwig Date: Fri Jun 16 18:15:19 2017 +0200 blk-mq: move blk_mq_sched_{get,put}_request to blk-mq.c Having them out of line in blk-mq-sched.c just makes the code flow unnecessarily complicated. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq-sched.c | 69 ++-------------------------------------------------- block/blk-mq-sched.h | 4 +-- block/blk-mq.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 67 insertions(+), 73 deletions(-) commit 6e15cf2a0bc1a75237ed8ae6293db707e471bb81 Author: Christoph Hellwig Date: Fri Jun 16 18:15:18 2017 +0200 blk-mq: mark blk_mq_rq_ctx_init static Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 5 ++--- block/blk-mq.h | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) commit b2ee7d46befc43e355ffaf7bfabb00e7a901b3a0 Author: NeilBrown Date: Fri Jun 16 15:02:09 2017 +1000 loop: Add PF_LESS_THROTTLE to block/loop device thread. When a filesystem is mounted from a loop device, writes are throttled by balance_dirty_pages() twice: once when writing to the filesystem and once when the loop_handle_cmd() writes to the backing file. This double-throttling can trigger positive feedback loops that create significant delays. The throttling at the lower level is seen by the upper level as a slow device, so it throttles extra hard. The PF_LESS_THROTTLE flag was created to handle exactly this circumstance, though with an NFS filesystem mounted from a local NFS server. It reduces the throttling on the lower layer so that it can proceed largely unthrottled. To demonstrate this, create a filesystem on a loop device and write (e.g. with dd) several large files which combine to consume significantly more than the limit set by /proc/sys/vm/dirty_ratio or dirty_bytes. Measure the total time taken. When I do this directly on a device (no loop device) the total time for several runs (mkfs, mount, write 200 files, umount) is fairly stable: 28-35 seconds. When I do this over a loop device the times are much worse and less stable. 52-460 seconds. Half below 100seconds, half above. When I apply this patch, the times become stable again, though not as fast as the no-loop-back case: 53-72 seconds. There may be room for further improvement as the total overhead still seems too high, but this is a big improvement. Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Suggested-by: Michal Hocko Acked-by: Michal Hocko Signed-off-by: NeilBrown Signed-off-by: Jens Axboe drivers/block/loop.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 063345aede9905beb9b73129da7a0e9d5933b078 Author: Arnd Bergmann Date: Fri Jun 9 12:29:12 2017 +0200 i2c: xgene-slimpro: include linux/io.h for memremap The newly added support for the pcc mailbox fails to build in some configurations: drivers/i2c/busses/i2c-xgene-slimpro.c: In function 'xgene_slimpro_i2c_probe': drivers/i2c/busses/i2c-xgene-slimpro.c:516:25: error: implicit declaration of function 'memremap'; did you mean 'memcmp'? [-Werror=implicit-function-declaration] drivers/i2c/busses/i2c-xgene-slimpro.c:518:13: error: 'MEMREMAP_WB' undeclared (first use in this function) drivers/i2c/busses/i2c-xgene-slimpro.c:518:13: note: each undeclared identifier is reported only once for each function it appears in This includes the missing header file. Fixes: df5da47fe722 ("i2c: xgene-slimpro: Add ACPI support by using PCC mailbox") Signed-off-by: Arnd Bergmann Reviewed-by: Hoan Tran Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xgene-slimpro.c | 1 + 1 file changed, 1 insertion(+) commit b2f2fe205c3b9b595dc50ee431230a45d03f9c2c Author: Olle Liljenzin Date: Sun Jun 18 14:37:58 2017 +0200 platform/x86: ideapad-laptop: Add Y720-15IKBN to no_hw_rfkill Lenovo Legion Y720-15IKBN is yet another Lenovo model that does not have an hw rfkill switch, resulting in wifi always reported as hard blocked. Add the model to the list of models without rfkill switch. Signed-off-by: Olle Liljenzin Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5d9f40b56630a8702b5f7a61a770f9b73aa07464 Author: Olle Liljenzin Date: Sun Jun 18 13:09:31 2017 +0200 platform/x86: ideapad-laptop: Add Y520-15IKBN to no_hw_rfkill Lenovo Legion Y520-15IKBN is yet another Lenovo model that does not have an hw rfkill switch, resulting in wifi always reported as hard blocked. Add the model to the list of models without rfkill switch. Signed-off-by: Olle Liljenzin Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 06d4d450db770a70b29fa0244d50390c85e7e3c7 Author: Florian Fainelli Date: Fri Jun 16 16:42:11 2017 -0700 net: dsa: Fix legacy probing After commit 6d3c8c0dd88a ("net: dsa: Remove master_netdev and use dst->cpu_dp->netdev") and a29342e73911 ("net: dsa: Associate slave network device with CPU port") we would be seeing NULL pointer dereferences when accessing dst->cpu_dp->netdev too early. In the legacy code, we actually know early in advance the master network device, so pass it down to the relevant functions. Fixes: 6d3c8c0dd88a ("net: dsa: Remove master_netdev and use dst->cpu_dp->netdev") Fixes: a29342e73911 ("net: dsa: Associate slave network device with CPU port") Reported-by: Jason Cobham Tested-by: Jason Cobham Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/legacy.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit d807ec656f868c1800e38cefa98be3ec680f6a1f Author: Dave Watson Date: Sat Jun 17 08:25:13 2017 -0700 tls: update Kconfig Missing crypto deps for some platforms. Default to n for new module. config: m68k-amcore_defconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 4.9.0 make.cross ARCH=m68k All errors (new ones prefixed by >>): net/built-in.o: In function `tls_set_sw_offload': >> (.text+0x732f8): undefined reference to `crypto_alloc_aead' net/built-in.o: In function `tls_set_sw_offload': >> (.text+0x7333c): undefined reference to `crypto_aead_setkey' net/built-in.o: In function `tls_set_sw_offload': >> (.text+0x73354): undefined reference to `crypto_aead_setauthsize' Reported-by: kbuild test robot Signed-off-by: Dave Watson Signed-off-by: David S. Miller net/tls/Kconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ffe95ecf3a2e060cc95ad8835a71273a4a3b3923 Merge: 273889e 44ebe79 Author: David S. Miller Date: Sat Jun 17 22:54:01 2017 -0400 Merge branch 'net-remove-dst-garbage-collector-logic' Wei Wang says: ==================== remove dst garbage collector logic The current mechanism of dst release is a bit complicated. It is because the users of dst get divided into 2 situations: 1. Most users take the reference count when using a dst and release the reference count when done. 2. Exceptional users like IPv4/IPv6/decnet/xfrm routing code do not take reference count when referencing to a dst due to some histotic reasons. Due to those exceptional use cases in 2, reference count being 0 is not an adequate evidence to indicate that no user is using this dst. So users in 1 can't free the dst simply based on reference count being 0 because users in 2 might still hold reference to it. Instead, a dst garbage list is needed to hold the dst entries that already get removed by the users in 2 but are still held by users in 1. And a periodic garbage collector task is run to check all the dst entries in the list to see if the users in 1 have released the reference to those dst entries. If so, the dst is now ready to be freed. This logic introduces unnecessary complications in the dst code which makes it hard to understand and to debug. In order to get rid of the whole dst garbage collector (gc) and make the dst code more unified and simplified, we can make the users in 2 also take reference count on the dst and release it properly when done. This way, dst can be safely freed once the refcount drops to 0 and no gc thread is needed anymore. This patch series' target is to completely get rid of dst gc logic and free dst based on reference count only. Patch 1-3 are preparation patches to do some cleanup/improvement on the existing code to make later work easier. Patch 4-21 are real implementations. In these patches, a temporary flag DST_NOGC is used to help transition those exceptional users one by one. Once every component is transitioned, this temporary flag is removed. By the end of this patch series, all dst are refcounted when being used and released when done. And dst will be freed when its refcount drops to 0. No dst gc task is running anymore. Note: This patch series depends on the decnet fix that was sent right before: "decnet: always not take dst->__refcnt when inserting dst into hash table" v2: add curly braces in udp_v4/6_early_demux() in patch 02 add EXPORT_SYMBOL() for dst_dev_put() in patch 05 ==================== Signed-off-by: David S. Miller commit 44ebe79149ff415e810529bf192faa5c38d4a0de Author: Wei Wang Date: Sat Jun 17 10:42:44 2017 -0700 net: add debug atomic_inc_not_zero() in dst_hold() This patch is meant to add a debug warning on the situation where dst is being held during its destroy phase. This could potentially cause double free issue on the dst. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/dst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1eb04e7c9e63e0480cc52b84187283de4fe5f982 Author: Wei Wang Date: Sat Jun 17 10:42:43 2017 -0700 net: reorder all the dst flags As some dst flags are removed, reorder the dst flags to fill in the blanks. Note: these flags are not exposed into user space. So it is safe to reorder. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/dst.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a4c2fd7f78915a0d7c5275e7612e7793157a01f2 Author: Wei Wang Date: Sat Jun 17 10:42:42 2017 -0700 net: remove DST_NOCACHE flag DST_NOCACHE flag check has been removed from dst_release() and dst_hold_safe() in a previous patch because all the dst are now ref counted properly and can be released based on refcnt only. Looking at the rest of the DST_NOCACHE use, all of them can now be removed or replaced with other checks. So this patch gets rid of all the DST_NOCACHE usage and remove this flag completely. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller drivers/net/vrf.c | 2 +- include/net/dst.h | 1 - include/net/ip6_fib.h | 2 +- net/core/dst.c | 2 +- net/ipv4/route.c | 23 +++++++++++------------ net/ipv6/ip6_fib.c | 4 +--- net/ipv6/route.c | 7 ++----- net/xfrm/xfrm_policy.c | 1 - 8 files changed, 17 insertions(+), 25 deletions(-) commit b2a9c0ed75a32e788d034a58a18f2fc46396e412 Author: Wei Wang Date: Sat Jun 17 10:42:41 2017 -0700 net: remove DST_NOGC flag Now that all the components have been changed to release dst based on refcnt only and not depend on dst gc anymore, we can remove the temporary flag DST_NOGC. Note that we also need to remove the DST_NOCACHE check in dst_release() and dst_hold_safe() because now all the dst are released based on refcnt and behaves as DST_NOCACHE. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/dst.h | 6 +----- net/core/dst.c | 4 +--- net/decnet/dn_route.c | 6 ++---- net/ipv4/route.c | 5 ++--- net/ipv6/route.c | 5 ++--- net/xfrm/xfrm_policy.c | 2 +- 6 files changed, 9 insertions(+), 19 deletions(-) commit 5b7c9a8ff828287af5aebe93e707271bf1a82cc3 Author: Wei Wang Date: Sat Jun 17 10:42:40 2017 -0700 net: remove dst gc related code This patch removes all dst gc related code and all the dst free functions Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/dst.h | 21 ------ net/core/dev.c | 1 - net/core/dst.c | 213 ------------------------------------------------------ 3 files changed, 235 deletions(-) commit 560fd93bca66c235d04cb7fcb2229b96546e27c8 Author: Wei Wang Date: Sat Jun 17 10:42:39 2017 -0700 decnet: take dst->__refcnt when struct dn_route is created struct dn_route is inserted into dn_rt_hash_table but no dst->__refcnt is taken. This patch makes sure the dn_rt_hash_table's reference to the dst is ref counted. As the dst is always ref counted properly, we can safely mark DST_NOGC flag so dst_release() will release dst based on refcnt only. And dst gc is no longer needed and all dst_free() or its related function calls should be replaced with dst_release() or dst_release_immediate(). And dst_dev_put() is called when removing dst from the hash table to release the reference on dst->dev before we lose pointer to it. Also, correct the logic in dn_dst_check_expire() and dn_dst_gc() to check dst->__refcnt to be > 1 to indicate it is referenced by other users. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/decnet/dn_route.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 52df157f17e564ec22afc3e4a89b21828220f576 Author: Wei Wang Date: Sat Jun 17 10:42:38 2017 -0700 xfrm: take refcnt of dst when creating struct xfrm_dst bundle During the creation of xfrm_dst bundle, always take ref count when allocating the dst. This way, xfrm_bundle_create() will form a linked list of dst with dst->child pointing to a ref counted dst child. And the returned dst pointer is also ref counted. This makes the link from the flow cache to this dst now ref counted properly. As the dst is always ref counted properly, we can safely mark DST_NOGC flag so dst_release() will release dst based on refcnt only. And dst gc is no longer needed and all dst_free() and its related function calls should be replaced with dst_release() or dst_release_immediate(). The special handling logic for dst->child in dst_destroy() can be replaced with a simple dst_release_immediate() call on the child to release the whole list linked by dst->child pointer. Previously used DST_NOHASH flag is not needed anymore as well. The reason that DST_NOHASH is used in the existing code is mainly to prevent the dst inserted in the fib tree to be wrongly destroyed during the deletion of the xfrm_dst bundle. So in the existing code, DST_NOHASH flag is marked in all the dst children except the one which is in the fib tree. However, with this patch series to remove dst gc logic and release dst only based on ref count, it is safe to release all the children from a xfrm_dst bundle as long as the dst children are all ref counted properly which is already the case in the existing code. So, this patch removes the use of DST_NOHASH flag. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/dst.h | 1 - net/core/dst.c | 19 ++----------------- net/xfrm/xfrm_policy.c | 48 ++++++++++++++++++++++++++++++------------------ 3 files changed, 32 insertions(+), 36 deletions(-) commit db916649b5dd0fa2bddeb9427dab513b41e1e984 Author: Wei Wang Date: Sat Jun 17 10:42:37 2017 -0700 ipv6: get rid of icmp6 dst garbage collector icmp6 dst route is currently ref counted during creation and will be freed by user during its call of dst_release(). So no need of a garbage collector for it. Remove all icmp6 dst garbage collector related code. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/ip6_route.h | 1 - net/ipv6/ip6_fib.c | 3 +-- net/ipv6/route.c | 46 ---------------------------------------------- 3 files changed, 1 insertion(+), 49 deletions(-) commit 587fea74113463b74e0d2994caf9e5f8045c28af Author: Wei Wang Date: Sat Jun 17 10:42:36 2017 -0700 ipv6: mark DST_NOGC and remove the operation of dst_free() With the previous preparation patches, we are ready to get rid of the dst gc operation in ipv6 code and release dst based on refcnt only. So this patch adds DST_NOGC flag for all IPv6 dst and remove the calls to dst_free() and its related functions. At this point, all dst created in ipv6 code do not use the dst gc anymore and will be destroyed at the point when refcnt drops to 0. Also, as icmp6 dst route is refcounted during creation and will be freed by user during its call of dst_release(), there is no need to add this dst to the icmp6 gc list as well. Instead, we need to add it into uncached list so that when a NETDEV_DOWN/NETDEV_UNREGISRER event comes, we can properly go through these icmp6 dst as well and release the net device properly. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 15 ++------------- net/ipv6/route.c | 49 +++++++++++++++++-------------------------------- 2 files changed, 19 insertions(+), 45 deletions(-) commit ad65a2f05695aced349e308193c6e2a6b1d87112 Author: Wei Wang Date: Sat Jun 17 10:42:35 2017 -0700 ipv6: call dst_hold_safe() properly Similar as ipv4, ipv6 path also needs to call dst_hold_safe() when necessary to avoid double free issue on the dst. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/addrconf.c | 4 ++-- net/ipv6/route.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9514528d92d4cbe086499322370155ed69f5d06c Author: Wei Wang Date: Sat Jun 17 10:42:34 2017 -0700 ipv6: call dst_dev_put() properly As the intend of this patch series is to completely remove dst gc, we need to call dst_dev_put() to release the reference to dst->dev when removing routes from fib because we won't keep the gc list anymore and will lose the dst pointer right after removing the routes. Without the gc list, there is no way to find all the dst's that have dst->dev pointing to the going-down dev. Hence, we are doing dst_dev_put() immediately before we lose the last reference of the dst from the routing code. The next dst_check() will trigger a route re-lookup to find another route (if there is any). Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 2 ++ 1 file changed, 2 insertions(+) commit 1cfb71eeb12047bcdbd3e6730ffed66e810a0855 Author: Wei Wang Date: Sat Jun 17 10:42:33 2017 -0700 ipv6: take dst->__refcnt for insertion into fib6 tree In IPv6 routing code, struct rt6_info is created for each static route and RTF_CACHE route and inserted into fib6 tree. In both cases, dst ref count is not taken. As explained in the previous patch, this leads to the need of the dst garbage collector. This patch holds ref count of dst before inserting the route into fib6 tree and properly releases the dst when deleting it from the fib6 tree as a preparation in order to fully get rid of dst gc later. Also, correct fib6_age() logic to check dst->__refcnt to be 1 to indicate no user is referencing the dst. And remove dst_hold() in vrf_rt6_create() as ip6_dst_alloc() already puts dst->__refcnt to 1. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller drivers/net/vrf.c | 4 ---- net/ipv6/ip6_fib.c | 12 +++++++++++- net/ipv6/route.c | 55 ++++++++++++++++++++++++++++++++++++++---------------- 3 files changed, 50 insertions(+), 21 deletions(-) commit b838d5e1c5b6e57b10ec8af2268824041e3ea911 Author: Wei Wang Date: Sat Jun 17 10:42:32 2017 -0700 ipv4: mark DST_NOGC and remove the operation of dst_free() With the previous preparation patches, we are ready to get rid of the dst gc operation in ipv4 code and release dst based on refcnt only. So this patch adds DST_NOGC flag for all IPv4 dst and remove the calls to dst_free(). At this point, all dst created in ipv4 code do not use the dst gc anymore and will be destroyed at the point when refcnt drops to 0. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 6 ++---- net/ipv4/route.c | 15 +++------------ 2 files changed, 5 insertions(+), 16 deletions(-) commit 9df16efadd2a8a82731dc76ff656c771e261827f Author: Wei Wang Date: Sat Jun 17 10:42:31 2017 -0700 ipv4: call dst_hold_safe() properly This patch checks all the calls to dst_hold()/skb_dst_force()/dst_clone()/dst_use() to see if dst_hold_safe() is needed to avoid double free issue if dst gc is removed and dst_release() directly destroys dst when dst->__refcnt drops to 0. In tx path, TCP hold sk->sk_rx_dst ref count and also hold sock_lock(). UDP and other similar protocols always hold refcount for skb->_skb_refdst. So both paths seem to be safe. In rx path, as it is lockless and skb_dst_set_noref() is likely to be used, dst_hold_safe() should always be used when trying to hold dst. In the routing code, if dst is held during an rcu protected session, it is necessary to call dst_hold_safe() as the current dst might be in its rcu grace period. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/route.h | 4 +++- net/ipv4/route.c | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 95c47f9cf5e028d1ae77dc6c767c1edc8a18025b Author: Wei Wang Date: Sat Jun 17 10:42:30 2017 -0700 ipv4: call dst_dev_put() properly As the intend of this patch series is to completely remove dst gc, we need to call dst_dev_put() to release the reference to dst->dev when removing routes from fib because we won't keep the gc list anymore and will lose the dst pointer right after removing the routes. Without the gc list, there is no way to find all the dst's that have dst->dev pointing to the going-down dev. Hence, we are doing dst_dev_put() immediately before we lose the last reference of the dst from the routing code. The next dst_check() will trigger a route re-lookup to find another route (if there is any). Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 2 ++ net/ipv4/route.c | 4 ++++ 2 files changed, 6 insertions(+) commit 0830106c53900181d336350581119af09e123bf3 Author: Wei Wang Date: Sat Jun 17 10:42:29 2017 -0700 ipv4: take dst->__refcnt when caching dst in fib In IPv4 routing code, fib_nh and fib_nh_exception can hold pointers to struct rtable but they never increment dst->__refcnt. This leads to the need of the dst garbage collector because when user is done with this dst and calls dst_release(), it can only decrement dst->__refcnt and can not free the dst even it sees dst->__refcnt drops from 1 to 0 (unless DST_NOCACHE flag is set) because the routing code might still hold reference to it. And when the routing code tries to delete a route, it has to put the dst to the gc_list if dst->__refcnt is not yet 0 and have a gc thread running periodically to check on dst->__refcnt and finally to free dst when refcnt becomes 0. This patch increments dst->__refcnt when fib_nh/fib_nh_exception holds reference to this dst and properly release the dst when fib_nh/fib_nh_exception has been updated with a new dst. This patch is a preparation in order to fully get rid of dst gc later. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 5 ++++- net/ipv4/route.c | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) commit 4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36 Author: Wei Wang Date: Sat Jun 17 10:42:28 2017 -0700 net: introduce a new function dst_dev_put() This function should be called when removing routes from fib tree after the dst gc is no longer in use. We first mark DST_OBSOLETE_DEAD on this dst to make sure next dst_ops->check() fails and returns NULL. Secondly, as we no longer keep the gc_list, we need to properly release dst->dev right at the moment when the dst is removed from the fib/fib6 tree. It does the following: 1. change dst->input and output pointers to dst_discard/dst_dscard_out to discard all packets 2. replace dst->dev with loopback interface Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/dst.h | 1 + net/core/dst.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit 5f56f409b5142bb4e88e1f64dedeb4a76c678177 Author: Wei Wang Date: Sat Jun 17 10:42:27 2017 -0700 net: introduce DST_NOGC in dst_release() to destroy dst based on refcnt The current mechanism of freeing dst is a bit complicated. dst has its ref count and when user grabs the reference to the dst, the ref count is properly taken in most cases except in IPv4/IPv6/decnet/xfrm routing code due to some historic reasons. If the reference to dst is always taken properly, we should be able to simplify the logic in dst_release() to destroy dst when dst->__refcnt drops from 1 to 0. And this should be the only condition to determine if we can call dst_destroy(). And as dst is always ref counted, there is no need for a dst garbage list to hold the dst entries that already get removed by the routing code but are still held by other users. And the task to periodically check the list to free dst if ref count become 0 is also not needed anymore. This patch introduces a temporary flag DST_NOGC(no garbage collector). If it is set in the dst, dst_release() will call dst_destroy() when dst->__refcnt drops to 0. dst_hold_safe() will also check for this flag and do atomic_inc_not_zero() similar as DST_NOCACHE to avoid double free issue. This temporary flag is mainly used so that we can make the transition component by component without breaking other parts. This flag will be removed after all components are properly transitioned. This patch also introduces a new function dst_release_immediate() which destroys dst without waiting on the rcu when refcnt drops to 0. It will be used in later patches. Follow-up patches will correct all the places to properly take ref count on dst and mark DST_NOGC. dst_release() or dst_release_immediate() will be used to release the dst instead of dst_free() and its related functions. And final clean-up patch will remove the DST_NOGC flag. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/dst.h | 5 ++++- net/core/dst.c | 20 ++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) commit 1dbe32525e26ec28d2cc17f65a90fc7b53f1f8d0 Author: Wei Wang Date: Sat Jun 17 10:42:26 2017 -0700 net: use loopback dev when generating blackhole route Existing ipv4/6_blackhole_route() code generates a blackhole route with dst->dev pointing to the passed in dst->dev. It is not necessary to hold reference to the passed in dst->dev because the packets going through this route are dropped anyway. A loopback interface is good enough so that we don't need to worry about releasing this dst->dev when this dev is going down. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv4/route.c | 2 +- net/ipv6/route.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit d24406c85d123df773bc4df88ad5da2233896919 Author: Wei Wang Date: Sat Jun 17 10:42:25 2017 -0700 udp: call dst_hold_safe() in udp_sk_rx_set_dst() In udp_v4/6_early_demux() code, we try to hold dst->__refcnt for dst with DST_NOCACHE flag. This is because later in udp_sk_rx_dst_set() function, we will try to cache this dst in sk for connected case. However, a better way to achieve this is to not try to hold dst in early_demux(), but in udp_sk_rx_dst_set(), call dst_hold_safe(). This approach is also more consistant with how tcp is handling it. And it will make later changes simpler. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv4/udp.c | 19 +++++++++---------- net/ipv6/udp.c | 11 +++++------ 2 files changed, 14 insertions(+), 16 deletions(-) commit 1758fd4688eb92c796e75bdb1d256dc558ef9581 Author: Wei Wang Date: Sat Jun 17 10:42:24 2017 -0700 ipv6: remove unnecessary dst_hold() in ip6_fragment() In ipv6 tx path, rcu_read_lock() is taken so that dst won't get freed during the execution of ip6_fragment(). Hence, no need to hold dst in it. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 4 ---- 1 file changed, 4 deletions(-) commit 6db53373884327f0457d90aa665d249a11461b07 Author: Fabio Estevam Date: Sat Jun 17 18:02:54 2017 -0300 ARM: imx_v6_v7_defconfig: Select CONFIG_IMX7D_ADC Select CONFIG_IMX7D_ADC so that the i.MX7 ADC driver can be built by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit d8710c3fb912574709166bba24f4c64162ab832c Author: Christopher Spinrath Date: Tue May 30 22:16:01 2017 +0200 ARM: dts: imx6q-cm-fx6: add sdio wifi/bt nodes The cm-fx6 module has an on-board AW-NH387 WiFi/BT module which is based on Marvell's SD8787 chip and is connected to the usdhc1 controller. Unfortunately, the chip gets unresponsive if the Bluetooth AMP (Alternate Mac/Phy) function gets probed but the loaded firmware doesn't support it. For instance, this is the case for the most recent firmware in linux-firmware (Version 14.66.35.p52). Thus, just add the required nodes but leave the usdhc1 node disabled explicitly. Users who disabled the Bluetooth (AMP) support of their OS can then conveniently enable WiFi (or even plain Bluetooth) support with a simple device tree overlay/bootloader configuration. Signed-off-by: Christopher Spinrath Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-cm-fx6.dts | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 2446563c74f8c059fd4da4abeaa537f09033b5ec Author: Fabio Estevam Date: Fri Jun 16 11:58:46 2017 -0300 dmaengine: Kconfig: Simplify the help text for MXS_DMA Currently the help text for the MXS_DMA option is incomplete as it does not mention MX6SX, MX6ULL and MX7D, for example. Instead of extending this list everytime a new SoC comes out, let's keep the text more generic. Signed-off-by: Fabio Estevam Signed-off-by: Vinod Koul drivers/dma/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d43674ecc002b49926f216cb414cff2d230ca3fb Author: Matthias Kaehlcke Date: Thu Jun 15 16:55:57 2017 -0700 dmaengine: pl330: Delete unused functions The functions _queue_empty(), _emit_ADDH(), _emit_NOP(), _emit_STZ() and _emit_WFE() are not used. Delete them. Signed-off-by: Matthias Kaehlcke Signed-off-by: Vinod Koul drivers/dma/pl330.c | 67 ----------------------------------------------------- 1 file changed, 67 deletions(-) commit fd0238cfc0483ce040302562c7790be7d909b7c6 Author: Andreas Färber Date: Wed Feb 15 13:45:03 2017 +0100 dt-bindings: arm: Document Actions Semi S500 The Actions Semi S500 is a quad-core ARM Cortex-A9 SoC. The LeMaker Guitar is an SODIMM-format module with that SoC. Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/arm/actions.txt | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 67209775bbbf30bb2b33b0071f9a50280fa6315e Author: Andreas Färber Date: Tue Feb 14 22:20:50 2017 +0100 dt-bindings: Add vendor prefix for Actions Semi Actions Semiconductor was listed on NASDAQ as ACTS until Dec 16, 2016. Cc: mp-cs@actions-semi.com Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 51c9fbe69486c9143877f5d26a575b16588eb08a Author: Rob Clark Date: Tue Jun 13 08:59:11 2017 -0400 bus: SIMPLE_PM_BUS does not depend on ARCH_RENESAS In fact, it is needed for PCI to work on msm8996 (and probably other things). No idea why it was depending on renesas but that doesn't make any sense. So drop the dependency. Signed-off-by: Rob Clark Acked-by: Bjorn Andersson Acked-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Arnd Bergmann drivers/bus/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 0e08270a1f01bceae17d32a0d75aad2388bd1ba2 Author: Sushmita Susheelendra Date: Tue Jun 13 16:52:54 2017 -0600 drm/msm: Separate locking of buffer resources from struct_mutex Buffer object specific resources like pages, domains, sg list need not be protected with struct_mutex. They can be protected with a buffer object level lock. This simplifies locking and makes it easier to avoid potential recursive locking scenarios for SVM involving mmap_sem and struct_mutex. This also removes unnecessary serialization when creating buffer objects, and also between buffer object creation and GPU command submission. Signed-off-by: Sushmita Susheelendra [robclark: squash in handling new locking for shrinker] Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 8 +- drivers/gpu/drm/msm/adreno/a5xx_power.c | 8 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 4 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 2 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 2 - drivers/gpu/drm/msm/msm_drv.c | 1 + drivers/gpu/drm/msm/msm_drv.h | 9 +- drivers/gpu/drm/msm/msm_fbdev.c | 6 +- drivers/gpu/drm/msm/msm_gem.c | 274 +++++++++++++++++++------------ drivers/gpu/drm/msm/msm_gem.h | 22 +++ drivers/gpu/drm/msm/msm_gem_shrinker.c | 16 +- drivers/gpu/drm/msm/msm_gem_submit.c | 6 +- drivers/gpu/drm/msm/msm_gem_vma.c | 10 +- drivers/gpu/drm/msm/msm_gpu.c | 4 +- drivers/gpu/drm/msm/msm_rd.c | 4 +- drivers/gpu/drm/msm/msm_ringbuffer.c | 2 +- 17 files changed, 238 insertions(+), 144 deletions(-) commit 4fcee14d3802b60f22baf1aeab9f1cff08834c56 Author: Peter Korsgaard Date: Fri Jun 16 14:39:57 2017 +0200 ARM: dts: kirkwood: Fix Openblock A6 nand partition overlap The "test" and "conf" nand partitions partly overlap: Creating 6 MTD partitions on "orion_nand": 0x000000000000-0x000000090000 : "uboot" 0x000000090000-0x0000000d4000 : "env" 0x0000000d4000-0x0000000f8000 : "test" 0x0000000f4000-0x0000004f4000 : "conf" That is unlikely to be desired, and not matching the partition map used in u-boot - So adjust the test partition size to fix this. Signed-off-by: Peter Korsgaard Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f66b2aff46eaf0825dbe1560e28fcb845dd2a215 Author: Antoine Tenart Date: Thu Jun 15 16:43:26 2017 +0200 arm64: dts: marvell: add xmdio nodes for 7k/8k Add the description of the xMDIO bus for the Marvell Armada 7k and Marvell Armada 8k; for both CP110 slave and master. This bus is found on Marvell Ethernet controllers and provides an interface with the xMDIO bus. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 8 ++++++++ arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 8 ++++++++ 2 files changed, 16 insertions(+) commit c7c3d6731f7dd6c7a7b17179a8176584b0d795c2 Author: Antoine Tenart Date: Thu Jun 15 14:10:04 2017 +0200 arm64: dts: marvell: add a comment on the cp110 slave node status The cryptographic engine found on the cp110 slave is disabled by default because of some known limitations. Add a comment to explain why it is disabled by default. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit b97afaf69e6d47c69ef1448c9b1c431f0d2b5ea3 Author: Antoine Tenart Date: Thu Jun 15 14:10:03 2017 +0200 arm64: dts: marvell: remove cpm crypto nodes from dts files The cryptographic engine on the master cp110 is now enabled by default at the SoC level. Remove its dts nodes that were only enabling it. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 4 ---- arch/arm64/boot/dts/marvell/armada-8040-db.dts | 4 ---- 2 files changed, 8 deletions(-) commit bcd0256473af8d8efa107a6f8af34b63c50300f6 Author: Antoine Tenart Date: Thu Jun 15 14:10:02 2017 +0200 arm64: dts: marvell: cp110: enable the crypto engine at the SoC level Enable the cryptographic engine at the SoC level on the master cp110. This engine is always present and do not depends on any pinmux configuration. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 - 1 file changed, 1 deletion(-) commit 07d065abf93dbced17d189f7c830467ca559c81d Author: Gregory CLEMENT Date: Thu Jun 8 12:29:51 2017 +0200 arm64: dts: marvell: armada-3720-db: Add vqmmc regulator for SD slot By adding this regulator, the SD cards are usable at higher speed protocols such as SDR104. This patch was tested with an SD HC card compatible with UHS-I. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1208d2f0c84120d4e3eb2caf663a9a8b784b38ba Author: Konstantin Porotchkin Date: Tue May 23 16:11:40 2017 +0300 arm64: dts: marvell: Enable second SDHCI controller in Armada 37xx The Armada 37xx SoCs has 2 SDHCI interfaces. This patch adds the second one. Moreover, the Armada 37xx DB v2 board populates the 2 SDHCI interfaces. The second interface is using pluggable module that can either have an SD connector or eMMC on it. This patch adds support for SD module in the device DT. [ gregory.clement@free-electrons.com: - Add more detail in commit log - Sort the dt node in address order - Document the SD slot in the dts ] Signed-off-by: Konstantin Porotchkin Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 9 +++++++++ arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 11 +++++++++++ 2 files changed, 20 insertions(+) commit e9bfac543eaa01cdca7b810b9cd4eaf9e6a7f1b0 Author: Gregory CLEMENT Date: Tue Jun 13 14:25:46 2017 +0200 arm64: dts: marvell: armada-37xx: Use angle bracket for each register set When several groups of register address and size are used with reg, then surround each one by angle bracket. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 55ad5b1ae9745ed14715d832580d4551fefe2481 Author: Gregory CLEMENT Date: Tue Jun 13 12:34:03 2017 +0200 arm64: dts: marvell: armada-37xx: Align the compatible string This cosmetic patch aligns the compatible string when there are on several lines. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 718e46395c66959a88f2e450dad21cfb03ee4f48 Author: Gregory CLEMENT Date: Thu Jun 8 15:51:56 2017 +0200 arm64: dts: marvell: armada-3720-db: Add information about the V2 board The initial device tree file was for the board V1.4. Now the V2.0 board is also available. The same dtb will work for both, but the CON number have changed, so update the comment in the dts to reflect this. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 483b4da2bf1d62d2e71e1836bc0299cf2f3200dc Author: Gregory CLEMENT Date: Thu Jun 8 12:56:23 2017 +0200 arm64: dts: marvell: armada-3720-db: Sort the dts node alphabetically Sort the reference nodes in alphabetical order to ease the merge of future nodes. Reviewed-by: Andreas Färber Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 83 +++++++++++++------------- 1 file changed, 41 insertions(+), 42 deletions(-) commit 5526bdc64141ab28784918533f8aee7f3fa7652d Author: Antoine Tenart Date: Thu Jun 8 12:04:55 2017 +0200 arm64: dts: marvell: disable the mdio nodes by default Disable the mdio nodes by default in the cp110 slave and master dtsi as they're not wired on every board. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 1 + 2 files changed, 2 insertions(+) commit 3c6912cdc88f0837caf1a55dec5845fc2f84be3a Author: Antoine Tenart Date: Thu Jun 8 12:04:54 2017 +0200 arm64: dts: marvell: explicitly enable the mdio nodes for 7k/8k DB Explicitly enable the MDIO nodes in the Marvell Armada 7k DB and Marvell Armada 8k DB. This is needed as the MDIO nodes will be disabled in the CP 110 slave and master dtsi by a following up patch. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 2 ++ arch/arm64/boot/dts/marvell/armada-8040-db.dts | 4 ++++ 2 files changed, 6 insertions(+) commit b1a97f86b7359da7bbd7a8dd2900d62352c04644 Author: Antoine Tenart Date: Wed May 24 16:10:33 2017 +0200 arm64: dts: marvell: add dma-mask in crypto nodes for 7k/8k The EIP197 cryptographic engine supports 64 bits address width but is limited to 40 bits on 7k/8k. Add a dma-mask property in the cryptographic engine nodes to reflect this. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 1 + 2 files changed, 2 insertions(+) commit 2a32465912d49024653f2c1a5117f3323be2b65b Author: Marc Zyngier Date: Thu Jun 8 11:42:43 2017 +0100 arm64: dts: marvell: 8040-mcbin: Enable 1GB Ethernet Enable the 1GB Ethernet interface that lives on the slave CP110, with its corresponding phy (that oddly lives on the master CP110). Signed-off-by: Marc Zyngier Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit e21a3b543701c2781ff689c640a1cf73d7baf7d1 Author: Russell King Date: Tue Jun 6 11:57:15 2017 +0200 arm64: dts: marvell: cp110: add required clocks for mdio interface Add the three required clocks for the MDIO interface to be functional on Armada 8k platforms. Without this, the CPU hangs, causing RCU stalls or the system to become unresponsive. Signed-off-by: Russell King [Thomas: - remove mg_core_clock, since it's a parent of mg_clock - also add clock references to the slave CP mdio instance] Signed-off-by: Thomas Petazzoni Tested-by: Marc Zyngier Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 1 + 2 files changed, 2 insertions(+) commit 3675fb5980bf98136aa7e49f373faf57a19e3ba0 Author: Gregory CLEMENT Date: Wed May 31 16:07:28 2017 +0200 arm64: dts: marvell: use new binding for the system controller on ap806 The new binding for the system controller on ap806 moved the clock into a subnode. This preliminary step will allow to add gpio and pinctrl subnodes Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 952eaa509dee29db9e3ac8b45c2087450a7ded10 Author: Gregory CLEMENT Date: Wed May 31 16:07:27 2017 +0200 arm64: dts: marvell: remove clock-output-names on ap806 The clock-output-names of the ap806-system-controller node are not used anymore, so remove them. Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit 4f08187d8cc97ada0992f855ad8d98c75bd7bb8d Author: Marcin Wojtas Date: Tue May 16 01:28:33 2017 +0200 arm64: dts: marvell: add second 1G port on the Armada 8040 DB Armada 8040 DB is equipped with 4 (2x 10G SFI + 2x 1G RGMII) ethernet ports of which only one was hitherto enabled. Because currently mvpp2 driver is capable of supporting only 1G RGMII/SGMII, enable second port from CP slave HW block. Signed-off-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-db.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 5298304102d12277888be6cc3fa1f333f7cc3f65 Author: Russell King Date: Tue May 16 14:45:30 2017 +0100 arm64: dts: marvell: mcbin: add sdhci Add sdhci support for MACCHIATOBin boards. This uses the AP806 SDHCI for eMMC and CP110 master for the SD card slot. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit b7a3768b6b7ceac8d8d176fad15b9542a4ccc3e8 Author: Thomas Petazzoni Date: Fri May 5 11:55:08 2017 +0200 arm64: dts: marvell: add clocks for Armada AP806 XOR engines The XORv2 engines in the AP side of the Armada 7K/8K SoCs are using the AP MS core clock as input, so this commit adds the appropriate clocks properties. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 97800cf8b6a81cf17ad216ec9d0c8e78c68b7aef Author: Javier Martinez Canillas Date: Tue May 23 15:34:32 2017 +0200 ARM: dts: turris-omnia: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41c8652096268988207d4fa13ee9236c9980d34d Author: Ralph Sennhauser Date: Wed May 24 08:16:46 2017 +0200 ARM: dts: mvebu: add support for Linksys WRT3200ACM (Rango) The Linksys WRT3200ACM (Rango) is the lates Armada-385 based router in the Linksys WRT AC Series which got released in October 2016. Key differences to the earlier Armada-385 based devices in the series is a bigger flash chip, next generation wireless modules (Marvell 88W8964) in the mini pcie slots as well as a Marvell SD8887. Finally the CPU is clocked at 1866 GHz by default. The file armada-385-linksys-rango.dts is loosly based off of a DTS authored by Imre Kaloz. As Rango is part of the armada-385-linksys family of boards use the armada-385-linksys.dtsi as basis. As for functional differences to Imre Kaloz dts, the wlan LEDs aren't connected to the expander chip pca9635 but directly to GPIOs. Then mpp47 controls the USB2.0 port and not the USB3.0 port, so use the correct GPIO mpp44 for it. Finally use non-removable instead of broken-cd with the sdhci node to avoid polling. Other changes can be categorized as just cleanup / reorganization due to using the armada-385-linksys.dtsi. URL: https://github.com/openwrt/openwrt/blob/0abc3fa5a996daf7dafdc7794ccfe3fa7e955c5a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-rango.dts Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/armada-385-linksys-rango.dts | 203 +++++++++++++++++++++++++ 2 files changed, 204 insertions(+) commit b2758f8edbf87f964825de1119887d9deb56dbaa Author: Ralph Sennhauser Date: Sun May 21 14:49:00 2017 +0200 ARM: dts: armada-385-linksys: fixup button node names Buttons don't have a reg property; drop pseudo address and fixup names of individual button nodes. Also drop #address-cells and #size-cells properties. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1216132f4dd57a4a6b8557ce2dbc64758b433991 Author: Ralph Sennhauser Date: Sun May 21 14:48:59 2017 +0200 ARM: dts: armada-385-linksys: group pins in pinctrl A pin group per node is sufficient, further specialization only serves as documentation which can be a comment just as well. This simplifies configuring pins for nodes in dependants. Also use labels which end up right by the node they are intended for. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit bf6c959eb43ebe8d8ea4fac6d622a70f3ddc8e63 Author: Ralph Sennhauser Date: Sun May 21 14:48:58 2017 +0200 ARM: dts: armada-385-linksys: partition layout is board specific Move the partition layout to individual boards. The Linksys WRT 3200 ACM (Rango) comes with a 256MiB nand flash chip and different layout. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys-caiman.dts | 67 +++++++++++++++++++++++++ arch/arm/boot/dts/armada-385-linksys-cobra.dts | 67 +++++++++++++++++++++++++ arch/arm/boot/dts/armada-385-linksys-shelby.dts | 67 +++++++++++++++++++++++++ arch/arm/boot/dts/armada-385-linksys.dtsi | 64 +---------------------- 4 files changed, 202 insertions(+), 63 deletions(-) commit 0ebbb9575ac6bafa1219a4ae81639712bb3054cb Author: Ralph Sennhauser Date: Sun May 21 14:48:57 2017 +0200 ARM: dts: armada-385-linksys: use binary unit prefixes Use IEEE 1541-2002 unit prefixes for sizes. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 4c38d10c75bc196c703643f72669d9be0d11e4e5 Author: Ralph Sennhauser Date: Sun May 21 14:48:56 2017 +0200 ARM: dts: armada-385-linksys: drop legacy DSA bindings The new ones work so there is little reason to keep the legacy bindings. Use the rework as the opportunity to drop the legacy node. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 47 ------------------------------- 1 file changed, 47 deletions(-) commit da3ac208f88af4302ca36e0d4bf6e621aa557e71 Author: Ralph Sennhauser Date: Sun May 21 14:48:55 2017 +0200 ARM: dts: armada-385-linksys: usb3 label cleanup Now that we use the reference for the USB3.0 port update the node name and labels for the phy and vbus to match the label used by armada-38x.dtsi. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a43df48fbee96179bc0a90762b761c23be67d836 Author: Ralph Sennhauser Date: Sun May 21 14:48:54 2017 +0200 ARM: dts: armada-385-linksys: bm pools by label order Which pools we assing doesn't matter. Use the order which doesen't leave a chance for questions for first time readers. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 70fd74252ed7b056fe44097e6ff76b23a530cc94 Author: Ralph Sennhauser Date: Sun May 21 14:48:53 2017 +0200 ARM: dts: armada-385-linksys: drop redundant properties in dependants Drop redundant declaration of #address-cells and #size-cells. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys-caiman.dts | 3 --- arch/arm/boot/dts/armada-385-linksys-cobra.dts | 3 --- arch/arm/boot/dts/armada-385-linksys-shelby.dts | 3 --- 3 files changed, 9 deletions(-) commit ecdcd24864ca42d6f4ebd7cb6e340c6333b51a79 Author: Ralph Sennhauser Date: Sun May 21 14:48:52 2017 +0200 ARM: dts: armada-385-linksys: flatten dependants Flatten dts of individual boards to match the new style used in armada-385-linksys.dtsi and for the Rango addition. * Caiman - Linksys WRT1200AC v1 & v2 * Cobra - Linksys WRT1900AC v2 * Shelby - Linksys WRT1900ACS v1 & v2 Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys-caiman.dts | 99 ++++++++++++------------- arch/arm/boot/dts/armada-385-linksys-cobra.dts | 99 ++++++++++++------------- arch/arm/boot/dts/armada-385-linksys-shelby.dts | 99 ++++++++++++------------- 3 files changed, 138 insertions(+), 159 deletions(-) commit 77c82b5f83e07591710f43abf4c85e1897f2114d Author: Ralph Sennhauser Date: Sun May 21 14:48:51 2017 +0200 ARM: dts: armada-385-linksys: label nodes Add labels to nodes used by dependants. Also rename node gpio_keys to gpio-keys to match the style of the rest of the file as well as the documented example. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a90c9eaefbe732c33a441fdc99352a7ddf3bf355 Author: Ralph Sennhauser Date: Sun May 21 14:48:50 2017 +0200 ARM: dts: armada-385-linksys: flatten dtsi Since the addition of the spi reference two styles are used. Use references instead of recreating the same structure over and over again. This helps to distinguish which are changes to the underlying nodes and which are new additions and helps maintainability in general. Verified the resulting dtb to be binary identical. Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 414 +++++++++++++++--------------- 1 file changed, 206 insertions(+), 208 deletions(-) commit 3bef2ac4bda818be598e6d1084750015d26edac9 Author: Chris Packham Date: Fri Apr 21 09:58:14 2017 +1200 ARM: dts: mvebu: disable the rtc on 98dx3236 SoC There is no rtc for the 98dx3236 and derivative SoCs. Disable the rtc node inherited from the armada-370-xp base. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 948e7d98e666fe8bfca5102d813053553e9866a6 Author: Chris Packham Date: Fri Apr 21 09:58:13 2017 +1200 ARM: dts: mvebu: add missing interrupt to 98dx4251 switch The 98dx4251 has 4 interrupts for the packet processor whereas the 98dx3236 and 98dx3336 only have 3. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-98dx4251.dtsi | 1 + 1 file changed, 1 insertion(+) commit 8035eaadefc69a8add75f1fecc8e63e36bab81ea Author: Andrew Lunn Date: Fri Apr 14 17:40:55 2017 +0200 ARM: dts: armada-xp: Use pwm-fan rather than gpio-fan The mvebu GPIO driver can also perform PWM on some pins. Use the pwm-fan driver to control the fan of the WRT1900AC, giving us finer grained control over its speed and hence noise. Signed-off-by: Andrew Lunn URL: https://patchwork.ozlabs.org/patch/427291/ [Ralph Sennhauser: drop flags paramter from pwms, no longer used] Signed-off-by: Ralph Sennhauser Tested-by: Andrew Lunn Acked-by: Linus Walleij Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 7cb2acb3fbae5e499a619406a13fe856e3b0b07a Author: Ralph Sennhauser Date: Thu Jun 1 22:10:30 2017 +0200 ARM: dts: mvebu: Add PWM properties for armada-38x Add the required properties to the GPIO nodes for them to be used as PWM lines. Signed-off-by: Ralph Sennhauser Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-38x.dtsi | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 0c8c9ff8ec8eb1b41817bd547895e360b66853d6 Author: Andrew Lunn Date: Thu Jun 1 22:09:26 2017 +0200 ARM: dts: mvebu: Add PWM properties to .dtsi files Add properties to the GPIO nodes for Armada 370/XP to allow them to be also used as PWM lines. Signed-off-by: Andrew Lunn URL: https://patchwork.ozlabs.org/patch/427294/ [Ralph Sennhauser: Add new compatible string marvell,armada-370-gpio] Signed-off-by: Ralph Sennhauser Tested-by: Andrew Lunn Acked-by: Linus Walleij Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370.dtsi | 19 ++++++++++++++----- arch/arm/boot/dts/armada-xp-mv78230.dtsi | 16 ++++++++++++---- arch/arm/boot/dts/armada-xp-mv78260.dtsi | 19 ++++++++++++++----- arch/arm/boot/dts/armada-xp-mv78460.dtsi | 19 ++++++++++++++----- 4 files changed, 54 insertions(+), 19 deletions(-) commit 4cdcf1efcc2623c7a5358d38d71aecc8bed32b7e Author: Andrew Lunn Date: Fri Apr 14 17:40:54 2017 +0200 ARM: mvebu: Enable SENSORS_PWM_FAN in defconfig Now that the GPIO driver also supports PWM operation, enable the PWM framework and fan driver in mvebu_v7_defconfig. Signed-off-by: Andrew Lunn URL: https://patchwork.ozlabs.org/patch/427297/ [Ralph Sennhauser: add fan driver to defconfig] Signed-off-by: Ralph Sennhauser Tested-by: Andrew Lunn Acked-by: Linus Walleij Signed-off-by: Gregory CLEMENT arch/arm/configs/mvebu_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 7df1bb87b8cb0b618e4b5964f89d81d8ce52c58e Author: Ben Skeggs Date: Sat Jun 17 11:19:22 2017 +1000 drm/nouveau/disp/nv50-: avoid creating ORs that aren't present on HW Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dacgf119.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 11 ++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 11 ++++++++++- 14 files changed, 39 insertions(+), 10 deletions(-) commit ae6dc7deac2a8639595437af3df5fade878a1601 Author: Gabriele Paoloni Date: Tue May 23 15:23:59 2017 +0100 PCI/portdrv: Allocate MSI/MSI-X vector for Downstream Port Containment Currently pcie_port_enable_irq_vec() only allocates MSI/MSI-X vectors for PME, hotplug, and AER. The Downstream Port Containment feature also supports MSI/MSI-X interrupts, so allocate a vector for it, too. Signed-off-by: Liudongdong Signed-off-by: Gabriele Paoloni [bhelgaas: changelog, comment] Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pcie/portdrv_core.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 37dbaa67d847380f524a418826f41e2bca117008 Author: Krzysztof Kozlowski Date: Tue Jun 13 18:29:25 2017 +0200 dt-bindings: usb: exynos-usb: Add missing required VDD properties Since commit bd8ce544ec35 ("usb: dwc3: exynos: Make provision for vdd regulators") vdd33-supply and vdd10-supply are required so document them in bindings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/exynos-usb.txt | 4 ++++ 1 file changed, 4 insertions(+) commit f4d342cf900a95907a8b5aa84bbe9898160eb497 Author: Hans de Goede Date: Thu Jun 15 08:48:31 2017 +0200 platform/x86: silead_dmi: Add touchscreen info for PoV mobii wintab p800w Add touchscreen info for the Point of View mobii wintab p800w tablet. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/silead_dmi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 46c26662d2fb8377f5d387cf2e5ee3246af780b7 Author: Rodrigo Vivi Date: Fri Jun 16 15:49:58 2017 -0700 drm/i915/cfl: Introduce Coffee Lake workarounds. Coffee Lake inherit most of Kabylake production workarounds. v2: Fix typo on commit message and remove WaDisableKillLogic and GEN9_DISABLE_OCL_OOB_SUPPRESS_LOGIC, since as Mika pointed out they shouldn't be here for cfl according to BSpec. Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1497653398-15722-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/intel_engine_cs.c | 81 +++++++++++++++++++++++++--------- 2 files changed, 60 insertions(+), 23 deletions(-) commit a1d5f18cafe6b81696e60ca4901709d2f807362c Author: Gabriele Paoloni Date: Tue May 23 15:23:58 2017 +0100 PCI/portdrv: Support multiple interrupts for MSI as well as MSI-X Root Ports can generate several different interrupts using either MSI or MSI-X, but we only support that for MSI-X. Ports that support MSI but not MSI-X are currently limited to sharing a single interrupt. Rename pcie_port_enable_msix() to pcie_port_enable_irq_vec() and extend it to support multiple interrupts using either MSI-X (preferred) or MSI. Signed-off-by: Gabriele Paoloni [bhelgaas: changelog, reword comments, simplify PME/hotplug no-MSI logic] Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pcie/portdrv.h | 7 ++-- drivers/pci/pcie/portdrv_core.c | 77 ++++++++++++++++++++++++----------------- 2 files changed, 49 insertions(+), 35 deletions(-) commit 4dea04c1f113a848cec8722d2401127227623820 Merge: ef748cb 215c80a Author: Stephen Boyd Date: Fri Jun 16 15:01:46 2017 -0700 Merge tag 'meson-clk-for-4.13-2' of git://github.com/BayLibre/clk-meson into clk-next Pull Amlogic clk driver updates from Jerome Brunet: * Expose more clock gate on meson8 (SAR ADC, RNG, USB, SDIO, ETH) * Add new compatible to the meson8 clock controller for meson8b * Add missing parents to gxbb clk81 * tag 'meson-clk-for-4.13-2' of git://github.com/BayLibre/clk-meson: clk: meson: gxbb: add all clk81 parents clk: meson: meson8b: add compatibles for Meson8 and Meson8m2 clk: meson8b: export the ethernet gate clock clk: meson8b: export the USB clocks clk: meson8b: export the gate clock for the HW random number generator clk: meson8b: export the SDIO clock clk: meson8b: export the SAR ADC clocks commit be8647d2bea48a15a685c855dda33d22e9550493 Author: Corey Minyard Date: Fri Jun 16 16:38:20 2017 -0500 ipmi:ssif: Use i2c_adapter_id instead of adapter->nr Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_ssif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ef748cb39d96e96094c09d15cc50e4d7c63a606f Merge: 4dc6e1a 1c881b5 Author: Stephen Boyd Date: Fri Jun 16 14:52:02 2017 -0700 Merge branch 'for-4.13-ti-clkctrl' of https://github.com/t-kristo/linux-pm into clk-next * 'for-4.13-ti-clkctrl' of https://github.com/t-kristo/linux-pm: clk: ti: omap4: add clkctrl clock data dt-bindings: clk: add omap4 clkctrl definitions clk: ti: add support for clkctrl clocks Documentation: dt-bindings: Add binding documentation for TI clkctrl clocks commit 4dc6e1a356a7d3cb4f9f4bfa5a305a48fcefaff1 Author: Stephen Boyd Date: Fri Jun 16 14:50:41 2017 -0700 clk: sunxi-ng: Staticize ccu_mux_helper_unapply_prediv() It isn't used outside of this file right now. Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/ccu_mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a02fcf8a0ad4009c27c047deda7eca25430f963 Merge: 9c861f3 06e226c Author: Stephen Boyd Date: Fri Jun 16 14:45:27 2017 -0700 Merge tag 'sunxi-clk-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-next Pull Allwinner clock patches from Maxime Ripard: Some new clock units are supported, for the display clocks unsed in the newer SoCs, and the A83T PRCM. There is also a bunch of minor fixes for clocks that are not used by anyone, and reworks needed by drivers that will land in 4.13. * tag 'sunxi-clk-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (21 commits) clk: sunxi-ng: Move all clock types to a library clk: sunxi-ng: a83t: Add support for A83T's PRCM dt-bindings: clock: sunxi-ccu: Add compatible string for A83T PRCM clk: sunxi-ng: select SUNXI_CCU_MULT for sun8i-a83t clk: sunxi-ng: a83t: Fix audio PLL divider offset clk: sunxi-ng: a83t: Fix PLL lock status register offset clk: sunxi-ng: Add driver for A83T CCU clk: sunxi-ng: Support multiple variable pre-dividers dt-bindings: clock: sunxi-ccu: Add compatible string for A83T CCU clk: sunxi-ng: de2: fix wrong pointer passed to PTR_ERR() clk: sunxi-ng: sun5i: Export video PLLs clk: sunxi-ng: mux: Re-adjust parent rate clk: sunxi-ng: mux: Change pre-divider application function prototype clk: sunxi-ng: mux: split out the pre-divider computation code clk: sunxi-ng: mux: Don't just rely on the parent for CLK_SET_RATE_PARENT clk: sunxi-ng: div: Switch to divider_round_rate clk: sunxi-ng: Pass the parent and a pointer to the clocks round rate clk: divider: Make divider_round_rate take the parent clock clk: sunxi-ng: explicitly include linux/spinlock.h clk: sunxi-ng: add support for DE2 CCU ... commit 99b3c58f7ba7fae801e501b45c5fcf6e08d9247f Author: Piotr Gregor Date: Fri May 26 22:02:25 2017 +0100 PCI: Test INTx masking during enumeration, not at run-time The test for INTx masking via PCI_COMMAND_INTX_DISABLE performed in pci_intx_mask_supported() should be done before the device can be used. This is to avoid writing PCI_COMMAND while the driver owns the device, in case that has any effect on MSI/MSI-X interrupts. Move the content of pci_intx_mask_supported() to pci_intx_mask_broken() and call it from pci_setup_device(). The test result can be queried at any time later using the same pci_intx_mask_supported() interface as before (though with changed implementation), so callers (uio, vfio) should be unaffected. Signed-off-by: Piotr Gregor [bhelgaas: changelog, remove quirk check, remove locking, move dev->broken_intx_masking assignment to caller] Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson Acked-by: Michael S. Tsirkin drivers/pci/pci.c | 42 +----------------------------------------- drivers/pci/probe.c | 30 ++++++++++++++++++++++++++++++ include/linux/pci.h | 12 ++++++++++-- 3 files changed, 41 insertions(+), 43 deletions(-) commit 660e855813f78b7fe63ff1ebc4f2ca07d94add0b Author: Dave Airlie Date: Mon Mar 13 22:18:15 2017 +0000 amdgpu: use drm sync objects for shared semaphores (v6) This creates a new command submission chunk for amdgpu to add in and out sync objects around the submission. Sync objects are managed via the drm syncobj ioctls. The command submission interface is enhanced with two new chunks, one for syncobj pre submission dependencies, and one for post submission sync obj signalling, and just takes a list of handles for each. This is based on work originally done by David Zhou at AMD, with input from Christian Konig on what things should look like. In theory VkFences could be backed with sync objects and just get passed into the cs as syncobj handles as well. NOTE: this interface addition needs a version bump to expose it to userspace. TODO: update to dep_sync when rebasing onto amdgpu master. (with this - r-b from Christian) v1.1: keep file reference on import. v2: move to using syncobjs v2.1: change some APIs to just use p pointer. v3: make more robust against CS failures, we now add the wait sems but only remove them once the CS job has been submitted. v4: rewrite names of API and base on new syncobj code. v5: move post deps earlier, rename some apis v6: lookup post deps earlier, and just replace fences in post deps stage (Christian) Reviewed-by: Christian König Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 88 ++++++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- include/uapi/drm/amdgpu_drm.h | 6 +++ 4 files changed, 97 insertions(+), 2 deletions(-) commit 6f0308ebc196f18607f45cc753521eb8448dfdfd Author: Dave Airlie Date: Thu Mar 9 03:45:52 2017 +0000 amdgpu/cs: split out fence dependency checking (v2) This just splits out the fence depenency checking into it's own function to make it easier to add semaphore dependencies. v2: rebase onto other changes. v1-Reviewed-by: Christian König Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 93 +++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 42 deletions(-) commit 64dab074fe5e8852b0c981564dc146f39535a81a Author: Alex Deucher Date: Thu Jun 15 18:20:09 2017 -0400 drm/amdgpu: don't check the default value for vm size Avoids printing spurious messages like this: [ 3.102059] amdgpu 0000:01:00.0: VM size (-1) must be a power of 2 Reviewed-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6e4941067cef482c9ed254cf06cab70c32db05b2 Author: Nicolas Boichat Date: Tue May 16 17:46:48 2017 +0200 mfd: cros_ec: Add support for dumping panic information This dumps the EC panic information from the previous reboot. Similar to the information presented by ectool panicinfo, except that we do not bother doing any parsing (we should write a small offline tool for that). Signed-off-by: Nicolas Boichat Reviewed-by: Guenter Roeck Tested-by: Enric Balletbo i Serra Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_debugfs.c | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 73b44f40c63bebcce9d66c4072878ecaceb43dda Author: Shawn Nematbakhsh Date: Thu Feb 16 09:49:29 2017 -0800 cros_ec_debugfs: Pass proper struct sizes to cros_ec_cmd_xfer() We should output or receive every byte in the param / reply struct, unrelated to the pointer size. Signed-off-by: Shawn Nematbakhsh Reviewed-by: Gwendal Grignou [bleung: Picked from crosreview.com/444085 for cros_ec_debugfs.c only. cros_ec.c upstream had a different cros_ec_sleep_event which didn't have the sizeof issue] Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e86264595225d2764a903965356ef59aeb7d1c47 Author: Eric Caruso Date: Tue May 16 17:46:48 2017 +0200 mfd: cros_ec: add debugfs, console log file If the EC supports the new CONSOLE_READ command type, then we place a console_log file in debugfs for that EC device which allows us to grab EC logs. The kernel will poll every 10 seconds for the log and keep its own buffer, but userspace should grab this and write it out to some logs which actually get rotated. Signed-off-by: Eric Caruso Signed-off-by: Nicolas Boichat Acked-by: Lee Jones Tested-by: Enric Balletbo i Serra [bleung: restored original version of this commit, with pointer size issue to be fixed in next commit] Signed-off-by: Benson Leung drivers/platform/chrome/Makefile | 3 +- drivers/platform/chrome/cros_ec_debugfs.c | 347 ++++++++++++++++++++++++++++++ drivers/platform/chrome/cros_ec_debugfs.h | 27 +++ drivers/platform/chrome/cros_ec_dev.c | 7 + include/linux/mfd/cros_ec.h | 4 + 5 files changed, 387 insertions(+), 1 deletion(-) commit 0aa877c558477e5c4b0faaa618cfd41f8c0b3319 Author: Nicolas Boichat Date: Tue May 16 17:46:48 2017 +0200 mfd: cros_ec: Add EC console read structures definitions ec_params_console_read_v1 is used to capture EC logs from kernel, and ec_params_get_cmd_versions_v1 is used to probe whether EC supports that command. Signed-off-by: Nicolas Boichat Reviewed-by: Guenter Roeck Acked-by: Lee Jones Tested-by: Enric Balletbo i Serra Signed-off-by: Benson Leung include/linux/mfd/cros_ec_commands.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 68c35ea25bdd4ad10445c4c02f7d48b3dccab8cc Author: Gwendal Grignou Date: Tue May 16 17:46:48 2017 +0200 mfd: cros_ec: Add helper for event notifier. Add cros_ec_get_event() entry point to retrieve event within functions called by the notifier. Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra Acked-by: Lee Jones Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_proto.c | 20 ++++++++++++++++++++ include/linux/mfd/cros_ec.h | 10 ++++++++++ 2 files changed, 30 insertions(+) commit 28e0f4eef6cb3413a8eb943cd9e366793bfa7e87 Author: Dhinakaran Pandiyan Date: Fri Jun 16 12:36:14 2017 -0700 drm/i915: Store 9 bits of PCI Device ID for platforms with a LP PCH Although we use 9 bits of Device ID for identifying PCH, only 8 bits are stored in dev_priv->pch_id. This makes HAS_PCH_CNP_LP() and HAS_PCH_SPT_LP() incorrect. Fix this by storing all the 9 bits for the platforms with LP PCH. v2: Drop PCH_LPT_LP change (Imre) Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Imre Deak Fixes: commit ec7e0bb35f8d ("drm/i915/cnp: Add PCI ID for Cannonpoint LP PCH") Reported-by: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1497641774-29104-1-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/i915_drv.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 273889e306256e95ea55d5ebaef99310cf589def Merge: a1a6b7e 8812c24 Author: David S. Miller Date: Fri Jun 16 15:22:42 2017 -0400 Merge tag 'mlx5-updates-2017-06-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox mlx5 updates and cleanups 2017-06-16 mlx5-updates-2017-06-16 This series provide some updates and cleanups for mlx5 core and netdevice driver. From Eli Cohen, add a missing event string. From Or Gerlitz, some checkpatch cleanups. From Moni, Disalbe HW level LAG when SRIOV is enabled. From Tariq, A code reuse cleanup in aRFS flow. From Itay Aveksis, Typo fix. From Gal Pressman, ethtool statistics updates and "update stats" deferred work optimizations. From Majd Dibbiny, Fast unload support on kernel shutdown. ==================== Signed-off-by: David S. Miller commit a1a6b7ea7f2de270a51360cc48e7c49f7a283dda Author: Vivien Didelot Date: Thu Jun 15 16:14:48 2017 -0400 net: dsa: add cross-chip multicast support Similarly to how cross-chip VLAN works, define a bitmap of multicast group members for a switch, now including its DSA ports, so that multicast traffic can be sent to all switches of the fabric. A switch may drop the frames if no user port is a member. This brings support for multicast in a multi-chip environment. As of now, all switches of the fabric must support the multicast operations in order to program a single fabric port. Reported-by: Jason Cobham Signed-off-by: Vivien Didelot Tested-by: Jason Cobham Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/switch.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 6a2fb0e99f9cab349dce0a36862b0cd370036452 Author: Nathan Fontenot Date: Thu Jun 15 14:48:09 2017 -0400 ibmvnic: driver initialization for kdump/kexec When booting into the kdump/kexec kernel, pHyp and vios are not prepared for the initialization crq request and a failover transport event is generated. This is not handled correctly. At this point in initialization the driver is still in the 'probing' state and cannot handle a full reset of the driver as is normally done for a failover transport event. To correct this we catch driver resets while still in the 'probing' state and return EAGAIN. This results in the driver tearing down the main crq and calling ibmvnic_init() again. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit f28d4bdb74b6fec482cdbba032369a185baa74b9 Author: Martin Blumenstingl Date: Thu Jun 15 23:33:52 2017 +0200 ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b Until now clk81 was used as gate clock for the ethernet controller on Meson8 whereas Meson8b did not configure a gate clock at all. Use CLKID_ETH for both SoCs, which is the real gate clock for the ethernet controller. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 2 +- arch/arm/boot/dts/meson8b.dtsi | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit d8dd3d29d02cb04f37098b10ede5251764f06754 Author: Martin Blumenstingl Date: Thu Jun 15 23:33:51 2017 +0200 ARM: dts: meson8b: add the SCU device node Amlogic's Meson8b SoC has a Snoop Control Unit (SCU), just like many other Cortex-A5 SoCs. Add the corresponding devicetree node so it can be used during SMP boot. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 5 +++++ arch/arm/boot/dts/meson8b.dtsi | 5 +++++ 2 files changed, 10 insertions(+) commit e29b1cf87473811584c8cf02d624954d7784fa5a Author: Martin Blumenstingl Date: Thu Jun 15 23:33:50 2017 +0200 ARM: dts: meson: add USB support on Meson8 and Meson8b This adds the DWC2 USB controller nodes and the corresponding USB2 PHY nodes to meson.dtsi (as the same - or at least a very similar) IP block is used on all SoCs (at the same physical address). Additionally meson8.dtsi and meson8b.dtsi add the required clocks to the DWC2 and USB2 PHY nodes, otherwise the DWC2 controller cannot be initialized by the dwc2 driver. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 38 ++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/meson8.dtsi | 24 ++++++++++++++++++++++++ arch/arm/boot/dts/meson8b.dtsi | 26 ++++++++++++++++++++++++++ 3 files changed, 88 insertions(+) commit a35910d3994a6d1f59b140dea6b00b8a7b134878 Author: Martin Blumenstingl Date: Thu Jun 15 23:33:49 2017 +0200 ARM: dts: meson: add the hardware random number generator All supported Meson SoCs have a random number generator in CBUS. Newer SoCs (GXBB, GXL and GXM) provide only one 32-bit random number register, whereas the older SoCs (Meson6, Meson8 and Meson8b) have two 32-bit random number registers. The existing meson-rng driver only supports the lower 32-bit - but it still works fine on the older SoCs apart from this small limitation. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 5 +++++ arch/arm/boot/dts/meson8.dtsi | 6 ++++++ arch/arm/boot/dts/meson8b.dtsi | 6 ++++++ 3 files changed, 17 insertions(+) commit 8a7f0c52e8a07ac31784a2dd62c001d38843dfe6 Author: Martin Blumenstingl Date: Thu Jun 15 23:33:48 2017 +0200 ARM: dts: meson8: add reserved memory zones There seem to be two memory regions that need to be reserved, otherwise the system just hangs when running: $ stress --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k \ --vm-keep -m 1 The first memory region is really crucial and without it the system hangs. I could not find any references to this in Amlogic's GPL kernel sources. The second region is used by the "suspend firmware". The u-boot sources (/arch/arm/cpu/aml_meson/m8/firmwareld.c) state that the suspend firmware is located at "64M + 15M" which matches CONFIG_MESON_SUSPEND in the Amlogic GPL kernel sources. The "suspend firmware" is responsible for waking up the system from suspend state. This also fixes reading the full SD card as without this the system would simply hang (probably related to the first memory region, if some buffer is allocated there). Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit a39a3b9f4ff0aba7c2c475afaa52a3eb52d2b9ad Author: Martin Blumenstingl Date: Thu Jun 15 23:33:47 2017 +0200 ARM: dts: meson: add the SAR ADC This adds the SAR ADC to meson.dtsi and configures the clocks on Meson8 and Meson8b to allow boards to use it. Some boards use it to connect a button to it. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 8 ++++++++ arch/arm/boot/dts/meson8.dtsi | 8 ++++++++ arch/arm/boot/dts/meson8b.dtsi | 8 ++++++++ 3 files changed, 24 insertions(+) commit d42ce5a98dcd7ffc59699127d0597c17859f347d Author: Martin Blumenstingl Date: Thu Jun 15 23:33:46 2017 +0200 ARM: dts: meson8: add the pins for the SDIO controller Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 192ec775f5b1530b4394de6236aa72f1dc69422e Author: Martin Blumenstingl Date: Thu Jun 15 23:33:45 2017 +0200 ARM: dts: meson8: add the PWM_E and PWM_F pins This adds the definition of the PWM_E (CBUS) and PWM_F (AOBUS) to meson8.dtsi, allowing devices to use them. PWM_E can be used on some devices to generate the 32.768kHz clock for the SDIO wifi module, while PWM_F can be used to control the power LED. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5239e0504826d4b2ca7c225cc32d1a1a9e755453 Author: Martin Blumenstingl Date: Thu Jun 15 23:33:44 2017 +0200 ARM: dts: meson: use GIC_SPI and IRQ_TYPE_EDGE_RISING macros This makes meson.dtsi easier to read as we are not using magic numbers for the GIC interrupt type (GIC_SPI) and the interrupt polarity (IRQ_TYPE_EDGE_RISING). Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 7a16f06b90ab73343af982ded3ac2710259c37aa Author: Martin Blumenstingl Date: Thu Jun 15 23:33:43 2017 +0200 ARM: dts: meson: use C preprocessor friendly include syntax This replaces the "/include/" syntax with the "#include" syntax in all Amlogic Meson .dts and .dtsi files. That is required to use preprocessor defines (like GIC_SPI and IRQ_TYPE_EDGE_RISING) in meson.dtsi (all files which directly or indirectly include meson.dtsi need to use the "#include" syntax, otherwise the .dts files cannot be compiled). Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson6-atv1200.dts | 2 +- arch/arm/boot/dts/meson6.dtsi | 2 +- arch/arm/boot/dts/meson8.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 79eb80b70c4e05defb4d6f6e68840a052e73ae2d Author: Martin Blumenstingl Date: Sat Jun 10 00:20:39 2017 +0200 ARM: dts: meson8: fix the IR receiver pins The IR receiver pins are currently defined in the CBUS pin-controller. However the pins are in the AO region, which is controlled by the AOBUS pin-controller. Move the pins to pinctrl_aobus so they can actually be used. Fixes: b60e1157d8fa ("ARM: dts: amlogic: Split pinctrl device for Meson8 / Meson8b") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 88e18ab542cc13684259951b28f5b97546904883 Merge: 2c323c4 c22f06d Author: Kevin Hilman Date: Fri Jun 16 12:05:49 2017 -0700 Merge tag 'meson-clk-headers-for-4.13-2' of git://github.com/BayLibre/clk-meson into v4.13/dt 2nd round of header update for clk/meson Exposing new device clock gates * tag 'meson-clk-headers-for-4.13-2' of git://github.com/BayLibre/clk-meson: clk: meson8b: export the ethernet gate clock clk: meson8b: export the USB clocks clk: meson8b: export the gate clock for the HW random number generator clk: meson8b: export the SDIO clock clk: meson8b: export the SAR ADC clocks clk: meson-gxbb: un-export the CPU clock clk: meson-gxbb: expose UART clocks clk: meson-gxbb: expose SPICC gate clk: meson-gxbb: expose spdif master clock clk: meson-gxbb: expose i2s master clock clk: meson-gxbb: expose spdif clock gates commit 8df72024393cdba2543e55d51297f2b2c4ede46f Author: Lidong Zhong Date: Mon Jun 12 10:45:55 2017 +0800 md: change the initialization value for a spare device spot to MD_DISK_ROLE_SPARE The value for spare spot of sb->dev_roles is changed from MD_DISK_ROLE_FAULTY to MD_DISK_ROLE_SPARE to keep align with the value when the superblock is firstly created in userspace. Signed-off-by: Lidong Zhong Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 037d2ff62cbfd3adf634553fbc25c9af7c25a702 Author: Guoqing Jiang Date: Thu Jun 15 17:00:25 2017 +0800 md/raid1: remove unused bio in sync_request_write The "bio" is not used in sync_request_write after commit a68e58703575 ("md/raid1: split out two sub-functions from sync_request_write"). Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1cdd1257949c85c5ddff8313fe3b1e39c5bee8b8 Author: Guoqing Jiang Date: Tue Jun 13 11:16:08 2017 +0800 md/raid10: fix FailFast test for wrong device We need to test FailFast flag for replacement device here since the set up for writing is for the replacement, so we need fix it like: - if (test_bit(FailFast, &conf->mirrors[d].rdev->flags)) + if (test_bit(FailFast, &conf->mirrors[d].replacement->flags)) Since commit f90145f317ef ("md/raid10: add rcu protection to rdev access in raid10_sync_request.") had added the rcu protection for the part, so let's extend the range protected by rcu and use rdev directly. Fixes: 1919cbb ("md/raid10: add failfast handling for writes.") Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid10.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 247488c0a490214a0b5227a678ec2d46b7dba4e5 Author: Wei Wang Date: Fri Jun 16 10:46:37 2017 -0700 decnet: always not take dst->__refcnt when inserting dst into hash table In the existing dn_route.c code, dn_route_output_slow() takes dst->__refcnt before calling dn_insert_route() while dn_route_input_slow() does not take dst->__refcnt before calling dn_insert_route(). This makes the whole routing code very buggy. In dn_dst_check_expire(), dnrt_free() is called when rt expires. This makes the routes inserted by dn_route_output_slow() not able to be freed as the refcnt is not released. In dn_dst_gc(), dnrt_drop() is called to release rt which could potentially cause the dst->__refcnt to be dropped to -1. In dn_run_flush(), dst_free() is called to release all the dst. Again, it makes the dst inserted by dn_route_output_slow() not able to be released and also, it does not wait on the rcu and could potentially cause crash in the path where other users still refer to this dst. This patch makes sure both input and output path do not take dst->__refcnt before calling dn_insert_route() and also makes sure dnrt_free()/dst_free() is called when removing dst from the hash table. The only difference between those 2 calls is that dnrt_free() waits on the rcu while dst_free() does not. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/decnet/dn_route.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 215c80a7d65312911ca7b08d42b05652e27eed5f Author: Jerome Brunet Date: Thu Jun 8 15:55:45 2017 +0200 clk: meson: gxbb: add all clk81 parents Remove the FIXME on clk81 mux and add all the documented parents Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 46460a6be9df17d112e2a275e26403c294865396 Merge: 855f06a c22f06d Author: Jerome Brunet Date: Fri Jun 16 18:32:36 2017 +0000 Merge branch 'next/headers' into next/drivers commit fa80863151c093f04ded07a9003d724d16616703 Author: Neil Armstrong Date: Mon May 29 10:09:55 2017 +0200 ARM64: dts: meson-gx: Add SPICC nodes Add nodes for the SPICC controller on GX common dtsi, GXBB and GXL dtsi files. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 9 +++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 7 +++++++ 3 files changed, 23 insertions(+) commit 9624dda9f4cb7c9848c2e4cb3c1c1beee13dcbba Merge: 27f87bd f40a8ce Author: Kevin Hilman Date: Fri Jun 16 11:23:46 2017 -0700 Merge tag 'meson-clk-headers-for-4.13' of git://github.com/BayLibre/clk-meson into v4.13/dt64 First round of amlogic clock headers update for v4.13 Only gx related update in this round. Expose i2s out, spdif out, EE uart gates and SPICC gate. Un-expose CPU clk which was wrongly copy/pasted from meson8b * tag 'meson-clk-headers-for-4.13' of git://github.com/BayLibre/clk-meson: clk: meson-gxbb: un-export the CPU clock clk: meson-gxbb: expose UART clocks clk: meson-gxbb: expose SPICC gate clk: meson-gxbb: expose spdif master clock clk: meson-gxbb: expose i2s master clock clk: meson-gxbb: expose spdif clock gates commit 03e78a242a15eca68e5c7cb606c94959382e2b18 Author: olivier moysan Date: Fri Jun 16 14:16:24 2017 +0200 ASoC: stm32: sai: add h7 support Add support of SAI on STM32H7 family. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai.c | 13 +++++- sound/soc/stm/stm32_sai.h | 72 ++++++++++++++++++++++++++++++--- sound/soc/stm/stm32_sai_sub.c | 92 ++++++++++++++++++++++++++++++++++++------- 3 files changed, 155 insertions(+), 22 deletions(-) commit 3861da5801f59f3e9252b6a5db92cfa71629995c Author: olivier moysan Date: Fri Jun 16 14:16:23 2017 +0200 ASoC: stm32: add h7 support for sai Document device tree bindings for STM32H7 SAI. Signed-off-by: olivier moysan Signed-off-by: Mark Brown .../devicetree/bindings/sound/st,stm32-sai.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 701a6ec3a3f8d30bdb45ee025fb61f7a934b6cad Author: olivier moysan Date: Fri Jun 16 14:15:34 2017 +0200 ASoC: stm32: sai: manage master clock Disable master clock by default, and activate it only when requested. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 1c77603136d00368b8cd7c10d1ca4bad5952a136 Author: olivier moysan Date: Fri Jun 16 14:15:33 2017 +0200 ASoC: stm32: sai: fix clock management Allow peripheral clock enable/disable on regmap accesses. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4fa17938ea400b6478b24565483f2ac54122316f Author: olivier moysan Date: Fri Jun 16 14:15:32 2017 +0200 ASoC: stm32: sai: change stop sequence Disable SAI before stopping DMA data transfers. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 607c61d40b9c29ab0902541d0d372b18793d6831 Author: olivier moysan Date: Fri Jun 16 14:15:31 2017 +0200 ASoC: stm32: sai: remove spurious trace Remove spurious trace in sai driver. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 3 --- 1 file changed, 3 deletions(-) commit 602fdadc547f3e623db32409eeea8a59a1baaf24 Author: olivier moysan Date: Fri Jun 16 14:15:30 2017 +0200 ASoC: stm32: sai: typo fixes Fix typos in sai driver. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai.c | 2 +- sound/soc/stm/stm32_sai.h | 1 - sound/soc/stm/stm32_sai_sub.c | 28 ++++++++++++++-------------- 3 files changed, 15 insertions(+), 16 deletions(-) commit 5b16c8b1faf4bf77934c0a206cfbe77154c79fd7 Author: olivier moysan Date: Fri Jun 16 14:15:28 2017 +0200 ASoC: stm32: sai: fix DT example Correct the device tree example. Signed-off-by: olivier moysan Signed-off-by: Mark Brown .../devicetree/bindings/sound/st,stm32-sai.txt | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 1bd94980f0fa73cb8225ba3875b3b0a87dc4216f Author: Ralph Sennhauser Date: Fri Jun 9 11:04:21 2017 +0200 dt-bindings: Add vendor prefix for Linksys Linksys (http://www.linksys.com/us/) is a vendor of networking products mostly for use by home and small business user. The brand is currently owned by Belkin International, Inc. (http://www.belkin.com/us/). The vendor prefix linksys is already used by various supported boards. Signed-off-by: Ralph Sennhauser Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit fa2760dd366c735637504d1d7efab7688391c6b4 Author: Kuninori Morimoto Date: Fri Jun 16 01:39:11 2017 +0000 ASoC: simple-card: use asoc_simple_card_of_parse_widgets() Current simple card driver is supporting widgets on DT, other simple/audio card drivers will support it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_widgets Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit b31f11d036e689ba9e60d581ffe8e032a6305da9 Author: Kuninori Morimoto Date: Fri Jun 16 01:38:50 2017 +0000 ASoC: simple-card-utils: add asoc_simple_card_of_parse_widgets() Current simple card drivers are parsing widgets on each own driver (only simple-card at this point, but will be supported on all drivers) Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_of_parse_widgets for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 2 ++ sound/soc/generic/simple-card-utils.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) commit 907cd8809eebccc57a6a3ee9fa87b7602e72df38 Author: Kuninori Morimoto Date: Fri Jun 16 01:47:34 2017 +0000 ASoC: ak4613: add hw_constraint rule for Sampling Rate Current ak4613 accepts all range of Sampling Rate, but it depends on inputed master clock. This patch adds hw constraint rule for it. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 0931352dcb4d2019bf1ec2a5457a41d1d6566509 Author: Andy Shevchenko Date: Thu Jun 15 15:46:38 2017 +0300 ASoC: Intel: bdw-rt5677: Switch to devm_acpi_dev_add_driver_gpios() Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assignment if ->probe() fails. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/bdw-rt5677.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1a019f3a888fd876474c8ed268a558520038af3f Merge: 75bd9086 55e59aa Author: Mark Brown Date: Fri Jun 16 17:53:20 2017 +0100 Merge branch 'topic/rt5677' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit 34a95132e0e44bd2e0235ee90f8c3eafe90f269d Merge: 5f886ee 10beea7 Author: David S. Miller Date: Fri Jun 16 12:45:16 2017 -0400 Merge branch 'rds-tcp-misc-bug-fixes' Sowmini Varadhan says: ==================== rds: tcp: misc bug fixes This series contains 2 bug fixes (patch2, patch3) and one bit of code cleanup (patch1) identified during database testing ==================== Signed-off-by: David S. Miller commit 10beea7d7408d0b1c9208757f445c5c710239e0e Author: Sowmini Varadhan Date: Thu Jun 15 11:28:55 2017 -0700 rds: tcp: Set linger when rejecting an incoming conn in rds_tcp_accept_one Each time we get an incoming SYN to the RDS_TCP_PORT, the TCP layer accepts the connection and then the rds_tcp_accept_one() callback is invoked to process the incoming connection. rds_tcp_accept_one() may reject the incoming syn for a number of reasons, e.g., commit 1a0e100fb2c9 ("RDS: TCP: Force every connection to be initiated by numerically smaller IP address"), or because we are getting spammed by a malicious node that is triggering a flood of connection attempts to RDS_TCP_PORT. If the incoming syn is rejected, no data would have been sent on the TCP socket, and we do not need to be in TIME_WAIT state, so we set linger on the TCP socket before closing, thereby closing the socket efficiently with a RST. Signed-off-by: Sowmini Varadhan Tested-by: Imanti Mendez Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/tcp_listen.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 00354de5779db4aa9c019db787ef89bd1a6b149b Author: Sowmini Varadhan Date: Thu Jun 15 11:28:54 2017 -0700 rds: tcp: various endian-ness fixes Found when testing between sparc and x86 machines on different subnets, so the address comparison patterns hit the corner cases and brought out some bugs fixed by this patch. Signed-off-by: Sowmini Varadhan Tested-by: Imanti Mendez Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/rds.h | 2 ++ net/rds/recv.c | 12 +++++++----- net/rds/send.c | 11 +++++++---- net/rds/tcp_connect.c | 2 +- net/rds/tcp_listen.c | 2 +- net/rds/threads.c | 5 +++-- 6 files changed, 21 insertions(+), 13 deletions(-) commit 41500c3e2a19ffcf40a7158fce1774de08e26ba2 Author: Sowmini Varadhan Date: Thu Jun 15 11:28:53 2017 -0700 rds: tcp: remove cp_outgoing After commit 1a0e100fb2c9 ("RDS: TCP: Force every connection to be initiated by numerically smaller IP address") we no longer need the logic associated with cp_outgoing, so clean up usage of this field. Signed-off-by: Sowmini Varadhan Tested-by: Imanti Mendez Signed-off-by: David S. Miller net/rds/connection.c | 5 ----- net/rds/rds.h | 2 -- net/rds/tcp_connect.c | 1 - net/rds/tcp_listen.c | 19 ++++--------------- 4 files changed, 4 insertions(+), 23 deletions(-) commit 5f886eefbb2d4b207c43b96bbe951545be4f462d Merge: 5f88150 484c017 Author: David S. Miller Date: Fri Jun 16 12:43:49 2017 -0400 Merge branch 'dsa-loop-Driver-updates' Florian Fainelli says: ==================== net: dsa: loop: Driver updates This patch series updates drivers/net/dsa/dsa_loop.c to provide more useful coverage of the DSA APIs and how we mangle the CPU ports ethtool statistics to include its switch-facing port counters. ==================== Signed-off-by: David S. Miller commit 484c01720d84c65e996a6adc4ba8ce6a811879df Author: Florian Fainelli Date: Thu Jun 15 10:15:53 2017 -0700 net: dsa: loop: Implement ethtool statistics When a DSA driver implements ethtool statistics, we also override the master network device's ethtool statistics with the CPU port's statistics and this has proven to be a possible source of bugs in the past. Enhance the dsa_loop.c driver to provide statistics under the forme of ok/error reads and writes from the per-port PHY read/writes. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/dsa_loop.c | 79 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 2 deletions(-) commit 3407dc8ed1a7528e8792c86d9ebc124aa5fa629f Author: Florian Fainelli Date: Thu Jun 15 10:15:52 2017 -0700 net: dsa: loop: Inline unregister_fixed_phys() This is a simple function that only gets used in the driver's remove function, inline it there. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/dsa_loop.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 55e59aa0525a461abcbc226ace7a7eb9d9a07a4a Author: Andy Shevchenko Date: Thu Jun 15 15:46:37 2017 +0300 ASoC: rt5677: Move platform code to board file GPIO ACPI mapping table is defined on platform basis. Codec driver shouldn't have known what platform is using it. Make codec driver more generic by moving platform code to where it belongs. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 26 -------------------------- sound/soc/intel/boards/bdw-rt5677.c | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 26 deletions(-) commit a36afb0ab6488eaa2c9672d6c20a966a7c08ef65 Author: Andy Shevchenko Date: Thu Jun 15 15:46:36 2017 +0300 ASoC: rt5677: Introduce proper table for ACPI enumeration I2C devices are enumerated by IDs, and not by instances. Make it clear by using proper module device table for ACPI case. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5f881503a43da76a60dd556af1a871cadb411816 Merge: cb7fbb6 e0e1667 Author: David S. Miller Date: Fri Jun 16 12:32:35 2017 -0400 Merge branch 'pktgen-new-parameters' Tariq Toukan says: ==================== pktgen new parameters This patchset adds two parameters to the pktgen scripts. * The first patch adds a parameter to control the number of packets sent by every pktgen thread. * The second patch adds a parameter to control the index of first thread, instead of always starting from cpu 0. Series generated against net-next commit: f7aec129a356 rxrpc: Cache the congestion window setting Thanks, Tariq. V2: * rebased to latest net-next. * per Jesper's comments on Patch 2, fixed $F_THREAD description and $L_THREAD evaluation. ==================== Signed-off-by: David S. Miller commit e0e16672ee9e2c31d9601d762cf934196b13a7fc Author: Tariq Toukan Date: Thu Jun 15 19:07:22 2017 +0300 pktgen: Specify the index of first thread Use "-f ", to specify the index of the first sender thread. In default first thread is #0. Signed-off-by: Tariq Toukan Cc: Jesper Dangaard Brouer Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/pktgen/README.rst | 1 + samples/pktgen/parameters.sh | 20 ++++++++++++++------ .../pktgen/pktgen_bench_xmit_mode_netif_receive.sh | 4 ++-- samples/pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 4 ++-- samples/pktgen/pktgen_sample02_multiqueue.sh | 4 ++-- samples/pktgen/pktgen_sample03_burst_single_flow.sh | 4 ++-- samples/pktgen/pktgen_sample04_many_flows.sh | 4 ++-- samples/pktgen/pktgen_sample05_flow_per_thread.sh | 4 ++-- 8 files changed, 27 insertions(+), 18 deletions(-) commit 69137ea60c9dad58773a1918de6c1b00b088520c Author: Tariq Toukan Date: Thu Jun 15 19:07:21 2017 +0300 pktgen: Specify num packets per thread Use -n , to specify the number of packets every thread sends. Zero means indefinitely. Signed-off-by: Tariq Toukan Cc: Jesper Dangaard Brouer Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/pktgen/README.rst | 1 + samples/pktgen/parameters.sh | 7 ++++++- samples/pktgen/pktgen_bench_xmit_mode_netif_receive.sh | 2 +- samples/pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 2 +- samples/pktgen/pktgen_sample01_simple.sh | 2 +- samples/pktgen/pktgen_sample02_multiqueue.sh | 3 ++- samples/pktgen/pktgen_sample03_burst_single_flow.sh | 2 +- samples/pktgen/pktgen_sample04_many_flows.sh | 2 +- samples/pktgen/pktgen_sample05_flow_per_thread.sh | 2 +- 9 files changed, 15 insertions(+), 8 deletions(-) commit cb7fbb6470aaadf6786d00af1664703f794788ac Merge: c52e609 e0f7ed8 Author: David S. Miller Date: Fri Jun 16 12:27:13 2017 -0400 Merge branch 'net-mvmdio-add-xMDIO-xSMI-support' Antoine Tenart says: ==================== net: mvmdio: add xMDIO xSMI support This series aims to add the xSMI support on the xMDIO bus to the mvmdio driver. The xSMI interface complies with the IEEE 802.3 clause 45 and is used by 10GbE devices. On 7k and 8k (as of now), such an interface is found and is used by Ethernet controllers. Patches 1-4 and 9 are cosmetic cleanups. Patches 5-7 are prerequisites to the xSMI support. Patches 8 and 10-11 add the xSMI support to the mvmdio driver, and a node is added both in the cp110 slave and master device trees. This was tested on an Armada 8040 mcbin, as well as on both the Armada 7040 DB and the Armada 8040 DB to ensure the SMI interface was still working. @Dave: patch 11 should go through the mvebu tree as asked by Gregory, thanks! ==================== Signed-off-by: David S. Miller commit e0f7ed8dd73806ae8ed9605c3e845c46c8d7712f Author: Antoine Ténart Date: Thu Jun 15 16:43:25 2017 +0200 dt-bindings: orion-mdio: document the new xmdio compatible A new compatible for Marvell xMDIO interfaces was added into the Marvell MDIO driver. Document this new compatible. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/marvell-orion-mdio.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 0268b51e3043d96c4133154b20a5b8338857cb5b Author: Antoine Ténart Date: Thu Jun 15 16:43:24 2017 +0200 net: mvmdio: simplify the smi read and write error paths Cosmetic patch simplifying the smi read and write error paths. It also align their error paths with the ones of the xsmi functions. Signed-off-by: Antoine Tenart Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit c0ac08f533e6995e1bc14e67cd3c21ad07dd9214 Author: Antoine Ténart Date: Thu Jun 15 16:43:23 2017 +0200 net: mvmdio: add xmdio xsmi support This patch adds the xmdio xsmi interface support in the mvmdio driver. This interface is used in Ethernet controllers on Marvell 370, 7k and 8k (as of now). The xsmi interface supported by this driver complies with the IEEE 802.3 clause 45. The xSMI interface is used by 10GbE devices. Signed-off-by: Antoine Tenart Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 112 +++++++++++++++++++++++++++++++--- 1 file changed, 105 insertions(+), 7 deletions(-) commit 440ea77654d0fbb6e144dc90f6fa1d4429d83280 Author: Antoine Ténart Date: Thu Jun 15 16:43:22 2017 +0200 net: mvmdio: check the MII_ADDR_C45 bit is not set for smi operations Add a check for the read and write smi operations, to ensure the MII_ADDR_C45 bit isn't set. This will be needed as soon as the xSMI support is added to the mvmdio driver. Signed-off-by: Antoine Tenart Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1955796640a6736583b59c581d3ccddfca66cb33 Author: Antoine Ténart Date: Thu Jun 15 16:43:21 2017 +0200 net: mvmdio: put the poll intervals in the ops structure Put the two poll intervals (min and max) in the driver's ops structure. This is needed to add the xmdio support later. Signed-off-by: Antoine Tenart Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b0b7fa4f7cd016087f22a4c173318b16c796ff11 Author: Antoine Ténart Date: Thu Jun 15 16:43:20 2017 +0200 net: mvmdio: introduce an ops structure Introduce an ops structure to add an indirection on the is_done function, as this is needed to add the xMDIO support later. Signed-off-by: Antoine Tenart Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 0caf0305a39e62d5cb33cfd1e98aa77a25768232 Author: Russell King Date: Thu Jun 15 16:43:19 2017 +0200 net: mvmdio: remove duplicate locking The MDIO layer already provides per-bus locking, so there's no need for MDIO bus drivers to do their own internal locking. Remove this. Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 10 ---------- 1 file changed, 10 deletions(-) commit fd3ebd857895884c2567a7f4dfbf50ba49bd2eab Author: Antoine Ténart Date: Thu Jun 15 16:43:18 2017 +0200 net: mvmdio: use GENMASK for masks Cosmetic patch to use the GENMASK helper for masks. Signed-off-by: Antoine Tenart Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2040ef2f74a42a56da424aea28249a7f188aa637 Author: Antoine Ténart Date: Thu Jun 15 16:43:17 2017 +0200 net: mvmdio: use tabs for defines Cosmetic patch replacing spaces by tabs for defined values. Signed-off-by: Antoine Tenart Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 14ef8b367165f88d708efbac60034e47986b23b7 Author: Antoine Ténart Date: Thu Jun 15 16:43:16 2017 +0200 net: mvmdio: reorder headers alphabetically Cosmetic fix reordering headers alphabetically. Signed-off-by: Antoine Tenart Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bc8ebb86392dc2e81abee68c4e569f8d23628603 Author: Hoegeun Kwon Date: Thu Jun 15 19:03:29 2017 +0900 ARM: dts: exynos: Fix polarity of panel reset gpio in Rinato This reset gpio is active low, therefore fix from active high to low. Signed-off-by: Hoegeun Kwon Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250-rinato.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c27b2d634f81d1472a8107fc857481b67555d9bd Merge: cc3f2e9 6b8190d Author: Jens Axboe Date: Fri Jun 16 10:14:59 2017 -0600 Merge branch 'nvme-4.13' of git://git.infradead.org/nvme into for-4.13/block Pull NVMe changes for 4.13 from Christoph: Highlights: - UUID identifier support from Johannes - Lots of cleanups from Sagi - Host Memory Buffer support from me And lots of cleanups and smaller fixes of course. Note that the UUID identifier changes are based on top of the uuid tree. I am the maintainer of that tree and will send it to Linus as soon as 4.12 is released as various other trees depend on it as well (and the diffstat includes those changes unfortunately) commit c52e6098fa4ee2b7ebfe8dd6a630d25b8e847108 Merge: 3dc0225 22e0d75 Author: David S. Miller Date: Fri Jun 16 11:58:38 2017 -0400 Merge branch 'bpf-xdp-Report-bpf_prog-ID-in-IFLA_XDP' Martin KaFai Lau says: ==================== bpf: xdp: Report bpf_prog ID in IFLA_XDP This is the first usage of the new bpf_prog ID. It is for reporting the ID of a xdp_prog through netlink. It rides on the existing IFLA_XDP. This patch adds IFLA_XDP_PROG_ID for the bpf_prog ID reporting. It starts with changing the generic_xdp first. After that, the hardware driver is changed one by one. Jakub Kicinski mentioned that he will soon introduce XDP_ATTACHED_HW (on top of the existing XDP_ATTACHED_DRV and XDP_ATTACHED_SKB) and he is going to reuse the prog_attached for this purpose. Hence, this patch set keeps the prog_attached even though !!prog_id also implies there is xdp_prog attached. I have tested with generic_xdp, mlx4 and mlx5. v3: 1. Replace 'if' by '?' when checking the xdp_prog pointer as suggested by Jakub Kicinski (thanks!) v2: 1. Remove READ_ONCE since it is alredy under rtnl lock 2. Keep prog_attached in 'struct netdev_xdp' as requested by Jakub Kicinski. The existing prog_attached and the new prog_id are put under a struct for XDP_QUERY_PROG. ==================== Signed-off-by: David S. Miller commit 22e0d75f43561957b2293f7f02f2c8c0c2d70842 Author: Martin KaFai Lau Date: Thu Jun 15 17:29:17 2017 -0700 bpf: qede: Report bpf_prog ID during XDP_QUERY_PROG Add support to qede to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau Cc: Mintz Yuval Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_filter.c | 1 + 1 file changed, 1 insertion(+) commit c330182479fa73227c44404d104577580d441458 Author: Martin KaFai Lau Date: Thu Jun 15 17:29:16 2017 -0700 bpf: nfp: Report bpf_prog ID during XDP_QUERY_PROG Add support to nfp to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau Cc: Jakub Kicinski Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 1 + 1 file changed, 1 insertion(+) commit 4792093edd032a1bc8ab6cac8abd877bbd8c53b2 Author: Martin KaFai Lau Date: Thu Jun 15 17:29:15 2017 -0700 bpf: ixgbe: Report bpf_prog ID during XDP_QUERY_PROG Add support to ixgbe to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau Cc: Alexander Duyck Cc: John Fastabend Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 1efde2b668c98dc1c358fb460a738f50f291107c Author: Martin KaFai Lau Date: Thu Jun 15 17:29:14 2017 -0700 bpf: thunderx: Report bpf_prog ID during XDP_QUERY_PROG Add support to thunderx to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau Cc: Sunil Goutham Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 1 + 1 file changed, 1 insertion(+) commit 8902965f8cb23bba8aa7f3be293ec2f3067b82c6 Author: Martin KaFai Lau Date: Thu Jun 15 17:29:13 2017 -0700 bpf: bnxt: Report bpf_prog ID during XDP_QUERY_PROG Add support to bnxt to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau Cc: Michael Chan Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 1 + 1 file changed, 1 insertion(+) commit 5b0e6629be5958d70e1f3263b021f0e4038fc675 Author: Martin KaFai Lau Date: Thu Jun 15 17:29:12 2017 -0700 bpf: virtio_net: Report bpf_prog ID during XDP_QUERY_PROG Add support to virtio_net to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau Cc: John Fastabend Cc: Jason Wang Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/virtio_net.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 821b2e294433f3b4e7db6911da5b0806c38d7bda Author: Martin KaFai Lau Date: Thu Jun 15 17:29:11 2017 -0700 bpf: mlx5e: Report bpf_prog ID during XDP_QUERY_PROG Add support to mlx5e to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau Cc: Tariq Toukan Cc: Saeed Mahameed Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 2e37e9b0f55e50a099c699ac41ea4fa507fc46ff Author: Martin KaFai Lau Date: Thu Jun 15 17:29:10 2017 -0700 bpf: mlx4: Report bpf_prog ID during XDP_QUERY_PROG Add support to mlx4 to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau Cc: Tariq Toukan Cc: Saeed Mahameed Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 58038695e62b4473e4d70e1503933579c640cd52 Author: Martin KaFai Lau Date: Thu Jun 15 17:29:09 2017 -0700 net: Add IFLA_XDP_PROG_ID Expose prog_id through IFLA_XDP_PROG_ID. This patch makes modification to generic_xdp. The later patches will modify other xdp-supported drivers. prog_id is added to struct net_dev_xdp. iproute2 patch will be followed. Here is how the 'ip link' will look like: > ip link show eth0 3: eth0: mtu 1500 xdp(prog_id:1) qdisc fq_codel state UP mode DEFAULT group default qlen 1000 Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/netdevice.h | 7 +++++-- include/uapi/linux/if_link.h | 1 + net/core/dev.c | 19 +++++++++++-------- net/core/rtnetlink.c | 27 +++++++++++++++++++++------ 4 files changed, 38 insertions(+), 16 deletions(-) commit 95ff7c7dd7098860bc131c7dec0ad76ca61e796a Author: Chris Wilson Date: Fri Jun 16 15:05:25 2017 +0100 drm/i915: Stash a pointer to the obj's resv in the vma During execbuf, a mandatory step is that we add this request (this fence) to each object's reservation_object. Inside execbuf, we track the vma, and to add the fence to the reservation_object then means having to first chase the obj, incurring another cache miss. We can reduce the number of cache misses by stashing a pointer to the reservation_object in the vma itself. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170616140525.6394-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 25 ++++++++++++------------- drivers/gpu/drm/i915/i915_vma.c | 1 + drivers/gpu/drm/i915/i915_vma.h | 3 ++- 3 files changed, 15 insertions(+), 14 deletions(-) commit 7dd4f6729f9243bd7046c6f04c107a456bda38eb Author: Chris Wilson Date: Fri Jun 16 15:05:24 2017 +0100 drm/i915: Async GPU relocation processing If the user requires patching of their batch or auxiliary buffers, we currently make the alterations on the cpu. If they are active on the GPU at the time, we wait under the struct_mutex for them to finish executing before we rewrite the contents. This happens if shared relocation trees are used between different contexts with separate address space (and the buffers then have different addresses in each), the 3D state will need to be adjusted between execution on each context. However, we don't need to use the CPU to do the relocation patching, as we could queue commands to the GPU to perform it and use fences to serialise the operation with the current activity and future - so the operation on the GPU appears just as atomic as performing it immediately. Performing the relocation rewrites on the GPU is not free, in terms of pure throughput, the number of relocations/s is about halved - but more importantly so is the time under the struct_mutex. v2: Break out the request/batch allocation for clearer error flow. v3: A few asserts to ensure rq ordering is maintained Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 1 - drivers/gpu/drm/i915/i915_gem_execbuffer.c | 227 ++++++++++++++++++++++++++++- 2 files changed, 220 insertions(+), 8 deletions(-) commit 1a71cf2fa646799d4397a49b223549d8617fece0 Author: Chris Wilson Date: Fri Jun 16 15:05:23 2017 +0100 drm/i915: Allow execbuffer to use the first object as the batch Currently, the last object in the execlist is the always the batch. However, when building the batch buffer we often know the batch object first and if we can use the first slot in the execlist we can emit relocation instructions relative to it immediately and avoid a separate pass to adjust the relocations to point to the last execlist slot. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 ++++- include/uapi/drm/i915_drm.h | 19 +++++++++++++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) commit 8a2421bd0d9abb3a599969d88e1910a2a101eccc Author: Chris Wilson Date: Fri Jun 16 15:05:22 2017 +0100 drm/i915: Wait upon userptr get-user-pages within execbuffer This simply hides the EAGAIN caused by userptr when userspace causes resource contention. However, it is quite beneficial with highly contended userptr users as we avoid repeating the setup costs and kernel-user context switches. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 10 +++++++++- drivers/gpu/drm/i915/i915_gem.c | 4 +++- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 +++ drivers/gpu/drm/i915/i915_gem_userptr.c | 18 +++++++++++++++--- 5 files changed, 31 insertions(+), 5 deletions(-) commit 616d9cee4fdc4a377c03be8fd6efa5df4fcd0d81 Author: Chris Wilson Date: Fri Jun 16 15:05:21 2017 +0100 drm/i915: First try the previous execbuffer location When choosing a slot for an execbuffer, we ideally want to use the same address as last time (so that we don't have to rebind it) and the same address as expected by the user (so that we don't have to fixup any relocations pointing to it). If we first try to bind the incoming execbuffer->offset from the user, or the currently bound offset that should hopefully achieve the goal of avoiding the rebind cost and the relocation penalty. However, if the object is not currently bound there we don't want to arbitrarily unbind an object in our chosen position and so choose to rebind/relocate the incoming object instead. After we report the new position back to the user, on the next pass the relocations should have settled down. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_execbuffer.c | 12 ++++++++---- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + 3 files changed, 15 insertions(+), 4 deletions(-) commit dade2a6165fd7bd825958e9b0ad04678f53f0f60 Author: Chris Wilson Date: Fri Jun 16 15:05:20 2017 +0100 drm/i915: Store a persistent reference for an object in the execbuffer cache If we take a reference to the object/vma when it is first used in an execbuf, we can keep that reference until the object's file-local handle is closed. Thereby saving a frequent ref/unref pair. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_context.c | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 35 +++++++++++++++++++++--------- drivers/gpu/drm/i915/i915_vma.c | 2 ++ 3 files changed, 28 insertions(+), 10 deletions(-) commit 2889caa9232109afc8881f29a2205abeb5709d0c Author: Chris Wilson Date: Fri Jun 16 15:05:19 2017 +0100 drm/i915: Eliminate lots of iterations over the execobjects array The major scaling bottleneck in execbuffer is the processing of the execobjects. Creating an auxiliary list is inefficient when compared to using the execobject array we already have allocated. Reservation is then split into phases. As we lookup up the VMA, we try and bind it back into active location. Only if that fails, do we add it to the unbound list for phase 2. In phase 2, we try and add all those objects that could not fit into their previous location, with fallback to retrying all objects and evicting the VM in case of severe fragmentation. (This is the same as before, except that phase 1 is now done inline with looking up the VMA to avoid an iteration over the execobject array. In the ideal case, we eliminate the separate reservation phase). During the reservation phase, we only evict from the VM between passes (rather than currently as we try to fit every new VMA). In testing with Unreal Engine's Atlantis demo which stresses the eviction logic on gen7 class hardware, this speed up the framerate by a factor of 2. The second loop amalgamation is between move_to_gpu and move_to_active. As we always submit the request, even if incomplete, we can use the current request to track active VMA as we perform the flushes and synchronisation required. The next big advancement is to avoid copying back to the user any execobjects and relocations that are not changed. v2: Add a Theory of Operation spiel. v3: Fall back to slow relocations in preparation for flushing userptrs. v4: Document struct members, factor out eb_validate_vma(), add a few more comments to explain some magic and hide other magic behind macros. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_evict.c | 92 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2042 +++++++++++++---------- drivers/gpu/drm/i915/i915_vma.c | 2 +- drivers/gpu/drm/i915/i915_vma.h | 1 + drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 4 +- drivers/gpu/drm/i915/selftests/i915_vma.c | 16 +- 7 files changed, 1241 insertions(+), 918 deletions(-) commit 071750e550af46b5d3a84ad56c2a108c3e136284 Author: Chris Wilson Date: Fri Jun 16 15:05:18 2017 +0100 drm/i915: Disable EXEC_OBJECT_ASYNC when doing relocations If we write a relocation into the buffer, we require our own implicit synchronisation added after the start of the execbuf, outside of the user's control. As we may end up clflushing, or doing the patch itself on the GPU, asynchronously we need to look at the implicit serialisation on obj->resv and hence need to disable EXEC_OBJECT_ASYNC for this object. If the user does trigger a stall for relocations, we make sure the stall is complete enough so that the batch is not submitted before we complete those relocations. Fixes: 77ae9957897d ("drm/i915: Enable userspace to opt-out of implicit fencing") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Jason Ekstrand Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 507d977ff965682a925ffe479c95136680fcb77b Author: Chris Wilson Date: Fri Jun 16 15:05:17 2017 +0100 drm/i915: Pass vma to relocate entry We can simplify our tracking of pending writes in an execbuf to the single bit in the vma->exec_entry->flags, but that requires the relocation function knowing the object's vma. Pass it along. Note we have only been using a single bit to track flushing since commit cc889e0f6ce6a63c62db17d702ecfed86d58083f Author: Daniel Vetter Date: Wed Jun 13 20:45:19 2012 +0200 drm/i915: disable flushing_list/gpu_write_list unconditionally flushed all render caches before the breadcrumb and commit 6ac42f4148bc27e5ffd18a9ab0eac57f58822af4 Author: Daniel Vetter Date: Sat Jul 21 12:25:01 2012 +0200 drm/i915: Replace the complex flushing logic with simple invalidate/flush all did away with the explicit GPU domain tracking. This was then codified into the ABI with NO_RELOC in commit ed5982e6ce5f106abcbf071f80730db344a6da42 Author: Daniel Vetter # Oi! Patch stealer! Date: Thu Jan 17 22:23:36 2013 +0100 drm/i915: Allow userspace to hint that the relocations were known Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_execbuffer.c | 102 ++++++++++++----------------- 1 file changed, 42 insertions(+), 60 deletions(-) commit 4ff4b44cbb70c269259958cbcc48d7b8a2cb9ec8 Author: Chris Wilson Date: Fri Jun 16 15:05:16 2017 +0100 drm/i915: Store a direct lookup from object handle to vma The advent of full-ppgtt lead to an extra indirection between the object and its binding. That extra indirection has a noticeable impact on how fast we can convert from the user handles to our internal vma for execbuffer. In order to bypass the extra indirection, we use a resizable hashtable to jump from the object to the per-ctx vma. rhashtable was considered but we don't need the online resizing feature and the extra complexity proved to undermine its usefulness. Instead, we simply reallocate the hastable on demand in a background task and serialize it before iterating. In non-full-ppgtt modes, multiple files and multiple contexts can share the same vma. This leads to having multiple possible handle->vma links, so we only use the first to establish the fast path. The majority of buffers are not shared and so we should still be able to realise speedups with multiple clients. v2: Prettier names, more magic. v3: Many style tweaks, most notably hiding the misuse of execobj[].rsvd2 Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 6 + drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 5 +- drivers/gpu/drm/i915/i915_gem_context.c | 82 +++++++- drivers/gpu/drm/i915/i915_gem_context.h | 26 +++ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 264 ++++++++++++++++---------- drivers/gpu/drm/i915/i915_gem_object.h | 4 +- drivers/gpu/drm/i915/i915_utils.h | 5 + drivers/gpu/drm/i915/i915_vma.c | 20 ++ drivers/gpu/drm/i915/i915_vma.h | 8 +- drivers/gpu/drm/i915/selftests/mock_context.c | 12 +- 11 files changed, 322 insertions(+), 112 deletions(-) commit cd33f5f2cbfaadc21270f3ddac7c3c33e0a1a28c Author: Paul Moore Date: Mon Jun 12 11:53:09 2017 -0400 audit: make sure we never skip the multicast broadcast When the auditd connection is reset, either intentionally or due to a failure, any records that were in the main backlog queue would not be sent in a multicast broadcast. This patch fixes this problem by not flushing the main backlog queue on a connection reset, the main kauditd_thread() will take care of that normally. Resolves: https://github.com/linux-audit/audit-kernel/issues/41 Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cc3f2e9fbf905427b48e112288fbd8f0dbd3252d Author: Arvind Yadav Date: Fri Jun 16 15:24:39 2017 +0530 block: swim3: make of_device_ids const. of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 8908 1096 624 10628 2984 drivers/block/swim3.o File size after constify swim3_match: text data bss dec hex filename 9708 296 624 10628 2984 drivers/block/swim3.o Signed-off-by: Arvind Yadav Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/swim3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3dc02251f43fb5ec7fa576138005edbfe35ed1ca Merge: 61f73d1 634fef6 Author: David S. Miller Date: Fri Jun 16 11:48:41 2017 -0400 Merge branch 'skb-accessor-cleanups' Johannes Berg says: ==================== skb data accessors cleanup Over night, Fengguang's bot told me that it compiled all of its many various configurations successfully, and I had done allyesconfig on x86_64 myself yesterday to iron out the things I missed. So now I think I'm happy with it. My tree was based on your commit 3715c47bcda8bb56f7e2be27276282a2d0d48c09 Merge: 18b6e7955d8f d8fbd27469fc Author: David S. Miller Date: Thu Jun 15 14:31:56 2017 -0400 Merge branch 'r8152-support-new-chips' when the compilation tests happened, but I've reviewed the changes coming into net-next in the meantime and didn't see any new usages of skb data accessors having come in. ==================== Signed-off-by: David S. Miller commit 634fef61076d644b989b86abc2f560d81a089a31 Author: Johannes Berg Date: Fri Jun 16 14:29:24 2017 +0200 networking: add and use skb_put_u8() Joe and Bjørn suggested that it'd be nicer to not have the cast in the fairly common case of doing *(u8 *)skb_put(skb, 1) = c; Add skb_put_u8() for this case, and use it across the code, using the following spatch: @@ expression SKB, C, S; typedef u8; identifier fn = {skb_put}; fresh identifier fn2 = fn ## "_u8"; @@ - *(u8 *)fn(SKB, S) = C; + fn2(SKB, C); Note that due to the "S", the spatch isn't perfect, it should have checked that S is 1, but there's also places that use a sizeof expression like sizeof(var) or sizeof(u8) etc. Turns out that nobody ever did something like *(u8 *)skb_put(skb, 2) = c; which would be wrong anyway since the second byte wouldn't be initialized. Suggested-by: Joe Perches Suggested-by: Bjørn Mork Signed-off-by: Johannes Berg Signed-off-by: David S. Miller drivers/bluetooth/bluecard_cs.c | 2 +- drivers/bluetooth/bt3c_cs.c | 2 +- drivers/bluetooth/btuart_cs.c | 2 +- drivers/bluetooth/btusb.c | 6 +++--- drivers/bluetooth/dtl1_cs.c | 4 ++-- drivers/bluetooth/hci_bcm.c | 6 +++--- drivers/bluetooth/hci_intel.c | 2 +- drivers/bluetooth/hci_nokia.c | 2 +- drivers/bluetooth/hci_qca.c | 2 +- drivers/bluetooth/hci_vhci.c | 4 ++-- drivers/isdn/capi/capi.c | 4 ++-- drivers/isdn/gigaset/asyncdata.c | 22 +++++++++++----------- drivers/isdn/i4l/isdn_bsdcomp.c | 7 ++++--- drivers/isdn/i4l/isdn_x25iface.c | 4 ++-- drivers/net/hamradio/scc.c | 4 ++-- drivers/net/usb/cdc_ncm.c | 2 +- drivers/net/usb/net1080.c | 2 +- drivers/net/usb/zaurus.c | 8 ++++---- drivers/nfc/fdp/i2c.c | 2 +- drivers/nfc/microread/i2c.c | 4 ++-- drivers/nfc/microread/microread.c | 4 ++-- drivers/nfc/nfcmrvl/fw_dnld.c | 4 ++-- drivers/nfc/pn533/pn533.c | 32 ++++++++++++++++---------------- drivers/nfc/pn544/i2c.c | 6 +++--- drivers/nfc/port100.c | 4 ++-- drivers/nfc/st21nfca/i2c.c | 6 +++--- drivers/nfc/st95hf/core.c | 2 +- include/linux/skbuff.h | 5 +++++ net/bluetooth/hci_sock.c | 2 +- net/bluetooth/hidp/core.c | 2 +- net/decnet/dn_nsp_out.c | 12 ++++++------ net/nfc/digital_core.c | 4 ++-- net/nfc/digital_dep.c | 2 +- net/nfc/digital_technology.c | 12 ++++++------ net/nfc/hci/core.c | 2 +- net/nfc/hci/llc_shdlc.c | 4 ++-- net/nfc/nci/hci.c | 2 +- net/nfc/nci/spi.c | 8 ++++---- net/nfc/nci/uart.c | 2 +- 39 files changed, 106 insertions(+), 100 deletions(-) commit d58ff35122847a83ba55394e2ae3a1527b6febf5 Author: Johannes Berg Date: Fri Jun 16 14:29:23 2017 +0200 networking: make skb_push & __skb_push return void pointers It seems like a historic accident that these return unsigned char *, and in many places that means casts are required, more often than not. Make these functions return void * and remove all the casts across the tree, adding a (u8 *) cast only where the unsigned char pointer was used directly, all done with the following spatch: @@ expression SKB, LEN; typedef u8; identifier fn = { skb_push, __skb_push, skb_push_rcsum }; @@ - *(fn(SKB, LEN)) + *(u8 *)fn(SKB, LEN) @@ expression E, SKB, LEN; identifier fn = { skb_push, __skb_push, skb_push_rcsum }; type T; @@ - E = ((T *)(fn(SKB, LEN))) + E = fn(SKB, LEN) @@ expression SKB, LEN; identifier fn = { skb_push, __skb_push, skb_push_rcsum }; @@ - fn(SKB, LEN)[0] + *(u8 *)fn(SKB, LEN) Note that the last part there converts from push(...)[0] to the more idiomatic *(u8 *)push(...). Signed-off-by: Johannes Berg Signed-off-by: David S. Miller drivers/atm/solos-pci.c | 2 +- drivers/bluetooth/bpa10x.c | 2 +- drivers/firewire/net.c | 8 +++--- drivers/infiniband/hw/cxgb3/iwch_cm.c | 6 ++--- drivers/infiniband/hw/cxgb4/cm.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 +-- drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c | 2 +- drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 2 +- drivers/isdn/i4l/isdn_ppp.c | 2 +- drivers/net/arcnet/arc-rawmode.c | 2 +- drivers/net/arcnet/capmode.c | 2 +- drivers/net/arcnet/rfc1051.c | 2 +- drivers/net/arcnet/rfc1201.c | 2 +- drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- drivers/net/ethernet/chelsio/cxgb/sge.c | 4 +-- drivers/net/ethernet/freescale/gianfar.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en_selftest.c | 2 +- drivers/net/ethernet/sun/niu.c | 2 +- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 +- drivers/net/geneve.c | 3 +-- drivers/net/gtp.c | 4 +-- drivers/net/hippi/rrunner.c | 2 +- drivers/net/macsec.c | 2 +- drivers/net/ppp/ppp_async.c | 2 +- drivers/net/ppp/ppp_generic.c | 6 ++--- drivers/net/ppp/ppp_synctty.c | 2 +- drivers/net/ppp/pptp.c | 2 +- drivers/net/usb/gl620a.c | 2 +- drivers/net/usb/int51x1.c | 2 +- drivers/net/usb/kaweth.c | 2 +- drivers/net/usb/lg-vl600.c | 2 +- drivers/net/usb/net1080.c | 2 +- drivers/net/usb/qmi_wwan.c | 2 +- drivers/net/usb/rndis_host.c | 2 +- drivers/net/vrf.c | 2 +- drivers/net/vxlan.c | 2 +- drivers/net/wimax/i2400m/netdev.c | 2 +- drivers/net/wireless/admtek/adm8211.c | 2 +- drivers/net/wireless/ath/ar5523/ar5523.c | 4 +-- drivers/net/wireless/ath/ath6kl/htc_pipe.c | 3 +-- drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +- drivers/net/wireless/ath/ath9k/htc_hst.c | 3 +-- drivers/net/wireless/ath/ath9k/wmi.c | 2 +- drivers/net/wireless/ath/carl9170/tx.c | 2 +- drivers/net/wireless/ath/wil6210/txrx.c | 2 +- .../net/wireless/intersil/hostap/hostap_80211_rx.c | 8 +++--- drivers/net/wireless/intersil/orinoco/main.c | 7 +++-- drivers/net/wireless/intersil/p54/txrx.c | 4 +-- drivers/net/wireless/intersil/prism54/islpci_eth.c | 5 +--- drivers/net/wireless/mac80211_hwsim.c | 4 +-- drivers/net/wireless/marvell/libertas/rx.c | 2 +- drivers/net/wireless/marvell/libertas_tf/main.c | 2 +- drivers/net/wireless/mediatek/mt7601u/tx.c | 2 +- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 6 ++--- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- .../net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 2 +- drivers/net/wireless/st/cw1200/txrx.c | 2 +- drivers/net/wireless/ti/wl1251/tx.c | 3 +-- drivers/net/wireless/ti/wlcore/cmd.c | 2 +- drivers/net/wireless/ti/wlcore/tx.c | 3 +-- drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 3 +-- drivers/nfc/fdp/i2c.c | 4 +-- drivers/nfc/microread/i2c.c | 2 +- drivers/nfc/microread/microread.c | 4 +-- drivers/nfc/nfcmrvl/main.c | 2 +- drivers/nfc/pn533/pn533.c | 8 +++--- drivers/nfc/pn544/i2c.c | 2 +- drivers/nfc/pn544/pn544.c | 8 +++--- drivers/nfc/st-nci/ndlc.c | 2 +- drivers/nfc/st21nfca/core.c | 6 ++--- drivers/nfc/st21nfca/dep.c | 30 +++++++++++----------- drivers/nfc/st21nfca/i2c.c | 4 +-- drivers/s390/net/qeth_l2_main.c | 3 +-- drivers/s390/net/qeth_l3_main.c | 6 ++--- drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 2 +- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 2 +- drivers/scsi/fcoe/fcoe_ctlr.c | 2 +- drivers/scsi/fnic/fnic_fcs.c | 7 +++-- drivers/scsi/qedf/qedf_fip.c | 3 +-- drivers/staging/wilc1000/linux_mon.c | 6 ++--- drivers/staging/wlan-ng/p80211conv.c | 14 ++++------ drivers/target/iscsi/cxgbit/cxgbit_target.c | 5 ++-- drivers/usb/gadget/function/rndis.c | 2 +- include/linux/if_vlan.h | 2 +- include/linux/skbuff.h | 7 +++-- net/802/fc.c | 4 +-- net/802/fddi.c | 2 +- net/802/hippi.c | 2 +- net/8021q/vlan_dev.c | 2 +- net/appletalk/ddp.c | 2 +- net/ax25/af_ax25.c | 2 +- net/bluetooth/hci_sock.c | 12 ++++----- net/bluetooth/mgmt_util.c | 2 +- net/bluetooth/rfcomm/core.c | 4 +-- net/bridge/netfilter/nft_reject_bridge.c | 2 +- net/core/netpoll.c | 4 +-- net/core/pktgen.c | 6 ++--- net/core/skbuff.c | 2 +- net/dccp/options.c | 2 +- net/decnet/dn_dev.c | 4 +-- net/ethernet/eth.c | 2 +- net/ipv4/esp4.c | 2 +- net/ipv4/ip_gre.c | 2 +- net/ipv6/esp6.c | 2 +- net/ipv6/exthdrs.c | 6 ++--- net/ipv6/ip6_gre.c | 2 +- net/ipv6/ip6_output.c | 4 +-- net/ipv6/tcp_ipv6.c | 2 +- net/irda/irnet/irnet_irda.c | 2 +- net/iucv/af_iucv.c | 3 +-- net/mac80211/rx.c | 2 +- net/mac80211/status.c | 2 +- net/mac80211/tx.c | 4 +-- net/ncsi/ncsi-cmd.c | 2 +- net/nfc/digital_dep.c | 2 +- net/nfc/digital_technology.c | 4 +-- net/nfc/hci/core.c | 2 +- net/nfc/hci/llc_shdlc.c | 8 +++--- net/nfc/nci/data.c | 2 +- net/nfc/nci/hci.c | 4 +-- net/nfc/nci/spi.c | 4 +-- net/nfc/rawsock.c | 2 +- net/sctp/output.c | 2 +- net/sctp/sm_statefuns.c | 4 +-- net/sctp/ulpevent.c | 8 +++--- net/wireless/util.c | 2 +- 126 files changed, 204 insertions(+), 234 deletions(-) commit af72868b9070d1b843c829f0d0d0b22c04a20815 Author: Johannes Berg Date: Fri Jun 16 14:29:22 2017 +0200 networking: make skb_pull & friends return void pointers It seems like a historic accident that these return unsigned char *, and in many places that means casts are required, more often than not. Make these functions return void * and remove all the casts across the tree, adding a (u8 *) cast only where the unsigned char pointer was used directly, all done with the following spatch: @@ expression SKB, LEN; typedef u8; identifier fn = { skb_pull, __skb_pull, skb_pull_inline, __pskb_pull_tail, __pskb_pull, pskb_pull }; @@ - *(fn(SKB, LEN)) + *(u8 *)fn(SKB, LEN) @@ expression E, SKB, LEN; identifier fn = { skb_pull, __skb_pull, skb_pull_inline, __pskb_pull_tail, __pskb_pull, pskb_pull }; type T; @@ - E = ((T *)(fn(SKB, LEN))) + E = fn(SKB, LEN) Signed-off-by: Johannes Berg Signed-off-by: David S. Miller drivers/bluetooth/hci_nokia.c | 4 ++-- drivers/isdn/i4l/isdn_ppp.c | 2 +- drivers/net/wan/hdlc_ppp.c | 2 +- drivers/nfc/nxp-nci/firmware.c | 3 +-- drivers/scsi/fnic/fnic_fcs.c | 2 +- drivers/scsi/qedf/qedf_main.c | 2 +- include/linux/skbuff.h | 14 +++++++------- net/bluetooth/a2mp.c | 4 ++-- net/core/skbuff.c | 6 +++--- net/ipv4/ipmr.c | 6 ++++-- net/ipv4/xfrm4_mode_beet.c | 3 +-- net/ipv6/ip6mr.c | 6 ++++-- net/ipv6/xfrm6_mode_beet.c | 2 +- 13 files changed, 29 insertions(+), 27 deletions(-) commit 4df864c1d9afb46e2461a9f808d9f11a42d31bad Author: Johannes Berg Date: Fri Jun 16 14:29:21 2017 +0200 networking: make skb_put & friends return void pointers It seems like a historic accident that these return unsigned char *, and in many places that means casts are required, more often than not. Make these functions (skb_put, __skb_put and pskb_put) return void * and remove all the casts across the tree, adding a (u8 *) cast only where the unsigned char pointer was used directly, all done with the following spatch: @@ expression SKB, LEN; typedef u8; identifier fn = { skb_put, __skb_put }; @@ - *(fn(SKB, LEN)) + *(u8 *)fn(SKB, LEN) @@ expression E, SKB, LEN; identifier fn = { skb_put, __skb_put }; type T; @@ - E = ((T *)(fn(SKB, LEN))) + E = fn(SKB, LEN) which actually doesn't cover pskb_put since there are only three users overall. A handful of stragglers were converted manually, notably a macro in drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many instances in net/bluetooth/hci_sock.c. In the former file, I also had to fix one whitespace problem spatch introduced. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller drivers/atm/atmtcp.c | 4 +- drivers/atm/solos-pci.c | 12 +-- drivers/bluetooth/bluecard_cs.c | 2 +- drivers/bluetooth/bt3c_cs.c | 2 +- drivers/bluetooth/btmrvl_main.c | 2 +- drivers/bluetooth/btuart_cs.c | 2 +- drivers/bluetooth/btusb.c | 10 +- drivers/bluetooth/dtl1_cs.c | 4 +- drivers/bluetooth/hci_bcm.c | 6 +- drivers/bluetooth/hci_intel.c | 6 +- drivers/bluetooth/hci_ll.c | 2 +- drivers/bluetooth/hci_nokia.c | 10 +- drivers/bluetooth/hci_qca.c | 2 +- drivers/bluetooth/hci_vhci.c | 4 +- drivers/crypto/chelsio/chcr_algo.c | 10 +- drivers/infiniband/core/addr.c | 3 +- drivers/infiniband/core/sa_query.c | 3 +- drivers/infiniband/hw/cxgb3/cxio_hal.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_cm.c | 22 ++-- drivers/infiniband/hw/cxgb4/cm.c | 22 ++-- drivers/infiniband/hw/cxgb4/cq.c | 4 +- drivers/infiniband/hw/cxgb4/mem.c | 4 +- drivers/infiniband/hw/cxgb4/qp.c | 8 +- drivers/isdn/capi/capi.c | 4 +- drivers/isdn/gigaset/asyncdata.c | 26 ++--- drivers/isdn/gigaset/isocdata.c | 2 +- drivers/isdn/i4l/isdn_audio.c | 4 +- drivers/isdn/i4l/isdn_bsdcomp.c | 8 +- drivers/isdn/i4l/isdn_x25iface.c | 4 +- drivers/media/dvb-core/dvb_net.c | 2 +- drivers/media/radio/wl128x/fmdrv_common.c | 2 +- drivers/net/bonding/bond_3ad.c | 4 +- drivers/net/can/dev.c | 4 +- drivers/net/ethernet/allwinner/sun4i-emac.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 12 +-- drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | 4 +- drivers/net/ethernet/chelsio/cxgb3/l2t.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 4 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 +- drivers/net/ethernet/chelsio/cxgb4/l2t.c | 2 +- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 10 +- drivers/net/ethernet/davicom/dm9000.c | 2 +- drivers/net/ethernet/dnet.c | 2 +- drivers/net/ethernet/hp/hp100.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 4 +- .../net/ethernet/mellanox/mlx5/core/en_selftest.c | 6 +- drivers/net/ethernet/micrel/ks8842.c | 4 +- drivers/net/ethernet/sfc/falcon/selftest.c | 3 +- drivers/net/ethernet/sfc/selftest.c | 3 +- drivers/net/hamradio/scc.c | 4 +- drivers/net/ppp/pppoe.c | 2 +- drivers/net/usb/cdc_ncm.c | 2 +- drivers/net/usb/net1080.c | 4 +- drivers/net/usb/zaurus.c | 8 +- drivers/net/wan/hdlc_ppp.c | 2 +- drivers/net/wireless/ath/ath6kl/debug.c | 2 +- drivers/net/wireless/ath/ath6kl/htc_pipe.c | 6 +- drivers/net/wireless/ath/ath9k/htc_hst.c | 9 +- drivers/net/wireless/ath/wil6210/wmi.c | 2 +- drivers/net/wireless/cisco/airo.c | 4 +- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +- drivers/net/wireless/intel/ipw2x00/libipw_tx.c | 3 +- drivers/net/wireless/intersil/hostap/hostap_ap.c | 2 +- drivers/net/wireless/intersil/p54/fwio.c | 43 ++++---- drivers/net/wireless/mac80211_hwsim.c | 8 +- drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 2 +- drivers/net/wireless/marvell/mwifiex/tdls.c | 38 +++---- .../net/wireless/quantenna/qtnfmac/qlink_util.h | 11 +- drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 2 +- .../net/wireless/realtek/rtlwifi/rtl8192se/fw.c | 2 +- drivers/nfc/fdp/i2c.c | 2 +- drivers/nfc/microread/i2c.c | 4 +- drivers/nfc/microread/microread.c | 4 +- drivers/nfc/nfcmrvl/fw_dnld.c | 6 +- drivers/nfc/pn533/pn533.c | 32 +++--- drivers/nfc/pn544/i2c.c | 6 +- drivers/nfc/port100.c | 4 +- drivers/nfc/st21nfca/i2c.c | 6 +- drivers/nfc/st95hf/core.c | 2 +- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/qedf/qedf_main.c | 2 +- drivers/staging/rtl8192e/rtl819x_BAProc.c | 10 +- drivers/staging/rtl8192e/rtllib_softmac.c | 34 +++--- .../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 21 ++-- .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 8 +- drivers/target/iscsi/cxgbit/cxgbit_cm.c | 8 +- drivers/target/iscsi/cxgbit/cxgbit_ddp.c | 2 +- drivers/usb/gadget/function/f_ncm.c | 5 +- include/linux/skbuff.h | 8 +- lib/nlattr.c | 2 +- net/802/garp.c | 6 +- net/802/mrp.c | 11 +- net/appletalk/ddp.c | 2 +- net/atm/clip.c | 2 +- net/batman-adv/icmp_socket.c | 2 +- net/batman-adv/tp_meter.c | 6 +- net/bluetooth/hci_request.c | 2 +- net/bluetooth/hci_sock.c | 12 +-- net/bluetooth/hidp/core.c | 2 +- net/bluetooth/l2cap_core.c | 14 +-- net/bluetooth/mgmt_util.c | 10 +- net/bluetooth/rfcomm/core.c | 2 +- net/core/pktgen.c | 32 +++--- net/core/skbuff.c | 6 +- net/decnet/dn_dev.c | 2 +- net/decnet/dn_nsp_out.c | 18 ++-- net/ipv4/arp.c | 2 +- net/ipv4/igmp.c | 6 +- net/ipv4/ipmr.c | 2 +- net/ipv4/netfilter/ipt_SYNPROXY.c | 10 +- net/ipv4/netfilter/nf_reject_ipv4.c | 2 +- net/ipv6/mcast.c | 4 +- net/ipv6/ndisc.c | 8 +- net/ipv6/netfilter/ip6t_SYNPROXY.c | 10 +- net/ipv6/netfilter/nf_reject_ipv6.c | 2 +- net/irda/irlap_frame.c | 17 ++- net/key/af_key.c | 116 +++++++++------------ net/mac80211/cfg.c | 4 +- net/mac80211/ht.c | 2 +- net/mac80211/mesh.c | 2 +- net/mac80211/mesh_ps.c | 2 +- net/mac80211/sta_info.c | 2 +- net/mac80211/tdls.c | 10 +- net/mac80211/tx.c | 2 +- net/mac80211/wpa.c | 6 +- net/netfilter/nfnetlink_log.c | 2 +- net/netfilter/nfnetlink_queue.c | 2 +- net/netlink/af_netlink.c | 2 +- net/nfc/digital_core.c | 4 +- net/nfc/digital_dep.c | 2 +- net/nfc/digital_technology.c | 18 ++-- net/nfc/hci/core.c | 2 +- net/nfc/hci/llc_shdlc.c | 4 +- net/nfc/nci/core.c | 2 +- net/nfc/nci/hci.c | 2 +- net/nfc/nci/spi.c | 8 +- net/nfc/nci/uart.c | 2 +- net/psample/psample.c | 2 +- net/qrtr/qrtr.c | 2 +- net/sctp/sm_make_chunk.c | 2 +- net/sctp/ulpevent.c | 29 ++---- net/vmw_vsock/virtio_transport_common.c | 2 +- 145 files changed, 486 insertions(+), 547 deletions(-) commit 59ae1d127ac0ae404baf414c434ba2651b793f46 Author: Johannes Berg Date: Fri Jun 16 14:29:20 2017 +0200 networking: introduce and use skb_put_data() A common pattern with skb_put() is to just want to memcpy() some data into the new space, introduce skb_put_data() for this. An spatch similar to the one for skb_put_zero() converts many of the places using it: @@ identifier p, p2; expression len, skb, data; type t, t2; @@ ( -p = skb_put(skb, len); +p = skb_put_data(skb, data, len); | -p = (t)skb_put(skb, len); +p = skb_put_data(skb, data, len); ) ( p2 = (t2)p; -memcpy(p2, data, len); | -memcpy(p, data, len); ) @@ type t, t2; identifier p, p2; expression skb, data; @@ t *p; ... ( -p = skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); | -p = (t *)skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); ) ( p2 = (t2)p; -memcpy(p2, data, sizeof(*p)); | -memcpy(p, data, sizeof(*p)); ) @@ expression skb, len, data; @@ -memcpy(skb_put(skb, len), data, len); +skb_put_data(skb, data, len); (again, manually post-processed to retain some comments) Reviewed-by: Stephen Hemminger Signed-off-by: Johannes Berg Signed-off-by: David S. Miller drivers/atm/fore200e.c | 2 +- drivers/atm/he.c | 2 +- drivers/atm/idt77252.c | 11 ++---- drivers/atm/solos-pci.c | 2 +- drivers/bluetooth/bfusb.c | 6 +-- drivers/bluetooth/bluecard_cs.c | 2 +- drivers/bluetooth/btmrvl_main.c | 2 +- drivers/bluetooth/btqcomsmd.c | 2 +- drivers/bluetooth/btusb.c | 12 +++--- drivers/bluetooth/hci_bcsp.c | 16 ++++---- drivers/bluetooth/hci_h4.c | 2 +- drivers/bluetooth/hci_h5.c | 12 +++--- drivers/bluetooth/hci_intel.c | 7 ++-- drivers/bluetooth/hci_ll.c | 2 +- drivers/bluetooth/hci_mrvl.c | 2 +- drivers/bluetooth/hci_qca.c | 2 +- drivers/char/pcmcia/synclink_cs.c | 2 +- drivers/firewire/net.c | 2 +- drivers/isdn/capi/capi.c | 2 +- drivers/isdn/capi/capidrv.c | 2 +- drivers/isdn/hardware/avm/b1.c | 6 +-- drivers/isdn/hardware/avm/b1dma.c | 6 +-- drivers/isdn/hardware/avm/c4.c | 6 +-- drivers/isdn/hardware/avm/t1isa.c | 6 +-- drivers/isdn/hardware/mISDN/hfcmulti.c | 5 +-- drivers/isdn/hardware/mISDN/hfcsusb.c | 2 +- drivers/isdn/hisax/amd7930_fn.c | 3 +- drivers/isdn/hisax/avm_pci.c | 5 ++- drivers/isdn/hisax/diva.c | 6 ++- drivers/isdn/hisax/elsa_ser.c | 4 +- drivers/isdn/hisax/hfc_usb.c | 2 +- drivers/isdn/hisax/hisax_fcpcipnp.c | 3 +- drivers/isdn/hisax/hisax_isac.c | 4 +- drivers/isdn/hisax/hscx_irq.c | 6 ++- drivers/isdn/hisax/icc.c | 2 +- drivers/isdn/hisax/ipacx.c | 8 ++-- drivers/isdn/hisax/isac.c | 2 +- drivers/isdn/hisax/isar.c | 6 +-- drivers/isdn/hisax/isdnl2.c | 4 +- drivers/isdn/hisax/jade_irq.c | 6 ++- drivers/isdn/hisax/l3_1tr6.c | 8 ++-- drivers/isdn/hisax/l3dss1.c | 28 ++++++------- drivers/isdn/hisax/l3ni1.c | 32 +++++++-------- drivers/isdn/hisax/netjet.c | 2 +- drivers/isdn/hisax/st5481_usb.c | 2 +- drivers/isdn/hisax/w6692.c | 9 +++-- drivers/isdn/hysdn/hycapi.c | 31 +++++++-------- drivers/isdn/hysdn/hysdn_net.c | 2 +- drivers/isdn/i4l/isdn_ppp.c | 3 +- drivers/isdn/i4l/isdn_tty.c | 2 +- drivers/isdn/i4l/isdn_v110.c | 6 +-- drivers/isdn/isdnloop/isdnloop.c | 2 +- drivers/isdn/mISDN/dsp_cmx.c | 3 +- drivers/isdn/mISDN/layer2.c | 8 ++-- drivers/isdn/mISDN/tei.c | 2 +- drivers/media/dvb-core/dvb_net.c | 3 +- drivers/media/radio/wl128x/fmdrv_common.c | 2 +- drivers/misc/ti-st/st_core.c | 2 +- drivers/misc/ti-st/st_kim.c | 2 +- drivers/net/bonding/bond_alb.c | 3 +- drivers/net/caif/caif_hsi.c | 6 +-- drivers/net/caif/caif_serial.c | 3 +- drivers/net/caif/caif_spi.c | 3 +- drivers/net/caif/caif_virtio.c | 2 +- drivers/net/can/slcan.c | 3 +- drivers/net/ethernet/3com/3c515.c | 6 +-- drivers/net/ethernet/3com/3c59x.c | 5 +-- drivers/net/ethernet/aeroflex/greth.c | 3 +- drivers/net/ethernet/agere/et131x.c | 2 +- drivers/net/ethernet/apple/macmace.c | 2 +- drivers/net/ethernet/aurora/nb8800.c | 4 +- drivers/net/ethernet/cadence/macb.c | 2 +- .../net/ethernet/cavium/liquidio/octeon_network.h | 4 +- drivers/net/ethernet/cirrus/cs89x0.c | 7 ++-- drivers/net/ethernet/dec/tulip/de4x5.c | 6 +-- drivers/net/ethernet/dec/tulip/interrupt.c | 12 +++--- drivers/net/ethernet/dec/tulip/uli526x.c | 6 +-- drivers/net/ethernet/ec_bhf.c | 2 +- drivers/net/ethernet/fealnx.c | 4 +- drivers/net/ethernet/i825xx/82596.c | 3 +- drivers/net/ethernet/i825xx/lib82596.c | 3 +- drivers/net/ethernet/intel/e1000/e1000_main.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 10 ++--- drivers/net/ethernet/micrel/ksz884x.c | 3 +- drivers/net/ethernet/nxp/lpc_eth.c | 7 ++-- drivers/net/ethernet/qlogic/qede/qede_fp.c | 3 +- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 7 ++-- drivers/net/ethernet/silan/sc92031.c | 10 ++--- drivers/net/fjes/fjes_main.c | 3 +- drivers/net/hamradio/mkiss.c | 2 +- drivers/net/hippi/rrunner.c | 4 +- drivers/net/hyperv/netvsc_drv.c | 2 +- drivers/net/ieee802154/at86rf230.c | 2 +- drivers/net/ieee802154/ca8210.c | 2 +- drivers/net/ieee802154/mrf24j40.c | 2 +- drivers/net/irda/smsc-ircc2.c | 2 +- drivers/net/irda/vlsi_ir.c | 2 +- drivers/net/ppp/ppp_async.c | 3 +- drivers/net/ppp/ppp_synctty.c | 3 +- drivers/net/slip/slip.c | 2 +- drivers/net/usb/asix_common.c | 4 +- drivers/net/usb/cdc-phonet.c | 2 +- drivers/net/usb/cdc_mbim.c | 2 +- drivers/net/usb/cdc_ncm.c | 6 +-- drivers/net/usb/gl620a.c | 3 +- drivers/net/usb/hso.c | 13 +++--- drivers/net/usb/ipheth.c | 2 +- drivers/net/usb/lg-vl600.c | 2 +- drivers/net/usb/qmi_wwan.c | 2 +- drivers/net/virtio_net.c | 2 +- drivers/net/wan/farsync.c | 2 +- drivers/net/wan/hdlc_ppp.c | 4 +- drivers/net/wan/x25_asy.c | 2 +- drivers/net/wimax/i2400m/netdev.c | 2 +- drivers/net/wireless/admtek/adm8211.c | 6 +-- drivers/net/wireless/ath/ath10k/mac.c | 5 +-- drivers/net/wireless/ath/ath10k/wmi.c | 5 +-- drivers/net/wireless/ath/ath9k/channel.c | 5 +-- drivers/net/wireless/ath/ath9k/wmi.c | 3 +- drivers/net/wireless/ath/carl9170/rx.c | 6 +-- drivers/net/wireless/ath/wil6210/wmi.c | 2 +- drivers/net/wireless/atmel/atmel.c | 5 +-- drivers/net/wireless/broadcom/b43legacy/dma.c | 2 +- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 5 ++- drivers/net/wireless/intel/ipw2x00/libipw_tx.c | 6 +-- drivers/net/wireless/intel/iwlegacy/3945.c | 2 +- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/tx.c | 3 +- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 5 +-- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 5 +-- .../net/wireless/intersil/hostap/hostap_80211_tx.c | 2 +- drivers/net/wireless/intersil/hostap/hostap_ap.c | 2 +- drivers/net/wireless/intersil/hostap/hostap_hw.c | 11 +++--- drivers/net/wireless/intersil/hostap/hostap_main.c | 2 +- drivers/net/wireless/intersil/orinoco/main.c | 2 +- drivers/net/wireless/intersil/p54/p54spi.c | 4 +- drivers/net/wireless/intersil/p54/txrx.c | 5 ++- drivers/net/wireless/mac80211_hwsim.c | 5 +-- drivers/net/wireless/marvell/libertas/if_sdio.c | 4 +- drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 2 +- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 10 ++--- drivers/net/wireless/marvell/mwifiex/tdls.c | 8 ++-- drivers/net/wireless/mediatek/mt7601u/dma.c | 4 +- drivers/net/wireless/mediatek/mt7601u/mcu.c | 2 +- .../net/wireless/quantenna/qtnfmac/pearl/pcie.c | 2 +- .../net/wireless/quantenna/qtnfmac/qlink_util.h | 3 +- drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 5 +-- drivers/net/wireless/realtek/rtlwifi/pci.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192se/fw.c | 7 ++-- drivers/net/wireless/realtek/rtlwifi/usb.c | 2 +- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 8 ++-- drivers/net/wireless/st/cw1200/scan.c | 2 +- drivers/net/wireless/ti/wl1251/main.c | 2 +- drivers/net/wireless/ti/wlcore/cmd.c | 4 +- drivers/net/wireless/ti/wlcore/rx.c | 4 +- drivers/net/wireless/zydas/zd1201.c | 26 ++++++------ drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +- drivers/nfc/fdp/fdp.c | 3 +- drivers/nfc/fdp/i2c.c | 2 +- drivers/nfc/nfcmrvl/fw_dnld.c | 7 ++-- drivers/nfc/nfcmrvl/i2c.c | 2 +- drivers/nfc/nfcmrvl/usb.c | 4 +- drivers/nfc/nxp-nci/firmware.c | 3 +- drivers/nfc/nxp-nci/i2c.c | 5 +-- drivers/nfc/pn533/pn533.c | 28 ++++++------- drivers/nfc/pn533/usb.c | 4 +- drivers/nfc/port100.c | 14 +++---- drivers/nfc/s3fwrn5/firmware.c | 4 +- drivers/nfc/s3fwrn5/i2c.c | 2 +- drivers/nfc/st21nfca/dep.c | 2 +- drivers/nfc/st21nfca/i2c.c | 2 +- drivers/rpmsg/rpmsg_char.c | 2 +- drivers/s390/net/ctcm_fsms.c | 7 ++-- drivers/s390/net/ctcm_main.c | 10 ++--- drivers/s390/net/ctcm_mpc.c | 46 +++++++++------------- drivers/s390/net/lcs.c | 2 +- drivers/s390/net/netiucv.c | 10 ++--- drivers/s390/net/qeth_core_main.c | 10 ++--- drivers/staging/gdm724x/gdm_lte.c | 25 +++++------- drivers/staging/ks7010/ks_hostif.c | 11 +++--- drivers/staging/most/aim-network/networking.c | 8 ++-- drivers/staging/octeon/ethernet-rx.c | 10 ++--- drivers/staging/rtl8188eu/core/rtw_recv.c | 4 +- drivers/staging/rtl8188eu/os_dep/mon.c | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 11 ++---- drivers/staging/rtl8192e/rtllib_softmac.c | 9 ++--- drivers/staging/rtl8192e/rtllib_tx.c | 12 ++---- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 9 ++--- .../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 3 +- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 7 ++-- drivers/staging/rtl8192u/r819xU_cmdpkt.c | 3 +- drivers/staging/rtl8712/rtl8712_recv.c | 3 +- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 4 +- drivers/staging/wilc1000/linux_mon.c | 6 +-- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wlan-ng/hfa384x_usb.c | 6 +-- drivers/tty/ipwireless/network.c | 2 +- drivers/tty/n_gsm.c | 2 +- drivers/tty/synclink.c | 2 +- drivers/tty/synclink_gt.c | 2 +- drivers/tty/synclinkmp.c | 2 +- drivers/usb/gadget/function/f_ncm.c | 11 +++--- drivers/usb/gadget/function/f_phonet.c | 2 +- include/linux/mISDNif.h | 2 +- include/linux/skbuff.h | 10 +++++ lib/nlattr.c | 2 +- net/batman-adv/bat_iv_ogm.c | 4 +- net/batman-adv/bat_v_ogm.c | 6 +-- net/batman-adv/fragmentation.c | 3 +- net/bluetooth/cmtp/core.c | 2 +- net/bluetooth/hci_core.c | 2 +- net/bluetooth/hci_request.c | 2 +- net/bluetooth/hci_sock.c | 8 ++-- net/bluetooth/hidp/core.c | 2 +- net/bluetooth/l2cap_core.c | 4 +- net/bluetooth/mgmt_util.c | 4 +- net/bluetooth/rfcomm/tty.c | 2 +- net/bridge/netfilter/nft_reject_bridge.c | 6 +-- net/can/bcm.c | 6 +-- net/decnet/dn_nsp_out.c | 10 ++--- net/ieee802154/6lowpan/tx.c | 7 ++-- net/ipv6/mcast.c | 4 +- net/irda/ircomm/ircomm_tty.c | 2 +- net/irda/irlap_frame.c | 6 +-- net/key/af_key.c | 3 +- net/mac80211/ibss.c | 2 +- net/mac80211/mesh.c | 8 ++-- net/mac80211/mlme.c | 16 ++++---- net/mac80211/offchannel.c | 3 +- net/mac80211/rx.c | 2 +- net/mac80211/tdls.c | 32 ++++++--------- net/mac80211/tx.c | 22 +++++------ net/mac80211/util.c | 5 +-- net/netlink/af_netlink.c | 2 +- net/nfc/digital_dep.c | 17 +++----- net/nfc/hci/core.c | 6 +-- net/nfc/llcp_commands.c | 15 ++++--- net/nfc/llcp_core.c | 2 +- net/nfc/nci/core.c | 4 +- net/nfc/nci/data.c | 2 +- net/nfc/nci/hci.c | 7 ++-- net/nfc/nci/uart.c | 2 +- net/qrtr/qrtr.c | 2 +- net/sctp/output.c | 3 +- net/sctp/sm_make_chunk.c | 4 +- net/vmw_vsock/virtio_transport_common.c | 6 +-- net/x25/x25_subr.c | 21 ++++------ 252 files changed, 622 insertions(+), 741 deletions(-) commit b080db585384b9f037e015c0c28d1ad33be41dfc Author: Johannes Berg Date: Fri Jun 16 14:29:19 2017 +0200 networking: convert many more places to skb_put_zero() There were many places that my previous spatch didn't find, as pointed out by yuan linyu in various patches. The following spatch found many more and also removes the now unnecessary casts: @@ identifier p, p2; expression len; expression skb; type t, t2; @@ ( -p = skb_put(skb, len); +p = skb_put_zero(skb, len); | -p = (t)skb_put(skb, len); +p = skb_put_zero(skb, len); ) ... when != p ( p2 = (t2)p; -memset(p2, 0, len); | -memset(p, 0, len); ) @@ type t, t2; identifier p, p2; expression skb; @@ t *p; ... ( -p = skb_put(skb, sizeof(t)); +p = skb_put_zero(skb, sizeof(t)); | -p = (t *)skb_put(skb, sizeof(t)); +p = skb_put_zero(skb, sizeof(t)); ) ... when != p ( p2 = (t2)p; -memset(p2, 0, sizeof(*p)); | -memset(p, 0, sizeof(*p)); ) @@ expression skb, len; @@ -memset(skb_put(skb, len), 0, len); +skb_put_zero(skb, len); Apply it to the tree (with one manual fixup to keep the comment in vxlan.c, which spatch removed.) Signed-off-by: Johannes Berg Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb3/cxio_hal.c | 6 ++-- drivers/infiniband/hw/cxgb3/iwch_cm.c | 3 +- drivers/infiniband/hw/cxgb3/iwch_qp.c | 6 ++-- drivers/infiniband/hw/cxgb4/cm.c | 9 ++---- .../net/ethernet/mellanox/mlx5/core/en_selftest.c | 2 +- drivers/net/usb/cdc_ncm.c | 4 +-- drivers/net/usb/kalmia.c | 2 +- drivers/net/vxlan.c | 4 +-- drivers/net/wireless/ath/ath9k/channel.c | 3 +- drivers/net/wireless/intersil/hostap/hostap_ap.c | 7 ++--- drivers/net/wireless/intersil/hostap/hostap_main.c | 4 +-- drivers/net/wireless/intersil/p54/txrx.c | 3 +- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 3 +- drivers/net/wireless/marvell/mwifiex/tdls.c | 3 +- drivers/net/wireless/quantenna/qtnfmac/commands.c | 10 ++---- drivers/net/wireless/realtek/rtlwifi/base.c | 6 ++-- drivers/net/wireless/ti/wlcore/cmd.c | 3 +- drivers/net/wireless/ti/wlcore/main.c | 5 ++- drivers/scsi/fcoe/fcoe_ctlr.c | 3 +- drivers/scsi/libfc/fc_libfc.c | 2 +- drivers/usb/gadget/function/f_ncm.c | 15 +++------ net/atm/signaling.c | 3 +- net/batman-adv/bat_v_elp.c | 3 +- net/bridge/netfilter/nft_reject_bridge.c | 6 ++-- net/core/pktgen.c | 4 +-- net/ipv4/ipconfig.c | 3 +- net/ipv4/netfilter/nf_reject_ipv4.c | 3 +- net/ipv6/mcast.c | 3 +- net/key/af_key.c | 9 ++---- net/mac80211/agg-rx.c | 3 +- net/mac80211/agg-tx.c | 6 ++-- net/mac80211/debugfs_netdev.c | 5 ++- net/mac80211/ht.c | 3 +- net/mac80211/mesh.c | 3 +- net/mac80211/mesh_hwmp.c | 6 ++-- net/mac80211/mesh_plink.c | 3 +- net/mac80211/mesh_ps.c | 2 +- net/mac80211/mlme.c | 6 ++-- net/mac80211/rx.c | 3 +- net/mac80211/spectmgmt.c | 3 +- net/mac80211/tdls.c | 6 ++-- net/mac80211/tx.c | 12 +++----- net/mac80211/util.c | 6 ++-- net/ncsi/ncsi-cmd.c | 36 ++++++++-------------- net/openvswitch/datapath.c | 2 +- net/qrtr/qrtr.c | 9 ++---- net/rxrpc/sendmsg.c | 2 +- net/sctp/output.c | 2 +- net/sctp/sm_make_chunk.c | 3 +- 49 files changed, 89 insertions(+), 169 deletions(-) commit a462b950834945db22f94aa98181f861eff0574d Author: Bart Van Assche Date: Tue Jun 13 08:07:33 2017 -0700 block: Dedicated error code fixups This patch fixes two sparse warnings introduced by the "dedicated error codes for the block layer V3" patch series. These changes have not been tested. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 4 ++-- block/t10-pi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 61f73d1ea4c68544b959228ead7ef5c021791b14 Merge: 54144b4 bd88298 Author: David S. Miller Date: Fri Jun 16 11:37:13 2017 -0400 Merge branch 'r8152-adjust-runtime-suspend-resume' Hayes Wang says: ==================== r8152: adjust runtime suspend/resume v2: For #1, replace GFP_KERNEL with GFP_NOIO for usb_submit_urb(). v1: Improve the flow about runtime suspend/resume and make the code easy to read. ==================== Signed-off-by: David S. Miller commit bd8829822204debbb2dd38a5b052ef7663e618cc Author: hayeswang Date: Tue Jun 13 15:14:40 2017 +0800 r8152: move calling delay_autosuspend function Move calling delay_autosuspend() in rtl8152_runtime_suspend(). Calling delay_autosuspend() as late as possible. The original flows are 1. check if the driver/device is busy now. 2. set wake events. 3. enter runtime suspend. If the wake event occurs between (1) and (2), the device may miss it. Besides, to avoid the runtime resume occurs after runtime suspend immediately, move the checking to the end of rtl8152_runtime_suspend(). Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 21cbd0ecad7943bbd4f7d10efaade0380637d4a0 Author: hayeswang Date: Tue Jun 13 15:14:39 2017 +0800 r8152: split rtl8152_resume function Split rtl8152_resume() into rtl8152_runtime_resume() and rtl8152_system_resume(). Besides, replace GFP_KERNEL with GFP_NOIO for usb_submit_urb(). Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 99 ++++++++++++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 38 deletions(-) commit 54144b4825ea7790cbc32a0f75a1103a97907646 Author: David S. Miller Date: Fri Jun 16 11:28:49 2017 -0400 tls: Depend upon INET not plain NET. We refer to TCP et al. symbols so have to use INET as the dependency. ERROR: "tcp_prot" [net/tls/tls.ko] undefined! >> ERROR: "tcp_rate_check_app_limited" [net/tls/tls.ko] undefined! ERROR: "tcp_register_ulp" [net/tls/tls.ko] undefined! ERROR: "tcp_unregister_ulp" [net/tls/tls.ko] undefined! ERROR: "do_tcp_sendpages" [net/tls/tls.ko] undefined! Reported-by: kbuild test robot Signed-off-by: David S. Miller net/tls/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c9c0d09741deab0aac76b83961cfe95b24f3e6f Author: Chris Wilson Date: Fri Jun 16 14:28:49 2017 +0100 drm/i915: Fix retrieval of hangcheck stats The default context is always supported (as it contains the global hangcheck stats) and the contexts for hangcheck are not limited to any ring. This was dropped in 2013 because it was supposed to have been included with Ben's full-ppgtt patch set. It never landed and the bug remains. References: https://bugs.freedesktop.org/show_bug.cgi?id=65845 Link: http://patchwork.freedesktop.org/patch/msgid/1372175222-27622-1-git-send-email-mika.kuoppala@intel.com Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170616132849.29597-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 3 --- 1 file changed, 3 deletions(-) commit 816fa34c051492c7f115ad2fd91c9e723d7fc298 Author: Archit Taneja Date: Fri Jun 16 10:39:36 2017 +0530 drm/msm/hdmi: Fix HDMI pink strip issue seen on 8x96 A 2 pixel wide pink strip was observed on the left end of some HDMI monitors configured in a HDMI mode. It turned out that we were missing out on configuring AVI infoframes, and unlike APQ8064, the 8x96 HDMI H/W seems to be sensitive to that. Add configuration of AVI infoframes. While at it, make sure that hdmi_audio_update is only called when we've detected that the monitor supports HDMI. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 70 ++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 3 deletions(-) commit b474cbbb2bfd8d38f8bc36165567fe153d89fc9a Author: Archit Taneja Date: Fri Jun 16 10:39:34 2017 +0530 drm/msm/hdmi: 8996 PLL: Populate unprepare Without doing anything in unprepare, the HDMI driver isn't able to switch modes successfully. Calling set_rate with a new rate results in an un-locked PLL. If we reset the PLL in unprepare, the PLL is able to lock with the new rate. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 5 +++++ 1 file changed, 5 insertions(+) commit ffe8f53f9cc73fb25c8f78d4aed7ddf285503a60 Author: Liviu Dudau Date: Thu Jun 15 15:13:46 2017 +0100 drm/msm/hdmi: Use bitwise operators when building register values Commit c0c0d9eeeb8d ("drm/msm: hdmi audio support") uses logical OR operators to build up a value to be written in the REG_HDMI_AUDIO_INFO0 and REG_HDMI_AUDIO_INFO1 registers when it should have used bitwise operators. Signed-off-by: Liviu Dudau Fixes: c0c0d9eeeb8d ("drm/msm: hdmi audio support") Signed-off-by: Rob Clark drivers/gpu/drm/msm/hdmi/hdmi_audio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 52260ae4c461538a4f104d463a55dfc13c3d8543 Author: Rob Clark Date: Fri Jun 16 08:57:18 2017 -0400 drm/msm: update generated headers Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a2xx.xml.h | 267 ++++- drivers/gpu/drm/msm/adreno/a3xx.xml.h | 22 +- drivers/gpu/drm/msm/adreno/a4xx.xml.h | 66 +- drivers/gpu/drm/msm/adreno/a5xx.xml.h | 1371 +++++++++++++++++++++--- drivers/gpu/drm/msm/adreno/adreno_common.xml.h | 51 +- drivers/gpu/drm/msm/adreno/adreno_pm4.xml.h | 368 ++++++- drivers/gpu/drm/msm/dsi/dsi.xml.h | 13 +- drivers/gpu/drm/msm/dsi/mmss_cc.xml.h | 26 +- drivers/gpu/drm/msm/dsi/sfpb.xml.h | 26 +- drivers/gpu/drm/msm/edp/edp.xml.h | 26 +- drivers/gpu/drm/msm/hdmi/hdmi.xml.h | 68 +- drivers/gpu/drm/msm/hdmi/qfprom.xml.h | 26 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4.xml.h | 26 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5.xml.h | 14 +- drivers/gpu/drm/msm/mdp/mdp_common.xml.h | 26 +- 15 files changed, 2059 insertions(+), 337 deletions(-) commit 8432a903fb97ac3640dbf9281e7c15a673b45747 Author: Rob Clark Date: Tue Jun 13 14:27:45 2017 -0400 drm/msm: remove address-space id Now that the msm_gem supports an arbitrary number of vma's, we no longer need to assign an id (index) to each address space. So rip out the associated code. Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 7 ------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 7 ------- drivers/gpu/drm/msm/msm_drv.c | 16 ---------------- drivers/gpu/drm/msm/msm_drv.h | 11 ----------- drivers/gpu/drm/msm/msm_gem.h | 1 - drivers/gpu/drm/msm/msm_gpu.c | 2 -- drivers/gpu/drm/msm/msm_gpu.h | 1 - drivers/gpu/drm/msm/msm_kms.h | 1 - 8 files changed, 46 deletions(-) commit 4b85f7f5cf776b0fcd4a2e38cb9c69849aae0fc5 Author: Rob Clark Date: Tue Jun 13 13:54:13 2017 -0400 drm/msm: support for an arbitrary number of address spaces It means we have to do a list traversal where we once had an index into a table. But the list will normally have one or two entries. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 138 +++++++++++++++++++++++++++++------------- drivers/gpu/drm/msm/msm_gem.h | 4 +- 2 files changed, 99 insertions(+), 43 deletions(-) commit f4839bd5126310635314610a85468e87b40ce4c8 Author: Rob Clark Date: Tue Jun 13 11:50:05 2017 -0400 drm/msm: refactor how we handle vram carveout buffers Pull some of the logic out into msm_gem_new() (since we don't need to care about the imported-bo case), and don't defer allocating pages. The latter is generally a good idea, since if we are using VRAM carveout to allocate contiguous buffers (ie. no IOMMU), the allocation is more likely to fail. So failing at allocation time is a more sane option. Plus this simplifies things in the next patch. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 48 ++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 21 deletions(-) commit 8bdcd949bbe7e7f9e60a3564baa600884f8f4ba7 Author: Rob Clark Date: Tue Jun 13 11:07:08 2017 -0400 drm/msm: pass address-space to _get_iova() and friends No functional change, that will come later. But this will make it easier to deal with dynamically created address spaces (ie. per- process pagetables for gpu). Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 8 ++++---- drivers/gpu/drm/msm/adreno/a5xx_power.c | 5 +++-- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 6 +++--- drivers/gpu/drm/msm/dsi/dsi_host.c | 4 ++-- drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 6 +++--- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 4 ++-- drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 12 ++++++------ drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 4 ++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 12 ++++++------ drivers/gpu/drm/msm/msm_drv.c | 7 +++++-- drivers/gpu/drm/msm/msm_drv.h | 22 ++++++++++++++-------- drivers/gpu/drm/msm/msm_fb.c | 15 +++++++++------ drivers/gpu/drm/msm/msm_fbdev.c | 2 +- drivers/gpu/drm/msm/msm_gem.c | 18 ++++++++++++------ drivers/gpu/drm/msm/msm_gem.h | 1 + drivers/gpu/drm/msm/msm_gem_submit.c | 4 ++-- drivers/gpu/drm/msm/msm_gpu.c | 6 +++--- 17 files changed, 78 insertions(+), 58 deletions(-) commit f59f62d592a0553bbff6c5b2ba66036becb01c4a Author: Rob Clark Date: Tue Jun 13 10:22:37 2017 -0400 drm/msm/mdp4+5: move aspace/id to base class Before we can shift to passing the address-space object to _get_iova(), we need to fix a few places (dsi+fbdev) that were hard-coding the adress space id. That gets somewhat easier if we just move these to the kms base class. Prep work for next patch. Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++++++-- drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 9 ++++++--- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 14 +++++++------- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h | 4 ---- drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 15 +++++++++------ drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 6 ++++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 10 +++++----- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 4 ---- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 16 ++++++++++------ drivers/gpu/drm/msm/msm_fbdev.c | 4 +++- drivers/gpu/drm/msm/msm_kms.h | 4 ++++ 11 files changed, 56 insertions(+), 40 deletions(-) commit aa7cd242976af3c0a6fe4bcf5d9fbb87200cb5c4 Author: Rob Clark Date: Tue Jun 13 13:58:23 2017 -0400 drm/msm/mdp5: kill pipe_lock It serves no purpose, things should be sufficiently synchronized already by atomic framework. And it is somewhat awkward to be holding a spinlock when msm_gem_iova() is going to start needing to grab a mutex. Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 10 ---------- 1 file changed, 10 deletions(-) commit cb1e38181a0728777057fb03fc4cddb29b7fb24d Author: Rob Clark Date: Tue Jun 13 09:15:36 2017 -0400 drm/msm: fix locking inconsistency for gpu->hw_init() Most, but not all, paths where calling the with struct_mutex held. The fast-path in msm_gem_get_iova() (plus some sub-code-paths that only run the first time) was masking this issue. So lets just always hold struct_mutex for hw_init(). And sprinkle some WARN_ON()'s and might_lock() to avoid this sort of problem in the future. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 13 +++++-------- drivers/gpu/drm/msm/adreno/a5xx_power.c | 11 ++++------- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 ++ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +- drivers/gpu/drm/msm/msm_gem.c | 3 +++ drivers/gpu/drm/msm/msm_gpu.c | 2 ++ 6 files changed, 17 insertions(+), 16 deletions(-) commit 42a105e9cfaf0a0c74fdac5ba4ff17d6c0b024cd Author: Jordan Crouse Date: Mon May 8 14:35:04 2017 -0600 drm/msm: Remove memptrs->wptr memptrs->wptr seems to be unused. Remove it to avoid confusing the upcoming preemption code. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 --- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 1 - 2 files changed, 4 deletions(-) commit 5770fc7a562e7da37cbf981f352d774c0142d7ba Author: Jordan Crouse Date: Mon May 8 14:35:03 2017 -0600 drm/msm: Add a struct to pass configuration to msm_gpu_init() The amount of information that we need to pass into msm_gpu_init() is steadily increasing, so add a new struct to stabilize the function call and make it easier to add new configuration down the line. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++++++++++-- drivers/gpu/drm/msm/msm_gpu.c | 13 ++++++------- drivers/gpu/drm/msm/msm_gpu.h | 11 ++++++++++- 3 files changed, 26 insertions(+), 10 deletions(-) commit 49fd08baa36ac10b13ea7b23fc6bbee8b4a6fcfe Author: Jordan Crouse Date: Mon May 8 14:35:01 2017 -0600 drm/msm: Add hint to DRM_IOCTL_MSM_GEM_INFO to return an object IOVA Modify the 'pad' member of struct drm_msm_gem_info to 'flags'. If the user sets 'flags' to non-zero it means that they want a IOVA for the GEM object instead of a mmap() offset. Return the iova in the 'offset' member. Signed-off-by: Jordan Crouse [robclark: s/hint/flags in commit msg] Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 23 +++++++++++++++++++++-- include/uapi/drm/msm_drm.h | 8 ++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) commit e895c7bd31f5ca7dbd315001cfbdcaee98ee16c4 Author: Jordan Crouse Date: Mon May 8 14:35:00 2017 -0600 drm/msm: Remove idle function hook There isn't any generic code that uses ->idle so remove it. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 4 ++-- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 4 ++-- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 9 ++++----- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 1 + drivers/gpu/drm/msm/adreno/a5xx_power.c | 2 +- drivers/gpu/drm/msm/msm_gpu.h | 1 - 6 files changed, 10 insertions(+), 11 deletions(-) commit 167b606aa262270ab6aeb5700adca6b1f33da26a Author: Jordan Crouse Date: Mon May 8 14:34:59 2017 -0600 drm/msm: Remove DRM_MSM_NUM_IOCTLS The ioctl array is sparsely populated but the compiler will make sure that it is sufficiently sized for all the values that we have so we can safely use ARRAY_SIZE() instead of having a constantly changing #define in the uapi header. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 2 +- include/uapi/drm/msm_drm.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 7c65817e6d38fad8ed4ae8632b3615980a2197b4 Author: Jordan Crouse Date: Wed May 17 08:45:29 2017 -0600 drm/msm: gpu: Enable zap shader for A5XX The A5XX GPU powers on in "secure" mode. In secure mode the GPU can only render to buffers that are marked as secure and inaccessible to the kernel and user through a series of hardware protections. In practice secure mode is used to draw things like a UI on a secure video frame. In order to switch out of secure mode the GPU executes a special shader that clears out the GMEM and other sensitve registers and then writes a register. Because the kernel can't be trusted the shader binary is signed and verified and programmed by the secure world. To do this we need to read the MDT header and the segments from the firmware location and put them in memory and present them for approval. For targets without secure support there is an out: if the secure world doesn't support secure then there are no hardware protections and we can freely write the SECVID_TRUST register from the CPU. We don't have 100% confidence that we can query the secure capabilities at run time but we have enough calls that need to go right to give us some confidence that we're at least doing something useful. Of course if we guess wrong you trigger a permissions violation which usually ends up in a system crash but thats a problem that shows up immediately. [v2: use child device per Bjorn] [v3: use generic MDT loader per Bjorn] [v4: use managed dma functions and ifdefs for the MDT loader] [v5: Add depends for QCOM_MDT_LOADER] Signed-off-by: Jordan Crouse Acked-by: Bjorn Andersson [robclark: fix Kconfig to use select instead of depends + #if IS_ENABLED()] Signed-off-by: Rob Clark drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 180 ++++++++++++++++++++++++++++- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 2 + drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + drivers/gpu/drm/msm/adreno/adreno_gpu.h | 1 + 5 files changed, 183 insertions(+), 2 deletions(-) commit 0cf6a8e2fb8413b581fc0d960f7831b0e7583406 Author: John Stultz Date: Wed Jun 14 11:25:17 2017 -0700 arm64: dts: hi6220: Add k3-dma and i2s/hdmi audio support Add entry for k3-dma driver and i2s/hdmi audio devices. This enables HDMI audio output. Cc: Zhangfei Gao Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Wei Xu Cc: Rob Herring Cc: Andy Green Cc: Dave Long Cc: Guodong Xu Cc: Antonio Borneo Cc: Olof Johansson Cc: Arnd Bergmann Signed-off-by: John Stultz v2: * Split core i2s entry into dtsi and hdmi specific bits into hikey dts v4: * Rework simple-card to use many-dai-links method, as there may be other links in the future v5: * Rework audio description to use the audio-card-graph method as requested by Mark. Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 34 +++++++++++++++++++++++--- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 26 ++++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) commit 7d8c36674b965fca5ed4a112bc9642703fa657b6 Author: Guodong Xu Date: Thu Jun 15 11:04:17 2017 +0800 arm64: dts: hi3660-hikey960: add nodes for WiFi Add nodes for WiFi. HiKey960 is using TI WL1837MOD module. Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 804d7d7a9628aab7af46dd158573101106964a04 Author: Li Wei Date: Thu Jun 15 11:04:16 2017 +0800 arm64: dts: hi3660: add sd/sdio device nodes Add sd/sdio device nodes for hi3660 soc Signed-off-by: Li Wei Signed-off-by: Chen Jun Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 8 ++++ arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 58 +++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit 7d45778b9ce59cdb6b3810a7c7c3252e91abeb5f Author: Guodong Xu Date: Thu Jun 15 11:04:15 2017 +0800 dt-bindings: mmc: dw_mmc-k3: add document of hi3660 mmc Add bindings for hi3660 mmc support Signed-off-by: Li Wei Signed-off-by: Guodong Xu Signed-off-by: Wei Xu Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt | 1 + 1 file changed, 1 insertion(+) commit e02045aa201d35c6892630dec11e6a6fe658c229 Author: Wang Xiaoyin Date: Thu Jun 15 11:04:14 2017 +0800 arm64: dts: hikey960: add device node for pmic and regulators add device node for hi6421 pmic core and hi6421v530 voltage regulator,include LDO(1,3,9,11,15,16) Signed-off-by: Wang Xiaoyin Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 06dc862af81df3f616566350a743e378a3dfe1ef Author: Guodong Xu Date: Thu Jun 15 11:04:13 2017 +0800 dt-bindings: mfd: hi6421: Add hi6421v530 compatible string Add compatible string for HiSilicon Hi6421v530 PMIC. Signed-off-by: Guodong Xu Acked-by: Lee Jones Acked-by: Arnd Bergmann Signed-off-by: Wei Xu Documentation/devicetree/bindings/mfd/hi6421.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 96909778f8929f9275b6b163be051f2bcbe4d3e7 Author: Xiaowei Song Date: Fri Jun 16 22:13:22 2017 +0800 arm64: dts: hisi: add kirin pcie node Add PCIe node for hi3660 Cc: Guodong Xu Signed-off-by: Xiaowei Song Acked-by: Arnd Bergmann Changes in v5: * fix interrupt-map, to conform to gic's #address-cells = <0> * remove redundant status = "ok" Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 35f8001415d301ba47124f463f98eee0e7d0792c Author: Takashi Iwai Date: Fri Jun 16 16:16:33 2017 +0200 ALSA: core: Follow standard EXPORT_SYMBOL() declarations Just a tidy up to follow the standard EXPORT_SYMBOL*() declarations in order to improve grep-ability. - Move EXPORT_SYMBOL*() to the position right after its definition - Remove superfluous blank line before EXPORT_SYMBOL*() lines Signed-off-by: Takashi Iwai sound/core/info.c | 6 ------ sound/core/info_oss.c | 1 - sound/core/init.c | 8 +------- sound/core/isadma.c | 3 --- sound/core/memalloc.c | 13 ++++--------- sound/core/memory.c | 2 -- sound/core/misc.c | 1 - sound/core/oss/mixer_oss.c | 3 +-- sound/core/sound.c | 2 -- sound/core/sound_oss.c | 3 --- 10 files changed, 6 insertions(+), 36 deletions(-) commit 988563929d5b65c021439880ac6bd1b207722f26 Author: Takashi Iwai Date: Fri Jun 16 16:16:05 2017 +0200 ALSA: timer: Follow standard EXPORT_SYMBOL() declarations Just a tidy up to follow the standard EXPORT_SYMBOL*() declarations in order to improve grep-ability. - Move EXPORT_SYMBOL*() to the position right after its definition Signed-off-by: Takashi Iwai sound/core/timer.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 9c8ddd105e3a420b1fe2e0a4c4767b9dd67081a9 Author: Takashi Iwai Date: Fri Jun 16 16:15:24 2017 +0200 ALSA: seq: Follow standard EXPORT_SYMBOL() declarations Just a tidy up to follow the standard EXPORT_SYMBOL*() declarations in order to improve grep-ability. - Move EXPORT_SYMBOL*() to the position right after its definition - Remove superfluous blank line before EXPORT_SYMBOL*() lines Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 8 -------- sound/core/seq/seq_lock.c | 1 - sound/core/seq/seq_memory.c | 2 -- sound/core/seq/seq_midi_emul.c | 9 ++++----- sound/core/seq/seq_midi_event.c | 21 ++++++++------------- sound/core/seq/seq_ports.c | 2 -- sound/core/seq/seq_virmidi.c | 3 +-- 7 files changed, 13 insertions(+), 33 deletions(-) commit 602d7d72c8255f80898e94562f777635efd1ddaf Author: Takashi Iwai Date: Fri Jun 16 16:12:30 2017 +0200 ALSA: pcm: Follow standard EXPORT_SYMBOL() declarations Just a tidy up to follow the standard EXPORT_SYMBOL*() declarations in order to improve grep-ability. - Remove superfluous blank line before EXPORT_SYMBOL*() lines Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 21 --------------------- sound/core/pcm_memory.c | 6 ------ sound/core/pcm_misc.c | 11 ----------- sound/core/pcm_native.c | 7 ------- 4 files changed, 45 deletions(-) commit 7fc92e96c3eed6004ce8dab5e315264bff85db5a Author: Chris Wilson Date: Fri Jun 16 11:54:55 2017 +0100 drm/i915: Store i915_gem_object_is_coherent() as a bit next to cache-dirty For ease of use (i.e. avoiding a few checks and function calls), store the object's cache coherency next to the cache is dirty bit. Specifically this patch aims to reduce the frequency of no-op calls to i915_gem_object_clflush() to counter-act the increase of such calls for GPU only objects in the previous patch. v2: Replace cache_dirty & ~cache_coherent with cache_dirty && !cache_coherent as gcc generates much better code for the latter (Tvrtko) Signed-off-by: Chris Wilson Cc: Dongwon Kim Cc: Matt Roper Tested-by: Dongwon Kim Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170616105455.16977-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem.c | 14 +++++++------- drivers/gpu/drm/i915/i915_gem_clflush.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gem_internal.c | 3 ++- drivers/gpu/drm/i915/i915_gem_object.h | 1 + drivers/gpu/drm/i915/i915_gem_stolen.c | 1 + drivers/gpu/drm/i915/i915_gem_userptr.c | 3 ++- drivers/gpu/drm/i915/selftests/huge_gem_object.c | 3 ++- 8 files changed, 17 insertions(+), 12 deletions(-) commit e27ab73d17ef90db3e586a02ce2f03eb660451cd Author: Chris Wilson Date: Thu Jun 15 13:38:49 2017 +0100 drm/i915: Mark CPU cache as dirty on every transition for CPU writes Currently, we only mark the CPU cache as dirty if we skip a clflush. This leads to some confusion where we have to ask if the object is in the write domain or missed a clflush. If we always mark the cache as dirty, this becomes a much simply question to answer. The goal remains to do as few clflushes as required and to do them as late as possible, in the hope of deferring the work to a kthread and not block the caller (e.g. execbuf, flips). v2: Always call clflush before GPU execution when the cache_dirty flag is set. This may cause some extra work on llc systems that migrate dirty buffers back and forth - but we do try to limit that by only setting cache_dirty at the end of the gpu sequence. v3: Always mark the cache as dirty upon a level change, as we need to invalidate any stale cachelines due to external writes. Reported-by: Dongwon Kim Fixes: a6a7cc4b7db6 ("drm/i915: Always flush the dirty CPU cache when pinning the scanout") Signed-off-by: Chris Wilson Cc: Dongwon Kim Cc: Matt Roper Tested-by: Dongwon Kim Link: http://patchwork.freedesktop.org/patch/msgid/20170615123850.26843-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem.c | 76 ++++++++++++++---------- drivers/gpu/drm/i915/i915_gem_clflush.c | 15 +++-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 21 +++---- drivers/gpu/drm/i915/i915_gem_internal.c | 3 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 5 +- drivers/gpu/drm/i915/selftests/huge_gem_object.c | 3 +- 6 files changed, 67 insertions(+), 56 deletions(-) commit b8e5d2ef19c1b5f2528d09859d5cebed1f870da3 Author: Chris Wilson Date: Fri Jun 16 13:35:08 2017 +0100 drm/i915: Make i915_vma_destroy() static i915_vma_destroy() is now not used outside of i915_vma.c so we can remove the export and make the function static. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170616123508.12673-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_vma.c | 2 +- drivers/gpu/drm/i915/i915_vma.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 21bdb3b071a7c6f34999545092bf15480ab95f49 Merge: 3134bc9 af850e1 Author: Greg Kroah-Hartman Date: Fri Jun 16 14:55:10 2017 +0200 Merge tag 'phy-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 4.13 *) Group phy drivers into vendor specific directories *) Add USB3 PHY driver for Renesas R-Car Gen3 *) Add USB2 PHY driver for Meson GXL and GXM SoCs *) Add USB DRD PHY driver for Broadcom Northstar2 *) Add USB PHY driver for CPCAP PMIC USB *) Make phy-meson8b-usb2 driver support USB PHY on Meson8 *) Make phy-tusb1210 driver support TUSB1211 *) Make phy-rockchip-inno-usb2 driver support usb2-phy in rk3228 SoCs *) Make phy-brcm-sata driver support for stingray SATA phy *) Make bcm-ns-usb3 as a MDIO driver *) Make rockchip-inno-usb2 support two host ports *) Implement ->set_mode() callback in phy-tusb1210 *) Minor fixes in phy drivers Signed-off-by: Kishon Vijay Abraham I commit 10223df2c183df65674ec584dd95e2adced40d99 Author: Ville Syrjälä Date: Thu Jun 15 20:23:08 2017 +0300 drm/i915: Actually attach the tv_format property to the SDVO connector Attach the tv_format property to the SDVO connector instead of passing a '0' in place of the pointer to the property. This got broken when the SDVO connector properties were converted to atomic. We can thank sparse for catching this: drivers/gpu/drm/i915/intel_sdvo.c:2742:75: warning: Using plain integer as NULL pointer Cc: Maarten Lankhorst Cc: Daniel Vetter Fixes: 630d30a4ee27 ("drm/i915: Convert intel_sdvo connector properties to atomic.") Link: http://patchwork.freedesktop.org/patch/msgid/20170615172308.10121-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_sdvo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 33c0f552c9f3721b1e9452b1c82a37992fa90bfd Author: Mark Brown Date: Thu Jun 15 20:13:33 2017 +0100 ASoC: rockchip: Fix build Reported-by: Christophe Jaillet Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e40eda3dda1ef36ddef7e02c1b280a9ae91a561b Author: Liviu Dudau Date: Tue Jun 13 12:20:39 2017 +0100 drm/arm: mali-dp: Use CMA helper for plane buffer address calculation CMA has gained a recent helper function for calculating the start of a plane buffer's physical address. Use that instead of the hand rolled version. Cc: Brian Starkey Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 0df34a807310325cfb910276d631c949aa008d91 Author: Liviu Dudau Date: Tue May 23 14:18:18 2017 +0100 drm/mali-dp: Check PM status when sharing interrupt lines If an instance of Mali DP hardware shares the interrupt line with another hardware (usually another instance of the Mali DP) its interrupt handler can get called when the device is suspended. Check the PM status before making access to the hardware registers to avoid deadlocks. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_hw.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit e2113c036775408348cf1bd60a5659648220973f Author: Jose Abreu Date: Fri May 19 01:52:17 2017 +0100 drm/arm: malidp: Use crtc->mode_valid() callback Now that we have a callback to check if crtc supports a given mode we can use it in malidp so that we restrict the number of probbed modes to the ones we can actually display. Also, remove the mode_fixup() callback as this is no longer needed because mode_valid() will be called before. Signed-off-by: Jose Abreu Cc: Carlos Palminha Cc: Alexey Brodkin Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Dave Airlie Cc: Andrzej Hajda Cc: Archit Taneja Cc: Laurent Pinchart Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 75bd90860a1f6d4671403f5b7beb9c4430ca9750 Author: Takashi Iwai Date: Fri Jun 16 11:20:29 2017 +0200 ASoC: intel: Use kvzalloc() for suspend buffers Intel SST driver allocates lots of pages at suspend for saving the firmware states, and this may occasionally lead to the allocation error due to the high order, ending up with the suspend failure. Use kvzalloc() so that it can fall back to vmalloc() gracefully. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.c | 22 +++++++++++----------- sound/soc/intel/atom/sst/sst.h | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) commit a20a65859384974b5ffb4163a205088fa45862f8 Author: Laurent Pinchart Date: Thu Jun 15 10:30:31 2017 +0300 pinctrl: sh-pfc: r8a7795: Add DU parallel RGB output support The H3 ES1.x and H3 ES2.0 have identical pinmuxing for the parallel RGB output support. Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 101 +++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) commit b6730b20837e7402292d35d3cb910fff4dac7099 Author: Gregory CLEMENT Date: Mon Jun 12 17:34:59 2017 +0200 gpio: mvebu: Add support for the Armada 7K/8K SoCs The Armada 7K and 8K SoCs use the same gpio controller as most of the other mvebu SoCs. However, the main difference is that the GPIO controller is part of a bigger system controller, and a syscon is used to control the overall system controller. Therefore, the driver needs to be adjusted to retrieve the regmap of the syscon to access registers, and account for the fact that registers are located at a certain offset within the regmap. This commit add the support of the syscon and introduce a new variant for this case. It was based on the preliminary work of Thomas Petazzoni. Tested-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 212 ++++++++++++++++++++++++++++++---------------- 1 file changed, 141 insertions(+), 71 deletions(-) commit def8e2285b0e24cfb53ac5d627c924050d995266 Author: Hanna Hawa Date: Mon Jun 12 17:34:57 2017 +0200 pinctrl: mvebu: add driver for Armada CP110 pinctrl This commit adds a pinctrl driver for the CP110 part of the Marvell Armada 7K and 8K SoCs. The Armada 7K has a single CP110, where almost all the MPP pins are available. On the other side, the Armada 8K has two CP110, and the available MPPs are split between the master CP110 (MPPs 32 to 62) and the slave CP110 (MPPs 0 to 31). The register interface to control the MPPs is however the same as all other mvebu SoCs, so we can reuse the common pinctrl-mvebu.c logic. Signed-off-by: Hanna Hawa Reviewed-by: Shadi Ammouri [updated for mvebu pinctrl and 4.9 changes: - converted to simple_mmio - converted to syscon/regmap - removed unimplemented .remove function - dropped DTS changes - defered gpio ranges to DT - fixed warning - properly set soc->nmodes -- rmk] Signed-off-by: Russell King [ add missing MPP[61:56] function 14 (SDIO) -- Konstantin Porotchkin] Signed-off-by: Konstantin Porotchkin [ allow to properly register more then one instance of this driver -- Grzegorz Jaszczyk] Signed-off-by: Grzegorz Jaszczyk [ - rebased on 4.12-rc1 - fixed the 80 character limit for mvebu_mpp_mode array - aligned the compatible name on the ones already used - fixed the MPP table for CP110: some MPP are not available on Armada 7K -- Gregory CLEMENT] Signed-off-by: Gregory CLEMENT Tested-by: Thomas Petazzoni Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/Kconfig | 4 + drivers/pinctrl/mvebu/Makefile | 1 + drivers/pinctrl/mvebu/pinctrl-armada-cp110.c | 687 +++++++++++++++++++++++++++ 3 files changed, 692 insertions(+) commit 86fbd09440f39d7eacf30684985ebe9370f5f813 Author: Hanna Hawa Date: Mon Jun 12 17:34:56 2017 +0200 pinctrl: mvebu: add driver for Armada AP806 pinctrl This commit adds a pinctrl driver for the pin-muxing controller found in the AP806 part of the Marvell Armada 7K and 8K SoCs. Its register interface is compatible with the one used by previous mvebu pin controllers, so the common logic in drivers/pinctrl/mvebu/pinctrl-mvebu.c is used. Signed-off-by: Hanna Hawa Reviewed-by: Shadi Ammouri [updated for mvebu pinctrl changes - converted to simple_mmio - removed unimplemented .remove function - removed DTS description - converted to use syscon/regmap --rmk] Signed-off-by: Russell King Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/Kconfig | 4 + drivers/pinctrl/mvebu/Makefile | 1 + drivers/pinctrl/mvebu/pinctrl-armada-ap806.c | 140 +++++++++++++++++++++++++++ 3 files changed, 145 insertions(+) commit 4a219ef8f37071ce0993959fe52ffa5034689f42 Author: Kailang Yang Date: Fri Jun 16 16:54:35 2017 +0800 ALSA: hda/realtek - Add ALC256 HP depop function Add this functions, it could support ALC256 for HP depop functions. It also can solve some ALC256 machine plug headset cause power off issue. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 70 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 0b36906536ccbd2d2cd535911eb03ee015169056 Author: Russell King Date: Mon Jun 12 17:34:54 2017 +0200 pinctrl: avoid PLAT_ORION dependency Armada 8040 also needs orion pinctrl, and as these symbols are only selected, there's no need to make them depend on PLAT_ORION. Reviewed-by: Thomas Petazzoni Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/Kconfig | 4 ---- 1 file changed, 4 deletions(-) commit ef088187e1ca16d9b986cab63643b0a2ac2d7b94 Author: Gregory CLEMENT Date: Mon Jun 12 17:34:53 2017 +0200 pinctrl: mvebu: remove the offset property for regmap The offset property of the pinctrl node, when a regmap is used in the device tree, was never used nor documented in the binding. Moreover, the compatible string is enough to let the driver know which offset using. So this patch removes the property and move the information at the driver level. Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 6 +----- drivers/pinctrl/mvebu/pinctrl-mvebu.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) commit 43a2dcecd8ae16c76026d6728e072a6c0aa2d8ac Author: Gregory CLEMENT Date: Fri Jun 9 12:09:17 2017 +0200 gpio: mvebu: fix regmap_update_bits usage In some place in the driver regmap_update_bits was misused. Indeed the last argument is not the value of the bit (or group of bits) itself but the mask value inside the register. So when setting the bit N, then the value must be BIT(N) and not 1. CC: Ralph Sennhauser Signed-off-by: Gregory CLEMENT Reviewed-by: Thomas Petazzoni Tested-by: Ralph Sennhauser Tested-by: Chris Packham Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3638bd4a066c14256bad0b99a60821709d3807b4 Author: Soren Brinkmann Date: Thu Jun 8 10:32:07 2017 -0700 gpio: zynq: Clarify quirk and provide helper function The one quirk used in the zynq GPIO driver was called FOO which is not very descriptive. Rename the quirk to IS_ZYNQ as it indicates whether the HW is a zynq or zynqmp device to allow handling of device-specific differences of the HW. Also provide a helper function to test whether the HW is zynq or zynqmp. Signed-off-by: Soren Brinkmann Signed-off-by: Linus Walleij drivers/gpio/gpio-zynq.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 5117f2b05588749b7c7a6ecd3c986bf9e8b581c0 Author: Keerthy Date: Thu Jun 8 09:19:00 2017 +0530 MAINTAINERS: gpio: gpio-davinci: Add entry for gpio-davinci driver Add an entry for the gpio-davinci driver and add myself as a maintainer for the same. Signed-off-by: Keerthy Signed-off-by: Linus Walleij MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit ff8c474d1567bb311a2292efb02d362d3e3cf60e Author: Andy Shevchenko Date: Tue Jun 6 17:28:51 2017 +0300 gpio: merrifield: Remove unused header I don't remember how linux/gpio.h made the source, now it seems unused. Remove it. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-merrifield.c | 1 - 1 file changed, 1 deletion(-) commit ead066e682af74d8bca000da90e05b5dafa6fbeb Author: Geert Uytterhoeven Date: Thu Jun 1 12:30:01 2017 +0200 gpio: of: Spelling: s/retures/returns/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15b5ef42904bdaf20f0145c3693a7d2f3c10ab44 Author: Christoph Hellwig Date: Fri Jun 16 09:17:09 2017 +0200 ALSA: hal2: switch to dma_alloc_attrs Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper. Signed-off-by: Christoph Hellwig Signed-off-by: Takashi Iwai sound/mips/hal2.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 5a6ae9b8013954943c29e34045d7eaf76240682e Author: Jerome Brunet Date: Thu Jun 8 15:09:48 2017 +0200 pinctrl: meson-gxl: add tsin_a pins Add Tsin A pins to bank DV and X. We don't have a driver for the tsin yet but since the tsin A pinmux is enabled by default at boot time, declaring this pinmux is required to properly operate on GPIOX. Without this change, GPIOX 8, 9, 10 and 11 can't be driven as GPIO output as the tsin A seems to have priority. Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 54bd63570484167cb13edf81e31fff107b879981 Author: Joerg Roedel Date: Thu Jun 15 10:36:22 2017 +0200 iommu/amd: Suppress IO_PAGE_FAULTs in kdump kernel When booting into a kdump kernel, suppress IO_PAGE_FAULTs by default for all devices. But allow the faults again when a domain is assigned to a device. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 3 ++- drivers/iommu/amd_iommu_init.c | 9 +++++++++ drivers/iommu/amd_iommu_types.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) commit 82cc56ccf127899cde1d74a0380c29814ceb1b71 Author: Sekhar Nori Date: Thu Jun 8 20:07:33 2017 +0530 ARM: davinci_all_defconfig: enable USB CDC NCM gadget Enable USB CDC NCM gadget module in davinci_all_defconfig to make it easier to use it on these devices. Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit 9e4ffee82249ab8b289cd888071676af9b5477ca Author: Sekhar Nori Date: Thu Jun 8 20:07:32 2017 +0530 ARM: davinci_all_defconfig: enable mtdtests mtdtests module has some useful tests to verify that mtd drivers like davinci_nand are working correctly. Enable it in davinci_all_defconfig to make testing and debug easier. Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit af850e14a7ae493e85090723eb9cf85dafb8b243 Author: Rafał Miłecki Date: Thu Jun 8 22:04:28 2017 +0200 phy: bcm-ns-usb3: add MDIO driver using proper bus layer As USB 3.0 PHY is attached to the MDIO bus this module should provide a MDIO driver and use a proper bus layer. This is a proper (cleaner) solution which doesn't require code to know this specific MDIO bus details. It also allows reusing the driver with other MDIO buses. For now keep platform device support in place. We may consider dropping it once MDIO bindings gets used "everywhere". Signed-off-by: Rafał Miłecki Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/Kconfig | 1 + drivers/phy/broadcom/phy-bcm-ns-usb3.c | 105 ++++++++++++++++++++++++++++++++- 2 files changed, 105 insertions(+), 1 deletion(-) commit 91699e98f19a392dc59defd0731a0434f842f9d4 Author: Rafał Miłecki Date: Thu Jun 8 22:04:27 2017 +0200 dt-bindings: phy: Modify Broadcom NS USB 3.0 PHY binding to use MDIO Thanks to work done by Broadcom explaining their USB 3.0 PHY details we know it's attached to the MDIO bus. Use this knowledge to update the binding: make it a subnode to the MDIO bus and rework way of specifying required registers. This will describe hardware more precisely and will allow to support (describe) more devices attached to the MDIO. While compatibility strings remain the same there isn't a direct conflict (compatibility breakage) for the binding. Originally it wasn't supposed to be used for MDIO subnode so this change should be safe unless some operating system was probing MDIO subnodes as standalone devices. Signed-off-by: Rafał Miłecki Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/bcm-ns-usb3-phy.txt | 27 +++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 4536adee0a96864a1ff000025c4c9a6299541f83 Author: Rafał Miłecki Date: Thu Jun 8 22:04:26 2017 +0200 phy: bcm-ns-usb3: enable MDIO in the platform specific code When we finally start using MDIO layer then bus initialization will be handled in a separated driver. It means our code handling this has to be used for the platform driver only. Signed-off-by: Rafał Miłecki Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-bcm-ns-usb3.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit b20f506f6c63a3e6ee77aa4d519e4880c8a9d2f4 Author: Rafał Miłecki Date: Thu Jun 8 22:04:25 2017 +0200 phy: bcm-ns-usb3: use pointer for PHY writing function Our current writing function accesses PHY directly bypassing MDIO layer. The aim is to extend this module to also behave as MDIO driver. This will require using different writing function which can be handled cleanly by having an extra pointer like this. Signed-off-by: Rafał Miłecki Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-bcm-ns-usb3.c | 98 +++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 42 deletions(-) commit 412512c4f924cb508895237722b36f673f5e113c Author: Rafał Miłecki Date: Thu Jun 8 22:04:24 2017 +0200 phy: bcm-ns-usb3: always wait for idle after writing to the PHY reg Move MDIO specific code to the writing helper function. This makes init code a bit more generic and doesn't require it to track what happens after every write. Signed-off-by: Rafał Miłecki Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-bcm-ns-usb3.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 7dfb9ba33f6f3dee710f47cddf0a098d20afbc25 Merge: 9a30a26 615c16a Author: Jani Nikula Date: Fri Jun 16 10:03:00 2017 +0300 Merge tag 'gvt-next-2017-06-08' of https://github.com/01org/gvt-linux into drm-intel-next-queued gvt-next-2017-06-08 First gvt-next pull for 4.13: - optimization for per-VM mmio save/restore (Changbin) - optimization for mmio hash table (Changbin) - scheduler optimization with event (Ping) - vGPU reset refinement (Fred) - other misc refactor and cleanups, etc. Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170608093547.bjgs436e3iokrzdm@zhen-hp.sh.intel.com commit fe611d047e454123a8e2364d86fffb2820b2a7d8 Author: Colin Ian King Date: Sun Jun 4 17:36:08 2017 +0100 ath6kl: fix spelling mistake: "Indicat" -> "Indicate" Trivial fix to spelling mistake in ath6kl_dbg debug message Signed-off-by: Colin Ian King Reviewed-by: Steve deRosier Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/htc_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8241253d03fe9098e98315a4d66027ae31ab65c5 Author: Norik Dzhandzhapanyan Date: Mon Jun 12 18:03:34 2017 +0300 ath10k: add per chain RSSI reporting Report per chain RSSI to mac80211. Signed-off-by: Norik Dzhandzhapanyan [kvalo@qca.qualcomm.com: fix conflicts and style] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 03a016f8944c5992b62cb92d2d8318f574a07407 Author: Sarada Prasanna Garnayak Date: Tue Jun 6 14:35:41 2017 +0530 ath10k: define structures for CE ctrl/misc register Define structures for the copy engine ctrl/misc registers, that includes CE CMD halt, watermark source, watermark destination, host IE ring, source, destination and dmax ring. This adds support to avoid the conditional compilation, code optimization and dynamic configuration of the copy engine register map for respective hardware bus interface. Signed-off-by: Sarada Prasanna Garnayak Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ce.c | 164 ++++++++++++++++++++------------- drivers/net/wireless/ath/ath10k/ce.h | 132 -------------------------- drivers/net/wireless/ath/ath10k/core.c | 5 + drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/hw.c | 137 +++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 81 ++++++++++++++++ 6 files changed, 325 insertions(+), 195 deletions(-) commit 6b8190d61a622e095f04451437953acd2d74b371 Author: Scott Bauer Date: Thu Jun 15 10:44:30 2017 -0600 nvme: implement NS Optimal IO Boundary from 1.3 Spec The NVMe 1.3 spec introduces Namespace Optimal IO Boundaries (NOIOB), which standardizes the stripe mechanism we currently have quirks for. This patch implements the necessary logic to handle this new feature. Signed-off-by: Scott Bauer Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 9 +++++++++ drivers/nvme/host/nvme.h | 1 + include/linux/nvme.h | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) commit 80886f7c698fd64366a6eced011ec82f4daf968b Author: Srinath Mannam Date: Thu Jun 8 17:01:39 2017 +0530 phy: Add stingray SATA phy support This patch adds support for stingray SATA phy in the SATA BRCM phy driver. Signed-off-by: Srinath Mannam Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-brcm-sata.c | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 3ac255bc8e9716ba581d10764aaf957f9f8dd187 Author: Srinath Mannam Date: Thu Jun 8 17:01:38 2017 +0530 dt-bindings: Update documentation for stingray SATA phy Update BRCM SATA phy dt-binding documentation for stingray. Signed-off-by: Srinath Mannam Reviewed-by: Ray Jui Reviewed-by: Scott Branden Reviewed-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/brcm-sata-phy.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 259a24001a501c09e7c6b718aed3b1b58641534b Author: Tony Lindgren Date: Mon Jun 12 01:12:23 2017 -0700 phy: cpcap-usb: Fix missing return statement Commit 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support") is missing return statement as noted by Colin Ian King . If the optional pins are not configured, we just want to return early and not attempt to configure the pins. Fixes: 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support") Reported-by: Colin Ian King Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I drivers/phy/motorola/phy-cpcap-usb.c | 2 ++ 1 file changed, 2 insertions(+) commit 5499473c86503bb8e307ff7b554643a99a9478c2 Author: Arnd Bergmann Date: Fri Jun 9 12:38:33 2017 +0200 drm/nouveau: use proper prototype in nouveau_pmops_runtime() definition There is a prototype for this function in the header, but the function itself lacks a 'void' in the argument list, causing a harmless warning when building with 'make W=1': drivers/gpu/drm/nouveau/nouveau_drm.c: In function 'nouveau_pmops_runtime': drivers/gpu/drm/nouveau/nouveau_drm.c:730:1: error: old-style function definition [-Werror=old-style-definition] Fixes: 321f5c5f2c49 ("drm/nouveau: replace multiple open-coded runpm support checks with function") Signed-off-by: Arnd Bergmann Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 876ea7be6a71614ef80c05037350a2ff986e3a80 Author: Mikko Perttunen Date: Fri Jun 9 15:25:41 2017 +0300 drm/nouveau: Skip vga_fini on non-PCI device As with vga_init, this function doesn't make sense on non-PCI devices, and the Thunderbolt check in it dereferences a NULL pointer in that case. Add some code to skip this function when the device is not a PCI device. Signed-off-by: Mikko Perttunen Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_vga.c | 4 ++++ 1 file changed, 4 insertions(+) commit fcd504e31292c9fdba07bcd44350c145bc214183 Author: Mikko Perttunen Date: Fri Jun 9 15:25:40 2017 +0300 drm/nouveau/tegra: Don't leave GPU in reset On Tegra186 systems with certain firmware revisions, leaving the GPU in reset can cause a hang. To prevent this, don't leave the GPU in reset. Signed-off-by: Mikko Perttunen Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 3 --- 1 file changed, 3 deletions(-) commit b1df242544b9477dd529b468c13066b66a3f9e97 Author: Mikko Perttunen Date: Fri Jun 9 15:25:39 2017 +0300 drm/nouveau/tegra: Skip manual unpowergating when not necessary On Tegra186, powergating is handled by the BPMP power domain provider and the "legacy" powergating API is not available. Therefore skip these calls if we are attached to a power domain. Signed-off-by: Mikko Perttunen Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3a93dd2243c6af8a52edad675c11a6cdaef969c6 Author: Oscar Salvador Date: Thu May 18 23:24:38 2017 +0200 drm/nouveau/hwmon: Change permissions to numeric This patch replaces the symbolic permissions with the numeric ones. Signed-off-by: Oscar Salvador Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_hwmon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b28d78f1876f32692a122f5fb2f080363678ab2f Author: Oscar Salvador Date: Thu May 18 23:24:37 2017 +0200 drm/nouveau/hwmon: expose the auto_point and pwm_min/max attrs This patch creates a special group attributes for attrs like "*auto_point*". We check if we have support for them, and if we do, we gather them all in an attribute_group's structure which is the parameter regarding special groups of hwmon_device_register_with_info We also do the same for pwm_min/max attrs. Signed-off-by: Oscar Salvador Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_hwmon.c | 34 ++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit bfb96e4c344e312858f53c9cad22150389a76cba Author: Oscar Salvador Date: Thu May 18 23:24:36 2017 +0200 drm/nouveau/hwmon: Remove old code, add .write/.read operations This patch removes old code related to the old api and transforms the functions for the new api. It also adds the .write and .read operations. Signed-off-by: Oscar Salvador Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_hwmon.c | 844 ++++++++++---------------------- 1 file changed, 261 insertions(+), 583 deletions(-) commit dbddaaf083e255958eee9debb441fb49f3dfc0e9 Author: Oscar Salvador Date: Thu May 18 23:24:35 2017 +0200 drm/nouveau/hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string This patch introduces the nouveau_hwmon_ops structure, sets up .is_visible and .read_string operations and adds all the functions for these operations. This is also a preparation for the next patches, where most of the work is being done. This code doesn't interacture with the old one. It's just to make easier the review of all patches. Signed-off-by: Oscar Salvador Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_hwmon.c | 163 ++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) commit 02e9722da85246c748894734961fbfe0e543c66d Author: Oscar Salvador Date: Thu May 18 23:24:34 2017 +0200 drm/nouveau/hwmon: Add config for all sensors and their settings This is a preparation for the next patches. It just adds the sensors with their possible configurable settings and then fills the struct hwmon_channel_info with all this information. Signed-off-by: Oscar Salvador Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_hwmon.c | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 2863204c6208f8aabeeec163b9d9e827a3da0858 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/gm200-: allow non-identity mapping of SOR <-> macro links Finally, everything should be in place to handle this. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d93cd92bd616474da0c842bc4e88f6921da18f1 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-: implement a common supervisor 3.0 This makes use of all the additional routing and state added in previous commits, making it possible to deal with GM20x macro link routing, while also sharing code between the NV50 and GF119 implementations. Signed-off-by: Ben Skeggs .../drm/nouveau/include/nvkm/subdev/bios/init.h | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 125 +-------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 168 ++------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 4 - drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 63 +++----- drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 5 - 8 files changed, 35 insertions(+), 338 deletions(-) commit 8d7ef84d908877708001f3334dbf44e9d48fad57 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-: implement a common supervisor 2.2 This makes use of all the additional routing and state added in previous commits, making it possible to deal with GM20x macro link routing, while also sharing code between the NV50 and GF119 implementations. Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/dacgf119.c | 9 + drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 9 + drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 4 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 117 +--------- drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/headgf119.c | 8 + .../gpu/drm/nouveau/nvkm/engine/disp/headnv50.c | 8 + drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 13 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 251 +++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 9 + .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg84.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 61 ++++- .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 33 +++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 3 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 3 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 3 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 4 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 4 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 10 + 25 files changed, 321 insertions(+), 246 deletions(-) commit 1f0c9eaf31bba3e1cac5534ba17602c115b76cf8 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-: implement a common supervisor 2.1 This makes use of all the additional routing and state added in previous commits, making it possible to deal with GM20x macro link routing, while also sharing code between the NV50 and GF119 implementations. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 15 ++------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 16 ++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 1 + 3 files changed, 11 insertions(+), 21 deletions(-) commit d52e948c67b263d0ceb71d734673ff8b1d4b10ce Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-: implement a common supervisor 2.0 This makes use of all the additional routing and state added in previous commits, making it possible to deal with GM20x macro link routing, while also sharing code between the NV50 and GF119 implementations. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 18 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 66 +------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 110 +++++------------------ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 1 + 5 files changed, 41 insertions(+), 155 deletions(-) commit 327c5581d303183e9e56b50238034f419dcca3ce Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-: implement a common supervisor 1.0 This makes use of all the additional routing and state added in previous commits, making it possible to deal with GM20x macro link routing, while also sharing code between the NV50 and GF119 implementations. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 9 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 71 ++++++++++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 2 + 3 files changed, 70 insertions(+), 12 deletions(-) commit 99a845a30f62b926818412f337ad15218fb121ba Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-gt21x: remove workaround for dp->tmds hotplug issues This shouldn't have been needed ever since we started executing the DisableLT script when shutting down heads. Testing of the board this was originally written for seems to agree. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 27 ------------------------- 1 file changed, 27 deletions(-) commit 32a232c5144d754674f05de3c452af324fe13cac Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/dp: use new devinit script interpreter entry-point Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 68 ++++++++++++--------------- 1 file changed, 30 insertions(+), 38 deletions(-) commit 9648da5a71c25e17d14feb0d7dc9ee73319e8a24 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/dp: determine link bandwidth requirements from head state Training/Untraining will be hooked up to the routing logic, which doesn't allow us to pass in a data rate. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 14 +++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 6 +++++ .../gpu/drm/nouveau/nvkm/engine/disp/headgf119.c | 13 +++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/headnv50.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 2 ++ .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 27 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 1 + 7 files changed, 62 insertions(+), 2 deletions(-) commit 6c22ea3747fd36409ce4a1e1a0cbac40f93e1e71 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp: introduce acquire/release display path methods These exist to give NVKM information on the set of display paths that the DD needs to be active at any given time. Previously, the supervisor attempted to determine this solely from OR state, but there's a few configurations where this information on its own isn't enough to determine the specific display paths in question: - ANX9805, where the PIOR protocol for both DP and TMDS is TMDS. - On a device using DCB Switched Outputs. - On GM20x and newer, with a crossbar between the SOR and macro links. After this commit, the DD tells NVKM *exactly* which display path it's attempting a modeset on. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 9 ++ drivers/gpu/drm/nouveau/nouveau_bios.c | 3 +- drivers/gpu/drm/nouveau/nouveau_encoder.h | 1 + drivers/gpu/drm/nouveau/nv50_display.c | 75 +++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 5 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 6 + drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 131 ++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 8 +- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 22 ++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 49 ++++++-- 16 files changed, 287 insertions(+), 40 deletions(-) commit 3c66c87dc96b3113b5ee84604800c2aabbb48994 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp: remove hw-specific customisation of output paths All of the necessary hw-specific logic is now handled at the output resource level, so all of this can go away. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 54 +++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 13 ----- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 10 ++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 23 +------- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 5 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 6 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 4 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 4 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 4 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 4 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 4 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 3 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 3 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 5 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 6 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 6 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 6 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 68 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 18 ------ drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 11 ++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 12 +--- .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 31 ---------- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 18 ------ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 11 ---- .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 12 ---- .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 12 ---- .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 12 ---- drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 13 ----- 28 files changed, 36 insertions(+), 342 deletions(-) commit e8ccc96dd5f4baa1deb21b6d3b2c4a07bcf62254 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/gf119-: port OR DP VCPI control to nvkm_ior Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 3 --- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 11 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 2 +- 7 files changed, 16 insertions(+), 14 deletions(-) commit 409b9e54727e700ab8dd15a1e29226eda1e04cdb Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/gt215-: port HDA ELD controls to nvkm_ior Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c | 75 +++++++--------------- .../gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c | 74 +++++++-------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 15 +++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 8 --- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 36 +++++++++-- .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 21 ++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 5 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 5 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 5 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 21 ++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 5 ++ 20 files changed, 161 insertions(+), 136 deletions(-) commit 7d1fede03c5880003a08ff080e6e41984902be46 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/g94-: port OR DP drive setting control to nvkm_ior Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 24 ++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 4 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 59 ++++----------------- .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 52 ++++--------------- .../gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 60 +++++----------------- .../gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 1 + 12 files changed, 66 insertions(+), 143 deletions(-) commit a1de2b522fef9fd725f2edb6989af68b8749acf5 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/g94-: port OR DP training pattern control to nvkm_ior Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 5 +++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 7 ------- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 11 +++++------ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 11 +++++------ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 13 ++++++------- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 1 + 12 files changed, 27 insertions(+), 30 deletions(-) commit a3e81117ce0bcec293352558613e35065659da10 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/g94-: port OR DP link power control to nvkm_ior Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 2 ++ .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 7 ------- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 15 +++++++------- .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 24 +--------------------- .../gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 1 + 12 files changed, 17 insertions(+), 43 deletions(-) commit 7dc0bac4aabb62a91543a29782ce12955708bfe2 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/g94-: port OR DP link setup to nvkm_ior Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 10 ++++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 11 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 10 ++++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 18 +++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 18 +++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 1 + 12 files changed, 47 insertions(+), 30 deletions(-) commit 333781045d84628417efa161d37256331abef64b Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/g94-: port OR DP lane mapping to nvkm_ior Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 4 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 12 ++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 5 ++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 3 +++ 9 files changed, 30 insertions(+), 9 deletions(-) commit 797b2fb81b506d4ad30aa34e5c81c0a541d398cd Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/g84-: port OR HDMI control to nvkm_ior Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c | 61 +++++---------------- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigf119.c | 59 +++++--------------- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c | 61 +++++---------------- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c | 62 +++++----------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 11 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 6 --- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 42 +++++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg84.c | 3 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 3 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 3 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 3 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 3 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 3 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 3 ++ .../gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 3 ++ 29 files changed, 134 insertions(+), 219 deletions(-) commit 0df182466265d39591d742839f1014f93b7cbd02 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-: port OR manual sink detection to nvkm_ior Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/engine/disp/dacgf119.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 47 ++++------------------ drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 3 -- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 19 ++++++++- 17 files changed, 40 insertions(+), 80 deletions(-) commit 9c5753bc708da0c2c544fcfe1e94afb399c2b3f6 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-: port OR power state control to nvkm_ior Also removes the user-facing methods to these controls, as they're not currently utilised by the DD anyway. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 25 ------- drivers/gpu/drm/nouveau/nv50_display.c | 76 +--------------------- .../gpu/drm/nouveau/nvkm/engine/disp/dacgf119.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 50 ++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 12 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 9 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 7 -- .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 54 ++++++--------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 25 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg84.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 49 ++++++-------- 32 files changed, 108 insertions(+), 257 deletions(-) commit 29c0ca7389ce8e259516d14397890bfe0ab462c8 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-: fetch head/OR state at beginning of supervisor This data will be used by essentially every part of the supervisor handling process. Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/engine/disp/dacgf119.c | 19 +++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 19 +++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 9 ++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 18 ++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 2 ++ .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 20 ++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg84.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 24 ++++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 24 ++++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 22 ++++++++++++++++++++ 17 files changed, 165 insertions(+) commit 3607bfd398204ddb11f63c09b1cc608adf85f96c Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/nv50-: execute supervisor on its own workqueue Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 10 ++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) commit 7d0a01a6dec9737d24be5ac223e73a0725eac8a0 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/dp: train link only when actively displaying an image This essentially (unless the link becomes unstable and needs to be re-trained) gives us a single entry-point to link training, during supervisor handling, where we can ensure all routing is up to date. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 8 ++------ 2 files changed, 6 insertions(+), 10 deletions(-) commit 22e008f90d546507d57bdac92030cece73ded09a Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/dp: only check for re-train when the link is active An upcoming commit will limit link training to only when the sink is meant to be displaying an image. We still need IRQs enabled even when the link isn't trained (for MST messages), but don't want to train the link unnecessarily. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 51 +++++------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 3 +- 4 files changed, 13 insertions(+), 45 deletions(-) commit 49f2b376df7f9235ccbed1e90f0ec93040001a9b Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/dp: determine a failsafe link training rate The aim here is to protect the OR against locking up when something unexpected happens (such as the display disappearing during modeset, or the DD misbehaving). Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 54 +++++++++++++++++---------- 1 file changed, 35 insertions(+), 19 deletions(-) commit fafa8b5c9f7426cef6b9b52b8582a867edbc7a06 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/dp: use cached link configuration when checking link status Saves some trips across the aux channel. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 39 ++++++++++++--------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit 4423c743ef961153d274f3ec0704672ba979419c Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/dp: no need for lt_state except during manual link training This struct doesn't hold link configuration data anymore, so we can limit its use to internal DP training (anx9805 handles training for external DP). Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 55 ++++++++++++--------------- 1 file changed, 24 insertions(+), 31 deletions(-) commit 75eefe95ee7565c695d1e736005876d18742537f Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/dp: store current link configuration in nvkm_ior We care about this information outside of link training. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 66 +++++++++++++------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 8 ++++ 2 files changed, 41 insertions(+), 33 deletions(-) commit 02d786ccbc7eaaef6ef8380b9d450ef0f4362133 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp/dp: remove DP_PWR method This hasn't been used since atomic. We may want to re-implement "fast" DPMS at some point, but for now, this just gets in the way. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 7 ------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 24 ---------------------- 2 files changed, 31 deletions(-) commit 01a976376b6e57838f223dd2d2639597efd92db4 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp: identity-map display paths to output resources This essentially replicates our current behaviour in a way that's compatible with the new model that's emerging, so that we're able to start porting the hw-specific functions to it. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 10 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 74 +++++++++++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 8 ++- 4 files changed, 89 insertions(+), 8 deletions(-) commit b3c9c0226c69a8d8e8a4505432f8bbf7188ad348 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp: fork off some new hw-specific implementations Upcoming commits make supervisor handling share code between the NV50 and GF119 implementations. Because of this, and a few other cleanups, we need to allow some additional customisation. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 8 +++ .../gpu/drm/nouveau/nvkm/engine/disp/dacgf119.c | 32 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 6 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 57 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 58 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg84.c | 32 ++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 32 ++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 32 ++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 32 ++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 32 ++++++++++++ 20 files changed, 336 insertions(+), 13 deletions(-) commit 78f1ad6f655847411b36bda2b2acbd0648a03d5c Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp: introduce input/output resource abstraction In order to properly support the SOR -> SOR + pad macro separation that occurred with GM20x GPUs, we need to separate OR handling out of the output path code. This will be used as the base to support ORs (DAC, SOR, PIOR). Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 8 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 11 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 4 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 4 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 4 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 4 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c | 72 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 43 +++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 22 +++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 3 + .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 11 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 11 ++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 11 ++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 11 ++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 11 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 11 ++++ 25 files changed, 262 insertions(+), 8 deletions(-) commit 57b2d73be275f853066aaf5cc33f6c59a94260b2 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp: common implementation of scanoutpos method in nvkm_head Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c | 43 +++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 17 ++++++ .../gpu/drm/nouveau/nvkm/engine/disp/headgf119.c | 23 ++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/headnv04.c | 24 +++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/headnv50.c | 33 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 6 --- .../gpu/drm/nouveau/nvkm/engine/disp/rootgf119.c | 37 ------------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c | 54 +++---------------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 62 ++++++---------------- 21 files changed, 161 insertions(+), 150 deletions(-) commit 14187b007e646c0dbf0813d22f7733cf6eebc099 Author: Ben Skeggs Date: Fri May 19 23:59:35 2017 +1000 drm/nouveau/disp: move vblank_{get,put} methods into nvkm_head Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 12 +++++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 16 ----------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 2 ++ .../gpu/drm/nouveau/nvkm/engine/disp/headgf119.c | 18 ++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/headnv04.c | 16 +++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/headnv50.c | 16 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c | 16 ----------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 32 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 6 ---- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 5 ---- 20 files changed, 60 insertions(+), 99 deletions(-) commit a1c930789aa51b928f804c9186f9821efd070ce1 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/disp: introduce object to track per-head functions/state Primarily intended as a way to pass per-head state around during supervisor handling, and share logic between NV50/GF119. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 5 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 23 ++++++-- .../gpu/drm/nouveau/nvkm/engine/disp/basenv50.c | 3 +- .../gpu/drm/nouveau/nvkm/engine/disp/cursnv50.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 69 +++++++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c | 62 +++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 30 ++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/headgf119.c | 34 +++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/headnv04.c | 34 +++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/headnv50.c | 34 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c | 15 ++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 46 +++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/oimmnv50.c | 3 +- .../gpu/drm/nouveau/nvkm/engine/disp/ovlynv50.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/rootgf119.c | 23 +++++--- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 22 +++---- 29 files changed, 351 insertions(+), 88 deletions(-) commit 4b2b42f8e910c65aceb8b2d12fe392a7b7955449 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/disp: delay output path / connector construction until oneinit() This is to allow hw-specific code to instantiate output resources first, so we can cull unsupported output paths based on them. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 8 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 130 ++++++++++----------- 2 files changed, 69 insertions(+), 69 deletions(-) commit 981a8162e2f8282c90f6523324bb51720699bc6a Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/disp: s/nvkm_connector/nvkm_conn/ Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 18 +++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c | 24 ++++++++++++------------ drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h | 14 +++++++------- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) commit f3e70d2991df5591263f2e9f83e74cc047462240 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/disp: rename nvkm_output_dp to nvkm_dp Not all users of nvkm_output_dp have been changed here. The remaining ones belong to code that's disappearing in upcoming commits. This also modifies the debug level of some messages. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 325 +++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 31 +- .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 13 +- 3 files changed, 181 insertions(+), 188 deletions(-) commit d7ce92e27303082f00cf0976d673f4cc0a5f1c5f Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/disp: rename nvkm_output to nvkm_outp This isn't technically "output", but, "display/output path". Not all users of nvkm_output have been changed here. The remaining ones belong to code that's disappearing in upcoming commits. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 22 +++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 20 ++++++------- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 33 +++++++++++++--------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 3 +- 5 files changed, 42 insertions(+), 38 deletions(-) commit af85389c614ae04970c0eea7a5c50fb889c8a480 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/disp: shuffle functions around Upcoming changes to split OR from output path drastically change the placement of various operations. In order to make the real changes clearer, do the moving around part ahead of time. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 11 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 80 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 637 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 143 +++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/dport.c | 401 ------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/dport.h | 81 --- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c | 66 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.h | 15 + .../drm/nouveau/nvkm/engine/disp/hdmi_infoframe.c | 66 --- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigf119.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 366 ++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 22 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.c | 282 --------- drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.h | 76 --- .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 71 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 195 +++++-- .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 73 ++- .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 1 - .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 65 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 24 +- 35 files changed, 1324 insertions(+), 1384 deletions(-) commit 639d72e24295748e37b45b1935145028423922e3 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/kms/nv04: use new devinit script interpreter entry-point Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv04/disp.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 4fdc6ba32eba1b90a39a65e19dacb67329f8c0e5 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/fb/ram/nv40-: use new devinit script interpreter entry-point Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c | 7 +------ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c | 7 +------ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c | 12 ++---------- 3 files changed, 4 insertions(+), 22 deletions(-) commit 28c62976a8a7de7cbdc6908ec0d575cef3cfe288 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/devinit: use new devinit script interpreter entry-point Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 26 +++++----------------- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c | 15 +++++-------- 2 files changed, 11 insertions(+), 30 deletions(-) commit 74bcb2e98a3cac5456c9d3bc38c64963d61e481e Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/bios/init: add a new devinit script interpreter entry-point This will ensure unspecified args are easily identified. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/init.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b88afa43967578741e3b258c80e01969fddd5fe6 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/bios/init: add or/link args separate from output path As of DCB 4.1, these are not the same thing. Compatibility temporarily in place until callers have been updated. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/init.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) commit ca9c2d5b28b4d5aa1d229950b88f7c559eee4164 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/bios/init: bump script offset to 32-bits No (known) case yet, but other tables have been moving beyond 16-bits, so we may as well be prepared. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/init.h | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 2195a22f6dd9f413c952b81dd228db606e32c67c Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/bios/init: rename 'crtc' to 'head' Compatibility temporarily in place until all callers have been updated. Signed-off-by: Ben Skeggs .../drm/nouveau/include/nvkm/subdev/bios/init.h | 6 ++++- drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 26 +++++++++++----------- 2 files changed, 18 insertions(+), 14 deletions(-) commit 5b0e787ad599a8e6803daf743dfc4642018ba469 Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/bios/init: remove internal use of nvbios_init.bios We already have a subdev pointer, from which we can locate the device's BIOS subdev. No need for a separate pointer. Structure/callers not updated yet, as I want to batch more changes and only touch the callers once. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 166 ++++++++++++------------ 1 file changed, 84 insertions(+), 82 deletions(-) commit 4bb4a7466af6d96d4fc8471336eb738d13c2471c Author: Ben Skeggs Date: Fri May 19 23:59:34 2017 +1000 drm/nouveau/bios/init: rename nvbios_init() to nvbios_devinit() Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/init.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 7eaf1198a9aaa9c31c9270e370088d8a79c149ab Author: Ben Skeggs Date: Thu May 11 17:29:58 2017 +1000 drm/nouveau/tmr: remove nvkm_timer_alarm_cancel() nvkm_timer_alarm() already handles this as part of protecting against callers passing in no timeout value. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c | 9 --------- 6 files changed, 5 insertions(+), 15 deletions(-) commit 4dc33b12229fc540dc69b0d4aced60672bab142d Author: Karol Herbst Date: Sun Apr 23 20:06:37 2017 +0200 drm/nouveau/bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10 I only saw those values inside the vbios: 0xff, 0xfd, 0xfc, 0xfa for valid rails. No idea what the lower value does, but at least we get power readings on a lot of Fermi GPUs with that. v2: add missing parentheses Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c0cd04700f5c88145602b35c24e9128767a4ad69 Author: Karol Herbst Date: Sun Apr 23 10:36:31 2017 +0200 drm/nouveau/bios/volt: Parse min and max for Version 0x40 This is according to what we have in nvbios. Fixes "ERROR: Can't get value of subfeature in0_min: Can't read" errors in sensors for some GPUs. Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/volt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0f18d2765ab1ab9530e1b80dc1bc247c8b13cef7 Author: Alastair Bridgewater Date: Tue Apr 11 13:11:25 2017 -0400 drm/nouveau: Enable stereoscopic 3D output over HDMI Enable stereoscopic output for HDMI and DisplayPort connectors on NV50+ (G80+) hardware. We do not enable stereoscopy on older hardware in case there is some older board that still has HDMI output but for which we have no logic for setting the Vendor InfoFrame. With this, I get an obvious 3D output when using the "testdisplay" program from intel-gpu-tools with the "-3" parameter and outputting to a 3D-capable HDMI display, for all available 3D modes (be they TB, SBSH, or FP) on all four G80+ DISPs. Signed-off-by: Alastair Bridgewater drivers/gpu/drm/nouveau/nouveau_connector.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 37aa2243ff4985c0bdf309bf951f2cdd680fbe5c Author: Alastair Bridgewater Date: Tue Apr 11 13:11:24 2017 -0400 drm/nouveau: Handle frame-packing mode geometry and timing effects Frame-packing modes add an extra vtotal raster lines to each frame above and beyond what the basic mode description calls for. Account for this during scaler configuration (possibly a bit of a hack), during CRTC configuration (clearly not a hack), and when checking that a mode is valid for a given connector (cribbed from the i915 driver). Signed-off-by: Alastair Bridgewater Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +++ drivers/gpu/drm/nouveau/nv50_display.c | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) commit a8970743502f6e52297fca4181ae524041119106 Author: Alastair Bridgewater Date: Tue Apr 11 13:11:23 2017 -0400 drm/nouveau/disp/gk104-: Use supplied HDMI InfoFrames Now that we have the InfoFrame data being provided, for the most part, program the hardware to use it. While we're here, and since the functionality will come in handy for supporting 3D stereoscopy, implement setting the Vendor ("generic"?) InfoFrame. Also don't enable any InfoFrame that is not provided, and disable the Vendor InfoFrame when disabling the output. Signed-off-by: Alastair Bridgewater Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c | 36 ++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) commit 2709b275c5d7ad01ae08cad004587f479aa3ea95 Author: Alastair Bridgewater Date: Tue Apr 11 13:11:22 2017 -0400 drm/nouveau/disp/gf119: Use supplied HDMI InfoFrames Now that we have the InfoFrame data being provided, for the most part, program the hardware to use it. While we're here, and since the functionality will come in handy for supporting 3D stereoscopy, implement setting the Vendor ("generic"?) InfoFrame. Also don't enable any InfoFrame that is not provided, and disable the Vendor InfoFrame when disabling the output. Signed-off-by: Alastair Bridgewater Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/engine/disp/hdmigf119.c | 40 ++++++++++++++++++---- 1 file changed, 34 insertions(+), 6 deletions(-) commit ba32836879c32b027adacf0bad4a5c62f22d2173 Author: Alastair Bridgewater Date: Tue Apr 11 13:11:21 2017 -0400 drm/nouveau/disp/gt215: Use supplied HDMI InfoFrames Now that we have the InfoFrame data being provided, for the most part, program the hardware to use it. While we're here, and since the functionality will come in handy for supporting 3D stereoscopy, implement setting the Vendor ("generic") InfoFrame. Also don't enable any AVI or Vendor InfoFrame that is not provided, and disable the Vendor InfoFrame when disabling the output. Ignore the Audio InfoFrame: We don't supply it, and altering HDMI audio semantics (for better or worse) on this hardware is out of scope for me at this time. Signed-off-by: Alastair Bridgewater Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c | 37 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 6 deletions(-) commit a45f7908b3ac4691d9abba5fc480ba0f718db3ea Author: Alastair Bridgewater Date: Tue Apr 11 13:11:20 2017 -0400 drm/nouveau/disp/g84-gt200: Use supplied HDMI InfoFrames Now that we have the InfoFrame data being provided, for the most part, program the hardware to use it. While we're here, and since the functionality will come in handy for supporting 3D stereoscopy, implement setting the Vendor ("generic"?) InfoFrame. Also don't enable any AVI or Vendor InfoFrame that is not provided, and disable the Vendor InfoFrame when disabling the output. Ignore the Audio InfoFrame: We don't supply it, and altering HDMI audio semantics (for better or worse) on this hardware is out of scope for me at this time. Signed-off-by: Alastair Bridgewater Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c | 37 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 6 deletions(-) commit f60213c0ee93ffb89a64bad9a5db52e854530b1d Author: Alastair Bridgewater Date: Tue Apr 11 13:11:19 2017 -0400 drm/nouveau/disp: Add mechanism to convert HDMI InfoFrames to hardware format HDMI InfoFrames are passed to NVKM as bags of bytes, but the hardware needs them to be packed into words. Rather than having four (or more) copies of the packing logic introduce a single copy now, in a central place. We currently need these for AVI and Vendor InfoFrames, but we may also expect to need them for Audio InfoFrames at some point. Signed-off-by: Alastair Bridgewater Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 1 + .../drm/nouveau/nvkm/engine/disp/hdmi_infoframe.c | 66 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 11 ++++ 3 files changed, 78 insertions(+) commit 34fd3e5d8c5f6bdcc2245084036680a4bfc23370 Author: Alastair Bridgewater Date: Tue Apr 11 13:11:18 2017 -0400 drm/nouveau: Pass mode-dependent AVI and Vendor HDMI InfoFrames to NVKM Now that we have mechanism by which to pass mode-dependent HDMI InfoFrames to the low-level hardware driver, it is incumbent upon us to do so. Signed-off-by: Alastair Bridgewater Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 31fe2c200262a512255340d6f9493d51e06a8207 Author: Alastair Bridgewater Date: Tue Apr 11 13:11:17 2017 -0400 drm/nouveau/disp/g84-: Extend NVKM HDMI power control method to set InfoFrames The nouveau driver, in the Linux 3.7 days, used to try and set the AVI InfoFrame based on the selected display mode. These days, it uses a fixed set of InfoFrames. Start to correct that, by providing a mechanism whereby InfoFrame data may be passed to the NVKM functions that do the actual configuration. At this point, only establish the new parameters and their parsing, don't actually use the data anywhere yet (since it's not supplied anywhere). Signed-off-by: Alastair Bridgewater Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 4 +++- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c | 9 ++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigf119.c | 9 ++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c | 9 ++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c | 9 ++++++++- 5 files changed, 35 insertions(+), 5 deletions(-) commit 35dd9874bf6138ab290c7f58020fcdc88f508805 Author: Alastair Bridgewater Date: Tue Apr 11 13:11:16 2017 -0400 drm/nouveau: Clean up nv50_head_atomic_check_mode() and fix blankus calculation drm_mode_set_crtcinfo() does compensation for interlace and doublescan timing effects already, so do it first and use the compensated figures instead of the constant "vscan / ilace" terms that we had before. And then it turns out that the hardware model for how the timing parameters are configured is basically the standard model, but starting one clock before the sync pulse rather than at the start of the display area, which lets us drastically simplify the overall timing calculations (verifying the changes by algebraic operations is left as an exercise for the reader). Finally, there were a couple of issues with the computation of m->v.blankus that are addressed here. Interlaced modes would generate a negative intermediate result. Double scan modes would generate an overestimate rather than an underestimate. And when enabling frame-packing modes, a rather extreme overestimate would be generated. Fixed, by using the timings as adjusted for the CRTC to find the length of the vertical blanking period instead of mixing adjusted and pre-adjustment timing parameters. Signed-off-by: Alastair Bridgewater Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 44 ++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit 925344ccc91d7a7fd84cab2dece1c34bbd86fd8c Merge: a682169 32c1431 Author: Dave Airlie Date: Fri Jun 16 13:58:27 2017 +1000 BackMerge tag 'v4.12-rc5' into drm-next Linux 4.12-rc5 for nouveau fixes commit 117b07e64b5a8b41e03e94342d8573f85ddc35c7 Merge: 1492a3a 4c07c13 Author: David S. Miller Date: Thu Jun 15 22:53:24 2017 -0400 Merge branch 'mlx4-XDP-performance-improvements' Tariq Toukan says: ==================== mlx4 XDP performance improvements This patchset contains data-path improvements, mainly for XDP_DROP and XDP_TX cases. Main patches: * Patch 2 by Saeed allows enabling optimized A0 RX steering (in HW) when setting a single RX ring. With this configuration, HW packet-rate dramatically improves, reaching 28.1 Mpps in XDP_DROP case for both IPv4 (37% gain) and IPv6 (53% gain). * Patch 6 enhances the XDP xmit function. Among other changes, now we ring one doorbell per NAPI. Patch gives 17% gain in XDP_TX case. * Patch 7 obsoletes the NAPI of XDP_TX completion queue and integrates its poll into the respective RX NAPI. Patch gives 15% gain in XDP_TX case. Series generated against net-next commit: f7aec129a356 rxrpc: Cache the congestion window setting ==================== Signed-off-by: David S. Miller commit 4c07c132408a685d31bb6e638aef4d245e30703a Author: Tariq Toukan Date: Thu Jun 15 14:35:40 2017 +0300 net/mlx4_en: Refactor mlx4_en_free_tx_desc Some code re-ordering, functionally equivalent. - The !tx_info->inl check is evaluated anyway in both flows (common case/end case). Run it first, this might finish the flows earlier. - dma_unmap calls are identical in both flows, get it out of the if block into the common area. Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Gain is too small to be measurable, no degradation sensed. Results are similar for IPv4 and IPv6. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 45 +++++++++++------------------- 1 file changed, 16 insertions(+), 29 deletions(-) commit 9573e0d39ff8d7d1e0bcc10e23d18b9cbc4ca14e Author: Tariq Toukan Date: Thu Jun 15 14:35:39 2017 +0300 net/mlx4_en: Replace TXBB_SIZE multiplications with shift operations Define LOG_TXBB_SIZE, log of TXBB_SIZE, and use it with a shift operation instead of a multiplication with TXBB_SIZE. Operations are equivalent as TXBB_SIZE is a power of two. Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Gain is too small to be measurable, no degradation sensed. Results are similar for IPv4 and IPv6. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 26 ++++++++++++++------------ drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 ++- 2 files changed, 16 insertions(+), 13 deletions(-) commit 77788b5bf6becc5ada0da9f99e90c20ea6e77a58 Author: Tariq Toukan Date: Thu Jun 15 14:35:38 2017 +0300 net/mlx4_en: Increase default TX ring size Increase the default TX ring size (from 512 to 1024) to match the RX ring size. This gives the XDP TX ring a better chance to keep up with the rate of its RX ring in case of a high load of XDP_TX actions. Tested: Ethtool counter rx_xdp_tx_full used to increase, after applying this patch it stopped. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c78511b0503c9b53fd0f5ccc8b28d5e94a3dfcb Author: Tariq Toukan Date: Thu Jun 15 14:35:37 2017 +0300 net/mlx4_en: Poll XDP TX completion queue in RX NAPI Instead of having their own NAPIs, XDP TX completion queues get polled within the corresponding RX NAPI. This prevents any possible race on TX ring prod/cons indices, between the context that issues the transmits (RX NAPI) and the context that handles the completions (was previously done in a separate NAPI). This also improves performance, as it decreases the number of NAPIs running on a CPU, saving the overhead of syncing and switching between the contexts. Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Single queue no-RSS optimization ON. XDP_TX packet rate: ------------------------------------- | Before | After | Gain | IPv4 | 12.0 Mpps | 13.8 Mpps | 15% | IPv6 | 12.0 Mpps | 13.8 Mpps | 15% | ------------------------------------- Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_cq.c | 25 ++++++++++++++++++------- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 8 +++++--- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 22 +++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 5 +++-- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 7 ++++++- 5 files changed, 51 insertions(+), 16 deletions(-) commit 36ea7964982f54370e051386b74df914c53e2219 Author: Tariq Toukan Date: Thu Jun 15 14:35:36 2017 +0300 net/mlx4_en: Improve XDP xmit function Several performance improvements in XDP TX datapath, including: - Ring a single doorbell for XDP TX ring per NAPI budget, instead of doing it per a lower threshold (was 8). This includes removing the flow of immediate doorbell ringing in case of a full TX ring. - Compiler branch predictor hints. - Calculate values in compile time rather than in runtime. Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Single queue no-RSS optimization ON. XDP_TX packet rate: ------------------------------------- | Before | After | Gain | IPv4 | 10.3 Mpps | 12.0 Mpps | 17% | IPv6 | 10.3 Mpps | 12.0 Mpps | 17% | ------------------------------------- Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 59 +++++++++------------------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 +- 3 files changed, 21 insertions(+), 43 deletions(-) commit f28186d6b55d4c0b315d025753c22927e836a0e2 Author: Tariq Toukan Date: Thu Jun 15 14:35:35 2017 +0300 net/mlx4_en: Improve stack xmit function Several small code and performance improvements in stack TX datapath, including: - Compiler branch predictor hints. - Minimize variables scope. - Move tx_info non-inline flow handling to a separate function. - Calculate data_offset in compile time rather than in runtime (for !lso_header_size branch). - Avoid trinary-operator ("?") when value can be preset in a matching branch. Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Gain is too small to be measurable, no degradation sensed. Results are similar for IPv4 and IPv6. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 151 +++++++++++++++++------------ 1 file changed, 87 insertions(+), 64 deletions(-) commit cc26a4908682698cafdb5bb917f19840aff1a149 Author: Tariq Toukan Date: Thu Jun 15 14:35:34 2017 +0300 net/mlx4_en: Improve transmit CQ polling Several small performance improvements in TX CQ polling, including: - Compiler branch predictor hints. - Minimize variables scope. - More proper check of cq type. - Use boolean instead of int for a binary indication. Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Packet-rate tests for both regular stack and XDP use cases: No noticeable gain, no degradation. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 9bcee89ac4dbafe77b7a2fc68c4a784358d6e4e4 Author: Tariq Toukan Date: Thu Jun 15 14:35:33 2017 +0300 net/mlx4_en: Improve receive data-path Several small performance improvements in RX datapath, including: - Compiler branch predictor hints. - Replace a multiplication with a shift operation. - Minimize variables scope. - Write-prefetch for packet header. - Avoid trinary-operator ("?") when value can be preset in a matching branch. - Save a branch by updating RX ring doorbell within mlx4_en_refill_rx_buffers(), which now returns void. Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Single queue no-RSS optimization ON (enable by ethtool -L rx 1). XDP_DROP packet rate: Same (28.1 Mpps), lower CPU utilization (from ~100% to ~92%). Drop packets in TC: ------------------------------------- | Before | After | Gain | IPv4 | 4.14 Mpps | 4.18 Mpps | 1% | ------------------------------------- XDP_TX packet rate: ------------------------------------- | Before | After | Gain | IPv4 | 10.1 Mpps | 10.3 Mpps | 2% | IPv6 | 10.1 Mpps | 10.3 Mpps | 2% | ------------------------------------- Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 73 ++++++++++++++++-------------- 1 file changed, 39 insertions(+), 34 deletions(-) commit 4931c6ef04b4eb6f726def76f845c10d1bb7057d Author: Saeed Mahameed Date: Thu Jun 15 14:35:32 2017 +0300 net/mlx4_en: Optimized single ring steering Avoid touching RX QP RSS context when loading with only one RX ring, to allow optimized A0 RX steering. Enable by: - loading mlx4_core with module param: log_num_mgm_entry_size = -6. - then: ethtool -L rx 1 Performance tests: Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz XDP_DROP packet rate: ------------------------------------- | Before | After | Gain | IPv4 | 20.5 Mpps | 28.1 Mpps | 37% | IPv6 | 18.4 Mpps | 28.1 Mpps | 53% | ------------------------------------- Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_main.c | 6 ++-- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 12 ++++--- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 48 ++++++++++++++++++++------ drivers/net/ethernet/mellanox/mlx4/main.c | 4 +-- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 5 files changed, 50 insertions(+), 22 deletions(-) commit cf97050d547281edc5b813b501d5888c60f23bb2 Author: Tariq Toukan Date: Thu Jun 15 14:35:31 2017 +0300 net/mlx4_en: Remove unused argument in TX datapath function Remove owner argument, as it is obsolete and unused. This also saves the overhead of calculating its value in data-path. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Cc: kernel-team@fb.com Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 10 ++++------ drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) commit acedeb509830d4635f37124fd41284cc749afde7 Author: Frank Rowand Date: Tue Jun 13 15:51:23 2017 -0700 MAINTAINERS: add device tree ABI documentation file sysfs-firmware-ofw describes the /sys/firmware/devicetree/ hierarchy and /proc/device-tree so add a file line for it to the entry OPEN FIRMWARE AND FLATTENED DEVICE TREE Signed-off-by: Frank Rowand Signed-off-by: Rob Herring MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 9b6782e7f0efc2bf483e000b95fc7c06322a0703 Author: Biju Das Date: Tue Jun 6 16:10:14 2017 +0100 of: Add vendor prefix for iWave Systems Technologies Pvt. Ltd This patch adds vendor prefix for iWave Systems Technologies Pvt. Ltd. Website: http://www.iwavesystems.com/ Signed-off-by: Biju Das Reviewed-by: Chris Paterson Acked-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 34539b6c487c3d1cd1f3cafd1643e5ca89167813 Author: Alice Ferrazzi Date: Fri Jun 16 01:19:16 2017 +0900 kselftest: membarrier: make test names more informative Make membarrier test names more informative. Signed-off-by: Alice Ferrazzi Signed-off-by: Paul Elder Signed-off-by: Shuah Khan tools/testing/selftests/membarrier/membarrier_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4d1065b315b433f224920f1617bc3783230501c Author: Paul Elder Date: Fri Jun 16 00:54:22 2017 +0900 kselftest: make callers of ksft_exit_skip() output the reason for skipping Make the three tests that did use the old ksft_ext_skip() (breakpoints/breakpoint_test_arm64, breakpoints/step_after_suspend_test, and membarrier_test) use the new one, with an output for the reason for skipping all the tests. Signed-off-by: Paul Elder Signed-off-by: Shuah Khan tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 3 +-- tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 ++-- tools/testing/selftests/membarrier/membarrier_test.c | 7 +++---- 3 files changed, 6 insertions(+), 8 deletions(-) commit 54f57baab644e99b6da34d9538b2a9c0a05b690d Author: Paul Elder Date: Fri Jun 16 00:54:20 2017 +0900 kselftest: make ksft_exit_skip() output a reason for skipping Make ksft_exit_skip() input an optional message string as the reason for skipping all the tests and outputs it prior to exiting. Signed-off-by: Paul Elder Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a6821698918a579e7219d706092e83f367f01ba2 Merge: 033fd32 add1318 Author: Dave Airlie Date: Fri Jun 16 10:05:38 2017 +1000 Merge tag 'imx-drm-next-2017-06-08' of git://git.pengutronix.de/git/pza/linux into drm-next imx-drm: cleanups and YUV 4:2:0 memory read/write reduction support - Remove counter load enable form PRE, which has no effect. - Add support for setting the double read/write reduction flag in channel parameter memory. This can be used to save some memory bandwidth when capturing in YUV 4:2:0 chroma subsampled formats. - Allocate DMA channel structures as needed, most of the 64 channels are unused or even reserved. - Remove unused interrupt busy waiting routine. - Set VDIC field order for both AUTO and MAN inputs simultaneously as both can't be active at the same time. * tag 'imx-drm-next-2017-06-08' of git://git.pengutronix.de/git/pza/linux: gpu: ipu-v3: vdic: include AUTO field order bit in ipu_vdi_set_field_order gpu: ipu-v3: remove interrupt busy waiting routine gpu: ipu-v3: allocate ipuv3_channels as needed gpu: ipu-v3: Add support for double read/write reduction gpu: ipu-v3: prg: remove counter load enable commit 033fd3256f5aef7cbc0df0d747377be6c4349f48 Merge: 202dfa0 09cedcb Author: Dave Airlie Date: Fri Jun 16 10:05:03 2017 +1000 Merge tag 'drm-fsl-dcu-for-v4.13' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next some fsl-dcu cleanups * tag 'drm-fsl-dcu-for-v4.13' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: use new drm_atomic_helper_shutdown drm/fsl-dcu: implement irq_preinstall/uninstall callbacks drm/fsl: Drop drm_vblank_cleanup commit 202dfa086dfa9a250d9ad0ec393251a8e23248d6 Merge: 7249e3d fa5b411 Author: Dave Airlie Date: Fri Jun 16 10:04:14 2017 +1000 Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/media into drm-next The series interleaves DRM and V4L2 patches due to dependencies between the R- Car DU and VSP drivers. Mauro has acked all the V4L2 patches to go through your tree, and they don't conflict with anything queued for v4.13 in his tree. If I need to send any conflicting patches through Mauro's tree for v4.13, I'll make sure to base them on this branch. * 'drm/next/du' of git://linuxtv.org/pinchartl/media: drm: rcar-du: Map memory through the VSP device v4l: vsp1: Add API to map and unmap DRM buffers through the VSP v4l: vsp1: Map the DL and video buffers through the proper bus master v4l: rcar-fcp: Add an API to retrieve the FCP device v4l: rcar-fcp: Don't get/put module reference drm: rcar-du: Register a completion callback with VSP1 v4l: vsp1: Extend VSP1 module API to allow DRM callbacks v4l: vsp1: Postpone frame end handling in event of display list race drm: rcar-du: Arm the page flip event after queuing the page flip commit 7249e3d64ee512521087de802d3f3ad504258535 Merge: 04d4fb5 110d33d Author: Dave Airlie Date: Fri Jun 16 10:02:35 2017 +1000 Merge tag 'sunxi-drm-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next sun4i-drm changes for 4.13 An unusually big pull request for this merge window, with three notable features: - V3s display engine support. This is especially notable because it uses a different display engine used on the newer Allwinner SoCs (H3, A64 and the likes) that will be quite easily supported now. - HDMI support for the old Allwinner SoCs. This is enabled only on the A10s for now, but should be really easy to extend to deal with A10, A20 and A31 - Preliminary work to deal with dual-pipeline SoCs (A10, A20, A31, H3, etc.). It currently ignores the second pipeline, but we can use the dual-pipelines bindings. This will be useful to enable the display pipeline while we work on the dual-pipeline. * tag 'sunxi-drm-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (27 commits) drm/sun4i: Add compatible for the A10s pipeline drm/sun4i: Add HDMI support dt-bindings: display: sun4i: Add allwinner,tcon-channel property dt-bindings: display: sun4i: Add HDMI display bindings drm/sun4i: Ignore the generic connectors for components drm/sun4i: tcon: multiply the vtotal when not in interlace drm/sun4i: tcon: Change vertical total size computation inconsistency drm/sun4i: tcon: Fix tcon channel 1 backporch calculation drm/sun4i: tcon: Switch mux on only for composite drm/sun4i: tcon: Move the muxing out of the mode set function drm/sun4i: tcon: Add channel debug drm/sun4i: tcon: add support for V3s TCON drm/sun4i: Add compatible string for V3s display engine drm/sun4i: add support for Allwinner DE2 mixers drm/sun4i: add a Kconfig option for sun4i-backend drm/sun4i: abstract a engine type drm/sun4i: return only planes for layers created dt-bindings: add bindings for DE2 on V3s SoC drm/sun4i: backend: Clarify sun4i_backend_layer_enable debug message drm/sun4i: Set TCON clock inside sun4i_tconX_mode_set ... commit 04d4fb5fa63876d8e7cf67f2788aecfafc6a28a7 Merge: bfda9aa a1924005 Author: Dave Airlie Date: Fri Jun 16 09:54:02 2017 +1000 Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next New radeon and amdgpu features for 4.13: - Lots of Vega10 bug fixes - Preliminary Raven support - KIQ support for compute rings - MEC queue management rework from Andres - Audio support for DCE6 - SR-IOV improvements - Improved module parameters for controlling radeon vs amdgpu support for SI and CIK - Bug fixes - General code cleanups [airlied: dropped drmP.h header from one file was needed and build broke] * 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux: (362 commits) drm/amdgpu: Fix compiler warnings drm/amdgpu: vm_update_ptes remove code duplication drm/amd/amdgpu: Port VCN over to new SOC15 macros drm/amd/amdgpu: Port PSP v10.0 over to new SOC15 macros drm/amd/amdgpu: Port PSP v3.1 over to new SOC15 macros drm/amd/amdgpu: Port NBIO v7.0 driver over to new SOC15 macros drm/amd/amdgpu: Port NBIO v6.1 driver over to new SOC15 macros drm/amd/amdgpu: Port UVD 7.0 over to new SOC15 macros drm/amd/amdgpu: Port MMHUB over to new SOC15 macros drm/amd/amdgpu: Cleanup gfxhub read-modify-write patterns drm/amd/amdgpu: Port GFXHUB over to new SOC15 macros drm/amd/amdgpu: Add offset variant to SOC15 macros drm/amd/powerplay: add avfs control for Vega10 drm/amdgpu: add virtual display support for raven drm/amdgpu/gfx9: fix compute ring doorbell index drm/amd/amdgpu: Rename KIQ ring to avoid spaces drm/amd/amdgpu: gfx9 tidy ups (v2) drm/amdgpu: add contiguous flag in ucode bo create drm/amdgpu: fix missed gpu info firmware when cache firmware during S3 drm/amdgpu: export test ib debugfs interface ... commit bfda9aa15317838ddb259406027ef9911a1dffbc Merge: 3ee45a3 ac7c748 Author: Dave Airlie Date: Fri Jun 16 09:33:43 2017 +1000 Merge tag 'drm-misc-next-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc into drm-next Cross-subsystem Changes: - dt-bindings: add vendor prefix for NLT Technologies, Ltd. (Lucas) - dt-bindings: Add support for samsung s6e3hf2 panel (Hoegeun) Core Changes: - Add drm_panel_bridge to avoid connector boilerplate in drivers (Eric) - Trival fixes for dupe forward decl and reduce scope of variable (Dawid) Driver Changes: - dw-hdmi: Use mode_valid hook on bridge instead of connector (Jose) - vc4,atmel-hlcdc: Use drm_panel_bridge where appropriate (Eric) - panel: Add Innolux P079ZCA panel driver (Chris) - panel-simple: Add NL12880B20-05, NL192108AC18-02D, P320HVN03 panels (Lucas) - panel-samsung-s6e3ha2: Add s6e3hf2 panel support (Hoegeun) - zte,vc4,pl111,panel,mxsfb: Miscellaneous fixes Cc: Jose Abreu Cc: Eric Anholt Cc: Chris Zhong Cc: Lucas Stach Cc: Hoegeun Kwon Cc: Dawid Kurek * tag 'drm-misc-next-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc: (26 commits) drm: Reduce scope of 'state' variable drm: mxsfb_crtc: Reset the eLCDIF controller drm: Remove duplicate forward declaration drm/panel: s6e3ha2: Add support for s6e3hf2 panel on TM2e board dt-bindings: Add support for samsung s6e3hf2 panel drm/panel: add backlight dependency for sitronix-st7789v drm/panel: S6E3HA2 needs backlight code drm/panel: simple: add support for AUO P320HVN03 drm/panel: simple: add support for NLT NL192108AC18-02D dt-bindings: add vendor prefix for NLT Technologies, Ltd. drm/panel: simple: add support for NEC NL12880B20-05 drm/panel: add Innolux P079ZCA panel driver dt-bindings: Add INNOLUX P079ZCA panel bindings drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path drm/vc4/vc4_bo.c: always set bo->resv drm: Add const to name field declaration in struct drm_prop_enum_list drm/pl111: Fix offset calculation for the primary plane. drm/atmel-hlcdc: Fix panel registration drm/bridge: Build the panel wrapper in drm_kms_helper drm/atmel-hlcdc: Replace the panel usage with drm_panel_bridge. ... commit 34c8ea400ff6383b028f63df2453914163afc07c Author: Boris Brezillon Date: Fri Jun 2 10:32:08 2017 +0200 drm/vc4: Mimic drm_atomic_helper_commit() behavior The VC4 KMS driver is implementing its own ->atomic_commit() but there are a few generic helpers we can use instead of open-coding the logic. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/1496392332-8722-4-git-send-email-boris.brezillon@free-electrons.com drivers/gpu/drm/vc4/vc4_kms.c | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) commit 83753117f1de4f6ef7588fac9545065eed1e85e2 Author: Eric Anholt Date: Wed Jun 7 17:13:36 2017 -0700 drm/vc4: Add get/set tiling ioctls. This allows mesa to set the tiling format for a BO and have that tiling format be respected by mesa on the other side of an import/export (and by vc4 scanout in the kernel), without defining a protocol to pass the tiling through userspace. Signed-off-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170608001336.12842-2-eric@anholt.net Acked-by: Dave Airlie drivers/gpu/drm/vc4/vc4_bo.c | 83 +++++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vc4/vc4_drv.c | 2 ++ drivers/gpu/drm/vc4/vc4_drv.h | 6 ++++ drivers/gpu/drm/vc4/vc4_kms.c | 41 ++++++++++++++++++++- include/uapi/drm/vc4_drm.h | 16 +++++++++ 5 files changed, 147 insertions(+), 1 deletion(-) commit 98830d91da082b0285d35bdf5b5ae98decac7df6 Author: Eric Anholt Date: Wed Jun 7 17:13:35 2017 -0700 drm/vc4: Add T-format scanout support. The T tiling format is what V3D uses for textures, with no raster support at all until later revisions of the hardware (and always at a large 3D performance penalty). If we can't scan out V3D's format, then we often need to do a relayout at some stage of the pipeline, either right before texturing from the scanout buffer (common in X11 without a compositor) or between a tiled screen buffer right before scanout (an option I've considered in trying to resolve this inconsistency, but which means needing to use the dirty fb ioctl and having some update policy). T-format scanout lets us avoid either of those shadow copies, for a massive, obvious performance improvement to X11 window dragging without a compositor. Unfortunately, enabling a compositor to work around the discrepancy has turned out to be too costly in memory consumption for the Raspbian distribution. Because the HVS operates a scanline at a time, compositing from T does increase the memory bandwidth cost of scanout. On my 1920x1080@32bpp display on a RPi3, we go from about 15% of system memory bandwidth with linear to about 20% with tiled. However, for X11 this still ends up being a huge performance win in active usage. This patch doesn't yet handle src_x/src_y offsetting within the tiled buffer. However, we fail to do so for untiled buffers already. Signed-off-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170608001336.12842-1-eric@anholt.net Reviewed-by: Boris Brezillon drivers/gpu/drm/vc4/vc4_plane.c | 31 +++++++++++++++++++++++++++---- drivers/gpu/drm/vc4/vc4_regs.h | 19 +++++++++++++++++++ include/uapi/drm/drm_fourcc.h | 23 ++++++++++++++++++++++- 3 files changed, 68 insertions(+), 5 deletions(-) commit 56b47fe6579234e3102f1f28e26fa91fb6c38b3d Author: Toshi Kani Date: Thu Jun 8 12:36:57 2017 -0600 acpi/nfit: Add support of NVDIMM memory error notification in ACPI 6.2 ACPI 6.2 defines a new ACPI notification value to NVDIMM Root Device in Table 5-169. 0x81 Unconsumed Uncorrectable Memory Error Detected Used to pro-actively notify OSPM of uncorrectable memory errors detected (for example a memory scrubbing engine that continuously scans the NVDIMMs memory). This is an optional notification. Only locations that were mapped in to SPA by the platform will generate a notification. Add support of this notification value by initiating an ARS scan. This will find new error locations and add their badblocks information. Link: http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf Signed-off-by: Toshi Kani Cc: Rafael J. Wysocki Cc: Vishal Verma Cc: Linda Knippers Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 28 ++++++++++++++++++++++------ drivers/acpi/nfit/nfit.h | 1 + 2 files changed, 23 insertions(+), 6 deletions(-) commit f5ab3b70a6063b340d7ea4fcea20313f5607c71e Author: Jean Delvare Date: Fri Jun 2 16:13:11 2017 +0200 x86/PCI: Simplify Dell DMI B1 quirk No need for such convoluted code, when all we need is to call one function in one specific case. Tested-by: Narendra K # DellEMC PowerEdge 1950, R730XD Signed-off-by: Jean Delvare Signed-off-by: Bjorn Helgaas arch/x86/pci/common.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit 4e4f00a9b51a1c52ebdd728a1caeb3b9fe48c39d Author: Dan Williams Date: Mon May 29 22:40:44 2017 -0700 x86, dax, libnvdimm: remove wb_cache_pmem() indirection With all handling of the CONFIG_ARCH_HAS_PMEM_API case being moved to libnvdimm and the pmem driver directly we do not need to provide global wrappers and fallbacks in the CONFIG_ARCH_HAS_PMEM_API=n case. The pmem driver will simply not link to arch_wb_cache_pmem() in that case. Same as before, pmem flushing is only defined for x86_64, via clean_cache_range(), but it is straightforward to add other archs in the future. arch_wb_cache_pmem() is an exported function since the pmem module needs to find it, but it is privately declared in drivers/nvdimm/pmem.h because there are no consumers outside of the pmem driver. Cc: Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Oliver O'Halloran Cc: Matthew Wilcox Cc: Ross Zwisler Suggested-by: Christoph Hellwig Signed-off-by: Dan Williams arch/x86/include/asm/pmem.h | 21 --------------------- arch/x86/lib/usercopy_64.c | 6 ++++++ drivers/nvdimm/pmem.c | 2 +- drivers/nvdimm/pmem.h | 8 ++++++++ include/linux/pmem.h | 19 ------------------- 5 files changed, 15 insertions(+), 41 deletions(-) commit 81f558701ae8d5677635118751b1b4043094c7e9 Author: Dan Williams Date: Mon May 29 13:12:20 2017 -0700 x86, dax: replace clear_pmem() with open coded memset + dax_ops->flush The clear_pmem() helper simply combines a memset() plus a cache flush. Now that the flush routine is optionally provided by the dax device driver we can avoid unnecessary cache management on dax devices fronting volatile memory. With clear_pmem() gone we can follow on with a patch to make pmem cache management completely defined within the pmem driver. Cc: Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Ross Zwisler Reviewed-by: Jan Kara Signed-off-by: Dan Williams arch/x86/include/asm/pmem.h | 13 ------------- fs/dax.c | 3 ++- include/linux/pmem.h | 21 --------------------- 3 files changed, 2 insertions(+), 35 deletions(-) commit 6318770a7d43a4166b6a8e3cef62e4a019d3c95e Author: Dan Williams Date: Mon May 29 13:07:46 2017 -0700 filesystem-dax: convert to dax_flush() Filesystem-DAX flushes caches whenever it writes to the address returned through dax_direct_access() and when writing back dirty radix entries. That flushing is only required in the pmem case, so the dax_flush() helper skips cache management work when the underlying driver does not specify a flush method. We still do all the dirty tracking since the radix entry will already be there for locking purposes. However, the work to clean the entry will be a nop for some dax drivers. Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Reviewed-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abebfbe2f7315dd3ec9a0c69596a76e32beb5749 Author: Dan Williams Date: Mon May 29 13:02:52 2017 -0700 dm: add ->flush() dax operation support Allow device-mapper to route flush operations to the per-target implementation. In order for the device stacking to work we need a dax_dev and a pgoff relative to that device. This gives each layer of the stack the information it needs to look up the operation pointer for the next level. This conceptually allows for an array of mixed device drivers with varying flush implementations. Reviewed-by: Toshi Kani Reviewed-by: Mike Snitzer Signed-off-by: Dan Williams drivers/dax/super.c | 11 +++++++++++ drivers/md/dm-linear.c | 15 +++++++++++++++ drivers/md/dm-stripe.c | 20 ++++++++++++++++++++ drivers/md/dm.c | 19 +++++++++++++++++++ include/linux/dax.h | 2 ++ include/linux/device-mapper.h | 3 +++ 6 files changed, 70 insertions(+) commit 3c1cebff23cdca01c421411e953a9e239f2b9ef9 Author: Dan Williams Date: Mon May 29 12:58:19 2017 -0700 dax, pmem: introduce an optional 'flush' dax_operation Filesystem-DAX flushes caches whenever it writes to the address returned through dax_direct_access() and when writing back dirty radix entries. That flushing is only required in the pmem case, so add a dax operation to allow pmem to take this extra action, but skip it for other dax capable devices that do not provide a flush routine. An example for this differentiation might be a volatile ram disk where there is no expectation of persistence. In fact the pmem driver itself might front such an address range specified by the NFIT. So, this "no flush" property might be something passed down by the bus / libnvdimm. Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Reviewed-by: Jan Kara Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 7 +++++++ include/linux/dax.h | 2 ++ 2 files changed, 9 insertions(+) commit fec53774fd043038e57ac737d90e8d58975d6e92 Author: Dan Williams Date: Mon May 29 21:56:49 2017 -0700 filesystem-dax: convert to dax_copy_from_iter() Now that all possible providers of the dax_operations copy_from_iter method are implemented, switch filesytem-dax to call the driver rather than copy_to_iter_pmem. Reviewed-by: Jan Kara Signed-off-by: Dan Williams arch/x86/include/asm/pmem.h | 50 --------------------------------------------- fs/dax.c | 3 ++- include/linux/pmem.h | 24 ---------------------- 3 files changed, 2 insertions(+), 75 deletions(-) commit 975750a98c26769fe54785579f4b26c961a7a6f4 Author: Toshi Kani Date: Mon Jun 12 16:25:11 2017 -0600 libnvdimm, pmem: Add sysfs notifications to badblocks Sysfs "badblocks" information may be updated during run-time that: - MCE, SCI, and sysfs "scrub" may add new bad blocks - Writes and ioctl() may clear bad blocks Add support to send sysfs notifications to sysfs "badblocks" file under region and pmem directories when their badblocks information is re-evaluated (but is not necessarily changed) during run-time. Signed-off-by: Toshi Kani Cc: Vishal Verma Cc: Linda Knippers Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 3 +++ drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c | 14 ++++++++++++++ drivers/nvdimm/pmem.h | 1 + drivers/nvdimm/region.c | 12 ++++++++++-- 5 files changed, 29 insertions(+), 2 deletions(-) commit a117699c6c4a4b1b4e90ed51e393590986567cb4 Author: Yasunori Goto Date: Thu Jun 15 14:04:16 2017 +0900 tools/testing/nvdimm: fix nfit_test buffer overflow The root cause of panic is the num_pm of nfit_test1 is wrong. Though 1 is specified for num_pm at nfit_test_init(), it must be 2, because nfit_test1->spa_set[] array has 2 elements. Since the array is smaller than expected, the driver breaks other area. (it is often the link list of devres). As a result, panic occurs like the following example. CPU: 4 PID: 2233 Comm: lt-libndctl Tainted: G O 4.12.0-rc1+ #12 RIP: 0010:__list_del_entry_valid+0x6c/0xa0 Call Trace: release_nodes+0x76/0x260 devres_release_all+0x3c/0x50 device_release_driver_internal+0x159/0x200 device_release_driver+0x12/0x20 bus_remove_device+0xfd/0x170 device_del+0x1e8/0x330 platform_device_del+0x28/0x90 platform_device_unregister+0x12/0x30 nfit_test_exit+0x2a/0x93b [nfit_test] Cc: Signed-off-by: Yasunori Goto Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8990cdf10cf50dc68aaf5a8479b04304d05f1581 Author: Dan Williams Date: Wed Jun 7 10:19:46 2017 -0700 libnvdimm, label: switch to using v1.2 labels by default The rules for which version of the label specification are in effect at any given point in time are as follows: 1/ If a DIMM has an existing / valid index block then the version specified is used regardless if it is a previous version. 2/ By default when the kernel is initializing new index blocks the latest specification version (v1.2 at time of writing) is used. 3/ An environment that wants to force create v1.1 label-sets must arrange for userspace to disable all active regions / namespaces / dimms and write a valid set of v1.1 index blocks to the dimms. Signed-off-by: Dan Williams drivers/nvdimm/label.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit b3fde74ea195d2f9f49830a29f971a0aab4cd67a Author: Dan Williams Date: Sun Jun 4 10:18:39 2017 +0900 libnvdimm, label: add address abstraction identifiers Starting with v1.2 labels, 'address abstractions' can be hinted via an address abstraction id that implies an info-block format. The standard address abstraction in the specification is the v2 format of the Block-Translation-Table (BTT). Support for that is saved for a later patch, for now we add support for the Linux supported address abstractions BTT (v1), PFN, and DAX. The new 'holder_class' attribute for namespace devices is added for tooling to specify the 'abstraction_guid' to store in the namespace label. For v1.1 labels this field is undefined and any setting of 'holder_class' away from the default 'none' value will only have effect until the driver is unloaded. Setting 'holder_class' requires that whatever device tries to claim the namespace must be of the specified class. Cc: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt_devs.c | 8 +++++ drivers/nvdimm/claim.c | 28 ++++++++++++++++ drivers/nvdimm/core.c | 3 ++ drivers/nvdimm/dax_devs.c | 8 +++++ drivers/nvdimm/label.c | 58 ++++++++++++++++++++++++++++++++ drivers/nvdimm/label.h | 5 +++ drivers/nvdimm/namespace_devs.c | 74 +++++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pfn_devs.c | 8 +++++ include/linux/nd.h | 10 ++++++ 10 files changed, 203 insertions(+) commit 355d838878e1baec494c228458238d078dc3ca51 Author: Dan Williams Date: Tue Jun 6 14:56:43 2017 -0700 libnvdimm, label: add v1.2 label checksum support The v1.2 namespace label specification adds a fletcher checksum to each label instance. Add generation and validation support for the new field. Signed-off-by: Dan Williams drivers/nvdimm/label.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) commit 3934d8410cb837c5f6bff54e66574a4bbcef340a Author: Dan Williams Date: Tue Jun 6 14:59:04 2017 -0700 libnvdimm, label: update 'nlabel' and 'position' handling for local namespaces The v1.2 namespace label specification requires 'nlabel' and 'position' to be valid for the first ("lowest dpa") label in the set. It also requires all non-first labels to set those fields to 0xff. Linux does not much care if these values are correct, because we can just trust the count of labels with the matching uuid like the v1.1 case. However, we set them correctly in case other environments care. Signed-off-by: Dan Williams drivers/nvdimm/label.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) commit 8f2bc2430e4ec53ea961997d760c3b35f729e444 Author: Dan Williams Date: Tue Jun 6 11:39:30 2017 -0700 libnvdimm, label: populate 'isetcookie' for blk-aperture namespaces Starting with the v1.2 definition of namespace labels, the isetcookie field is populated and validated for blk-aperture namespaces. This adds some safety against inadvertent copying of namespace labels from one DIMM-device to another. Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 7 +------ drivers/nvdimm/label.c | 12 +++++++++++- drivers/nvdimm/namespace_devs.c | 20 ++++++++++++++------ 3 files changed, 26 insertions(+), 13 deletions(-) commit faec6f8a1cd2c44e439de35ab3328c5cf7bf52d8 Author: Dan Williams Date: Tue Jun 6 11:10:51 2017 -0700 libnvdimm, label: populate the type_guid property for v1.2 namespaces The type_guid refers to the "Address Range Type GUID" for the region backing a namespace as defined the ACPI NFIT (NVDIMM Firmware Interface Table). This 'type' identifier specifies an access mechanism for the given namespace. This capability replaces the confusing usage of the 'NSLABEL_FLAG_LOCAL' flag to indicate a block-aperture-mode namespace. Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 15 +++++++---- drivers/nvdimm/label.c | 6 +++++ drivers/nvdimm/namespace_devs.c | 57 +++++++++++++++++++++++++++-------------- include/linux/libnvdimm.h | 3 +++ 4 files changed, 57 insertions(+), 24 deletions(-) commit f979b13c3cc51584882bffa32965f34e5afa3b9b Author: Dan Williams Date: Sun Jun 4 12:12:07 2017 +0900 libnvdimm, label: honor the lba size specified in v1.2 labels Previously we only honored the lba size for blk-aperture mode namespaces. For pmem namespaces the lba size was just assumed to be 512. With the new v1.2 label definition and compatibility with other operating environments, the ->lbasize property is now respected for pmem namespaces. Cc: Ross Zwisler Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 65 +++++++++++++++++++++++++++++++++-------- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c | 1 + include/linux/nd.h | 2 ++ 4 files changed, 57 insertions(+), 12 deletions(-) commit c12c48ce869d72029d70666f615cbd8f67fc14e9 Author: Dan Williams Date: Sun Jun 4 10:59:15 2017 +0900 libnvdimm, label: add v1.2 interleave-set-cookie algorithm The interleave-set-cookie algorithm is extended to incorporate all the same components that are used to generate an nvdimm unique-id. For backwards compatibility we still maintain the old v1.1 definition. Reported-by: Nicholas Moulin Reported-by: Kaushik Kanetkar Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 53 +++++++++++++++++++++++++++++++++++++++-- drivers/nvdimm/label.c | 3 ++- drivers/nvdimm/namespace_devs.c | 9 +++++-- drivers/nvdimm/nd.h | 3 ++- drivers/nvdimm/region_devs.c | 43 +++++++++++++++++++++++++++++---- include/linux/libnvdimm.h | 5 +++- 6 files changed, 104 insertions(+), 12 deletions(-) commit 564e871aa66f548a947b23808d3140f326381f0c Author: Dan Williams Date: Sat Jun 3 18:30:43 2017 +0900 libnvdimm, label: add v1.2 nvdimm label definitions In support of improved interoperability between operating systems and pre-boot environments the Intel proposed NVDIMM Namespace Specification [1], has been adopted and modified to the the UEFI 2.7 NVDIMM Label Protocol [2]. Update the definitions of the namespace label data structures so that the new format can be supported alongside the existing label format. The new specification changes the default label size to 256 bytes, so everywhere that relied on sizeof(struct nd_namespace_label) must now use the sizeof_namespace_label() helper. There should be no functional differences from these changes as the default is still the v1.1 128-byte format. Future patches will move the default to the v1.2 definition. [1]: http://pmem.io/documents/NVDIMM_Namespace_Spec.pdf [2]: http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf Signed-off-by: Dan Williams drivers/nvdimm/label.c | 95 ++++++++++++++++++++++++++++++++++++++++---------- drivers/nvdimm/label.h | 15 ++++++-- drivers/nvdimm/nd.h | 8 ++++- 3 files changed, 97 insertions(+), 21 deletions(-) commit 1492a3a7b27e78a51efda143f84ff9674acc8491 Author: Gustavo A. R. Silva Date: Thu Jun 15 14:56:21 2017 -0500 atm: solos-pci: remove useless variable assignments Value assigned to variable _data32_ at lines 1254 and 1257 is overwritten at line 1260 before it can be used. This makes such variable assignments useless. Addresses-Coverity-ID: 1227049 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/atm/solos-pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4b7778769c25f773c514dcc99afcf7c74a9b3e4 Author: Vivien Didelot Date: Thu Jun 15 15:06:54 2017 -0400 net: dsa: assign default CPU port to all ports The current code only assigns the default cpu_dp to all user ports of the switch to which the CPU port belongs. The user ports of the other switches of the fabric thus don't have a default CPU port. This patch fixes this by assigning the cpu_dp of all user ports of all switches of the fabric when the tree is fully parsed. Fixes: a29342e73911 ("net: dsa: Associate slave network device with CPU port") Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit d44005672d83f89d7d797efc490a751a696e7d91 Author: Wolfram Sang Date: Thu Jun 15 23:20:54 2017 +0200 i2c: stub: fix build warning regression Commit 6c42778780c40c ("i2c: stub: use pr_fmt") changed the DEBUG handling and caused build warnings. Revert back to the original. Fixes: 6c42778780c40c ("i2c: stub: use pr_fmt") Signed-off-by: Wolfram Sang drivers/i2c/i2c-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8812c24d28f4972c4f2b9998bf30b1f2a1b62adf Author: Majd Dibbiny Date: Thu Feb 9 14:20:12 2017 +0200 net/mlx5: Add fast unload support in shutdown flow Adding a support to flush all HW resources with one FW command and skip all the heavy unload flows of the driver on kernel shutdown. There's no need to free all the SW context since a new fresh kernel will be loaded afterwards. Regarding the FW resources, they should be closed, otherwise we will have leakage in the FW. To accelerate this flow, we execute one command in the beginning that tells the FW that the driver isn't going to close any of the FW resources and asks the FW to clean up everything. Once the commands complete, it's safe to close the PCI resources and finish the routine. Signed-off-by: Majd Dibbiny Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fw.c | 28 +++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/health.c | 4 +-- drivers/net/ethernet/mellanox/mlx5/core/main.c | 32 ++++++++++++++++++++-- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 +- include/linux/mlx5/mlx5_ifc.h | 14 ++++++++-- 5 files changed, 73 insertions(+), 8 deletions(-) commit 4525abeaae54560254a1bb8970b3d4c225d32ef4 Author: Majd Dibbiny Date: Thu Feb 9 13:20:46 2017 +0200 net/mlx5: Expose command polling interface Add a new interface for commands execution that allows the caller to wait for the command's completion in a busy-wait loop (polling mode). This is useful if we want to execute a command in a polling mode while the driver is working in events mode for the rest of the commands. This interface will be used in the downstream patches. Signed-off-by: Majd Dibbiny Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 30 ++++++++++++++++++++------- include/linux/mlx5/driver.h | 3 +++ 2 files changed, 26 insertions(+), 7 deletions(-) commit 3834a5e62617603673474ada9831aa4bda955e03 Author: Gal Pressman Date: Wed May 10 15:10:33 2017 +0300 net/mlx5e: Optimize update stats work Unlike ethtool stats, get_stats ndo provides information cached by update stats work that is running in the background without updating them explicitly. We cannot update all counters inside the ndo because some updates require firmware commands that cannot be performed under a spinlock. update_stats work does not need to update ALL counters, since only some of them are needed by ndo_get_stats. This patch will allow for a minimal run of update_stats using an extra parameter which will update necessary counters only and cut 13 firmware commands in each iteration of the work. Work duration previous to this patch: ~4200us. Work duration after this patch: ~700us (17% of the original time). Signed-off-by: Gal Pressman Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Cc: kernel-team@fb.com drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) commit 432609a4cdfb1c3e3a58e6e37b3501e42bfc50ab Author: Gal Pressman Date: Wed Jun 14 11:52:33 2017 +0300 net/mlx5e: Move and optimize query out of buffer function Move "query queue counter out of buffer" helper function out of qp.c to en_main.c, since mlx5e netdev driver is the only one to use it. Also allocate the output buffer on the stack instead of the heap, to reduce number of heap allocs on update_stats work. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Cc: kernel-team@fb.com drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 +++++++-- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 20 -------------------- include/linux/mlx5/qp.h | 2 -- 3 files changed, 7 insertions(+), 24 deletions(-) commit 0883b4f456f691a54df7a9ae5607ade456fa7b97 Author: Gal Pressman Date: Mon Jun 5 16:45:45 2017 +0300 net/mlx5e: Reduce number of heap allocated buffers for update stats Allocating buffers on the heap every 200ms is something we should avoid, let's use buffers located on the stack instead. Signed-off-by: Gal Pressman Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Cc: kernel-team@fb.com drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit ebc88870dab343ef3d16832e40d53bd21f1bf0e5 Author: Gal Pressman Date: Wed Apr 19 18:10:37 2017 +0300 net/mlx5e: Rename physical symbol errors counter Rename rx_symbol_errors_phy to rx_pcs_symbol_err_phy, in order to prevent confusion with rx_symbol_err_phy counter. rx_pcs_symbol_err_phy counter counts the number of symbol errors that were detected on the PCS (regardless of traffic) and weren't corrected by FEC correction algorithm or that FEC algorithm was not active on this interface. rx_symbol_err_phy refers to errors on packet level (physical error during a packet receive). Fixes: 5db0a4f64c04 ("net/mlx5e: Expose physical layer statistical...") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Cc: kernel-team@fb.com drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e432ab6d9eb3671e065cd7a009adefd6dbf4a04 Author: Itay Aveksis Date: Wed Jun 7 17:01:51 2017 +0300 net/mlx5e: Fix typo in warning if CQ moderation is not supported Signed-off-by: Itay Aveksis Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22303f790d8b00f274ebdac30ae6b0cc481ed57c Author: Tariq Toukan Date: Sun May 21 11:08:18 2017 +0300 net/mlx5e: Use function to map aRFS into traffic type For a better code reuse and readability, use the existing function arfs_get_tt() to map arfs_type into mlx5e_traffic_types, instead of duplicating the switch-case logic. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 552db7bca568a8efbd0883f0597fbc42333cf094 Author: Moni Shoua Date: Tue May 9 12:20:55 2017 +0300 net/mlx5: Undo LAG upon request to create virtual functions LAG cannot work if virtual functions are present. Therefore, if LAG is configured, the attempt to create virtual functions will fail. This gives precedence to LAG over SRIOV which is not the desired behavior as users might want to use the bonding/teaming driver also want to work with SRIOV. In that case we don't want to force an order of actions, first create virtual functions and only than configure a bonding/teaming net device. To fix, if LAG is configured during a request to create virtual functions, remove it and continue. We ignore ENODEV when trying to forbid lag. This makes sense because "No such device" means that lag is forbidden anyway. Signed-off-by: Moni Shoua Reviewed-by: Aviv Heller Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lag.c | 69 +++++++++++++++++++--- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 + drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 15 +++-- 3 files changed, 74 insertions(+), 13 deletions(-) commit 2fe30e23cddaf16fa3ffd188341cdf35d75f0f1b Author: Or Gerlitz Date: Sun May 28 15:50:50 2017 +0300 net/mlx5: Avoid space after casting Fix checkpatch complaints on that: CHECK: No space is necessary after a cast Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e53eef635073e3c945d44009679d0a83f1b31083 Author: Or Gerlitz Date: Sun May 28 15:40:43 2017 +0300 net/mlx5: Align to match opening parenthesis Fixed checkpatch complaints of the form: CHECK: Alignment should match open parenthesis Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) commit 8963ca45e70c8aa9309f44b463d50bccf7932dac Author: Or Gerlitz Date: Sun May 28 15:35:27 2017 +0300 net/mlx5: Avoid blank lines before/after closing/opening braces Fixed checkpatch complaints on that: CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Blank lines aren't necessary after an open brace '{' and one on missing blank line.. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) commit 1b9f533a909e6983808e48b94faea58ea561f9f9 Author: Or Gerlitz Date: Sun May 28 15:32:35 2017 +0300 net/mlx5: Avoid using multiple blank lines Fixed bunch of this checkpatch complaint: CHECK: Please don't use multiple blank lines Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/alloc.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 -- drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 3 --- drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 -- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 2 -- drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/qp.c | 1 - 10 files changed, 15 deletions(-) commit bd10838af2d918994a27c702e9910fb71bb9c304 Author: Or Gerlitz Date: Sun May 28 15:24:17 2017 +0300 net/mlx5: Fix some spelling mistakes Fixed few places where endianness was misspelled and one spot whwere output was: CHECK: 'endianess' may be misspelled - perhaps 'endianness'? CHECK: 'ouput' may be misspelled - perhaps 'output'? Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 10 +++++----- include/linux/mlx5/mlx5_ifc.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) commit 14160ea227a1a6d9099495eadc55a900d371ab3d Author: Eli Cohen Date: Fri Oct 28 09:52:56 2016 -0500 net/mlx5: Update eqe_type_str() event names Add missing NIC_VPORT_CHANGE event. Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 ++ 1 file changed, 2 insertions(+) commit 9a30a26122c3fb249a4f509fb2253de259e58cd0 Author: Rodrigo Vivi Date: Tue Jun 13 10:52:30 2017 -0700 Revert "drm/i915/skl: New ddb allocation algorithm" This reverts commit bb9d85f6e9de8fef5236c076530eab67a2f2431b. New ddb allocation algorithm is a show stopper on my SKL system. Besides not be able to get external DP 4k@60 (through USB type C), It fully hang my screen when unplugging the USB type C. Bugzilla: https://patchwork.freedesktop.org/patch/161571/ Fixes: bb9d85f6e9de ("drm/i915/skl: New ddb allocation algorithm") Cc: Mahesh Kumar Cc: Maarten Lankhorst Cc: Matt Roper Signed-off-by: Rodrigo Vivi Reviewed-by: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/1497376350-3400-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_pm.c | 257 +++++++++++++++------------------------- 1 file changed, 98 insertions(+), 159 deletions(-) commit 3134bc9c52ed90c4aea5e4201eb13145cfd12b05 Author: Mathias Nyman Date: Thu Jun 15 11:55:48 2017 +0300 xhci: cleanup finish_td() skip option finish_td() could be called with a skip option to bypass most of the function and only call xhci_td_cleanup() at the end. Remove this skip option and call xhci_td_cleanup() directly instead when needed No functional changes Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit d36374fdfb259bac4511762bb349e69c6d093d37 Author: Mathias Nyman Date: Thu Jun 15 11:55:47 2017 +0300 xhci: cleanup virtual endoint structure, remove stopped_stream Get rid of stopped_stream member in virtual endpoint structure as it is only used in one case when cleaning a halted endpoint. Pass it as function parameter instead. No functional changes Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 7 ++----- drivers/usb/host/xhci.c | 6 +++--- drivers/usb/host/xhci.h | 5 ++--- 3 files changed, 7 insertions(+), 11 deletions(-) commit ade2e3a148a1740a6f3abea9c54f11630b9d7d1e Author: Mathias Nyman Date: Thu Jun 15 11:55:46 2017 +0300 xhci: handle transfer events without TRB pointer Most transfer events have a TRB pointer indicating which TRB caused the event. In the case of streams, transfer events such as USB Transaction error may have its TRB pointer set to zero. driver won't know which stream or what TRB on that stream caused the error, but it can issue a soft reset to recover the transfer. A soft reset will clear the host side halt of the endpoint without clearing Data toggle or sequence number, and let the transfer continue from where it halted. see xhci section 4.12 streams and 4.6.8.2 soft retry. USB Transaction errors with a zero TRB pointer are seen with UAS usb devices. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 5eee4b6b4f572bfce953f1e38cea087b9933e0e9 Author: Mathias Nyman Date: Thu Jun 15 11:55:45 2017 +0300 xhci: support calling cleanup_halted_endpoint with soft retry Add soft reset support to cleanup_halted_endpoint(). using soft reset will prevent it from setting a new dequeue pointer to start the transfer from. Let it continue where it halted. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 217491487c43892318c18b6dcafe33b6353efd40 Author: Mathias Nyman Date: Thu Jun 15 11:55:44 2017 +0300 xhci: Add support for endpoint soft reset xhci supports soft retry recovery when the host halted the host side of an endopint but the connected USB device is not aware of the halt. In this case xhci needs to issue a reset endopint command with a TSP (Transfer State Preserve) flag set which preserves the Data toggle and Sequence number of the endpoint. This feature is needed to handle a few special transfer event types such as USB Transaction error that don't always point to a causing TRB. see xhci 4.6.8.1 for more details Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 8 ++++++-- drivers/usb/host/xhci.h | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) commit b3368382efe6e987961e1aaec6b29507e2175954 Author: Mathias Nyman Date: Thu Jun 15 11:55:43 2017 +0300 xhci: refactor transfer event errors and completion codes Parse the transfer event first, and remove duplicate debugging code. Reorder completion codes according to endpoint state. No functional changes We are not handling some transfer events correcly and need to clean up this before fixing it Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 78 +++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 38 deletions(-) commit c5628a2af83aeda6cc02b6c64acb91f249727b1c Author: Mathias Nyman Date: Thu Jun 15 11:55:42 2017 +0300 xhci: remove endpoint ring cache Anurag Kumar Vulisha reported several issues with xhci endpoint ring caching. 31 Rings are cached per device before a ring is freed. These cached rings are not used as default if a new ring is needed. They are only used if the driver fails to allocate memory for a ring. The current ring cache is more a reason to why we run out memory than a help when we actually do so. Anurag Kumar Vulisha tried to use cached rings as a first option and found new issues with cached ring initialization. Cached rings were first zeroed and then manually reinitialized with link trbs etc, but forgetting to set some important bits like cycle toggle bit. Remove the ring cache completely as it's a faulty premature optimization eating memory Reported-by: Anurag Kumar Vulisha Tested-by: Anurag Kumar Vulisha Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 81 ++++----------------------------------------- drivers/usb/host/xhci.c | 17 +++++----- drivers/usb/host/xhci.h | 6 +--- 3 files changed, 15 insertions(+), 89 deletions(-) commit d590c23111505635e1beb01006612971e5ede8aa Author: Mathias Nyman Date: Thu Jun 15 11:55:41 2017 +0300 usb: Avoid unnecessary LPM enabling and disabling during suspend and resume The original motivation for disabling/enabling Link PM at device suspend/resume was to force link state to go via U0 before suspend sets the link state to U3. Going directly from U2 to U3 is not allowed. Disabling LPM will forced the link state to U0, but will send a lot of Set port feature requests for evert suspend and resume. This is not needed as Hub hardware will take care of going via U0 when a U2 -> U3 transition is requested [1] [1] USB 3.1 specification section 10.16.2.10 Set Port Feature: "If the value is 3, then host software wants to selectively suspend the device connected to this port. The hub shall transition the link to U3 from any of the other U states using allowed link state transitions. If the port is not already in the U0 state, then it shall transition the port to the U0 state and then initiate the transition to U3. While this state is active, the hub does not propagate downstream-directed traffic to this port, but the hub will respond to resume signaling from the port" Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 8a1deb329ffbdb049f6a475cf535644a81e80b55 Author: Madhav Chauhan Date: Tue Jun 13 13:18:15 2017 +0530 drm/i915/glk: Add cold boot sequence for GLK DSI As per BSEPC, if device ready bit is '0' in enable IO sequence then its a cold boot/reset scenario eg: S3/S4 resume. If cold boot scenario detected in enable IO, then prepare port immediately. In normal boot scenario, prepare port after glk_dsi_device_ready(). Without cold boot sequence enabled, features like S3/S4 doesn't work. Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1497340095-5877-2-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_dsi.c | 79 ++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 28 deletions(-) commit 74e4ce6a78751f0a602dcbd00b53f710e312fcc5 Author: Madhav Chauhan Date: Tue Jun 13 13:18:14 2017 +0530 drm/i915/glk: Split GLK DSI device ready functionality This patch divides glk_dsi_device_ready() function into two part. First part will program LP wake and MIPI DSI mode to MIPI_CTRL reg using newly defined function glk_dsi_enable_io(). glk_dsi_enable_io() will be called from intel_dsi_pre_enable. Second part will do remaining device ready activities using the existing function glk_dsi_device_ready(). Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1497340095-5877-1-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_dsi.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 980532a5dda319eeafadc5c590376626ad178f4f Author: Geert Uytterhoeven Date: Mon Jun 12 11:23:45 2017 +0200 soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON Improve handling of always-on PM domains by using the GENPD_FLAG_ALWAYS_ON flag introduced in commit ffaa42e8a40b7f10 ("PM / Domains: Enable users of genpd to specify always on PM domains"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulf Hansson Signed-off-by: Simon Horman drivers/soc/renesas/rcar-sysc.c | 28 ++++------------------------ drivers/soc/renesas/rcar-sysc.h | 2 -- 2 files changed, 4 insertions(+), 26 deletions(-) commit 3715c47bcda8bb56f7e2be27276282a2d0d48c09 Merge: 18b6e79 d8fbd27 Author: David S. Miller Date: Thu Jun 15 14:31:56 2017 -0400 Merge branch 'r8152-support-new-chips' Hayes Wang says: ==================== r8152: support new chips These patches are used to support new chips. ==================== Signed-off-by: David S. Miller commit d8fbd27469fc02049c674de296a3263bef089131 Author: hayeswang Date: Thu Jun 15 14:44:04 2017 +0800 r8152: add byte_enable for ocp_read_word function Add byte_enable for ocp_read_word() to replace reading 4 bytes data with reading the desired 2 bytes data. This is used to avoid the issue which is described in commit b4d99def0938 ("r8152: remove sram_read"). The original method always reads 4 bytes data, and it may have problem when reading the PHY registers. The new method is supported since RTL8153B, but it doesn't influence the previous chips. The bits of the byte_enable for the previous chips are the reserved bits, and the hw would ignore them. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 65b82d696b9e84fda6dd7df61801b57d3e7fb976 Author: hayeswang Date: Thu Jun 15 14:44:03 2017 +0800 r8152: support RTL8153B This patch supports two new chips for RTL8153B. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 673 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 658 insertions(+), 15 deletions(-) commit c27b32c2a4e6adc09323262d5b38b06979f063ab Author: hayeswang Date: Thu Jun 15 14:44:02 2017 +0800 r8152: support new chip 8050 The settings of the new chip are the same with RTL8152, except that its product ID is 0x8050. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 18b6e7955d8f85613478ac1edd01dc1fb4c2a305 Merge: 7e9191c 21ecba6 Author: David S. Miller Date: Thu Jun 15 14:29:01 2017 -0400 Merge branch 'ibmvnic-LPM-bug-fixes' Thomas Falcon says: ==================== ibmvnic: LPM bug fixes This series of small patches is meant to resolve a number of bugs, mostly occurring during an ibmvnic driver reset when recovering from a logical partition migration (LPM). The first patch ensures that RX buffer pools are properly activated following an adapter reset by setting the proper flag in the pool data structure. The second patch uses netif_tx_disable to stop TX queues when closing the device during a reset. Third, fixup a typo that resulted in partial sanitization of TX/RX descriptor queues following a device reset. Fourth, remove an ambiguous conditional check that was resulting in a kernel panic as null RX/TX completion descriptors were being processed during napi polling while the device is closing. Finally, fix a condition where the napi polling routine exits before it has completed its work budget without notifying the upper network layers. This omission could result in the napi_disable function sleeping indefinitely under certain conditions. v2: Attempt to provide a proper cover letter ==================== Signed-off-by: David S. Miller commit 21ecba6c48f903781d844b62854bedd8137df470 Author: Thomas Falcon Date: Wed Jun 14 23:50:09 2017 -0500 ibmvnic: Exit polling routine correctly during adapter reset This patch fixes a bug where, in the case of a device reset, the polling routine will never complete, causing napi_disable to sleep indefinitely when attempting to close the device. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1cf9cc72bd7024af69419b5adee42c39ad4caf6f Author: Thomas Falcon Date: Wed Jun 14 23:50:08 2017 -0500 ibmvnic: Remove VNIC_CLOSING check from pending_scrq Fix a kernel panic resulting from data access of a NULL pointer during device close. The pending_scrq routine is meant to determine whether there is a valid sub-CRQ message awaiting processing. When the device is closing, however, there is a possibility that NULL messages can be processed because pending_scrq will always return 1 even if there no valid message in the queue. It's not clear what this closing state check was originally meant to accomplish, so just remove it. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c8b2ad0a4a9015228874708f83a17b7bdb194f84 Author: Thomas Falcon Date: Wed Jun 14 23:50:07 2017 -0500 ibmvnic: Sanitize entire SCRQ buffer on reset Fixup a typo so that the entire SCRQ buffer is cleaned. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c2687a512b9a6737e86d72f23ad0a1097d56bd5 Author: Thomas Falcon Date: Wed Jun 14 23:50:06 2017 -0500 ibmvnic: Ensure that TX queues are disabled in __ibmvnic_close Use netif_tx_disable to guarantee that TX queues are disabled when __ibmvnic_close is called by the device reset routine. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c3e53b9a3efe300a7864ab1ccfbae239d50d0002 Author: Thomas Falcon Date: Wed Jun 14 23:50:05 2017 -0500 ibmvnic: Activate disabled RX buffer pools on reset RX buffer pools are disabled while awaiting a device reset if firmware indicates that the resource is closed. This patch fixes a bug where pools were not being subsequently enabled after the device reset, causing the device to become inoperable. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) commit ac7c748317f515f426f48e72964c71142506f7a6 Author: Dawid Kurek Date: Thu Jun 15 19:45:56 2017 +0200 drm: Reduce scope of 'state' variable Smaller scope reduces visibility of variable and makes usage of uninitialized variable less possible. Changes in v2: - separate declaration and initialization Changes in v3: - add missing signed-off-by tag Signed-off-by: Dawid Kurek Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170615174556.GA8872@gmail.com drivers/gpu/drm/drm_atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7e9191c54a36c864b901ea8ce56dc42f10c2f5ae Author: Shannon Nelson Date: Wed Jun 14 15:43:37 2017 -0700 sunvnet: restrict advertized checksum offloads to just IP As much as we'd like to play well with others, we really aren't handling the checksums on non-IP protocol packets very well. This is easily seen when trying to do TCP over ipv6 - the checksums are garbage. Here we restrict the checksum feature flag to just IP traffic so that we aren't given work we can't yet do. Orabug: 26175391, 26259755 Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/ldmvsw.c | 2 +- drivers/net/ethernet/sun/sunvnet.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3d8bd78b79800d1518133d4fd6ea0680096f9249 Merge: 9d7cded 86087e1 Author: David S. Miller Date: Thu Jun 15 14:21:04 2017 -0400 Merge branch 'sched-act_tunnel_key-UDP-checksusm' Jiri Benc says: ==================== net: sched: act_tunnel_key: UDP checksums Currently, the tunnel_key tc action does not set TUNNEL_CSUM, thus transmitting packets with zero UDP checksum. This is inconsistent with how we treat non-lwt UDP tunnels where the default is to fill in the UDP checksum. Non-zero UDP checksum is the better default anyway for various reasons previously discussed. Make this configurable for the tunnel_key tc action with the default being non-zero checksum. Saves a lot of surprises especially with IPv6. Signed-off-by: Jiri Benc ==================== Signed-off-by: David S. Miller commit 86087e170cd1f19e9b25e5d944d9f52fad9470f4 Author: Jiri Benc Date: Wed Jun 14 21:19:31 2017 +0200 net: sched: act_tunnel_key: make UDP checksum configurable Allow requesting of zero UDP checksum for encapsulated packets. The name and meaning of the attribute is "NO_CSUM" in order to have the same meaning of the attribute missing and being 0. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller include/uapi/linux/tc_act/tc_tunnel_key.h | 1 + net/sched/act_tunnel_key.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit 63fe4c39d2c1f67d9c9a58da0ec8627516a40d9a Author: Jiri Benc Date: Wed Jun 14 21:19:30 2017 +0200 net: sched: act_tunnel_key: request UDP checksum by default There's currently no way to request (outer) UDP checksum with act_tunnel_key. This is problem especially for IPv6. Right now, tunnel_key action with IPv6 does not work without going through hassles: both sides have to have udp6zerocsumrx configured on the tunnel interface. This is obviously not a good solution universally. It makes more sense to compute the UDP checksum by default even for IPv4. Just set the default to request the checksum when using act_tunnel_key. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller net/sched/act_tunnel_key.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d7cdedd0fe514c294dbae8016cbee09d1d6231f Author: Gustavo A. R. Silva Date: Wed Jun 14 21:58:17 2017 -0500 net: s2io: remove useless variable in fill_rx_buffers Remove useless variable rxd_index and code related. Addresses-Coverity-ID: 1397691 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/neterion/s2io.c | 5 ----- 1 file changed, 5 deletions(-) commit 1947030645b6012aeee98da764d6dd47071a6aad Merge: 83ad357 ccba8f3 Author: David S. Miller Date: Thu Jun 15 14:07:51 2017 -0400 Merge branch 'dsa-prefix-Global-macros' Vivien Didelot says: ==================== net: dsa: prefix Global macros This patch series is the 2/3 step of the register definitions cleanup. It brings no functional changes. It prefixes and documents all Global (1) registers with MV88E6XXX_G1_ (or a specific model like MV88E6352_G1_STS_PPU_STATE), and prefers a 16-bit hexadecimal representation of the Marvell registers layout. The next and last patchset will prefix the Global 2 registers. ==================== Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ccba8f3a0642257d7d9c19fc7c741016053222b3 Author: Vivien Didelot Date: Thu Jun 15 12:14:06 2017 -0400 net: dsa: mv88e6xxx: prefix Global Prio and Tag macros Prefix and document the remaining Global IP and IEEE Priority and Core Tag Type registers and give them a clear 16-bit register representation. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 18 +++++++++--------- drivers/net/dsa/mv88e6xxx/global1.h | 33 +++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 19 deletions(-) commit 57d1ef389c96b5ae192767ae16843e839b1eff74 Author: Vivien Didelot Date: Thu Jun 15 12:14:05 2017 -0400 net: dsa: mv88e6xxx: prefix Global Stats macros Prefix and document the Global Stats Operation and Counter registers and give them a clear 16-bit registers representation. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 14 ++++++++------ drivers/net/dsa/mv88e6xxx/global1.c | 24 ++++++++++++++---------- drivers/net/dsa/mv88e6xxx/global1.h | 33 +++++++++++++++++++-------------- 3 files changed, 41 insertions(+), 30 deletions(-) commit 101515c8c51fced79407984d4765d5db23f04029 Author: Vivien Didelot Date: Thu Jun 15 12:14:04 2017 -0400 net: dsa: mv88e6xxx: prefix Global Monitor Control macros Prefix and document the Global Monitor Control Register macros (which became the Global Monitor & MGMT Control Register with 88E6390) and give a clear 16-bit registers representation. Use __bf_shf to get the shift value at compile time instead of adding new defined macros for it. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1.c | 65 ++++++++++++++++++++++--------------- drivers/net/dsa/mv88e6xxx/global1.h | 38 ++++++++++++---------- 2 files changed, 60 insertions(+), 43 deletions(-) commit d77f4321fa5cbe393930855763adaa87046394c6 Author: Vivien Didelot Date: Thu Jun 15 12:14:03 2017 -0400 net: dsa: mv88e6xxx: prefix Global Control macros Prefix and document the Global Control and Control 2 registers macros and give a clear 16-bit registers representation. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 18 +++++++-------- drivers/net/dsa/mv88e6xxx/global1.c | 32 +++++++++++++------------- drivers/net/dsa/mv88e6xxx/global1.h | 46 ++++++++++++++++++++----------------- 3 files changed, 50 insertions(+), 46 deletions(-) commit 7ec60d6e2c400700c740849c9c980aa46499aab4 Author: Vivien Didelot Date: Thu Jun 15 12:14:02 2017 -0400 net: dsa: mv88e6xxx: prefix Global VTU macros Prefix and document the Global VTU registers macros and give a clear 16-bit registers representation. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 23 ++++++----- drivers/net/dsa/mv88e6xxx/chip.h | 4 +- drivers/net/dsa/mv88e6xxx/global1.h | 69 ++++++++++++++++++++------------- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 62 +++++++++++++++-------------- 4 files changed, 90 insertions(+), 68 deletions(-) commit 27c0e60097a55a1831de2ea8121f048b833b9d9a Author: Vivien Didelot Date: Thu Jun 15 12:14:01 2017 -0400 net: dsa: mv88e6xxx: prefix Global ATU macros Prefix and document the Global ATU Registers macros and give clear 16-bit registers representation. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 22 +++++----- drivers/net/dsa/mv88e6xxx/global1.h | 75 +++++++++++++++++++-------------- drivers/net/dsa/mv88e6xxx/global1_atu.c | 56 ++++++++++++------------ 3 files changed, 85 insertions(+), 68 deletions(-) commit 4b0c481717b9896fa7a778dfd0b197ce8325bd1a Author: Vivien Didelot Date: Thu Jun 15 12:14:00 2017 -0400 net: dsa: mv88e6xxx: prefix Global Switch MAC macros Prefix and document the Global Switch MAC Address Register macros and give clear 16-bit register representation. At the same time, move mv88e6xxx_g1_set_switch_mac in global1.c, where it belongs. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 19 ------------------- drivers/net/dsa/mv88e6xxx/global1.c | 27 +++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global1.h | 13 ++++++++++--- 3 files changed, 37 insertions(+), 22 deletions(-) commit 824669218226a71300ef31862ae49b9465614513 Author: Vivien Didelot Date: Thu Jun 15 12:13:59 2017 -0400 net: dsa: mv88e6xxx: prefix Global Status macros Prefix and document the Global Status Register macros and give clear 16-bit register representation. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- drivers/net/dsa/mv88e6xxx/global1.c | 20 ++++++++++---------- drivers/net/dsa/mv88e6xxx/global1.h | 36 +++++++++++++++++++----------------- drivers/net/dsa/mv88e6xxx/global2.c | 4 ++-- 4 files changed, 33 insertions(+), 31 deletions(-) commit ae9d04214372a521e3746556eb2f76007d9edb73 Author: Fabio Estevam Date: Fri May 5 15:01:41 2017 -0300 drm: mxsfb_crtc: Reset the eLCDIF controller According to the eLCDIF initialization steps listed in the MX6SX Reference Manual the eLCDIF block reset is mandatory. Without performing the eLCDIF reset the display shows garbage content when the kernel boots. In earlier tests this issue has not been observed because the bootloader was previously showing a splash screen and the bootloader display driver does properly implement the eLCDIF reset. Add the eLCDIF reset to the driver, so that it can operate correctly independently of the bootloader. Tested on a imx6sx-sdb board. Cc: Signed-off-by: Fabio Estevam Reviewed-by: Marek Vasut Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1494007301-14535-1-git-send-email-fabio.estevam@nxp.com drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit a9bc67de0c5713a8675bfe33bfe9cb36c7934589 Author: Michał Mirosław Date: Wed Jun 14 21:04:14 2017 +0200 regulator: tps65910: wire up sleep control configuration This enables configuring the PMIC's sleep mode via device-tree. A pointer indirection to sleep mode data is removed, as it simplifies the implementation slightly. In current kernel tree, platform data structure is not used outside MFD cell drivers. Signed-off-by: Michał Mirosław Signed-off-by: Mark Brown Documentation/devicetree/bindings/mfd/tps65910.txt | 4 ++++ drivers/mfd/tps65910.c | 22 +++++++++++++++------- include/linux/mfd/tps65910.h | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) commit 8cc03722403a5153054993388857e4e565dcdfb1 Author: Kuninori Morimoto Date: Thu Jun 15 00:50:19 2017 +0000 ASoC: rsnd: add rsnd_soc_hw_rule/constraint() Current Renesas sound driver is assuming that all Sampling rate and channles are possible to use, but these are depends on inputed clock and SSI connection situation. For example, if it is using 1 SSI, enabled TDM mode and has 12288000 input clock, 2ch output can support until 192000Hz, but 6ch output can support until 64000Hz, 8ch can support 48000Hz. To control these situation correctly, it needs to support hw_constraints / refine feature. To support such feature, this patch adds new rsnd_soc_hw_rule/constraint() which adds hw rule of Channel and Sampling Rate. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 155 ++++++++++++++++++++++++++++++++++++++++++++++- sound/soc/sh/rcar/rsnd.h | 1 + 2 files changed, 154 insertions(+), 2 deletions(-) commit ef4cf5d6a143e04e149ad81fc491fe10855544fe Author: Kuninori Morimoto Date: Thu Jun 15 00:50:02 2017 +0000 ASoC: rsnd: add rsnd_ssi_clk_query() Current Renesas sound driver is assuming that all Sampling rate and channles are possible to use, but these are depends on inputed clock and SSI connection situation. For example, if it is using 1 SSI, enabled TDM mode and has 12288000 input clock, 2ch output can support until 192000Hz, but 6ch output can support until 64000Hz, 8ch can support 48000Hz. To control these situation correctly, it needs to support hw_constraints / refine feature. To support such feature, this patch adds new rsnd_ssi_clk_query(). Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/rsnd.h | 2 + sound/soc/sh/rcar/ssi.c | 95 ++++++++++++++++++++++++++++-------------------- 2 files changed, 58 insertions(+), 39 deletions(-) commit 1dfdc6501a4a140cfbfc6be8dbb1da3a6f726c15 Author: Kuninori Morimoto Date: Thu Jun 15 00:49:43 2017 +0000 ASoC: rsnd: add rsnd_adg_clk_query() Current Renesas sound driver is assuming that all Sampling rate and channles are possible to use, but these are depends on inputed clock and SSI connection situation. For example, if it is using 1 SSI, enabled TDM mode and has 12288000 input clock, 2ch output can support until 192000Hz, but 6ch output can support until 64000Hz, 8ch can support 48000Hz. To control these situation correctly, it needs to support hw_constraints / refine feature. To support such feature, it needs SSI clock query feature, and it needs ADG clock query feature. Current ADG has rsnd_adg_ssi_clk_try_start() and it is doing similar things, but it try to setup ADG register in same time. This is not needed. This patch adds new rsnd_adg_clk_query() and separates query feature and register setting feature in adg.c Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 53 ++++++++++++++++++++++++------------------------ sound/soc/sh/rcar/rsnd.h | 1 + 2 files changed, 28 insertions(+), 26 deletions(-) commit 1ff9593d2f27a48fbeeccd7fc253eed2a7102d16 Author: Kuninori Morimoto Date: Thu Jun 15 00:49:27 2017 +0000 ASoC: rsnd: rename "slots" related variable Current Renesas sound driver has slots and slots_num in struct rsnd_dai, but these are very un-understandable naming (It had named from TDM slots). In this driver, the "slots" means total usable channels, and "stot_num" means SSI lane number if Multi SSI was used. To more understandable code, this patch renames "slots" to "max_channels", and "slots_num" to "ssi_lane", and replaces related functions name. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 53 ++++++++++++++++++++++++------------------------ sound/soc/sh/rcar/dvc.c | 7 ++++--- sound/soc/sh/rcar/rsnd.h | 23 ++++++++++++++------- sound/soc/sh/rcar/ssi.c | 3 ++- 4 files changed, 49 insertions(+), 37 deletions(-) commit 9fb9b2f236f05168a6138e62c82124a2f5eaf320 Author: Kuninori Morimoto Date: Thu Jun 15 00:25:51 2017 +0000 ASoC: audio-graph-scu-card: use asoc_simple_card_of_parse_routing() Current simple/audio scu card drivers are supporting same routing on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_routing Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-scu-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfe6b5898269b92571e502b4d706c815dd6bf53b Author: Kuninori Morimoto Date: Thu Jun 15 00:25:33 2017 +0000 ASoC: simple-scu-card: use asoc_simple_card_of_parse_routing() Current simple/audio scu card drivers are supporting same routing on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_routing Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fdb5d258e28de85263a34aab57f0a70b1715342 Author: Kuninori Morimoto Date: Thu Jun 15 00:25:17 2017 +0000 ASoC: simple-card: use asoc_simple_card_of_parse_routing() Current simple/audio scu card drivers are supporting same routing on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_routing Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 3296d07826ebc698113832acb426f037e9b3b253 Author: Kuninori Morimoto Date: Thu Jun 15 00:25:02 2017 +0000 ASoC: simple-card-utils: add asoc_simple_card_of_parse_routing() Current simple card drivers are parsing routing on each own driver. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_of_parse_routing for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 4 ++++ sound/soc/generic/simple-card-utils.c | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit c564a5b18710f76da222ad9f14a4c0ebc2c4c74c Author: Kuninori Morimoto Date: Thu Jun 15 00:24:43 2017 +0000 ASoC: audio-graph-scu-card: use asoc_simple_card_convert_fixup() Current simple/audio scu card drivers are supporting same convert-rate/convert-channels on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_parse_convert/asoc_simple_card_convert_fixup Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-scu-card.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit cd8957f588397498c12b258da9044b52598c9527 Author: Kuninori Morimoto Date: Thu Jun 15 00:24:28 2017 +0000 ASoC: simple-scu-card: use asoc_simple_card_convert_fixup() Current simple/audio scu card drivers are supporting same convert-rate/convert-channels on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_parse_convert/asoc_simple_card_convert_fixup Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit 13bb1cc0ad205b2aeeb8d2ea5c790a396135283d Author: Kuninori Morimoto Date: Thu Jun 15 00:24:09 2017 +0000 ASoC: simple-card-utils: add asoc_simple_card_convert_fixup() Current simple/audio scu card drivers are supporting same convert-rate/convert-channels on DT, but doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_parse_convert/asoc_simple_card_convert_fixup Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 10 +++++++++ sound/soc/generic/simple-card-utils.c | 40 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit 13fadfa75c7c08111ef142439b94e463bef6dfb5 Author: Hans de Goede Date: Thu Jun 15 08:48:32 2017 +0200 platform/x86: silead_dmi: Add touchscreen info for Pipo W2S tablet Add touchscreen info for Pipo W2S tablet. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/silead_dmi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 83ad357dee467f63574de35752bc40033deab30e Author: Johannes Berg Date: Wed Jun 14 22:17:20 2017 +0200 skbuff: make skb_put_zero() return void It's nicer to return void, since then there's no need to cast to any structures. Currently none of the users have a cast, but a number of future conversions do. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller include/linux/skbuff.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 108ea51412a7fddcd0a39efe564dffd47a033e6c Merge: 206f60e 99c195f Author: David S. Miller Date: Thu Jun 15 12:12:41 2017 -0400 Merge branch 'net-ktls' Dave Watson says: ==================== net: kernel TLS This series adds support for kernel TLS encryption over TCP sockets. A standard TCP socket is converted to a TLS socket using a setsockopt. Only symmetric crypto is done in the kernel, as well as TLS record framing. The handshake remains in userspace, and the negotiated cipher keys/iv are provided to the TCP socket. We implemented support for this API in OpenSSL 1.1.0, the code is available at https://github.com/Mellanox/tls-openssl/tree/master It should work with any TLS library with similar modifications, a test tool using gnutls is here: https://github.com/Mellanox/tls-af_ktls_tool RFC patch to openssl: https://mta.openssl.org/pipermail/openssl-dev/2017-June/009384.html Changes from V2: * EXPORT_SYMBOL_GPL in patch 1 * Ensure cleanup code always called before sk_stream_kill_queues to avoid warnings Changes from V1: * EXPORT_SYMBOL GPL in patch 2 * Add link to OpenSSL patch & gnutls example in documentation patch. * sk_write_pending check was rolled in to wait_for_memory path, avoids special case and fixes lock inbalance issue. * Unify flag handling for sendmsg/sendfile Changes from RFC V2: * Generic ULP (upper layer protocol) framework instead of TLS specific setsockopts * Dropped Mellanox hardware patches, will come as separate series. Framework will work for both. RFC V2: http://www.mail-archive.com/netdev@vger.kernel.org/msg160317.html Changes from RFC V1: * Socket based on changing TCP proto_ops instead of crypto framework * Merged code with Mellanox's hardware tls offload * Zerocopy sendmsg support added - sendpage/sendfile is no longer necessary for zerocopy optimization RFC V1: http://www.mail-archive.com/netdev@vger.kernel.org/msg88021.html * Socket based on crypto userspace API framework, required two sockets in userspace, one encrypted, one unencrypted. Paper: https://netdevconf.org/1.2/papers/ktls.pdf ==================== Signed-off-by: David S. Miller commit 99c195fb4eea405160ade58f74f62aed19b1822c Author: Dave Watson Date: Wed Jun 14 11:37:51 2017 -0700 tls: Documentation Add documentation for the tcp ULP tls interface. Signed-off-by: Boris Pismenny Signed-off-by: Dave Watson Signed-off-by: David S. Miller Documentation/networking/tls.txt | 135 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) commit 3c4d7559159bfe1e3b94df3a657b2cda3a34e218 Author: Dave Watson Date: Wed Jun 14 11:37:39 2017 -0700 tls: kernel TLS support Software implementation of transport layer security, implemented using ULP infrastructure. tcp proto_ops are replaced with tls equivalents of sendmsg and sendpage. Only symmetric crypto is done in the kernel, keys are passed by setsockopt after the handshake is complete. All control messages are supported via CMSG data - the actual symmetric encryption is the same, just the message type needs to be passed separately. For user API, please see Documentation patch. Pieces that can be shared between hw and sw implementation are in tls_main.c Signed-off-by: Boris Pismenny Signed-off-by: Ilya Lesokhin Signed-off-by: Aviad Yehezkel Signed-off-by: Dave Watson Signed-off-by: David S. Miller MAINTAINERS | 10 + include/linux/socket.h | 1 + include/net/tls.h | 237 +++++++++++++++ include/uapi/linux/tls.h | 79 +++++ net/Kconfig | 1 + net/Makefile | 1 + net/tls/Kconfig | 12 + net/tls/Makefile | 7 + net/tls/tls_main.c | 487 ++++++++++++++++++++++++++++++ net/tls/tls_sw.c | 772 +++++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 1607 insertions(+) commit e3b5616a347603a521fe3ac46f3194a60900e3a7 Author: Dave Watson Date: Wed Jun 14 11:37:26 2017 -0700 tcp: export do_tcp_sendpages and tcp_rate_check_app_limited functions Export do_tcp_sendpages and tcp_rate_check_app_limited, since tls will need to sendpages while the socket is already locked. tcp_sendpage is exported, but requires the socket lock to not be held already. Signed-off-by: Aviad Yehezkel Signed-off-by: Ilya Lesokhin Signed-off-by: Boris Pismenny Signed-off-by: Dave Watson Signed-off-by: David S. Miller include/net/tcp.h | 2 ++ net/ipv4/tcp.c | 5 +++-- net/ipv4/tcp_rate.c | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) commit 734942cc4ea6478eed125af258da1bdbb4afe578 Author: Dave Watson Date: Wed Jun 14 11:37:14 2017 -0700 tcp: ULP infrastructure Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP sockets. Based on a similar infrastructure in tcp_cong. The idea is that any ULP can add its own logic by changing the TCP proto_ops structure to its own methods. Example usage: setsockopt(sock, SOL_TCP, TCP_ULP, "tls", sizeof("tls")); modules will call: tcp_register_ulp(&tcp_tls_ulp_ops); to register/unregister their ulp, with an init function and name. A list of registered ulps will be returned by tcp_get_available_ulp, which is hooked up to /proc. Example: $ cat /proc/sys/net/ipv4/tcp_available_ulp tls There is currently no functionality to remove or chain ULPs, but it should be possible to add these in the future if needed. Signed-off-by: Boris Pismenny Signed-off-by: Dave Watson Signed-off-by: David S. Miller include/net/inet_connection_sock.h | 4 ++ include/net/tcp.h | 25 +++++++ include/uapi/linux/tcp.h | 1 + net/ipv4/Makefile | 2 +- net/ipv4/sysctl_net_ipv4.c | 25 +++++++ net/ipv4/tcp.c | 28 ++++++++ net/ipv4/tcp_ipv4.c | 2 + net/ipv4/tcp_ulp.c | 134 +++++++++++++++++++++++++++++++++++++ 8 files changed, 220 insertions(+), 1 deletion(-) commit 206f60e1451b4b90cb7f3a803d1c440602a458e0 Merge: 0ddead9 8a56aa1 Author: David S. Miller Date: Thu Jun 15 12:07:16 2017 -0400 Merge branch 'Broadcom-DTE-based-PTP-clock' Arun Parameswaran says: ==================== Add support for Broadcom DTE based PTP clock This patchset adds support for the DTE based PTP clock for Broadcom SoCs. The DTE nco based PTP clock can be used in both wired and wireless networks for precision time-stmaping purposes. ==================== Signed-off-by: David S. Miller commit 8a56aa107f1e812347cc1209aa674e1361375af8 Author: Arun Parameswaran Date: Mon Jun 12 13:26:01 2017 -0700 ptp: Add a ptp clock driver for Broadcom DTE This patch adds a ptp clock driver for the Broadcom SoCs using the Digital timing Engine (DTE) nco. Signed-off-by: Arun Parameswaran Signed-off-by: David S. Miller drivers/ptp/Kconfig | 16 +++ drivers/ptp/Makefile | 1 + drivers/ptp/ptp_dte.c | 353 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 370 insertions(+) commit 80d6076140b2bc0e6b9951f6aacc3de55ceb37fd Author: Arun Parameswaran Date: Mon Jun 12 13:26:00 2017 -0700 dt-binding: ptp: add bindings document for dte based ptp clock Add device tree binding documentation for the Broadcom DTE PTP clock driver. Signed-off-by: Arun Parameswaran Signed-off-by: David S. Miller Documentation/devicetree/bindings/ptp/brcm,ptp-dte.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0ddead90b223faae475f3296a50bf574b7f7c69a Merge: f7aec12 a090bd4 Author: David S. Miller Date: Thu Jun 15 11:31:37 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net The conflicts were two cases of overlapping changes in batman-adv and the qed driver. Signed-off-by: David S. Miller commit a1924005a2e9bfcc4e217b4acd0a4f2421969040 Author: Harish Kasiviswanathan Date: Fri Jun 9 17:47:28 2017 -0400 drm/amdgpu: Fix compiler warnings Acked-by: Alex Deucher Signed-off-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 370f092f30ee6fa0be6eb14d2ddb66ef861c6a3f Author: Harish Kasiviswanathan Date: Fri Jun 9 17:47:27 2017 -0400 drm/amdgpu: vm_update_ptes remove code duplication CPU and GPU paths were mostly the same. Acked-by: Christian König Acked-by: Alex Deucher Signed-off-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 73 ++++++++-------------------------- 1 file changed, 16 insertions(+), 57 deletions(-) commit 0ad6f0d387dad93c1a9fdd191e06326441b701ae Author: Tom St Denis Date: Mon Jun 12 13:50:53 2017 -0400 drm/amd/amdgpu: Port VCN over to new SOC15 macros Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 164 +++++++++++++++++----------------- 1 file changed, 82 insertions(+), 82 deletions(-) commit c5c1effd85248398f9296af55b1eb928098b3aa9 Author: Tom St Denis Date: Mon Jun 12 13:46:44 2017 -0400 drm/amd/amdgpu: Port PSP v10.0 over to new SOC15 macros Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3176810d60083d6eaf097a8762d2b6bcec9baa11 Author: Tom St Denis Date: Mon Jun 12 13:45:30 2017 -0400 drm/amd/amdgpu: Port PSP v3.1 over to new SOC15 macros Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit ba7d5a22a6a733ac5bead62da6f04fb4c67e3173 Author: Tom St Denis Date: Mon Jun 12 13:43:36 2017 -0400 drm/amd/amdgpu: Port NBIO v7.0 driver over to new SOC15 macros Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 42 ++++++++++++++-------------------- 1 file changed, 17 insertions(+), 25 deletions(-) commit db0c4d26d6e9ee383b47bbc2e71f2844aa7ed134 Author: Tom St Denis Date: Mon Jun 12 13:09:41 2017 -0400 drm/amd/amdgpu: Port NBIO v6.1 driver over to new SOC15 macros Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 54 +++++++++++++++------------------- 1 file changed, 23 insertions(+), 31 deletions(-) commit 4ad5751a6c05e0bd2f26b15681ab356d8e0f372b Author: Tom St Denis Date: Mon Jun 12 13:03:41 2017 -0400 drm/amd/amdgpu: Port UVD 7.0 over to new SOC15 macros Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 174 +++++++++++++++++----------------- 1 file changed, 87 insertions(+), 87 deletions(-) commit deca8322f15398940d273359738c338f69f6bcda Author: Tom St Denis Date: Mon Jun 12 12:34:28 2017 -0400 drm/amd/amdgpu: Port MMHUB over to new SOC15 macros Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 805cb75ccb4276abec57a431f952ecb70299c550 Author: Tom St Denis Date: Mon Jun 12 12:30:41 2017 -0400 drm/amd/amdgpu: Cleanup gfxhub read-modify-write patterns Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit f7047402d1b79c30b83a46739608f10e369949b1 Author: Tom St Denis Date: Mon Jun 12 12:12:22 2017 -0400 drm/amd/amdgpu: Port GFXHUB over to new SOC15 macros Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 496828e78625e021ba51f4bd060c026c4cbab718 Author: Tom St Denis Date: Mon Jun 12 12:05:42 2017 -0400 drm/amd/amdgpu: Add offset variant to SOC15 macros Allows reading/writing via SOC15 macros with offset for various register banks. Signed-off-by: Tom St Denis Acked-by: Christian König Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15_common.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9d90f0bd7caafb2a2e157e49842891e9b6acfe65 Author: Eric Huang Date: Tue Jun 13 14:51:57 2017 -0400 drm/amd/powerplay: add avfs control for Vega10 Signed-off-by: Eric Huang Reviewed-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 1 + 1 file changed, 1 insertion(+) commit d67fed161896c56c18dea6f2fa42d225ad5d87b2 Author: Alex Deucher Date: Fri Jun 2 14:52:18 2017 -0400 drm/amdgpu: add virtual display support for raven Same as other asics. If enabled, exposes a user selectable number of virtual displays. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 2 ++ 1 file changed, 2 insertions(+) commit 7366af81da3d064365f5bb7a484925fd46081484 Author: Alex Deucher Date: Mon Jun 12 22:55:22 2017 -0400 drm/amdgpu/gfx9: fix compute ring doorbell index This got lost when the code was revamped. Copy/paste bug from gfx8. Reported-by: Evan Quan Fixes: 78c168342 (drm/amdgpu: allow split of queues with kfd at queue granularity v4) Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2119d0db59a428749cc8a6e946f604cf93590c38 Author: Tom St Denis Date: Mon Jun 12 09:05:04 2017 -0400 drm/amd/amdgpu: Rename KIQ ring to avoid spaces Swap space for underscore in ring name. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5475e16eb37e86632cf6f3bb5102ed5aec2c16e Author: Tom St Denis Date: Mon Jun 12 08:45:02 2017 -0400 drm/amd/amdgpu: gfx9 tidy ups (v2) A couple of simple tidy ups to register programming. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher (v2): Avoid using 'data' uninitialized Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) commit 948edf095158db8d51db25527d8ff21cdff7eb35 Author: horchen Date: Fri Jun 9 04:56:48 2017 -0700 drm/amdgpu: add contiguous flag in ucode bo create Under VF environment, the ucode would be settled to the visible VRAM, As it would be pinned to the visible VRAM, it's better to add contiguous flag,otherwise it need to move gpu address during the pin process. This movement is not necessary. Signed-off-by: horchen Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab4fe3e1f910a71aabf0b1c919c482d7ce9fc5c7 Author: Huang Rui Date: Mon Jun 5 22:11:59 2017 +0800 drm/amdgpu: fix missed gpu info firmware when cache firmware during S3 gpu_info firmware is released after data is used. But when system enters into suspend, upper class driver will cache all firmware names. At that time, gpu_info will be failing to load. It seems an upper class issue, that we should not release gpu_info firmware until device finished. [ 903.236589] cache_firmware: amdgpu/vega10_sdma1.bin [ 903.236590] fw_set_page_data: fw-amdgpu/vega10_sdma1.bin buf=ffff88041eee10c0 data=ffffc90002561000 size=17408 [ 903.236591] cache_firmware: amdgpu/vega10_sdma1.bin ret=0 [ 903.464160] __allocate_fw_buf: fw-amdgpu/vega10_gpu_info.bin buf=ffff88041eee2c00 [ 903.471815] (NULL device *): loading /lib/firmware/updates/4.11.0-custom/amdgpu/vega10_gpu_info.bin failed with error -2 [ 903.482870] (NULL device *): loading /lib/firmware/updates/amdgpu/vega10_gpu_info.bin failed with error -2 [ 903.492716] (NULL device *): loading /lib/firmware/4.11.0-custom/amdgpu/vega10_gpu_info.bin failed with error -2 [ 903.503156] (NULL device *): direct-loading amdgpu/vega10_gpu_info.bin Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) commit 4f0955fcc052b556446f6f041ad8c83d70c3b253 Author: Huang Rui Date: Wed May 10 23:04:06 2017 +0800 drm/amdgpu: export test ib debugfs interface As Christian and David's suggestion, submit the test ib ring debug interfaces. It's useful for debugging with the command submission without VM case. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 17d176a5ccb9a834a77310dcf9e654cf30b395a8 Author: Eric Huang Date: Thu Jun 8 14:39:32 2017 -0400 drm/amd/powerplay: add GPU power display for vega10 Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 4b1d63600e90cfa32f31a7ba96104ec78d9566f8 Author: Eric Huang Date: Thu Jun 8 13:48:59 2017 -0400 drm/amd/powerplay: update vega10_ppsmc.h Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/vega10_ppsmc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2bbec882c22ef8598c6daf0d52feae9da6f13a04 Author: Hawking Zhang Date: Fri Jun 9 23:39:31 2017 +0800 drm/amdgpu: avoid to reset wave_front_size to 0 No need to clear it. The values are set explicitly. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 -- 1 file changed, 2 deletions(-) commit 51fd0370677733785b1f5f31057a12738386ee25 Author: Hawking Zhang Date: Fri Jun 9 22:30:52 2017 +0800 drm/amdgpu: add new member in gpu_info fw Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 3 +++ 3 files changed, 11 insertions(+) commit c55c5ddedba0c393683910eeeb760903d0d1f827 Author: Arvind Yadav Date: Thu Jun 15 16:30:20 2017 +0530 sparc/time: make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller arch/sparc/kernel/time_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4432711a48f1dca6c82c4d2742b5033abddf177a Merge: 9300d9c eea9833 Author: David S. Miller Date: Thu Jun 15 08:20:41 2017 -0700 Merge branch 'sparc64-early-boot-timestamp-fixes' Pavel Tatashin says: ==================== sparc64: Early boot timestamp fixes Guenter Roeck reported a problem that was introduced by early boot timestamp changes. Where: tick_get_frequency() returns 0. ==================== Tested-by: Guenter Roeck Signed-off-by: David S. Miller commit eea9833453bd39e2f35325abb985d00486c8aa69 Author: Pavel Tatashin Date: Thu Jun 15 10:40:59 2017 -0400 sparc64: broken %tick frequency on spitfire cpus After early boot time stamps project the %tick frequency is detected incorrectly on spittfire cpus. We must use cpuid of boot cpu to find corresponding cpu node in OpenBoot, and extract clock-frequency property from there. Signed-off-by: Pavel Tatashin Signed-off-by: David S. Miller arch/sparc/kernel/time_64.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit fca4afe400cb68fe5a7f0a97fb1ba5cfdcb81675 Author: Pavel Tatashin Date: Thu Jun 15 10:40:58 2017 -0400 sparc64: use prom interface to get %stick frequency We initialize time early, we must use prom interface instead of open firmware driver, which is not yet initialized. Also, use prom_getintdefault() instead of prom_getint() to be compatible with the code before early boot timestamps project. Signed-off-by: Pavel Tatashin Signed-off-by: David S. Miller arch/sparc/kernel/time_64.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit bfa953d336cdd713f6968c85ca820ef22333dc35 Author: Shawn Nematbakhsh Date: Tue Jun 13 10:53:26 2017 -0700 power: supply: sbs-battery: Don't needlessly set CAPACITY_MODE According to the smart battery spec (1), the CAPACITY_MODE bit does not influence the value read from RelativeStateOfCharge(), so don't bother changing CAPACITY_MODE when doing such a read. (1) - Smart Battery Data Specification, Rev 1.1, Dec. 11, 1998 Signed-off-by: Shawn Nematbakhsh Reviewed-by: Guenter Roeck Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fe8a6534396807b8a0863cd146b72c0bce0b0c88 Author: Shawn Nematbakhsh Date: Tue Jun 13 10:53:25 2017 -0700 power: supply: sbs-battery: Prevent CAPACITY_MODE races A subset of smart battery commands return charge or energy depending on the CAPACITY_MODE bit setting of BatteryMode(). In order to unambiguously read a charge or energy value, it is necessary to ensure that CAPACITY_MODE is set as desired, and not changed for the duration of the attribute read. Signed-off-by: Shawn Nematbakhsh Reviewed-by: Guenter Roeck Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 48f680c0a9cae36e37d91a3dc086143d6047c8a8 Author: Phil Reid Date: Thu Jun 15 21:59:30 2017 +0800 power: supply: bq24735: remove incorrect le16_to_cpu calls i2c_smbus commands handle the correct byte order for smbus transactions internally. This will currently result in incorrect operation on big endian systems. Signed-off-by: Phil Reid Signed-off-by: Sebastian Reichel drivers/power/supply/bq24735-charger.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a1bbec72f9fef100bb00762e36c20055deacd0e2 Author: Phil Reid Date: Thu Jun 15 21:59:29 2017 +0800 power: supply: sbs-battery: remove incorrect le16_to_cpu calls i2c_smbus commands handle the correct byte order for smbus transactions internally. This will currently result in incorrect operation on big endian systems. Signed-off-by: Phil Reid Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8fa611213d29cd62908adfa2dfd451b2de1737b3 Author: Sagi Grimberg Date: Thu Jun 15 16:31:29 2017 +0300 nvme: don't hard code size of struct t10_pi_tuple Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 39bdc5901f2525de3afab8a30b7acc04f6ce41c3 Author: Christoph Hellwig Date: Mon Jun 12 18:21:19 2017 +0200 nvme: no need to wait for the reset when keepalive fails We don't need to wait for the reset from the delayed work item that is kicked off when we don't get a keepalive. Signed-off-by: Christoph Hellwig Reported-by: Sagi Grimberg Reviewed-by: Sagi Grimberg drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d86c4d8ef31b3d99c681c859cb4e936dafc2d7a4 Author: Christoph Hellwig Date: Thu Jun 15 15:41:08 2017 +0200 nvme: move reset workqueue handling to common code This moves the nvme_reset function from the PCIe driver to common code, renaming it to nvme_reset_ctrl in the process. Additionally a new helper nvme_reset_ctrl_sync is added for the case where we want to wait for the reset. To facilitate that the reset_work work structure is move to the common nvme_ctrl structure and the ->reset_ctrl method is removed. For now the drivers initialize the reset_work with their own callback, but longer term we should move to callouts for specific parts of the reset process and move even more code to the core. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg drivers/nvme/host/core.c | 26 +++++++++++++++++++++++--- drivers/nvme/host/fc.c | 36 ++++-------------------------------- drivers/nvme/host/nvme.h | 3 ++- drivers/nvme/host/pci.c | 45 +++++++++++---------------------------------- drivers/nvme/host/rdma.c | 23 +++-------------------- drivers/nvme/target/loop.c | 25 ++++--------------------- 6 files changed, 47 insertions(+), 111 deletions(-) commit 231ce279e6e37960f8c61d99f86e4937733ed96b Author: Kevin Hilman Date: Fri Jun 9 10:21:10 2017 -0700 ARM: davinci: fix const warnings After VPIF was converted to enable getting subdevs from DT, the pdata is no longer const, so remove these to avoid compiler warnings. Signed-off-by: Kevin Hilman [nsekhar@ti.com: minor commit message fixup] Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-dm646x-evm.c | 4 ++-- arch/arm/mach-davinci/pdata-quirks.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 82d1afbce1e021819b913d9f6a314c3b12b56ed8 Author: Hans Verkuil Date: Tue Jun 13 15:47:06 2017 +0200 ARM: dts: exynos: add needs-hpd to &hdmicec for Odroid-U3 The Odroid-U3 board has an IP4791CZ12 level shifter that is disabled if the HPD is low, which means that the CEC pin is disabled as well. Signed-off-by: Hans Verkuil Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-odroidu3.dts | 4 ++++ 1 file changed, 4 insertions(+) commit f6262bda462e81e959b80a96dac799bd9df27f73 Author: Dhinakaran Pandiyan Date: Tue Jun 13 13:03:59 2017 -0700 drm/i915: Don't enable backlight at setup time. Maarten and Ville noticed that we are enabling backlight via DP aux very early in the modeset_init path via the intel_dp_aux_setup_backlight() function, since commit e7156c833903 ("drm/i915: Add Backlight Control using DPCD for eDP connectors (v9)"). Looks like all we need to do during _setup_backlight() is read the current brightness state instead of modifying it. v2: Rewrote commit message. Cc: Ville Syrjala Cc: Maarten Lankhorst Cc: Jani Nikula Cc: Yetunde Adebisi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Maarten Lankhorst Acked-by: Jani Nikula Tested-by: Puthikorn Voravootivat Fixes: e7156c833903 ("drm/i915: Add Backlight Control using DPCD for eDP connectors (v9)") Link: http://patchwork.freedesktop.org/patch/msgid/1497384239-2965-1-git-send-email-dhinakaran.pandiyan@intel.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 10 ---------- 1 file changed, 10 deletions(-) commit 29962acaa07c151a7ddfd3ff56ba5844889681fb Author: Colin Ian King Date: Tue Jun 13 14:47:51 2017 +0100 drm/i915/cnl: make function cnl_ddi_dp_set_dpll_hw_state static The function cnl_ddi_dp_set_dpll_hw_state does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'cnl_ddi_dp_set_dpll_hw_state' was not declared. Should it be static?" Signed-off-by: Colin Ian King Link: http://patchwork.freedesktop.org/patch/msgid/20170613134751.29196-1-colin.king@canonical.com Reviewed-by: Tvrtko Ursulin Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_dpll_mgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e56134bc79569d5aa912c957f2fd4d92ea21fcc8 Author: Ville Syrjälä Date: Thu Jun 1 17:36:19 2017 +0300 drm/i915: Remove pipe A quirk remnants With 830 the only thing needing pipe quirks, we can just drop the quirk defines and replace the checks with IS_I830() checks. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-8-ville.syrjala@linux.intel.com Acked-by: Chris Wilson Acked-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_drv.h | 2 - drivers/gpu/drm/i915/intel_display.c | 92 ++++-------------------------------- drivers/gpu/drm/i915/intel_overlay.c | 1 - 3 files changed, 10 insertions(+), 85 deletions(-) commit b82a682d3234115dda6c8d05c31bafe98a66c885 Author: Ville Syrjälä Date: Thu Jun 1 17:36:18 2017 +0300 drm/i915: Drop pipe A quirk for Thinkapd T60 The pipe A force quirk shouldn't needed except on 830. So let's nuke it for the IBM Thinkpad T60 945 machines. This quirk pre-dates KMS so it's usefulness is doubtful at best now. The original bug report [1] describes the symptoms as "system hang on closing T60 panel lid", and we already dropped a similar quirk for another 945 machine in commit 736a69ca8c99 ("drm/i915: Drop PIPE-A quirk for 945GSE HP Mini") so I'm hopeful we can drop this one as well. The quirk was added into xf86-video-intel in commit 08903abe4dc0 ("Add pipe a force enable quirk for Lenovo T60") [1] https://bugs.freedesktop.org/show_bug.cgi?id=16494 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-7-ville.syrjala@linux.intel.com Acked-by: Chris Wilson Acked-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 3 --- 1 file changed, 3 deletions(-) commit dc453e336c33615dbfbf78940d4f599c09ad17a7 Author: Ville Syrjälä Date: Thu Jun 1 17:36:17 2017 +0300 drm/i915: Drop pipe A quirk for Toshiba Protege R205-S209 The pipe A force quirk shouldn't needed except on 830. So let's nuke it for the Toshiba Protege R-205/S-209 945 machines. This quirk pre-dates KMS so it's usefulness is doubtful at best now. Unfortunately the original bug report [1] isn't very helpful since it doesn't describe the symptoms. And the commit message in xf86-video-intel commit ecdb5963ef68 ("Add pipe A force enable quirk for Toshiba Portege R205-S209") is not much help either. However, if we assume the problem was the typical "closing the lid hangs the box" type of thing, we already nuked the quirk for another 945 machine in commit 736a69ca8c99 ("drm/i915: Drop PIPE-A quirk for 945GSE HP Mini") and so I hope we can drop this one as well. [1] https://bugs.freedesktop.org/show_bug.cgi?id=14944 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-6-ville.syrjala@linux.intel.com Acked-by: Chris Wilson Acked-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 3 --- 1 file changed, 3 deletions(-) commit 2ee0da163196baf9baa05b7464594342788213f2 Author: Ville Syrjälä Date: Thu Jun 1 17:36:16 2017 +0300 drm/i915: Add i830 "pipes power well" 830 more or less requires both pipes and DPLLs to remain on as long as either pipe is needed. However, when neither pipe is actually needed, we can save a bit of power by turning everything off. To do that we add a new "power well" that turns both pipes and DPLLs on and off in the right order. Seems to save ~50mW on my Fujitsu-Siemens Lifebook S6010. This also avoids having to abuse the load detection to force pipe A on at init time. That was never very robust, and it only worked for one pipe, whereas 830 really needs both pipes enabled. As a bonus the 830 pipe quirk is now a bit more isolated from the rest of the mode setting infrastructure, which should mean that it's much less likely someone will accidentally break it in the future. The extra cost is of course slight code duplication, but that seems like a worthwile tradeoff here. v2; s/BIT/BIT_ULL/ Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-5-ville.syrjala@linux.intel.com Acked-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 92 ++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_drv.h | 2 + drivers/gpu/drm/i915/intel_runtime_pm.c | 64 +++++++++++++++++++++++ 3 files changed, 157 insertions(+), 1 deletion(-) commit 0350815a9041d251060c464f1ce80aee11f81023 Author: Christoph Hellwig Date: Tue Jun 13 09:15:18 2017 +0200 nvme-pci: merge init_request methods Now that we get the tagset passed we can have a single implementation for the I/O and admin queues. Signed-off-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 62b83b1834184a11032c7b13679a6427119fbd84 Author: Christoph Hellwig Date: Tue Jun 13 09:15:21 2017 +0200 nvme-loop: merge init_request methods Now that we get the tagset passed we can have a single implementation for the I/O and admin queues. Signed-off-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/loop.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 76f983cb7981d925d6f1a7ed0487a309e4dff7b2 Author: Christoph Hellwig Date: Tue Jun 13 09:15:20 2017 +0200 nvme-fc: merge init_request methods Now that we get the tagset passed we can have a single implementation for the I/O and admin queues. Signed-off-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 385475ee2dedffccd059a240a336a0db6eff5057 Author: Christoph Hellwig Date: Tue Jun 13 09:15:19 2017 +0200 nvme-rdma: merge init_request and exit_request methods Now that we get the tagset passed we can have a single implementation for the I/O and admin queues. Signed-off-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 43 +++++++++++-------------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) commit ebe6d874cdb27d47f506a43ea95f1c0ef03aa246 Author: Christoph Hellwig Date: Mon Jun 12 18:36:32 2017 +0200 nvme: move protection information check into nvme_setup_rw It only applies to read/write commands, and this way non-PCIe drivers get the check as well instead of having to duplicate it when adding metadata support. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 16 +++++++++++++--- drivers/nvme/host/pci.c | 13 +------------ 2 files changed, 14 insertions(+), 15 deletions(-) commit b3b1b0b01d244461cec22be4e2b94b98c58ad8c5 Author: Christoph Hellwig Date: Mon Jun 12 18:30:51 2017 +0200 nvme: mark shutdown_timeout static And open code the SHUTDOWN_TIMEOUT macro. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 4 ++-- drivers/nvme/host/nvme.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) commit bb472baa235045798ba39864948bc47d9dbd7487 Author: Dan Carpenter Date: Wed Jun 14 13:46:45 2017 +0300 nvme-rdma: fix error code in nvme_rdma_create_ctrl() We accidentally return ERR_PTR(0) which is NULL. The caller isn't explicitly checking for that but I couldn't immediately spot whether this would lead to a NULL dereference. Anyway, we can fix add an error code easily enough. Signed-off-by: Dan Carpenter Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 2 ++ 1 file changed, 2 insertions(+) commit 97ddc36e4e993bba308aa3e3f58f6de9d5683e95 Author: Guan Junxiong Date: Tue Jun 13 10:51:24 2017 +0800 nvmf: keep track of nvmet connect error status To let the host know what happends to the connection establishment, adjust the behavior of nvmf_log_connect_error to make more connect specifig error codes human-readble. Signed-off-by: Guan Junxiong Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 435e809058bafaa8f0bf8f55f37508b01734c9a5 Author: Guan Junxiong Date: Tue Jun 13 09:26:15 2017 +0800 nvme: add fields into identify controller data structure Add the new to NVMe 1.3 fields EDSTT, DSTO, FWUG, HCTMA, MNTMT, MXTMT, and SANICAP into the idenfity controller data structure. Signed-off-by: Guan Junxiong Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig include/linux/nvme.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1b63327734f111c56d2035e23e5088b79cfa3700 Author: Bart Van Assche Date: Thu Jun 8 09:43:29 2017 -0700 nvmet-fc: Remove a set-but-not-used variable This was detected by building the nvmet-fc driver with W=1. Signed-off-by: Bart Van Assche Cc: James Smart Cc: Christoph Hellwig Cc: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/target/fcloop.c | 2 -- 1 file changed, 2 deletions(-) commit f0425db00ce4241a635463729317b06406ab6b3f Author: Johannes Thumshirn Date: Fri Jun 9 16:17:21 2017 +0200 nvme: use ctrl->device consistently for logging Change the few left over users of ctrl->dev over to using ctrl->device for logging purposes, so we consistently use the same device. Signed-off-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c61d788b8b1fe57aaf03ac0b5c636c7388ebfd20 Author: Johannes Thumshirn Date: Wed Jun 7 11:45:36 2017 +0200 nvmet: allow overriding the NVMe VS via configfs Allow overriding the announced NVMe Version of a via configfs. This is particularly helpful when debugging new features for the host or target side without bumping the hard coded version (as the target might not be fully compliant to the announced version yet). Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Guan Junxiong Signed-off-by: Christoph Hellwig drivers/nvme/target/configfs.c | 37 +++++++++++++++++++++++++++++++++++++ include/linux/nvme.h | 4 ++++ 2 files changed, 41 insertions(+) commit 430c7bef173e23c61981ca7d0279e3d3c7549b1a Author: Johannes Thumshirn Date: Wed Jun 7 11:45:33 2017 +0200 nvmet: add uuid field to nvme_ns and populate via configfs Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/target/configfs.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 637dc0f38afdd2fdb6e46a913b7f35c17f0c6ae0 Author: Johannes Thumshirn Date: Wed Jun 7 11:45:32 2017 +0200 nvmet: implement namespace identify descriptor list A NVMe Identify NS command with a CNS value of '3' is expecting a list of Namespace Identification Descriptor structures to be returned to the host for the namespace requested in the namespace identify command. This Namespace Identification Descriptor structure consists of the type of the namespace identifier, the length of the identifier and the actual identifier. Valid types are NGUID and UUID which we have saved in our nvme_ns structure if they have been configured via configfs. If no value has been assigened to one of these we return an "invalid opcode" back to the host to maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Also as the Namespace Identify Descriptor list is the only mandatory feature change between 1.2.1 and 1.3 we can bump the advertised version as well. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/admin-cmd.c | 61 +++++++++++++++++++++++++++++++++++++++++ drivers/nvme/target/core.c | 3 +- drivers/nvme/target/nvmet.h | 1 + 3 files changed, 64 insertions(+), 1 deletion(-) commit d934f9848a77be4afe0ca336ea419dd066c934f3 Author: Johannes Thumshirn Date: Wed Jun 7 11:45:35 2017 +0200 nvme: provide UUID value to userspace Now that we have a way for getting the UUID from a target, provide it to userspace as well. Unfortunately there is already a sysfs attribute called UUID which is a misnomer as it holds the NGUID value. So instead of creating yet another wrong name, create a new 'nguid' sysfs attribute for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 3b22ba2682b43296b55f5b4e8c2e91b7248db02b Author: Johannes Thumshirn Date: Wed Jun 7 11:45:34 2017 +0200 nvme: get list of namespace descriptors If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 1 + 2 files changed, 80 insertions(+) commit 90985b84c42a045c0d3ed2753a839b37edb3a8f1 Author: Johannes Thumshirn Date: Wed Jun 7 11:45:31 2017 +0200 nvme: rename uuid to nguid in nvme_ns The uuid field in the nvme_ns structure represents the nguid field from the identify namespace command. And as NVMe 1.3 introduced an UUID in the NVMe Namespace Identification Descriptor this will collide. So rename the uuid to nguid to prevent any further confusion. Unfortunately we export the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 10 +++++----- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit af8b86e9a7ffb9528e745b7ea25b18545699482c Author: Johannes Thumshirn Date: Wed Jun 7 11:45:30 2017 +0200 nvme: introduce NVMe Namespace Identification Descriptor structures Signed-off-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig include/linux/nvme.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 0add5e8e588c65c5ac6a3255f624260bf889128d Author: Johannes Thumshirn Date: Wed Jun 7 11:45:29 2017 +0200 nvmet: use NVME_IDENTIFY_DATA_SIZE Use NVME_IDENTIFY_DATA_SIZE define instead of hard coding the magic 4096 value. Signed-off-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke [hch: converted three more users] Signed-off-by: Christoph Hellwig drivers/nvme/host/lightnvm.c | 2 +- drivers/nvme/host/pci.c | 4 ++-- drivers/nvme/target/admin-cmd.c | 4 ++-- drivers/nvme/target/discovery.c | 2 +- include/linux/nvme.h | 2 ++ 5 files changed, 8 insertions(+), 6 deletions(-) commit 0945e56994ac855d01c4aecf69bded65c751b894 Author: Johannes Thumshirn Date: Wed Jun 7 11:45:28 2017 +0200 scatterlist: add sg_zero_buffer() helper The sg_zero_buffer() helper is used to zero fill an area in a SG list. Signed-off-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg [hch: renamed to sg_zero_buffer] Signed-off-by: Christoph Hellwig include/linux/scatterlist.h | 2 ++ lib/scatterlist.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit d19d4c8eb1c08f5292a5a5619098e498166055c2 Author: Sagi Grimberg Date: Mon Jun 5 11:20:47 2017 +0300 nvme-pci: remove redundant includes Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy drivers/nvme/host/pci.c | 13 ------------- 1 file changed, 13 deletions(-) commit b2a0eb1a0ac72869c910a79d935a0b049ec78ad9 Author: Keith Busch Date: Wed Jun 7 20:32:50 2017 +0200 nvme-pci: Remove watchdog timer The controller status polling was added to preemptively reset a failed controller. This early detection would allow commands that would normally timeout a chance for a retry, or find broken links when the platform didn't support hotplug. This once-per-second MMIO read, however, created more problems than it solves. This often races with PCIe Hotplug events that required complicated syncing between work queues, frequently triggered PCIe Completion Timeout errors that also lead to fatal machine checks, and unnecessarily disrupts low power modes by running on idle controllers. This patch removes the watchdog timer, and instead checks controller health only on an IO timeout when we have a reason to believe something is wrong. If the controller is failed, the driver will disable immediately and request scheduling a reset. Suggested-by: Andy Lutomirski Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 123 ++++++++++++++++++++++-------------------------- 1 file changed, 56 insertions(+), 67 deletions(-) commit 97f6ef6464dbd235a4d9bdfc05d949aab24fc927 Author: Xu Yu Date: Wed May 24 16:39:55 2017 +0800 nvme-pci: remap BAR0 to cover admin CQ doorbell for large stride The existing driver initially maps 8192 bytes of BAR0 which is intended to cover doorbells of admin SQ and CQ. However, if a large stride, e.g. 10, is used, the doorbell of admin CQ will be out of 8192 bytes. Consequently, a page fault will be raised when the admin CQ doorbell is accessed in nvme_configure_admin_queue(). This patch fixes this issue by remapping BAR0 before accessing admin CQ doorbell if the initial mapping is not enough. Signed-off-by: Xu Yu Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 65 ++++++++++++++++++++++++++++++++----------------- include/linux/nvme.h | 1 + 2 files changed, 44 insertions(+), 22 deletions(-) commit fdf9dfa85093f9813bc9818b7920fcf5a0eb3580 Author: Sagi Grimberg Date: Thu May 4 13:33:15 2017 +0300 nvme: move nr_reconnects to nvme_ctrl It is not a user option but rather a variable controller attribute. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 2 +- drivers/nvme/host/fabrics.h | 2 -- drivers/nvme/host/fc.c | 6 +++--- drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/rdma.c | 6 +++--- 5 files changed, 8 insertions(+), 9 deletions(-) commit c669ccdc50c28ecb002b567c78b41f7d1cf5ec49 Author: Sagi Grimberg Date: Thu May 4 13:33:14 2017 +0300 nvme: queue ns scanning and async request from nvme_wq To suppress the warning triggered by nvme_uninit_ctrl: kernel: [ 50.350439] nvme nvme0: rescanning kernel: [ 50.363351] ------------[ cut here]------------ kernel: [ 50.363396] WARNING: CPU: 1 PID: 37 at kernel/workqueue.c:2423 check_flush_dependency+0x11f/0x130 kernel: [ 50.363409] workqueue: WQ_MEM_RECLAIM nvme-wq:nvme_del_ctrl_work [nvme_core] is flushing !WQ_MEM_RECLAIM events:nvme_scan_work [nvme_core] This was triggered with nvme-loop, but can happen with rdma/pci as well afaict. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9a6327d2f25b14cb568ca2c55ccbc8f00aa400e4 Author: Sagi Grimberg Date: Wed Jun 7 20:31:55 2017 +0200 nvme: Move transports to use nvme-core workqueue Instead of each transport using it's own workqueue, export a single nvme-core workqueue and use that instead. In the future, this will help us moving towards some unification if controller setup/teardown flows. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 15 +++++++++++++-- drivers/nvme/host/fc.c | 28 ++++++---------------------- drivers/nvme/host/nvme.h | 2 ++ drivers/nvme/host/pci.c | 18 +++--------------- drivers/nvme/host/rdma.c | 25 ++++++++----------------- drivers/nvme/target/loop.c | 8 ++++---- 6 files changed, 36 insertions(+), 60 deletions(-) commit c58bd1bf4d46a020b7a1aa0710bca8191d789caa Author: Sagi Grimberg Date: Thu May 4 13:33:12 2017 +0300 nvme: Don't allow to reset a reconnecting controller The reset operation is guaranteed to fail for all scenarios but the esoteric case where in the last reconnect attempt concurrent with the reset we happen to successfully reconnect. We just deny initiating a reset if we are reconnecting. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 1 - 1 file changed, 1 deletion(-) commit b282a88d910296facf89fd1088832f9b41fa00c5 Author: Sagi Grimberg Date: Thu May 4 13:33:11 2017 +0300 nvme-rdma: Get rid of CONNECTED state We only care about if the queue is LIVE for request submission, so no need for CONNECTED. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit abf87d5e9d57920c7ee1dacdf0929783a6a4c9af Author: Sagi Grimberg Date: Thu May 4 13:33:10 2017 +0300 nvme-rdma: rework rdma connection establishment error path Instead of introducing a flag for if the queue is allocated, simply free the rdma resources when we get the error. We allocate the queue rdma resources when we have an address resolution, their we allocate (or take a reference on) our device so we should free it when we have error after the address resolution namely: 1. route resolution error 2. connect reject 3. connect error 4. peer unreachable error Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit ca6e95bb0a2ac11ae7a04e5cc53c709522af5144 Author: Sagi Grimberg Date: Thu May 4 13:33:09 2017 +0300 nvme-rdma: make nvme_rdma_[create|destroy]_queue_ib symmetrical We put the reference on the device in the destroy routine so we should lookup and take the reference in the create routine. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) commit c8295d111225f869f98f032050ec8d028f5b590f Author: Sagi Grimberg Date: Thu May 4 13:33:08 2017 +0300 nvme-rdma: Don't rearm the CQ when polling directly We don't need it as the core polling context will take are of rearming the completion queue. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 1 - 1 file changed, 1 deletion(-) commit dc5bc6a9fed4a1ebca0e461ff9d5bc8ce471f7b9 Author: Sagi Grimberg Date: Thu May 4 13:33:07 2017 +0300 nvme-rdma: Make queue flags bit numbers and not shifts bitops accept bit numbers. Reported-by: Vijay Immanuel Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3dee63c7d9bf332614e87ef75aad57d6ee7f284e Author: Sagi Grimberg Date: Thu May 4 13:33:06 2017 +0300 nvme-rdma: get rid of unused ctrl lock Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 4 ---- 1 file changed, 4 deletions(-) commit a29001c53aae614f01a0fccd258ed616c9321cda Author: Sagi Grimberg Date: Thu May 4 13:33:05 2017 +0300 nvme-loop: get rid of unused controller lock Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/loop.c | 3 --- 1 file changed, 3 deletions(-) commit 87ad72a59a38d1df217cfd95bc222a2edfe5d399 Author: Christoph Hellwig Date: Fri May 12 17:02:58 2017 +0200 nvme-pci: implement host memory buffer support If a controller supports the host memory buffer we try to provide it with the requested size up to an upper cap set as a module parameter. We try to give as few as possible descriptors, eventually working our way down. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn drivers/nvme/host/pci.c | 189 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 187 insertions(+), 2 deletions(-) commit bb408dd2b2b040f7e483c21ed69353e80d890329 Author: Ville Syrjälä Date: Thu Jun 1 17:36:15 2017 +0300 drm/i915: Use a loop for the "three times for luck" DPLL procedure The magic "enable the DPLL three times" sequence feels like it deserves a loop. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Reviewed-by: Chris Wilson Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 43240bbd871e2c8f89584d369278a3d18680d9ea Author: Dmitry Osipenko Date: Thu Jun 15 02:18:43 2017 +0300 gpu: host1x: At first try a non-blocking allocation for the gather copy The blocking gather copy allocation is a major performance downside of the Host1x firewall, it may take hundreds milliseconds which is unacceptable for the real-time graphics operations. Let's try a non-blocking allocation first as a least invasive solution, it makes opentegra (Xorg driver) performance indistinguishable with/without the firewall. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Signed-off-by: Thierry Reding drivers/gpu/host1x/job.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 8474b02531c4881a762c52ef869c52429e38633f Author: Mikko Perttunen Date: Thu Jun 15 02:18:42 2017 +0300 gpu: host1x: Refactor channel allocation code This is largely a rewrite of the Host1x channel allocation code, bringing several changes: - The previous code could deadlock due to an interaction between the 'reflock' mutex and CDMA timeout handling. This gets rid of the mutex. - Support for more than 32 channels, required for Tegra186 - General refactoring, including better encapsulation of channel ownership handling into channel.c Signed-off-by: Mikko Perttunen Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/gr2d.c | 4 +- drivers/gpu/drm/tegra/gr3d.c | 4 +- drivers/gpu/drm/tegra/vic.c | 4 +- drivers/gpu/host1x/channel.c | 147 +++++++++++++++++++++++-------------- drivers/gpu/host1x/channel.h | 21 ++++-- drivers/gpu/host1x/debug.c | 47 +++++------- drivers/gpu/host1x/dev.c | 7 +- drivers/gpu/host1x/dev.h | 6 +- drivers/gpu/host1x/hw/channel_hw.c | 4 - include/linux/host1x.h | 1 - 10 files changed, 135 insertions(+), 110 deletions(-) commit 03f0de770eda7a3f2e3950ca9f15d73e1dfd4596 Author: Dmitry Osipenko Date: Thu Jun 15 02:18:41 2017 +0300 gpu: host1x: Remove unused host1x_cdma_stop() definition There is no host1x_cdma_stop() in the code, let's remove its definition from the header file. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/cdma.h | 1 - 1 file changed, 1 deletion(-) commit 03ebcaa3de198655ff57197eeabb3958c0d4b73e Author: Dmitry Osipenko Date: Thu Jun 15 02:18:40 2017 +0300 gpu: host1x: Remove unused 'struct host1x_cmdbuf' The struct host1x_cmdbuf is unused, let's remove it. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/job.h | 7 ------- 1 file changed, 7 deletions(-) commit a47ac10e6e628740dd122d650afd193941f4770b Author: Dmitry Osipenko Date: Thu Jun 15 02:18:39 2017 +0300 gpu: host1x: Check waits in the firewall Check waits in the firewall in a way it is done for relocations. Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttunen Reviewed-by: Erik Faye-Lund Signed-off-by: Thierry Reding drivers/gpu/host1x/job.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit a2b78b0d53f0808ebc2a0368b589a5cb6b672294 Author: Dmitry Osipenko Date: Thu Jun 15 02:18:38 2017 +0300 gpu: host1x: Correct swapped arguments in the is_addr_reg() definition Arguments of the .is_addr_reg() are swapped in the definition of the function, that is quite confusing. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding include/linux/host1x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da1d0e265535634bba80d44510b864c620549bee Author: Ville Syrjälä Date: Thu Jun 1 17:36:14 2017 +0300 drm/i915: Plumb the correct acquire ctx into intel_crtc_disable_noatomic() If intel_crtc_disable_noatomic() were to ever get called during resume we'd end up deadlocking since resume has its own acqcuire_ctx but intel_crtc_disable_noatomic() still tries to use the mode_config.acquire_ctx. Pass down the correct acquire ctx from the top. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Fixes: e2c8b8701e2d ("drm/i915: Use atomic helpers for suspend, v2.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-3-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0f563a4bf66e5182f0882efee398f7e6bc0bb1be Author: Dmitry Osipenko Date: Thu Jun 15 02:18:37 2017 +0300 gpu: host1x: Forbid unrelated SETCLASS opcode in the firewall Several channels could be made to write the same unit concurrently via the SETCLASS opcode, trusting userspace is a bad idea. It should be possible to drop the per-client channel reservation and add a per-unit locking by inserting MLOCK's to the command stream to re-allow the SETCLASS opcode, but it will be much more work. Let's forbid the unit-unrelated class changes for now. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 1 + drivers/gpu/drm/tegra/drm.h | 1 + drivers/gpu/drm/tegra/gr2d.c | 7 +++++++ drivers/gpu/host1x/job.c | 24 ++++++++++++++++++++---- include/linux/host1x.h | 3 +++ 5 files changed, 32 insertions(+), 4 deletions(-) commit ef81624994845a50e90c6a0ff57f17d1c96bff78 Author: Dmitry Osipenko Date: Thu Jun 15 02:18:36 2017 +0300 gpu: host1x: Forbid RESTART opcode in the firewall The RESTART opcode terminates the gather and restarts the CDMA fetching from a specified word << 2 relative to the CDMA start address. That shouldn't be allowed to be done by userspace. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/job.c | 1 - 1 file changed, 1 deletion(-) commit 571cbf70c117664d142b34fa2b3b915d8374a327 Author: Dmitry Osipenko Date: Thu Jun 15 02:18:35 2017 +0300 gpu: host1x: Forbid relocation address shifting in the firewall Incorrectly shifted relocation address will cause a lower memory corruption and likely a hang on a write or a read of an arbitrary data in case of IOMMU absence. As of now, there is no known use for the address shifting and adding a proper shifts / sizes validation is a much more work. Let's forbid shifts in the firewall till a proper validation is implemented. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/job.c | 4 ++++ 1 file changed, 4 insertions(+) commit 47f89c10ddc439638bc0ea51a7f9872e1b7734ce Author: Dmitry Osipenko Date: Thu Jun 15 02:18:34 2017 +0300 gpu: host1x: Do not leak BO's phys address to userspace Perform gathers coping before patching them, so that original gathers are left untouched. That's not as bad as leaking kernel addresses, but still doesn't feel right. Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/job.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) commit e5855aa3e681bc417165604212c061e1c4b7cbda Author: Dmitry Osipenko Date: Thu Jun 15 02:18:33 2017 +0300 gpu: host1x: Correct host1x_job_pin() error handling In case of relocations / waitchecks patching failure the jobs pins stay referenced till DRM file get closed, wasting memory. Add the missed unpinning. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/job.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 3833d16f1677e19098eb8cc0f0a54f6e209406f4 Author: Dmitry Osipenko Date: Thu Jun 15 02:18:32 2017 +0300 gpu: host1x: Initialize firewall class to the job's one The commands stream is prepended by the jobs class on the CDMA submission, so that explicitly setting a module class in the commands stream isn't necessary. The firewall initializes its class to 0 and the command stream that doesn't explicitly specify the class effectively bypasses the firewall. Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttunen Reviewed-by: Erik Faye-Lund Signed-off-by: Thierry Reding drivers/gpu/host1x/job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80d3eef16e16912df967a083da237d56dc4493b8 Author: Dmitry Osipenko Date: Thu Jun 15 02:18:31 2017 +0300 drm/tegra: dc: Disable plane if it is invisible On Tegra20 if plane has width or height equal to 0, it will be infinitely wide or tall. Let's disable the plane if it is invisible on atomic state committing to fix the issue. The Rockchip DRM driver does the same. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) commit 7d2058571aafad239e7f1a3c04a830c6ec6a426f Author: Dmitry Osipenko Date: Thu Jun 15 02:18:30 2017 +0300 drm/tegra: dc: Apply clipping to the plane On Tegra20 an overlay plane should be clipped, otherwise its output is distorted once plane crosses display boundary. Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit aecd36b8a16b2302b33f49ba3fa24c955f1e32f7 Author: Ville Syrjälä Date: Thu Jun 1 17:36:13 2017 +0300 drm/i915: Fix deadlock witha the pipe A quirk during resume Pass down the correct acquire context to the pipe A quirk load detect hack during display resume. Avoids deadlocking the entire thing. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Fixes: e2c8b8701e2d ("drm/i915: Use atomic helpers for suspend, v2.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 6ac1571b4c60cb73a1f174b15ea93f7e38d74a88 Author: Dmitry Osipenko Date: Thu Jun 15 02:18:29 2017 +0300 drm/tegra: dc: Avoid reset asserts on Tegra20 Commit 33a8eb8d40ee ("drm/tegra: dc: Implement runtime PM") introduced HW reset control. It causes a hang on Tegra20 if both display controllers are utilized (RGB panel and HDMI). The TRM suggests that each display controller has its own reset control, apparently it is not correct. Fixes: 33a8eb8d40ee ("drm/tegra: dc: Implement runtime PM") Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit e0b2ce02108498e41e8956d29ea4c27f16dbf9e0 Author: Dmitry Osipenko Date: Thu Jun 15 02:18:28 2017 +0300 drm/tegra: Check syncpoint ID in the 'submit' IOCTL In case of invalid syncpoint ID, the host1x_syncpt_get() returns NULL and none of its users perform a check of the returned pointer later. Let's bail out until it's too late. Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d0fbbdff2e19aabccc1107b7e12ab9f3cbf626ef Author: Dmitry Osipenko Date: Thu Jun 15 02:18:27 2017 +0300 drm/tegra: Correct copying of waitchecks and disable them in the 'submit' IOCTL The waitchecks along with multiple syncpoints per submit are not ready for use yet, let's forbid them for now. Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 60 ++++++++++++++++++++++++++++++++++++++++++--- drivers/gpu/host1x/job.h | 7 ------ include/linux/host1x.h | 7 ++++++ 3 files changed, 63 insertions(+), 11 deletions(-) commit 368f622c0d76a22662af33759be8c4408819295d Author: Dmitry Osipenko Date: Thu Jun 15 02:18:26 2017 +0300 drm/tegra: Check for malformed offsets and sizes in the 'submit' IOCTL If commands buffer claims a number of words that is higher than its BO can fit, a kernel OOPS will be fired on the out-of-bounds BO access. This was triggered by an opentegra Xorg driver that erroneously pushed too many commands to the pushbuf. The CDMA commands buffer address is 4 bytes aligned, so check its alignment. The maximum number of the CDMA gather fetches is 16383, add a check for it. Add a sanity check for the relocations in a same way. [ 46.829393] Unable to handle kernel paging request at virtual address f09b2000 ... [] (host1x_job_pin) from [] (tegra_drm_submit+0x474/0x510) [] (tegra_drm_submit) from [] (tegra_submit+0x50/0x6c) [] (tegra_submit) from [] (drm_ioctl+0x1e4/0x3ec) [] (drm_ioctl) from [] (do_vfs_ioctl+0x9c/0x8e4) [] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c) [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c) Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 49 +++++++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/tegra/gem.c | 5 ----- drivers/gpu/drm/tegra/gem.h | 5 +++++ 3 files changed, 54 insertions(+), 5 deletions(-) commit fa6d095eb23a8b1aae78d221879032497f6e457f Author: Thierry Reding Date: Mon Apr 10 12:27:02 2017 +0200 drm/tegra: Add driver documentation Adds some driver documentation for Tegra. It provides a short overview of the hardware and software architectures. Signed-off-by: Thierry Reding Acked-by: Daniel Vetter Signed-off-by: Thierry Reding Documentation/gpu/index.rst | 1 + Documentation/gpu/tegra.rst | 178 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) commit 466749f13e33d892cf9263d7efbc0ea713c23ed7 Author: Thierry Reding Date: Mon Apr 10 12:27:01 2017 +0200 gpu: host1x: Flesh out kerneldoc Improve kerneldoc for the public parts of the host1x infrastructure in preparation for adding driver-specific part to the GPU documentation. Acked-by: Daniel Vetter Signed-off-by: Thierry Reding drivers/gpu/host1x/bus.c | 75 +++++++++++++++++++++++++++++++++++++++++ drivers/gpu/host1x/syncpt.c | 81 +++++++++++++++++++++++++++++++++++++++------ include/linux/host1x.h | 25 ++++++++++++++ 3 files changed, 170 insertions(+), 11 deletions(-) commit e27c7fa015d61c8be6a2c32b2144aad2ae6ec975 Author: Dustin Brown Date: Tue Jun 13 11:40:56 2017 -0700 arm64: Export save_stack_trace_tsk() The kernel watchdog is a great debugging tool for finding tasks that consume a disproportionate amount of CPU time in contiguous chunks. One can imagine building a similar watchdog for arbitrary driver threads using save_stack_trace_tsk() and print_stack_trace(). However, this is not viable for dynamically loaded driver modules on ARM platforms because save_stack_trace_tsk() is not exported for those architectures. Export save_stack_trace_tsk() for the ARM64 architecture to align with x86 and support various debugging use cases such as arbitrary driver thread watchdog timers. Signed-off-by: Dustin Brown Signed-off-by: Will Deacon arch/arm64/kernel/stacktrace.c | 1 + 1 file changed, 1 insertion(+) commit e6db6089abc83ddfad7537aa14ead97ba857300d Author: Xiaowei Song Date: Thu Jun 15 11:04:11 2017 +0800 dt-bindings: PCI: hisi: Add document for PCIe of Kirin SoCs This patch adds document for PCIe of Kirin SoC series. Signed-off-by: Xiaowei Song Acked-by: Rob Herring Signed-off-by: Wei Xu .../devicetree/bindings/pci/kirin-pcie.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 751963306757e2d90d0d3946862eec38cbadd75b Author: Leo Yan Date: Thu Jun 15 11:04:10 2017 +0800 arm64: dts: hi3660: add sp804 timer node The Hi3660 SoC comes with the sp804 timer in addition to the architecture timers. These ones are shutdown when reaching a deep idle states and a backup timer is needed. The sp804 belongs to another power domain and can fulfill the purpose of replacing temporarily an architecture timer when the CPU is idle. Describe it in the device tree, so it can be enabled at boot time. Suggested-by: Daniel Lezcano Acked-by: Daniel Lezcano Signed-off-by: Leo Yan Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 388104979b66099d9003eafe3da3fc54466b7be9 Author: Wang Xiaoyin Date: Thu Jun 15 11:04:09 2017 +0800 arm64: dts: hi3660: add spi device nodes Add spi2 and spi3 device nodes for hi3660, and enable them for hikey960. On HiKey960: - SPI2 is wired out through low speed expansion connector. - SPI3 is wired out through high speed expansion connector. Signed-off-by: Wang Xiaoyin Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 12 +++++++++ arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 30 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit fc5f2ed62bf5faa32db385f6360d7c2cec33c2c7 Author: Guodong Xu Date: Thu Jun 15 11:04:08 2017 +0800 arm64: dts: hikey960: add LED nodes HiKey960 has four user LEDs, and two special purpose LEDs: WiFi and BT respectively. All of them are implemented as GPIO. Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 8cb53a8d18fd548c2eac0f951a43d840bcd5f54c Author: Chen Jun Date: Thu Jun 15 11:04:07 2017 +0800 arm64: dts: hi3660: add power key dts node We use gpio_034 as power key on hikey960, and set gpio with pull-up state, when key press the voltage on the gpio will come to lower, and power key event will be reported. Signed-off-by: Chen Jun Signed-off-by: John Stultz Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 0a0698f689084261e7ea9e6639b1ac42291a2d9f Author: Chen Feng Date: Thu Jun 15 11:04:06 2017 +0800 arm64: dts: hi3660: Add pl031 rtc node Add dts node to enable pl031 rtc. Signed-off-by: Chen Feng Acked-by: Rob Herring Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2e9b4447db425bf0e015ea8c04e26d65dd0a1249 Author: Guodong Xu Date: Thu Jun 15 11:04:05 2017 +0800 arm64: dts: hikey960: add WL1837 Bluetooth device node This adds the serial slave device for the WL1837 Bluetooth interface. Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 254b07b2a24c17282e9b69bd253bdb8c73914ea4 Author: Chen Feng Date: Thu Jun 15 11:04:04 2017 +0800 arm64: dts: hi3660: Add uarts nodes Add nodes uart0 to uart4 and uart6 for hi3660 SoC. Enable uart3 and uart6, disable uart5, in hikey960 board dts. On HiKey960: - UART6 is used as default console, and is wired out through low speed expansion connector. - UART3 has RTS/CTS hardware handshake, and is wired out through low speed expansion connector. - UART5 is not used in commercial launched boards. So disable it. - UART4 is connected to Bluetooth, WL1837. Signed-off-by: Chen Feng Signed-off-by: Wang Xiaoyin Signed-off-by: Guodong Xu Reviewed-by: Zhangfei Gao Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 20 +++++- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 74 +++++++++++++++++++++++ 2 files changed, 91 insertions(+), 3 deletions(-) commit d94eab860df85289a6ded46e890f70ebbe4f4252 Author: Wang Xiaoyin Date: Thu Jun 15 11:04:03 2017 +0800 arm64: dts: hi3660: add gpio dtsi file for Hisilicon Hi3660 SOC This patch adds pl061 device nodes for Hi3660 SoC. Signed-off-by: Wang Xiaoyin Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 380 ++++++++++++++++++++++++++++++ 1 file changed, 380 insertions(+) commit 5f8a3b77a7cd4e80e2bd728718b8e1ebdd0b2c2c Author: Zhangfei Gao Date: Thu Jun 15 11:04:02 2017 +0800 arm64: dts: Add I2C nodes for Hi3660 Add I2C nodes for Hi3660-hikey960. On HiKey960, I2C0, I2C7 are connected to Low Speed Expansion Connector. I2C1 is connected to ADV7535. I2C3 is connected to USB5734. Cc: Jarkko Nikula Signed-off-by: Zhangfei Gao Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 22 +++++++++ arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 56 +++++++++++++++++++++++ 2 files changed, 78 insertions(+) commit a4e36ae0fb33b0befbe0f102e38fd0f280825d65 Author: Zhangfei Gao Date: Thu Jun 15 11:04:01 2017 +0800 arm64: dts: hi3660: add resources for clock and reset Add some resource nodes for clock and reset Signed-off-by: Zhangfei Gao Acked-by: Rob Herring Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 53 +++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 7 deletions(-) commit cc59d2a0a6946071dd7a4046b767d91209513f8f Author: Wang Xiaoyin Date: Thu Jun 15 11:04:00 2017 +0800 arm64: dts: hikey960: pinctrl: add more pinmux and pinconfig This commit adds more pinmux and pinctrl information for devices on HiKey960, including i2c, spi, cam, uart, ufs, pcie, csi, pwr_key, isp, sd/sdio, i2s, and usb. Signed-off-by: Wang Xiaoyin Signed-off-by: Chen Jun Signed-off-by: Guodong Xu Acked-by: Rob Herring Signed-off-by: Wei Xu .../arm64/boot/dts/hisilicon/hikey960-pinctrl.dtsi | 778 +++++++++++++++++++-- 1 file changed, 715 insertions(+), 63 deletions(-) commit b6c93186f144de58a1c5c8a65ee1661d3df3cf3e Author: Guodong Xu Date: Thu Jun 15 11:03:59 2017 +0800 arm64: dts: hisilicon: update compatible string for hikey960 Update compatible string for hikey960. HiKey960 is a develpment board built with SoC Hi3660. Signed-off-by: Guodong Xu Signed-off-by: Chen Feng Acked-by: Rob Herring Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cc5f4560606580261b34552abf0a7d70cc23c27 Author: Guodong Xu Date: Thu Jun 15 11:03:58 2017 +0800 dt-bindings: arm: hisilicon: add bindings for HiKey960 board Add bindings for HiKey960 Board. Signed-off-by: Guodong Xu Acked-by: Rob Herring Signed-off-by: Wei Xu Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 91e0bf81258c07aad27a4833368569ce873cd83e Author: Lorenzo Pieralisi Date: Wed Jun 14 17:37:13 2017 +0100 ACPI/IORT: Remove iort_node_match() Commit 316ca8804ea8 ("ACPI/IORT: Remove linker section for IORT entries probing") removed the linker section for IORT entries probing. Since those IORT entries were the only iort_node_match() interface users, the iort_node_match() became obsolete and can then be removed. Remove the ACPI IORT iort_node_match() interface from the kernel. Acked-by: Marc Zyngier Acked-by: Hanjun Guo Signed-off-by: Lorenzo Pieralisi Cc: Hanjun Guo Signed-off-by: Will Deacon drivers/acpi/arm64/iort.c | 15 --------------- include/linux/acpi_iort.h | 2 -- 2 files changed, 17 deletions(-) commit c6bb8f89fa6df7a8d62bad2f66063b4b7433ea59 Author: Lorenzo Pieralisi Date: Wed Jun 14 17:37:12 2017 +0100 ARM64/irqchip: Update ACPI_IORT symbol selection logic ACPI IORT is an ACPI addendum to describe the connection topology of devices with IOMMUs and interrupt controllers on ARM64 ACPI systems. Currently the ACPI IORT Kbuild symbol is selected whenever the Kbuild symbol ARM_GIC_V3_ITS is enabled, which in turn is selected by ARM64 Kbuild defaults. This makes the logic behind ACPI_IORT selection a bit twisted and not easy to follow. On ARM64 systems enabling ACPI the kbuild symbol ACPI_IORT should always be selected in that it is a kernel layer provided to the ARM64 arch code to parse and enable ACPI firmware bindings. Make the ACPI_IORT selection explicit in ARM64 Kbuild and remove the selection from ARM_GIC_V3_ITS entry, making the ACPI_IORT selection logic clearer to follow. Acked-by: Hanjun Guo Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Catalin Marinas Cc: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + drivers/irqchip/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 577dfe16b852a90f26cf677cdc9113ec34199de6 Author: Olav Haugan Date: Tue Jun 13 13:56:14 2017 -0700 arm64/dma-mapping: Remove extraneous null-pointer checks The current null-pointer check in __dma_alloc_coherent and __dma_free_coherent is not needed anymore since the __dma_alloc/__dma_free functions won't be called if !dev (dummy ops will be called instead). Reviewed-by: Catalin Marinas Signed-off-by: Olav Haugan Signed-off-by: Will Deacon arch/arm64/include/asm/dma-mapping.h | 2 -- arch/arm64/mm/dma-mapping.c | 9 --------- 2 files changed, 11 deletions(-) commit bddb9b68d3fb0dfbd75715bce6160c40d4dae233 Author: Mark Rutland Date: Tue Jun 13 13:45:51 2017 +0100 drivers/perf: commonise PERF_EVENTS dependency All PMU drivers are going to depend on PERF_EVENTS, so let's make this dependency common and simplify the individual Kconfig entries. Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d5f7b828ffab28e5684913e76697e94e2442d164 Author: Arvind Yadav Date: Thu Jun 15 14:55:37 2017 +0530 arm: perf: make of_device_ids const of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Will Deacon arch/arm/kernel/perf_event_v6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c45cec48e5871f93e56650f7e476d4ea7174a0e Author: Chris Wilson Date: Thu Jun 15 09:14:35 2017 +0100 drm/i915: Split vma exec_link/evict_link Currently the vma has one link member that is used for both holding its place in the execbuf reservation list, and in any eviction list. This dual property is quite tricky and error prone. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170615081435.17699-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_evict.c | 14 ++++++------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 32 +++++++++++++++--------------- drivers/gpu/drm/i915/i915_vma.h | 7 +++++-- 3 files changed, 28 insertions(+), 25 deletions(-) commit d55495b4dcce2efb4656edfe211eb0bfb27c3387 Author: Chris Wilson Date: Thu Jun 15 09:14:34 2017 +0100 drm/i915: Use vma->exec_entry as our double-entry placeholder This has the benefit of not requiring us to manipulate the vma->exec_link list when tearing down the execbuffer, and is a marginally cheaper test to detect the user error. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170615081435.17699-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_evict.c | 17 ++----- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 77 ++++++++++++++++-------------- drivers/gpu/drm/i915/i915_vma.c | 1 - 3 files changed, 44 insertions(+), 51 deletions(-) commit 650bc63568e4218508f206c14af92b5a3f77504f Author: Chris Wilson Date: Thu Jun 15 09:14:33 2017 +0100 drm/i915: Amalgamate execbuffer parameter structures Combine the two slightly overlapping parameter structures we pass around the execbuffer routines into one. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170615081435.17699-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 549 ++++++++++++----------------- 1 file changed, 232 insertions(+), 317 deletions(-) commit c3a3d3c41b74b05267bab6173f2a8224a1443ba6 Author: Christophe Jaillet Date: Thu Jun 15 07:53:11 2017 +0200 ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe' If this memory allocation fail, we must disable what has been enabled. Do not return immediately but go thrue the error handling path instead. Also use 'devm_kmemdup' instead of 'devm_kzalloc+memcpy' to simplify code. Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 02d50cdaff36c135d222015cffdca3ff11d168ea Author: Hu Huajun Date: Mon Jun 12 22:37:48 2017 +0800 KVM: ARM64: fix phy counter access failure in guest. When reading the cntpct_el0 in guest with VHE (Virtual Host Extension) enabled in host, the "Unsupported guest sys_reg access" error reported. The reason is cnthctl_el2.EL1PCTEN is not enabled, which is expected to be done in kvm_timer_init_vhe(). The problem is kvm_timer_init_vhe is called by cpu_init_hyp_mode, and which is called when VHE is disabled. This patch remove the incorrect call to kvm_timer_init_vhe() from cpu_init_hyp_mode(), and calls kvm_timer_init_vhe() to enable cnthctl_el2.EL1PCTEN in cpu_hyp_reinit(). Fixes: 488f94d7212b ("KVM: arm64: Access CNTHCTL_EL2 bit fields correctly on VHE systems") Cc: stable@vger.kernel.org Signed-off-by: Hu Huajun Reviewed-by: Christoffer Dall Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/arm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0959db6c0b069739ffedf3f6b97644213df586d4 Author: Mark Rutland Date: Mon Jun 5 14:20:01 2017 +0100 arm64/kvm: vgic: use SYS_DESC() Almost all of the arm64 KVM code uses the sysreg mnemonics for AArch64 register descriptions. Move the last straggler over. To match what we do for SYS_ICH_AP*R*_EL2, the SYS_ICC_AP*R*_EL1 mnemonics are expanded in . Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu Acked-by: Christoffer Dall Acked-by: Will Deacon Signed-off-by: Christoffer Dall arch/arm64/include/asm/sysreg.h | 8 +++++++ arch/arm64/kvm/vgic-sys-reg-v3.c | 45 ++++++++++++++-------------------------- 2 files changed, 23 insertions(+), 30 deletions(-) commit 21bc52817772a5af6a8a5a750c676ea4a02d4d3b Author: Mark Rutland Date: Mon Jun 5 14:20:00 2017 +0100 arm64/kvm: sysreg: fix typo'd SYS_ICC_IGRPEN*_EL1 Per ARM DDI 0487B.a, the registers are named ICC_IGRPEN*_EL1 rather than ICC_GRPEN*_EL1. Correct our mnemonics and comments to match, before we add more GICv3 register definitions. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu Acked-by: Christoffer Dall Acked-by: Will Deacon Signed-off-by: Christoffer Dall arch/arm64/include/asm/arch_gicv3.h | 2 +- arch/arm64/include/asm/sysreg.h | 4 ++-- arch/arm64/kvm/vgic-sys-reg-v3.c | 2 +- virt/kvm/arm/hyp/vgic-v3-sr.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit 7b1dba1f7325629427c0e5bdf014159b229d16c8 Author: Marc Zyngier Date: Fri Jun 9 12:49:56 2017 +0100 KVM: arm64: Log an error if trapping a write-to-read-only GICv3 access A write-to-read-only GICv3 access should UNDEF at EL1. But since we're in complete paranoia-land with broken CPUs, let's assume the worse and gracefully handle the case. Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm64/kvm/sys_regs.c | 15 +++++++++++++++ virt/kvm/arm/hyp/vgic-v3-sr.c | 6 ++++++ 2 files changed, 21 insertions(+) commit e7f1d1eef482150a64a6e6ad8faf40f8f97eed67 Author: Marc Zyngier Date: Fri Jun 9 12:49:55 2017 +0100 KVM: arm64: Log an error if trapping a read-from-write-only GICv3 access A read-from-write-only GICv3 access should UNDEF at EL1. But since we're in complete paranoia-land with broken CPUs, let's assume the worse and gracefully handle the case. Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm64/kvm/sys_regs.c | 12 ++++++++---- virt/kvm/arm/hyp/vgic-v3-sr.c | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) commit 2873b5082c5fbe2037f12e8d2abc8ad8f8d82a1b Author: Marc Zyngier Date: Fri Jun 9 12:49:54 2017 +0100 KVM: arm64: vgic-v3: Log which GICv3 system registers are trapped In order to facilitate debug, let's log which class of GICv3 system registers are trapped. Tested-by: Alexander Graf Acked-by: David Daney Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ff89511ef29b794d6a9c6b62f5ea76fc013cdae7 Author: Marc Zyngier Date: Fri Jun 9 12:49:53 2017 +0100 KVM: arm64: Enable GICv3 common sysreg trapping via command-line Now that we're able to safely handle common sysreg access, let's give the user the opportunity to enable it by passing a specific command-line option (vgic_v3.common_trap). Tested-by: Alexander Graf Acked-by: David Daney Signed-off-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall Documentation/admin-guide/kernel-parameters.txt | 4 ++++ include/linux/irqchip/arm-gic-v3.h | 1 + virt/kvm/arm/vgic/vgic-v3.c | 11 ++++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) commit 6293d6514d6b0945210e15edcecc71d99cfca97c Author: Marc Zyngier Date: Fri Jun 9 12:49:52 2017 +0100 KVM: arm64: vgic-v3: Add ICV_PMR_EL1 handler Add a handler for reading/writing the guest's view of the ICC_PMR_EL1 register, which is located in the ICH_VMCR_EL2.VPMR field. Tested-by: Alexander Graf Acked-by: David Daney Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v3-sr.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit d840b2d37d3ef2463db38274c6fd72619acbe216 Author: Marc Zyngier Date: Fri Jun 9 12:49:51 2017 +0100 KVM: arm64: vgic-v3: Add ICV_CTLR_EL1 handler Add a handler for reading/writing the guest's view of the ICV_CTLR_EL1 register. only EOIMode and CBPR are of interest here, as all the other bits directly come from ICH_VTR_EL2 and are Read-Only. Tested-by: Alexander Graf Acked-by: David Daney Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v3-sr.c | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 43515894c06f856b7743145e002591309f60b247 Author: Marc Zyngier Date: Fri Jun 9 12:49:50 2017 +0100 KVM: arm64: vgic-v3: Add ICV_RPR_EL1 handler Add a handler for reading the guest's view of the ICV_RPR_EL1 register, returning the highest active priority. Tested-by: Alexander Graf Acked-by: David Daney Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/sysreg.h | 1 + virt/kvm/arm/hyp/vgic-v3-sr.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 40228ba57c8532d4977d684a363915402d85dbf9 Author: Marc Zyngier Date: Fri Jun 9 12:49:49 2017 +0100 KVM: arm64: vgic-v3: Add ICV_DIR_EL1 handler Add a handler for writing the guest's view of the ICC_DIR_EL1 register, performing the deactivation of an interrupt if EOImode is set ot 1. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v3-sr.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 690a341577f9adf2c275ababe0dcefe91898bbf0 Author: David Daney Date: Fri Jun 9 12:49:48 2017 +0100 arm64: Add workaround for Cavium Thunder erratum 30115 Some Cavium Thunder CPUs suffer a problem where a KVM guest may inadvertently cause the host kernel to quit receiving interrupts. Use the Group-0/1 trapping in order to deal with it. [maz]: Adapted patch to the Group-0/1 trapping, reworked commit log Tested-by: Alexander Graf Acked-by: Catalin Marinas Reviewed-by: Eric Auger Signed-off-by: David Daney Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/Kconfig | 11 +++++++++++ arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/kernel/cpu_errata.c | 21 +++++++++++++++++++++ virt/kvm/arm/vgic/vgic-v3.c | 7 +++++++ 5 files changed, 42 insertions(+), 1 deletion(-) commit e982276d8f5c974b838fb22ba8d592feb039a544 Author: David Daney Date: Fri Jun 9 12:49:47 2017 +0100 arm64: Add MIDR values for Cavium cn83XX SoCs Tested-by: Alexander Graf Acked-by: David Daney Acked-by: Catalin Marinas Reviewed-by: Eric Auger Signed-off-by: David Daney Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/cputype.h | 2 ++ 1 file changed, 2 insertions(+) commit e23f62f76acea232d4def5d4eb21709a2b575f14 Author: Marc Zyngier Date: Fri Jun 9 12:49:46 2017 +0100 KVM: arm64: Enable GICv3 Group-0 sysreg trapping via command-line Now that we're able to safely handle Group-0 sysreg access, let's give the user the opportunity to enable it by passing a specific command-line option (vgic_v3.group0_trap). Tested-by: Alexander Graf Acked-by: David Daney Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall Documentation/admin-guide/kernel-parameters.txt | 4 ++++ virt/kvm/arm/vgic/vgic-v3.c | 6 ++++++ 2 files changed, 10 insertions(+) commit abf55766f7b062234083ff612446ff8d47e2417e Author: Marc Zyngier Date: Fri Jun 9 12:49:45 2017 +0100 KVM: arm64: vgic-v3: Enable trapping of Group-0 system registers In order to be able to trap Group-0 GICv3 system registers, we need to set ICH_HCR_EL2.TALL0 begore entering the guest. This is conditionnaly done after having restored the guest's state, and cleared on exit. Tested-by: Alexander Graf Acked-by: David Daney Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall include/linux/irqchip/arm-gic-v3.h | 1 + virt/kvm/arm/vgic/vgic-v3.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit eab0b2dc4f6f34147e3d10da49ab8032e15dbea0 Author: Marc Zyngier Date: Fri Jun 9 12:49:44 2017 +0100 KVM: arm64: vgic-v3: Add misc Group-0 handlers A number of Group-0 registers can be handled by the same accessors as that of Group-1, so let's add the required system register encodings and catch them in the dispatching function. Tested-by: Alexander Graf Acked-by: David Daney Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/sysreg.h | 4 ++++ virt/kvm/arm/hyp/vgic-v3-sr.c | 7 +++++++ 2 files changed, 11 insertions(+) commit fbc48a0011deb3d51cb657ca9c0f9083f41c0665 Author: Marc Zyngier Date: Fri Jun 9 12:49:43 2017 +0100 KVM: arm64: vgic-v3: Add ICV_IGNREN0_EL1 handler Add a handler for reading/writing the guest's view of the ICC_IGRPEN0_EL1 register, which is located in the ICH_VMCR_EL2.VENG0 field. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/sysreg.h | 1 + virt/kvm/arm/hyp/vgic-v3-sr.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 423de85a98c2b50715a0784a74f6124fbc0b1548 Author: Marc Zyngier Date: Fri Jun 9 12:49:42 2017 +0100 KVM: arm64: vgic-v3: Add ICV_BPR0_EL1 handler Add a handler for reading/writing the guest's view of the ICC_BPR0_EL1 register, which is located in the ICH_VMCR_EL2.BPR0 field. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm64/include/asm/sysreg.h | 1 + virt/kvm/arm/hyp/vgic-v3-sr.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 182936eee7e6b1956881b51bc534a541dc71a101 Author: Marc Zyngier Date: Fri Jun 9 12:49:41 2017 +0100 KVM: arm64: Enable GICv3 Group-1 sysreg trapping via command-line Now that we're able to safely handle Group-1 sysreg access, let's give the user the opportunity to enable it by passing a specific command-line option (vgic_v3.group1_trap). Tested-by: Alexander Graf Acked-by: David Daney Signed-off-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall Documentation/admin-guide/kernel-parameters.txt | 4 ++++ virt/kvm/arm/vgic/vgic-v3.c | 11 +++++++++++ 2 files changed, 15 insertions(+) commit 9c7bfc288c71068ab323b802dba2eb87fd08b127 Author: Marc Zyngier Date: Fri Jun 9 12:49:40 2017 +0100 KVM: arm64: vgic-v3: Enable trapping of Group-1 system registers In order to be able to trap Group-1 GICv3 system registers, we need to set ICH_HCR_EL2.TALL1 before entering the guest. This is conditionally done after having restored the guest's state, and cleared on exit. Tested-by: Alexander Graf Acked-by: David Daney Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall include/linux/irqchip/arm-gic-v3.h | 1 + virt/kvm/arm/hyp/vgic-v3-sr.c | 11 +++++++++++ virt/kvm/arm/vgic/vgic-v3.c | 4 ++++ 3 files changed, 16 insertions(+) commit 2724c11a1df4b22ee966c04809ea0e808f66b04e Author: Marc Zyngier Date: Fri Jun 9 12:49:39 2017 +0100 KVM: arm64: vgic-v3: Add ICV_HPPIR1_EL1 handler Add a handler for reading the guest's view of the ICV_HPPIR1_EL1 register. This is a simple parsing of the available LRs, extracting the highest available interrupt. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm64/include/asm/sysreg.h | 1 + virt/kvm/arm/hyp/vgic-v3-sr.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit f9e7449c780f688bf61a13dfa8c344afeb4ad6e0 Author: Marc Zyngier Date: Fri Jun 9 12:49:38 2017 +0100 KVM: arm64: vgic-v3: Add ICV_AP1Rn_EL1 handler Add a handler for reading/writing the guest's view of the ICV_AP1Rn_EL1 registers. We just map them to the corresponding ICH_AP1Rn_EL2 registers. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/sysreg.h | 1 + virt/kvm/arm/hyp/vgic-v3-sr.c | 94 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) commit b6f49035b4bf6e2709f2a5fed3107f5438c1fd02 Author: Marc Zyngier Date: Fri Jun 9 12:49:37 2017 +0100 KVM: arm64: vgic-v3: Add ICV_EOIR1_EL1 handler Add a handler for writing the guest's view of the ICC_EOIR1_EL1 register. This involves dropping the priority of the interrupt, and deactivating it if required (EOImode == 0). Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall include/linux/irqchip/arm-gic-v3.h | 2 + virt/kvm/arm/hyp/vgic-v3-sr.c | 120 +++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) commit 132a324ab62fe4fb8d6dcc2ab4eddb0e93b69afe Author: Marc Zyngier Date: Fri Jun 9 12:49:36 2017 +0100 KVM: arm64: vgic-v3: Add ICV_IAR1_EL1 handler Add a handler for reading the guest's view of the ICC_IAR1_EL1 register. This involves finding the highest priority Group-1 interrupt, checking against both PMR and the active group priority, activating the interrupt and setting the group priority as active. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall include/linux/irqchip/arm-gic-v3.h | 1 + virt/kvm/arm/hyp/vgic-v3-sr.c | 163 +++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) commit f8b630bc542e0368886ae193d3519c832b270359 Author: Marc Zyngier Date: Fri Jun 9 12:49:35 2017 +0100 KVM: arm64: vgic-v3: Add ICV_IGRPEN1_EL1 handler Add a handler for reading/writing the guest's view of the ICC_IGRPEN1_EL1 register, which is located in the ICH_VMCR_EL2.VENG1 field. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v3-sr.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit d70c7b31a60f2458f35c226131f2a01a7a98b6cf Author: Marc Zyngier Date: Fri Jun 9 12:49:34 2017 +0100 KVM: arm64: vgic-v3: Add ICV_BPR1_EL1 handler Add a handler for reading/writing the guest's view of the ICC_BPR1_EL1 register, which is located in the ICH_VMCR_EL2.BPR1 field. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v3-sr.c | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 59da1cbfd840d69bd7a310249924da3fc202c417 Author: Marc Zyngier Date: Fri Jun 9 12:49:33 2017 +0100 KVM: arm64: vgic-v3: Add hook to handle guest GICv3 sysreg accesses at EL2 In order to start handling guest access to GICv3 system registers, let's add a hook that will get called when we trap a system register access. This is gated by a new static key (vgic_v3_cpuif_trap). Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_hyp.h | 1 + arch/arm64/kvm/hyp/switch.c | 14 ++++++++++++++ include/kvm/arm_vgic.h | 1 + virt/kvm/arm/hyp/vgic-v3-sr.c | 38 ++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-v3.c | 2 ++ 5 files changed, 56 insertions(+) commit 021234ef3752f853704ef1919e8ff33173aca093 Author: Marc Zyngier Date: Fri Jun 9 12:49:32 2017 +0100 KVM: arm64: Make kvm_condition_valid32() accessible from EL2 As we're about to trap CP15 accesses and handle them at EL2, we need to evaluate whether or not the condition flags are valid, as an implementation is allowed to trap despite the condition not being met. Tagging the function as __hyp_text allows this. We still rely on the cc_map array to be mapped at EL2 by virtue of being "const", and the linker to only emit relative references. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/aarch32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63000dd8006dc987db31ba670edc23142ea91e01 Author: Marc Zyngier Date: Fri Jun 9 12:49:31 2017 +0100 KVM: arm/arm64: vgic-v3: Add accessors for the ICH_APxRn_EL2 registers As we're about to access the Active Priority registers a lot more, let's define accessors that take the register number as a parameter. Tested-by: Alexander Graf Acked-by: David Daney Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v3-sr.c | 116 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 100 insertions(+), 16 deletions(-) commit d251f67a187c987b391751849c266e44d69bd31c Author: Marc Zyngier Date: Fri Jun 9 12:49:30 2017 +0100 arm64: Add a facility to turn an ESR syndrome into a sysreg encoding It is often useful to compare an ESR syndrome reporting the trapping of a system register with a value matching that system register. Since encoding both the sysreg and the ESR version seem to be a bit overkill, let's add a set of macros that convert an ESR value into the corresponding sysreg encoding. We handle both AArch32 and AArch64, taking advantage of identical encodings between system registers and CP15 accessors. Tested-by: Alexander Graf Acked-by: David Daney Acked-by: Mark Rutland Acked-by: Catalin Marinas Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/esr.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 6f2f10cabe73944488a62df16695c86e20d4c3f9 Merge: ebb127f 33b5c38 Author: Marc Zyngier Date: Thu Jun 15 09:35:15 2017 +0100 Merge branch 'kvmarm-master/master' into HEAD commit fc443138304e31c05df688ee6e318a6ac57d53f2 Author: Tony Lindgren Date: Wed Jun 14 21:41:08 2017 -0700 power: supply: cpcap-charger: Add missing power_supply_config Otherwise cpcap-battery won't probe properly with the power-supplies property configured but will fail with "Not all required supplies found, defer probe". Cc: Marcel Partap Cc: Michael Scott Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/cpcap-charger.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ece7af5f787ee94ef4a8adb5cd9c40d6f475a7ba Author: Arvind Yadav Date: Mon Jun 12 16:23:31 2017 +0530 usb: dwc3: exynos: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arvind Yadav Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-exynos.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 0e1b89e54ddac207e73c9b3e0cd9d4e431509a24 Author: Arvind Yadav Date: Wed Jun 14 15:20:08 2017 +0530 usb: gadget: mv_udc: Handle return value of clk_prepare_enable. clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/mv_udc_core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1c881b5a4f84190f50b81bf22e251e00050f4fbb Author: Tero Kristo Date: Thu Feb 9 11:34:23 2017 +0200 clk: ti: omap4: add clkctrl clock data Add data for omap4 clkctrl clocks, and register it within the clkctrl driver. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/clk-44xx.c | 663 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/ti/clkctrl.c | 5 + drivers/clk/ti/clock.h | 2 + 3 files changed, 670 insertions(+) commit 70ab980fb1ace914df167fdd2bce9038020823c3 Author: Tero Kristo Date: Thu Feb 9 11:33:04 2017 +0200 dt-bindings: clk: add omap4 clkctrl definitions Contains offsets for all omap4 clkctrl main and optional clocks. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren include/dt-bindings/clock/omap4.h | 146 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) commit 88a172526c326b357eb6c19e0f90d8cf5bd4473d Author: Tero Kristo Date: Thu Feb 9 11:27:11 2017 +0200 clk: ti: add support for clkctrl clocks Previously, hwmod core has been used for controlling the hwmod level clocks directly. This has certain drawbacks, like being unable to share the clocks for multiple users, missing usecounting and generally being totally incompatible with the common clock framework. This patch adds support for clkctrl clocks for addressing the above issues. These support the modulemode handling, which will replace the direct hwmod clkctrl linkage. Any optional clocks are also supported, gate, mux and divider. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/Makefile | 3 +- drivers/clk/ti/clkctrl.c | 492 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/ti/clock.h | 29 +++ 3 files changed, 523 insertions(+), 1 deletion(-) commit 35395a9c52c8a8159178b9a96e4661f0758ede5d Author: Tony Lindgren Date: Mon Jan 23 14:17:02 2017 -0800 Documentation: dt-bindings: Add binding documentation for TI clkctrl clocks Texas Instruments omap variant SoCs starting with omap4 have a clkctrl clock controller instance for each interconnect target module. The clkctrl controls functional and interface clocks for the module. The clkctrl clocks are currently handled by arch/arm/mach-omap2 hwmod code. With this binding and a related clock device driver we can start moving the clkctrl clock handling to live in drivers/clk/ti. Note that this binding allows keeping the clockdomain related parts out of drivers/clock. The CLKCTCTRL and DYNAMICDEP registers can be handled by a separate driver in drivers/soc/ti and genpd. If the clockdomain driver needs to know it's clocks, we can just set the the clkctrl device instances to be children of the related clockdomain device. Each clkctrl clock can have multiple optional gate clocks, and multiple optional mux clocks. To represent this in device tree, it seems that it is best done using four clock cells #clock-cells = <2> property. The reasons for using #clock-cells = <2> are: 1. We need to specify the clkctrl offset from the instance base. Otherwise we end up with a large number of device tree nodes that need to be patched when new clocks are discovered in a clkctrl clock with minor hardware revision changes for example 2. On omap5 CM_L3INIT_USB_HOST_HS_CLKCTRL has ten OPTFCLKEN bits. So we need to use a separate cell for optional gate clocks to avoid address space conflicts There is probably no need to list input clocks for each clkctrl clock instance in the binding. If we want to add them, the standard clocks binding can be used for that. For hardware reference, see omap4430 TRM "Table 3-1312. L4PER_CM2 Registers Mapping Summary" for example. It shows one instance of a clkctrl clock controller with multiple clkctrl registers. Cc: Paul Walmsley Acked-by: Rob Herring Signed-off-by: Tony Lindgren Signed-off-by: Tero Kristo .../devicetree/bindings/clock/ti-clkctrl.txt | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 84b7625728ea311ea35bdaa0eded53c1c56baeaa Author: Juergen Gross Date: Wed Jun 14 19:23:52 2017 +0200 xen: add sysfs node for hypervisor build id For support of Xen hypervisor live patching the hypervisor build id is needed. Add a node /sys/hypervisor/properties/buildid containing the information. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross Documentation/ABI/testing/sysfs-hypervisor-xen | 11 +++++++++- drivers/xen/sys-hypervisor.c | 28 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) commit a714c2865f154a353f5cc3c81aeb8d8065934157 Author: Juergen Gross Date: Wed Jun 14 19:23:51 2017 +0200 xen: sync include/xen/interface/version.h Sync include/xen/interface/version.h with the Xen source. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Reviewed-by: Stefano Stabellini Signed-off-by: Juergen Gross include/xen/interface/version.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 4a4c29c96dde0eefd69054fd9e6b4255d4717799 Author: Juergen Gross Date: Wed Jun 14 17:12:45 2017 +0200 xen: add sysfs node for guest type Currently there is no reliable user interface inside a Xen guest to determine its type (e.g. HVM, PV or PVH). Instead of letting user mode try to determine this by various rather hacky mechanisms (parsing of boot messages before they are gone, trying to make use of known subtle differences in behavior of some instructions), add a sysfs node /sys/hypervisor/guest_type to explicitly deliver this information as it is known to the kernel. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross Documentation/ABI/testing/sysfs-hypervisor-pmu | 23 ----------------- Documentation/ABI/testing/sysfs-hypervisor-xen | 34 ++++++++++++++++++++++++++ MAINTAINERS | 2 +- drivers/xen/sys-hypervisor.c | 34 ++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 24 deletions(-) commit db985220778e200a935c6d8afddb2b1e32554375 Author: Juergen Gross Date: Wed Jun 14 19:23:49 2017 +0200 doc,xen: document hypervisor sysfs nodes for xen Today only a few sysfs nodes under /sys/hypervisor/ are documented for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. Add the remaining Xen sysfs nodes under /sys/hypervisor/ in a new file Documentation/ABI/stable/sysfs-hypervisor-xen and add the Xen specific sysfs docs to the MAINTAINERS file. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross Documentation/ABI/stable/sysfs-hypervisor-xen | 119 ++++++++++++++++++++++++++ MAINTAINERS | 2 + 2 files changed, 121 insertions(+) commit 42bed042556261b56aa92e05f4f388f0f7ac1210 Author: Murilo Opsfelder Araujo Date: Mon May 29 10:26:28 2017 -0300 drivers/watchdog/Kconfig: Update CONFIG_WATCHDOG_RTAS dependencies drivers/watchdog/wdrtas.c uses symbols defined in arch/powerpc/kernel/rtas.c, which are exported iff CONFIG_PPC_RTAS is selected. Building wdrtas.c without setting CONFIG_PPC_RTAS throws the following errors: ERROR: ".rtas_token" [drivers/watchdog/wdrtas.ko] undefined! ERROR: "rtas_data_buf" [drivers/watchdog/wdrtas.ko] undefined! ERROR: "rtas_data_buf_lock" [drivers/watchdog/wdrtas.ko] undefined! ERROR: ".rtas_get_sensor" [drivers/watchdog/wdrtas.ko] undefined! ERROR: ".rtas_call" [drivers/watchdog/wdrtas.ko] undefined! This was identified during a randconfig build where CONFIG_WATCHDOG_RTAS=m and CONFIG_PPC_RTAS was not set. Logs are here: http://kisskb.ellerman.id.au/kisskb/buildresult/12982152/ This patch fixes the issue by updating CONFIG_WATCHDOG_RTAS to depend on just CONFIG_PPC_RTAS, removing COMPILE_TEST entirely. Signed-off-by: Murilo Opsfelder Araujo Reviewed-by: Guenter Roeck Signed-off-by: Michael Ellerman drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07d2a628bc0008f90754ac7982289f6cb0f46cf8 Author: Nicholas Piggin Date: Fri Jun 9 01:36:09 2017 +1000 powerpc/64s: Avoid cpabort in context switch when possible The ISA v3.0B copy-paste facility only requires cpabort when switching to a process that has foreign real addresses mapped (direct access to accelerators), to clear a potential copy buffer filled by a previous thread. There is no accelerator driver implemented yet, so cpabort can be removed. It can be be re-added when a driver is implemented. POWER9 DD1 requires the copy buffer to always be cleared on context switch, but if accelerators are not in use, then an unpaired copy from a dummy region is sufficient to clear data out of the copy buffer. This increases context switch performance by about 5% on POWER9. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 8 ++++---- arch/powerpc/kernel/entry_64.S | 9 --------- arch/powerpc/kernel/process.c | 27 ++++++++++++++++++++++++++- 3 files changed, 30 insertions(+), 14 deletions(-) commit 9145effd626d155484f73db24ab3e142ecda31db Author: Nicholas Piggin Date: Fri Jun 9 01:36:08 2017 +1000 powerpc/64: Drop explicit hwsync in context switch The sync (aka. hwsync, aka. heavyweight sync) in the context switch code to prevent MMIO access being reordered from the point of view of a single process if it gets migrated to a different CPU is not required because there is an hwsync performed earlier in the context switch path. Comment this so it's clear enough if anything changes on the scheduler or the powerpc sides. Remove the hwsync from _switch. This improves context switch performance by 2-3% on POWER8. Signed-off-by: Nicholas Piggin Acked-by: Peter Zijlstra (Intel) Signed-off-by: Michael Ellerman arch/powerpc/include/asm/barrier.h | 5 +++++ arch/powerpc/kernel/entry_64.S | 23 +++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) commit 837e72f78a72ef43a0c5e179f3addadb2a225f80 Author: Nicholas Piggin Date: Fri Jun 9 01:36:07 2017 +1000 powerpc/64: Drop reservation-clearing ldarx in context switch There is no need to explicitly break the reservation in _switch, because we are guaranteed that the context switch path will include a larx/stcx. Comment the guarantee and remove the reservation clear from _switch. This is worth 1-2% in context switch performance. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit e4c0fc5f72bca11432297168338aef46c12793a4 Author: Nicholas Piggin Date: Fri Jun 9 01:36:06 2017 +1000 powerpc/64s: Leave interrupts hard enabled in context switch for radix Commit 4387e9ff25 ("[POWERPC] Fix PMU + soft interrupt disable bug") hard disabled interrupts over the low level context switch, because the SLB management can't cope with a PMU interrupt accesing the stack in that window. Radix based kernel mapping does not use the SLB so it does not require interrupts hard disabled here. This is worth 1-2% in context switch performance on POWER9. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 8 ++++++++ arch/powerpc/kernel/process.c | 14 ++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) commit bc4f65e4cf9d6cc43e0e9ba0b8648cf9201cd55f Author: Nicholas Piggin Date: Fri Jun 9 01:35:05 2017 +1000 powerpc/64: Avoid restore_math call if possible in syscall exit The syscall exit code that branches to restore_math is quite heavy on Book3S, consisting of 2 mtmsr instructions. Threads that don't use both FP and vector can get caught here if the kernel ever uses FP or vector. Lazy-FP/vec context switching also trips this case. So check for lazy FP and vector before switching RI for restore_math. Move most of this case out of line. For threads that do want to restore math registers, the MSR switches are still suboptimal. Future direction may be to use a soft-RI bit to avoid MSR switches in kernel (similar to soft-EE), but for now at least the no-restore POWER9 context switch rate increases by about 5% due to sched_yield(2) return performance. I haven't constructed a test to measure the syscall cost. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 62 +++++++++++++++++++++++++++++------------- arch/powerpc/kernel/process.c | 4 +++ 2 files changed, 47 insertions(+), 19 deletions(-) commit acd7d8cef01537062e318143d700357d5a92bd6b Author: Nicholas Piggin Date: Fri Jun 9 01:35:04 2017 +1000 powerpc/64s: Optimize hypercall/syscall entry After bc3551257a ("powerpc/64: Allow for relocation-on interrupts from guest to host"), a getppid() system call goes from 307 cycles to 358 cycles (+17%) on POWER8. This is due significantly to the scratch SPR used by the hypercall check. It turns out there are a some volatile registers common to both system call and hypercall (in particular, r12, cr0, ctr), which can be used to avoid the SPR and some other overheads. This brings getppid to 320 cycles (+4%). Testing hcall entry performance by running "sc 1" in guest userspace before this patch is 854 cycles, afterwards is 826. Also a small win there. POWER9 syscall is improved by about the same amount, hcall not tested. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 134 +++++++++++++++++++++++++---------- 1 file changed, 97 insertions(+), 37 deletions(-) commit 9abcc981de9775659a0f6e4a52a3448ea72e59da Author: Michael Ellerman Date: Tue Jun 6 15:48:57 2017 +1000 powerpc/mm/radix: Only add X for pages overlapping kernel text Currently we map the whole linear mapping with PAGE_KERNEL_X. Instead we should check if the page overlaps the kernel text and only then add PAGE_KERNEL_X. Note that we still use 1G pages if they're available, so this will typically still result in a 1G executable page at KERNELBASE. So this fix is primarily useful for catching stray branches to high linear mapping addresses. Without this patch, we can execute at 1G in xmon using: 0:mon> m c000000040000000 c000000040000000 00 l c000000040000000 00000000 01006038 c000000040000004 00000000 2000804e c000000040000008 00000000 x 0:mon> di c000000040000000 c000000040000000 38600001 li r3,1 c000000040000004 4e800020 blr 0:mon> p c000000040000000 return value is 0x1 After we get a 400 as expected: 0:mon> p c000000040000000 *** 400 exception occurred Fixes: 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routines") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Michael Ellerman Reviewed-by: Aneesh Kumar K.V Acked-by: Balbir Singh arch/powerpc/mm/pgtable-radix.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 0edc2ca9ccc9df99f7a94b6407ae2a0ff27d86b2 Author: Michael Ellerman Date: Thu Jun 15 16:20:46 2017 +1000 Revert "powerpc: Handle simultaneous interrupts at once" This reverts commit 45cb08f4791ce6a15c54598b4cb73db4b4b8294f. For some reason this is causing IRQ problems on Freescale Book3E machines, eg on my p5020ds: irq 25: nobody cared (try booting with the "irqpoll" option) CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc3-gcc-6.3.1-00037-g45cb08f4791c #624 Call Trace: [c0000000fffdbb10] [c00000000049962c] .dump_stack+0xa8/0xe8 (unreliable) [c0000000fffdbba0] [c0000000000babf4] .__report_bad_irq+0x54/0x140 [c0000000fffdbc40] [c0000000000bb11c] .note_interrupt+0x324/0x380 [c0000000fffdbd00] [c0000000000b7110] .handle_irq_event_percpu+0x68/0x88 [c0000000fffdbd90] [c0000000000b718c] .handle_irq_event+0x5c/0xa8 [c0000000fffdbe10] [c0000000000bc01c] .handle_fasteoi_irq+0xe4/0x298 [c0000000fffdbe90] [c0000000000b59c4] .generic_handle_irq+0x50/0x74 [c0000000fffdbf10] [c0000000000075d8] .__do_irq+0x74/0x1f0 [c0000000fffdbf90] [c0000000000189f8] .call_do_irq+0x14/0x24 [c0000000f7173060] [c0000000000077e4] .do_IRQ+0x90/0x120 [c0000000f7173100] [c00000000001d93c] exc_0x500_common+0xfc/0x100 --- interrupt: 501 at .prepare_to_wait_event+0xc/0x14c LR = .fsl_elbc_run_command+0xc8/0x23c [c0000000f71734d0] [c00000000065f418] .nand_reset+0xb8/0x168 [c0000000f7173560] [c00000000065fec4] .nand_scan_ident+0x2b0/0x1638 [c0000000f7173650] [c000000000666cd8] .fsl_elbc_nand_probe+0x34c/0x5f0 ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) [c0000000f7173750] [c0000000005a3c60] .platform_drv_probe+0x64/0xb0 [c0000000f71737d0] [c0000000005a12e0] .really_probe+0x290/0x334 [c0000000f7173870] [c0000000005a14a0] .__driver_attach+0x11c/0x120 [c0000000f7173900] [c00000000059e6a0] .bus_for_each_dev+0x98/0xfc [c0000000f71739a0] [c0000000005a0b3c] .driver_attach+0x34/0x4c [c0000000f7173a20] [c0000000005a04b0] .bus_add_driver+0x1ac/0x2e0 [c0000000f7173ac0] [c0000000005a2170] .driver_register+0x94/0x160 [c0000000f7173b40] [c0000000005a3be0] .__platform_driver_register+0x60/0x7c [c0000000f7173bc0] [c000000000d6aab4] .fsl_elbc_nand_driver_init+0x24/0x38 [c0000000f7173c30] [c000000000001934] .do_one_initcall+0x68/0x1b8 [c0000000f7173d00] [c000000000d210f8] .kernel_init_freeable+0x260/0x338 [c0000000f7173db0] [c0000000000021b0] .kernel_init+0x20/0xe70 [c0000000f7173e30] [c0000000000009bc] .ret_from_kernel_thread+0x58/0x9c handlers: [] .fsl_lbc_ctrl_irq Disabling IRQ #25 Ben also had concerns with the implementation being potentially slow on some PICs, so revert it for now. Signed-off-by: Michael Ellerman arch/powerpc/kernel/irq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 036e9ef8becde736e693be4f4bef56d5b56fc298 Author: Prarit Bhargava Date: Tue Jun 13 12:56:34 2017 -0400 dmaengine: Replace WARN_TAINT_ONCE() with pr_warn_once() The WARN_TAINT_ONCE() prints out a loud stack trace on broken BIOSes. The systems that have this problem are several years out of support and no longer have BIOS updates available. The stack trace isn't necessary and a pr_warn_once() will do. Change WARN_TAINT_ONCE() to pr_warn_once() and taint. Signed-off-by: Prarit Bhargava Cc: Dan Williams Cc: Vinod Koul Cc: Duyck, Alexander H Signed-off-by: Vinod Koul drivers/dma/ioat/dca.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d762e4f35601239cbebfbfd43d99876d8f220927 Author: Fabio Estevam Date: Thu Jun 8 19:46:23 2017 -0300 dmaengine: Kconfig: Extend the dependency for MXS_DMA Currently it is not possible to select the mxs dma driver when only mx6sx or mx7 are selected. Extend the dependency to allow the mxs dma driver to be built whenever ARCH_MXS or ARCH_MXC is selected. This has the benefit to avoid having to add new entries in the MXS_DMA Kconfig everytime a new i.MX SoC shows up and it also makes it consistent with the other i.MX DMA engines, such as IMX_DMA and IMX_SDMA. While at it, also pass COMPILE_TEST for increasing the build coverage. Acked-by: Stefan Agner Signed-off-by: Fabio Estevam Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4aff2f9355a0b4480e56b7e349fec69f17e45eb9 Author: Fabio Estevam Date: Sun Jun 11 12:03:11 2017 -0300 dmaengine: mxs: Use %zu for printing a size_t variable Use %zu for printing a size_t variable in order to fix the following build warning: drivers/dma/mxs-dma.c: In function 'mxs_dma_prep_dma_cyclic': drivers/dma/mxs-dma.c:621:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat] Reported-by: kbuild test robot Signed-off-by: Fabio Estevam Signed-off-by: Vinod Koul drivers/dma/mxs-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6f5e70193913361d3378f9f2bb401d3d7228f34 Author: Yuantian Tang Date: Fri Jun 9 14:25:45 2017 +0800 ARM: dts: ls1021a: update the clockgen node qoriq clock driver has been updated to parse the clock configuration information defined in driver itself not in dts. Since the new implementation and the bindings have been merged, it is time to update the clock related node and remove redundent clock configuration information from the dts. Signed-off-by: Tang Yuantian Signed-off-by: Shawn Guo arch/arm/boot/dts/ls1021a.dtsi | 90 ++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 57 deletions(-) commit b014e96d1abbd67404bbe2018937b46466299e9e Author: Christoph Hellwig Date: Thu Jun 1 13:10:37 2017 +0200 PCI: Protect pci_error_handlers->reset_notify() usage with device_lock() Every method in struct device_driver or structures derived from it like struct pci_driver MUST provide exclusion vs the driver's ->remove() method, usually by using device_lock(). Protect use of pci_error_handlers->reset_notify() by holding the device lock while calling it. Note: - pci_dev_lock() calls device_lock() in addition to blocking user-space config accesses. - pci_err_handlers->reset_notify() is used inside pci_dev_save_and_disable() and pci_dev_restore(). We could hold the device lock directly in pci_reset_notify(), but we expand the region since we have several calls following each other. Without this, ->reset_notify() may race with ->remove() calls, which can be easily triggered in NVMe. [bhelgaas: changelog, add pci_reset_notify() comment] [bhelgaas: fold in fix from Dan Carpenter : http://lkml.kernel.org/r/20170701135323.x5vaj4e2wcs2mcro@mwanda] Link: http://lkml.kernel.org/r/20170601111039.8913-2-hch@lst.de Reported-by: Rakesh Pandit Tested-by: Rakesh Pandit Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 9b00064ba7d6fcc3bb0b50b790a0178f8d9cc91f Author: Leonard Crestez Date: Thu Jun 8 19:26:57 2017 +0300 ARM: imx_v6_v7_defconfig: Set THERMAL_WRITABLE_TRIPS=y for testing Setting trip points is supported by the imx thermal driver and it is useful to be able to test this without adjusting config. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit d35fb61759688093fab863318edbbcea0f4644bd Author: Dawid Kurek Date: Wed Jun 14 23:35:18 2017 +0200 drm: Remove duplicate forward declaration Forward declarations in C are great but I'm pretty sure one is enough. Signed-off-by: Dawid Kurek Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170614213518.GA3554@gmail.com include/drm/drm_connector.h | 2 -- 1 file changed, 2 deletions(-) commit 48e42f91c10482992b474cc0874c0e33d76cb509 Author: Tim Bird Date: Wed Jun 14 15:28:02 2017 -0700 kselftest: convert get_size to use stricter TAP13 format 1. Add the TAP13 header 2. remove variable data from the test description line 3. move the plan count to the end of the file, for consistency with other kselftests 4. convert memory data from diagnostic (comment) format, to a YAML block Signed-off-by: Tim Bird Signed-off-by: Shuah Khan tools/testing/selftests/size/get_size.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 9c861f33284cd77be3077cacc4c04303b3a60ebe Merge: 7f274d5 949bdfe Author: Stephen Boyd Date: Wed Jun 14 16:48:21 2017 -0700 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: sunxi-ng: a64: Export PLL_PERIPH0 clock for the PRCM clk: sunxi-ng: h3: Export PLL_PERIPH0 clock for the PRCM dt-bindings: clock: sunxi-ccu: Add pll-periph to PRCM's needed clocks clk: sunxi-ng: enable SUNXI_CCU_MP for PRCM clk: sunxi-ng: v3s: Fix usb otg device reset bit clk: sunxi-ng: a31: Correct lcd1-ch1 clock register offset commit 33e4f80ee69b5168badf37edbfed796eb48434b9 Author: Rafael J. Wysocki Date: Mon Jun 12 22:56:34 2017 +0200 ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle The ACPI SCI (System Control Interrupt) is set up as a wakeup IRQ during suspend-to-idle transitions and, consequently, any events signaled through it wake up the system from that state. However, on some systems some of the events signaled via the ACPI SCI while suspended to idle should not cause the system to wake up. In fact, quite often they should just be discarded. Arguably, systems should not resume entirely on such events, but in order to decide which events really should cause the system to resume and which are spurious, it is necessary to resume up to the point when ACPI SCIs are actually handled and processed, which is after executing dpm_resume_noirq() in the system resume path. For this reasons, add a loop around freeze_enter() in which the platforms can process events signaled via multiplexed IRQ lines like the ACPI SCI and add suspend-to-idle hooks that can be used for this purpose to struct platform_freeze_ops. In the ACPI case, the ->wake hook is used for checking if the SCI has triggered while suspended and deferring the interrupt-induced system wakeup until the events signaled through it are actually processed sufficiently to decide whether or not the system should resume. In turn, the ->sync hook allows all of the relevant event queues to be flushed so as to prevent events from being missed due to race conditions. In addition to that, some ACPI code processing wakeup events needs to be modified to use the "hard" version of wakeup triggers, so that it will cause a system resume to happen on device-induced wakeup events even if the "soft" mechanism to prevent the system from suspending is not enabled. However, to preserve the existing behavior with respect to suspend-to-RAM, this only is done in the suspend-to-idle case and only if an SCI has occurred while suspended. Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 5 +++-- drivers/acpi/device_pm.c | 9 ++++++++- drivers/acpi/internal.h | 2 ++ drivers/acpi/sleep.c | 37 +++++++++++++++++++++++++++++++++++++ drivers/base/power/main.c | 5 ----- drivers/base/power/wakeup.c | 18 ++++++++++++------ include/acpi/acpi_bus.h | 6 +++++- include/linux/suspend.h | 7 +++++-- kernel/power/process.c | 2 +- kernel/power/suspend.c | 35 +++++++++++++++++++++++++++++------ 11 files changed, 103 insertions(+), 25 deletions(-) commit 63dada87f7ef7d4a536765c816fbbe7c4b9f3c85 Author: Hans de Goede Date: Mon Jun 12 22:55:46 2017 +0200 platform/x86: Add driver for ACPI INT0002 Virtual GPIO device Some peripherals on Bay Trail and Cherry Trail platforms signal a Power Management Event (PME) to the Power Management Controller (PMC) to wakeup the system. When this happens software needs to explicitly clear the PME bus 0 status bit in the GPE0a_STS register to avoid an IRQ storm on IRQ 9. This is modelled in ACPI through the INT0002 ACPI device, which is called a "Virtual GPIO controller" in ACPI because it defines the event handler to call when the PME triggers through _AEI and _L02 methods as would be done for a real GPIO interrupt in ACPI. This commit adds a driver which registers the Virtual GPIOs expected by the DSDT on these devices, letting gpiolib-acpi claim the virtual GPIO and install a GPIO-interrupt handler which call the _L02 handler as it would for a real GPIO controller. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Rafael J. Wysocki drivers/platform/x86/Kconfig | 19 +++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/intel_int0002_vgpio.c | 219 +++++++++++++++++++++++++++++ 3 files changed, 239 insertions(+) commit dc15e71eefc766373833602c353cf6b4f49da036 Author: Rafael J. Wysocki Date: Mon Jun 12 22:53:36 2017 +0200 PCI / PM: Restore PME Enable if skipping wakeup setup The wakeup_prepared PCI device flag is used for preventing subsequent changes of PCI device wakeup settings in the same way (e.g. enabling device wakeup twice in a row). However, in some cases PME Enable may be updated by things like PCI configuration space restoration in the meantime and it may need to be set again even though the rest of the settings need not change, so modify __pci_enable_wake() to do that when it is about to return early. Also, it is reasonable to expect that __pci_enable_wake() will always clear PME Status when invoked to disable device wakeup, so make it do so even if it is going to return early then. Signed-off-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas drivers/pci/pci.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 604d895857c2fc6748feb805c2290a60491eed43 Author: Rafael J. Wysocki Date: Mon Jun 12 22:51:55 2017 +0200 PM / sleep: Print timing information if debug is enabled Avoid printing the device suspend/resume timing information if CONFIG_PM_DEBUG is not set to reduce the log noise level. Signed-off-by: Rafael J. Wysocki drivers/base/power/main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 235d81a630ca2d39818da96f0c14bc960ffbaeb5 Author: Rafael J. Wysocki Date: Mon Jun 12 22:51:07 2017 +0200 ACPI / PM: Clean up device wakeup enable/disable code The wakeup.flags.enabled flag in struct acpi_device is not used consistently, as there is no reason why it should only apply to the enabling/disabling of the wakeup GPE, so put the invocation of acpi_enable_wakeup_device_power() under it too. Moreover, it is not necessary to call acpi_enable_wakeup_devices() and acpi_disable_wakeup_devices() for suspend-to-idle, so don't do that. Signed-off-by: Rafael J. Wysocki drivers/acpi/device_pm.c | 19 ++++++++----------- drivers/acpi/sleep.c | 4 ++-- 2 files changed, 10 insertions(+), 13 deletions(-) commit 190cab84711a3f453e2100d0c9238f42261cf426 Author: Rafael J. Wysocki Date: Mon Jun 12 22:50:24 2017 +0200 ACPI / PM: Change log level of wakeup-related message Change the log level of the "System wakeup enabled/disabled by ACPI" message in acpi_pm_device_sleep_wake() to "debug" to reduce to log noise level. Signed-off-by: Rafael J. Wysocki drivers/acpi/device_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d438aa223e931bfb74dd459bb6c7f3139c48b528 Author: Rafael J. Wysocki Date: Mon Jun 12 22:49:40 2017 +0200 USB / PCI / PM: Allow the PCI core to do the resume cleanup hcd_pci_resume_noirq() used as a universal _resume_noirq handler for PCI USB controllers calls pci_back_from_sleep() which is unnecessary and may become problematic. It is unnecessary, because the PCI bus type carries out post-suspend cleanup of all PCI devices during resume and that covers all things done by the pci_back_from_sleep(). There is no reason why USB cannot follow all of the other PCI devices in that respect. It will become problematic after subsequent changes that make it possible to go back to sleep again after executing dpm_resume_noirq() if no valid system wakeup events have been detected at that point. Namely, calling pci_back_from_sleep() at the _resume_noirq stage will cause the wakeup status of the devices in question to be cleared and if any of them has triggered system wakeup, that event may be missed then. For the above reasons, drop the pci_back_from_sleep() invocation from hcd_pci_resume_noirq(). Signed-off-by: Rafael J. Wysocki Acked-by: Alan Stern Acked-by: Greg Kroah-Hartman drivers/usb/core/hcd-pci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 64fd1c7040880292710e6592ddc88d0d73cfb6fb Author: Rafael J. Wysocki Date: Mon Jun 12 22:48:41 2017 +0200 ACPI / PM: Run wakeup notify handlers synchronously The work functions provided by the users of acpi_add_pm_notifier() should be run synchronously before re-enabling the wakeup GPE in case they are used to clear the status and/or disable the wakeup signaling at the source. Otherwise, which is the case currently in the PCI bus type code, the same wakeup event may be signaled for multiple times while the execution of the work function in response to it has already been queued up. Fortunately, acpi_add_pm_notifier() is only used by PCI and by ACPI device PM code internally, so the change is relatively straightforward to make. Signed-off-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas drivers/acpi/device_pm.c | 27 +++++++++++---------------- drivers/pci/pci-acpi.c | 17 +++++++---------- include/acpi/acpi_bus.h | 4 ++-- 3 files changed, 20 insertions(+), 28 deletions(-) commit 17530e71e0166a37f8e20a9b7bcf1d50ae3cff8e Author: Jakub Kicinski Date: Mon May 22 15:50:23 2017 -0700 PCI: Protect pci_driver->sriov_configure() usage with device_lock() Every method in struct device_driver or structures derived from it like struct pci_driver MUST provide exclusion vs the driver's ->remove() method, usually by using device_lock(). Protect use of pci_driver->sriov_configure() by holding the device lock while calling it. The PCI core sets the pci_dev->driver pointer in local_pci_probe() before calling ->probe() and only clears it after ->remove(). This means driver's ->sriov_configure() callback will happily race with probe() and remove(), most likely leading to BUGs, since drivers don't expect this. Remove the iov lock completely, since we remove the last user. [bhelgaas: changelog, thanks to Christoph for locking rule] Link: http://lkml.kernel.org/r/20170522225023.14010-1-jakub.kicinski@netronome.com Signed-off-by: Jakub Kicinski Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/iov.c | 4 ---- drivers/pci/pci-sysfs.c | 5 ++--- drivers/pci/pci.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit 5e6eb025b0d7ee721e8d88d632630ba43eeab50b Author: H. Nikolaus Schaller Date: Wed Jun 14 11:25:54 2017 +0200 power: supply: twl4030-charger: move allocation of iio channel to the beginning This is in prepraration for EPROBE_DEFER handling because it is quite likely that geting the (madc) iio channel is deferred more often than later steps. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Sebastian Reichel drivers/power/supply/twl4030_charger.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e8847c565421f1c9bc9abcb92cccf33727b6f558 Author: H. Nikolaus Schaller Date: Wed Jun 14 11:25:53 2017 +0200 power: supply: twl4030-charger: allocate iio by devm_iio_channel_get() and fix error path Suggested-by: Sebastian Reichel Signed-off-by: H. Nikolaus Schaller Signed-off-by: Sebastian Reichel drivers/power/supply/twl4030_charger.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 355679b2701b3d38a4681bf922291c6e55a23e46 Author: Arvind Yadav Date: Tue Jun 13 10:39:43 2017 +0530 power: supply: core: constify psy_tcd_ops. File size before: text data bss dec hex filename 4240 200 80 4520 11a8 drivers/power/supply/power_supply_core.o File size After adding 'const': text data bss dec hex filename 4296 136 80 4512 11a0 drivers/power/supply/power_supply_core.o Signed-off-by: Arvind Yadav Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b0c6806d660508876e936ec439e3e7864200921 Author: Tony Lindgren Date: Mon Jun 12 09:04:00 2017 -0700 dt-bindings: power: supply: cpcap-battery: Add power-supplies property The binding for cpcap-battery is missing the standard power-supplies property as noted by Sebastian Reichel . Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/cpcap-battery.txt | 4 ++++ 1 file changed, 4 insertions(+) commit c159b383335625546ae88d6940c26545c04461b0 Author: Sebastian Reichel Date: Thu Jun 8 23:36:02 2017 +0200 dt-bindings: power: supply: move max8903-charger.txt to proper location This moves max8903-charger.txt to proper location for power-supply bindings. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/max8903-charger.txt | 25 ---------------------- .../bindings/power/supply/max8903-charger.txt | 25 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) commit a9b819f5fb33132253374e69b9a94a79603a0b24 Author: Sebastian Reichel Date: Thu Jun 8 23:36:01 2017 +0200 dt-bindings: power: supply: move maxim,max14656.txt to proper location This moves maxim,max14656.txt to proper location for power-supply bindings. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/supply/maxim,max14656.txt | 25 ++++++++++++++++++++++ .../bindings/power_supply/maxim,max14656.txt | 25 ---------------------- 2 files changed, 25 insertions(+), 25 deletions(-) commit b6053d40e3387c916d56d319ba6bfdb2c42a67c7 Author: Tejun Heo Date: Wed Jun 14 16:01:41 2017 -0400 cgroup: fix lockdep warning in debug controller The debug controller grabs cgroup_mutex from interface file show functions which can deadlock and triggers lockdep warnings. Fix it by using cgroup_kn_lock_live()/cgroup_kn_unlock() instead. Signed-off-by: Tejun Heo Cc: Waiman Long kernel/cgroup/debug.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 2866c0b4cf25274040f0b4cc045ad1f44b885dd8 Author: Tejun Heo Date: Wed Jun 14 16:01:36 2017 -0400 cgroup: refactor cgroup_masks_read() in the debug controller Factor out cgroup_masks_read_one() out of cgroup_masks_read() for simplicity. Signed-off-by: Tejun Heo Cc: Waiman Long kernel/cgroup/debug.c | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) commit 8cc38fa7fa317d44710f24475576b1f9ee205da9 Author: Tejun Heo Date: Wed Jun 14 16:01:32 2017 -0400 cgroup: make debug an implicit controller on cgroup2 Make debug an implicit controller on cgroup2 which is enabled by "cgroup_debug" boot param. Signed-off-by: Tejun Heo Cc: Waiman Long kernel/cgroup/debug.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) commit 575313f40ff33d0c2aff2701dfb2ccfcd6211d55 Author: Waiman Long Date: Tue Jun 13 17:18:04 2017 -0400 cgroup: Make debug cgroup support v2 and thread mode Besides supporting cgroup v2 and thread mode, the following changes are also made: 1) current_* cgroup files now resides only at the root as we don't need duplicated files of the same function all over the cgroup hierarchy. 2) The cgroup_css_links_read() function is modified to report the number of tasks that are skipped because of overflow. 3) The number of extra unaccounted references are displayed. 4) The current_css_set_read() function now prints out the addresses of the css'es associated with the current css_set. 5) A new cgroup_subsys_states file is added to display the css objects associated with a cgroup. 6) A new cgroup_masks file is added to display the various controller bit masks in the cgroup. tj: Dropped thread mode related information for now so that debug controller changes aren't blocked on the thread mode. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo kernel/cgroup/debug.c | 170 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 153 insertions(+), 17 deletions(-) commit 23b0be480f341db26ce0dee7d3f6e67f8e0e166f Author: Waiman Long Date: Tue Jun 13 17:18:03 2017 -0400 cgroup: Make Kconfig prompt of debug cgroup more accurate The Kconfig prompt and description of the debug cgroup controller more accurate by saying that it is for debug purpose only and its interfaces are unstable. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo init/Kconfig | 7 +++++-- kernel/cgroup/debug.c | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) commit a28f8f5e995fe5964ae304444913536058f26e37 Author: Waiman Long Date: Tue Jun 13 17:18:02 2017 -0400 cgroup: Move debug cgroup to its own file The debug cgroup currently resides within cgroup-v1.c and is enabled only for v1 cgroup. To enable the debug cgroup also for v2, it makes sense to put the code into its own file as it will no longer be v1 specific. There is no change to the debug cgroup specific code. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo kernel/cgroup/Makefile | 1 + kernel/cgroup/cgroup-internal.h | 2 + kernel/cgroup/cgroup-v1.c | 149 +------------------------------------- kernel/cgroup/debug.c | 153 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 157 insertions(+), 148 deletions(-) commit 73a7242a06ff995d771fbe243e72b516feaa6e3d Author: Waiman Long Date: Tue Jun 13 17:18:01 2017 -0400 cgroup: Keep accurate count of tasks in each css_set The reference count in the css_set data structure was used as a proxy of the number of tasks attached to that css_set. However, that count is actually not an accurate measure especially with thread mode support. So a new variable nr_tasks is added to the css_set to keep track of the actual task count. This new variable is protected by the css_set_lock. Functions that require the actual task count are updated to use the new variable. tj: s/task_count/nr_tasks/ for consistency with cgroup_root->nr_cgrps. Refreshed on top of cgroup/for-v4.13 which dropped on css_set_populated() -> nr_tasks conversion. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo include/linux/cgroup-defs.h | 3 +++ kernel/cgroup/cgroup-v1.c | 6 +----- kernel/cgroup/cgroup.c | 10 ++++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) commit f7aec129a356ad049edddcb7e77b04a474fcf41f Author: David Howells Date: Wed Jun 14 17:56:50 2017 +0100 rxrpc: Cache the congestion window setting Cache the congestion window setting that was determined during a call's transmission phase when it finishes so that it can be used by the next call to the same peer, thereby shortcutting the slow-start algorithm. The value is stored in the rxrpc_peer struct and is accessed without locking. Each call takes the value that happens to be there when it starts and just overwrites the value when it finishes. Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/call_accept.c | 1 + net/rxrpc/call_object.c | 7 +------ net/rxrpc/conn_client.c | 6 ++++++ net/rxrpc/conn_object.c | 2 ++ net/rxrpc/peer_object.c | 7 +++++++ 6 files changed, 19 insertions(+), 6 deletions(-) commit 0430a26054733de6e7884a4d2872613f9d8b9a66 Author: Weilin Chang Date: Wed Jun 14 09:11:31 2017 -0700 liquidio: fix VF driver off-by-one bug when setting ethtool -C ethX rx-frames Signed-off-by: Weilin Chang Signed-off-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5165a5492237d33239176e7e171c7a8991583cb Author: Dan Carpenter Date: Wed Jun 14 13:41:52 2017 +0300 net/mlxfw: fix a NULL dereference If we hit this error path we end up returning ERR_PTR(0) which is NULL. The caller is not expecting that so it results in a NULL dereference. Fixes: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process") Signed-off-by: Dan Carpenter Acked-by: Yotam Gigi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c | 1 + 1 file changed, 1 insertion(+) commit 28c7ef9ecca5984cbb416497f300826a870d9cf3 Author: Lionel Landwerlin Date: Tue Jun 13 12:23:09 2017 +0100 drm/i915/perf: add GLK support Add OA support for Geminilake (pretty much identical to Broxton), and also add the associated OA configurations. Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Signed-off-by: Ben Widawsky Link: http://patchwork.freedesktop.org/patch/msgid/20170613112309.4088-2-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_oa_glk.c | 2602 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_glk.h | 40 + drivers/gpu/drm/i915/i915_perf.c | 17 +- 4 files changed, 2659 insertions(+), 3 deletions(-) commit 6c5c1d89af15aec24a221637e0fd8b55f15672c3 Author: Lionel Landwerlin Date: Tue Jun 13 12:23:08 2017 +0100 drm/i915/perf: add KBL support Add OA support for Kabylake (pretty much identical to Skylake), and also add the associated OA configurations. Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/Makefile | 4 +- drivers/gpu/drm/i915/i915_oa_kblgt2.c | 2991 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_kblgt2.h | 40 + drivers/gpu/drm/i915/i915_oa_kblgt3.c | 3040 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_kblgt3.h | 40 + drivers/gpu/drm/i915/i915_perf.c | 30 +- 6 files changed, 6143 insertions(+), 2 deletions(-) commit 3891589eee3276cb820a9f3d52b5c82b08382dd7 Author: Lionel Landwerlin Date: Tue Jun 13 12:23:07 2017 +0100 drm/i915: add KBL GT2/GT3 check macros Add macros to detect GT2/GT3 skus so we can apply the proper OA configuration later. Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/i915_drv.h | 4 ++++ 1 file changed, 4 insertions(+) commit 1bef3409f139d787598245179ff824ff0b46cce4 Author: Robert Bragg Date: Tue Jun 13 12:23:06 2017 +0100 drm/i915/perf: remove perf.hook_lock In earlier iterations of the i915-perf driver we had a number of callbacks/hooks from other parts of the i915 driver to e.g. notify us when a legacy context was pinned and these could run asynchronously with respect to the stream file operations and might also run in atomic context. dev_priv->perf.hook_lock had been for serialising access to state needed within these callbacks, but as the code has evolved some of the hooks have gone away or are implemented to avoid needing to lock any state. The remaining use of this lock was actually redundant considering how the gen7 oacontrol state used to be updated as part of a context pin hook. Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_perf.c | 33 +++++++++++---------------------- 2 files changed, 11 insertions(+), 24 deletions(-) commit 155e941f49289fe73157f1c9b3c93450a2e40175 Author: Robert Bragg Date: Tue Jun 13 12:23:05 2017 +0100 drm/i915/perf: per-gen timebase for checking sample freq An oa_exponent_to_ns() utility and per-gen timebase constants where recently removed when updating the tail pointer race condition WA, and this restores those so we can update the _PROP_OA_EXPONENT validation done in read_properties_unlocked() to not assume we have a 12.5MHz timebase as we did for Haswell. Accordingly the oa_sample_rate_hard_limit value that's referenced by proc_dointvec_minmax defining the absolute limit for the OA sampling frequency is now initialized to (timestamp_frequency / 2) instead of the 6.25MHz constant for Haswell. v2: Specify frequency of 19.2MHz for BXT (Ville) Initialize oa_sample_rate_hard_limit per-gen too (Lionel) Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_perf.c | 39 ++++++++++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 11 deletions(-) commit fc59921178fd63f1dbe445c2fc86e6ca997a4744 Author: Robert Bragg Date: Tue Jun 13 12:23:04 2017 +0100 drm/i915/perf: Add more OA configs for BDW, CHV, SKL + BXT These are auto generated from an XML description of metric sets, currently maintained in gputop, ref: https://github.com/rib/gputop > gputop-data/oa-*.xml > scripts/i915-perf-kernelgen.py $ make -C gputop-data -f Makefile.xml Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/i915_oa_bdw.c | 5066 ++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_oa_bxt.c | 2464 +++++++++++++++- drivers/gpu/drm/i915/i915_oa_chv.c | 2657 ++++++++++++++++- drivers/gpu/drm/i915/i915_oa_hsw.c | 48 + drivers/gpu/drm/i915/i915_oa_sklgt2.c | 3323 ++++++++++++++++++++- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 2872 ++++++++++++++++++- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 2915 ++++++++++++++++++- 8 files changed, 19161 insertions(+), 188 deletions(-) commit 19f81df2859eb10e92d68991cefa39f826dea013 Author: Robert Bragg Date: Tue Jun 13 12:23:03 2017 +0100 drm/i915/perf: Add OA unit support for Gen 8+ Enables access to OA unit metrics for BDW, CHV, SKL and BXT which all share (more-or-less) the same OA unit design. Of particular note in comparison to Haswell: some OA unit HW config state has become per-context state and as a consequence it is somewhat more complicated to manage synchronous state changes from the cpu while there's no guarantee of what context (if any) is currently actively running on the gpu. The periodic sampling frequency which can be particularly useful for system-wide analysis (as opposed to command stream synchronised MI_REPORT_PERF_COUNT commands) is perhaps the most surprising state to have become per-context save and restored (while the OABUFFER destination is still a shared, system-wide resource). This support for gen8+ takes care to consider a number of timing challenges involved in synchronously updating per-context state primarily by programming all config state from the cpu and updating all current and saved contexts synchronously while the OA unit is still disabled. The driver intentionally avoids depending on command streamer programming to update OA state considering the lack of synchronization between the automatic loading of OACTXCONTROL state (that includes the periodic sampling state and enable state) on context restore and the parsing of any general purpose BB the driver can control. I.e. this implementation is careful to avoid the possibility of a context restore temporarily enabling any out-of-date periodic sampling state. In addition to the risk of transiently-out-of-date state being loaded automatically; there are also internal HW latencies involved in the loading of MUX configurations which would be difficult to account for from the command streamer (and we only want to enable the unit when once the MUX configuration is complete). Since the Gen8+ OA unit design no longer supports clock gating the unit off for a single given context (which effectively stopped any progress of counters while any other context was running) and instead supports tagging OA reports with a context ID for filtering on the CPU, it means we can no longer hide the system-wide progress of counters from a non-privileged application only interested in metrics for its own context. Although we could theoretically try and subtract the progress of other contexts before forwarding reports via read() we aren't in a position to filter reports captured via MI_REPORT_PERF_COUNT commands. As a result, for Gen8+, we always require the dev.i915.perf_stream_paranoid to be unset for any access to OA metrics if not root. v5: Drain submitted requests when enabling metric set to ensure no lite-restore erases the context image we just updated (Lionel) v6: In addition to drain, switch to kernel context & update all context in place (Chris) v7: Add missing mutex_unlock() if switching to kernel context fails (Matthew) v8: Simplify OA period/flex-eu-counters programming by using the batchbuffer instead of modifying ctx-image (Lionel) v9: Back to updating the context image (due to erroneous testing, batchbuffer programming the OA unit doesn't actually work) (Lionel) Pin context before updating context image (Chris) Drop MMIO programming now that we switch to a kernel context with right values in initial context image (Chris) v10: Just pin_map the contexts we want to modify or let the configuration happen on first use (Chris) v11: Update kernel context OA config through the batchbuffer rather than on the fly ctx-image update (Lionel) v12: Rework OA context registers update again by swithing away from user contexts and reconfiguring the kernel context through the batchbuffer and updating all the other contexts' context image. Also take care to lock slice/subslice configuration when OA is on. (Lionel) v13: Request rpcs updates on all engine when updating the OA config (Lionel) v14: Drop any kind of rpcs management now that we monitor sseu configuration changes in a later patch (Lionel) Remove usleep after programming the NOA configs on Gen8+, this doesn't seem to be needed (Lionel) v15: Respect coding style for block comments (Chris) v16: Add missing i915_add_request() in case we fail to emit OA configuration (Matthew) Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld \o/ Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/i915_drv.h | 46 +- drivers/gpu/drm/i915/i915_perf.c | 1034 +++++++++++++++++++++++++++++++++++--- drivers/gpu/drm/i915/i915_reg.h | 22 + drivers/gpu/drm/i915/intel_lrc.c | 2 + include/uapi/drm/i915_drm.h | 19 +- 5 files changed, 1028 insertions(+), 95 deletions(-) commit 5182f646c7615ede9a9ba3ecd241f6cbe16829dc Author: Robert Bragg Date: Tue Jun 13 12:23:02 2017 +0100 drm/i915/perf: Add 'render basic' Gen8+ OA unit configs Adds a static OA unit, MUX, B Counter + Flex EU configurations for basic render metrics on Broadwell, Cherryview, Skylake and Broxton. These are auto generated from an XML description of metric sets, currently maintained in gputop, ref: https://github.com/rib/gputop > gputop-data/oa-*.xml > scripts/i915-perf-kernelgen.py $ make -C gputop-data -f Makefile.xml WHITELIST=RenderBasic v2: add newlines to debug messages + fix comment (Matthew Auld) Signed-off-by: Robert Bragg Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/Makefile | 8 +- drivers/gpu/drm/i915/i915_drv.h | 6 +- drivers/gpu/drm/i915/i915_oa_bdw.c | 392 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_bdw.h | 40 ++++ drivers/gpu/drm/i915/i915_oa_bxt.c | 248 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_bxt.h | 40 ++++ drivers/gpu/drm/i915/i915_oa_chv.c | 238 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_chv.h | 40 ++++ drivers/gpu/drm/i915/i915_oa_sklgt2.c | 238 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_sklgt2.h | 40 ++++ drivers/gpu/drm/i915/i915_oa_sklgt3.c | 249 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_sklgt3.h | 40 ++++ drivers/gpu/drm/i915/i915_oa_sklgt4.c | 260 ++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_sklgt4.h | 40 ++++ 14 files changed, 1876 insertions(+), 3 deletions(-) commit 3f488d99858d22f584e1734f317bfcff9dbdf4fd Author: Lionel Landwerlin Date: Tue Jun 13 12:23:01 2017 +0100 drm/i915/perf: rework mux configurations queries Gen8+ might have mux configurations per slices/subslices. Depending on whether slices/subslices have been fused off, only part of the configuration needs to be applied. This change reworks the mux configurations query mechanism to allow more than one set of registers to be programmed. v2: s/n_mux_regs/n_mux_configs/ (Matthew) Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/i915_drv.h | 6 +- drivers/gpu/drm/i915/i915_oa_hsw.c | 215 ++++++++++++++++++++++++------------- drivers/gpu/drm/i915/i915_oa_hsw.h | 4 +- drivers/gpu/drm/i915/i915_perf.c | 7 +- 4 files changed, 151 insertions(+), 81 deletions(-) commit f532023381df49ac00cb2d1e70df607cf534720d Author: Robert Bragg Date: Tue Jun 13 12:23:00 2017 +0100 drm/i915: expose _SUBSLICE_MASK GETPARM Assuming a uniform mask across all slices, this enables userspace to determine the specific sub slices can be enabled. This information is required, for example, to be able to analyse some OA counter reports where the counter configuration depends on the HW sub slice configuration. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Signed-off-by: Lionel Landwerlin Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/i915_drv.c | 5 +++++ include/uapi/drm/i915_drm.h | 5 +++++ 2 files changed, 10 insertions(+) commit 7fed555c02f754af44f8963890b5ef8e30e97391 Author: Robert Bragg Date: Tue Jun 13 12:22:59 2017 +0100 drm/i915: expose _SLICE_MASK GETPARM Enables userspace to determine the maximum number of slices that can be enabled on the device and also know what specific slices can be enabled. This information is required, for example, to be able to analyse some OA counter reports where the counter configuration depends on the HW slice configuration. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Signed-off-by: Lionel Landwerlin Signed-off-by: Ben Widawsky drivers/gpu/drm/i915/i915_drv.c | 5 +++++ include/uapi/drm/i915_drm.h | 3 +++ 2 files changed, 8 insertions(+) commit d5e9edfd37fc32098349b7753637bc1c80a16003 Author: Chen-Yu Tsai Date: Sat Jun 10 00:05:49 2017 +0800 ARM: sun6i: a31s: primo81: Enable battery power supply The MSI Primo81 tablet has a 3500 mAh 3.7V LiPo battery. Enable the PMIC's battery power supply so the battery can be monitored. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31s-primo81.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 723ca929a507a05bf4638f620b284f25d2047cf3 Author: Chen-Yu Tsai Date: Sat Jun 10 00:05:48 2017 +0800 ARM: sun6i: a31s: primo81: Change USB OTG to OTG mode Now that we have support for the AXP221 PMIC's USB VBUS detection and DRIVEVBUS vbus control, we can use the USB OTG port in proper OTG mode. This patch enables the aforementioned PMIC functions, adds the OTG ID detection pin to the USB PHY node, and changes the mode of USB OTG to "otg". Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31s-primo81.dts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 0e9d528f0702ee07216a7f1d2a55cee0b23a3bba Author: Corentin Labbe Date: Wed Jun 7 19:33:44 2017 +0200 ARM: sun8i: a83t: Add dt node for the syscon control module This patch add the dt node for the syscon register present on the Allwinner A83T Signed-off-by: Corentin Labbe Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 7608894e43d071ef2322a01c79522954c070ac6c Author: Paolo Abeni Date: Wed Jun 14 11:48:48 2017 +0200 net: use skb_unref() in napi_consume_skb() The commit 83ada39bb79d ("net: factor out a helper to decrement the skb refcount") provided and used a helper for decrementing skb usage, but I missed at least a spot for it. This change remove some more duplicated code reusing skb_unref() in napi_consume_skb(), too. The helper uses an additional, unneeded unlikely(!skb) test - napi_consume_skb() already check it a few lines above - but the compiler is smart enough to optimize the duplicated test out. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/core/skbuff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4cbf87c78950b439df599053214b09d8f7461765 Merge: 0331402 06e41d8 Author: David S. Miller Date: Wed Jun 14 15:22:17 2017 -0400 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2017-06-14 Here's another batch of Bluetooth patches for the 4.13 kernel: - Fix for Broadcom controllers not supporting Event Mask Page 2 - New QCA ROME USB ID for btusb - Fix for Security Manager Protocol to use constant-time memcmp - Improved support for TI WiLink chips Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 0331402aeaefe858709b0a4d44ade15f82d3a119 Author: Dan Carpenter Date: Wed Jun 14 12:10:10 2017 +0300 qed: Fix an off by one bug The p_l2_info->pp_qid_usage[] array has "p_l2_info->queues" elements so the > here should be a >= or we write beyond the end of the array. Fixes: bbe3f233ec5e ("qed: Assign a unique per-queue index to queue-cid") Signed-off-by: Dan Carpenter Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44e179da0e27a1cc1001becefa0931634dbafae3 Merge: 4071bd8 2ea1090 Author: David S. Miller Date: Wed Jun 14 15:16:31 2017 -0400 Merge branch 'mlxsw-Add-support-for-cable-info-access' Jiri Pirko says: ==================== mlxsw: Add support for cable info access Add support for cable info access via ethtool. This is done by accessing the SFP+/QSFP internal EEPROM. ==================== Signed-off-by: David S. Miller commit 2ea109039cd39a253a70c49394d05081580e9e3b Author: Arkadi Sharshevsky Date: Wed Jun 14 09:27:40 2017 +0200 mlxsw: spectrum: Add support for access cable info via ethtool Add support for access cable info via ethtool. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 131 +++++++++++++++++++++++++ 1 file changed, 131 insertions(+) commit 7ca36994a3479e6d9d81baba34a426c47691ea08 Author: Arkadi Sharshevsky Date: Wed Jun 14 09:27:39 2017 +0200 mlxsw: reg: Add MCIA register for cable info access The MCIA register is used to access the SFP+ and QSFP connector's EPROM. It will be used to query the cable info. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 76 +++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 4071bd88cca7bc4ebb6143c6015f9b255b3d4cfc Merge: 2fae5d0 4b7190e Author: David S. Miller Date: Wed Jun 14 15:03:23 2017 -0400 Merge branch 'bpf-MIPS-infra' David Daney says: ==================== bpf: Changes needed (or desired) for MIPS support This is a grab bag of changes to the bpf testing infrastructure I developed working on MIPS eBPF JIT support. The change to bpf_jit_disasm is probably universally beneficial, the others are more MIPS specific. ==================== Signed-off-by: David S. Miller commit 4b7190e8416d9238e995da993a7fb851996654e2 Author: David Daney Date: Tue Jun 13 16:49:38 2017 -0700 samples/bpf: Fix tracex5 to work with MIPS syscalls. There are two problems: 1) In MIPS the __NR_* macros expand to an expression, this causes the sections of the object file to be named like: . . . [ 5] kprobe/(5000 + 1) PROGBITS 0000000000000000 000160 ... [ 6] kprobe/(5000 + 0) PROGBITS 0000000000000000 000258 ... [ 7] kprobe/(5000 + 9) PROGBITS 0000000000000000 000348 ... . . . The fix here is to use the "asm_offsets" trick to evaluate the macros in the C compiler and generate a header file with a usable form of the macros. 2) MIPS syscall numbers start at 5000, so we need a bigger map to hold the sub-programs. Signed-off-by: David Daney Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 13 +++++++++++++ samples/bpf/syscall_nrs.c | 12 ++++++++++++ samples/bpf/tracex5_kern.c | 11 ++++++++--- 3 files changed, 33 insertions(+), 3 deletions(-) commit c1932cdb275e65cbef2f230f0df0c490fdd03c62 Author: David Daney Date: Tue Jun 13 16:49:37 2017 -0700 bpf: Add MIPS support to samples/bpf. Signed-off-by: David Daney Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/bpf_helpers.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b7127cfea050a3b371d6da7a3ce9e69942f945f0 Author: David Daney Date: Tue Jun 13 16:49:36 2017 -0700 test_bpf: Add test to make conditional jump cross a large number of insns. On MIPS, conditional branches can only span 32k instructions. To exceed this limit in the JIT with the BPF maximum of 4k insns, we need to choose eBPF insns that expand to more than 8 machine instructions. Use BPF_LD_ABS as it is quite complex. This forces the JIT to invert the sense of the branch to branch around a long jump to the end. This (somewhat) verifies that the branch inversion logic and target address calculation of the long jumps are done correctly. Signed-off-by: David Daney Acked-by: Daniel Borkmann Signed-off-by: David S. Miller lib/test_bpf.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit e274da1a50f6f3c8216e5bb22e1b0964ab993f13 Author: David Daney Date: Tue Jun 13 16:49:35 2017 -0700 tools: bpf_jit_disasm: Handle large images. Dynamically allocate memory so that JIT images larger than the size of the statically allocated array can be handled. Signed-off-by: David Daney Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/net/bpf_jit_disasm.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) commit 2fae5d0e647c6470d206e72b5fc24972bb900f70 Merge: a88e267 18f3d6b Author: David S. Miller Date: Wed Jun 14 14:56:26 2017 -0400 Merge branch 'bpf-ctx-narrow' Yonghong Song says: ==================== bpf: permit bpf program narrower loads for ctx fields Today, if users try to access a ctx field through a narrower load, e.g., __be16 prot = __sk_buff->protocol, verifier will fail. This set contains the verifier change to permit such loads for certain ctx fields as well as the new test cases in selftests/bpf. ==================== Signed-off-by: David S. Miller commit 18f3d6be6be124316d3abfee667c5e8b88dec100 Author: Yonghong Song Date: Tue Jun 13 15:52:14 2017 -0700 selftests/bpf: Add test cases to test narrower ctx field loads Add test cases in test_verifier and test_progs. Negative tests are added in test_verifier as well. The test in test_progs will compare the value of narrower ctx field load result vs. the masked value of normal full-field load result, and will fail if they are not the same. Acked-by: Daniel Borkmann Signed-off-by: Yonghong Song Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/test_pkt_md_access.c | 35 +++++ tools/testing/selftests/bpf/test_progs.c | 21 +++ tools/testing/selftests/bpf/test_verifier.c | 176 +++++++++++++++++++++++ 4 files changed, 234 insertions(+), 1 deletion(-) commit 31fd85816dbe3a714bcc3f67c17c3dd87011f79e Author: Yonghong Song Date: Tue Jun 13 15:52:13 2017 -0700 bpf: permits narrower load from bpf program context fields Currently, verifier will reject a program if it contains an narrower load from the bpf context structure. For example, __u8 h = __sk_buff->hash, or __u16 p = __sk_buff->protocol __u32 sample_period = bpf_perf_event_data->sample_period which are narrower loads of 4-byte or 8-byte field. This patch solves the issue by: . Introduce a new parameter ctx_field_size to carry the field size of narrower load from prog type specific *__is_valid_access validator back to verifier. . The non-zero ctx_field_size for a memory access indicates (1). underlying prog type specific convert_ctx_accesses supporting non-whole-field access (2). the current insn is a narrower or whole field access. . In verifier, for such loads where load memory size is less than ctx_field_size, verifier transforms it to a full field load followed by proper masking. . Currently, __sk_buff and bpf_perf_event_data->sample_period are supporting narrowing loads. . Narrower stores are still not allowed as typical ctx stores are just normal stores. Because of this change, some tests in verifier will fail and these tests are removed. As a bonus, rename some out of bound __sk_buff->cb access to proper field name and remove two redundant "skb cb oob" tests. Acked-by: Daniel Borkmann Signed-off-by: Yonghong Song Signed-off-by: David S. Miller include/linux/bpf.h | 2 +- include/linux/bpf_verifier.h | 1 + kernel/bpf/verifier.c | 71 ++++++++++++++++------ kernel/trace/bpf_trace.c | 21 +++++-- net/core/filter.c | 56 +++++++++++++----- tools/testing/selftests/bpf/test_verifier.c | 92 ++++------------------------- 6 files changed, 124 insertions(+), 119 deletions(-) commit 3bc1630774bc9f202308ae04608a32c366b41caf Author: Geert Uytterhoeven Date: Tue Apr 25 19:38:48 2017 +0200 of: Provide dummy of_device_compatible_match() for compile-testing Most of_device_*() functions have dummy versions for CONFIG_OF=n, but of_device_compatible_match() hasn't. Fix that to improve the ability to do compile-testing. Fixes: b9c13fe32faaa71c ("dt: Add of_device_compatible_match()") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring include/linux/of.h | 6 ++++++ 1 file changed, 6 insertions(+) commit a88e2676a6cd3352c2f590f872233d83d8db289c Author: Zhang Shengju Date: Tue Jun 13 22:45:11 2017 +0800 macvlan: propagate the mac address change status for lowerdev The macvlan dev should propagate the return value of mac address change for lower device in the passthru mode, instead of always return 0. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller drivers/net/macvlan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 55ce889f9616d970a3334bf1eaafc8830fb9e024 Merge: b217566 a09c0fc Author: David S. Miller Date: Wed Jun 14 14:26:21 2017 -0400 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 2017-06-13 This series contains updates to ixgbe and ixgbevf only. Jake completes his fix ups for our drivers with the ixgbe changes to resolve a race condition in processing timestamp requests. These fixes are the same fixes Jake applied earlier to the other drivers, including the added statistic to help administrators know when an application timestamp request is ignored. With all the recent ixgbe/ixgbevf changes and fixes, Tony bumps the the driver versions. Then Tony provides a fix to resolve a static analysis warning by changing a variable to unsigned integer since the value can never be negative. Emil fixes an issue for X550 devices where the qde parameter was being ignored, so PFQDE.HIDE_VLAN was not being set. Jeff Mahoney from SuSE fixes a possible kernel crash, where there was a small window where tasks writing to the sriov_numvfs sysfs attribute can sneak in after we call register_netdev(). So we need to call pci_set_drvdata() before and not after register_netdev() to preserve the intent of commit 0fb6a55cc31f ("ixgbe: fix crash on rmmod after probe fail"). ==================== Signed-off-by: David S. Miller commit e2af12bfb0ba198d66acf99e14aedc34244e74dc Author: Hoegeun Kwon Date: Tue Apr 18 17:40:35 2017 +0900 drm/panel: s6e3ha2: Add support for s6e3hf2 panel on TM2e board This patch supports TM2e panel and the panel has 1600x2560 resolution in 5.65" physical. This identify panel type with compatibility string, also invoke display mode that matches the type. So add the check code for s6e3ha2 compatibility and s6e3hf2 type and select the drm_display_mode of default and edge type. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Reviewed-by: Inki Dae [treding@nvidia.com: fixup checkpatch warnings] Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/1492504836-19225-3-git-send-email-hoegeun.kwon@samsung.com drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 64 ++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 7 deletions(-) commit 60ee02bf9a54b925d8b655069ad9a1444667ee40 Author: Hoegeun Kwon Date: Tue Apr 18 17:40:34 2017 +0900 dt-bindings: Add support for samsung s6e3hf2 panel The samsung s6e3hf2 panel is a 5.65" 1600x2560 AMOLED panel connected using MIPI-DSI interfaces. The s6e3hf2 is add to samsung,s6e3ha2.txt binding because it is a panel similar to the s6e3ha2. So add the compatible string and comments. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/1492504836-19225-2-git-send-email-hoegeun.kwon@samsung.com Documentation/devicetree/bindings/display/panel/samsung,s6e3ha2.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ad7fb5a3b89a7a11d3306948c6954de7a999be40 Author: Harsha Priya N Date: Wed Jun 14 10:32:19 2017 -0700 ASoC: Intel: Add Kabylake RT5663+RT5514+MAX98927 machine driver entry This patch adds Kabylake I2S machine driver which uses codecs MAX98927 as speakers and RT5514 as dmic on ssp0 and RT5663 as headset on ssp1. Signed-off-by: Harsha Priya Signed-off-by: Naveen M Acked-By: Vinod Koul sound/soc/intel/skylake/skl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9a90c972b6e5814a5f928f8d5a3d145fa50988b0 Author: Harsha Priya N Date: Wed Jun 14 10:32:18 2017 -0700 ASoC: Intel: Convert all sst_codecs data definition to c99 style C99 style struct initialization helps in readability as well as initialization of variables not specified as NULL. This patch changes the struct data definitions in skl.c that were not in c99 style. Signed-off-by: Harsha Priya Signed-off-by: Naveen M Acked-By: Vinod Koul sound/soc/intel/skylake/skl.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 2a18483a7fb415c0c978f15cc690793b0f7d73e2 Author: Harsha Priya N Date: Wed Jun 14 10:32:17 2017 -0700 ASoC: Intel: Add Kabylake machine driver for RT5514, RT5663 and MAX98927 This patch adds Kabylake I2S machine driver which uses codecs MAX98927 as speakers and RT5514 as dmic on ssp0 and RT5663 as headset on ssp1. Signed-off-by: Harsha Priya Signed-off-by: Hsin-yu Chao Signed-off-by: Naveen M Acked-By: Vinod Koul sound/soc/intel/Kconfig | 15 + sound/soc/intel/boards/Makefile | 2 + .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 640 +++++++++++++++++++++ 3 files changed, 657 insertions(+) commit 2a498168218605f00866db8dd4fbbbbdaf9816f5 Author: Arnd Bergmann Date: Wed Apr 19 20:03:08 2017 +0200 drm/panel: add backlight dependency for sitronix-st7789v Without the dependency, we run into a link error: drivers/gpu/drm/panel/panel-sitronix-st7789v.o: In function `st7789v_probe': panel-sitronix-st7789v.c:(.text.st7789v_probe+0xc0): undefined reference to `of_find_backlight_by_node' Fixes: 7142afb3a186 ("drm/panel: Add driver for sitronix ST7789V LCD controller") Signed-off-by: Arnd Bergmann Reviewed-by: Hoegeun Kwon Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170419180326.303994-1-arnd@arndb.de drivers/gpu/drm/panel/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 93023c14049ef404cfa656c53dcc651bbc46dbc3 Author: Arnd Bergmann Date: Wed Apr 19 19:59:18 2017 +0200 drm/panel: S6E3HA2 needs backlight code The new S6E3HA2 driver fails to link when backlight is disabled: ERROR: "backlight_device_register" [drivers/gpu/drm/panel/panel-samsung-s6e3ha2.ko] undefined! ERROR: "backlight_device_unregister" [drivers/gpu/drm/panel/panel-samsung-s6e3ha2.ko] undefined! This adds a Kconfig dependency like we have it for some other panel drivers. Fixes: ed29f9426d9b ("drm/panel: Add support for S6E3HA2 panel driver on TM2 board") Signed-off-by: Arnd Bergmann Reviewed-by: Hoegeun Kwon Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170419175939.189098-2-arnd@arndb.de drivers/gpu/drm/panel/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 70c0d5b783f518889e1df43dd70260790816b1dc Author: Lucas Stach Date: Thu Jun 8 20:07:58 2017 +0200 drm/panel: simple: add support for AUO P320HVN03 This adds support for the AU Optronics Corporation 31.5" FHD (1920x1080) LVDS TFT LCD panel, which can be supported by the simple panel driver Signed-off-by: Lucas Stach Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170608180758.31020-4-l.stach@pengutronix.de .../bindings/display/panel/auo,p320hvn03.txt | 8 ++++++ drivers/gpu/drm/panel/panel-simple.c | 31 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit 4177fa66a3248e3a5f4b512380a7fc5fce68e76d Author: Lucas Stach Date: Thu Jun 8 20:07:57 2017 +0200 drm/panel: simple: add support for NLT NL192108AC18-02D This adds support for the NLT Technologies NL192108AC18-02D 15.6" LVDS FullHD TFT LCD panel, which can be supported by the simple panel driver. Timings are taken from the preliminary datasheet, as a final one is not yet available. Signed-off-by: Lucas Stach Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170608180758.31020-3-l.stach@pengutronix.de .../display/panel/nlt,nl192108ac18-02d.txt | 8 ++++++ drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit fa9b4b6ff44e2e1747b2f5e5401d4e94b283999c Author: Lucas Stach Date: Thu Jun 8 20:07:56 2017 +0200 dt-bindings: add vendor prefix for NLT Technologies, Ltd. NLT technologies is the former NEC display business, but changed its name to NLT Technologies when forming a joint venture with Shenzhen AVIC OPTOELECTRONICS, Ltd. Signed-off-by: Lucas Stach Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170608180758.31020-2-l.stach@pengutronix.de Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 7f274d54bb664519e62001a4782f5d5f2c95b06e Merge: c96da4d 9842452 Author: Stephen Boyd Date: Wed Jun 14 10:36:30 2017 -0700 Merge tag 'clk-v4.13-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-next Pull samsung clk driver updates from Sylwester Nawrocki - conversion to the clk_hw API - definitions and fixes of exynos5420 SoC audio subsystem related clocks * tag 'clk-v4.13-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: exynos542x: Add EPLL rate table clk: samsung: Add missing exynos5420 audio related clocks clk: samsung: Add enable/disable operation for PLL36XX clocks clk: samsung: s5pv210-audss: Convert to the new clk_hw API clk: samsung: exynos-clkout: Convert to the new clk_hw API clk: samsung: exynos-audss: Convert to the new clk_hw API clk: samsung: Convert common drivers to the new clk_hw API clk: samsung: Add local variable to match its purpose clk: samsung: Remove dead code commit 01bacc13a39d65c052f087180f6c97863282403a Author: Lucas Stach Date: Thu Jun 8 20:07:55 2017 +0200 drm/panel: simple: add support for NEC NL12880B20-05 This adds support for the NEC LCD Technologies, Ltd. 12.1" WXGA (1280x800) LVDS TFT LCD panel, which can be supported by the simple panel driver. Signed-off-by: Lucas Stach Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170608180758.31020-1-l.stach@pengutronix.de .../bindings/display/panel/nec,nl12880b20-05.txt | 8 ++++++ drivers/gpu/drm/panel/panel-simple.c | 30 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit c96da4dd39d43605e45feac2ef733897e97420a8 Merge: b745c07 223c24b Author: Stephen Boyd Date: Wed Jun 14 10:33:04 2017 -0700 Merge tag 'v4.13-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next Pull rockchip clk driver updates from Heiko Stuebner: One new clock controller for the rk3128 soc, a fixup for the rk3228 cpuclk table and the usual bunch of some new clock-ids and some clocks marked as critical. * tag 'v4.13-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: mark some special clk as critical on rk3368 clk: rockchip: mark noc and some special clk as critical on rk3288 clk: rockchip: mark noc and some special clk as critical on rk3228 clk: rockchip: mark pclk_ddrupctl as critical_clock on rk3036 clk: rockchip: add clock controller for rk3128 dt-bindings: add bindings for rk3128 clock controller clk: rockchip: export more rk3228 clocks ids clk: rockchip: add ids for rk3399 testclks used for camera handling clk: rockchip: add dt-binding header for rk3128 clk: rockchip: fix up the RK3228 clk cpu setting table clk: rockchip: add clock-ids for more rk3228 clocks clk: rockchip: add ids for camera on rk3399 commit 14c8f2e9f8eaaed4fdcb2e1358a55b89f9df7c2b Author: Chris Zhong Date: Fri Mar 24 08:51:32 2017 +0800 drm/panel: add Innolux P079ZCA panel driver Support Innolux P079ZCA 7.85" 768x1024 TFT LCD panel, it is a MIPI DSI panel. Signed-off-by: Chris Zhong Reviewed-by: Sean Paul Tested-by: Brian Norris Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/1490316692-20506-2-git-send-email-zyw@rock-chips.com drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-innolux-p079zca.c | 340 ++++++++++++++++++++++++++ 3 files changed, 352 insertions(+) commit ead9d5b1769442ca19daa5da1d43fbf9e391d826 Author: Chris Zhong Date: Fri Mar 24 08:51:31 2017 +0800 dt-bindings: Add INNOLUX P079ZCA panel bindings The Innolux P079ZCA is a 7.85" panel with a 768X1024 resolution and connected to DSI using four lanes. Signed-off-by: Chris Zhong Reviewed-by: Brian Norris Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/1490316692-20506-1-git-send-email-zyw@rock-chips.com .../bindings/display/panel/innolux,p079zca.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit ded7b2aeefaff4e9d52a935e13ff1f1970b7cfda Author: Guodong Xu Date: Wed Jun 14 23:11:06 2017 +0800 regulator: hi6421v530: Describe consumed platform device The hi6421v530-regulator driver consumes a similarly named platform device. Adding that to the module device table, allows modprobe to locate this driver once the device is created. Signed-off-by: Guodong Xu Signed-off-by: Mark Brown drivers/regulator/hi6421v530-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b4cb6f0ab7b0c4dd7f5ba546abcc960caa57aa72 Author: Neil Armstrong Date: Thu Jun 1 17:16:20 2017 +0200 ARM64: defconfig: enable meson SPICC as module This patch enable the SPI Communications Controller driver as module for the Amlogic platform. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 54b00bb94b832a97509f1f2be113c097261fccbf Author: Neil Armstrong Date: Tue Apr 25 09:39:40 2017 +0200 ARM64: defconfig: enable IR core, decoders and Meson IR device This patch enables the MEDIA Infrared RC Decoders and Meson Infrared decoder for ARM64 defconfig. These drivers are selected as modules by default. Signed-off-by: Neil Armstrong [khilman: make RC_CORE modular too] Signed-off-by: Kevin Hilman Signed-off-by: Kevin Hilman arch/arm64/configs/defconfig | 5 +++++ 1 file changed, 5 insertions(+) commit b745c0794e2ff20c7589600f5fa904fc201bcc0c Author: Tero Kristo Date: Tue Jun 13 10:09:27 2017 +0300 clk: keystone: Add sci-clk driver support In K2G, the clock handling is done through firmware executing on a separate core. Linux kernel needs to communicate to the firmware through TI system control interface to access any power management related resources, including clocks. The keystone sci-clk driver does this, by communicating to the firmware through the TI SCI driver. The driver adds support for registering clocks through DT, and basic required clock operations like prepare/get_rate, etc. Signed-off-by: Tero Kristo [sboyd@codeaurora.org: Make ti_sci_init_clocks() static] Signed-off-by: Stephen Boyd MAINTAINERS | 1 + drivers/clk/Kconfig | 8 +- drivers/clk/Makefile | 2 +- drivers/clk/keystone/Kconfig | 15 + drivers/clk/keystone/Makefile | 3 +- drivers/clk/keystone/sci-clk.c | 724 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 744 insertions(+), 9 deletions(-) commit a8feae09110675e77022b6f04ac6d308e842d75d Author: Joe Perches Date: Wed Jun 14 17:40:57 2017 +0200 uvesafb: Fix continuation printks without KERN_LEVEL to pr_cont, neatening Linus recently broke the printk without KERN_CONT behavior. Fix it for uvesafb. While there, convert printk(KERN_ to pr_. Add pr_fmt and remove the embedded prefixes. Miscellanea: o Coalesce formats and realign arguments o Add a missing space to a format when coalescing. Signed-off-by: Joe Perches Cc: Michal Januszewski Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/uvesafb.c | 148 ++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 86 deletions(-) commit 0e25884bbe246d68f1a928a3d5a682ab01a58c83 Author: Arvind Yadav Date: Wed Jun 14 17:40:57 2017 +0200 video: fbdev: sh_mobile_lcdcfb: constify sh_mobile_lcdc_bl_ops. File size before: text data bss dec hex filename 17525 952 0 18477 482d drivers/video/fbdev/sh_mobile_lcdcfb.o File size After adding 'const': text data bss dec hex filename 17557 920 0 18477 482d drivers/video/fbdev/sh_mobile_lcdcfb.o Signed-off-by: Arvind Yadav Cc: geert+renesas@glider.be Cc: keescook@chromium.org Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b543849350d90849719e63ded1b71bc0ee6d9d73 Author: Andy Shevchenko Date: Wed Jun 14 17:40:57 2017 +0200 omapfb: Use sysfs_match_string() helper Use sysfs_match_string() helper instead of open coded variant. Signed-off-by: Andy Shevchenko Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 86388d835e7f98a227e83530fa9b4953193df43a Author: Arvind Yadav Date: Wed Jun 14 17:40:56 2017 +0200 video: fbdev: pxafb: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pxafb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ac5b52d2a2980fe34474e23037b02485c61538a3 Author: Karim Eshapa Date: Wed Jun 14 17:40:56 2017 +0200 video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro. Use time_before_eq() kernel macro for time comparison. Signed-off-by: Karim Eshapa Cc: tomi.valkeinen@ti.com Cc: peter.ujfalusi@ti.com Cc: tj@kernel.org Cc: mingo@kernel.org [b.zolnierkie: patch description fixup] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 927f7a17eb2ecc9b5a3b31a297f08f221b1f531c Author: Jiri Slaby Date: Wed Jun 14 17:40:56 2017 +0200 mdacon: replace MDA_ADDR macro by inline function MDA_ADDR is one of those macros which could be an inline function. So convert MDA_ADDR to mda_addr. Note that we take x and y as unsigned now. But they are absolute coordinates, so this is no problem. Signed-off-by: Jiri Slaby Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/console/mdacon.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 734f13b11d6fcc4947e75f0e11baf29cb3e161eb Author: Jiri Slaby Date: Wed Jun 14 17:40:56 2017 +0200 mdacon: make mda_vram_base u16 * Given every user of mda_vram_base expects a pointer, let mda_vram_base be a pointer to u16. The offset calculation in mda_detect had to be adjusted by / 2 (due to different pointer arithmetic now). We introduce a cast to a value returned from VGA_MAP_MEM. But I will change VGA_MAP_MEM to return a pointer later too. But vgacon needs a similar change first. Signed-off-by: Jiri Slaby Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/console/mdacon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 08cfe9f08109ad7ebe2248d483c683adbb1c9448 Author: Jiri Slaby Date: Wed Jun 14 17:40:55 2017 +0200 mdacon: align code in mda_detect properly This is just a whitespace cleanup. The code was a mess having multiple commands on one line like: scr_writew(0xAA55, p); if (scr_readw(p) == 0xAA55) count++; Indent that properly and make it nicer for reading. Signed-off-by: Jiri Slaby Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/console/mdacon.c | 60 ++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 25 deletions(-) commit cd307124ad9bb01019920c2053696218d161f4a1 Author: Dan Carpenter Date: Fri May 5 08:37:23 2017 +0300 firmware: tegra: Fix locking bugs in BPMP There are a bunch of error paths were we don't unlock the bpmp->threaded lock. Also if __tegra_bpmp_channel_write() fails then we returned success instead of an error code. Fixes: 983de5f97169 ("firmware: tegra: Add BPMP support") Signed-off-by: Dan Carpenter Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit ad8046a56da562677f41ca3a6d1a93619dbb0f97 Author: Steve Longerbeam Date: Mon Jun 12 11:24:04 2017 -0700 ARM: dts: imx6-sabreauto: add the ADV7180 video decoder Enables the ADV7180 decoder sensor. The ADV7180 connects to the parallel-bus mux input on ipu1_csi0_mux. The ADV7180 power pin is via max7310_b port expander. Changes from Tim Harvey: - Use IRQ_TYPE_LEVEL_LOW instead of 0x8 for interrupt type for clarity. - For 8-bit parallel IPU1-CSI0 bus connection only data[12-19] are used. Signed-off-by: Steve Longerbeam Signed-off-by: Tim Harvey Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit ba4105401a893c429a2542f3f33bb7fb813dd5c9 Author: Steve Longerbeam Date: Mon Jun 12 11:24:03 2017 -0700 ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture Add pinctrl groups for both GPT input capture channels. Signed-off-by: Steve Longerbeam Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f9f1353b7508d133e4359f703ec06827dd0be26e Author: Steve Longerbeam Date: Mon Jun 12 11:24:02 2017 -0700 ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b The reset pin to the port expander chip (MAX7310) is controlled by a gpio, so define a reset-gpios property to control it. There are three MAX7310's on the SabreAuto CPU card (max7310_[abc]), but all use the same pin for their reset. Since all can't acquire the same pin, assign it to max7310_b, that chip is needed by more functions (usb and adv7180). Signed-off-by: Steve Longerbeam Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9976c92df9c347acd9726f5c187705f191d51999 Author: Steve Longerbeam Date: Mon Jun 12 11:24:01 2017 -0700 ARM: dts: imx6-sabreauto: create i2cmux for i2c3 The sabreauto uses a steering pin to select between the SDA signal on i2c3 bus, and a data-in pin for an SPI NOR chip. Use i2cmux to control this steering pin. Idle state of the i2cmux selects SPI NOR. This is not a classic way to use i2cmux, since one side of the mux selects something other than an i2c bus, but it works and is probably the cleanest solution. Note that if one thread is attempting to access SPI NOR while another thread is accessing i2c3, the SPI NOR access will fail since the i2cmux has selected the SDA pin rather than SPI NOR data-in. This couldn't be avoided in any case, the board is not designed to allow concurrent i2c3 and SPI NOR functions (and the default device-tree does not enable SPI NOR anyway). Devices hanging off i2c3 should now be defined under i2cmux, so that the steering pin can be properly controlled to access those devices. The port expanders (MAX7310) are thus moved into i2cmux. Signed-off-by: Steve Longerbeam Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 65 +++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 21 deletions(-) commit 545fb52e53d6dfa9e64e0a10c336d8473319d077 Author: Steve Longerbeam Date: Mon Jun 12 11:24:00 2017 -0700 ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors Enables the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor. The OV5642 connects to the parallel-bus mux input port on ipu1_csi0_mux. The OV5640 connects to the input port on the MIPI CSI-2 receiver on mipi_csi. Until the OV5652 sensor module compatible with the SabreSD becomes available for testing, the ov5642 node is currently disabled. Signed-off-by: Steve Longerbeam Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-sabresd.dts | 5 ++ arch/arm/boot/dts/imx6q-sabresd.dts | 5 ++ arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 114 ++++++++++++++++++++++++++++++++- 3 files changed, 123 insertions(+), 1 deletion(-) commit 789459c41cae9c52e8c16ff9557e53487c243e6d Author: Steve Longerbeam Date: Mon Jun 12 11:23:59 2017 -0700 ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors Adds the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor. Both hang off the same i2c2 bus, so they require different (and non- default) i2c slave addresses. The OV5642 connects to the parallel-bus mux input port on ipu1_csi0_mux. The OV5640 connects to the input port on the MIPI CSI-2 receiver on mipi_csi. The OV5642 node is disabled temporarily while the subdev driver is cleaned up and submitted later. Signed-off-by: Steve Longerbeam Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-sabrelite.dts | 5 ++ arch/arm/boot/dts/imx6q-sabrelite.dts | 5 ++ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 148 +++++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+) commit 4c8777892e80bbe39efd0584502793b4b244f99b Author: Steve Longerbeam Date: Mon Jun 12 11:23:58 2017 -0700 ARM: dts: imx6qdl-sabrelite: remove erratum ERR006687 workaround There is a pin conflict with GPIO_6. This pin functions as a power input pin to the OV5642 camera sensor, but ENET uses it as the h/w workaround for erratum ERR006687, to wake-up the ARM cores on normal RX and TX packet done events. So we need to remove the h/w workaround to support the OV5642. The result is that the CPUidle driver will no longer allow entering the deep idle states on the sabrelite. This is a partial revert of commit 6261c4c8f13e ("ARM: dts: imx6qdl-sabrelite: use GPIO_6 for FEC interrupt.") commit a28eeb43ee57 ("ARM: dts: imx6: tag boards that have the HW workaround for ERR006687") Signed-off-by: Steve Longerbeam Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit d72ee3a12b9a1c43dbe412ef799df341d8161dd0 Author: Steve Longerbeam Date: Mon Jun 12 11:23:57 2017 -0700 ARM: dts: imx6qdl: add capture-subsystem device Signed-off-by: Steve Longerbeam Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl.dtsi | 5 +++++ arch/arm/boot/dts/imx6q.dtsi | 5 +++++ 2 files changed, 10 insertions(+) commit 2539f517acbdc8471f0aebdffe894eb571103368 Author: Philipp Zabel Date: Mon Jun 12 11:23:56 2017 -0700 ARM: dts: imx6qdl: Add video multiplexers, mipi_csi, and their connections This patch adds the device tree graph connecting the input multiplexers to the IPU CSIs and the MIPI-CSI2 gasket on i.MX6. The MIPI_IPU multiplexers are added as children of the iomuxc-gpr syscon device node. On i.MX6Q/D two two-input multiplexers in front of IPU1 CSI0 and IPU2 CSI1 allow to select between CSI0/1 parallel input pads and the MIPI CSI-2 virtual channels 0/3. On i.MX6DL/S two five-input multiplexers in front of IPU1 CSI0 and IPU1 CSI1 allow to select between CSI0/1 parallel input pads and any of the four MIPI CSI-2 virtual channels. Changes from Steve Longerbeam: - Removed some dangling/unused endpoints (ipu2_csi0_from_csi2ipu) - Renamed the mipi virtual channel endpoint labels, from "mipi_csiX_..." to "mipi_vcX...". - Added input endpoint anchors to the video muxes for the connections from parallel sensors. Signed-off-by: Philipp Zabel Signed-off-by: Steve Longerbeam Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl.dtsi | 174 +++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6q.dtsi | 110 ++++++++++++++++++++++++++ arch/arm/boot/dts/imx6qdl.dtsi | 6 ++ 3 files changed, 290 insertions(+) commit b0cb1bd4a380da07ef9536054f37f2cd9a777384 Author: Steve Longerbeam Date: Mon Jun 12 11:23:55 2017 -0700 ARM: dts: imx6qdl: Add compatible, clocks, irqs to MIPI CSI-2 node Add to the MIPI CSI2 receiver node: compatible strings, interrupt sources, and clocks. Signed-off-by: Steve Longerbeam Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit bc97e88ecd360a730b0f9c96f285b680be496e06 Author: Philipp Zabel Date: Mon Jun 12 11:23:54 2017 -0700 ARM: dts: imx6qdl: add multiplexer controls The IOMUXC General Purpose Register space contains various bitfields that control video bus multiplexers. Describe them using a mmio-mux node. The placement of the IPU CSI video mux controls differs between i.MX6D/Q and i.MX6S/DL. Signed-off-by: Philipp Zabel Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl.dtsi | 10 ++++++++++ arch/arm/boot/dts/imx6q.dtsi | 10 ++++++++++ arch/arm/boot/dts/imx6qdl.dtsi | 7 ++++++- 3 files changed, 26 insertions(+), 1 deletion(-) commit 375b6755a5b1836699d00c47f689d63bd1e40b95 Author: Yuantian Tang Date: Wed Jun 7 14:32:48 2017 +0800 arm64: dts: ls1088a: update sata node 1. Remove ls1043a compatible string from node 2. Fix the sata ecc register address error Signed-off-by: Tang Yuantian Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f6e9217dbae5e6979b0c16d5fd448dd865b2f78 Author: Yuantian Tang Date: Wed Jun 7 14:32:47 2017 +0800 dt-bindings: ahci-fsl-qoriq: add ls1088a chip name to the list Signed-off-by: Tang Yuantian Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 047385b3dd85622768a882fc457a37e040640389 Author: Dan Carpenter Date: Wed Jun 14 08:22:55 2017 -0600 dm: missing break in process_queued_bios() his used to be a fall through case, but we shifted code around and I think we want a break here now. Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t") Signed-off-by: Dan Carpenter Acked-by: Mike Snitzer Signed-off-by: Jens Axboe drivers/md/dm-mpath.c | 1 + 1 file changed, 1 insertion(+) commit 5b45fe6b39e1d01c45de7b8e6d3ff72585eee6cf Merge: 34bf129 32c1431 Author: Bartlomiej Zolnierkiewicz Date: Wed Jun 14 16:12:40 2017 +0200 Merge tag 'v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next Linux 4.12-rc5 commit f73127356f344483c82632accda2e72b7e0e5f25 Author: Jeff Layton Date: Wed Jun 14 09:11:54 2017 -0400 fs/fcntl: return -ESRCH in f_setown when pid/pgid can't be found The current implementation of F_SETOWN doesn't properly vet the argument passed in and only returns an error if INT_MIN is passed in. If the argument doesn't specify a valid pid/pgid, then we just end up cleaning out the file->f_owner structure. What we really want is to only clean that out only in the case where userland passed in an argument of 0. For anything else, we want to return ESRCH if it doesn't refer to a valid pid. The relevant POSIX spec page is here: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html Cc: Jiri Slaby Cc: zhong jiang Signed-off-by: Jeff Layton fs/fcntl.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 9ee82d783eef3177928a586c1df3f08d9ced72a8 Author: Chris Wilson Date: Thu May 18 10:46:18 2017 +0100 drm/i915: Reinstate reservation_object zapping for batch_pool objects I removed the zapping of the reservation_object->fence array of shared fences prematurely. We don't yet have the code to zap that array when retiring the object, and so currently it remains possible to continually grow the shared array trapping requests when reusing the batch_pool object across many timelines. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170518094638.5469-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_batch_pool.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit fc3dc67471461c0efcb1ed22fb7595121d65fad9 Author: Jiri Slaby Date: Tue Jun 13 13:35:51 2017 +0200 fs/fcntl: f_setown, avoid undefined behaviour fcntl(0, F_SETOWN, 0x80000000) triggers: UBSAN: Undefined behaviour in fs/fcntl.c:118:7 negation of -2147483648 cannot be represented in type 'int': CPU: 1 PID: 18261 Comm: syz-executor Not tainted 4.8.1-0-syzkaller #1 ... Call Trace: ... [] ? f_setown+0x1d8/0x200 [] ? SyS_fcntl+0x999/0xf30 [] ? entry_SYSCALL_64_fastpath+0x23/0xc1 Fix that by checking the arg parameter properly (against INT_MAX) before "who = -who". And return immediatelly with -EINVAL in case it is wrong. Note that according to POSIX we can return EINVAL: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html [EINVAL] The cmd argument is F_SETOWN and the value of the argument is not valid as a process or process group identifier. [v2] returns an error, v1 used to fail silently [v3] implement proper check for the bad value INT_MIN Signed-off-by: Jiri Slaby Cc: Jeff Layton Cc: "J. Bruce Fields" Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Jeff Layton fs/fcntl.c | 4 ++++ 1 file changed, 4 insertions(+) commit 393cc3f51135ea2520521f776ef3afdf3395c797 Author: Jiri Slaby Date: Tue Jun 13 13:35:50 2017 +0200 fs/fcntl: f_setown, allow returning error Allow f_setown to return an error value. We will fail in the next patch with EINVAL for bad input to f_setown, so tile the path for the later patch. Signed-off-by: Jiri Slaby Reviewed-by: Jeff Layton Cc: Jeff Layton Cc: "J. Bruce Fields" Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Jeff Layton fs/fcntl.c | 7 ++++--- include/linux/fs.h | 2 +- net/socket.c | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 25bfee16d5a3158086273cc51110c7470144c842 Author: Bjorn Andersson Date: Sat May 27 16:14:04 2017 -0700 mailbox: Introduce Qualcomm APCS IPC driver This implements a driver that exposes the IPC bits found in the APCS Global block in various Qualcomm platforms. The bits are used to signal inter-processor communication signals from the application CPU to other masters. Signed-off-by: Bjorn Andersson Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 8 ++ drivers/mailbox/Makefile | 2 + drivers/mailbox/qcom-apcs-ipc-mailbox.c | 129 ++++++++++++++++++++++++++++++++ 3 files changed, 139 insertions(+) commit f16c176e58d50e21d8b29323beee95e0771b1281 Author: Bjorn Andersson Date: Sat May 27 16:14:03 2017 -0700 dt-bindings: mailbox: Introduce Qualcomm APCS global binding Introduce a binding for the Qualcomm APCS global block, exposing a mailbox for invoking interrupts on remote processors in the system. Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Signed-off-by: Jassi Brar .../bindings/mailbox/qcom,apcs-kpss-global.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit b7133d6fcd9a9eb4633357d4a27430d4e0c794ad Author: Bjorn Andersson Date: Sat May 27 16:14:02 2017 -0700 mailbox: Make startup and shutdown ops optional Some mailbox hardware doesn't have to perform any additional operations on startup of shutdown, so make these optional. Signed-off-by: Bjorn Andersson Signed-off-by: Jassi Brar drivers/mailbox/mailbox.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit ff0abed4922ffbd40dc4e5a78b8ea56a5eb68ec7 Author: Chris Packham Date: Wed Jun 7 11:54:59 2017 +1200 EDAC, altera: Simplify calculation of total memory Use of_address_to_resource() and resource_size() instead of manually parsing the "reg" property from the "memory" node(s). Signed-off-by: Chris Packham Tested-by: Thor Thayer Cc: linux-edac Link: http://lkml.kernel.org/r/20170606235500.22772-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Borislav Petkov drivers/edac/altera_edac.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit ba61faf0d75df9537393b2b796df41c30dcfcce7 Author: Takashi Sakamoto Date: Wed Jun 14 19:30:04 2017 +0900 ALSA: pcm: remove SNDRV_PCM_IOCTL1_GSTATE internal command SNDRV_PCM_IOCTL1_GSTATE was firstly introduced in v0.9.0, however never be used and the purpose is missing. This commit removes the long-abandoned command, bye. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/pcm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e11f0f90a626f93899687b1cc909ee37dd6c5809 Author: Takashi Sakamoto Date: Wed Jun 14 19:30:03 2017 +0900 ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO internal command Drivers can implement 'struct snd_pcm_ops.ioctl' to handle some requests from ALSA PCM core. These requests are internal purpose in kernel land. Usually common set of operations are used for it. SNDRV_PCM_IOCTL1_INFO is one of the requests. According to code comment, it has been obsoleted in the old days. We can see old releases in ftp.alsa-project.org. The command was firstly introduced in v0.5.0 release as SND_PCM_IOCTL1_INFO, to allow drivers to fill data of 'struct snd_pcm_channel_info' type. In v0.9.0 release, this was obsoleted by the other commands for ioctl(2) such as SNDRV_PCM_IOCTL_CHANNEL_INFO. This commit removes the long-abandoned command, bye. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/pcm.h | 2 +- sound/core/pcm_lib.c | 2 -- sound/core/pcm_native.c | 6 +----- 3 files changed, 2 insertions(+), 8 deletions(-) commit 92c8f7c0e109d2fcff607a13dd7c1437d6c9f87a Author: Alexandre Belloni Date: Tue Jun 13 22:24:39 2017 +0200 tty/serial: atmel: make the driver DT only Now that AVR32 is gone, platform_data are not used to initialize the driver anymore, remove that path from the driver. Also remove the now unused struct atmel_uart_data. Signed-off-by: Alexandre Belloni Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 96 +++++++++++++------------------------ include/linux/platform_data/atmel.h | 10 ---- 2 files changed, 33 insertions(+), 73 deletions(-) commit 274a5ed6d8ca16f65bccdce95a14ecf29ff81764 Author: Alexandre Belloni Date: Tue Jun 13 22:24:38 2017 +0200 tty/serial: atmel: remove atmel_default_console_device handling atmel_default_console_device was only used by AVR32, in particular arch/avr32/mach-at32ap/at32ap700x.c which is now gone. Remove it from the driver. Signed-off-by: Alexandre Belloni Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 43 --------------------------------------- 1 file changed, 43 deletions(-) commit d567b0fe2d63aaf5814f1b488a1b05db53f1849e Author: Aliaksei Karaliou Date: Tue Jun 13 13:06:21 2017 +0300 staging: android: ion: Improve memory alloc style Use variable name instead of structure name to get size of memory to allocate as proposed by checkpatch.pl Signed-off-by: Aliaksei Karaliou Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_system_heap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1dbc269e95f34cc071c33db6cd02a5f5f746226e Author: Roman Storozhenko Date: Tue Jun 13 13:04:36 2017 +0300 staging: lustre: llite: Replace the symbolic file permission mode with the numeric one Replaces S_IRWXUGO with 0777. The reason is that symbolic permissions considered harmful: https://lwn.net/Articles/696229/ Signed-off-by: Roman Storozhenko Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1802d96eb6f9548474e03acd1e28d71d0981290c Author: Gabriel L. Somlo Date: Tue Jun 13 09:51:25 2017 -0400 staging: fsl-mc: fix typo in comment Resolving checkpatch issue: CHECK: 'successfuly' may be misspelled - perhaps 'successfully'? Signed-off-by: Gabriel Somlo Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 845086076a138bb6dc971df9905504c7de33bcca Author: Fabian Wolff Date: Tue Jun 13 23:01:52 2017 +0200 staging: rtl8723bs: wifi_regd.c: insert blank line after declarations This patch inserts a missing blank line after variable declarations. Signed-off-by: Fabian Wolff Signed-off-by: Mate Horvath Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 1 + 1 file changed, 1 insertion(+) commit 2b385530ce3aabbca7887de3aa6e137da4631f1b Author: Fabian Wolff Date: Tue Jun 13 23:01:51 2017 +0200 staging: rtl8723bs: wifi_regd.c: adjust alignment to match open parenthesis This patch adjusts the alignment of several lines to match their respective opening parenthesis. Signed-off-by: Fabian Wolff Signed-off-by: Mate Horvath Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4276cfd3e2cd22b0cf20deb13395790e52d61b82 Author: Fabian Wolff Date: Tue Jun 13 23:01:50 2017 +0200 staging: rtl8723bs: wifi_regd.c: remove superfluous spaces from pointer arguments This patch implements the suggestions of checkpatch.pl to remove unnecessary spaces before function pointer arguments as well as in statements of the form "foo * bar" (which should be "foo *bar"). Signed-off-by: Fabian Wolff Signed-off-by: Mate Horvath Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7bb619813a497478cde5d8ecbc180140986e31df Author: Fabian Wolff Date: Tue Jun 13 23:01:49 2017 +0200 staging: rtl8723bs: wifi_regd.c: fix comment formatting This patch improves the formatting of block comments and removes one commented-out line of code entirely (keeping it would be redundant thanks to version control). Signed-off-by: Fabian Wolff Signed-off-by: Mate Horvath Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a7941a08518959e07bdf6de8dc1c5dcd365fcaca Author: Fabian Wolff Date: Tue Jun 13 23:01:48 2017 +0200 staging: rtl8723bs: wifi_regd.c: put spaces around binary operators This patch adds spaces around the binary operators '-' and '+'. Signed-off-by: Fabian Wolff Signed-off-by: Mate Horvath Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0a3bbcbdf20b9d9a193edb954f77add55c81d5a2 Author: Olav Haugan Date: Tue Jun 13 14:14:46 2017 -0700 staging: wlan-ng: prism2mib.c: Fix type cast issues Fix the following sparse warnings: prism2mib.c:717:45: warning: cast to restricted __le16 prism2mib.c:720:45: warning: incorrect type in assignment (different base types) prism2mib.c:720:45: expected unsigned short [unsigned] [addressable] [usertype] datalen prism2mib.c:720:45: got restricted __le16 [usertype] prism2mib.c:755:22: warning: incorrect type in assignment (different base types) prism2mib.c:755:22: expected unsigned short [unsigned] [usertype] len prism2mib.c:755:22: got restricted __le16 [usertype] Signed-off-by: Olav Haugan Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/prism2mib.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit c477990295a78f1248283322bd1ad964c22151bc Author: Linus Walleij Date: Tue Jun 13 23:48:13 2017 +0200 clocksource/drivers/fttmr010: Factor out clock read code The sched_clock() and delay timer callbacks can just call each other and we can save an #ifdef. Suggested-by: Daniel Lezcano Cc: Andrew Jeffery Cc: Joel Stanley Cc: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 385c98fcc1fb58c3e10157be2203eb37595dac7b Author: Linus Walleij Date: Sun Jun 11 23:26:17 2017 +0200 clocksource/drivers/fttmr010: Implement delay timer This timer is often used on the ARM architecture, so as with so many siblings, we can implement delay timers, removing the need for the system to calibrate jiffys at boot, and potentially handling CPU frequency scaling on targets. We cannot just protect the Kconfig with a "depends on ARM" because it is already known that different architectures are using Faraday IP blocks, so it is better to make things open-ended and use Result on boot dmesg: Switching to timer-based delay loop, resolution 40n Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000) This is accurately the timer frequency, 250MHz on the APB bus. Cc: Andrew Jeffery Cc: Joel Stanley Cc: Jonas Jensen Signed-off-by: Linus Walleij Tested-by: Jonas Jensen Tested-by: Andrew Jeffery Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit dc11bae78529526605c5c45c369c9512fd012093 Author: Daniel Lezcano Date: Mon Jun 5 00:18:43 2017 +0200 clocksource/drivers: Add timer-of common init routine The different drivers are all using the same pattern when initializing. 1. Get the base address 2. Get the irq number 3. Get the clock 4. Prepare and enable the clock 5. Get the rate 6. Request an interrupt Instead of repeating again and again these steps in all the drivers, let's provide a common init routine to give the opportunity to factor all of them out. We can expect a significant kernel size improvement when the common routine will be used in all the drivers. Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 1 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-of.c | 172 +++++++++++++++++++++++++++++++++++++++++ drivers/clocksource/timer-of.h | 69 +++++++++++++++++ 4 files changed, 243 insertions(+) commit 2a515e5d7c52d5cf1e9153cb03efa133e3459c88 Author: Alexandre Belloni Date: Fri May 12 20:22:51 2017 +0200 clocksource/drivers/tcb_clksrc: Save timer context on suspend/resume On sama5d2, power to the core may be cut while entering suspend mode. It is necessary to save and restore the TCB registers. Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano drivers/clocksource/tcb_clksrc.c | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 740e237add571a125f1c2a110ba6aa77db7d2c69 Author: Linus Walleij Date: Sun Jun 11 23:26:16 2017 +0200 clocksource/drivers/fttmr010: Optimize sched_clock() The sched_clock() call should be really fast so we want to avoid an extra if() clause on the read path if possible. Implement two sched_clock_read() functions, one if the timer counts up and one if it counts down. Incidentally this also mirrors how clocksource_mmio_init() works and make things simple and easy to understand. Suggested-by: Daniel Lezcano Cc: Andrew Jeffery Cc: Joel Stanley Cc: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 8b7a3b568814a8e36d2910dd74465b0215aa0a31 Author: Daniel Lezcano Date: Tue May 30 08:35:40 2017 +0200 clocksource/drivers: Add an alias macro CLOCKSOURCE_OF_DECLARE The macro CLOCKSOURCE_OF_DECLARE has been rename to TIMER_OF_DECLARE. In order to prevent conflicts for the next merge window, a temporary alias has been added which will be removed later. Cc: Arnd Bergman Signed-off-by: Daniel Lezcano include/linux/clocksource.h | 3 +++ 1 file changed, 3 insertions(+) commit fa1bffab268723d40ae06e855898f7e8361487e9 Author: Daniel Lezcano Date: Fri May 26 19:40:24 2017 +0200 clocksource/drivers: Rename CLKSRC_ACPI to TIMER_ACPI The config option name is now renamed to 'TIMER_ACPI' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: Daniel Lezcano Reviewed-by: Linus Walleij drivers/clocksource/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb0eb050a577a866cb47c2dc37596f1207f4c2d9 Author: Daniel Lezcano Date: Fri May 26 19:34:11 2017 +0200 clocksource/drivers: Rename CLKSRC_OF to TIMER_OF The config option name is now renamed to 'TIMER_OF' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: Daniel Lezcano Reviewed-by: Linus Walleij arch/arm/Kconfig | 10 +++--- arch/arm/mach-bcm/Kconfig | 2 +- arch/arm/mach-clps711x/Kconfig | 2 +- arch/arm/mach-s3c24xx/Kconfig | 2 +- arch/arm/mach-s3c64xx/Kconfig | 2 +- arch/arm64/Kconfig.platforms | 4 +-- arch/h8300/Kconfig | 2 +- arch/microblaze/Kconfig | 2 +- arch/mips/ralink/Kconfig | 2 +- arch/nios2/Kconfig | 2 +- arch/sh/boards/Kconfig | 2 +- drivers/clocksource/Kconfig | 60 ++++++++++++++++----------------- drivers/clocksource/Makefile | 2 +- drivers/clocksource/clksrc-probe.c | 55 ------------------------------ drivers/clocksource/clps711x-timer.c | 2 +- drivers/clocksource/samsung_pwm_timer.c | 2 +- drivers/clocksource/timer-probe.c | 55 ++++++++++++++++++++++++++++++ include/asm-generic/vmlinux.lds.h | 2 +- include/linux/clocksource.h | 2 +- 19 files changed, 106 insertions(+), 106 deletions(-) commit 2fcc112af37fa88f8da077d6dd3bb8e38e75adb1 Author: Daniel Lezcano Date: Fri May 26 18:33:27 2017 +0200 clocksource/drivers: Rename clksrc table to timer The table name is now renamed to 'timer' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: Daniel Lezcano Reviewed-by: Linus Walleij drivers/clocksource/clksrc-probe.c | 18 +++++++++--------- include/asm-generic/vmlinux.lds.h | 7 ++++--- include/linux/clocksource.h | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) commit 616c3b15f596e1f1e6c2537a1ad3492052eecba6 Author: Kuninori Morimoto Date: Wed Jun 14 00:35:47 2017 +0000 ASoC: audio-graph-scu-card: use asoc_simple_card_of_parse_tdm() Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-scu-card.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c98907d59594827535b492309a145ac9c758fb4c Author: Kuninori Morimoto Date: Wed Jun 14 00:35:30 2017 +0000 ASoC: audio-graph-card: use asoc_simple_card_of_parse_tdm() Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 77b713b52878fbe21d9d5339cc42fbec3202392e Author: Kuninori Morimoto Date: Wed Jun 14 00:35:13 2017 +0000 ASoC: simple-scu-card: use asoc_simple_card_of_parse_tdm() Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit b93d2cf8c0facb593d6f008af30ae0fcd1d49ede Author: Kuninori Morimoto Date: Wed Jun 14 00:34:53 2017 +0000 ASoC: simple-card: use asoc_simple_card_of_parse_tdm() Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit e68ba207444354ddf295de2e7fbcc97c06cccc8b Author: Kuninori Morimoto Date: Wed Jun 14 00:34:35 2017 +0000 ASoC: simple-card-utils: add asoc_simple_card_of_parse_tdm() Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 77d62f532282010d5859a99819d6a0c233bfcfff Author: Daniel Lezcano Date: Fri May 26 17:42:25 2017 +0200 clocksource/drivers: Rename CLOCKSOURCE_ACPI_DECLARE to TIMER_ACPI_DECLARE The macro name is now renamed to 'TIMER_ACPI_DECLARE' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: Daniel Lezcano Reviewed-by: Linus Walleij drivers/clocksource/arm_arch_timer.c | 2 +- include/linux/clocksource.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ba5d08c0ea785d5710c5a1e7dc3182b7124d63c0 Author: Daniel Lezcano Date: Fri May 26 17:40:46 2017 +0200 clocksource/drivers: Rename clocksource_probe to timer_probe The function name is now renamed to 'timer_probe' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Acked-by: Heiko Stuebner Reviewed-by: Linus Walleij arch/arc/kernel/setup.c | 2 +- arch/arm/kernel/time.c | 2 +- arch/arm/mach-mediatek/mediatek.c | 2 +- arch/arm/mach-omap2/timer.c | 10 +++++----- arch/arm/mach-rockchip/rockchip.c | 2 +- arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +- arch/arm/mach-spear/spear13xx.c | 2 +- arch/arm/mach-sunxi/sunxi.c | 2 +- arch/arm/mach-u300/core.c | 2 +- arch/arm/mach-zynq/common.c | 2 +- arch/arm64/kernel/time.c | 2 +- arch/h8300/kernel/setup.c | 2 +- arch/microblaze/kernel/setup.c | 2 +- arch/mips/generic/init.c | 2 +- arch/mips/mti-malta/malta-time.c | 2 +- arch/mips/pic32/pic32mzda/time.c | 2 +- arch/mips/pistachio/time.c | 2 +- arch/mips/ralink/clk.c | 2 +- arch/mips/ralink/timer-gic.c | 2 +- arch/mips/xilfpga/time.c | 2 +- arch/nios2/kernel/time.c | 2 +- arch/sh/boards/of-generic.c | 2 +- arch/xtensa/kernel/time.c | 2 +- drivers/clocksource/clksrc-probe.c | 2 +- include/linux/clocksource.h | 4 ++-- 25 files changed, 30 insertions(+), 30 deletions(-) commit 1727339590fdb5a1ded881b540cd32121278d414 Author: Daniel Lezcano Date: Fri May 26 16:56:11 2017 +0200 clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE The CLOCKSOURCE_OF_DECLARE macro is used widely for the timers to declare the clocksource at early stage. However, this macro is also used to initialize the clockevent if any, or the clockevent only. It was originally suggested to declare another macro to initialize a clockevent, so in order to separate the two entities even they belong to the same IP. This was not accepted because of the impact on the DT where splitting a clocksource/clockevent definition does not make sense as it is a Linux concept not a hardware description. On the other side, the clocksource has not interrupt declared while the clockevent has, so it is easy from the driver to know if the description is for a clockevent or a clocksource, IOW it could be implemented at the driver level. So instead of dealing with a named clocksource macro, let's use a more generic one: TIMER_OF_DECLARE. The patch has not functional changes. Signed-off-by: Daniel Lezcano Acked-by: Heiko Stuebner Acked-by: Neil Armstrong Acked-by: Arnd Bergmann Acked-by: Matthias Brugger Reviewed-by: Linus Walleij arch/arm/kernel/smp_twd.c | 6 +++--- arch/microblaze/kernel/timer.c | 2 +- arch/mips/ralink/cevt-rt3352.c | 2 +- arch/nios2/kernel/time.c | 2 +- drivers/clocksource/arc_timer.c | 6 +++--- drivers/clocksource/arm_arch_timer.c | 6 +++--- drivers/clocksource/arm_global_timer.c | 2 +- drivers/clocksource/armv7m_systick.c | 2 +- drivers/clocksource/asm9260_timer.c | 2 +- drivers/clocksource/bcm2835_timer.c | 2 +- drivers/clocksource/bcm_kona_timer.c | 4 ++-- drivers/clocksource/cadence_ttc_timer.c | 2 +- drivers/clocksource/clksrc-dbx500-prcmu.c | 2 +- drivers/clocksource/clksrc_st_lpc.c | 2 +- drivers/clocksource/clps711x-timer.c | 2 +- drivers/clocksource/dw_apb_timer_of.c | 8 ++++---- drivers/clocksource/exynos_mct.c | 4 ++-- drivers/clocksource/fsl_ftm_timer.c | 2 +- drivers/clocksource/h8300_timer16.c | 2 +- drivers/clocksource/h8300_timer8.c | 2 +- drivers/clocksource/h8300_tpu.c | 2 +- drivers/clocksource/jcore-pit.c | 2 +- drivers/clocksource/meson6_timer.c | 2 +- drivers/clocksource/mips-gic-timer.c | 2 +- drivers/clocksource/mps2-timer.c | 2 +- drivers/clocksource/mtk_timer.c | 2 +- drivers/clocksource/mxs_timer.c | 2 +- drivers/clocksource/nomadik-mtu.c | 2 +- drivers/clocksource/pxa_timer.c | 2 +- drivers/clocksource/qcom-timer.c | 4 ++-- drivers/clocksource/renesas-ostm.c | 2 +- drivers/clocksource/rockchip_timer.c | 4 ++-- drivers/clocksource/samsung_pwm_timer.c | 8 ++++---- drivers/clocksource/sun4i_timer.c | 2 +- drivers/clocksource/tango_xtal.c | 2 +- drivers/clocksource/tegra20_timer.c | 4 ++-- drivers/clocksource/time-armada-370-xp.c | 6 +++--- drivers/clocksource/time-efm32.c | 4 ++-- drivers/clocksource/time-lpc32xx.c | 2 +- drivers/clocksource/time-orion.c | 2 +- drivers/clocksource/time-pistachio.c | 2 +- drivers/clocksource/timer-atlas7.c | 2 +- drivers/clocksource/timer-atmel-pit.c | 2 +- drivers/clocksource/timer-atmel-st.c | 2 +- drivers/clocksource/timer-digicolor.c | 2 +- drivers/clocksource/timer-fttmr010.c | 10 +++++----- drivers/clocksource/timer-imx-gpt.c | 24 ++++++++++++------------ drivers/clocksource/timer-integrator-ap.c | 2 +- drivers/clocksource/timer-keystone.c | 2 +- drivers/clocksource/timer-nps.c | 6 +++--- drivers/clocksource/timer-oxnas-rps.c | 4 ++-- drivers/clocksource/timer-prima2.c | 2 +- drivers/clocksource/timer-sp804.c | 4 ++-- drivers/clocksource/timer-stm32.c | 2 +- drivers/clocksource/timer-sun5i.c | 4 ++-- drivers/clocksource/timer-ti-32k.c | 2 +- drivers/clocksource/timer-u300.c | 2 +- drivers/clocksource/versatile.c | 4 ++-- drivers/clocksource/vf_pit_timer.c | 2 +- drivers/clocksource/vt8500_timer.c | 2 +- drivers/clocksource/zevio-timer.c | 2 +- include/linux/clocksource.h | 2 +- 62 files changed, 103 insertions(+), 103 deletions(-) commit a83ac4860925e1d0a7e38e7bea331fd2f2e0460d Author: Kuninori Morimoto Date: Wed Jun 14 00:31:06 2017 +0000 ASoC: ak4613: add missing 64000 in ak4613_dai_hw_params() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 1 + 1 file changed, 1 insertion(+) commit 290271de34f6c22ec2337e3293224575459747d6 Author: Chris Wilson Date: Fri Jun 9 12:03:49 2017 +0100 drm/i915: Spin for struct_mutex inside shrinker Having resolved whether or not we would deadlock upon a call to mutex_lock(&dev->struct_mutex), we can then spin for the contended struct_mutex if we are not the owner. We cannot afford to simply block and wait for the mutex, as the owner may itself be waiting for the allocator -- i.e. a cyclic deadlock. This should significantly improve the chance of running the shrinker for other processes whilst the GPU is busy. A more balanced approach would be to optimistically spin whilst the mutex owner was on the cpu and there was an opportunity to acquire the mutex for ourselves quickly. However, that requires support from kernel/locking/ and a new mutex_spin_trylock() primitive. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170609110350.1767-4-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_shrinker.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit d565ed38d045793b76f022565a50793a3535bdbd Author: Greg Kroah-Hartman Date: Wed Jun 14 11:54:29 2017 +0200 arm: mach-rpc: ecard: fix build error The last commit from me had a missing ';' which broke the build. Thanks to Arnd for pointing out the issue. Reported-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman arch/arm/mach-rpc/ecard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 133e4455c9b49071906775319e2e6d083a4f024d Author: Qiuxu Zhuo Date: Thu Jun 8 19:33:51 2017 +0800 EDAC, sb_edac: Avoid creating SOCK memory controller Xiaolong Ye reported the following failure on Broadwell D server: EDAC sbridge: Some needed devices are missing EDAC MC: Removed device 0 for sbridge_edac.c Broadwell SrcID#0_Ha#0: DEV 0000:ff:12.0 EDAC sbridge: Couldn't find mci handler EDAC sbridge: Failed to register device with error -19. Broadwell D (only IMC0 per socket) and Broadwell X (IMC0 and IMC1 per socket) use the same PCI device IDs for IMC0 per socket, then they share pci_dev_descr_broadwell_table (n_imcs_per_sock=2). In this case, Broadwell D wrongly creates the nonexistent SOCK EDAC memory controller and reports above error messages, since it has no IMC1 per socket. Avoid creating the nonexistent SOCK memory controller. Reported-and-tested-by: Xiaolong Ye Signed-off-by: Qiuxu Zhuo Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170608113351.25323-1-qiuxu.zhuo@intel.com [ Massage. ] Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0f6ab55d7ab6847e9b799022ed3b5511c756e512 Author: Chris Wilson Date: Fri Jun 9 12:03:48 2017 +0100 drm/i915: Only restrict noreclaim in the early shrink passes In our first pass, we do not want to use reclaim at all as we want to solely reap the i915 buffer caches (its purgeable pages). But we don't mind it initiates IO or pulls via the FS (but it shouldn't anyway as we say no to reclaim!). Just drop the GFP_IO constraint for simplicity. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170609110350.1767-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eaf41801559a687cc7511c04dc712984765c9dd7 Author: Chris Wilson Date: Fri Jun 9 12:03:47 2017 +0100 drm/i915: Remove __GFP_NORETRY from our buffer allocator I tried __GFP_NORETRY in the belief that __GFP_RECLAIM was effective. It struggles with handling reclaim of our dirty buffers and relies on reclaim via kswapd. As a result, a single pass of direct reclaim is unreliable when i915 occupies the majority of available memory, and the only means of effectively waiting on kswapd to amke progress is by not setting the __GFP_NORETRY flag and lopping. That leaves us with the dilemma of invoking the oomkiller instead of propagating the allocation failure back to userspace where it can be handled more gracefully (one hopes). In the future we may have __GFP_MAYFAIL to allow repeats up until we genuinely run out of memory and the oomkiller would have been invoked. Until then, let the oomkiller wreck havoc. v2: Stop playing with side-effects of gfp flags and await __GFP_MAYFAIL v3: Update comments that direct reclaim only appears to be ignoring our dirty buffers! Fixes: 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") Testcase: igt/gem_tiled_swapping Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: Michal Hocko Link: http://patchwork.freedesktop.org/patch/msgid/20170609110350.1767-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 4846bf0ca8cb4304dde6140eff33a92b3fe8ef24 Author: Chris Wilson Date: Fri Jun 9 12:03:46 2017 +0100 drm/i915: Encourage our shrinker more when our shmemfs allocations fails Commit 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") made the bold decision to try and avoid the oomkiller by reporting -ENOMEM to userspace if our allocation failed after attempting to free enough buffer objects. In short, it appears we were giving up too easily (even before we start wondering if one pass of reclaim is as strong as we would like). Part of the problem is that if we only shrink just enough pages for our expected allocation, the likelihood of those pages becoming available to us is less than 100% To counter-act that we ask for twice the number of pages to be made available. Furthermore, we allow the shrinker to pull pages from the active list in later passes. v2: Be a little more cautious in paging out gfx buffers, and leave that to a more balanced approach from shrink_slab(). Important when combined with "drm/i915: Start writeback from the shrinker" as anything shrunk is immediately swapped out and so should be more conservative. Fixes: 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Daniel Vetter Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170609110350.1767-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 50 ++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 21 deletions(-) commit f30b4ca4447095f6923b59ffaa25ca6a54daffac Author: Kuninori Morimoto Date: Wed Jun 14 07:41:43 2017 +0000 ASoC: rsnd: reduce confusable macro parameter magic rsnd_dai_call() macro is using "priv" inside. Thus, if caller function doesn't have "priv" related operation, strange phenomenon occur which code is using "priv", but compiler indicates "unused variable 'priv'". >From code point of view, it is not problem, but it is very confusable. This patch removes "priv" from rsnd_dai_call() macro, and adds "priv" on caller function. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 21031d531eb33a6ad0251ff661a539802700c6e5 Author: Takashi Iwai Date: Wed Jun 14 09:33:06 2017 +0200 ASoC: intel: bxt: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++------ sound/soc/intel/boards/bxt_rt298.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit a729526720059ae019803acc953f07d9c17ae234 Author: Richard Leitner Date: Wed Jun 14 10:36:12 2017 +0200 ASoC: sgtl5000: add avc support The sgtl5000 features an automatic volume control block (AVC), which reduces loud signals and amplifies low level signals for easier listening. This patch adds support for this AVC block to the driver. Apart from the "AVC Switch" control which enables the block following controls for the configuration of AVC are added: + AVC Threshold Volume: threshold where audio is compressed when the measured level is above or expanded when below + AVC Max Gain Volume: maximum gain which can be applied when the measured audio level is below threshold + AVC Hard Limiter Switch: when enabled the signal is limited to the programmed threshold. + AVC Integrator Response: response time of the integrator The AVC block is enabled and configured using the DAP_AVC_CTRL and DAP_AVC_THRESHOLD registers. Following 2 checkpatch.pl strict checks are ignored because the indentation style is different for the struct snd_kcontrol_new definition: patch:147: CHECK: Alignment should match open parenthesis patch:150: CHECK: Alignment should match open parenthesis Signed-off-by: Richard Leitner Signed-off-by: Mark Brown sound/soc/codecs/sgtl5000.c | 89 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit fd3cfad374d452ebe0a2f87f37c2ceeea7e0d134 Author: Jan Kara Date: Wed Jun 14 10:42:48 2017 +0200 udf: Convert udf_disk_stamp_to_time() to use mktime64() Convert udf_disk_stamp_to_time() to use mktime64() to simplify the code. As a bonus we get working timestamp conversion for dates before epoch and after 2038 (both of which are allowed by UDF standard). Signed-off-by: Jan Kara fs/udf/udftime.c | 53 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) commit 3c399fa40fd13c5749386695e71f5f747a634f21 Author: Jan Kara Date: Wed Jun 14 09:51:20 2017 +0200 udf: Use time64_to_tm for timestamp conversion UDF on-disk time stamp is stored in a form very similar to struct tm. Use time64_to_tm() for conversion of seconds since epoch to year, month, ... format and then just copy this as necessary to UDF on-disk structure to simplify the code. Signed-off-by: Jan Kara fs/udf/udftime.c | 45 +++++++++++---------------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) commit f2e95355891153f66d4156bf3a142c6489cd78c6 Author: Jan Kara Date: Tue Jun 13 16:20:25 2017 +0200 udf: Fix deadlock between writeback and udf_setsize() udf_setsize() called truncate_setsize() with i_data_sem held. Thus truncate_pagecache() called from truncate_setsize() could lock a page under i_data_sem which can deadlock as page lock ranks below i_data_sem - e. g. writeback can hold page lock and try to acquire i_data_sem to map a block. Fix the problem by moving truncate_setsize() calls from under i_data_sem. It is safe for us to change i_size without holding i_data_sem as all the places that depend on i_size being stable already hold inode_lock. CC: stable@vger.kernel.org Fixes: 7e49b6f2480cb9a9e7322a91592e56a5c85361f5 Signed-off-by: Jan Kara fs/udf/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 146c4ad6ec034a1fbfbf90ba76cb69b6504c374a Author: Jan Kara Date: Tue Jun 13 16:08:52 2017 +0200 udf: Use i_size_read() in udf_adinicb_writepage() We don't hold inode_lock in udf_adinicb_writepage() so use i_size_read() to get i_size. This cannot cause real problems is i_size is guaranteed to be small but let's be careful. Signed-off-by: Jan Kara fs/udf/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9795e0e8ac0d6a3ee092f1b555b284b57feef99e Author: Jan Kara Date: Tue Jun 13 15:54:58 2017 +0200 udf: Fix races with i_size changes during readpage __udf_adinicb_readpage() uses i_size several times. When truncate changes i_size while the function is running, it can observe several different values and thus e.g. expose uninitialized parts of page to userspace. Also use i_size_read() in the function since it does not hold inode_lock. Since i_size is guaranteed to be small, this cannot really cause any issues even on 32-bit archs but let's be careful. CC: stable@vger.kernel.org Fixes: 9c2fc0de1a6e638fe58c354a463f544f42a90a09 Signed-off-by: Jan Kara fs/udf/file.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 63a5f59208bce7110596b09950f48bf07b8baeb9 Author: Kuninori Morimoto Date: Wed Jun 14 01:04:11 2017 +0000 ASoC: simple_card_utils: add EXPORT_SYMBOL_GPL() for asoc_simple_card_clk_xxx() commit 891caea41746 ("ASoC: simple_card_utils: add asoc_simple_card_clk_xxx()") added new asoc_simple_card_clk_xxx(), but, it didn't have EXPORT_SYMBOL_GPL(). This patch adds it. Otherwise, we will get below error ERROR: "asoc_simple_card_clk_enable" [sound/soc/generic/snd-soc-simple-scu-card.ko] undefined! ERROR: "asoc_simple_card_clk_disable" [sound/soc/generic/snd-soc-simple-scu-card.ko] undefined! ERROR: "asoc_simple_card_clk_enable" [sound/soc/generic/snd-soc-simple-card.ko] undefined! ERROR: "asoc_simple_card_clk_disable" [sound/soc/generic/snd-soc-simple-card.ko] undefined! ERROR: "asoc_simple_card_clk_enable" [sound/soc/generic/snd-soc-audio-graph-scu-card.ko] undefined! ERROR: "asoc_simple_card_clk_disable" [sound/soc/generic/snd-soc-audio-graph-scu-card.ko] undefined! ERROR: "asoc_simple_card_clk_enable" [sound/soc/generic/snd-soc-audio-graph-card.ko] undefined! ERROR: "asoc_simple_card_clk_disable" [sound/soc/generic/snd-soc-audio-graph-card.ko] undefined! Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 2 ++ 1 file changed, 2 insertions(+) commit 4d1255ebefb6838eab4f652107433438bea0051f Author: Geert Uytterhoeven Date: Mon Jun 12 11:32:17 2017 +0200 arm64: dts: r8a7796: Add reset control properties for audio Note that the audio module has resets for the Serial Sound Interfaces only. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 161a19106f4a7d089de05c93bbf2e493fec25f2c Author: Geert Uytterhoeven Date: Mon Jun 12 11:32:16 2017 +0200 arm64: dts: r8a7795: Add reset control properties for audio Note that the audio module has resets for the Serial Sound Interfaces only. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fd8cf827d8a635df3dad46773ad828ce4c93d95b Author: Geert Uytterhoeven Date: Mon Jun 12 11:23:46 2017 +0200 ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ALWAYS_ON Improve handling of always-on PM domains by using the GENPD_FLAG_ALWAYS_ON flag introduced in commit ffaa42e8a40b7f10 ("PM / Domains: Enable users of genpd to specify always on PM domains"). Note that the PM domain containing the serial console is still handled locally. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulf Hansson Signed-off-by: Simon Horman arch/arm/mach-shmobile/pm-rmobile.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 06e41d8a36689f465006f017bbcd8a73edb98109 Author: Shih-Yuan Lee (FourDollars) Date: Wed Jun 14 14:42:00 2017 +0800 Bluetooth: btusb: Add support for 0489:e0a2 QCA_ROME device T: Bus=01 Lev=01 Prnt=01 Port=06 Cnt=03 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0489 ProdID=e0a2 Rev=00.01 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb Signed-off-by: Shih-Yuan Lee (FourDollars) Suggested-by: Owen Lin Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit 1df5eaa6bced2d8a9de305d4a5f587adf57ddf35 Author: Tero Kristo Date: Tue Jun 13 16:45:50 2017 +0300 ARM: OMAP4: hwmod_data: add SHAM crypto accelerator OMAP4 SoC contains SHAM crypto hardware accelerator. Add hwmod data for this IP so that it can be utilized by crypto frameworks. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit ebea90df78c1f290529e18b85c19653e131954de Author: Sebastian Reichel Date: Tue Jun 13 11:28:47 2017 +0200 ARM: OMAP4: hwmod data: add des This fixes the following error during kernel boot: platform 480a5000.des: Cannot lookup hwmod 'des' Unfortunately the DES module is only documented partly in the OMAP4430 TRM. I found an old patch from Joel, which I took over and updated for currently mainline. Signed-off-by: Joel Fernandes Signed-off-by: Sebastian Reichel Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 478523dd0341df5833b9f51cae3f9a7c3d20e6bb Author: Sebastian Reichel Date: Tue Jun 13 11:28:46 2017 +0200 ARM: OMAP4: hwmod data: add aes2 This adds the hwmod entry for the second AES module available on OMAP4. Signed-off-by: Sebastian Reichel Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 9a9ded89ad9ca46382a4ea63f36f830bccfab4ec Author: Sebastian Reichel Date: Tue Jun 13 11:28:45 2017 +0200 ARM: OMAP4: hwmod data: add aes1 This fixes the following error during kernel boot: platform 4b501000.aes: Cannot lookup hwmod 'aes1' Unfortunately the AES module is only documented partly in the OMAP4430 TRM. I found an old patch from Joel, which I took over and updated for currently mainline. Signed-off-by: Joel Fernandes Signed-off-by: Sebastian Reichel Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 45f1d5e3c71d479995cefe9dd30344c62efd60c8 Author: Tero Kristo Date: Tue Jun 13 16:45:49 2017 +0300 ARM: dts: omap4: add SHAM node Add SHAM crypto accelerator. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit c6faccf21caffc433217f0fa58b8ef5c5e318a5d Author: Tero Kristo Date: Tue Jun 13 16:45:48 2017 +0300 ARM: dts: omap4: add aes2 instance OMAP4 has AES2 instance, so add its integration data under DT. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7ca3e39719aafb1b9eaf282102574f26d52acd95 Author: Sebastian Reichel Date: Tue Jun 13 11:28:44 2017 +0200 ARM: dts: omap4.dtsi: remove aes[12]_fck "aes1_fck" and "aes2_fck" are controlled by hwmod. Drop clock entries to avoid conflicts. Signed-off-by: Sebastian Reichel Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap44xx-clocks.dtsi | 16 ---------------- 1 file changed, 16 deletions(-) commit 25e6cfc81a352a5e85aa8a26972d453c4c121ad1 Author: Sebastian Reichel Date: Tue Jun 13 11:28:43 2017 +0200 ARM: dts: omap4: Fix aes entry OMAP4 has a second aes module, so let's use proper name for the first instance. Signed-off-by: Sebastian Reichel Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 996fab55d864ed604158f71724ff52db1c2454a3 Author: Bjørn Mork Date: Tue Jun 13 19:11:42 2017 +0200 USB: serial: qcserial: new Sierra Wireless EM7305 device ID A new Sierra Wireless EM7305 device ID used in a Toshiba laptop. Reported-by: Petr Kloc Cc: Signed-off-by: Bjørn Mork Signed-off-by: Johan Hovold drivers/usb/serial/qcserial.c | 1 + 1 file changed, 1 insertion(+) commit 8fb060da715ad10fe956d7c0077b2fb0c12bb9d7 Author: Johan Hovold Date: Mon Jun 12 16:30:16 2017 +0200 USB: serial: option: add two Longcheer device ids Add two Longcheer device-id entries which specifically enables a Telewell TW-3G HSPA+ branded modem (0x9801). Reported-by: Teemu Likonen Reported-by: Bjørn Mork Reported-by: Lars Melin Tested-by: Teemu Likonen Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 4 ++++ 1 file changed, 4 insertions(+) commit ce3de60ff92ba5e4d65f1c1ce07460795e3a6157 Author: Markus Elfring Date: Sat Jun 3 21:46:26 2017 +0200 ARM: pxa: Delete an error message for a failed memory allocation in pxa3xx_u2d_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/pxa3xx-ulpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 361f7cc7f33607489bea815f9148e8e9a13ea673 Author: Markus Elfring Date: Sat Jun 3 21:43:11 2017 +0200 ARM: pxa: Improve a size determination in pxa3xx_u2d_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/pxa3xx-ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c276557de3087ef67ad1aec4222f9f8b1d005f80 Author: Markus Elfring Date: Sat Jun 3 21:34:48 2017 +0200 ARM: pxa: Delete an error message for a failed memory allocation in pxa_pm_init() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/pm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7ade445c26269d5af6c34ee50be97d54a3992d02 Author: Petr Cvek Date: Mon Mar 13 09:05:49 2017 +0100 ARM: pxa: magician: Add support for ADS7846 touchscreen This patch adds a support for ADS7846 touchscreen driver. The basic functionality was tested, x_plate_ohms and y_plate_ohms were physically measured. The value pressure_max was empirically set to match the measured range, which is affected by x_plate_ohms and ADS samples. The value of keep_vref_on should be set. A tested model (T-Mobile MDA Compact PM10A) doesn't seem to use Vref pin as the input from an external source. On this model the unset keep_vref_on cause high jitter of measured values. SPI framing pin (gpio_cs) must be used in GPIO mode due to an incompatible autoframing of PXA27x controller and ADS7846 device. Signed-off-by: Petr Cvek Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/include/mach/magician.h | 1 + arch/arm/mach-pxa/magician.c | 84 ++++++++++++++++++++++++++++++- 2 files changed, 84 insertions(+), 1 deletion(-) commit f8ff2f28ba49fa41a06215ac3187dede347bc9a7 Author: Takashi Iwai Date: Tue Jun 13 15:57:28 2017 +0200 ALSA: pcm: Skip ack callback without actual appl_ptr update We call ack callback whenever appl_ptr gets updated via pcm_lib_apply_appl_ptr(). There are various code paths to call this function. A part of them are for read/write/forward/rewind, where the appl_ptr is always changed and thus the call of ack is mandatory. OTOH, another part of code paths are from the explicit user call, e.g. via SYNC_PTR ioctl. There, we may receive the same appl_ptr value, and in such a case, calling ack is obviously superfluous. This patch adds the check of the given appl_ptr value, and returns immediately if it's no real update. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 3 +++ 1 file changed, 3 insertions(+) commit 4e99151435cb2e88b6d0d49939bf836c35e555a3 Author: Takashi Iwai Date: Tue May 24 15:53:36 2016 +0200 ALSA: pcm: Use common PCM_RUNTIME_CHECK() for sanity checks Just a code cleanup. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b745cd97425f7b0b9d0c87c1b9766c31b7d0a7e Author: Takashi Iwai Date: Tue May 24 15:40:03 2016 +0200 ALSA: pcm: Preprocess PAUSED or SUSPENDED stream before PREPARE Calling PREPARE ioctl to the stream in either PAUSED or SUSPENDED state may confuse some drivers that don't handle the state properly. Instead of fixing each driver, PCM core should take care of the proper state change before actually trying to (re-)prepare the stream. Namely, when the stream is in PAUSED state, it triggers PAUSE_RELEASE, and when in SUSPENDED state, it triggers STOP, before calling prepare callbacks. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4b95ff781e30c50298257d22a2c3743b2e5739be Author: Takashi Iwai Date: Tue May 24 15:08:31 2016 +0200 ALSA: pcm: Allow dropping stream directly after resume So far, the PCM core refuses DROP ioctl when the stream in the suspended state. This was basically to avoid the invalid state change *during* the suspend. But since we protect the power change globally in the common PCM ioctl caller side, it's guaranteed that snd_pcm_drop() is called at the right power state. So we can assume that the drop of stream is safe immediately after SUSPENDED state. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 68b4acd322494444803a3f49884ae889c8ec6689 Author: Takashi Iwai Date: Tue May 24 15:07:39 2016 +0200 ALSA: pcm: Apply power lock globally to common ioctls All PCM common ioctls should run only in the powered up state, but currently only a few ioctls do the proper snd_power_lock() and snd_power_wait() invocations. Instead of adding to each place, do it commonly in the caller side, so that all these ioctls are assured to be operated at the power up state. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 56 +++++++++++++++++-------------------------------- 1 file changed, 19 insertions(+), 37 deletions(-) commit 34bcc44abb302d1586bf1eb7548be75d0f56babc Author: Takashi Iwai Date: Tue May 24 14:58:04 2016 +0200 ALSA: pcm: Clean up SNDRV_PCM_IOCTL_PAUSE code Use snd_pcm_action_lock_irq() helper instead of open coding. No functional change. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 6057077f6ebc0747c2f5b21dfb1eb782f489d0f6 Author: Yazen Ghannam Date: Tue Jun 13 18:28:35 2017 +0200 x86/mce: Update bootlog description to reflect behavior on AMD The bootlog option is only disabled by default on AMD Fam10h and older systems. Update bootlog description to say this. Change the family value to hex to avoid confusion. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170613162835.30750-9-bp@alien8.de Signed-off-by: Ingo Molnar Documentation/x86/x86_64/boot-options.txt | 3 ++- arch/x86/kernel/cpu/mcheck/mce.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit ec33838244c8535b23b8d24b167996fd1318bb68 Author: Yazen Ghannam Date: Tue Jun 13 18:28:34 2017 +0200 x86/mce: Don't disable MCA banks when offlining a CPU on AMD AMD systems have non-core, shared MCA banks within a die. These banks are controlled by a master CPU per die. If this CPU is offlined then all the shared banks are disabled in addition to the CPU's core banks. Also, Fam17h systems may have SMT enabled. The MCA_CTL register is shared between SMT thread siblings. If a CPU is offlined then all its sibling's MCA banks are also disabled. Extend the existing vendor check to AMD too. Signed-off-by: Yazen Ghannam [ Fix up comment. ] Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170613162835.30750-8-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 86d2eac5a7045933a88c97f0453f22106bb90b54 Author: Borislav Petkov Date: Tue Jun 13 18:28:33 2017 +0200 x86/mce/mce-inject: Preset the MCE injection struct Populate the MCE injection struct before doing initial injection so that values which don't change have sane defaults. Tested-by: Yazen Ghannam Signed-off-by: Borislav Petkov Acked-by: Yazen Ghannam Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Link: http://lkml.kernel.org/r/20170613162835.30750-7-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce-inject.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5c99881b33b460c40ff3fbe0d6d1242f54b4f2ed Author: Borislav Petkov Date: Tue Jun 13 18:28:32 2017 +0200 x86/mce: Clean up include files Not really needed. Tested-by: Yazen Ghannam Signed-off-by: Borislav Petkov Acked-by: Yazen Ghannam Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Link: http://lkml.kernel.org/r/20170613162835.30750-6-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce-inject.c | 10 ---------- 1 file changed, 10 deletions(-) commit fbe9ff9eafb66b78b79c135ebc24fd2ca5498217 Author: Borislav Petkov Date: Tue Jun 13 18:28:31 2017 +0200 x86/mce: Get rid of register_mce_write_callback() Make the mcelog call a notifier which lands in the injector module and does the injection. This allows for mce-inject to be a normal kernel module now. Tested-by: Yazen Ghannam Signed-off-by: Borislav Petkov Acked-by: Yazen Ghannam Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Link: http://lkml.kernel.org/r/20170613162835.30750-5-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 4 -- arch/x86/kernel/cpu/mcheck/dev-mcelog.c | 47 +++++++++++++++++----- arch/x86/kernel/cpu/mcheck/mce-inject.c | 66 +++++++++---------------------- arch/x86/kernel/cpu/mcheck/mce-internal.h | 6 ++- 4 files changed, 61 insertions(+), 62 deletions(-) commit bc8e80d56c1ecb35e65df392d7601d1427d14efe Author: Borislav Petkov Date: Tue Jun 13 18:28:30 2017 +0200 x86/mce: Merge mce_amd_inj into mce-inject Reuse mce_amd_inj's debugfs interface so that mce-inject can benefit from it too. The old functionality is still preserved under CONFIG_X86_MCELOG_LEGACY. Tested-by: Yazen Ghannam Signed-off-by: Borislav Petkov Acked-by: Yazen Ghannam Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Link: http://lkml.kernel.org/r/20170613162835.30750-4-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/Kconfig | 2 +- arch/x86/Makefile | 2 - arch/x86/include/asm/processor.h | 5 + arch/x86/kernel/cpu/mcheck/mce-inject.c | 542 +++++++++++++++++++++++++++++++- arch/x86/ras/Kconfig | 11 - arch/x86/ras/Makefile | 2 - arch/x86/ras/mce_amd_inj.c | 492 ----------------------------- 7 files changed, 532 insertions(+), 524 deletions(-) commit 17ef4af0ec0f97b369f304dc04d61722f3591c4b Author: Yazen Ghannam Date: Tue Jun 13 18:28:29 2017 +0200 x86/mce/AMD: Use saved threshold block info in interrupt handler In the amd_threshold_interrupt() handler, we loop through every possible block in each bank and rediscover the block's address and if it's valid, e.g. valid, counter present and not locked. However, we already have the address saved in the threshold blocks list for each CPU and bank. The list only contains blocks that have passed all the valid checks. Besides the redundancy, there's also a smp_call_function* in get_block_address() which causes a warning when servicing the interrupt: WARNING: CPU: 0 PID: 0 at kernel/smp.c:281 smp_call_function_single+0xdd/0xf0 ... Call Trace: rdmsr_safe_on_cpu() get_block_address.isra.2() amd_threshold_interrupt() smp_threshold_interrupt() threshold_interrupt() because we do get called in an interrupt handler *with* interrupts disabled, which can result in a deadlock. Drop the redundant valid checks and move the overflow check, logging and block reset into a separate function. Check the first block then iterate over the rest. This procedure is needed since the first block is used as the head of the list. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170613162835.30750-3-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce_amd.c | 66 +++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 31 deletions(-) commit a24b8c3409935bbc8e3c12131c473c92692403cd Author: Yazen Ghannam Date: Tue Jun 13 18:28:28 2017 +0200 x86/mce/AMD: Use msr_stat when clearing MCA_STATUS The value of MCA_STATUS is used as the MSR when clearing MCA_STATUS. This may cause the following warning: unchecked MSR access error: WRMSR to 0x11b (tried to write 0x0000000000000000) Call Trace: smp_threshold_interrupt() threshold_interrupt() Use msr_stat instead which has the MSR address. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Fixes: 37d43acfd79f ("x86/mce/AMD: Redo error logging from APIC LVT interrupt handlers") Link: http://lkml.kernel.org/r/20170613162835.30750-2-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10b90ee2eccca042e2d762881dd7119d201f0898 Merge: 84bcc1d 32c1431 Author: Ingo Molnar Date: Wed Jun 14 07:31:46 2017 +0200 Merge tag 'v4.12-rc5' into ras/core, to pick up fixes Signed-off-by: Ingo Molnar commit 3ee45a3b533a20ed9fcc11ddb880fc4b30d28f51 Author: Dave Airlie Date: Wed Apr 26 04:09:02 2017 +0100 drm/syncobj: add sync_file interaction. (v1.2) This interface allows importing the fence from a sync_file into an existing drm sync object, or exporting the fence attached to an existing drm sync object into a new sync file object. This should only be used to interact with sync files where necessary. v1.1: fence put fixes (Chris), drop fence from ioctl names (Chris) fixup for new fence replace API. Reviewed-by: Sean Paul Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie drivers/gpu/drm/drm_syncobj.c | 75 +++++++++++++++++++++++++++++++++++++++++-- include/uapi/drm/drm.h | 2 ++ 2 files changed, 75 insertions(+), 2 deletions(-) commit e9083420bbacce27e43d418064d0d2dfb4b37aaa Author: Dave Airlie Date: Tue Apr 4 13:26:24 2017 +1000 drm: introduce sync objects (v4) Sync objects are new toplevel drm object, that contain a pointer to a fence. This fence can be updated via command submission ioctls via drivers. There is also a generic wait obj API modelled on the vulkan wait API (with code modelled on some amdgpu code). These objects can be converted to an opaque fd that can be passes between processes. v2: rename reference/unreference to put/get (Chris) fix leaked reference (David Zhou) drop mutex in favour of cmpxchg (Chris) v3: cleanups from danvet, rebase on drm_fops rename check fd_flags is 0 in ioctls. v4: export find/free, change replace fence to take a syncobj. In order to support lookup first, replace later semantics which seem in the end to be cleaner. Reviewed-by: Sean Paul Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie Documentation/gpu/drm-internals.rst | 3 + Documentation/gpu/drm-mm.rst | 12 ++ drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_file.c | 8 + drivers/gpu/drm/drm_internal.h | 13 ++ drivers/gpu/drm/drm_ioctl.c | 12 ++ drivers/gpu/drm/drm_syncobj.c | 382 ++++++++++++++++++++++++++++++++++++ include/drm/drm_drv.h | 1 + include/drm/drm_file.h | 5 + include/drm/drm_syncobj.h | 90 +++++++++ include/uapi/drm/drm.h | 24 +++ 11 files changed, 552 insertions(+), 1 deletion(-) commit a09c0fc3f5d775231f1884e0e66c495065a461ee Author: Jeff Mahoney Date: Sat Jun 3 18:01:17 2017 -0400 ixgbe: pci_set_drvdata must be called before register_netdev We call pci_set_drvdata immediately after calling register_netdev, which leaves a window where tasks writing to the sriov_numvfs sysfs attribute can sneak in and crash the kernel. register_netdev cleans up after itself so placing pci_set_drvdata immediately before it should preserve the intent of commit 0fb6a55cc31f ("ixgbe: fix crash on rmmod after probe fail"). Fixes: 0fb6a55cc31f ("ixgbe: fix crash on rmmod after probe fail") Signed-off-by: Jeff Mahoney Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ebdf8af3017ce242f37be2ae5e5f655dc9846ef Author: Tony Nguyen Date: Thu Jun 1 12:06:05 2017 -0700 ixgbe: Resolve cppcheck format string warning cppcheck warns that the format string is incorrect in the function ixgbe_get_strings(). Since the value cannot be negative, change the variable to unsigned which matches the format specifier. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d28b194955a9b6e6ccf4383f1baba78bb5a528db Author: Emil Tantilov Date: Tue May 23 14:02:23 2017 -0700 ixgbe: fix writes to PFQDE ixgbe_write_qde() was ignoring the qde parameter which resulted in PFQDE.HIDE_VLAN not being set for X550. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adc2c83e2b317de39220e0004b6556b5ea2bf412 Author: Tony Nguyen Date: Thu May 18 14:55:23 2017 -0700 ixgbevf: Bump version number Update ixgbevf version number. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01ec5525fc2a0fcc8f4b796b9bb4ee1c6a5d9415 Author: Tony Nguyen Date: Thu May 18 14:55:07 2017 -0700 ixgbe: Bump version number Update ixgbe version number. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 622a2ef538fb3ca8eccf49716aba8267d6e95a47 Author: Jacob Keller Date: Wed May 3 10:29:04 2017 -0700 ixgbe: check for Tx timestamp timeouts during watchdog The ixgbe driver has logic to handle only one Tx timestamp at a time, using a state bit lock to avoid multiple requests at once. It may be possible, if incredibly unlikely, that a Tx timestamp event is requested but never completes. Since we use an interrupt scheme to determine when the Tx timestamp occurred we would never clear the state bit in this case. Add an ixgbe_ptp_tx_hang() function similar to the already existing ixgbe_ptp_rx_hang() function. This function runs in the watchdog routine and makes sure we eventually recover from this case instead of permanently disabling Tx timestamps. Note: there is no currently known way to cause this without hacking the driver code to force it. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) commit 4cc74c01ef8bb59fae98aeda359e8bcf6148943a Author: Jacob Keller Date: Wed May 3 10:29:00 2017 -0700 ixgbe: add statistic indicating number of skipped Tx timestamps The ixgbe driver can only handle one Tx timestamp request at a time. This means it is possible for an application timestamp request to be ignored. There is no easy way for an administrator to determine if this occurred. Add a new statistic which tracks this, tx_hwtstamp_skipped. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 3 +++ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 23 +++++++++++++---------- 3 files changed, 17 insertions(+), 10 deletions(-) commit 5fef124d9c75942dc5c2445a3faa8ad37cbf4c82 Author: Jacob Keller Date: Wed May 3 10:28:56 2017 -0700 ixgbe: avoid permanent lock of *_PTP_TX_IN_PROGRESS The ixgbe driver uses a state bit lock to avoid handling more than one Tx timestamp request at once. This is required because hardware is limited to a single set of registers for Tx timestamps. The state bit lock is not properly cleaned up during ixgbe_xmit_frame_ring() if the transmit fails such as due to DMA or TSO failure. In some hardware this results in blocking timestamps until the service task times out. In other hardware this results in a permanent lock of the timestamp bit because we never receive an interrupt indicating the timestamp occurred, since indeed the packet was never transmitted. Fix this by checking for DMA and TSO errors in ixgbe_xmit_frame_ring() and properly cleaning up after ourselves when these occur. Reported-by: Reported-by: David Mirabito Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit aaebaf50b502648b1d4d8c93b4be133944c2bbd0 Author: Jacob Keller Date: Wed May 3 10:28:53 2017 -0700 ixgbe: fix race condition with PTP_TX_IN_PROGRESS bits Hardware related to the ixgbe driver is limited to handling a single Tx timestamp request at a time. Thus, the driver ignores requests for Tx timestamp while waiting for the current request to finish. It uses a state bit lock which enforces that only one timestamp request is honored at a time. Unfortunately this suffers from a simple race condition. The bit lock is not cleared until after skb_tstamp_tx() is called notifying applications of a new Tx timestamp. Even a well behaved application sending only one packet at a time and waiting for a response can wake up and send a new packet before the bit lock is cleared. This results in needlessly dropping some Tx timestamp requests. We can fix this by unlocking the state bit as soon as we read the Timestamp register, as this is the first point at which it is safe to unlock. To avoid issues with the skb pointer, we'll use a copy of the pointer and set the global variable in the driver structure to NULL first. This ensures that the next timestamp request does not modify our local copy of the skb pointer. This ensures that well behaved applications do not accidentally race with the unlock bit. Obviously an application which sends multiple Tx timestamp requests at once will still only timestamp one packet at a time. Unfortunately there is nothing we can do about this. Reported-by: David Mirabito Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 938e7cf2d569833a5acf689a8926faf507826253 Author: Thomas Gleixner Date: Tue Jun 13 23:34:33 2017 +0200 posix-timers: Make nanosleep timespec argument const No nanosleep implementation modifies the rqtp argument. Mark is const. Signed-off-by: Thomas Gleixner Cc: Al Viro Cc: John Stultz Cc: Peter Zijlstra include/linux/hrtimer.h | 2 +- kernel/time/alarmtimer.c | 2 +- kernel/time/hrtimer.c | 2 +- kernel/time/posix-cpu-timers.c | 4 ++-- kernel/time/posix-timers.c | 4 ++-- kernel/time/posix-timers.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) commit 343d8fc208e43e50525ae6e0fc4845b9966b7318 Author: Thomas Gleixner Date: Tue Jun 13 23:29:14 2017 +0200 posix-cpu-timers: Avoid timespec conversion in do_cpu_nanosleep() No point in converting the expiry time back and forth. No point either to update the value in the caller supplied variable. mark the rqtp argument const. Signed-off-by: Thomas Gleixner Cc: Al Viro Cc: John Stultz Cc: Peter Zijlstra kernel/time/posix-cpu-timers.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2b2d02856b3176701c91d723356f766d6ee27853 Author: Al Viro Date: Wed Jun 7 09:42:41 2017 +0100 time: Move compat_gettimeofday()/settimeofday() to native Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-16-viro@ZenIV.linux.org.uk kernel/compat.c | 38 -------------------------------------- kernel/time/time.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 38 deletions(-) commit b180db2c8ca6692a10b79631cadc18d03303d494 Author: Al Viro Date: Wed Jun 7 09:42:40 2017 +0100 time: Move compat_time()/stime() to native Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-15-viro@ZenIV.linux.org.uk kernel/compat.c | 40 ---------------------------------------- kernel/time/time.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 40 deletions(-) commit 2482097c6c0f01ad74c9b2cff120a519ac59846e Author: Al Viro Date: Wed Jun 7 09:42:39 2017 +0100 posix-timers: Move compat_timer_create() to native, get rid of set_fs() Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-14-viro@ZenIV.linux.org.uk kernel/compat.c | 18 -------------- kernel/time/posix-stubs.c | 1 + kernel/time/posix-timers.c | 59 ++++++++++++++++++++++++++++++++-------------- 3 files changed, 42 insertions(+), 36 deletions(-) commit d822cdcce43f9d4dcddbf9c68f9537d542ccc3c3 Author: Al Viro Date: Wed Jun 7 09:42:38 2017 +0100 posix-timers: Move compat versions of clock_gettime/settime/getres Move them to the native implementations and get rid of the set_fs() hackery. Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-13-viro@ZenIV.linux.org.uk kernel/compat.c | 51 ----------------------------------- kernel/time/posix-stubs.c | 53 +++++++++++++++++++++++++++++++++++++ kernel/time/posix-timers.c | 66 +++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 115 insertions(+), 55 deletions(-) commit 54ad9c46c262ce4a603dc7887e37956896a0211d Author: Al Viro Date: Wed Jun 7 09:42:37 2017 +0100 itimers: Move compat itimer syscalls to native ones get rid of set_fs(), sanitize compat copyin/copyout. Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-12-viro@ZenIV.linux.org.uk include/linux/compat.h | 4 +++ kernel/compat.c | 69 +++++++++++------------------------------------ kernel/time/itimer.c | 38 ++++++++++++++++++++++++++ kernel/time/posix-stubs.c | 2 ++ 4 files changed, 60 insertions(+), 53 deletions(-) commit b0dc12426ec404de99d7e75a12a22d9201d90914 Author: Al Viro Date: Wed Jun 7 09:42:36 2017 +0100 posix-timers: Take compat timer_gettime(2) to native one ... and get rid of set_fs() in there Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-11-viro@ZenIV.linux.org.uk kernel/compat.c | 17 ----------------- kernel/time/posix-stubs.c | 1 + kernel/time/posix-timers.c | 43 ++++++++++++++++++++++++++++++++++--------- 3 files changed, 35 insertions(+), 26 deletions(-) commit 1acbe7708b0313b33287bb4ffcbf26462ea3c588 Author: Al Viro Date: Wed Jun 7 09:42:35 2017 +0100 posix-timers: Take compat timer_settime(2) to native one ... and get rid of set_fs() in there Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-10-viro@ZenIV.linux.org.uk kernel/compat.c | 23 ------------ kernel/time/posix-stubs.c | 1 + kernel/time/posix-timers.c | 87 +++++++++++++++++++++++++++++++++------------- 3 files changed, 64 insertions(+), 47 deletions(-) commit 3a4d44b6162555070194e486ff6b3799a8d323a2 Author: Al Viro Date: Wed Jun 7 09:42:34 2017 +0100 ntp: Move adjtimex related compat syscalls to native counterparts Get rid of set_fs() mess and sanitize compat_{get,put}_timex(), while we are at it. Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-9-viro@ZenIV.linux.org.uk include/linux/compat.h | 4 ++ kernel/compat.c | 141 +++++++++++++++++---------------------------- kernel/time/posix-stubs.c | 2 + kernel/time/posix-timers.c | 27 +++++++++ kernel/time/time.c | 24 +++++++- 5 files changed, 108 insertions(+), 90 deletions(-) commit fb923c4a3c2ee735755d4a93522150fc35d0ecbd Author: Al Viro Date: Wed Jun 7 09:42:33 2017 +0100 posix-timers: Kill ->nsleep_restart() No more users. Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-8-viro@ZenIV.linux.org.uk include/linux/hrtimer.h | 1 - kernel/time/hrtimer.c | 2 +- kernel/time/posix-cpu-timers.c | 6 ------ kernel/time/posix-timers.c | 4 ---- kernel/time/posix-timers.h | 1 - 5 files changed, 1 insertion(+), 13 deletions(-) commit ce41aaf47af3d28c4c958e07675a3e0a51f09bd3 Author: Al Viro Date: Wed Jun 7 09:42:32 2017 +0100 hrtimers/posix-timers: Merge nanosleep timespec copyout logics into a new helper Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-7-viro@ZenIV.linux.org.uk include/linux/hrtimer.h | 2 ++ kernel/time/alarmtimer.c | 10 +--------- kernel/time/hrtimer.c | 29 ++++++++++++++++++++--------- kernel/time/posix-cpu-timers.c | 13 ++----------- 4 files changed, 25 insertions(+), 29 deletions(-) commit edbeda46322fbcb15af2d2d0f2daffb0cd349a5a Author: Al Viro Date: Wed Jun 7 09:42:31 2017 +0100 time/posix-timers: Move the compat copyouts to the nanosleep implementations Turn restart_block.nanosleep.{rmtp,compat_rmtp} into a tagged union (kind = 1 -> native, kind = 2 -> compat, kind = 0 -> nothing) and make the places doing actual copyout handle compat as well as native (that will become a helper in the next commit). Result: compat wrappers, messing with reassignments, etc. are gone. [ tglx: Folded in a variant of Peter Zijlstras enum patch ] Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-6-viro@ZenIV.linux.org.uk include/linux/posix-timers.h | 2 - include/linux/restart_block.h | 15 ++++- kernel/compat.c | 131 ----------------------------------------- kernel/time/alarmtimer.c | 16 +++-- kernel/time/hrtimer.c | 42 +++++++++++-- kernel/time/posix-cpu-timers.c | 20 +++++-- kernel/time/posix-stubs.c | 55 +++++++++++++---- kernel/time/posix-timers.c | 32 +++++++--- 8 files changed, 142 insertions(+), 171 deletions(-) commit 99e6c0e6ec349575886ca7daffc9cb7ec583176f Author: Al Viro Date: Wed Jun 7 09:42:30 2017 +0100 posix-timers: Store rmtp into restart_block in sys_clock_nanosleep() ... instead of doing that in every ->nsleep() instance Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-5-viro@ZenIV.linux.org.uk kernel/time/alarmtimer.c | 8 +------- kernel/time/posix-cpu-timers.c | 12 +++--------- kernel/time/posix-timers.c | 10 +++++----- kernel/time/posix-timers.h | 2 +- 4 files changed, 10 insertions(+), 22 deletions(-) commit a7602681fc63f1a3ddd3da336296c9634c2ff974 Author: Al Viro Date: Wed Jun 7 09:42:29 2017 +0100 hrtimer: Move copyout of remaining time to do_nanosleep() The hrtimer nanosleep() implementation can be simplified by moving the copy out of the remaining time to do_nanosleep() which is shared between the real nanosleep function and the restart function. The pointer to the timespec64 which is updated is already stored in the restart block at the call site, so the seperate handling of nanosleep and restart function can be avoided. [ tglx: Added changelog ] Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-4-viro@ZenIV.linux.org.uk kernel/time/hrtimer.c | 62 +++++++++++++++++---------------------------------- 1 file changed, 20 insertions(+), 42 deletions(-) commit 192a82f9003fe8fabd6088aa646e829225a94c55 Author: Al Viro Date: Wed Jun 7 09:42:28 2017 +0100 hrtimer_nanosleep(): Pass rmtp in restart_block Store the pointer to the timespec which gets updated with the remaining time in the restart block and remove the function argument. [ tglx: Added changelog ] Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-3-viro@ZenIV.linux.org.uk include/linux/hrtimer.h | 1 - kernel/compat.c | 6 +++--- kernel/time/hrtimer.c | 11 ++++++----- kernel/time/posix-stubs.c | 5 ++++- kernel/time/posix-timers.c | 5 ++++- 5 files changed, 17 insertions(+), 11 deletions(-) commit 15f27ce24cb613e6e01ce27c4094c55e55dde5d4 Author: Al Viro Date: Wed Jun 7 09:42:27 2017 +0100 alarmtimer: Move copyout and freeze handling into alarmtimer_do_nsleep() The alarmtimer nanosleep() implementation can be simplified by moving the copy out of the remaining time to alarmtimer_do_nsleep() which is shared between the real nanosleep function and the restart function. The pointer to the timespec64 which is updated has to be stored in the restart block anyway. Instead of storing it only in the restart case, store it before calling alarmtimer_do_nsleep() and copy the remaining time in the signal exit path. [ tglx: Added changelog ] Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-2-viro@ZenIV.linux.org.uk kernel/time/alarmtimer.c | 102 +++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 70 deletions(-) commit 86a9c446c13ecd8793ea8599761322aed125d542 Author: Al Viro Date: Wed Jun 7 09:42:26 2017 +0100 posix-cpu-timers: Move copyout of timespec into do_cpu_nanosleep() The posix-cpu-timer nanosleep() implementation can be simplified by moving the copy out of the remaining time to do_cpu_nanosleep() which is shared between the real nanosleep function and the restart function. The pointer to the timespec64 which is updated has to be stored in the restart block anyway. Instead of storing it only in the restart case, store it before calling do_cpu_nanosleep() and copy the remaining time in the signal exit path. [ tglx: Added changelog ] Signed-off-by: Al Viro Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170607084241.28657-1-viro@ZenIV.linux.org.uk kernel/time/posix-cpu-timers.c | 63 +++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 35 deletions(-) commit 0d7a2c35d11e974b98a6396cd24b39b0f3f5bb7b Author: Linus Walleij Date: Mon Mar 20 23:39:26 2017 +0100 ARM: dts: add Gemini PATA/SATA support The NAS4229B and SQ201 Gemini systems have a PATA controller which is linked to a SATA bridge in the SoC. Enable both platforms to use the PATA/SATA devices. Cc: John Feng-Hsin Chiang Cc: Greentime Hu Acked-by: Hans Ulli Kroll Signed-off-by: Linus Walleij arch/arm/boot/dts/gemini-nas4220b.dts | 10 ++++++++++ arch/arm/boot/dts/gemini-sq201.dts | 10 ++++++++++ arch/arm/boot/dts/gemini.dtsi | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) commit 9eeb02247723c2ce881319368ce22982f1c7b1ef Author: Linus Walleij Date: Sat Apr 1 19:55:48 2017 +0200 ARM: dts: Add Gemini DMA controller This adds the Faraday Technology FTDMAC020 DMA controller to the Gemini SoC DTSI file. It is only used for memcpy work so we can activate it for all users of the chipset. Signed-off-by: Linus Walleij arch/arm/boot/dts/gemini.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 681bec0367c2606b6154060310a2ffa543175980 Author: Jeremy Linton Date: Wed May 31 16:56:53 2017 -0500 tracing: Rename update the enum_map file The enum_map file is used to display a list of symbol to name conversions. As its now used to resolve sizeof lets update the name and description. Link: http://lkml.kernel.org/r/20170531215653.3240-13-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) kernel/trace/Kconfig | 22 +++++++++++----------- kernel/trace/trace.c | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) commit ff910cfdc6e928c31344245cca70e391634ba560 Author: Jeremy Linton Date: Wed May 31 16:56:52 2017 -0500 tracing: Add TRACE_DEFINE_SIZEOF() macros There are a few places in the kernel where sizeof() is already being used. Update those locations with TRACE_DEFINE_SIZEOF. Link: http://lkml.kernel.org/r/20170531215653.3240-12-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) arch/arm64/kvm/trace.h | 2 ++ include/trace/events/xen.h | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 4f0dfd76e9cc9296d74d6d5f579a5c7ca3bed869 Author: Jeremy Linton Date: Wed May 31 16:56:50 2017 -0500 tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeof's to their values Perf has a problem that if sizeof() macros are used within TRACE_EVENT() macro's they end up in userspace as "sizeof(kernel structure)" which cannot properly be parsed. Add a macro which can forward this data through the eval_map for userspace utilization. Link: http://lkml.kernel.org/r/20170531215653.3240-10-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) include/linux/tracepoint.h | 1 + include/trace/trace_events.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) commit 67ec0d85955630924b971e04c0954370a74b8706 Author: Jeremy Linton Date: Wed May 31 16:56:49 2017 -0500 tracing: Rename enum_replace to eval_replace The enum_replace stanza works as is for sizeof() calls as well as enums. Rename it as well. Link: http://lkml.kernel.org/r/20170531215653.3240-9-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f57a41434fc51732dd5e35e0e1aa9e607f1a05d6 Author: Jeremy Linton Date: Wed May 31 16:56:48 2017 -0500 trace: rename enum_map functions Rename the core trace enum routines to use eval, to reflect their use by more than just enum to value mapping. Link: http://lkml.kernel.org/r/20170531215653.3240-8-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 74 ++++++++++++++++++++++----------------------- kernel/trace/trace.h | 4 +-- kernel/trace/trace_events.c | 2 +- 3 files changed, 40 insertions(+), 40 deletions(-) commit 5f60b351a7e37bf243725bcc131708be2c8ea497 Author: Jeremy Linton Date: Wed May 31 16:56:47 2017 -0500 trace: rename trace.c enum functions Rename the init and trace_enum_jmp_to_tail() routines to reflect their use by more than enumerated types. Link: http://lkml.kernel.org/r/20170531215653.3240-7-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1793ed939b2a0e18b06467e10d15b66925d75d5f Author: Jeremy Linton Date: Wed May 31 16:56:46 2017 -0500 trace: rename trace_enum_mutex to trace_eval_mutex There is a lock protecting the trace_enum_map, rename it to reflect the use by more than enums. Link: http://lkml.kernel.org/r/20170531215653.3240-6-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 23bf8cb8dc86c0368d2471ebb4622e7edd38190b Author: Jeremy Linton Date: Wed May 31 16:56:45 2017 -0500 trace: rename trace enum data structures in trace.c The enum map entries can be exported to userspace via a sys enum_map file. Rename those functions and structures to reflect the fact that we are using them for more than enums. Link: http://lkml.kernel.org/r/20170531215653.3240-5-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 99be647c5841d570a23b5dfa65bfecada8b6e6b5 Author: Jeremy Linton Date: Wed May 31 16:56:44 2017 -0500 trace: rename struct module entry for trace enums Each module has a list of enum's its contributing to the enum map, rename that entry to reflect its use by more than enums. Link: http://lkml.kernel.org/r/20170531215653.3240-4-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) include/linux/module.h | 4 ++-- kernel/module.c | 6 +++--- kernel/trace/trace.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) commit 00f4b652b6f1dbfd4e1d5419d7f1cc23b1374da8 Author: Jeremy Linton Date: Wed May 31 16:56:43 2017 -0500 trace: rename trace_enum_map to trace_eval_map Each enum is loaded into the trace_enum_map, as we are now using this for more than enums rename it. Link: http://lkml.kernel.org/r/20170531215653.3240-3-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) include/linux/module.h | 2 +- include/linux/tracepoint.h | 6 +++--- include/trace/trace_events.h | 8 ++++---- kernel/trace/trace.c | 24 ++++++++++++------------ kernel/trace/trace.h | 4 ++-- kernel/trace/trace_events.c | 14 +++++++------- 6 files changed, 29 insertions(+), 29 deletions(-) commit 02fd7f68f5342bc7e8054cb05ea4a07f26d41d12 Author: Jeremy Linton Date: Wed May 31 16:56:42 2017 -0500 trace: rename kernel enum section to eval The kernel and its modules have sections containing the enum string to value conversions. Rename this section because we intend to store more than enums in it. Link: http://lkml.kernel.org/r/20170531215653.3240-2-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) include/asm-generic/vmlinux.lds.h | 6 +++--- include/trace/trace_events.h | 2 +- kernel/module.c | 2 +- kernel/trace/trace.c | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) commit d471d55934ca8b4f38535207589df4e3cc8b1484 Author: Kuninori Morimoto Date: Fri Jun 9 00:45:23 2017 +0000 ASoC: audio-graph-card: use asoc_simple_card_clk_xxx() Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_clk_enable/disable. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6654fc77797e306a3b67b3cdf0b6121294893dba Author: Kuninori Morimoto Date: Fri Jun 9 00:45:01 2017 +0000 ASoC: audio-graph-scu-card: use asoc_simple_card_clk_xxx() Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_clk_enable/disable. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-scu-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb24a3ba3f52942b5f3eb6c10288da830ec9ef70 Author: Kuninori Morimoto Date: Fri Jun 9 00:44:40 2017 +0000 ASoC: simple-scu-card: use asoc_simple_card_clk_xxx() Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_clk_enable/disable. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ab50c4f98434080c1f73fc56d8d8b38364c6cd8 Author: Kuninori Morimoto Date: Fri Jun 9 00:44:16 2017 +0000 ASoC: simple-card: use asoc_simple_card_clk_xxx() Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_clk_enable/disable. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 891caea417469b4efdf506b6be1ef461b759c999 Author: Kuninori Morimoto Date: Fri Jun 9 00:43:18 2017 +0000 ASoC: simple_card_utils: add asoc_simple_card_clk_xxx() Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's encapsulate it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 2 ++ sound/soc/generic/simple-card-utils.c | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit 03cf603a49a82938b05d9b448938cd0a541ed374 Merge: 37fae57 a97a06c Author: Mark Brown Date: Tue Jun 13 21:57:18 2017 +0100 Merge branch 'topic/rcar' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-of-graph commit 37fae57931e4fdd5c24ee13826b12e8e1a51d4e1 Merge: 155b8f3 d2fdcc2 Author: Mark Brown Date: Tue Jun 13 21:52:08 2017 +0100 Merge branch 'topic/simple' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-of-graph commit 5894b91d1e700f38b4157df143be1502cf08daa8 Author: Sugar Zhang Date: Fri Jun 9 16:52:46 2017 +0800 ASoC: rockchip: i2s: add a delay before i2s clear in order to guarantee i2s lrck signal integrity, when i2s stop, need at least one lrck cycle to ensure signal integrity. the max delay time is when lrck is 8khz, the delay time is 125us(1/8khz), using udelay(150) with a 25us margin. Signed-off-by: Sugar Zhang Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 2 ++ 1 file changed, 2 insertions(+) commit ec2212c4af20d84841ae288a397d8ee9ecec72a0 Author: zhangjun Date: Fri Jun 9 16:52:48 2017 +0800 ASoC: rockchip: i2s: add other configurable formats simple-audio-card,bitclock-inversion = <1> : bclk falling edge taken simple-audio-card,format = "dsp_a" : pcm no delay mode simple-audio-card,format = "dsp_b" : pcm late 1 mode Signed-off-by: zhangjun Signed-off-by: Sugar Zhang Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 30 ++++++++++++++++++++++++++++-- sound/soc/rockchip/rockchip_i2s.h | 3 +++ 2 files changed, 31 insertions(+), 2 deletions(-) commit 55f42d2e28a42b06907c916c3c71ceb6dfb5afc4 Author: Sugar Zhang Date: Fri Jun 9 15:59:32 2017 +0800 ASoC: rockchip: add bindings for spdif controller this patch add compatible for rk3228/rk3328 spdif, Signed-off-by: Sugar Zhang Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rockchip-spdif.txt | 2 ++ sound/soc/rockchip/rockchip_spdif.c | 4 ++++ 2 files changed, 6 insertions(+) commit 7c197881e163f34679b941c75500a6c85560b7c9 Author: Andy Shevchenko Date: Sat Jun 10 19:37:41 2017 +0300 ASoC: Intel: byt-max98090: Add GPIO ACPI mapping table In order to make GPIO ACPI library stricter prepare users of gpiod_get_index() to correctly behave when there no mapping is provided by firmware. Here we add explicit mapping between _CRS GpioIo() resources and their names used in the driver. Reviewed-by: Dmitry Torokhov Tested-by: Nicolas Porcel Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/byt-max98090.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit f0b04d8b442757f7bcad2cd07b54f63910253ebc Author: Kuninori Morimoto Date: Wed Jun 7 00:11:48 2017 +0000 ASoC: rsnd: control kctrl items acceptance anytime/runtime Current SRC/DVC/CTU adds kctrl for each device, and SRC can adjust its sampling rate during playback, thus, this feature should be enabled only *during* playback. This patch controls it more clearly Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 17 +++++++++++++++++ sound/soc/sh/rcar/ctu.c | 6 ++++++ sound/soc/sh/rcar/dvc.c | 5 +++++ sound/soc/sh/rcar/rsnd.h | 16 ++++++++++------ sound/soc/sh/rcar/src.c | 2 ++ 5 files changed, 40 insertions(+), 6 deletions(-) commit 8cce431aa26ef24a4d4b820301ac73bf55df7a5e Author: Kuninori Morimoto Date: Fri Jun 9 00:34:09 2017 +0000 ASoC: rsnd: add detail explanation of L/R conversion timing Renesas Sound device *Hardware* L/R and Linux *Software* L/R are inverted. Because of this background, it needs to convert L/R. Then, DVC needs *Hardware* L/R, and Linux needs *Software* L/R. Because Playback/Capture needs different timing, and there is no explanation about it on source code / git log, this patch adds it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit b217566a525ff24334d17635a865f44b68c2c583 Merge: 38b6ec5 3cc9f25 Author: David S. Miller Date: Tue Jun 13 16:35:04 2017 -0400 Merge branch 'net-dsa-Multi-CPU-ground-work' Florian Fainelli says: ==================== net: dsa: Multi-CPU ground work (v4) This patch series prepares the ground for adding mutliple CPU port support to DSA, and starts by removing redundant pieces of information such as master_netdev which is cpu_dp->ethernet. Finally drivers are moved away from directly accessing ds->dst->cpu_dp and use appropriate helper functions. Note that if you have Device Tree blobs/platform configurations that are currently listing multiple CPU ports, the proposed behavior in dsa_ds_get_cpu_dp() will be to return the last bit set in ds->cpu_port_mask. Future plans include: - making dst->cpu_dp a flexible data structure (array, list, you name it) - having the ability for drivers to return a default/preferred CPU port (if necessary) Changes in v4: - fixed build warning with NETPOLL enabled Changes in v3: - removed the last patch since it causes problems with bcm_sf2/b53 in a dual-CPU case (root cause known, proper fix underway) - removed dsa_ds_get_cpu_dp() Changes in v2: - added Reviewed-by tags - assign port->cpu_dp earlier before ops->setup() has run ==================== Signed-off-by: David S. Miller commit 3cc9f2573cdcbc6991aa2d1c8e04a4b9190487f8 Author: Florian Fainelli Date: Tue Jun 13 13:27:22 2017 -0700 net: dsa: Introduce dsa_get_cpu_port() Introduce a helper function which will return a reference to the CPU port used in a dsa_switch_tree. Right now this is a singleton, but this will change once we introduce multi-CPU port support, so ease the transition by converting the affected code paths. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 5 +++++ net/dsa/slave.c | 31 ++++++++++++++++--------------- net/dsa/tag_brcm.c | 5 ++--- net/dsa/tag_ksz.c | 5 ++--- net/dsa/tag_qca.c | 3 ++- net/dsa/tag_trailer.c | 5 ++--- 6 files changed, 29 insertions(+), 25 deletions(-) commit a29342e739115211615acc33616e547b2d3e0663 Author: Florian Fainelli Date: Tue Jun 13 13:27:21 2017 -0700 net: dsa: Associate slave network device with CPU port In preparation for supporting multiple CPU ports with DSA, have the dsa_port structure know which CPU it is associated with. This will be important in order to make sure the correct CPU is used for transmission of the frames. If not for functional reasons, for performance (e.g: load balancing) and forwarding decisions. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 1 + net/dsa/dsa2.c | 11 +++++++++++ net/dsa/dsa_priv.h | 2 +- net/dsa/legacy.c | 1 + net/dsa/slave.c | 4 +++- 5 files changed, 17 insertions(+), 2 deletions(-) commit 67dbb9d433447e358de7d293f15318bb5db9529b Author: Florian Fainelli Date: Tue Jun 13 13:27:20 2017 -0700 net: dsa: Relocate master ethtool operations Relocate master_ethtool_ops and master_orig_ethtool_ops into struct dsa_port in order to be both consistent, and make things self contained within the dsa_port structure. This is a preliminary change to supporting multiple CPU port interfaces. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 17 +++++------------ net/dsa/dsa.c | 16 ++++++---------- net/dsa/slave.c | 16 ++++++++-------- 3 files changed, 19 insertions(+), 30 deletions(-) commit 6d3c8c0dd88a5ffc7e3695997641e4b6d4c11065 Author: Florian Fainelli Date: Tue Jun 13 13:27:19 2017 -0700 net: dsa: Remove master_netdev and use dst->cpu_dp->netdev In preparation for supporting multiple CPU ports, remove dst->master_netdev and ds->master_netdev and replace them with only one instance of the common object we have for a port: struct dsa_port::netdev. ds->master_netdev is currently write only and would be helpful in the case where we have two switches, both with CPU ports, and also connected within each other, which the multi-CPU port patch series would address. While at it, introduce a helper function used in net/dsa/slave.c to immediately get a reference on the master network device called dsa_master_netdev(). Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 4 ++-- drivers/net/dsa/mt7530.c | 4 ++-- include/net/dsa.h | 5 ----- net/dsa/dsa.c | 9 ++------- net/dsa/dsa2.c | 18 +++++++----------- net/dsa/dsa_priv.h | 5 +++++ net/dsa/legacy.c | 22 +++++++++++++--------- net/dsa/slave.c | 21 +++++++++------------ 8 files changed, 40 insertions(+), 48 deletions(-) commit 0994c030443b50089b8ac74bc863d71238739f2e Author: Takashi Iwai Date: Thu Jun 8 23:37:25 2017 +0200 ASoC: samsung: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx_uda134x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b02ee56087adae4819ce4d91c08d57403f71fd34 Author: Takashi Iwai Date: Thu Jun 8 23:37:24 2017 +0200 ASoC: mediatek: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai Acked-By: Matthias Brugger Signed-off-by: Mark Brown sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92f468d2c587e3cea32032df064d06c96637f295 Author: Takashi Iwai Date: Thu Jun 8 23:37:20 2017 +0200 ASoC: cs53l30: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/cs53l30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8fa1a4929849b71936f30e88c0b17c3a641509d Author: Takashi Iwai Date: Thu Jun 8 23:37:19 2017 +0200 ASoC: cs35l34: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/cs35l34.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 617647ae2880cf291293048f8cfd54f8111acb1c Author: Takashi Iwai Date: Thu Jun 8 23:37:23 2017 +0200 ASoC: intel: skl: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_max98357a.c | 16 ++++++++-------- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 16 ++++++++-------- sound/soc/intel/boards/skl_rt286.c | 12 ++++++------ 3 files changed, 22 insertions(+), 22 deletions(-) commit 1ebb4d9dbf8f7a429abff359fa1d779b639da76f Author: Takashi Iwai Date: Thu Jun 8 23:37:22 2017 +0200 ASoC: intel: byt: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_nocodec.c | 4 ++-- sound/soc/intel/boards/bytcr_rt5651.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 881b556f6cf22d37be9340f293f2db10ce7ae8bf Author: Jean-Baptiste Maneyrol Date: Tue Jun 6 10:29:52 2017 +0000 iio: imu: inv_mpu6050: test whoami first and against all known values SPI bus is never generating error during transfer, so to check if a chip is correctly connected on a SPI bus we enforce whoami check to be correct. In this way we can assure SPI probe is failing if there is no chip connected. Note that this is really papering over boards that claim the device is there when it isn't. Not a bad thing to cope with, but not necessarily stable material. Fixes: cec0154556f8 ("iio: inv_mpu6050: Check WHO_AM_I register on probe") Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 33 ++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 0483fff4d0ae0c7cd4cddb121983352bd2b3aad9 Author: Alexander Wuerstlein Date: Mon Jun 12 13:56:05 2017 +0200 iio hid-sensor-trigger: add Kconfig depends on IIO_BUFFER Building a kernel with my configuration failed with: > drivers/built-in.o: In function `hid_sensor_setup_batch_mode': staging/drivers/iio/common/hid-sensors/hid-sensor-trigger.c:104: undefined reference to `iio_buffer_set_attrs' which is fixed by this patch. Signed-off-by: Alexander Wuerstlein Fixes: 138bc7969c24 ("iio: hid-sensor-hub: Implement batch mode") Signed-off-by: Jonathan Cameron drivers/iio/common/hid-sensors/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38b6ec5008bb7019a705b576df345509f39d3f4b Author: Ganesh Goudar Date: Wed Jun 14 00:45:43 2017 +0530 cxgb4: handle serial flash interrupt If SF bit is not cleared in PL_INT_CAUSE, subsequent non-data interrupts are not raised. Enable SF bit in Global Interrupt Mask and handle it as non-fatal and hence eventually clear it. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39b1aae758de6f933f8b45698b56221f6e817dc9 Merge: 779ec2a 4ae6f95 Author: Florian Fainelli Date: Tue Jun 13 12:39:57 2017 -0700 Merge tag 'bcm2835-dt-64-next-2017-06-08' into devicetree-arm64/next This pull request brings in the switch to sdhost for MMC on RPi3 (improving storage performance and leaving sdhci for wireless), and the correct CPU thermal coefficients. The thermal changes required a merge from bcm2835-dt-next, where the nodes were added. Signed-off-by: Florian Fainelli commit 4a579ecf3d4f964bd6b39605610201cd4d5a7e8e Merge: 40c26d3 9c53535 Author: Florian Fainelli Date: Tue Jun 13 12:38:48 2017 -0700 Merge tag 'bcm2835-dt-next-2017-06-12' into devicetree/next This pull request brings in installation of the RPi3 DT in 32-bit mode, the new thermal nodes, switches to the faster sdhost controller for MMC, and enables USB OTG mode on the Pi 0. Signed-off-by: Florian Fainelli commit a6adb15fc87f22e3c19dcfd0b0ff4ddc2dd4b4a1 Merge: 2ea659a c5c168b Author: Florian Fainelli Date: Tue Jun 13 12:38:10 2017 -0700 Merge tag 'bcm2835-maintainers-next-2017-06-08' into maintainers/next This pull request drops Lee Jones from bcm2835 maintainership, who has been inactive for over a year. Signed-off-by: Florian Fainelli commit e4269eb4bebec3e42e386ceeadcb8a581936f18c Merge: 2ea659a 3e9aaaf Author: Florian Fainelli Date: Tue Jun 13 12:36:49 2017 -0700 Merge tag 'bcm2835-defconfig-next-2017-06-12' into defconfig/next This pull request enables USB OTG mode in the Pi 0/1 defconfig. Signed-off-by: Florian Fainelli commit c81be52a3ac0267aa830a2c4cb769030ea3483c9 Author: Paul Moore Date: Mon Jun 12 09:35:24 2017 -0400 audit: fix a race condition with the auditd tracking code Originally reported by Adam and Dusty, it appears we have a small race window in kauditd_thread(), as documented in the Fedora BZ: * https://bugzilla.redhat.com/show_bug.cgi?id=1459326#c35 "This issue is partly due to the read-copy nature of RCU, and partly due to how we sync the auditd_connection state across kauditd_thread and the audit control channel. The kauditd_thread thread is always running so it can service the record queues and emit the multicast messages, if it happens to be just past the "main_queue" label, but before the "if (sk == NULL || ...)" if-statement which calls auditd_reset() when the new auditd connection is registered it could end up resetting the auditd connection, regardless of if it is valid or not. This is a rather small window and the variable nature of multi-core scheduling explains why this is proving rather difficult to reproduce." The fix is to have functions only call auditd_reset() when they believe that the kernel/auditd connection is still valid, e.g. non-NULL, and to have these callers pass their local copy of the auditd_connection pointer to auditd_reset() where it can be compared with the current connection state before resetting. If the caller has a stale state tracking pointer then the reset is ignored. We also make a small change to kauditd_thread() so that if the kernel/auditd connection is dead we skip the retry queue and send the records straight to the hold queue. This is necessary as we used to rely on auditd_reset() to occasionally purge the retry queue but we are going to be calling the reset function much less now and we want to make sure the retry queue doesn't grow unbounded. Reported-by: Adam Williamson Reported-by: Dusty Mabe Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit c351587e2502050f36d16e9e32c6c98975ecd6a2 Author: Jeffy Chen Date: Tue Jun 13 13:25:40 2017 +0800 spi: rockchip: fix error handling when probe After failed to request dma tx chain, we need to disable pm_runtime. Also cleanup error labels for better readability. Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit d8b5d94538eb1cb18be36048b0ddb9bd2e80a252 Author: Stefan Berger Date: Wed May 24 17:39:41 2017 -0400 tpm: vtpm_proxy: Prevent userspace from sending driver command To prevent userspace from sending the TPM driver command to set the locality, we need to check every command that is sent from user space. To distinguish user space commands from internally sent commands we introduce an additional state flag STATE_DRIVER_COMMAND that is set while the driver sends this command. Similar to the TPM 2 space commands we return an error code when this command is detected. Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_vtpm_proxy.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit be4c9acfe2976b6e024d15656254d2eb207b83a8 Author: Stefan Berger Date: Wed May 24 17:39:40 2017 -0400 tpm: vtpm_proxy: Implement request_locality function. Implement the request_locality function. To set the locality on the backend we define vendor-specific TPM 1.2 and TPM 2 ordinals and send a command to the backend to set the locality for the next commands. To avoid recursing into requesting the locality, we set the TPM_TRANSMIT_RAW flag when calling tpm_transmit_cmd. To avoid recursing into TPM 2 space related commands, we set the space parameter to NULL. Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 1 + drivers/char/tpm/tpm_vtpm_proxy.c | 36 ++++++++++++++++++++++++++++++++++++ include/uapi/linux/vtpm_proxy.h | 4 ++++ 3 files changed, 41 insertions(+) commit 85ab3bf305b96e5f4c83b23a0b7e11d90144eb18 Author: Stefan Berger Date: Wed May 24 17:39:39 2017 -0400 tpm: Introduce flag TPM_TRANSMIT_RAW Introduce the flag TPM_TRANSMIT_RAW that allows us to transmit a command without recursing into the requesting of locality. Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 3 ++- drivers/char/tpm/tpm.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 402149c6470d9562fe6891e0165df7f5f6bff7a7 Author: Stefan Berger Date: Thu May 25 18:29:13 2017 -0400 tpm: vtpm_proxy: Suppress error logging when in closed state Suppress the error logging when the core TPM driver sends commands to the VTPM proxy driver and -EPIPE is returned in case the VTPM proxy driver is 'closed' (closed anonymous file descriptor). This error code is only returned by the send function and by tpm_transmit when the VTPM proxy driver is being used. Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 5 +++-- drivers/char/tpm/tpm2-cmd.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 5e9fefd26b47205e423b23c3f0a41b068c84fa1d Author: Peter Huewe Date: Thu May 25 07:43:05 2017 +0200 tpm, tpmrm: Mark tpmrm_write as static sparse complains that tpmrm_write can be made static, and since it is right we make it static. Signed-off-by: Peter Huewe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpmrm-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8816188f060a791e08eacfeba3d28343b931872b Author: Jarkko Sakkinen Date: Wed May 24 15:26:08 2017 -0700 tpm: remove struct tpm_pcrextend_in Removed struct tpm_pcrextend_in as it is not used for anything anymore. Signed-off-by: Jarkko Sakkinen Reviewed-by: Peter Huewe drivers/char/tpm/tpm.h | 6 ------ 1 file changed, 6 deletions(-) commit 30bbafe3e0d4be1b0570dc620bc362ca2f516160 Author: Jarkko Sakkinen Date: Wed May 24 14:29:16 2017 -0700 tpm, tpm_infineon: remove useless snprintf() calls The memory copy from rodata to stack is useless. Signed-off-by: Jarkko Sakkinen Reviewed-by: Peter Huewe drivers/char/tpm/tpm_infineon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 124bdcf4a697f9672d1150de60c5ea489bcad201 Author: Jarkko Sakkinen Date: Sun May 7 20:50:02 2017 +0300 tpm: fix byte order related arithmetic inconsistency in tpm_getcap() You should not do arithmetic with __be32 or __le32 types because sometimes it results incorrect results. Calculations must be done only with integers that are in in the CPU byte order. This commit migrates tpm_getcap() to struct tpm_buf in order to sort out these issues. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm-interface.c | 30 ++++++++++++++++-------------- drivers/char/tpm/tpm.h | 13 ------------- 2 files changed, 16 insertions(+), 27 deletions(-) commit d8c3eab5cb92f37ca8576fc641fa4bfd8a0c8b00 Author: Bryan Freed Date: Mon May 22 11:20:11 2017 +0200 tpm: Apply a sane minimum adapterlimit value for retransmission. When the I2C Infineon part is attached to an I2C adapter that imposes a size limitation, large requests will fail with -EOPNOTSUPP. Retry them with a sane minimum size without re-issuing the 0x05 command as this appears to occasionally put the TPM in a bad state. Signed-off-by: Bryan Freed [rework the patch to adapt to the feedback received] Signed-off-by: Enric Balletbo i Serra Acked-by: Andrew Lunn Reviewed-by: Jarkko Sakkinen Reviewed-by: Andrew Lunn Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_i2c_infineon.c | 76 +++++++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 20 deletions(-) commit 4cb586a188d468e05649575f0689dd2bf8c122e6 Author: Jason Gunthorpe Date: Thu May 4 09:53:25 2017 -0600 tpm_tis: Consolidate the platform and acpi probe flow Now that the platform device was merged for OF support we can use the platform device to match ACPI devices as well and run everything through tpm_tis_init. pnp_acpi_device is replaced with ACPI_COMPANION, and ACPI_HANDLE is pushed further down. platform_get_resource is used instead of acpi_dev_get_resources. The itpm global module parameter is no longer changed during itpm detection, instead the phy specific bit is set directly. Signed-off-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Tested-by: Jerry Snitselaar (with TPM 2.0) Tested-by: Jarkko Sakkinen (with TPM 1.2) Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis.c | 167 +++++++++++++++------------------------------ 1 file changed, 54 insertions(+), 113 deletions(-) commit fc0e132229a7ef5a8096e2876463403df0767b1b Author: Jason Gunthorpe Date: Thu May 4 09:53:24 2017 -0600 tpm_tis: Use platform_get_irq Replace the open coded IORESOURCE_IRQ with platform_get_irq, which supports more cases. Fixes: 00194826e6be ("tpm_tis: Clean up the force=1 module parameter") Signed-off-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Tested-by: Jerry Snitselaar (with TPM 2.0) Tested-by: Jarkko Sakkinen (with TPM 1.2) Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d27f81f061bbde627ac4fbd735114f9ea2c63615 Author: Jason Gunthorpe Date: Thu May 4 09:53:23 2017 -0600 tpm_tis: Fix IRQ autoprobing when using platform_device The test was backwards, triggering IRQ autoprobing if the firmware did not specify an IRQ, instead of triggering it only when the module force parameter was specified. Since autoprobing is not enabled on !x86 and the platform device is currently only used on !x86, or with force, this has gone unnoticed. Fixes: 00194826e6be ("tpm_tis: Clean up the force=1 module parameter") Signed-off-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Tested-by: Jerry Snitselaar (with TPM 2.0) Tested-by: Jarkko Sakkinen (with TPM 1.2) Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 175d5b2a570cc0f79a23dbaf86e35e660f6f544f Author: Roberto Sassu Date: Thu May 4 13:16:47 2017 +0200 tpm: move TPM 1.2 code of tpm_pcr_extend() to tpm1_pcr_extend() In preparation of the modifications to tpm_pcr_extend(), which will allow callers to supply a digest for each PCR bank of a TPM 2.0, the TPM 1.2 specific code has been moved to tpm1_pcr_extend(). tpm1_pcr_extend() uses tpm_buf_init() to prepare the command buffer, which offers protection against buffer overflow. It is called by tpm_pcr_extend() and tpm_pm_suspend(). Signed-off-by: Roberto Sassu Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 41 +++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit a69faebf4d3e98c6a7a656c26b09bc532edfed08 Author: Roberto Sassu Date: Wed May 3 18:19:10 2017 +0200 tpm: move endianness conversion of ordinals to tpm_input_header Move CPU native value to big-endian conversion of ordinals to the tpm_input_header declarations. With the previous and this patch it will now be possible to modify TPM 1.2 functions to use tpm_buf_init(), which expects CPU native value for the tag and ordinal arguments. Signed-off-by: Roberto Sassu Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 24 ++++++++++++------------ drivers/char/tpm/tpm-sysfs.c | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) commit 06e93279ca77ce2820723427f118a22dd0b35f0f Author: Roberto Sassu Date: Wed May 3 18:19:09 2017 +0200 tpm: move endianness conversion of TPM_TAG_RQU_COMMAND to tpm_input_header In the long term, TPM 1.2 functions in the driver interface will be modified to use tpm_buf_init(). However, tag and ordinals cannot be passed directly to tpm_buf_init(), because this function performs CPU native to big-endian conversion of these arguments. Since TPM_TAG_RQU_COMMAND and TPM_ORD_ are already converted, passing them to the function will undo the previous conversion. This patch moves the conversion of TPM_TAG_RQU_COMMAND from the tpm.h header file in the driver directory to the tpm_input_header declarations in the driver interface and tpm-sysfs.c. Signed-off-by: Roberto Sassu Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 14 +++++++------- drivers/char/tpm/tpm-sysfs.c | 2 +- drivers/char/tpm/tpm.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit b901216441e6599063ff2828ec7f2f902b9902f0 Author: Paul Elder Date: Mon Jun 12 08:56:50 2017 +0200 kselftest: breakpoints: convert step_after_suspend_test to TAP13 output Make the step_after_suspend test output in the TAP13 format by using the TAP13 output functions defined in kselftest.h Signed-off-by: Paul Elder Signed-off-by: Alice Ferrazzi Signed-off-by: Greg Kroah-Hartman Signed-off-by: Shuah Khan .../breakpoints/step_after_suspend_test.c | 43 +++++++++------------- 1 file changed, 17 insertions(+), 26 deletions(-) commit 748e84b79af0121a39eb55f0cb5a727e08eb91b2 Author: Paul Elder Date: Mon Jun 12 08:56:49 2017 +0200 kselftest: breakpoints: convert breakpoint_test to TAP13 output Make the breakpoints test output in the TAP13 format by using the TAP13 output functions defined in kselftest.h Signed-off-by: Paul Elder Signed-off-by: Alice Ferrazzi Signed-off-by: Greg Kroah-Hartman Signed-off-by: Shuah Khan .../selftests/breakpoints/breakpoint_test.c | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 326f57a4c378f4dacf8fbeb05a1decfeff74f54e Author: Paul Elder Date: Mon Jun 12 08:56:48 2017 +0200 kselftest: membarrier: convert to TAP13 output Make the membarrier test output in the TAP13 format by using the TAP13 output functions defined in kselftest.h Signed-off-by: Paul Elder Signed-off-by: Alice Ferrazzi Signed-off-by: Greg Kroah-Hartman Signed-off-by: Shuah Khan .../testing/selftests/membarrier/membarrier_test.c | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) commit b6a4b66d845ae4c7f4eece419269c65ca332ba7b Author: Paul Elder Date: Mon Jun 12 08:56:47 2017 +0200 kselftest: add TAP13 conformant versions of ksft_* functions Add TAP13 conformat output functions to kselftest.h. Also add exit functions that output TAP13 exiting text, as well as functions to keep track of testing progress. Signed-off-by: Paul Elder Signed-off-by: Alice Ferrazzi Signed-off-by: Greg Kroah-Hartman Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 52 ++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) commit fc4f226fece3d09d1014c2e98b5accc874a62617 Author: Leilk Liu Date: Mon Jun 12 09:24:40 2017 +0800 spi: mediatek: add spi support for mt7622 IC this patch add support for mt7622 IC. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown drivers/spi/spi-mt65xx.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 058fe49da3b6ab71b57effd49dcc5d007071eea5 Author: Leilk Liu Date: Mon Jun 12 09:24:39 2017 +0800 spi: mediatek: adjust register to enhance time accuracy this patch adjust register to enhance time accuracy. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown drivers/spi/spi-mt65xx.c | 45 ++++++++++++++++++++++++++++---- include/linux/platform_data/spi-mt65xx.h | 2 ++ 2 files changed, 42 insertions(+), 5 deletions(-) commit 8cd8a186eb30c87e0b855cf4823034472413914e Author: Kuninori Morimoto Date: Tue May 16 01:48:24 2017 +0000 ASoC: rsnd: don't call free_irq() on Parent SSI If SSI uses shared pin, some SSI will be used as parent SSI. Then, normal SSI's remove and Parent SSI's remove (these are same SSI) will be called when unbind or remove timing. In this case, free_irq() will be called twice. This patch solve this issue. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Reported-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/ssi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 17616ce62c84c94e9519574e9d2df6f20e80a285 Author: Oder Chiou Date: Mon Jun 12 11:02:17 2017 +0800 ASoC: rt5663: Check the JD status in the resume function In the suspend, the IRQ function will not work in some machines. So the JD status should be checked in the resume function. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 2 ++ 1 file changed, 2 insertions(+) commit a03bdaa565cbf23fa86697727a7d2bf1465e7a03 Author: Daniel Drake Date: Mon Jun 12 11:01:46 2017 -0600 ASoC: Intel: add machine driver for BYT/CHT + ES8316 Add new machine driver, tested with Weibu F3C MiniPC. Based heavily on code provided by David Yang @ Everest, and other machine drivers in the same directory. Signed-off-by: David Yang [drake@endlessm.com: cleanups and modernization] Signed-off-by: Daniel Drake Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 12 ++ sound/soc/intel/atom/sst/sst_acpi.c | 7 + sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/bytcht_es8316.c | 300 +++++++++++++++++++++++++++++++++ 4 files changed, 321 insertions(+) commit b8b88b70875af786d9f346d766fa2b0630e2cf41 Author: Daniel Drake Date: Mon Jun 12 11:01:45 2017 -0600 ASoC: add es8316 codec driver Add a codec driver for the Everest ES8316, based on code provided by David Yang from Everest Semi. I limited the functionality to items where the vendor code was clear, and things that can be tested on the Weibu F3C (Intel Cherry Trail). As a result the initial implementation only supports running in slave mode at single speed (up to 48kHz sample rate) using I2S. HPD is not supported. Signed-off-by: David Yang [drake@endlessm.com: significant cleanups and simplifications, remove dead/unclear code] Signed-off-by: Daniel Drake Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/es8316.c | 637 ++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/es8316.h | 129 ++++++++++ 4 files changed, 772 insertions(+) commit fc05a5b222530617d99d0e803abb262130fdb0c4 Author: Sugar Zhang Date: Tue Jun 13 15:27:46 2017 +0800 ASoC: rockchip: add support for pdm controller The Pulse Density Modulation Interface Controller (PDMC) is a PDM interface controller and decoder that support PDM format. It integrates a clock generator driving the PDM microphone and embeds filters which decimate the incoming bit stream to obtain most common audio rates. Signed-off-by: Sugar Zhang Signed-off-by: Mark Brown .../devicetree/bindings/sound/rockchip,pdm.txt | 39 ++ sound/soc/rockchip/Kconfig | 9 + sound/soc/rockchip/Makefile | 2 + sound/soc/rockchip/rockchip_pdm.c | 516 +++++++++++++++++++++ sound/soc/rockchip/rockchip_pdm.h | 83 ++++ 5 files changed, 649 insertions(+) commit cd3921f88b82f1c89057b964338f6d10204c7abc Author: Pali Rohár Date: Sat Jun 10 12:57:11 2017 +0200 platform/x86: wmi: Fix printing info about WDG structure object_id and notify_id are in one union structure and their meaning is defined by flags. Therefore do not print notify_id for non-event block and do not print object_id for event block. Remove also reserved member as it does not have any defined meaning or type yet. As object_id and notify_id union members overlaps and have different types, it caused that kernel print to dmesg binary data. This patch eliminates it. Signed-off-by: Pali Rohár Reviewed-by: Andy Shevchenko Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a63693a0e617636bd786c7d6bd114b37435e14ef Author: Bhumika Goyal Date: Fri Jun 9 11:27:40 2017 +0530 platform/x86: dell-rbtn: constify rfkill_ops structures Add const to rfkill_ops structures that are only passed as an argument to the functions rfkill_alloc or samsung_new_rfkill. These arguments are of type const, so such structures can be annotated with const. Signed-off-by: Bhumika Goyal Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-rbtn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d59dfcd1f2610d26da2cf19646ace6692c521dc Author: Bhumika Goyal Date: Fri Jun 9 11:38:18 2017 +0530 platform/x86: ideapad-laptop: constify rfkill_ops structure Add const to rfkill_ops structure as it is only passed as an argument to the functions rfkill_alloc. This argument is of type const, so annotate the structure with const. Signed-off-by: Bhumika Goyal Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8314a1c8dd183e36342bd00c1e46b6c7e38939b1 Author: Bhumika Goyal Date: Fri Jun 9 11:31:44 2017 +0530 platform/x86: samsung-laptop: constify rfkill_ops structures Add const to rfkill_ops structures that are only passed as an argument to the functions rfkill_alloc or samsung_new_rfkill. These arguments are of type const, so such structures can be annotated with const. Signed-off-by: Bhumika Goyal Signed-off-by: Andy Shevchenko drivers/platform/x86/samsung-laptop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c9c56645f46c6be4e3303cf1dd25d69c674d293 Author: Darren Hart (VMware) Date: Tue Jun 6 16:40:56 2017 -0700 platform/x86: wmi*: Add recent copyright statements Add copyright statements for Andy Lutomirski and Darren Hart (VMware) for their contributions to the WMI bus infrastructure and the creation of the wmi-bmof driver. Signed-off-by: Darren Hart (VMware) Cc: Andy Lutomirski drivers/platform/x86/wmi-bmof.c | 1 + drivers/platform/x86/wmi.c | 4 ++++ 2 files changed, 5 insertions(+) commit 3e2bc5c5b3274ec7402fabbfba557ea58084985e Author: João Paulo Rechi Vita Date: Tue Jun 6 13:07:22 2017 -0700 platform/x86: acer-wmi: Detect RF Button capability If a machine reports a RF Button in the communication button device bitmap, we need to remove it before calling Get Device Status otherwise it will return the "Undefined device" (0xE2) error code. Although this may be a BIOS bug, we don't really need to get or set the RF Button status. The status indicator LED embedded in the button is controlled by firmware logic, depending on the status of the wireless radios present on the machine (WiFi || WWAN). This commit fixes the wireless status indicator LED on the Acer TravelMate P648-G2-MG, and cleans the following message from the kernel log: "Get Current Device Status failed: 0xe2 - 0x0". Signed-off-by: João Paulo Rechi Vita Reviewed-by: "Lee, Chun-Yi" Signed-off-by: Andy Shevchenko drivers/platform/x86/acer-wmi.c | 7 +++++++ 1 file changed, 7 insertions(+) commit feb4ec1412ab948c30dbf98cd9326825e8d49513 Author: Alex Hung Date: Wed May 31 16:17:48 2017 -0700 platform/x86: panasonic-laptop: remove unused code The struct pcc_keyinput is not used in panasonic-laptop and in anywhere in kernel, and it can be removed. Signed-off-by: Alex Hung Acked-by: Harald Welte Signed-off-by: Andy Shevchenko drivers/platform/x86/panasonic-laptop.c | 4 ---- 1 file changed, 4 deletions(-) commit 4798a714d6a78171d7df48c921dddd0dc004f0a0 Author: Jon Mason Date: Tue Jun 13 10:56:08 2017 -0400 of_mdio: move of_mdio_parse_addr to header file The of_mdio_parse_addr() helper function is useful to other code, but the module dependency chain causes issues. To work around this, we can move of_mdio_parse_addr() to be an inline function in the header file. This gets rid of the dependencies and still allows for the reuse of code. Reported-by: Liviu Dudau Signed-off-by: Jon Mason Fixes: 342fa1964439 ("mdio: mux: make child bus walking more permissive and errors more verbose") Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/of/of_mdio.c | 22 ---------------------- include/linux/of_mdio.h | 24 +++++++++++++++++++++++- 2 files changed, 23 insertions(+), 23 deletions(-) commit 0d2c95354a3b63256e92d9fb865c08902d2c9b0b Author: Andy Shevchenko Date: Wed Jun 7 16:56:15 2017 +0300 platform/x86: samsung-laptop: Initialize loca variable The variable is used uninitialized which might come into unexpected behaviour on some Samsung laptops. Initialize it to 0xffff which seems a proper value for non-supported feature. Reported-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko drivers/platform/x86/samsung-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efe5f9c0a7beb91efd8405468f19bbd6802e4e5d Author: Jesper Dangaard Brouer Date: Tue Jun 13 15:17:19 2017 +0200 selftests/bpf: make correct use of exit codes in bpf selftests The selftests depend on using the shell exit code as a mean of detecting the success or failure of test-binary executed. The appropiate output "[PASS]" or "[FAIL]" in generated by tools/testing/selftests/lib.mk. Notice that the exit code is masked with 255. Thus, be careful if using the number of errors as the exit code, as 256 errors would be seen as a success. There are two standard defined exit(3) codes: /usr/include/stdlib.h #define EXIT_FAILURE 1 /* Failing exit status. */ #define EXIT_SUCCESS 0 /* Successful exit status. */ Fix test_verifier.c to not use the negative value of variable "results", but instead return EXIT_FAILURE. Fix test_align.c and test_progs.c to actually use exit codes, before they were always indicating success regardless of results. Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Reviewed-by: Fengguang Wu Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_align.c | 2 +- tools/testing/selftests/bpf/test_progs.c | 2 +- tools/testing/selftests/bpf/test_verifier.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit fb34a368592aa842549b9637739bae000e84ff81 Author: Zhang Shengju Date: Tue Jun 13 20:49:49 2017 +0800 fjes: remove duplicate set of flag IFF_BROADCAST Remove unnecessary setting of flag IFF_BROADCAST, since ether_setup already does this. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller drivers/net/fjes/fjes_main.c | 1 - 1 file changed, 1 deletion(-) commit aa9f979c41043d9fcf7957c99948e20bbddefc7f Author: Johannes Berg Date: Tue Jun 13 14:28:18 2017 +0200 networking: use skb_put_zero() Use the recently introduced helper to replace the pattern of skb_put() && memset(), this transformation was done with the following spatch: @@ identifier p; expression len; expression skb; @@ -p = skb_put(skb, len); -memset(p, 0, len); +p = skb_put_zero(skb, len); Signed-off-by: Johannes Berg Signed-off-by: David S. Miller drivers/net/ethernet/apple/bmac.c | 3 +-- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 +-- drivers/net/ethernet/qualcomm/qca_spi.c | 3 +-- drivers/net/wireless/marvell/mwifiex/tdls.c | 4 ++-- drivers/nfc/pn533/pn533.c | 3 +-- lib/nlattr.c | 3 +-- net/sctp/sm_make_chunk.c | 3 +-- 7 files changed, 8 insertions(+), 14 deletions(-) commit 0e74008b668febb7ae024c7ee04b30dcbd1f1efd Merge: 5952b02 4524667 Author: David S. Miller Date: Tue Jun 13 13:52:37 2017 -0400 Merge tag 'mac80211-next-for-davem-2017-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== A couple of weeks worth of updates - looks like things are quiet: * merged net-next back to get a patch from net that another patch here depends on * various small improvements/cleanups across the board * 4-way handshake offload (many thanks to Arend for shepherding that) * mesh CSA/DFS support in mac80211 * the skb_put_zero() we discussed previously ==================== Signed-off-by: David S. Miller commit 8caab75fd2c2a92667cbb1cd315720bede3feaa9 Author: Geert Uytterhoeven Date: Tue Jun 13 13:23:52 2017 +0200 spi: Generalize SPI "master" to "controller" Now struct spi_master is used for both SPI master and slave controllers, it makes sense to rename it to struct spi_controller, and replace "master" by "controller" where appropriate. For now this conversion is done for SPI core infrastructure only. Wrappers are provided for backwards compatibility, until all SPI drivers have been converted. Noteworthy details: - SPI_MASTER_GPIO_SS is retained, as it only makes sense for SPI master controllers, - spi_busnum_to_master() is retained, as it looks up masters only, - A new field spi_device.controller is added, but spi_device.master is retained for compatibility (both are always initialized by spi_alloc_device()), - spi_flash_read() is used by SPI masters only. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi.c | 1081 ++++++++++++++++++++++---------------------- include/linux/spi/spi.h | 198 ++++---- include/trace/events/spi.h | 26 +- 3 files changed, 668 insertions(+), 637 deletions(-) commit c94085f587a77495eabb78a959bd591bee4ec89b Merge: ad25c92 ce70e06 b56ffae Author: Mark Brown Date: Tue Jun 13 18:51:05 2017 +0100 Merge branches 'topic/core', 'topic/slave' and 'fix/doc' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-master commit 5952b0200e9a0b0bfcc367d03a8caeb53e42545e Merge: 5514174 d628908 Author: David S. Miller Date: Tue Jun 13 13:47:16 2017 -0400 Merge tag 'batadv-next-for-davem-20170613' 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 - decrease maximum fragment size, by Matthias Schiffer - Clean up seqfile writing, by Markus Elfring (2 patches) - use __func__ in debug messages, by Sven Eckelmann - Mark tpmeter initializers with __init, by Antonio Quartulli - ignore loop detection MAC addresses, by Simon Wunderlich - clean up some return handling, by Simon Wunderlich - improve ELP throughput value handling for WiFi neighbors in BATMAN V/ELP, by Sven Eckelmann (2 patches) ==================== Signed-off-by: David S. Miller commit fe953904f3463609a9a671f68148d8532f2a5d9f Author: Michał Mirosław Date: Tue Jun 13 16:41:56 2017 +0200 regulator: tps65910: check TPS65910_NUM_REGS at build time Check TPS65910_NUM_REGS at build time instead of silently registering not all regulators at runtime. Signed-off-by: Michał Mirosław Signed-off-by: Mark Brown drivers/regulator/tps65910-regulator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 062171973e05440673cb997e64395e84a8e66350 Author: Charles Keepax Date: Tue Jun 13 16:12:47 2017 +0100 regulator: core: Prioritise consumer mappings over regulator name Currently, when looking up a regulator supply, the regulator name takes priority over the consumer mappings. As there are a lot of regulator names that are in fairly common use (VDD, MICVDD, etc.) this can easily lead to obtaining the wrong supply, when a system contains two regulators that share a name. The explicit consumer mappings contain much less ambiguity as they specify both a name and a consumer device. As such prioritise those if one exists and only fall back to the regulator name if there are no matching explicit mappings. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/regulator/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit acec3630155763c170c7ae6508cf973355464508 Author: Gustavo A. R. Silva Date: Fri Jun 2 00:43:41 2017 -0300 [media] s3c-camif: fix arguments position in a function call Fix the position of arguments so camif->colorfx_cb, camif->colorfx_cr are passed in proper order to the camif_hw_set_effect() function. Addresses-Coverity-ID: 1248800 Addresses-Coverity-ID: 1269141 [s.nawrocki@samsung.com: edited commit message ] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s3c-camif/camif-capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3966f5ce020cf24b814dbddf45d092aa2d133c1e Author: Nicholas Mc Guire Date: Mon Dec 12 23:58:02 2016 -0200 [media] s5k6aa: set usleep_range() range greater than 0 As this is not in atomic context and it does not seem like a critical timing setting a range of 1ms allows the timer subsystem to optimize the hrtimer here. Signed-off-by: Nicholas Mc Guire Acked-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5k6aa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57612890b7e7c511069b104deeca3c71db312a28 Author: Thibault Saunier Date: Wed Mar 1 08:51:07 2017 -0300 [media] exynos-gsc: Use user configured colorspace if provided Use colorspace provided by the user as we are only doing scaling and color encoding conversion, we won't be able to transform the colorspace itself and the colorspace won't mater in that operation. Also always use output colorspace on the capture side. If the user does not provide a colorspace do not make it up, we might later while processing need to figure out the colorspace, which is possible depending on the frame size but do not ever guess and leak that guess to the userspace. Signed-off-by: Javier Martinez Canillas Signed-off-by: Thibault Saunier Reviewed-by: Andrzej Hajda Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-core.c | 9 ++++----- drivers/media/platform/exynos-gsc/gsc-core.h | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) commit 6428f63b1da10dd326a5d7092c2be10286ef8aa6 Author: Benjamin Gaignard Date: Mon May 29 12:46:03 2017 -0300 [media] exynos4-is: use devm_of_platform_populate() Usage of devm_of_platform_populate() simplify driver code and save somes lines Signed-off-by: Benjamin Gaignard Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-is.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f9c79bc05a2a91f4fba8bfd653579e066714b1ec Author: Mikulas Patocka Date: Wed Jun 7 19:05:31 2017 -0400 md: don't use flush_signals in userspace processes The function flush_signals clears all pending signals for the process. It may be used by kernel threads when we need to prepare a kernel thread for responding to signals. However using this function for an userspaces processes is incorrect - clearing signals without the program expecting it can cause misbehavior. The raid1 and raid5 code uses flush_signals in its request routine because it wants to prepare for an interruptible wait. This patch drops flush_signals and uses sigprocmask instead to block all signals (including SIGKILL) around the schedule() call. The signals are not lost, but the schedule() call won't respond to them. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Acked-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 5 ++++- drivers/md/raid5.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit cc27b0c78c79680d128dbac79de0d40556d041bb Author: NeilBrown Date: Mon Jun 5 16:49:39 2017 +1000 md: fix deadlock between mddev_suspend() and md_write_start() If mddev_suspend() races with md_write_start() we can deadlock with mddev_suspend() waiting for the request that is currently in md_write_start() to complete the ->make_request() call, and md_write_start() waiting for the metadata to be updated to mark the array as 'dirty'. As metadata updates done by md_check_recovery() only happen then the mddev_lock() can be claimed, and as mddev_suspend() is often called with the lock held, these threads wait indefinitely for each other. We fix this by having md_write_start() abort if mddev_suspend() is happening, and ->make_request() aborts if md_write_start() aborted. md_make_request() can detect this abort, decrease the ->active_io count, and wait for mddev_suspend(). Reported-by: Nix Fix: 68866e425be2(MD: no sync IO while suspended) Cc: stable@vger.kernel.org Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/faulty.c | 5 +++-- drivers/md/linear.c | 7 ++++--- drivers/md/md.c | 22 +++++++++++++++++----- drivers/md/md.h | 4 ++-- drivers/md/multipath.c | 8 ++++---- drivers/md/raid0.c | 7 ++++--- drivers/md/raid1.c | 11 +++++++---- drivers/md/raid10.c | 10 ++++++---- drivers/md/raid5.c | 17 +++++++++-------- 9 files changed, 56 insertions(+), 35 deletions(-) commit 5ebbdf60d14b3dd2d88f7268c430ec37ca5b4eac Author: Colin Ian King Date: Sun May 14 13:47:41 2017 -0300 [media] s5p-mfc: fix spelling mistake: "destionation" -> "destination" Trivial fix to spelling mistake in mfc_err error messages Signed-off-by: Colin Ian King Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1eeef2d7483a7e3f8d2dd2a5b9939b3b814dc549 Author: Chris Packham Date: Fri Jun 9 15:58:31 2017 +1200 mtd: handle partitioning on devices with 0 erasesize erasesize is meaningful for flash devices but for SRAM there is no concept of an erase block so erasesize is set to 0. When partitioning these devices instead of ensuring partitions fall on erasesize boundaries we ensure they fall on writesize boundaries. Helped-by: Boris Brezillon Signed-off-by: Chris Packham Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 5514174fe9c61c83bd8781c1e048ea6b4bf16a14 Author: yuval.shaia@oracle.com Date: Tue Jun 13 10:09:46 2017 +0300 net: phy: Make phy_ethtool_ksettings_get return void Make return value void since function never return meaningfull value Signed-off-by: Yuval Shaia Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/ethtool.c | 4 +++- drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c | 8 ++++++-- drivers/net/ethernet/broadcom/b44.c | 4 +++- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 ++++- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 +++- drivers/net/ethernet/broadcom/tg3.c | 4 +++- drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 6 ++---- drivers/net/ethernet/freescale/ucc_geth_ethtool.c | 4 +++- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 2 +- drivers/net/ethernet/marvell/mv643xx_eth.c | 5 ++--- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +++- drivers/net/ethernet/renesas/ravb_main.c | 14 +++++++------- drivers/net/ethernet/renesas/sh_eth.c | 5 ++--- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 5 ++--- drivers/net/ethernet/ti/cpsw.c | 8 ++++---- drivers/net/ethernet/ti/netcp_ethss.c | 8 +++----- drivers/net/phy/phy.c | 10 +++++----- drivers/net/usb/lan78xx.c | 2 +- drivers/staging/netlogic/xlr_net.c | 5 ++++- include/linux/phy.h | 4 ++-- net/dsa/slave.c | 9 +++++---- 21 files changed, 68 insertions(+), 52 deletions(-) commit 17d716e9264c43f541eccbd5b7b11278b1fb65cb Author: Alexandre Courbot Date: Tue Apr 25 03:19:43 2017 -0300 [media] s5p-jpeg: fix recursive spinlock acquisition v4l2_m2m_job_finish(), which is called from the interrupt handler with slock acquired, can call the device_run() hook immediately if another context was in the queue. This hook also acquires slock, resulting in a deadlock for this scenario. Fix this by releasing slock right before calling v4l2_m2m_job_finish(). This is safe to do as the state of the hardware cannot change before v4l2_m2m_job_finish() is called anyway. Signed-off-by: Alexandre Courbot Acked-by: Jacek Anaszewski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-jpeg/jpeg-core.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit d980b8d1fc3c6a37f1123995d3939c6b0eeff1c5 Merge: 61d3e1d fe0e405 Author: David S. Miller Date: Tue Jun 13 12:56:43 2017 -0400 Merge branch 'MDIO-bus-reset-GPIO-cleanups' Sergei Shtylyov says: ==================== MDIO bus reset GPIO cleanups Commit 4c5e7a2c0501 ("dt-bindings: mdio: Clarify binding document") declared that a MDIO reset GPIO property should have only a single GPIO reference/specifier, however the supporting code was left intact... Here's a couple of the obvious cleanups to that code: [1/2] mdio_bus: handle only single PHY reset GPIO [2/2] mdio_bus: use devm_gpiod_get_optional() ==================== Signed-off-by: David S. Miller commit fe0e4052fb11d5c713961ab7e136520be40052a3 Author: Sergei Shtylyov Date: Mon Jun 12 23:55:39 2017 +0300 mdio_bus: use devm_gpiod_get_optional() The MDIO reset GPIO is really a classical optional GPIO property case, so devm_gpiod_get_optional() should have been used, not devm_gpiod_get(). Doing this saves several LoCs... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit d396e84c56047b303cac378dde4b2e5cc430b336 Author: Sergei Shtylyov Date: Mon Jun 12 23:55:38 2017 +0300 mdio_bus: handle only single PHY reset GPIO Commit 4c5e7a2c0501 ("dt-bindings: mdio: Clarify binding document") declared that a MDIO reset GPIO property should have only a single GPIO reference/specifier, however the supporting code was left intact, still burdening the kernel with now apparently useless loops -- get rid of them. Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 53 +++++++++++++++++----------------------------- drivers/of/of_mdio.c | 1 - include/linux/phy.h | 6 ++---- 3 files changed, 21 insertions(+), 39 deletions(-) commit 18726a349de262f5bf03fab73fc7c46e79e6c41e Author: David Härdeman Date: Thu Apr 27 17:34:08 2017 -0300 [media] rc-core: cleanup rc_register_device pt2 Now that rc_register_device() is reorganised, the dev->initialized hack can be removed. Any driver which calls rc_register_device() must be prepared for the device to go live immediately. The dev->initialized commits that are relevant are commit c73bbaa4ec3e ("[media] rc-core: don't lock device at rc_register_device()") and commit 08aeb7c9a42a ("[media] rc: add locking to fix register/show race"). The original problem was that show_protocols() would access dev->rc_map.* and various other bits which are now properly initialized before device_add() is called. At the same time, remove the bogus "device is being removed" check. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 67 +++++++--------------------------------------- include/media/rc-core.h | 2 -- 2 files changed, 10 insertions(+), 59 deletions(-) commit f56928abaa6d73613d21f0cdcb7fd0b7f339b5bd Author: David Härdeman Date: Wed May 3 07:04:00 2017 -0300 [media] rc-core: cleanup rc_register_device The device core infrastructure is based on the presumption that once a driver calls device_add(), it must be ready to accept userspace interaction. This requires splitting rc_setup_rx_device() into two functions and reorganizing rc_register_device() so that as much work as possible is performed before calling device_add(). Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-core-priv.h | 2 ++ drivers/media/rc/rc-ir-raw.c | 36 +++++++++++++------- drivers/media/rc/rc-main.c | 75 ++++++++++++++++++++++++++--------------- 3 files changed, 74 insertions(+), 39 deletions(-) commit 61d3e1d9bc2a1910d773cbf4ed6f587a7a6166b5 Author: Nathan Fontenot Date: Mon Jun 12 20:47:45 2017 -0400 ibmvnic: Remove netdev notify for failover resets When handling a driver reset due to a failover of the backing server on the vios, doing the netdev_notify_peers() can cause network traffic to stall or halt. Remove the netdev notify call for failover resets. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 40c9db8ad8b4b7f87e2f4a5e80cf1732f2825e6b Author: Thomas Falcon Date: Mon Jun 12 12:35:04 2017 -0500 ibmvnic: Client-initiated failover The IBM vNIC protocol provides support for the user to initiate a failover from the client LPAR in case the current backing infrastructure is deemed inadequate or in an error state. Support for two H_VIOCTL sub-commands for vNIC devices are required to implement this function. These commands are H_GET_SESSION_TOKEN and H_SESSION_ERR_DETECTED. "[H_GET_SESSION_TOKEN] is used to obtain a session token from a VNIC client adapter. This token is opaque to the caller and is intended to be used in tandem with the SESSION_ERROR_DETECTED vioctl subfunction." "[H_SESSION_ERR_DETECTED] is used to report that the currently active backing device for a VNIC client adapter is behaving poorly, and that the hypervisor should attempt to fail over to a different backing device, if one is available." To provide tools access to this functionality the vNIC driver creates a sysfs file that, when written to, will send a request to pHyp to failover to a different backing device. Signed-off-by: Thomas Falcon Reviewed-by: Nathan Fontenot Signed-off-by: David S. Miller arch/powerpc/include/asm/hvcall.h | 2 ++ drivers/net/ethernet/ibm/ibmvnic.c | 46 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 725757aee05e51914b72f25ba2a89c43c3779574 Author: Antoine Ténart Date: Mon Jun 12 16:01:39 2017 +0200 net: mvpp2: enable basic 10G support On GOP port 0 two MAC modes are available: GMAC and XLG. The XLG MAC is used for 10G connectivity. This patch adds a basic 10G support by allowing to use the XLG MAC on port 0 and by reworking the port_enable/disable functions so that the XLG MAC is configured when using 10G. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 49 ++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 8 deletions(-) commit 6709e03cbaad4190565ff52bb26e6b90da5d98af Author: Sean Young Date: Fri Jun 2 07:19:39 2017 -0300 [media] sir_ir: annotate hardware config module parameters This module was merged after commit 5a8fc6a3cebb ("Annotate hardware config module parameters in drivers/media/"), so add add the missing hardware annotations. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sir_ir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d69ae57453c80a2193bcdb3fd762efbec447eecf Author: Benjamin Gaignard Date: Wed May 31 10:23:48 2017 -0300 [media] cec: add STM32 cec driver This patch add cec driver for STM32 platforms. cec hardware block isn't not always used with hdmi so cec notifier is not implemented. That will be done later when STM32 DSI driver will be available. Driver compliance has been tested with cec-ctl and cec-compliance tools. Signed-off-by: Benjamin Gaignard Signed-off-by: Yannick Fertre [hans.verkuil@cisco.com: modified platform/Makefile to use obj-y] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 12 + drivers/media/platform/Makefile | 2 + drivers/media/platform/stm32/Makefile | 1 + drivers/media/platform/stm32/stm32-cec.c | 362 +++++++++++++++++++++++++++++++ 4 files changed, 377 insertions(+) commit 1abbc60d5017d612b6108ba59faa6b2eb7ca015d Author: Benjamin Gaignard Date: Wed May 31 09:13:55 2017 -0300 [media] dt-bindings: media: stm32 cec driver Add bindings documentation for stm32 CEC driver. Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/st,stm32-cec.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 6c51c82c60991bdbfb937f3bf0cdbe68d042073d Author: Sujith Pandel Date: Tue May 2 06:55:40 2017 -0400 PCI: Add domain number check to find_smbios_instance_string() The function find_smbios_instance_string() does not consider the PCI domain number. As a result, SMBIOS type 41 device type instance would be exported to sysfs for all the PCI domains which have a PCI device with same bus/device/function, though PCI bus/device/func from a specific PCI domain has SMBIOS type 41 device type instance defined. Address the issue by making find_smbios_instance_string() check PCI domain number as well. Reported-by: Shai Fultheim Suggested-by: Shai Fultheim Tested-by: Shai Fultheim Signed-off-by: Sujith Pandel Signed-off-by: Narendra K Signed-off-by: Bjorn Helgaas drivers/pci/pci-label.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2b2154f9391f3ca03b4f5ba599b2ee7a3a80f781 Author: Vincent Legoll Date: Sun May 21 11:04:41 2017 +0200 x86/PCI: Fix whitespace in set_bios_x() printk Remove the space from "PCI :" to make the message consistent with other PCI messages. Signed-off-by: Vincent Legoll Signed-off-by: Bjorn Helgaas arch/x86/pci/pcbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f686f1d9beee135de6d08caea707ec7bfc916d4 Author: Bjorn Helgaas Date: Fri May 19 14:40:50 2017 -0500 PCI: Correct PCI_STD_RESOURCE_END usage PCI_STD_RESOURCE_END is (confusingly) the index of the last valid BAR, not the *number* of BARs. To iterate through all possible BARs, we need to include PCI_STD_RESOURCE_END. Fixes: 9fe373f9997b ("PCI: Increase IBM ipr SAS Crocodile BARs to at least system page size") Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92a16c86299c64f58f320e491977408ba31b8c3c Author: Bjorn Helgaas Date: Fri May 19 14:37:53 2017 -0500 efi/fb: Correct PCI_STD_RESOURCE_END usage PCI_STD_RESOURCE_END is (confusingly) the index of the last valid BAR, not the *number* of BARs. To iterate through all possible BARs, we need to include PCI_STD_RESOURCE_END. Fixes: 55d728a40d36 ("efi/fb: Avoid reconfiguration of BAR that covers the framebuffer") Signed-off-by: Bjorn Helgaas drivers/video/fbdev/efifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cff94887d55a32bf8f7095482d9ba92784280a5c Author: Linus Walleij Date: Mon May 15 09:50:34 2017 +0200 ARM: dts: add core I2C devices to the APQ8060 Dragonboard The APQ8060 Dragonboard has an Atmel AT24c128 EEPROM and a Wolfson Micro WM8903 codec connected to its GSBI8 I2C bus. Add entries for these to the device tree. The interrupt line from the WM8903 chip is not routed anywhere on this design so it can not be used. Signed-off-by: Linus Walleij Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 7b3a10df1d4bd8a83934897442370221b4cd631b Author: Dan Carpenter Date: Thu May 18 10:34:31 2017 +0300 vfio: Use ERR_CAST() instead of open coding it It's a small cleanup to use ERR_CAST() here. Signed-off-by: Dan Carpenter Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88efe190f3ec2532556d65f6ea53885ccec6cf39 Merge: a1fa1a0 b810959 Author: David S. Miller Date: Tue Jun 13 11:23:13 2017 -0400 Merge branch 'dsa-mv88e6xxx-port-macros-cosmetics' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: port macros cosmetics This patch series brings no functional changes. It prefixes all common port registers macros with MV88E6XXX_PORT. If registers or some bits differs between switch models, a reference model is chosen (e.g. MV88E6390_PORT_MAC_CTL_SPEED_10000.) The register names are documented as found in the datasheets. Avoid BIT() and shifts defines and prefer a better representation of the Marvell switch registers with ordered, hexadecimal, 16-bit values. ==================== Signed-off-by: David S. Miller commit b81095947e1b2816ca5ccd87b8ac0e209e798ee0 Author: Vivien Didelot Date: Mon Jun 12 12:37:45 2017 -0400 net: dsa: mv88e6xxx: prefix remaining port macros For implicit namespacing and clarity, prefix the remaining common Port Registers macros with MV88E6XXX_PORT. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- drivers/net/dsa/mv88e6xxx/port.c | 6 +++--- drivers/net/dsa/mv88e6xxx/port.h | 35 +++++++++++++++++++++++++++-------- 3 files changed, 32 insertions(+), 13 deletions(-) commit 8009df9e70330d185e02f0c447a7d19b6d3a4432 Author: Vivien Didelot Date: Mon Jun 12 12:37:44 2017 -0400 net: dsa: mv88e6xxx: prefix Port IEEE Priority mapping macros For implicit namespacing and clarity, prefix the common Port IEEE Priority Remapping registers macros with MV88E6095_PORT_IEEE_PRIO. The 88E6390 family turned the 0x18 register into a single indirect table, document that at the same time. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Also fix the following checkpatch checks with a temporary variable: CHECK: Alignment should match open parenthesis #65: FILE: drivers/net/dsa/mv88e6xxx/port.c:932: + err = mv88e6xxx_port_ieeepmt_write(chip, port, + MV88E6390_PORT_IEEE_PRIO_MAP_TABLE_INGRESS_PCP, Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 37 ++++++++++++++++++++----------------- drivers/net/dsa/mv88e6xxx/port.h | 30 ++++++++++++++++++------------ 2 files changed, 38 insertions(+), 29 deletions(-) commit 2a4614e4ef0bef05a3f06f1a4481c9887e418e13 Author: Vivien Didelot Date: Mon Jun 12 12:37:43 2017 -0400 net: dsa: mv88e6xxx: prefix Port Association Vector macros For implicit namespacing and clarity, prefix the common Port Association Vector Register macros with MV88E6XXX_PORT_ASSOC_VECTOR. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 3 ++- drivers/net/dsa/mv88e6xxx/port.h | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) commit 2cb8cb144eef6b3175e95504eae7f385bdb35c69 Author: Vivien Didelot Date: Mon Jun 12 12:37:42 2017 -0400 net: dsa: mv88e6xxx: prefix Port Egress Rate Control macros For implicit namespacing and clarity, prefix the common Port Egress Rate Control and Port Egress Rate Control 2 registers macros with MV88E6XXX_PORT_EGRESS_RATE_CTL1 and MV88E6XXX_PORT_EGRESS_RATE_CTL2. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 3 ++- drivers/net/dsa/mv88e6xxx/port.c | 6 ++++-- drivers/net/dsa/mv88e6xxx/port.h | 8 ++++++-- 3 files changed, 12 insertions(+), 5 deletions(-) commit 81c6edb23b61a4dec5e0a8954f69a151baeb55f4 Author: Vivien Didelot Date: Mon Jun 12 12:37:41 2017 -0400 net: dsa: mv88e6xxx: prefix Port Control 2 macros For implicit namespacing and clarity, prefix the common Port Control 2 Register macros with MV88E6XXX_PORT_CTL2 and the ones which differ between implementations with a chosen reference model (e.g. MV88E6095_PORT_CTL2_CPU_PORT_MASK.) Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 6 ++--- drivers/net/dsa/mv88e6xxx/port.c | 48 ++++++++++++++++++++-------------------- drivers/net/dsa/mv88e6xxx/port.h | 44 ++++++++++++++++++------------------ 3 files changed, 50 insertions(+), 48 deletions(-) commit b7929fb36d11d95ddffd70da033dc538265178f7 Author: Vivien Didelot Date: Mon Jun 12 12:37:40 2017 -0400 net: dsa: mv88e6xxx: prefix Port Default VLAN macros For implicit namespacing and clarity, prefix the common Port Default VLAN Register macros with MV88E6XXX_PORT_DEFAULT_VLAN. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/port.c | 15 +++++++++------ drivers/net/dsa/mv88e6xxx/port.h | 6 ++++-- 3 files changed, 14 insertions(+), 9 deletions(-) commit 7e5cc5f1b5a556fce48d9bbcf6fc4d97b993d2ba Author: Vivien Didelot Date: Mon Jun 12 12:37:39 2017 -0400 net: dsa: mv88e6xxx: prefix Port Based VLAN macros For implicit namespacing and clarity, prefix the common Port Based VLAN Register macros with MV88E6XXX_PORT_BASE_VLAN. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 10 +++++----- drivers/net/dsa/mv88e6xxx/port.h | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) commit cd985bbf9a30ed58ff7d56b236144d98ff64e89d Author: Vivien Didelot Date: Mon Jun 12 12:37:38 2017 -0400 net: dsa: mv88e6xxx: prefix Port Control 1 macros For implicit namespacing and clarity, prefix the common Port Control 1 Register macros with MV88E6XXX_PORT_CTL1. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 17 ++++++++++------- drivers/net/dsa/mv88e6xxx/port.h | 8 +++++--- 2 files changed, 15 insertions(+), 10 deletions(-) commit a89b433bee684aeb5535b186d88bac17516380e8 Author: Vivien Didelot Date: Mon Jun 12 12:37:37 2017 -0400 net: dsa: mv88e6xxx: prefix Port Control macros For implicit namespacing and clarity, prefix the common Port Control Register macros with MV88E6XXX_PORT_CTL0 and the ones which differ between implementations with a chosen reference model (e.g. MV88E6185_PORT_CTL0_USE_TAG.) The reason for CTL0 is to make it clear between the badly named "Port Control", "Port Control 1" and "Port Control 2" registers. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 8 ++-- drivers/net/dsa/mv88e6xxx/port.c | 82 ++++++++++++++++++++-------------------- drivers/net/dsa/mv88e6xxx/port.h | 66 ++++++++++++++++---------------- 3 files changed, 79 insertions(+), 77 deletions(-) commit 107fcc10e810be24631bf54d35970071b110ad10 Author: Vivien Didelot Date: Mon Jun 12 12:37:36 2017 -0400 net: dsa: mv88e6xxx: prefix Port Switch ID macros For implicit namespacing and clarity, prefix the common Switch ID Register macros with MV88E6XXX_PORT_SWITCH_ID. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers, this means shifting their values by 4. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 60 ++++++++++++++++++++-------------------- drivers/net/dsa/mv88e6xxx/port.h | 58 ++++++++++++++++++++------------------ 2 files changed, 61 insertions(+), 57 deletions(-) commit 6c96bbfdd08d422395c06516617e006833f7b540 Author: Vivien Didelot Date: Mon Jun 12 12:37:35 2017 -0400 net: dsa: mv88e6xxx: prefix Port Jamming macros For implicit namespacing and clarity, prefix the common Port Jamming Control Register macros with MV88E6XXX_PORT_JAM_CTL and the ones which differ between implementations with a chosen reference model (e.g. MV88E6097_PORT_JAM_CTL.) The 88E6390 family renamed the register to Flow Control and turned it into an indirect table. Document that as well. Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 15 +++++++++------ drivers/net/dsa/mv88e6xxx/port.h | 16 +++++++++++++--- 2 files changed, 22 insertions(+), 9 deletions(-) commit 5ee55577cfe4a3ef6ae34d804806b1c6c9ae159a Author: Vivien Didelot Date: Mon Jun 12 12:37:34 2017 -0400 net: dsa: mv88e6xxx: prefix Port MAC Control macros For implicit namespacing and clarity, prefix the common MAC Control Register macros with MV88E6XXX_PORT_MAC_CTL and the ones which differ between implementations with a chosen reference model (e.g. MV88E6065_PORT_MAC_CTL_SPEED_200.) Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 80 +++++++++++++++++++++------------------- drivers/net/dsa/mv88e6xxx/port.h | 40 ++++++++++---------- 2 files changed, 64 insertions(+), 56 deletions(-) commit 5f83dc93b242e16bf45bbea785ace4268828ce01 Author: Vivien Didelot Date: Mon Jun 12 12:37:33 2017 -0400 net: dsa: mv88e6xxx: prefix Port Status macros For implicit namespacing and clarity, prefix the common Port Status Register macros with MV88E6XXX_PORT_STS and the ones which differ between implementations with a chosen reference model (e.g. MV88E6352_PORT_STS_EEE.) Document the register and prefer ordered hex masks values for all Marvell 16-bit registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- drivers/net/dsa/mv88e6xxx/port.c | 20 ++++++++-------- drivers/net/dsa/mv88e6xxx/port.h | 48 ++++++++++++++++++++------------------ drivers/net/dsa/mv88e6xxx/serdes.c | 38 +++++++++++++++--------------- 4 files changed, 56 insertions(+), 54 deletions(-) commit 7d57e5e933674c116e46f30eee7629c20f9073da Author: Alex Williamson Date: Tue Jun 13 09:22:57 2017 -0600 vfio/pci: Add Intel XXV710 to hidden INTx devices XXV710 has the same broken INTx behavior as the rest of the X/XL710 series, the interrupt status register is not wired to report pending INTx interrupts, thus we never associate the interrupt to the device. Extend the device IDs to include these so that we hide that the device supports INTx at all to the user. Reported-by: Stefan Assmann Signed-off-by: Alex Williamson Acked-by: Jesse Brandeburg drivers/vfio/pci/vfio_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 475d99fc216f4b2aed7021734838c9b578338598 Author: Rob Herring Date: Tue Mar 21 21:03:09 2017 -0500 arm64: dts: nvidia: fix PCI bus dtc warnings dtc recently added PCI bus checks. Fix these warnings. Signed-off-by: Rob Herring Cc: Stephen Warren Cc: Thierry Reding Cc: Alexandre Courbot Cc: linux-tegra@vger.kernel.org Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra132.dtsi | 4 +++- arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 2 +- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) commit 508d690e94218d306ab2092d6ee95ca75f9fa98b Author: Rob Herring Date: Tue Mar 21 21:03:06 2017 -0500 ARM: dts: tegra: fix PCI bus dtc warnings dtc recently added PCI bus checks. Fix these warnings. Signed-off-by: Rob Herring Cc: Stephen Warren Cc: Thierry Reding Cc: Alexandre Courbot Cc: linux-tegra@vger.kernel.org Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis-eval.dts | 2 +- arch/arm/boot/dts/tegra124-apalis.dtsi | 2 +- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 2 +- arch/arm/boot/dts/tegra124.dtsi | 4 +++- arch/arm/boot/dts/tegra20-harmony.dts | 2 +- arch/arm/boot/dts/tegra20-tamonten.dtsi | 2 +- arch/arm/boot/dts/tegra20-tec.dts | 2 +- arch/arm/boot/dts/tegra20-trimslice.dts | 2 +- arch/arm/boot/dts/tegra20.dtsi | 4 +++- arch/arm/boot/dts/tegra30-apalis-eval.dts | 2 +- arch/arm/boot/dts/tegra30-apalis.dtsi | 2 +- arch/arm/boot/dts/tegra30-beaver.dts | 2 +- arch/arm/boot/dts/tegra30-cardhu.dtsi | 2 +- arch/arm/boot/dts/tegra30.dtsi | 5 ++++- 14 files changed, 21 insertions(+), 14 deletions(-) commit da1dbec1be2b54c16649e33e479708a55156e311 Author: Christophe Jaillet Date: Tue Apr 11 05:40:41 2017 +0200 soc/tegra: flowctrl: Fix error handling It is likely that returning returned by 'devm_ioremap_resource()' is expected here instead of something related to 'base' which should be a valid pointer at this point. Fixes: 841fd94c43a4 ("soc/tegra: flowctrl: Add basic platform driver") Signed-off-by: Christophe JAILLET Acked-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/flowctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4e981cba2dec675d40ac4f270b7e8ac164c9004 Author: Nicolas Iooss Date: Wed May 24 07:49:50 2017 +0200 printk: add __printf attributes to internal functions When compiling with -Wsuggest-attribute=format, gcc complains that some functions in kernel/printk/printk_safe.c transmit their argument to printf-like functions without having a printf attribute. Silence these warnings by adding relevant __printf attributes. Link: http://lkml.kernel.org/r/20170524054950.6722-1-nicolas.iooss_linux@m4x.org Cc: Steven Rostedt Cc: linux-kernel@vger.kernel.org Signed-off-by: Nicolas Iooss Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk_safe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ae039001054b34c4a624539b32a8b6ff3403aaf9 Author: Ankur Arora Date: Fri Jun 2 17:06:02 2017 -0700 xen/vcpu: Handle xen_vcpu_setup() failure at boot On PVH, PVHVM, at failure in the VCPUOP_register_vcpu_info hypercall we limit the number of cpus to to MAX_VIRT_CPUS. However, if this failure had occurred for a cpu beyond MAX_VIRT_CPUS, we continue to function with > MAX_VIRT_CPUS. This leads to problems at the next save/restore cycle when there are > MAX_VIRT_CPUS threads going into stop_machine() but coming back up there's valid state for only the first MAX_VIRT_CPUS. This patch pulls the excess CPUs down via cpu_down(). Reviewed-by: Boris Ostrovsky Signed-off-by: Ankur Arora Signed-off-by: Juergen Gross arch/x86/xen/smp.c | 31 +++++++++++++++++++++++++++++++ arch/x86/xen/smp.h | 2 ++ arch/x86/xen/smp_hvm.c | 1 + arch/x86/xen/smp_pv.c | 6 +----- 4 files changed, 35 insertions(+), 5 deletions(-) commit c9b5d98b25161a7ebee6ea59d6424dd9f33c1b99 Author: Ankur Arora Date: Fri Jun 2 17:06:01 2017 -0700 xen/vcpu: Handle xen_vcpu_setup() failure in hotplug The hypercall VCPUOP_register_vcpu_info can fail. This failure is handled by making per_cpu(xen_vcpu, cpu) point to its shared_info slot and those without one (cpu >= MAX_VIRT_CPUS) be NULL. For PVH/PVHVM, this is not enough, because we also need to pull these VCPUs out of circulation. Fix for PVH/PVHVM: on registration failure in the cpuhp prepare callback (xen_cpu_up_prepare_hvm()), return an error to the cpuhp state-machine so it can fail the CPU init. Fix for PV: the registration happens before smp_init(), so, in the failure case we clamp setup_max_cpus and limit the number of VCPUs that smp_init() will bring-up to MAX_VIRT_CPUS. This is functionally correct but it makes the code a bit simpler if we get rid of this explicit clamping: for VCPUs that don't have valid xen_vcpu, fail the CPU init in the cpuhp prepare callback (xen_cpu_up_prepare_pv()). Reviewed-by: Boris Ostrovsky Signed-off-by: Ankur Arora Signed-off-by: Juergen Gross arch/x86/xen/enlighten.c | 46 +++++++++++++++++++++++++------------------- arch/x86/xen/enlighten_hvm.c | 9 +++++---- arch/x86/xen/enlighten_pv.c | 14 +++++++++++++- arch/x86/xen/xen-ops.h | 2 +- 4 files changed, 45 insertions(+), 26 deletions(-) commit 0e4d583723487a975f66f0a8b346fdcb024fafa6 Author: Ankur Arora Date: Fri Jun 2 17:06:00 2017 -0700 xen/pv: Fix OOPS on restore for a PV, !SMP domain If CONFIG_SMP is disabled, xen_setup_vcpu_info_placement() is called from xen_setup_shared_info(). This is fine as far as boot goes, but it means that we also call it in the restore path. This results in an OOPS because we assign to pv_mmu_ops.read_cr2 which is __ro_after_init. Also, though less problematically, this means we call xen_vcpu_setup() twice at restore -- once from the vcpu info placement call and the second time from xen_vcpu_restore(). Fix by calling xen_setup_vcpu_info_placement() at boot only. Reviewed-by: Boris Ostrovsky Signed-off-by: Ankur Arora Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 0b64ffb8db4e310f77a01079ca752d946a8526b5 Author: Ankur Arora Date: Fri Jun 2 17:05:59 2017 -0700 xen/pvh*: Support > 32 VCPUs at domain restore When Xen restores a PVHVM or PVH guest, its shared_info only holds up to 32 CPUs. The hypercall VCPUOP_register_vcpu_info allows us to setup per-page areas for VCPUs. This means we can boot PVH* guests with more than 32 VCPUs. During restore the per-cpu structure is allocated freshly by the hypervisor (vcpu_info_mfn is set to INVALID_MFN) so that the newly restored guest can make a VCPUOP_register_vcpu_info hypercall. However, we end up triggering this condition in Xen: /* Run this command on yourself or on other offline VCPUS. */ if ( (v != current) && !test_bit(_VPF_down, &v->pause_flags) ) which means we are unable to setup the per-cpu VCPU structures for running VCPUS. The Linux PV code paths makes this work by iterating over cpu_possible in xen_vcpu_restore() with: 1) is target CPU up (VCPUOP_is_up hypercall?) 2) if yes, then VCPUOP_down to pause it 3) VCPUOP_register_vcpu_info 4) if it was down, then VCPUOP_up to bring it back up With Xen commit 192df6f9122d ("xen/x86: allow HVM guests to use hypercalls to bring up vCPUs") this is available for non-PV guests. As such first check if VCPUOP_is_up is actually possible before trying this dance. As most of this dance code is done already in xen_vcpu_restore() let's make it callable on PV, PVH and PVHVM. Based-on-patch-by: Konrad Wilk Reviewed-by: Boris Ostrovsky Signed-off-by: Ankur Arora Signed-off-by: Juergen Gross arch/x86/xen/enlighten.c | 45 +++++++++++++++++++++++++++++++------------- arch/x86/xen/enlighten_hvm.c | 20 +++++++------------- arch/x86/xen/smp_hvm.c | 10 ++++++++++ arch/x86/xen/suspend_hvm.c | 11 +++-------- include/xen/xen-ops.h | 2 ++ 5 files changed, 54 insertions(+), 34 deletions(-) commit ad73fd595c2ab168fdd01a266cbe6e4df95f8db0 Author: Ankur Arora Date: Fri Jun 2 17:05:58 2017 -0700 xen/vcpu: Simplify xen_vcpu related code Largely mechanical changes to aid unification of xen_vcpu_restore() logic for PV, PVH and PVHVM. xen_vcpu_setup(): the only change in logic is that clamp_max_cpus() is now handled inside the "if (!xen_have_vcpu_info_placement)" block. xen_vcpu_restore(): code movement from enlighten_pv.c to enlighten.c. xen_vcpu_info_reset(): pulls together all the code where xen_vcpu is set to default. Reviewed-by: Boris Ostrovsky Signed-off-by: Ankur Arora Signed-off-by: Juergen Gross arch/x86/xen/enlighten.c | 101 +++++++++++++++++++++++++++++++------------ arch/x86/xen/enlighten_hvm.c | 6 +-- arch/x86/xen/enlighten_pv.c | 47 +++++--------------- arch/x86/xen/smp_hvm.c | 3 +- arch/x86/xen/xen-ops.h | 1 + 5 files changed, 89 insertions(+), 69 deletions(-) commit cbbdc6082917a92da0fc07cee255111de16ed64a Author: Andy Shevchenko Date: Sun Jun 11 17:52:20 2017 +0300 misc: apds990x: Use sysfs_match_string() helper Use sysfs_match_string() helper instead of open coded variant. Cc: Arnd Bergmann Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/apds990x.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c845736dbcd26619acc136b588bcd2f48b1fda45 Author: Alexander Usyskin Date: Mon Jun 12 12:15:56 2017 +0300 mei: drop unreachable code in mei_start Device disabled state is caught inside the retry loop, so there is no need to check it once again afterwards. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/init.c | 6 ------ 1 file changed, 6 deletions(-) commit 99c06866bc64a79ec5cf9b9e73fb7c1ba4b3551a Author: Tomas Winkler Date: Mon Jun 12 12:15:55 2017 +0300 mei: validate the message header only in first fragment. RX message header is received in the first fragment of the message and saved side and it is not modified after that, we don't need to validate it upon each fragment. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/interrupt.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 8a3d809373c6790b3958f74fa5640aedd4e804dd Author: Alexandre Belloni Date: Tue Jun 13 14:51:07 2017 +0200 ARM: at91: remove atmel_nand_data Since AVR32 is gone and the driver rework, struct atmel_nand_data is not used anywhere. Acked-by: Boris Brezillon Signed-off-by: Alexandre Belloni include/linux/platform_data/atmel.h | 21 --------------------- 1 file changed, 21 deletions(-) commit 6a5ae63a0cc5d3ac73a96cb412fde66f3a71f98e Author: Joel Fernandes Date: Thu Jun 8 19:53:24 2017 -0700 tracing: Remove unused declaration of trace_stop_cmdline_recording trace_stop_cmdline_recording declaration isn't in use, remove it. Link: http://lkml.kernel.org/r/20170609025327.9508-2-joelaf@google.com Cc: kernel-team@android.com Cc: Ingo Molnar Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 -- 1 file changed, 2 deletions(-) commit b5db9dedc5584bf473566b9cf5c941d3ab6258db Author: Stephen Warren Date: Thu Apr 13 12:55:58 2017 -0600 ARM: tegra: remove Whistler support Whistler is an ancient Tegra 2 reference board. I may have been the only person who ever used it with upstream software, and I've just recycled the board hardware. Hence, it makes sense to remove support from software. Signed-off-by: Stephen Warren Acked-by: Mark Brown Signed-off-by: Thierry Reding Documentation/devicetree/bindings/arm/tegra.txt | 1 - arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/tegra20-whistler.dts | 636 ------------------------ 3 files changed, 1 insertion(+), 639 deletions(-) commit c48f64ab472389df6f48171899c9d337adfadc5b Author: Anoob Soman Date: Wed Jun 7 12:46:56 2017 +0100 xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU A HVM domian booting generates around 200K (evtchn:qemu-dm xen-dyn) interrupts,in a short period of time. All these evtchn:qemu-dm are bound to VCPU 0, until irqbalance sees these IRQ and moves it to a different VCPU. In one configuration, irqbalance runs every 10 seconds, which means irqbalance doesn't get to see these burst of interrupts and doesn't re-balance interrupts most of the time, making all evtchn:qemu-dm to be processed by VCPU0. This cause VCPU0 to spend most of time processing hardirq and very little time on softirq. Moreover, if dom0 kernel PREEMPTION is disabled, VCPU0 never runs watchdog (process context), triggering a softlockup detection code to panic. Binding evtchn:qemu-dm to next online VCPU, will spread hardirq processing evenly across different CPU. Later, irqbalance will try to balance evtchn:qemu-dm, if required. Signed-off-by: Anoob Soman Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/events/events_base.c | 6 +++--- drivers/xen/evtchn.c | 34 +++++++++++++++++++++++++++++++++- include/xen/events.h | 1 + 3 files changed, 37 insertions(+), 4 deletions(-) commit e7149a7a3fc4ee6785f17961738f40ce1266d8d0 Author: Thierry Reding Date: Wed Mar 29 18:34:52 2017 +0200 soc/tegra: bpmp: Implement generic PM domains The BPMP firmware, found on Tegra186 and later, provides an ABI that can be used to enable and disable power to several power partitions in Tegra SoCs. The ABI allows for enumeration of the available power partitions, so the driver can be reused on future generations, provided the BPMP ABI remains stable. Based on work by Stefan Kristiansson and Mikko Perttunen . Signed-off-by: Thierry Reding Reviewed-by: Ulf Hansson Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp.c | 4 + drivers/soc/tegra/Kconfig | 5 + drivers/soc/tegra/Makefile | 1 + drivers/soc/tegra/powergate-bpmp.c | 359 +++++++++++++++++++++++++++++++++++++ include/soc/tegra/bpmp.h | 12 ++ 5 files changed, 381 insertions(+) commit 52b8b80395835c3012bf79fc9d5a1dd82a2d922a Author: Thierry Reding Date: Wed Mar 29 18:34:51 2017 +0200 soc/tegra: bpmp: Update ABI header Update the BPMP ABI header to a more recent version. The new version adds support for a new powergating ABI as well as access to the ring buffer console, which allows debug messages to be output to the BPMP debug console. Some of the previously undocumented fields have been documented and missing bitmasks have been added. Furthermore the MRQ_RESET request now has a sub-command that allows to determine the maximum ID which in turn allows the resets to be enumerated, thereby allowing drivers to become agnostic of the Tegra generation. Signed-off-by: Thierry Reding include/soc/tegra/bpmp-abi.h | 418 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 408 insertions(+), 10 deletions(-) commit 408455245a48a1ecabd90133bae0baec3ec4cfb8 Author: Thierry Reding Date: Wed Mar 29 18:34:50 2017 +0200 PM / Domains: Allow overriding the ->xlate() callback Allow generic power domain providers to override the ->xlate() callback in case the default genpd_xlate_onecell() translation callback is not good enough. One potential use-case for this is to allow generic power domains to be specified by an ID rather than an index. Signed-off-by: Thierry Reding Acked-by: Ulf Hansson Signed-off-by: Thierry Reding drivers/base/power/domain.c | 8 ++++---- include/linux/pm_domain.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) commit 7b7ef4946087186ed4f3e5111ef9ea138584af92 Author: Mikko Perttunen Date: Thu Jun 1 11:04:05 2017 +0300 arm64: tegra: Add CCPLEX_CLUSTER area in Tegra186 The Tegra186 CCPLEX_CLUSTER area contains memory-mapped registers that initiate CPU frequency/voltage transitions. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit d690694be93332cf7a91a6024b0598601f5f993a Author: Alexandre Belloni Date: Tue Jun 13 14:58:42 2017 +0200 mtd: nand: atmel: drop unused include The Atmel NAND driver doesn't used anything from linux/platform_data/atmel.h, stop including it. Signed-off-by: Alexandre Belloni Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 1 - 1 file changed, 1 deletion(-) commit a8e1afccdcba281b8c529062cd5e4e055334c348 Author: Fabian Wolff Date: Mon Jun 12 12:46:13 2017 +0200 staging: rtl8723bs: wifi_regd.c: remove superfluous braces This patch removes unnecessary braces in an if/else-construct, thereby fixing both a checkpatch.pl warning about superfluous braces and an error about an ill-placed closing brace preceding the "else" keyword. Signed-off-by: Fabian Wolff Signed-off-by: Mate Horvath Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit dae24da62d3e767810115d03895f48a6bf4d5f98 Author: Fabian Wolff Date: Mon Jun 12 12:46:11 2017 +0200 staging: rtl8723bs: wifi_regd.c: fix checkpatch.pl warning 'Statements should start on a tabstop' This patch fixes the checkpatch.pl warning 'Statements should start on a tabstop' by reformatting the affected lines. Signed-off-by: Fabian Wolff Signed-off-by: Mate Horvath Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 73905f2a702db24e522063812720ef5a1364e14d Author: Roman Storozhenko Date: Tue Jun 13 12:29:31 2017 +0300 staging: lustre: fid: Fixes debug output style problem Fixes a style problems. Replaces non-standard 'Lx' specifier with a standard 'llx'. Signed-off-by: Roman Storozhenko Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8fa77a8bc63d61139e7f4fcc3e0647d43a5ef36 Author: Aviya Erenfeld Date: Tue Jun 13 08:51:38 2017 +0300 staging: rtl8188eu: Remove unneeded blank lines Remove unneeded blank lines Signed-off-by: Aviya Erenfeld Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 8 -------- 1 file changed, 8 deletions(-) commit 12cc28baeff94042b6b0691f4a962b6e8de0d54f Author: Joe Perches Date: Mon Jun 12 20:20:46 2017 -0700 staging: rtl8723bs: Use vsnprintf extensions %pM and %pI4 Convert the uses of MAC_FMT, MAC_ARG and IP_FMT, IP_ARG to the kernel extensions. This could eventually be improved with an in-place substitution. This reduces object code size a bit too. $ size drivers/staging/rtl8723bs/r8723bs.o* text data bss dec hex filename 672812 27040 24232 724084 b0c74 drivers/staging/rtl8723bs/r8723bs.o.allyesconfig.new 676299 27040 24232 727571 b1a13 drivers/staging/rtl8723bs/r8723bs.o.allyesconfig.old 430398 27040 21528 478966 74ef6 drivers/staging/rtl8723bs/r8723bs.o.defconfig.new 431581 27040 21528 480149 75395 drivers/staging/rtl8723bs/r8723bs.o.defconfig.old Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/ieee80211.h | 8 ++++---- drivers/staging/rtl8723bs/include/osdep_service.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 650b175d635d25c771eab2e8ff8a11584bb3273a Author: Alexandre Ghiti Date: Fri Jun 9 14:14:32 2017 +0200 staging: speakup: Add missing blank line after declaration This patch fixes checkpatch warnings about adding a blank line after variable declaration. Signed-off-by: Alexandre Ghiti Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 ++ drivers/staging/speakup/spk_ttyio.c | 2 ++ 2 files changed, 4 insertions(+) commit a247f7236d06f504e57637b8ec124fc1af226d08 Author: Jan Kara Date: Tue Jun 13 14:59:14 2017 +0200 udf: Remove unused UDF_DEFAULT_BLOCKSIZE The define is unused. Remove it. Signed-off-by: Jan Kara fs/udf/super.c | 2 -- 1 file changed, 2 deletions(-) commit 0527eb372301bfd9b84160adb6c132b443ae3013 Author: Laxman Dewangan Date: Tue May 2 19:35:37 2017 +0530 pwm: tegra: Set maximum pwm clock source per SoC tapeout The PWM hardware IP is taped-out with different maximum frequency on different SoCs. From HW team: Before Tegra186, it is 48 MHz. In Tegra186, it is 102 MHz. Add support to limit the clock source frequency to the maximum IP supported frequency. Provide these values via SoC chipdata. Signed-off-by: Laxman Dewangan Acked-by: Jon Hunter Signed-off-by: Thierry Reding drivers/pwm/pwm-tegra.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 08585e43d22802666a466af1ca5795085e74d60d Author: Andy Shevchenko Date: Tue Jun 13 12:22:22 2017 +0300 HID: core: don't use negative operands when shift The recent C standard in 6.5.7 paragraph 4 defines that operands for bitwise shift operators should be non-negative, otherwise it's an undefined behaviour. Signed-off-by: Andy Shevchenko Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f044f4c588985867d17499e51460053a96f9ff7a Author: Martin Schwidefsky Date: Mon Jun 12 08:52:56 2017 +0200 s390/fpu: export save_fpu_regs for all configs The save_fpu_regs function is a general API that is supposed to be usable for modules as well. Remove the #ifdef that hides the symbol for CONFIG_KVM=n. Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 2 -- 1 file changed, 2 deletions(-) commit 23fefe119ceb5fb0c7d3321010620010a4eddb18 Author: Martin Schwidefsky Date: Wed Jun 7 14:10:24 2017 +0200 s390/kvm: avoid global config of vm.alloc_pgste=1 The system control vm.alloc_pgste is used to control the size of the page tables, either 2K or 4K. The idea is that a KVM host sets the vm.alloc_pgste control to 1 which causes *all* new processes to run with 4K page tables. For a non-kvm system the control should stay off to save on memory used for page tables. Trouble is that distributions choose to set the control globally to be able to run KVM guests. This wastes memory on non-KVM systems. Introduce the PT_S390_PGSTE ELF segment type to "mark" the qemu executable with it. All executables with this (empty) segment in its ELF phdr array will be started with 4K page tables. Any executable without PT_S390_PGSTE will run with the default 2K page tables. This removes the need to set vm.alloc_pgste=1 for a KVM host and minimizes the waste of memory for page tables. Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 1 + arch/s390/include/asm/elf.h | 32 ++++++++++++++++++++++++++++++++ arch/s390/include/asm/mmu_context.h | 4 +++- arch/s390/include/asm/ptrace.h | 2 ++ arch/s390/include/asm/thread_info.h | 1 + arch/s390/kernel/entry.S | 15 ++++++++++++++- 6 files changed, 53 insertions(+), 2 deletions(-) commit d62890885efbc48acea46964ea3af69b61c8c5eb Author: Sven Eckelmann Date: Fri Jun 9 17:06:51 2017 +0200 batman-adv: Accept only filled wifi station info The wifi driver can decide to not provide parts of the station info. For example, the expected throughput of the station can be omitted when the used rate control doesn't provide this kind of information. The B.A.T.M.A.N. V implementation must therefore check the filled bitfield before it tries to access the expected_throughput of the returned station_info. Reported-by: Alvaro Antelo Fixes: c833484e5f38 ("batman-adv: ELP - compute the metric based on the estimated throughput") Signed-off-by: Sven Eckelmann Reviewed-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bat_v_elp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3f3f87325dcb3c201076c81490f4da91ad4c09fc Author: Sven Eckelmann Date: Fri Jun 9 17:06:50 2017 +0200 batman-adv: Use default throughput value on cfg80211 error A wifi interface should never be handled like an ethernet devices. The parser of the cfg80211 output must therefore skip the ethtool code when cfg80211_get_station returned an error. Fixes: f44a3ae9a281 ("batman-adv: refactor wifi interface detection") Signed-off-by: Sven Eckelmann Reviewed-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bat_v_elp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 46b780d46bccdc75b63a98b2a9cca5a4e0ff2cec Author: Andy Shevchenko Date: Mon Jun 12 15:11:25 2017 +0300 usb: dwc3: gadget: increase readability of dwc3_gadget_init_endpoints() The commit 47d3946ea220 usb: dwc3: refactor gadget endpoint count calculation refactored dwc3_gadget_init_endpoints() and in particular changed in or out endpoint numbering to be through. It's not always convenient and makes code a slightly harder to read. Introduce a new temporary variable to make it easier to understand what is going on inside the function. While doing that, rename local variables as follows: u8 num -> u8 total int num -> int kbytes Replace implicit direction check via epnum with explicit use of direction variable. While here, replace %d to %u when compounding endpoint name since we are using unsigned type. Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 8e55d30322c6a0ef746c256a1beda9c73ecb27a6 Author: Li Jun Date: Fri Apr 14 19:12:07 2017 +0800 usb: gadget: mass_storage: set msg_registered after msg registered If there is no UDC available, the msg register will fail and this flag will not be set, but the driver is already added into pending driver list, then the module removal modprobe -r can not remove the driver from the pending list. Signed-off-by: Li Jun Signed-off-by: Felipe Balbi drivers/usb/gadget/legacy/mass_storage.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2d4aa21a73ba1019195f2200361c0fabe6f7d261 Author: Yoshihiro Shimoda Date: Tue Jun 6 20:24:20 2017 +0900 usb: gadget: udc: renesas_usb3: add support for dedicated DMAC The USB3.0 peripheral controller on R-Car SoCs has a dedicated DMAC. The DMAC needs a "PRD table" in system memory and the DMAC can have four PRD tables. This patch adds support for the DMAC. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 392 ++++++++++++++++++++++++++++++++++ 1 file changed, 392 insertions(+) commit 46ddd79e893bca1ec65bf2d20ba17ffabf25efb9 Author: Andy Shevchenko Date: Wed Jun 7 18:21:04 2017 +0300 usb: gadget: udc: atmel: Remove AVR32 bits from the driver AVR32 is gone. Now it's time to clean up the driver by removing leftovers that was used by AVR32 related code. Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 2 +- drivers/usb/gadget/udc/atmel_usba_udc.h | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) commit e6d385692a98926c2bec9dc8e5050076bbcc4e37 Author: Arvind Yadav Date: Fri Jun 9 17:33:31 2017 +0530 usb: mtu3: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3_plat.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 958d1a4c40ddc24e02683074d04ad5cb30380705 Author: Felipe Balbi Date: Mon Jun 5 17:22:10 2017 +0300 usb: dwc3: core: program PHY for proper DRD modes If PHY is entering Host mode, we need to enable VBUS. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit f54edb539c1167e7a96073848d0afad100df4580 Author: Felipe Balbi Date: Mon Jun 5 17:03:18 2017 +0300 usb: dwc3: core: initialize ULPI before trying to get the PHY If don't reorder initialization like this, we will never be able to get a reference to ULPI PHYs. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e0082698b68981c8456061e509eb32c5f65b228c Author: Felipe Balbi Date: Mon Jun 5 17:01:22 2017 +0300 usb: dwc3: ulpi: conditionally resume ULPI PHY If PHY is suspended by the time we want to issue ULPI transfers, we will observe timeouts on the ULPI interface. In order to avoid such issue, let's make sure PHY is resumed before issuing a ULPI transfer. Signed-off-by: Felipe Balbi drivers/usb/dwc3/ulpi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9b0a1f95c4b48a18ae95e204b1bcde47436b0248 Author: Felipe Balbi Date: Thu Jun 8 13:16:18 2017 +0300 usb: dwc3: ep0: make sure wValue is 0 on GetStatus() We don't (yet) support PTM_STATUS messages so let's not reply to them erroneously. Signed-off-by: Felipe Balbi drivers/usb/dwc3/ep0.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1aed4178ec7d4350019bc4211463deb5543e3e95 Author: Felipe Balbi Date: Wed Jun 7 14:08:18 2017 +0300 Documentation: ABI: sysfs-class-udc: remove duplicated entry maximum_speed entry was duplicated. Remove one instance. Signed-off-by: Felipe Balbi Documentation/ABI/stable/sysfs-class-udc | 8 -------- 1 file changed, 8 deletions(-) commit 104165686ea388ddec6ec2834bf2c13873fbe91a Author: Felipe Balbi Date: Wed Jun 7 14:07:01 2017 +0300 usb: gadget: udc: add a 'function' sysfs file This file will print out the name of the currently running USB Gadget Driver. It can be read even when there are no functions loaded. Suggested-by: Alan Stern Signed-off-by: Felipe Balbi Documentation/ABI/stable/sysfs-class-udc | 8 ++++++++ drivers/usb/gadget/udc/core.c | 13 +++++++++++++ 2 files changed, 21 insertions(+) commit 06644aafb042a20802504d3447bfb0b64985e15d Author: Felipe Balbi Date: Wed Jun 7 13:52:54 2017 +0300 usb: gadget: dummy: implement ->udc_set_speed() Move the code which was part of pullup() to the newly introduced method. Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 39 ++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) commit 7d8d0639565ff22d5fad419c2f2887213d7c2915 Author: Felipe Balbi Date: Tue Jun 6 16:05:23 2017 +0300 usb: dwc3: gadget: implement ->udc_set_speed() Use this method to make sure we don't try to connect on speeds not supported by the gadget driver. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 101 ++++++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 43 deletions(-) commit 67fdfda4a99edea939a63bad1797d69dd8de00d6 Author: Felipe Balbi Date: Tue Jun 6 16:03:19 2017 +0300 usb: gadget: core: introduce ->udc_set_speed() method Sometimes, the gadget driver we want to run has max_speed lower than what the UDC supports. In such situations, UDC might want to make sure we don't try to connect on speeds not supported by the gadget driver (e.g. super-speed capable dwc3 with high-speed capable g_midi) because that will just fail. In order to make sure this situation never happens, we introduce a new optional ->udc_set_speed() method which can be implemented by interested UDC drivers. Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/core.c | 20 ++++++++++++++++++++ include/linux/usb/gadget.h | 1 + 2 files changed, 21 insertions(+) commit 1b9f35adb0ffa143c7972a8459d6979c77d6c3c0 Author: Raviteja Garimella Date: Wed May 10 18:21:21 2017 +0530 usb: gadget: udc: Add Synopsys UDC Platform driver This patch adds platform driver support for Synopsys UDC. A new driver file (snps_udc_plat.c) is created for this purpose where the platform driver registration is done based on OF node. Currently, UDC integrated into Broadcom's iProc SoCs (Northstar2 and Cygnus) work with this driver. New members are added to the UDC data structure for having platform device support along with extcon and phy support. Kconfig and Makefiles are modified to select platform driver for compilation. Signed-off-by: Raviteja Garimella Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 16 +- drivers/usb/gadget/udc/Makefile | 1 + drivers/usb/gadget/udc/amd5536udc.h | 14 ++ drivers/usb/gadget/udc/snps_udc_core.c | 54 ++++-- drivers/usb/gadget/udc/snps_udc_plat.c | 344 +++++++++++++++++++++++++++++++++ 5 files changed, 409 insertions(+), 20 deletions(-) commit 92122a60d9f0ef3e3bc760e087588f71b2e86c97 Author: Raviteja Garimella Date: Wed May 10 18:21:20 2017 +0530 dt-bindings: usb: DT bindings documentation for Broadcom IPROC USB Device controller. The device node is used for UDCs integrated into Broadcom's iProc family of SoCs'. The UDC is based on Synopsys Designware Cores AHB Subsystem USB Device Controller IP. Signed-off-by: Raviteja Garimella Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/iproc-udc.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 7c51247a1f62bce954b9b58246930890b7209ce6 Author: Raviteja Garimella Date: Wed May 10 18:21:19 2017 +0530 usb: gadget: udc: Provide correct arguments for 'dma_pool_create' Change the argument from NULL to a struct device for the dma_pool_create call during dma init. Signed-off-by: Raviteja Garimella Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/snps_udc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 498beb42814e3f734ea6d376a4854c7e0b6060a8 Author: Raviteja Garimella Date: Wed May 10 18:21:18 2017 +0530 usb: gadget: udc: make debug prints compatible with both pci and platform devices This patch adds a struct device member to UDC data structure and makes changes to the arguments of dev_err and dev_dbg calls so that the debug prints work for both pci and platform devices. Signed-off-by: Raviteja Garimella Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/amd5536udc.h | 4 +++- drivers/usb/gadget/udc/amd5536udc_pci.c | 1 + drivers/usb/gadget/udc/snps_udc_core.c | 28 ++++++++++++++-------------- 3 files changed, 18 insertions(+), 15 deletions(-) commit a676fb62b15b8fdb3a3dce9679863195d50bdd06 Author: Raviteja Garimella Date: Wed May 10 18:21:17 2017 +0530 usb: gadget: udc: Rename amd5536udc driver file based on IP This patch renames the amd5536udc.c that has the core driver functionality of Synopsys UDC to snps_udc_core.c The symbols exported here can be used by any UDC driver that uses the same Synopsys IP. Signed-off-by: Raviteja Garimella Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Makefile | 2 +- drivers/usb/gadget/udc/amd5536udc.c | 3219 -------------------------------- drivers/usb/gadget/udc/snps_udc_core.c | 3219 ++++++++++++++++++++++++++++++++ 3 files changed, 3220 insertions(+), 3220 deletions(-) commit e800e8cbdf42c73602b90258f82a2cfe86ec53a7 Author: Stefan Agner Date: Fri Apr 14 18:35:09 2017 -0700 usb: gadget: configfs: use hexadecimal values and new line Other unsigned properties return hexadecimal values, follow this convention when printing b_vendor_code too. Also add newlines to the OS Descriptor support related properties, like other sysfs files use. Reviewed-by: Krzysztof Opasiak Signed-off-by: Stefan Agner Signed-off-by: Felipe Balbi drivers/usb/gadget/configfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 76180d716f91f035d9c8639497cf5459b44e1a51 Author: Stefan Agner Date: Fri Apr 14 18:35:08 2017 -0700 usb: gadget: configfs: make qw_sign attribute symmetric Currently qw_sign requires UTF-8 character to set, but returns UTF-16 when read. This isn't obvious when simply using cat since the null characters are not visible, but hexdump unveils the true string: # echo MSFT100 > os_desc/qw_sign # hexdump -C os_desc/qw_sign 00000000 4d 00 53 00 46 00 54 00 31 00 30 00 30 00 |M.S.F.T.1.0.0.| Make qw_sign symmetric by returning an UTF-8 string too. Also follow common convention and add a new line at the end. Reviewed-by: Krzysztof Opasiak Signed-off-by: Stefan Agner Signed-off-by: Felipe Balbi drivers/usb/gadget/configfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5ebf8d2d874ced5a41d546d1a32f290b880cf96d Author: Laurentiu Tudor Date: Thu Jun 8 17:28:54 2017 +0300 staging: fsl-mc: add reference to mc-bus DT binding Update README to reference the mc-bus device tree node binding. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/README.txt | 2 ++ 1 file changed, 2 insertions(+) commit 49df58e927c64bfeb901408df09e82646f059385 Author: Laurentiu Tudor Date: Thu Jun 8 17:28:53 2017 +0300 staging: fsl-mc: drop reference to restool Drop reference to user space restool utility from the README. It will be added back together with the actual support in the bus driver. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/README.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c1517d503bed1e2c5d190665422b5010f271dfaa Author: Laurentiu Tudor Date: Thu Jun 8 17:28:52 2017 +0300 staging: fsl-mc: add binding path to MAINTAINERS The mc bus device tree binding is maintained but not mentioned in the MAINTAINERS file. This patch adds it. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b5d5740a00ca26549b695d3c957bb14879a20952 Author: Laurentiu Tudor Date: Thu Jun 8 17:28:51 2017 +0300 staging: fsl-mc: drop unused forward declaration This forward declaration of "struct fsl_mc_resource" is of no use so drop it. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-sys.h | 1 - 1 file changed, 1 deletion(-) commit 6e0556cc93df9c74960162ac00176841fd2d6461 Author: Laurentiu Tudor Date: Thu Jun 8 17:28:50 2017 +0300 staging: fsl-mc: remove extra blank line Remove extra blank line reported by checkpatch.pl. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/dprc.h | 1 - 1 file changed, 1 deletion(-) commit 450638617374ceca5db09d0d9c4e66116579d363 Author: Laurentiu Tudor Date: Thu Jun 8 17:28:49 2017 +0300 staging: fsl-mc: drop a few useless #includes Some #includes were needlessly done from header files. Drop them from there and update the only .c file that implicitly needed one of those #includes. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-private.h | 1 - drivers/staging/fsl-mc/include/dprc.h | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) commit a042fbed02904493ae6df26ec836045f5a7d3ce2 Author: Laurentiu Tudor Date: Thu Jun 8 17:28:48 2017 +0300 staging: fsl-mc: simplify couple of deallocations Simplify a couple of deallocations code paths. This also fixes these checkpatch.pl false positives: "WARNING: kfree(NULL) is safe and this check is probably not required" Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 72f3415f812c12b8dfb05996514d1248c213250c Author: Laurentiu Tudor Date: Thu Jun 8 17:28:46 2017 +0300 staging: fsl-mc: enclose macro params in parens Several macros didn't had macro params enclosed in parens. Fix them to avoid precedence issues. Found with checkpatch.pl who was issuing this message: "Macro argument 'id' may be better as '(id)' to avoid precedence issues" Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpbp-cmd.h | 2 +- drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 2 +- drivers/staging/fsl-mc/bus/dpmng-cmd.h | 2 +- drivers/staging/fsl-mc/bus/dprc-cmd.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 46949b48568b175be23a844f6e7703f4b4f2dd14 Author: Aditya Shankar Date: Thu Jun 8 10:37:23 2017 +0530 staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler Change the config packet format used in handle_set_wfi_drv_handler() to align the host driver with the new format used in the wilc firmware. The change updates the format in which the host driver provides the firmware with the drv_handler index and also uses two new fields viz. "mode" and 'name" in the config packet along with this index to directly provide details about the interface and its mode to the firmware instead of having multiple if-else statements in the host driver to decide which interface to configure. This change requires users to move to the newer version of the wilc firmware(14.02 or higher) available on the vendor tree on github or on the linux-firmware project. The existing firmware files on the linux-firmware project are very old and best not used. Signed-off-by: Aditya Shankar Reviewed-by: Arend Van Spriel Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 68 +++++++++++++++++------ drivers/staging/wilc1000/host_interface.h | 9 ++- drivers/staging/wilc1000/linux_wlan.c | 37 ++++-------- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 + drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 6 files changed, 71 insertions(+), 48 deletions(-) commit 38d0353c6e5134e1a1e06a72909aab0e6187e5cc Author: Amisha Singh Date: Thu Jun 8 00:01:55 2017 +0530 Staging: comedi: ni_labpc_regs: fixed a block comment alignment issue Fixed a coding style issue. Signed-off-by: Amisha Singh Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_labpc_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbe6fb5b96bd2d4c39d3ed26cad8bc4242688320 Author: Okash Khawaja Date: Wed Jun 7 15:00:06 2017 +0100 staging: speakup: migrate bns to tty Migration of bns was missed out in the patch https://patchwork.kernel.org/patch/9727725/. This patch does it by updating relevant function pointers, just like in the patch linked above. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_bns.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f6e8716a3acb7e9e8396450b359ce04f128e0e79 Author: Perry Hooker Date: Thu Jun 8 23:06:54 2017 -0600 staging: ks7010: use little-endian types This patch fixes a number of sparse warnings of the form: drivers/staging/ks7010/ks_hostif.c:2187:29: warning: incorrect type in assignment (different base types) generated when storing little-endian data in variables that do not have a specified endianness. Signed-off-by: Perry Hooker Reviewed-By: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit bb5b42c0d8d2352a266b19abb29db7c566a4a707 Author: Ioana Radulescu Date: Tue Jun 6 10:00:41 2017 -0500 staging: fsl-dpaa2/eth: Update number of netdev queues Currently, the netdevice is allocated with a default number of Rx/Tx queues equal to CONFIG_NR_CPUS, meaning the maximum number of cores supported by the current kernel. The actual number of queues is reflected by the DPNI object attribute, so update the netdevice configuration based on that. Signed-off-by: Bogdan Purcareata Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 6ab00868464fb1acaed7276b47d92c64c4d8623f Author: Ioana Radulescu Date: Tue Jun 6 10:00:40 2017 -0500 staging: fsl-dpaa2/eth: Refactor MAC address setup The driver logic for allocating a MAC address to a net device is complicated enough to deserve a function of its own. While here, cleanup a bit the code comments. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 46 ++++++++++++++++---------- 1 file changed, 29 insertions(+), 17 deletions(-) commit 39163c0ce0f48557d0672fa2dd4cd7625e2cbaf7 Author: Ioana Radulescu Date: Tue Jun 6 10:00:39 2017 -0500 staging: fsl-dpaa2/eth: Errors checking update On the egress path, frame errors are reported using both a FD control field and the frame annotation status. The current code only handles FAS errors. Update to look at both fields when accounting Tx errors. Signed-off-by: Bogdan Purcareata Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 36 ++++++++++++++++++++------ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 17 ++++++++++-- 2 files changed, 43 insertions(+), 10 deletions(-) commit 05fa39c6b93fd859cd768a48a1d9615edcff0a94 Author: Ioana Radulescu Date: Tue Jun 6 10:00:37 2017 -0500 staging: fsl-dpaa2/eth: Only store bpid in priv struct We only need to know the buffer pool id, so save exactly that in the device's private structure, instead of the entire DPBP attributes struct. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 12 +++++++----- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) commit 50eacbc8877e725314f140aec091e96c2536d17a Author: Ioana Radulescu Date: Tue Jun 6 10:00:36 2017 -0500 staging: fsl-dpaa2/eth: Remove unused fields from priv struct Remove the dpni_id and buffer_layout fields from device's private structure. They're only used at probe so we don't need to store them for further use. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 33 +++++++++++++------------- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 5 ---- 2 files changed, 16 insertions(+), 22 deletions(-) commit d695e764f26399443474482cd3396130cd38057b Author: Ioana Radulescu Date: Tue Jun 6 10:00:35 2017 -0500 staging: fsl-dpaa2/eth: Add accessor for FAS field Introduce a helper macro for accessing the frame annotation status field in a frame buffer. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 31 ++++++++++++-------------- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 6 +++++ 2 files changed, 20 insertions(+), 17 deletions(-) commit 12afee803cd9e48cd5de584f8f66d05e79ec5d9d Author: Ioana Radulescu Date: Tue Jun 6 10:00:34 2017 -0500 staging: fsl-dpaa2/eth: Update ethtool stats names Add a label to the ethtool statistics counters, to differentiate between hardware counters and driver specific ones. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 5206d8d1d3e2e31f0cc2b5ec92a83ac344c4f2bb Author: Ioana Radulescu Date: Tue Jun 6 10:00:33 2017 -0500 staging: fsl-dpaa2/eth: Defer probing if no DPIOs found If the Ethernet driver doesn't find any DPIO devices during probe, it may be either because there's none available or because they haven't been probed yet. Request deferred probing in case it's the latter. Signed-off-by: Bharat Bhushan Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit d00defe30a21eea6d952925dccc7e212b1baf1ff Author: Ioana Radulescu Date: Tue Jun 6 10:00:32 2017 -0500 staging: fsl-dpaa2/eth: Reset dpbp Reset the buffer pool object before using it, like we do for the other DPAA2 objects. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d4b3763d380c8e97e816ad1e268a002248ff2bc1 Author: Ioana Radulescu Date: Tue Jun 6 10:00:31 2017 -0500 staging: fsl-dpaa2/eth: Always call napi_gro_receive() The function itself checks whether GRO support is enabled and acts accordingly, so we don't need to verify it in the driver as well. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e40ef9e48fa44cb1b5d51bf6e602d4a292cc5dfb Author: Ioana Radulescu Date: Tue Jun 6 10:00:30 2017 -0500 staging: fsl-dpaa2/eth: Don't use GFP_DMA Don't use GFP_DMA when allocating memory for the hash key, as we don't actually need to allocate from the lowest zone. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d87d5baf64e90d81ea526e7cc32dbc015067c677 Author: Ioana Radulescu Date: Tue Jun 6 10:00:29 2017 -0500 staging: fsl-dpaa2/eth: Minor cleanup in dpaa2_eth_set_hash We already have a variable for the DMA mapping device, so use that directly. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 77160af37cc4e93612396db4d48c182e166d9b58 Author: Ioana Radulescu Date: Tue Jun 6 10:00:28 2017 -0500 staging: fsl-dpaa2/eth: Add error message newlines A few error/warning messages lacked a newline at the end of the text. Add it for improved consistency and cosmetics. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 14 +++++++------- drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) commit e202c82c90a594782e51f47bb02d3529def214fa Author: Ioana Radulescu Date: Tue Jun 6 10:00:27 2017 -0500 staging: fsl-dpaa2/eth: Remove incorrect error path Not having Rx hashing distribution enabled for an interface is a valid configuration and shouldn't be treated as an error. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c433db403bbc0b7b7e3e9b6abd5fc652a52c91c6 Author: Ioana Radulescu Date: Tue Jun 6 10:00:26 2017 -0500 staging: fsl-dpaa2/eth: Fix return type of ndo_start_xmit ndo_start_xmit() returns a value of type netdev_tx_t. Update our ndo function to use the correct type. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dffaf8a17c1d97a66306bd361798e0bcf562332 Author: Ioana Radulescu Date: Tue Jun 6 10:00:25 2017 -0500 staging: fsl-dpaa2/eth: Initialize variable before use In dpni_get_irq_status(), status is both in and out parameter, so initialize before use. Issue found through static analysis tool. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acbff8e31ef07676c752a35d2991bc5cd989b24b Author: Ioana Radulescu Date: Tue Jun 6 10:00:24 2017 -0500 staging: fsl-dpaa2/eth: Add "static" keyword where needed Make a couple of locally used functions and structures static. Issue found through static analysis tool. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 +++--- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 -- drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) commit 30c078de6f3785fe1dc9f7b4caebddc7f5695647 Author: Geert Uytterhoeven Date: Mon Mar 13 11:59:19 2017 +0100 pinctrl: sh-pfc: r8a7795: Add EtherAVB pins, groups and function Add pins, groups, and a function for EtherAVB on R-Car H3 ES2.0. Extracted from a big patch in the BSP by Takeshi Kihara. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 111 +++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) commit be36e000bc2d28512721c6e09c3df920b1bfad5e Author: Arnd Bergmann Date: Fri Jun 9 12:18:02 2017 +0200 ARM: at91: fix at91_suspend_entering_slow_clock link error When CONFIG_ARCH_AT91 is enabled, but none of the specific SoC support is in use, some at91 specific drivers fail to link: drivers/tty/serial/atmel_serial.o: In function `atmel_serial_suspend': atmel_serial.c:(.text.atmel_serial_suspend+0x1e): undefined reference to `at91_suspend_entering_slow_clock' drivers/usb/host/ohci-at91.o: In function `ohci_hcd_at91_drv_suspend': ohci-at91.c:(.text.ohci_hcd_at91_drv_suspend+0x12): undefined reference to `at91_suspend_entering_slow_clock' drivers/usb/gadget/udc/at91_udc.o: In function `at91udc_suspend': at91_udc.c:(.text.at91udc_suspend+0x26): undefined reference to `at91_suspend_entering_slow_clock' This changes the at91_suspend_entering_slow_clock hack once more, adding an alternative inline implementation that is used exactly in those cases that don't provide the normal implementation. Fixes: c1892c2379d2 ("ARM: at91: handle CONFIG_PM for armv7m configurations") Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni arch/arm/mach-at91/samv7.c | 9 --------- include/linux/platform_data/atmel.h | 7 +++++++ 2 files changed, 7 insertions(+), 9 deletions(-) commit 7b08579f5c2a5c0e94b4a9f298339c2fdf0fcc89 Author: Johan Hovold Date: Tue Jun 6 12:54:41 2017 +0200 tty: drop unused alt_speed from tty_struct Drop the now unused alt_speed field from struct tty_struct. Setting an alt_speed using the ASYNC_SPD flags has been deprecated since v2.1.69, and has been broken for all tty drivers but serial-core since v3.10 and commit 6865ff222cca ("TTY: do not warn about setting speed via SPD_*") without anyone noticing. Note that serial-core still supports changing speed using TIOCSSERIAL and SPD flags (including "alt-speeds"), but also warns about it being deprecated since pre-git. Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman include/linux/tty.h | 1 - 1 file changed, 1 deletion(-) commit 41b4d581f219ecb56cd52d5eb45f8e7acfbe61ab Author: Johan Hovold Date: Tue Jun 6 12:54:40 2017 +0200 tty: ircomm: remove dead and broken ioctl code Remove three ifdefed and broken implementations of TIOCSSERIAL and TIOCGICOUNT, and parity handling in set_termios which had suffered severe bit rot. Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman net/irda/ircomm/ircomm_tty_ioctl.c | 107 +------------------------------------ 1 file changed, 1 insertion(+), 106 deletions(-) commit 48a7bd1178048d0b9a8e365272756acbf5cc1ccd Author: Johan Hovold Date: Tue Jun 6 12:54:39 2017 +0200 tty: rocket: drop broken alt-speed support Setting an alt_speed using the ROCKET_SPD flags has been deprecated since v2.1.69, and has been broken since commit 6865ff222cca ("TTY: do not warn about setting speed via SPD_*") without anyone noticing. To make things worse commit 6df3526b6649 ("rocket: first pass at termios reporting") in v2.6.25 started reporting back the actual baud rate used, something which also required 38400 to again be set whenever changing a SPD flag. Drop the broken alt-speed handling altogether, and add a ratelimited warning about using TIOCCSERIAL to change speed as being deprecated. Note that the rocket driver has never supported using a custom divisor (ASYNC_SPD_CUST equivalent). Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/tty/rocket.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit d1b8bc3bc27c2ce7b359ebf084065b2b9468c04d Author: Johan Hovold Date: Tue Jun 6 12:54:38 2017 +0200 tty: cyclades: drop broken alt-speed support Setting an alt_speed using the ASYNC_SPD flags has been deprecated since v2.1.69, and has been broken since v3.10 and commit 6865ff222cca ("TTY: do not warn about setting speed via SPD_*") without anyone noticing. Drop the broken alt-speed handling altogether, and add a ratelimited warning about using TIOCCSERIAL to to change speed as being deprecated. Note that using ASYNC_SPD_CUST is still supported. Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/tty/cyclades.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 6086380a5576239bd5bfaa175364550b38223ba6 Author: Johan Hovold Date: Tue Jun 6 12:54:37 2017 +0200 tty: amiserial: drop broken alt-speed support Setting an alt_speed using the ASYNC_SPD flags has been deprecated since v2.1.69, and has been broken since v3.10 and commit 6865ff222cca ("TTY: do not warn about setting speed via SPD_*") without anyone noticing. Drop the broken alt-speed handling altogether, and add a ratelimited warning about using TIOCCSERIAL to change speed as being deprecated. Note that using ASYNC_SPD_CUST is still supported. Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/tty/amiserial.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit 8535796579fd08f226878212b39b2682064d41b7 Author: Johan Hovold Date: Tue Jun 6 12:54:36 2017 +0200 tty: simserial: drop unused alt_speed handling This driver was setting the deprecated and broken alt_speed based on port flags, but never provided a means to change the flags or to actually change the speed. Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman arch/ia64/hp/sim/simserial.c | 13 ------------- 1 file changed, 13 deletions(-) commit 83c9a2d1a6ec906649facb009f1ee191c1c03f48 Author: Johan Hovold Date: Tue Jun 6 12:54:35 2017 +0200 USB: serial: ftdi_sio: remove broken alt-speed handling Remove the broken alt_speed code, and warn when trying to set the line speed using TIOCSSERIAL and SPD flags. The use of SPD flags to set the line speed has been deprecated since v2.1.69 and support for alt_speed (e.g. "warp") has even been removed from TTY core in v3.10 by commit 6865ff222cca ("TTY: do not warn about setting speed via SPD_*"), effectively breaking all driver implementations of this except for serial core. Also remove the verbose and outdated comment on how to set baud rates. Note that setting a custom divisor will continue to work with the caveat that 38400 must again be selected every time the divisor is changed since v2.6.24 and commit 669a6db1037e ("USB: ftd_sio: cleanups and updates for new termios work") which started reporting back the actual baud rate used. Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/ftdi_sio.c | 56 +++++++------------------------------------ 1 file changed, 9 insertions(+), 47 deletions(-) commit f3e8ae657e40354cfb1372555f0d700f50f72ba2 Author: Johan Hovold Date: Tue Jun 6 12:54:34 2017 +0200 USB: serial: ftdi_sio: simplify TIOCSSERIAL flag logic Simplify TIOCSSERIAL flag logic somewhat. Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/ftdi_sio.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit dc2f7271593dacaf1ce3b0c57dc657c3221e841c Author: Johan Hovold Date: Tue Jun 6 12:54:33 2017 +0200 serial: rate limit custom-speed deprecation notice Contrary to what a comment claimed, the ASYNC_SPD flags and custom divisor can be set by a non-privileged user so rate limit the deprecation notice as was intended. Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fe6d53c9c0bb51977521d409a2efe453b7123c39 Author: Christoph Hellwig Date: Fri May 12 17:16:10 2017 +0200 nvme: save hmpre and hmmin in struct nvme_ctrl We'll need the later for the HMB support. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn drivers/nvme/host/core.c | 2 ++ drivers/nvme/host/nvme.h | 3 +++ 2 files changed, 5 insertions(+) commit b85cf7348ab50e2042b732e19031b1d22eedc741 Author: Arnav Dawn Date: Fri May 12 17:12:03 2017 +0200 nvme.h: add dword 12 - 15 fields to struct nvme_features Signed-off-by: Arnav Dawn [hch: split from a larger patch, new changelog] Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn include/linux/nvme.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 39673e1995381b09a63cc7e9d0aea7cf871cb359 Author: Christoph Hellwig Date: Mon Jan 9 15:36:28 2017 +0100 nvme.h: add struct nvme_host_mem_buf_desc and HMB flags Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn include/linux/nvme.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit fdd050b5b3c96813ae6756ed68157d32ba31b9f2 Merge: f06345a 87085ff Author: Christoph Hellwig Date: Tue Jun 13 11:45:14 2017 +0200 Merge branch 'uuid-types' of bombadil.infradead.org:public_git/uuid into nvme-base commit 4524667b1e6801a92a4de066788e558b71fe323a Author: Andy Shevchenko Date: Sat Jun 10 22:10:34 2017 +0300 net: rfkill: gpio: Switch to devm_acpi_dev_add_driver_gpios() Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assingment if ->probe() fails. Signed-off-by: Andy Shevchenko Signed-off-by: Johannes Berg net/rfkill/rfkill-gpio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ce046e5d9b489554c29ae9277cdc2f86dee76a84 Author: Johan Hovold Date: Tue Jun 6 17:59:04 2017 +0200 thermal: max77620: fix pinmux conflict on reprobe Use the new helper for reusing a device-tree node of another device instead of managing the node references explicitly. This also makes sure that the new of_node_reuse flag is set if the device is ever reprobed, something which specifically now avoids driver core from attempting to claim any pinmux resources already claimed by the parent device. Fixes: ec4664b3fd6d ("thermal: max77620: Add thermal driver for reporting junction temp") Cc: Laxman Dewangan Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/thermal/max77620_thermal.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit c592fafbdbb6b1279b76a54722d1465ca77e5bde Author: Johan Hovold Date: Tue Jun 6 17:59:03 2017 +0200 thermal: max77620: fix device-node reference imbalance The thermal child device reuses the parent MFD-device device-tree node when registering a thermal zone, but did not take a reference to the node. This leads to a reference imbalance, and potential use-after-free, when the node reference is dropped by the platform-bus device destructor (once for the child and later again for the parent). Fix this by dropping any reference already held to a device-tree node and getting a reference to the parent's node which will be balanced on reprobe or on platform-device release, whichever comes first. Note that simply clearing the of_node pointer on probe errors and on driver unbind would not allow the use of device-managed resources as specifically thermal_zone_of_sensor_unregister() claims that a valid device-tree node pointer is needed during deregistration (even if it currently does not seem to use it). Fixes: ec4664b3fd6d ("thermal: max77620: Add thermal driver for reporting junction temp") Cc: stable # 4.9 Cc: Laxman Dewangan Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/thermal/max77620_thermal.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2bf698671205bb6f898db348b788d16f6976e086 Author: Johan Hovold Date: Tue Jun 6 17:59:02 2017 +0200 USB: of: fix root-hub device-tree node handling In an attempt to work around a pinmux over-allocation issue in driver core, commit dc5878abf49c ("usb: core: move root hub's device node assignment after it is added to bus") moved the device-tree node assignment until after the root hub had been registered. This not only makes the device-tree node unavailable to the usb driver during probe, but also prevents the of_node from being linked to in sysfs and causes a race with user-space for the (recently added) devspec attribute. Use the new device_set_of_node_from_dev() helper to reuse the node of the sysdev device, something which now prevents driver core from trying to reclaim any pinctrl pins during probe. Fixes: dc5878abf49c ("usb: core: move root hub's device node assignment after it is added to bus") Fixes: 51fa91475e43 ("usb/core: Added devspec sysfs entry for devices behind the usb hub") Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 2 -- drivers/usb/core/usb.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit ed032c1bede83ec9bd5f7e803e663cb7f76e5947 Author: Johan Hovold Date: Tue Jun 6 17:59:01 2017 +0200 driver core: fix automatic pinctrl management Commit ab78029ecc34 ("drivers/pinctrl: grab default handles from device core") added automatic pin-control management to driver core by looking up and setting any default pinctrl state found in device tree while a device is being probed. This obviously runs into problems as soon as device-tree nodes are reused for child devices which are later also probed as pins would already have been claimed by the ancestor device. For example if a USB host controller claims a pin, its root hub would consequently fail to probe when its device-tree node is set to the node of the controller: pinctrl-single 48002030.pinmux: pin PIN204 already requested by 48064800.ehci; cannot claim for usb1 pinctrl-single 48002030.pinmux: pin-204 (usb1) status -22 pinctrl-single 48002030.pinmux: could not request pin 204 (PIN204) from group usb_dbg_pins on device pinctrl-single usb usb1: Error applying setting, reverse things back usb: probe of usb1 failed with error -22 Fix this by checking the new of_node_reused flag and skipping automatic pinctrl configuration during probe if set. Note that the flag is checked in driver core rather than in pinctrl (e.g. in pinctrl_dt_to_map()) which would specifically have prevented intentional use of a parent's pinctrl properties by a child device (should such a need ever arise). Fixes: ab78029ecc34 ("drivers/pinctrl: grab default handles from device core") Acked-by: Linus Walleij Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/base/pinctrl.c | 3 +++ 1 file changed, 3 insertions(+) commit 4e75e1d7dac9d7c95c57eceb451d01f2afcc8626 Author: Johan Hovold Date: Tue Jun 6 17:59:00 2017 +0200 driver core: add helper to reuse a device-tree node Add a helper function to be used when reusing the device-tree node of another device. It is fairly common for drivers to reuse the device-tree node of a parent (or other ancestor) device when creating class or bus devices (e.g. gpio chips, i2c adapters, iio chips, spi masters, serdev, phys, usb root hubs). But reusing a device-tree node may cause problems if the new device is later probed as for example driver core would currently attempt to reinitialise an already active associated pinmux configuration. Other potential issues include the platform-bus code unconditionally dropping the device-tree node reference in its device destructor, reinitialisation of other bus-managed resources such as clocks, and the recently added DMA-setup in driver core. Note that for most examples above this is currently not an issue as the devices are never probed, but this is a problem for the USB bus which has recently gained device-tree support. This was discovered and worked-around in a rather ad-hoc fashion by commit dc5878abf49c ("usb: core: move root hub's device node assignment after it is added to bus") by not setting the of_node pointer until after the root-hub device has been registered. Instead we can allow devices to reuse a device-tree node by setting a flag in their struct device that can be used by core, bus and driver code to avoid resources from being over-allocated. Note that the helper also grabs an extra reference to the device node, which specifically balances the unconditional put in the platform-device destructor. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 16 ++++++++++++++++ include/linux/device.h | 4 ++++ 2 files changed, 20 insertions(+) commit 60a93cffcffdc86222c184aafc622b53b8460427 Author: Johan Hovold Date: Tue Jun 6 17:58:59 2017 +0200 USB: of: document reference taken by child-lookup helper Document that the child-node lookup helper takes a reference to the device-tree node which needs to be dropped after use. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/core/of.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e271b2c909a22a2c13b2d5f77f2ce0091b74540c Author: Johan Hovold Date: Tue Jun 6 17:58:58 2017 +0200 USB: core: fix device node leak Make sure to release any OF device-node reference taken when creating the USB device. Note that we currently do not hold a reference to the root hub device-tree node (i.e. the parent controller node). Fixes: 69bec7259853 ("USB: core: let USB device know device node") Cc: stable # v4.6 Acked-by: Peter Chen Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/core/usb.c | 2 ++ 1 file changed, 2 insertions(+) commit 6dad28ae197037d8c027f214046c2bbf159bc075 Author: Emmanuel Grumbach Date: Sat Jun 10 13:52:46 2017 +0300 mac80211: add the action to the drv_ampdu_action tracepoint It is very useful to know what ampdu action is currently happening. Add this information to the tracepoint. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/trace.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit ea304a99b06e6c05a61c85f05c75aac6ff545806 Author: Arend Van Spriel Date: Fri Jun 9 13:08:46 2017 +0100 nl80211: remove desciption about request from NL80211_CMD_ROAM The description of NL80211_CMD_ROAM indicated possibility for a request to roam issued by user-space. However, it also states that as not being implemented right now. This has been so since commit b23aa676ab9d ("cfg80211: connect/disconnect API") added in 2009. So it seems safe to assume it will not be added any time soon and thus remove it. Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit f45cbe6e691fcdeda480ecc9c66533a8277f0ca4 Author: Avraham Stern Date: Fri Jun 9 13:08:45 2017 +0100 nl80211: add authorized flag to ROAM event Drivers that initiate roaming while being connected to a network that uses 802.1X authentication need to inform user space if 802.1X authentication is further required after roaming. For example, when using the Fast transition protocol, roaming within the mobility domain does not require new 802.1X authentication, but roaming to another mobility domain does. In addition, some drivers may not support 802.1X authentication (so it has to be done in user space), while other drivers do. Add a flag to the roaming notification to indicate if user space is required to do 802.1X authentication after the roaming or not. This flag will only be used for networks that use 802.1X authentication. For networks that do not use 802.1X authentication it is assumed that no further action is required from user space after the roaming notification. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho [arend.vanspriel@broadcom.com reuse NL80211_ATTR_PORT_AUTHORIZED] Signed-off-by: Arend van Spriel [rebase to apply w/o the flag in CONNECT] Signed-off-by: Johannes Berg include/net/cfg80211.h | 4 ++++ include/uapi/linux/nl80211.h | 11 +++++++++++ net/wireless/nl80211.c | 4 +++- net/wireless/sme.c | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) commit 0bd08fc8db593eb79bd40729279016fd5d7edc09 Author: Andy Shevchenko Date: Sun Jun 11 17:15:16 2017 +0300 usb: misc: usbsevseg: Use sysfs_match_string() helper Use sysfs_match_string() helper instead of open coded variant. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usbsevseg.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit d3be974a9c4eac83c1af15c966857d123a8436ba Author: Lu Baolu Date: Sat Jun 3 17:15:06 2017 +0800 usb/early: Remove trace_printk() callers in xhci-dbc Trace_printk() was used to log debug messages in xhci-dbc.c where printk() isn't feasible. As there should not be a single caller to trace_printk() in normal kernels, replace them with empty functions. Cc: Vlastimil Babka Cc: Steven Rostedt Cc: Peter Zijlstra Signed-off-by: Lu Baolu Signed-off-by: Greg Kroah-Hartman drivers/usb/early/xhci-dbc.c | 1 - 1 file changed, 1 deletion(-) commit 0f4c3f9021ebc168e25d3a0ba6d65ac6e890e779 Author: Arvind Yadav Date: Fri Jun 9 17:33:31 2017 +0530 usb: mtu3: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_plat.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit b891245bff79583b9c69b14b4429362a5d54096e Author: Yuyang Du Date: Thu Jun 8 13:04:13 2017 +0800 usbip: vhci-hcd: Clean up the code by adding a new macro Each vhci has 2*VHCI_HC_PORTS ports, in which VHCI_HC_PORTS ports are HighSpeed (or below), and VHCI_HC_PORTS are SuperSpeed. This new macro VHCI_PORTS reflects this configuration. Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci.h | 5 ++++- drivers/usb/usbip/vhci_sysfs.c | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) commit a5c7f019c7d602c508b3eedc470568df4633c642 Author: Yuyang Du Date: Thu Jun 8 13:04:12 2017 +0800 usbip: vhci-hcd: Add USB3 port status bits As USB3 has (slightly) different bit meanings in the port status. Add a new status bit array for USB3. Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 56 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 6 deletions(-) commit df9032c13d3e065f606ed669a1afe88e8ca4f25a Author: Yuyang Du Date: Thu Jun 8 13:04:11 2017 +0800 usbip: Add USB_SPEED_SUPER as valid arg With this patch, USB_SPEED_SUPER is a valid speed when attaching a USB3 SuperSpeed device. Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_sysfs.c | 1 + 1 file changed, 1 insertion(+) commit 1c9de5bf428612458427943b724bea51abde520a Author: Yuyang Du Date: Thu Jun 8 13:04:10 2017 +0800 usbip: vhci-hcd: Add USB3 SuperSpeed support This patch adds a USB3 HCD to an existing USB2 HCD and provides the support of SuperSpeed, in case the device can only be enumerated with SuperSpeed. The bulk of the added code in usb3_bos_desc and hub_control to support SuperSpeed is borrowed from the commit 1cd8fd2887e162ad ("usb: gadget: dummy_hcd: add SuperSpeed support"). With this patch, each vhci will have VHCI_HC_PORTS HighSpeed ports and VHCI_HC_PORTS SuperSpeed ports. Suggested-by: Krzysztof Opasiak Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci.h | 7 +- drivers/usb/usbip/vhci_hcd.c | 323 ++++++++++++++++++++++++++++------- drivers/usb/usbip/vhci_sysfs.c | 109 ++++++++---- tools/usb/usbip/libsrc/vhci_driver.c | 23 ++- tools/usb/usbip/libsrc/vhci_driver.h | 8 +- tools/usb/usbip/src/usbip_attach.c | 3 +- 6 files changed, 370 insertions(+), 103 deletions(-) commit 03cd00d538a6feb0492cd153edf256ef7d7bd95e Author: Yuyang Du Date: Thu Jun 8 13:04:09 2017 +0800 usbip: vhci-hcd: Set the vhci structure up to work This patch enables the new vhci structure. Its lock protects both the USB2 hub and the shared USB3 hub. Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci.h | 2 - drivers/usb/usbip/vhci_hcd.c | 206 ++++++++++++++++++++++++----------------- drivers/usb/usbip/vhci_rx.c | 16 ++-- drivers/usb/usbip/vhci_sysfs.c | 26 ++++-- 4 files changed, 145 insertions(+), 105 deletions(-) commit dff3565b8e1c0be6fc83ba47dcab45c149dcab5b Author: Yuyang Du Date: Thu Jun 8 13:04:08 2017 +0800 usbip: vhci-hcd: Rework vhci_hcd_init A vhci struct is added as the platform-specific data to the vhci platform device, in order to get the vhci by its platform device. This is done in vhci_hcd_init(). Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 51 ++++++++++++++++++++---------------- tools/usb/usbip/libsrc/vhci_driver.c | 2 +- tools/usb/usbip/libsrc/vhci_driver.h | 1 + 3 files changed, 30 insertions(+), 24 deletions(-) commit 89a73d281fa4f58942474ada19d34d7ea39af2f4 Author: Yuyang Du Date: Thu Jun 8 13:04:07 2017 +0800 usbip: vhci-hcd: Move VHCI platform device into vhci struct Every VHCI is a platform device, so move the platform_device struct into the VHCI struct. Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci.h | 3 ++- drivers/usb/usbip/vhci_hcd.c | 17 ++++++++--------- drivers/usb/usbip/vhci_sysfs.c | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) commit 559e9c00b340ab4929e36a6bb176ca11f95ef46a Author: Yuyang Du Date: Thu Jun 8 13:04:06 2017 +0800 usbip: vhci-hcd: Add vhci struct In order to support SuperSpeed devices, a USB3 HCD is added to share the USB2 HCD. As a result, a VHCI is composed of two vhci_hcds associated with the two HCDs respectively. So we add another level of abstraction, vhci, and thus this vhci structure. Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 5ec0edc96558a0090c7c3361adc0a5d98102cd80 Author: Yuyang Du Date: Thu Jun 8 13:04:05 2017 +0800 usbip: vhci-hcd: Rename function names to reflect their struct names These helper function names are renamed to have their full struct names to avoid confusion: - hcd_to_vhci() -> hcd_to_vhci_hcd() - vhci_to_hcd() -> vhci_hcd_to_hcd() - vdev_to_vhci() -> vdev_to_vhci_hcd() Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci.h | 11 +++++------ drivers/usb/usbip/vhci_hcd.c | 34 +++++++++++++++++----------------- drivers/usb/usbip/vhci_rx.c | 12 ++++++------ drivers/usb/usbip/vhci_sysfs.c | 6 +++--- 4 files changed, 31 insertions(+), 32 deletions(-) commit 264ffb194a92df256b604d649faadfbd23a054e2 Author: Arvind Yadav Date: Mon Jun 12 16:45:14 2017 +0530 usb: host: ehci-exynos: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-exynos.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7cf916bd639bd26db7214f2205bccdb4b9306256 Author: Benjamin Herrenschmidt Date: Tue Jun 13 16:01:13 2017 +1000 usb: Fix typo in the definition of Endpoint[out]Request The current definition is wrong. This breaks my upcoming Aspeed virtual hub driver. Signed-off-by: Benjamin Herrenschmidt Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman include/linux/usb/hcd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e55dea8ede2245918c537b9a252a1269f5d7b78b Author: Yuyang Du Date: Mon May 22 18:20:18 2017 +0800 usb: usbip tool: Fix parse_status() In parse_status(), all nports number of idev's are initiated to 0 by memset(), it is simply wrong, because parse_status() reads the status sys file one by one, therefore, it can only update the according vhci_driver->idev's for it to parse. Reviewed-by: Krzysztof Opasiak Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/vhci_driver.c | 38 ++++++++++++++---------------------- tools/usb/usbip/src/usbip_attach.c | 2 ++ 2 files changed, 17 insertions(+), 23 deletions(-) commit fd92b7deb98a4edd31ffcc2d64cee36103805ff5 Author: Yuyang Du Date: Mon May 22 18:20:17 2017 +0800 usb: usbip tool: Fix refresh_imported_device_list() The commit 0775a9cbc694e8c7 ("usbip: vhci extension: modifications to vhci driver") introduced multiple controllers, but the status of the ports are only extracted from the first status file, fix it. Reviewed-by: Krzysztof Opasiak Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/vhci_driver.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit aa3ecb9154acb99282f315fe6c34ce4b7eb4d67e Author: Yuyang Du Date: Mon May 22 18:20:16 2017 +0800 usb: usbip tool: Add ncontrollers in vhci_driver structure A new field ncontrollers is added to the vhci_driver structure. And this field is stored by scanning the vhci_hcd* dirs in the platform udev. Suggested-and-reviewed-by: Krzysztof Opasiak Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/vhci_driver.c | 36 ++++++++++++++++++++++++++++++++++++ tools/usb/usbip/libsrc/vhci_driver.h | 1 + 2 files changed, 37 insertions(+) commit c3509715fc9484a48b69a9f0196b728c960840c9 Author: Yuyang Du Date: Mon May 22 18:20:15 2017 +0800 usb: usbip tool: Check the return of get_nports() If we get nonpositive number of ports, there is no sense to continue, then fail gracefully. In addition, the commit 0775a9cbc694e8c72 ("usbip: vhci extension: modifications to vhci driver") introduced configurable numbers of controllers and ports, but we have a static port number maximum, MAXNPORT. If exceeded, the idev array will be overflown. We fix it by validating the nports to make sure the port number max is not exceeded. Reviewed-by: Krzysztof Opasiak Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/vhci_driver.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b3b51417d0af63fb9a06662dc292200aed9ea53f Author: Michael Grzeschik Date: Mon May 22 13:02:44 2017 +0200 usb: usbip: set buffer pointers to NULL after free The usbip stack dynamically allocates the transfer_buffer and setup_packet of each urb that got generated by the tcp to usb stub code. As these pointers are always used only once we will set them to NULL after use. This is done likewise to the free_urb code in vudc_dev.c. This patch fixes double kfree situations where the usbip remote side added the URB_FREE_BUFFER. Cc: stable@vger.kernel.org Signed-off-by: Michael Grzeschik Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_main.c | 4 ++++ drivers/usb/usbip/stub_tx.c | 4 ++++ 2 files changed, 8 insertions(+) commit c01b244ad848ac7f0faa141182db80650a8a761a Author: Alan Stern Date: Mon Jun 5 10:28:01 2017 -0400 USB: add usbfs ioctl to retrieve the connection speed The usbfs interface does not provide any way for the user to learn the speed at which a device is connected. The current API includes a USBDEVFS_CONNECTINFO ioctl, but all it provides is the device's address and a one-bit value indicating whether the connection is low speed. That may have sufficed in the era of USB-1.1, but it isn't good enough today. This patch introduces a new ioctl, USBDEVFS_GET_SPEED, which returns a numeric value indicating the speed of the connection: unknown, low, full, high, wireless, super, or super-plus. Similar information (not exactly the same) is available through sysfs, but it seems reasonable to provide the actual value in usbfs. Signed-off-by: Alan Stern Reported-by: Reinhard Huck Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 3 +++ include/uapi/linux/usbdevice_fs.h | 6 ++++++ 2 files changed, 9 insertions(+) commit 3a00df5707b6af715e78c26569800e0c2eb615fe Author: Avraham Stern Date: Fri Jun 9 13:08:43 2017 +0100 cfg80211: support 4-way handshake offloading for 802.1X Add API for setting the PMK to the driver. For FT support, allow setting also the PMK-R0 Name. This can be used by drivers that support 4-Way handshake offload while IEEE802.1X authentication is managed by upper layers. Signed-off-by: Avraham Stern Signed-off-by: Johannes Berg [arend.vanspriel@broadcom.com: add WANT_1X_4WAY_HS attribute] Signed-off-by: Arend van Spriel [reword NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X docs a bit to say that the device may require it] Signed-off-by: Johannes Berg include/linux/ieee80211.h | 3 ++ include/net/cfg80211.h | 32 +++++++++++++ include/uapi/linux/nl80211.h | 39 +++++++++++++++- net/wireless/core.c | 5 +++ net/wireless/nl80211.c | 105 +++++++++++++++++++++++++++++++++++++++++++ net/wireless/rdev-ops.h | 25 +++++++++++ net/wireless/trace.h | 60 +++++++++++++++++++++++++ 7 files changed, 268 insertions(+), 1 deletion(-) commit 91b5ab628929d97357108594610e7c07be93e2fd Author: Eliad Peller Date: Fri Jun 9 13:08:42 2017 +0100 cfg80211: support 4-way handshake offloading for WPA/WPA2-PSK Let drivers advertise support for station-mode 4-way handshake offloading with a new NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag. Extend use of NL80211_ATTR_PMK attribute indicating it might be passed as part of NL80211_CMD_CONNECT command, and contain the PSK (which is the PMK, hence the name.) The driver/device is assumed to handle the 4-way handshake by itself in this case (including key derivations, etc.), instead of relying on the supplicant. This patch is somewhat based on this one (by Vladimir Kondratiev): https://patchwork.kernel.org/patch/1309561/. Signed-off-by: Vladimir Kondratiev Signed-off-by: Eliad Peller Signed-off-by: Luca Coelho [arend.vanspriel@broadcom.com rebase dealing with existing ATTR_PMK] Signed-off-by: Arend van Spriel [reword NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK docs to indicate that this offload might be required] Signed-off-by: Johannes Berg include/linux/ieee80211.h | 1 + include/net/cfg80211.h | 2 ++ include/uapi/linux/nl80211.h | 22 ++++++++++++++++++++-- net/wireless/nl80211.c | 9 +++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) commit ea43d9b85acf66eac16ec89dc0fb84751f50f088 Author: Jagan Teki Date: Mon Jun 12 15:23:14 2017 +0530 arm64: allwinner: h5: Add initial Orangepi Zero Plus 2 support Orangepi Zero Plus 2 is an open-source single-board computer using the Allwinner h5 SOC. H5 Orangepi Zero Plus 2 has - Quad-core Cortex-A53 - 512MB DDR3 - micrSD slot and 8GB eMMC - Debug TTL UART - HDMI - Wifi + BT - OTG+power supply Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 92 ++++++++++++++++++++++ 2 files changed, 93 insertions(+) commit f85e8813b2c9346821e704c175d8933d25410331 Author: Andrew F. Davis Date: Mon Jun 12 09:42:46 2017 -0500 DocBook: w1: Update W1 file locations and names in DocBook Some of the files in the W1 subsystem have been moved or renamed, update the documentation for the same. Signed-off-by: Andrew F. Davis Signed-off-by: Greg Kroah-Hartman Documentation/DocBook/w1.tmpl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit bdecc9cb214e25938098111aa994da050b7251a6 Author: Jagan Teki Date: Mon Jun 12 15:23:13 2017 +0530 arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support Orangepi Win/WinPlus is an open-source single-board computer using the Allwinner A64 SOC. A64 Orangepi Win/WinPlus has - A64 Quad-core Cortex-A53 64bit - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM - Debug TTL UART - Four USB 2.0 - HDMI - LCD - Audio and MIC - Wifi + BT - IR receiver - 5V DC power supply Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 95 ++++++++++++++++++++++ 2 files changed, 96 insertions(+) commit f40609d1591fbbd9d391f1f8220173237911ab23 Author: Greg Kroah-Hartman Date: Tue Jun 13 09:12:46 2017 +0200 zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO() I missed converting the last zram attribute to CLASS_ATTR_RO() after removing CLASS_ATTR() from the kernel, causing a build breakage. This patch fixes that problem. Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08f741a93333dc81b6d17d25f712ca167f250b1a Author: Magnus Lynch Date: Mon Jun 12 11:52:41 2017 -0700 USB: serial: qcserial: expose methods for modem control The qcserial driver fails to expose the .tiocmget and .tiocmset methods available from usb_wwan. These methods are required by ioctl commands dealing with the modem control signals DTR, RTS, etc. With these methods not set ioctl calls intended to control the DTR state will fail. For example, pppd drops and raises DTR in preparation to dialing the modem, which handles the case of the modem already being connected by making it hang up and return to command mode. DTR control being unavailable will lead to a protracted failure to connect as the modem will be stuck in a state not responsive to command. I have tested that with this patch the described case is handled successfully. There is an analogous method for .ioctl available from usb_wwan (as used in option.c) but I conservatively omitted that for lack of familiarity. Signed-off-by: Magnus Lynch Signed-off-by: Johan Hovold drivers/usb/serial/qcserial.c | 2 ++ 1 file changed, 2 insertions(+) commit c48c281e7236fc8769dd62e6b13ba090a546027d Author: Gustavo A. R. Silva Date: Thu Jun 8 22:24:30 2017 -0500 wlcore: spi: remove unnecessary variable Remove unnecessary variable and refactor the code. Addresses-Coverity-ID: 1365000 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/spi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 078b30da3f074f2e9ebcf1a18e993b27e22eb3ba Author: Sebastian Reichel Date: Thu Jun 8 22:50:00 2017 +0200 wlcore: add wl1285 compatible Motorola Droid 4 uses a WL 1285C. With differences between chips not being public let's add explicit binding for wl1285 instead of relying on wl1283 being very similar. Reviewed-by: Rob Herring Acked-by: Kalle Valo Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel Signed-off-by: Kalle Valo Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt | 1 + drivers/net/wireless/ti/wlcore/sdio.c | 1 + drivers/net/wireless/ti/wlcore/spi.c | 1 + 3 files changed, 3 insertions(+) commit 1abf9ae719f6de71fb90d3169d575630be612619 Author: Binoy Jayan Date: Thu Jun 8 15:33:03 2017 +0530 mwifiex: Replace semaphore async_sem with mutex The semaphore 'async_sem' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- drivers/net/wireless/marvell/mwifiex/main.h | 2 +- drivers/net/wireless/marvell/mwifiex/scan.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit c42ea613353cd28f741d9389f52b4b42a9ce2eb9 Author: Yan-Hsuan Chuang Date: Mon Jun 5 10:29:59 2017 -0500 rtlwifi: btcoex: let btcoex get wifi rssi and link status Instead of rssi status, the btcoex also needs to get the link status of the wifi. In addition, some of the rssi status can be merged into link status. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 358 +++++++++++++++------ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 32 +- .../wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 6 +- 3 files changed, 292 insertions(+), 104 deletions(-) commit 6aafa230741484b2d6101219d606b8739a074855 Author: Yan-Hsuan Chuang Date: Mon Jun 5 10:29:58 2017 -0500 rtlwifi: btcoex: remove unused display functions These display functions are useless and will not be called in the future. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 38 ---------------------- 1 file changed, 38 deletions(-) commit 0199103ea7ec2e5ae7233ffa43fe6f08088dfb5d Author: Yan-Hsuan Chuang Date: Mon Jun 5 10:29:57 2017 -0500 rtlwifi: btcoex: bind BT coex information with wifi driver When initializing, gather BT information in struct btcoexist and provide them to wifi driver. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 56 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 8 ++++ .../wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 29 ++++------- 3 files changed, 72 insertions(+), 21 deletions(-) commit 7937f02d1953952a6eaf626b175ea9db5541e699 Author: Yan-Hsuan Chuang Date: Mon Jun 5 10:29:56 2017 -0500 rtlwifi: btcoex: hook external functions for newer chips Hook the external functions for newer ICs such as 8821a and 8192e. Rename ex_halbtc8192e2ant_halt_notify to ex_btc8192e2ant_halt_notify. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c | 2 +- .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 340 +++++++++++++++++---- 2 files changed, 280 insertions(+), 62 deletions(-) commit 60f44100eee785b5bdb475d05760ff15707fd1b7 Author: Yan-Hsuan Chuang Date: Mon Jun 5 10:29:55 2017 -0500 rtlwifi: btcoex: add settings before the hardware is ready When the hardware is turned on and in the initialization stage, the PTA circuit is unstable. Hence we need to force some hardware settings to make sure the PTA circuit work correctly, otherwise it may affect the user's experience. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 1 + .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 15 +++++++++++++++ .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 + 3 files changed, 17 insertions(+) commit 86f9ab2ef4bdf0c9763d18ae2755ba75b4004725 Author: Yan-Hsuan Chuang Date: Mon Jun 5 10:29:54 2017 -0500 rtlwifi: btcoex: hook external PnP notify by chip for wifi driver Hook the chip-specific PnP notify functions for the wifi driver to notify btcoexistence. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 1 + .../wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) commit 6fbbc82adfb29fc1c76d4d5ca529ba7c8891a2e7 Author: Yan-Hsuan Chuang Date: Mon Jun 5 10:29:53 2017 -0500 rtlwifi: btcoex: settings before firmware is downloaded The btcoex is sometimes unstable because there are some unexpected behaviors before the firmware has been downloaded successfully. Therefore we force the antenna path settings to avoid this, then let the firmware control the btcoexistence when the firmware is ready. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 1 + .../wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.h | 2 ++ .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 13 +++++++++++++ .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 + 4 files changed, 17 insertions(+) commit 753c953bae5d2bb1d8786b78b9b8a6d5cfe677b4 Author: Yan-Hsuan Chuang Date: Mon Jun 5 10:29:52 2017 -0500 rtlwifi: btcoex: rename ex_halbtc*ant to ex_btc*ant These external functions are for BT-coexistence, so remove the "hal" prefix for consistancy. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.h | 32 ++++++------- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 52 +++++++++++----------- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 41 ++++++++--------- .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.h | 38 ++++++++-------- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.h | 24 +++++----- 5 files changed, 95 insertions(+), 92 deletions(-) commit d178b1321e494c5928cc135814bc303ec9de2282 Author: Yan-Hsuan Chuang Date: Mon Jun 5 10:29:51 2017 -0500 rtlwifi: btcoex: add macros to check chip type For some external functions that have hardware dependency, we need to know the type of the hardware before invoking them. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbt_precomp.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit bc0384eedb66555f6b4662102675f9bf4a3d12b7 Author: Colin Ian King Date: Fri Jun 2 16:40:45 2017 +0100 qtnfmac: check band before allocating cmd_skb to avoid resource leak The current code allocates cmd_skb and then will leak this if band->band is an illegal value. It is simpler to sanity check the band first before allocating cmd_skb so that we don't have to free cmd_skb if an invalid band occurs. Detected by CoverityScan, CID#1437561 ("Resource Leak") Signed-off-by: Colin Ian King Reviewed-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/commands.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 292c333300ec2a412902fa59aad5b365024384a5 Author: Colin Ian King Date: Fri Jun 2 09:56:39 2017 +0100 mwifiex: make function mwifiex_ret_pkt_aggr_ctrl static function mwifiex_ret_pkt_aggr_ctrl can be made static as it does not need to be in global scope. Cleans up sparse warning: "symbol 'mwifiex_ret_pkt_aggr_ctrl' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ea59db8a375216e6c915c5586f556766673b5a7 Author: Peter S. Housel Date: Mon Jun 12 11:46:22 2017 +0100 brcmfmac: Fix glom_skb leak in brcmf_sdiod_recv_chain An earlier change to this function (3bdae810721b) fixed a leak in the case of an unsuccessful call to brcmf_sdiod_buffrw(). However, the glom_skb buffer, used for emulating a scattering read, is never used or referenced after its contents are copied into the destination buffers, and therefore always needs to be freed by the end of the function. Fixes: 3bdae810721b ("brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain") Fixes: a413e39a38573 ("brcmfmac: fix brcmf_sdcard_recv_chain() for host without sg support") Cc: stable@vger.kernel.org # 4.9.x- Signed-off-by: Peter S. Housel Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a9507d5cfd5225cb6ee68e8de0cf7ffd0d49cdda Author: Martin Michlmayr Date: Sat Jun 10 11:40:04 2017 +0200 brcmfmac: Fix grammar issue in error message Fix grammar issue in error message about ISO3166. Signed-off-by: Martin Michlmayr Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69897f390b006948ca4cfa37174fa653a0ef7223 Author: Arend Van Spriel Date: Fri Jun 9 12:19:22 2017 +0100 brcmfmac: add scheduled scan support for specified BSSIDs Add support to handle scheduled scan request containing BSSID in the matchsets. The firmware can send event upon finding BSSIDs and SSIDs. To get these in one event the bit REPORT_SEPARATELY needed to be removed from the flags in brcmf_pno_config(). Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/fwil_types.h | 11 ++++ .../net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 58 ++++++++++++++++------ 2 files changed, 53 insertions(+), 16 deletions(-) commit 42596f761449595e3f0f18ce57c88472ad2d6160 Author: Arend Van Spriel Date: Fri Jun 9 12:19:21 2017 +0100 brcmfmac: add mutex to protect pno requests The request references kept in pno are accessed in user-space context and in firmware event handler context. As such we need to protect it with a lock. As both context allow sleep a mutex seems appropriate. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 33 ++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) commit efc2c1fa8e145b60a7805fa9b6c92ac0746fccc3 Author: Arend Van Spriel Date: Fri Jun 9 12:19:20 2017 +0100 brcmfmac: add support multi-scheduled scan This change adds support for multi-scheduled scan in the driver. It currently relies on g-scan support in firmware and will set struct wiphy::max_sched_scan_reqs accordingly. This is limited to 16 concurrent requests. The firmware currently has a limit of 64 channels that can be configured for all requests in total regardless whether there are duplicates. So if a request uses 35 channels there are 29 channels left for another request. When user-space does not specify any channels cfg80211 will add all channels defined by the wiphy instance to the request, which makes reaching the limit rather easy for dual-band devices. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 67 +++- .../broadcom/brcm80211/brcmfmac/cfg80211.h | 6 +- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 1 + .../wireless/broadcom/brcm80211/brcmfmac/debug.h | 2 + .../broadcom/brcm80211/brcmfmac/fwil_types.h | 32 +- .../net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 397 ++++++++++++++++++--- .../net/wireless/broadcom/brcm80211/brcmfmac/pno.h | 47 ++- 7 files changed, 463 insertions(+), 89 deletions(-) commit 8624c1f66f0fef640d0e044ddf1eb60e77e76df6 Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:31 2017 +0300 x86/mm: Add support for 5-level paging for KASLR With 5-level paging randomization happens on P4D level instead of PUD. Maximum amount of physical memory also bumped to 52-bits for 5-level paging. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-13-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/kaslr.c | 81 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 62 insertions(+), 19 deletions(-) commit 7e82ea946ae4d056859b19fcdec66425878395eb Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:30 2017 +0300 x86/mm: Make kernel_physical_mapping_init() support 5-level paging Populate additional page table level if CONFIG_X86_5LEVEL is enabled. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-12-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/init_64.c | 69 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 9 deletions(-) commit 141efad7d7fa4f4abb3a1b19f6a968d1b1f21903 Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:29 2017 +0300 x86/mm: Add sync_global_pgds() for configuration with 5-level paging This basically restores slightly modified version of original sync_global_pgds() which we had before folded p4d was introduced. The only modification is protection against 'addr' overflow. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-11-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/init_64.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 032370b9c81f44b3aaadf3115d550f4b6b5fa2b9 Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:28 2017 +0300 x86/boot/64: Add support of additional page table level during early boot This patch adds support for 5-level paging during early boot. It generalizes boot for 4- and 5-level paging on 64-bit systems with compile-time switch between them. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-10-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable_64.h | 2 ++ arch/x86/include/uapi/asm/processor-flags.h | 2 ++ arch/x86/kernel/head64.c | 48 +++++++++++++++++++++++++---- arch/x86/kernel/head_64.S | 26 ++++++++++++---- 4 files changed, 66 insertions(+), 12 deletions(-) commit 65ade2f872b474fa8a04c2d397783350326634e6 Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:27 2017 +0300 x86/boot/64: Rename init_level4_pgt and early_level4_pgt With CONFIG_X86_5LEVEL=y, level 4 is no longer top level of page tables. Let's give these variable more generic names: init_top_pgt and early_top_pgt. Signed-off-by: Kirill A. Shutemov Reviewed-by: Juergen Gross Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-9-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable.h | 2 +- arch/x86/include/asm/pgtable_64.h | 4 ++-- arch/x86/kernel/espfix_64.c | 2 +- arch/x86/kernel/head64.c | 19 +++++++++---------- arch/x86/kernel/head_64.S | 14 +++++++------- arch/x86/kernel/machine_kexec_64.c | 2 +- arch/x86/mm/dump_pagetables.c | 2 +- arch/x86/mm/kasan_init_64.c | 12 ++++++------ arch/x86/realmode/init.c | 2 +- arch/x86/xen/mmu_pv.c | 16 ++++++++-------- arch/x86/xen/xen-pvh.S | 2 +- 11 files changed, 38 insertions(+), 39 deletions(-) commit c88d71508e36b514413464bd2e01f96f34583a0e Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:26 2017 +0300 x86/boot/64: Rewrite startup_64() in C The patch write most of startup_64 logic in C. This is preparation for 5-level paging enabling. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-8-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/head64.c | 85 +++++++++++++++++++++++++++++++++++++++++- arch/x86/kernel/head_64.S | 95 ++--------------------------------------------- 2 files changed, 87 insertions(+), 93 deletions(-) commit 34bbb0009f3b7a5eef1ab34f14e5dbf7b8fc389c Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:25 2017 +0300 x86/boot/compressed: Enable 5-level paging during decompression stage We need to cover two basic cases: when bootloader left us in 32-bit mode and when bootloader enabled long mode. The patch implements unified codepath to enabled 5-level paging for both cases. It means case when we start in 32-bit mode, we first enable long mode with 4-level and then switch over to 5-level paging. Switching from 4-level to 5-level paging is not trivial. We cannot do it directly. Setting LA57 in long mode would trigger #GP. So we need to switch off long mode first and the then re-enable with 5-level paging. NOTE: The need of switching off long mode means we are in trouble if bootloader put us above 4G boundary. If bootloader wants to boot 5-level paging kernel, it has to put kernel below 4G or enable 5-level paging on it's own, so we could avoid the step. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-7-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 86 +++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) commit 919a02d1280a3845bac70e6b7891ca070f21a60a Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:24 2017 +0300 x86/boot/efi: Define __KERNEL32_CS GDT on 64-bit configurations We would need to switch temporarily to compatibility mode during booting with 5-level paging enabled. It would require 32-bit code segment descriptor. Signed-off-by: Kirill A. Shutemov Reviewed-by: Matt Fleming Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-6-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 4c94117c7fa1bea36a15157022dbe5efee474340 Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:23 2017 +0300 x86/boot/efi: Fix __KERNEL_CS definition of GDT entry on 64-bit configurations Define __KERNEL_CS GDT entry as long mode (.L=1, .D=0) on 64-bit configurations. Signed-off-by: Kirill A. Shutemov Reviewed-by: Matt Fleming Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-5-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f8fceacbd1eaebe67997798867d177b36a0a6219 Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:22 2017 +0300 x86/boot/efi: Cleanup initialization of GDT entries This is preparation for following patches without changing semantics of the code. Signed-off-by: Kirill A. Shutemov Reviewed-by: Matt Fleming Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit cbe0317bf10acf1f41811108ed0f9a316103c0f3 Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:21 2017 +0300 x86/asm: Fix comment in return_from_SYSCALL_64() On x86-64 __VIRTUAL_MASK_SHIFT depends on paging mode now. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e585513b76f7b05d08ca3fb250fed11f6ba46ee5 Author: Kirill A. Shutemov Date: Tue Jun 6 14:31:20 2017 +0300 x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation This patch provides all required callbacks required by the generic get_user_pages_fast() code and switches x86 over - and removes the platform specific implementation. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170606113133.22974-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/arm/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/x86/Kconfig | 3 + arch/x86/include/asm/mmu_context.h | 12 - arch/x86/include/asm/pgtable-3level.h | 47 ++++ arch/x86/include/asm/pgtable.h | 53 ++++ arch/x86/include/asm/pgtable_64.h | 16 +- arch/x86/mm/Makefile | 2 +- arch/x86/mm/gup.c | 496 ---------------------------------- mm/Kconfig | 2 +- mm/gup.c | 10 +- 12 files changed, 128 insertions(+), 519 deletions(-) commit 6c690ee1039b251e583fc65b28da30e97d6a7385 Author: Andy Lutomirski Date: Mon Jun 12 10:26:14 2017 -0700 x86/mm: Split read_cr3() into read_cr3_pa() and __read_cr3() The kernel has several code paths that read CR3. Most of them assume that CR3 contains the PGD's physical address, whereas some of them awkwardly use PHYSICAL_PAGE_MASK to mask off low bits. Add explicit mask macros for CR3 and convert all of the CR3 readers. This will keep them from breaking when PCID is enabled. Signed-off-by: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Cc: xen-devel Link: http://lkml.kernel.org/r/883f8fb121f4616c1c1427ad87350bb2f5ffeca1.1497288170.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/pagetable.c | 2 +- arch/x86/include/asm/efi.h | 2 +- arch/x86/include/asm/mmu_context.h | 4 ++-- arch/x86/include/asm/paravirt.h | 2 +- arch/x86/include/asm/processor-flags.h | 36 ++++++++++++++++++++++++++++++++++ arch/x86/include/asm/processor.h | 8 ++++++++ arch/x86/include/asm/special_insns.h | 10 +++++++--- arch/x86/include/asm/tlbflush.h | 4 ++-- arch/x86/kernel/head64.c | 3 ++- arch/x86/kernel/paravirt.c | 2 +- arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- arch/x86/kvm/vmx.c | 2 +- arch/x86/mm/fault.c | 10 +++++----- arch/x86/mm/ioremap.c | 2 +- arch/x86/platform/efi/efi_64.c | 4 ++-- arch/x86/platform/olpc/olpc-xo1-pm.c | 2 +- arch/x86/power/cpu.c | 2 +- arch/x86/power/hibernate_64.c | 3 ++- arch/x86/xen/mmu_pv.c | 6 +++--- 20 files changed, 79 insertions(+), 29 deletions(-) commit 3f365cf304ba3d316b3df2474af8d7df6edd2455 Merge: bbf79d2 252d2a4 Author: Ingo Molnar Date: Tue Jun 13 08:47:22 2017 +0200 Merge branch 'sched/urgent' into x86/mm, to pick up dependent fix Andy will need the following scheduler fix for the PCID series: 252d2a4117bc: sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off() So do a cross-merge. Signed-off-by: Ingo Molnar commit d4af6d933ccffd24286528f04d5c39e702c8580f Author: Frederic Weisbecker Date: Tue Jun 13 06:04:14 2017 +0200 nohz: Fix spurious warning when hrtimer and clockevent get out of sync The sanity check ensuring that the tick expiry cache (ts->next_tick) is actually in sync with the hardware clock (dev->next_event) makes the wrong assumption that the clock can't be programmed later than the hrtimer deadline. In fact the clock hardware can be programmed later on some conditions such as: * The hrtimer deadline is already in the past. * The hrtimer deadline is earlier than the minimum delay supported by the hardware. Such conditions can be met when we program the tick, for example if the last jiffies update hasn't been seen by the current CPU yet, we may program the hrtimer to a deadline that is earlier than ktime_get() because last_jiffies_update is our timestamp base to compute the next tick. As a result, we can randomly observe such warning: WARNING: CPU: 5 PID: 0 at kernel/time/tick-sched.c:794 tick_nohz_stop_sched_tick kernel/time/tick-sched.c:791 [inline] Call Trace: tick_nohz_irq_exit tick_irq_exit irq_exit exiting_irq smp_call_function_interrupt smp_call_function_single_interrupt call_function_single_interrupt Therefore, let's rather make sure that the tick expiry cache is sync'ed with the tick hrtimer deadline, against which it is not supposed to drift away. The clock hardware instead has its own will and can't be used as a reliable comparison point. Reported-and-tested-by: Sasha Levin Reported-and-tested-by: Abdul Haleem Signed-off-by: Frederic Weisbecker Cc: James Hartsock Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tim Wright Link: http://lkml.kernel.org/r/1497326654-14122-1-git-send-email-fweisbec@gmail.com [ Minor readability edit. ] Signed-off-by: Ingo Molnar kernel/time/tick-sched.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b1b4f2fe68393f80480545b5e67a50f7bda8e9a7 Author: Dou Liyang Date: Tue Jun 13 10:30:29 2017 +0800 x86/time: Make setup_default_timer_irq() static This function isn't used outside of time.c, so let's mark it static. Signed-off-by: Dou Liyang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1497321029-29049-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/include/asm/setup.h | 1 - arch/x86/kernel/time.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 567b64aaefc4ef9ae3af124ae0b13dc13a6804a8 Merge: 32c1431 6d48152 Author: Ingo Molnar Date: Tue Jun 13 08:40:03 2017 +0200 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU updates from Paul E. McKenney: "The largest feature of this series is shrinking and simplification, with the following diffstat summary: 79 files changed, 1496 insertions(+), 4211 deletions(-) In other words, this series represents a net reduction of more than 2700 lines of code." Signed-off-by: Ingo Molnar commit 7f8a01b77b5be996d0665d5eb7be8645f3ecb217 Merge: f5abd53 111b0cd Author: Takashi Iwai Date: Tue Jun 13 07:50:09 2017 +0200 Merge branch 'topic/seq-kconfig' into for-next commit 8f306cfe438372c7e490b0511a75e068e215d17b Author: Tero Kristo Date: Mon May 22 16:01:52 2017 +0300 Documentation: dt: Add TI SCI clock driver Add a clock implementation, TI SCI clock, that will hook to the common clock framework, and allow each clock to be controlled via TI SCI protocol. Signed-off-by: Tero Kristo Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/ti,sci-clk.txt | 37 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 38 insertions(+) commit 1080f7ec612569e47b747189b38e4b0aa9f14013 Author: James Smart Date: Thu Jun 1 21:07:11 2017 -0700 scsi: lpfc: update to revision to 11.4.0.0 Set lpfc driver revision to 11.4.0.0 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cf07f84dd32639394084b9d6794424587a38789 Author: James Smart Date: Thu Jun 1 21:07:10 2017 -0700 scsi: lpfc: Add auto EQ delay logic Administrator intervention is currently required to get good numbers when switching from running latency tests to IOPS tests. The configured interrupt coalescing values will greatly effect the results of these tests. Currently, the driver has a single coalescing value set by values of the module attribute. This patch changes the driver to support auto-configuration of the coalescing value based on the total number of outstanding IOs and average number of CQEs processed per interrupt for an EQ. Values are checked every 5 seconds. The driver defaults to the automatic selection. Automatic selection can be disabled by the new lpfc_auto_imax module_parameter. Older hardware can only change interrupt coalescing by mailbox command. Newer hardware supports change via a register. The patch support both. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 3 ++ drivers/scsi/lpfc/lpfc_attr.c | 20 +++++++- drivers/scsi/lpfc/lpfc_debugfs.c | 4 +- drivers/scsi/lpfc/lpfc_hw4.h | 14 ++++++ drivers/scsi/lpfc/lpfc_init.c | 104 ++++++++++++++++++++++++++++++++++++++- drivers/scsi/lpfc/lpfc_sli.c | 36 +++++++++++--- drivers/scsi/lpfc/lpfc_sli.h | 1 + drivers/scsi/lpfc/lpfc_sli4.h | 8 +-- 8 files changed, 177 insertions(+), 13 deletions(-) commit 78e1d2009f1c539a23f470728e530a3ce1d527e6 Author: James Smart Date: Thu Jun 1 21:07:09 2017 -0700 scsi: lpfc: Fix defects reported by Coverity Scan Addressed the following reported defects: ** CID 1411552: Control flow issues (MISSING_BREAK) /drivers/scsi/lpfc/lpfc_sli.c: 13259 in lpfc_sli4_nvmet_handle_rcqe() ** CID 1411553: Memory - illegal accesses (OVERRUN) /drivers/scsi/lpfc/lpfc_sli.c: 16218 in lpfc_fc_frame_check() ** CID 1411553: Memory - illegal accesses (OVERRUN) Overrunning array "lpfc_rctl_names" of 202 8-byte elements at element index 244 (byte offset 1952) using index "fc_hdr->fh_r_ctl" (which evaluates to 244). ** CID 1411554: Null pointer dereferences (REVERSE_INULL) /drivers/scsi/lpfc/lpfc_nvmet.c: 2131 in lpfc_nvmet_unsol_fcp_abort_cmp() ** CID 1411555: Memory - illegal accesses (UNINIT) /drivers/scsi/lpfc/lpfc_nvmet.c: 180 in lpfc_nvmet_ctxbuf_post() Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 10 ++++------ drivers/scsi/lpfc/lpfc_sli.c | 24 +++++++++--------------- 2 files changed, 13 insertions(+), 21 deletions(-) commit b57ab7469d2643ef1ff1fc5d82f5db22af60fc46 Author: James Smart Date: Thu Jun 1 21:07:08 2017 -0700 scsi: lpfc: Fix vports not logging into target vports cannot login to target. For vports, lpfc_nodelist is allocated for targets only on completion of GFF_ID command. Driver checks if lpfc_nodelist exists for target before sending GFF_ID. So, GFF_ID and PLOGI are not sent. As mentioned by the comment in lpfc_prep_node_fc4type() routine, do not send GFF_ID only if this NPortID is previously identified as FCP target. Send GFF_ID if it is a newly identified remote port from GID_FT response. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit dea37e82fa3423a6c8d1325d44e68b6d03892453 Author: James Smart Date: Thu Jun 1 21:07:07 2017 -0700 scsi: lpfc: Fix PRLI retry handling when target rejects it. The nvmet driver was rejecting the initiator's PRLI because its reg_rpi for the PLOGI was still outstanding. The initiator would resend the PRLI without delay and get the same answer. The PRLI retries would exhaust causing the nvme initiator to set the nvmet ndlp to UNMAPPED. The driver's lpfc_els_retry handler did not have a policy for an LS_RJT with explanation CMD_IN_PROGRESS for PRLI or NVME_PRLI. This caused the delay to remain at 0 but retry set 1. Fix: When the ELS response is LS_RJT, TPC and the command was PRLI or NVME_PRLI, just set the delay to 1000 mS to get a 1 second delay on the PRLI retry. This was enough to allow the REG_RPI to complete at the target. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit e92974f6cdaad36691b74045817b585a7b76988b Author: James Smart Date: Thu Jun 1 21:07:06 2017 -0700 scsi: lpfc: Null pointer dereference when log_verbose is set to 0xffffffff Kernel panic when log_verbose is set to 0xffffffff phba->pport is dereferenced before it is initialized Fix: Do not dereference phba->pport if it is NULL Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b83d005e63ba2383738c1818691e973761d1e860 Author: James Smart Date: Thu Jun 1 21:07:05 2017 -0700 scsi: lpfc: Fix System panic after loading the driver System panic with general protection fault during driver load The driver uses a static array sli4_hba.handler_name to store the irq handler names. If the io_channel_irqs exceeds the pre-allocated size (32+1), then the driver will overwrite other fields of sli4_hba. Fix: Dynamically allocate handler_name. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 11 ++++++----- drivers/scsi/lpfc/lpfc_sli4.h | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) commit ecbb227e635a61f751e8c8ad1c585a0c4ed11de1 Author: James Smart Date: Thu Jun 1 21:07:04 2017 -0700 scsi: lpfc: Fix crash on powering off BFS VM with passthrough device Null pointer dereference when BFS VM is powered off The driver incorrectly uses sli3_ring on SLI-4 adapters Use the correct ring structure based on sli_rev Signed-off-by: Dick Kennedy Signed-off-by: James Smart Tested-by: Raphael Silva Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 522dceeb62ded1a7b538d2f1f61cc69a1402537d Author: James Smart Date: Thu Jun 1 21:07:03 2017 -0700 scsi: lpfc: Fix return value of board_mode store routine in case of online failure On hbacmd reset failure, observing wrong string "nline" in kernel log. On failure, non negative value (1) is returned from sysfs store routine. It is interpreted as count by kernel and store routine is called again with the remaining characters as input. Fix: Return negative error code (-EIO) in case of failure. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 2 ++ 1 file changed, 2 insertions(+) commit 2cee7808004b33bd5dc75fccd8d145b5e208ef93 Author: James Smart Date: Thu Jun 1 21:07:02 2017 -0700 scsi: lpfc: Fix counters so outstandng NVME IO count is accurate NVME FC counters don't reflect actual results Since counters are not atomic, or protected by a lock, the values often get screwed up. Make them atomic, like NVMET. Fix up sysfs and debugfs display accordingly Added Outstanding IOs to stats display Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 20 ++++++++++---------- drivers/scsi/lpfc/lpfc_attr.c | 32 +++++++++++++++++++++----------- drivers/scsi/lpfc/lpfc_debugfs.c | 30 +++++++++++++++++++++--------- drivers/scsi/lpfc/lpfc_init.c | 10 ++++++++++ drivers/scsi/lpfc/lpfc_nvme.c | 19 +++++++++++++------ drivers/scsi/lpfc/lpfc_scsi.c | 19 ++++++++++++++----- 6 files changed, 89 insertions(+), 41 deletions(-) commit 14041bd170c28f652a91f6ac343acbabfdf1ef4b Author: James Smart Date: Thu Jun 1 21:07:01 2017 -0700 scsi: lpfc: Fix Port going offline after multiple resets. Observing lpfc port down after issuing hbacmd reset command Failure in posting SGL buffers. If there is only one SGL buffer and rrq is valid for its XRI, we are rightly returning NULL but not adding the buffer back to the SGL list. So, number of buffers become less than total count and repost fails during reset. Add SGL buffer back to list before returning NULL. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 1 + 1 file changed, 1 insertion(+) commit 6599e12428a8b3b182e91818cb7b73ab29e7daff Author: James Smart Date: Thu Jun 1 21:07:00 2017 -0700 scsi: lpfc: Fix nvmet node ref count handling When unloading the driver, the NVMET driver would wait the full 30 seconds for its UNMAPPED initiator node to get removed before continuing with the unload process. NVMEI worked correctly. For each rport put into UNMAPPED or MAPPED state by NVMET, the driver puts a reference on the NDLP. The difference is that NVMEI has a unregister call for its rports and the extra reference is removed in the unregister process. For NVMET, the driver has to remove the reference explicitly when dropping out of UNMAPPED or MAPPED because there is no unregister call. Add a call to lpfc_nlp_put on the ndlp when NVMET and the old state was UNMAPPED or MAPPED. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hbadisc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 92721c3b97126a712af221635407251e42e58b60 Author: James Smart Date: Thu Jun 1 21:06:59 2017 -0700 scsi: lpfc: Fix Lun Priority level shown as NA Lun Priority level shown as NA Remote port is not getting registered for nameserver and fdmi. Due to which dfc SendCTPassThru cmd is failing. Made changes to register the remote port for both. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hbadisc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ce1b591c5be11fbe053f009837eccf0c633245f0 Author: James Smart Date: Thu Jun 1 21:06:58 2017 -0700 scsi: lpfc: Add changes to assist in NVMET debugging Inconsistent error messages and context state checks Context state sanity checks were not accurate or inconsistent in the code paths. Separated LS context states from FCP. Added and modified context state sanity checks. Use context state to determine if a sol or unsol ABORT is needed. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 208 ++++++++++++++++++++++++++++------------- drivers/scsi/lpfc/lpfc_nvmet.h | 14 +-- 2 files changed, 151 insertions(+), 71 deletions(-) commit 7d790f04d7e4759da238cc6c46796f917af4cec2 Author: James Smart Date: Thu Jun 1 21:06:57 2017 -0700 scsi: lpfc: Fix nvme port role handling in sysfs and debugfs handlers. While debugging Devloss and recovery, debugfs and sysfs were found to not show the NVME port roles consistently. The port role FC_PORT_ROLE_NVME_DISCOVERY was added with the devloss bringup and the other issues were just oversight. Add NVME Target and DISCSRVC to debugfs nodeinfo and sysfs nvme info handlers. The full port role was added to the NVME data only not the generic nodelist. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 22 ++++++++++------------ drivers/scsi/lpfc/lpfc_debugfs.c | 32 ++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 26 deletions(-) commit 80cc004393619a1b3a17aaf4a9e55c5b9f4fc3c1 Author: James Smart Date: Thu Jun 1 21:06:56 2017 -0700 scsi: lpfc: Fix transition nvme-i rport handling to nport only. As the devloss API was implemented in the nvmei driver, an evaluation of the nvme transport and the lpfc driver showed dual management of the rports. This creates a bug possibility when the thread count and SAN size increases. The nvmei driver code was based on a very early transport and was not revisited until the devloss API was introduced. Remove the listhead in the driver's rport data structure and the listhead in the driver's lport data structure. Remove all rport_list traversal. Convert the driver to use the nrport (nvme rport) pointer that is now NULL or nonNULL depending on a devloss action. Convert debugfs and nvme_info in sysfs to use the fc_nodes list in the vport. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 11 ++++++----- drivers/scsi/lpfc/lpfc_debugfs.c | 10 +++++----- drivers/scsi/lpfc/lpfc_nvme.c | 18 ------------------ drivers/scsi/lpfc/lpfc_nvme.h | 2 -- 4 files changed, 11 insertions(+), 30 deletions(-) commit 7a06dcd3f8b0d8a89be4c0c573ecf1a1d720474e Author: James Smart Date: Thu Jun 1 21:06:55 2017 -0700 scsi: lpfc: Add nvme initiator devloss support Add nvme initiator devloss support The existing implementation was based on no devloss behavior in the transport (e.g. immediate teardown) so code didn't properly handle delayed nvme rport device unregister calls. In addition, the driver was not correctly cycling the rport port role for each register-unregister-reregister process. This patch does the following: Rework the code to properly handle rport device unregister calls and potential re-allocation of the remoteport structure if the port comes back in under dev_loss_tmo. Correct code that was incorrectly cycling the rport port role for each register-unregister-reregister process. Prep the code to enable calling the nvme_fc transport api to dynamically update dev_loss_tmo when the scsi sysfs interface changes it. Memset the rpinfo structure in the registration call to enforce "accept nvme transport defaults" in the registration call. Driver parameters do influence the dev_loss_tmo transport setting dynamically. Simplifies the register function: the driver was incorrectly searching its local rport list to determine resume or new semantics, which is not valid as the transport already handles this. The rport was resumed if the rport handed back matches the ndlp->nrport pointer. Otherwise, devloss fired and the ndlp's nrport is NULL. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 7 ++- drivers/scsi/lpfc/lpfc_nvme.c | 141 ++++++++++++++++-------------------------- 2 files changed, 57 insertions(+), 91 deletions(-) commit 32eebb317fba6f29dfd3be677b0fc2b63fa08131 Author: Christophe JAILLET Date: Sun Jun 11 08:16:04 2017 +0200 scsi: qedf: Merge a few quoted strings split across lines Merge some quoted strings to improve readability and to save some lines of code. Signed-off-by: Christophe JAILLET Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit c4d6ffc8465f4225e79ee58275fa1a61def991cc Author: Christophe JAILLET Date: Sun Jun 11 08:16:03 2017 +0200 scsi: qedf: Use 'dma_zalloc_coherent' to reduce code verbosity. Replace some 'dma_alloc_coherent+memset' by some quivalent 'dma_zalloc_coherent' in order to reduce code verbosity Signed-off-by: Christophe JAILLET Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 3a240b21b5ccb77fcbece7a617f333cd31097776 Author: Christophe JAILLET Date: Sun Jun 11 08:16:02 2017 +0200 scsi: qedf: Fix a return value in case of error in 'qedf_alloc_global_queues' We should return -ENOMEM in case of memory allocation error, as done elsewhere in this function. [mkp: fixed typo] Fixes: 61d8658b4a435 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.") Signed-off-by: Christophe JAILLET Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 249cf320bd5dd3490252cb9f3cdef41f7d1caacc Author: Binoy Jayan Date: Thu Jun 8 15:37:31 2017 +0530 scsi: esas2r: Replace semaphore fs_api_semaphore with mutex The semaphore 'fs_api_semaphore' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r.h | 2 +- drivers/scsi/esas2r/esas2r_init.c | 2 +- drivers/scsi/esas2r/esas2r_ioctl.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit 74d2fd488d77ab4ff15a7fe0b3b6900f2382b42b Author: Binoy Jayan Date: Thu Jun 8 15:37:30 2017 +0530 scsi: esas2r: Replace semaphore fm_api_semaphore with mutex The semaphore 'fm_api_semaphore' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r.h | 2 +- drivers/scsi/esas2r/esas2r_init.c | 2 +- drivers/scsi/esas2r/esas2r_ioctl.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 4fae52b5a30b6f2cfc8ecf22524cedc1ece5b774 Author: Himanshu Madhani Date: Tue Jun 6 13:55:23 2017 -0700 scsi: qla2xxx: Fix compile warning Fixes following 0-day kernel build warnings: drivers/scsi/qla2xxx/qla_init.c:6407:50: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=] drivers/scsi/qla2xxx/qla_init.c:6709:50: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=] Fixes: b95b9452aacf ("scsi: qla2xxx: Fix crash due to mismatch mumber of Q-pair creation for Multi queue") Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fe4d5cec8eda7b1404eec8664bc165d6d2539176 Author: Colin Ian King Date: Mon Jun 5 18:29:58 2017 +0100 scsi: qla2xxx: remove redundant null check on tgt An earlier commit ed7fb808477b846bb2 ("scsi: qla2xxx: Remove redundant wait when target is stopped.") removed a null check on ha->tgt.tgt_ops and replaced it with a new check that null checked tgt, thus making the subsequent null check on tgt totally redundant. Remove it. Detected by CoverityScan, CID#1440452 ("Logically Dead Code") Signed-off-by: Colin Ian King Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 6 ------ 1 file changed, 6 deletions(-) commit 2c87ea97ce6a53fc8c98a796b34fed5b84aeff6b Author: Adrian Hunter Date: Tue Jun 6 14:35:31 2017 +0300 scsi: ufshcd-pci: Add Intel CNL support Add PCI id and variant ops for Intel CNL UFS host controller. Signed-off-by: Adrian Hunter Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd-pci.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 7b57338eca85c65a36d6f4715b053ee403c8ed95 Author: Adrian Hunter Date: Tue Jun 6 14:35:30 2017 +0300 scsi: ufshcd-pci: Fix PM config Put PM functions under correct config options and use standard PM macros to set callbacks. Signed-off-by: Adrian Hunter Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd-pci.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 39aa23f98a6b9932d6ffa1483639aad865b7ba9a Author: Colin Ian King Date: Thu May 18 10:35:24 2017 +0100 scsi: lpfc: make a couple of functions static functions lpfc_nvmet_cleanup_io_context and lpfc_nvmet_setup_io_context can be made static as they do not need to be in global scope. Cleans up sparse warnings: "warning: symbol 'lpfc_nvmet_cleanup_io_context' was not declared. Should it be static?" "warning: symbol 'lpfc_nvmet_setup_io_context' was not declared. Should it be static?" Signed-off-by: Colin Ian King Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7de50da1479156d76c0dd3c29234a44bc4845f0 Author: Bart Van Assche Date: Fri Jun 2 14:22:03 2017 -0700 scsi: xen-scsifront: Remove code that zeroes driver-private command data Since the SCSI core zeroes driver-private command data, remove that code from the xen-scsifront driver. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Juergen Gross Reviewed-by: Christoph Hellwig Cc: xen-devel@lists.xenproject.org Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/xen-scsifront.c | 1 - 1 file changed, 1 deletion(-) commit c2bb87318baa6c012432eda6f08290d8623538ee Author: Bart Van Assche Date: Fri Jun 2 14:22:02 2017 -0700 scsi: virtio_scsi: Remove code that zeroes driver-private command data Since the SCSI core zeroes driver-private command data, remove that code from the virtio driver. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Michael S. Tsirkin Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/virtio_scsi.c | 1 - 1 file changed, 1 deletion(-) commit c3006a9264681fd0551543f526758208792319d6 Author: Bart Van Assche Date: Fri Jun 2 14:22:01 2017 -0700 scsi: snic: Remove code that zeroes driver-private command data Since the SCSI core zeroes driver-private command data, remove that code from the snic driver. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Narsimhulu Musini Reviewed-by: Christoph Hellwig Cc: Sesidhar Baddela Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/snic/snic_scsi.c | 2 -- 1 file changed, 2 deletions(-) commit 08f784364fef627650e471c7ae342f1da1c57bbf Author: Bart Van Assche Date: Fri Jun 2 14:22:00 2017 -0700 scsi: Make scsi_mq_prep_fn() call scsi_init_command() This patch reduces code duplication. There are two functional changes in this patch: - It causes scsi_mq_prep_fn() to clear driver-private command data, just like the already upstream commit 1bad6c4a57ef ("scsi: zero per-cmd private driver data for each MQ I/O"). - The initialization of .prot_sdb is moved from scsi_mq_prep_fn() into scsi_init_request(). [mkp: applied by hand] Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit be4c186c80113f95a5946594687a8e70f876e857 Author: Bart Van Assche Date: Fri Jun 2 14:21:59 2017 -0700 scsi: Introduce scsi_mq_sgl_size() This patch does not change any functionality but makes the next patch easier to read. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 2dd6fb5957a75cd926089bb4434449e6181ca5c5 Author: Bart Van Assche Date: Fri Jun 2 14:21:58 2017 -0700 scsi: Only add commands to the device command list if required by the LLD Just like for the scsi-mq code path, in the single queue SCSI code path only add commands to the per-device command list if required by the SCSI LLD. This patch will make it easier to merge the single-queue and multiqueue command initialization code. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 9 +-------- drivers/scsi/scsi_lib.c | 52 +++++++++++++++++++++++++++++------------------- drivers/scsi/scsi_priv.h | 2 ++ 3 files changed, 35 insertions(+), 28 deletions(-) commit 255ee9320e5dc46173bb94dbcd68e32f11fc10a9 Author: Bart Van Assche Date: Fri Jun 2 14:21:57 2017 -0700 scsi: Make __scsi_remove_device go straight from BLOCKED to DEL If a device is blocked, make __scsi_remove_device() cause it to transition to the DEL state. This means that all the commands issued in .shutdown() will error in the mid-layer, thus making the removal proceed without being stopped. This patch is a slightly modified version of a patch from James Bottomley. This patch avoids that the following lockup occurs: Call Trace: schedule+0x35/0x80 schedule_timeout+0x237/0x2d0 io_schedule_timeout+0xa6/0x110 wait_for_completion_io+0xa3/0x110 blk_execute_rq+0xdf/0x120 scsi_execute+0xce/0x150 [scsi_mod] scsi_execute_req_flags+0x8f/0xf0 [scsi_mod] sd_sync_cache+0xa9/0x190 [sd_mod] sd_shutdown+0x6a/0x100 [sd_mod] sd_remove+0x64/0xc0 [sd_mod] __device_release_driver+0x8d/0x120 device_release_driver+0x1e/0x30 bus_remove_device+0xf9/0x170 device_del+0x127/0x240 __scsi_remove_device+0xc1/0xd0 [scsi_mod] scsi_forget_host+0x57/0x60 [scsi_mod] scsi_remove_host+0x72/0x110 [scsi_mod] srp_remove_work+0x8b/0x200 [ib_srp] Reported-by: Israel Rukshin Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: James Bottomley Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Benjamin Block Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 2 +- drivers/scsi/scsi_sysfs.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 66483a4a9f34427e3d6ec87d8e583f5d2a7cbb76 Author: Bart Van Assche Date: Fri Jun 2 14:21:56 2017 -0700 scsi: Introduce scsi_start_queue() This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Benjamin Block Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 25 +++++++++++++++---------- drivers/scsi/scsi_priv.h | 1 + 2 files changed, 16 insertions(+), 10 deletions(-) commit 0db6ca8a5e1ea585795db3643ec7d50fc8cb1aff Author: Bart Van Assche Date: Fri Jun 2 14:21:55 2017 -0700 scsi: Protect SCSI device state changes with a mutex Serializing SCSI device state changes avoids that two state changes can occur concurrently, e.g. the state changes in scsi_target_block() and __scsi_remove_device(). This serialization is essential to make patch "Make __scsi_remove_device go straight from BLOCKED to DEL" work reliably. Enable this mechanism for all scsi_target_*block() callers but not for the scsi_internal_device_unblock() calls from the mpt3sas driver because that driver can call scsi_internal_device_unblock() from atomic context. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 8 +++++++- drivers/scsi/scsi_lib.c | 27 +++++++++++++++++++++------ drivers/scsi/scsi_scan.c | 16 +++++++++------- drivers/scsi/scsi_sysfs.c | 24 +++++++++++++++++++----- drivers/scsi/scsi_transport_srp.c | 7 ++++--- drivers/scsi/sd.c | 7 +++++-- include/scsi/scsi_device.h | 1 + 7 files changed, 66 insertions(+), 24 deletions(-) commit 43f7571be077ee4673466cbcba115427d68440e1 Author: Bart Van Assche Date: Fri Jun 2 14:21:54 2017 -0700 scsi: Create two versions of scsi_internal_device_unblock() This will make it easier to serialize SCSI device state changes through a mutex. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Cc: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- drivers/scsi/scsi_lib.c | 46 +++++++++++++++++++++++++----------- include/scsi/scsi_device.h | 4 ++-- 3 files changed, 36 insertions(+), 18 deletions(-) commit 551eb598e5ea52996eb821f43740496a78a97b68 Author: Bart Van Assche Date: Fri Jun 2 14:21:53 2017 -0700 scsi: Split scsi_internal_device_block() Instead of passing a "wait" argument to scsi_internal_device_block(), split this function into a function that waits and a function that doesn't wait. This will make it easier to serialize SCSI device state changes through a mutex. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Cc: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +- drivers/scsi/scsi_lib.c | 73 +++++++++++++++++++++++------------- include/scsi/scsi_device.h | 2 +- 3 files changed, 50 insertions(+), 29 deletions(-) commit 8e6882545d8c06f99e9e117741cc87f3338b0bef Author: Bart Van Assche Date: Fri Jun 2 14:21:52 2017 -0700 scsi: Avoid that scsi_exit_rq() triggers a use-after-free Dereferencing shost from scsi_exit_rq() is not safe because the SCSI host may already have been freed when scsi_exit_rq() is called. Increasing the shost reference count in scsi_init_rq() and dropping that reference in scsi_exit_rq() is nontrivial since scsi_host_dev_release() may sleep and since scsi_exit_rq() may be called from interrupt context. Since scsi_exit_rq() only needs a single bit from shost, copy that bit into struct scsi_cmnd. Reported-by: Scott Bauer Fixes: e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Scott Bauer Cc: Jan Kara Cc: Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 47 +++++++++++++++++++++++++++++------------------ include/scsi/scsi_cmnd.h | 1 + 2 files changed, 30 insertions(+), 18 deletions(-) commit 896f6966fc815abe71f85fb26f0193875df8a035 Author: Jia-Ju Bai Date: Wed May 31 10:56:56 2017 +0800 scsi: megaraid: Fix a sleep-in-atomic bug The driver may sleep under a spin lock, and the function call path is: mraid_mm_attach_buf (acquire the lock by spin_lock_irqsave) pci_pool_alloc(GFP_KERNEL) --> may sleep To fix it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". [mkp: fixed whitespace] Signed-off-by: Jia-Ju Bai Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 566ec9ad315b46e7056472f4cd1d1b79bbad62da Author: Szymon Mielczarek Date: Mon Jun 5 11:36:54 2017 +0300 scsi: ufs: Tidy clocks list head usage Move the initialization of clocks list head to ufshcd_alloc_host() so that every driver doesn't have to do it. Remove checks for the list head being NULL because that is not possible. Signed-off-by: Szymon Mielczarek Signed-off-by: Adrian Hunter Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 -- drivers/scsi/ufs/ufshcd-pci.c | 2 -- drivers/scsi/ufs/ufshcd-pltfrm.c | 2 -- drivers/scsi/ufs/ufshcd.c | 12 +++++++----- 4 files changed, 7 insertions(+), 11 deletions(-) commit 6ff8a3b2a1e9ad5f0b559e7ef3b991918ef1caf9 Author: Michael Schmitz Date: Mon Jun 5 19:37:59 2017 +1200 scsi: atari_scsi: Use m68k_realnum_memory for FastRAM test m68k_num_memory is unsuitable to test for the presence of FastRAM on CT60 if the kernel is located in FastRAM: in arch/m68k/mm/motorola.c the ST-RAM chunk is skipped and m68k_num_memory is decremented in this case. m68k_realnum_memory still contains the actual number of RAM chunks so use that. Signed-off-by: Michael Schmitz Tested-by: Christian T. Steigies Signed-off-by: Martin K. Petersen drivers/scsi/atari_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52eacd619c5ab611db3b193cb213e0e892d5984f Author: Corentin Labbe Date: Fri Jun 2 13:32:25 2017 +0200 scsi: qla2xxx: remove writeq/readq function definitions Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which already have them. Signed-off-by: Corentin Labbe Reviewed-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_nx.h | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 16a611154dc11d73dfa99ae2089a1f1ef45db7f8 Author: Dupuis, Chad Date: Fri Jun 2 12:02:05 2017 -0700 scsi: qedf: Check if sense buffer has been allocated during completion sc_cmd->sense_buffer is not guaranteed to be allocated so we need to sc_cmd->check if the pointer is NULL before trying to copy anything into it. Fixes the crash: [ 143.793176] [0000:00:00.0]:[qedf_eh_device_reset:626]: LUN RESET Issued... [ 143.802996] BUG: unable to handle kernel NULL pointer dereference at (null) [ 143.803063] IP: qedf_parse_fcp_rsp+0xe2/0x290 [qedf] [ 143.803077] PGD 0 [ 143.803078] P4D 0 [ 143.803103] Oops: 0002 [#1] SMP [ 143.803115] Modules linked in: msr(E) ebtable_filter(E) ebtables(E) ip6table_filter(E) ip6_tables(E) iptable_filter(E) ip_tables(E) x_tables(E) raw(E) scsi_transport_iscsi(E) br_netfilter(E) bridge(E) iscsi_ibft(E) iscsi_boot_sysfs(E) intel_rapl(E) sb_edac(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) kvm_intel(E) kvm(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) xfs(E) ghash_clmulni_intel(E) pcbc(E) aesni_intel(E) aes_x86_64(E) crypto_simd(E) ipmi_ssif(E) glue_helper(E) iTCO_wdt(E) iTCO_vendor_support(E) lpc_ich(E) ipmi_si(E) pcspkr(E) hpilo(E) ioatdma(E) cryptd(E) ipmi_devintf(E) hpwdt(E) mfd_core(E) shpchp(E) dca(E) thermal(E) pcc_cpufreq(E) ipmi_msghandler(E) acpi_cpufreq(E) af_packet(E) btrfs(E) xor(E) raid6_pq(E) sr_mod(E) cdrom(E) ata_generic(E) sd_mod(E) 8021q(E) garp(E) [ 143.803302] stp(E) llc(E) mrp(E) bnx2fc(E) cnic(E) uio(E) mgag200(E) ata_piix(E) i2c_algo_bit(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) ahci(E) fb_sys_fops(E) bnx2x(E) qedf(E) serio_raw(E) libahci(E) ttm(E) uhci_hcd(E) ehci_pci(E) qed(E) mdio(E) libcrc32c(E) ehci_hcd(E) crc32c_intel(E) drm(E) libata(E) usbcore(E) tg3(E) ptp(E) hpsa(E) pps_core(E) scsi_transport_sas(E) libphy(E) wmi(E) button(E) fcoe(E) libfcoe(E) libfc(E) scsi_transport_fc(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) autofs4(E) [ 143.803438] CPU: 31 PID: 494 Comm: kworker/31:2 Tainted: G E 4.12.0-rc1-69-default+ #1 [ 143.803461] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 08/20/2012 [ 143.803480] Workqueue: qedf_io_wq qedf_fp_io_handler [qedf] [ 143.803496] task: ffff8804181a0000 task.stack: ffffc90003b64000 [ 143.803514] RIP: 0010:qedf_parse_fcp_rsp+0xe2/0x290 [qedf] [ 143.803529] RSP: 0018:ffffc90003b67dc8 EFLAGS: 00010246 [ 143.803544] RAX: 0000000000000000 RBX: ffff880401abdd48 RCX: 000000000000000c [ 143.803563] RDX: 0000000000000060 RSI: ffffffffa039c740 RDI: 0000000000000000 [ 143.803581] RBP: ffffc90003b67df0 R08: ffffffffa039dba8 R09: 0000000000000000 [ 143.803600] R10: 0000000000000000 R11: 0000000000000018 R12: 0000000000000000 [ 143.803619] R13: ffff88040ac80bc8 R14: 0000000000000008 R15: ffff880407c14008 [ 143.803638] FS: 0000000000000000(0000) GS:ffff88043f7c0000(0000) knlGS:0000000000000000 [ 143.804360] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 143.805065] CR2: 0000000000000000 CR3: 0000000001c09000 CR4: 00000000000406e0 [ 143.805753] Call Trace: [ 143.806436] qedf_process_tmf_compl+0x19/0x30 [qedf] [ 143.807124] qedf_process_cqe+0x265/0x280 [qedf] [ 143.807800] qedf_fp_io_handler+0x26/0x60 [qedf] [ 143.808469] process_one_work+0x138/0x370 [ 143.809133] worker_thread+0x4d/0x3b0 [ 143.809797] kthread+0x109/0x140 [ 143.810451] ? rescuer_thread+0x320/0x320 [ 143.811100] ? kthread_park+0x60/0x60 [ 143.811743] ret_from_fork+0x2c/0x40 Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_io.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit d63b328f0904a1e04368de5cf1d27c0f2d0bc554 Author: Quinn Tran Date: Fri Jun 2 09:12:07 2017 -0700 scsi: qla2xxx: Remove extra register read Remove extra register read in each interrupt processing to improve performance. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_iocb.c | 4 +++- drivers/scsi/qla2xxx/qla_target.c | 11 ++--------- 2 files changed, 5 insertions(+), 10 deletions(-) commit ba68a63561deb328e1ad0940cea0932e8962ef0e Author: Quinn Tran Date: Fri Jun 2 09:12:06 2017 -0700 scsi: qla2xxx: Remove unused irq_cmd_count field. When driver is unloaded, all sessions are torn down, all commmands are flushed, chip is reset to ensure there is no knowledge of target mode in ISP. The irq_cmd_count field was used to make sure all commands are processed on top of that. The irq_cmd_count is now redundant and not needed. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 9 +-------- drivers/scsi/qla2xxx/qla_target.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) commit 2da52737521a2a65eb9b2323a0748047a454e86c Author: Quinn Tran Date: Fri Jun 2 09:12:05 2017 -0700 scsi: qla2xxx: Accelerate SCSI BUSY status generation in target mode Accelerate generation of SCSI busy to let initiators slow down when target is running low in resources. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 13 +++++++++++-- drivers/scsi/qla2xxx/qla_mbx.c | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) commit 3a33dc95b00be33f150bc357ab67331cdba7fc88 Author: Quinn Tran Date: Fri Jun 2 09:12:04 2017 -0700 scsi: qla2xxx: Remove redundant wait when target is stopped. Current code already destroy all target sessions when target Mode is stopped. Target core would waits for all commands that belong to each session to purge. The extra wait for interrupts to settle down is not relevant. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 99e1b683c4be3fee5cff824af18411cf8cc568d0 Author: Quinn Tran Date: Fri Jun 2 09:12:03 2017 -0700 scsi: qla2xxx: Add ql2xiniexchg parameter Previously, the ql2xexchoffld module parameter was used to control the max number of exchanges to be offload onto host memory. Module parameter ql_dm_tgt_ex_pct was used to control the percentage of exchanges allocated to the Target side. With this patch, module parameter ql_dm_tgt_ex_pct is no longer used to control exchanges for the driver. New module parameter ql2xiniexchg is added to control exchanges between target mode and initiator mode. With the updated module parameters, users can control the exact number of exchanges for either Initiator or Target. The exchange offload feature will be automatically enabled when the total number of exchanges exceeds 2048 limit. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 6 +- drivers/scsi/qla2xxx/qla_gbl.h | 3 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_inline.h | 16 +++++ drivers/scsi/qla2xxx/qla_mbx.c | 14 ++-- drivers/scsi/qla2xxx/qla_os.c | 136 +++++++++++++++++++++++++++----------- drivers/scsi/qla2xxx/qla_target.c | 48 +++----------- 7 files changed, 140 insertions(+), 85 deletions(-) commit f7e761f56c711907ccf342532120f826d5ccff3f Author: Quinn Tran Date: Fri Jun 2 09:12:02 2017 -0700 scsi: qla2xxx: Turn on FW option for exchange check Tell FW to track exchange/cmd state to prevent driver from using stale exchange or exchange that is not meant for this command. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 18 ++++++++++++++++++ drivers/scsi/qla2xxx/qla_target.c | 26 +++++++++++++++----------- drivers/scsi/qla2xxx/qla_target.h | 2 +- 3 files changed, 34 insertions(+), 12 deletions(-) commit 83548fe2fcbb78a233e8156feff4e167f1d0831e Author: Quinn Tran Date: Fri Jun 2 09:12:01 2017 -0700 scsi: qla2xxx: Cleanup debug message IDs Assign unique id to all traces and logs for debug purpose. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 2 +- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_dfs.c | 8 +- drivers/scsi/qla2xxx/qla_gs.c | 100 +++++++------ drivers/scsi/qla2xxx/qla_init.c | 290 +++++++++++++++++++------------------- drivers/scsi/qla2xxx/qla_isr.c | 18 +-- drivers/scsi/qla2xxx/qla_mbx.c | 52 +++---- drivers/scsi/qla2xxx/qla_os.c | 30 ++-- drivers/scsi/qla2xxx/qla_target.c | 217 ++++++++++++++-------------- 10 files changed, 352 insertions(+), 369 deletions(-) commit b98ae0d748dbc80016c5cc2e926f33648d83353d Author: Quinn Tran Date: Fri Jun 2 09:12:00 2017 -0700 scsi: qla2xxx: Fix name server relogin Name server login is normally handle by FW. In some rare case where one of the switches is being updated, name server login could get affected. Trigger relogin to name server when driver detects this condition. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 2 ++ drivers/scsi/qla2xxx/qla_gs.c | 20 ++++++++++++++++++++ drivers/scsi/qla2xxx/qla_init.c | 38 +++++++++++++++++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_isr.c | 17 +++++++++++++++++ 4 files changed, 76 insertions(+), 1 deletion(-) commit f775bd14e44d23b1761ecdac637164654680111e Author: Quinn Tran Date: Fri Jun 2 09:11:59 2017 -0700 scsi: qla2xxx: Convert 32-bit LUN usage to 64-bit Acked-by: Nicholas Bellinger Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 32 +++++++++++++++----------------- drivers/scsi/qla2xxx/qla_target.h | 4 ++-- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +- 3 files changed, 18 insertions(+), 20 deletions(-) commit ba1758919906b1f04f239532e03b9fc5b49f3aa1 Author: Sawan Chandak Date: Fri Jun 2 09:11:58 2017 -0700 scsi: qla2xxx: Use flag PFLG_DISCONNECTED. There is already flag defined PFLG_DISCONNECTED, which is set for PCI or register disconnect error condition. There is no need to have flag PCI_ERR, which has same purpose. Remove use of PCI_ERR flag and use PFLG_DISCONNECTED flag during error condition. Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_mbx.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) commit 694833ee00c4c56b3fc902515b7685a4186fe502 Author: Quinn Tran Date: Fri Jun 2 09:11:57 2017 -0700 scsi: tcm_qla2xxx: Do not allow aborted cmd to advance. In case of hardware queue full, commands can loop between TCM stack and tcm_qla2xx shim layers for retry. While command is waiting for retry, task mgmt can get ahead and abort the cmmand that encountered queue full condition. Fix this by dropping the command, if task mgmt has already started the command free process. Acked-by: Nicholas Bellinger Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/tcm_qla2xxx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 66ee0fece9a0b91f59a7eb8dd39808a0ef5db02b Author: Quinn Tran Date: Fri Jun 2 09:11:56 2017 -0700 scsi: qla2xxx: Fix path recovery If the port is moved/changed, current code would trigger a deletion. If the port is already deleted, then do relogin. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gs.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 383a298b2065a6f39f4ab2c33d84620ccad578f9 Author: Joe Carnuccio Date: Fri Jun 2 09:11:55 2017 -0700 scsi: qla2xxx: Retain loop test for fwdump length exceeding buffer length Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 8 ++++---- drivers/scsi/qla2xxx/qla_tmpl.c | 16 +++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) commit 8b631d87ba55f43dbd29b9e8b477301539c08815 Author: Quinn Tran Date: Fri Jun 2 09:11:54 2017 -0700 scsi: qla2xxx: Replace usage of spin_lock with spin_lock_irqsave Convert usage of spin_lock to spin_lock_irqsave because qla2xxx driver can access all the data structures in an interrupt context. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 3c4810ffdc8e4f34d387f59baf0abefcfa4ada6a Author: Quinn Tran Date: Fri Jun 2 09:11:53 2017 -0700 scsi: qla2xxx: Allow ABTS, PURX, RIDA on ATIOQ for ISP83XX/27XX Driver added mechanism to move ABTS/PUREX/RIDA mailbox to ATIO queue as part of commit id 41dc529a4602ac737020f423f84686a81de38e6d ("qla2xxx: Improve RSCN handling in driver"). This patch adds a check to only allow ABTS/PURX/RIDA to be moved to ATIO Queue for ISP83XX and ISP27XX. Cc: # 4.11 Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e2e2c7da4b7b1c45479483e17bd8fbad628ffad1 Author: Chad Dupuis Date: Wed May 31 06:34:02 2017 -0700 scsi: qedf: Update version number to 8.18.22.0. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6088cfaafba205139f57aaffd8480c2f8b141dca Author: Chad Dupuis Date: Wed May 31 06:34:01 2017 -0700 scsi: qedf: Add change_queue_depth member to scsi_host_template(). Add the change_queue_depth member to our SCSI host template so the queue depth of devices attached to qedf can be changed dynamically. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 1 + 1 file changed, 1 insertion(+) commit a7746f1e01d05066135a3c3ac7e8a857cab68ba7 Author: Chad Dupuis Date: Wed May 31 06:34:00 2017 -0700 scsi: qedf: Change cmd_per_lun in scsi_host_template to 32 to increase performance. Increase the default number of commands that the driver tells the SCSI mid-layer it can do to increase the default performance of the driver. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7e8d57be143523189543dfaf183af92b4c85204 Author: Chad Dupuis Date: Wed May 31 06:33:59 2017 -0700 scsi: qedf: Move some prints to a debug level so they do not print when no debugging is enabled. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 57a3548a0164299d548b534806e436e5544997ea Author: Chad Dupuis Date: Wed May 31 06:33:58 2017 -0700 scsi: qedf: Fixup unnecessary parantheses around test_bit operations. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_els.c | 6 +++--- drivers/scsi/qedf/qedf_io.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 384d5a9b412ea0fb60f999c13d39a1f007d87730 Author: Chad Dupuis Date: Wed May 31 06:33:57 2017 -0700 scsi: qedf: Add non-offload receive filters. Drop invalid or unexpected FCoE frames that come into the non-offload path since the FCoE firmware would not do the filtering for us. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit b09fdc3aac6acc20587713e306692b12d31a2008 Author: Chad Dupuis Date: Wed May 31 06:33:56 2017 -0700 scsi: qedf: Add bus_reset No-op. We need to add a bus reset no-op as without it some of the LUNs attached to a vport may go offline when the error handler escalates to host reset due to not having a bus reset handler in the driver. What happens is we escalate to host reset which does a soft link down/link up to reset the adapter. However with multiple vports attached it's been observed that if the vports do log back into the target within 5 seconds, the SCSI layer offlines the devices most likely due to a TUR timing out to verify that the device is online. Adding a bus reset handler will cause the TUR to be sent after the bus reset handler where the devices will still be online if the bus reset is initiated by sg_reset (which is the case in the test that was failing). The bus reset will succeed and not needlessly bring the device offline/online. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5cf446d2aa4b92a1c1f079416e17fa9edee76ef8 Author: Chad Dupuis Date: Wed May 31 06:33:55 2017 -0700 scsi: qedf: Use same logic for SCSI host reset and FC lip_reset. We should be using the same logic to do a soft reset of the FCoE function whether it is initiated via sg_reset or the fc_host issue_lip attribute. Refactor the host reset and fcoe reset handlers to use the preferred logic which is currently contained in qedf_eh_host_reset(). Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) commit 2b82a62f52e647944446a3b85a4131b279c078fb Author: Chad Dupuis Date: Wed May 31 06:33:54 2017 -0700 scsi: qedf: Set qed logging level to QED_LEVEL_NOTICE. Reduce the logging level we set for qed messages pertaining to this PCI function so that unnecessary messages are not printed in the kernel message log. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c07c54b0cbb740dbc2f7fba247049bd9e25ac08e Author: Chad Dupuis Date: Wed May 31 06:33:53 2017 -0700 scsi: qedf: Add fka_period SCSI host attribute to show fip keep alive period. Expose this information for interested applications. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_attr.c | 57 ++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 19 deletions(-) commit ff34e8e84fbbd3e3f31a4d54cc0501aeaa155d43 Author: Chad Dupuis Date: Wed May 31 06:33:52 2017 -0700 scsi: qedf: Check that fcport is offloaded before dereferencing pointers in initiate_abts|cleanup. If an fcport is not offloaded then the members of the qedf_rport struct are undefined which may cause a system crash. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_io.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 53c51adbe6f83eba94fd39000f98cf4235a89e4c Author: Chad Dupuis Date: Wed May 31 06:33:51 2017 -0700 scsi: qedf: Look at all descriptors when processing a clear virtual link. If there are multiple descriptors for a particular type in a clear virtual link we receive, we will not process it correctly but rather take the last value. This can cause us not to not flap the virtual link as the value from the descriptors that we compare against the our stored FCF or fc_lport values may not match. Change this to do a comparison when processing the each descriptor instead of at the end and then set a bool if we need to do the reset. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_fip.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 914fff102e00455bb867871e612b65524839d271 Author: Chad Dupuis Date: Wed May 31 06:33:50 2017 -0700 scsi: qedf: Honor qed_ops->common->set_fp_int() return code. We need to check the return code the set_fp_int() callback in case we were not allocated any fastpath interrupts or there was an error setting up the fastpath interrupts from the qed perspective. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 12d0b12c57cb7bf0aebf48da79f277330c2552c3 Author: Chad Dupuis Date: Wed May 31 06:33:49 2017 -0700 scsi: qedf: Update copyright to 2017. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/drv_fcoe_fw_funcs.c | 2 +- drivers/scsi/qedf/drv_fcoe_fw_funcs.h | 2 +- drivers/scsi/qedf/drv_scsi_fw_funcs.c | 2 +- drivers/scsi/qedf/drv_scsi_fw_funcs.h | 2 +- drivers/scsi/qedf/qedf.h | 2 +- drivers/scsi/qedf/qedf_attr.c | 2 +- drivers/scsi/qedf/qedf_dbg.h | 2 +- drivers/scsi/qedf/qedf_debugfs.c | 2 +- drivers/scsi/qedf/qedf_els.c | 2 +- drivers/scsi/qedf/qedf_fip.c | 2 +- drivers/scsi/qedf/qedf_hsi.h | 2 +- drivers/scsi/qedf/qedf_io.c | 2 +- drivers/scsi/qedf/qedf_main.c | 2 +- drivers/scsi/qedf/qedf_version.h | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) commit 5185b32887d25699e5398d70f5ada945ea838d99 Author: Chad Dupuis Date: Wed May 31 06:33:48 2017 -0700 scsi: qedf: Enable basic FDMI information. For libfc to register FDMI attributes we need to do two things: - Set the appropriate fc_host attributes that libfc will use to form the FDMI registration commands - Set lport->fdmi_enabled to 1 Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 96e6c633ec48ca487cc150d77810ac500bab35f8 Author: Varun Prakash Date: Thu Jun 1 12:48:33 2017 +0530 scsi: csiostor: add check for supported fw version T6 FCoE support is added in fw version 1.16.45.0 so return error if fw version < 1.16.45.0 for T6 adapters. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_hw.c | 19 +++++++++++++++++++ drivers/scsi/csiostor/csio_hw.h | 1 + 2 files changed, 20 insertions(+) commit 3011b4826891244a4c8a8c668251705a1268f650 Author: Milan P. Gandhi Date: Thu Jun 1 17:38:55 2017 +0530 scsi: fcoe: Remove an extra out label in _fcoe_create function This patch removes an extra out label in _fcoe_create function where we return if creation of FCOE interface is failed. Signed-off-by: Milan P. Gandhi Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78cfe97ffa7581cd8ce6db0232862f12f3bb0e68 Author: Milan P. Gandhi Date: Thu Jun 1 17:35:49 2017 +0530 scsi: fcoe: Fix few small typos in fcoe.c This patch does a cleanup and fixes few small typos in fcoe.c Signed-off-by: Milan P. Gandhi Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1ab6207210b437e8c154e0e93a4c3fa57fc9edd1 Author: Colin Ian King Date: Fri May 26 11:11:37 2017 +0100 scsi: lpfc: fix spelling mistake "entrys" -> "entries" Trivial fix to spelling mistake in debugfs message Signed-off-by: Colin Ian King Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75c9e65f30965a41e570a9f5edaabed812c092ea Author: Bart Van Assche Date: Mon May 22 13:10:53 2017 -0700 scsi: qla2xxx: Remove an unused structure member qla_tgt_cmd.free_work is not used by the qla2xxx driver. Hence remove that member of struct qla_tgt_cmd. Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Reviewed-by: Christoph Hellwig Cc: Quinn Tran Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.h | 1 - 1 file changed, 1 deletion(-) commit eb045e046d5b2aab7710f82c2e5fb1403c69332b Author: Gustavo A. R. Silva Date: Mon May 22 13:00:29 2017 -0500 scsi: hisi_sas: add null check before indirect pointer dereference Add null check before indirectly dereferencing pointer task->lldd_task in statement u32 tag = slot->idx; Addresses-Coverity-ID: 1373843 Signed-off-by: Gustavo A. R. Silva Reviewed-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c146686e32085e76ad9e2957f3dee9b28fe4f22 Author: Arnd Bergmann Date: Thu May 18 10:32:18 2017 +0200 scsi: smartpqi: mark PM functions as __maybe_unused The newly added suspend/resume support causes harmless warnings when CONFIG_PM is disabled: smartpqi/smartpqi_init.c:5147:12: error: 'pqi_ctrl_wait_for_pending_io' defined but not used [-Werror=unused-function] smartpqi/smartpqi_init.c:2019:13: error: 'pqi_wait_until_lun_reset_finished' defined but not used [-Werror=unused-function] smartpqi/smartpqi_init.c:2013:13: error: 'pqi_wait_until_scan_finished' defined but not used [-Werror=unused-function] We can avoid the warnings by removing the #ifdef around the handlers and instead marking them as __maybe_unused, which will let gcc drop the unused code silently. Fixes: f44d210312a6 ("scsi: smartpqi: add suspend and resume support") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 42c335f7e67029d2e01711f2f2bc6252277c8993 Author: Kees Cook Date: Tue May 9 15:34:44 2017 -0700 scsi: csiostor: Avoid content leaks and casts When copying attributes, the len argument was padded out and the resulting memcpy() would copy beyond the end of the source buffer. Avoid this, and use size_t for val_len to avoid all the casts. Similarly, avoid source buffer casts and use void *. Additionally enforces val_len can be represented by u16 and that the DMA buffer was not overflowed. Fixes the size of mfa, which is not FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN (but it will be padded up to 4). This was noticed by the future CONFIG_FORTIFY_SOURCE checks. Cc: Daniel Micay Signed-off-by: Kees Cook Acked-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_lnode.c | 43 +++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit 2371cd90abe3fa1b88e15111abf2cc0a26db6e52 Author: Stephen Hemminger Date: Thu May 18 09:18:12 2017 -0700 scsi: storvsc: remove unnecessary channel inbound lock In storvsc driver, inbound messages do not go through inbound lock. The only effect of this lock was is to provide a barrier for connect and remove logic. Signed-off-by: Stephen Hemminger Signed-off-by: Martin K. Petersen drivers/hv/channel_mgmt.c | 1 - drivers/scsi/storvsc_drv.c | 8 +++----- include/linux/hyperv.h | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) commit ddccd9528d89ca4db30dab5229f6a0cceb095781 Author: Stephen Hemminger Date: Thu May 18 09:18:11 2017 -0700 scsi: storvsc: use in place iterator function In 4.12-rc1, new functions were added to support iterating over elements in the vmbus event ring. This patch uses them to simplify the ring buffer handling in virtual SCSI driver as well. Signed-off-by: Stephen Hemminger Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 44 +++++++++++++++----------------------------- 1 file changed, 15 insertions(+), 29 deletions(-) commit 4bbd458eaa789959f23f4c998d30b972715e1013 Author: Varun Prakash Date: Thu May 18 20:17:38 2017 +0530 scsi: csiostor: add support for Chelsio T6 adapters Enable probe for T6 adapters, add code to flash T6 firmware and firmware config file, use T6 specific macros. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_hw.c | 79 ++++++++++++++++++++++++++++++------ drivers/scsi/csiostor/csio_hw_chip.h | 14 +++++++ drivers/scsi/csiostor/csio_hw_t5.c | 29 +------------ drivers/scsi/csiostor/csio_init.c | 6 ++- drivers/scsi/csiostor/csio_wr.c | 4 +- 5 files changed, 88 insertions(+), 44 deletions(-) commit bfcc62ed7066268349e8e7955925bdaf4be0eec0 Author: Kyle Fortin Date: Wed May 17 16:21:54 2017 -0400 scsi: libiscsi: use kvzalloc for iscsi_pool_init iscsiadm session login can fail with the following error: iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com... iscsiadm: initiator reported error (9 - internal error) When /etc/iscsi/iscsid.conf sets node.session.cmds_max = 4096, it results in 64K-sized kmallocs per session. A system under fragmented slab pressure may not have any 64K objects available and fail iscsiadm session login. Even though memory objects of a smaller size are available, the large order allocation ends up failing. The kernel prints a warning and does dump_stack, like below: iscsid: page allocation failure: order:4, mode:0xc0d0 CPU: 0 PID: 2456 Comm: iscsid Not tainted 4.1.12-61.1.28.el6uek.x86_64 #2 Call Trace: [] dump_stack+0x63/0x83 [] warn_alloc_failed+0xea/0x140 [] __alloc_pages_slowpath+0x409/0x760 [] __alloc_pages_nodemask+0x2b1/0x2d0 [] ? dev_attr_host_ipaddress+0x20/0xffffffffffffc722 [] alloc_pages_current+0xaf/0x170 [] alloc_kmem_pages+0x31/0xd0 [] ? iscsi_transport_group+0x20/0xffffffffffffc7e2 [] kmalloc_order+0x18/0x50 [] kmalloc_order_trace+0x34/0xe0 [] ? transport_remove_classdev+0x70/0x70 [] __kmalloc+0x27d/0x2a0 [] ? complete_all+0x4d/0x60 [] iscsi_pool_init+0x69/0x160 [libiscsi] [] ? device_initialize+0xb0/0xd0 [] iscsi_session_setup+0x180/0x2f4 [libiscsi] [] ? iscsi_max_lun+0x20/0xfffffffffffffa9e [iscsi_tcp] [] iscsi_sw_tcp_session_create+0xcf/0x150 [iscsi_tcp] [] ? iscsi_max_lun+0x20/0xfffffffffffffa9e [iscsi_tcp] [] iscsi_if_create_session+0x33/0xd0 [] ? iscsi_max_lun+0x20/0xfffffffffffffa9e [iscsi_tcp] [] iscsi_if_recv_msg+0x508/0x8c0 [scsi_transport_iscsi] [] ? __alloc_pages_nodemask+0x19b/0x2d0 [] ? __kmalloc_node_track_caller+0x209/0x2c0 [] iscsi_if_rx+0x7c/0x200 [scsi_transport_iscsi] [] netlink_unicast+0x126/0x1c0 [] netlink_sendmsg+0x36c/0x400 [] sock_sendmsg+0x4d/0x60 [] ___sys_sendmsg+0x30a/0x330 [] ? handle_pte_fault+0x20c/0x230 [] ? __handle_mm_fault+0x1bc/0x330 [] ? handle_mm_fault+0xb2/0x1a0 [] __sys_sendmsg+0x49/0x90 [] SyS_sendmsg+0x19/0x20 [] system_call_fastpath+0x12/0x71 Use kvzalloc for iscsi_pool in iscsi_pool_init. Signed-off-by: Kyle Fortin Tested-by: Kyle Fortin Reviewed-by: Joseph Slember Reviewed-by: Lance Hartmann Acked-by: Lee Duncan Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d154f5ff338137a69f2f2a313520b6da2e1eb16 Author: Kevin Barnett Date: Wed May 3 18:55:55 2017 -0500 scsi: smartpqi: bump driver version Reviewed-by: Scott Benesh Reviewed-by: Gerry Morong Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ebaec8e3ee4acda20293db6ba41d3467de5262b5 Author: Corentin Labbe Date: Wed May 3 18:55:49 2017 -0500 scsi: smartpqi: remove writeq/readq function definitions Instead of rewriting write/readq, use existing functions Reviewed-by: Scott Benesh Signed-off-by: Corentin Labbe Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) commit 5a259e32ba32c380537f3d186a311e528b9f9c94 Author: Kevin Barnett Date: Wed May 3 18:55:43 2017 -0500 scsi: smartpqi: add module parameters Add module parameters to disable heartbeat support and to disable shutting down the controller when a controller is taken offline. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit 8a994a04fc3a8edbcc0ba1d17219b6d8f4c38009 Author: Kevin Barnett Date: Wed May 3 18:55:37 2017 -0500 scsi: smartpqi: cleanup list initialization Better initialization of linked list heads. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit a9f93392415eb0fc86c29f015822b36016278c72 Author: Kevin Barnett Date: Wed May 3 18:55:31 2017 -0500 scsi: smartpqi: add raid level show Display the RAID level via sysfs Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 588a63fea1c28009fe17f194941fb8d8b101b44e Author: Kevin Barnett Date: Wed May 3 18:55:25 2017 -0500 scsi: smartpqi: make ioaccel references consistent - make all references to RAID bypass consistent throughout driver. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 13 ++++---- drivers/scsi/smartpqi/smartpqi_init.c | 56 +++++++++++++++-------------------- 2 files changed, 30 insertions(+), 39 deletions(-) commit 6de783f666291763bcc6c3975e146b9b698378b1 Author: Kevin Barnett Date: Wed May 3 18:55:19 2017 -0500 scsi: smartpqi: enhance device add and remove messages Improved formatting of information displayed when devices are added/removed from the system. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 90 +++++++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 21 deletions(-) commit 13bede676b98d595a43d36a34e1835b686d0d140 Author: Kevin Barnett Date: Wed May 3 18:55:13 2017 -0500 scsi: smartpqi: update timeout on admin commands Increase the timeout on admin commands from 3 seconds to 60 seconds and added a check for controller crash in the loop where the driver polls for admin command completion. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f5b63206255f68116c117565ab703c531c5ce400 Author: Kevin Barnett Date: Wed May 3 18:55:07 2017 -0500 scsi: smartpqi: map more raid errors to SCSI errors enhance mapping of RAID path errors to Linux SCSI host error codes. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 37b36847a94669a898c9e3449d19d522d9c13979 Author: Kevin Barnett Date: Wed May 3 18:55:01 2017 -0500 scsi: smartpqi: cleanup controller branding - Improve controller branding support. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 5f310425c8eabeeb303809898682e5b79c8a9c7e Author: Kevin Barnett Date: Wed May 3 18:54:55 2017 -0500 scsi: smartpqi: update rescan worker improve support for taking controller offline. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 141 ++++++++++++++++++---------------- 2 files changed, 77 insertions(+), 66 deletions(-) commit 03b288cf3d92202b950245e931576bb573930c70 Author: Kevin Barnett Date: Wed May 3 18:54:49 2017 -0500 scsi: smartpqi: update device offline - Improve handling of offline devices. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit 376fb880a4fbf6903918a88081b16c167819af3f Author: Kevin Barnett Date: Wed May 3 18:54:43 2017 -0500 scsi: smartpqi: correct aio error path set the internal flag that causes I/O to be sent down the RAID path when the AIO path is disabled Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 8 +- drivers/scsi/smartpqi/smartpqi_init.c | 345 +++++++++++++++++++++++++++------- 2 files changed, 285 insertions(+), 68 deletions(-) commit 3c50976f33f30cf00baea9d518bd3e7ddd01ecc4 Author: Kevin Barnett Date: Wed May 3 18:54:37 2017 -0500 scsi: smartpqi: add lockup action add support for actions to take when controller goes offline. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 121 ++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) commit 94086f5be3f15fc8231e65975e4413c0df3e0203 Author: Kevin Barnett Date: Wed May 3 18:54:31 2017 -0500 scsi: smartpqi: remove qdepth calculations for logical volumes make the queue depth for LVs the same as the maximum I/Os supported by the controller Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 6 -- drivers/scsi/smartpqi/smartpqi_init.c | 140 ++-------------------------------- 2 files changed, 8 insertions(+), 138 deletions(-) commit d727a776d72b26033161bc19441266749455115b Author: Kevin Barnett Date: Wed May 3 18:54:25 2017 -0500 scsi: smartpqi: enhance kdump constrain resource usage during kdump to avoid kdump failures Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 6 +++-- drivers/scsi/smartpqi/smartpqi_init.c | 45 +++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 15 deletions(-) commit 4e8415e3861e8b73a47c92e09e044b9dbc8ee37f Author: Kevin Barnett Date: Wed May 3 18:54:18 2017 -0500 scsi: smartpqi: change return value for LUN reset operations change return value for controller offline to be consistent with the rest of the driver. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd10cf0be6057f680fab911d89761fd15d76b205 Author: Kevin Barnett Date: Wed May 3 18:54:12 2017 -0500 scsi: smartpqi: add ptraid support add support for PTRAID devices Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 8 ++++--- drivers/scsi/smartpqi/smartpqi_init.c | 43 +++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 10 deletions(-) commit b805dbfe2bce1ddf3209c29f1aa7d6b2064ab6c9 Author: Kevin Barnett Date: Wed May 3 18:54:06 2017 -0500 scsi: smartpqi: update copyright Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 2 +- drivers/scsi/smartpqi/smartpqi_sas_transport.c | 2 +- drivers/scsi/smartpqi/smartpqi_sis.c | 2 +- drivers/scsi/smartpqi/smartpqi_sis.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit d87d5474e2080695ef0cc8c5e6c42a41d6ab961b Author: Kevin Barnett Date: Wed May 3 18:54:00 2017 -0500 scsi: smartpqi: cleanup messages - improve some error messages. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 41 +++++++++++++++-------------------- drivers/scsi/smartpqi/smartpqi_sis.c | 3 ++- 2 files changed, 20 insertions(+), 24 deletions(-) commit 7eddabff8acb0f4c25f992efe126cf6cccdd6e7b Author: Kevin Barnett Date: Wed May 3 18:53:54 2017 -0500 scsi: smartpqi: add new PCI device IDs Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 134 +++++++++++++++++++++++++++------- 1 file changed, 109 insertions(+), 25 deletions(-) commit cbe0c7b11dbfda368f27a6935a08ba91522edf1a Author: Kevin Barnett Date: Wed May 3 18:53:48 2017 -0500 scsi: smartpqi: minor driver cleanup - remove debug code that is no longer necessary. - Some WARN_ON checks were removed because the driver continues to function when the conditions are met. - remove a MACRO that is no longer used. - remove unnecessary multi-line statements. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 38 +++++++++++++---------------------- 2 files changed, 15 insertions(+), 25 deletions(-) commit 1be42f46ade32c668f11c0735af03ab2d479d206 Author: Kevin Barnett Date: Wed May 3 18:53:42 2017 -0500 scsi: smartpqi: correct BMIC identify physical drive correct the BMIC Identify Physical Device structure - missing 2 fields Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 20 ++++++++++++++++---- drivers/scsi/smartpqi/smartpqi_init.c | 16 ++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) commit 8845fdfa92ab6eb24209f9929d6340c2f5d4a2de Author: Kevin Barnett Date: Wed May 3 18:53:36 2017 -0500 scsi: smartpqi: eliminate redundant error messages eliminate redundant error message during initialization if the controller has crashed. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 5 +---- drivers/scsi/smartpqi/smartpqi_sis.c | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) commit d91d7820d39629fc67cea5d6721eac8b180b0451 Author: Kevin Barnett Date: Wed May 3 18:53:30 2017 -0500 scsi: smartpqi: make pdev pointer names consistent make all variable names for pointers to struct pci_dev consistent throughout the driver. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 41 ++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 1f37e992ad8015ce33596466b0f36babb495148e Author: Kevin Barnett Date: Wed May 3 18:53:24 2017 -0500 scsi: smartpqi: add pqi_wait_for_completion_io Add check for controller lockup during waits for synchronous controller commands. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit e1d213bdc3e359c6c5da8ebbc5b2e87b376e8777 Author: Kevin Barnett Date: Wed May 3 18:53:18 2017 -0500 scsi: smartpqi: correct bdma hw bug add workaround for BDMA hardware bug that can cause hw to read up to 12 SGL elements (192 bytes) beyond the last element in the list. This fix avoids IOMMU violations Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 98f876674a6fba3591c342dfbcfdbaa7ecf0a84e Author: Kevin Barnett Date: Wed May 3 18:53:11 2017 -0500 scsi: smartpqi: add heartbeat check check for controller lockups Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 60 ++++++++++++++-- drivers/scsi/smartpqi/smartpqi_init.c | 126 +++++++++++++++++++++++----------- drivers/scsi/smartpqi/smartpqi_sis.c | 4 ++ 3 files changed, 143 insertions(+), 47 deletions(-) commit 061ef06a2d436cea85984cf0b51b452547a5496c Author: Kevin Barnett Date: Wed May 3 18:53:05 2017 -0500 scsi: smartpqi: add suspend and resume support add support for ACPI S3 (suspend) and S4 (hibernate) system power states. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 12 +- drivers/scsi/smartpqi/smartpqi_init.c | 425 +++++++++++++++++++++++++++++++--- drivers/scsi/smartpqi/smartpqi_sis.c | 75 +++++- drivers/scsi/smartpqi/smartpqi_sis.h | 3 + 4 files changed, 485 insertions(+), 30 deletions(-) commit 7561a7e4412e515100ac195303531fc2621ac2db Author: Kevin Barnett Date: Wed May 3 18:52:58 2017 -0500 scsi: smartpqi: enhance resets - Block all I/O targeted at LUN reset device. - Wait until all I/O targeted at LUN reset device has been consumed by the controller. - Issue LUN reset request. - Wait until all outstanding I/Os and LUN reset completion have been received by the host. - Return to OS results of LUN reset request. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 13 +- drivers/scsi/smartpqi/smartpqi_init.c | 279 +++++++++++++++++++++++++++++++--- 2 files changed, 265 insertions(+), 27 deletions(-) commit 6a50d6ada03d8d9102a632d0e2db70cd9b6620f5 Author: Kevin Barnett Date: Wed May 3 18:52:52 2017 -0500 scsi: smartpqi: add supporting events Only register for controller events that driver supports cleanup event handling. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 11 +--- drivers/scsi/smartpqi/smartpqi_init.c | 110 ++++++++++++++++++---------------- 2 files changed, 61 insertions(+), 60 deletions(-) commit 162d7753fce9a00719c09dfebd9fee3855e27fbe Author: Kevin Barnett Date: Wed May 3 18:52:46 2017 -0500 scsi: smartpqi: ensure controller is in SIS mode at init put in SIS mode during initialization. support kexec/kdump Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 60 ++++++++++++++++++++--------------- drivers/scsi/smartpqi/smartpqi_sis.c | 6 ++++ drivers/scsi/smartpqi/smartpqi_sis.h | 1 + 4 files changed, 42 insertions(+), 27 deletions(-) commit 5b0fba0f408777113eff93bd18ab0b9f80760fb7 Author: Kevin Barnett Date: Wed May 3 18:52:40 2017 -0500 scsi: smartpqi: add in controller checkpoint for controller lockups. tell smartpqi controller to generate a checkpoint for rare lockup conditions. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 1 + drivers/scsi/smartpqi/smartpqi_sis.c | 7 +++++++ drivers/scsi/smartpqi/smartpqi_sis.h | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) commit a81ed5f338a843d8bfd199928142b196d71ae62c Author: Kevin Barnett Date: Wed May 3 18:52:34 2017 -0500 scsi: smartpqi: set pci completion timeout add support for setting PCIe completion timeout. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 98bf061b0b423a2b6f3c31b7e4b48d947352331c Author: Kevin Barnett Date: Wed May 3 18:52:28 2017 -0500 scsi: smartpqi: cleanup interrupt management minor cleanup of interrupt initialization and tear-down. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 43 +++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 14 deletions(-) commit a37ef74517acf0d022ab4c8fa671c82c877eed7b Author: Kevin Barnett Date: Wed May 3 18:52:22 2017 -0500 scsi: smartpqi: correct remove scsi devices correct a problem caused by holding a spinlock during device deletion. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 30c0061c9ba4e46185da00986ccbbd8de8f8645a Author: Don Brace Date: Thu May 4 17:51:56 2017 -0500 scsi: hpsa: bump driver version Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08ec46f673369f65dfc6fc52fb7fadb39776e81f Author: Don Brace Date: Thu May 4 17:51:49 2017 -0500 scsi: hpsa: remove abort handler - simplify the driver - there are a lot of quirky racy conditions not handled - causes more aborts/resets when the number of commands to be aborted is large, such as in multi-path fail-overs. - has been turned off in our internal driver since 8/31/2015 Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 621 +--------------------------------------------------- drivers/scsi/hpsa.h | 1 - 2 files changed, 8 insertions(+), 614 deletions(-) commit b63c64ac5a5ccb6ee56e0d906f2f5d2b7e54cbd9 Author: Don Brace Date: Thu May 4 17:51:42 2017 -0500 scsi: hpsa: send ioaccel requests with 0 length down raid path - Block I/O requests with 0 length transfers which go down the ioaccel path. This causes lockup issues down in the basecode. - These issues have been fixed, but there are customers who are experiencing the issues when running older firmware. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) commit 3d38f00c4107cc007056db9f4ab14ecb17ed193f Author: Scott Teel Date: Thu May 4 17:51:36 2017 -0500 scsi: hpsa: separate monitor events from rescan worker create new worker thread to monitor controller events - both the rescan and event monitor workers can cause a rescan to occur however for multipath we have found that we need to respond faster than the normal scheduled rescan interval for path fail-overs. - getting controller events only involves reading a register, but the rescan worker can obtain an updated LUN list when there is a PTRAID device present. - move common code to a separate function. advantages: - detect controller events more frequently. - leave rescan thread interval at 30 seconds. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 76 ++++++++++++++++++++++++++++++++++++++++------------- drivers/scsi/hpsa.h | 1 + 2 files changed, 59 insertions(+), 18 deletions(-) commit 5086435e662c7b6ada6cb5f48a1215fc6f612153 Author: Don Brace Date: Thu May 4 17:51:28 2017 -0500 scsi: hpsa: correct queue depth for externals - queue depth assignment not in correct place, had no effect. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 22 ++++++++++------------ drivers/scsi/hpsa.h | 1 + 2 files changed, 11 insertions(+), 12 deletions(-) commit c59d04f30d4216af12930a4f5fdc35f490777171 Author: Don Brace Date: Thu May 4 17:51:22 2017 -0500 scsi: hpsa: cleanup reset handler - mark device state sooner. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 59 ++++++++++++++++++++++++++++++++++++++++------------- drivers/scsi/hpsa.h | 1 + 2 files changed, 46 insertions(+), 14 deletions(-) commit d2315ce6e3d09c8dbc9ee93ef6b3f5213e8325ac Author: Don Brace Date: Thu May 4 17:51:16 2017 -0500 scsi: hpsa: correct resets on retried commands - call scsi_done when the command completes. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b476aa24d44ffb68167d1442f8d12319ef4f183 Author: Don Brace Date: Thu May 4 17:51:10 2017 -0500 scsi: hpsa: rescan later if reset in progress - schedule another scan. - mark current scan as completed. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 1 + 1 file changed, 1 insertion(+) commit ef8a52036268d0f8b5a77f6e34a1d09b0a7fdfdc Author: Don Brace Date: Thu May 4 17:51:04 2017 -0500 scsi: hpsa: do not reset enclosures Prevent enclosure resets. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 3 +++ 1 file changed, 3 insertions(+) commit 8516a2db9aec293d983a729c23488acd688fece4 Author: Don Brace Date: Thu May 4 17:50:58 2017 -0500 scsi: hpsa: update reset handler Use the return from TUR as a check for the device state. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ac517b8a2c592a3a6e3928de7b868c52b200444 Author: Don Brace Date: Thu May 4 17:50:50 2017 -0500 scsi: hpsa: do not get enclosure info for external devices external shelves do not support BMICs. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 5 +++++ 1 file changed, 5 insertions(+) commit 046b263f7521f63fdf3efd02f74efe7b2cff4b1f Author: Don Brace Date: Thu May 4 17:50:44 2017 -0500 scsi: hpsa: update identify physical device structure - align with latest spec. - added __attribute((aligned(512))) Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa_cmd.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 216e80ff78cd2fe1a92c9e4565d578e540e35cc8 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:53 2017 -0700 scsi: aacraid: Update driver version to 50834 Update the driver version to 50834 Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 395e5df79a9588abf1099ea746f11872c9086252 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:52 2017 -0700 scsi: aacraid: Remove reference to Series-9 Remove reference to Series-9 HBA and created arc ctrl check function. Signed-off-by: Prasad B Munirathnam Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 13 ++++++++++++- drivers/scsi/aacraid/comminit.c | 18 ++++-------------- drivers/scsi/aacraid/commsup.c | 5 +---- drivers/scsi/aacraid/linit.c | 9 ++------- 4 files changed, 19 insertions(+), 26 deletions(-) commit 4a76be0dc53a2d725ee126a806e5988135952a05 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:51 2017 -0700 scsi: aacraid: Add reset debugging statements Added info and error messages in controller reset function to log information about the status of the IOP/SOFT reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 786e898c86ee532b76ca5e2ec0b8c2d464d553db Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:50 2017 -0700 scsi: aacraid: Enable ctrl reset for both hba and arc Make sure that IOP and SOFT reset are enabled for both for both arc and hba1000 controllers. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 77 +++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 37 deletions(-) commit 8c41b9b7987e404b3c922cf9d8ff941112051837 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:49 2017 -0700 scsi: aacraid: Make sure ioctl returns on controller reset Made sure that ioctl commands return in case of a controller reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 9473ddb2b037161b0bf16b60b37694f961fd6d48 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:48 2017 -0700 scsi: aacraid: Use correct function to get ctrl health The command thread checks the ctrl health periodically before sending updates to the controller. The function that it uses is aac_check_health which does more than get the health status. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5aa60732520dd0476ed9e20047b837780bbb7799 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:47 2017 -0700 scsi: aacraid: Rework aac_src_restart Removed switch case and replaced with if mask checks. Moved KERNEL_PANIC check to when bled is less than 0. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) commit 77cb6d5ea6033e5d477947aa682728959d6c3f8f Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:46 2017 -0700 scsi: aacraid: Rework SOFT reset code Now the driver issues a soft reset and waits for the controller to be up and running by periodically checking on the status of the controller health registers. Also prevents ARC adapters from issuing soft reset if IOP resets failed. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit 0e9973ed3382652b324971753745cfe08488bb9f Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:45 2017 -0700 scsi: aacraid: Add periodic checks to see IOP reset status Added function that waits with a timeout for the ctrl to be up and running after triggering an IOP reset. Also removed 30 sec sleep as it is not needed. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/src.c | 45 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) commit 80c7d8a5cffa7187c3b3b78eb67705dae91e9a1a Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:44 2017 -0700 scsi: aacraid: Rework IOP reset Reworked IOP reset to remove unneeded variable and created a helper function to notify fw of an imminent IOP reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 6b24d425881792b16ccf2189b43d57b4aff2a4e6 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:43 2017 -0700 scsi: aacraid: Using single reset mask for IOP reset The driver can now trigger IOP reset with a single reset mask. Removed code that retrieves a reset_mask from the firmware. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 5 ++++- drivers/scsi/aacraid/src.c | 16 ++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) commit 144ecd41f0f43600f0c103cb6d0d2f1619d70e96 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:42 2017 -0700 scsi: aacraid: Print ctrl status before eh reset Log the status of the controller before issuing a reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 895dc759cf3996a56ca64e3e09cbea64e2a7ff62 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:41 2017 -0700 scsi: aacraid: Log count info of scsi cmds before reset Log the location of the scsi cmds before triggering a reset. This information is useful for debugging. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 90 ++++++++++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 37 deletions(-) commit 2a4a62c03fd0b5f2e361fbda85e043b2c1ff197d Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:40 2017 -0700 scsi: aacraid: Change wait time for fib completion Change the completion wait time for the fibs in the reset and abort callback from 2 minutes to 15 seconds. 2 minutes is too long for waiting for completion. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fed820073f647f4ecb4f4ae310d698520a802891 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:39 2017 -0700 scsi: aacraid: Remove reset support from check_health Check health does not need to reset the ctrl but just return the controller health status. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 15 --------------- 1 file changed, 15 deletions(-) commit 58eaffe54bca77fbf1a1bad7703265950a758cd1 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:38 2017 -0700 scsi: aacraid: Set correct Queue Depth for HBA1000 RAW disks The default queue depth for non NATIVE RAW disks is calculated from the number of fibs and number of disks or a max of 256. This causes poor disk IO performance. The fix is to set default qd based on the type of disks (SATA -32 and SAS -64) Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit d58129c96b3cde4821763b08b5f1bba17f031138 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:37 2017 -0700 scsi: aacraid: Added 32 and 64 queue depth for arc natives The qd for ARC Native disks is calculated by dividing the max IO 1024 by the number of disks or 256 which ever is lower. This causes poor disk IO performance. The fix is set the qd based on the type of disk (SAS - 64 and SATA - 32). Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/linit.c | 11 +++++++++++ 2 files changed, 12 insertions(+) commit 8105d39d0e7600ebbcce5827c11f15bf77c73af5 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:36 2017 -0700 scsi: aacraid: Fix DMAR issues with iommu=pt The driver changed the DMA consistent map after consistent memory was allocated, this invalidated the IOMMU identity mapping. The fix was to make sure that we set the DMA consistent mask setting once depending on the controller card. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 17 ++++++----------- drivers/scsi/aacraid/commsup.c | 29 ++++++++++++++++++----------- drivers/scsi/aacraid/linit.c | 32 +++++++++++++++++++------------- 3 files changed, 43 insertions(+), 35 deletions(-) commit c831a4a08636d5462a0f9eb479771e2f65ad0378 Author: Raghava Aditya Renukunta Date: Wed May 10 09:39:35 2017 -0700 scsi: aacraid: Remove __GFP_DMA for raw srb memory The raw srb commands do not requires memory that in the ZONE_DMA memory space. For 32bit srb commands use GFP_DMA32 to limit the memory to 32bit memory range (4GB). Signed-off-by: Raghava Aditya Renukunta Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commctrl.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit d0b1d259a4b58b21a21ea82d7174bf7ea825e9cc Author: Christophe JAILLET Date: Fri May 12 14:38:03 2017 +0200 drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path If one 'drm_gem_handle_create()' fails, we leak somes handles and some memory. In order to fix it: - move the 'free(bo_state)' at the end of the function so that it is also called in the eror handling path. This has the side effect to also try to free it if the first 'kcalloc' fails. This is harmless. - add a new label, err_delete_handle, in order to delete already allocated handles in error handling path - remove the now useless 'err' label The way the code is now written will also delete the handles if the 'copy_to_user()' call fails. Signed-off-by: Christophe JAILLET Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170512123803.1886-1-christophe.jaillet@wanadoo.fr drivers/gpu/drm/vc4/vc4_gem.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 24bb206f32cdaa76c59444b62be51708dc16fbe8 Author: Hans Verkuil Date: Wed Jun 7 21:05:57 2017 +0200 drm/vc4/vc4_bo.c: always set bo->resv The bo->resv pointer could be NULL, leading to kernel oopses like the one below. This patch ensures that bo->resv is always set in vc4_create_object ensuring that it is never NULL. Thanks to Eric Anholt for pointing to the correct solution. [ 19.738487] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 19.746805] pgd = ffff8000275fc000 [ 19.750319] [00000000] *pgd=0000000000000000 [ 19.754715] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 19.760369] Modules linked in: smsc95xx usbnet vc4 drm_kms_helper drm pwm_bcm2835 i2c_bcm2835 bcm2835_rng rng_core bcm2835_dma virt_dma [ 19.772767] CPU: 0 PID: 1297 Comm: Xorg Not tainted 4.12.0-rc1-rpi3 #58 [ 19.779476] Hardware name: Raspberry Pi 3 Model B (DT) [ 19.784688] task: ffff800028268000 task.stack: ffff800026c08000 [ 19.790705] PC is at ww_mutex_lock_interruptible+0x14/0xc0 [ 19.796329] LR is at vc4_submit_cl_ioctl+0x4fc/0x998 [vc4] ... [ 20.240855] [] ww_mutex_lock_interruptible+0x14/0xc0 [ 20.247528] [] vc4_submit_cl_ioctl+0x4fc/0x998 [vc4] [ 20.254372] [] drm_ioctl+0x180/0x438 [drm] [ 20.260120] [] do_vfs_ioctl+0xa4/0x7d0 [ 20.265510] [] SyS_ioctl+0x7c/0x98 [ 20.270550] [] el0_svc_naked+0x24/0x28 [ 20.275941] Code: d2800002 d5384103 910003fd f9800011 (c85ffc04) [ 20.282527] ---[ end trace 1f6bd640ff32ae12 ]--- Signed-off-by: Hans Verkuil Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/14e68768-6c92-2d74-92fd-196dbc50d8f7@xs4all.nl drivers/gpu/drm/vc4/vc4_bo.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 9300d9c4ad29b0e79c55c0ba7a16cfc4c13442b8 Merge: 0abdfaf eae3fc9 Author: David S. Miller Date: Mon Jun 12 15:44:11 2017 -0700 Merge branch 'sparc64-early-boot-timestamp' Pavel Tatashin says: ==================== sparc64: Early boot timestamp Changelog: v2 - v3: - __aligned(64) -> __cacheline_aligned - Replaced in sched_clock() wmb() with barrier() v1 - v2: - Early boot timestamps are now available on all 64-bit sparc processors - New hot-patched get_tick() function. This patch set: - enables early boot timestamps on SPARC, - adds offset so we count time from zero, the same as it is done on other platforms - improves the performance by inling, hot patching, and combining loads into the same cacheline. (and few other optimizations). So, the final performance of sched_clock() is faster than now: the fewer number of loads, and all of them are coming from the same cacheline. Loads can run while we are reading tick value, and we do not do function call. Current sched_clock(): sethi %hi(0xb9b400), %g1 ldx [ %g1 + 0x250 ], %g1 ldx [ %g1 ], %g1 call %g1 nop sethi %hi(0xb9b400), %g1 ldx [ %g1 + 0x300 ], %g1 mulx %o0, %g1, %g1 rett %i7 + 8 srlx %g1, 0xa, %o0 Final sched_clock(): sethi %hi(0xb9b400), %g1 ldx [ %g1 + 0x2c8 ], %g2 ldx [ %g1 + 0x2c0 ], %g1 b 42f638 rd %asr24, %i0 ... sllx %i0, 1, %i0 srlx %i0, 1, %i0 mulx %i0, %g1, %i0 srlx %i0, 0xa, %i0 rett %i7 + 8 sub %o0, %g2, %o0 ==================== Signed-off-by: David S. Miller commit eae3fc9871111e9bbc77dad5481a3e805e02ac46 Author: Pavel Tatashin Date: Mon Jun 12 16:41:48 2017 -0400 sparc64: optimize functions that access tick Replace read tick function pointers with the new hot-patched get_tick(). This optimizes the performance of functions such as: sched_clock() Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/kernel/time_64.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 4929c83a6ce6584cb64381bf1407c487f67d588a Author: Pavel Tatashin Date: Mon Jun 12 16:41:47 2017 -0400 sparc64: add hot-patched and inlined get_tick() Add the new get_tick() function that is hot-patched during boot based on processor we are booting on. Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/include/asm/timer_64.h | 60 +++++++++++++++++++++++++++++++++++++++ arch/sparc/kernel/time_64.c | 28 ++++++++++++++---- arch/sparc/kernel/vmlinux.lds.S | 5 ++++ 3 files changed, 87 insertions(+), 6 deletions(-) commit 83e8eb99d908da78e6eff7dd141f26626fe01d12 Author: Pavel Tatashin Date: Mon Jun 12 16:41:46 2017 -0400 sparc64: initialize time early In Linux it is possible to configure printk() to output timestamp next to every line. This is very useful to determine the slow parts of the boot process, and also to avoid regressions, as boot time is visiable to everyone. Also, there are scripts that change these time stamps to intervals. However, on larger machines these timestamps start appearing many seconds, and even minutes into the boot process. This patch gets stick-frequency property early from OpenBoot, and uses its value to initialize time stamps before the first printk() messages are printed. Signed-off-by: Pavel Tatashin Reviewed-by: Shannon Nelson Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/kernel/kernel.h | 3 +++ arch/sparc/kernel/setup_64.c | 1 + arch/sparc/kernel/time_64.c | 21 ++++++++------------- 3 files changed, 12 insertions(+), 13 deletions(-) commit 89108c3423e8047cd0da73182ea09b9da190b57e Author: Pavel Tatashin Date: Mon Jun 12 16:41:45 2017 -0400 sparc64: improve modularity tick options This patch prepares the code for early boot time stamps by making it more modular. - init_tick_ops() to initialize struct sparc64_tick_ops - new sparc64_tick_ops operation get_frequency() which returns a frequency Signed-off-by: Pavel Tatashin Reviewed-by: Bob Picco Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/include/asm/timer_64.h | 2 + arch/sparc/kernel/time_64.c | 83 ++++++++++++++++++++++++++------------- 2 files changed, 57 insertions(+), 28 deletions(-) commit 178bf2b9a20e866677bbca5cb521b09a8498c1d7 Author: Pavel Tatashin Date: Mon Jun 12 16:41:44 2017 -0400 sparc64: optimize loads in clock_sched() In clock sched we now have three loads: - Function pointer - quotient for multiplication - offset However, it is possible to improve performance substantially, by guaranteeing that all three loads are from the same cacheline. By moving these three values first in sparc64_tick_ops, and by having tick_operations 64-byte aligned we guarantee this. Signed-off-by: Pavel Tatashin Reviewed-by: Shannon Nelson Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/include/asm/timer_64.h | 5 +++++ arch/sparc/kernel/time_64.c | 17 +++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) commit b5dd4d807f0fe7da67c5cc67b2ec681b60e4994b Author: Pavel Tatashin Date: Mon Jun 12 16:41:43 2017 -0400 sparc64: show time stamps from zero On most platforms, time is shown from the beginning of boot. This patch is adding offset to sched_clock() for SPARC, to also show time from 0. This means we will have one more load, but we saved one in an ealier patch. Signed-off-by: Pavel Tatashin Reviewed-by: Bob Picco Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/kernel/time_64.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit b8a83fcb78c859b99807af4c8b0ab09f0f827a40 Author: Pavel Tatashin Date: Mon Jun 12 16:41:42 2017 -0400 sparc64: access tick function from variable In timer_64.c tick functions are access via pointer (tick_ops), every time clock is read, there is one extra load to get to the function. This patch optimizes it, by accessing functions pointer from value. Current ched_clock(): sethi %hi(0xb9b400), %g1 ldx [ %g1 + 0x250 ], %g1 ! ldx [ %g1 ], %g1 call %g1 nop sethi %hi(0xb9b400), %g1 ldx [ %g1 + 0x300 ], %g1 ! mulx %o0, %g1, %g1 rett %i7 + 8 srlx %g1, 0xa, %o0 New sched_clock(): sethi %hi(0xb9b400), %g1 ldx [ %g1 + 0x340 ], %g1 call %g1 nop sethi %hi(0xb9b400), %g1 ldx [ %g1 + 0x378 ], %g1 mulx %o0, %g1, %g1 rett %i7 + 8 srlx %g1, 0xa, %o0 Before three loads, now two loads. Signed-off-by: Pavel Tatashin Reviewed-by: Shannon Nelson Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/kernel/time_64.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 68a792174d7f67c7d2108bf1cc55ab8a63fc4678 Author: Pavel Tatashin Date: Mon Jun 12 16:41:41 2017 -0400 sparc64: remove trailing white spaces A few changes that were reported by checkpatch, removed all trailing white spaces in these two files. Signed-off-by: Pavel Tatashin Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/include/asm/setup.h | 2 +- arch/sparc/kernel/setup_64.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit e4c1a0d15b62a3ed2f8cd560e9fa589dbe880c13 Author: Derek Robson Date: Mon Jun 12 14:33:03 2017 +1200 audit: style fix Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Signed-off-by: Derek Robson Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit d40b7fd2cbcbeeff36e52aef2aa44e03a2ab7345 Author: Alex Williamson Date: Wed Jun 7 13:00:48 2017 -0600 PCI: Mark Intel XXV710 NIC INTx masking as broken Just like the other XL710 and X710 variants, the XXV710 device IDs appear to have the same hardware bug, the status register doesn't report pending interrupts resulting in "irq xx: nobody cared..." errors from the spurious interrupt handler when we try to use it with device assignment. Reported-by: Stefan Assmann Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas Acked-by: Jesse Brandeburg drivers/pci/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3e9aaaf1d814586404dc93461ec955dd90dc8934 Author: Stefan Wahren Date: Sun May 21 18:44:39 2017 +0200 ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support In order to use the serial and ethernet USB gadget support on Raspberry Zero, we also need to enable the PHY driver, kernel module and OTG support. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt arch/arm/configs/bcm2835_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9c53535a15b63218204f2bab2c279b3e64c61c0e Author: Stefan Wahren Date: Sun May 21 18:44:38 2017 +0200 ARM: dts: bcm2835-rpi-zero: Enable OTG mode Since 635c21068cf ("usb: dwc2: gadget: Fix WARN_ON messages during FIFO init") the dwc2 driver is able to handle OTG and gadget mode for bcm2835. So enable this feature for the Raspberry Pi Zero. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm2835-rpi-zero.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 860a5d0b262eb3a98f578ffbd4469723315fd778 Author: Stefan Wahren Date: Sun May 21 18:44:37 2017 +0200 ARM: dts: bcm283x: Add generic USB PHY In order to use dwc2 in OTG or gadget mode the USB PHY should be specified. Since there is no bcm283x USB PHY driver use the generic one. Signed-off-by: Stefan Wahren Acked-by: Stephen Warren Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 1aa1d858f582c7b1c245e8990ab21e1d9d8d00b1 Author: Stefan Wahren Date: Sun May 21 18:44:36 2017 +0200 ARM: dts: bcm283x: Add dtsi for OTG mode The Raspberry Pi Zero also supports OTG mode. So provide a dtsi file to configure the USB interface accordingly. The fifo sizes are optimized for device endpoint 6 and 7 with the maximum of 768. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 34a048cc06802556e5f96f325dc32cc2f6a11225 Author: Mickaël Salaün Date: Sun Jun 11 14:32:58 2017 +0200 selftests: kselftest_harness: Fix compile warning Do not confuse the compiler with a semicolon preceding a block. Replace the semicolon with an empty block to avoid a warning: gcc -Wl,-no-as-needed -Wall -lpthread seccomp_bpf.c -o /.../linux/tools/testing/selftests/seccomp/seccomp_bpf In file included from seccomp_bpf.c:40:0: seccomp_bpf.c: In function ‘change_syscall’: ../kselftest_harness.h:558:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (; _metadata->trigger; _metadata->trigger = __bail(_assert)) ^ ../kselftest_harness.h:574:14: note: in expansion of macro ‘OPTIONAL_HANDLER’ } while (0); OPTIONAL_HANDLER(_assert) ^~~~~~~~~~~~~~~~ ../kselftest_harness.h:440:2: note: in expansion of macro ‘__EXPECT’ __EXPECT(expected, seen, ==, 0) ^~~~~~~~ seccomp_bpf.c:1313:2: note: in expansion of macro ‘EXPECT_EQ’ EXPECT_EQ(0, ret); ^~~~~~~~~ seccomp_bpf.c:1317:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ { ^ Signed-off-by: Mickaël Salaün Cc: Andy Lutomirski Cc: Kees Cook Cc: Shuah Khan Cc: Will Drewry Acked-by: Kees Cook Signed-off-by: Shuah Khan tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ff79fee360b21fe47ec51ff9e7a5fdce0beaa88 Author: Shuah Khan Date: Fri Jun 9 11:28:18 2017 -0600 kselftest: MAINTAINERS git tree entry update files and dirs Add missing trailing slash to tools/testing/selftests to cover all files and directories below. Add kselftest documentation files. Signed-off-by: Shuah Khan MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a7254a09451c0e7aa23b79c8d9e883ac7ce4dd6d Author: Greg Kroah-Hartman Date: Fri Jun 9 08:13:48 2017 +0200 ksefltest: MAINTAINERS git tree entry is incorrect There is a few more subdirectories needed in the git tree path for the linux-kselftest url in order to be able to properly clone it. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Shuah Khan MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df68f20f56084cffd15add2d7652bcdfb38cd875 Author: Bob Peterson Date: Mon Jun 5 13:14:16 2017 -0500 GFS2: Remove gl_list from glock structure The gl_list is no longer used nor needed in the glock structure, so this patch eliminates it. Signed-off-by: Bob Peterson fs/gfs2/incore.h | 1 - fs/gfs2/main.c | 1 - 2 files changed, 2 deletions(-) commit d87d62b75dfd8d33dc1baf0c4d3792788b554661 Author: Bob Peterson Date: Fri May 26 08:28:56 2017 -0500 GFS2: Withdraw when directory entry inconsistencies are detected This patch prints an inode consistency error and withdraws the file system when directory entry counts are mismatched. Signed-off-by: Bob Peterson fs/gfs2/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6ef56325d8a382be648c5743d038a20d4995008d Author: Joe Perches Date: Mon Jun 12 12:17:39 2017 -0700 libata: Convert bare printks to pr_cont Linus Torvalds changed the behavior of printks without KERN_. Convert the continuation prints to use pr_cont. At the same time, convert the existing printks with KERN_ to pr_ Miscellanea: o Coalesce a multiline format Signed-off-by: Joe Perches Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) commit 67edab48caeb75d412706f4b9d3107afd1e07623 Author: Thomas Gleixner Date: Mon Jun 12 19:39:49 2017 +0200 posix-timers: Handle relative posix-timers correctly The recent rework of the posix timer internals broke the magic posix mechanism, which requires that relative timers are not affected by modifications of the underlying clock. That means relative CLOCK_REALTIME timers cannot use CLOCK_REALTIME, because that can be set and adjusted. The underlying hrtimer switches the clock for these timers to CLOCK_MONOTONIC. That still works, but reading the remaining time of such a timer has been broken in the rework. The old code used the hrtimer internals directly and avoided the posix clock callbacks. Now common_timer_get() uses the underlying kclock->timer_get() callback, which is still CLOCK_REALTIME based. So the remaining time of such a timer is calculated against the wrong time base. Handle it by switching the k_itimer->kclock pointer according to the resulting hrtimer mode. k_itimer->it_clock still contains CLOCK_REALTIME because the timer might be set with ABSTIME later and then it needs to switch back to the realtime posix clock implementation. Fixes: eae1c4ae275f ("posix-timers: Make use of cancel/arm callbacks") Reported-by: Andrei Vagin Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Cc: Cyrill Gorcunov Link: http://lkml.kernel.org/r/20170609201156.GB21491@outlook.office365.com kernel/time/posix-timers.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 5c7a3a3d20a4e175304c0e23809e3d70be8fed8a Author: Thomas Gleixner Date: Mon Jun 12 19:44:09 2017 +0200 posix-timers: Zero out oldval itimerspec The recent posix timer rework moved the clearing of the itimerspec to the real syscall implementation, but forgot that the kclock->timer_get() is used by timer_settime() as well. That results in an uninitialized variable and bogus values returned to user space. Add the missing memset to timer_settime(). Fixes: eabdec043853 ("posix-timers: Zero settings value in common code") Reported-by: Andrei Vagin Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Cc: Cyrill Gorcunov Link: http://lkml.kernel.org/r/20170609201156.GB21491@outlook.office365.com kernel/time/posix-timers.c | 2 ++ 1 file changed, 2 insertions(+) commit 08fc4756c35fb076027374ff026a82de3de3c5f4 Author: Minwoo Im Date: Sun Jun 11 23:53:00 2017 +0900 libahci: wrong comments in ahci_do_softreset() AHCI 1.3.1 Spec says that software shall build two H2D register FISes in the command list to send a software reset. The comments in ahci_do_softreset() is currently D2H instead of H2D. Signed-off-by: Minwoo Im Signed-off-by: Tejun Heo drivers/ata/libahci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f356b08205f6668248960093faf9326c7852a38d Author: Bhumika Goyal Date: Fri Jun 9 17:15:08 2017 +0530 ata: declare ata_port_info structures as const ata_port_info structures are either copied to other objects or their references are stored in objects of type const. So, ata_port_info structures having similar usage pattern can be made const. Signed-off-by: Bhumika Goyal Signed-off-by: Tejun Heo drivers/ata/pata_rdc.c | 2 +- drivers/ata/pata_sch.c | 2 +- drivers/ata/sata_inic162x.c | 2 +- drivers/ata/sata_via.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) commit 1f6ab20f5527a2483d666d2ce996c51368d1b617 Author: Markus Mayer Date: Thu Apr 20 09:55:48 2017 -0700 soc: brcmstb: enable drivers for ARM64 and BMIPS We enable the BRCMSTB SoC drivers not only for ARM, but also ARM64 and BMIPS. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/soc/bcm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f06345add95f388519e83ec398134853e0f64ac9 Author: Jens Axboe Date: Mon Jun 12 11:22:46 2017 -0600 blk-mq: fixup type of 'ret' in __blk_mq_try_issue_directly() Should be a blk_status_t type, not an integer. Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdf1bf1744355d83cd44e160f2d3dcc28df5140b Author: Yazen Ghannam Date: Mon Jun 12 11:58:23 2017 -0500 EDAC, mce_amd: Fix typo in SMCA error description Fix typo in "poison consumption" error description. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1497286703-62853-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/mce_amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57de72125d34f83bfd39615fcc3cc25ca3b9c0ec Author: Arnd Bergmann Date: Thu Jun 8 10:55:33 2017 +0200 cpu/hotplug: Remove unused check_for_tasks() function clang -Wunused-function found one remaining function that was apparently meant to be removed in a recent code cleanup: kernel/cpu.c:565:20: warning: unused function 'check_for_tasks' [-Wunused-function] Sebastian explained: The function became unused unintentionally, but there is already a failure check, when a task cannot be removed from the outgoing cpu in the scheduler code, so bringing it back is not really giving any extra value. Fixes: 530e9b76ae8f ("cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions") Signed-off-by: Arnd Bergmann Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Boris Ostrovsky Cc: Anna-Maria Gleixner Link: http://lkml.kernel.org/r/20170608085544.2257132-1-arnd@arndb.de Signed-off-by: Thomas Gleixner kernel/cpu.c | 24 ------------------------ 1 file changed, 24 deletions(-) commit 40c26d3af60af5c5d1c434465ffd38a42e5d9bb1 Author: Eric Anholt Date: Fri Apr 28 15:22:04 2017 -0700 ARM: dts: Cygnus: Add the ethernet switch and ethernet PHY Cygnus has a single amac controller connected to the B53 switch with 2 PHYs. On the BCM911360_EP platform, those two PHYs are connected to the external ethernet jacks. Signed-off-by: Eric Anholt Reviewed-by: Florian Fainelli Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-cygnus.dtsi | 58 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm911360_entphn.dts | 12 +++++++ 2 files changed, 70 insertions(+) commit 2896cb55dc6dd11bd9d07ab1f1eca8a6d478c68a Author: Jon Mason Date: Fri Apr 28 16:11:31 2017 -0400 ARM: dts: NSP: Add Thermal Support Add thermal support via the ns-thermal driver and create a single thermal zone for the entire SoC. Signed-off-by: Jon Mason Acked-by: Eduardo Valentin Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit f1494a85e205f6b74ae04d49c446e792b0460301 Author: Eric Anholt Date: Tue Apr 18 16:32:34 2017 -0700 ARM: dts: Cygnus: Add BCM11360's V3D device This loads the VC4 driver on the 911360_entphn platform (with the corresponding series sent to dri-devel), which is supported by master of the Mesa tree. Signed-off-by: Eric Anholt Acked-by: Scott Branden Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-cygnus.dtsi | 13 +++++++++++++ arch/arm/boot/dts/bcm911360_entphn.dts | 8 ++++++++ 2 files changed, 21 insertions(+) commit 23f1eca6d59b5a341f63d9e96bb80734d29436c8 Author: Rafał Miłecki Date: Wed Apr 19 23:54:25 2017 +0200 ARM: dts: BCM5301X: Specify MDIO bus in the DT Northstar devices have MDIO bus that may contain various PHYs attached. A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet). Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm5301x.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 36c2cb1830e0799f7f35c1429404c842daa8996d Author: Rafał Miłecki Date: Fri Apr 14 23:42:28 2017 +0200 ARM: dts: BCM5301X: Add CPU thermal sensor and zone This uses CPU thermal sensor available on every Northstar chipset to monitor temperature. We don't have any cooling or throttling so only a critical trip was added. Signed-off-by: Rafał Miłecki Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm5301x.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit da411a48bdeb648153dc9a485c15c18f3d063eac Author: Rodrigo Vivi Date: Fri Jun 9 15:02:50 2017 -0700 drm/i915/cfl: Basic DDI plumbing for Coffee Lake. All here is pretty much like Kabylake. Including CFL-U has to use same ddi translation table as KBL-U for now. v2: Include missed IS_COFFEELAKE on edp trans table. (DK) Handle CFL-U with same translation table as KBL-U. (DK and confirmed with HW engineers) v3: Adding missed case for IS_CFL_ULT. (DK). v4: Duh! Now with the real IS_CFL_ULT instead of KBL one. (DK) Also use IS_GEN9_BC when possible. (DK) Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: http://patchwork.freedesktop.org/patch/msgid/1497045770-21302-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_ddi.c | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) commit 1fa62e1b76d6fb4e353f6d7e3ec22e6d07e0a489 Author: Kahola, Mika Date: Fri Jun 9 15:26:15 2017 -0700 drm/i915/cnl: Enable wrpll computation for CNL Enable wrpll computation for Cannonlake platform to support pll's required for HDMI output. The patch contains the following features - compute Cannonlake port clock programming dividers P, Q, and K. - compute PLL parameters for Cannonlake. These parameters set the values on DPLL registers. - find the register values to program wrpll for Cannonlake. The reference clock can be either 19.2MHz or 24MHz. v2: rebase v3: squash wrpll patches into one (Rodrigo) v4: switch order of getting even dividers (Paulo) update divider register values for PDiv and KDiv (Paulo) update wrpll computation algorithm (Paulo) v5: Remove ref clock division by 1000. (Rodrigo) v6: Rodrigo rebasing on top of latest code. Signed-off-by: Kahola, Mika Signed-off-by: Rodrigo Vivi Reviewed-by: Clint Taylor Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-18-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_dpll_mgr.c | 140 +++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 2 deletions(-) commit ff15947e0f02ceccfffa8f342472765404d161b6 Author: Rodrigo Vivi Date: Fri Jun 9 15:26:14 2017 -0700 drm/i915/cnl: LSPCON support is gen9+ There is no platform specific change needed for LSPCON support on Cannonlake. So let's make it gen9+. Cc: Shashank Sharma Signed-off-by: Rodrigo Vivi Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-17-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4efa16cae0629faa2f5f0e7d089c1b85d946805a Author: Rodrigo Vivi Date: Fri Jun 9 15:26:13 2017 -0700 drm/i915/cnl: Enable fifo underrun for Cannonlake. Also in a way that reuse bdw+ for all next platforms. Signed-off-by: Rodrigo Vivi Reviewed-by: Mika Kahola Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-16-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_fifo_underrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9569aa1e583d90a4347a213566a2334c93aa176 Author: Rodrigo Vivi Date: Fri Jun 9 15:26:12 2017 -0700 drm/i915/cnl: Fix Cannonlake scaler mode programing. As Geminilake scalers Cannonlake also don't need and don't have the "high quality" mode programming. Cc: Ander Conselvan de Oliveira Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-15-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_atomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a7399aa58e93c65d3b5bf969ca1e69c81fb2535 Author: Rodrigo Vivi Date: Fri Jun 9 15:26:11 2017 -0700 drm/i915: Use HAS_CSR instead of gen number on DMC load. Since we have HAS_CSR tied to the platform definition let's use this instead of checking per platform. One less thing to worry when adding support to new platforms. Signed-off-by: Rodrigo Vivi Reviewed-by: Animesh Manna Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-14-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cebfcead63de6f6b1414c3b58ee554b5fc8e103c Author: Anusha Srivatsa Date: Fri Jun 9 15:26:10 2017 -0700 drm/i915/DMC/CNL: Load DMC on CNL This patch loads the DMC on CNL.The firmware version is 1.04. v2: (Rodrigo) Remove MODULE_FIRMWARE. Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Reviewed-by: Animesh Manna Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-13-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_csr.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 0091abc3a621f4acf41e35ea00a4ab4f064c2fb7 Author: Clint Taylor Date: Fri Jun 9 15:26:09 2017 -0700 drm/i915/cnl: Enable loadgen_select bit for vswing sequence vswing programming sequence step 2 requires the Loadgen_select bit to be set in PORT_TX_DW4 lane reigsters per table defined by Bit rate and lane width. Implemented the change that was marked as FIXME in the driver. v2: (Rodrigo) checkpatch fixes. Signed-off-by: Clint Taylor Signed-off-by: Rodrigo Vivi Reviewed-by: Manasi Navare Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-12-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) commit cf54ca8bc5674049889d208131cb1b0e15161a2c Author: Rodrigo Vivi Date: Fri Jun 9 15:26:08 2017 -0700 drm/i915/cnl: Implement voltage swing sequence. This is an important part of the DDI initalization as well as for changing the voltage during DisplayPort link training. This new sequence for Cannonlake is more like Broxton style but still with different registers, different table and different steps. v2: Do not write to DW4_GRP to avoid overwrite individual loadgen. Fix PORT_CL_DW5 SUS Clock Config set. v3: As previous platforms use only eDP table if low voltage was requested. v4: fix Werror:maybe uninitialized (Paulo) v5: Rebase on top of dw2_swing_sel changes on previous patches. v6: Using flexible SCALING_MODE_SEL(x). Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Manasi Navare Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-11-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ddi.c | 176 ++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_dp.c | 2 +- 3 files changed, 177 insertions(+), 2 deletions(-) commit 83fb7ab404fdcf314ca3a6ef4cd9f6790a0767f4 Author: Rodrigo Vivi Date: Fri Jun 9 15:26:07 2017 -0700 drm/i915/cnl: Add DDI Buffer translation tables for Cannonlake. These tables are used on voltage wswing sequence initialization on Cannonlake. It is a complete new format now in use by the voltage swing team, not following any other standard in use by any other platform. Also the registers are different as well. So let's redefine the translation table for Cannonlake. The table is huge. So we minimized with the fields that are different or might be different anytime soon. The common values will be hardcoded on the voltage swing sequence. v2: Merge the lower and the upper bits to match the spec table and make review easier. This was possible with the good idea for Manasi with a better way to handle it on the bit macro definition presented on previous patch. Credits-to: Manasi Cc: Manasi Navare Signed-off-by: Rodrigo Vivi Reviewed-by: Manasi Navare Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-10-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 140 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) commit 04416108ccea55f7536abeb9f81f1879922774eb Author: Rodrigo Vivi Date: Fri Jun 9 15:26:06 2017 -0700 drm/i915/cnl: Add registers related to voltage swing sequences. This are the registers and bits needed for the voltage swing sequence on Cannonlake. v2: Remove CL_DW5 that was wrongly defined. v3: Use (1 << 1) instead of (1<<1) as Paulo suggested Change DW2 swing sel upper and lower macros to do the bit selection instead of definint a table that doesn't match the spec. It is based on a Manasi version of it. Credits-to: Manasi. v4: Let SCALING_MODE_SEL flexible. (Manasi) Cc: Paulo Zanoni Cc: Manasi Navare Signed-off-by: Rodrigo Vivi Reviewed-by: Manasi Navare Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-9-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 140 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) commit a104c9f22c7d073d4ae308ca36383ce5cc4631cc Author: Christoph Hellwig Date: Mon Jun 12 18:26:06 2017 +0200 nvme-rdma: fix merge error The merge of 4.12-rc5 into the for-4.13/block tree didn't handle the queue ready case correctly. Fix this by propagating blk_status_t into nvme_rdma_queue_is_ready. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 4557c6072724fbb8e339b589e1897b20973b3b69 Author: Rodrigo Vivi Date: Fri Jun 9 15:26:05 2017 -0700 drm/i915: Add MMIO helper for 6 ports with different offsets. Also new registers can have different mmio offsets per different lane per port. v2: Use _PICK as PORT3 instead of creating a new macro with if per port. v3: Use _PICK directly on MMIO_PORT6. While MMIO_PORT isn't flexible enough let's continue with MMIO_PORT6 as we have MMIO_PORT3. Cc: Manasi Navare Signed-off-by: Rodrigo Vivi Reviewed-by: Manasi Navare Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-8-git-send-email-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_reg.h | 3 +++ 1 file changed, 3 insertions(+) commit a927c927de346525901991842b0646911a220d11 Author: Rodrigo Vivi Date: Fri Jun 9 15:26:04 2017 -0700 drm/i915/cnl: Initialize PLLs Although CNL follows PLL initialization more like Skylake than Broxton we have a completely different initialization sequence and registers used. One big difference from SKL is that CDCLK PLL is now exclusive (ADPLL) and for DDIs and MIPI we need to use DFGPLLs 0, 1 or 2. v2: Accept all Ander's suggestions and fixes: - Registers and bits names prefix - Group pll functions - bits masks fixes - remove read and modify on cfgcr1 - fix cfgcr0 setup v3: Set SSC_ENABLE for DP. Fix HDMI_MODE cfgcr0. Avoid touch cfgcr0 on DP. Add missed else on dpll_mgr definition so we use cnl one, not hsw. v3: Centra freq should be always set to default and change bits definitions to (1 << 1) instead of (1<<1). (by Paulo) v4: Rebased. Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: Kahola, Mika Reviewed-by: Ander Conselvan De Oliveira Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-7-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 48 ++++++ drivers/gpu/drm/i915/intel_dpll_mgr.c | 300 +++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_dpll_mgr.h | 4 + 3 files changed, 350 insertions(+), 2 deletions(-) commit 8b0f7e06895c0d5f3cc28e494c7816e728d40f35 Author: Kahola, Mika Date: Fri Jun 9 15:26:03 2017 -0700 drm/i915: Configure DPLL's for Cannonlake DPLL's are defined in DPCLKA_CFGCR0 register (0x6C200). Let's use these definitions when computing dpll's for ddi ports. v2: (Rodrigo) Remove register that was defined in another patch with fixed name and more bits. Signed-off-by: Kahola, Mika Signed-off-by: Rodrigo Vivi Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-6-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_display.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 555e38d2731720a8eacc0463a26bdd74315d2d63 Author: Rodrigo Vivi Date: Fri Jun 9 15:26:02 2017 -0700 drm/i915/cnl: DDI - PLL mapping One of the steps for PLL (un)initialization is to (un)map the correspondent DDI that is actually using that PLL. So, let's do this step following the places already stablished and used so far, although spec put this as part of PLL initialization sequences. v2: Use proper prefix on bits names as suggested by Ander. v3: Add missed "~". Without that the logic was inverted so we were disabling interrupts. Credits-to: Clinton Credits-to: Art v4: Spec is getting updated to do DDI -> PLL mapping and clock on in 2 separated reg writes. (Paulo) Also update bits definitions to use space (1 << 1) instead of (1<<1). (Paulo) Cc: Paulo Zanoni Cc: Art Runyan Cc: Clint Taylor Cc: Ville Syrjälä Cc: Kahola, Mika Cc: Ander Conselvan De Oliveira Signed-off-by: Rodrigo Vivi Reviewed-by: Kahola, Mika Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-5-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 9 +++++++++ drivers/gpu/drm/i915/intel_ddi.c | 23 ++++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) commit d1999e9ef84f2c2d012d8acec2b68d937bcfd6c4 Author: Rodrigo Vivi Date: Fri Jun 9 15:26:01 2017 -0700 drm/i915/cnl: Allow dynamic cdclk changes on CNL All the low level cdclk bits are present, so let's add the required hooks to reconfigure cdclk on the fly. Cannonlake also needs to adjust the minimal pixel rate as gen9 platforms. Specially for the Azalia audio case. v2: Rebase due to cnl_sanitize_cdclk() v3: Rebased by Rodrigo on top of Ville's cdclk rework. v4: Rebase moving cnl_calc_cdclk up to follow same order as previous platforms. v2: Squash drm/i915/cnl: Adjust min pixel rate. to address the current limitation where CDCLK cannot be set to 168MHz if audio is used with 96MHz. (Imre) v3: adjust some of the clock limits within bdw_adjust_min_pipe_pixel_rate. (Ville/DK/Imre). Fix commit message messed by squash. Cc: Dhinakaran Pandiyan Cc: Sanyog Kale Signed-off-by: Rodrigo Vivi Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-4-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 60 +++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 4 deletions(-) commit d8d4a512a6ffa97bde442023e87b9c87a37d8838 Author: Ville Syrjälä Date: Fri Jun 9 15:26:00 2017 -0700 drm/i915/cnl: Implement CNL display init/unit sequence Implement the CNL display init/uninit sequence as outlined in Bspec. Quite similar to SKL/BXT. The main complicaiton is probably the extra procmon setup we must do based on the process/voltage information we can read out from some register. v2: s/skl_dbuf/gen9_dbuf/ to follow upstream bxt needed a cdclk sanitize step, so let's add it for cnl too v3: s/CHICKEN_MISC_1/CHICKEN_MISC_2/ (Ander) v4: Rebased by Rodrigo after Ville's cdclk rework v5: Removed unecessary Aux IO forced enable/disable, Fix DW10 setup Fix procpon Mask. (Credits-to Paulo and Clint) Remove A0 workaround. v6: Rebased on top of recent code (Rodrigo). v7: Respect the order of sanitize_ after set_ (Done by Rodrigo, Requested by Ville) v8: Commit message updated to matvh v5 changes besides Remove unused DW8 and an extra blank line. (all noticed by Imre). v9: Remove __attribute__((unused)) added on latest version of drm/i915/cnl: Implement .set_cdclk() for CNL. Cc: Paulo Zanoni Cc: Clint Taylor Signed-off-by: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-3-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 23 +++++++ drivers/gpu/drm/i915/intel_cdclk.c | 108 +++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_drv.h | 2 + drivers/gpu/drm/i915/intel_runtime_pm.c | 113 +++++++++++++++++++++++++++++++- 4 files changed, 243 insertions(+), 3 deletions(-) commit ef4f7a689ac5f61e36ac9ae77ac967b6469ae68b Author: Ville Syrjälä Date: Fri Jun 9 15:25:59 2017 -0700 drm/i915/cnl: Implement .set_cdclk() for CNL Add support for changing the cdclk frequency on CNL. Again, quite similar to BXT, but there are some annoying differences which means trying to share more code might not be feasible: * PLL ratio now lives in the PLL enable register * pcode came from SKL, not from BXT We support three cdclk frequencies: 168,336,528 Mhz. The first two use the same PLL frequency, the last one uses a different one meaning we once again may need to toggle the PLL off and on when changing cdclk. v2: Rebased by Rodrigo on top of Ville's cdclk rework. v3: Respect order of set_ bellow get_ (Ville) v4: Added __attribute__((unused)) to avoid broken compilation with Werror. Signed-off-by: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-2-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 106 +++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) commit 945f2672ccbb5c92a8a7bf23cba3a68a6b0885e7 Author: Ville Syrjälä Date: Fri Jun 9 15:25:58 2017 -0700 drm/i915/cnl: Implement .get_display_clock_speed() for CNL Add support for reading out the cdclk frequency from the hardware on CNL. Very similar to BXT, with a few new twists and turns: * the PLL is now called CDCLK PLL, not DE PLL * reference clock can be 24 MHz in addition to the 19.2 MHz BXT had * the ratio now lives in the PLL enable register * Only 1x and 2x CD2X dividers are supported v2: Deal with PLL lock bit the same way as BXT/SKL do now v3: DSSM refclk indicator is bit 31 not 24 (Ander) v4: Rebased by Rodrigo after Ville's cdclk rework. v5: Set cdclk to the ref clock as previous platforms. (Imre) Signed-off-by: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Imre Deak Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1497047175-27250-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 5 ++++ drivers/gpu/drm/i915/intel_cdclk.c | 56 +++++++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) commit 833689044e13a3fb8c6c03ad868375670d97010b Merge: 63a2f31 0ae0bb3 Author: Kalle Valo Date: Mon Jun 12 19:29:39 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-06-06' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next First batch of iwlwifi driver patches 4.13 * Loads of FW API documentation improvements (for tools and htmldoc); * Continued work for the new A000 family; * Bumped the maximum supported FW API to 31; * Improve the differentiation between 8000, 9000 and A000 families; * A lot of fixes and cleanups here and there; kvalo: There were conflicts iwl_mvm_stop_device() and iwl_mvm_tcool_set_cur_state(). The former was easy but latter needed more thought. Apparently the mutex was taken too late, so I fixed so that the mutex is taken first and then check for iwl_mvm_firmware_running(). commit a1fa1a00b31c9155501d81f5396b2f6d76871fbe Author: Thomas Bogendoerfer Date: Mon Jun 12 14:54:57 2017 +0200 net: phy: marvell: Show complete link partner advertising Give back all modes advertised by the link partner. This change brings the marvell phy driver in line with all other phy drivers. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 7 ------- 1 file changed, 7 deletions(-) commit c3d28e537999bc7c7d39ca09d11252137e1fee02 Author: Tony Lindgren Date: Thu Jun 1 07:26:37 2017 -0700 ARM: dts: omap4-droid4: Configure CPCAP battery driver Configure CPCAP battery driver. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit be4e456ed3a5918f4e75f532837bb19128a690c9 Author: Linus Walleij Date: Sun Jun 4 10:50:08 2017 +0200 ata: Add driver for Faraday Technology FTIDE010 This adds a driver for the Faraday Technology FTIDE010 PATA IP block. When used with the Storlink/Storm/Cortina Systems Gemini SoC, the PATA interface is accompanied by a PATA<->SATA bridge, so while the device appear as a PATA controller, it attaches physically to SATA disks, and also has a designated memory area with registers to set up the bridge. The Gemini SATA bridge is separated into its own driver file to make things modular and make it possible to reuse the PATA driver as stand-alone on other systems than the Gemini. dmesg excerpt from the D-Link DIR-685 storage router: gemini-sata-bridge 46000000.sata: SATA ID 00000e00, PHY ID: 01000100 gemini-sata-bridge 46000000.sata: set up the Gemini IDE/SATA nexus ftide010 63000000.ata: set up Gemini PATA0 ftide010 63000000.ata: device ID 00000500, irq 26, io base 0x63000000 ftide010 63000000.ata: SATA0 (master) start gemini-sata-bridge 46000000.sata: SATA0 PHY ready scsi host0: pata-ftide010 ata1: PATA max UDMA/133 irq 26 ata1.00: ATA-8: INTEL SSDSA2CW120G3, 4PC10302, max UDMA/133 ata1.00: 234441648 sectors, multi 1: LBA48 NCQ (depth 0/32) ata1.00: configured for UDMA/133 scsi 0:0:0:0: Direct-Access ATA INTEL SSDSA2CW12 0302 PQ: 0 ANSI: 5 ata1.00: Enabling discard_zeroes_data sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/112 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 ata1.00: Enabling discard_zeroes_data ata1.00: Enabling discard_zeroes_data sd 0:0:0:0: [sda] Attached SCSI disk After this I can flawlessly mount and read/write copy etc files from /dev/sda[n]. Cc: John Feng-Hsin Chiang Cc: Greentime Hu Acked-by: Hans Ulli Kroll Signed-off-by: Linus Walleij Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo MAINTAINERS | 9 + drivers/ata/Kconfig | 21 ++ drivers/ata/Makefile | 2 + drivers/ata/pata_ftide010.c | 567 ++++++++++++++++++++++++++++++++++++++++++++ drivers/ata/sata_gemini.c | 438 ++++++++++++++++++++++++++++++++++ drivers/ata/sata_gemini.h | 21 ++ 6 files changed, 1058 insertions(+) commit 3420fdfaceb2c55823c3ff4674f690a5d1cf0b14 Author: Linus Walleij Date: Sun Jun 4 10:50:07 2017 +0200 ata: Add DT bindings for the Gemini SATA bridge This adds device tree bindings for the Cortina Systems Gemini PATA to SATA bridge. Cc: devicetree@vger.kernel.org Cc: John Feng-Hsin Chiang Cc: Greentime Hu Acked-by: Hans Ulli Kroll Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Tejun Heo .../bindings/ata/cortina,gemini-sata-bridge.txt | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit af36ddc988922adc00221b37662120cd78f4aa7d Author: Linus Walleij Date: Sun Jun 4 10:50:06 2017 +0200 ata: Add DT bindings for Faraday Technology FTIDE010 This adds device tree bindings for the Faraday Technology FTIDE010 found in the Storlink/Storm/Cortina Systems Gemini SoC. I am not 100% sure that this part is from Faraday Technology but a lot points in that direction: - A later IDE interface called FTIDE020 exist and share some properties. - The SATA bridge has the same Built In Self Test (BIST) that the Faraday FTSATA100 seems to have, and it has version number 0100 in the device ID register, so this is very likely a FTSATA100 bundled with the FTIDE010. Cc: devicetree@vger.kernel.org Cc: John Feng-Hsin Chiang Cc: Greentime Hu Acked-by: Hans Ulli Kroll Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Tejun Heo .../devicetree/bindings/ata/faraday,ftide010.txt | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit c6503be587e9c5c0aac4e2b45de982352f676a5b Author: Thomas Gleixner Date: Mon Jun 12 17:21:26 2017 +0200 posix-timers: Fix inverted SIGEV_NONE logic in common_timer_get() The refactoring of the posix-timer core to allow better code sharing introduced inverted logic vs. SIGEV_NONE timers in common_timer_get(). That causes hrtimer_forward() to be called on active timers, which rightfully triggers the warning hrtimer_forward(). Make sig_none what it says: signal mode == SIGEV_NONE. Fixes: 91d57bae0868 ("posix-timers: Make use of forward/remaining callbacks") Reported-by: Ye Xiaolong Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170609104457.GA39907@inn.lkp.intel.com kernel/time/posix-timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c484f2564db12fa2b01b198ecb6ff0751a3e5e32 Author: Jonathan (Zhixiong) Zhang Date: Thu Jun 8 18:25:29 2017 +0100 arm64: kconfig: allow support for memory failure handling Declare ARCH_SUPPORTS_MEMORY_FAILURE, as arm64 does support memory failure recovery attempt. Signed-off-by: Jonathan (Zhixiong) Zhang Signed-off-by: Tyler Baicar (Dropped changes to ACPI APEI Kconfig and updated commit log) Signed-off-by: Punit Agrawal Acked-by: Steve Capper Tested-by: Manoj Iyer Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0e3a9026396cd7d0eb5777ba923a8f30a3d9db19 Author: Punit Agrawal Date: Thu Jun 8 18:25:28 2017 +0100 arm64: mm: Update perf accounting to handle poison faults Re-organise the perf accounting for fault handling in preparation for enabling handling of hardware poison faults in subsequent commits. The change updates perf accounting to be inline with the behaviour on x86. With this update, the perf fault accounting - * Always report PERF_COUNT_SW_PAGE_FAULTS * Doesn't report anything else for VM_FAULT_ERROR (which includes hwpoison faults) * Reports PERF_COUNT_SW_PAGE_FAULTS_MAJ if it's a major fault (indicated by VM_FAULT_MAJOR) * Otherwise, reports PERF_COUNT_SW_PAGE_FAULTS_MIN Signed-off-by: Punit Agrawal Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 68 +++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 32 deletions(-) commit e7c600f149b89e06073ab50f4f12e79828d3d2f0 Author: Jonathan (Zhixiong) Zhang Date: Thu Jun 8 18:25:27 2017 +0100 arm64: hwpoison: add VM_FAULT_HWPOISON[_LARGE] handling Add VM_FAULT_HWPOISON[_LARGE] handling to the arm64 page fault handler. Handling of VM_FAULT_HWPOISON[_LARGE] is very similar to VM_FAULT_OOM, the only difference is that a different si_code (BUS_MCEERR_AR) is passed to user space and si_addr_lsb field is initialized. Signed-off-by: Jonathan (Zhixiong) Zhang Signed-off-by: Tyler Baicar (fix new __do_user_fault call-site) Signed-off-by: Punit Agrawal Acked-by: Steve Capper Tested-by: Manoj Iyer Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit f02ab08afbe76ee7b0b2a34a9970e7dd200d8b01 Author: Punit Agrawal Date: Thu Jun 8 18:25:26 2017 +0100 arm64: hugetlb: Fix huge_pte_offset to return poisoned page table entries When memory failure is enabled, a poisoned hugepage pte is marked as a swap entry. huge_pte_offset() does not return the poisoned page table entries when it encounters PUD/PMD hugepages. This behaviour of huge_pte_offset() leads to error such as below when munmap is called on poisoned hugepages. [ 344.165544] mm/pgtable-generic.c:33: bad pmd 000000083af00074. Fix huge_pte_offset() to return the poisoned pte which is then appropriately handled by the generic layer code. Signed-off-by: Punit Agrawal Acked-by: Steve Capper Reviewed-by: Catalin Marinas Cc: David Woods Tested-by: Manoj Iyer Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/mm/hugetlbpage.c | 29 ++++++++++------------------- 2 files changed, 11 insertions(+), 20 deletions(-) commit e0090a9e979de5202c7d16c635dea2f005221073 Author: Roopa Prabhu Date: Sun Jun 11 16:32:50 2017 -0700 vxlan: dont migrate permanent fdb entries during learn This patch fixes vxlan_snoop to not move permanent fdb entries on learn events. This is consistent with the bridge fdb handling of permanent entries. Fixes: 26a41ae60438 ("vxlan: only migrate dynamic FDB entries") Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b6d58acdb26de8995f854cbf8b0d7214eefd884 Author: Kunihiko Hayashi Date: Mon Jun 12 15:07:39 2017 +0900 arm64: dts: uniphier: add support for LD20 Global board Add initial device tree support for LD20 Global board. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/Makefile | 1 + .../boot/dts/socionext/uniphier-ld20-global.dts | 52 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit 96f5a269b3a1d4a79bcc3f7ccc1f07140ce57516 Author: Kunihiko Hayashi Date: Mon Jun 12 15:07:38 2017 +0900 arm64: dts: uniphier: add support for LD11 Global board Add initial device tree support for LD11 Global board. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/Makefile | 1 + .../boot/dts/socionext/uniphier-ld11-global.dts | 70 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit 8f66439eec46d652255b9351abebb540ee5b2fd9 Merge: 22ec656 32c1431 Author: Jens Axboe Date: Mon Jun 12 08:30:13 2017 -0600 Merge tag 'v4.12-rc5' into for-4.13/block We've already got a few conflicts and upcoming work depends on some of the changes that have gone into mainline as regression fixes for this series. Pull in 4.12-rc5 to resolve these conflicts and make it easier on down stream trees to continue working on 4.13 changes. Signed-off-by: Jens Axboe commit a752598254016d2f9b4415d43a6402fe083f70b2 Author: Heiko Carstens Date: Sat Jun 3 10:56:07 2017 +0200 s390: rename struct psw_bits members Rename a couple of the struct psw_bits members so it is more obvious for what they are good. Initially I thought using the single character names from the PoP would be sufficient and obvious, but admittedly that is not true. The current implementation is not easy to use, if one has to look into the source file to figure out which member represents the 'per' bit (which is the 'r' member). Therefore rename the members to sane names that are identical to the uapi psw mask defines: r -> per i -> io e -> ext t -> dat m -> mcheck w -> wait p -> pstate Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ptrace.h | 38 +++++++++++++++++++------------------- arch/s390/kernel/dumpstack.c | 4 ++-- arch/s390/kernel/perf_cpum_sf.c | 10 +++++----- arch/s390/kernel/uprobes.c | 4 ++-- arch/s390/kvm/gaccess.c | 10 +++++----- arch/s390/kvm/priv.c | 2 +- arch/s390/mm/init.c | 2 +- 7 files changed, 35 insertions(+), 35 deletions(-) commit 8bb3fdd6863c3b6b84bbab750d6b35e889c1399d Author: Heiko Carstens Date: Sat Jun 3 10:19:55 2017 +0200 s390: rename psw_bits enums The address space enums that must be used when modifying the address space part of a psw with the psw_bits() macro can easily be confused with the psw defines that are used to mask and compare directly the mask part of a psw. We have e.g. PSW_AS_PRIMARY vs PSW_ASC_PRIMARY. To avoid confusion rename the PSW_AS_* enums to PSW_BITS_AS_*. In addition also rename the PSW_AMODE_* enums, so they also follow the same naming scheme: PSW_BITS_AMODE_*. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ptrace.h | 14 +++++++------- arch/s390/kernel/uprobes.c | 8 ++++---- arch/s390/kvm/gaccess.c | 12 ++++++------ arch/s390/kvm/gaccess.h | 4 ++-- arch/s390/kvm/guestdbg.c | 6 +++--- arch/s390/kvm/priv.c | 6 +++--- arch/s390/mm/init.c | 2 +- 7 files changed, 26 insertions(+), 26 deletions(-) commit 60c497014e34af5aa0be56d0869c67fa2b5c3786 Author: Heiko Carstens Date: Thu Jun 1 11:04:04 2017 +0200 s390/mm: use correct address space when enabling DAT Right now the kernel uses the primary address space until finally the switch to the correct home address space will be done when the idle PSW will be loaded within psw_idle(). Correct this and simply use the home address space when DAT is enabled for the first time. This doesn't really fix a bug, but fixes odd behavior. Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 36f6237ebf4dfdf62813540e962d53584ba8b271 Author: Sebastian Ott Date: Mon May 15 15:49:07 2017 +0200 s390/cio: introduce io_subchannel_type The sysfs attributes implemented by the vfio_ccw driver are also implemented by the io_subchannel driver. Move these into a device_type which is set by the css bus. Signed-off-by: Sebastian Ott Reviewed-by: Dong Jia Shi Reviewed-by: Cornelia Huck Signed-off-by: Martin Schwidefsky drivers/s390/cio/css.c | 49 ++++++++++++++++++++++++++++++++++ drivers/s390/cio/device.c | 42 ----------------------------- drivers/s390/cio/vfio_ccw_drv.c | 58 +---------------------------------------- 3 files changed, 50 insertions(+), 99 deletions(-) commit ead1dec8ed0497c4a3f7fc36135899e5f26563ab Author: Heiko Carstens Date: Tue Jun 6 13:55:42 2017 +0200 s390/ipl: revert Load Normal semantics for LPAR CCW-type re-IPL This reverts the two commits 7afbeb6df2aa ("s390/ipl: always use load normal for CCW-type re-IPL") 0f7451ff3ab8 ("s390/ipl: use load normal for LPAR re-ipl") The two commits did not take into account that behavior of standby memory changes fundamentally if the re-IPL method is changed from Load Clear to Load Normal. In case of the old re-IPL clear method all memory that was initially in standby state will be put into standby state again within the re-IPL process. Or in other words: memory that was brought online before a re-IPL will be offline again after a reboot. Given that we use different re-IPL methods depending on the hypervisor and CCW-type vs SCSI re-IPL it is not easy to tell in advance when and why memory will stay online or will be offline after a re-IPL. This does also have other side effects, since memory that is online from the beginning will be in ZONE_NORMAL by default vs ZONE_MOVABLE for memory that is offline. Therefore, before the change, a user could online and offline memory easily since standby memory was always in ZONE_NORMAL. After the change, and a re-IPL, this depended on which memory parts were online before the re-IPL. From a usability point of view the current behavior is more than suboptimal. Therefore revert these changes until we have a better solution and get back to a consistent behavior. The bad thing about this is that the time required for a re-IPL will be significantly increased for configurations with several 100GB or 1TB of memory. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2b7b9817c2dbfce0501a313db817718fc5ef6524 Author: Heiko Carstens Date: Tue Jun 6 10:04:26 2017 +0200 s390/dumpstack: remove raw stack dump Remove raw stack dumps that are printed before call traces in case of a warning, or the 'l' sysrq trigger (show a stack backtrace for all active CPUs). Besides that a raw stack dump should not be shown for the 'l' sysrq trigger the value of the dump is close to zero. That's also why we don't print it in case of a panic since ages anymore. That this is still printed on warnings is just a leftover. So get rid of this completely. The following won't be printed anymore with this change: Stack: 00000000bbc4fbc8 00000000bbc4fc58 0000000000000003 0000000000000000 00000000bbc4fcf8 00000000bbc4fc70 00000000bbc4fc70 0000000000000020 000000007fe00098 00000000bfe8be00 00000000bbc4fe94 000000000000000a 000000000000000c 00000000bbc4fcc0 0000000000000000 0000000000000000 000000000095b930 0000000000113366 00000000bbc4fc58 00000000bbc4fca0 Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dumpstack.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) commit e8ac01555d9e464249e8bb122337d6d6e5589ccc Author: Stefan Haberland Date: Thu May 18 13:24:45 2017 +0200 s390/dasd: fix hanging safe offline The safe offline processing may hang forever because it waits for I/O which can not be started because of the offline flag that prevents new I/O from being started. Allow I/O to be started during safe offline processing because in this special case we take care that the queues are empty before throwing away the device. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2757fe1d8ebd0e6ab1dbf1105978b8c8369dcc49 Author: Stefan Haberland Date: Tue May 16 10:30:13 2017 +0200 s390/dasd: fix unusable device after safe offline processing The safe offline processing needs, as well as the normal offline processing, to be locked against multiple parallel executions. But it should be able to be overtaken by a normal offline processing to make sure that the device does not wait forever for outstanding I/O if the user wants to. Unfortunately the parallel processing of safe offline and normal offline might lead to a race situation where both threads report successful execution to the CIO layer which in turn tries to deregister the kobject of the device twice. This leads to a refcount_t: underflow; use-after-free. error and the device is not able to be set online again afterwards without a reboot. Correct the locking of the safe offline processing by doing the following: - Use the cdev lock to secure all set and test operations to the device flags. - Two safe offline processes are locked against each other using the DASD_FLAG_SAFE_OFFLINE and DASD_FLAG_SAFE_OFFLINE_RUNNING device flags. The differentiation between offline triggered and offline running is needed since the normal offline attribute is owned by CIO and we have to pass over control in between. - The dasd_generic_set_offline process handles the offline processing. It is locked against parallel execution using the DASD_FLAG_OFFLINE. - Only a running safe offline should be able to be overtaken by a single normal offline. This is ensured by clearing the DASD_FLAG_SAFE_OFFLINE_RUNNING flag when a normal offline overtakes. So this can only happen ones. - The safe offline just aborts in this case doing nothing and the normal offline processing finishes as usual. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 68 ++++++++++++++++++++++------------------ drivers/s390/block/dasd_devmap.c | 7 ++++- 2 files changed, 44 insertions(+), 31 deletions(-) commit b487a914f853545842a0899329b6b72fe56c4081 Author: Jan Höppner Date: Tue May 23 16:17:30 2017 +0200 s390/dasd: Display read-only attribute correctly We have two flags, DASD_FLAG_DEVICE_RO and DASD_FEATURE_READONLY, that tell us whether a device is read-only. DASD_FLAG_DEVICE_RO is set when a device is attached as read-only to z/VM and DASD_FEATURE_READONLY is set when either the corresponding kernel parameter is configured, or the read-only state is changed via sysfs. This is valuable information in any case. However, only the feature flag is being checked at the moment when we display the current state. Fix this by checking both flags. Reviewed-by: Stefan Haberland Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_devmap.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 7e9710af2301e76421a6a8f2655937651279f5c4 Author: Logan Gunthorpe Date: Mon May 29 13:13:08 2017 -0600 s390: provide default ioremap and iounmap declaration Move the CONFIG_PCI device so that ioremap and iounmap are always available. This looks safe as there's nothing PCI specific in the implementation of these functions. I have designs to use these functions in scatterlist.c where they'd likely never be called without CONFIG_PCI set, but this is needed to compile such changes. Signed-off-by: Logan Gunthorpe Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Sebastian Ott Cc: Al Viro Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/include/asm/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c39457ff1fd58bf5cc466025b1467de29ba0437a Author: Thomas Richter Date: Tue May 23 10:49:35 2017 +0200 s390/perf: fix null string in perf list pmu command Command 'perf list pmu' displays events which contain an invalid string "(null)=xxx", where xxx is the pmu event name, for example: cpum_cf/AES_BLOCKED_CYCLES,(null)=AES_BLOCKED_CYCLES/ This is not correct, the invalid string should not be displayed at all. It is caused by an obsolete term in the sysfs attribute file for each s390 CPUMF counter event. Reading from the sysfs file also displays the event name. Fix this by omitting the event name. This patch makes s390 CPUMF sysfs files consistent with other plattforms. This is an interface change between user and kernel but does not break anything. Reading from a counter event sysfs file should only list terms mentioned in the /sys/bus/event_source/devices//format directory. Name is not listed. Reported-by: Zvonko Kosic Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cc18b460dc72fc9020edcd617b3c4b23a577ee19 Author: Heiko Carstens Date: Sat May 20 11:43:26 2017 +0200 s390/mm: add p?d_folded() helper functions Introduce and use p?d_folded() functions to clarify the page table code a bit more. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit f96c6f72bc792e7add27e40ec859a8f5ea72e72b Author: Heiko Carstens Date: Mon May 22 13:27:34 2017 +0200 s390/mm: remove incorrect _REGION3_ENTRY_ORIGIN define _REGION3_ENTRY_ORIGIN defines a wrong mask which can be used to extract a segment table origin from a region 3 table entry. It removes only the lower 11 instead of 12 bits from a region 3 table entry. Luckily this bit is currently always zero, so nothing bad happened yet. In order to avoid future bugs just remove the region 3 specific mask and use the correct generic _REGION_ENTRY_ORIGIN mask. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f5bbd7219891364a6ba1231cb751905045fd4466 Author: Martin Schwidefsky Date: Fri May 19 15:32:09 2017 +0200 s390/ptrace: guarded storage regset for the current task The regset functions for guarded storage are supposed to work on the current task as well. For task == current add the required load and store instructions for the guarded storage control block. Signed-off-by: Martin Schwidefsky arch/s390/kernel/ptrace.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 53d7f25f09eb0ea7cb119d86590f3992656a6892 Author: Heiko Carstens Date: Tue May 23 09:17:24 2017 +0200 s390/facilities: remove stfle requirement All call sites of "stfle" check if the instruction is available before executing it. Therefore there is no reason to have the corresponding facility bit set within the architecture level set. This removes the last more or less odd bit from the list. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/tools/gen_facilities.c | 1 - 1 file changed, 1 deletion(-) commit 8aa8680aa383bf6e2ac2a7d3369097268c75f7da Author: Thomas Huth Date: Mon May 22 17:20:53 2017 +0200 s390: Remove 'message security assist' from the list of vital facilities The code in arch/s390/crypto checks for the availability of the 'message security assist' facility on its own, either by using module_cpu_feature_match(MSA, ...) or by checking the facility bit during cpacf_query(). Thus setting the MSA facility bit in gen_facilities.c as hard requirement is not necessary. We can remove it here, so that the kernel can also run on systems that do not provide the MSA facility yet (like the emulated environment of QEMU, for example). Signed-off-by: Thomas Huth Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/tools/gen_facilities.c | 1 - 1 file changed, 1 deletion(-) commit fe7b274729fc0bab9b4238f875695d36726a6b10 Author: Heiko Carstens Date: Mon May 22 13:16:00 2017 +0200 s390/fault: use _ASCE_ORIGIN instead of PAGE_MASK When masking an ASCE to get its origin use the corresponding define instead of the unrelated PAGE_MASK. This doesn't fix a bug since both masks are identical. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbed23dba0fb153c4566af59da7dfa06b780b0af Author: Harald Freudenberger Date: Fri May 12 18:53:41 2017 +0200 s390/zcrypt: Add some debug messages on failure. Added some dbf debug messages on failure of the most important ioctl calls. These messages are only enabled with dbf level 6 (debug) and so do not affect the normal operating mode which uses level 3 (errors and higher). Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_api.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit bf10b6687c19484cdf28107ec9b4be51c06c7746 Author: Heiko Carstens Date: Fri May 19 09:07:23 2017 +0200 s390/smp: use sigp condition code define Use proper define instead of open-coding the condition code value. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/sigp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cf8edb7a33b7689d4c3429b1d339d29e7c3db86 Author: Christian Borntraeger Date: Thu May 18 13:04:16 2017 +0200 s390/smp: fix false positive kmemleak of mcesa data structure I get number of CPUs - 1 kmemleak hits like unreferenced object 0x37ec6f000 (size 1024): comm "swapper/0", pid 1, jiffies 4294937330 (age 889.690s) hex dump (first 32 bytes): 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk backtrace: [<000000000034a848>] kmem_cache_alloc+0x2b8/0x3d0 [<00000000001164de>] __cpu_up+0x456/0x488 [<000000000016f60c>] bringup_cpu+0x4c/0xd0 [<000000000016d5d2>] cpuhp_invoke_callback+0xe2/0x9e8 [<000000000016f3c6>] cpuhp_up_callbacks+0x5e/0x110 [<000000000016f988>] _cpu_up+0xe0/0x158 [<000000000016faf0>] do_cpu_up+0xf0/0x110 [<0000000000dae1ee>] smp_init+0x126/0x130 [<0000000000d9bd04>] kernel_init_freeable+0x174/0x2e0 [<000000000089fc62>] kernel_init+0x2a/0x148 [<00000000008adce2>] kernel_thread_starter+0x6/0xc [<00000000008adcdc>] kernel_thread_starter+0x0/0xc [] 0xffffffffffffffff The pointer of this data structure is stored in the prefix page of that CPU together with some extra bits ORed into the the low bits. Mark the data structure as non-leak. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) commit ac994e80f94f440138774830f2edf148d6ece1f3 Author: Harald Freudenberger Date: Fri May 12 16:35:14 2017 +0200 s390/zcrypt: Rework ap init in case of out of range domain param. When a out of range domain parameter was given, the init function returned with -EINVAL and the driver was not operational. As the driver is statically build into the kernel and is able to work with multiple domains anyway the init function should continue. Now the user has a chance to write a new default domain value via sysfs attribute file. Also added two new dbf debug messages related to the domain value handling. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_bus.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 20d58cb642c640406f6466c64a0899400f52c47b Author: Heiko Carstens Date: Mon May 8 08:03:32 2017 +0200 s390/hvc_iucv: fix broken Kconfig select statement Select statements in Kconfig do not necessarily enable all required dependencies and can lead to broken configs. This is also the case for the "select IUCV" statement within HVC_IUCV: warning: (HVC_IUCV) selects IUCV which has unmet direct dependencies (NET && S390) Just add the missing "depends on NET" to avoid broken configs. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/tty/hvc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4684f98d3453dd07cc7ce67e0e795330eeec9c5 Author: Harald Freudenberger Date: Thu May 11 17:15:54 2017 +0200 s390/crypto: fix aes/paes Kconfig dependeny The s390_paes and the s390_aes kernel module used just one config symbol CONFIG_CRYPTO_AES. As paes has a dependency to PKEY and this requires ZCRYPT the aes module also had a dependency to the zcrypt device driver which is not true. Fixed by introducing a new config symbol CONFIG_CRYPTO_PAES which has dependencies to PKEY and ZCRYPT. Removed the dependency for the aes module to ZCRYPT. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/Makefile | 3 ++- drivers/crypto/Kconfig | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) commit a1b19d07ca71d6c60b49771f244fc6536cd15358 Author: Harald Freudenberger Date: Mon May 15 12:38:15 2017 +0200 s390/zcrypt: remove unused function zcrypt_type6_mex_key_de() Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_cca_key.h | 85 ------------------------------------ 1 file changed, 85 deletions(-) commit 8ff3458865ef43de80c10a32a4797bb941840aee Author: Heiko Carstens Date: Tue May 9 12:19:16 2017 +0200 s390/zcrypt: get rid of little/big endian handling The zcrypt code contains a couple of functions which receive a "big_endian" argument. All callers naturally pass "1" for big endian, since s390 is big endian. Therefore get rid of this argument and also get rid of the cpu_to_le()/cpu_to_be() calls. This way we get rid of a couple of sparse warnings: drivers/s390/crypto/zcrypt_cca_key.h:255:34: warning: incorrect type in assignment (different base types) expected unsigned short [unsigned] ulen got restricted __be16 [usertype] Cc: Harald Freudenberger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_cca_key.h | 36 +++++++++-------------------------- drivers/s390/crypto/zcrypt_msgtype6.c | 4 ++-- 2 files changed, 11 insertions(+), 29 deletions(-) commit 35bb092a91b4c43a2079d3d5458b74a059455b6c Author: Martin Schwidefsky Date: Mon May 15 10:23:38 2017 +0200 s390/vdso: use _install_special_mapping to establish vdso Switch to the improved _install_special_mapping function to install the vdso mapping. This has two advantages, the arch_vma_name function is not needed anymore and the vdso vma still has its name after its memory location has been changed with mremap. Tested-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/kernel/vdso.c | 91 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 27 deletions(-) commit b29e061bb7a8d2e2fbf7826fb30ab5477d595e92 Author: Martin Schwidefsky Date: Fri May 12 15:31:38 2017 +0200 s390/cputime: simplify account_system_index_scaled The account_system_index_scaled gets two cputime values, a raw value derived from CPU timer deltas and a scaled value. The scaled value is always calculated from the raw value, the code can be simplified by moving the scale_vtime call into account_system_index_scaled. Signed-off-by: Martin Schwidefsky arch/s390/kernel/vtime.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 6c386da799078fddb482bc5c1ab6a62c9a360e4e Author: Heiko Carstens Date: Fri May 12 12:57:40 2017 +0200 s390: use two more generic header files I missed at least these two header files where we can make use of the generic ones. vga.h is another one, however that is already addressed by a patch from Jiri Slaby. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/Kbuild | 2 ++ arch/s390/include/asm/device.h | 10 ---------- arch/s390/include/asm/fb.h | 12 ------------ 3 files changed, 2 insertions(+), 22 deletions(-) commit 7a003637923e9b127dec84fd55b67f4c2c900684 Author: Heiko Carstens Date: Tue May 9 12:42:26 2017 +0200 s390/pkey: add missing __user annotations Add missing __user annotations to get rid of a couple of sparse warnings. All callers actually pass kernel pointers instead of user space pointers, however the pointers are being used within KERNEL_DS. So everything is fine. Corresponding sparse warnings: drivers/s390/crypto/pkey_api.c:181:41: warning: incorrect type in assignment (different address spaces) expected char [noderef] *request_control_blk_addr got void * Cc: Harald Freudenberger Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/crypto/pkey_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3050c20821d7e9f15566d105da9a0913de61e85c Author: Jan Höppner Date: Tue May 9 14:07:37 2017 +0200 s390/dasd: Remove variable sized array Dynamic stack allocations are considered bad. Get rid of this one occurrence and use kstrdup() instead. Also, set the return codes so that we have only one exit where we can call kfree(). Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_devmap.c | 47 +++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 17 deletions(-) commit 9861dbd5b4a422ae03a8caa2fa6d2827912aa952 Author: Sebastian Ott Date: Fri Feb 24 17:50:17 2017 +0100 s390/scm: use multiple queues Exploit multiple hardware contexts (queues) that can process requests in parallel. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/block/scm_blk.c | 52 ++++++++++++++++++++++++++++++++++---------- drivers/s390/block/scm_blk.h | 3 +-- 2 files changed, 42 insertions(+), 13 deletions(-) commit c7b3e92331fbb905579e67aeed202a37eade54b2 Author: Sebastian Ott Date: Tue Jan 31 16:15:25 2017 +0100 s390/scm: convert tasklet Drop the tasklet that was used to complete requests in favor of block layer helpers that finish the IO on the CPU that initiated it. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/block/scm_blk.c | 54 ++++++++++++-------------------------------- drivers/s390/block/scm_blk.h | 1 - 2 files changed, 15 insertions(+), 40 deletions(-) commit 12d9076265398eb2fec3c5dabe7b6713bca8bac9 Author: Sebastian Ott Date: Wed Jan 25 16:18:53 2017 +0100 s390/scm: convert to blk-mq Convert scm_blk to use the blk-mq API. This is just a simple conversion since we still use a single queue. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/block/scm_blk.c | 137 +++++++++++++++++++++++-------------------- drivers/s390/block/scm_blk.h | 2 + 2 files changed, 74 insertions(+), 65 deletions(-) commit 94d26bfcf31244d24fddbe7ba5b0dd17f3c32b11 Author: Sebastian Ott Date: Thu Dec 1 12:51:32 2016 +0100 s390/scm: remove cluster option Remove CONFIG_SCM_BLOCK_CLUSTER_WRITE and related code. This quirk is no longer needed on current hardware. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/block/Kconfig | 7 - drivers/s390/block/Makefile | 3 - drivers/s390/block/scm_blk.c | 45 +------ drivers/s390/block/scm_blk.h | 54 -------- drivers/s390/block/scm_blk_cluster.c | 255 ----------------------------------- 5 files changed, 3 insertions(+), 361 deletions(-) commit d12a3d603690ba84b7e3fd357f05b96e777d4630 Author: Heiko Carstens Date: Tue May 9 13:44:43 2017 +0200 s390/mm: add __rcu annotations Add __rcu annotations so sparse correctly warns only if "slot" gets derefenced without using rcu_dereference(). Right now we get warnings because of the missing annotation: arch/s390/mm/gmap.c:135:17: warning: incorrect type in assignment (different address spaces) arch/s390/mm/gmap.c:135:17: expected void **slot arch/s390/mm/gmap.c:135:17: got void [noderef] ** Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/gmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cb4ef3c20bd95e21dddc1101133d90ac7f049a53 Author: Heiko Carstens Date: Tue May 9 12:44:21 2017 +0200 s390/pkey: make pkey_init() static drivers/s390/crypto/pkey_api.c:1197:12: warning: symbol 'pkey_init' was not declared. Should it be static? Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/crypto/pkey_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92acfb7406171038ae4e3b6041576642cb75b529 Author: Heiko Carstens Date: Tue May 9 11:01:26 2017 +0200 s390: add missing header includes for type checking Add missing include statements to make sure that prototypes match implementation. As reported by sparse: arch/s390/crypto/arch_random.c:18:1: warning: symbol 's390_arch_random_available' was not declared. Should it be static? arch/s390/kernel/traps.c:279:13: warning: symbol 'trap_init' was not declared. Should it be static? Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/crypto/arch_random.c | 1 + arch/s390/kernel/traps.c | 1 + 2 files changed, 2 insertions(+) commit 1aea9b3f921003f0880f0676ae85d87c9f1cb4a2 Author: Martin Schwidefsky Date: Mon Apr 24 18:19:10 2017 +0200 s390/mm: implement 5 level pages tables Add the logic to upgrade the page table for a 64-bit process to five levels. This increases the TASK_SIZE from 8PB to 16EB-4K. Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 2 +- arch/s390/include/asm/page.h | 3 ++ arch/s390/include/asm/pgalloc.h | 25 ++++++++++-- arch/s390/include/asm/pgtable.h | 80 ++++++++++++++++++++++++++++++++------- arch/s390/include/asm/processor.h | 4 +- arch/s390/include/asm/tlb.h | 15 ++++++++ arch/s390/mm/dump_pagetables.c | 23 +++++++++-- arch/s390/mm/gmap.c | 5 ++- arch/s390/mm/gup.c | 33 +++++++++++++--- arch/s390/mm/hugetlbpage.c | 30 +++++++++------ arch/s390/mm/mmap.c | 4 +- arch/s390/mm/pageattr.c | 30 +++++++++++++-- arch/s390/mm/pgalloc.c | 57 ++++++++++++++++++---------- arch/s390/mm/pgtable.c | 6 ++- arch/s390/mm/vmem.c | 44 ++++++++++++++++++--- 15 files changed, 289 insertions(+), 72 deletions(-) commit b46c73378c8436c3cd3fa19cead57a645adb0ed0 Author: Greg Kroah-Hartman Date: Fri Aug 23 14:12:09 2013 -0700 driver-core: remove struct bus_type.dev_attrs Now that all in-kernel users of bus_type.dev_attrs have been converted to use dev_groups instead, the dev_attrs field, and logic surrounding it, can be removed. Signed-off-by: Greg Kroah-Hartman drivers/base/bus.c | 37 +------------------------------------ include/linux/device.h | 2 -- 2 files changed, 1 insertion(+), 38 deletions(-) commit 205a1ee15d924df412cb8bdefafafc5b53b21153 Author: Greg Kroah-Hartman Date: Tue Jun 6 14:17:27 2017 +0200 powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Vineet Gupta Cc: Bart Van Assche Cc: Robin Murphy Cc: Joerg Roedel Cc: Johan Hovold Cc: Alexey Kardashevskiy Cc: Krzysztof Kozlowski Cc: Acked-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman arch/powerpc/platforms/pseries/vio.c | 56 +++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 23 deletions(-) commit 451e3f1a740d2b453c7358a07421d427315483e6 Author: Greg Kroah-Hartman Date: Tue Jun 6 14:26:12 2017 +0200 powerpc: vio: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Vineet Gupta Cc: Bart Van Assche Cc: Robin Murphy Cc: Joerg Roedel Cc: Johan Hovold Cc: Alexey Kardashevskiy Cc: Krzysztof Kozlowski Cc: Acked-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman arch/powerpc/platforms/pseries/vio.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit cc3d53def83a99636e16ceb70a79eedc61fddc23 Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:14 2017 +0200 USB: usbip: convert to use DRIVER_ATTR_RW We are trying to get rid of DRIVER_ATTR(), and the usbip driver attribute can be trivially changed to use DRIVER_ATTR_RW(). Cc: Valentina Manea Cc: Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 36369569adc767a5f3c680c85b5fca6664511722 Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:13 2017 +0200 s390: drivers: convert to use DRIVER_ATTR_RO/WO We are trying to get rid of DRIVER_ATTR(), and the s390 drivers' attributes can be trivially changed to use DRIVER_ATTR_RO() and DRIVER_ATTR_WO(). Cc: Martin Schwidefsky Cc: Julian Wiedmann Cc: Ursula Braun Cc: Peter Oberparleiter Cc: Gerald Schaefer Cc: Acked-by: Heiko Carstens Signed-off-by: Greg Kroah-Hartman drivers/s390/char/sclp.c | 12 ++++++------ drivers/s390/char/vmlogrdr.c | 7 ++----- drivers/s390/net/ctcm_main.c | 6 +++--- drivers/s390/net/lcs.c | 6 +++--- drivers/s390/net/netiucv.c | 14 ++++++-------- drivers/s390/net/qeth_core_main.c | 6 +++--- 6 files changed, 23 insertions(+), 28 deletions(-) commit ac3054c4f6daa57c2af71abc312b396c68fde71a Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:12 2017 +0200 platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW We are trying to get rid of DRIVER_ATTR(), and the thinkpad_acpi driver's attributes can be trivially changed to use DRIVER_ATTR_RO() and DRIVER_ATTR_RW(). Cc: Henrique de Moraes Holschuh Cc: Andy Shevchenko Cc: Cc: Reviewed-by: Darren Hart (VMware) Acked-by: Henrique de Moraes Holschuh Signed-off-by: Greg Kroah-Hartman drivers/platform/x86/thinkpad_acpi.c | 91 +++++++++++------------------------- 1 file changed, 28 insertions(+), 63 deletions(-) commit ad8f20a4585d6fa6549566143514339af09fb1c7 Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:11 2017 +0200 pcmcia: ds: convert to use DRIVER_ATTR_RO We are trying to get rid of DRIVER_ATTR(), and the pcmcia driver's attribute can be trivially changed to use DRIVER_ATTR_RO(). Cc: Russell King Cc: Signed-off-by: Greg Kroah-Hartman drivers/pcmcia/ds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0457e1ae0f4b88676b0cea30ef6acff24febbbc0 Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:10 2017 +0200 wireless: ipw2x00: convert to use DRIVER_ATTR_RW We are trying to get rid of DRIVER_ATTR(), and the ipw2x00 driver's attributes can be trivially changed to use DRIVER_ATTR_RW(). Cc: Stanislav Yakovlev Cc: Kalle Valo Cc: Cc: Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/intel/ipw2x00/ipw2100.c | 8 +++----- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) commit ce8e0cd892c66be110613876dded547acc66da13 Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:09 2017 +0200 net: ehea: convert to use DRIVER_ATTR_RO We are trying to get rid of DRIVER_ATTR(), and the ehea driver's attribute can be trivially changed to use DRIVER_ATTR_RO(). Cc: Douglas Miller Cc: Acked-by: David S. Miller Signed-off-by: Greg Kroah-Hartman drivers/net/ethernet/ibm/ehea/ehea_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f85205c42eb0423e05c91d0276bfc86b136d42f6 Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:08 2017 +0200 net: caif: convert to use DRIVER_ATTR_RO We are trying to get rid of DRIVER_ATTR(), and the caif driver's attributes can be trivially changed to use DRIVER_ATTR_RO(). Cc: Dmitry Tarnyagin Cc: Acked-by: David S. Miller Signed-off-by: Greg Kroah-Hartman drivers/net/caif/caif_spi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4e70a6fe6dc5d78939d9e155db3bd6cef28ec310 Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:07 2017 +0200 TTY: hvc: convert to use DRIVER_ATTR_RW We are trying to get rid of DRIVER_ATTR(), and the hvc driver's attribute can be trivially changed to use DRIVER_ATTR_RW(). Cc: Jiri Slaby Cc: Signed-off-by: Greg Kroah-Hartman drivers/tty/hvc/hvcs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a942774128deb4a909e85742e20da6e249a92bfe Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:06 2017 +0200 PCI: pci-driver: convert to use DRIVER_ATTR_WO We are trying to get rid of DRIVER_ATTR(), and all of the pci-driver core driver attributes can be trivially changed to use DRIVER_ATTR_WO(). Cc: Bjorn Helgaas Cc: Signed-off-by: Greg Kroah-Hartman drivers/pci/pci-driver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 63a2f310d040a4e42f92d60762c8965cd6f2a5ed Merge: 073cf9e2 219569a Author: David S. Miller Date: Mon Jun 12 10:14:29 2017 -0400 Merge tag 'wireless-drivers-next-for-davem-2017-06-12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.13 The first pull request for 4.13. We have a new driver qtnfmac, but also rsi driver got a support for new firmware and supporting ath10k SDIO devices was started. Major changes: ath10k * add initial SDIO support (still work in progress) rsi * new loading for the new firmware version rtlwifi * final patches for the new btcoex support rt2x00 * add device ID for Epson WN7512BEP qtnfmac * new driver for Quantenna QSR10G chipsets ==================== Signed-off-by: David S. Miller commit c1357e452dc2b0a8c4826144d780e9a552782afe Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:05 2017 +0200 IB: nes: convert to use DRIVER_ATTR_RW We are trying to get rid of DRIVER_ATTR(), and all of the nes.c driver attributes can be trivially changed to use DRIVER_ATTR_RW(), making the code smaller and easier to manage over time. Cc: Faisal Latif Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: Reviewed-by: Bart Van Assche Signed-off-by: Greg Kroah-Hartman drivers/infiniband/hw/nes/nes.c | 80 ++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 49 deletions(-) commit c281032530e723c81c8a230fff215c5ea1792c13 Author: Greg Kroah-Hartman Date: Fri Jun 9 11:03:04 2017 +0200 HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups In the quest to get rid of DRIVER_ATTR(), this patch converts the hid-core code to use DRIVER_ATTR_RO() and also moves to use drv_groups as creating individual sysfs files is not good (it races with userspace notifications.) Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Signed-off-by: Greg Kroah-Hartman drivers/hid/hid-core.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 7d025e0804f2cbeafeba2f5b8effa6361d7db8e4 Author: Maarten Lankhorst Date: Mon Jun 12 12:21:15 2017 +0200 drm/i915: Pass atomic state to backlight enable/disable/set callbacks. Pass crtc_state to the enable callback, and connector_state to all callbacks. This will eliminate the need to guess for the correct pipe in these callbacks. The crtc state is required for pch_enable_backlight to obtain the correct cpu_transcoder. intel_dp_aux_backlight's setup function is called before hw readout, so crtc_state and connector_state->best_encoder are NULL in the enable() and set() callbacks. This fixes the following series of warns from intel_get_pipe_from_connector: [ 219.968428] ------------[ cut here ]------------ [ 219.968481] WARNING: CPU: 3 PID: 2457 at drivers/gpu/drm/i915/intel_display.c:13881 intel_get_pipe_from_connector+0x62/0x90 [i915] [ 219.968483] WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex)) [ 219.968485] Modules linked in: nls_iso8859_1 snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm intel_rapl x86_pkg_temp_thermal coretemp kvm_intel snd_seq_midi snd_seq_midi_event kvm snd_rawmidi irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc snd_seq snd_seq_device serio_raw snd_timer aesni_intel aes_x86_64 crypto_simd glue_helper cryptd lpc_ich snd mei_me shpchp soundcore mei rfkill_gpio mac_hid intel_pmc_ipc parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid igb ahci i915 xhci_pci dca xhci_hcd ptp sdhci_pci sdhci libahci pps_core i2c_hid hid video [ 219.968573] CPU: 3 PID: 2457 Comm: kworker/u8:3 Tainted: G W 4.10.0-tip-201703010159+ #2 [ 219.968575] Hardware name: Intel Corp. Broxton P/NOTEBOOK, BIOS APLKRVPA.X64.0144.B10.1606270006 06/27/2016 [ 219.968627] Workqueue: events_unbound intel_atomic_commit_work [i915] [ 219.968629] Call Trace: [ 219.968640] dump_stack+0x63/0x87 [ 219.968646] __warn+0xd1/0xf0 [ 219.968651] warn_slowpath_fmt+0x4f/0x60 [ 219.968657] ? drm_printk+0x97/0xa0 [ 219.968708] intel_get_pipe_from_connector+0x62/0x90 [i915] [ 219.968756] intel_panel_enable_backlight+0x19/0xf0 [i915] [ 219.968804] intel_edp_backlight_on.part.22+0x33/0x40 [i915] [ 219.968852] intel_edp_backlight_on+0x18/0x20 [i915] [ 219.968900] intel_enable_ddi+0x94/0xc0 [i915] [ 219.968950] intel_encoders_enable.isra.93+0x77/0x90 [i915] [ 219.969000] haswell_crtc_enable+0x310/0x7f0 [i915] [ 219.969051] intel_update_crtc+0x58/0x100 [i915] [ 219.969101] skl_update_crtcs+0x218/0x240 [i915] [ 219.969153] intel_atomic_commit_tail+0x350/0x1000 [i915] [ 219.969159] ? vtime_account_idle+0xe/0x50 [ 219.969164] ? finish_task_switch+0x107/0x250 [ 219.969214] intel_atomic_commit_work+0x12/0x20 [i915] [ 219.969219] process_one_work+0x153/0x3f0 [ 219.969223] worker_thread+0x12b/0x4b0 [ 219.969227] kthread+0x101/0x140 [ 219.969230] ? rescuer_thread+0x340/0x340 [ 219.969233] ? kthread_park+0x90/0x90 [ 219.969237] ? do_syscall_64+0x6e/0x180 [ 219.969243] ret_from_fork+0x2c/0x40 [ 219.969246] ---[ end trace 0a8fa19387b9ad6d ]--- Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100022 Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170612102115.23665-4-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 25 ++-- drivers/gpu/drm/i915/intel_drv.h | 7 +- drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c | 22 ++-- drivers/gpu/drm/i915/intel_panel.c | 157 +++++++++++++------------ 4 files changed, 115 insertions(+), 96 deletions(-) commit 90d7cd240308e3d77c414224c47f42f2362c3e21 Author: Maarten Lankhorst Date: Mon Jun 12 12:21:14 2017 +0200 drm/i915: Pass connector state to intel_panel_set_backlight_acpi Passing the state is also needed to convert the backlight functions to use the correct state instead of looking it up. This is done as a separate commit to allow easier bisecting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100022 Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170612102115.23665-3-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_opregion.c | 2 +- drivers/gpu/drm/i915/intel_panel.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit b037d58f976204544f4266840f3538d2ed7e01d9 Author: Maarten Lankhorst Date: Mon Jun 12 12:21:13 2017 +0200 drm/i915: Pass crtc_state and connector state to backlight enable/disable functions The backlight functions need to determine the pipe and the transcoder the backlight will be enabled on, so pass crtc_state instead of trying to dereference the state without holding locks. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100022 Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170612102115.23665-2-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- drivers/gpu/drm/i915/intel_dp.c | 21 ++++++++++++--------- drivers/gpu/drm/i915/intel_drv.h | 10 ++++++---- drivers/gpu/drm/i915/intel_dsi.c | 4 ++-- drivers/gpu/drm/i915/intel_lvds.c | 16 +++------------- drivers/gpu/drm/i915/intel_panel.c | 12 +++++++----- 6 files changed, 32 insertions(+), 35 deletions(-) commit 073cf9e20c333ab29744717a23f9e43ec7512a20 Merge: 78d6102 b65ac44 Author: David S. Miller Date: Mon Jun 12 10:01:30 2017 -0400 Merge branch 'udp-reduce-cache-pressure' Paolo Abeni says: ==================== udp: reduce cache pressure In the most common use case, many skb fields are not used by recvmsg(), and the few ones actually accessed lays on cold cachelines, which leads to several cache miss per packet. This patch series attempts to reduce such misses with different strategies: * caching the interesting fields in the scratched space * avoid accessing at all uninteresting fields * prefetching Tested using the udp_sink program by Jesper[1] as the receiver, an h/w l4 rx hash on the ingress nic, so that the number of ingress nic rx queues hit by the udp traffic could be controlled via ethtool -L. The udp_sink program was bound to the first idle cpu, to get more stable numbers. On a single numa node receiver: nic rx queues vanilla patched kernel delta 1 1850 kpps 1850 kpps 0% 2 2370 kpps 2700 kpps 13.9% 16 2000 kpps 2220 kpps 11% [1] https://github.com/netoptimizer/network-testing/blob/master/src/udp_sink.c v1 -> v2: - replaced secpath_reset() with skb_release_head_state() - changed udp_dev_scratch fields types to u{32,16} variant, replaced bitfield with bool v2 -> v3: - no changes, tested against apachebench for performances regression ==================== Signed-off-by: David S. Miller commit b65ac44674dd9c9c1ad11ebb3ec9e8882990bdb4 Author: Paolo Abeni Date: Mon Jun 12 11:23:43 2017 +0200 udp: try to avoid 2 cache miss on dequeue when udp_recvmsg() is executed, on x86_64 and other archs, most skb fields are on cold cachelines. If the skb are linear and the kernel don't need to compute the udp csum, only a handful of skb fields are required by udp_recvmsg(). Since we already use skb->dev_scratch to cache hot data, and there are 32 bits unused on 64 bit archs, use such field to cache as much data as we can, and try to prefetch on dequeue the relevant fields that are left out. This can save up to 2 cache miss per packet. v1 -> v2: - changed udp_dev_scratch fields types to u{32,16} variant, replaced bitfiled with bool Signed-off-by: Paolo Abeni Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/udp.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 103 insertions(+), 11 deletions(-) commit 0a463c78d25b9464b77311d9dda297550a2d6aa5 Author: Paolo Abeni Date: Mon Jun 12 11:23:42 2017 +0200 udp: avoid a cache miss on dequeue Since UDP no more uses sk->destructor, we can clear completely the skb head state before enqueuing. Amend and use skb_release_head_state() for that. All head states share a single cacheline, which is not normally used/accesses on dequeue. We can avoid entirely accessing such cacheline implementing and using in the UDP code a specialized skb free helper which ignores the skb head state. This saves a cacheline miss at skb deallocation time. v1 -> v2: replaced secpath_reset() with skb_release_head_state() Signed-off-by: Paolo Abeni Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/skbuff.h | 2 ++ net/core/skbuff.c | 24 ++++++++++++++++++++---- net/ipv4/udp.c | 6 +++++- 3 files changed, 27 insertions(+), 5 deletions(-) commit 3889a803e1da9bd7cd10d6504bf281ee7e55dfd6 Author: Paolo Abeni Date: Mon Jun 12 11:23:41 2017 +0200 net: factor out a helper to decrement the skb refcount The same code is replicated in 3 different places; move it to a common helper. Signed-off-by: Paolo Abeni Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/skbuff.h | 13 +++++++++++++ net/core/datagram.c | 4 +--- net/core/skbuff.c | 14 ++++---------- 3 files changed, 18 insertions(+), 13 deletions(-) commit 78d6102256fe46fcd0c78798a9391cf1f112f117 Author: Niklas Söderlund Date: Mon Jun 12 10:39:03 2017 +0200 sh_eth: add support for changing MTU The hardware supports the MTU to be changed and the driver it self is somewhat prepared to support this. This patch hooks up the callbacks to be able to change the MTU from user-space. Signed-off-by: Niklas Söderlund Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 687644209a6e95576ea453977b26dbd6248cadda Author: Will Deacon Date: Mon Jun 12 14:43:25 2017 +0100 arm64: ftrace: fix building without CONFIG_MODULES When CONFIG_MODULES is disabled, we cannot dereference a module pointer: arch/arm64/kernel/ftrace.c: In function 'ftrace_make_call': arch/arm64/kernel/ftrace.c:107:36: error: dereferencing pointer to incomplete type 'struct module' trampoline = (unsigned long *)mod->arch.ftrace_trampoline; Also, the within_module() function is not defined: arch/arm64/kernel/ftrace.c: In function 'ftrace_make_nop': arch/arm64/kernel/ftrace.c:171:8: error: implicit declaration of function 'within_module'; did you mean 'init_module'? [-Werror=implicit-function-declaration] This addresses both by adding replacing the IS_ENABLED(CONFIG_ARM64_MODULE_PLTS) checks with #ifdef versions. Fixes: e71a4e1bebaf ("arm64: ftrace: add support for far branches to dynamic ftrace") Reported-by: Arnd Bergmann Acked-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/ftrace.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 596878da26ad608344a1dd754883467f120becc9 Author: Bob Moore Date: Mon Jun 5 16:40:45 2017 +0800 ACPICA: Remove extraneous status check ACPICA commit a83f7212df71d4276d0057fa31bfdc9809660560 Removed an unnecessary status check after call to ns_build_normalized_path. Link: https://bugs.acpica.org/show_bug.cgi?id=1378 Link: https://github.com/acpica/acpica/commit/a83f7212 Reported-by: Colin King Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsnames.c | 3 --- 1 file changed, 3 deletions(-) commit 07536e270c9860bb2f7b37178ea04f51d46cf41d Author: Bob Moore Date: Mon Jun 5 16:40:39 2017 +0800 ACPICA: Export the public mutex interfaces ACPICA commit ff09dcf9eb69fe9318034c60c377436030e7feea These interfaces are intended to be used by device drivers. Link: https://github.com/acpica/acpica/commit/ff09dcf9 Reported-by: Guenter Roeck Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utxfmutex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6f0527b77d9e0129dd8e50945b0d610ed943d6b2 Author: Bob Moore Date: Mon Jun 5 16:40:34 2017 +0800 ACPICA: Disassembler: Abort on an invalid/unknown AML opcode ACPICA commit ed0389cb11a61e63c568ac1f67948fc6a7bd1aeb An invalid opcode indicates something seriously wrong with the input AML file. The AML parser is immediately confused and lost, causing the resulting parse tree to be ill-formed. The actual disassembly can then cause numerous unrelated errors and faults. This change aborts the disassembly upon discovery of such an opcode during the AML parse phase. Link: https://github.com/acpica/acpica/commit/ed0389cb Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/psobject.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit dba744cd941b4eeb153a34877c62293903382751 Author: Lv Zheng Date: Mon Jun 5 16:40:26 2017 +0800 ACPICA: Dispatcher: Remove unnecessary call to debugger ACPICA commit eaa455accf165fee2df26410e271aab162264f6c UBSAN reports an index out of range use in dsutils.c. acpi_db_display_argument_object( walk_state->operands[walk_state->num_operands - 1], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ walk_state); This call was simply wrong, generated redundant debugger messages, and resulted in a -1 index into the operand stack. Linux kernel bug #120351 (link #1) and #194845 (link #2). Originally fixed by Navin P.S. (link #1, comment 8), refined by Lv Zheng (link #3). Link: https://bugzilla.kernel.org/show_bug.cgi?id=120351 [#1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=194845 [#2] Link: https://github.com/acpica/acpica/pull/245 [#3] Link: https://github.com/acpica/acpica/commit/eaa455ac Reported-by: Wilfried Klaebe Reported-by: Ronald Warsow Original-by: Navin P.S. Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsutils.c | 9 --------- 1 file changed, 9 deletions(-) commit 2cb8c3bbfbd78bf616bef8af2ba6214ca3679ebe Author: Bob Moore Date: Mon Jun 5 16:40:21 2017 +0800 ACPICA: Debugger/acpiexec: Cleanup error messages ACPICA commit 0d792c25d3bcaa857920ec009b732ec7c8942cfa Clarify some of the error messages when a method failure happens. Link: https://github.com/acpica/acpica/commit/0d792c25 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbobject.c | 6 +++--- drivers/acpi/acpica/dsdebug.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit deb85f6c8a4870c7372d36cf26b73f9a35bfd81a Author: Erik Schmauss Date: Mon Jun 5 16:40:15 2017 +0800 ACPICA: Explicitly cast 1 to u32 ACPICA commit 4091360d6526c8d4f1e6bccb6b1c3123bda9ac33 The runtime errors caused when acpica tools are compiled with -fsanitize=shift imply that these 1s are stored in integers. This cast insures that 1 is stored in unsigned integers. Link: https://github.com/acpica/acpica/commit/4091360d Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utownerid.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 5e2d9e919f5c785879e35e4686758c36542ccaa9 Author: Bob Moore Date: Mon Jun 5 16:40:08 2017 +0800 ACPICA: Update error message for field beyond buffer case ACPICA commit 7a6b9c0b31cfb1606a6348404fee670b2d18743c Improve/clarify the problem of a field definition beyond the limit of the target buffer. Link: https://github.com/acpica/acpica/commit/7a6b9c0b Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsopcode.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 861ba6351c520328e94a78c923b415faa9116287 Author: Lv Zheng Date: Mon Jun 5 16:40:02 2017 +0800 ACPICA: Events: Add runtime stub support for event APIs ACPICA commit 99bc3beca92c6574ea1d69de42e54f872e6373ce It is reported that on Linux, RTC driver complains wrong errors on hardware reduced platform: [ 4.085420] ACPI Warning: Could not enable fixed event - real_time_clock (4) (20160422/evxface-654) This patch fixes this by correctly adding runtime reduced hardware check. Reported by Chandan Tagore, fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/99bc3bec Tested-by: Chandan Tagore Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/evxfevnt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 84676b87b27d8aefafb9f712a5b444938f284513 Author: Lv Zheng Date: Mon Jun 5 16:39:56 2017 +0800 ACPICA: OSL: Add support to exclude stdarg.h ACPICA commit e2df7455a9a4301b03668e4c9c02c7a564cc841c Some hosts may choose not to include stdarg.h, implementing a configurability in acgcc.h, allowing OSen like Solaris to exclude stdarg.h. This patch also fixes acintel.h accordingly without providing builtin support as Intel compiler is similar as GCC. Reported by Dana Myers, fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/e2df7455 Reported-by: Dana Myers Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/platform/acgcc.h | 10 ++++++++++ include/acpi/platform/acintel.h | 2 ++ 2 files changed, 12 insertions(+) commit cf45b58cd1aeeb324741c91e5e924d255fa4aafe Author: Mika Westerberg Date: Mon Jun 5 16:39:50 2017 +0800 ACPICA: Core: Always set GPIO VendorOffset ACPICA commit 51a92f414de7af1f7f7524de3f61daf5413cac9f Acpiexec gives this warning when resources containing GPIOs are extracted using Resource command: **** Data mismatch in descriptor [00] type 8C, Offset 00000000 **** Mismatch at byte offset 13: is 00, should be 25 **** Data mismatch in descriptor [01] type 8C, Offset 00000025 **** Mismatch at byte offset 13: is 00, should be 25 This happens because we do not set VendorOffset when doing resource to AML conversion. Fix this by always setting VendorOffset. Link: https://github.com/acpica/acpica/commit/51a92f41 Signed-off-by: Mika Westerberg Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/rsmisc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 183c59d21e44c8e1e89f4a6cdf85645f5e948fee Author: Bob Moore Date: Mon Jun 5 16:39:43 2017 +0800 ACPICA: Fix a type value overlap in the AML support file ACPICA commit 7cb6e66982178bbc96a6f1f7969da95e9da753fa An AML opcode type field was overlapped with values used for the top-level dispatch. Did not cause an actual problem, but fixed anyway. Link: https://github.com/acpica/acpica/commit/7cb6e669 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/amlcode.h | 61 +++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 28 deletions(-) commit 044b72395194965069da098d729110446855bb4d Author: Mika Westerberg Date: Mon Jun 5 16:39:37 2017 +0800 ACPICA: ACPI 6.2: Add support for PinGroupConfig() resource ACPICA commit 08b83591c0db751769d61fa889f4f50f575aeffb PinGroupConfig() is analogous to PinGroupFunction() but instead of mode (muxing), it is used to apply specific fine-grained configuration to a set of referenced pins. The format of this new resource is: PinGroupConfig (Shared/Exclusive, PinConfigType, PinConfigValue, ResourceSource, ResourceSourceIndex, ResourceSourceLabel, ResourceUsage, DescriptorName, VendorData) The PinConfigType/PinConfigValue are the same used by PinConfig() resource. Here also the combination of ResourceSource and ResourceSourceLabel is used to specify the PinGroup() this resource refers to. Link: https://github.com/acpica/acpica/commit/08b83591 Signed-off-by: Mika Westerberg Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/aclocal.h | 3 +- drivers/acpi/acpica/acresrc.h | 2 + drivers/acpi/acpica/amlresrc.h | 21 +++++++++++ drivers/acpi/acpica/rscalc.c | 26 +++++++++++++ drivers/acpi/acpica/rsdumpinfo.c | 24 ++++++++++++ drivers/acpi/acpica/rsinfo.c | 5 +++ drivers/acpi/acpica/rsserial.c | 80 ++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/utresrc.c | 2 + include/acpi/acrestyp.h | 16 +++++++- 9 files changed, 177 insertions(+), 2 deletions(-) commit f8a6c86644f6e07af0ac4e89adb4db29a640e40f Author: Mika Westerberg Date: Mon Jun 5 16:39:31 2017 +0800 ACPICA: ACPI 6.2: Add support for PinGroupFunction() resource ACPICA commit bd9a745749eac7137cd23085e6bdeb322de14ea2 PinGroupFunction() is a new resource introduced with ACPI 6.2. It is used with PinGroup() to configure specific mode for a set of pins exposed by a GPIO controller. The format of the resource is: PinGroupFunction (Shared/Exclusive, FunctionNumber, ResourceSource, ResourceSourceIndex, ResourceSourceLabel, ResourceUsage, DescriptorName, VendorData) The resource_source and ResourceSourceLabel fields are used to specify the PinGroup() resource referenced by PinGroupFunction(). Device (GPIO) { Name (_CRS, ResourceTemplate () { PinGroup ("group1") {2, 3} PinGroup ("group2") {4, 5} ... }) } Device (I2C) { Name (_CRS, ResourceTemplate () { PinGroupFunction (Exclusive, 6, "^GPIO", 0, "mygroup2") }) } In the above example the PinGroupFunction() references the second PinGroup() resource (using label "mygroup2" and configures pins 4 and 5 into mode 6. Link: https://github.com/acpica/acpica/commit/bd9a7457 Signed-off-by: Mika Westerberg Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/aclocal.h | 3 +- drivers/acpi/acpica/acresrc.h | 3 ++ drivers/acpi/acpica/amlresrc.h | 20 +++++++++++ drivers/acpi/acpica/rscalc.c | 26 ++++++++++++++ drivers/acpi/acpica/rsdump.c | 10 ++++++ drivers/acpi/acpica/rsdumpinfo.c | 23 ++++++++++++ drivers/acpi/acpica/rsinfo.c | 5 +++ drivers/acpi/acpica/rsserial.c | 77 ++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/utresrc.c | 2 ++ include/acpi/acrestyp.h | 15 +++++++- 10 files changed, 182 insertions(+), 2 deletions(-) commit fdaa0980772cb05b53e7f544d513e3445f3f1021 Author: Mika Westerberg Date: Mon Jun 5 16:39:25 2017 +0800 ACPICA: ACPI 6.2: Add support for PinGroup() resource ACPICA commit 7d928e3174fb19d7dc0066b03c30bea07c001563 ACPI 6.2 introduced a new resource that is used to declare set of pins belonging to a GPIO controller. This resource is referenced by new PinGroupFunction() and PinGroupConfig() resources using ResourceSource and ResourceLabel fields. The PinGroup() resource looks like this: PinGroup (ResourceLabel, ResourceUsage, DescriptorName, VendorData) {Pin List} This resource should be listed in _CRS under the GPIO/pincontroller device providing these pins. Link: https://github.com/acpica/acpica/commit/7d928e31 Signed-off-by: Mika Westerberg Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/aclocal.h | 3 +- drivers/acpi/acpica/acresrc.h | 6 +++- drivers/acpi/acpica/amlresrc.h | 18 ++++++++++++ drivers/acpi/acpica/rscalc.c | 22 ++++++++++++++ drivers/acpi/acpica/rsdump.c | 38 ++++++++++++++++++++++++ drivers/acpi/acpica/rsdumpinfo.c | 19 ++++++++++++ drivers/acpi/acpica/rsinfo.c | 5 ++++ drivers/acpi/acpica/rsserial.c | 62 ++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/utresrc.c | 2 ++ include/acpi/acrestyp.h | 19 +++++++++++- 10 files changed, 191 insertions(+), 3 deletions(-) commit 97028ce6fca0fec53ee71e2fd5acfb2dc8430f1f Author: Mika Westerberg Date: Mon Jun 5 16:39:19 2017 +0800 ACPICA: ACPI 6.2: Add support for PinConfig() resource ACPICA commit a06fdba686cefccd5dd5b93b52fa0f1e3f984906 ACPI 6.2 introduced a new resource that is used to specify fine-grained configuration of a pin or set of pins used by a device. The ASL syntax of this new resource looks like: PinConfig (Shared/Exclusive, PinConfigType, PinConfigValue, ResourceSource, ResourceSourceIndex, ResourceUsage, DescriptorName, Vendordata) {Pin List} PinConfigType is an integer with following accepted values: 0x00 (Default) - No configuration is applied to the pin 0x01 (Bias Pull-up) - Pin is pulled up using certain size resistor 0x02 (Bias Pull-down) - Pin is pulled down using certain size resistor 0x03 (Bias Default) - Set to default biasing 0x04 (Bias Disable) - All bias settings will be disabled 0x05 (Bias High Impedance) - Configure the pin as hi_z 0x06 (Bias Bus Hold) - Configure the pin in a weak latch state where it drives the last value on a tristate bus 0x07 (Drive Open Drain) - Configure the pin into open drain state 0x08 (Drive Open Source) - Configure the pin into open source state 0x09 (Drive Push Pull) - Configure the pin into push-pull state 0x0a (Drive Strength) - How much the pin can supply current 0x0b (Slew Rate) - Configure slew rate of the pin 0x0c (Input Debounce) - Enable input debouncer for the pin 0x0d (Input Schmitt Trigger) - Enable schmitt trigger for the pin 0x0e - 0x7f - Reserved 0x80 - 0xff - Vendor defined types The PinConfigValue depends on the type and is expressed as units suitable for that type (for example bias uses Ohms). Link: https://github.com/acpica/acpica/commit/a06fdba6 Signed-off-by: Mika Westerberg Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/aclocal.h | 3 +- drivers/acpi/acpica/acresrc.h | 2 ++ drivers/acpi/acpica/acutils.h | 1 + drivers/acpi/acpica/amlresrc.h | 23 ++++++++++++ drivers/acpi/acpica/rscalc.c | 31 ++++++++++++++++ drivers/acpi/acpica/rsdumpinfo.c | 25 +++++++++++++ drivers/acpi/acpica/rsinfo.c | 7 +++- drivers/acpi/acpica/rsserial.c | 78 ++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/utresrc.c | 23 +++++++++++- include/acpi/acrestyp.h | 34 +++++++++++++++++- 10 files changed, 223 insertions(+), 4 deletions(-) commit 2b72693066a867ac073a657e871bb64391b4ffdb Author: Mika Westerberg Date: Mon Jun 5 16:39:14 2017 +0800 ACPICA: ACPI 6.2: Add support for PinFunction() resource ACPICA commit 6bbc6357f7061f1243601adde0ea45f7a89274e0 ACPI 6.2 introduced a new resource that is used to describe how certain pins are muxed for a device. The ASL syntax of this new resource looks like below: PinFunction(Shared, PinConfig, FunctionNumber, ResourceSource, ResourceSourceIndex, ResourceUsage, DescriptorName, VendorData) {Pin List} Which is pretty similar to GpioIo()/GpioInt() resources. Teach ACPICA about this new resource. Link: https://github.com/acpica/acpica/commit/6bbc6357 Signed-off-by: Mika Westerberg Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/aclocal.h | 1 + drivers/acpi/acpica/acresrc.h | 2 ++ drivers/acpi/acpica/amlresrc.h | 22 ++++++++++++ drivers/acpi/acpica/rscalc.c | 34 ++++++++++++++++++ drivers/acpi/acpica/rsdumpinfo.c | 23 ++++++++++++ drivers/acpi/acpica/rsinfo.c | 6 +++- drivers/acpi/acpica/rsserial.c | 76 ++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/utresrc.c | 4 +-- include/acpi/acrestyp.h | 16 ++++++++- 9 files changed, 180 insertions(+), 4 deletions(-) commit c7a1dfb95e43d4edce4caf35b98db6a5868d6ea7 Author: David E. Box Date: Mon Jun 5 16:39:08 2017 +0800 ACPICA: Add support for new PCCT subtables ACPICA commit e7b817e3c405a4fb9ae9ee7ae4992b8c1f20d284 Extended PCC Subspaces (types 3 and 4) Link: https://github.com/acpica/acpica/commit/e7b817e3 Signed-off-by: David E. Box Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/mailbox/pcc.c | 10 +++---- include/acpi/actbl3.h | 77 +++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 77 insertions(+), 10 deletions(-) commit bff7f90bbe75ae37ba83e4e6566f686e19b99adc Author: Bob Moore Date: Mon Jun 5 16:39:00 2017 +0800 ACPICA: Add header support for TPM2 table changes ACPICA commit b922ecaf9053dae3b8933664e951ed1ee8f86f07 Update to new version of the TCG/ACPI spec. Does not include table compiler or disassembler support. Link: https://github.com/acpica/acpica/commit/b922ecaf Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/char/tpm/tpm_crb.c | 4 ++-- include/acpi/actbl2.h | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 5 deletions(-) commit a86c856eb4df97dd155e0210fca327e1fd44786c Author: David E. Box Date: Mon Jun 5 16:38:53 2017 +0800 ACPICA: disassembler: improve Switch support ACPICA commit 3c36625deffdfb034378b1793e2ead9c8fdd767e Changes the resource descriptor parse tree walk to a general preprocessing walk and calls the Switch conversion code from here. Move Switch code to new dmswitch.c file. Also improves algorithm to handle multiple levels of Switch statements and perform legacy disassembly for older or otherwise non-spec compliant Switch implementations. Link: https://github.com/acpica/acpica/commit/3c36625d Signed-off-by: David E. Box Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acapps.h | 4 ++-- drivers/acpi/acpica/acglobal.h | 1 + drivers/acpi/acpica/aclocal.h | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) commit a618c7f89a02f3c67a8f200855cff398855e3888 Author: Bob Moore Date: Mon Jun 5 16:38:47 2017 +0800 ACPICA: Add support for new SRAT subtable ACPICA commit 5bc67f63918da249bfe279ee461d152bb3e6f55b GIC ITS Affinity (ACPI 6.2) Link: https://github.com/acpica/acpica/commit/5bc67f63 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit c042933df2b152c9630893bdaaa5b7268206a75d Author: Bob Moore Date: Mon Jun 5 16:38:41 2017 +0800 ACPICA: Add support for new HEST subtable ACPICA commit a1f1056c9e44fd3de8cad3bde89cda5cbb2df466 IA-32 Deferred Machine Check (ACPI 6.2) Link: https://github.com/acpica/acpica/commit/a1f1056c Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 2e166c731ddd5461435c460ef6fadb661b266e4a Author: Bob Moore Date: Mon Jun 5 16:38:32 2017 +0800 ACPICA: Add new flags to HEST subtables ACPICA commit c2c3807adb8a67e6462b731dc64be35d8b8317f8 Add GHES_ASSIST flag for ACPI 6.2 Add missing GLOBAL flag for AER structures Link: https://github.com/acpica/acpica/commit/c2c3807a Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 1 + 1 file changed, 1 insertion(+) commit b8355bcac2534fc3faad25ec25c1972582469507 Author: Lv Zheng Date: Mon Jun 5 16:38:26 2017 +0800 ACPICA: Tables: Add PPTT table definitions ACPICA commit c27465d07fd008ba71c1f687b2715267701bc8ad This patch adds PPTT (Processor Properties Topology Table, defined in ACPI spec 6.2) support in ACPICA core, including table definitions expressed in C structures and macros. Lv Zheng. Link: https://github.com/acpica/acpica/commit/c27465d0 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 4a8a6058a9099560a421ab3850d4889765c512b3 Author: Bob Moore Date: Mon Jun 5 16:38:20 2017 +0800 ACPICA: Add new notify value for HEST table ACPICA commit 35e06462f3186e1e6e9cb4fe97dfb43d4b3718a2 "Software Delegated Exception" - ACPI 6.2 Link: https://github.com/acpica/acpica/commit/35e06462 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d3ebc897d980761aff9a8dfdb07501a5d43b7372 Author: Erik Schmauss Date: Mon Jun 5 16:38:15 2017 +0800 ACPICA: Add support for _HMA as a predefined method ACPICA commit 223a647c72243359231865a64c1be04d208dcdbd Link: https://github.com/acpica/acpica/commit/223a647c Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acpredef.h | 3 +++ 1 file changed, 3 insertions(+) commit b9ae9c2092286ea81b06d0ac64d6369421ac4599 Author: Erik Schmauss Date: Mon Jun 5 16:38:09 2017 +0800 ACPICA: Add support for _LSW as a predefined method ACPICA commit 8e425bdd9fa27264c217a3a449eb3c2da3769542 Link: https://github.com/acpica/acpica/commit/8e425bdd Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acpredef.h | 4 ++++ 1 file changed, 4 insertions(+) commit 3758a97498aa4048c2c5a0e0450be7c0c64576ae Author: Erik Schmauss Date: Mon Jun 5 16:38:04 2017 +0800 ACPICA: Add support for _LSR as a predefined method ACPICA commit 89020347ada3f0ff5499a804178d574359e4730f Link: https://github.com/acpica/acpica/commit/89020347 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acpredef.h | 5 +++++ 1 file changed, 5 insertions(+) commit 754d550bb85838d28a984fda18e4fffef941cb40 Author: Erik Schmauss Date: Mon Jun 5 16:37:55 2017 +0800 ACPICA: Add support for _LSI as a predefined method ACPICA commit f2f3813fb6b6a6ec1f406f05061c0e9270e86146 Link: https://github.com/acpica/acpica/commit/f2f3813f Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acpredef.h | 4 ++++ 1 file changed, 4 insertions(+) commit c03baf14b1c7a87c9e07a208ede4ecf04888a084 Author: Janosch Hildebrand Date: Mon Jun 5 16:37:49 2017 +0800 ACPICA: Tables: Fix defined values for MADT PCAT_COMPAT flag ACPICA commit c0292548a43bdc5d83d5be2953b663e60b6f12b4 Link: https://github.com/acpica/acpica/issues/224 Link: https://github.com/acpica/acpica/commit/c0292548 Signed-off-by: Janosch Hildebrand Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da22b8e7b73e2e145ab2cf2de1c2edd3ac2c63a4 Author: Bob Moore Date: Mon Jun 5 16:37:43 2017 +0800 ACPICA: Update Status field for BGRT table ACPICA commit dbc6a3d5ff22df730cc81802af0422bb64b19347 Orientation flags added. ACPI 6.2 Link: https://github.com/acpica/acpica/commit/dbc6a3d5 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/actbl3.h | 5 +++++ 1 file changed, 5 insertions(+) commit a69b4386ea0174829417a18f4c336d1ca64d7a5b Author: Bob Moore Date: Mon Jun 5 16:45:22 2017 +0800 ACPICA: Utilities: Make a notify value reserved ACPICA commit 54eb9be35414847da7e2903c8d410fa806b44fb5 0x0C (Graceful shutdown) is now reverted to reserved. 0x81 takes the place of this value. Link: https://github.com/acpica/acpica/commit/54eb9be3 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utdecode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbbf3bb6b90cfb1e9685bc8b31a0553e774c3146 Author: Bob Moore Date: Mon Jun 5 16:37:30 2017 +0800 ACPICA: Added two new UUID values ACPICA commit a0168a7aca421d195e1c2b609279fa4a967dd3ac Processor Properties. ACPI 6.2 Link: https://github.com/acpica/acpica/commit/a0168a7a Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/acuuid.h | 5 +++++ 1 file changed, 5 insertions(+) commit e6f9193c244c1768bd24a4f527ff2509b72d499a Author: Bob Moore Date: Mon Jun 5 16:37:23 2017 +0800 ACPICA: Add new notify value for memory attributes update ACPICA commit d37e878292bc9c7835b74e90d1c4c79e96ce6652 New notify value for memory attributes update for ACPI 6.2. Link: https://github.com/acpica/acpica/commit/d37e8782 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utdecode.c | 4 +++- include/acpi/actypes.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) commit fa418ddfc7a6d8ccf1b65426fe824b5f553f258a Author: Lv Zheng Date: Mon Jun 5 16:37:16 2017 +0800 ACPICA: Tables: Add HMAT table definitions ACPICA commit 3dae756631c8c2baddfa19f43a379aee42b28312 This patch adds unified HMAT table structure definitions so that ACPICA users can develop HMAT related OS features based on the ACPICA standard structures. Lv Zheng. Link: https://github.com/acpica/acpica/commit/3dae7566 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) commit e6ab3b776d848abce88b5b6bf59577025780b7ed Author: Lv Zheng Date: Mon Jun 5 16:15:34 2017 +0800 ACPICA: Tables: Add WSMT support ACPICA commit 4f12387029c6a561e7792f53caf2e7f1f0ab2bbe This patch adds WSMT support, the table can be found at Line [#1]. The support includes table structure definitions (ACPICA tables) and assembly/disassembly (iasl) support. Lv Zheng. Link: https://github.com/acpica/acpica/commit/4f123870 Link: https://msdn.microsoft.com/windows/hardware/drivers/bringup/acpi-system-description-tables#wsmt [1] Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/actbl2.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 05c3507cecf241c561355b6fe56bff4518642e0d Author: Erik Schmauss Date: Mon Jun 5 16:15:18 2017 +0800 ACPICA: Change path's type from u8* to char* ACPICA commit 51e73c1d35dd21cfe39277b3c71decd3268f669c All instances using a named parseOp's path field has a type cast from u8* to char*. Changing path's type from u8* to char* eliminates type casting and retains the previous behavior. Link: https://github.com/acpica/acpica/commit/51e73c1d Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/aclocal.h | 2 +- drivers/acpi/acpica/dswload.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0c8792d00d38de85b6ceb1dd67d3ee009d7c8e42 Author: Zhenyu Wang Date: Fri Jun 9 15:48:05 2017 +0800 drm/i915: Fix GVT-g PVINFO version compatibility check Current it's strictly checked if PVINFO version matches 1.0 for GVT-g i915 guest which doesn't help for compatibility at all and forces GVT-g host can't extend PVINFO easily with version bump for real compatibility check. This fixes that to check minimal required PVINFO version instead. v2: - drop unneeded version macro - use only major version for sanity check v3: - fix up PVInfo value with kernel type - one indent fix Reviewed-by: Joonas Lahtinen Cc: Chuanxiao Dong Cc: Joonas Lahtinen Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Zhenyu Wang Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170609074805.5101-1-zhenyuw@linux.intel.com drivers/gpu/drm/i915/i915_pvinfo.h | 8 ++------ drivers/gpu/drm/i915/i915_vgpu.c | 10 ++++------ 2 files changed, 6 insertions(+), 12 deletions(-) commit 1eb34b6e5160f20e1889b2551182bf4d61084d6b Author: Will Deacon Date: Mon May 15 15:23:58 2017 +0100 arm64: fault: Print info about page table structure when dumping pte Whilst debugging a remote crash, I noticed that show_pte is unhelpful when it comes to describing the structure of the page table being walked. This is easily fixed by printing out the page table (swapper vs user), page size and virtual address size when displaying the PGD address. Acked-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 83016b204225d69516de3d57489783fafd6a0ecc Author: Kristina Martsenko Date: Fri Jun 9 16:35:54 2017 +0100 arm64: mm: print file name of faulting vma Print out the name of the file associated with the vma that faulted. This is usually the executable or shared library name. We already print out the task name, but also printing the library name is useful for pinpointing bugs to libraries. Also print the base address and size of the vma, which together with the PC (printed by __show_regs) gives the offset into the library. Fault prints now look like: test[2361]: unhandled level 2 translation fault (11) at 0x00000012, esr 0x92000006, in libfoo.so[ffffa0145000+1000] This is already done on x86, for more details see commit 03252919b798 ("x86: print which shared library/executable faulted in segfault etc. messages v3"). Acked-by: Mark Rutland Signed-off-by: Kristina Martsenko Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bf396c09c2447a787d02af34cf167e953f85fa42 Author: Kristina Martsenko Date: Fri Jun 9 16:35:53 2017 +0100 arm64: mm: don't print out page table entries on EL0 faults When we take a fault from EL0 that can't be handled, we print out the page table entries associated with the faulting address. This allows userspace to print out any current page table entries, including kernel (TTBR1) entries. Exposing kernel mappings like this could pose a security risk, so don't print out page table information on EL0 faults. (But still print it out for EL1 faults.) This also follows the same behaviour as x86, printing out page table entries on kernel mode faults but not user mode faults. Acked-by: Mark Rutland Signed-off-by: Kristina Martsenko Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 1 - 1 file changed, 1 deletion(-) commit 67ce16ec15ce9d97d3d85e72beabbc5d7017193e Author: Kristina Martsenko Date: Fri Jun 9 16:35:52 2017 +0100 arm64: mm: print out correct page table entries When we take a fault that can't be handled, we print out the page table entries associated with the faulting address. In some cases we currently print out the wrong entries. For a faulting TTBR1 address, we sometimes print out TTBR0 table entries instead, and for a faulting TTBR0 address we sometimes print out TTBR1 table entries. Fix this by choosing the tables based on the faulting address. Acked-by: Mark Rutland Signed-off-by: Kristina Martsenko [will: zero-extend addrs to 64-bit, don't walk swapper w/ TTBR0 addr] Signed-off-by: Will Deacon arch/arm64/include/asm/system_misc.h | 2 +- arch/arm64/mm/fault.c | 36 +++++++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 12 deletions(-) commit 67d00470accf5c58abbb23a44c867c5f15437976 Merge: 018b732 70f05be Author: Tony Lindgren Date: Mon Jun 12 03:27:30 2017 -0700 Merge branch 'omap-for-v4.13/clkctrl' into omap-for-v4.13/soc-v4 commit fcd104b50fd0a8b638ab01b2e17252d16868aa49 Author: Subhajit Paul Date: Wed Jun 7 16:27:30 2017 -0500 ARM: dts: dra7xx-clocks: Use DPLL_GPU for GPU clocks The GPU has two functional clocks - GPU_CORE_GCLK and GPU_HYD_GCLK. Both of these are mux clocks and are derived from the DPLL_CORE H14 output clock CORE_GPU_CLK by default. These clocks can also be be derived from DPLL_PER or DPLL_GPU. The GPU DPLL provides the output clocks primarily for the GPU. Configuring the GPU for different OPP clock frequencies is easier to achieve when using the DPLL_GPU rather than the other two DPLLs due to: 1. minimal affect on any other output clocks from these DPLLs 2. may require an impossible post-divider values on existing DPLLs without affecting other clocks. So, switch the GPU functional clocks to be sourced from GPU DPLL by default. This is done using the DT standard properties "assigned-clocks" and "assigned-clock-parents". Newer u-boots (from 2017.01 onwards) reuse and can update these properties to choose an appropriate one-time fixed OPP configuration as all the required ABB/AVS setup is performed within the bootloader. Note that there is no DVFS supported for any of the non-MPU domains. The DPLL will automatically transition into a low-power stop mode when the associated output clocks are not utilized or gated automatically. This patch also sets the initial values for the DPLL_GPU outputs. These values are chosen based on the OPP_NOM values defined as per recommendation from design team. The DPLL locked frequency is kept at 1277 MHz, so that the value for the divider clock, dpll_gpu_m2_ck, can be set to 425.67 MHz for OPP_NOM. Signed-off-by: Subhajit Paul [s-anna@ti.com: revise patch description] Signed-off-by: Suman Anna Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7xx-clocks.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 32a04832a120b8ddc6b8752d30ba4be00fa23b74 Author: Suman Anna Date: Wed Jun 7 16:27:29 2017 -0500 ARM: dts: dra7xx-clocks: Set IVA DPLL and its output clock rates The IVA DPLL in DRA7xx provides the output clocks for only the IVAHD subsystem in DRA7xx as compared to previous OMAP generations when it provided the clocks for both DSP and IVAHD subsystems. This DPLL is currently not configured by older bootloaders. Use the DT standard properties "assigned-clocks" and "assigned-clock-rates" to set the IVA DPLL clock rate and the rates for its derivative clocks at boot time to properly initialize/lock this DPLL and be independent of the bootloader version. Newer u-boots (from 2017.01 onwards) reuse and can update these properties to choose an appropriate one-time fixed OPP configuration. The DPLL will automatically transition into a low-power stop mode when the associated output clocks are not utilized or gated automatically. The reset value of the divider M2 (that supplies the IVA_GFLCK, the functional clock for the IVAHD subsystem) does not match a specific OPP. So, the derived output clock from this IVA DPLL has to be initialized as well to avoid initializing these divider outputs to an incorrect frequencies. The OPP_NOM clock frequencies are defined in the AM572x SR2.0 Data Sheet vB, section 5.5.2 "Voltage And Core Clock Specifications". The clock rates are chosen based on these OPP_NOM values and defined as per a DRA7xx PLL spec document. The DPLL locked frequency is 2300 MHz, so the dpll_iva_ck clock rate used is half of this value. The value for the divider clock, dpll_iva_m2_ck, has to be set to 388.333334 MHz or more for the divider clk logic to compute the appropriate divider value for OPP_NOM. Signed-off-by: Suman Anna Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7xx-clocks.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 268f6644aa0c2d73bfcebf0e3f0ffc9fc82f82cd Author: Suman Anna Date: Wed Jun 7 16:27:28 2017 -0500 ARM: dts: dra7xx-clocks: Set DSP DPLL and its output clock rates The DSP DPLL is a new DPLL compared to previous OMAP generations and supplies the root clocks for the DSP processors, as well as a mux input source for EVE sub-system (on applicable SoCs). This DPLL is currently not configured by older bootloaders. Use the DT standard properties "assigned-clocks" and "assigned-clock-rates" to set the DSP DPLL clock rate and the rates for its derivative clocks at boot time to properly initialize/lock this DPLL and be independent of the bootloader version. Newer u-boots (from 2017.01 onwards) reuse and can update these properties to choose an appropriate one-time fixed OPP configuration. The DPLL will automatically transition into a low-power stop mode when the associated output clocks are not utilized or gated automatically. The DSP DPLL provides two output clocks, DSP_GFCLK and EVE_GCLK. The desired rate for DSP_GFCLK is 600 MHz (same as DSP DPLL CLKOUT frequency), and is currently auto set due to the desired M2 divider value being the same as reset value for the locked frequency of 600 MHz. The EVE_GCLK however is required to be 400 MHz, so set the dpll_dsp_m3x2_ck's rate explicitly so that the divider is set properly. The dpll_dsp_m2_ck rate is also set explicitly to not rely on any implicit matching divider reset values to the locked DPLL frequency. The OPP_NOM clock frequencies are defined in the AM572x SR2.0 Data Sheet vB, section 5.5.2 "Voltage And Core Clock Specifications". The clock rates are chosen based on these OPP_NOM values and defined as per a DRA7xx PLL spec document. The DPLL locked frequency is 1200 MHz, so the dpll_dsp_ck clock rate used is half of this value. Signed-off-by: Suman Anna Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7xx-clocks.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 39879c7d963ef6392235b2cc107c2d6dd25aa55d Author: Suman Anna Date: Wed Jun 7 16:27:27 2017 -0500 ARM: dts: dra7xx-clocks: Source IPU1 functional clock from CORE DPLL The IPU1 functional clock is actually the output of a mux clock, ipu1_gfclk_mux. The mux clock is sourced by default from the DPLL_ABE_X2_CLK, and this results in a rather odd clock frequency (361 MHz) for the IPU1 functional clock on platforms where ABE_DPLL is configured properly. Reconfigure the mux clock to be sourced from CORE_IPU_ISS_BOOST_CLK (dpll_core_h22x2_ck), so that both the IPU1 and IPU2 are running from the same clock and clocked at the same nominal frequency of 425 MHz. This also ensures that IPU1 functional clock is always configured properly and becomes independent of the state of the ABE DPLL on all boards. Signed-off-by: Suman Anna Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7xx-clocks.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit b58104f0a66c70b4bee271881d4496dfdec194c2 Author: Suman Anna Date: Wed Jun 7 16:27:26 2017 -0500 ARM: dts: omap54xx-clocks: Set IVA DPLL and its output clock rates The IVA DPLL is not an essential DPLL for the functionality of a bootloader and is usually not configured (e.g. older u-boots configure it only if CONFIG_SYS_CLOCKS_ENABLE_ALL is enabled and u-boots newer than 2014.01 do not even have an option), and this results in incorrect operating frequencies when trying to use a DSP or IVAHD, whose root clocks are derived from this DPLL. Use the DT standard properties "assigned-clocks" and "assigned-clock-rates" to set the IVA DPLL clock rate and the rates for its derivative clocks at boot time to properly initialize/lock this DPLL. The DPLL will automatically transition into a low-power stop mode when the associated output clocks are not utilized or gated automatically. The reset values of the dividers H11 & H12 (functional clocks for DSP and IVAHD respectively) are identical to each other, but are different at each OPP. The reset values also do not match a specific OPP. So, the derived output clocks from the IVA DPLL have to be initialized as well to avoid initializing these divider outputs to incorrect frequencies. The clock rates are chosen based on the OPP_NOM values as defined in the OMAP5432 SR2.0 Data Manual Book vK, section 5.2.3.5 "DPLL_IVA Preferred Settings". The recommended maximum DPLL locked frequency is 2330 MHz for OPP_NOM (value for DPLL_IVA_X2_CLK), so the dpll_iva_ck clock rate used is half of this value. The value 465.92 MHz is used instead of 465.9 MHz for dpll_iva_h11x2_ck so that proper divider value can be calculated. Signed-off-by: Suman Anna Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap54xx-clocks.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit c8ceb5ac1ac0aa9bd7c2be9c094f58672bd5669a Author: Suman Anna Date: Wed Jun 7 16:27:25 2017 -0500 ARM: dts: omap44xx-clocks: Set IVA DPLL and its output clock rates The IVA DPLL is not an essential DPLL for the functionality of a bootloader and is usually not configured (e.g. older u-boots configure it only if CONFIG_SYS_CLOCKS_ENABLE_ALL is enabled and u-boots newer than 2014.01 do not even have an option), and this results in incorrect operating frequencies when trying to use a DSP or IVAHD, whose root clocks are derived from this DPLL. Use the DT standard properties "assigned-clocks" and "assigned-clock-rates" to set the IVA DPLL clock rate and the rates for its derivative clocks at boot time to properly initialize/lock this DPLL. The DPLL will automatically transition into a low-power stop mode when the associated output clocks are not utilized or gated automatically. The reset values of the dividers M4 & M5 (functional clocks for DSP and IVAHD respectively) are identical to each other, but are different at each OPP. The reset values also do not match a specific OPP. So, the derived output clocks from the IVA DPLL have to be initialized as well to avoid initializing these divider outputs to incorrect frequencies. The clock rates are chosen based on the OPP100 values as defined in the OMAP4430 ES2.x Public TRM vAP, section "3.6.3.8.7 DPLL_IVA Preferred Settings". The DPLL locked frequency is 1862.4 MHz (value for DPLL_IVA_X2_CLK), so the dpll_iva_ck clock rate used is half of this value. Signed-off-by: Suman Anna Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap44xx-clocks.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 521ec12e2f56b16e6a0b4e7ef97a666bd3de4ff5 Author: Geert Uytterhoeven Date: Fri Jun 9 13:43:46 2017 +0200 ARM: shmobile: Document Renesas H3-based Salvator-XS board DT bindings The Renesas Salvator-XS (Salvator-X 2nd version) development board can be equipped with either an R-Car H3 ES2.0 or M3-W ES1.x SiP, which are pin-compatible. Document board part number and compatible values for the version with R-Car H3. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit fa5b2e749c99e6dbcca9c067a59b2ce17b3ac82e Author: Geert Uytterhoeven Date: Thu Jun 1 12:34:29 2017 +0200 ARM: shmobile: Update R-Car Gen3 ULCB board part numbers The board part numbers for the R-Car H3 and M3 ULCB boards corresponded to versions predating mass production. Update them for mass production. Note that the H3 ULCB board can be equipped with either revision ES1.1 or ES2.0 of the R-Car H3 SoC. While these have different board part numbers, no new compatible values are needed, as the revision can be detected at runtime using the PRR register. Signed-off-by: Geert Uytterhoeven Reviewed-by: Vladimir Barinov Acked-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9086120f8b883034940e5228c83824ed21999537 Author: Biju Das Date: Tue Jun 6 16:10:16 2017 +0100 ARM: shmobile: document iW-RainboW-G20D-Qseven-RZG1M board Document the iW-RainboW-G20D-Qseven-RZG1M device tree bindings, listing it as a supported board. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 427bc40375df765b6146ce917d5a3d3832482935 Author: Biju Das Date: Tue Jun 6 16:10:15 2017 +0100 ARM: shmobile: document iW-RainboW-G20M-Qseven-RZG1M system on module Document the iW-RainboW-G20M-Qseven-RZG1M device tree bindings, listing it as a supported system on module. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 4284ecbeda81083f4c7a3ce325b4a9d675657e61 Author: Marcel Holtmann Date: Sat Jun 10 14:33:16 2017 +0200 Bluetooth: btbcm: Read controller features during configuration Read the Broadcom specific controller features during configuration and print them for informational purposes. < HCI Command: Broadcom Read Controller Features (0x3f|0x006e) plen 0 > HCI Event: Command Complete (0x0e) plen 12 Broadcom Read Controller Features (0x3f|0x006e) ncmd 1 Status: Success (0x00) Features: 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Multi-AV transport bandwidth reducer WBS SBC FW LC-PLC Signed-off-by: Marcel Holtmann Signed-off-by: Szymon Janc drivers/bluetooth/btbcm.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 313f6888c8fbb1bc8b36c9012ce4e1de848df696 Author: Marcel Holtmann Date: Fri Jun 9 18:43:56 2017 +0200 Bluetooth: Send HCI Set Event Mask Page 2 command only when needed The Broadcom BCM20702 Bluetooth controller in ThinkPad-T530 devices report support for the Set Event Mask Page 2 command, but actually do return an error when trying to use it. < HCI Command: Read Local Supported Commands (0x04|0x0002) plen 0 > HCI Event: Command Complete (0x0e) plen 68 Read Local Supported Commands (0x04|0x0002) ncmd 1 Status: Success (0x00) Commands: 162 entries ... Set Event Mask Page 2 (Octet 22 - Bit 2) ... < HCI Command: Set Event Mask Page 2 (0x03|0x0063) plen 8 Mask: 0x0000000000000000 > HCI Event: Command Complete (0x0e) plen 4 Set Event Mask Page 2 (0x03|0x0063) ncmd 1 Status: Unknown HCI Command (0x01) Since these controllers do not support any feature that would require the event mask page 2 to be modified, it is safe to not send this command at all. The default value is all bits set to zero. T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 9 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0a5c ProdID=21e6 Rev= 1.12 S: Manufacturer=Broadcom Corp S: Product=BCM20702A0 S: SerialNumber=F82FA8E8CFC0 C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=btusb E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none) Signed-off-by: Marcel Holtmann Reported-by: Sedat Dilek Tested-by: Sedat Dilek Signed-off-by: Szymon Janc net/bluetooth/hci_core.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 8be381a131c29c4737aed44e7e5f90cb77bb4a7e Author: Geert Uytterhoeven Date: Fri May 19 10:35:10 2017 +0200 soc: renesas: Rework Kconfig and Makefile logic The goals are to: - Allow precise control over and automatic selection of which (sub)drivers are used for which SoC, - Allow adding support for new SoCs easily, - Allow compile-testing of all (sub)drivers, - Keep driver selection logic in the subsystem-specific Kconfig, independent from the architecture-specific Kconfig (i.e. no "select" from arch/arm64/Kconfig.platforms), to avoid dependencies. This is implemented by: - Introducing Kconfig symbols for all drivers and sub-drivers, - Introducing the Kconfig symbol SOC_RENESAS, which is enabled automatically when building for a Renesas ARM platform, and which enables all required drivers without interaction of the user, based on SoC-specific ARCH_* symbols, - Allowing the user to enable any Kconfig symbol manually if COMPILE_TEST is enabled, - Using the new Kconfig symbols instead of the ARCH_* symbols to control compilation in the Makefile, - Always entering drivers/soc/renesas/ during the build. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 2 +- drivers/soc/renesas/Kconfig | 63 ++++++++++++++++++++++++++++++++++++ drivers/soc/renesas/Makefile | 31 +++++++++--------- drivers/soc/renesas/rcar-sysc.c | 24 +++++++------- include/linux/soc/renesas/rcar-rst.h | 3 +- 6 files changed, 92 insertions(+), 32 deletions(-) commit 79e3b5cf035e4734529ac136a7d09abe27f7ebba Author: Geert Uytterhoeven Date: Fri Jun 9 13:43:49 2017 +0200 arm64: dts: renesas: Add support for Salvator-XS with R-Car H3 ES2.0 Add initial support for the Renesas Salvator-XS (Salvator-X 2nd version) development board equipped with an R-Car H3 ES2.0 SiP. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + .../arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 109 +++++++++++++++++++++ 2 files changed, 110 insertions(+) commit 0764c67f7fb37268937be392426f1d907d99a94a Author: Geert Uytterhoeven Date: Fri Jun 9 13:43:48 2017 +0200 arm64: dts: renesas: Add common Salvator-XS board support The Renesas Salvator-XS (Salvator-X 2nd version) development board can be equipped with either an R-Car H3 ES2.0 or M3-W ES1.x SiP, which are pin-compatible. Add initial support for the common parts of the Salvator-XS board into its own .dtsi file, to be included by the DTSes for the H3/M3-W versions. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-xs.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 5fe6a7d8f14e54e009668a543aefa55e904cfe03 Author: Geert Uytterhoeven Date: Fri Jun 9 13:43:47 2017 +0200 arm64: dts: renesas: Extract common Salvator-X/XS board support The Renesas Salvator-X and Salvator-XS (Salvator-X 2nd version) boards are very similar. To avoid duplication, prepare for the advent of the latter by extracting the common board parts into its own .dtsi file. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 629 +++++++++++++++++++++++ arch/arm64/boot/dts/renesas/salvator-x.dtsi | 616 +--------------------- 2 files changed, 630 insertions(+), 615 deletions(-) commit 371294fc42c1f9cd634685a515da9eb247fd7d35 Author: Geert Uytterhoeven Date: Thu Jun 8 15:45:00 2017 +0200 arm64: dts: salvator-x: Add missing index to PWM pinctrl subnode name R-Car Gen3 SoCs contain multiple PWM modules. Hence to avoid conflicts, pinctrl subnodes for PWM should include indices referring to their instances. Fixes: b33be33670217533 ("arm64: dts: salvator-x: Add panel backlight support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb5202dbebfd8fbfc68c67cbed7d4e86f43f6f86 Author: Geert Uytterhoeven Date: Wed May 31 09:59:40 2017 +0200 arm64: dts: r8a7795: h3ulcb: Add support for R-Car H3 ES2.0 Split off support for H3ULCB boards with the ES1.x revision of the R-Car H3 SoC into a separate file. The main r8a7795-h3ulcb.dts file now corresponds to H3ULCB with R-Car H3 ES2.0 or later. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 2 +- arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb.dts | 42 ++++++++++++++++++++++ arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 4 +-- 3 files changed, 45 insertions(+), 3 deletions(-) commit 54068ae5906a1683668f2d8a7fa2a42545079166 Author: Wolfram Sang Date: Sun May 28 12:14:30 2017 +0200 arm64: dts: r8a7796: add DMA for IIC_DVFS Tested with a Salvator-X. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 482e565fff4f5d4eb5031ed7edcb459d1d009334 Author: Wolfram Sang Date: Sun May 28 12:14:29 2017 +0200 arm64: dts: r8a7795: add DMA for IIC_DVFS Tested with a Salvator-X. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 9f22774c214ada7b951e312ca39a00e3878c560a Author: Kuninori Morimoto Date: Wed May 24 02:16:39 2017 +0000 arm64: dts: ulcb: add 12288000 for sound ADG Current rcar_sound only has 11289600 (= for 44.1kHz) clock-frequency, but it needs 12288000 for 48kHz too. Otherwise, 48kHz based sound can't handle correctly. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d37d2b3c0ec2708abd64222a04deb1bebab8213f Author: Kuninori Morimoto Date: Wed May 24 02:16:20 2017 +0000 arm64: dts: salvator-x: add 12288000 for sound ADG Current rcar_sound only has 11289600 (= for 44.1kHz) clock-frequency, but it needs 12288000 for 48kHz too. Otherwise, 48kHz based sound can't handle correctly. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b27866e91efb69d2ae335f130b5c9762272b918e Author: Kuninori Morimoto Date: Tue Jun 6 02:33:47 2017 +0000 arm64: defconfig: enable Simple Sound Card support commit 7fa72cca39a0 ("ASoC: rsnd: add HDMI output support") exchanged Renesas Sound driver's Kconfig selection from SND_SIMPLE_CARD to SND_SIMPLE_CARD_UTILS, because of this, defconfig doesn't select SND_SIMPLE_CARD today. All Renesas platform needs SND_SIMPLE_CARD, Let's select it. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit f7d569c1e6a6fa731fc34083a9f0191b7360eeb1 Author: Rob Herring Date: Fri Jun 9 17:50:40 2017 +0200 ARM: dts: r8a779x: Fix PCI bus dtc warnings The bogus 'device_type = "pci"' confuses dtc, causing lots of totally unrelated warnings. After fixing that, real warnings like arch/arm/boot/dts/r8a7790-lager.dtb: Warning (pci_device_reg): Node /pci@ee090000/usb@0,1 PCI unit address format error, expected "1,0" are left. Correct the unit-addresses and reg properties of the subnodes to fix these. Signed-off-by: Rob Herring [geert: Improve description] Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 16 ++++++---------- arch/arm/boot/dts/r8a7791.dtsi | 16 ++++++---------- arch/arm/boot/dts/r8a7794.dtsi | 16 ++++++---------- 3 files changed, 18 insertions(+), 30 deletions(-) commit ad2c0558d0494b420cadd6e887ddab2cd4e27e48 Author: Biju Das Date: Tue Jun 6 16:10:18 2017 +0100 ARM: dts: iwg20d-q7: Add support for iWave G20D-Q7 board based on RZ/G1M Add support for iWave RainboW-G20D-Qseven board based on RZ/G1M. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7743-iwg20d-q7.dts | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit aabf13bac0046a1add4a3c39881ffb0abe692542 Author: Biju Das Date: Tue Jun 6 16:10:17 2017 +0100 ARM: dts: iwg20m: Add iWave RZG1M Qseven SOM Add support for iWave RZG1M Qseven System On Module. http://www.iwavesystems.com/rz-g1m-qseven-module.html Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 8cae359049a88b75217b1c93774cfe3c3e610304 Author: Ulrich Hecht Date: Fri May 19 15:07:04 2017 +0200 ARM: dts: gose: add composite video input Adds VIN, decoder and connector. Signed-off-by: Ulrich Hecht Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793-gose.dts | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit b879d674e03fccb42b0e79f21b2105ad6a824229 Author: Jacopo Mondi Date: Tue May 23 21:20:54 2017 +0200 ARM: dts: r7s72100: Add support for GR-Peach Add device tree source for Renesas GR-Peach board. GR-Peach is an RZ/A1H based board with 10MB of on-chip SRAM and 8MB QSPI flash storage. Add support for the board, and create a 2MB partition to use as rootfs. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r7s72100-gr-peach.dts | 66 ++++++++++++++++++++++ 3 files changed, 69 insertions(+) commit 8e0931022e12e45bab9afe01e830d697d9c8e73d Author: Daniel Lezcano Date: Fri May 26 15:30:34 2017 +0200 Revert "clockevents: Add a clkevt-of mechanism like clksrc-of" After discussing it, this feature is dropped as it is not considered adequate: https://patchwork.kernel.org/patch/9639317/ There is no user of this macro yet, so there is no impact on the drivers. This reverts commit 376bc27150f180d9f5eddec6a14117780177589d. Cc: Mark Rutland Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 7 ----- drivers/clocksource/Makefile | 1 - drivers/clocksource/clkevt-probe.c | 56 -------------------------------------- include/asm-generic/vmlinux.lds.h | 2 -- include/linux/clockchips.h | 9 ------ 5 files changed, 75 deletions(-) commit ef89718ab685e40887bb76d4e7664a931306a2a4 Author: Daniel Lezcano Date: Fri May 26 10:38:07 2017 +0200 clocksource/drivers/fttmr010: Fix aspeed-2500 initialization The recent changes made the fttmr010 to be more generic and support different timers with a very few differences like moxart or aspeed. The aspeed timer uses a countdown and there is a test against the aspeed2400 compatible string to set a flag. With the previous patch, we added the aspeed2500 compatible string but without taking care of setting the countdown flag. Fix this by specifiying a init function and pass the aspeed flag to a common init function. Reviewed-by: Linus Walleij Tested-by: Andrew Jeffery Reviewed-by: Andrew Jeffery Acked-by: Joel Stanley Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit a6fbb9c4cc80bbbe5a088c3b64d1e41eee16b090 Author: Daniel Lezcano Date: Thu May 25 22:19:29 2017 +0200 clocksource/drivers/fttmr010: Add AST2500 compatible string Also clean up space-before-tab issues in the documentation. Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Acked-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/faraday,fttmr010.txt | 2 ++ drivers/clocksource/timer-fttmr010.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit ec14ba1ec537d530208c3ba3b3738349d386850f Author: Linus Walleij Date: Thu May 18 22:17:04 2017 +0200 clocksource/drivers/fttmr010: Merge Moxa into FTTMR010 This merges the Moxa Art timer driver into the Faraday FTTMR010 driver and replaces all Kconfig symbols to use the Faraday driver instead. We are now so similar that the drivers can be merged by just adding a few lines to the Faraday timer. Differences: - The Faraday driver explicitly sets the counter to count upwards for the clocksource, removing the need for the clocksource core to invert the value. - The Faraday driver also handles sched_clock() On the Aspeed, the counter can only count downwards, so support the timers in downward-counting mode as well, and flag the Aspeed to use this mode. This mode was tested on the Gemini so I have high hopes that it'll work fine on the Aspeed as well. After this we have one driver for all three SoCs and a generic Faraday FTTMR010 timer driver, which is nice. Cc: Joel Stanley Cc: Jonas Jensen Signed-off-by: Linus Walleij Reviewed-by: Joel Stanley Tested-by: Joel Stanley Signed-off-by: Daniel Lezcano arch/arm/mach-aspeed/Kconfig | 2 +- arch/arm/mach-moxart/Kconfig | 2 +- drivers/clocksource/Kconfig | 7 - drivers/clocksource/Makefile | 1 - drivers/clocksource/moxart_timer.c | 256 ----------------------------------- drivers/clocksource/timer-fttmr010.c | 143 ++++++++++++++----- 6 files changed, 108 insertions(+), 303 deletions(-) commit b589da8b26f4b5cc3c3a84183dee33a73871522b Author: Linus Walleij Date: Thu May 18 22:17:03 2017 +0200 clocksource/drivers/fttmr010: Switch to use TIMER2 src This switches the clocksource to TIMER2 like the Moxart driver does. Mainly to make it more similar to the Moxart/Aspeed driver but also because it seems more neat to use the timers in order: use timer 1, then timer 2. Cc: Joel Stanley Tested-by: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit d0d76d575960b0bf0e1481cb3f578add9b26988c Author: Linus Walleij Date: Thu May 18 22:17:02 2017 +0200 clocksource/drivers/fttmr010: Switch to use bitops This switches the drivers to use the bitops BIT() macro to define bits. Cc: Joel Stanley Tested-by: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 43 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) commit e7bad212ca0e6b1dcca1e0316ca8658c738c1206 Author: Linus Walleij Date: Thu May 18 22:17:01 2017 +0200 clocksource/drivers/fttmr010: Use state container This converts the Faraday FTTMR010 to use the state container design pattern. Take some care to handle the state container and free:ing of resources as has been done in the Moxa driver. Cc: Joel Stanley Tested-by: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 190 +++++++++++++++++++++-------------- 1 file changed, 116 insertions(+), 74 deletions(-) commit dd98442e17a66318b021d4342abf53069cc8bed1 Author: Linus Walleij Date: Thu May 18 22:17:00 2017 +0200 clocksource/drivers/fttmr010: Drop Gemini specifics The Gemini now has a proper clock driver and a proper PCLK assigned in its device tree. Drop the Gemini-specific hacks to look up the system speed and rely on the clock framework like everyone else. Cc: Joel Stanley Tested-by: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 103 ++++++++--------------------------- 1 file changed, 22 insertions(+), 81 deletions(-) commit 454a65f43a33d48ea04ffaf635ef35abc3d27990 Author: Linus Walleij Date: Thu May 18 22:16:59 2017 +0200 clocksource/drivers/fttmr010: Merge FTTMR010 DT bindings This merges the Moxa and FTTMR010 device tree bindings into the Faraday binding document to avoid confusion. The FTTMR010 is the IP block used by these SoCs, in vanilla or modified variant. The Aspeed variant is modified such that it is no longer fully register-compatible with FTTMR010 so for this reason it is not listed with two compatible strings, instead just one. Cc: Joel Stanley Tested-by: Jonas Jensen Signed-off-by: Linus Walleij Acked-by: Rob Herring Acked-by: Joel Stanley Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/faraday,fttmr010.txt | 4 +++- .../devicetree/bindings/timer/moxa,moxart-timer.txt | 19 ------------------- 2 files changed, 3 insertions(+), 20 deletions(-) commit 2a55e98f9f76825d78a4e6ef315c35fccabf5212 Author: Linus Walleij Date: Thu May 18 22:16:58 2017 +0200 clocksource/drivers/fttmr010: Fix the clock handling We need to also prepare and enable the clock we are using to get the right reference count and avoid it being shut off. Tested-by: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 164a1a90a4ae54911f02a1b4fc6ea7148edf07cb Author: Andrew Jeffery Date: Mon Jun 5 17:18:46 2017 +0930 arm: aspeed: Add clock-names property to timer node The merging of a number of clocksource drivers into fttmr010 means we require clock-names to be specified in the Aspeed timer node, else the clocksource fails to probe and boot hangs. Signed-off-by: Andrew Jeffery Signed-off-by: Daniel Lezcano arch/arm/boot/dts/aspeed-g4.dtsi | 1 + arch/arm/boot/dts/aspeed-g5.dtsi | 1 + 2 files changed, 2 insertions(+) commit 855f06a1009faabb0c6a3e9b49d115496d325856 Author: Martin Blumenstingl Date: Sun Jun 4 20:33:39 2017 +0200 clk: meson: meson8b: add compatibles for Meson8 and Meson8m2 The clock controller on Meson8, Meson8b and Meson8m2 is very similar based on the code from the Amlogic GPL kernel sources. Add separate compatibles for each SoC to make sure that we can easily implement all the small differences for each SoC later on. In general the Meson8 and Meson8m2 seem to be almost identical as they even share the same mach-meson8 directory in Amlogic's GPL kernel sources. The main clocks on Meson8, Meson8b and Meson8m2 are very similar, because they are all using the same PLL values, 90% of the clock gates are the same (the actual diffstat of the mach-meson8/clock.c and mach-meson8b/clock.c files is around 30 to 40 lines, when excluding all commented out code). The difference between the Meson8 and Meson8b clock gates seem to be: - Meson8 has AIU_PCLK, HDMI_RX, VCLK2_ENCT, VCLK2_ENCL, UART3, CSI_DIG_CLKIN gates which don't seem to be available on Meson8b - the gate on Meson8 for bit 7 seems to be named "_1200XXX" instead of "PERIPHS_TOP" (on Meson8b) - Meson8b has a SANA gate which doesn't seem to exist on Meson8 (or on Meson8 the same bit is used by the UART3 gate in Amlogic's GPL kernel sources) None of these gates is added for now, since it's unclear whether these definitions are actually correct (the VCLK2_ENCT gate for example is defined, but only used in some commented block). The main difference between all three SoCs seem to be the video (VPU) clocks. Apart from different supported clock rates (according to vpu.c in mach-meson8 and mach-meson8b from Amlogic's GPL kernel sources) the most notable difference is that Meson8m2 has a GP_PLL clock and a mux (probably the same as on the Meson GX SoCs) to support glitch-free (clock rate) switching. None of these VPU clocks are not supported by our mainline meson8b clock driver yet though. Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Acked-by: Kevin Hilman Signed-off-by: Jerome Brunet .../devicetree/bindings/clock/amlogic,meson8b-clkc.txt | 11 +++++++---- drivers/clk/meson/Kconfig | 6 +++--- drivers/clk/meson/meson8b.c | 5 ++++- 3 files changed, 14 insertions(+), 8 deletions(-) commit c22f06d3c0c943005697d03e46dccad2aa0bc8c0 Author: Martin Blumenstingl Date: Sun Jun 11 12:16:36 2017 +0200 clk: meson8b: export the ethernet gate clock Export the ethernet gate clock to the dt-bindings. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.h | 2 +- include/dt-bindings/clock/meson8b-clkc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 677f6af5d685a5990148222804f3649196789b91 Author: Martin Blumenstingl Date: Sun Jun 11 12:16:35 2017 +0200 clk: meson8b: export the USB clocks Export the USB related clocks (for the USB controller and the USB2 PHYs) so they can be used in the dt-bindings. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.h | 10 +++++----- include/dt-bindings/clock/meson8b-clkc.h | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) commit 06eff6a792967d0cbb70424bc6acded91b28e41f Author: Martin Blumenstingl Date: Sun Jun 11 12:16:34 2017 +0200 clk: meson8b: export the gate clock for the HW random number generator This exports the clock so it can be used in the dt-bindings. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.h | 2 +- include/dt-bindings/clock/meson8b-clkc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit e2e5f3211fe2b57f4a9feed5c053c48aea7eb2a2 Author: Martin Blumenstingl Date: Sun Jun 11 12:16:33 2017 +0200 clk: meson8b: export the SDIO clock Export the SDIO clock so it can be used in the dt-bindings. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.h | 2 +- include/dt-bindings/clock/meson8b-clkc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 70ad0d0351470d6c1d22063497e644ecf847b63f Author: Martin Blumenstingl Date: Sun Jun 11 12:16:32 2017 +0200 clk: meson8b: export the SAR ADC clocks Export the clocks for the SAR ADC so they can be used in the dt-bindings. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.h | 4 ++-- include/dt-bindings/clock/meson8b-clkc.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit d809f2cca354d88ccc19aad1ecbe54704448615e Author: Sebastian Reichel Date: Thu Jun 8 23:16:08 2017 +0200 ARM: dts: omap4-droid4: Fix WLAN compatible Motorola Droid 4 uses a WL1285C, so use proper compatible value. To avoid regressions while support for the new compatible value is added to the Linux kernel, the old compatible value is preserved as fallback. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f0b0c03fb97596ca313435df8e5d3fc52e8d00c Author: Sebastian Reichel Date: Tue May 2 10:03:01 2017 +0200 ARM: dts: omap4-droid4: Add isl29030 ALS/proximity sensor The Droid 4 has a isl29030 to measure ambient light (e.g. for automatically adapting display brightness) and proximity. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 018b732458ac39c4858d9840c0e32310bc0930dd Merge: c76e4d2 0e78b12 Author: Tony Lindgren Date: Mon Jun 12 00:07:44 2017 -0700 Merge branch 'omap-for-v4.13/legacy-v2' into omap-for-v4.13/soc-v3 commit f5abd532227affc2129586f74d28d28c316ae1e3 Author: Takashi Sakamoto Date: Mon Jun 12 09:41:46 2017 +0900 ALSA: pcm: use %s instead of %c for format of PCM buffer tracepoints As long as I know, in userspace, '%c' format on printing format for tracepoint is replaced with '>c<' by existent tracing program; i.g. 'perf-trace' and 'trace-cmd'. This is inconvenient. This commit replaces the format with '%s'. The length of letters in the format string is not changed, thus this commit doesn't increase object size. In theory, I should work for improvements of these tracing programs, but here I'd like to save my time to work for the other projects. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_trace.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fccf53881e9b564321326f62ed5f85130fa6e569 Author: Takashi Sakamoto Date: Mon Jun 12 09:41:45 2017 +0900 ALSA: pcm: add 'applptr' event of tracepoint In design of ALSA PCM core, status and control data for runtime of ALSA PCM substream are shared between kernel/user spaces by page frame mapping with read-only attribute. Both of hardware-side and application-side position on PCM buffer are maintained as a part of the status data. In a view of ALSA PCM application, these two positions can be updated by executing ioctl(2) with some commands. There's an event of tracepoint for hardware-side position; 'hwptr'. On the other hand, no events for application-side position. This commit adds a new event for this purpose; 'applptr'. When the application-side position is changed in kernel space, this event is probed with useful information for developers. I note that the event is not probed for all of ALSA PCM applications, When applications are written by read/write programming scenario, the event is surely probed. The applications execute ioctl(2) with SNDRV_PCM_IOCTL_[READ|WRITE][N/I]_FRAMES to read/write any PCM frame, then ALSA PCM core updates the application-side position in kernel land. However, when applications are written by mmap programming scenario, if maintaining the application side position in kernel space accurately, applications should voluntarily execute ioctl(2) with SNDRV_PCM_IOCTL_SYNC_PTR to commit the number of handled PCM frames. If not voluntarily, the application-side position is not changed, thus the added event is not probed. There's a loophole, using architectures to which ALSA PCM core judges non cache coherent. In this case, the status and control data is not mapped into processe's VMA for any applications. Userland library, alsa-lib, is programmed for this case. It executes ioctl(2) with SNDRV_PCM_IOCTL_SYNC_PTR command every time to requiring the status and control data. ARM is such an architecture. Below is an example with serial sound interface (ssi) on i.mx6 quad core SoC. I use v4.1 kernel released by fsl-community with patches from VIA Tech. Inc. for VAB820, and my backport patches for relevant features for this patchset. I use Ubuntu 17.04 from ports.ubuntu.com as user land for armhf architecture. $ aplay -v -M -D hw:imx6vab820sgtl5,0 /dev/urandom -f S16_LE -r 48000 --period-size=128 --buffer-size=256 Playing raw data '/dev/urandom' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono Hardware PCM card 0 'imx6-vab820-sgtl5000' device 0 subdevice 0 Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S16_LE subformat : STD channels : 1 rate : 48000 exact rate : 48000 (48000/1) msbits : 16 buffer_size : 256 period_size : 128 period_time : 2666 tstamp_mode : NONE tstamp_type : MONOTONIC period_step : 1 avail_min : 128 period_event : 0 start_threshold : 256 stop_threshold : 256 silence_threshold: 0 silence_size : 0 boundary : 1073741824 appl_ptr : 0 hw_ptr : 0 mmap_area[0] = 0x76f98000,0,16 (16) $ trace-cmd record -e snd_pcm:hwptr -e snd_pcm:applptr $ trace-cmd report ... 60.208495: applptr: pcmC0D0p/sub0: prev=1792, curr=1792, avail=0, period=128, buf=256 60.208633: applptr: pcmC0D0p/sub0: prev=1792, curr=1792, avail=0, period=128, buf=256 60.210022: hwptr: pcmC0D0p/sub0: IRQ: pos=128, old=1536, base=1536, period=128, buf=256 60.210202: applptr: pcmC0D0p/sub0: prev=1792, curr=1792, avail=128, period=128, buf=256 60.210344: hwptr: pcmC0D0p/sub0: POS: pos=128, old=1664, base=1536, period=128, buf=256 60.210348: applptr: pcmC0D0p/sub0: prev=1792, curr=1792, avail=128, period=128, buf=256 60.210486: applptr: pcmC0D0p/sub0: prev=1792, curr=1792, avail=128, period=128, buf=256 60.210626: applptr: pcmC0D0p/sub0: prev=1792, curr=1920, avail=0, period=128, buf=256 60.211002: applptr: pcmC0D0p/sub0: prev=1920, curr=1920, avail=0, period=128, buf=256 60.211142: hwptr: pcmC0D0p/sub0: POS: pos=128, old=1664, base=1536, period=128, buf=256 60.211146: applptr: pcmC0D0p/sub0: prev=1920, curr=1920, avail=0, period=128, buf=256 60.211287: applptr: pcmC0D0p/sub0: prev=1920, curr=1920, avail=0, period=128, buf=256 60.212690: hwptr: pcmC0D0p/sub0: IRQ: pos=0, old=1664, base=1536, period=128, buf=256 60.212866: applptr: pcmC0D0p/sub0: prev=1920, curr=1920, avail=128, period=128, buf=256 60.212999: hwptr: pcmC0D0p/sub0: POS: pos=0, old=1792, base=1792, period=128, buf=256 60.213003: applptr: pcmC0D0p/sub0: prev=1920, curr=1920, avail=128, period=128, buf=256 60.213135: applptr: pcmC0D0p/sub0: prev=1920, curr=1920, avail=128, period=128, buf=256 60.213276: applptr: pcmC0D0p/sub0: prev=1920, curr=2048, avail=0, period=128, buf=256 60.213654: applptr: pcmC0D0p/sub0: prev=2048, curr=2048, avail=0, period=128, buf=256 60.213796: hwptr: pcmC0D0p/sub0: POS: pos=0, old=1792, base=1792, period=128, buf=256 60.213800: applptr: pcmC0D0p/sub0: prev=2048, curr=2048, avail=0, period=128, buf=256 60.213937: applptr: pcmC0D0p/sub0: prev=2048, curr=2048, avail=0, period=128, buf=256 60.215356: hwptr: pcmC0D0p/sub0: IRQ: pos=128, old=1792, base=1792, period=128, buf=256 60.215542: applptr: pcmC0D0p/sub0: prev=2048, curr=2048, avail=128, period=128, buf=256 60.215679: hwptr: pcmC0D0p/sub0: POS: pos=128, old=1920, base=1792, period=128, buf=256 60.215683: applptr: pcmC0D0p/sub0: prev=2048, curr=2048, avail=128, period=128, buf=256 60.215813: applptr: pcmC0D0p/sub0: prev=2048, curr=2048, avail=128, period=128, buf=256 60.215947: applptr: pcmC0D0p/sub0: prev=2048, curr=2176, avail=0, period=128, buf=256 ... We can surely see 'applptr' event is probed even if the application run for mmap programming scenario ('-M' option and 'hw' plugin). Below is a result of strace: 02:44:15.886382 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.887203 poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}]) 02:44:15.887471 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.887637 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.887805 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.887969 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.888132 read(3, "..."..., 256) = 256 02:44:15.889040 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.889221 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.889431 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.889606 poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}]) 02:44:15.889833 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.889998 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.890164 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.891048 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.891228 read(3, "..."..., 256) = 256 02:44:15.891497 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.891661 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.891829 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 02:44:15.891991 poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}]) 02:44:15.893007 ioctl(4, SNDRV_PCM_IOCTL_SYNC_PTR, 0x56a32b30) = 0 We can see 7 calls of ioctl(2) with SNDRV_PCM_IOCTL_SYNC_PTR per loop with call of poll(2). 128 PCM frames are transferred per loop of one poll(2), because the PCM substream is configured with S16_LE format and 1 channel (2 byte * 1 * 128 = 256 bytes). This equals to the size of period of PCM buffer. Comparing to the probed data, one of the 7 calls of ioctl(2) is actually used to commit the number of copied PCM frames to kernel space. The other calls are just used to check runtime status of PCM substream; e.g. XRUN. The tracepoint event is useful to investigate this case. I note that below modules are related to the above sample. * snd-soc-dummy.ko * snd-soc-imx-sgtl5000.ko * snd-soc-fsl-ssi.ko * snd-soc-imx-pcm-dma.ko * snd-soc-sgtl5000.ko My additional note is lock acquisition. The event is probed under acquiring PCM stream lock. This means that calculation in the event is free from any hardware events. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 4 ++++ sound/core/pcm_trace.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit 66e01a5cf63f2b132059d0d3d78ed737207489f2 Author: Takashi Sakamoto Date: Mon Jun 12 09:41:44 2017 +0900 ALSA: pcm: unify codes to operate application-side position on PCM buffer In a series of recent work, ALSA PCM core got some arrangements to handle application-side position on PCM buffer. However, relevant codes still disperse to two translation units This commit unifies these codes into a helper function. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 27 ++++++++++++++++++++++++--- sound/core/pcm_local.h | 2 ++ sound/core/pcm_native.c | 28 ++++------------------------ 3 files changed, 30 insertions(+), 27 deletions(-) commit 81606aea2303aa11867e97030299b1057091c2fd Merge: ef189c8 32c1431 Author: Greg Kroah-Hartman Date: Mon Jun 12 08:43:53 2017 +0200 Merge 4.12-rc5 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 111b0cdb97d44cfe5dec1338a78ba8aff65c32e2 Author: Takashi Iwai Date: Fri Jun 9 15:11:58 2017 +0200 ALSA: seq: Allow the modular sequencer registration Many drivers bind the sequencer stuff in off-load by another driver module, so that it's loaded only on demand. In the current code, this mechanism doesn't work when the driver is built-in while the sequencer is module. We check with IS_REACHABLE() and enable only when the sequencer is in the same level of build. However, this is basically a overshoot. The binder code (snd-seq-device) is an individual module from the sequencer core (snd-seq), and we just have to make the former a built-in while keeping the latter a module for allowing the scenario like the above. This patch achieves that by rewriting Kconfig slightly. Now, a driver that provides the manual sequencer device binding should select CONFIG_SND_SEQ_DEVICE in a way as select SND_SEQ_DEVICE if SND_SEQUENCER != n Note that the "!=n" is needed here to avoid the influence of the sequencer core is module while the driver is built-in. Also, since rawmidi.o may be linked with snd_seq_device.o when built-in, we have to shuffle the code to make the linker happy. (the kernel linker isn't smart enough yet to handle such a case.) That is, snd_seq_device.c is moved to sound/core from sound/core/seq, as well as Makefile. Last but not least, the patch replaces the code using IS_REACHABLE() with IS_ENABLED(), since now the condition meets always when enabled. Signed-off-by: Takashi Iwai sound/core/Kconfig | 4 + sound/core/Makefile | 2 + sound/core/rawmidi.c | 4 +- sound/core/seq/Kconfig | 2 +- sound/core/seq/Makefile | 3 +- sound/core/seq/seq_device.c | 315 ---------------------------------------- sound/core/seq_device.c | 315 ++++++++++++++++++++++++++++++++++++++++ sound/drivers/Kconfig | 2 + sound/drivers/opl3/opl3_lib.c | 2 +- sound/drivers/opl4/opl4_lib.c | 4 +- sound/drivers/opl4/opl4_local.h | 2 +- sound/isa/Kconfig | 1 + sound/isa/sb/emu8000.c | 2 +- sound/isa/sb/sb16.c | 2 +- sound/pci/Kconfig | 1 + sound/pci/emu10k1/emu10k1.c | 2 +- 16 files changed, 336 insertions(+), 327 deletions(-) commit 7bf1e44f865523aa16e0eb340a82d643da9215b5 Merge: e5770b7 32c1431 Author: Greg Kroah-Hartman Date: Mon Jun 12 08:20:47 2017 +0200 Merge 4.12-rc5 into staging-next We want the IIO fixes and other staging driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 069a0f32c9ca75ec7f02146711ec1f5840a68cbf Merge: aca4e68 32c1431 Author: Greg Kroah-Hartman Date: Mon Jun 12 08:18:10 2017 +0200 Merge 4.12-rc5 into char-misc-next We want the char/misc driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 1f4be24786b8521945b00e1810576911994ba504 Author: Andy Shevchenko Date: Sat Jun 10 22:09:21 2017 +0300 extcon: int3496: Switch to devm_acpi_dev_add_driver_gpios() Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assingment if ->probe() fails. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi drivers/extcon/extcon-intel-int3496.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 677252a185a9cf609d650364817d87279ce51df0 Author: Bartlomiej Zolnierkiewicz Date: Mon Apr 24 15:13:17 2017 +0200 hwmon: (pwm-fan) Switch to new atomic PWM API Switch pwm-fan driver to new atomic PWM API. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Guenter Roeck drivers/hwmon/pwm-fan.c | 68 +++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 42 deletions(-) commit ccc9b8263d904228e5007cfc206eba3e6bea9f98 Author: Carlo Caione Date: Tue May 30 11:05:07 2017 +0200 hwmon: (scpi) Fix the scale of SCP sensor readings The implementation details for SCPI seems to suggest that the sensor readings must be reported by SCP using a well defined scale (millidegree Celsius for temperature, millivolts for voltage, milliamperes for current, microwatts for power and microjoules for energy). This is also important for the interaction with other subsystems: for example both the thermal sub-system and the hwmon sysfs interface expect the temperature expressed in millidegree Celsius. Unfortunately since this behaviour is dependent on the firmware implementation there are cases where the sensor readings are reported using a different scale. For example in the Amlogic SoCs the temperature is reported in degree and not millidegree Celsius. To take into account this discrepancy and fixup the values reported by SCP a new compatible 'amlogic,meson-gxbb-scpi-sensors' is introduced and used in this patch by the scpi-hwmon driver to convert the sensor readings to the expected scale. Signed-off-by: Carlo Caione Acked-by: Sudeep Holla Signed-off-by: Guenter Roeck drivers/hwmon/scpi-hwmon.c | 54 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 6 deletions(-) commit 1e276292bf25d288b645d3026f6c026ac9347061 Author: Patrick Venture Date: Thu Jun 1 07:25:33 2017 -0700 hwmon: (aspeed-pwm-tacho) Enable both edge measurement. The aspeed-pwm-tacho controller supports measuring the fan tach by using leading, falling, or both edges. This change allows the driver to support either of the three configurations and will appropriately modify the returned tach data. If the controller is measuring with both edges it can return a value more quickly to the requestor. This version of the driver should still take ~1s to return with an RPM value per fan, however, it can be tuned faster with double edge counting enabled than without. I tested this and found the number returned matched what I expected. Signed-off-by: Patrick Venture Signed-off-by: Guenter Roeck drivers/hwmon/aspeed-pwm-tacho.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 996cf5a5e94486113e8b998c4e1ecd9e4933aee8 Author: Shilpasri G Bhat Date: Mon May 29 10:16:01 2017 +0530 hwmon: (ibmpowernv) Add highest/lowest attributes to sensors OCC provides historical minimum and maximum value for the sensor readings. This patch exports them as highest and lowest attributes for the inband sensors copied by OCC to main memory. Signed-off-by: Shilpasri G Bhat Signed-off-by: Guenter Roeck drivers/hwmon/ibmpowernv.c | 68 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 7 deletions(-) commit 4ba1bb12cf21f4ee4681aee939c4d9d82d6f49f2 Author: Wolfram Sang Date: Sun May 21 22:34:43 2017 +0200 hwmon: (pmbus) move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Documentation/hwmon/pmbus-core | 2 +- MAINTAINERS | 2 +- drivers/hwmon/pmbus/pmbus.c | 2 +- drivers/hwmon/pmbus/pmbus_core.c | 2 +- drivers/hwmon/pmbus/ucd9000.c | 2 +- drivers/hwmon/pmbus/ucd9200.c | 2 +- include/linux/i2c/pmbus.h | 49 ---------------------------------------- include/linux/pmbus.h | 49 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 55 insertions(+), 55 deletions(-) commit 0c9fe1614126171c70e0dc0b0635d45a327ac82a Author: Wolfram Sang Date: Sun May 21 22:34:42 2017 +0200 hwmon: (max6639) move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck drivers/hwmon/max6639.c | 2 +- include/linux/i2c/max6639.h | 14 -------------- include/linux/platform_data/max6639.h | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 15 deletions(-) commit 8116e8dd564fcbadf9f3697dcd0c3d37c049fb45 Author: Wolfram Sang Date: Sun May 21 22:34:41 2017 +0200 hwmon: (ltc4245) move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Documentation/hwmon/ltc4245 | 2 +- drivers/hwmon/ltc4245.c | 2 +- include/linux/i2c/ltc4245.h | 21 --------------------- include/linux/platform_data/ltc4245.h | 21 +++++++++++++++++++++ 4 files changed, 23 insertions(+), 23 deletions(-) commit 570999f306fc0375a533a1906ff35fffe289e36b Author: Wolfram Sang Date: Sun May 21 22:34:40 2017 +0200 hwmon: (ds620) move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck drivers/hwmon/ds620.c | 2 +- include/linux/i2c/ds620.h | 21 --------------------- include/linux/platform_data/ds620.h | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 22 deletions(-) commit 9010624cc5b446d3377dde4753eecbaf945f3a41 Author: Wolfram Sang Date: Sun May 21 22:34:39 2017 +0200 hwmon: (ads1015) move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Documentation/hwmon/ads1015 | 2 +- MAINTAINERS | 2 +- drivers/hwmon/ads1015.c | 2 +- drivers/iio/adc/ti-ads1015.c | 2 +- include/linux/i2c/ads1015.h | 36 ----------------------------------- include/linux/platform_data/ads1015.h | 36 +++++++++++++++++++++++++++++++++++ 6 files changed, 40 insertions(+), 40 deletions(-) commit 8f05bcc33e749dc6b6d1fefe2d0c1a97150b90b4 Author: Chris Packham Date: Mon May 15 13:30:28 2017 +1200 hwmon: (adt7475) temperature smoothing When enabled temperature smoothing allows ramping the fan speed over a configurable period of time instead of jumping to the new speed instantaneously. Signed-off-by: Chris Packham Signed-off-by: Guenter Roeck Documentation/hwmon/adt7475 | 4 ++ drivers/hwmon/adt7475.c | 91 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) commit 3490c92a0963280f7f01ebb23989066a67dfd18d Author: Chris Packham Date: Mon May 15 13:30:29 2017 +1200 hwmon: (adt7475) add high frequency support Systems using 4-wire fans usually require high frequency (22.5kHz) output on the pwm. Add 22500 as a valid option in the pwmfreq_table. In high frequency mode the low-order bit are ignored so they can safely be set to 0. Signed-off-by: Chris Packham Signed-off-by: Guenter Roeck drivers/hwmon/adt7475.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1d58f5efbf2d8599a9062e4c800a072e2f015625 Author: Chris Packham Date: Mon May 15 13:30:27 2017 +1200 hwmon: (adt7475) fan stall prevention By default adt7475 will stop the fans (pwm duty cycle 0%) when the temperature drops past Tmin - hysteresis. Some systems want to keep the fans moving even when the temperature drops so add new sysfs attributes that configure the enhanced acoustics min 1-3 which allows the fans to run at the minimum configure pwm duty cycle. Signed-off-by: Chris Packham Signed-off-by: Guenter Roeck Documentation/hwmon/adt7475 | 5 +++++ drivers/hwmon/adt7475.c | 50 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit e4651640403307d79559dff113da4933c0921714 Author: Chris Packham Date: Thu May 11 15:45:21 2017 +1200 hwmon: (adt7475) replace find_nearest() with find_closest() The adt7475 has had find_nearest() since it's creation in 2009. Since then find_closest() has been introduced and several drivers have been updated to use it. Update the adt7475 to use find_closest() and remove the now unused find_nearest(). Signed-off-by: Chris Packham Signed-off-by: Guenter Roeck drivers/hwmon/adt7475.c | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) commit 8991ebd9c9a69dcc03f5a961718a7a3184c1295d Author: Samuel Mendoza-Jonas Date: Mon May 1 10:39:01 2017 +1000 hwmon: (pmbus) Add client driver for IR35221 IR35221 is a Digital DC-DC Multiphase Converter Signed-off-by: Samuel Mendoza-Jonas [groeck: Preserve alphabetic order in Kconfig; add missing break statements (from Dan Carpenter); add missing error checks] Signed-off-by: Guenter Roeck Documentation/hwmon/ir35221 | 87 +++++++++++ drivers/hwmon/pmbus/Kconfig | 10 ++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/ir35221.c | 337 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 435 insertions(+) commit 419220dc48699a3d215c8006d19b897c7796c0d2 Author: Guenter Roeck Date: Wed May 17 18:19:18 2017 -0700 hwmon: (nct6775) Add support for NCT6795D NCT6795D is mostly compatible to NCT6793D with a few minor differences. Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) commit e5c85221103830a9b234ca0bb957910799a95d7e Author: Guenter Roeck Date: Wed May 17 18:09:41 2017 -0700 hwmon: (nct6775) Improve fan detection Recent chips support multiple pins for fan speed inputs and fan control outputs. Examine all of them to determine supported fan controls. Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) commit cc66b30382549aca35385c04f9a9911052c548ef Author: Guenter Roeck Date: Wed May 17 18:05:06 2017 -0700 hwmon: (nct6775) Rework temperature source and label handling Instead of checking if a temperature source has a label, use a bit mask to determine if a temperature source is valid for a given chip. This simplifies the code and, if necessary, lets us support chips with unknown or incomplete labels. Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 96 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 65 insertions(+), 31 deletions(-) commit d1bb218687079c365ea8a8a096abeefc8768dd0c Author: Guenter Roeck Date: Wed May 17 18:40:10 2017 -0700 hwmon: (nct6775) Use bitops Using bitops instead of shift operations makes the code easier to read. Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 123 ++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 61 deletions(-) commit 37853952b9e4234ab6e085231cf5b6d232c40d0a Author: Andy Shevchenko Date: Sun Jun 11 18:15:48 2017 +0300 power: supply: twl4030_charger: Use sysfs_match_string() helper Use sysfs_match_string() helper instead of open coded variant. Cc: Sebastian Reichel Signed-off-by: Andy Shevchenko Signed-off-by: Sebastian Reichel drivers/power/supply/twl4030_charger.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit f1c9eed7f437d0fc75b35d65bb45eab281706321 Author: Daniel Borkmann Date: Sun Jun 11 03:55:27 2017 +0200 bpf, arm64: take advantage of stack_depth tracking Make use of recently implemented stack_depth tracking for arm64 JIT, so that stack usage can be reduced heavily for programs not using tail calls at least. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 66e037ca57f967bb344fbd381fa0651a502cb1f4 Merge: 6d307f6 46e9d0b Author: David S. Miller Date: Sun Jun 11 18:10:42 2017 -0400 Merge tag 'mlx5-updates-2017-06-11' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-06-11 This series provides updates to mlx5 header rewrite feature, from Or Gerlitz. and three more small updates From maor and eran. ------- Or says: Packets belonging to flows which are different by matching may still need to go through the same header re-writes (e.g set the current routing hop MACs and issue TTL decrement). To minimize the number of modify header IDs, we add a cache for header re-write IDs which is keyed by the binary chain of modify header actions. The caching is supported for both eswitch and NIC use-cases, where the actual conversion of the code to use caching comes in separate patches, one per use-case. Using a per field mask field, the TC pedit action supports modifying partial fields. The last patch enables offloading that. ------- From Maor, update flow table commands layout to the latest HW spec. From Eran, ethtool connector type reporting updates. ==================== Signed-off-by: David S. Miller commit 82e7d5012f73e51209305876bed2aac53b62cde3 Author: Takashi Sakamoto Date: Sun Jun 11 23:56:13 2017 +0900 ALSA: pcm: probe events when parameters are changed actually At present, trace events are probed even if corresponding parameter is not actually changed. This is inconvenient. This commit improves the behaviour. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 56 +++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 27 deletions(-) commit f74ae15fe3da7905b78e986ad906a333587cf160 Author: Takashi Sakamoto Date: Sun Jun 11 23:56:12 2017 +0900 ALSA: pcm: return error immediately for parameters handling When refining mask/interval parameters, helper functions can return error code. This error is not handled immediately. This seems to return parameters to userspace applications in its meddle of processing. However, in general, when receiving error from system calls, the application might not handle argument buffer. It's reasonable to judge the above design as superfluity. This commit handles the error immediately. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 66 ++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 28 deletions(-) commit ed3edc0909a84d80b3db3eca9c76a95e29ccae07 Author: Andy Shevchenko Date: Sat Jun 10 21:58:41 2017 +0300 iio: accel: mma9551: use NULL for GPIO connection ID While using GPIO library API we might get into troubles in the future, because we can't rely on label name in the driver since vendor firmware might provide any GPIO pin there, e.g. "reset", and even mark it in _DSD (in which case the request will fail). To avoid inconsistency and potential issues we have two options: a) generate GPIO ACPI mapping table and supply it via acpi_dev_add_driver_gpios(), or b) just pass NULL as connection ID. The b) approach is much simpler and would work since the driver relies on GPIO indices only. Moreover, the _CRS fallback mechanism, when requesting GPIO, is going to be stricter, and supplying non-NULL connection ID when neither _DSD, nor GPIO ACPI mapping is present, will make request fail. See https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/commit/?h=for-next&id=ed7fcf1ed5ea4ea01243995ae085757a77cf0f3e for more background. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron drivers/iio/accel/mma9551.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9eba381bf83b42b312cbae8050e357138782ba9a Author: Benjamin Gaignard Date: Thu Apr 27 15:29:16 2017 +0200 iio: make stm32 trigger driver use INDIO_HARDWARE_TRIGGERED mode Add validate function to be use to use the correct trigger. Add an attribute to configure device mode like for quadrature and enable modes Signed-off-by: Benjamin Gaignard Signed-off-by: Jonathan Cameron .../ABI/testing/sysfs-bus-iio-timer-stm32 | 15 ++++++ drivers/iio/trigger/stm32-timer-trigger.c | 61 ++++++++++++++++++++++ 2 files changed, 76 insertions(+) commit d89e119a088ec83881eda5645307ae252ecea33a Author: Benjamin Gaignard Date: Thu Apr 27 15:29:15 2017 +0200 iio: add hardware triggered operating mode Devices, like stm32 timer, could be triggered by hardware events which are not buffer or software events. However it could be necessary to validate the triggers like it is done for buffer or event triggered modes. This patch add a new INDIO_HARDWARE_TRIGGERED operating mode for this kind of devices and allow this mode to register trigger consumer. Signed-off-by: Benjamin Gaignard Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 4 ++-- include/linux/iio/iio.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 4e36a8ad4d69fbb52f0f07d9ff340cd6a7a2a503 Author: Arvind Yadav Date: Mon May 29 13:12:12 2017 +0530 iio: Aspeed ADC - Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Reviewed-by: Rick Altherr Signed-off-by: Jonathan Cameron drivers/iio/adc/aspeed_adc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 440d303c7775a5dff546dbbc9a39e8c6cbdd6d18 Author: Hans de Goede Date: Tue Jun 6 22:35:38 2017 +0200 Revert "iio: accel: bma180: Add support for BMA250E" This reverts commit f1320b09517bceb261fed887fe261d6cbab2094e. The BMA250E is already handled by the bmc150-accel-i2c driver, which supports the "E" variants of the BMA??? accelerometers better then the bma180 driver. Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron drivers/iio/accel/bma180.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) commit 49dce0f486e668d5b9ca208f771c3f6484c9316f Author: Hans de Goede Date: Tue Jun 6 22:35:37 2017 +0200 Revert "iio: accel: bma180: Add ACPI enumeration support for BMA250E" This reverts commit 5333e88661f2079d5ca8b94690ac920976300de3. The BMA250E is already handled by the bmc150-accel-i2c driver, which supports the "E" variants of the BMA??? accelerometers better then the bma180 driver. Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron drivers/iio/accel/bma180.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit c83761ff0aac954aa368c623bb0f0d1a3214e834 Author: Lorenzo Bianconi Date: Tue Jun 6 22:51:24 2017 +0200 iio: magnetometer: st_magn_spi: fix spi_device_id table Remove LSM303DLHC, LSM303DLM from st_magn_id_table since LSM303DL series does not support spi interface Fixes: 872e79add756 (iio: magn: Add STMicroelectronics magn driver) Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/st_magn_spi.c | 2 -- 1 file changed, 2 deletions(-) commit 93b1b02fae8abff3efe570243e0f11f61e16e973 Author: Lorenzo Bianconi Date: Tue Jun 6 22:51:23 2017 +0200 iio: accel: st_accel_spi: fix spi_device_id table Remove LSM303DL, LSM303DLM, LSM303DLH, LSM303DLHC from st_accel_id_table since LSM303DL series does not support spi interface Fixes: d62511689de5 (iio: accel: Add STMicroelectronics accel driver) Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel_spi.c | 4 ---- 1 file changed, 4 deletions(-) commit 8a12ed7df7750778808c6feb0a5fd5725d2a8aeb Author: Jean-Baptiste Maneyrol Date: Wed Jun 7 13:42:26 2017 +0000 iio: imu: inv_mpu6050: replace sprintf with scnprintf Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 68cd6e5b206b21ff5226c806c55fd8c718d5bde5 Author: Jean-Baptiste Maneyrol Date: Wed Jun 7 13:41:42 2017 +0000 iio: imu: inv_mpu6050: fix lock issues by using our own mutex There are several locks issues when using buffer and direct polling data at the same time. Use our own mutex for managing locking and block simultaneous use of buffer and direct polling by using iio_device_{claim/release}_direct_mode. This makes chip_config enable bit obsolete, so delete it. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 147 +++++++++++++++----------- drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 8 +- drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 5 +- drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 6 +- drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 11 +- 5 files changed, 103 insertions(+), 74 deletions(-) commit e8ee2b67bd0f334613794a7e27dfd8fd51998edf Author: Lorenzo Bianconi Date: Wed Jun 7 20:17:11 2017 +0200 dt-bindings: iio: imu: st_lsm6dsx: support active-low interrupts Update st_lsm6dsx device binding with active-low interrupts support (IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_EDGE_FALLING). Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 89ca88a7cdf20f4afb841c296f2234b527a5c54a Author: Lorenzo Bianconi Date: Wed Jun 7 20:17:10 2017 +0200 iio: imu: st_lsm6dsx: support active-low interrupts Add support for active low interrupts (IRQF_TRIGGER_LOW and IRQF_TRIGGER_FALLING). Configure the device as active high or low according to the requested irq line. Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 405570b4a5c9402f66843be832e44c2ffd70aa01 Author: Andy Shevchenko Date: Fri Jun 9 15:08:10 2017 +0300 iio: adc: ad7791: Use sysfs_match_string() helper Use sysfs_match_string() helper instead of open coded variant. Cc: Lars-Peter Clausen Cc: Michael Hennerich Cc: Jonathan Cameron Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7791.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 02e9a0ff0d7a3c9eadbff698b7146c9eaac86708 Author: Andy Shevchenko Date: Fri Jun 9 15:08:16 2017 +0300 iio: core: Use __sysfs_match_string() helper Use __sysfs_match_string() helper instead of open coded variant. Cc: Jonathan Cameron Cc: Lars-Peter Clausen Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit c306dbd88c3d1a9f41c81d38e8f756d25958d575 Author: Andy Shevchenko Date: Sat Jun 10 22:08:21 2017 +0300 iio: proximity: sx9500: Use devm_gpiod_get() Since index is always 0 replace devm_gpiod_get_index() by devm_gpiod_get(). Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9500.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7af1a06776da9e943126c2dd740a18710ecd66df Author: Sebastian Reichel Date: Thu Apr 27 17:30:12 2017 +0200 iio: adc: twl4030: Fold twl4030-madc.h into driver twl4030-madc.h is no longer used by anything outside of the iio driver, so it can be merged into the driver. Signed-off-by: Sebastian Reichel Acked-by: Wolfram Sang Signed-off-by: Jonathan Cameron drivers/iio/adc/twl4030-madc.c | 113 +++++++++++++++++++++++++++++++- include/linux/i2c/twl4030-madc.h | 137 --------------------------------------- 2 files changed, 112 insertions(+), 138 deletions(-) commit 842eb60b044454f186b4e1da87a4333a9827b62f Author: Sebastian Reichel Date: Thu Apr 27 17:30:11 2017 +0200 iio: adc: twl4030: Remove twl4030_madc_request.func_cb This functionality is not used by the IIO subsystem. Due to removal of legacy API it can also be removed. Signed-off-by: Sebastian Reichel Acked-by: Wolfram Sang Signed-off-by: Jonathan Cameron drivers/iio/adc/twl4030-madc.c | 70 ---------------------------------------- include/linux/i2c/twl4030-madc.h | 1 - 2 files changed, 71 deletions(-) commit 1adf5a3c0d60ad76a873e90a25a456fd51971774 Author: Sebastian Reichel Date: Thu Apr 27 17:30:10 2017 +0200 iio: adc: twl4030: Drop struct twl4030_madc_user_parms This struct is no longer used by anything in the kernel. Signed-off-by: Sebastian Reichel Acked-by: Wolfram Sang Signed-off-by: Jonathan Cameron include/linux/i2c/twl4030-madc.h | 6 ------ 1 file changed, 6 deletions(-) commit 42ab9278eb3abfe8b500abe6681c8549c408ec8f Author: Sebastian Reichel Date: Thu Apr 27 17:30:09 2017 +0200 iio: adc: twl4030: Unexport twl4030_madc_conversion() All madc users have been converted to IIO API, so drop the legacy API. The function is still used inside of the driver. Signed-off-by: Sebastian Reichel Acked-by: Wolfram Sang Signed-off-by: Jonathan Cameron drivers/iio/adc/twl4030-madc.c | 5 +++-- include/linux/i2c/twl4030-madc.h | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) commit 6576ff740f5c1e6705d33b9d6a922526f20fa0dc Author: Sebastian Reichel Date: Thu Apr 27 17:30:08 2017 +0200 iio: adc: twl4030: Drop twl4030_get_madc_conversion() Drop legacy twl4030_get_madc_conversion() method. It has been used by drivers to get madc data before it conversion to IIO API. There are no users in the mainline kernel anymore. Signed-off-by: Sebastian Reichel Acked-by: Wolfram Sang Signed-off-by: Jonathan Cameron drivers/iio/adc/twl4030-madc.c | 21 --------------------- include/linux/i2c/twl4030-madc.h | 1 - 2 files changed, 22 deletions(-) commit 95e339b6e85d03438d1d9236ccaff4ecd895f3ab Author: Fabrice Gasnier Date: Mon May 29 11:28:20 2017 +0200 iio: adc: stm32: add support for STM32H7 Add support for STM32H7 Analog to Digital Converter. It has up to 20 external channels, resolution ranges from 8 to 16bits. Either bus or asynchronous adc clock may be used. Add registers & bitfields definition. Also add new configuration options to enter/exit powerdown and perform self-calibration. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc-core.c | 171 ++++++++++++- drivers/iio/adc/stm32-adc-core.h | 2 + drivers/iio/adc/stm32-adc.c | 532 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 701 insertions(+), 4 deletions(-) commit 204a6a25db79a0d754451c023933e0470b498730 Author: Fabrice Gasnier Date: Mon May 29 11:28:19 2017 +0200 iio: adc: stm32: make per instance bus clock optional STM32F4 requires one clock per ADC instance for register access. But, newer version of ADC hardware block have common bus clock for all instances (per instance driver isn't responsible for getting it). So, make it optional by default. Still, enforce it's required on STM32F4. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 64ad7f6438f3be51a14ee5ae766ffee76cd28b02 Author: Fabrice Gasnier Date: Mon May 29 11:28:18 2017 +0200 iio: adc: stm32: introduce compatible data cfg Prepare support for stm32h7 adc variant by introducing compatible configuration data. Move STM32F4 specific stuff to compatible data structure: - registers & bit fields - input channels data - start/stop procedures - trigger definitions Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc-core.c | 62 ++++++++++-- drivers/iio/adc/stm32-adc.c | 202 +++++++++++++++++++++++++++++---------- 2 files changed, 205 insertions(+), 59 deletions(-) commit 9fd243c4fb872381830a9c0ceb5d65a47c0d0e0f Author: Fabrice Gasnier Date: Mon May 29 11:28:17 2017 +0200 iio: adc: stm32: make core adc clock optional by default Analog clock input is mandatory on stm32f4. But newer version of ADC hardware block allow to select either bus clock or asynchronous clock, for analog circuitry. So, make it optional by default, but enforce clk presence on stm32f4. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc-core.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit aaf0ceb3c0686ea6057a4f834adb446b09e52bd3 Author: Fabrice Gasnier Date: Mon May 29 11:28:16 2017 +0200 dt-bindings: iio: stm32-adc: add support for STM32H7 Document support for STM32H7 Analog to Digital Converter. Main difference is regarding compatible, clock definitions and new features like differential channels support: STM32H7 ADC block has two clock inputs, common clock for all ADCs. One 'bus' clock for registers access, and one optional 'adc' clock for analog circuitry (bus clock may be used for conversions). Signed-off-by: Fabrice Gasnier Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/st,stm32-adc.txt | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) commit 6d307f6b099cbe828cd7595408caebce3088c8f3 Author: Grygorii Strashko Date: Thu Jun 8 13:51:52 2017 -0500 net: ethernet: ti: cpdma: do not enable host error misc irq CPSW driver does not handle this interrupt, so there are no reasons to enable it in hardware. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e9523a5a32a1ce3acfe875cddd8ac8ad8a9ed270 Author: Grygorii Strashko Date: Thu Jun 8 13:51:31 2017 -0500 net: ethernet: ti: cpsw: enable HWTSTAMP_FILTER_PTP_V1_L4_EVENT filter CPSW driver supports PTP v1 messages, but for unknown reasons this filter is not advertised. As result, ./tools/testing/selftests/networking/timestamping/timestamping utility can't be used for testing of CPSW RX timestamping with option SOF_TIMESTAMPING_RX_HARDWARE, because it uses HWTSTAMP_FILTER_PTP_V1_L4_SYNC filter. Hence, fix it by advertising HWTSTAMP_FILTER_PTP_V1_L4_XXX filters in CPSW driver. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 33f2eadabba59cf1c763c46c4470279ec2054099 Author: John Johansen Date: Fri Jun 9 17:25:03 2017 -0700 apparmor: export that basic profile namespaces are supported Allow userspace to detect that basic profile policy namespaces are available. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6c5fc8f17a2528052bace1d91a3bef003bd1331d Author: John Johansen Date: Fri Jun 9 17:22:50 2017 -0700 apparmor: add stacked domain labels interface Update the user interface to support the stacked change_profile transition. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 3 +++ security/apparmor/lsm.c | 5 +++++ 2 files changed, 8 insertions(+) commit 40cde7fcc344bc77c1ec9d291dcc35ab12f078aa Author: John Johansen Date: Fri Jun 9 17:11:17 2017 -0700 apparmor: add domain label stacking info to apparmorfs Now that the domain label transition is complete advertise it to userspace. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 36 ++++++++++++++++++++++++++++++++++++ security/apparmor/include/audit.h | 2 ++ security/apparmor/include/domain.h | 1 + 3 files changed, 39 insertions(+) commit e00b02bb6ac2a1893227ce8014b649028d6425d2 Author: John Johansen Date: Fri Jun 9 17:07:58 2017 -0700 apparmor: move change_profile mediation to using labels Signed-off-by: John Johansen security/apparmor/domain.c | 191 +++++++++++++++++++++++++++++---------------- 1 file changed, 123 insertions(+), 68 deletions(-) commit 89dbf1962aa636341658c26034c0e113cc9d1776 Author: John Johansen Date: Fri Jun 9 17:01:43 2017 -0700 apparmor: move change_hat mediation to using labels Signed-off-by: John Johansen security/apparmor/domain.c | 303 ++++++++++++++++++++++++++++++--------------- 1 file changed, 201 insertions(+), 102 deletions(-) commit 93c98a484c4900f0d2c65c16466d45f90ea5b175 Author: John Johansen Date: Fri Jun 9 16:55:04 2017 -0700 apparmor: move exec domain mediation to using labels Signed-off-by: John Johansen security/apparmor/domain.c | 850 ++++++++++++++++++++++++++++------------ security/apparmor/include/lib.h | 87 +++- 2 files changed, 678 insertions(+), 259 deletions(-) commit 5379a3312024a8befe7728238fc50ed05d2938ac Author: John Johansen Date: Fri Jun 9 17:29:12 2017 -0700 apparmor: support v7 transition format compatible with label_parse Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 ++ security/apparmor/policy_unpack.c | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) commit 064dc9472fa2bc31a7b178882bd7eff782c3d239 Author: John Johansen Date: Fri Jun 9 17:15:56 2017 -0700 apparmor: mediate files when they are received Signed-off-by: John Johansen security/apparmor/include/audit.h | 1 + security/apparmor/lsm.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 496c93196654d3e604013d750b7047886af14506 Author: John Johansen Date: Fri Jun 9 16:19:02 2017 -0700 apparmor: rework file permission to cache file access in file->ctx This is a temporary step, towards using the file->ctx for delegation, and also helps speed up file queries, until the permission lookup cache is introduced. Signed-off-by: John Johansen security/apparmor/file.c | 82 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 6 deletions(-) commit 8014370f1257619226b79cb6de8e28563fbbc070 Author: John Johansen Date: Fri Jun 9 16:06:21 2017 -0700 apparmor: move path_link mediation to using labels Signed-off-by: John Johansen security/apparmor/file.c | 101 ++++++++++++++++++++++----------------- security/apparmor/include/file.h | 2 +- security/apparmor/lsm.c | 3 +- 3 files changed, 59 insertions(+), 47 deletions(-) commit aebd873e8d3e34757c9295eef074d1be229f5893 Author: John Johansen Date: Fri Jun 9 16:02:25 2017 -0700 apparmor: refactor path name lookup and permission checks around labels Signed-off-by: John Johansen security/apparmor/file.c | 112 +++++++++++++++++++++++++++------------ security/apparmor/include/file.h | 5 +- security/apparmor/lsm.c | 13 ++--- 3 files changed, 85 insertions(+), 45 deletions(-) commit 98c3d182321d489d8bfaa596127020ec3027edb2 Author: John Johansen Date: Fri Jun 9 15:48:20 2017 -0700 apparmor: update aa_audit_file() to use labels Signed-off-by: John Johansen security/apparmor/domain.c | 6 ++++-- security/apparmor/file.c | 18 ++++++++++++------ security/apparmor/include/file.h | 3 ++- 3 files changed, 18 insertions(+), 9 deletions(-) commit 190a95189eb9e2233ed71a85cd6dd0c8efc9d392 Author: John Johansen Date: Fri Jun 9 14:59:51 2017 -0700 apparmor: move aa_file_perm() to use labels Signed-off-by: John Johansen security/apparmor/file.c | 48 +++++++++++++++++++++++++++++++++------- security/apparmor/include/file.h | 29 +++++++++++++++++------- security/apparmor/lsm.c | 24 +++----------------- 3 files changed, 64 insertions(+), 37 deletions(-) commit 290f458a4f16f9cf6cb6562b249e69fe1c3c3a07 Author: John Johansen Date: Fri Jun 9 14:38:35 2017 -0700 apparmor: allow ptrace checks to be finer grained than just capability Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 6 +++++ security/apparmor/include/ipc.h | 6 +++++ security/apparmor/ipc.c | 56 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) commit b2d09ae449cedc6f276ac485c013d22a97d36992 Author: John Johansen Date: Fri Jun 9 14:22:14 2017 -0700 apparmor: move ptrace checks to using labels Signed-off-by: John Johansen security/apparmor/domain.c | 17 ++++--- security/apparmor/include/apparmor.h | 1 + security/apparmor/include/ipc.h | 10 ++--- security/apparmor/ipc.c | 87 +++++++++--------------------------- security/apparmor/lsm.c | 23 +++++++++- 5 files changed, 58 insertions(+), 80 deletions(-) commit ca916e8e2d88e97134a313eb3100ce9c3d8fd3f2 Author: John Johansen Date: Fri Jun 9 14:23:09 2017 -0700 apparmor: add cross check permission helper macros The cross check permission helper macros will help simplify code that does cross task permission checks like ptrace. Signed-off-by: John Johansen security/apparmor/include/perms.h | 42 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 86b92cb782b38d71ee344af20fcbe5106dd19dbe Author: John Johansen Date: Fri Jun 9 14:15:20 2017 -0700 apparmor: move resource checks to using labels Signed-off-by: John Johansen security/apparmor/include/resource.h | 4 +- security/apparmor/lsm.c | 6 +- security/apparmor/resource.c | 112 ++++++++++++++++++++++++----------- 3 files changed, 80 insertions(+), 42 deletions(-) commit c70c86c421427fd8487867de66c4104b15abd772 Author: John Johansen Date: Fri Jun 9 14:07:02 2017 -0700 apparmor: move capability checks to using labels Signed-off-by: John Johansen security/apparmor/capability.c | 57 ++++++++++++++++++++++------------ security/apparmor/include/capability.h | 6 ++-- security/apparmor/ipc.c | 2 +- security/apparmor/lsm.c | 20 ++++++++---- security/apparmor/resource.c | 2 +- 5 files changed, 58 insertions(+), 29 deletions(-) commit 317d9a054e1c6d5f18b02b99ce09911942f8e603 Author: John Johansen Date: Fri Jun 9 13:55:38 2017 -0700 apparmor: update query interface to support label queries Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 46 +++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) commit 76a1d263aba3c97db7a2ba673059e0f17d983efb Author: John Johansen Date: Fri Jun 9 12:47:17 2017 -0700 apparmor: switch getprocattr to using label_print fns() Signed-off-by: John Johansen security/apparmor/include/procattr.h | 2 +- security/apparmor/lsm.c | 2 +- security/apparmor/procattr.c | 60 +++++++++++++++--------------------- 3 files changed, 27 insertions(+), 37 deletions(-) commit 637f688dc3dc304a89f441d76f49a0e35bc49c08 Author: John Johansen Date: Fri Jun 9 08:14:28 2017 -0700 apparmor: switch from profiles to using labels on contexts Begin the actual switch to using domain labels by storing them on the context and converting the label to a singular profile where possible. Signed-off-by: John Johansen security/apparmor/Makefile | 2 +- security/apparmor/apparmorfs.c | 128 +++++++++++---------- security/apparmor/audit.c | 27 +++-- security/apparmor/context.c | 87 +++++++------- security/apparmor/domain.c | 77 +++++++------ security/apparmor/file.c | 18 +-- security/apparmor/include/apparmor.h | 5 +- security/apparmor/include/audit.h | 9 +- security/apparmor/include/context.h | 158 +++++++++++++------------- security/apparmor/include/perms.h | 12 +- security/apparmor/include/policy.h | 110 ++++++------------ security/apparmor/include/policy_ns.h | 4 + security/apparmor/ipc.c | 29 +++-- security/apparmor/lib.c | 163 ++++++++++++++++++++++++++ security/apparmor/lsm.c | 134 ++++++++++++---------- security/apparmor/policy.c | 208 +++++++++++++++------------------- security/apparmor/policy_ns.c | 20 +++- security/apparmor/policy_unpack.c | 12 +- security/apparmor/procattr.c | 4 +- security/apparmor/resource.c | 8 +- 20 files changed, 686 insertions(+), 529 deletions(-) commit f1bd904175e8190ce14aedee37e207ab51fe3b30 Author: John Johansen Date: Fri Jun 9 06:19:19 2017 -0700 apparmor: add the base fns() for domain labels Begin moving apparmor to using broader domain labels, that will allow run time computation of domain type splitting via "stacking" of profiles into a domain label vec. Signed-off-by: John Johansen security/apparmor/include/label.h | 441 ++++++++ security/apparmor/label.c | 2120 +++++++++++++++++++++++++++++++++++++ 2 files changed, 2561 insertions(+) commit 192ca6b55a866e838aee98d9cb6a0b5086467c03 Author: John Johansen Date: Fri Jun 9 11:58:42 2017 -0700 apparmor: revalidate files during exec Instead of running file revalidation lazily when read/write are called copy selinux and revalidate the file table on exec. This avoids extra mediation overhead in read/write and also prevents file handles being passed through to a grand child unchecked. Signed-off-by: John Johansen security/apparmor/file.c | 72 +++++++++++++++++++++++++++++++++++++++ security/apparmor/include/audit.h | 1 + security/apparmor/include/file.h | 2 ++ security/apparmor/lsm.c | 6 ++++ 4 files changed, 81 insertions(+) commit 2835a13bbdc09d330eafdf5e67eb407c90c01ab7 Author: John Johansen Date: Fri Jun 9 11:43:45 2017 -0700 apparmor: cleanup rename XXX_file_context() to XXX_file_ctx() Signed-off-by: John Johansen security/apparmor/include/file.h | 17 ++++++++++++----- security/apparmor/lsm.c | 10 ++++------ 2 files changed, 16 insertions(+), 11 deletions(-) commit df8073c67fd8acb7e79f203ba4c0fa456bb82762 Author: John Johansen Date: Fri Jun 9 11:36:48 2017 -0700 apparmor: convert aa_change_XXX bool parameters to flags Instead of passing multiple booleans consolidate on a single flags field. Signed-off-by: John Johansen security/apparmor/domain.c | 26 +++++++++++++------------- security/apparmor/include/domain.h | 10 +++++++--- security/apparmor/include/procattr.h | 6 +----- security/apparmor/lsm.c | 13 +++++-------- security/apparmor/procattr.c | 6 +++--- 5 files changed, 29 insertions(+), 32 deletions(-) commit dca91402e999aa0824c4144ad216bd61dd4fe3ff Author: John Johansen Date: Fri Jun 9 07:24:18 2017 -0700 apparmor: cleanup remove unused and not fully implemented profile rename Remove the partially implemented code, until this can be properly implemented. Signed-off-by: John Johansen security/apparmor/policy.c | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) commit 435222bc1bcc11636f4159fd3ce9e481ab7f2c7c Author: John Johansen Date: Fri Jun 9 07:16:46 2017 -0700 apparmor: refactor updating profiles to the newest parent Signed-off-by: John Johansen security/apparmor/policy.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit a1bd627b46d169268a0ee5960899fb5be960a317 Author: John Johansen Date: Fri Jun 9 07:09:05 2017 -0700 apparmor: share profile name on replacement The profile names are the same, leverage this. Signed-off-by: John Johansen security/apparmor/include/lib.h | 32 +++++++++++++++++++++++++++++++- security/apparmor/lib.c | 40 ++++++++++++++++++++++++++++++++-------- security/apparmor/policy.c | 9 +++++++++ 3 files changed, 72 insertions(+), 9 deletions(-) commit cf797c0e5e312520b0b9f0367039fc0279a07a76 Author: John Johansen Date: Fri Jun 9 02:08:28 2017 -0700 apparmor: convert to profile block critical sections There are still a few places where profile replacement fails to update and a stale profile is used for mediation. Fix this by moving to accessing the current label through a critical section that will always ensure mediation is using the current label regardless of whether the tasks cred has been updated or not. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 40 +++++++----- security/apparmor/context.c | 2 +- security/apparmor/domain.c | 5 +- security/apparmor/include/context.h | 123 +++++++++++++++++++++++++++++------- security/apparmor/lsm.c | 41 ++++++++---- security/apparmor/policy_unpack.c | 2 +- security/apparmor/procattr.c | 3 +- security/apparmor/resource.c | 2 +- 8 files changed, 162 insertions(+), 56 deletions(-) commit fe864821d504f33f22b3ce2d5599ae95598db721 Author: John Johansen Date: Fri Jun 9 05:27:50 2017 -0700 apparmor: move bprm_committing_creds/committed_creds to lsm.c There is no reason to have the small stubs that don't use domain private functions in domain.c, instead move them to lsm.c and make them static. Signed-off-by: John Johansen security/apparmor/domain.c | 30 ------------------------------ security/apparmor/include/domain.h | 2 -- security/apparmor/lsm.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 32 deletions(-) commit d9f02d9c237aa603d781fe5165ebe383c554376d Author: John Johansen Date: Fri Jun 9 02:11:29 2017 -0700 apparmor: fix display of ns name The ns name being displayed should go through an ns view lookup. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5262ef60b1bcc40e17476fda53284621af9b0bab Author: John Johansen Date: Fri Jun 9 02:28:19 2017 -0700 apparmor: fix apparmor_query data The data being queried isn't always the current profile and a lookup relative to the current profile should be done. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 60285eb3e7c8827e00e2f2b54561a8cca07d802f Author: John Johansen Date: Sun Jun 4 12:22:22 2017 -0700 apparmor: fix policy load/remove semantics The namespace being passed into the replace/remove profiles fns() is not the view, but the namespace specified by the inode from the file hook (if present) or the loading tasks ns, if accessing the top level virtualized load/replace file interface. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 6 ++---- security/apparmor/policy.c | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) commit 3664268f19ea07bec55df92fe53ff9ed28968bcc Author: John Johansen Date: Fri Jun 2 17:44:27 2017 -0700 apparmor: add namespace lookup fns() Currently lookups are restricted to a single ns component in the path. However when namespaces are allowed to have separate views, and scopes this will not be sufficient, as it will be possible to have a multiple component ns path in scope. Add some ns lookup fns() to allow this and use them. Signed-off-by: John Johansen security/apparmor/include/policy_ns.h | 13 +++++++++ security/apparmor/policy.c | 10 ++++--- security/apparmor/policy_ns.c | 54 +++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 4 deletions(-) commit ae3b31653691b9c5b572b99596de3dfcc8f05006 Author: John Johansen Date: Fri Jun 2 13:50:22 2017 -0700 apparmor: cleanup __find_child() Signed-off-by: John Johansen security/apparmor/policy.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 39d84824eae3b1348408237173c710473e726ca9 Author: John Johansen Date: Thu Mar 30 05:25:23 2017 -0700 apparmor: provide information about path buffer size at boot Signed-off-by: John Johansen security/apparmor/lsm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 4f3b3f2d79a42e5094f55eca4f29d8f60f1190bd Author: John Johansen Date: Fri May 26 18:35:29 2017 -0700 apparmor: add profile permission query ability Allow userspace to query a profile about permissions, through the transaction interface that is already used to allow userspace to query about key,value data. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 103 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) commit 2d679f3cb0eaa6afa0dc97fe6ad3b797e1c1899a Author: John Johansen Date: Mon May 29 12:19:39 2017 -0700 apparmor: switch from file_perms to aa_perms Signed-off-by: John Johansen security/apparmor/domain.c | 18 +++++++++--------- security/apparmor/file.c | 31 ++++++++++++++----------------- security/apparmor/include/file.h | 25 ++++--------------------- security/apparmor/include/perms.h | 2 +- security/apparmor/lib.c | 1 + 5 files changed, 29 insertions(+), 48 deletions(-) commit aa9aeea8d4c3dfb9297723c4340671ef88e372d3 Author: John Johansen Date: Mon May 29 12:16:04 2017 -0700 apparmor: add gerneric permissions struct and support fns Signed-off-by: John Johansen security/apparmor/file.c | 30 +++++------ security/apparmor/include/audit.h | 4 +- security/apparmor/include/perms.h | 34 +++++++++++++ security/apparmor/lib.c | 102 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 153 insertions(+), 17 deletions(-) commit b5b2557c0aeca35b34c558fd09ad6da67b9f3557 Author: John Johansen Date: Mon May 29 11:45:29 2017 -0700 apparmor: add fn to test if profile supports a given mediation class Signed-off-by: John Johansen security/apparmor/include/policy.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1dea3b41e84c5923173fe654dcb758a5cb4a46e5 Author: John Johansen Date: Fri May 26 17:23:23 2017 -0700 apparmor: speed up transactional queries The simple_transaction interface is slow. It requires 4 syscalls (open, write, read, close) per query and shares a single lock for each queries. So replace its use with a compatible in multi_transaction interface. It allows for a faster 2 syscall pattern per query. After an initial open, an arbitrary number of writes and reads can be issued. Each write will reset the query with new data that can be read. Reads do not clear the data, and can be issued multiple times, and used with seek, until a new write is performed which will reset the data available and the seek position. Note: this keeps the single lock design, if needed moving to a per file lock will have to come later. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 125 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 114 insertions(+), 11 deletions(-) commit a83bd86e833a5842ad033527ea9af589efa6dc84 Author: John Johansen Date: Fri May 26 18:49:04 2017 -0700 apparmor: add label data availability to the feature set gsettings mediation needs to be able to determine if apparmor supports label data queries. A label data query can be done to test for support but its failure is indistinguishable from other failures, making it an unreliable indicator. Fix by making support of label data queries available as a flag in the apparmorfs features dir tree. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4ae47f33354a96efb4e4231dec0d72a586b3921c Author: John Johansen Date: Fri May 26 16:45:48 2017 -0700 apparmor: add mkdir/rmdir interface to manage policy namespaces When setting up namespaces for containers its easier for them to use an fs interface to create the namespace for the containers policy. Allow mkdir/rmdir under the policy/namespaces/ dir to be used to create and remove namespaces. BugLink: http://bugs.launchpad.net/bugs/1611078 Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 95 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 1 deletion(-) commit d9bf2c268be6064ae0c9980e4c37fdd262c7effc Author: John Johansen Date: Fri May 26 16:27:58 2017 -0700 apparmor: add policy revision file interface Add a policy revision file to find the current revision of a ns's policy. There is a revision file per ns, as well as a virtualized global revision file in the base apparmor fs directory. The global revision file when opened will provide the revision of the opening task namespace. The revision file can be waited on via select/poll to detect apparmor policy changes from the last read revision of the opened file. This means that the revision file must be read after the select/poll other wise update data will remain ready for reading. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 113 ++++++++++++++++++++++++++++++++- security/apparmor/include/apparmorfs.h | 2 + security/apparmor/include/policy_ns.h | 1 + security/apparmor/policy_ns.c | 1 + 4 files changed, 116 insertions(+), 1 deletion(-) commit 18e99f191a8e66ec8fd06e4820de44bd9faa296a Author: John Johansen Date: Fri May 26 01:45:08 2017 -0700 apparmor: provide finer control over policy management Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 15 +++++++-------- security/apparmor/include/policy.h | 8 ++++++-- security/apparmor/policy.c | 35 ++++++++++++++++++++++------------- 3 files changed, 35 insertions(+), 23 deletions(-) commit 9fd7aca2c604fd19c0822d9b1520fb8ec16a81fb Merge: 41e8e40 ded092c Author: David S. Miller Date: Sat Jun 10 19:05:47 2017 -0400 Merge branch 'bpf-misc-updates' Daniel Borkmann says: ==================== Misc BPF updates This set contains a couple of misc updates: stack usage reduction for perf_sample_data in tracing progs, reduction of stale data in verifier on register state transitions that I still had in my queue and few selftest improvements as well as bpf_set_hash() helper for tc programs. ==================== Signed-off-by: David S. Miller commit ded092cd73c2c56a394b936f86897f29b2e131c0 Author: Daniel Borkmann Date: Sun Jun 11 00:50:47 2017 +0200 bpf: add bpf_set_hash helper for tc progs Allow for tc BPF programs to set a skb->hash, apart from clearing and triggering a recalc that we have right now. It allows for BPF to implement a custom hashing routine for skb_get_hash(). Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 8 +++++++- net/core/filter.c | 20 ++++++++++++++++++++ tools/include/uapi/linux/bpf.h | 8 +++++++- 3 files changed, 34 insertions(+), 2 deletions(-) commit 966789fb8636a35c3263076fea382263c5e56802 Author: Daniel Borkmann Date: Sun Jun 11 00:50:46 2017 +0200 bpf: remove cg_skb_func_proto and use sk_filter_func_proto directly Since cg_skb_func_proto() doesn't do anything else than just calling into sk_filter_func_proto(), remove it and set sk_filter_func_proto() directly for .get_func_proto callback. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit f735b64926da36aadc0737d29dde587ac1e2e2c2 Author: Daniel Borkmann Date: Sun Jun 11 00:50:45 2017 +0200 bpf, tests: set rlimit also for test_align, so it doesn't fail When running all the tests, through 'make run_tests', I had test_align failing due to insufficient rlimit. Set it the same way as all other test cases from BPF selftests do, so that test case properly loads everything. [...] Summary: 7 PASSED, 1 FAILED selftests: test_progs [PASS] /home/foo/net-next/tools/testing/selftests/bpf Test 0: mov ... Failed to load program. FAIL Test 1: shift ... Failed to load program. FAIL Test 2: addsub ... Failed to load program. FAIL Test 3: mul ... Failed to load program. FAIL Test 4: unknown shift ... Failed to load program. FAIL Test 5: unknown mul ... Failed to load program. FAIL Test 6: packet const offset ... Failed to load program. FAIL Test 7: packet variable offset ... Failed to load program. FAIL Results: 0 pass 8 fail selftests: test_align [PASS] [...] Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_align.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5ecf51fd9cc69a4a6099340b30f8171c7cd04394 Author: Daniel Borkmann Date: Sun Jun 11 00:50:44 2017 +0200 bpf, tests: add a test for htab lookup + update traversal Add a test case to track behaviour when traversing and updating the htab map. We recently used such traversal, so it's quite useful to keep it as an example in selftests. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_maps.c | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 36e24c003091a11ec847291c9a1d36d2ec92b155 Author: Daniel Borkmann Date: Sun Jun 11 00:50:43 2017 +0200 bpf: reset id on spilled regs in clear_all_pkt_pointers Right now, we don't reset the id of spilled registers in case of clear_all_pkt_pointers(). Given pkt_pointers are highly likely to contain an id, do so by reusing __mark_reg_unknown_value(). Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a2ff55aa4946b036b87572976cbfc6ab244c497 Author: Daniel Borkmann Date: Sun Jun 11 00:50:42 2017 +0200 bpf: reset id on CONST_IMM transition Whenever we set the register to the type CONST_IMM, we currently don't reset the id to 0. id member is not used in CONST_IMM case, so don't let it become stale, where pruning won't be able to match later on. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 ++ 1 file changed, 2 insertions(+) commit d25da6caa2a1d6644360c40d7c5fd7c057551360 Author: Daniel Borkmann Date: Sun Jun 11 00:50:41 2017 +0200 bpf: don't check spilled reg state for non-STACK_SPILLed type slots spilled_regs[] state is only used for stack slots of type STACK_SPILL, never for STACK_MISC. Right now, in states_equal(), even if we have old and current stack state of type STACK_MISC, we compare spilled_regs[] for that particular offset. Just skip these like we do everywhere else. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 ++ 1 file changed, 2 insertions(+) commit 20b9d7ac48526ce9a14106241e76e8382d126a60 Author: Daniel Borkmann Date: Sun Jun 11 00:50:40 2017 +0200 bpf: avoid excessive stack usage for perf_sample_data perf_sample_data consumes 386 bytes on stack, reduce excessive stack usage and move it to per cpu buffer. It's allowed due to preemption being disabled for tracing, xdp and tc programs, thus at all times only one program can run on a specific CPU and programs cannot run from interrupt. We similarly also handle bpf_pt_regs. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/trace/bpf_trace.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 0abdfaf4a95435c0197603a262149019ca2f448d Merge: 95c4629 93ec4a8 Author: David S. Miller Date: Sat Jun 10 14:11:12 2017 -0700 Merge branch 'sparc64-LDC-changes-for-porting-VCC-driver-into-upstream-kernel' Jag Raman says: ==================== sparc64: LDC changes for porting VCC driver into upstream kernel This series of patches is part of an effort to add VCC (Virtual Console Concentrator) support to Linux. VCC enables the virtualization of serial console on SPARC processors. VCC provides access to the guest domain's serial console. VCC depends on some core functionalities in the linux kernel for SPARC. The functionalities include LDC (Logical Domain Channels), MDESC (Machine Descriptor) and VIO (Virtual IO protocol). In order for VCC to be enabled, it requires that these core functionalities support them. This series of patches adds LDC support to enable VCC on Linux. It is the first batch of changes to enable VCC. This version 4 of the series addresses the following changes suggested by Dave Miller Patch 1/5: Modifies ldc_print/__ldc_print to print caller name. Fixes indentation of wrapped lines. ==================== Signed-off-by: David S. Miller commit 93ec4a828e6d777a61f497bc6e0cf9239fde35c7 Author: Jag Raman Date: Fri Jun 9 12:29:32 2017 -0400 sparc64: print debug messages when reading from LDC channel Print debug messages when reading from given LDC channel. Signed-off-by: Jagannathan Raman Reviewed-by: Aaron Young Reviewed-by: Alexandre Chartre Reviewed-by: Bijan Mottahedeh Reviewed-by: Liam Merwick Signed-off-by: David S. Miller arch/sparc/kernel/ldc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6c95483b768c62f8ee933ae08a1bdbcb78b5410f Author: Jag Raman Date: Fri Jun 9 12:29:31 2017 -0400 sparc64: ldc abort during vds iso boot Orabug: 20902628 When an ldc control-only packet is received during data exchange in read_nonraw(), a new rx head is calculated but the rx queue head is not actually advanced (rx_set_head() is not called) and a branch is taken to 'no_data' at which point two things can happen depending on the value of the newly calculated rx head and the current rx tail: - If the rx queue is determined to be not empty, then the wrong packet is picked up. - If the rx queue is determined to be empty, then a read error (EAGAIN) is eventually returned since it is falsely assumed that more data was expected. The fix is to update the rx head and return in case of a control only packet during data exchange. Signed-off-by: Jagannathan Raman Reviewed-by: Aaron Young Reviewed-by: Alexandre Chartre Reviewed-by: Bijan Mottahedeh Reviewed-by: Liam Merwick Signed-off-by: David S. Miller arch/sparc/kernel/ldc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fc43b978a02985aad7540d77de6b3aa0579a678c Author: Jag Raman Date: Fri Jun 9 12:29:30 2017 -0400 sparc64: ensure LDC channel is ready before communication Ensure that LDC channel is up before writing to it, in RAW mode. Generate event to bring the LDC channel up, if it's not up already. Signed-off-by: Jagannathan Raman Reviewed-by: Aaron Young Reviewed-by: Alexandre Chartre Reviewed-by: Bijan Mottahedeh Reviewed-by: Liam Merwick Signed-off-by: David S. Miller arch/sparc/kernel/ldc.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 29693e75a823131a789b519150027e2d69fecab7 Author: Jag Raman Date: Fri Jun 9 12:29:29 2017 -0400 sparc64: enhance ldc_abort to print message Enhance ldc_abort to accept a message to be printed when it is called. Add a macro, LDC_ABORT, to print info. about the function that calls ldc_abort. Signed-off-by: Jagannathan Raman Reviewed-by: Aaron Young Reviewed-by: Alexandre Chartre Reviewed-by: Bijan Mottahedeh Reviewed-by: Liam Merwick Signed-off-by: David S. Miller arch/sparc/kernel/ldc.c | 53 ++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 25 deletions(-) commit 85762a65c1106daa0930bc2ed0d7792511647168 Author: Jag Raman Date: Fri Jun 9 12:29:28 2017 -0400 sparc64: expand LDC interface Add the following LDC APIs which are planned to be used by LDC clients in the future: - ldc_set_state: Sets given LDC channel to given state - ldc_mode: Returns the mode of given LDC channel - ldc_print: Prints info about given LDC channel - ldc_rx_reset: Reset the RX queue of given LDC channel Signed-off-by: Jagannathan Raman Reviewed-by: Aaron Young Reviewed-by: Alexandre Chartre Reviewed-by: Bijan Mottahedeh Reviewed-by: Liam Merwick Signed-off-by: David S. Miller arch/sparc/include/asm/ldc.h | 8 ++++++++ arch/sparc/kernel/ldc.c | 46 ++++++++++++++++++++++++++++++++------------ 2 files changed, 42 insertions(+), 12 deletions(-) commit 95c4629d92d15d10e5f7c55bfb72583f96a91374 Merge: 60925ee 5faab9e Author: David S. Miller Date: Sat Jun 10 14:06:46 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc commit 41e8e40458a417bbbabfbec5362b8747601e6a3a Author: Fabio Estevam Date: Fri Jun 9 22:37:22 2017 -0300 net: fec: Add a fec_enet_clear_ethtool_stats() stub for CONFIG_M5272 Commit 2b30842b23b9 ("net: fec: Clear and enable MIB counters on imx51") introduced fec_enet_clear_ethtool_stats(), but missed to add a stub for the CONFIG_M5272=y case, causing build failure for the m5272c3_defconfig. Add the missing empty stub to fix the build failure. Fixes: Commit 2b30842b23b9 ("net: fec: Clear and enable MIB counters on imx51") Reported-by: Paul Gortmaker Signed-off-by: Fabio Estevam Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 89dfba3e1b7e4dc52db71b4b243954cab63fcf49 Author: Chenbo Feng Date: Sat Jun 10 12:35:38 2017 -0700 Remove the redundant skb->dev initialization in ip6_fragment After moves the skb->dev and skb->protocol initialization into ip6_output, setting the skb->dev inside ip6_fragment is unnecessary. Fixes: 97a7a37a7b7b("ipv6: Initial skb->dev and skb->protocol in ip6_output") Signed-off-by: Chenbo Feng Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 1 - 1 file changed, 1 deletion(-) commit 4abf5a653bf837aa93ad3fcf7cc918e90f44fb2d Author: Xin Long Date: Sat Jun 10 15:27:12 2017 +0800 sctp: no need to check assoc id before calling sctp_assoc_set_id sctp_assoc_set_id does the assoc id check in the beginning when processing dupcookie, no need to do the same check before calling it. v1->v2: fix some typo errs Marcelo pointed in changelog. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/associola.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c0a4c2d1cde70d876da3f5a76a7284abf8d1800a Author: Xin Long Date: Sat Jun 10 15:13:32 2017 +0800 sctp: use read_lock_bh in sctp_eps_seq_show This patch is to use read_lock_bh instead of local_bh_disable and read_lock in sctp_eps_seq_show. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/proc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6dfe4b97e08ec3d1a593fdaca099f0ef0a3a19e6 Author: Xin Long Date: Sat Jun 10 14:56:56 2017 +0800 sctp: fix recursive locking warning in sctp_do_peeloff Dmitry got the following recursive locking report while running syzkaller fuzzer, the Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x2ee/0x3ef lib/dump_stack.c:52 print_deadlock_bug kernel/locking/lockdep.c:1729 [inline] check_deadlock kernel/locking/lockdep.c:1773 [inline] validate_chain kernel/locking/lockdep.c:2251 [inline] __lock_acquire+0xef2/0x3430 kernel/locking/lockdep.c:3340 lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755 lock_sock_nested+0xcb/0x120 net/core/sock.c:2536 lock_sock include/net/sock.h:1460 [inline] sctp_close+0xcd/0x9d0 net/sctp/socket.c:1497 inet_release+0xed/0x1c0 net/ipv4/af_inet.c:425 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:432 sock_release+0x8d/0x1e0 net/socket.c:597 __sock_create+0x38b/0x870 net/socket.c:1226 sock_create+0x7f/0xa0 net/socket.c:1237 sctp_do_peeloff+0x1a2/0x440 net/sctp/socket.c:4879 sctp_getsockopt_peeloff net/sctp/socket.c:4914 [inline] sctp_getsockopt+0x111a/0x67e0 net/sctp/socket.c:6628 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2690 SYSC_getsockopt net/socket.c:1817 [inline] SyS_getsockopt+0x240/0x380 net/socket.c:1799 entry_SYSCALL_64_fastpath+0x1f/0xc2 This warning is caused by the lock held by sctp_getsockopt() is on one socket, while the other lock that sctp_close() is getting later is on the newly created (which failed) socket during peeloff operation. This patch is to avoid this warning by use lock_sock with subclass SINGLE_DEPTH_NESTING as Wang Cong and Marcelo's suggestion. Reported-by: Dmitry Vyukov Suggested-by: Marcelo Ricardo Leitner Suggested-by: Cong Wang Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 664f46a2907536254989412c94ccafdb08f7d6e0 Author: Rosen, Rami Date: Sat Jun 10 03:22:48 2017 +0300 net/packet: remove unneeded declaraion of tpacket_snd(). This patch removes unneeded forward declaration of tpacket_snd() in net/packet/af_packet.c. Signed-off-by: Rami Rosen Signed-off-by: David S. Miller net/packet/af_packet.c | 1 - 1 file changed, 1 deletion(-) commit 384abed1fe49cd3f473d61d3297a6fec5e420699 Author: Chenbo Feng Date: Fri Jun 9 12:17:37 2017 -0700 bpf: Remove duplicate tcp_filter hook in ipv6 There are two tcp_filter hooks in tcp_ipv6 ingress path currently. One is at tcp_v6_rcv and another is in tcp_v6_do_rcv. It seems the tcp_filter() call inside tcp_v6_do_rcv is redundent and some packet will be filtered twice in this situation. This will cause trouble when using eBPF filters to account traffic data. Signed-off-by: Chenbo Feng Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 3 --- 1 file changed, 3 deletions(-) commit cd99c3776351e1b90ac05ff527553f8a29c03583 Author: Nicolas Dichtel Date: Fri Jun 9 17:58:08 2017 +0200 bonding: warn user when 802.3ad speed is unknown Goal is to advertise the user when ethtool speeds and 802.3ad speeds are desynchronized. When this case happens, the kernel needs to be patched. Suggested-by: Andrew Lunn Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 5 +++++ 1 file changed, 5 insertions(+) commit 10d486a30c5944320915ace3be8c15a8be1215cb Author: Nicolas Dichtel Date: Fri Jun 9 14:41:57 2017 +0200 netns: fix error code when the nsid is already used When the user tries to assign a specific nsid, idr_alloc() is called with the range [nsid, nsid+1]. If this nsid is already used, idr_alloc() returns ENOSPC (No space left on device). In our case, it's better to return EEXIST to make it clear that the nsid is not available. CC: Jamal Hadi Salim Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller net/core/net_namespace.c | 1 + 1 file changed, 1 insertion(+) commit 4a7f7bc6009fe8e66f4781868a0dc7abaab57628 Author: Nicolas Dichtel Date: Fri Jun 9 14:41:56 2017 +0200 netns: define extack error msg for nsis cmds It helps the user to identify errors. CC: Jamal Hadi Salim Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller net/core/net_namespace.c | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) commit 794b77738c0dede15441209a56044fd67c48a200 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:42:03 2017 +0200 ARM: tct_hammer_defconfig: Save defconfig Generate new defconfig to get rid of obsolete Kconfig entries: - BUGVERBOSE was changed into DEBUG_BUGVERBOSE and will be enabled by default (it is useful); - DETECT_SOFTLOCKUP was changed into LOCKUP_DETECTOR; - rest of entries is being removed by default values; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/tct_hammer_defconfig | 5 ----- 1 file changed, 5 deletions(-) commit e4025945886b81f27e336c4d6038cff62b0d9153 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:42:00 2017 +0200 ARM: s5pv210_defconfig: Save defconfig Generate new defconfig to get rid of obsolete Kconfig entries: - S3C_LOWLEVEL_UART_PORT and S3C_DEV_FB are invalid for S5P; - S5PV210_SETUP_FB_24BPP is gone; - rest of entries is being removed by default values; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/s5pv210_defconfig | 4 ---- 1 file changed, 4 deletions(-) commit c2a3f4cca563a845fdc030f9f84f413fd8610684 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:58 2017 +0200 ARM: s3c6400_defconfig: Save defconfig Generate new defconfig to get rid of obsolete Kconfig entries: - S3C_BOOT_ERROR_RESET, SND_S3C24XX_SOC and SND_SOC_SMDK_WM9713 are gone; - rest of entries is being removed by default values; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/s3c6400_defconfig | 6 ------ 1 file changed, 6 deletions(-) commit a13a047520c0f9b958255c61f1004a72a5acfd7b Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:55 2017 +0200 ARM: mini2440_defconfig: Save defconfig Generate new defconfig to get rid of obsolete Kconfig entries: - NET_ETHERNET, SND_S3C24XX_SOC are gone; - CRYPTO_FIPS is changed to no (cannot be part of module); - BINFMT_AOUT cannot be selected anymore; - rest of entries is being removed by default values; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/mini2440_defconfig | 21 --------------------- 1 file changed, 21 deletions(-) commit 68d1719fbac0edeff9888531fc8bb1988caa5335 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:52 2017 +0200 ARM: s3c2410_defconfig: Save defconfig Generate new defconfig to get rid of obsolete Kconfig entries: - S3C_BOOT_ERROR_RESET, SMDK2440_CPU2442 are gone; - ARM_THUMB is changed to yes (selected by default); - BINFMT_AOUT cannot be selected anymore; - rest of entries is being removed by default values; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/s3c2410_defconfig | 13 ------------- 1 file changed, 13 deletions(-) commit e5094f9c569e78e15e828139a56015a2f7a59f04 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:50 2017 +0200 ARM: exynos_defconfig: Save defconfig Generate new defconfig to get rid of obsolete Kconfig entries: - RFKILL_REGULATOR is gone; - COMMON_CLK_MAX77802 was merged into COMMON_CLK_MAX77686; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/exynos_defconfig | 2 -- 1 file changed, 2 deletions(-) commit fdf5f61b692c5c9b4f8c7f6b4f1fd18f47635633 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:48 2017 +0200 ARM: s5pv210_defconfig: Bring back lost (but wanted) options The config was not updated for some time so it needs updates to get the same options as wanted initially: - SYSFS_DEPRECATED is now needed for SYSFS_DEPRECATED_V2; - DEBUG_SPINLOCK_SLEEP was replaced by DEBUG_ATOMIC_SLEEP; - Use proper DEBUG_S3C_UART1 for UART1; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/s5pv210_defconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 61d26c612d07c75bef9d737d8da890243671ee2b Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:45 2017 +0200 ARM: s3c6400_defconfig: Bring back lost (but wanted) options The config was not updated for some time so it needs updates to get the same options as wanted initially: - SYSFS_DEPRECATED is now needed for SYSFS_DEPRECATED_V2; - PWM is now needed for BACKLIGHT_PWM; - DEBUG_SPINLOCK_SLEEP was replaced by DEBUG_ATOMIC_SLEEP; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/s3c6400_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 930e4386274dd13eb4c79ffc9f7715abb46c56d4 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:43 2017 +0200 ARM: s3c2410_defconfig: Bring back lost (but wanted) options The config was not updated for some time so it needs updates to get the same options as wanted initially: - IP_NF_TARGET_LOG was replaced by NETFILTER_XT_TARGET_LOG; - NF_NAT was replaced by IP_NF_NAT; - SERIAL_DEV_BUS is now needed for BT_HCIUART_LL; - TPS65010 is now needed for MACH_OSIRIS_DVS; - DMADEVICES and S3C24XX_DMAC are now needed for MMC_S3C; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/s3c2410_defconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit dd48d06b379289a4e7bef7ba573a0190a945ef91 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:40 2017 +0200 ARM: tct_hammer_defconfig: Bring back lost (but wanted) options The config was not updated for some time so it needs updates to get the same options as wanted initially: - SYSFS_DEPRECATED is now needed for SYSFS_DEPRECATED_V2; - USB_GADGET_S3C2410 was replaced by USB_S3C2410; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/tct_hammer_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c5f6fc414968d35acadd48f2402d8dae86be1784 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:38 2017 +0200 ARM: mini2440_defconfig: Bring back lost (but wanted) options The config was not updated for some time so it needs updates to get the same options as wanted initially: - SERIAL_DEV_BUS is now needed for BT_HCIUART_LL; - USB_GADGET_S3C2410 was replaced by USB_S3C2410; - S3C24XX_DMAC is now needed for MMC_S3C; Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/mini2440_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2a7ae1c04983e5e1fd25baacce25562931893852 Author: Krzysztof Kozlowski Date: Thu Jun 8 16:41:36 2017 +0200 ARM: defconfig: samsung: Re-order entries to match savedefconfig Re-order entries just like savedefconfig would do so it will be easier to review the changes before actual savedefconfig. Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann arch/arm/configs/exynos_defconfig | 4 ++-- arch/arm/configs/mini2440_defconfig | 47 ++++++++++++++++++------------------- arch/arm/configs/s3c2410_defconfig | 6 ++--- arch/arm/configs/s3c6400_defconfig | 2 +- arch/arm/configs/s5pv210_defconfig | 12 +++++----- 5 files changed, 35 insertions(+), 36 deletions(-) commit bd5f62605f48fe32b66ebf9071b1155bad33670d Author: Krzysztof Kozlowski Date: Thu Jun 8 16:40:39 2017 +0200 ARM: defconfig: Cleanup from old Kconfig options Remove old, dead Kconfig options (in order appearing in this commit): - EXPERIMENTAL is gone since v3.9; - INET_LRO: commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"); - MTD_CONCAT: commit f53fdebcc3e1 ("mtd: drop MTD_CONCAT from Kconfig entirely"); - MTD_PARTITIONS: commit 6a8a98b22b10 ("mtd: kill CONFIG_MTD_PARTITIONS"); - MTD_CHAR: commit 660685d9d1b4 ("mtd: merge mtdchar module with mtdcore"); - NETDEV_1000 and NETDEV_10000: commit f860b0522f65 ("drivers/net: Kconfig and Makefile cleanup"); NET_ETHERNET should be replaced with just ETHERNET but that is separate change; - INOTIFY: commit 2dfc1cae4c42 ("inotify: remove inotify in kernel interface"); - MISC_DEVICES: commit 7c5763b8453a ("drivers: misc: Remove MISC_DEVICES config option"); - HID_SUPPORT: commit 1f41a6a99476 ("HID: Fix the generic Kconfig options"); - BT_L2CAP and BT_SCO: commit f1e91e1640d8 ("Bluetooth: Always compile SCO and L2CAP in Bluetooth Core"); - DEBUG_ERRORS: commit b025a3f836d1 ("ARM: 6876/1: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS"); - USB_DEVICE_CLASS: commit 007bab91324e ("USB: remove CONFIG_USB_DEVICE_CLASS"); - RCU_CPU_STALL_DETECTOR: commit a00e0d714fbd ("rcu: Remove conditional compilation for RCU CPU stall warnings"); - SYSCTL_SYSCALL_CHECK: commit 7c60c48f58a7 ("sysctl: Improve the sysctl sanity checks"); - IP_NF_QUEUE: commit 3dd6664fac7e ("netfilter: remove unused "config IP_NF_QUEUE""); - IP_NF_TARGET_ULOG: commit d4da843e6fad ("netfilter: kill remnants of ulog targets"); - IP6_NF_QUEUE: commit d16cf20e2f2f ("netfilter: remove ip_queue support"); - IP6_NF_TARGET_LOG: commit 6939c33a757b ("netfilter: merge ipt_LOG and ip6_LOG into xt_LOG"); - USB_LED: commit a335aaf3125c ("usb: misc: remove outdated USB LED driver"); - MMC_UNSAFE_RESUME: commit 2501c9179dff ("mmc: core: Use MMC_UNSAFE_RESUME as default behavior"); - AUTOFS_FS: commit 561c5cf9236a ("staging: Remove autofs3"); - DISPLAY_SUPPORT: commit 5a6b5e02d673 ("fbdev: remove display subsystem"); - CFG80211_REG_DEBUG: commit c799ba6eab7a ("cfg80211: remove CFG80211_REG_DEBUG"); - VIDEO_OUTPUT_CONTROL: commit f167a64e9d67 ("video / output: Drop display output class support"); - USB_LIBUSUAL: commit f61870ee6f8c ("usb: remove libusual"); - CRYPTO_ZLIB: commit 110492183c4b ("crypto: compress - remove unused pcomp interface"); - BLK_DEV_UB: commit 68a5059ecf82 ("block: remove the deprecated ub driver"); Signed-off-by: Krzysztof Kozlowski [for vexpress] Acked-by: Liviu Dudau Acked-by: Arnd Bergmann arch/arm/configs/acs5k_defconfig | 8 -------- arch/arm/configs/acs5k_tiny_defconfig | 10 ---------- arch/arm/configs/am200epdkit_defconfig | 7 ------- arch/arm/configs/assabet_defconfig | 3 --- arch/arm/configs/axm55xx_defconfig | 1 - arch/arm/configs/badge4_defconfig | 5 ----- arch/arm/configs/cerfcube_defconfig | 4 ---- arch/arm/configs/cm_x2xx_defconfig | 13 ------------- arch/arm/configs/cm_x300_defconfig | 10 ---------- arch/arm/configs/cns3420vb_defconfig | 7 ------- arch/arm/configs/colibri_pxa270_defconfig | 13 ------------- arch/arm/configs/colibri_pxa300_defconfig | 9 --------- arch/arm/configs/collie_defconfig | 4 ---- arch/arm/configs/corgi_defconfig | 13 ------------- arch/arm/configs/dove_defconfig | 1 - arch/arm/configs/ebsa110_defconfig | 1 - arch/arm/configs/efm32_defconfig | 1 - arch/arm/configs/em_x270_defconfig | 13 ------------- arch/arm/configs/ep93xx_defconfig | 1 - arch/arm/configs/eseries_pxa_defconfig | 8 -------- arch/arm/configs/ezx_defconfig | 18 ------------------ arch/arm/configs/footbridge_defconfig | 1 - arch/arm/configs/h5000_defconfig | 6 ------ arch/arm/configs/hackkit_defconfig | 3 --- arch/arm/configs/imote2_defconfig | 16 ---------------- arch/arm/configs/imx_v4_v5_defconfig | 1 - arch/arm/configs/iop13xx_defconfig | 4 ---- arch/arm/configs/iop32x_defconfig | 5 ----- arch/arm/configs/iop33x_defconfig | 6 ------ arch/arm/configs/ixp4xx_defconfig | 9 --------- arch/arm/configs/jornada720_defconfig | 8 -------- arch/arm/configs/ks8695_defconfig | 7 ------- arch/arm/configs/lart_defconfig | 3 --- arch/arm/configs/lpc18xx_defconfig | 1 - arch/arm/configs/lpd270_defconfig | 5 ----- arch/arm/configs/lubbock_defconfig | 4 ---- arch/arm/configs/magician_defconfig | 15 --------------- arch/arm/configs/mainstone_defconfig | 4 ---- arch/arm/configs/mini2440_defconfig | 19 ------------------- arch/arm/configs/mmp2_defconfig | 9 --------- arch/arm/configs/moxart_defconfig | 1 - arch/arm/configs/mps2_defconfig | 1 - arch/arm/configs/mv78xx0_defconfig | 8 -------- arch/arm/configs/mxs_defconfig | 1 - arch/arm/configs/neponset_defconfig | 4 ---- arch/arm/configs/netwinder_defconfig | 3 --- arch/arm/configs/netx_defconfig | 6 ------ arch/arm/configs/nhk8815_defconfig | 1 - arch/arm/configs/nuc910_defconfig | 7 ------- arch/arm/configs/nuc950_defconfig | 7 ------- arch/arm/configs/nuc960_defconfig | 7 ------- arch/arm/configs/omap1_defconfig | 2 -- arch/arm/configs/orion5x_defconfig | 2 -- arch/arm/configs/palmz72_defconfig | 6 ------ arch/arm/configs/pcm027_defconfig | 8 -------- arch/arm/configs/pleb_defconfig | 3 --- arch/arm/configs/pxa168_defconfig | 9 --------- arch/arm/configs/pxa255-idp_defconfig | 4 ---- arch/arm/configs/pxa3xx_defconfig | 9 --------- arch/arm/configs/pxa910_defconfig | 9 --------- arch/arm/configs/pxa_defconfig | 2 -- arch/arm/configs/qcom_defconfig | 1 - arch/arm/configs/raumfeld_defconfig | 11 ----------- arch/arm/configs/realview_defconfig | 1 - arch/arm/configs/rpc_defconfig | 6 ------ arch/arm/configs/s3c2410_defconfig | 11 ----------- arch/arm/configs/s3c6400_defconfig | 6 ------ arch/arm/configs/s5pv210_defconfig | 7 ------- arch/arm/configs/sama5_defconfig | 1 - arch/arm/configs/shannon_defconfig | 3 --- arch/arm/configs/simpad_defconfig | 7 ------- arch/arm/configs/spear13xx_defconfig | 4 ---- arch/arm/configs/spear3xx_defconfig | 4 ---- arch/arm/configs/spear6xx_defconfig | 3 --- arch/arm/configs/spitz_defconfig | 13 ------------- arch/arm/configs/sunxi_defconfig | 1 - arch/arm/configs/tct_hammer_defconfig | 7 ------- arch/arm/configs/trizeps4_defconfig | 8 -------- arch/arm/configs/u300_defconfig | 1 - arch/arm/configs/vexpress_defconfig | 1 - arch/arm/configs/viper_defconfig | 9 --------- arch/arm/configs/xcep_defconfig | 8 -------- arch/arm/configs/zeus_defconfig | 10 ---------- arch/arm/configs/zx_defconfig | 2 -- 84 files changed, 501 deletions(-) commit 329d82309824ff1082dc4a91a5bbed8c3bec1580 Author: Jason A. Donenfeld Date: Sat Jun 10 04:59:11 2017 +0200 Bluetooth: use constant time memory comparison for secret values This file is filled with complex cryptography. Thus, the comparisons of MACs and secret keys and curve points and so forth should not add timing attacks, which could either result in a direct forgery, or, given the complexity, some other type of attack. Signed-off-by: Jason A. Donenfeld Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org net/bluetooth/smp.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit 1b8b02f0d084a2d9a966d5ae004d49c8e76aa8cc Author: Greg Kroah-Hartman Date: Sat Jun 10 14:31:21 2017 +0200 arm: ecard: fix dev_groups patch typo Commit 71d1e5d71cec ("arm: ecard: use dev_groups and not dev_attrs for bus_type") had a typo in the resource attribute definition. Fix that up. Reported-by: kbuild test robot Fixes: 71d1e5d71cec ("arm: ecard: use dev_groups and not dev_attrs for bus_type") Cc: Russell King Cc: Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org arch/arm/mach-rpc/ecard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91300dd67baec4f046aa76e3a2e8222d15cc76e9 Author: Masahiro Yamada Date: Wed Jun 7 20:52:14 2017 +0900 mtd: nand: denali_dt: add compatible strings for UniPhier SoC variants Add two compatible strings for UniPhier SoC family. "socionext,uniphier-denali-nand-v5a" is used on UniPhier sLD3, LD4, Pro4, sLD8. "socionext,uniphier-denali-nand-v5b" is used on UniPhier Pro5, PXs2, LD6b, LD11, LD20. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Boris Brezillon .../devicetree/bindings/mtd/denali-nand.txt | 6 ++++++ drivers/mtd/nand/denali_dt.c | 25 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 0615e7ad5d52594d12d67aa987d1fd98164e2f64 Author: Masahiro Yamada Date: Wed Jun 7 20:52:13 2017 +0900 mtd: nand: denali: remove Toshiba and Hynix specific fixup code The Denali IP can automatically detect device parameters such as page size, oob size, device width, etc. and this driver currently relies on it. However, this hardware function is known to be problematic. [1] Due to a hardware bug, various misdetected cases were reported. That is why get_toshiba_nand_para() and get_hynix_nand_para() exist to fix-up the misdetected parameters. It is not realistic to add a new NAND device to the *black list* every time we are hit by a misdetected case. We would never be able to guarantee that all cases are covered. [2] Because this feature is unreliable, it is disabled on some platforms. The nand_scan_ident() detects device parameters in a more tested way. The hardware should not set the device parameter registers in a different, unreliable way. Instead, set the parameters from the nand_scan_ident() back to the registers. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 40 ++++++---------------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) commit 7de117fd5bfe0d84e50714ef5dcf5f3cec7f0eef Author: Masahiro Yamada Date: Wed Jun 7 20:52:12 2017 +0900 mtd: nand: denali: avoid hard-coding ECC step, strength, bytes This driver was originally written for the Intel MRST platform with several platform-specific parameters hard-coded. Currently, the ECC settings are hard-coded as follows: #define ECC_SECTOR_SIZE 512 #define ECC_8BITS 14 #define ECC_15BITS 26 Therefore, the driver can only support two cases. - ecc.size = 512, ecc.strength = 8 --> ecc.bytes = 14 - ecc.size = 512, ecc.strength = 15 --> ecc.bytes = 26 However, these are actually customizable parameters, for example, UniPhier platform supports the following: - ecc.size = 1024, ecc.strength = 8 --> ecc.bytes = 14 - ecc.size = 1024, ecc.strength = 16 --> ecc.bytes = 28 - ecc.size = 1024, ecc.strength = 24 --> ecc.bytes = 42 So, we need to handle the ECC parameters in a more generic manner. Fortunately, the Denali User's Guide explains how to calculate the ecc.bytes. The formula is: ecc.bytes = 2 * CEIL(13 * ecc.strength / 16) (for ecc.size = 512) ecc.bytes = 2 * CEIL(14 * ecc.strength / 16) (for ecc.size = 1024) For DT platforms, it would be reasonable to allow DT to specify ECC strength by either "nand-ecc-strength" or "nand-ecc-maximize". If none of them is specified, the driver will try to meet the chip's ECC requirement. For PCI platforms, the max ECC strength is used to keep the original behavior. Newer versions of this IP need ecc.size and ecc.steps explicitly set up via the following registers: CFG_DATA_BLOCK_SIZE (0x6b0) CFG_LAST_DATA_BLOCK_SIZE (0x6c0) CFG_NUM_DATA_BLOCKS (0x6d0) For older IP versions, write accesses to these registers are just ignored. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Boris Brezillon .../devicetree/bindings/mtd/denali-nand.txt | 7 ++ drivers/mtd/nand/denali.c | 87 +++++++++++++--------- drivers/mtd/nand/denali.h | 12 ++- drivers/mtd/nand/denali_dt.c | 5 ++ drivers/mtd/nand/denali_pci.c | 4 + 5 files changed, 78 insertions(+), 37 deletions(-) commit a03c60178c181767ecfb26fb311a88742d228118 Author: Masahiro Yamada Date: Wed Jun 7 20:52:11 2017 +0900 mtd: nand: add a shorthand to generate nand_ecc_caps structure struct nand_ecc_caps was designed as flexible as possible to support multiple stepsizes (like sunxi_nand.c). So, we need to write multiple arrays even for the simplest case. I guess many controllers support a single stepsize, so here is a shorthand macro for the case. It allows to describe like ... NAND_ECC_CAPS_SINGLE(denali_pci_ecc_caps, denali_calc_ecc_bytes, 512, 8, 15); ... instead of static const int denali_pci_ecc_strengths[] = {8, 15}; static const struct nand_ecc_step_info denali_pci_ecc_stepinfo = { .stepsize = 512, .strengths = denali_pci_ecc_strengths, .nstrengths = ARRAY_SIZE(denali_pci_ecc_strengths), }; static const struct nand_ecc_caps denali_pci_ecc_caps = { .stepinfos = &denali_pci_ecc_stepinfo, .nstepinfos = 1, .calc_ecc_bytes = denali_calc_ecc_bytes, }; Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon include/linux/mtd/nand.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2c8f8afa7f92acb07641bf95b940d384ed1d0294 Author: Masahiro Yamada Date: Wed Jun 7 20:52:10 2017 +0900 mtd: nand: add generic helpers to check, match, maximize ECC settings Driver are responsible for setting up ECC parameters correctly. Those include: - Check if ECC parameters specified (usually by DT) are valid - Meet the chip's ECC requirement - Maximize ECC strength if NAND_ECC_MAXIMIZE flag is set The logic can be generalized by factoring out common code. This commit adds 3 helpers to the NAND framework: nand_check_ecc_caps - Check if preset step_size and strength are valid nand_match_ecc_req - Match the chip's requirement nand_maximize_ecc - Maximize the ECC strength To use the helpers above, a driver needs to provide: - Data array of supported ECC step size and strength - A hook that calculates ECC bytes from the combination of step_size and strength. By using those helpers, code duplication among drivers will be reduced. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 220 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/nand.h | 33 +++++++ 2 files changed, 253 insertions(+) commit df8b97024e6d28e98066696619e2084bbda4e40e Author: Masahiro Yamada Date: Tue Jun 6 08:21:41 2017 +0900 mtd: nand: denali: use BIT() and GENMASK() for register macros Use BIT() and GENMASK() for register field macros. This will make it easier to compare the macros with the register description in the Denali User's Guide. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.h | 244 ++++++++++++++++++++++------------------------ 1 file changed, 119 insertions(+), 125 deletions(-) commit 2b8c92b4e7265e271cd070a1a5dd1ab2766e516b Author: Masahiro Yamada Date: Tue Jun 6 08:21:40 2017 +0900 mtd: nand: denali_dt: clean up resource ioremap No need to use two struct resource pointers. Just reuse one. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali_dt.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit f82c3232d1906bc8754e0b33ce39d09d08cb60c3 Author: Matthias Lange Date: Mon Jun 5 11:34:38 2017 +0200 mtd: nand: gpmi: fix typo in comment Signed-off-by: Matthias Lange Signed-off-by: Boris Brezillon drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d816f6b6375901a5090018961c5ab631784538ea Author: Matthias Lange Date: Mon Jun 5 11:33:51 2017 +0200 mtd: nand: gpmi: Fix typo in data structure name This makes it easier to grep. Signed-off-by: Matthias Lange Signed-off-by: Boris Brezillon drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 4 ++-- drivers/mtd/nand/gpmi-nand/gpmi-nand.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3762a33b007b63e058eb600eccf0bcd097d386f5 Author: Arvind Yadav Date: Thu Jun 1 16:28:15 2017 +0530 mtd: nand: orion: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Boris Brezillon drivers/mtd/nand/orion_nand.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d45e5316e6a5071dbfe44bae04a89a3ba75e1ea9 Author: Boris Brezillon Date: Sat Jun 10 12:09:05 2017 +0200 mtd: nand: fsl_ifc: fix handing of bit flips in erased pages If we see unrecoverable ECC error, we need to count number of bitflips from all-ones and report correctable/uncorrectable according to that. Otherwise we report ECC failed on erased flash with single bit error. Signed-off-by: Pavel Machek Reported-by: Darwin Dingel Acked-by: Darwin Dingel Signed-off-by: Boris Brezillon drivers/mtd/nand/fsl_ifc_nand.c | 77 ++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 35 deletions(-) commit 7a78ef92cdc5813cab2c3a8ca2334eaaedc6818c Author: Chen-Yu Tsai Date: Fri Jun 9 23:34:36 2017 +0800 ARM: sun8i: h3: Enable EMAC with external PHY on Orange Pi Plus 2E The Orange Pi Plus 2E, unlike the Orange Pi PC and PC Plus which its schematics are based on, uses an external Realtek RTL8211E PHY in RGMII mode, with a GPIO enabling the regulator for I/O signalling power supplies. The PHY's main power supply is enabled by the main 5V power supply. Add the regulator and PHY nodes, and override the PHY phandle under the EMAC node, so that the EMAC works properly on this board. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 48df28b85991ac67a2270f0bb818221527834b78 Author: Ryder Lee Date: Thu Jun 1 10:30:22 2017 +0800 dt-bindings: crypto: remove mediatek ethif clock This patch removes the parent clock 'ethif' in bindings, since we don't need to control the parent of a clock in current clock framework. Moreover, the clocks are get by name in the driver, thus this change does not break backwards compatibility. Signed-off-by: Ryder Lee Reviewed-by: Matthias Brugger Acked-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/crypto/mediatek-crypto.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8fa23a29eb77698cdcc6ea173577ec3af463fe53 Author: Ryder Lee Date: Thu Jun 1 10:30:21 2017 +0800 crypto: mediatek - remove redundant clock setting This patch removes redundant clock setting for 'clk_ethif', which is the parent of 'clk_cryp'. Hence, we just need to handle its child. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-platform.c | 10 +--------- drivers/crypto/mediatek/mtk-platform.h | 2 -- 2 files changed, 1 insertion(+), 11 deletions(-) commit 47d3fd390e899e0403da35733b75832eacfbbc3f Author: Tudor-Dan Ambarus Date: Tue May 30 17:52:49 2017 +0300 crypto: testmgr - add genkey kpp test The test considers a party that already has a private-public key pair and a party that provides a NULL key. The kernel will generate the private-public key pair for the latter, computes the shared secret on both ends and verifies if it's the same. The explicit private-public key pair was copied from the previous test vector. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/testmgr.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++-------- crypto/testmgr.h | 47 +++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+), 11 deletions(-) commit 6755fd269d5c100b0eca420db501ae58435efd6e Author: Tudor-Dan Ambarus Date: Tue May 30 17:52:48 2017 +0300 crypto: ecdh - add privkey generation support Add support for generating ecc private keys. Generation of ecc private keys is helpful in a user-space to kernel ecdh offload because the keys are not revealed to user-space. Private key generation is also helpful to implement forward secrecy. If the user provides a NULL ecc private key, the kernel will generate it and further use it for ecdh. Move ecdh's object files below drbg's. drbg must be present in the kernel at the time of calling. Signed-off-by: Tudor Ambarus Reviewed-by: Stephan Müller Signed-off-by: Herbert Xu crypto/Kconfig | 1 + crypto/Makefile | 9 +++++---- crypto/ecc.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ crypto/ecc.h | 14 ++++++++++++++ crypto/ecdh.c | 4 ++++ 5 files changed, 80 insertions(+), 4 deletions(-) commit f2663872f073c874495b793721a47cc7f30eaec7 Author: Srikanth Jampala Date: Tue May 30 17:28:03 2017 +0530 crypto: cavium - Register the CNN55XX supported crypto algorithms. Register the Symmetric crypto algorithms supported by CNN55XX driver with crypto subsystem. The following Symmetric crypto algorithms are supported, - aes with cbc, ecb, cfb, xts, ctr and cts modes - des3_ede with cbc and ecb modes Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu drivers/crypto/cavium/nitrox/Makefile | 3 +- drivers/crypto/cavium/nitrox/nitrox_algs.c | 457 +++++++++++++++++++++++++++ drivers/crypto/cavium/nitrox/nitrox_common.h | 7 + drivers/crypto/cavium/nitrox/nitrox_lib.c | 38 +++ drivers/crypto/cavium/nitrox/nitrox_main.c | 40 +++ 5 files changed, 544 insertions(+), 1 deletion(-) commit 086eac9eb4a05d053f8abf661c36e77c40264e41 Author: Srikanth Jampala Date: Tue May 30 17:28:02 2017 +0530 crypto: cavium - Add debugfs support in CNN55XX driver. Add debugfs support in CNN55XX Physical Function driver. Provides hardware counters and firmware information. Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu drivers/crypto/cavium/nitrox/nitrox_csr.h | 4 + drivers/crypto/cavium/nitrox/nitrox_dev.h | 4 + drivers/crypto/cavium/nitrox/nitrox_main.c | 135 +++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+) commit 14fa93cdcd9bbd50018196c00ca16da636f965c2 Author: Srikanth Jampala Date: Tue May 30 17:28:01 2017 +0530 crypto: cavium - Add support for CNN55XX adapters. Add Physical Function driver support for CNN55XX crypto adapters. CNN55XX adapters belongs to Cavium NITROX family series, which accelerate both Symmetric and Asymmetric crypto workloads. These adapters have crypto engines that need firmware to become operational. Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/cavium/nitrox/Kconfig | 21 + drivers/crypto/cavium/nitrox/Makefile | 7 + drivers/crypto/cavium/nitrox/nitrox_common.h | 35 + drivers/crypto/cavium/nitrox/nitrox_csr.h | 1080 ++++++++++++++++++++++++++ drivers/crypto/cavium/nitrox/nitrox_dev.h | 175 +++++ drivers/crypto/cavium/nitrox/nitrox_hal.c | 401 ++++++++++ drivers/crypto/cavium/nitrox/nitrox_isr.c | 467 +++++++++++ drivers/crypto/cavium/nitrox/nitrox_lib.c | 172 ++++ drivers/crypto/cavium/nitrox/nitrox_main.c | 465 +++++++++++ drivers/crypto/cavium/nitrox/nitrox_req.h | 445 +++++++++++ drivers/crypto/cavium/nitrox/nitrox_reqmgr.c | 732 +++++++++++++++++ 13 files changed, 4002 insertions(+) commit 3bca64c1b9d2f6e7af4512bd9bfef6909d09cdbc Author: Dan Carpenter Date: Mon May 29 16:26:22 2017 +0300 X.509: Fix error code in x509_cert_parse() We forgot to set the error code on this path so it could result in returning NULL which leads to a NULL dereference. Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api") Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu crypto/asymmetric_keys/x509_cert_parser.c | 1 + 1 file changed, 1 insertion(+) commit a18ccc365f1a29f1b6d7b4a1edbaffb7100fb1f6 Author: Stephan Mueller Date: Fri May 26 12:12:51 2017 +0200 crypto: drbg - Fixes panic in wait_for_completion call Initialise ctr_completion variable before use. Signed-off-by: Harsh Jain Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/drbg.c | 1 + 1 file changed, 1 insertion(+) commit 543de102e3316983119462c2821b76648ac3e744 Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:16 2017 +0300 crypto: pkcs1pad - comply with crypto_akcipher_maxsize() crypto_akcipher_maxsize() asks for the output buffer size without caring for errors. It allways assume that will be called after a valid setkey. Comply with it and return what he wants. crypto_akcipher_maxsize() now returns an unsigned int. Remove the unnecessary check. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/rsa-pkcs1pad.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 515c4d27d69acf0473157abeb21a2ae9f9328bac Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:15 2017 +0300 crypto: qat - comply with crypto_akcipher_maxsize() crypto_akcipher_maxsize() asks for the output buffer size without caring for errors. It allways assume that will be called after a valid setkey. Comply with it and return what he wants. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_asym_algs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e198429c41edaeaf5e1e2e2ef4bb5a476d8bf399 Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:14 2017 +0300 crypto: caampkc - comply with crypto_akcipher_maxsize() crypto_akcipher_maxsize() asks for the output buffer size without caring for errors. It allways assume that will be called after a valid setkey. Comply with it and return what he wants. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/caam/caampkc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1c23b466e999911d3dd7af2ac0ec7bee8cc85635 Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:13 2017 +0300 crypto: rsa - comply with crypto_akcipher_maxsize() crypto_akcipher_maxsize() asks for the output buffer size without caring for errors. It allways assume that will be called after a valid setkey. Comply with it and return what he wants. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/rsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 561f8e2df990a7a2859a98bd208d0f7dc932c3f7 Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:12 2017 +0300 crypto: akcipher - assume key is already set in maxsize As of now, crypto_akcipher_maxsize() can not be reached without successfully setting the key for the transformation. akcipher algorithm implementations check if the key was set and then return the output buffer size required for the given key. Change the return type to unsigned int and always assume that this function is called after a successful setkey of the transformation. akcipher algorithm implementations will remove the check if key is not NULL and directly return the max size. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu include/crypto/akcipher.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 85ac98cbac1bb63c878486b88bfb6f5bac540e21 Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:11 2017 +0300 crypto: qat - comply with crypto_kpp_maxsize() crypto_kpp_maxsize() asks for the output buffer size without caring for errors. It allways assume that will be called after a valid setkey. Comply with it and return what he wants. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_asym_algs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0efb48b8615292e05373caa27854e36e732668b Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:10 2017 +0300 crypto: ecdh - comply with crypto_kpp_maxsize() crypto_kpp_maxsize() asks for the output buffer size without caring for errors. It allways assume that will be called after a valid setkey. Comply with it and return what he wants. nbytes has no sense now, remove it and directly return the maxsize. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/ecdh.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7f69105077bfb36a8ff9c2ee20af50d921445fc0 Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:09 2017 +0300 crypto: dh - comply with crypto_kpp_maxsize() crypto_kpp_maxsize() asks for the output buffer size without caring for errors. It allways assume that will be called after a valid setkey. Comply with it and return what he wants. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/dh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c444b8da87d16e6f9f11e15c8c873a641f7cd117 Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:08 2017 +0300 crypto: kpp - assume key is already set in maxsize As of now, crypto_kpp_maxsize() can not be reached without successfully setting the key for the transformation. kpp algorithm implementations check if the key was set and then return the output buffer size required for the given key. Change the return type to unsigned int and always assume that this function is called after a successful setkey of the transformation. kpp algorithm implementations will remove the check if key is not NULL and directly return the max size. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu include/crypto/kpp.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ee34e2644a78e2561742bea8c4bdcf83cabf90a7 Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:07 2017 +0300 crypto: dh - fix memleak in setkey setkey can be called multiple times during the existence of the transformation object. In case of multiple setkey calls, the old key was not freed and we leaked memory. Free the old MPI key if any. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/dh.c | 3 +++ 1 file changed, 3 insertions(+) commit 7380c56d2fcaa882a0809aad075c3f9fdc3b3c50 Author: Tudor-Dan Ambarus Date: Tue May 30 15:37:56 2017 +0300 crypto: ecc - rename ecdh_make_pub_key() Rename ecdh_make_pub_key() to ecc_make_pub_key(). ecdh_make_pub_key() is not dh specific and the reference to dh is wrong. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/ecc.c | 4 ++-- crypto/ecc.h | 6 +++--- crypto/ecdh.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit ad269597107e6dde4810987eebbd075778d0262c Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:05 2017 +0300 crypto: ecc - remove unnecessary casts ecc software implementation works with chunks of u64 data. There were some unnecessary casts to u8 and then back to u64 for the ecc keys. This patch removes the unnecessary casts. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/ecc.c | 28 +++++++++++++--------------- crypto/ecc.h | 8 ++++---- crypto/ecdh.c | 11 +++++------ 3 files changed, 22 insertions(+), 25 deletions(-) commit 099054d735a5e4cfc8e90b03b7422c9b48209d8b Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:04 2017 +0300 crypto: ecc - remove unused function arguments Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/ecc.c | 8 +++----- crypto/ecc.h | 13 +++---------- crypto/ecdh.c | 11 +++++------ 3 files changed, 11 insertions(+), 21 deletions(-) commit c0ca1215dc92ee6a0f975c95a92fb7f9fb31e9e1 Author: Tudor-Dan Ambarus Date: Thu May 25 10:18:03 2017 +0300 crypto: kpp, (ec)dh - fix typos While here, add missing argument description (ndigits). Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/dh.c | 4 ++-- crypto/dh_helper.c | 4 ++-- crypto/ecc.h | 8 +++++--- crypto/ecdh.c | 4 ++-- crypto/ecdh_helper.c | 4 ++-- include/crypto/dh.h | 4 ++-- include/crypto/ecdh.h | 4 ++-- include/crypto/kpp.h | 4 ++-- 8 files changed, 19 insertions(+), 17 deletions(-) commit ee0db78d62d81dcbfba7c3e4d523ecae9d7b7c08 Author: Antoine Ténart Date: Wed May 24 16:10:35 2017 +0200 MAINTAINERS: add a maintainer for the Inside Secure crypto driver A new cryptographic engine driver was added in drivers/crypto/inside-secure. Add myself as a maintainer for this driver. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 1b44c5a60c137e5fd0c2c8b86e58fdbc9cd181ce Author: Antoine Ténart Date: Wed May 24 16:10:34 2017 +0200 crypto: inside-secure - add SafeXcel EIP197 crypto engine driver Add support for Inside Secure SafeXcel EIP197 cryptographic engine, which can be found on Marvell Armada 7k and 8k boards. This driver currently implements: ecb(aes), cbc(aes), sha1, sha224, sha256 and hmac(sah1) algorithms. Two firmwares are needed for this engine to work. Their are mostly used for more advanced operations than the ones supported (as of now), but we still need them to pass the data to the internal cryptographic engine. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 17 + drivers/crypto/Makefile | 1 + drivers/crypto/inside-secure/Makefile | 2 + drivers/crypto/inside-secure/safexcel.c | 930 +++++++++++++++++++++ drivers/crypto/inside-secure/safexcel.h | 572 +++++++++++++ drivers/crypto/inside-secure/safexcel_cipher.c | 556 +++++++++++++ drivers/crypto/inside-secure/safexcel_hash.c | 1045 ++++++++++++++++++++++++ drivers/crypto/inside-secure/safexcel_ring.c | 157 ++++ 8 files changed, 3280 insertions(+) commit c28e8f21642fd01a65687de9bfa5307fdcfe9966 Author: Tero Kristo Date: Wed May 24 10:35:34 2017 +0300 crypto: omap-sham - force word alignment on the xmit-buf also This was previously missed from the code, causing SDMA to hang in some cases where the buffer ended up being not aligned. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 898d86a565925f09de3d0b30cf3b47ec2e409680 Author: Tero Kristo Date: Wed May 24 10:35:33 2017 +0300 crypto: omap-sham - fix closing of hash with separate finalize call Currently there is an interesting corner case failure with omap-sham driver, if the finalize call is done separately with no data, but all previous data has already been processed. In this case, it is not possible to close the hash with the hardware without providing any data, so we get incorrect results. Fix this by adjusting the size of data sent to the hardware crypto engine in case the non-final data size falls on the block size boundary, by reducing the amount of data sent by one full block. This makes it sure that we always have some data available for the finalize call and we can close the hash properly. Signed-off-by: Tero Kristo Reported-by: Aparna Balasubramanian Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5d78d57ede8f9e7f656c610ed25be7be337e0529 Author: Tero Kristo Date: Wed May 24 10:35:32 2017 +0300 crypto: omap-sham - buffer handling fixes for hashing later Currently, the hash later code only handles the cases when we have either new data coming in with the request or old data in the buffer, but not the combination when we have both. Fix this by changing the ordering of the code a bit and handling both cases properly simultaneously if needed. Also, fix an issue with omap_sham_update that surfaces with this fix, so that the code checks the bufcnt instead of total data amount against buffer length to avoid any buffer overflows. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit ad18cc9d0f911928704cdc37f4d126853daa9e4e Author: Tero Kristo Date: Wed May 24 10:35:31 2017 +0300 crypto: omap-aes - Add support for GCM mode OMAP AES hw supports AES-GCM mode. This patch adds support for GCM and RFC4106 GCM mode in omap-aes driver. The GCM implementation is mostly written into its own source file, which gets built into the same driver binary as the existing AES support. Signed-off-by: Lokesh Vutla [t-kristo@ti.com: forward port to latest upstream kernel, conversion to use omap-crypto lib and some additional fixes] Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 3 +- drivers/crypto/omap-aes-gcm.c | 408 ++++++++++++++++++++++++++++++++++++++++++ drivers/crypto/omap-aes.c | 159 +++++++++++++++- drivers/crypto/omap-aes.h | 54 +++++- 5 files changed, 612 insertions(+), 13 deletions(-) commit d695bfd6f02adf362511a6d0139e7f7e6342d3e8 Author: Tero Kristo Date: Wed May 24 10:35:30 2017 +0300 crypto: omap-aes - export some AES driver functionality locally These are going to be required by the addition of the GCM support. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 12 ++++++------ drivers/crypto/omap-aes.h | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) commit 5b3d4d2e613ba7274f6cc11373a5919faafdda28 Author: Tero Kristo Date: Wed May 24 10:35:29 2017 +0300 crypto: omap-aes - move definitions over to a separate header file Move over most of the omap-aes driver internal definitions to a separate header file. This is done so that the same definitions can be used in the upcoming AES-GCM support code. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 150 +---------------------------------------- drivers/crypto/omap-aes.h | 167 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+), 149 deletions(-) commit afc2dc1336977c07e3aed368d128e6986d20c9a8 Author: Tero Kristo Date: Wed May 24 10:35:28 2017 +0300 crypto: omap-aes - use base omap crypto support library Use the SG alignment APIs from the OMAP crypto support library instead of using own implementations. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 120 +++++++++++----------------------------------- 1 file changed, 28 insertions(+), 92 deletions(-) commit 9765e768613c6b11ab482df938282e097710e6aa Author: Tero Kristo Date: Wed May 24 10:35:27 2017 +0300 crypto: omap-des - use base omap crypto support library Use the SG alignment APIs from the OMAP crypto support library instead of using own implementations. This reduces the amount of copy-paste code. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-des.c | 112 ++++++++++++---------------------------------- 1 file changed, 28 insertions(+), 84 deletions(-) commit 74ed87e7e7f7197137164738dd0610ccd5ec5ed1 Author: Tero Kristo Date: Wed May 24 10:35:26 2017 +0300 crypto: omap - add base support library for common routines This contains the generic APIs for aligning SG buffers. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 11 +++ drivers/crypto/Makefile | 1 + drivers/crypto/omap-crypto.c | 184 +++++++++++++++++++++++++++++++++++++++++++ drivers/crypto/omap-crypto.h | 37 +++++++++ 4 files changed, 233 insertions(+) commit 418f2a8cf2ebb817a2b98cb4829c13d374e06932 Author: Tero Kristo Date: Wed May 24 10:35:25 2017 +0300 crypto: omap-des - use runtime_pm autosuspend for clock handling Convert the driver to use autosuspend for runtime_pm. This boosts the performance, and optimizes the power consumption for the driver. By default, the timeout value for autosuspend is set to one second. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-des.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a636fdce55c6ad12b07436424ceffad1045714db Author: Tero Kristo Date: Wed May 24 10:35:24 2017 +0300 crypto: omap-des - add check for weak keys OMAP DES crypto accelerator itself is unable to detect weak keys, so add a specific call to the generic des driver to check the key strength if requested. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-des.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 619ce700583f0f193bfb1487ca393b8ad2141a9a Author: Tero Kristo Date: Wed May 24 10:35:23 2017 +0300 crypto: omap-aes - fix context handling for multiple cores AES can have multiple HW accelerator cores in the system, in which case each core has its own crypto engine in use. Currently, the used hardware device is stored under the omap_aes_ctx struct, which is global for the algorithm itself, causing conflicts when used with multiple cores. Fix this by moving the used HW device under reqctx, which is stored per-request basis. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) commit f09b348c1ac56b61fceb12808b4003109188f1d2 Author: Tero Kristo Date: Wed May 24 10:35:22 2017 +0300 crypto: omap-aes - drop unused flags attribute from omap_aes_ctx This is not used for anything, so drop it. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 1 - 1 file changed, 1 deletion(-) commit 1e6adff449c12b1ee92300af9436ea70461e9887 Author: Matthias Kaehlcke Date: Mon May 22 15:49:43 2017 -0700 crypto: rng - Remove unused function __crypto_rng_cast() This fixes the following warning when building with clang: crypto/rng.c:35:34: error: unused function '__crypto_rng_cast' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke Signed-off-by: Herbert Xu crypto/rng.c | 5 ----- 1 file changed, 5 deletions(-) commit 1b3c872c8342803d0fcd8042e4e007d173191db6 Author: Al Viro Date: Wed May 31 04:46:17 2017 -0400 rt_sigtimedwait(): move compat to native Signed-off-by: Al Viro include/linux/signal.h | 2 -- kernel/compat.c | 32 -------------------------------- kernel/signal.c | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 35 insertions(+), 35 deletions(-) commit 464d62421cb8b2a6812dcb8c45184ff17b1bc5da Author: Al Viro Date: Sun Jun 4 03:24:26 2017 -0400 select: switch compat_{get,put}_fd_set() to compat_{get,put}_bitmap() Signed-off-by: Al Viro fs/select.c | 44 +++++--------------------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) commit 7668b679c3b7931f6436d1eef50904831209e749 Author: Al Viro Date: Wed May 31 06:39:31 2017 -0400 put_compat_rusage(): switch to copy_to_user() Signed-off-by: Al Viro kernel/compat.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit 8f13621abcedb278cfecf9703583743f9c474c97 Author: Al Viro Date: Wed May 31 04:42:07 2017 -0400 sigpending(): move compat to native ... and kill set_fs() use Signed-off-by: Al Viro kernel/compat.c | 23 ----------------------- kernel/signal.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 23 deletions(-) commit d9e968cb9f849770288f5fde3d8d3a5f7e339052 Author: Al Viro Date: Wed May 31 04:33:51 2017 -0400 getrlimit()/setrlimit(): move compat to native Signed-off-by: Al Viro kernel/compat.c | 38 -------------------------------------- kernel/sys.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 38 deletions(-) commit ca2406ed58fef3f7c8ef6470cba807bfc3415605 Author: Al Viro Date: Wed May 31 04:22:44 2017 -0400 times(2): move compat to native Signed-off-by: Al Viro include/linux/time.h | 3 --- kernel/compat.c | 24 ------------------------ kernel/sys.c | 28 +++++++++++++++++++++++++++- 3 files changed, 27 insertions(+), 28 deletions(-) commit 1e1fc133483ef3b56c20bf3cd9241146c41042f8 Author: Al Viro Date: Tue May 30 00:29:38 2017 -0400 compat_{get,put}_bitmap(): use unsafe_{get,put}_user() unroll the inner loops, while we are at it Signed-off-by: Al Viro include/linux/compat.h | 3 +- kernel/compat.c | 81 +++++++++++++++++--------------------------------- 2 files changed, 29 insertions(+), 55 deletions(-) commit 9a4690379206695b63a175e227877490beb2eeda Author: Al Viro Date: Fri May 26 23:51:09 2017 -0400 fb_get_fscreeninfo(): don't bother with do_fb_ioctl() it's easier to do the right thing directly Signed-off-by: Al Viro drivers/video/fbdev/core/fbmem.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 84cd843e715298bbfb17ed40c7d61d7db6854a70 Author: Rodrigo Vivi Date: Fri Jun 9 13:02:30 2017 -0700 drm/i915/cfl: Coffee Lake reuses Kabylake DMC. both platforms. We haven't recieved any separated release specifically for Coffee Lake so let's just re-use what is already there for Kabylake. Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: http://patchwork.freedesktop.org/patch/msgid/1497038550-30910-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_csr.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 1adc9105bbf8831d31f764ca8d1b99696e5dedba Author: Corey Minyard Date: Fri Jun 9 16:35:18 2017 -0500 ipmi: Use the proper default value for register size in ACPI It's the proper value, so there's no effect, but just to be proper, use the right value. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0b4d3452b8b4a5309b4445b900e3cec022cca95a Author: Scott Mayhew Date: Mon Jun 5 11:45:04 2017 -0400 security/selinux: allow security_sb_clone_mnt_opts to enable/disable native labeling behavior When an NFSv4 client performs a mount operation, it first mounts the NFSv4 root and then does path walk to the exported path and performs a submount on that, cloning the security mount options from the root's superblock to the submount's superblock in the process. Unless the NFS server has an explicit fsid=0 export with the "security_label" option, the NFSv4 root superblock will not have SBLABEL_MNT set, and neither will the submount superblock after cloning the security mount options. As a result, setxattr's of security labels over NFSv4.2 will fail. In a similar fashion, NFSv4.2 mounts mounted with the context= mount option will not show the correct labels because the nfs_server->caps flags of the cloned superblock will still have NFS_CAP_SECURITY_LABEL set. Allowing the NFSv4 client to enable or disable SECURITY_LSM_NATIVE_LABELS behavior will ensure that the SBLABEL_MNT flag has the correct value when the client traverses from an exported path without the "security_label" option to one with the "security_label" option and vice versa. Similarly, checking to see if SECURITY_LSM_NATIVE_LABELS is set upon return from security_sb_clone_mnt_opts() and clearing NFS_CAP_SECURITY_LABEL if necessary will allow the correct labels to be displayed for NFSv4.2 mounts mounted with the context= mount option. Resolves: https://github.com/SELinuxProject/selinux-kernel/issues/35 Signed-off-by: Scott Mayhew Reviewed-by: Stephen Smalley Tested-by: Stephen Smalley Signed-off-by: Paul Moore fs/nfs/super.c | 17 ++++++++++++++++- include/linux/lsm_hooks.h | 4 +++- include/linux/security.h | 8 ++++++-- security/security.c | 7 +++++-- security/selinux/hooks.c | 35 +++++++++++++++++++++++++++++++++-- 5 files changed, 63 insertions(+), 8 deletions(-) commit b4958c892e02241b9bd121f3397b76225ff6f4a3 Author: Junil Lee Date: Thu Jun 8 13:18:09 2017 +0900 selinux: use kmem_cache for ebitmap The allocated size for each ebitmap_node is 192byte by kzalloc(). Then, ebitmap_node size is fixed, so it's possible to use only 144byte for each object by kmem_cache_zalloc(). It can reduce some dynamic allocation size. Signed-off-by: Junil Lee Signed-off-by: Paul Moore security/selinux/ss/ebitmap.c | 26 ++++++++++++++++++++------ security/selinux/ss/ebitmap.h | 3 +++ security/selinux/ss/services.c | 4 ++++ 3 files changed, 27 insertions(+), 6 deletions(-) commit 8272115578ce02566b4c6bbe45f09d0d55f4a1c6 Author: Takashi Iwai Date: Fri Jun 9 14:57:51 2017 +0200 ALSA: synth: Select snd-emux-synth explicitly Instead of the non-standard way to enable the build of snd-emux-synth module inside Makefile, rewrite Kconfig to select the item explicitly from each driver (sbawe and emu10k1). This is the standard way. Signed-off-by: Takashi Iwai sound/Kconfig | 2 ++ sound/isa/Kconfig | 1 + sound/pci/Kconfig | 1 + sound/synth/Kconfig | 2 ++ sound/synth/emux/Makefile | 4 +--- 5 files changed, 7 insertions(+), 3 deletions(-) commit 0181307abc1d2eb2a0dead93870bcffadddb827c Author: Takashi Iwai Date: Fri Jun 9 14:40:18 2017 +0200 ALSA: seq: Reorganize kconfig and build This is a slightly intensive rewrite of Kconfig and Makefile about ALSA sequencer stuff. The first major change is that the kconfig items for the sequencer are moved to sound/core/seq/Kconfig. OK, that's easy. The substantial change is that, instead of hackish top-level module selection in Makefile, we define a Kconfig item for each sequencer module. The driver that requires such sequencer components select exclusively the kconfig items. This is more straightforward and standard way. Signed-off-by: Takashi Iwai sound/core/Kconfig | 47 ---------------------------------- sound/core/seq/Kconfig | 68 +++++++++++++++++++++++++++++++++++++++++-------- sound/core/seq/Makefile | 13 +++------- sound/drivers/Kconfig | 13 ++++++++++ sound/isa/Kconfig | 6 +++++ sound/pci/Kconfig | 6 +++++ 6 files changed, 86 insertions(+), 67 deletions(-) commit 3d774d5ef066971aee1839150bf47d100d8e43d3 Author: Takashi Iwai Date: Fri Jun 9 14:06:46 2017 +0200 ALSA: seq: Allow the tristate build of OSS emulation Currently OSS sequencer emulation is tied with ALSA sequencer core, both are built in the same level; i.e. when CONFIG_SND_SEQUENCER=y, the OSS sequencer emulation is also always built-in, even though the functionality can be built as an individual module. This patch changes the rule and allows users to build snd-seq-oss module while others are built-in. Essentially, it's just a few simple changes in Kconfig and Makefile. Some driver codes like opl3 need to convert from the simple ifdef to IS_ENABLED(). But that's all. You might wonder how about the dependency: right, it can be messy, but it still works. Since we rewrote the sequencer binding with the standard bus, the driver can be bound at any time on demand. So, the synthesizer driver module can be loaded individually from the OSS emulation core before/after it. Signed-off-by: Takashi Iwai include/sound/emux_synth.h | 8 +++----- include/sound/opl3.h | 4 +--- sound/core/Kconfig | 2 +- sound/core/seq/Makefile | 7 +++---- sound/core/seq/oss/Makefile | 2 +- sound/drivers/opl3/opl3_seq.c | 4 ++-- sound/drivers/opl3/opl3_voice.h | 5 ++++- sound/isa/sb/emu8000_callback.c | 6 +++--- sound/synth/emux/emux.c | 6 +++--- sound/synth/emux/emux_effect.c | 2 +- sound/synth/emux/emux_oss.c | 4 ---- 11 files changed, 22 insertions(+), 28 deletions(-) commit d0417849152cb5ae08407bcc32b85b55b5b9f591 Author: Ganesh Goudar Date: Fri Jun 9 19:26:24 2017 +0530 cxgb4: fix memory leak in init_one() Free up mbox_log allocated for PF0 to PF3. Fixes: 7829451c695e ("cxgb4: Add control net_device for configuring PCIe VF") Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2f3ca449a4f9a54d2bf39c873269e68ad5f34acb Author: Arnd Bergmann Date: Fri Jun 9 12:37:35 2017 +0200 qed: add qed_int_sb_init() stub function When CONFIG_QED_SRIOV is disabled, we get a build error: drivers/net/ethernet/qlogic/qed/qed_int.c: In function 'qed_int_sb_init': drivers/net/ethernet/qlogic/qed/qed_int.c:1499:4: error: implicit declaration of function 'qed_vf_set_sb_info'; did you mean 'qed_mcp_get_resc_info'? [-Werror=implicit-function-declaration] All the other declarations have a 'static inline' stub as an alternative here, so this adds one more for qed_int_sb_init. Fixes: 50a207147fce ("qed: Hold a single array for SBs") Signed-off-by: Arnd Bergmann Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_vf.h | 5 +++++ 1 file changed, 5 insertions(+) commit c156d2890a81a74b76460e73068e3aa78dcc7189 Merge: 5189c55 fef1c3f Author: David S. Miller Date: Fri Jun 9 15:49:03 2017 -0400 Merge branch 'qed-Light-L2-updates' Yuval Mintz says: ==================== qed*: Light L2 updates This series does a major overhaul of the LL2 logic in qed. The single biggest change done here is in #5 where we're changing the API qed provides for LL2 [both internally in case of storage and externally in case of RoCE] to become callback-based to allow cleaner scalability in preperation to the future iWARP submission which would aadd additional flavors of LL2. It's also the only patch in series to modify !qed logic [qedr]. Patches prior to that mostly deal with refactoring LL2 code, encapsulating varaious parameters into structure and re-ordering of LL2 code. The latter patches add some small missing bits of LL2 ffunctionality. ==================== Signed-off-by: David S. Miller commit fef1c3f7ac119217f49c72d4cc5413b4c87c1774 Author: Mintz, Yuval Date: Fri Jun 9 17:13:25 2017 +0300 qed: collect GSI port statistics The LL2 statistics already have place holders for these, but haven't populated them so far. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 54f19f07acb6f9a0e90a183a2fb347ed3856b154 Author: Mintz, Yuval Date: Fri Jun 9 17:13:24 2017 +0300 qed: Call rx_release_cb() when flushing LL2 Driver to inform the connection owner that the its buffers are being released as part of a flush. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit d2201a21598aa6ad47e23272119bc29e48201670 Author: Mintz, Yuval Date: Fri Jun 9 17:13:23 2017 +0300 qed: No need for LL2 frags indication This is a legacy leftover; There's no current flow where 'frags_mapped' would be set. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) commit 0518c12f1f79dc2f2020836974c577404e42ae89 Author: Michal Kalderon Date: Fri Jun 9 17:13:22 2017 +0300 qed*: LL2 callback operations LL2 today is interrupt driven - when tx/rx completion arrives [or any other indication], qed needs to operate on the connection and pass the information to the protocol-driver [or internal qed consumer]. Since we have several flavors of ll2 employeed by the driver, each handler needs to do an if-else to determine the right functionality to use based on the connection type. In order to make things more scalable [given that we're going to add additional types of ll2 flavors] move the infrastrucutre into using a callback-based approach - the callbacks would be provided as part of the connection's initialization parameters. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/main.c | 6 +- drivers/infiniband/hw/qedr/qedr.h | 2 + drivers/infiniband/hw/qedr/qedr_cm.c | 238 ++++++++++++++++------ drivers/net/ethernet/qlogic/qed/qed.h | 1 - drivers/net/ethernet/qlogic/qed/qed_ll2.c | 197 +++++++++---------- drivers/net/ethernet/qlogic/qed/qed_ll2.h | 34 ++-- drivers/net/ethernet/qlogic/qed/qed_roce.c | 304 ++--------------------------- drivers/net/ethernet/qlogic/qed/qed_roce.h | 43 ---- include/linux/qed/qed_ll2_if.h | 36 ++++ include/linux/qed/qed_roce_if.h | 80 +++----- 10 files changed, 384 insertions(+), 557 deletions(-) commit 58de289807f02122ef7eca96e50365d2c1440902 Author: Mintz, Yuval Date: Fri Jun 9 17:13:21 2017 +0300 qed: LL2 code relocations Instead of having the OOO logic packetd, divide it with rest of code according to establish/release flows. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 58 +++++++++++++++---------------- 1 file changed, 28 insertions(+), 30 deletions(-) commit 13c547717231aad7e1635004ae3f698e5e78d6d1 Author: Mintz, Yuval Date: Fri Jun 9 17:13:20 2017 +0300 qed: Cleaner seperation of LL2 inputs A LL2 connection [qed_ll2_info] has a sub-structure of type qed_ll2_conn that contain various inputs for ll2 acquisition, but the connection also utilizes a couple of other inputs. Restructure the input structure to include all the inputs and refactor the code necessary to populate those. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 379 +++++++++++++++-------------- drivers/net/ethernet/qlogic/qed/qed_ll2.h | 42 +--- drivers/net/ethernet/qlogic/qed/qed_roce.c | 31 +-- include/linux/qed/qed_ll2_if.h | 39 +++ 4 files changed, 262 insertions(+), 229 deletions(-) commit 68be910cd2fa3f58587438af7ce3def6e03731fa Author: Mintz, Yuval Date: Fri Jun 9 17:13:19 2017 +0300 qed: Revise ll2 Rx completion This introduces qed_ll2_comp_rx_data as a public struct and moves handling of Rx packets in LL2 into using it. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 84 ++++++++++++++++++------------- include/linux/qed/qed_ll2_if.h | 26 ++++++++++ 2 files changed, 76 insertions(+), 34 deletions(-) commit 7c7973b2ae277c6e89dceda2246fff2472c8ffdb Author: Mintz, Yuval Date: Fri Jun 9 17:13:18 2017 +0300 qed: LL2 to use packed information for tx First step in revising the LL2 interface, this declares qed_ll2_tx_pkt_info as part of the ll2 interface, and uses it for transmission instead of receiving lots of parameters. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 127 +++++++++++++---------------- drivers/net/ethernet/qlogic/qed/qed_ll2.h | 41 ++-------- drivers/net/ethernet/qlogic/qed/qed_roce.c | 18 ++-- include/linux/qed/qed_ll2_if.h | 27 ++++++ 4 files changed, 102 insertions(+), 111 deletions(-) commit 5189c55506a54ab302ec08004140b99556c7df07 Merge: a2e8bbd a3307f9 Author: David S. Miller Date: Fri Jun 9 15:37:03 2017 -0400 Merge branch 'r8152-minor-adjustment' Hayes Wang says: ==================== r8152: minor adjustment Adjust some code to make it reasonable or satisfy the suggestion from the engineers. ==================== Signed-off-by: David S. Miller commit a3307f9b1b3611e925123f8b052cc6f49e51d1bb Author: hayeswang Date: Fri Jun 9 17:11:48 2017 +0800 r8152: replace napi_complete with napi_complete_done Change from using napi_complete to napi_complete_done to allow for the use of gro_flush_timeout in tuning network processing. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 745444583ab5c322def99907efa591860e38c75d Author: hayeswang Date: Fri Jun 9 17:11:47 2017 +0800 r8152: avoid rx queue more than 1000 packets Stop queuing rx packets if it is more than 1000. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4214cc550bf9d986699a072988503e33d3d3155d Author: hayeswang Date: Fri Jun 9 17:11:46 2017 +0800 r8152: check if disabling ALDPS is finished Use PLA 0xe000 bit 8 to check if disabling ALDPS is finished. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit befb2de18195d1ab6b843dd6ca921a222a32a588 Author: hayeswang Date: Fri Jun 9 17:11:45 2017 +0800 r8152: move the initialization to reset_resume function Move tp->rtl_ops.init() from rtl8152_resume() to rtl8152_reset_resume(). The initialization is only necessary for reset_resume(). Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 49d10347d445f003cdd3a3c2c4f36d11aa67e6e1 Author: hayeswang Date: Fri Jun 9 17:11:44 2017 +0800 r8152: move the default coalesce setting for RTL8153 Only RTL8153 could set coalesce, so move the default setting for rtl8152_probe() to r8153_init(). Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 3cb3234eed89c10d706d23f5355596efc07dc83c Author: hayeswang Date: Fri Jun 9 17:11:43 2017 +0800 r8152: adjust U2P3 for RTL8153 Use another way to keep disabling the U2P3 for both RTL_VER_03 and RTL_VER_04. Move enabling U2P3 from r8153_init() to r8153_hw_phy_cfg(). The engineer ask the setting should be done after PHY settings. Disable U2P3 first in rtl8153_up(). Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) commit 02552754a7aca1756b1b229b48d2a547880ac95a Author: hayeswang Date: Fri Jun 9 17:11:42 2017 +0800 r8152: adjust rtl8153_runtime_enable function Adjust the order of rtl8153_runtime_enable() according to the suggestion from the engineer. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e31f636721ac13814250289c9f15b4f52af95e3c Author: hayeswang Date: Fri Jun 9 17:11:41 2017 +0800 r8152: move the setting of rx aggregation Move the setting from r8153_first_init() to r8153_init(). It only needs to be set once. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 134f98bcf1b898fb9d6f2b91bc85dd2e5478b4b8 Author: hayeswang Date: Fri Jun 9 17:11:40 2017 +0800 r8152: adjust the settings about MAC clock speed down for RTL8153 The MAC clock speed down could be enabled if the U1/U2 is disabled. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit ee4761c16cbbca1f0a0b522a2926c5c5b8747c5c Author: hayeswang Date: Fri Jun 9 17:11:39 2017 +0800 r8152: adjust lpm settings for RTL8153 Enable lpm after r8153_init() and remove other enable/disable lpm. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c564b871d53bced9520a3f76e01636e83a6bcd19 Author: hayeswang Date: Fri Jun 9 17:11:38 2017 +0800 r8152: add r8153_phy_status function Use r8153_phy_status() to check phy status of RTL8153. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit a2e8bbd2ef5457485f00b6b947bbbfa2778e5b1e Author: Martin KaFai Lau Date: Thu Jun 8 22:30:17 2017 -0700 bpf: Fix test_obj_id.c for llvm 5.0 llvm 5.0 does not like the section name and the function name to be the same: clang -I. -I./include/uapi -I../../../include/uapi \ -I../../../../samples/bpf/ \ -Wno-compare-distinct-pointer-types \ -O2 -target bpf -c \ linux/tools/testing/selftests/bpf/test_obj_id.c -o \ linux/tools/testing/selftests/bpf/test_obj_id.o fatal error: error in backend: 'test_prog_id' label emitted multiple times to assembly file clang-5.0: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 5.0.0 (trunk 304326) (llvm/trunk 304329) This patch makes changes to the section name and the function name. Fixes: 95b9afd3987f ("bpf: Test for bpf ID") Reported-by: Alexei Starovoitov Reported-by: Yonghong Song Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Acked-by: Yonghong Song Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_obj_id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fad07430bc03415a468d4ab28621ca71ae86c583 Author: Martin KaFai Lau Date: Thu Jun 8 22:30:16 2017 -0700 bpf: Fix test_bpf_obj_id() when the bpf_jit_enable sysctl is diabled test_bpf_obj_id() should not expect a non zero jited_prog_len to be returned by bpf_obj_get_info_by_fd() when net.core.bpf_jit_enable is 0. The patch checks for net.core.bpf_jit_enable and has different expectation on jited_prog_len. This patch also removes the pwd.h header which I forgot to remove after making changes. Fixes: 95b9afd3987f ("bpf: Test for bpf ID") Reported-by: Yonghong Song Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Acked-by: Yonghong Song Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_progs.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 97a7a37a7b7bf3dd16f6fa13cfd7ffacd01a352f Author: Chenbo Feng Date: Fri Jun 9 12:06:07 2017 -0700 ipv6: Initial skb->dev and skb->protocol in ip6_output Move the initialization of skb->dev and skb->protocol from ip6_finish_output2 to ip6_output. This can make the skb->dev and skb->protocol information avalaible to the CGROUP eBPF filter. Signed-off-by: Chenbo Feng Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5e5d8b664effe57dc459e082fc37b1aec23f184a Author: Anusha Srivatsa Date: Thu Jun 8 16:48:24 2017 -0700 drm/i915/huc: Load HuC on Coffee Lake Coffee Lake reuses Kabylake's HUC firmware. v2: Change Coffeelake to Coffee Lake Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Lukasz Fiedorowicz Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1496965704-23610-2-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/intel_huc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0f82960fa6d9134c9c56106caf9daa1ecf84c2e Author: Anusha Srivatsa Date: Thu Jun 8 16:48:23 2017 -0700 drm/i915/guc: Load GuC on Coffee Lake Coffee Lake reuses Kabylake's GuC. v2: Change Coffeelake to Coffee Lake Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Lukasz Fiedorowicz Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1496965704-23610-1-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 27f87bd2900b1a95d9c8e25deeb9768cf3fdcc4e Author: Neil Armstrong Date: Thu Jun 8 17:31:23 2017 +0200 ARM64: dts: meson-gxl-s905x-p212: Add HDMI and CVBS nodes Add HDMI and CVBS nodes for the Amlogic P212 reference board. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxl-s905x-p212.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit b43186dba1b5e2beadc5d38c40c9ef0bb5615d58 Author: Neil Armstrong Date: Thu Jun 8 17:31:22 2017 +0200 ARM64: dts: meson-gxl-s905x-khadas-vim: Add HDMI nodes Add HDMI nodes for the Khadas Vim board. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 5838a4d0a273e13054e2aa334bbfefe4fae2923d Author: Neil Armstrong Date: Thu Jun 8 17:31:21 2017 +0200 ARM64: dts: meson-gxl-s905d-p230: Add HDMI nodes Add HDMI nodes for the Amlogic P230 board. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxl-s905d-p230.dts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit ab2a49313a5cd061c5acc6dff08fb0d7446302a9 Author: Neil Armstrong Date: Thu Jun 8 17:31:20 2017 +0200 ARM64: dts: meson-gxbb-wetek-play2: Add HDMI and CVBS Nodes Add HDMI and CVBS nodes for the Wetek Play2 board. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit d29fe702c9cb682df99146d24d06e5455f043101 Author: Anusha Srivatsa Date: Thu Jun 8 16:41:07 2017 -0700 drm/i915/cfl: Add Coffee Lake PCI IDs for U Sku. Add PCI Ids for U Skus of Coffeelake. v2: Use intel_coffeelake_gt3_info, in accordance to- Rodrigo's patch: v3: rebased v3: Remove unused INTEL_CFL_IDS(Rodrigo). Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1496965267-21725-3-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + include/drm/i915_pciids.h | 7 +++++++ 2 files changed, 8 insertions(+) commit ccfd13215fd25a0e8c28221f3acc0dcaec11cd15 Author: Anusha Srivatsa Date: Thu Jun 8 16:41:06 2017 -0700 drm/i915/cfl: Add Coffee Lake PCI IDs for H Sku. Add PCI Ids for H Sku by following the BSpec. v2: Remove unused INTEL_CFL_IDS.(Rodrigo). v3: Add missing IDs(Rodrigo) Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1496965267-21725-2-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + include/drm/i915_pciids.h | 5 +++++ 2 files changed, 6 insertions(+) commit b056f8f3d6b900e8afd19f312719160346d263b4 Author: Anusha Srivatsa Date: Thu Jun 8 16:41:05 2017 -0700 drm/i915/cfl: Add Coffee Lake PCI IDs for S Skus. Add PCI Ids for S Sku following the BSpec. v2: Remove the unused INTEL_CFL_IDS.(Rodrigo) v3: Add missing IDs(Rodrigo) Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1496965267-21725-1-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + include/drm/i915_pciids.h | 8 ++++++++ 2 files changed, 9 insertions(+) commit 2c323c43a3d619d67bffa57dc7480cfae4c53300 Author: Martin Blumenstingl Date: Sun Jun 4 20:33:41 2017 +0200 ARM: dts: meson8: add and use the real clock controller This removes the dummy clk81 gate and replaces it with the actual clock controller's CLKID_CLK81. This will also allow us to pass the real clock IDs to all devices where the clock is controlled by clkc in the future. Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 2dda2de5a1e1684aa4d31d0c2db42f6446a76a86 Author: Martin Blumenstingl Date: Sun Jun 4 20:33:40 2017 +0200 arm: meson: select the clock controller for Meson8 Select COMMON_CLK_MESON8B also for MACH_MESON8 since the Meson8b clock controller driver can also be used on Meson8 SoCs now that we have a separate compatible for it. Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm/mach-meson/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 63ddf5dc9cc77963a993921995d9e390095dc3d4 Author: Sylwester Nawrocki Date: Fri Jun 9 19:09:44 2017 +0200 ASoC: samsung: Odroid DT binding documentation corrections This patch removes unused and undocumented samsung,cpu-dai, samsung,codec-dai properties from the dts example and moves sub-nodes' description to a separate section. Suggested-by: Rob Herring Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown .../devicetree/bindings/sound/samsung,odroid.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ebd259d33a900b28ef774c4c26e8ce6e2baea7e5 Author: Liam Girdwood Date: Fri Jun 9 15:43:23 2017 +0100 ASoC: topology: Allow bespoke configuration post widget creation Current topology only allows for widget configuration before the widget is registered. This patch also allows further configuration and usage after registration is complete. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown include/sound/soc-topology.h | 3 +++ sound/soc/soc-topology.c | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) commit b5f2a487f524e6eeeec38651e7b58760ebfd843e Author: Axel Lin Date: Fri Jun 9 15:01:21 2017 +0800 ASoC: ak4613: Fix out of bounds array access for ak4613_iface Signed-off-by: Axel Lin Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69beca69d68b69b38c2610b8b5fd2e27a40d441b Author: Andy Shevchenko Date: Fri Jun 9 15:06:54 2017 +0300 ASoC: omap-mcbsp: Use sysfs_match_string() helper Use sysfs_match_string() helper instead of open coded variant. Cc: Peter Ujfalusi Cc: Jarkko Nikula Cc: Mark Brown Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/omap/mcbsp.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 63c73b059cbbd96d5161ebe34c533136b4639d26 Author: Vladimir Zapolskiy Date: Fri Jun 9 12:05:16 2017 +0300 regmap: irq: allow to register one cell interrupt controllers The change makes possible to use regmap-irq interface within drivers of simple interrupt controllers, which don't have an option to handle different interrupt types and thus have one cell interrupt controllers described in device tree bindings. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d86cc04e22ead660eeb362b28119c7cb1fbd9d06 Author: Rahul Lakkireddy Date: Fri Jun 9 11:12:35 2017 +0530 cxgb4: handle interrupt raised when FW crashes Handle TIMER0INT when FW crashes. Check for PCIE_FW[FW_EVAL] and if it says "Device FW Crashed", then treat it as fatal. Else, non-fatal. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 19 ++++++++++++++++++- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 4 ++++ drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 4 ++++ 3 files changed, 26 insertions(+), 1 deletion(-) commit ad2ee015245dfe22743a25d7245b3d6abd33c02e Author: Oleksandr Andrushchenko Date: Sun May 28 23:52:23 2017 -0700 Input: xen-kbdfront - use string constants from PV protocol Xen input para-virtual protocol defines string constants used by both back and frontend. Use those instead of explicit strings in the frontend driver. Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Dmitry Torokhov drivers/input/misc/xen-kbdfront.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit d4c9354b4015aa8d1b032c368682dd20a00f4e1f Author: Arnd Bergmann Date: Fri Jun 9 09:54:09 2017 -0700 Input: stmfts - mark all PM functions as __maybe_unused We get a harmless warning when CONFIG_RUNTIME_PM is disabled: drivers/input/touchscreen/stmfts.c:760:12: error: 'stmfts_runtime_resume' defined but not used [-Werror=unused-function] static int stmfts_runtime_resume(struct device *dev) drivers/input/touchscreen/stmfts.c:748:12: error: 'stmfts_runtime_suspend' defined but not used [-Werror=unused-function] static int stmfts_runtime_suspend(struct device *dev) The regular PM functions are already marked as __maybe_unused, so let's do the same for the runtime-PM as well. Fixes: 78bcac7b2ae1 ("Input: add support for the STMicroelectronics FingerTip touchscreen") Signed-off-by: Arnd Bergmann Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/stmfts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9438d27a9b7be75dc81e7fde4b2d0292a15f981a Merge: 7fa1365 76abc0f Author: David S. Miller Date: Fri Jun 9 12:52:09 2017 -0400 Merge branch 'nfp-FW-app-build-name-reporting' Jakub Kicinski says: ==================== nfp: FW app build name reporting This series adds reporting FW build name in ethtool -i. Most of the patches are restructuring where information caching is done. There is also a minor error path fix. These are last few patches finishing the basic nfp_app support. ==================== Signed-off-by: David S. Miller commit 76abc0f620549d7fdf960bb8c99e502e9b61faae Author: Jakub Kicinski Date: Thu Jun 8 20:56:14 2017 -0700 nfp: report application FW build name in ethtool -i Make sure application FW build name is NULL-terminated and print it as a part of ethtool's firmware version string. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app.c | 8 ++++++++ drivers/net/ethernet/netronome/nfp/nfp_app.h | 1 + drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 4 ++-- drivers/net/ethernet/netronome/nfp/nfpcore/nfp_mip.c | 7 +++++++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nffw.h | 1 + 5 files changed, 19 insertions(+), 2 deletions(-) commit 0be40e66e72a544e2d4a5bca9328463ebf2c55df Author: Jakub Kicinski Date: Thu Jun 8 20:56:13 2017 -0700 nfp: keep MIP object around Microcode Information Page contains some useful information, like application firmware build name. Keep it around, similar to RTSym and HWInfo. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 5 ++++- drivers/net/ethernet/netronome/nfp/nfp_main.h | 3 +++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nffw.h | 2 ++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c | 16 +++++++++++++--- 4 files changed, 22 insertions(+), 4 deletions(-) commit 9baa48859bd31f06b9170e86afd92585ff0bbb1f Author: Jakub Kicinski Date: Thu Jun 8 20:56:12 2017 -0700 nfp: remove automatic caching of HWInfo Make callers take care of managing life time of HWInfo. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_main.c | 20 ++++--- drivers/net/ethernet/netronome/nfp/nfp_main.h | 5 +- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 12 ++-- drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 4 +- .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 3 - .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 17 ------ .../ethernet/netronome/nfp/nfpcore/nfp_hwinfo.c | 70 +++++++++------------- 8 files changed, 54 insertions(+), 79 deletions(-) commit af4fa7eac770720d5edb9337ab0bccb843936364 Author: Jakub Kicinski Date: Thu Jun 8 20:56:11 2017 -0700 nfp: remove automatic caching of RTsym table The fact that RTsym table is cached inside nfp_cpp handle is a relic of old times when nfpcore was a library module. All the nfp_cpp "caches" are awkward to deal with because of concurrency and prone to keeping stale information. Make the run time symbol table be an object read out from the device and managed by whoever requested it. Since the driver loads FW at ->probe() and never reloads, we can hold onto the table for ever. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 6 +- drivers/net/ethernet/netronome/nfp/nfp_main.h | 3 + drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 4 +- .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 4 - .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 26 ----- .../net/ethernet/netronome/nfp/nfpcore/nfp_nffw.h | 13 ++- .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 8 +- .../net/ethernet/netronome/nfp/nfpcore/nfp_rtsym.c | 111 ++++++++------------- 8 files changed, 63 insertions(+), 112 deletions(-) commit ab832b8de405c640d407b4473c6875210c326255 Author: Jakub Kicinski Date: Thu Jun 8 20:56:10 2017 -0700 nfp: make sure to cancel port refresh on the error path If very last stages of netdev registering and init fail some other netdevs and devlink ports may have been visible to user space before we torn them back down. In this case there is a slight chance user may have triggered port refresh. We need to make sure the async work is cancelled. We have to cancel after releasing pf->lock, so we will always try to cancel, regardless of which part of probe has failed. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 1 + 1 file changed, 1 insertion(+) commit 7fa136531e646b0608b08a6afa85030a57a7ff33 Author: Derek Chickles Date: Thu Jun 8 19:20:36 2017 -0700 liquidio: disallow enabling firmware debug from a VF Disallow enabling firmware debug from a VF. Only PF is allowed to do that. Signed-off-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 9 ++++++++- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 4 ---- 2 files changed, 8 insertions(+), 5 deletions(-) commit fe741e2362f33bbea813bcc3a921de356c6653db Author: Girish Moodalbail Date: Thu Jun 8 17:07:48 2017 -0700 geneve: add missing rx stats accounting There are few places on the receive path where packet drops and packet errors were not accounted for. This patch fixes that issue. Signed-off-by: Girish Moodalbail Signed-off-by: David S. Miller drivers/net/geneve.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit 4a59d433c98bcd9e1032009abbd43415405cd763 Author: Andy Shevchenko Date: Tue Jun 6 17:47:18 2017 +0300 Bluetooth: hci_intel: Add GPIO ACPI mapping table In order to make GPIO ACPI library stricter prepare users of gpiod_get_index() to correctly behave when there no mapping is provided by firmware. Here we add explicit mapping between _CRS GpioIo() resources and their names used in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_intel.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit fda7057f4b5356d40d321f339f4ac6b3f94076ec Author: Andy Shevchenko Date: Tue Jun 6 17:47:17 2017 +0300 Bluetooth: hci_bcm: Switch to devm_acpi_dev_add_driver_gpios() Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assingment if ->probe() fails. Signed-off-by: Andy Shevchenko Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f8224f7f4801733a46f332d9eb498234ff1ddac2 Author: Masahiro Yamada Date: Tue Jun 6 16:15:28 2017 +0900 kbuild: remove duplicated arch/*/include/generated/uapi include path Commit 90ac086bca10 ("Makefile: include arch/*/include/generated/uapi before .../generated") introduced this for bisect'ability. The commit chose to promote arch/*/include/generated/uapi in the search path rather than cleaning stale headers. After all, we found that approach was not enough, and ended up with cleaning stale headers by commit cda2c65f981d ("kbuild: Remove stale asm-generic wrappers"). So, the extra search path is no longer needed because Kbuild invokes scripts/Makefile.asm-generic and remove stale headers before it starts descending. This commit is also reverting commit dc33db7c338e ("Kbuild: avoid duplicate include path") because we have no more duplicated path. Signed-off-by: Masahiro Yamada Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3ad7d2468f79fc13215eb941f766a692d34b1381 Author: Krister Johansen Date: Thu Jun 8 13:12:14 2017 -0700 Ipvlan should return an error when an address is already in use. The ipvlan code already knows how to detect when a duplicate address is about to be assigned to an ipvlan device. However, that failure is not propogated outward and leads to a silent failure. Introduce a validation step at ip address creation time and allow device drivers to register to validate the incoming ip addresses. The ipvlan code is the first consumer. If it detects an address in use, we can return an error to the user before beginning to commit the new ifa in the networking code. This can be especially useful if it is necessary to provision many ipvlans in containers. The provisioning software (or operator) can use this to detect situations where an ip address is unexpectedly in use. Signed-off-by: Krister Johansen Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 69 ++++++++++++++++++++++++++++++++++++++++ include/linux/inetdevice.h | 7 ++++ include/net/addrconf.h | 10 +++++- net/ipv4/devinet.c | 33 +++++++++++++++++++ net/ipv6/addrconf.c | 17 +++++++++- net/ipv6/addrconf_core.c | 19 +++++++++++ 6 files changed, 153 insertions(+), 2 deletions(-) commit 7e026c8c0a4200da86bc51edeaad79dcdccf78ca Author: Dan Williams Date: Mon May 29 12:57:56 2017 -0700 dm: add ->copy_from_iter() dax operation support Allow device-mapper to route copy_from_iter operations to the per-target implementation. In order for the device stacking to work we need a dax_dev and a pgoff relative to that device. This gives each layer of the stack the information it needs to look up the operation pointer for the next level. This conceptually allows for an array of mixed device drivers with varying copy_from_iter implementations. Reviewed-by: Toshi Kani Reviewed-by: Mike Snitzer Signed-off-by: Dan Williams drivers/dax/super.c | 13 +++++++++++++ drivers/md/dm-linear.c | 15 +++++++++++++++ drivers/md/dm-stripe.c | 20 ++++++++++++++++++++ drivers/md/dm.c | 26 ++++++++++++++++++++++++++ include/linux/dax.h | 2 ++ include/linux/device-mapper.h | 3 +++ 6 files changed, 79 insertions(+) commit d21832e212d2613c0a0f3e5f09967cb3402c8a53 Author: Arnd Bergmann Date: Thu Jun 1 16:57:07 2017 +0200 kbuild: speed up checksyscalls.sh checksyscalls.sh is run at every "make" run while building the kernel, even if no files have changed. I looked at where we spend time in a trivial empty rebuild and found checksyscalls.sh to be a source of noticeable overhead, as it spawns a lot of child processes just to call 'cat' copying from stdin to stdout, once for each of the over 400 x86 syscalls. Using a shell-builtin (echo) instead of the external command gives us a 13x speedup: Before After real 0m1.018s real 0m0.077s user 0m0.068s user 0m0.048s sys 0m0.156s sys 0m0.024s The time it took to rebuild a single file on my machine dropped from 5.5 seconds to 4.5 seconds. Signed-off-by: Arnd Bergmann Signed-off-by: Masahiro Yamada scripts/checksyscalls.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 2b3a9afc63ab6af58417b3aaca2746dee2fbdc86 Merge: e073782 592b4fe Author: David S. Miller Date: Fri Jun 9 12:15:06 2017 -0400 Merge branch 'netvsc-small-cleanups' Stephen Hemminger says: ==================== netvsc: small cleanups These are all small optimizations found during development of later features. ==================== Signed-off-by: David S. Miller commit 592b4fe895c03315d9917bf0227a165be401ec33 Author: stephen hemminger Date: Thu Jun 8 16:21:23 2017 -0700 netvsc: fold in get_outbound_net_device No longer need common code to find get_outbound_net_device. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 9579083732ce44313545d02de4b2ca168d0a9526 Author: stephen hemminger Date: Thu Jun 8 16:21:22 2017 -0700 netvsc: pass net_device to netvsc_init_buf and netvsc_connect_vsp Don't need to find netvsc_device structure, caller already had it. Also rearrange declarations. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit 2d694d2abe83c552dca156982ff378beb3ef0f1e Author: stephen hemminger Date: Thu Jun 8 16:21:21 2017 -0700 netvsc: mark error cases as unlikely Mark if() statements used for error handling only as unlikely() Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d05b56097664e1d8b7fd690e6eac03cc6a82cc3 Author: stephen hemminger Date: Thu Jun 8 16:21:20 2017 -0700 netvsc: use typed pointer for internal state The element netvsc_device:extension is always a pointer to RNDIS information. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 40975962788ef5b796ab0f36bfd7051064c915d3 Author: stephen hemminger Date: Thu Jun 8 16:21:19 2017 -0700 netvsc: use hv_get_bytes_to_read Don't need need to look at write space in netvsc_close. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 60b86665af0dfbeebda8aae43f0ba451cd2dcfe5 Author: stephen hemminger Date: Thu Jun 8 16:21:18 2017 -0700 netvsc: optimize calculation of number of slots Speed up transmit check for fragmented packets by using existing macros to compute number of pages, and eliminate loop since skb fragments each take a page. Number of slots is also unsigned. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 43 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 33 deletions(-) commit e073782a41bf6018d8db16fd54155384b7e6da65 Merge: fff8803 bec90b6 Author: David S. Miller Date: Fri Jun 9 12:11:00 2017 -0400 Merge branch 'dsa-mv88e6xxx-ops-cosmetics' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: ops cosmetics This patchset brings no functional changes. It is a first step in a bigger cosmetics change to the driver. It simplifies print messages and polishes data types and chip operations. The next patchs will only prefix and document the port registers macros. Changes in v2: - KISS and simply use dev_* since chip->ds may not be initialized - add reviewers tags ==================== Signed-off-by: David S. Miller commit bec90b6d96776a679965efe45778e28ff38c49b0 Author: Vivien Didelot Date: Thu Jun 8 18:34:14 2017 -0400 net: dsa: mv88e6xxx: prefix PHY macros Prefix the PHY_* macros with a Marvell specific MV88E6XXX_ prefix. There is no functional changes. Reviewed-by: Andrew Lunn Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/phy.c | 11 ++++++----- drivers/net/dsa/mv88e6xxx/phy.h | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) commit cd782656da9037150502a16bbbc46272e00f9b1b Author: Vivien Didelot Date: Thu Jun 8 18:34:13 2017 -0400 net: dsa: mv88e6xxx: rework jumbo size operation Marvell chips have a Jumbo Mode to set the maximum frame size (MTU). The mv88e6xxx_ops structure is meant to contain generic functionalities, no driver logic. Change port_jumbo_config to port_set_jumbo_size setting the mode from a given maximum size value. There is no functional changes since we still use 10240 bytes. At the same time, correctly clear all Jumbo Mode bits before writing. Reviewed-by: Andrew Lunn Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 38 +++++++++++++++++++------------------- drivers/net/dsa/mv88e6xxx/chip.h | 3 ++- drivers/net/dsa/mv88e6xxx/port.c | 14 ++++++++++++-- drivers/net/dsa/mv88e6xxx/port.h | 4 +++- 4 files changed, 36 insertions(+), 23 deletions(-) commit 0898432cc296cc27cee6647f6748f2add37e09b6 Author: Vivien Didelot Date: Thu Jun 8 18:34:12 2017 -0400 net: dsa: mv88e6xxx: rework pause limit operation All Marvell chips supporting Pause frames limiting use 1-byte value for input and output. Old chips have both bytes adjacent in a 16-bit register. New ones have an indirect table using 8-bit data. The mv88e6xxx library functions (such as in port.c) must not contain driver logic, but only generic helpers. This patch changes the port_pause_config operation for port_pause_limit taking two u8 arguments for input and output limits. There is no functional changes. Reviewed-by: Andrew Lunn Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 48 ++++++++++++++++++++-------------------- drivers/net/dsa/mv88e6xxx/chip.h | 3 ++- drivers/net/dsa/mv88e6xxx/port.c | 12 +++++----- drivers/net/dsa/mv88e6xxx/port.h | 6 +++-- 4 files changed, 37 insertions(+), 32 deletions(-) commit fa8d117960809879f949fb9768d78e0518c4964e Author: Vivien Didelot Date: Thu Jun 8 18:34:11 2017 -0400 net: dsa: mv88e6xxx: do not prefix ops with g1 The mv88e6xxx_ops describe functionalities, regardless their locations (which can be Global1, Global2, or whatever register set.) Rename the g1_set_cpu_port and g1_set_egress_port ops to set_cpu_port and set_egress_port. No functional changes. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 108 +++++++++++++++++++-------------------- drivers/net/dsa/mv88e6xxx/chip.h | 4 +- 2 files changed, 56 insertions(+), 56 deletions(-) commit f894c29c3561bb9e1da7441146f1db585aae8e97 Author: Vivien Didelot Date: Thu Jun 8 18:34:10 2017 -0400 net: dsa: mv88e6xxx: use bridge state values Reuse the BR_STATE_* values to abstract a port STP state value. This provides shorter names and better control over the DSA switch operation call. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 23 ++--------------------- drivers/net/dsa/mv88e6xxx/port.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 21 deletions(-) commit 31bef4e90cf761eaa16298461bcb4c101044baea Author: Vivien Didelot Date: Thu Jun 8 18:34:09 2017 -0400 net: dsa: mv88e6xxx: add egress mode enumeration As for the frame mode, add a mv88e6xxx_egress_mode enumeration instead of a 16-bit register mask. Reviewed-by: Andrew Lunn Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 11 ++++++----- drivers/net/dsa/mv88e6xxx/chip.h | 7 +++++++ drivers/net/dsa/mv88e6xxx/port.c | 20 ++++++++++++++++++-- drivers/net/dsa/mv88e6xxx/port.h | 2 +- 4 files changed, 32 insertions(+), 8 deletions(-) commit 774439e532bfe9dba83a5f499fcdfd8eea961919 Author: Vivien Didelot Date: Thu Jun 8 18:34:08 2017 -0400 net: dsa: mv888e6xxx: do not use netdev printing The mv888e6xxx driver accesses a port's netdev mostly for printing. This is bad for 2 reasons: DSA and CPU ports do not have a netdev pointer; it doesn't give us a correct picture of why a DSA driver might need to access a port's netdev. Instead simply use dev_* printing functions with chip->dev (or ds->dev depending on the scope, both guaranteed to exist), with a p%d prefix for the target port. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 31 +++++++++++++++---------------- drivers/net/dsa/mv88e6xxx/port.c | 39 ++++++++++++++++++--------------------- 2 files changed, 33 insertions(+), 37 deletions(-) commit 73f9de0c7f5dd9eae6949135a7b316cb02365519 Author: Javier Martinez Canillas Date: Tue May 23 15:34:40 2017 +0200 ARM: dts: uniphier: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pro4-ace.dts | 2 +- arch/arm/boot/dts/uniphier-pro4-sanji.dts | 2 +- arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 0aed55af88345b5d673240f90e671d79662fb01e Author: Dan Williams Date: Mon May 29 12:22:50 2017 -0700 x86, uaccess: introduce copy_from_iter_flushcache for pmem / cache-bypass operations The pmem driver has a need to transfer data with a persistent memory destination and be able to rely on the fact that the destination writes are not cached. It is sufficient for the writes to be flushed to a cpu-store-buffer (non-temporal / "movnt" in x86 terms), as we expect userspace to call fsync() to ensure data-writes have reached a power-fail-safe zone in the platform. The fsync() triggers a REQ_FUA or REQ_FLUSH to the pmem driver which will turn around and fence previous writes with an "sfence". Implement a __copy_from_user_inatomic_flushcache, memcpy_page_flushcache, and memcpy_flushcache, that guarantee that the destination buffer is not dirty in the cpu cache on completion. The new copy_from_iter_flushcache and sub-routines will be used to replace the "pmem api" (include/linux/pmem.h + arch/x86/include/asm/pmem.h). The availability of copy_from_iter_flushcache() and memcpy_flushcache() are gated by the CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE config symbol, and fallback to copy_from_iter_nocache() and plain memcpy() otherwise. This is meant to satisfy the concern from Linus that if a driver wants to do something beyond the normal nocache semantics it should be something private to that driver [1], and Al's concern that anything uaccess related belongs with the rest of the uaccess code [2]. The first consumer of this interface is a new 'copy_from_iter' dax operation so that pmem can inject cache maintenance operations without imposing this overhead on other dax-capable drivers. [1]: https://lists.01.org/pipermail/linux-nvdimm/2017-January/008364.html [2]: https://lists.01.org/pipermail/linux-nvdimm/2017-April/009942.html Cc: Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: Toshi Kani Cc: "H. Peter Anvin" Cc: Al Viro Cc: Thomas Gleixner Cc: Matthew Wilcox Reviewed-by: Ross Zwisler Signed-off-by: Dan Williams arch/x86/Kconfig | 1 + arch/x86/include/asm/string_64.h | 5 ++ arch/x86/include/asm/uaccess_64.h | 11 ++++ arch/x86/lib/usercopy_64.c | 128 ++++++++++++++++++++++++++++++++++++++ drivers/acpi/nfit/core.c | 3 +- drivers/nvdimm/claim.c | 2 +- drivers/nvdimm/pmem.c | 13 +++- drivers/nvdimm/region_devs.c | 4 +- include/linux/dax.h | 3 + include/linux/string.h | 6 ++ include/linux/uio.h | 15 +++++ lib/Kconfig | 3 + lib/iov_iter.c | 22 +++++++ 13 files changed, 209 insertions(+), 7 deletions(-) commit d0c55cdf4fc02483a4851f86e3f010a061d8c9cc Author: Alex Deucher Date: Fri Jun 9 08:22:31 2017 -0400 drm/amdgpu/gfx: fix MEC interrupt enablement for pipes != 0 The interrupt registers are not indexed. Fixes: 763a47b8e (drm/amdgpu: teach amdgpu how to enable interrupts for any pipe v3) Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 57 +++++++++++++++++++++++---------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 57 +++++++++++++++++++++++---------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 59 +++++++++++++++++++++++++---------- 3 files changed, 124 insertions(+), 49 deletions(-) commit f06fed92dcf27d83ad546c9a510165d1bd54fc3f Author: Rex Zhu Date: Thu Jun 8 15:45:04 2017 +0800 drm/amd/powerplay: fix copy error in powerplay. v2: fix typos. should disable led dpm feature when stop dpm. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0fa4955838ea1ecde268456676540dd2e84dce26 Author: Alex Xie Date: Thu Jun 8 14:58:05 2017 -0400 drm/amdgpu: move comment to the right place Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb0f0373e575822cf35949627b92533c7c41629c Author: Alex Xie Date: Thu Jun 8 14:53:26 2017 -0400 drm/amdgpu: fix a typo in comment Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7dba6483d367f95a996c2ff12bb303898065ffa Author: Alex Xie Date: Thu Jun 8 14:21:28 2017 -0400 drm/amdgpu: remove duplicate function prototypes There are two identical function prototypes in same header file Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - 1 file changed, 1 deletion(-) commit b4d42511b7f2269f4cca3c02cd6e4c58099f9108 Author: Harish Kasiviswanathan Date: Thu May 11 19:47:22 2017 -0400 drm/amdgpu: Support page table update via CPU v2: Fix logical mistake. If CPU update failed amdgpu_vm_bo_update_mapping() would not return and instead fall through to SDMA update. Minor change due to amdgpu_vm_bo_wait() prototype change Signed-off-by: Harish Kasiviswanathan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 88 +++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) commit 3c8241722bc4f5879db42d3acd7fa840c8e608e7 Author: Harish Kasiviswanathan Date: Thu May 11 15:50:08 2017 -0400 drm/amdgpu: Support page directory update via CPU If amdgpu.vm_update_context param is set to use CPU, then Page Directories will be updated by CPU instead of SDMA v2: Call amdgpu_vm_bo_wait before updating the page tables to ensure the PD/PT BOs are free v3: Minor changes - due to amdgpu_vm_bo_wait() prototype change, local variable declaration order and function comments. Signed-off-by: Harish Kasiviswanathan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 161 ++++++++++++++++++++++++--------- 1 file changed, 119 insertions(+), 42 deletions(-) commit a6583af4ae1c4afa755d8d4a4e7768dd36176395 Author: Harish Kasiviswanathan Date: Mon May 15 15:09:15 2017 -0400 drm/amdgpu: Add amdgpu_sync_wait v2: Add intr option Helper function useful for CPU update of VM page tables. Also useful if kernel have to synchronously wait till VM page tables are updated. Signed-off-by: Harish Kasiviswanathan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 19 +++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | 1 + 2 files changed, 20 insertions(+) commit 9a4b7d4c769e7513dec8f441de1f521ec4ead4b6 Author: Harish Kasiviswanathan Date: Fri Jun 9 11:26:57 2017 -0400 drm/amdgpu: Add vm context module param Add VM update mode module param (amdgpu.vm_update_mode) that can used to control how VM pde/pte are updated for Graphics and Compute. BIT0 controls Graphics and BIT1 Compute. BIT0 [= 0] Graphics updated by SDMA [= 1] by CPU BIT1 [= 0] Compute updated by SDMA [= 1] by CPU By default, only for large BAR system vm_update_mode = 2, indicating that Graphics VMs will be updated via SDMA and Compute VMs will be updated via CPU. And for all all other systems (by default) vm_update_mode = 0 Signed-off-by: Harish Kasiviswanathan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 36 ++++++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 20 +++++++++++++++++- 5 files changed, 61 insertions(+), 3 deletions(-) commit 22ec656bcc3f38207ad5476ebad1e5005fb0f1ff Author: Mike Snitzer Date: Fri Jun 9 11:02:40 2017 -0400 dm: bump DM_VERSION_MINOR in response to target method error code changes Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe include/uapi/linux/dm-ioctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4e4cbee93d56137ebff722be022cae5f70ef84fb Author: Christoph Hellwig Date: Sat Jun 3 09:38:06 2017 +0200 block: switch bios to blk_status_t Replace bi_error with a new bi_status to allow for a clear conversion. Note that device mapper overloaded bi_error with a private value, which we'll have to keep arround at least for now and thus propagate to a proper blk_status_t value. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio-integrity.c | 8 ++-- block/bio.c | 8 ++-- block/blk-core.c | 20 ++++++---- block/blk-integrity.c | 4 +- block/bounce.c | 4 +- block/t10-pi.c | 30 +++++++-------- drivers/block/aoe/aoecmd.c | 10 ++--- drivers/block/aoe/aoedev.c | 2 +- drivers/block/drbd/drbd_actlog.c | 2 +- drivers/block/drbd/drbd_bitmap.c | 6 +-- drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_receiver.c | 6 +-- drivers/block/drbd/drbd_req.c | 6 +-- drivers/block/drbd/drbd_worker.c | 16 ++++---- drivers/block/floppy.c | 4 +- drivers/block/pktcdvd.c | 18 ++++----- drivers/block/ps3vram.c | 14 +++---- drivers/block/rsxx/dev.c | 14 +++---- drivers/block/rsxx/dma.c | 13 +++---- drivers/block/rsxx/rsxx_priv.h | 2 +- drivers/block/umem.c | 2 +- drivers/block/xen-blkback/blkback.c | 19 ++++------ drivers/block/xen-blkfront.c | 2 +- drivers/lightnvm/pblk-core.c | 4 +- drivers/lightnvm/pblk-read.c | 4 +- drivers/lightnvm/pblk-write.c | 2 +- drivers/lightnvm/rrpc.c | 8 ++-- drivers/md/bcache/bcache.h | 7 ++-- drivers/md/bcache/btree.c | 6 +-- drivers/md/bcache/io.c | 6 +-- drivers/md/bcache/journal.c | 2 +- drivers/md/bcache/movinggc.c | 10 ++--- drivers/md/bcache/request.c | 28 +++++++------- drivers/md/bcache/request.h | 2 +- drivers/md/bcache/super.c | 6 +-- drivers/md/bcache/writeback.c | 4 +- drivers/md/dm-bio-prison-v1.c | 4 +- drivers/md/dm-bio-prison-v1.h | 2 +- drivers/md/dm-bufio.c | 28 +++++++------- drivers/md/dm-cache-target.c | 34 +++++++++-------- drivers/md/dm-crypt.c | 34 ++++++++--------- drivers/md/dm-flakey.c | 5 ++- drivers/md/dm-integrity.c | 18 ++++----- drivers/md/dm-io.c | 10 ++--- drivers/md/dm-log-writes.c | 7 ++-- drivers/md/dm-mpath.c | 15 ++++---- drivers/md/dm-raid1.c | 13 ++++--- drivers/md/dm-rq.c | 2 +- drivers/md/dm-snap.c | 5 ++- drivers/md/dm-stripe.c | 5 ++- drivers/md/dm-thin.c | 65 ++++++++++++++++---------------- drivers/md/dm-verity-target.c | 10 ++--- drivers/md/dm.c | 40 ++++++++++---------- drivers/md/md.c | 8 ++-- drivers/md/multipath.c | 10 ++--- drivers/md/raid1.c | 36 +++++++++--------- drivers/md/raid10.c | 36 +++++++++--------- drivers/md/raid5-cache.c | 4 +- drivers/md/raid5-ppl.c | 2 +- drivers/md/raid5.c | 22 +++++------ drivers/nvdimm/blk.c | 4 +- drivers/nvdimm/btt.c | 4 +- drivers/nvdimm/pmem.c | 28 +++++++------- drivers/nvme/target/io-cmd.c | 4 +- drivers/target/target_core_iblock.c | 10 ++--- fs/block_dev.c | 18 +++++---- fs/btrfs/btrfs_inode.h | 3 +- fs/btrfs/check-integrity.c | 4 +- fs/btrfs/compression.c | 44 +++++++++++----------- fs/btrfs/compression.h | 4 +- fs/btrfs/ctree.h | 6 +-- fs/btrfs/disk-io.c | 75 ++++++++++++++++++------------------- fs/btrfs/disk-io.h | 12 +++--- fs/btrfs/extent_io.c | 23 +++++++----- fs/btrfs/extent_io.h | 6 +-- fs/btrfs/file-item.c | 14 +++---- fs/btrfs/inode.c | 73 ++++++++++++++++++------------------ fs/btrfs/raid56.c | 16 ++++---- fs/btrfs/scrub.c | 26 ++++++------- fs/btrfs/volumes.c | 11 +++--- fs/buffer.c | 2 +- fs/crypto/bio.c | 2 +- fs/direct-io.c | 8 ++-- fs/ext4/page-io.c | 13 ++++--- fs/ext4/readpage.c | 4 +- fs/f2fs/data.c | 10 ++--- fs/f2fs/segment.c | 2 +- fs/gfs2/lops.c | 8 ++-- fs/gfs2/meta_io.c | 2 +- fs/gfs2/ops_fstype.c | 4 +- fs/iomap.c | 4 +- fs/jfs/jfs_logmgr.c | 2 +- fs/jfs/jfs_metapage.c | 4 +- fs/mpage.c | 3 +- fs/nfs/blocklayout/blocklayout.c | 4 +- fs/nilfs2/segbuf.c | 2 +- fs/ocfs2/cluster/heartbeat.c | 6 +-- fs/xfs/xfs_aops.c | 7 ++-- fs/xfs/xfs_buf.c | 7 +++- include/linux/bio.h | 2 +- include/linux/blk_types.h | 5 ++- include/linux/blkdev.h | 2 +- include/linux/device-mapper.h | 2 +- kernel/power/swap.c | 14 +++---- kernel/trace/blktrace.c | 4 +- mm/page_io.c | 4 +- 106 files changed, 625 insertions(+), 603 deletions(-) commit fc17b6534eb8395f0b3133eb31d87deec32c642b Author: Christoph Hellwig Date: Sat Jun 3 09:38:05 2017 +0200 blk-mq: switch ->queue_rq return value to blk_status_t Use the same values for use for request completion errors as the return value from ->queue_rq. BLK_STS_RESOURCE is special cased to cause a requeue, and all the others are completed as-is. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 37 ++++++++++++++++------------------ drivers/block/loop.c | 6 +++--- drivers/block/mtip32xx/mtip32xx.c | 17 ++++++++-------- drivers/block/nbd.c | 12 ++++------- drivers/block/null_blk.c | 4 ++-- drivers/block/rbd.c | 4 ++-- drivers/block/virtio_blk.c | 10 +++++----- drivers/block/xen-blkfront.c | 8 ++++---- drivers/md/dm-rq.c | 8 ++++---- drivers/mtd/ubi/block.c | 6 +++--- drivers/nvme/host/core.c | 14 ++++++------- drivers/nvme/host/fc.c | 23 +++++++++++---------- drivers/nvme/host/nvme.h | 2 +- drivers/nvme/host/pci.c | 42 +++++++++++++++++++-------------------- drivers/nvme/host/rdma.c | 26 +++++++++++++----------- drivers/nvme/target/loop.c | 17 ++++++++-------- drivers/scsi/scsi_lib.c | 30 ++++++++++++++-------------- include/linux/blk-mq.h | 7 ++----- 18 files changed, 131 insertions(+), 142 deletions(-) commit 2a842acab109f40f0d7d10b38e9ca88390628996 Author: Christoph Hellwig Date: Sat Jun 3 09:38:04 2017 +0200 block: introduce new block status code type Currently we use nornal Linux errno values in the block layer, and while we accept any error a few have overloaded magic meanings. This patch instead introduces a new blk_status_t value that holds block layer specific status codes and explicitly explains their meaning. Helpers to convert from and to the previous special meanings are provided for now, but I suspect we want to get rid of them in the long run - those drivers that have a errno input (e.g. networking) usually get errnos that don't know about the special block layer overloads, and similarly returning them to userspace will usually return somethings that strictly speaking isn't correct for file system operations, but that's left as an exercise for later. For now the set of errors is a very limited set that closely corresponds to the previous overloaded errno values, but there is some low hanging fruite to improve it. blk_status_t (ab)uses the sparse __bitwise annotations to allow for sparse typechecking, so that we can easily catch places passing the wrong values. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe arch/s390/include/asm/eadm.h | 6 +- arch/um/drivers/ubd_kern.c | 2 +- block/blk-core.c | 156 +++++++++++++++++++++--------------- block/blk-exec.c | 4 +- block/blk-flush.c | 8 +- block/blk-mq.c | 8 +- block/bsg-lib.c | 4 +- block/bsg.c | 6 +- drivers/block/DAC960.c | 2 +- drivers/block/amiflop.c | 10 +-- drivers/block/aoe/aoecmd.c | 2 +- drivers/block/ataflop.c | 16 ++-- drivers/block/cciss.c | 3 +- drivers/block/floppy.c | 4 +- drivers/block/loop.c | 2 +- drivers/block/mtip32xx/mtip32xx.c | 16 ++-- drivers/block/mtip32xx/mtip32xx.h | 2 +- drivers/block/nbd.c | 14 ++-- drivers/block/null_blk.c | 9 ++- drivers/block/paride/pcd.c | 8 +- drivers/block/paride/pd.c | 2 +- drivers/block/paride/pf.c | 18 ++--- drivers/block/ps3disk.c | 11 +-- drivers/block/rbd.c | 8 +- drivers/block/skd_main.c | 31 ++++--- drivers/block/sunvdc.c | 4 +- drivers/block/swim.c | 6 +- drivers/block/swim3.c | 26 +++--- drivers/block/sx8.c | 20 ++--- drivers/block/virtio_blk.c | 10 +-- drivers/block/xen-blkfront.c | 16 ++-- drivers/block/xsysace.c | 8 +- drivers/block/z2ram.c | 4 +- drivers/cdrom/gdrom.c | 9 ++- drivers/ide/ide-atapi.c | 9 ++- drivers/ide/ide-cd.c | 10 +-- drivers/ide/ide-dma.c | 2 +- drivers/ide/ide-eh.c | 16 ++-- drivers/ide/ide-floppy.c | 6 +- drivers/ide/ide-io.c | 10 +-- drivers/ide/ide-pm.c | 6 +- drivers/ide/ide-tape.c | 2 +- drivers/ide/ide-taskfile.c | 6 +- drivers/ide/siimage.c | 6 +- drivers/md/dm-mpath.c | 27 +++---- drivers/md/dm-rq.c | 20 ++--- drivers/md/dm-rq.h | 2 +- drivers/memstick/core/ms_block.c | 7 +- drivers/memstick/core/mspro_block.c | 8 +- drivers/mmc/core/block.c | 37 +++++---- drivers/mmc/core/queue.c | 2 +- drivers/mtd/mtd_blkdevs.c | 30 ++++--- drivers/mtd/ubi/block.c | 2 +- drivers/nvme/host/core.c | 29 +++---- drivers/nvme/host/lightnvm.c | 2 +- drivers/nvme/host/pci.c | 8 +- drivers/s390/block/dasd.c | 36 +++++---- drivers/s390/block/scm_blk.c | 8 +- drivers/s390/block/scm_blk.h | 4 +- drivers/s390/cio/eadm_sch.c | 6 +- drivers/s390/cio/scm.c | 2 +- drivers/sbus/char/jsflash.c | 4 +- drivers/scsi/osd/osd_initiator.c | 20 ++--- drivers/scsi/osst.c | 2 +- drivers/scsi/scsi_error.c | 2 +- drivers/scsi/scsi_lib.c | 51 ++++-------- drivers/scsi/scsi_transport_sas.c | 2 +- drivers/scsi/sg.c | 6 +- drivers/scsi/st.c | 2 +- drivers/target/target_core_pscsi.c | 4 +- include/linux/blk-mq.h | 4 +- include/linux/blk_types.h | 16 ++++ include/linux/blkdev.h | 21 ++--- include/linux/device-mapper.h | 2 +- include/linux/ide.h | 6 +- include/scsi/osd_initiator.h | 2 +- 76 files changed, 474 insertions(+), 428 deletions(-) commit 1be5690984588953e759af0a4c6ddac182a1806c Author: Christoph Hellwig Date: Sat Jun 3 09:38:03 2017 +0200 dm: change ->end_io calling convention Turn the error paramter into a pointer so that target drivers can change the value, and make sure only DM_ENDIO_* values are returned from the methods. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe drivers/md/dm-cache-target.c | 4 ++-- drivers/md/dm-flakey.c | 8 ++++---- drivers/md/dm-log-writes.c | 4 ++-- drivers/md/dm-mpath.c | 11 ++++++----- drivers/md/dm-raid1.c | 14 +++++++------- drivers/md/dm-snap.c | 4 ++-- drivers/md/dm-stripe.c | 14 +++++++------- drivers/md/dm-thin.c | 4 ++-- drivers/md/dm.c | 36 ++++++++++++++++++------------------ include/linux/device-mapper.h | 2 +- 10 files changed, 51 insertions(+), 50 deletions(-) commit 846785e6a5725de4f0788e78e101961566a77d2a Author: Christoph Hellwig Date: Sat Jun 3 09:38:02 2017 +0200 dm: don't return errnos from ->map Instead use the special DM_MAPIO_KILL return value to return -EIO just like we do for the request based path. Note that dm-log-writes returned -ENOMEM in a few places, which now becomes -EIO instead. No consumer treats -ENOMEM special so this shouldn't be an issue (and it should use a mempool to start with to make guaranteed progress). Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe drivers/md/dm-crypt.c | 4 ++-- drivers/md/dm-flakey.c | 4 ++-- drivers/md/dm-integrity.c | 12 ++++++------ drivers/md/dm-log-writes.c | 4 ++-- drivers/md/dm-mpath.c | 13 ++++++++++--- drivers/md/dm-raid1.c | 6 +++--- drivers/md/dm-snap.c | 8 ++++---- drivers/md/dm-target.c | 2 +- drivers/md/dm-verity-target.c | 6 +++--- drivers/md/dm-zero.c | 4 ++-- drivers/md/dm.c | 16 +++++++++++----- 11 files changed, 46 insertions(+), 33 deletions(-) commit 14ef1e48269dde9b78efe4b112fa78e9ced72bc1 Author: Christoph Hellwig Date: Sat Jun 3 09:38:01 2017 +0200 dm mpath: merge do_end_io_bio into multipath_end_io_bio This simplifies the code and especially the error passing a bit and will help with the next patch. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe drivers/md/dm-mpath.c | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) commit 36ffc6c1c0e67acdacb53348350d0a37206dbadf Author: Christoph Hellwig Date: Sat Jun 3 09:38:00 2017 +0200 block_dev: propagate bio_iov_iter_get_pages error in __blkdev_direct_IO Once we move the block layer to its own status code we'll still want to propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO to take ret into account when returning the errno. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/block_dev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d5245d7674d3f026a3178657936759d572d2d5d8 Author: Christoph Hellwig Date: Sat Jun 3 09:37:59 2017 +0200 fs: simplify dio_bio_complete Only read bio->bi_error once in the common path. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe fs/direct-io.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4055351cdbb44e8646ff67b346c80097e1d2c04c Author: Christoph Hellwig Date: Sat Jun 3 09:37:58 2017 +0200 fs: remove the unused error argument to dio_end_io() Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe fs/btrfs/inode.c | 6 +++--- fs/direct-io.c | 3 +-- include/linux/fs.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) commit 9966afaf91b37e8c3d106379eeae0afa91c68aa8 Author: Christoph Hellwig Date: Sat Jun 3 09:37:57 2017 +0200 dm: fix REQ_RAHEAD handling A few (but not all) dm targets use a special EWOULDBLOCK error code for failing REQ_RAHEAD requests that fail due to a lack of available resources. But no one else knows about this magic code, and lower level drivers also don't generate it when failing read-ahead requests for similar reasons. So remove this special casing and ignore all additional error handling for REQ_RAHEAD - if this was a real underlying error we'd get a normal read once the real read comes in. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe drivers/md/dm-raid1.c | 4 ++-- drivers/md/dm-stripe.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f729b66fca43d850d564b264c2033980c00a14b0 Author: Christoph Hellwig Date: Sat Jun 3 09:37:56 2017 +0200 gfs2: remove the unused sd_log_error field Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe fs/gfs2/incore.h | 1 - fs/gfs2/lops.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) commit 10f64ec5dded10f680f891e92fb4c65f4b7147a2 Author: Christoph Hellwig Date: Sat Jun 3 09:37:55 2017 +0200 scsi/osd: don't save block errors into req_results We will only have sense data if the command executed and got a SCSI result, so this is pointless. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/scsi/osd/osd_initiator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 401741547f95c0883fe143ac446d92c772937556 Author: Christoph Hellwig Date: Sat Jun 3 09:37:54 2017 +0200 nvme-lightnvm: use blk_execute_rq in nvme_nvm_submit_user_cmd Instead of reinventing it poorly. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Javier González Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit eb3b705aaed9cab7efef8c905eda919b5fd902b9 Author: Takashi Iwai Date: Fri Jun 9 13:56:05 2017 +0200 ALSA: Make CONFIG_SND_OSSEMUL user-selectable Currently CONFIG_SND_OSSEMUL is selected by each config like CONFIG_SND_PCM_OSS. But, as see in the raw MIDI code that is built conditionally with CONFIG_SND_OSSEMUL, we should rather make CONFIG_SND_OSSEMUL user-selectable as the top kconfig item, and leave the rest depending on it. Signed-off-by: Takashi Iwai sound/core/Kconfig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 437074645873d77e8958be4f7eeec66a69cf0077 Author: Patrice Chotard Date: Wed Jun 7 09:16:00 2017 +0200 ARM: dts: stm32: Add stm32h743i-disco board Add basic support for stm32h743i-discovery board This board offers : _ 2MBytes Flash _ 1 x micro USB OTG port _ 1 x STLink connector (micro USB) _ 1 x micro SD card slot _ 1 x RJ45 connector _ 1 x RCA connector _ 2 x Audio jack connectors (in and out) _ 2 x speaker connectors (left and right) _ 1 x joystick _ 1 x DCMI connector (Digital camera interface) _ 1 x 4 inch DSI LCD (Display Serial Interface) _ Arduino Uno Connectors _ 2 x PIO connectors (PMOD and PMOD+) _ 1 x wakeup button _ 1 x reset button Signed-off-by: Patrice Chotard Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/stm32h743i-disco.dts | 73 ++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) commit a56678cd570405624a031f0c400305763ed308f2 Author: Patrice Chotard Date: Wed Jun 7 09:16:00 2017 +0200 ARM: dts: stm32: Add usart2 support on stm32h743 This usart is used for console output on stm32h743i-disco board Signed-off-by: Patrice Chotard Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32h743.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 13b23780cc514c28582edec1736b381465f08085 Author: Patrice Chotard Date: Wed Jun 7 09:16:00 2017 +0200 ARM: dts: stm32: Add usart2_pins on stm32h743 Add usart2 pins definition in order to add usart2 support dedicated for console output on stm32h743i-disco board. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32h743-pinctrl.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 87085ff2e90ecfa91f8bb0cb0ce19ea661bd6f83 Author: Christoph Hellwig Date: Fri Jun 9 16:36:50 2017 +0200 thermal: int340x_thermal: fix compile after the UUID API switch Fix the compile after the switch to the UUID API in commit f4c19ac9 ("thermal: int340x_thermal: Switch to use new generic UUID API"). Signed-off-by: Christoph Hellwig drivers/thermal/int340x_thermal/int3400_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc88e34d69d87c370deaa9d613dac8e3a0411f59 Author: Josef Bacik Date: Thu Jun 8 15:39:30 2017 -0400 nbd: set sk->sk_sndtimeo for our sockets If the nbd server stops receiving packets altogether we will get stuck waiting for them to receive indefinitely as the tcp buffer will never empty, which looks like a deadlock. Fix this by setting the sk send timeout to our configured timeout, that way if the server really misbehaves we'll disconnect cleanly instead of waiting forever. Reported-by: Dan Melnic Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 2 ++ 1 file changed, 2 insertions(+) commit 6baca010c71176f406299ea1949e721ab995ff01 Author: Takashi Sakamoto Date: Fri Jun 9 21:46:50 2017 +0900 ALSA: pcm: use friendly name for id of PCM substream in trace print Use the same print format of snd_pcm_debug_name() for userspace tracing program. Suggested-by: Takashi Iwai Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_param_trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7b8a54aff30e96b980aa65b0b2e4ebdffcd57196 Author: Takashi Sakamoto Date: Fri Jun 9 21:46:49 2017 +0900 ALSA: pcm: add tracepoints for final selection process of hardware parameters Results of ioctl(2) with SNDRV_PCM_IOCTL_HW_REFINE and SNDRV_PCM_IOCTL_HW_PARAMS are different, because the latter has single value for several parameters; e.g. channels of PCM substream. Selection of the single value is done independently of application of constraints. It's helpful for developers to trace the selection process. This commit adds tracepoints to snd_pcm_hw_params_choose() for the purpose. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 60f96aaecb19ca294addfff0d2d0335293f3c379 Author: Takashi Sakamoto Date: Fri Jun 9 21:46:48 2017 +0900 ALSA: pcm: localize snd_pcm_hw_params_choose() As of v4.12, snd_pcm_hw_params_choose() is just called in a process context of ioctl(2) with SNDRV_PCM_IOCTL_HW_PARAMS. The function locates in a different file, which has no tracepoints. This commit moves the function to a file with the tracepoints for later commit. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 40 ---------------------------------------- sound/core/pcm_local.h | 3 --- sound/core/pcm_native.c | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 43 deletions(-) commit b040ad9cf6a169cc000a5324fcada695dfa1f4b3 Author: Arnd Bergmann Date: Fri Jun 9 12:19:18 2017 +0200 loop: fix error handling regression gcc points out an unusual indentation: drivers/block/loop.c: In function 'loop_set_status': drivers/block/loop.c:1149:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation] if (figure_loop_size(lo, info->lo_offset, info->lo_sizelimit, ^~ drivers/block/loop.c:1152:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' goto exit; This was introduced by a new feature that accidentally moved the opening braces from one condition to another. Adding a second pair of braces makes it work correctly again and also more readable. Fixes: f2c6df7dbf9a ("loop: support 4k physical blocksize") Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe drivers/block/loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 75ae84a4fe94133df9293540ad0d2d5c3697edcb Author: Simon Wunderlich Date: Thu Jun 1 17:11:26 2017 +0200 batman-adv: simplify return handling in some TT functions Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann net/batman-adv/translation-table.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 1227c9ae018b1d537349380cef8f6bbbf24082a6 Author: Simon Wunderlich Date: Thu Jun 1 17:11:24 2017 +0200 batman-adv: do not add loop detection mac addresses to global tt This change has been made for local TT already, add another one for global TT - but only for temporary entries (aka speedy join), to prevent inconsistencies between local and global tables in case an older batman-adv version is still announcing those entries from its local table. Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann net/batman-adv/translation-table.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d1aa51422013e16efb91672a32597a1d331470b2 Author: Antonio Quartulli Date: Wed Jun 7 22:51:22 2017 +0800 batman-adv: tp_meter: mark init function with __init batadv_tp_meter_init() is invoked in batadv_init() only which is marked with __init. For this reason batadv_tp_meter_init() can be marked with __init as well and dropped after module load. Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/tp_meter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f4c19ac9c24c5c5dcab4e961e4d7f8f5709c650e Author: Andy Shevchenko Date: Fri Jun 9 11:33:06 2017 +0300 thermal: int340x_thermal: Switch to use new generic UUID API There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. The conversion fixes a potential bug in int340x_thermal as well since we have to use memcmp() on binary data. Acked-by: Zhang Rui Signed-off-by: Andy Shevchenko Signed-off-by: Christoph Hellwig drivers/thermal/int340x_thermal/int3400_thermal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e53cfe6c7caa79ccdccce53e600dae522acb1c84 Author: John Johansen Date: Fri May 26 15:07:22 2017 -0700 apparmor: rework perm mapping to a slightly broader set Signed-off-by: John Johansen security/apparmor/file.c | 43 +++++++++--------------- security/apparmor/include/file.h | 5 +-- security/apparmor/include/perms.h | 69 ++++++++++++++++++++++++++++----------- security/apparmor/lib.c | 59 +++++++++++++++++++++++++++++++++ security/apparmor/lsm.c | 10 +++--- 5 files changed, 133 insertions(+), 53 deletions(-) commit 694ca10ca059812219a2841f3c385aca8f6a3b17 Author: Chen-Yu Tsai Date: Sat Jun 3 22:44:27 2017 +0800 ARM: sun8i: a83t: Add device node for R_PIO The A83T has 1 pingroup with 13 pins belonging to the R_PIO or special pin controller. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Acked-by: Linus Walleij arch/arm/boot/dts/sun8i-a83t.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 07981f2b27a4ff4bdbc4bb6b5ec965f33f4117c3 Author: Ander Conselvan de Oliveira Date: Thu Jun 8 14:48:00 2017 +0300 drm/i915/glk: Remove the alpha_support flag Geminilake is now included in CI, making it part of the pre-merge criteria. The support should be in good enough shape, so let's remove the alpha_support flag. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/20170608114800.17201-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 - 1 file changed, 1 deletion(-) commit 787f24543c4a599e5d9d311a3fce839ce87bbff0 Author: Raviteja Garimella Date: Fri Jun 9 17:13:01 2017 +0530 phy: phy-bcm-ns2-usbdrd: Broadcom USB DRD PHY driver for Northstar2 This is driver for USB DRD PHY used in Broadcom's Northstar2 SoC. The phy can be configured to be in Device mode or Host mode based on the type of cable connected to the port. The driver registers to extcon framework to get appropriate connect events for Host/Device cables connect/disconnect states based on VBUS and ID interrupts. Signed-off-by: Raviteja Garimella Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/Kconfig | 13 + drivers/phy/broadcom/Makefile | 1 + drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c | 437 ++++++++++++++++++++++++++++++ 3 files changed, 451 insertions(+) commit d532b7e6a916a2ec5f626269cfa8ab8e6b3680bd Author: Raviteja Garimella Date: Fri Jun 9 17:13:00 2017 +0530 dt-bindings: phy: Add DT bindings documentation for NS2 USB DRD PHY This patch adds DT bindings documentation for NS2 DRD PHY driver. Signed-off-by: Raviteja Garimella Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/brcm,ns2-drd-phy.txt | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit d05c07c6fadc73fa580d8be1f01cb372c18fd338 Author: Arnd Bergmann Date: Fri Jun 9 12:16:40 2017 +0200 phy: cpcap-usb: add MUSB dependency When MUSB is a loadable module, we get a link error for a built-in CPCAP driver: drivers/phy/built-in.o: In function `cpcap_usb_phy_remove': phy-cpcap-usb.c:(.text+0xed9): undefined reference to `musb_mailbox' This adds a Kconfig dependency to prevent this broken configuration, enforcing that CPCAP can only be a module when MUSB is also a module. Fixes: 68a1f7c9d470 ("phy: cpcap-usb: Add CPCAP PMIC USB support") Signed-off-by: Arnd Bergmann Reviewed-by: Sebastian Reichel Signed-off-by: Kishon Vijay Abraham I drivers/phy/motorola/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 54fe30888901dd14a901bd3ad1a6f5d3c4ccd4a9 Author: Felipe Balbi Date: Fri Jun 9 13:20:42 2017 +0300 phy: tusb1210: implement ->set_mode() ->set_mode() can be used to tell PHY to prepare itself to enter USB Host/Peripheral mode and that's very important for DRD configurations. Signed-off-by: Felipe Balbi Signed-off-by: Kishon Vijay Abraham I drivers/phy/ti/phy-tusb1210.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 82d9d5e0c0f9d22decacbca25ec53782140c8bb9 Author: Felipe Balbi Date: Fri Jun 9 13:20:41 2017 +0300 phy: tusb1210: add support for TUSB1211 TUSB1211 is software compatible with TUSB1210 and as such we don't need an entire new driver to control it. Let's add its product ID to the existing TUSB1210 driver instead. Signed-off-by: Felipe Balbi Signed-off-by: Kishon Vijay Abraham I drivers/phy/ti/phy-tusb1210.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fa5b4114202de0c1a7a64fd407af0b81ca529419 Author: Laurent Pinchart Date: Wed May 17 02:20:07 2017 +0300 drm: rcar-du: Map memory through the VSP device For planes handled by a VSP instance, map the framebuffer memory through the VSP to ensure proper IOMMU handling. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham [Kieran: Fix infinite loop on fail] Signed-off-by: Kieran Bingham Acked-by: Mauro Cavalho Chehab drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 74 ++++++++++++++++++++++++++++++++--- drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 2 + 2 files changed, 70 insertions(+), 6 deletions(-) commit f5d0f9d6bf581287cd3ddeff6f11136eb8a2cfda Author: Laurent Pinchart Date: Wed May 17 02:20:06 2017 +0300 v4l: vsp1: Add API to map and unmap DRM buffers through the VSP The display buffers must be mapped for DMA through the device that performs memory access. Expose an API to map and unmap memory through the VSP device to be used by the DU. As all the buffers allocated by the DU driver are coherent, we can skip cache handling when mapping and unmapping them. This will need to be revisited when support for non-coherent buffers will be added to the DU driver. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham [Kieran: Remove unused header] Signed-off-by: Kieran Bingham Acked-by: Mauro Cavalho Chehab drivers/media/platform/vsp1/vsp1_drm.c | 24 ++++++++++++++++++++++++ include/media/vsp1.h | 3 +++ 2 files changed, 27 insertions(+) commit 2cc2137ffbd191d4258cf49347578b510aa1085c Author: Magnus Damm Date: Wed May 17 02:20:05 2017 +0300 v4l: vsp1: Map the DL and video buffers through the proper bus master On Gen2 hardware the VSP1 is a bus master and accesses the display list and video buffers through DMA directly. On Gen3 hardware, however, memory accesses go through a separate IP core called FCP. The VSP1 driver unconditionally maps DMA buffers through the VSP device. While this doesn't cause any practical issue so far, DMA mappings will be incorrect as soon as we will enable IOMMU support for the FCP on Gen3 platforms, resulting in IOMMU faults. Fix this by mapping all buffers through the FCP device if present, and through the VSP1 device as usual otherwise. Suggested-by: Magnus Damm [Cache the bus master device] Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham Acked-by: Mauro Cavalho Chehab drivers/media/platform/vsp1/vsp1.h | 1 + drivers/media/platform/vsp1/vsp1_dl.c | 4 ++-- drivers/media/platform/vsp1/vsp1_drv.c | 9 +++++++++ drivers/media/platform/vsp1/vsp1_video.c | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) commit 02533540ef8a54840a41843b8852755a543318e6 Author: Laurent Pinchart Date: Wed May 17 02:20:04 2017 +0300 v4l: rcar-fcp: Add an API to retrieve the FCP device The new rcar_fcp_get_device() function retrieves the struct device related to the FCP device. This is useful to handle DMA mapping through the right device. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham Acked-by: Mauro Cavalho Chehab drivers/media/platform/rcar-fcp.c | 6 ++++++ include/media/rcar-fcp.h | 5 +++++ 2 files changed, 11 insertions(+) commit 8c71a1a318385ba2354fa7e8adf3d42678edd766 Author: Laurent Pinchart Date: Wed May 17 02:20:03 2017 +0300 v4l: rcar-fcp: Don't get/put module reference Direct callers of the FCP API hold a reference to the FCP module due to module linkage, there's no need to take another one manually. Take a reference to the device instead to ensure that it won't disappear behind the caller's back. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham Acked-by: Mauro Cavalho Chehab drivers/media/platform/rcar-fcp.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 9842452acd3dae661f4430c4460edd1fc188377f Author: Sylwester Nawrocki Date: Fri Jun 9 12:46:06 2017 +0200 clk: samsung: exynos542x: Add EPLL rate table A specific clock rate table is added for EPLL so it is possible to set frequency of the EPLL output clock as multiple of various audio sampling rates. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5420.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 8a9cf26e303f8b1a02d8bf62cd4671f6714aa2fe Author: Sylwester Nawrocki Date: Thu Jun 8 12:03:24 2017 +0200 clk: samsung: Add missing exynos5420 audio related clocks This patch adds missing definitions of mux clocks required for using EPLL as the audio subsystem root clock on exynos5420/exynos5422 SoCs. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5420.c | 10 +++++++--- include/dt-bindings/clock/exynos5420.h | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) commit 6edfa11cb396c7d3eff75e89dfa7bca385bf2edd Author: Sylwester Nawrocki Date: Thu Jun 8 16:17:11 2017 +0200 clk: samsung: Add enable/disable operation for PLL36XX clocks The existing enable/disable ops for PLL35XX are made more generic and used also for PLL36XX. This fixes issues in the kernel with PLL36XX PLLs when the PLL has not been already enabled by bootloader. Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-pll.c | 87 +++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 37 deletions(-) commit 19a8a7771770bd593d582e06b75e86499c1cabc8 Author: Mika Westerberg Date: Tue Jun 6 16:18:19 2017 +0300 pinctrl: intel: Add Intel Cannon Lake PCH pin controller support This adds pinctrl/GPIO support for Intel Cannon Lake PCH. The Cannon Lake PCH GPIO is based on newer version of the Intel GPIO hardware. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/Kconfig | 8 + drivers/pinctrl/intel/Makefile | 1 + drivers/pinctrl/intel/pinctrl-cannonlake.c | 442 +++++++++++++++++++++++++++++ 3 files changed, 451 insertions(+) commit 1f6b419b24285409a9365461bf7367a220eff1db Author: Mika Westerberg Date: Tue Jun 6 16:18:18 2017 +0300 pinctrl: intel: Make it possible to specify mode per pin in a group On some SoCs not all pins in a group use the same mode when a certain function is muxed out of them. This makes it possible to specify mode per pin as an array instead in addition to single integer. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 6 +++++- drivers/pinctrl/intel/pinctrl-intel.h | 28 +++++++++++++++++++++------- 2 files changed, 26 insertions(+), 8 deletions(-) commit 919eb4756ef41fd71b5eaae8a2a067fcde9d44d7 Author: Mika Westerberg Date: Tue Jun 6 16:18:17 2017 +0300 pinctrl: intel: Add support for variable size pad groups The Intel GPIO hardware has a concept of pad groups, which means 1 to 32 pads occupying their own GPI_IS, GPI_IE, PAD_OWN and so on registers. The existing hardware has the same amount of pads in each pad group (except the last one) so it is possible to use community->gpp_size to calculate start offset of each register. With the next generation SoCs the pad group size is not always the same anymore which means we cannot use community->gpp_size for register offset calculations directly. To support variable size pad groups we introduce struct intel_padgroup that can be filled in by the client drivers according the hardware pad group layout. The core driver will always use these when it performs calculations for pad register offsets. The core driver will automatically populate pad groups based on community->gpp_size if the driver does not provide any. This makes sure the existing drivers still work as expected. Signed-off-by: Mika Westerberg Signed-off-by: Chuah, Kim Tatt Signed-off-by: Tan Jui Nee Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 194 ++++++++++++++++++++------- drivers/pinctrl/intel/pinctrl-intel.h | 37 ++++- drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 1 + 3 files changed, 176 insertions(+), 56 deletions(-) commit aca4e68acf3a08561f2a413322cbb232edad8764 Author: Arnd Bergmann Date: Fri Jun 9 12:22:51 2017 +0200 mux: adg792a: always require I2C support COMPILE_TEST makes no sense when I2C is disabled, as the driver cannot compile in that configuration: drivers/mux/mux-adg792a.c: In function 'adg792a_write_cmd': drivers/mux/mux-adg792a.c:34:9: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'? [-Werror=implicit-function-declaration] drivers/mux/mux-adg792a.o: In function `adg792a_driver_init': mux-adg792a.c:(.init.text+0x14): undefined reference to `i2c_register_driver' drivers/mux/mux-adg792a.o: In function `adg792a_probe': mux-adg792a.c:(.text.adg792a_probe+0x94): undefined reference to `i2c_smbus_write_byte_data' drivers/mux/mux-adg792a.o: In function `adg792a_set': mux-adg792a.c:(.text.adg792a_set+0x80): undefined reference to `i2c_smbus_write_byte_data' Fixes: afda08c4caa9 ("mux: adg792a: add mux controller driver for ADG792A/G") Signed-off-by: Arnd Bergmann Reviewed-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/mux/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54ebbfb1603415d9953c150535850d30609ef077 Author: Aleksa Sarai Date: Sun Jun 4 00:15:15 2017 +1000 tty: add TIOCGPTPEER ioctl When opening the slave end of a PTY, it is not possible for userspace to safely ensure that /dev/pts/$num is actually a slave (in cases where the mount namespace in which devpts was mounted is controlled by an untrusted process). In addition, there are several unresolvable race conditions if userspace were to attempt to detect attacks through stat(2) and other similar methods [in addition it is not clear how userspace could detect attacks involving FUSE]. Resolve this by providing an interface for userpace to safely open the "peer" end of a PTY file descriptor by using the dentry cached by devpts. Since it is not possible to have an open master PTY without having its slave exposed in /dev/pts this interface is safe. This interface currently does not provide a way to get the master pty (since it is not clear whether such an interface is safe or even useful). Cc: Christian Brauner Cc: Valentin Rothberg Signed-off-by: Aleksa Sarai Signed-off-by: Greg Kroah-Hartman arch/alpha/include/uapi/asm/ioctls.h | 1 + arch/mips/include/uapi/asm/ioctls.h | 1 + arch/parisc/include/uapi/asm/ioctls.h | 1 + arch/powerpc/include/uapi/asm/ioctls.h | 1 + arch/sh/include/uapi/asm/ioctls.h | 1 + arch/sparc/include/uapi/asm/ioctls.h | 3 +- arch/xtensa/include/uapi/asm/ioctls.h | 1 + drivers/tty/pty.c | 71 ++++++++++++++++++++++++++++++++-- include/uapi/asm-generic/ioctls.h | 1 + 9 files changed, 76 insertions(+), 5 deletions(-) commit ce3bb8f55408db8b571c2b82161a4ee8e835c605 Author: Marek Szyprowski Date: Mon May 15 08:51:04 2017 +0200 clk: samsung: s5pv210-audss: Convert to the new clk_hw API Clock providers should use the new struct clk_hw based API, so convert Samsung S5PV210 Audio Subsystem clock provider to the new approach. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski drivers/clk/samsung/clk-s5pv210-audss.c | 52 +++++++++++++++++---------------- 1 file changed, 27 insertions(+), 25 deletions(-) commit 820de1fb69f16a4307e4b5d4adf6e9246a680655 Author: Finley Xiao Date: Fri Jun 9 10:59:10 2017 +0100 nvmem: rockchip-efuse: add support for rk322x-efuse This adds the necessary data for handling eFuse on the rk322x. Signed-off-by: Finley Xiao Acked-by: Rob Herring Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt | 1 + drivers/nvmem/rockchip-efuse.c | 4 ++++ 2 files changed, 5 insertions(+) commit 666d6a36234f3123e909165ac32ea692213f0155 Author: Heiner Kallweit Date: Fri Jun 9 10:59:09 2017 +0100 nvmem: core: add locking to nvmem_find_cell Adding entries to nvmem_cells and deleting entries from it is protected by nvmem_cells_mutex. Therefore this mutex should also protect iterating over the list. Signed-off-by: Heiner Kallweit Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 79fbf0468b2a05a743d31794423925d229c0e9c2 Author: Andrey Smirnov Date: Fri Jun 9 10:59:08 2017 +0100 nvmem: core: Call put_device() in nvmem_unregister() Call put_device() in nvmem_unregister() to make sure nvmem_release gets called freeing up allocated resources. Cc: cphealy@gmail.com Cc: Srinivas Kandagatla Cc: Maxime Ripard Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 1 + 1 file changed, 1 insertion(+) commit 3360acdf839170b612f5b212539694c20e3f16d0 Author: Johan Hovold Date: Fri Jun 9 10:59:07 2017 +0100 nvmem: core: fix leaks on registration errors Make sure to deregister and release the nvmem device and underlying memory on registration errors. Note that the private data must be freed using put_device() once the struct device has been initialised. Also note that there's a related reference leak in the deregistration function as reported by Mika Westerberg which is being fixed separately. Fixes: b6c217ab9be6 ("nvmem: Add backwards compatibility support for older EEPROM drivers.") Fixes: eace75cfdcf7 ("nvmem: Add a simple NVMEM framework for nvmem providers") Cc: stable # 4.3 Cc: Andrew Lunn Cc: Srinivas Kandagatla Cc: Mika Westerberg Signed-off-by: Johan Hovold Acked-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit e827756d64773515fa7de5e7e942a6d1494bf64e Author: Oza Pawandeep Date: Fri Jun 9 10:59:06 2017 +0100 nvmem: correct Broadcom OTP controller driver writes - use data write offset to write otp data instead of read offset - use OTP program command 0x8 to write otp with ECC rather than just command 0xA without ECC Fixes: 9d59c6e8ae27 ("nvmem: Add the Broadcom OTP controller driver") Signed-off-by: Oza Pawandeep Signed-off-by: Scott Branden Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/bcm-ocotp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b405e30cbcac3aa327ae04a29e7da5d084a4933 Author: Chris Packham Date: Thu Jun 8 09:55:30 2017 +1200 EDAC, mv64x60: Sanity check edac_op_state before registering edac_op_state is a module parameter which affects the behaviour of the driver probe which can potentially be invoked as soon as the platform driver registration happens. Because of this we need to ensure that we sanity check the module parameter before calling platform_register_drivers(). Signed-off-by: Chris Packham Cc: linux-edac Link: http://lkml.kernel.org/r/20170607215530.8604-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Borislav Petkov drivers/edac/mv64x60_edac.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit de0d6dbdbdb23ddb85f10d54a516e794f9a873e0 Author: Andrew F. Davis Date: Mon Jun 5 08:52:08 2017 -0500 w1: Add subsystem kernel public interface Like other subsystems we should be able to define slave devices outside of the w1 directory. To do this we move public facing interface definitions to include/linux/w1.h and rename the internal definition file to w1_internal.h. As w1_family.h and w1_int.h contained almost entirely public driver interface definitions we simply removed these files and moved the remaining definitions into w1_internal.h. With this we can now start to move slave devices out of w1/slaves and into the subsystem based on the function they implement, again like other drivers. Signed-off-by: Andrew F. Davis Reviewed-by: Sebastian Reichel Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + drivers/power/supply/ds2760_battery.c | 2 +- drivers/power/supply/ds2780_battery.c | 2 +- drivers/power/supply/ds2781_battery.c | 2 +- drivers/w1/masters/ds1wm.c | 3 +- drivers/w1/masters/ds2482.c | 3 +- drivers/w1/masters/ds2490.c | 3 +- drivers/w1/masters/matrox_w1.c | 3 +- drivers/w1/masters/mxc_w1.c | 3 +- drivers/w1/masters/omap_hdq.c | 3 +- drivers/w1/masters/w1-gpio.c | 3 +- drivers/w1/slaves/w1_bq27000.c | 6 +- drivers/w1/slaves/w1_ds2405.c | 5 +- drivers/w1/slaves/w1_ds2406.c | 6 +- drivers/w1/slaves/w1_ds2408.c | 6 +- drivers/w1/slaves/w1_ds2413.c | 6 +- drivers/w1/slaves/w1_ds2423.c | 6 +- drivers/w1/slaves/w1_ds2431.c | 6 +- drivers/w1/slaves/w1_ds2433.c | 6 +- drivers/w1/slaves/w1_ds2438.c | 5 +- drivers/w1/slaves/w1_ds2760.c | 7 +- drivers/w1/slaves/w1_ds2780.c | 7 +- drivers/w1/slaves/w1_ds2781.c | 7 +- drivers/w1/slaves/w1_ds28e04.c | 6 +- drivers/w1/slaves/w1_smem.c | 7 +- drivers/w1/slaves/w1_therm.c | 10 +- drivers/w1/w1.c | 6 +- drivers/w1/w1.h | 336 ---------------------------------- drivers/w1/w1_family.c | 3 +- drivers/w1/w1_family.h | 98 ---------- drivers/w1/w1_int.c | 3 +- drivers/w1/w1_int.h | 27 --- drivers/w1/w1_internal.h | 87 +++++++++ drivers/w1/w1_io.c | 2 +- drivers/w1/w1_netlink.c | 2 +- drivers/w1/w1_netlink.h | 2 +- include/linux/w1.h | 320 ++++++++++++++++++++++++++++++++ 37 files changed, 479 insertions(+), 531 deletions(-) commit acb7e8f7448efef4ba1d86247cacbd201df733ab Author: Christopher Bostic Date: Tue Jun 6 16:08:59 2017 -0500 drivers/fsi: Add module license to core driver Add missing MODULE_LICENSE("GPL") to the core FSI driver. Signed-off-by: Christopher Bostic Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 1 + 1 file changed, 1 insertion(+) commit 4af889b0ff78a71a0d5e3d4ce62515eca2ba4939 Author: Jeremy Kerr Date: Tue Jun 6 16:08:58 2017 -0500 drivers/fsi: Use asynchronous slave mode For slaves that are behind a software-clocked master, we want FSI CFAMs to run asynchronously to the FSI clock, so set up our slaves to be in async mode. Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 22 +++++++++++++++++++++- drivers/fsi/fsi-master-gpio.c | 1 + drivers/fsi/fsi-master.h | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) commit 7f9e8f767030e9d588ffc71e50ebf5164c86c8a9 Author: Christopher Bostic Date: Tue Jun 6 16:08:57 2017 -0500 drivers/fsi: Add hub master support Add an engine driver to expose a "hub" FSI master - which has a set of control registers in the engine address space, and uses a chunk of the slave address space for actual FSI communication. Additional changes from Jeremy Kerr . Signed-off-by: Christopher Bostic Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/Kconfig | 8 ++ drivers/fsi/Makefile | 1 + drivers/fsi/fsi-master-hub.c | 327 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 336 insertions(+) commit 680ca6dcf5c222765cb2fb22959c5282865b6655 Author: Christopher Bostic Date: Tue Jun 6 16:08:56 2017 -0500 drivers/fsi: Add SCOM FSI client device driver Create a simple SCOM engine device driver that reads and writes its control registers via an FSI bus. Includes changes from Edward A. James . Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr Signed-off-by: Greg Kroah-Hartman drivers/fsi/Kconfig | 5 + drivers/fsi/Makefile | 1 + drivers/fsi/fsi-scom.c | 263 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 269 insertions(+) commit 1247cf7ab876b6f1da7028bff64b3d89130dd8e3 Author: Jeremy Kerr Date: Tue Jun 6 16:08:55 2017 -0500 drivers/fsi/gpio: Add tracepoints for GPIO master Trace low level input/output GPIO operations. Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-master-gpio.c | 9 +++++ include/trace/events/fsi_master_gpio.h | 68 ++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) commit ac0385d9f609e836e82213c75a24ae87f8fe1c9f Author: Christopher Bostic Date: Tue Jun 6 16:08:54 2017 -0500 drivers/fsi: Add GPIO based FSI master Implement a FSI master using GPIO. Will generate FSI protocol for read and write commands to particular addresses. Sends master command and waits for and decodes a slave response. Includes changes from Edward A. James and Jeremy Kerr . Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/Kconfig | 12 + drivers/fsi/Makefile | 1 + drivers/fsi/fsi-master-gpio.c | 594 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 607 insertions(+) commit a7ec9371dd11f0bc705a703fa0e5c1c11339f1a6 Author: Christopher Bostic Date: Tue Jun 6 16:08:53 2017 -0500 drivers/fsi: Document FSI master sysfs files in ABI Add info for sysfs scan file in Documentaiton ABI/testing Signed-off-by: Christopher Bostic Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-fsi | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 1fa847d74a75b76c6028b1e943434c471bd2619c Author: Jeremy Kerr Date: Tue Jun 6 16:08:52 2017 -0500 drivers/fsi: Add error handling for slave This change implements error handling in the FSI core, by cleaining up and retrying failed operations, using the SISC, TERM and BREAK facilities. Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 121 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 114 insertions(+), 7 deletions(-) commit 66433b05a3b2b8f95be9e6269bc21e916febf482 Author: Jeremy Kerr Date: Tue Jun 6 16:08:51 2017 -0500 drivers/fsi: Add tracepoints for low-level operations Trace low level read and write FSI bus operations. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Christopher Bostic Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 27 +++++++--- include/trace/events/fsi.h | 127 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+), 6 deletions(-) commit da36cadf89a75a730302a4df114cb930b1becc39 Author: Jeremy Kerr Date: Tue Jun 6 16:08:50 2017 -0500 drivers/fsi: expose direct-access slave API Allow drivers to access the slave address ranges. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Christopher Bostic Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 30 ++++++++++++++++++++++++------ include/linux/fsi.h | 12 ++++++++++++ 2 files changed, 36 insertions(+), 6 deletions(-) commit 125739cbc1c3b29c89ae44f85904cf18fc49a2fb Author: Jeremy Kerr Date: Tue Jun 6 16:08:49 2017 -0500 drivers/fsi: Add sysfs files for FSI master & slave accesses This change adds a 'raw' file for reads & writes, and a 'term' file for the TERM command, and a 'break' file for issuing a BREAK. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Christopher Bostic Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) commit 356d8009a5a4569f17a3508b50a347bdf4d5b337 Author: Christopher Bostic Date: Tue Jun 6 16:08:48 2017 -0500 drivers/fsi: Add client driver register utilities Add driver_register and driver_unregister wrappers for FSI. Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 17 +++++++++++++++++ include/linux/fsi.h | 12 ++++++++++++ 2 files changed, 29 insertions(+) commit 777dcf7391be81644360c15c375b24c96ceb49ce Author: Christopher Bostic Date: Tue Jun 6 16:08:47 2017 -0500 drivers/fsi: Add documentation for GPIO bindings Add fsi master gpio device tree binding documentation. Includes changes from Jeremy Kerr . Signed-off-by: Christopher Bostic Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/fsi/fsi-master-gpio.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit cd0fdb5c07b27bac8ce617459c3599f7be315ce5 Author: Christopher Bostic Date: Tue Jun 6 16:08:46 2017 -0500 drivers/fsi: Add master unscan Allow a master to undo a previous scan. Should a master scan a bus twice it will need to ensure it doesn't double register any previously detected device. Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley ---- v7 - Unscan when unregistering master - Remove leading '__'s from function names - Return fail state for sysfs rescan file Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 4efe37f4c4efcb73562e4634cb6c262b08ab6451 Author: Jeremy Kerr Date: Tue Jun 6 16:08:45 2017 -0500 drivers/fsi: Add device read/write/peek API This change introduces the fsi device API: simple read, write and peek accessors for the devices' address spaces. Includes contributions from Christopher Bostic and Edward A. James . Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- include/linux/fsi.h | 7 ++++++- 2 files changed, 55 insertions(+), 2 deletions(-) commit f7ade2a603cfd205a6d7afb9d96ac7975f666dd6 Author: Jeremy Kerr Date: Tue Jun 6 16:08:44 2017 -0500 drivers/fsi: scan slaves & register devices Now that we have fsi_slave devices, scan each for endpoints, and register them on the fsi bus. Includes contributions from Christopher Bostic . Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++- include/linux/fsi.h | 4 ++ 2 files changed, 131 insertions(+), 1 deletion(-) commit 2b37c3e285f9dfd76735b0b4b26e0ada949e97b5 Author: Christopher Bostic Date: Tue Jun 6 16:08:43 2017 -0500 drivers/fsi: Set slave SMODE to init communication Set CFAM to appropriate ID so that the controlling master can manage link memory ranges. Add slave engine register definitions. Includes changes from Jeremy Kerr . Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 2b545cd8e1b2a2bd60d991c7f1b45a30c673ece2 Author: Jeremy Kerr Date: Tue Jun 6 16:08:42 2017 -0500 drivers/fsi: Implement slave initialisation Implement fsi_slave_init: if we can read a chip ID, create fsi_slave devices and register with the driver core. Includes changes from Christopher Bostic . Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/Kconfig | 1 + drivers/fsi/fsi-core.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 2 deletions(-) commit 26095282119ecf1088193d09388fa40700e34e45 Author: Christopher Bostic Date: Tue Jun 6 16:08:41 2017 -0500 drivers/fsi: Set up links for slave communication Enable each link and send a break command, and try to detect a slave by reading from the SMODE register. Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) commit 014c2abc530d7f3674c195891cef7128352453e0 Author: Jeremy Kerr Date: Tue Jun 6 16:08:40 2017 -0500 drivers/fsi: Add slave & master read/write APIs Introduce functions to perform reads/writes on the slave address space; these simply pass the request on the slave's master with the correct link and slave ID. We implement these on top of similar helpers for the master. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 0cbaa44841db3d06d2a21ae4ab679882033f3dbe Author: Jeremy Kerr Date: Tue Jun 6 16:08:39 2017 -0500 lib: Add crc4 module Add a little helper for crc4 calculations. This works 4-bits-at-a-time, using a simple table approach. We will need this in the FSI core code, as well as any master implementations that need to calculate CRCs in software. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman include/linux/crc4.h | 8 ++++++++ lib/Kconfig | 8 ++++++++ lib/Makefile | 1 + lib/crc4.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+) commit 414c1026319bc10796a868c1fa0ba312c4ca9e67 Author: Jeremy Kerr Date: Tue Jun 6 16:08:38 2017 -0500 drivers/fsi: Add empty master scan When a new fsi master is added, we will need to scan its links, and slaves attached to those links. This change introduces a little shell to iterate the links, which we will populate with the actual slave scan in a later change. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit faf0b116dec119d766cb2cdf9cd954b5ee88d546 Author: Jeremy Kerr Date: Tue Jun 6 16:08:37 2017 -0500 drivers/fsi: Add slave definition Add the initial fsi slave device, which is private to the core code. This will be a child of the master, and parent to endpoint devices. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 09aecfab93b8f728c5d65d33f26055b7e726df3b Author: Jeremy Kerr Date: Tue Jun 6 16:08:36 2017 -0500 drivers/fsi: Add fsi master definition Add a `struct fsi_master` to represent a FSI master controller. FSI master drivers register one of these structs to provide device-specific of the standard operations: read/write/term/break and link control. Includes changes from Edward A. James & Jeremy Kerr . Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 35 +++++++++++++++++++++++++++++++++++ drivers/fsi/fsi-master.h | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) commit 9e69dd0179c346dfb5d08b8d46d5f5c9c81ab1b7 Author: Roberto Pereira Date: Thu Jun 8 18:09:16 2017 +0530 config: android-base: disable CONFIG_NFSD and CONFIG_NFS_FS Disable Network file system support. Reviewed-at: https://android-review.googlesource.com/#/c/409559/ Signed-off-by: Roberto Pereira [AmitP: cherry-picked this change from Android common kernel and updated commit message] Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman kernel/configs/android-base.config | 2 ++ 1 file changed, 2 insertions(+) commit 2edfe6be206adc4c1055e053322d27267f8952bc Author: Chenbo Feng Date: Thu Jun 8 18:09:15 2017 +0530 config: android-base: add CGROUP_BPF Add CONFIG_CGROUP_BPF as a default configuration in android base config since it is used to replace XT_QTAGUID in future. Reviewed-at: https://android-review.googlesource.com/#/c/400374/ Signed-off-by: Chenbo Feng [AmitP: cherry-picked this change from Android common kernel] Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman kernel/configs/android-base.config | 1 + 1 file changed, 1 insertion(+) commit 2096e1706336d83cd66ca744e4d904af4d63e25c Author: Greg Kroah-Hartman Date: Thu Jun 8 18:09:14 2017 +0530 config: android-base: add CONFIG_MODULES option This adds CONFIG_MODULES, CONFIG_MODULE_UNLOAD, and CONFIG_MODVERSIONS which are required by the O release. Reviewed-at: https://android-review.googlesource.com/#/c/364554/ Signed-off-by: Greg Kroah-Hartman [AmitP: cherry-picked this change from Android common kernel] Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman kernel/configs/android-base.config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5b89db2fa545b473dc352689ac3afe407367ea34 Author: Greg Kroah-Hartman Date: Thu Jun 8 18:09:13 2017 +0530 config: android-base: add CONFIG_IKCONFIG option This adds CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC options, which are a requirement for the O release. Reviewed-at: https://android-review.googlesource.com/#/c/364553/ Signed-off-by: Greg Kroah-Hartman [AmitP: cherry-picked this change from Android common kernel] Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman kernel/configs/android-base.config | 2 ++ 1 file changed, 2 insertions(+) commit fb0b1538983c1cf7d2a2242b332a34a953753624 Author: Sami Tolvanen Date: Thu Jun 8 18:09:12 2017 +0530 config: android-recommended: enable CONFIG_CPU_SW_DOMAIN_PAN Enable CPU domain PAN to ensure that normal kernel accesses are unable to access userspace addresses. Reviewed-at: https://android-review.googlesource.com/#/c/334035/ Signed-off-by: Sami Tolvanen [AmitP: cherry-picked this change from Android common kernel, updated the commit message and re-placed the CONFIG_STRICT_KERNEL_RWX config in sorted order] Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman kernel/configs/android-recommended.config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c1ebc2febdb85a73a4f91a9b9eaab6387619eaa6 Author: Max Shi Date: Thu Jun 8 18:09:11 2017 +0530 config: android-base: disable CONFIG_USELIB and CONFIG_FHANDLE Turn off the two kernel configs to disable related system ABI. Reviewed-at: https://android-review.googlesource.com/#/c/264976/ Signed-off-by: Max Shi [AmitP: cherry-picked this change from Android common kernel] Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman kernel/configs/android-base.config | 2 ++ 1 file changed, 2 insertions(+) commit 0c9238c7a1cfd834d8bb96a2b1fabe0b1a5961df Author: Sami Tolvanen Date: Thu Jun 8 18:09:10 2017 +0530 config: android-recommended: enable CONFIG_ARM64_SW_TTBR0_PAN Enable PAN emulation using TTBR0_EL1 switching. Reviewed-at: https://android-review.googlesource.com/#/c/325997/ Signed-off-by: Sami Tolvanen [AmitP: cherry-picked this change from Android common kernel and updated the commit message] Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman kernel/configs/android-recommended.config | 1 + 1 file changed, 1 insertion(+) commit 67e707bd68269aac70904943f07a979eeb163b13 Author: Jeff Vander Stoep Date: Thu Jun 8 18:09:09 2017 +0530 config: android-recommended: enable fstack-protector-strong If compiler has stack protector support, set CONFIG_CC_STACKPROTECTOR_STRONG. Reviewed-at: https://android-review.googlesource.com/#/c/238388/ Signed-off-by: Jeff Vander Stoep [AmitP: cherry-picked this change from Android common kernel] Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman kernel/configs/android-recommended.config | 1 + 1 file changed, 1 insertion(+) commit 248fa516134f038341bd8598b9d4d627c771dcbe Author: Leo Yan Date: Mon Jun 5 14:15:18 2017 -0600 arm64: dts: qcom: msm8916: Add debug unit Add debug unit on Qualcomm msm8916 based platforms, including the DragonBoard 410c board. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Acked-by: Andy Gross Signed-off-by: Greg Kroah-Hartman arch/arm64/boot/dts/qcom/msm8916.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 4fcf9a6259a0b21ca198f91737303f5166a788bf Author: Leo Yan Date: Mon Jun 5 14:15:17 2017 -0600 arm64: dts: hi6220: register debug module Bind debug module driver for Hi6220. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Acked-by: Wei Xu Signed-off-by: Greg Kroah-Hartman arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 2227b7c7463402ce92706a6f35c82cad6e8ee19a Author: Leo Yan Date: Mon Jun 5 14:15:16 2017 -0600 coresight: add support for CPU debug module Coresight includes debug module and usually the module connects with CPU debug logic. ARMv8 architecture reference manual (ARM DDI 0487A.k) has description for related info in "Part H: External Debug". Chapter H7 "The Sample-based Profiling Extension" introduces several sampling registers, e.g. we can check program counter value with combined CPU exception level, secure state, etc. So this is helpful for analysis CPU lockup scenarios, e.g. if one CPU has run into infinite loop with IRQ disabled. In this case the CPU cannot switch context and handle any interrupt (including IPIs), as the result it cannot handle SMP call for stack dump. This patch is to enable coresight debug module, so firstly this driver is to bind apb clock for debug module and this is to ensure the debug module can be accessed from program or external debugger. And the driver uses sample-based registers for debug purpose, e.g. when system triggers panic, the driver will dump program counter and combined context registers (EDCIDSR, EDVIDSR); by parsing context registers so can quickly get to know CPU secure state, exception level, etc. Some of the debug module registers are located in CPU power domain, so this requires the CPU power domain stays on when access related debug registers, but the power management for CPU power domain is quite dependent on SoC integration for power management. For the platforms which with sane power controller implementations, this driver follows the method to set EDPRCR to try to pull the CPU out of low power state and then set 'no power down request' bit so the CPU has no chance to lose power. If the SoC has not followed up this design well for power management controller, the user should use the command line parameter or sysfs to constrain all or partial idle states to ensure the CPU power domain is enabled and access coresight CPU debug component safely. Signed-off-by: Leo Yan Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/Kconfig | 14 + drivers/hwtracing/coresight/Makefile | 1 + drivers/hwtracing/coresight/coresight-cpu-debug.c | 700 ++++++++++++++++++++++ 3 files changed, 715 insertions(+) commit c56cdd7a5c836db7834256f09692112afee9eb3f Author: Leo Yan Date: Mon Jun 5 14:15:15 2017 -0600 coresight: refactor with function of_coresight_get_cpu This is refactor to add function of_coresight_get_cpu(), so it's used to retrieve CPU id for coresight component. Finally can use it as a common function for multiple places. Suggested-by: Mathieu Poirier Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/of_coresight.c | 43 +++++++++++++++++++----------- include/linux/coresight.h | 3 +++ 2 files changed, 31 insertions(+), 15 deletions(-) commit 04c9490035691a398d851fd160ce8af08ba0af0d Author: Suzuki K Poulose Date: Mon Jun 5 14:15:14 2017 -0600 coresight: of_get_coresight_platform_data: Add missing of_node_put The of_get_coresight_platform_data iterates over the possible CPU nodes to find a given cpu phandle. However it does not drop the reference to the node pointer returned by the of_get_coresight_platform_data. This patch also introduces another minor fix is to use of_cpu_device_node_get() to replace of_get_cpu_node(). Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose [Leo: minor tweaks for of_get_coresight_platform_data] Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/of_coresight.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 2fd95d6565f305bc5c1f0bf9922cbff350117f04 Author: Leo Yan Date: Mon Jun 5 14:15:13 2017 -0600 MAINTAINERS: update file entries for Coresight subsystem Update document file entries for Coresight debug module. Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 62a31ce1372a8a52050961904e1ca16bc06e6f45 Author: Leo Yan Date: Mon Jun 5 14:15:12 2017 -0600 doc: Add coresight_cpu_debug.enable to kernel-parameters.txt Add coresight_cpu_debug.enable to kernel-parameters.txt, this flag is used to enable/disable the CPU sampling based debugging. Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/kernel-parameters.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 0cd555c35131eb6318fd0fb17e2fdc8bdd020f8f Author: Leo Yan Date: Mon Jun 5 14:15:11 2017 -0600 doc: Add documentation for Coresight CPU debug Add detailed documentation for Coresight CPU debug driver, which contains the info for driver implementation, Mike Leach excellent summary for "clock and power domain". At the end some examples on how to enable the debugging functionality are provided. Suggested-by: Mike Leach Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman Documentation/trace/coresight-cpu-debug.txt | 175 ++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) commit a70fc83d3c50c5e3c69de66d4b13d8a1fbfbbe73 Author: Leo Yan Date: Mon Jun 5 14:15:10 2017 -0600 coresight: bindings for CPU debug module According to ARMv8 architecture reference manual (ARM DDI 0487A.k) Chapter 'Part H: External debug', the CPU can integrate debug module and it can support self-hosted debug and external debug. Especially for supporting self-hosted debug, this means the program can access the debug module from mmio region; and usually the mmio region is integrated with coresight. So add document for binding debug component, includes binding to APB clock; and also need specify the CPU node which the debug module is dedicated to specific CPU. Suggested-by: Mike Leach Signed-off-by: Leo Yan Reviewed-by: Suzuki K Poulose Acked-by: Rob Herring Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman .../bindings/arm/coresight-cpu-debug.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit a3959c50b02f57df4c4e4f14f632220f1c0b1f79 Author: Robin Murphy Date: Mon Jun 5 14:15:09 2017 -0600 coresight: tmc: Configure DMA mask appropriately Before making any DMA API calls, the ETR driver should really be setting its masks to ensure that DMA is possible. Especially since it can address more than the 32-bit default mask set by the AMBA bus code. Signed-off-by: Robin Murphy Tested-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 63a5c022469f0df1c81cd8c117902bc89e0d19be Author: Markus Elfring Date: Mon Jun 5 14:15:08 2017 -0600 coresight: etb10: Fix a typo in a comment line Delete a character in this description for a condition check. Signed-off-by: Markus Elfring Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f9df80ef5f4be1a3abbb161e1469884110a0112 Author: Markus Elfring Date: Mon Jun 5 14:15:07 2017 -0600 coresight: etb10: Delete an error message for a failed memory allocation in etb_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f42fe520e449bda213f035478ddc9cf99e9082ac Author: Leo Yan Date: Mon Jun 5 14:15:06 2017 -0600 coresight: use const for device_node structures Almost low level functions from open firmware have used const to qualify device_node structures, so add const for device_node parameters in of_coresight related functions. Signed-off-by: Leo Yan Reviewed-by: Stephen Boyd Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/of_coresight.c | 7 ++++--- include/linux/coresight.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit 2cd541402829e7cc6621d2fc0ef329321559cb26 Author: Leo Yan Date: Mon Jun 5 14:15:05 2017 -0600 coresight: tmc: minor fix for output log In current code the output logs are not well symmetric for sink and link enabling and disabling. This patch is to fix that so can output paired logs. Cc: Mathieu Poirier Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etf.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit d755209f6afddecfb1bb33efebb2a87039959205 Author: Suzuki K Poulose Date: Mon Jun 5 14:15:04 2017 -0600 coresight: etm_perf: Fix using uninitialised work With 4.11-rc4, the following command triggers a WARN_ON, when a sink is not enabled. perf record -e cs_etm/@20010000.etf/ [88286.547741] ------------[ cut here ]------------ [88286.552332] WARNING: CPU: 3 PID: 2156 at kernel/workqueue.c:1442 __queue_work+0x29c/0x3b8 [88286.560427] Modules linked in: [88286.563451] [88286.564928] CPU: 3 PID: 2156 Comm: perf_v4.11 Not tainted 4.11.0-rc4 #217 [88286.573453] Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Aug 15 2016 [88286.584128] task: ffff80097597c200 task.stack: ffff8009768b0000 [88286.589990] PC is at __queue_work+0x29c/0x3b8 [88286.594303] LR is at __queue_work+0x104/0x3b8 [88286.598614] pc : [] lr : [] pstate: a00001c5 [88286.605934] sp : ffff8009768b3aa0 [88286.609212] x29: ffff8009768b3aa0 x28: ffff80097ff3da00 [88286.614477] x27: ffff80097ff89c00 x26: ffff8009751b0e00 [88286.619741] x25: ffff000008c9f000 x24: 0000000000000003 [88286.625004] x23: 0000000000000040 x22: ffff000008d3dab8 [88286.630268] x21: ffff800977804400 x20: 0000000000000007 [88286.635532] x19: ffff000008c54000 x18: 0000fffff9185160 [88286.640795] x17: 0000ffffb33d9a38 x16: ffff000008088270 [88286.646059] x15: 0000ffffb345b590 x14: 0000000000000000 [88286.651322] x13: 0000000000000004 x12: 0000000000000040 [88286.656586] x11: 0000000000000068 x10: 0000000000000000 [88286.661849] x9 : ffff800977400028 x8 : 0000000000000000 [88286.667113] x7 : 0000000000000000 x6 : ffff0000080d8ae4 [88286.672376] x5 : 0000000000000000 x4 : 0000000000000080 [88286.677639] x3 : 0000000000000000 x2 : 0000000000000000 [88286.682903] x1 : 0000000000000000 x0 : ffff8009751b0e08 [88286.688166] [88286.689638] ---[ end trace 31633f18fd33d4cb ]--- [88286.694206] Call trace: [88286.696627] Exception stack(0xffff8009768b38d0 to 0xffff8009768b3a00) [88286.703004] 38c0: ffff000008c54000 0001000000000000 [88286.710757] 38e0: ffff8009768b3aa0 ffff0000080d8c7c ffff8009768b3b50 ffff80097ff8a5b0 [88286.718511] 3900: 0000800977325000 0000000000000000 0000000000000040 ffff80097ffc6180 [88286.726264] 3920: ffff8009768b3940 ffff0000088a8694 ffff80097ffc5800 0000000000000000 [88286.734017] 3940: ffff8009768b3960 ffff0000081919c0 ffff80097ffc5280 0000000000000001 [88286.741771] 3960: ffff8009768b3a50 ffff00000819206c ffff8009751b0e08 0000000000000000 [88286.749523] 3980: 0000000000000000 0000000000000000 0000000000000080 0000000000000000 [88286.757277] 39a0: ffff0000080d8ae4 0000000000000000 0000000000000000 ffff800977400028 [88286.765029] 39c0: 0000000000000000 0000000000000068 0000000000000040 0000000000000004 [88286.772783] 39e0: 0000000000000000 0000ffffb345b590 ffff000008088270 0000ffffb33d9a38 [88286.780537] [] __queue_work+0x29c/0x3b8 [88286.785883] [] queue_work_on+0x60/0x78 [88286.791146] [] etm_setup_aux+0x178/0x238 [88286.796578] [] rb_alloc_aux+0x228/0x310 [88286.801925] [] perf_mmap+0x404/0x5a8 [88286.807015] [] mmap_region+0x394/0x5c0 [88286.812276] [] do_mmap+0x254/0x388 [88286.817191] [] vm_mmap_pgoff+0xbc/0xe0 [88286.822452] [] SyS_mmap_pgoff+0xac/0x228 [88286.827884] [] sys_mmap+0x18/0x28 [88286.832714] [] el0_svc_naked+0x24/0x28 The patch makes sure that the event_data->work is initialised properly before we could possibly use it. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Tested-by: Mike Leach Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 022aa1a81b778789ee7cf3124595854276a0330d Author: Suzuki K Poulose Date: Mon Jun 5 14:15:03 2017 -0600 coresight: Fix reference count for software sources For software sources (i.e STM), there could be multiple agents generating the trace data, unlike the ETMs. So we need to properly do the accounting for the active number of users to disable the device when the last user goes away. Right now, the reference counting is broken for sources as we skip the actions when we detect that the source is enabled. This patch fixes the problem by adding the refcounting for software sources, even when they are enabled. Cc: Mathieu Poirier Reported-by: Robert Walker Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit f73f20e1fcc9fcdc7557fd1c4b1b72f924478688 Author: Suzuki K Poulose Date: Mon Jun 5 14:15:02 2017 -0600 coresight: Disable the path only when the source is disabled With a coresight tracing session, the components along the path from the source to sink are disabled after the source is disabled. However, if the source was not actually disabled due to active users, we should not disable the components in the path. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit eb7bfcce69a9283db76e6d95ce9a9fcd7abc047a Author: Colin Ian King Date: Thu May 18 08:42:49 2017 +0100 thunderbolt: fix spelling mistake: "missmatch" -> "mismatch" Trivial fix to spelling mistake in tb_sw_warn warning message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a038c0372ee67b326599f214f387aebb67ccf578 Author: Mika Westerberg Date: Tue Jun 6 15:25:19 2017 +0300 MAINTAINERS: Add maintainers for Thunderbolt driver We will be helping Andreas to maintain the Thunderbolt driver. Signed-off-by: Michael Jamet Signed-off-by: Yehezkel Bernat Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit 163f1511520386c74a86a2ce2b1dbef07a227713 Author: Mika Westerberg Date: Tue Jun 6 15:25:18 2017 +0300 thunderbolt: Add documentation how Thunderbolt bus can be used Since there are no such tool yet that handles all the low-level details of connecting devices and upgrading their firmware, add a small document that shows how the Thunderbolt bus can be used directly from command line. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/thunderbolt.rst | 199 ++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+) commit e6b245ccd524441f462f1ca1fe726123dcedeeee Author: Mika Westerberg Date: Tue Jun 6 15:25:17 2017 +0300 thunderbolt: Add support for host and device NVM firmware upgrade Starting from Intel Falcon Ridge the NVM firmware can be upgraded by using DMA configuration based mailbox commands. If we detect that the host or device (device support starts from Intel Alpine Ridge) has the DMA configuration based mailbox we expose NVM information to the userspace as two separate Linux NVMem devices: nvm_active and nvm_non_active. The former is read-only portion of the active NVM which firmware upgrade tools can be use to find out suitable NVM image if the device identification strings are not enough. The latter is write-only portion where the new NVM image is to be written by the userspace. It is up to the userspace to find out right NVM image (the kernel does very minimal validation). The ICM firmware itself authenticates the new NVM firmware and fails the operation if it is not what is expected. We also expose two new sysfs files per each switch: nvm_version and nvm_authenticate which can be used to read the active NVM version and start the upgrade process. We also introduce safe mode which is the mode a switch goes when it does not have properly authenticated firmware. In this mode the switch only accepts a couple of commands including flashing a new NVM firmware image and triggering power cycle. This code is based on the work done by Amir Levy and Michael Jamet. Signed-off-by: Michael Jamet Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-thunderbolt | 26 + drivers/thunderbolt/Kconfig | 1 + drivers/thunderbolt/domain.c | 18 + drivers/thunderbolt/icm.c | 33 +- drivers/thunderbolt/nhi.h | 1 + drivers/thunderbolt/switch.c | 603 +++++++++++++++++++++++- drivers/thunderbolt/tb.c | 7 + drivers/thunderbolt/tb.h | 40 +- 8 files changed, 706 insertions(+), 23 deletions(-) commit f67cf491175a315ca86c9b349708bfed7b1f40c1 Author: Mika Westerberg Date: Tue Jun 6 15:25:16 2017 +0300 thunderbolt: Add support for Internal Connection Manager (ICM) Starting from Intel Falcon Ridge the internal connection manager running on the Thunderbolt host controller has been supporting 4 security levels. One reason for this is to prevent DMA attacks and only allow connecting devices the user trusts. The internal connection manager (ICM) is the preferred way of connecting Thunderbolt devices over software only implementation typically used on Macs. The driver communicates with ICM using special Thunderbolt ring 0 (control channel) messages. In order to handle these messages we add support for the ICM messages to the control channel. The security levels are as follows: none - No security, all tunnels are created automatically user - User needs to approve the device before tunnels are created secure - User need to approve the device before tunnels are created. The device is sent a challenge on future connects to be able to verify it is actually the approved device. dponly - Only Display Port and USB tunnels can be created and those are created automatically. The security levels are typically configurable from the system BIOS and by default it is set to "user" on many systems. In this patch each Thunderbolt device will have either one or two new sysfs attributes: authorized and key. The latter appears for devices that support secure connect. In order to identify the device the user can read identication information, including UUID and name of the device from sysfs and based on that make a decision to authorize the device. The device is authorized by simply writing 1 to the "authorized" sysfs attribute. This is following the USB bus device authorization mechanism. The secure connect requires an additional challenge step (writing 2 to the "authorized" attribute) in future connects when the key has already been stored to the NVM of the device. Non-ICM systems (before Alpine Ridge) continue to use the existing functionality and the security level is set to none. For systems with Alpine Ridge, even on Apple hardware, we will use ICM. This code is based on the work done by Amir Levy and Michael Jamet. Signed-off-by: Michael Jamet Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-thunderbolt | 48 + drivers/thunderbolt/Kconfig | 12 +- drivers/thunderbolt/Makefile | 2 +- drivers/thunderbolt/ctl.c | 2 + drivers/thunderbolt/domain.c | 195 +++++ drivers/thunderbolt/icm.c | 1058 +++++++++++++++++++++++ drivers/thunderbolt/nhi.c | 33 +- drivers/thunderbolt/nhi_regs.h | 7 + drivers/thunderbolt/switch.c | 222 +++++ drivers/thunderbolt/tb.c | 7 + drivers/thunderbolt/tb.h | 79 ++ drivers/thunderbolt/tb_msgs.h | 152 ++++ 12 files changed, 1805 insertions(+), 12 deletions(-) commit bdccf295d7cdf6f28ceec1dcc31a79d0a1697d21 Author: Mika Westerberg Date: Tue Jun 6 15:25:15 2017 +0300 thunderbolt: Do not touch the hardware if the NHI is gone on resume On PCs the NHI host controller is only present when there is a device connected. When the last device is disconnected the host controller will dissappear shortly (within 10s). Now if that happens when we are suspended we should not try to touch the hardware anymore, so add a flag for this and check it before we re-enable rings. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/nhi.c | 12 ++++++++++++ drivers/thunderbolt/nhi.h | 3 +++ 2 files changed, 15 insertions(+) commit 3e13676862f90dbf5b00d57d5599e57788289897 Author: Mika Westerberg Date: Tue Jun 6 15:25:14 2017 +0300 thunderbolt: Add support for DMA configuration based mailbox The DMA (NHI) port of a switch provides access to the NVM of the host controller (and devices starting from Intel Alpine Ridge). The NVM contains also more complete DROM for the root switch including vendor and device identification strings. This will look for the DMA port capability for each switch and if found populates sw->dma_port. We then teach tb_drom_read() to read the DROM information from NVM if available for the root switch. The DMA port capability also supports upgrading the NVM for both host controller and devices which will be added in subsequent patches. This code is based on the work done by Amir Levy and Michael Jamet. Signed-off-by: Michael Jamet Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/Makefile | 2 +- drivers/thunderbolt/dma_port.c | 524 +++++++++++++++++++++++++++++++++++++++++ drivers/thunderbolt/dma_port.h | 34 +++ drivers/thunderbolt/eeprom.c | 51 +++- drivers/thunderbolt/switch.c | 30 +++ drivers/thunderbolt/tb.h | 5 + 6 files changed, 644 insertions(+), 2 deletions(-) commit 2c3c4197c9dd878e39e249e1da64bcffceb8a5c4 Author: Mika Westerberg Date: Tue Jun 6 15:25:13 2017 +0300 thunderbolt: Store Thunderbolt generation in the switch structure In some cases it is useful to know what is the Thunderbolt generation the switch supports. This introduces a new field to struct switch that stores the generation of the switch based on the device ID. Unknown switches (there should be none) are assumed to be first generation to be on the safe side. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/switch.c | 55 ++++++++++++++++++++++++++++++-------------- drivers/thunderbolt/tb.h | 2 ++ 2 files changed, 40 insertions(+), 17 deletions(-) commit cd446ee2e64f03d0e3d8463bf826aaebe0005149 Author: Mika Westerberg Date: Tue Jun 6 15:25:12 2017 +0300 thunderbolt: Add support for NHI mailbox The host controller includes two sets of registers that are used to communicate with the firmware. Add functions that can be used to access these registers. This code is based on the work done by Amir Levy and Michael Jamet. Signed-off-by: Michael Jamet Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/nhi.c | 58 ++++++++++++++++++++++++++++++++++++++++++ drivers/thunderbolt/nhi.h | 16 ++++++++++++ drivers/thunderbolt/nhi_regs.h | 11 ++++++++ 3 files changed, 85 insertions(+) commit 5e2781bcb1e876d314832489ff8177ef917d9b45 Author: Mika Westerberg Date: Tue Jun 6 15:25:11 2017 +0300 thunderbolt: Add new Thunderbolt PCI IDs Add Intel Win Ridge (Thunderbolt 2) and Alpine Ridge (Thunderbolt 3) controller PCI IDs to the list of supported devices. This code is based on the work done by Amir Levy and Michael Jamet. Signed-off-by: Michael Jamet Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/nhi.c | 11 +++++++++++ drivers/thunderbolt/nhi.h | 17 +++++++++++++++++ drivers/thunderbolt/switch.c | 19 ++++++++++++++----- 3 files changed, 42 insertions(+), 5 deletions(-) commit d7f781bfdbf4eb7c5706c9974b8bf6d3c82e69c1 Author: Mika Westerberg Date: Tue Jun 6 15:25:10 2017 +0300 thunderbolt: Rework control channel to be more reliable If a request times out the response might arrive right after the request is failed. This response is pushed to the kfifo and next request will read it instead. Since it most likely will not pass our validation checks in parse_header() the next request will fail as well, and response to that request will be pushed to the kfifo, ad infinitum. We end up in a situation where all requests fail and no devices can be added anymore until the driver is unloaded and reloaded again. To overcome this, rework the control channel so that we will have a queue of outstanding requests. Each request will be handled in turn and the response is validated against what is expected. Unexpected packets (for example responses for requests that have been timed out) are dropped. This model is copied from Greybus implementation with small changes here and there to get it cope with Thunderbolt control packets. In addition the configuration packets support sequence number which the switch is supposed to copy from the request to response. We use this to drop responses that are already timed out. Taking advantage of the sequence number, we automatically retry configuration read/write 4 times before giving up. Also timeout is not a programming error so there is no need to trigger a scary backtrace (WARN), instead we just log a warning. After all Thunderbolt devices are hot-pluggable by definition which means user can unplug a device any time and that is totally acceptable. With this change there is no need to take the global domain lock when sending configuration packets anymore. This is useful when we add support for cross-domain (XDomain) communication later on. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/ctl.c | 477 +++++++++++++++++++++++++++++++++++++++------- drivers/thunderbolt/ctl.h | 65 +++++++ drivers/thunderbolt/tb.h | 2 +- 3 files changed, 473 insertions(+), 71 deletions(-) commit 81a54b5e1986d02da33c59133556ce9fe2032049 Author: Mika Westerberg Date: Tue Jun 6 15:25:09 2017 +0300 thunderbolt: Let the connection manager handle all notifications Currently the control channel (ctl.c) handles the one supported notification (PLUG_EVENT) and sends back ACK accordingly. However, we are going to add support for the internal connection manager (ICM) that needs to handle a different notifications. So instead of dealing everything in the control channel, we change the callback to take an arbitrary thunderbolt packet and convert the native connection manager to handle the event itself. In addition we only push replies we know of to the response FIFO. Everything else is treated as notification (or request) and is expected to be dealt by the connection manager implementation. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/ctl.c | 86 ++++++++++++++++++++++++++++++-------------- drivers/thunderbolt/ctl.h | 5 +-- drivers/thunderbolt/domain.c | 15 +++++++- drivers/thunderbolt/tb.c | 30 ++++++++++++---- drivers/thunderbolt/tb.h | 5 +-- 5 files changed, 103 insertions(+), 38 deletions(-) commit 05c242e9e47d210ed6cbef31f2c441fa6ee325c6 Author: Mika Westerberg Date: Tue Jun 6 15:25:08 2017 +0300 thunderbolt: Expose make_header() to other files We will be using this function in files introduced in subsequent patches. While there the function is renamed to tb_cfg_make_header() following tb_cfg_get_route(). Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/ctl.c | 19 ++++--------------- drivers/thunderbolt/ctl.h | 11 +++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) commit ac6c44de503e51f0eb757e5321724846525cb29f Author: Mika Westerberg Date: Tue Jun 6 15:25:07 2017 +0300 thunderbolt: Expose get_route() to other files We are going to use it when we change the connection manager to handle events itself. Also rename it to follow naming convention used in functions exposed in ctl.h. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/ctl.c | 19 +++++++------------ drivers/thunderbolt/ctl.h | 4 ++++ 2 files changed, 11 insertions(+), 12 deletions(-) commit 32af9434f0b9fd31a68bf5be204667c1e17ddffe Author: Mika Westerberg Date: Tue Jun 6 15:25:06 2017 +0300 thunderbolt: Move control channel messages to tb_msgs.h We will be forwarding notifications received from the control channel to the connection manager implementations. This way they can decide what to do if anything when a notification is received. To be able to use control channel messages from other files, move them to tb_msgs.h. No functional changes intended. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/ctl.c | 76 ----------------------------- drivers/thunderbolt/ctl.h | 16 +------ drivers/thunderbolt/tb_msgs.h | 108 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+), 91 deletions(-) commit 72ee33907b629355d8fd1980140a467041a9f519 Author: Mika Westerberg Date: Tue Jun 6 15:25:05 2017 +0300 thunderbolt: Read vendor and device name from DROM The device DROM contains name of the vendor and device among other things. Extract this information and expose it to the userspace via two new attributes. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-thunderbolt | 14 +++++++++++ drivers/thunderbolt/eeprom.c | 32 +++++++++++++++++++++++++ drivers/thunderbolt/switch.c | 22 +++++++++++++++++ drivers/thunderbolt/tb.h | 4 ++++ 4 files changed, 72 insertions(+) commit 02b17a41ad102934a3772ffc82f345345c232ee4 Author: Lukas Wunner Date: Tue Jun 6 15:25:04 2017 +0300 thunderbolt: Refactor and fix parsing of port drom entries Currently tb_drom_parse_entry() is only able to parse drom entries of type TB_DROM_ENTRY_PORT. Rename it to tb_drom_parse_entry_port(). Fold tb_drom_parse_port_entry() into it. Its return value is currently ignored. Evaluate it and abort parsing on error. Change tb_drom_parse_entries() to accommodate for parsing of other entry types than TB_DROM_ENTRY_PORT. Signed-off-by: Lukas Wunner Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/eeprom.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 390229455535d75a9bdd19437054413d677fc7b0 Author: Mika Westerberg Date: Tue Jun 6 15:25:03 2017 +0300 thunderbolt: Do not fail if DROM data CRC32 is invalid There are devices out there where CRC32 of the DROM is not correct. One reason for this is that the ICM firmware does not validate it and it seems that neither does the Apple driver. To be able to support such devices we continue parsing the DROM contents regardless of whether CRC32 failed or not. We still keep the warning there. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/eeprom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f53e7676046db175dc6ac78d429dd5077a9afbba Author: Mika Westerberg Date: Tue Jun 6 15:25:02 2017 +0300 thunderbolt: Fail switch adding operation if reading DROM fails All non-root switches are expected to have DROM so if the operation fails, it might be due the user unlugging the device. There is no point continuing adding the switch further in that case. Just bail out. For root switches (hosts) the DROM is either retrieved from a EFI variable, NVM or hard-coded. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/switch.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bfe778ac49826ced3dceb6416038e1cd887ce2bd Author: Mika Westerberg Date: Tue Jun 6 15:25:01 2017 +0300 thunderbolt: Convert switch to a device Thunderbolt domain consists of switches that are connected to each other, forming a bus. This will convert each switch into a real Linux device structure and adds them to the domain. The advantage here is that we get all the goodies from the driver core, like reference counting and sysfs hierarchy for free. Also expose device identification information to the userspace via new sysfs attributes. In order to support internal connection manager (ICM) we separate switch configuration into its own function (tb_switch_configure()) which is only called by the existing native connection manager implementation used on Macs. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-thunderbolt | 22 ++ drivers/thunderbolt/eeprom.c | 2 + drivers/thunderbolt/switch.c | 261 +++++++++++++++++++----- drivers/thunderbolt/tb.c | 40 +++- drivers/thunderbolt/tb.h | 45 +++- 5 files changed, 303 insertions(+), 67 deletions(-) commit 9d3cce0b613689ee849a505ffac179af0ae9fff2 Author: Mika Westerberg Date: Tue Jun 6 15:25:00 2017 +0300 thunderbolt: Introduce thunderbolt bus and connection manager Thunderbolt fabric consists of one or more switches. This fabric is called domain and it is controlled by an entity called connection manager. The connection manager can be either internal (driven by a firmware running on the host controller) or external (software driver). This driver currently implements support for the latter. In order to manage switches and their properties more easily we model this domain structure as a Linux bus. Each host controller adds a domain device to this bus, and these devices are named as domainN where N stands for index or id of the current domain. We then abstract connection manager specific operations into a new structure tb_cm_ops and convert the existing tb.c to fill those accordingly. This makes it easier to add support for the internal connection manager in subsequent patches. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/Makefile | 2 +- drivers/thunderbolt/domain.c | 230 +++++++++++++++++++++++++++++++++++++++ drivers/thunderbolt/nhi.c | 31 ++++-- drivers/thunderbolt/tb.c | 156 ++++++++++++-------------- drivers/thunderbolt/tb.h | 70 +++++++++--- drivers/thunderbolt/tunnel_pci.c | 9 +- 6 files changed, 377 insertions(+), 121 deletions(-) commit c9843ebbb83a120094aa3a55bc0190d285e8384a Author: Mika Westerberg Date: Tue Jun 6 15:24:59 2017 +0300 thunderbolt: Allow passing NULL to tb_ctl_free() Following the usual pattern used in many places, we allow passing NULL pointer to tb_ctl_free(). Then the user can call the function regardless if it has allocated control channel or not making the code bit simpler. Suggested-by: Andy Shevchenko Signed-off-by: Mika Westerberg Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/ctl.c | 4 ++++ 1 file changed, 4 insertions(+) commit da2da04b8d4476a411feb2a12b47792aebbc142f Author: Mika Westerberg Date: Tue Jun 6 15:24:58 2017 +0300 thunderbolt: Rework capability handling Organization of the capabilities in switches and ports is not so random after all. Rework the capability handling functionality so that it follows how capabilities are organized and provide two new functions (tb_switch_find_vse_cap() and tb_port_find_cap()) which can be used to extract capabilities for ports and switches. Then convert the current users over these. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/cap.c | 169 +++++++++++++++++++++------------------ drivers/thunderbolt/switch.c | 6 +- drivers/thunderbolt/tb.c | 8 +- drivers/thunderbolt/tb.h | 3 +- drivers/thunderbolt/tb_regs.h | 50 +++++++++--- drivers/thunderbolt/tunnel_pci.c | 8 +- 6 files changed, 142 insertions(+), 102 deletions(-) commit 046bee1f9ab83b4549c185804ae9cbfbb8f9641f Author: Mika Westerberg Date: Tue Jun 6 15:24:57 2017 +0300 thunderbolt: Add MSI-X support Intel Thunderbolt controllers support up to 16 MSI-X vectors. Using MSI-X is preferred over MSI or legacy interrupt and may bring additional performance because there is no need to check the status registers which interrupt was triggered. While there we convert comments in structs tb_ring and tb_nhi to follow kernel-doc format more closely. This code is based on the work done by Amir Levy and Michael Jamet. Signed-off-by: Michael Jamet Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/ctl.c | 4 +- drivers/thunderbolt/nhi.c | 165 +++++++++++++++++++++++++++++++++++------ drivers/thunderbolt/nhi.h | 56 +++++++++++--- drivers/thunderbolt/nhi_regs.h | 9 +++ 4 files changed, 198 insertions(+), 36 deletions(-) commit b2466355c0007cbd853c3babce0cdb6ef1ff23bc Author: Mika Westerberg Date: Tue Jun 6 15:24:56 2017 +0300 thunderbolt: Do not warn about newer DROM versions DROM version 2 is compatible with the previous generation so no need to warn about that. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df1421b5f72979e48096f68c253f59aa7e8e7468 Author: Mika Westerberg Date: Tue Jun 6 15:24:55 2017 +0300 thunderbolt: Do not try to read UID if DROM offset is read as 0 At least Falcon Ridge when in host mode does not have any kind of DROM available and reading DROM offset returns 0 for these. Do not try to read DROM any further in that case. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/eeprom.c | 3 +++ 1 file changed, 3 insertions(+) commit 08a5e4cebec543bfa4a6d119fc18f0ed8fd9d8ce Author: Mika Westerberg Date: Tue Jun 6 15:24:54 2017 +0300 thunderbolt: No need to read UID of the root switch on resume The root switch is part of the host controller and cannot be physically removed, so there is no point of reading UID again on resume in order to check if the root switch is still the same. Suggested-by: Andreas Noever Signed-off-by: Mika Westerberg Signed-off-by: Andreas Noever Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/switch.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 16a1258af5d8e1bd58e20fc70069f9dd91cc5b34 Author: Mika Westerberg Date: Tue Jun 6 15:24:53 2017 +0300 thunderbolt: Use const buffer pointer in write operations These functions should not (and do not) modify the argument in any way so make it const. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Reviewed-by: Greg Kroah-Hartman Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/ctl.c | 8 ++++---- drivers/thunderbolt/ctl.h | 4 ++-- drivers/thunderbolt/tb.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit f02e6c61bc1f5004ae37a539a1436af12eda6172 Author: Helge Deller Date: Thu Jun 8 22:11:00 2017 +0200 parisc: Don't hardcode PSW values in hpmc code Signed-off-by: Helge Deller arch/parisc/kernel/hpmc.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3f4fb1084d9453c0b0fa2a7f51fe7e7d99b6722f Author: Helge Deller Date: Thu Jun 8 22:09:18 2017 +0200 parisc: Don't hardcode PSW values in gsc_*() functions Signed-off-by: Helge Deller arch/parisc/include/asm/io.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b752c7b20709e0ecee0f7d4ef6ef82fcc27408b6 Author: Helge Deller Date: Thu Jun 8 22:06:54 2017 +0200 parisc: Avoid zeroing gr[0] in fixup_exception() Register gr[0] holds the PSW in interrupt context. It's absolutely unlikely that the compiler will use register zero in a get_user() call, but better BUG on such a case in fixup_exception() anyway. Signed-off-by: Helge Deller arch/parisc/mm/fault.c | 1 + 1 file changed, 1 insertion(+) commit 649aa24254e85bf6bd7807dd372d083707852b1f Author: Helge Deller Date: Mon May 29 17:14:16 2017 +0200 parisc/mm: Ensure IRQs are off in switch_mm() This is because of commit f98db6013c55 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler") in which switch_mm_irqs_off() is called by the scheduler, vs switch_mm() which is used by use_mm(). This patch lets the parisc code mirror the x86 and powerpc code, ie. it disables interrupts in switch_mm(), and optimises the scheduler case by defining switch_mm_irqs_off(). Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Helge Deller arch/parisc/include/asm/mmu_context.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 5f0f187fd0cc755cfa7d51b50f68a16fca41c813 Author: Aleksa Sarai Date: Sun Jun 4 00:15:14 2017 +1000 tty: add compat_ioctl callbacks In order to avoid future diversions between fs/compat_ioctl.c and drivers/tty/pty.c, define .compat_ioctl callbacks for the relevant tty_operations structs. Since both pty_unix98_ioctl() and pty_bsd_ioctl() are compatible between 32-bit and 64-bit userspace no special translation is required. Signed-off-by: Aleksa Sarai Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/pty.c | 22 ++++++++++++++++++++++ fs/compat_ioctl.c | 6 ------ 2 files changed, 22 insertions(+), 6 deletions(-) commit bea8be656185a2808a2f255f4a91ff18215a9d0c Author: Jan Kiszka Date: Fri Jun 2 09:28:44 2017 +0200 serial: exar: Leave MPIOs as output for Commtech adapters Commtech adapters apparently need the original setting as outputs, see https://marc.info/?l=linux-gpio&m=149557425201323&w=2. Account for that. Fixes: 7dea8165f1d6 ("serial: exar: Preconfigure xr17v35x MPIOs as output") Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 72ce5732eeca023abb04e40eb77a6bc1169d9b9d Author: Andy Shevchenko Date: Wed Jun 7 18:19:31 2017 +0300 tty/serial: atmel: Remove AVR32 bits from the driver AVR32 is gone. Now it's time to clean up the driver by removing leftovers that was used by AVR32 related code. Signed-off-by: Andy Shevchenko Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- drivers/tty/serial/Kconfig | 16 ++++++++-------- drivers/tty/serial/atmel_serial.c | 20 +------------------- include/uapi/linux/serial_core.h | 2 +- 4 files changed, 11 insertions(+), 29 deletions(-) commit 41633edfb1450d150712be73828260929d9d5c79 Author: Chen-Yu Tsai Date: Sat Jun 3 22:44:26 2017 +0800 pinctrl: sunxi: Add support for A83T R_PIO The R_PIO on the A83T is almost the same as the one found on the A64, except that the CIR_RX function was moved from pin PL11 to pin PL12. Add a driver for it. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-a83t-r.c | 128 +++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) commit 1c65a879cc494af8bf20eb47996e751034a53199 Author: Adam Borowski Date: Sat Jun 3 09:08:25 2017 +0200 vt: fix \e[2m using the wrong placeholder color on graphical consoles Only vgacon and sisusbcon did it right, the rest (via generic code) tried underline (usually cyan). Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a59059554d4169679e6745ce76a0af4d4a56cb7a Author: Chen-Yu Tsai Date: Sat Jun 3 22:44:25 2017 +0800 dt-bindings: pinctrl: sunxi: Add compatible string for A83T R_PIO The R_PIO on the A83T is almost the same as the one found on the A64, except that the CIR_RX function was moved from pin PL11 to pin PL12. Add a compatible string for it. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + 1 file changed, 1 insertion(+) commit e0ac3f98254da5304f0a0ffe6f033eb7764644b1 Merge: 8bc39bc f8564c9 Author: Greg Kroah-Hartman Date: Fri Jun 9 11:19:02 2017 +0200 Merge branch 'vt_copy_cleanup' into tty-next The vt copy_from/to_user cleanups were in a separate branch for others to work off of. Signed-off-by: Greg Kroah-Hartman commit 68227c03cba84a24faf8a7277d2b1a03c8959c2c Author: Mateusz Jurczyk Date: Wed Jun 7 12:26:49 2017 +0200 fuse: initialize the flock flag in fuse_file on allocation Before the patch, the flock flag could remain uninitialized for the lifespan of the fuse_file allocation. Unless set to true in fuse_file_flock(), it would remain in an indeterminate state until read in an if statement in fuse_release_common(). This could consequently lead to taking an unexpected branch in the code. The bug was discovered by a runtime instrumentation designed to detect use of uninitialized memory in the kernel. Signed-off-by: Mateusz Jurczyk Fixes: 37fb3a30b462 ("fuse: fix flock") Cc: # v3.1+ Signed-off-by: Miklos Szeredi fs/fuse/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf1395143f0ee68f64553ab408abfa428eb8e8dd Author: Marek Szyprowski Date: Mon Apr 24 08:42:22 2017 +0200 clk: samsung: exynos-clkout: Convert to the new clk_hw API Clock providers should use the new struct clk_hw based API, so convert Exynos CLKOUT clock provider to the new approach. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos-clkout.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 5b2c3da14ce1e64f66070e426df697652364e16e Author: Marek Szyprowski Date: Mon May 15 08:50:47 2017 +0200 clk: samsung: exynos-audss: Convert to the new clk_hw API Clock providers should use the new struct clk_hw based API, so convert Exynos Audio Subsystem clock provider to the new approach. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski drivers/clk/samsung/clk-exynos-audss.c | 57 +++++++++++++++++----------------- 1 file changed, 29 insertions(+), 28 deletions(-) commit 18f75c0a978ac7a42af06cd6e114c9a8c87fd28a Author: Scott Branden Date: Fri Jun 2 11:52:21 2017 -0700 pinctrl: bcm: cleanup Broadcom license headers Use consistent license headers for Broadcom files by placing additional comments outside of standard legal header. Also, update legal header to 2017 format as "Broadcom Corporation" has changed to "Broadcom". Signed-off-by: Scott Branden Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 9 ++------- drivers/pinctrl/bcm/pinctrl-cygnus-mux.c | 9 +++++---- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 6 ++++-- drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 6 ++++-- 4 files changed, 15 insertions(+), 15 deletions(-) commit f8564c93e0907651e21d586920e629227bb0d024 Author: Adam Borowski Date: Sat Jun 3 09:35:09 2017 +0200 vt: drop access_ok() calls in unimap ioctls Done by copy_{from,to}_user(). Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt_ioctl.c | 8 -------- 1 file changed, 8 deletions(-) commit 4f1be1b5d9aaef9c887140de5f2b9c2a989577d8 Author: Adam Borowski Date: Sat Jun 3 09:35:08 2017 +0200 vt: use memdup_user in PIO_UNIMAP ioctl Again, a nice linear transfer that simplifies the code. Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 915f0a8d2884d05538ae5c06e09f40d364fa2c3f Author: Adam Borowski Date: Sat Jun 3 09:35:07 2017 +0200 vt: use copy_to_user instead of __put_user in GIO_UNIMAP ioctl A nice big linear transfer, no need to flip stac/PAN/etc every half-entry. Also, yay __put_user() after checking only read. Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 6987dc8a70976561d22450b5858fc9767788cc1c Author: Adam Borowski Date: Sat Jun 3 09:35:06 2017 +0200 vt: fix unchecked __put_user() in tioclinux ioctls Only read access is checked before this call. Actually, at the moment this is not an issue, as every in-tree arch does the same manual checks for VERIFY_READ vs VERIFY_WRITE, relying on the MMU to tell them apart, but this wasn't the case in the past and may happen again on some odd arch in the future. If anyone cares about 3.7 and earlier, this is a security hole (untested) on real 80386 CPUs. Signed-off-by: Adam Borowski CC: stable@vger.kernel.org # v3.7- Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cc1e66f92bf52abfcb55bbb8d6f48fa7a922b7ce Author: Adam Borowski Date: Sat Jun 3 09:35:05 2017 +0200 vt: use copy_from/to_user instead of __get/put_user for scrnmap ioctls Linus wants to get rid of these functions, and these uses are especially egregious: they copy a big linear array element by element. Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) commit 4fe99816a1ab0323c39949bd0ee99a97b7e5875f Author: Greg Kroah-Hartman Date: Tue Jun 6 15:48:11 2017 +0200 tty: serdev: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Rob Herring Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/core.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 33acc6db64f77a7bd773f4bc5cc8fcd1b6976ddc Author: Greg Kroah-Hartman Date: Tue Jun 6 14:27:08 2017 +0200 sparc: vio: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Acked-by: "David S. Miller" Cc: Signed-off-by: Greg Kroah-Hartman arch/sparc/kernel/vio.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 480104b778876bbf02df972d0bf89266fab82e93 Author: Greg Kroah-Hartman Date: Tue Jun 6 14:17:37 2017 +0200 hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Acked-by: Srinivas Pandruvada Acked-by: Jiri Kosina Cc: Benjamin Tissoires Cc: Wei Yongjun Cc: Bhumika Goyal Cc: Rasmus Villemoes Cc: Signed-off-by: Greg Kroah-Hartman drivers/hid/intel-ish-hid/ishtp/bus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 63b754a6bc52a551122fd96cb7110b16a89d607b Author: Greg Kroah-Hartman Date: Tue Jun 6 14:17:32 2017 +0200 hwtracing: intel_th: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, and as this driver isn't even using it, just drop the NULL setting, it is pointless. Cc: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/core.c | 1 - 1 file changed, 1 deletion(-) commit 823a44ac23d107b8450f413e32d83c9ed82410ff Author: Greg Kroah-Hartman Date: Tue Jun 6 14:17:22 2017 +0200 powerpc: ibmebus: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Bart Van Assche Cc: Johan Hovold Cc: Robin Murphy Cc: Rob Herring Cc: Lars-Peter Clausen Cc: Signed-off-by: Greg Kroah-Hartman arch/powerpc/platforms/pseries/ibmebus.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 892533e191a46ec478615e13426921ebe45fa297 Author: Greg Kroah-Hartman Date: Tue Jun 6 14:17:17 2017 +0200 powerpc: ps3: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Seems-ok: Geoff Levand Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Signed-off-by: Greg Kroah-Hartman arch/powerpc/platforms/ps3/system-bus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 60bb70aa761ca4090a718926f8299364a0c61ae0 Author: Greg Kroah-Hartman Date: Tue Jun 6 14:17:12 2017 +0200 macintosh: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Benjamin Herrenschmidt Cc: Signed-off-by: Greg Kroah-Hartman drivers/macintosh/macio_asic.c | 4 ++-- drivers/macintosh/macio_sysfs.c | 29 +++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 10 deletions(-) commit 9f4ac349bd60ef463450a00aa5e19c67f5ad12e2 Author: Greg Kroah-Hartman Date: Tue Jun 6 14:17:02 2017 +0200 sh: superhyway: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Yoshinori Sato Cc: Rich Felker Cc: Greg Kroah-Hartman Cc: Signed-off-by: Greg Kroah-Hartman drivers/sh/superhyway/superhyway-sysfs.c | 29 +++++++++++++++++++---------- drivers/sh/superhyway/superhyway.c | 2 +- include/linux/superhyway.h | 2 +- 3 files changed, 21 insertions(+), 12 deletions(-) commit 39afc7af152519cc3f41dfb4460701e7c00c3391 Author: Greg Kroah-Hartman Date: Tue Jun 6 14:16:54 2017 +0200 rpmsg: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Ohad Ben-Cohen Acked-by: Bjorn Andersson Cc: Signed-off-by: Greg Kroah-Hartman drivers/rpmsg/rpmsg_core.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 966449a3d8a04e6ca539aba3d247140c130d96b1 Author: Greg Kroah-Hartman Date: Tue Jun 6 14:16:49 2017 +0200 amba: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Russell King Signed-off-by: Greg Kroah-Hartman drivers/amba/bus.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 9b7c6682270043415921ee73e584bdc4ee289fdf Author: Greg Kroah-Hartman Date: Tue Jun 6 14:16:38 2017 +0200 parisc: parisc_bus_type: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Bart Van Assche Cc: Doug Ledford Cc: Signed-off-by: Greg Kroah-Hartman arch/parisc/kernel/drivers.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 136e882fcceceacc377718e0f09b4e879e6a494d Author: Greg Kroah-Hartman Date: Tue Jun 6 14:16:30 2017 +0200 mips: sgi-ip22: ecard: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Ralf Baechle Cc: Signed-off-by: Greg Kroah-Hartman arch/mips/sgi-ip22/ip22-gio.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 71d1e5d71cec76e927a92354a7eb9d476e7054ad Author: Greg Kroah-Hartman Date: Tue Jun 6 14:14:16 2017 +0200 arm: ecard: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Russell King Cc: Signed-off-by: Greg Kroah-Hartman arch/arm/mach-rpc/ecard.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) commit 2421dfd6e0b1c588ff5769ba27295cd55d26180c Author: Tobias Klauser Date: Fri Jun 2 13:29:58 2017 +0200 pinctrl: sunxi: constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Suggested-by: Marc Zyngier Signed-off-by: Tobias Klauser Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e4b7eaa624d08433ab571920d50b6e14a70ab90 Author: Takashi Iwai Date: Wed Jun 7 14:23:22 2017 +0200 ALSA: sparc: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/sparc/cs4231.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbc57b2a3e74fd56581bc2acacade9eac22544bd Author: Takashi Iwai Date: Wed Jun 7 14:23:13 2017 +0200 ALSA: via82xx: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/via82xx.c | 4 ++-- sound/pci/via82xx_modem.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit de900b182ef1826e887c4458d7af0696f08fcc4b Author: Takashi Iwai Date: Wed Jun 7 14:22:55 2017 +0200 ALSA: sonicvibes: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/sonicvibes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f9fee5534dedd15e69572d2fc2f050e4be3b1d6a Author: Takashi Iwai Date: Wed Jun 7 14:22:43 2017 +0200 ALSA: rme9652: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/rme9652/rme9652.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bdf84db72fe78a411aacd1a93375978c2941945f Author: Takashi Iwai Date: Wed Jun 7 14:22:35 2017 +0200 ALSA: hdspm: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/rme9652/hdspm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4640c034ebf59f7188dd1fb661e6be80e5598d0d Author: Takashi Iwai Date: Wed Jun 7 14:22:26 2017 +0200 ALSA: hdsp: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/rme9652/hdsp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 84e7b99865329394177db0d2a506c22b1c02dea1 Author: Takashi Iwai Date: Wed Jun 7 14:22:10 2017 +0200 ALSA: rme96: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/rme96.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a7f8009df4078fa28eb26f6caac89da60fd94a16 Author: Takashi Iwai Date: Wed Jun 7 14:22:02 2017 +0200 ALSA: rme32: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/rme32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3f2bdc45f36df349d9f9984252b612c57a8b1a73 Author: Takashi Iwai Date: Wed Jun 7 14:21:49 2017 +0200 ALSA: nm256: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/nm256/nm256.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f470ce622230b7ebfb88ec8db8676e278867046 Author: Takashi Iwai Date: Wed Jun 7 14:21:31 2017 +0200 ALSA: intel8x0: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/intel8x0.c | 12 ++++++------ sound/pci/intel8x0m.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit 965f19bed24d240c845401015e42ad5cb0cca00c Author: Takashi Iwai Date: Wed Jun 7 14:20:52 2017 +0200 ALSA: ice1724: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/ice1712/ice1724.c | 8 ++++---- sound/pci/ice1712/juli.c | 6 +++--- sound/pci/ice1712/maya44.c | 4 ++-- sound/pci/ice1712/quartet.c | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) commit 5cf30ddf81bd0074eb0d867fc99a6f52997db71b Author: Takashi Iwai Date: Wed Jun 7 14:20:40 2017 +0200 ALSA: ice1712: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/ice1712/ice1712.c | 4 ++-- sound/pci/ice1712/ice1712.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 50c697adfb7770a28081f73e7f9f6ddc5b55cfc5 Author: Takashi Iwai Date: Wed Jun 7 14:20:07 2017 +0200 ALSA: hda: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 10 +++++----- sound/pci/hda/patch_si3054.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit 44d715074d4006d30d3eaa35412f2d31896245ad Author: Takashi Iwai Date: Wed Jun 7 14:19:56 2017 +0200 ALSA: es1938: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/es1938.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8130829a9b73dca2bd9cc7ce8ea031405cb1757f Author: Takashi Iwai Date: Wed Jun 7 14:19:39 2017 +0200 ALSA: ens137x: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/ens1370.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d71a13f4c0e659c7ce7bef872c2e6a2287868e0e Author: Takashi Iwai Date: Wed Jun 7 14:19:28 2017 +0200 ALSA: fm801: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/fm801.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 973f1d6c9467e5f0e3988d1449abc4191090798f Author: Takashi Iwai Date: Wed Jun 7 14:19:20 2017 +0200 ALSA: emu10k1: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/emu10k1/emupcm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 54e848ceb736d21cd754b90f7a884ae9acf483f3 Author: Takashi Iwai Date: Wed Jun 7 14:19:05 2017 +0200 ALSA: cs46xx: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/cs46xx/cs46xx_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0fac3195a8b8677199404a62c7c5e74daaa942dd Author: Takashi Iwai Date: Wed Jun 7 14:18:47 2017 +0200 ALSA: cmipci: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/cmipci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 934cd5b76d6fb5bbdefd37815a2b9441eb09d02f Author: Takashi Iwai Date: Wed Jun 7 14:18:33 2017 +0200 ALSA: bt87x: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/bt87x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e2fd04f89e5d38c8df3c4b6dba771f2c46a8f44 Author: Takashi Iwai Date: Wed Jun 7 14:18:16 2017 +0200 ALSA: azt3328: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/azt3328.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e5eb6b745315c2c12f970929d410be920ae18bb Author: Takashi Iwai Date: Wed Jun 7 14:18:01 2017 +0200 ALSA: au88x0: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/au88x0/au88x0_pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c15ec07bafbe00b82b7a2e26102c8e41e9b4626d Author: Takashi Iwai Date: Wed Jun 7 14:17:39 2017 +0200 ALSA: atiixp: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/atiixp_modem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8eba3b30a239807f8d3b185befd9e9fef92cb5e9 Author: Takashi Iwai Date: Wed Jun 7 14:17:23 2017 +0200 ALSA: ali5451: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/pci/ali5451/ali5451.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d236d36107dec03a7755ee9a6dfc2961f269aa43 Author: Takashi Iwai Date: Wed Jun 7 14:17:04 2017 +0200 ALSA: parisc: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/parisc/harmony.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b3f477636eddcaa137b96e6c847fb466fadb19a Author: Takashi Iwai Date: Wed Jun 7 14:16:43 2017 +0200 ALSA: wss: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/isa/wss/wss_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b078bbfbb1a1083a69117bc894107cad6920a2ed Author: Takashi Iwai Date: Wed Jun 7 14:16:34 2017 +0200 ALSA: sb: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/isa/sb/sb8_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bfa516a109ae77dae34b69f36d09b8f9d329384b Author: Takashi Iwai Date: Wed Jun 7 14:16:25 2017 +0200 ALSA: gus: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/isa/gus/gus_pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21709121fb734715b4c4819aae36aad50cc88fd7 Author: Takashi Iwai Date: Wed Jun 7 14:16:10 2017 +0200 ALSA: es18xx: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/isa/es18xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4ea2bb7311deab401d01877f15c75e0803ac6257 Author: Takashi Iwai Date: Wed Jun 7 14:15:49 2017 +0200 ALSA: es1688: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/isa/es1688/es1688_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0adaf3bea166d21dfd420b8628ca74adf15d75f8 Author: Takashi Iwai Date: Wed Jun 7 14:12:16 2017 +0200 ALSA: cs423x: Constify hw_constraints snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai sound/isa/cs423x/cs4236_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecbaa83ee84cdf592c2891ca4c205b23d6b79a6f Author: Greg Kroah-Hartman Date: Thu Jun 8 10:12:42 2017 +0200 driver core: remove class_attrs from struct class This field is no longer used or needed (use class_groups instead), so it can be removed along with the driver core functionality that created and removed these files. Signed-off-by: Greg Kroah-Hartman drivers/base/class.c | 33 --------------------------------- include/linux/device.h | 2 -- 2 files changed, 35 deletions(-) commit dc307f921f5c4c0cc64675203065c9b6a94f0bcb Author: Greg Kroah-Hartman Date: Thu Jun 8 10:12:41 2017 +0200 pktcdvd: use class_groups instead of class_attrs The class_attrs pointer is long depreciated, and is about to be finally removed, so move to use the class_groups pointer instead. Cc: Acked-by: Jens Axboe Cc: Hannes Reinecke Cc: Jan Kara Cc: Mike Christie Cc: Bart Van Assche Signed-off-by: Greg Kroah-Hartman drivers/block/pktcdvd.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit d83bb159f4c6af4a7465ed457d554d30df95e890 Author: Greg Kroah-Hartman Date: Thu Jun 8 10:12:40 2017 +0200 gpio: use class_groups instead of class_attrs The class_attrs pointer is long depreciated, and is about to be finally removed, so move to use the class_groups pointer instead. Acked-by: Linus Walleij Cc: Alexandre Courbot Cc: Signed-off-by: Greg Kroah-Hartman drivers/gpio/gpiolib-sysfs.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 27104a53d02e7d5f154732f00aa8e9a05f31e08e Author: Greg Kroah-Hartman Date: Thu Jun 8 10:12:39 2017 +0200 zram: use class_groups instead of class_attrs The class_attrs pointer is long depreciated, and is about to be finally removed, so move to use the class_groups pointer instead. Cc: Minchan Kim Cc: Nitin Gupta Reviewed-by: Sergey Senozhatsky Signed-off-by: Greg Kroah-Hartman drivers/block/zram/zram_drv.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 219eccdabb3a877d285b35b59cfeb242381f9d50 Author: Greg Kroah-Hartman Date: Thu Jun 8 10:12:38 2017 +0200 mtd: use class_groups instead of class_attrs The class_attrs pointer is long depreciated, and is about to be finally removed, so move to use the class_groups pointer instead. Cc: Artem Bityutskiy Acked-by: Richard Weinberger Cc: David Woodhouse Cc: Brian Norris Cc: Boris Brezillon Cc: Marek Vasut Cc: Cyrille Pitchen Cc: Signed-off-by: Greg Kroah-Hartman drivers/mtd/ubi/build.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit f62014fcb9e4af6267dce6e3bf5dc40fdc58f255 Author: Greg Kroah-Hartman Date: Thu Jun 8 10:12:37 2017 +0200 scsi: ibmvscsi_tgt: remove use of class_attrs The class_attrs pointer is going away and it's not even being used in this driver, so just remove it entirely. Acked-by: "Bryant G. Ly" Cc: Michael Cyr Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Cc: Signed-off-by: Greg Kroah-Hartman drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 5 ----- 1 file changed, 5 deletions(-) commit 84c317ea0719e2ff39f686748e8d8e9f80e235d9 Author: Greg Kroah-Hartman Date: Thu Jun 8 10:12:36 2017 +0200 uwb: use class_groups instead of class_attrs The class_attrs pointer is long depreciated, and is about to be finally removed, so move to use the class_groups pointer instead. Signed-off-by: Greg Kroah-Hartman drivers/uwb/driver.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b8bfcb09a49d640a45268ad70651cef61b99b65d Author: Alexandre TORGUE Date: Wed May 31 11:10:43 2017 +0200 pinctrl: stm32: remove useless check There is no link between the number of elements of tab which contains all pin desc (located in each pinctrl-stm32xxxx.c files) and the pin number (defined in the tab). Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 5 ----- 1 file changed, 5 deletions(-) commit 6c9dc8435765603041d230f7f31326ff592dfefe Author: Jerome Brunet Date: Thu Jun 8 21:37:50 2017 +0200 pinctrl: meson: add interrupts to pinctrl data Add GPIO interrupt information to pinctrl data. Added to the original version from Jerome was data for Meson GXL. Signed-off-by: Jerome Brunet Signed-off-by: Heiner Kallweit Acked-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 22 ++++++++++---------- drivers/pinctrl/meson/pinctrl-meson-gxl.c | 20 +++++++++---------- drivers/pinctrl/meson/pinctrl-meson.h | 15 +++++++++----- drivers/pinctrl/meson/pinctrl-meson8.c | 20 +++++++++---------- drivers/pinctrl/meson/pinctrl-meson8b.c | 32 ++++++++++++++++++++---------- 5 files changed, 63 insertions(+), 46 deletions(-) commit 4c8127cb523982e0a474ad80b14b665dc2f37b3b Author: Heiner Kallweit Date: Wed Jun 7 07:44:20 2017 +0200 pinctrl: meson-gxbb: remove non-existing pin GPIOX_22 After commit 34e61801a3b9 "pinctrl: meson-gxbb: Add missing GPIODV_18 pin entry" I started to get the following warning: "meson-pinctrl c8834000.periphs:pinctrl@4b0: names 119 do not match number of GPIOs 120" It turned out that not the mentioned commit has a problem, it just revealed another problem which had existed before. There is no PIN GPIOX_22 on Meson GXBB. Fixes: 468c234f9ed7 ("pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC") Signed-off-by: Heiner Kallweit Reviewed-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 1 - 1 file changed, 1 deletion(-) commit bf8334845598a172b42ee487b05eb4394c86bce8 Author: Arvind Yadav Date: Fri Jun 9 12:35:43 2017 +0530 ALSA: vx: vx_pcm: constify vx_pcm_playback_ops and vx_pcm_capture_ops. File size before: text data bss dec hex filename 7126 240 0 7366 1cc6 sound/drivers/vx/vx_pcm.o File size After adding 'const': text data bss dec hex filename 7382 0 0 7382 1cd6 sound/drivers/vx/vx_pcm.o Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai sound/drivers/vx/vx_pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 642b7589da26d59ce36f9a4b1b5188f95e514de9 Author: Arvind Yadav Date: Fri Jun 9 11:39:56 2017 +0530 ALSA : pcsp: pcsp_lib: constify snd_pcsp_playback_ops File size before: text data bss dec hex filename 2027 168 1 2196 894 sound/drivers/pcsp/pcsp_lib.o File size After: text data bss dec hex filename 2155 40 1 2196 894 sound/drivers/pcsp/pcsp_lib.o Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai sound/drivers/pcsp/pcsp_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7802fb52564b5d6b4fdcf25a08d487897f9e4a8b Author: Takashi Sakamoto Date: Fri Jun 9 09:34:40 2017 +0900 ALSA: pcm: move fixup of info flag after selecting single parameters When drivers register no flags about information of PCM hardware, ALSA PCM core fixups it roughly. Currently, this operation places in a function snd_pcm_hw_refine(). It can be moved to a function fixup_unreferenced_params() because it doesn't affects operations between these two functions. This idea is better to bundle codes with similar purposes and this commit achieves it. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit f9a076bff053100c9c3d1d5cca33ca856688b782 Author: Takashi Sakamoto Date: Fri Jun 9 09:34:39 2017 +0900 ALSA: pcm: calculate non-mask/non-interval parameters always when possible A structure for parameters of PCM runtime has parameters which are not classified as mask/interval type. They are decided only when corresponding normal parameters have unique values. * struct snd_pcm_hw_params.msbits * struct snd_pcm_hw_params.rate_num * struct snd_pcm_hw_params.rate_den * struct snd_pcm_hw_params.fifo_size Current implementation of hw_params ioctl sometimes doesn't decide these parameters even if corresponding parameters are fixed, because these parameters are evaluated before a call of snd_pcm_hw_params_choose(). This commit adds a helper function to process the parameters and call it in proper positions. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 70 +++++++++++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 26 deletions(-) commit e02de47e3c020c7bc8ce587b1b98cfc817e7db8e Author: Takashi Sakamoto Date: Fri Jun 9 09:34:38 2017 +0900 ALSA: pcm: use helper functions to refer parameters as constants To fixup some parameters, ALSA PCM core refers the other parameters as constants. There're some macros for this purpose. This commit replaces codes with them. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit eceb4459df4a5b6127ae479280168847b9780b25 Author: Nicholas Bellinger Date: Thu Jun 1 20:21:33 2017 -0700 iscsi-target: Avoid holding ->tpg_state_lock during param update As originally reported by Jia-Ju, iscsit_tpg_enable_portal_group() holds iscsi_portal_group->tpg_state_lock while updating AUTHMETHOD via iscsi_update_param_value(), which performs a GFP_KERNEL allocation. However, since iscsit_tpg_enable_portal_group() is already protected by iscsit_get_tpg() -> iscsi_portal_group->tpg_access_lock in it's parent caller, ->tpg_state_lock only needs to be held when setting TPG_STATE_ACTIVE. Reported-by: Jia-Ju Bai Reviewed-by: Jia-Ju Bai Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_tpg.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9ae0e9ade56f23765366d2cfad24e65f28df977d Author: Nicholas Bellinger Date: Thu Jun 1 03:11:18 2017 -0700 target/configfs: Kill se_lun->lun_link_magic Instead of using a hardcoded magic value in se_lun when verifying a target config_item symlink source during target_fabric_mappedlun_link(), go ahead and use target_fabric_port_item_ops directly instead. Reviewed-by: Christoph Hellwig Cc: Mike Christie Cc: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/target_core_fabric_configfs.c | 13 ++++++++----- drivers/target/target_core_tpg.c | 1 - include/target/target_core_base.h | 2 -- 3 files changed, 8 insertions(+), 8 deletions(-) commit c17cd24959cdb12c855dc61e20c36fa25f21f3d3 Author: Nicholas Bellinger Date: Thu Jun 1 03:10:53 2017 -0700 target/configfs: Kill se_device->dev_link_magic Instead of using a hardcoded magic value in se_device when verifying a target config_item symlink source during target_fabric_port_link(), go ahead and use target_core_dev_item_ops directly instead. Reviewed-by: Christoph Hellwig Cc: Mike Christie Cc: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 6 +++++- drivers/target/target_core_device.c | 1 - drivers/target/target_core_fabric_configfs.c | 12 +++++++----- include/target/target_core_base.h | 2 -- 4 files changed, 12 insertions(+), 9 deletions(-) commit 2237498f0b5c74768f688ebaf16eab2c708d5fdb Author: Nicholas Bellinger Date: Tue Apr 11 22:21:47 2017 -0700 target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout The people who are actively using iblock_execute_write_same_direct() are doing so in the context of ESX VAAI BlockZero, together with EXTENDED_COPY and COMPARE_AND_WRITE primitives. In practice though I've not seen any users of IBLOCK WRITE_SAME for anything other than VAAI BlockZero, so just using blkdev_issue_zeroout() when available, and falling back to iblock_execute_write_same() if the WRITE_SAME buffer contains anything other than zeros should be OK. (Hook up max_write_zeroes_sectors to signal LBPRZ feature bit in target_configure_unmap_from_queue - nab) Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Cc: Christoph Hellwig Cc: Mike Christie Cc: Hannes Reinecke Cc: Jens Axboe Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 2 +- drivers/target/target_core_iblock.c | 44 +++++++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 18 deletions(-) commit 464fd6419c68bc6b1697e02f46b6d3dd57dfed28 Author: Michael Cyr Date: Tue May 16 17:49:21 2017 -0500 ibmvscsis: Enable Logical Partition Migration Support Changes to support a new mechanism from phyp to better synchronize the logical partition migration (LPM) of the client partition. This includes a new VIOCTL to register that we support this new functionality, and 2 new Transport Event types, and finally another new VIOCTL to let phyp know once we're ready for the Suspend. Signed-off-by: Michael Cyr Signed-off-by: Bryant G. Ly Signed-off-by: Nicholas Bellinger drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 148 ++++++++++++++++++++++++++++--- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h | 25 +++++- drivers/scsi/ibmvscsi_tgt/libsrp.h | 5 +- 3 files changed, 162 insertions(+), 16 deletions(-) commit 12bdcbd539c6327c09da0503c674733cb2d82cb5 Author: Byungchul Park Date: Fri May 12 09:42:56 2017 +0900 vhost/scsi: Don't reinvent the wheel but use existing llist API Although llist provides proper APIs, they are not used. Make them used. Signed-off-by: Byungchul Park Acked-by: Nicholas Bellinger Signed-off-by: Nicholas Bellinger drivers/vhost/scsi.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit fb418240ecbd721a1237da592c075993c1709955 Author: Gustavo A. R. Silva Date: Tue May 9 16:46:04 2017 -0500 target: remove dead code Local variable _ret_ is assigned to a constant value and it is never updated again. Remove this variable and the dead code it guards. Addresses-Coverity-ID: 140761 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Tyrel Datwyler Signed-off-by: Nicholas Bellinger drivers/target/target_core_rd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b73f22695f4445114bd354df19ef84201ead22fe Author: Ulf Hansson Date: Wed Jun 7 11:08:22 2017 +0200 arm64: dts: hikey: Add external clock to the Bluetooth node To make the TI WiLink chip work again for Bluetooth, let's add the missing external clock to the Bluetooth node, such the driver can deal properly with it during power on/off. Fixes: ea452678734e ("arm64: dts: hikey: Fix WiFi support") Cc: Wei Xu Signed-off-by: Ulf Hansson Tested-by: John Stultz Signed-off-by: Marcel Holtmann arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 2 ++ 1 file changed, 2 insertions(+) commit 43d3d092c7cbd1685e1c8ff25ae0b89b5b729388 Author: Ulf Hansson Date: Wed Jun 7 11:08:21 2017 +0200 Bluetooth: hci_ll: Add support for the external clock Add support to manage the external clock provided to the WiLink combo chip as it's needed for any of the transport interfaces. To avoid breaking platforms not yet specifying the external clock, we make it optional. In case the clock is successfully fetched during ->probe(), let's manage it via the ->open|close() callbacks, to make sure the device get properly powered on/off. Fixes: ea452678734e ("arm64: dts: hikey: Fix WiFi support") Signed-off-by: Ulf Hansson Tested-by: John Stultz Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ll.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 3c8e42a7935f720c403612abf896d962a7aa1495 Author: Ulf Hansson Date: Wed Jun 7 11:08:20 2017 +0200 dt-bindings: net: Add binding for the external clock for TI WiLink The external clock is provided to the TI WiLink combo chip and it's needed for any of the transport interfaces. However let's make it optional to avoid breaking existing platforms that yet doesn't specify the clock. Fixes: ea452678734e ("arm64: dts: hikey: Fix WiFi support") Signed-off-by: Ulf Hansson Tested-by: John Stultz Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/net/ti,wilink-st.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit c127a871357b8d59cda9c8b96cb65c2e24a72c46 Author: Sebastian Reichel Date: Thu Jun 8 22:58:45 2017 +0200 Bluetooth: hci_ll: Add compatible values for more WL chips Add compatible values for WiLink chips from 128x and 180x series. Also the DT binding already contained compatible values for the 127x series, but the driver did not. This brings the list on par with the list from wlcore (the wifi driver). Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/net/ti,wilink-st.txt | 6 ++++++ drivers/bluetooth/hci_ll.c | 8 ++++++++ 2 files changed, 14 insertions(+) commit 6d48152eafde1f0d0a4a9e0584fa7d9ff4fbfdac Author: Paul E. McKenney Date: Wed May 17 10:54:29 2017 -0700 rcu: Remove RCU CPU stall warnings from Tiny RCU Tiny RCU's job is to be tiny, so this commit removes its RCU CPU stall warning code. After this, there is no longer any need for rcu_sched_ctrlblk and rcu_bh_ctrlblk to be in tiny_plugin.h, so this commit also moves them to tiny.c. Signed-off-by: Paul E. McKenney kernel/rcu/Kconfig | 2 +- kernel/rcu/tiny.c | 35 +++++----- kernel/rcu/tiny_plugin.h | 78 ---------------------- .../selftests/rcutorture/configs/rcu/TINY02 | 1 - 4 files changed, 19 insertions(+), 97 deletions(-) commit c23484f0e7bc89e1facb04103ce24efeebee76b9 Author: Paul E. McKenney Date: Wed May 17 10:17:03 2017 -0700 rcu: Remove event tracing from Tiny RCU This commit saves a few lines by getting rid of Tiny RCU's event tracing. Signed-off-by: Paul E. McKenney kernel/rcu/tiny.c | 6 ------ 1 file changed, 6 deletions(-) commit 43a0a2a7d725f2ed2547cd656749eb66c093f2c2 Author: Paul E. McKenney Date: Wed May 17 09:19:44 2017 -0700 rcu: Move RCU debug Kconfig options to kernel/rcu RCU's debugging Kconfig options are in the unintuitive location lib/Kconfig.debug, and there are enough of them that it would be good for them to be more centralized. This commit therefore extracts RCU's Kconfig options from init/Kconfig into a new kernel/rcu/Kconfig.debug file. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney kernel/rcu/Kconfig.debug | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/Kconfig.debug | 79 +--------------------------------------------- 2 files changed, 83 insertions(+), 78 deletions(-) commit 0af92d46098a092aa5817dfeb6d24a8d85b66205 Author: Paul E. McKenney Date: Wed May 17 08:43:40 2017 -0700 rcu: Move RCU non-debug Kconfig options to kernel/rcu RCU's Kconfig options are scattered, and there are enough of them that it would be good for them to be more centralized. This commit therefore extracts RCU's Kconfig options from init/Kconfig into a new kernel/rcu/Kconfig file. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney init/Kconfig | 239 +--------------------------------------------------- kernel/rcu/Kconfig | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 243 insertions(+), 238 deletions(-) commit 44c65ff2e3b0b48250a970183ab53b0602c25764 Author: Paul E. McKenney Date: Mon May 15 16:26:34 2017 -0700 rcu: Eliminate NOCBs CPU-state Kconfig options The CONFIG_RCU_NOCB_CPU_ALL, CONFIG_RCU_NOCB_CPU_NONE, and CONFIG_RCU_NOCB_CPU_ZERO Kconfig options are used only in testing and are redundant with the rcu_nocbs= boot parameter. This commit therefore removes these three Kconfig options and adjusts the rcutorture scripts to use the boot parameter instead. Signed-off-by: Paul E. McKenney Documentation/kernel-per-CPU-kthreads.txt | 31 ++++++------- Documentation/timers/NO_HZ.txt | 29 ++---------- init/Kconfig | 53 ---------------------- kernel/rcu/rcu.h | 4 +- kernel/rcu/tree_plugin.h | 27 ++--------- .../selftests/rcutorture/configs/rcu/TREE01 | 1 - .../selftests/rcutorture/configs/rcu/TREE01.boot | 1 + .../selftests/rcutorture/configs/rcu/TREE05 | 1 - .../selftests/rcutorture/configs/rcu/TREE08 | 1 - .../selftests/rcutorture/configs/rcu/TREE08.boot | 1 + .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 8 ++-- 11 files changed, 26 insertions(+), 131 deletions(-) commit ae91aa0adb14dc33114d566feca2f7cb7a96b8b7 Author: Paul E. McKenney Date: Mon May 15 15:30:32 2017 -0700 rcu: Remove debugfs tracing RCU's debugfs tracing used to be the only reasonable low-level debug information available, but ftrace and event tracing has since surpassed the RCU debugfs level of usefulness. This commit therefore removes RCU's debugfs tracing. Signed-off-by: Paul E. McKenney Documentation/RCU/00-INDEX | 2 - .../RCU/Design/Requirements/Requirements.html | 2 +- Documentation/RCU/trace.txt | 535 --------------------- init/Kconfig | 8 - kernel/rcu/Makefile | 1 - kernel/rcu/tiny_plugin.h | 45 -- kernel/rcu/tree.h | 27 -- kernel/rcu/tree_plugin.h | 31 +- kernel/rcu/tree_trace.c | 494 ------------------- lib/Kconfig.debug | 5 +- .../selftests/rcutorture/configs/rcu/TREE02-T | 21 - .../selftests/rcutorture/configs/rcu/TREE08-T | 21 - .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 4 - 13 files changed, 4 insertions(+), 1192 deletions(-) commit bd8cc5a062f41e334596edbe823e2fa0adddd1b7 Author: Paul E. McKenney Date: Mon May 15 14:57:01 2017 -0700 srcu: Remove Classic SRCU Classic SRCU was only ever intended to be a fallback in case of issues with Tree/Tiny SRCU, and the latter two are doing quite well in testing. This commit therefore removes Classic SRCU. Signed-off-by: Paul E. McKenney include/linux/srcu.h | 2 - include/linux/srcuclassic.h | 100 --- init/Kconfig | 21 +- kernel/rcu/Makefile | 1 - kernel/rcu/rcu.h | 16 - kernel/rcu/rcutorture.c | 17 - kernel/rcu/srcu.c | 668 --------------------- .../selftests/rcutorture/configs/rcu/CFLIST | 1 - .../selftests/rcutorture/configs/rcu/SRCU-C | 11 - .../rcutorture/configs/rcuperf/SRCUCLASSIC | 16 - 10 files changed, 2 insertions(+), 851 deletions(-) commit 7f0cd6333086ae09962791c31f0d4845a3329df9 Author: Paul E. McKenney Date: Sun May 14 17:06:30 2017 -0700 srcu: Fix rcutorture-statistics typo The function srcutorture_get_gp_data() duplicated the check for sp->batch_check0.head instead of also checking sp->batch_check1.head. The only effect of this typo would be for rcutorture statistics to understate the fraction of time that an SRCU grace period was in flight, and only for Classic SRCU. This commit fixes this typo. Reported-by: David Binderman Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41a2901e7d220875752a8c870e0b53288a578c20 Author: Paul E. McKenney Date: Fri May 12 15:56:35 2017 -0700 rcu: Remove SPARSE_RCU_POINTER Kconfig option The sparse-based checking for non-RCU accesses to RCU-protected pointers has been around for a very long time, and it is now the only type of sparse-based checking that is optional. This commit therefore makes it unconditional. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Cc: Fengguang Wu Documentation/RCU/Design/Requirements/Requirements.html | 9 +++------ Documentation/RCU/checklist.txt | 8 ++++---- Documentation/dev-tools/sparse.rst | 6 ------ include/linux/compiler.h | 4 ---- lib/Kconfig.debug | 15 --------------- lib/Makefile | 3 --- .../testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 4 ---- 7 files changed, 7 insertions(+), 42 deletions(-) commit c4a09ff752e164c020bced6513e2008f992a02e6 Author: Paul E. McKenney Date: Fri May 12 14:37:19 2017 -0700 rcu: Remove the now-obsolete PROVE_RCU_REPEATEDLY Kconfig option The PROVE_RCU_REPEATEDLY Kconfig option was initially added due to the volume of messages from PROVE_RCU: Doing just one per boot would have required excessive numbers of boots to locate them all. However, PROVE_RCU messages are now relatively rare, so there is no longer any reason to need more than one such message per boot. This commit therefore removes the PROVE_RCU_REPEATEDLY Kconfig option. Signed-off-by: Paul E. McKenney Cc: Ingo Molnar kernel/locking/lockdep.c | 4 ---- kernel/rcu/tree_plugin.h | 4 +--- lib/Kconfig.debug | 14 -------------- tools/testing/selftests/rcutorture/configs/rcu/TINY02 | 1 - .../testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 1 - 5 files changed, 1 insertion(+), 23 deletions(-) commit 4e4bea7427062ec15df7084f97728e2a44d912e3 Author: Paul E. McKenney Date: Thu May 11 15:33:23 2017 -0700 rcu: Remove typecheck() from RCU locking wrapper functions Because raw_spin_lock_irqsave() and raw_spin_unlock_irqrestore() both do typecheck() on their flags argument, there is no point in duplicating this check in raw_spin_lock_irqsave_rcu_node() and raw_spin_unlock_irqrestore_rcu_node(). This commit therefore saves a few lines by removing this duplicated check. Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit d2b1654f91f9e928011fbea7138854ee2044f470 Author: Paul E. McKenney Date: Thu May 11 12:01:50 2017 -0700 rcu: Remove #ifdef moving rcu_end_inkernel_boot from rcupdate.h This commit removes a #ifdef and saves a few lines of code by moving the rcu_end_inkernel_boot() function from include/linux/rcupdate.h to include/linux/rcutiny.h (for TINY_RCU) and to include/linux/rcutree.h (for TREE_RCU). Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 6 ------ include/linux/rcutiny.h | 2 +- include/linux/rcutree.h | 1 + 3 files changed, 2 insertions(+), 7 deletions(-) commit fe5ac724d81a3c7803e60c2232718f212f3f38d4 Author: Paul E. McKenney Date: Thu May 11 11:26:22 2017 -0700 rcu: Remove nohz_full full-system-idle state machine The NO_HZ_FULL_SYSIDLE full-system-idle capability was added in 2013 by commit 0edd1b1784cb ("nohz_full: Add full-system-idle state machine"), but has not been used. This commit therefore removes it. If it turns out to be needed later, this commit can always be reverted. Signed-off-by: Paul E. McKenney Cc: Frederic Weisbecker Cc: Rik van Riel Cc: Ingo Molnar Acked-by: Linus Torvalds .../RCU/Design/Requirements/Requirements.html | 6 +- include/linux/rcupdate.h | 9 - kernel/rcu/tree.c | 41 +- kernel/rcu/tree.h | 16 - kernel/rcu/tree_plugin.h | 429 --------------------- kernel/time/Kconfig | 50 --- .../selftests/rcutorture/configs/rcu/TREE07 | 1 - .../testing/selftests/rcutorture/doc/TINY_RCU.txt | 1 - .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 7 +- 9 files changed, 9 insertions(+), 551 deletions(-) commit f7a10a975036ef9ca957bfe12ab2d4b1a46cccd1 Author: Paul E. McKenney Date: Wed May 10 15:57:16 2017 -0700 rcu: Remove the RCU_KTHREAD_PRIO Kconfig option Anything that can be done with the RCU_KTHREAD_PRIO Kconfig option can also be done with the rcutree.kthread_prio kernel boot parameter. This commit therefore removes this Kconfig option. Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney Cc: Frederic Weisbecker Cc: Rik van Riel init/Kconfig | 31 ---------------------- kernel/rcu/tree.c | 4 --- .../selftests/rcutorture/configs/rcu/TREE03 | 1 - .../selftests/rcutorture/configs/rcu/TREE03.boot | 1 + .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 1 - 5 files changed, 1 insertion(+), 37 deletions(-) commit 90040c9e3015054db7efa0101afdd446d1167fe8 Author: Paul E. McKenney Date: Wed May 10 14:36:55 2017 -0700 rcu: Remove *_SLOW_* Kconfig options The RCU_TORTURE_TEST_SLOW_PREINIT, RCU_TORTURE_TEST_SLOW_PREINIT_DELAY, RCU_TORTURE_TEST_SLOW_PREINIT_DELAY, RCU_TORTURE_TEST_SLOW_INIT, RCU_TORTURE_TEST_SLOW_INIT_DELAY, RCU_TORTURE_TEST_SLOW_CLEANUP, and RCU_TORTURE_TEST_SLOW_CLEANUP_DELAY Kconfig options are only useful for torture testing, and there are the rcutree.gp_cleanup_delay, rcutree.gp_init_delay, and rcutree.gp_preinit_delay kernel boot parameters that rcutorture can use instead. The effect of these parameters is to artificially slow down grace period initialization and cleanup in order to make some types of race conditions happen more often. This commit therefore simplifies Tree RCU a bit by removing the Kconfig options and adding the corresponding kernel parameters to rcutorture's .boot files instead. However, this commit also leaves out the kernel parameters for TREE02, TREE04, and TREE07 in order to have about the same number of tests slowed as not slowed. TREE01, TREE03, TREE05, and TREE06 are slowed, and the rest are not slowed. Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney Documentation/admin-guide/kernel-parameters.txt | 10 +-- kernel/rcu/tree.c | 26 ++------ kernel/rcu/tree_plugin.h | 6 +- lib/Kconfig.debug | 75 ---------------------- .../selftests/rcutorture/configs/rcu/TREE01 | 3 - .../selftests/rcutorture/configs/rcu/TREE01.boot | 3 + .../selftests/rcutorture/configs/rcu/TREE02 | 3 - .../selftests/rcutorture/configs/rcu/TREE03 | 3 - .../selftests/rcutorture/configs/rcu/TREE03.boot | 3 + .../selftests/rcutorture/configs/rcu/TREE04 | 3 - .../selftests/rcutorture/configs/rcu/TREE05 | 3 - .../selftests/rcutorture/configs/rcu/TREE05.boot | 3 + .../selftests/rcutorture/configs/rcu/TREE06 | 3 - .../selftests/rcutorture/configs/rcu/TREE06.boot | 3 + .../selftests/rcutorture/configs/rcu/TREE07 | 3 - .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 9 --- 16 files changed, 24 insertions(+), 135 deletions(-) commit a3883df3935e10caa8297719d85fa8eaff7cabbd Author: Paul E. McKenney Date: Tue May 9 15:00:14 2017 -0700 srcu: Use rnp->lock wrappers to replace explicit memory barriers This commit uses TREE RCU's rnp->lock wrappers to replace a few explicit memory barriers. This change also has the advantage of making SRCU's memory-ordering properties be implemented in roughly the same way as they are in Tree RCU. Signed-off-by: Paul E. McKenney include/linux/srcutree.h | 8 ++--- kernel/rcu/srcutree.c | 91 +++++++++++++++++++++++------------------------- 2 files changed, 47 insertions(+), 52 deletions(-) commit 83d40bd3bc3ab3d6b5a4a331f7667d627948a099 Author: Paul E. McKenney Date: Tue May 9 13:28:51 2017 -0700 rcu: Move rnp->lock wrappers for SRCU use This commit moves the now-generic rnp->lock wrapper macros from kernel/rcu/tree.h to kernel/rcu/rcu.h, thus allowing SRCU to use them. Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/rcu/tree.h | 53 ----------------------------------------------------- 2 files changed, 53 insertions(+), 53 deletions(-) commit bf32c76540257f9f5f2cf661dbdd8bb4a4bd8c82 Author: Paul E. McKenney Date: Tue May 9 12:05:46 2017 -0700 rcu: Convert rnp->lock wrappers to macros for SRCU use Use of smp_mb__after_unlock_lock() would allow SRCU to omit a full memory barrier during callback execution, so this commit converts raw_spin_lock_rcu_node() from inline functions to type-generic macros to allow them to handle locks in srcu_node structures as well as rcu_node structures. Signed-off-by: Paul E. McKenney kernel/rcu/tree.h | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) commit 5f192ab027a5d865be24c817005d42eb96314dc2 Author: Paul E. McKenney Date: Wed May 3 15:24:25 2017 -0700 rcu: Refactor #includes from include/linux/rcupdate.h The list of #includes from include/linux/rcupdate.h has grown quite a bit, so it is time to trim it. This commit moves the #include of include/linux/ktime.h to include/linux/rcutiny.h, along with the Tiny-RCU-only function that was the only thing needing ktimem.h. It then reconstructs the files included into include/linux/ktime.h based on what is actually needed, with significant help from the 0day Test Robot. This single change reduces the .i file footprint from rcupdate.h from 9018 lines to 7101 lines. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 22 ++++++---------------- include/linux/rcutiny.h | 8 +++++++- 2 files changed, 13 insertions(+), 17 deletions(-) commit 0cb5133ab573d1c471cfcfa632b0260a5aad5303 Author: Arnd Bergmann Date: Wed May 31 09:26:07 2017 -0700 bcm47xx: Fix build regression Commit 0bc2d534708b ("rcu: Refactor #includes from include/linux/rcupdate.h") caused a build regression in an MTD partition driver: In file included from drivers/mtd/bcm47xxpart.c:12:0: include/linux/bcm47xx_nvram.h: In function 'bcm47xx_nvram_init_from_mem': include/linux/bcm47xx_nvram.h:27:10: error: 'ENOTSUPP' undeclared (first use in this function) The rcupdate.h file has no particular need for linux/errno.h, so this commit includes linux/errno.h into bcm47xx_nvram.h. Fixes: 0bc2d534708b ("rcu: Refactor #includes from include/linux/rcupdate.h") Signed-off-by: Arnd Bergmann Signed-off-by: Paul E. McKenney include/linux/bcm47xx_nvram.h | 1 + 1 file changed, 1 insertion(+) commit 681fbec881dea1848e9246d7d1ecb3b97f11026d Author: Paul E. McKenney Date: Thu May 4 15:44:38 2017 -0700 lockdep: Use consistent printing primitives Commit a5dd63efda3d ("lockdep: Use "WARNING" tag on lockdep splats") substituted pr_warn() for printk() in places called out by Dmitry Vyukov. However, this resulted in an ugly mix of pr_warn() and printk(). This commit therefore changes printk() to pr_warn() or pr_cont(), depending on the absence or presence of KERN_CONT. This is done in all functions that had printk() changed to pr_warn() by the aforementioned commit. Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney kernel/locking/lockdep.c | 172 +++++++++++++++++++++++------------------------ 1 file changed, 86 insertions(+), 86 deletions(-) commit 2464dd940e23bad227c387a40eec99f7aa02ed96 Author: Paul E. McKenney Date: Thu May 4 14:29:16 2017 -0700 srcu: Apply trivial callback lists to shrink Tiny SRCU The rcu_segcblist structure provides quite a bit of functionality, and Tiny SRCU needs almost none of it. So this commit replaces Tiny SRCU's uses of rcu_segcblist with a simple singly linked list with tail pointer. This change significantly reduces Tiny SRCU's memory footprint, more than making up for the growth caused by the creation of rcu_segcblist.c Signed-off-by: Paul E. McKenney include/linux/srcutiny.h | 7 +++-- init/Kconfig | 2 +- kernel/rcu/rcu.h | 2 +- kernel/rcu/srcutiny.c | 70 ++++++++++++++++++++++-------------------------- 4 files changed, 37 insertions(+), 44 deletions(-) commit 5a0465e17a18c467b712a816985b7b8dd8d10c16 Author: Paul E. McKenney Date: Thu May 4 11:31:04 2017 -0700 srcu: Shrink srcu.h by moving docbook and private function The call_srcu() docbook entry is currently in include/linux/srcu.h, which causes needless processing for each include point. This commit therefore moves this entry to kernel/rcu/srcutree.c, which the compiler reads only once. In addition, the srcu_batches_completed() function is used only within RCU and its torture-test suites. This commit therefore also moves this function's declaration from include/linux/srcutiny.h, include/linux/srcutree.h, and include/linux/srcuclassic.h to kernel/rcu/rcu.h. Signed-off-by: Paul E. McKenney include/linux/srcu.h | 20 -------------------- include/linux/srcuclassic.h | 1 - include/linux/srcutiny.h | 5 ----- include/linux/srcutree.h | 1 - kernel/rcu/rcu.h | 6 ++++++ kernel/rcu/srcutree.c | 17 +++++++++++++++++ 6 files changed, 23 insertions(+), 27 deletions(-) commit c350c008297643dad3c395c2fd92230142da5cf6 Author: Paul E. McKenney Date: Wed May 3 15:35:32 2017 -0700 srcu: Prevent sdp->srcu_gp_seq_needed counter wrap If a given CPU never happens to ever start an SRCU grace period, the grace-period sequence counter might wrap. If this CPU were to decide to finally start a grace period, the state of its sdp->srcu_gp_seq_needed might make it appear that it has already requested this grace period, which would prevent starting the grace period. If no other CPU ever started a grace period again, this would look like a grace-period hang. Even if some other CPU took pity and started the needed grace period, the leaf rcu_node structure's ->srcu_data_have_cbs field won't have record of the fact that this CPU has a callback pending, which would look like a very localized grace-period hang. This might seem very unlikely, but SRCU grace periods can take less than a microsecond on small systems, which means that overflow can happen in much less than an hour on a 32-bit embedded system. And embedded systems are especially likely to have long-term idle CPUs. Therefore, it makes sense to prevent this scenario from happening. This commit therefore scans each srcu_data structure occasionally, with frequency controlled by the srcutree.counter_wrap_check kernel boot parameter. This parameter can be set to something like 255 in order to exercise the counter-wrap-prevention code. Signed-off-by: Paul E. McKenney Documentation/admin-guide/kernel-parameters.txt | 9 +++++++++ kernel/rcu/srcutree.c | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) commit 71c40fd0b5ceb300c6cb8753835d9d94a8bfc56f Author: Paul E. McKenney Date: Wed May 3 13:51:42 2017 -0700 rcu: Move rcutiny.h to new empty/true/false-function style This commit saves a few lines in include/linux/rcutiny.h by moving to single-line definitions for empty functions, instead of the old style where the two curly braces each get their own line. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcutiny.h | 71 +++++++++++-------------------------------------- 1 file changed, 16 insertions(+), 55 deletions(-) commit fe21a27e8ca0937a5ac298de1f4b46382e9c5c88 Author: Paul E. McKenney Date: Wed May 3 13:45:51 2017 -0700 rcu: Move rcu_request_urgent_qs_task() out of rcutiny.h and rcutree.h The rcu_request_urgent_qs_task() function is used only within RCU, so there is no point in exporting it to the rest of the kernel from nclude/linux/rcutiny.h and include/linux/rcutree.h. This commit therefore moves this function to kernel/rcu/rcu.h. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcutiny.h | 4 ---- include/linux/rcutree.h | 3 --- kernel/rcu/rcu.h | 6 ++++++ 3 files changed, 6 insertions(+), 7 deletions(-) commit e3c8d51e1a58c73a557eb38a9a6afb4f704a3379 Author: Paul E. McKenney Date: Wed May 3 13:37:16 2017 -0700 rcu: Move torture-related functions out of rcutiny.h and rcutree.h The various functions similar to rcu_batches_started(), the function show_rcu_gp_kthreads(), the various functions similar to rcu_force_quiescent_state(), and the variables rcutorture_testseq and rcutorture_vernum are used only within RCU. There is therefore no point in exporting them to the kernel at large from include/linux/rcutiny.h and include/linux/rcutree.h. This commit therefore moves all of these to kernel/rcu/rcu.h. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcutiny.h | 80 --------------------------------------- include/linux/rcutree.h | 16 -------- kernel/rcu/rcu.h | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 96 deletions(-) commit 17a8c187310ccc5f5b65a7d8faf96fdc66c5fe3d Author: Paul E. McKenney Date: Wed May 3 12:32:55 2017 -0700 rcu: move rcupdate.h to the new true/false-function style This commit saves a few lines in include/linux/rcupdate.h by moving to single-line definitions for functions that just return either true or false, instead of the old style where the two curly braces each get their own line. Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit b8989b76052eedc99b09322efd6f68816f191a1a Author: Paul E. McKenney Date: Wed May 3 12:28:59 2017 -0700 rcu: Move rcu_ftrace_dump() from rcupdate.h to rcu.h The rcu_ftrace_dump() function is used only internally to RCU. This commit therefore moves its declaration from include/linux/rcupdate.h to kernel/rcu/rcu.h. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 12 ------------ kernel/rcu/rcu.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) commit 3d54f7983f3e6ac9f444fa20970b1abc8f089b79 Author: Paul E. McKenney Date: Wed May 3 12:25:50 2017 -0700 rcu: Move rcu_is_nocb_cpu() from rcupdate.h to rcu.h The rcu_is_nocb_cpu() function is used only internally to RCU. This commit therefore moves its declaration from include/linux/rcupdate.h to kernel/rcu/rcu.h. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 9 --------- kernel/rcu/rcu.h | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) commit fa3c66476975abf00c97f27b6c2b3d223f7d57f5 Author: Paul E. McKenney Date: Wed May 3 11:38:55 2017 -0700 rcu: Improve __call_rcu() debug-objects error message The "__call_rcu(): Leaked duplicate callback" error message from __call_rcu() has proven to be unhelpful. This commit therefore changes it to "__call_rcu(): Double-freed CB" and adds the value of the pointer passed in. The value of the pointer improves debuggability by allowing correlation with tracing output, for example, the rcu:rcu_callback trace event. Reported-by: Vegard Nossum Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 752de307b0ee47308bfc299de3a3ad623c16b4d8 Author: Paul E. McKenney Date: Wed May 3 11:18:01 2017 -0700 rcu: Remove linux/debugobjects.h from rcupdate.h The include/linux/rcupdate.h file does not actually need anything from linux/debugobjects.h, so this commit removes the inclusion. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 1 - 1 file changed, 1 deletion(-) commit 82118249d0ca4078d56d5e43172ada1567fdf946 Author: Paul E. McKenney Date: Wed May 3 11:13:24 2017 -0700 rcu: Move the RCU_SCHEDULER_ definitions from rcupdate.h The RCU_SCHEDULER_INACTIVE, RCU_SCHEDULER_INIT, and RCU_SCHEDULER_RUNNING definitions are used only within RCU, so this commit moves them from include/linux/rcupdate.h to kernel/rcu/rcu.h. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 4 ---- kernel/rcu/rcu.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) commit 791875d16e2f6e2e5b90328ccac643f512ac76c4 Author: Paul E. McKenney Date: Wed May 3 11:06:05 2017 -0700 rcu: Eliminate the unused __rcu_is_watching() function The __rcu_is_watching() function is currently not used, aside from to implement the rcu_is_watching() function. This commit therefore eliminates __rcu_is_watching(), which has the beneficial side-effect of shrinking include/linux/rcupdate.h a bit. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 4 ---- include/linux/rcutiny.h | 11 ----------- kernel/rcu/tiny.c | 13 ------------- kernel/rcu/tree.c | 19 ++++--------------- 4 files changed, 4 insertions(+), 43 deletions(-) commit d0df7a349133e10184d478ae1189e79e5c53615d Author: Paul E. McKenney Date: Wed May 3 10:52:10 2017 -0700 rcu: Move rcupdate.h to new empty-function style This commit saves a few lines in include/linux/rcupdate.h by moving to single-line definitions for empty functions, instead of the old style where the two curly braces each get their own line. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) commit c4cbf9f736f5bd0a53a5ea401d86376c86bf905e Author: Paul E. McKenney Date: Wed May 3 10:36:36 2017 -0700 rcu: Remove UINT_CMP_GE() and UINT_CMP_LT() The UINT_CMP_GE() and UINT_CMP_LT() macros are not used, so this commit removes them. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 2 -- 1 file changed, 2 deletions(-) commit cad7b3897279c869de61dc88133037b941f84233 Author: Paul E. McKenney Date: Wed May 3 10:22:57 2017 -0700 rcu: Move torture-related definitions from rcupdate.h to rcu.h The include/linux/rcupdate.h file contains a number of definitions that are used only to communicate between rcutorture, rcuperf, and the RCU code itself. There is no point in having these definitions exposed globally throughout the kernel, so this commit moves them to kernel/rcu/rcu.h. This change has the added benefit of shrinking rcupdate.h. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 52 --------------------------- include/linux/rcutiny.h | 5 +++ include/linux/rcutree.h | 1 + include/linux/srcuclassic.h | 14 -------- include/linux/srcutiny.h | 12 ------- include/linux/srcutree.h | 4 --- kernel/rcu/rcu.h | 85 +++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 91 insertions(+), 82 deletions(-) commit 25c36329a30c8cac090effe1fbae9bb916fa95fe Author: Paul E. McKenney Date: Wed May 3 09:51:55 2017 -0700 rcu: Move expediting-related access/control out of rcupdate.h The rcu_gp_is_normal(), rcu_gp_is_expedited(), rcu_expedite_gp(), and rcu_unexpedite_gp() functions are intended only for use within the RCU implementation itself -- the sysfs access is what should be used outside of RCU. This commit therefore moves the declarations for these functions to kernel/rcu/rcu.h, and also includes this file into kernel/rcu/rcutorture.c and kernel/rcu/rcuperf.c. This also has the beneficial effect of shrinking rcupdate.c a bit. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 26 -------------------------- kernel/rcu/rcu.h | 26 ++++++++++++++++++++++++++ kernel/rcu/rcuperf.c | 2 ++ kernel/rcu/rcutorture.c | 2 ++ 4 files changed, 30 insertions(+), 26 deletions(-) commit 3caec62fbb313946b9be53720bbf2280bb19ec28 Author: Paul E. McKenney Date: Wed May 3 09:27:15 2017 -0700 rcu: Move rcu_expedited and rcu_normal externs from rcupdate.h The rcu_expedited and rcu_normal variables are used only by sysctl and kernel/rcu/update.c, so it does not make sense to their extern declarations in rcupdate.h. This commit therefore moves these extern declarations to update.c. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 7 ------- kernel/rcu/update.c | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) commit a68a2bb28bbf7a6dd4672a25bd87fd1b5db4fa7d Author: Paul E. McKenney Date: Wed May 3 08:34:57 2017 -0700 rcu: Move docbook comments out of rcupdate.h The include/linux/rcupdate.h file is included by more than 200 files, so shrinking it should provide some build-time benefits. This commit therefore moves several docbook comments from rcupdate.h to kernel/rcu/update.c, kernel/rcu/tree.c, and kernel/rcu/tree_plugin.h, thus reducing the number of times that the compiler has to scan these comments. This likely provides only a small benefit, but every little bit helps. This commit also fixes a malformed bulleted list noted by the 0day Test Robot. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 117 ++--------------------------------------------- kernel/rcu/tree.c | 42 +++++++++++++++-- kernel/rcu/tree_plugin.h | 33 ++++++++++++- kernel/rcu/update.c | 20 ++++++-- 4 files changed, 89 insertions(+), 123 deletions(-) commit aaaad0bfac019bb7701f92ebc1b31b4f85e47b55 Author: Paul E. McKenney Date: Tue May 2 09:39:09 2017 -0700 rcu: Flag need for rcu_node_tree.h and rcu_segcblist.h visibility The rcu_node_tree.h and rcu_segcblist.h header files in the include/linux directory might appear at first sight to be internal to the RCU implementation. However, the definitions in these files are needed to determine the size of TREE SRCU's srcu_struct structure, so they must be externally visible, which is why they live in include/linux. This commit adds comments to this effect to those files. Signed-off-by: Paul E. McKenney include/linux/rcu_node_tree.h | 4 ++++ include/linux/rcu_segcblist.h | 4 ++++ 2 files changed, 8 insertions(+) commit 6b5fc3a1331810db407c9e0e673dc1837afdc9d0 Author: Paul E. McKenney Date: Fri Apr 28 20:11:09 2017 -0700 rcu: Add memory barriers for NOCB leader wakeup Wait/wakeup operations do not guarantee ordering on their own. Instead, either locking or memory barriers are required. This commit therefore adds memory barriers to wake_nocb_leader() and nocb_leader_wait(). Signed-off-by: Paul E. McKenney Tested-by: Krister Johansen Cc: # 4.6.x kernel/rcu/tree_plugin.h | 2 ++ 1 file changed, 2 insertions(+) commit c46adf0976eacadd60920da5b8bf8e27299183bd Author: Xiaolei Li Date: Thu Jun 1 17:01:19 2017 +0800 mtd: subpagetest: fix wrong written check in function write_eraseblock2 Write size in function write_eraseblock2 is subpgsize * k. It is wrong to check whether written is equal to subpgsize after each mtd_write. Signed-off-by: Xiaolei Li Reviewed-by: Richard Weinberger Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/tests/subpagetest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4379075a870b8de43a9ecd5b46884953234fc669 Author: Chris Packham Date: Fri Jun 2 15:21:19 2017 +1200 mtd: mchp23k256: Add support for mchp23lcv1024 The mchp23lcv1024 is similar to the mchp23k256, the differences (from a software point of view) are the capacity of the chip and the size of the addresses used. There is no way to detect the specific chip so we must be told via a Device Tree or default to mchp23k256 when device tree is not used. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Acked-by: Rob Herring Signed-off-by: Brian Norris .../bindings/mtd/microchip,mchp23k256.txt | 2 +- drivers/mtd/devices/mchp23k256.c | 66 ++++++++++++++++++---- 2 files changed, 57 insertions(+), 11 deletions(-) commit 2f071ff175ea221710d583222b55f915d90901f0 Author: Chris Packham Date: Fri Jun 2 15:21:18 2017 +1200 mtd: mchp23k256: add partitioning support Setting the of_node for the mtd device allows the generic mtd code to setup the partitions. [Editorial note (Brian): patch still pending on fixing up the "aligned to eraseblock" partition sanity check, given that this SRAM has no eraseblocks.] Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn Signed-off-by: Brian Norris drivers/mtd/devices/mchp23k256.c | 1 + 1 file changed, 1 insertion(+) commit 9cc91f212111cdcbefa02dcdb7dd443f224bf52c Author: Arnd Bergmann Date: Thu Jun 8 10:53:10 2017 +0200 xen: avoid type warning in xchg_xen_ulong The improved type-checking version of container_of() triggers a warning for xchg_xen_ulong, pointing out that 'xen_ulong_t' is unsigned, but atomic64_t contains a signed value: drivers/xen/events/events_2l.c: In function 'evtchn_2l_handle_events': drivers/xen/events/events_2l.c:187:1020: error: call to '__compiletime_assert_187' declared with attribute error: pointer type mismatch in container_of() This adds a cast to work around the warning. Cc: Ian Abbott Fixes: 85323a991d40 ("xen: arm: mandate EABI and use generic atomic operations.") Fixes: daa2ac80834d ("kernel.h: handle pointers to arrays better in container_of()") Signed-off-by: Arnd Bergmann Signed-off-by: Stefano Stabellini Reviewed-by: Stefano Stabellini Acked-by: Ian Abbott arch/arm/include/asm/xen/events.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09cedcb6d4c585336c5a75cbbb3a5addf710b03e Author: Stefan Agner Date: Thu Jun 1 19:50:21 2017 -0700 drm/fsl-dcu: use new drm_atomic_helper_shutdown Commit 18dddadc78c9 ("drm/atomic: Introduce drm_atomic_helper_shutdown") introduced a new helper to shutdown all CRTCs to replace the buggy drm_crtc_force_disable_all() function. Make use of the new atomic helper drm_atomic_helper_shutdown() to shutdown CRTCs. Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 685ec6ebcd0edde718d2c95a550bca36563c9055 Author: Stefan Agner Date: Thu Jun 1 19:43:30 2017 -0700 drm/fsl-dcu: implement irq_preinstall/uninstall callbacks Make use of the irq_preinstall/uninstall callback to clear and mask all interrupts. Use write 1 to clear as documented by the data sheet (writing a 0 seems to have cleared interrupt status too). Remove fsl_dcu_drm_irq_init and call drm_irq_install directly from fsl_dcu_load makes error handling a bit simpler. Do not set irq_enabled since drm_irq_install is taking care of it. Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit ffe881fba1e8467872fcb926fe2817aedbec2592 Author: Daniel Vetter Date: Wed May 24 16:51:54 2017 +0200 drm/fsl: Drop drm_vblank_cleanup Again cleanup before irq disabling doesn't really stop the races, so just drop it. Proper fix would be to put drm_atomic_helper_shutdown before everything gets cleaned up. Cc: Stefan Agner Signed-off-by: Daniel Vetter Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 -- 1 file changed, 2 deletions(-) commit bc03ce08396786c92d6591a81682c7da7accbfc8 Author: Baruch Siach Date: Mon May 29 07:51:19 2017 +0300 ARM: dts: at91: sama5d2_xplained: remove wrong memory node The size field of the memory node is wrong. Rely on the default value in sama5d2.dtsi that happens to be correct for the SAMA5D2 Xplained board. Signed-off-by: Baruch Siach Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 4 ---- 1 file changed, 4 deletions(-) commit d81052f92c3d018ade20ecbf461004566428d9a5 Author: Takashi Sakamoto Date: Fri Jun 9 06:37:06 2017 +0900 ALSA: pcm: add comment about application of rule to PCM parameters Drivers add rules of parameters to runtime of PCM substream, when applications open ALSA PCM character device. When applications call ioctl(2) with SNDRV_PCM_IOCTL_HW_REFINE or SNDRV_PCM_IOCTL_HW_PARAMS, the rules are applied to the parameters and return the result to user space. The rule can have dependency between parameters. Additionally, it can have condition flags about application of rules. Userspace applications can indicate the flags to suppress change of parameters. This commit attempts to describe the mechanism. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit b81e5ddb159490270fa2cca4f6682c4452035203 Author: Takashi Sakamoto Date: Fri Jun 9 06:37:05 2017 +0900 ALSA: pcm: use helper functions to check whether parameters are determined A commit 8bea869c5e56 ("ALSA: PCM midlevel: improve fifo_size handling") allows drivers to implement calculation of fifo size in parameter structure. This calculation runs only when two of the other parameters have single value. In ALSA PCM core, there're some helper functions for the case. This commit applies the functions instead of value comparison. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a1c06e39a9373501b4f28caf37fbccba52532f79 Author: Takashi Sakamoto Date: Fri Jun 9 06:37:04 2017 +0900 ALSA: pcm: adaption of code formatting This commit modifies current for readability in below aspects: - use bool type variable instead of int type variable assigned to 0/1 - move variable definition from loop to top of the function definition Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d656b4a6549f0f5863b7888b25a7b20d03ecbce7 Author: Takashi Sakamoto Date: Fri Jun 9 06:37:03 2017 +0900 ALSA: pcm: remove function local variable with alternative evaluation A local variable is used to judge whether a parameter should be handled due to reverse dependency of the other rules. However, this can be obsoleted by check of a sentinel in dependency array. This commit removes the local variable and check the sentinel to reduce stack usage. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 0d4e399965738bb90dcee2fd5aeb15c1ccc81b42 Author: Takashi Sakamoto Date: Fri Jun 9 06:37:02 2017 +0900 ALSA: pcm: use goto statement instead of while statement to reduce indentation In a process to calculate parameters of PCM substream, application of all rules is iterated several times till parameter dependencies are satisfied. In current implementation, two loops are used for the design, however this brings two-level indentation and decline readability. This commit attempts to reduce the indentation by using goto statement, instead of outer while loop. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 86 +++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 42 deletions(-) commit 9cc07f55d42be47ad2b06dae9541d9fd964c3287 Author: Takashi Sakamoto Date: Fri Jun 9 06:37:01 2017 +0900 ALSA: pcm: add a helper function to apply parameter rules Application of rules to parameters of PCM substream is done in a call of snd_pcm_hw_refine(), while the function includes much codes and is not enough friendly to readers. This commit splits the codes to a separated function so that readers can get it easily. I leave desicion into compilers to merge the function into its callee. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 77 +++++++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 32 deletions(-) commit 3432fa040211660989844209b67b414185003004 Author: Takashi Sakamoto Date: Fri Jun 9 06:37:00 2017 +0900 ALSA: pcm: add a helper function to constrain interval-type parameters Application of constraints to interval-type parameters for PCM substream is done in a call of snd_pcm_hw_refine(), while the function includes much codes and is not enough friendly to readers. This commit splits the codes to a separated function so that readers can get it easily. I leave desicion into compilers to merge the function into its callee. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 55 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 19 deletions(-) commit 561e1cadb4dca3783de82cfa453a142129953e4d Author: Takashi Sakamoto Date: Fri Jun 9 06:36:59 2017 +0900 ALSA: pcm: add a helper function to constrain mask-type parameters Application of constraints to mask-type parameters for PCM substream is done in a call of snd_pcm_hw_refine(), while the function includes much codes and is not enough friendly to readers. This commit splits the codes to a separated function so that readers can get it easily. I leave desicion into compilers to merge the function into its callee. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 56 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 19 deletions(-) commit 779ec2a607909bd87332c458813ac6d21d74f7cb Author: Raviteja Garimella Date: Thu Jun 8 16:05:03 2017 +0530 arm64: dts: NS2: Add USB DRD PHY device tree node This patch adds device tree node for USB Dual Role Device PHY for Broadcom's Northstar2 SoC. Signed-off-by: Raviteja Garimella Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/ns2.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 747868aeb03b44ae4818c8fd3956fb606b09e58d Author: Florian Fainelli Date: Wed Jun 7 09:56:33 2017 -0700 arm64: defconfig: Enable ARCH_BRCMSTB ARCH_BRCMSTB was one of the few platforms that were not enabled by default, since we are now adding more and more drivers relevant to that platform get some proper build coverage. Acked-by: Arnd Bergmann Signed-off-by: Florian Fainelli arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit fff88030b3ff930ca7a3d74acfee0472f33887ea Author: Willem de Bruijn Date: Thu Jun 8 11:35:03 2017 -0400 skbuff: only inherit relevant tx_flags When inheriting tx_flags from one skbuff to another, always apply a mask to avoid overwriting unrelated other bits in the field. The two SKBTX_SHARED_FRAG cases clears all other bits. In practice, tx_flags are zero at this point now. But this is fragile. Timestamp flags are set, for instance, if in tcp_gso_segment, after this clear in skb_segment. The SKBTX_ANY_TSTAMP mask in __skb_tstamp_tx ensures that new skbs do not accidentally inherit flags such as SKBTX_SHARED_FRAG. Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/core/skbuff.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 47f910f0e0deb880c2114811f7ea1ec115a19ee4 Author: Kieran Bingham Date: Wed Jun 7 06:52:07 2017 -0300 [media] v4l: subdev: tolerate null in media_entity_to_v4l2_subdev Return NULL, if a null entity is parsed for it's v4l2_subdev Currently, the callers of media_entity_to_v4l2_subdev() need to make sure that the subdev is non-NULL, for example, when it is obtained from media_entity_remote_pad(). As this is a recurring pattern, add the check at the macro in order to avoid additional checks at the callers. Signed-off-by: Kieran Bingham Reviewed-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-subdev.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit fc7e0b26b8d26e680bb2f252e9521385e0092e4c Author: John Johansen Date: Fri May 26 01:57:09 2017 -0700 apparmor: move permissions into their own file to be more easily shared Signed-off-by: John Johansen security/apparmor/include/file.h | 20 +------------------ security/apparmor/include/perms.h | 40 ++++++++++++++++++++++++++++++++++++++ security/apparmor/include/policy.h | 1 + security/apparmor/lib.c | 1 + 4 files changed, 43 insertions(+), 19 deletions(-) commit c961ee5f21b202dea60b63eeef945730d92e46a6 Author: John Johansen Date: Thu May 25 06:35:38 2017 -0700 apparmor: convert from securityfs to apparmorfs for policy ns files Virtualize the apparmor policy/ directory so that the current namespace affects what part of policy is seen. To do this convert to using apparmorfs for policy namespace files and setup a magic symlink in the securityfs apparmor dir to access those files. Signed-off-by: John Johansen Reviewed-by: Seth Arnold Reviewed-by: Kees Cook security/apparmor/apparmorfs.c | 63 +++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 26 deletions(-) commit 98407f0a0d378df27bfea79301a3aba42d7cea1c Author: John Johansen Date: Thu May 25 06:31:46 2017 -0700 apparmor: allow specifying an already created dir to create ns entries in Signed-off-by: John Johansen Reviewed-by: Seth Arnold Reviewed-by: Kees Cook security/apparmor/apparmorfs.c | 9 +++++---- security/apparmor/include/apparmorfs.h | 4 ++-- security/apparmor/policy_ns.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) commit c97204baf840bf850e14ef4f5f43251239ca43b6 Author: John Johansen Date: Thu May 25 06:23:42 2017 -0700 apparmor: rename apparmor file fns and data to indicate use prefixes are used for fns/data that are not static to apparmorfs.c with the prefixes being aafs - special magic apparmorfs for policy namespace data aa_sfs - for fns/data that go into securityfs aa_fs - for fns/data that may be used in the either of aafs or securityfs Signed-off-by: John Johansen Reviewed-by: Seth Arnold Reviewed-by: Kees Cook security/apparmor/Makefile | 6 +- security/apparmor/apparmorfs.c | 213 ++++++++++++++++++++------------- security/apparmor/capability.c | 4 +- security/apparmor/include/apparmorfs.h | 58 ++++----- security/apparmor/include/capability.h | 2 +- security/apparmor/include/resource.h | 2 +- security/apparmor/policy.c | 6 +- security/apparmor/policy_ns.c | 4 +- security/apparmor/resource.c | 4 +- 9 files changed, 172 insertions(+), 127 deletions(-) commit a481f4d917835cad86701fc0d1e620c74bb5cd5f Author: John Johansen Date: Thu May 25 05:52:56 2017 -0700 apparmor: add custom apparmorfs that will be used by policy namespace files AppArmor policy needs to be able to be resolved based on the policy namespace a task is confined by. Add a base apparmorfs filesystem that (like nsfs) will exist as a kern mount and be accessed via jump_link through a securityfs file. Setup the base apparmorfs fns and data, but don't use it yet. Signed-off-by: John Johansen Reviewed-by: Seth Arnold Reviewed-by: Kees Cook include/uapi/linux/magic.h | 2 + security/apparmor/apparmorfs.c | 353 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 338 insertions(+), 17 deletions(-) commit 64c8697045f87713f0648e8429fcc3a0c4c61ffd Author: John Johansen Date: Thu May 25 07:27:35 2017 -0700 apparmor: use macro template to simplify namespace seq_files Signed-off-by: John Johansen Reviewed-by: Seth Arnold Reviewed-by: Kees Cook security/apparmor/apparmorfs.c | 53 +++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit 52b97de32236d4cc9b302ae9259e70bb2f1fa2a5 Author: John Johansen Date: Thu May 25 04:35:09 2017 -0700 apparmor: use macro template to simplify profile seq_files Signed-off-by: John Johansen Reviewed-by: Seth Arnold Reviewed-by: Kees Cook security/apparmor/apparmorfs.c | 97 ++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 61 deletions(-) commit 5d5182cae40115c03933989473288e54afb39c7c Author: John Johansen Date: Tue May 9 00:08:41 2017 -0700 apparmor: move to per loaddata files, instead of replicating in profiles The loaddata sets cover more than just a single profile and should be tracked at the ns level. Move the load data files under the namespace and reference the files from the profiles via a symlink. Signed-off-by: John Johansen Reviewed-by: Seth Arnold Reviewed-by: Kees Cook security/apparmor/apparmorfs.c | 294 +++++++++++++++++++++++------- security/apparmor/include/apparmorfs.h | 5 + security/apparmor/include/policy_ns.h | 3 + security/apparmor/include/policy_unpack.h | 68 ++++++- security/apparmor/policy.c | 46 ++++- security/apparmor/policy_ns.c | 1 + security/apparmor/policy_unpack.c | 61 ++++++- 7 files changed, 409 insertions(+), 69 deletions(-) commit 6623ec7c4dbe18a5a2878e2d888be70d08a91826 Author: John Johansen Date: Sun May 7 05:53:37 2017 -0700 securityfs: add the ability to support symlinks Signed-off-by: John Johansen Reviewed-by: Seth Arnold Acked-by: Kees Cook include/linux/security.h | 12 ++++ security/inode.c | 144 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 135 insertions(+), 21 deletions(-) commit 4ae6f954b96c1fea86c6f21ae8fc413f5fc3444e Author: Stefan Wahren Date: Fri Mar 31 20:03:05 2017 +0000 ARM64: dts: bcm2837: Define CPU thermal coefficients This defines the bcm2837 SoC specific thermal coefficients in order to initialize the thermal driver correctly. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt Acked-by: Eduardo Valentin arch/arm64/boot/dts/broadcom/bcm2837.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 9c7a316570cd49c0b1a24e010e513036d1a63ef2 Merge: 738f859 a19adf8 Author: Eric Anholt Date: Thu Jun 8 12:34:26 2017 -0700 Merge tag 'bcm2835-dt-next-2017-06-08' into bcm2835-dt-64-next This merge brings in the cpu-thermal node we in bcm283x that we need in order to set the rpi3's coefficients. commit 50430d1fcab8ca5a80645992e229881b35b505a7 Merge: 3948b57 d193d53 Author: David S. Miller Date: Thu Jun 8 15:32:48 2017 -0400 Merge branch 'net-add-const-to-mii_phy_ops-structures' Bhumika Goyal says: ==================== drivers: net: add const to mii_phy_ops structures The object references of mii_phy_ops structures are only stored in the ops field of a mii_phy_def structure. This ops field is of type const. So, mii_phy_ops structures having similar properties can be declared as const. ==================== Signed-off-by: David S. Miller commit d193d53c1c1818f53cae0176d1f6a1509d80f449 Author: Bhumika Goyal Date: Thu Jun 8 11:30:58 2017 +0530 drivers: net: emac: add const to mii_phy_ops structures The object references of mii_phy_ops structures are only stored in the ops field of a mii_phy_def structure. This ops field is of type const. So, mii_phy_ops structures having similar properties can be declared as const. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/phy.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7cb6e01de3c4721de0f5411a6eae95a4f74cc5d7 Author: Bhumika Goyal Date: Thu Jun 8 11:30:57 2017 +0530 drivers/net/sungem: add const to mii_phy_ops structures The object references of mii_phy_ops structures are only stored in the ops field of a mii_phy_def structure. This ops field is of type const. So, mii_phy_ops structures having similar properties can be declared as const. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/sungem_phy.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 3948b57bd592c05bd6c08b3fea0862473cf9d5d9 Merge: b3fd822 833521e Author: David S. Miller Date: Thu Jun 8 14:41:19 2017 -0400 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 2017-06-07 This series contains a fix for e1000e and igb. Colin Ian King fixes sparse warnings in igb by making functions static. Chris Wilson provides a fix for a previous commit which is causing an issue during suspend "e1000e_pm_suspend()", where we need to run e1000e_pm_thaw() if __e1000_shutdown() is unsuccessful. ==================== Signed-off-by: David S. Miller commit b3fd82207e2723247aac478e8756451fe85b1ac2 Author: Rahul Lakkireddy Date: Thu Jun 8 10:52:11 2017 +0530 cxgb4: fix to bring link down after adapter crash Use PORT_REG for T4 and T5_PORT_REG for > T4 to write to correct register to bring down link during shutdown after adapter crash. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 772c344dbb23b2ce4568ac30afae92a842fa6d8f Author: Nikolay Aleksandrov Date: Wed Jun 7 18:02:32 2017 +0300 net: ipmr: add getlink support Currently there's no way to dump the VIF table for an ipmr table other than the default (via proc). This is a major issue when debugging ipmr issues and in general it is good to know which interfaces are configured. This patch adds support for RTM_GETLINK for the ipmr family so we can dump the VIF table and the ipmr table's current config for each table. We're protected by rtnl so no need to acquire RCU or mrt_lock. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/mroute.h | 42 +++++++++++++++ net/ipv4/ipmr.c | 126 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+) commit cb7f8fc59dd45c8dd8b9bcb9ef1c8a50e2f5df25 Merge: 4cd31af 2e915e0 Author: David S. Miller Date: Thu Jun 8 14:33:42 2017 -0400 Merge branch 'mlxsw-Remove-compatibility-with-old-firmware' Jiri Pirko says: ==================== mlxsw: Remove compatibility with old firmware Up until recently we couldn't enforce a minimal firmware version, which forced us to be compatible with old firmware versions. This patchset removes this code and simplifies the driver. ==================== Signed-off-by: David S. Miller commit 2e915e0b68c9213ed16493c8a28aa973d38d0353 Author: Ido Schimmel Date: Thu Jun 8 08:47:45 2017 +0200 mlxsw: spectrum: Pass port argument to module mapping functions Previous patch made it unnecessary to map ports to modules before we allocate their struct. We can now therefore pass the port struct to these functions, thereby making them consistent with other functions that operate on ports. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 5b15385964fab67953df706e1448e1a45db92adf Author: Ido Schimmel Date: Thu Jun 8 08:47:44 2017 +0200 mlxsw: spectrum: Simplify port split flow In commit be94535f9531 ("mlxsw: spectrum: Make split flow match firmware requirements") we had to modify the port split flow to overcome quirks in the device's firmware. This resulted in asymmetrical code with regards to port creation and removal. The problem in the firmware is long gone and since we can now enforce a minimal firmware version, we can simplify the code and make it symmetric again. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 103 +++++++------------------ 1 file changed, 28 insertions(+), 75 deletions(-) commit d7a60306c6812801ccc0a7d12aa0975121b9aa58 Author: Ido Schimmel Date: Thu Jun 8 08:47:43 2017 +0200 mlxsw: spectrum_router: Mark only first LPM tree as reserved In new firmware versions (that we can now enforce via request_firmware()), only the first LPM tree is reserved and not the first two as in older versions. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4227c333f65cddc6c2f048e5b67cfe796b9df9a6 Author: John Johansen Date: Tue May 23 03:25:14 2017 -0700 apparmor: Move path lookup to using preallocated buffers Dynamically allocating buffers is problematic and is an extra layer that is a potntial point of failure and can slow down mediation. Change path lookup to use the preallocated per cpu buffers. Signed-off-by: John Johansen security/apparmor/domain.c | 8 +-- security/apparmor/file.c | 13 ++--- security/apparmor/include/path.h | 4 +- security/apparmor/path.c | 114 ++++++++++++++------------------------- 4 files changed, 53 insertions(+), 86 deletions(-) commit 72c8a768641dc6ee8d1d9dcebd51bbec2817459b Author: John Johansen Date: Mon May 22 03:06:52 2017 -0700 apparmor: allow profiles to provide info to disconnected paths Signed-off-by: John Johansen security/apparmor/domain.c | 2 +- security/apparmor/file.c | 7 ++++--- security/apparmor/include/path.h | 3 ++- security/apparmor/include/policy.h | 2 ++ security/apparmor/path.c | 34 ++++++++++++++++++++++------------ security/apparmor/policy_unpack.c | 3 +++ 6 files changed, 34 insertions(+), 17 deletions(-) commit b91deb9db12851c18ccb55719f1cd55c2400aca1 Author: John Johansen Date: Mon May 22 02:47:22 2017 -0700 apparmor: make internal lib fn skipn_spaces available to the rest of apparmor Signed-off-by: John Johansen security/apparmor/include/lib.h | 1 + security/apparmor/lib.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit af7caa8f8dd1b45e38a3653a69ed4d708286bc83 Author: John Johansen Date: Sun May 21 17:15:28 2017 -0700 apparmor: move file context into file.h Signed-off-by: John Johansen security/apparmor/include/context.h | 32 -------------------------------- security/apparmor/include/file.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-) commit 651e54953b5d4ad103f0efa54fc6b380807fca3a Author: Thomas Schneider Date: Fri Oct 14 21:29:49 2016 +0200 security/apparmor: Use POSIX-compatible "printf '%s'" When using a strictly POSIX-compliant shell, "-n #define ..." gets written into the file. Use "printf '%s'" to avoid this. Signed-off-by: Thomas Schneider Signed-off-by: John Johansen security/apparmor/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ffac1de6cf6f84e47cdb6d6de0629bc534f60961 Author: Dan Carpenter Date: Tue May 23 17:33:46 2017 +0300 apparmor: Fix error cod in __aa_fs_profile_mkdir() We can either return PTR_ERR(NULL) or a PTR_ERR(a valid pointer) here. Returning NULL is probably not good, but since this happens at boot then we are probably already toasted if we were to hit this bug in real life. In other words, it seems like a very low severity bug to me. Signed-off-by: Dan Carpenter Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 47dbd1cdbb4e74d656e444deb6675ee38ca1b1f3 Author: Markus Elfring Date: Sun May 7 13:50:28 2017 +0200 apparmorfs: Use seq_putc() in two functions Two single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ff3d97f7676d9f513288a2d30582dcd2b34d238 Author: Markus Elfring Date: Sun May 7 13:43:50 2017 +0200 apparmorfs: Combine two function calls into one in aa_fs_seq_raw_abi_show() A bit of data was put into a sequence by two separate function calls. Print the same data by a single function call instead. Signed-off-by: Markus Elfring Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit dc629141c3336ae4b03c5fef5fb7bf1058752aed Author: Jyri Sarha Date: Tue May 30 19:29:55 2017 +0300 drm: Add const to name field declaration in struct drm_prop_enum_list There is no reason why the name field should not be const, but several why it should. The struct should only be used by drm_property_create_enum() and there the name-field from the struct is passed to drm_property_add_enum(), which takes a const char * as a parameter. Signed-off-by: Jyri Sarha Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/5dd3b6a1e20452bd8abdcbc55d1e8d7f56262266.1496161066.git.jsarha@ti.com include/drm/drm_property.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cd31af77582653a8e4b367fdb612e84a2cdd685 Merge: 6c8607e abfbf8a Author: David S. Miller Date: Thu Jun 8 14:16:31 2017 -0400 Merge branch 'net-Remove-support-from-bridge-bypass-for-mlxsw-rocker-drivers' Jiri Pirko says: =================== net: Remove support from bridge bypass for mlxsw/rocker drivers Currently setting bridge port attributes and adding FDBs are done via setting the SELF flag which implies unconsistent offloading model. This patch-set fixes this behavior by making the bridge and drivers which are using it to be totally in sync. This implies several changes: - Offloading bridge flags from the bridge code. - Sending notification about FDB add/del to the software bridge in a similiar way it is done for the hardware externally learned FDBs. By making the offloading model more consistent a cleanup is done in the drivers supporting it. This is done in order to remove un-needed logic related to dump operation which is redundant. First add missing functionality to bridge, then clean up the mlxsw/rocker drivers. v1->v2 - Move bridge-switchdev related stuff to br_switchdev.c as suggested by Nik =================== Signed-off-by: David S. Miller commit abfbf8a0b25e779d0e3533a7d99843982755d61e Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:28 2017 +0200 rocker: Remove support bridge bypass FDB The FDB add/delete are now done through the notification chain. The FDBs are synced with the bridge and there is no need for extra dumping. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker.h | 3 -- drivers/net/ethernet/rocker/rocker_main.c | 73 ------------------------------ drivers/net/ethernet/rocker/rocker_ofdpa.c | 30 ------------ 3 files changed, 106 deletions(-) commit 403caa7afc99bdd24a9382a2948b99ce5e6165e2 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:27 2017 +0200 rocker: Remove support for bypass bridge port attributes/vlan set The bridge port attributes/vlan for mlxsw devices should be set only from bridge code. The vlans are synced totally with the bridge so there is no need to special dump support. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker.h | 3 --- drivers/net/ethernet/rocker/rocker_main.c | 20 -------------------- drivers/net/ethernet/rocker/rocker_ofdpa.c | 24 ------------------------ 3 files changed, 47 deletions(-) commit 726fd42fc1e3fe478cf08169f639caf92daeef0d Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:26 2017 +0200 rocker: Add support for learning FDB through notification Add support for learning FDB through notification. The driver defers the hardware update via ordered work queue. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_main.c | 140 ++++++++++++++++++++++++++++-- 1 file changed, 135 insertions(+), 5 deletions(-) commit 00fc0c51e35b783f6542d14a30a5de1ce6549887 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:25 2017 +0200 rocker: Change world_ops API and implementation to be switchdev independant Currently the switchdev_trans struct is embedded in the world_ops API. In order to add support for adding FDB via a notfication chain the API should be switchdev independent. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker.h | 11 +- drivers/net/ethernet/rocker/rocker_main.c | 28 +- drivers/net/ethernet/rocker/rocker_ofdpa.c | 535 +++++++++++------------------ 3 files changed, 235 insertions(+), 339 deletions(-) commit 96673a30440a60559a63a16a6e7eb4ced02d7fe9 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:24 2017 +0200 rocker: Add support for querying supported bridge flags Add support for querying supported bridge flags. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker.h | 4 ++++ drivers/net/ethernet/rocker/rocker_main.c | 18 ++++++++++++++++++ drivers/net/ethernet/rocker/rocker_ofdpa.c | 11 +++++++++++ 3 files changed, 33 insertions(+) commit 8cc186a4856b6ef4e54c3464e67ca2e1b79d20aa Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:23 2017 +0200 rocker: Remove support for bridge FDB learning sync Currently the rocker driver supports an option for disabling syncing the hardware learned FDBs with the software bridge. This behavior breaks the bridge offload model and thus it is removed. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_ofdpa.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit eca59f691566ca4dacfe78714108dd98043e3d0b Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:22 2017 +0200 net: Remove support for bridge bypass ndos from stacked devices Remove support for bridge bypass ndos from stacked devices. At this point no driver which supports stack device behavior offload supports operation with SELF flag. The case for upper device is already taken care of in both of the following cases: 1. FDB add/del - driver should check at the notification cb if the stacked device contains his ports. 2. Port attribute - calls switchdev code directly which checks for case of stack device. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 6 ------ drivers/net/team/team.c | 6 ------ net/8021q/vlan_dev.c | 6 ------ 3 files changed, 18 deletions(-) commit be7432b952bcbe2d7ac27a9f8545cce4cc74a4df Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:21 2017 +0200 mlxsw: spectrum: Remove support for bridge bypass FDB add/del The FDB add/del are now done through the notification chain. The FDBs are synced with the bridge and there is no need for extra dumping. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 - .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 200 --------------------- 2 files changed, 203 deletions(-) commit af061378924f6d2f368b3769fd59fd95875dc942 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:20 2017 +0200 mlxsw: spectrum_switchdev: Add support for learning FDB through notification Add support for learning FDB through notification. The driver defers the hardware update via ordered work queue. Support for stacked devices is also provided. In case of a successful FDB add a notification is sent back to bridge. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 137 +++++++++++++++++++++ 3 files changed, 139 insertions(+), 1 deletion(-) commit 1b40dc3d86724c7f1e69d20020ffa4eb21d119ae Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:19 2017 +0200 mlxsw: spectrum_switchdev: Change switchdev notifier API The current API for sending switchdev notifications implies only FDB add/del. In order to support notification about successful FDB offload the API is changed. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 10e23eb299fa39c6f343bffc9e3d77c7d9f0492f Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:18 2017 +0200 mlxsw: spectrum: Remove support for bypass bridge port attributes/vlan set The bridge port attributes/vlan for mlxsw devices should be set only from bridge code. The vlans are synced totally with the bridge so there is no need to special dump support. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 -- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 41 ---------------------- 2 files changed, 44 deletions(-) commit c7b566cd2e7433785c8879b004940de3793901e1 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:17 2017 +0200 mlxsw: spectrum_switchdev: Add support for querying supported bridge flags Add support for querying supported bridge flags. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 3 +++ 1 file changed, 3 insertions(+) commit a989cdb473c2fd9cd0187fa9f7da8e4a7c989332 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:16 2017 +0200 mlxsw: spectrum: Remove support for bridge FDB learning sync Currently the mlxsw driver supports an option for disabling syncing the hardware learned FDBs with the software bridge. This behavior breaks the bridge offload model and thus it is removed. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 9fe8bcec0dbc19604acc3a2cd469febf96f0d59a Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:15 2017 +0200 net: bridge: Receive notification about successful FDB offload When a new static FDB is added to the bridge a notification is sent to the driver for offload. In case of successful offload the driver should notify the bridge back, which in turn should mark the FDB as offloaded. Currently, externally learned is equivalent for being offloaded which is not correct due to the fact that FDBs which are added from user-space are also marked as externally learned. In order to specify if an FDB was successfully offloaded a new flag is introduced. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/switchdev.h | 1 + include/uapi/linux/neighbour.h | 1 + net/bridge/br.c | 11 ++++++++++- net/bridge/br_fdb.c | 22 +++++++++++++++++++++- net/bridge/br_private.h | 5 ++++- 5 files changed, 37 insertions(+), 3 deletions(-) commit 6b26b51b1d13c62a09f55d745b06a8e964900715 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:14 2017 +0200 net: bridge: Add support for notifying devices about FDB add/del Currently the bridge doesn't notify the underlying devices about new FDBs learned. The FDB sync is placed on the switchdev notifier chain because devices may potentially learn FDB that are not directly related to their ports, for example: 1. Mixed SW/HW bridge - FDBs that point to the ASICs external devices should be offloaded as CPU traps in order to perform forwarding in slow path. 2. EVPN - Externally learned FDBs for the vtep device. Notification is sent only about static FDB add/del. This is done due to fact that currently this is the only scenario supported by switch drivers. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Reviewed-by: Ivan Vecera Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- drivers/net/ethernet/rocker/rocker_ofdpa.c | 4 +-- include/net/switchdev.h | 6 ++-- net/bridge/br.c | 4 +-- net/bridge/br_fdb.c | 2 ++ net/bridge/br_private.h | 7 +++++ net/bridge/br_switchdev.c | 33 ++++++++++++++++++++++ 7 files changed, 51 insertions(+), 7 deletions(-) commit ff5cf100110c6ea722d63dfa3d747ceb179e8da4 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:13 2017 +0200 net: switchdev: Change notifier chain to be atomic In order to use the switchdev notifier chain for FDB sync with the device it has to be changed to atomic. The is done because the bridge can learn new FDBs in atomic context. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Reviewed-by: Ivan Vecera Signed-off-by: Jiri Pirko Reviewed-by: Ivan Vecera Signed-off-by: David S. Miller net/switchdev/switchdev.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) commit 0baa10fff2c8a8a0e3bca8fb43112ed93c179c38 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:12 2017 +0200 net: bridge: Add support for calling FDB external learning under rcu This is done as a preparation to moving the switchdev notifier chain to be atomic. The FDB external learning should be called under rtnl or rcu. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/bridge/br.c | 4 ++-- net/bridge/br_fdb.c | 2 -- net/bridge/br_private.h | 6 ++++++ 3 files changed, 8 insertions(+), 4 deletions(-) commit 3922285d96e79231817227439c214728edfbe406 Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:11 2017 +0200 net: bridge: Add support for offloading port attributes Currently the flood, learning and learning_sync port attributes are offloaded by setting the SELF flag. Add support for offloading the flood and learning attribute through the bridge code. In case of setting an unsupported flag on a offloded port the operation will fail. The learning_sync attribute doesn't have any software representation and cannot be offloaded through the bridge code. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Reviewed-by: Ivan Vecera Signed-off-by: David S. Miller net/bridge/br_netlink.c | 87 +++++++++++++++++++++++++++++++++++------------ net/bridge/br_private.h | 10 ++++++ net/bridge/br_switchdev.c | 43 +++++++++++++++++++++++ 3 files changed, 119 insertions(+), 21 deletions(-) commit dc0ecabd6231f6cec2493783a4111f7a85175c8a Author: Arkadi Sharshevsky Date: Thu Jun 8 08:44:10 2017 +0200 net: switchdev: Add support for querying supported bridge flags by hardware This is done as a preparation stage before setting the bridge port flags from the bridge code. Currently the device can be queried for the bridge flags state, but the querier cannot distinguish if the flag is disabled or if it is not supported at all. Thus, add new attr and a bit-mask which include information regarding the support on a per-flag basis. Drivers that support bridge offload but not support bridge flags should return zeroed bitmask. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Reviewed-by: Ivan Vecera Signed-off-by: Jiri Pirko Reviewed-by: Ivan Vecera Signed-off-by: David S. Miller include/net/switchdev.h | 2 ++ 1 file changed, 2 insertions(+) commit 7eb2bcb2efccf07cc4bc31791e3c36bebe12b8ad Author: Alexandre Courbot Date: Wed Jun 7 06:33:02 2017 -0300 [media] media-ioc-g-topology.rst: fix typos Fix what seems to be a few typos induced by copy/paste. [mchehab@s-opensource.com: fix a typo] Signed-off-by: Alexandre Courbot Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a136f59c0a1f1b09eb203951975e3fc5e8d3e722 Author: Sakari Ailus Date: Wed May 31 11:17:26 2017 -0300 [media] vb2: Move buffer cache synchronisation to prepare from queue The buffer cache should be synchronised in buffer preparation, not when the buffer is queued to the device. Fix this. Mmap buffers do not need cache synchronisation since they are always coherent. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 6aca5b8fb86681954e6715494e74106db505701c Author: Sakari Ailus Date: Wed May 31 11:17:25 2017 -0300 [media] vb2: Rename confusingly named internal buffer preparation functions Rename __qbuf_*() functions which are specific to a buffer type as __prepare_*() which matches with what they do. The naming was there for historical reasons; the purpose of the functions was changed without renaming them. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit acc490bbb7f9958530506f10adce75c8818b6a96 Author: Mauro Carvalho Chehab Date: Thu Jun 8 13:29:21 2017 -0300 [media] atomisp: use correct dialect to disable warnings There's a Macro that checks if gcc supports a warning before disabling it. Use it, in order to avoid warnings when building with older gcc versions. Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/Makefile | 6 ++++-- drivers/staging/media/atomisp/i2c/imx/Makefile | 6 ++++-- drivers/staging/media/atomisp/i2c/ov5693/Makefile | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) commit a2237ae761d9baa0e814e61140ca4524e31eb92b Author: Sergey Dyasli Date: Wed Jun 7 08:20:12 2017 +0100 xen: fix HYPERVISOR_dm_op() prototype Change the third parameter to be the required struct xen_dm_op_buf * instead of a generic void * (which blindly accepts any pointer). Signed-off-by: Sergey Dyasli Reviewed-by: Juergen Gross Reviewed-by: Stefano Stabellini Signed-off-by: Juergen Gross arch/x86/include/asm/xen/hypercall.h | 4 +++- include/xen/arm/hypercall.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 82525c17dedca6316b07c20c62627c83800caa31 Author: Rodrigo Vivi Date: Thu Jun 8 08:50:00 2017 -0700 drm/i915/cfl: Introduce Display workarounds for Coffee Lake. The whole Display engine for Coffee Lake is pretty much identical to the Kabylake. For this reason let's reuse all display related production workardounds here even though CFL is not explicit listed at Display workarounds page at Spec. v2: moved intel_pm.c chunck to this patch in order to address all display related w/a in a single place. Cc: Arthur Runyan Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: http://patchwork.freedesktop.org/patch/msgid/1496937000-8450-3-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 809378196bb449fe30d0ca15a990965fc553f9f5 Author: Rodrigo Vivi Date: Thu Jun 8 08:49:59 2017 -0700 drm/i915/cfl: Coffee Lake uses CNP PCH. So let's force it on the virtual detection. Also it is still the only silicon for now on this PCH, so WARN otherwise. v2: Rebased on top of Cannonlake and added the missed debug message as pointed by DK. Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Anusha Srivatsa Link: http://patchwork.freedesktop.org/patch/msgid/1496937000-8450-2-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 71851fa82f4d644f947dd60cfcf81b47640c1b51 Author: Rodrigo Vivi Date: Thu Jun 8 08:49:58 2017 -0700 drm/i915/cfl: Introduce Coffee Lake platform definition. Coffee Lake is a Intel® Processor containing Intel® HD Graphics following Kabylake. It is Gen9 graphics based platform on top of CNP PCH. Let's start by adding the platform definition based on previous platforms but yet as preliminary_hw_support. On following patches we will start adding PCI IDs and the platform specific changes. v2: Also add BS2 ring that is present on GT3. As on KBL, according spec: "GT3 also has additional media blocks with second instance of VEBox and VDBox each", i.e. BSD2 ring in our case. Noticed when reviewing PCI ID patches. v3: CFL_PLATFORM instead for CFL_FEATURES because it contains Platform information and no new features when compared to BDW_FEATURES definition. v4: Rebased on top of Cannonlake patches. Cc: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Reviewed-by: Anusha Srivatsa Link: http://patchwork.freedesktop.org/patch/msgid/1496937000-8450-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 16 ++++++++++++++++ drivers/gpu/drm/i915/intel_device_info.c | 1 + 3 files changed, 19 insertions(+) commit 865279c53ca9d88718d974bb014b2c6ce259ac75 Author: Stefan Raspl Date: Wed Jun 7 21:08:43 2017 +0200 tools/kvm_stat: display guest list in pid/guest selection screens Display a (possibly inaccurate) list of all running guests. Note that we leave a bit of extra room above the list for potential error messages. Furthermore, we deliberately do not reject pids or guest names that are not in our list, as we cannot rule out that our fuzzy approach might be in error somehow. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 49 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 12 deletions(-) commit 6667ae8f395099257afca0963838d2dc50a18da7 Author: Stefan Raspl Date: Wed Jun 7 21:08:41 2017 +0200 tools/kvm_stat: add new interactive command 'o' Add new interactive command 'o' to toggle sorting by 'CurAvg/s' (default) and 'Total' columns. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 17 ++++++++++++++++- tools/kvm/kvm_stat/kvm_stat.txt | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 153e9e90ff89a2ec04276968b6769de7b00d86f6 Merge: c800384 f1bea87 Author: Sebastian Reichel Date: Thu Jun 8 18:21:25 2017 +0200 Merge branch 'psy-reboot-mode-immutable' into psy-next commit 64eefad2cdbf2d7c76e24d0b67e19efdbe1c97a9 Author: Stefan Raspl Date: Wed Jun 7 21:08:39 2017 +0200 tools/kvm_stat: add new interactive command 's' Add new command 's' to modify the update interval. Limited to a maximum of 25.5 sec and a minimum of 0.1 sec, since curses cannot handle longer and shorter delays respectively. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 55 +++++++++++++++++++++++++++++++++++------ tools/kvm/kvm_stat/kvm_stat.txt | 2 ++ 2 files changed, 49 insertions(+), 8 deletions(-) commit f1bea8793d939e594afb3407c26d9cec8792d42f Author: Bjorn Andersson Date: Fri May 26 23:51:29 2017 -0700 power: reset: reboot-mode: Make include file global Move the reboot-mode.h include file into include/linux to allow drivers outside drivers/power/reset to implement reboot-mode. Signed-off-by: Bjorn Andersson Signed-off-by: Sebastian Reichel drivers/power/reset/reboot-mode.c | 2 +- drivers/power/reset/reboot-mode.h | 18 ------------------ drivers/power/reset/syscon-reboot-mode.c | 2 +- include/linux/reboot-mode.h | 18 ++++++++++++++++++ 4 files changed, 20 insertions(+), 20 deletions(-) commit 1fdea7b2893045e5258a13937c3d78c425fd7aa0 Author: Stefan Raspl Date: Wed Jun 7 21:08:38 2017 +0200 tools/kvm_stat: add new interactive command 'h' Display interactive commands reference on 'h'. While at it, sort interactive commands alphabetically in various places. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 37 ++++++++++++++++++++++++++++++++----- tools/kvm/kvm_stat/kvm_stat.txt | 2 ++ 2 files changed, 34 insertions(+), 5 deletions(-) commit 38e89c37a1e05e6e16af582b980534abda29a4d9 Author: Stefan Raspl Date: Wed Jun 7 21:08:37 2017 +0200 tools/kvm_stat: rename 'Current' column to 'CurAvg/s' 'Current' can be misleading as it doesn't tell whether this is the amount of events in the last interval or the current average per second. Note that this necessitates widening the respective column by one more character. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f6d753102a2469ae4ce08ef3e34d170ec583fb50 Author: Stefan Raspl Date: Wed Jun 7 21:08:36 2017 +0200 tools/kvm_stat: make heading look a bit more like 'top' Print header in standout font just like the 'top' command does. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5725393764a342b6a5420fdd10184984ca08b5f6 Author: Stefan Raspl Date: Wed Jun 7 21:08:35 2017 +0200 tools/kvm_stat: display message indicating lack of events Give users some indication on the reason why no data is displayed on the screen yet. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 2 ++ 1 file changed, 2 insertions(+) commit 62d1b6cc24d0dedde89e6a39aae1711270aee1c9 Author: Stefan Raspl Date: Wed Jun 7 21:08:34 2017 +0200 tools/kvm_stat: show cursor in selection screens Show the cursor in the interactive screens to specify pid, filter or guest name as an orientation for the user. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 6 ++++++ 1 file changed, 6 insertions(+) commit 099a2dfc674e3333bd4ff5e5b106ccd788aa46d7 Author: Stefan Raspl Date: Wed Jun 7 21:08:33 2017 +0200 tools/kvm_stat: move functions to corresponding classes Quite a few of the functions are used only in a single class. Moving functions accordingly to improve the overall structure. Furthermore, introduce a base class for the providers, which might also come handy for future extensions. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 327 ++++++++++++++++++++++---------------------- 1 file changed, 165 insertions(+), 162 deletions(-) commit c469117df05955901d2950b6130770e526b1dbf4 Author: Stefan Raspl Date: Wed Jun 7 21:08:32 2017 +0200 tools/kvm_stat: simplify initializers Simplify a couple of initialization routines: * TracepointProvider and DebugfsProvider: Pass pid into __init__() instead of switching to the requested value in an extra call after initializing to the default first. * Pass a single options object into Stats.__init__(), delaying options evaluation accordingly, instead of evaluating options first and passing several parts of the options object to Stats.__init__() individually. * Eliminate Stats.update_provider_pid(), since this 2-line function is now used in a single place only. * Remove extra call to update_drilldown() in Tui.__init__() by getting the value of options.fields right initially when parsing options. * Simplify get_providers() logic. * Avoid duplicate fields initialization by handling it once in the providers' __init__() methods. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 74 ++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 38 deletions(-) commit 5e3823a49c50d70cc6b92808c262a43cf3505f3c Author: Stefan Raspl Date: Wed Jun 7 21:08:31 2017 +0200 tools/kvm_stat: remove extra statement Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 1 - 1 file changed, 1 deletion(-) commit 42a947b77b00da8fb1c9b1350eaa85fd3d53bacb Author: Stefan Raspl Date: Wed Jun 7 21:08:30 2017 +0200 tools/kvm_stat: removed unused function Function available_fields() is not used in any place. Signed-off-by: Stefan Raspl Reviewed-by: Janosch Frank Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 3 --- 1 file changed, 3 deletions(-) commit 5a7d11f8dc59ddb36e89dca42a2526ea25914def Author: Stefan Raspl Date: Wed Jun 7 21:08:29 2017 +0200 tools/kvm_stat: simplify line print logic Simplify line print logic for header and data lines in interactive mode as previously suggested by Radim. While at it, add a space between the first two columns to avoid the total bleeding into the event name. Furthermore, for column 'Current', differentiate between no events being reported (empty 'Current' column) vs the case where events were reported but the average was rounded down to zero ('0' in 'Current column), for the folks who appreciate the difference. Finally: Only skip events which were not reported at all yet, instead of events that don't have a value in the current interval. Considered using constants for the field widths in the format strings. However, that would make things a bit more complicated, and considering that there are only two places where output happens, I figured it isn't worth the trouble. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) commit 2da9d4aaa7348fc13374d7398c9c7027b0a9e2cb Author: Stefan Raspl Date: Wed Jun 7 21:08:28 2017 +0200 tools/kvm_stat: remove unnecessary header redraws Certain interactive commands will not modify any information displayed in the header, hence we can skip them. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 2 -- 1 file changed, 2 deletions(-) commit 81468d73b6eb0ed251e7c77f2cc44c0f4edb4d36 Author: Stefan Raspl Date: Wed Jun 7 21:08:27 2017 +0200 tools/kvm_stat: fix undue use of initial sleeptime We should not use the initial sleeptime for any key press that does not switch to a different screen, as that introduces an unaesthetic flicker due to two updates in quick succession. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 3 --- 1 file changed, 3 deletions(-) commit 124c2fc9fdf5fb1d9cea4707d7e5471e317ba3bf Author: Stefan Raspl Date: Wed Jun 7 21:08:26 2017 +0200 tools/kvm_stat: fix event counts display for interrupted intervals When an update interval is interrupted via key press (e.g. space), the 'Current' column value is calculated using the full interval length instead of the elapsed time, which leads to lower than actual numbers. Furthermore, the value should be rounded, not truncated. This is fixed by using the actual elapsed time for the calculation. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 773bffeeb2f1fca7739516d0a5a814dd14a5cc83 Author: Stefan Raspl Date: Wed Jun 7 21:08:25 2017 +0200 tools/kvm_stat: fix typo Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 102ebe266c317da59471e2cde0dce603de031482 Author: Mark Brown Date: Thu Jun 8 17:02:02 2017 +0100 ASoC: Back out post commit widget creation changes Due to build errors revert commit c8597af855f3 (ASoC: topology: Allow bespoke configuration post widget creation) until they can be fixed. Signed-off-by: Mark Brown sound/soc/soc-topology.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit ebb127f2d6f32665643165289151bd20929d9931 Author: Christoffer Dall Date: Tue May 16 19:53:50 2017 +0200 KVM: arm/arm64: Don't assume initialized vgic when setting PMU IRQ The PMU IRQ number is set through the VCPU device's KVM_SET_DEVICE_ATTR ioctl handler for the KVM_ARM_VCPU_PMU_V3_IRQ attribute, but there is no enforced or stated requirement that this must happen after initializing the VGIC. As a result, calling vgic_valid_spi() which relies on the nr_spis being set during the VGIC init can incorrectly fail. Introduce irq_is_spi, which determines if an IRQ number is within the SPI range without verifying it against the actual VGIC properties. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier include/kvm/arm_vgic.h | 2 ++ virt/kvm/arm/pmu.c | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) commit cb3f0ad881a6cee39c6a652b4aa4f12f341d98f0 Author: Christoffer Dall Date: Tue May 16 12:41:18 2017 +0200 KVM: arm/arm64: Disallow userspace control of in-kernel IRQ lines When injecting an IRQ to the VGIC, you now have to present an owner token for that IRQ line to show that you are the owner of that line. IRQ lines driven from userspace or via an irqfd do not have an owner and will simply pass a NULL pointer. Also get rid of the unused kvm_vgic_inject_mapped_irq prototype. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier include/kvm/arm_vgic.h | 4 +--- virt/kvm/arm/arch_timer.c | 3 ++- virt/kvm/arm/arm.c | 4 ++-- virt/kvm/arm/pmu.c | 3 ++- virt/kvm/arm/vgic/vgic-irqfd.c | 2 +- virt/kvm/arm/vgic/vgic.c | 15 +++++++++++---- 6 files changed, 19 insertions(+), 12 deletions(-) commit c800384490500cdf4c2409a9052862d1db805499 Author: Quentin Schulz Date: Thu May 11 15:42:20 2017 +0200 power: supply: axp20x_battery: add DT support for battery max constant charge current This adds the ability to set the maximum constant charge current, supported by the battery, delivered by this battery power supply to the battery. The maximum constant charge current set in DT will also set the default constant charge current supplied by this supply. The actual user can modify the constant charge current within the range of 0 to maximum constant charge current via sysfs. The user can also modify the maximum constant charge current to widen the range of possible constant charge current. While this seems quite risky, a message is printed on the console to warn the user this might damage the battery. The reason for letting the user change the maximum constant charge current is for letting users change the battery and thus, let them adjust the maximum constant charge current according to what the battery can support. Signed-off-by: Quentin Schulz Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_battery.c | 78 +++++++++++++++++++++++++++++++---- 1 file changed, 70 insertions(+), 8 deletions(-) commit f8c91bae0c37dfc5aecc49cafc5c1ea9d9227731 Author: Quentin Schulz Date: Thu May 11 15:42:17 2017 +0200 power: supply: axp20x_battery: add support for DT battery This adds support in X-Powers AXP20X and AXP22X battery driver for a fixed battery in DT. It will take the minimum supported voltage by the battery as defined in the battery DT node and set the V_OFF register to this value, telling the system to shut down if the supplied power is below this value. Signed-off-by: Quentin Schulz Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_battery.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ccce440956c79343ab3aa1269a4cf57f9cce030f Author: Liam Breck Date: Wed Jun 7 11:37:56 2017 -0700 power: supply: bq27xxx: Add power_supply_battery_info support Previously there was no way to configure these chips in the event that the defaults didn't match the battery in question. For chips with RAM data memory (and also those with flash/NVM data memory if CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is defined and the user has not set module param dt_monitored_battery_updates_nvm=0) we now call power_supply_get_battery_info(), check its values, and write battery properties to chip data memory if there is a dm_regs table for the chip. Signed-off-by: Matt Ranostay Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 11 ++ drivers/power/supply/bq27xxx_battery.c | 204 ++++++++++++++++++++++++++++++++- include/linux/power/bq27xxx_battery.h | 2 + 3 files changed, 216 insertions(+), 1 deletion(-) commit 0670c9b3588f163cfcfcd8ea532f321ec004e6ad Author: Liam Breck Date: Wed Jun 7 11:37:55 2017 -0700 power: supply: bq27xxx: Add chip data memory read/write support Add these to enable read/write of chip data memory RAM/NVM/flash: bq27xxx_battery_seal() bq27xxx_battery_unseal() bq27xxx_battery_set_cfgupdate() bq27xxx_battery_soft_reset() bq27xxx_battery_read_dm_block() bq27xxx_battery_write_dm_block() bq27xxx_battery_checksum_dm_block() Signed-off-by: Matt Ranostay Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 265 +++++++++++++++++++++++++++++++++ include/linux/power/bq27xxx_battery.h | 1 + 2 files changed, 266 insertions(+) commit 6c8607eb34369092f2f3bf9f99522ed7555b3a04 Merge: 7eca9cc adc3a9c Author: David S. Miller Date: Thu Jun 8 11:43:33 2017 -0400 Merge branch 'dsa-add-cross-chip-VLAN-support' Vivien Didelot says: ==================== net: dsa: add cross-chip VLAN support The current code in DSA does not support cross-chip VLAN. This means that in a multi-chip environment such as this one (similar to ZII Rev B) [CPU].................... (mdio) (eth0) | : : : _|_____ _______ _______ [__sw0__]--[__sw1__]--[__sw2__] | | | | | | | | | v v v v v v v v v p1 p2 p3 p4 p5 p6 p7 p8 p9 adding a VLAN to p9 won't be enough to reach the CPU, until at least one port of sw0 and sw1 join the VLAN as well and become aware of the VID. This patchset makes the DSA core program the VLAN on the CPU and DSA links itself, which brings seamlessly cross-chip VLAN support to DSA. With this series applied*, the hardware VLAN tables of a 3-switch setup look like this after adding a VLAN to only one port of the end switch: # cat /sys/class/net/br0/bridge/default_pvid 42 # cat /sys/kernel/debug/mv88e6xxx/sw{0,1,2}/vtu # ip link set up master br0 dev lan6 # cat /sys/kernel/debug/mv88e6xxx/sw{0,1,2}/vtu VID FID SID 0 1 2 3 4 5 6 42 1 0 x x x x x = = VID FID SID 0 1 2 3 4 5 6 42 1 0 x x x x x = = VID FID SID 0 1 2 3 4 5 6 7 8 9 42 1 0 u x x x x x x x x = ('x' is excluded, 'u' is untagged, '=' is unmodified DSA and CPU ports.) Completely removing a VLAN entry (which is currently the responsibility of drivers anyway) is not supported yet since it requires some caching. (*) the output is shown from this out-of-tree debugfs patch: https://github.com/vivien/linux/commit/7b61a684b9d6b6a499135a587c7f62a1fddceb8b.patch Changes in v2: - canonical incrementation (port++ instead of ++port) - check CPU and DSA ports before purging a VLAN - add Reviewed-by tags ==================== Signed-off-by: David S. Miller commit adc3a9ce853cc4a8563ab2d08351bced8cd7d524 Author: Vivien Didelot Date: Wed Jun 7 18:12:17 2017 -0400 net: dsa: mv88e6xxx: do not skip ports on VLAN del The mv88e6xxx driver currently tries to be smart and remove by itself a VLAN entry from the VTU when the driven switch sees no user ports as members of the VLAN. This is bad in a multi-chip switch fabric, since a chip in between others may have no bridge port members, but still needs to be aware of the VID in order to correctly pass frames in the data path. Now that the DSA core explicitly manages DSA and CPU ports, do not skip them when checking remaining VLAN members. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 4 ---- 1 file changed, 4 deletions(-) commit 553a768dea1d113f467fb45bb26c4bb3d6b643c4 Author: Vivien Didelot Date: Wed Jun 7 18:12:16 2017 -0400 net: dsa: mv88e6xxx: exclude all ports in new VLAN Now that the DSA core adds the CPU and DSA ports itself to the new VLAN entry, there is no need to include them as members of this VLAN when initializing a new VTU entry. As of now, initialize a new VTU entry with all ports excluded. Reviewed-by: Florian Fainelli Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b2f81d304cee0e027c666890f52644a92062cce0 Author: Vivien Didelot Date: Wed Jun 7 18:12:15 2017 -0400 net: dsa: add CPU and DSA ports as VLAN members In a multi-chip switch fabric, it is currently the responsibility of the driver to add the CPU or DSA (interconnecting chips together) ports as members of a new VLAN entry. This makes the drivers more complicated. We want the DSA drivers to be stupid and the DSA core being the one responsible for caring about the abstracted switch logic and topology. Make the DSA core program the CPU and DSA ports as part of the VLAN. This makes all chips of the data path to be aware of VIDs spanning the the whole fabric and thus, seamlessly add support for cross-chip VLAN. Reviewed-by: Florian Fainelli Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/switch.c | 3 +++ 1 file changed, 3 insertions(+) commit 1ca4aa9cd4cc075e3fddbba80fd2ed2f479bfb22 Author: Vivien Didelot Date: Wed Jun 7 18:12:14 2017 -0400 net: dsa: check VLAN capability of every switch Now that the VLAN object is propagated to every switch chip of the switch fabric, we can easily ensure that they all support the required VLAN operations before modifying an entry on a single switch. To achieve that, remove the condition skipping other target switches, and add a bitmap of VLAN members, eventually containing the target port, if we are programming the switch target. This will allow us to easily add other VLAN members, such as the DSA or CPU ports (to introduce cross-chip VLAN support) or the other port members if we want to reduce hardware accesses later. Reviewed-by: Florian Fainelli Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/switch.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit c91498e15bf2cf27fb2743d01bd105201f33a5cb Author: Vivien Didelot Date: Wed Jun 7 18:12:13 2017 -0400 net: dsa: mv88e6xxx: define membership on VLAN add Define the target port membership of the VLAN entry in mv88e6xxx_port_vlan_add where ds is scoped. Allow the DSA core to call later the port_vlan_add operation for CPU or DSA ports, by using the Unmodified membership for these ports, as in the current behavior. Reviewed-by: Florian Fainelli Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 7eca9cc53987fc496186e0e5fd1ecd573f5a03a1 Merge: 546692e e754eba Author: David S. Miller Date: Thu Jun 8 11:41:41 2017 -0400 Merge tag 'rxrpc-rewrite-20170607-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Tx length parameter Here's a set of patches that allows someone initiating a client call with AF_RXRPC to indicate upfront the total amount of data that will be transmitted. This will allow AF_RXRPC to encrypt directly from source buffer to packet rather than having to copy into the buffer and only encrypt when it's full (the encrypted portion of the packet starts with a length and so we can't encrypt until we know what the length will be). The three patches are: (1) Provide a means of finding out what control message types are actually supported. EINVAL is reported if an unsupported cmsg type is seen, so we don't want to set the new cmsg unless we know it will be accepted. (2) Consolidate some stuff into a struct to reduce the parameter count on the function that parses the cmsg buffer. (3) Introduce the RXRPC_TX_LENGTH cmsg. This can be provided on the first sendmsg() that contributes data to a client call request or a service call reply. If provided, the user must provide exactly that amount of data or an error will be incurred. Changes in version 2: (*) struct rxrpc_send_params::tx_total_len should be s64 not u64. Thanks to Julia Lawall for reporting this. ==================== Signed-off-by: David S. Miller commit 703ecba4dbfb8de9cad7420021dfcbd11007de3b Author: Mauro Carvalho Chehab Date: Thu Jun 8 12:34:44 2017 -0300 [media] staging: css2400/Makefile: don't include non-existing files The atomisp css2400/Makefile includes a Makefile.common: include $(srctree)/$(src)/../Makefile.common Well, this file doesn't exist at the Kernel tree :-) So, don't include it. Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/css2400/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 546692e1dba039c203eb295ff024f73eccfe5cca Merge: 02417f4 b24844b Author: David S. Miller Date: Thu Jun 8 11:34:58 2017 -0400 Merge branch 'qrtr-features' Bjorn Andersson says: ==================== Missing QRTR features The QMUX specification covers packet routing as well as service life cycle and discovery. The current implementation of qrtr supports the prior part, but in order to fully implement service management on-top a few more parts are needed. The first patch in the series serves the purpose of reducing duplication in patch two and three. The second and third patch adds two qrtr-level notifications required by the specification, in order to notify local and remote service controllers about dying clients. The last patch serves the purpose of notifying local clients about the presence of a local service register, allowing them to register services as well as querying for remote registered services. ==================== Signed-off-by: David S. Miller commit b24844b1b537c34e3069c4bcfb448a5a05c9e0dc Author: Bjorn Andersson Date: Wed Jun 7 14:07:39 2017 -0700 net: qrtr: Inform open sockets about new controller As the higher level communication only deals with "services" the a service directory is required to keep track of local and remote services. In order for qrtr clients to be informed about when the service directory implementation is available some event needs to be passed to them. Rather than introducing support for broadcasting such a message in-band to all open local sockets we flag each socket with ENETRESET, as there are no other expected operations that would benefit from having support from locally broadcasting messages. Cc: Courtney Cavin Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 1784473b242585f407d3e75654d5b06f462a355b Author: Bjorn Andersson Date: Wed Jun 7 14:07:38 2017 -0700 net: qrtr: Broadcast DEL_CLIENT message when endpoint is closed Per the QMUXv2 protocol specificiation a DEL_CLIENT message should be broadcasted when an endpoint is disconnected. The protocol specification does suggest that the router can keep track of which nodes the endpoint has been communicating with to not wake up sleeping remotes unecessarily, but implementation of this suggestion is left for the future. Cc: Courtney Cavin Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 8acc8ee465e69ed47bc9cde8d271a1189648d762 Author: Bjorn Andersson Date: Wed Jun 7 14:07:37 2017 -0700 net: qrtr: Inject BYE on remote termination Per the QMUX protocol specification a terminating node can send a BYE control message to signal that the link is going down, upon receiving this all information about remote services should be discarded and local clients should be notified. In the event that the link was brought down abruptly the router is supposed to act like a BYE message has arrived. As there is no harm in receiving an extra BYE from the remote this patch implements the latter by injecting a BYE when the link to the remote is unregistered. The name service will receive the BYE and can implement the notification to the local clients. Cc: Courtney Cavin Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 64f9eca06415dc820ff8a2263f846dc8199adb50 Author: Bjorn Andersson Date: Wed Jun 7 14:07:36 2017 -0700 net: qrtr: Refactor packet allocation Extract the allocation and filling in the control message header fields to a separate function in order to reuse this in subsequent patches. Cc: Courtney Cavin Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 60829e62bb8a949d2d0f03b502c9a8ee83d22ab7 Author: Wolfram Sang Date: Sun May 28 06:30:50 2017 -0300 [media] v4l: rcar_fdp1: use proper name for the R-Car SoC It is 'R-Car', not 'RCar'. No code or binding changes, only descriptive text. Signed-off-by: Wolfram Sang Acked-by: Kieran Bingham Acked-by: Geert Uytterhoeven Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar_fdp1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04f3fc7615c7f8843133cc59d4587d3cd547ce1c Author: Wolfram Sang Date: Sun May 28 06:30:49 2017 -0300 [media] rcar_vin: use proper name for the R-Car SoC It is 'R-Car', not 'RCar'. No code or binding changes, only descriptive text. Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/rcar_vin.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 586248a75b36d39aa60eb6e447b7f7e25e011e73 Author: Sakari Ailus Date: Fri May 26 10:00:48 2017 -0300 [media] ad5820: unregister async sub-device The async sub-device was not unregistered in ad5820_remove() as it should have been; do it now. Also remove the now-redundant v4l2_device_unregister_subdev(). Signed-off-by: Sakari Ailus Acked-by: Pavel Machek Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ad5820.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13c6c6ea1a89fea426935501ddd064d271d836d6 Author: Mauro Carvalho Chehab Date: Thu Jun 8 12:14:09 2017 -0300 [media] platform/Makefile: don't depend on arch to include dirs Depending on arch configs to include dirs is evil, and makes harder to change drivers to work with COMPILE_TEST. Replace them by obj-y. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2d17962c9ca7ac66a132bbbfc6054559856e14e Author: Sakari Ailus Date: Thu Jun 8 12:04:07 2017 -0300 [media] davinci: Switch from V4L2 OF to V4L2 fwnode The DaVinci VPIF capture driver V4L2 OF support was added after the V4L2 OF framework got removed. Switch VPIF capture driver to V4L2 fwnode. Signed-off-by: Sakari Ailus drivers/media/platform/davinci/Kconfig | 1 + drivers/media/platform/davinci/vpif_capture.c | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) commit 02417f47875c2a22d2a8c140c5b945c741005938 Author: Gustavo A. R. Silva Date: Wed Jun 7 15:15:01 2017 -0500 mISDN: remove unnecessary variable assignments Remove unnecessary variable assignments. Addresses-Coverity-ID: 1226917 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/mISDNipac.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0604475119de5f80dc051a5db055c6a2a75bd542 Author: Eric Dumazet Date: Wed Jun 7 13:29:12 2017 -0700 tcp: add TCPMemoryPressuresChrono counter DRAM supply shortage and poor memory pressure tracking in TCP stack makes any change in SO_SNDBUF/SO_RCVBUF (or equivalent autotuning limits) and tcp_mem[] quite hazardous. TCPMemoryPressures SNMP counter is an indication of tcp_mem sysctl limits being hit, but only tracking number of transitions. If TCP stack behavior under stress was perfect : 1) It would maintain memory usage close to the limit. 2) Memory pressure state would be entered for short times. We certainly prefer 100 events lasting 10ms compared to one event lasting 200 seconds. This patch adds a new SNMP counter tracking cumulative duration of memory pressure events, given in ms units. $ cat /proc/sys/net/ipv4/tcp_mem 3088 4117 6176 $ grep TCP /proc/net/sockstat TCP: inuse 180 orphan 0 tw 2 alloc 234 mem 4140 $ nstat -n ; sleep 10 ; nstat |grep Pressure TcpExtTCPMemoryPressures 1700 TcpExtTCPMemoryPressuresChrono 5209 v2: Used EXPORT_SYMBOL_GPL() instead of EXPORT_SYMBOL() as David instructed. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 22 ++-------------------- include/net/tcp.h | 3 ++- include/uapi/linux/snmp.h | 1 + net/core/sock.c | 20 ++++++++++++++++++++ net/decnet/af_decnet.c | 2 +- net/ipv4/proc.c | 1 + net/ipv4/tcp.c | 31 +++++++++++++++++++++++++------ net/ipv4/tcp_ipv4.c | 1 + net/ipv6/tcp_ipv6.c | 1 + net/sctp/socket.c | 2 +- 10 files changed, 55 insertions(+), 29 deletions(-) commit 511324e462a12ea8be1a7e5fc63a992134db80d7 Author: Paul E. McKenney Date: Fri Apr 28 17:04:09 2017 -0700 rcu: Use RCU_NOCB_WAKE rather than RCU_NOGP_WAKE The RCU_NOGP_WAKE_NOT, RCU_NOGP_WAKE, and RCU_NOGP_WAKE_FORCE flags are used to mediate wakeups for the no-CBs CPU kthreads. The "NOGP" really doesn't make any sense, so this commit does s/NOGP/NOCB/. Signed-off-by: Paul E. McKenney kernel/rcu/tree.h | 6 +++--- kernel/rcu/tree_plugin.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit d7d34d5e46140a13f86379c87a196dc8a0b9b585 Author: Paul E. McKenney Date: Fri Apr 28 16:33:07 2017 -0700 sched: Rely on synchronize_rcu_mult() de-duplication The synchronize_rcu_mult() function now detects duplicate requests for the same grace-period flavor and waits only once for each flavor. This commit therefore removes the ugly #ifdef from sched_cpu_deactivate() because synchronize_rcu_mult(call_rcu, call_rcu_sched) now does what the #ifdef used to be needed for. Signed-off-by: Paul E. McKenney Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner kernel/sched/core.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 68ab0b4263224157f4d0c0e42854169a183d7534 Author: Paul E. McKenney Date: Fri Apr 28 16:19:07 2017 -0700 rcu: Make synchronize_rcu_mult() check for duplicates Currently, doing synchronize_rcu_mult(call_rcu, call_rcu) might (or might not) wait for two RCU grace periods. One approach is of course "don't do that!", but in CONFIG_PREEMPT=n kernels, synchronize_rcu_mult(call_rcu, call_rcu_sched) does exactly that. This results in an ugly #ifdef in sched_cpu_deactivate(). This commit therefore makes __wait_rcu_gp() check for duplicates, which in turn allows duplicates to be passed to synchronize_rcu_mult() without risk of waiting twice on the same type of grace period. Signed-off-by: Paul E. McKenney kernel/rcu/update.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit a602538e46c9c62e75f1f0be9806495c79bcda9f Author: Paul E. McKenney Date: Fri Apr 28 15:39:34 2017 -0700 srcu: Add DEBUG_OBJECTS_RCU_HEAD functionality This commit adds DEBUG_OBJECTS_RCU_HEAD checking to detect call_srcu() counterparts to double-free bugs. Signed-off-by: Paul E. McKenney kernel/rcu/srcutree.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit d4efe6c5ad91f9a1f2f1d66b7fbfc87e320b2abc Author: Paul E. McKenney Date: Fri Apr 28 14:16:16 2017 -0700 srcu: Shrink Tiny SRCU a bit In Tiny SRCU, __srcu_read_lock() is a trivial function, outweighed by its EXPORT_SYMBOL_GPL(), and on many architectures, its call sequence. This commit therefore moves it to srcutiny.h so that it can be inlined. Signed-off-by: Paul E. McKenney include/linux/srcutiny.h | 15 +++++++++++++++ kernel/rcu/srcutiny.c | 16 ---------------- 2 files changed, 15 insertions(+), 16 deletions(-) commit 07f6e64bf2ab98cad0d9c595659209858e7bff83 Author: Paul E. McKenney Date: Fri Apr 28 13:53:04 2017 -0700 srcu: Make SRCU be once again optional Commit d160a727c40e ("srcu: Make SRCU be built by default") in response to build errors, which were caused by code that included srcu.h despite !SRCU. However, srcutiny.o is almost 2K of code, which is not insignificant for those attempting to run the Linux kernel on IoT devices. This commit therefore makes SRCU be once again optional, and adjusts srcu.h to allow error-free inclusion in !SRCU kernel builds. Signed-off-by: Paul E. McKenney Acked-by: Nicolas Pitre include/linux/srcu.h | 7 ++++++- init/Kconfig | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) commit ea9b0c8a26a2cadfe49382d679eee88d3c4de79c Author: Paul E. McKenney Date: Fri Apr 28 13:19:28 2017 -0700 rcu: Add lockdep_assert_held() teeth to tree_plugin.h Comments can be helpful, but assertions carry more force. This commit therefore adds lockdep_assert_held() and RCU_LOCKDEP_WARN() calls to enforce lock-held and interrupt-disabled preconditions. Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney kernel/rcu/tree_plugin.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c0b334c5bfa98ab104bde38da330a113a6c7dd56 Author: Paul E. McKenney Date: Fri Apr 28 12:32:15 2017 -0700 rcu: Add lockdep_assert_held() teeth to tree.c Comments can be helpful, but assertions carry more force. This commit therefore adds lockdep_assert_held() and RCU_LOCKDEP_WARN() calls to enforce lock-held and interrupt-disabled preconditions. Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 0c8e0e3c37955d17cced37222a10c00ab47efd4b Author: Paul E. McKenney Date: Fri Apr 28 11:24:22 2017 -0700 srcu: Print non-default exp_holdoff values at boot time This commit makes srcu_bootup_announce() check for non-default values of the auto-expedite holdoff time exp_holdoff and print a message if so. Signed-off-by: Paul E. McKenney kernel/rcu/srcutree.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b5815e6cd3b747cacf7628a32a275aa2c0f61e06 Author: Paul E. McKenney Date: Fri Apr 28 11:20:29 2017 -0700 srcu: Make exp_holdoff module parameter be static Because exp_holdoff is not used outside of srcutree.c, it can be static. This commit therefore makes this change. Signed-off-by: Paul E. McKenney kernel/rcu/srcutree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17c7798bea64b9d35c7b4cc14d564e6feff73ac3 Author: Paul E. McKenney Date: Fri Apr 28 11:12:34 2017 -0700 rcu: Update rcu_bootup_announce_oddness() This commit updates rcu_bootup_announce_oddness() to check additional Kconfig options and module/boot parameters. Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 9 ++++++--- kernel/rcu/tree_plugin.h | 31 ++++++++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 6 deletions(-) commit 59d80fd8351b7b9a5dc7bbfa8bc4ca19f6ff3dad Author: Paul E. McKenney Date: Fri Apr 28 10:20:28 2017 -0700 rcu: Print out rcupdate.c non-default boot-time settings This commit adds a rcupdate_announce_bootup_oddness() function to print out non-default values of significant kernel boot parameter settings to aid in debugging. Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 1 + kernel/rcu/tree_plugin.h | 1 + kernel/rcu/update.c | 42 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-) commit f4687d2637a4016b2eedfdb777105c95e8d6fe52 Author: Paul E. McKenney Date: Thu Apr 27 16:13:53 2017 -0700 rcu: Add preemptibility checks in rcu_sched_qs() and rcu_bh_qs() This commit adds WARN_ON_ONCE() calls that trigger if either rcu_sched_qs() or rcu_bh_qs() are invoked with preemption enabled. In the immortal words of Peter Zijlstra: "these are much harder to ignore than comments". Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 2 ++ 1 file changed, 2 insertions(+) commit c75e9caaf85f1fc4ed32e510b259d67ec3c4c603 Author: Paul E. McKenney Date: Thu Apr 27 13:25:41 2017 -0700 doc: Take tail recursion into account in RCU requirements This commit classifies tail recursion as an alternative way to write a loop, with similar limitations. Signed-off-by: Paul E. McKenney Documentation/RCU/Design/Requirements/Requirements.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 09f501a0f0b5ad81f79049a31fb71f99f282d663 Author: Paul E. McKenney Date: Thu Apr 27 13:16:15 2017 -0700 srcu: Document auto-expediting requirement This commit documents the auto-expediting requirement satisfied by commits 2da4b2a7fd8d ("srcu: Expedite first synchronize_srcu() when idle") and 22607d66bbc3 ("srcu: Specify auto-expedite holdoff time"). Signed-off-by: Paul E. McKenney Documentation/RCU/Design/Requirements/Requirements.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5d9853f3cf26109ab7b6b7bf414ffe3c739177d4 Author: Paul E. McKenney Date: Thu Apr 27 10:24:08 2017 -0700 rcutorture: Add "git diff" output to testid.txt file Currently, when running from a git archive, the testid.txt file contains only the branch name, the output of "git status", and the SHA-1 of the current HEAD. This is useful, but does not uniquely identify the source code that was built. This commit therefore adds the output of "git diff HEAD", which means that if two testid.txt files compare equal, they correspond to exactly the same source code. Give or take the possibility of SHA-1 collisions, that is. ;-) Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 820687a7b98a5031207893ff265f97c0a0ad403e Author: Paul E. McKenney Date: Tue Apr 25 15:12:56 2017 -0700 rcuperf: Add writer_holdoff boot parameter This commit adds a writer_holdoff boot parameter to rcuperf, which is intended to be used to test Tree SRCU's auto-expediting. This boot parameter is in microseconds, and defaults to zero (that is, disabled). Set it to a bit larger than srcutree.exp_holdoff, keeping the nanosecond/microsecond conversion, to force Tree SRCU to auto-expedite more aggressively. This commit also adds documentation for this parameter, and fixes some alphabetization while in the neighborhood. Signed-off-by: Paul E. McKenney Documentation/admin-guide/kernel-parameters.txt | 11 ++++++++--- kernel/rcu/rcuperf.c | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) commit b562b85c3a8c395d49aca6a46b321299d6e49ff1 Author: Priyalee Kushwaha Date: Sat Apr 22 10:17:11 2017 -0700 srcu-cbmc: Use /usr/bin/awk instead of /bin/awk Most OS distribution have awk in /usr/bin not in /bin Without this patch, kernel-devsrc fails to build as runtime dependency for srcu-cbmc script /bin/awk is not found. Signed-off-by: Kushwaha, Priyalee Acked-by: Lance Roy Reviewed-by: Josh Triplett Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/formal/srcu-cbmc/modify_srcu.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 492b95e59735998312f678d77a2d5fe20af6b0b9 Author: Paul E. McKenney Date: Fri Apr 21 16:09:15 2017 -0700 rcuperf: Set more user-friendly defaults Common-case use of rcuperf must set rcuperf.nreaders=0 and if not built as a module, rcuperf.shutdown. This commit therefore sets the default for rcuperf.nreaders to zero and sets the default for rcuperf.shutdown to zero if rcuperf is built as a module and to one otherwise. Signed-off-by: Paul E. McKenney kernel/rcu/rcuperf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3ddf20c953520203c42dbed1f091ed52080e1cd2 Author: Paul E. McKenney Date: Fri Apr 21 13:33:20 2017 -0700 srcu: Shrink Tiny SRCU a bit more This commit rearranges Tiny SRCU's srcu_struct structure, substitutes u8 for bool, and shrinks counters down to short. Signed-off-by: Paul E. McKenney include/linux/srcutiny.h | 8 ++++---- kernel/rcu/rcutorture.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 41f364819fbfc092462e3c85283fa887c8159387 Author: Paul E. McKenney Date: Fri Apr 21 12:01:32 2017 -0700 rcutorture: Reduce CPUs dedicated to testing Classic SRCU Given that the plan is to retire Classic SRCU in the near future, this commit reduces the number of CPUs dedicated to testing Classic SRCU. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/configs/rcu/SRCU-C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f4f6da1c80905830337c3ff46a2d3260dabb864 Author: Paul E. McKenney Date: Fri Apr 21 11:16:32 2017 -0700 srcu: Make Classic and Tree SRCU announce themselves at bootup Currently, the only way to tell whether a given kernel is running Classic, Tiny, or Tree SRCU is to look at the .config file, which can easily be lost or associated with the wrong kernel. This commit therefore has Classic and Tree SRCU identify themselves at boot time. Signed-off-by: Paul E. McKenney kernel/rcu/srcu.c | 7 +++++++ kernel/rcu/srcutree.c | 7 +++++++ 2 files changed, 14 insertions(+) commit 59ca3f9fef599cc6da7975d2261ab3bb86a6ac6b Author: Paul E. McKenney Date: Thu Apr 20 17:17:27 2017 -0700 rcuperf: Add the ability to test tiny RCU flavors This commit adds a TINY rcuperf test scenario, which allows performance testing of Tiny RCU and Tiny SRCU. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/configs/rcuperf/TINY | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 35bdc72a339717c60c16457091f227a122456bd9 Author: Stan Drozd Date: Thu Apr 20 11:03:36 2017 +0200 docs: Fix typo in Documentation/memory-barriers.txt This commit changes "architecure" to the correct spelling, "architecture". Signed-off-by: Stan Drozd Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6016ffc3874d3a1ddf41518481da54b4714717af Author: Paul E. McKenney Date: Wed Apr 19 16:20:07 2017 -0700 atomics: Add header comment so spin_unlock_wait() There is material describing the ordering guarantees provided by spin_unlock_wait(), but it is not necessarily easy to find. This commit therefore adds a docbook header comment to this function informally describing its semantics. Signed-off-by: Paul E. McKenney Acked-by: Peter Zijlstra include/linux/spinlock.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 79269ee3fa1da52f392f8a4ebf3082152c1c8c58 Author: Paul E. McKenney Date: Wed Apr 19 14:30:37 2017 -0700 doc/atomic_ops: Clarify smp_mb__{before,after}_atomic() This commit explicitly states that surrounding a non-value-returning atomic read-modify atomic operations provides full ordering, just as is provided by value-returning atomic read-modify-write operations. Signed-off-by: Paul E. McKenney Documentation/core-api/atomic_ops.rst | 5 +++++ 1 file changed, 5 insertions(+) commit f60cb4d4c8e568c2d63d01d72e589c4f75ee4140 Author: Paul E. McKenney Date: Wed Apr 19 13:43:21 2017 -0700 rcuperf: Add test for dynamically initialized srcu_struct This commit adds a perf_type of "srcud", which species that rcuperf test SRCU on a dynamically initialized srcu_struct. Signed-off-by: Paul E. McKenney kernel/rcu/rcuperf.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 9895313534d44e714785603a2af8db928904787e Author: Paul E. McKenney Date: Wed Apr 19 07:37:45 2017 -0700 checkpatch: Remove checks for expedited grace periods There was a time when the expedited grace-period primitives (synchronize_rcu_expedited(), synchronize_rcu_bh_expedited(), and synchronize_sched_expedited()) used rather antisocial kernel facilities like try_stop_cpus(). However, they have since been housebroken to use only single-CPU IPIs, and typically cause less disturbance than a scheduling-clock interrupt. Furthermore, this disturbance can be eliminated entirely using NO_HZ_FULL on the one hand or the rcupdate.rcu_normal boot parameter on the other. This commit therefore removes checkpatch's complaints about use of the expedited RCU primitives. Signed-off-by: Paul E. McKenney scripts/checkpatch.pl | 17 ----------------- 1 file changed, 17 deletions(-) commit dcfc315b7b7a5e7668dd9cb2474708b51ab1cdb1 Author: Paul E. McKenney Date: Tue Apr 18 09:53:07 2017 -0700 rcu: Make sync_rcu_preempt_exp_done() return bool The sync_rcu_preempt_exp_done() function returns a logical expression, but its return type is nevertheless int. This commit therefore changes the return type to bool. Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ced8d6fdf8b6b4b4a8354eede7464fbc0c2c96a8 Author: Paul E. McKenney Date: Mon Apr 17 14:53:23 2017 -0700 rcuperf: Add a Kconfig-fragment file for Classic SRCU This commit adds a Kconfig-fragment file for Classic SRCU to ease performance comparisons with Tree SRCU. Signed-off-by: Paul E. McKenney .../selftests/rcutorture/configs/rcuperf/SRCUCLASSIC | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 881ed593a323c832c2e9383effeb6a0c99859210 Author: Paul E. McKenney Date: Mon Apr 17 12:47:10 2017 -0700 rcuperf: Add ability to performance-test call_rcu() and friends This commit upgrades rcuperf so that it can do performance testing on asynchronous grace-period primitives such as call_srcu(). There is a new rcuperf.gp_async module parameter that specifies this new behavior, with the pre-existing rcuperf.gp_exp testing expedited grace periods such as synchronize_rcu_expedited, and with the default being to test synchronous non-expedited grace periods such as synchronize_rcu(). There is also a new rcuperf.gp_async_max module parameter that specifies the maximum number of outstanding callbacks per writer kthread, defaulting to 1,000. When this limit is exceeded, the writer thread invokes the appropriate flavor of rcu_barrier() to wait for callbacks to drain. Signed-off-by: Paul E. McKenney [ paulmck: Removed the redundant initialization noted by Arnd Bergmann. ] Documentation/admin-guide/kernel-parameters.txt | 11 ++++ kernel/rcu/rcuperf.c | 69 +++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 5 deletions(-) commit e28371c891db29c892d85322ea27ad997cc50f72 Author: Paul E. McKenney Date: Mon Apr 17 09:59:53 2017 -0700 rcu: Remove obsolete reference to synchronize_kernel() The synchronize_kernel() primitive was removed in favor of synchronize_sched() more than a decade ago, and it seems likely that rather few kernel hackers are familiar with it. Its continued presence is therefore providing more confusion than enlightenment. This commit therefore removes the reference from the synchronize_sched() header comment, and adds the corresponding information to the synchronize_rcu(0 header comment. Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 6 ------ kernel/rcu/tree_plugin.h | 9 +++++++-- 2 files changed, 7 insertions(+), 8 deletions(-) commit 1dcf2806ec19f01abed8027377f69e5c45878838 Author: Paul E. McKenney Date: Fri Apr 14 19:12:36 2017 -0700 rcuperf: Remove conflicting Kconfig options The TREE and TREE54 rcuperf scenarios' Kconfig fragment files specified conflicting values for CONFIG_RCU_TRACE. This commit therefore removes the =n line in favor of the =y line. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/configs/rcuperf/TREE | 1 - tools/testing/selftests/rcutorture/configs/rcuperf/TREE54 | 1 - 2 files changed, 2 deletions(-) commit 9683937df9ebf4eb62cdedb09c5f20a0760c7d80 Author: Paul E. McKenney Date: Fri Apr 14 16:12:52 2017 -0700 rcuperf: Defer expedited/normal check to end of test Current rcuperf startup checks to see if the user asked to measure only expedited grace periods, yet constrained all grace periods to be normal, or if the user asked to measure only normal grace periods, yet constrained all grace periods to be expedited. Useless tests of this sort are aborted. Unfortunately, making RCU work through the mid-boot dead zone [1] puts RCU into expedited-only mode during that zone. Which happens to also be the exact time that rcuperf carries out the aforementioned check. So if the user asks rcuperf to measure only normal grace periods (the default), rcuperf will now always complain and terminate the test. This commit therefore moves the checks to rcu_perf_cleanup(). This has the disadvantage of failing to abort useless tests, but avoids the need to create yet another kthread and the need to do fiddly checks involving the holdoff time. (Yes, another approach is to do the checks in a late-stage init function, but that would require some way to communicate badness to rcuperf's kthreads, and seems not worth the bother.) [1] https://lwn.net/Articles/716148/ Signed-off-by: Paul E. McKenney kernel/rcu/rcuperf.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 5b72f9643b52a5148bb8ced126e20563adfa3466 Author: Paul E. McKenney Date: Wed Apr 12 15:29:14 2017 -0700 rcu: Complain if blocking in preemptible RCU read-side critical section Although preemptible RCU allows its read-side critical sections to be preempted, general blocking is forbidden. The reason for this is that excessive preemption times can be handled by CONFIG_RCU_BOOST=y, but a voluntarily blocked task doesn't care how high you boost its priority. Because preemptible RCU is a global mechanism, one ill-behaved reader hurts everyone. Hence the prohibition against general blocking in RCU-preempt read-side critical sections. Preemption yes, blocking no. This commit enforces this prohibition. There is a special exception for the -rt patchset (which they kindly volunteered to implement): It is OK to block (as opposed to merely being preempted) within an RCU-preempt read-side critical section, but only if the blocking is subject to priority inheritance. This exception permits CONFIG_RCU_BOOST=y to get -rt RCU readers out of trouble. Why doesn't this exception also apply to mainline's rt_mutex? Because of the possibility that someone does general blocking while holding an rt_mutex. Yes, the priority boosting will affect the rt_mutex, but it won't help with the task doing general blocking while holding that rt_mutex. Reported-by: Thomas Gleixner Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 2 +- kernel/rcu/tree.h | 2 +- kernel/rcu/tree_plugin.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) commit 881ec9d209d5371c21db89ca1bb19afd3fcadab3 Author: Paul E. McKenney Date: Wed Apr 12 15:16:50 2017 -0700 srcu: Eliminate possibility of destructive counter overflow Earlier versions of Tree SRCU were subject to a counter overflow bug that could theoretically result in too-short grace periods. This commit eliminates this problem by adding an update-side memory barrier. The short explanation is that if the updater sums the unlock counts too late to see a given __srcu_read_unlock() increment, that CPU's next __srcu_read_lock() must see the new value of ->srcu_idx, thus incrementing the other bank of counters. This eliminates the possibility of destructive counter overflow as long as the srcu_read_lock() nesting level does not exceed floor(ULONG_MAX/NR_CPUS/2), which should be an eminently reasonable nesting limit, especially on 64-bit systems. Reported-by: Lance Roy Suggested-by: Lance Roy Signed-off-by: Paul E. McKenney kernel/rcu/srcutree.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 17ed2b6c3ad9f80174c32cc19d86a15396abc196 Author: Paul E. McKenney Date: Mon Apr 10 16:22:08 2017 -0700 rcutorture: Update test scenarios based on new Kconfig dependencies A number of the rcutorture test scenarios were not using the desired Kconfig options because dependencies were preventing the selections in the Kconfig-fragment files from being honored. This commit therefore updates the Kconfig-fragment files to account for these changes in dependencies. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/configs/rcu/TINY02 | 3 ++- tools/testing/selftests/rcutorture/configs/rcu/TREE01 | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE02 | 2 +- tools/testing/selftests/rcutorture/configs/rcu/TREE04 | 1 - tools/testing/selftests/rcutorture/configs/rcu/TREE06 | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE07 | 2 -- 6 files changed, 5 insertions(+), 5 deletions(-) commit 39687d6c1dc0c842ede1d4b4677931170c51305d Author: Paul E. McKenney Date: Mon Apr 10 16:15:06 2017 -0700 rcutorture: Correctly handle CONFIG_RCU_TORTURE_TEST_* options The rcutorture scripting handles the CONFIG_*_TORTURE_TEST Kconfig options specially, and therefore greps them out of the Kconfig-fragment files. Unfortunately, a poor choice of grep pattern means that the CONFIG_RCU_TORTURE_TEST_SLOW_CLEANUP, CONFIG_RCU_TORTURE_TEST_SLOW_INIT, and CONFIG_RCU_TORTURE_TEST_SLOW_PREINIT Kconfig options are also grepped out, preventing rcutorture from using them. This commit therefore fixes the offending grep pattern to focus only on the CONFIG_*_TORTURE_TEST Kconfig options. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f92c734f02cbf10e40569facff82059ae9b61920 Author: Paul E. McKenney Date: Mon Apr 10 15:40:35 2017 -0700 rcu: Prevent rcu_barrier() from starting needless grace periods Currently rcu_barrier() uses call_rcu() to enqueue new callbacks on each CPU with a non-empty callback list. This works, but means that rcu_barrier() forces grace periods that are not otherwise needed. The key point is that rcu_barrier() never needs to wait for a grace period, but instead only for all pre-existing callbacks to be invoked. This means that rcu_barrier()'s new callbacks should be placed in the callback-list segment containing the last pre-existing callback. This commit makes this change using the new rcu_segcblist_entrain() function. Signed-off-by: Paul E. McKenney include/trace/events/rcu.h | 1 + kernel/rcu/tree.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit c0ee4500ff67e455dcbc74ff3e9e9faa3bc93be1 Author: Paul E. McKenney Date: Mon Apr 10 13:49:03 2017 -0700 rcutorture: Add a scenario for Classic SRCU A robust combination of paranoia and cowardice has resulted in retaining Classic SRCU (CONFIG_CLASSIC_SRCU) as a backup for the shiny new Tiny and Tree SRCU implementations. If it is to be a viable backup, it of course needs to be tested. This commit therefore adds an rcutorture scenario named SRCU-C for Classic SRCU. This commit also adds this scenario to the set that are run by default. Once sufficient good experience has accumulated for Tiny and Tree SRCU, this test will be removed, along with the Classic SRCU implementation itself. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/configs/rcu/CFLIST | 1 + tools/testing/selftests/rcutorture/configs/rcu/SRCU-C | 11 +++++++++++ tools/testing/selftests/rcutorture/configs/rcu/SRCU-C.boot | 1 + 3 files changed, 13 insertions(+) commit 23ca09670312a373d0b72bc7f87bd32323fb673f Author: Paul E. McKenney Date: Mon Apr 10 11:39:08 2017 -0700 rcutorture: Add a scenario for Tiny SRCU This commit adds an SRCU-t rcutorture scenario for the new Tiny SRCU implementation, removing the need to pass the --bootargs parameter to kvm.sh to run Tiny SRCU tests. This commit also adds SRCU-t to the set of scenarios that are run by default. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/configs/rcu/CFLIST | 2 ++ tools/testing/selftests/rcutorture/configs/rcu/SRCU-t | 10 ++++++++++ tools/testing/selftests/rcutorture/configs/rcu/SRCU-t.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/SRCU-u | 9 +++++++++ tools/testing/selftests/rcutorture/configs/rcu/SRCU-u.boot | 1 + 5 files changed, 23 insertions(+) commit 3c52f2622779ee6c8712c731b18406998eb4d4c6 Author: Paul E. McKenney Date: Mon Apr 10 10:48:42 2017 -0700 rcutorture: Fix bug in reporting Kconfig mis-settings Kconfig "select" clauses can defeat Kconfig-fragment file attempts to clear a given Kconfig variable, and dependencies can defeat attempts to set a given Kconfig variable. Because "select" clauses and dependencies can be added at any time, there needs to be a way to verify that the Kconfig-fragment file's requests were honored. And there is, except that it is buggy. This commit therefore provides the needed fix. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/configcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d6dd656a1c5683534ee174f06c9b1d736ebea3c Author: Paul E. McKenney Date: Mon Apr 10 10:27:19 2017 -0700 rcutorture: Add three-level tree test for Tree SRCU This commit adds a test for a three-level srcu_node tree for Tree SRCU in the existing SRCU-P scenario. This requires enabling CONFIG_RCU_EXPERT, so the CONFIG_RCU_EXPERT=n scenario is now SRCU-N. The reason for using SRCU-P for the tall tree is that preemption raises the possibility of locating more bugs than does the non-preemptive SRCU-N. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/configs/rcu/SRCU-N | 2 +- tools/testing/selftests/rcutorture/configs/rcu/SRCU-P | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 27dc0b1b9fdaefeeb3d6c8fa0aed5d826ce8f3e9 Author: Paul E. McKenney Date: Sun Apr 9 18:55:21 2017 -0700 rcutorture: Add lockdep to one of the SRCU scenarios Back when SRCU was simpler, there wasn't much need for lockdep. However, with Tree SRCU, it is needed. This commit therefore adds CONFIG_PROVE_LOCKING to the SRCU-P scenario. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/configs/rcu/SRCU-P | 2 ++ 1 file changed, 2 insertions(+) commit abcb851daa617706e90ee7d39d4d9a74ac05f4b1 Author: Christoffer Dall Date: Thu May 4 13:32:53 2017 +0200 KVM: arm/arm64: Check if irq lines to the GIC are already used We check if other in-kernel devices have already been connected to the GIC for a particular interrupt line when possible. For the PMU, we can do this whenever setting the PMU interrupt number from userspace. For the timers, we have to wait until we try to enable the timer, because we have a concept of default IRQ numbers that userspace shouldn't have to work around in the initialization phase. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/arch_timer.c | 18 ++++++++++-------- virt/kvm/arm/pmu.c | 7 +++++++ 2 files changed, 17 insertions(+), 8 deletions(-) commit c6ccd30e0de384f506449474ca780ff680ad4217 Author: Christoffer Dall Date: Thu May 4 13:24:20 2017 +0200 KVM: arm/arm64: Introduce an allocator for in-kernel irq lines Having multiple devices being able to signal the same interrupt line is very confusing and almost certainly guarantees a configuration error. Therefore, introduce a very simple allocator which allows a device to claim an interrupt line from the vgic for a given VM. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier include/kvm/arm_vgic.h | 5 +++++ virt/kvm/arm/vgic/vgic.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 99a1db7a2c9b2ecb9a801cee3f6a7a71945a2fca Author: Christoffer Dall Date: Tue May 2 20:19:15 2017 +0200 KVM: arm/arm64: Allow setting the timer IRQ numbers from userspace First we define an ABI using the vcpu devices that lets userspace set the interrupt numbers for the various timers on both the 32-bit and 64-bit KVM/ARM implementations. Second, we add the definitions for the groups and attributes introduced by the above ABI. (We add the PMU define on the 32-bit side as well for symmetry and it may get used some day.) Third, we set up the arch-specific vcpu device operation handlers to call into the timer code for anything related to the KVM_ARM_VCPU_TIMER_CTRL group. Fourth, we implement support for getting and setting the timer interrupt numbers using the above defined ABI in the arch timer code. Fifth, we introduce error checking upon enabling the arch timer (which is called when first running a VCPU) to check that all VCPUs are configured to use the same PPI for the timer (as mandated by the architecture) and that the virtual and physical timers are not configured to use the same IRQ number. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier Documentation/virtual/kvm/devices/vcpu.txt | 25 +++++++ arch/arm/include/uapi/asm/kvm.h | 8 +++ arch/arm/kvm/guest.c | 9 +++ arch/arm64/include/uapi/asm/kvm.h | 3 + arch/arm64/kvm/guest.c | 9 +++ include/kvm/arm_arch_timer.h | 4 ++ virt/kvm/arm/arch_timer.c | 104 +++++++++++++++++++++++++++++ 7 files changed, 162 insertions(+) commit 85e69ad7f2cc6dd829987a70cf32785b1d8c8b27 Author: Christoffer Dall Date: Tue May 2 20:14:06 2017 +0200 KVM: arm/arm64: Move timer IRQ default init to arch_timer.c We currently initialize the arch timer IRQ numbers from the reset code, presumably because we once intended to model multiple CPU or SoC types from within the kernel and have hard-coded reset values in the reset code. As we are moving towards userspace being in charge of more fine-grained CPU emulation and stitching together the pieces needed to emulate a particular type of CPU, we should no longer have a tight coupling between resetting a VCPU and setting IRQ numbers. Therefore, move the logic to define and use the default IRQ numbers to the timer code and set the IRQ number immediately when creating the VCPU. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier arch/arm/kvm/reset.c | 16 +--------------- arch/arm64/kvm/reset.c | 16 +--------------- include/kvm/arm_arch_timer.h | 4 +--- virt/kvm/arm/arch_timer.c | 28 ++++++++++++++++------------ 4 files changed, 19 insertions(+), 45 deletions(-) commit 3cba4af31c61fc9420fdcf083f509a6c20a6d8e5 Author: Christoffer Dall Date: Tue May 2 20:11:49 2017 +0200 KVM: arm/arm64: Move irq_is_ppi() to header file We are about to need this define in the arch timer code as well so move it to a common location. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier include/kvm/arm_vgic.h | 2 ++ virt/kvm/arm/pmu.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2227e43930278a53054046f9746cba69a1379639 Author: Christoffer Dall Date: Tue May 2 15:17:59 2017 +0200 KVM: arm: Handle VCPU device attributes in guest.c As we are about to support VCPU attributes to set the timer IRQ numbers in guest.c, move the static inlines for the VCPU attributes handlers from the header file to guest.c. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier arch/arm/include/asm/kvm_host.h | 22 +++++++-------------- arch/arm/kvm/guest.c | 42 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 15 deletions(-) commit a2befacf50940017e0de8461c4b924a929c4edc5 Author: Christoffer Dall Date: Tue May 2 13:41:02 2017 +0200 KVM: arm64: Allow creating the PMU without the in-kernel GIC Since we got support for devices in userspace which allows reporting the PMU overflow output status to userspace, we should actually allow creating the PMU on systems without an in-kernel irqchip, which in turn requires us to slightly clarify error codes for the ABI and move things around for the initialization phase. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier Documentation/virtual/kvm/devices/vcpu.txt | 16 ++++++---- include/kvm/arm_pmu.h | 6 ++++ virt/kvm/arm/arm.c | 4 +++ virt/kvm/arm/pmu.c | 51 +++++++++++++++++++++++------- 4 files changed, 58 insertions(+), 19 deletions(-) commit b58c11314a1706bf094c489ef5cb28f76478c704 Author: Alex Deucher Date: Fri Jun 2 17:16:31 2017 -0400 drm/amdgpu: drop deprecated drm_get_pci_dev and drm_put_dev Open code them so we can adjust the order in the driver more easily. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 3c50c2873283290d06af38a208c25f6434cf0a77 Author: Alex Deucher Date: Fri Jun 2 16:52:08 2017 -0400 drm/amdgpu: call pci_[un]register_driver() directly Rather than calling the deprecated drm_pci_init() and drm_pci_exit() which just wrapped the pci functions anyway. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b059658d6796a096ef06be9da994d6c44401d5b Author: Michel Dänzer Date: Mon May 29 18:05:20 2017 +0900 drm/amdgpu/radeon: Use radeon by default for CIK GPUs Even if CONFIG_DRM_AMDGPU_CIK is enabled. There is no feature parity yet for CIK, in particular amdgpu doesn't support HDMI/DisplayPort audio without DC. v2: * Clarify the lack of feature parity being related to HDMI/DP audio. * Fix "SI" typo in DRM_AMDGPU_CIK help entry. Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer drivers/gpu/drm/amd/amdgpu/Kconfig | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 7 +++++-- drivers/gpu/drm/radeon/radeon_drv.c | 4 ++-- drivers/gpu/drm/radeon/radeon_kms.c | 5 +---- 5 files changed, 14 insertions(+), 14 deletions(-) commit 6ac07e1b309a70469d2822689b54d4726846dd64 Author: Michel Dänzer Date: Mon May 29 17:32:38 2017 +0900 drm/radeon: Make si_support and cik_support parameters always available This will allow amdgpu-pro / other out-of-tree amdgpu builds to make use of these options for using the out-of-tree amdgpu driver instead of the in-tree radeon driver in a clean way. Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer drivers/gpu/drm/radeon/radeon.h | 5 ----- drivers/gpu/drm/radeon/radeon_drv.c | 4 ---- drivers/gpu/drm/radeon/radeon_kms.c | 4 ---- 3 files changed, 13 deletions(-) commit ef789173cb42864edbefa37e0035126370c66cf2 Author: Felix Kuehling Date: Mon Jun 5 18:57:32 2017 +0900 drm/amdgpu: Update Kconfig help for SI and CIK support Signed-off-by: Felix Kuehling Reviewed-by: Christian König Acked-by: Michel Dänzer drivers/gpu/drm/amd/amdgpu/Kconfig | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 6dd13096830f5f6589bcfb4d35880590775942ca Author: Felix Kuehling Date: Mon Jun 5 18:53:55 2017 +0900 drm/amdgpu: Add module param to control SI support If AMDGPU supports SI, add a module parameter to control SI support. It's off by default in AMDGPU as long as SI suppost is experimental, while it is on by default in radeon. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Acked-by: Michel Dänzer [ Michel Dänzer: Squash in amdgpu_si_support initialization fix ] Signed-off-by: Michel Dänzer Reviewed-by: Christian König Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 17 +++++++++++++++++ 3 files changed, 26 insertions(+) commit 36ffce0ac0424ad886061f59b2fabbc4133af37f Author: Felix Kuehling Date: Mon Jun 5 18:52:51 2017 +0900 drm/radeon: Add module param to control SI support If AMDGPU supports SI, add a module parameter to control SI support in radeon. It's on by default in radeon, while it will be off by default in AMDGPU as long as SI support is experimental. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Acked-by: Michel Dänzer drivers/gpu/drm/radeon/radeon.h | 3 +++ drivers/gpu/drm/radeon/radeon_drv.c | 6 ++++++ drivers/gpu/drm/radeon/radeon_kms.c | 14 ++++++++++++++ 3 files changed, 23 insertions(+) commit 7df289865c69ea39e1f81de0abe839acc54e604b Author: Felix Kuehling Date: Mon Jun 5 18:43:27 2017 +0900 drm/amdgpu: Add module param to control CIK support If AMDGPU supports CIK, add a module parameter to control CIK support. It's on by default in AMDGPU, while it is off by default in radeon. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Acked-by: Michel Dänzer drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 15 +++++++++++++++ 3 files changed, 26 insertions(+) commit 06fcb3b69fb8699afa04b020d2a95bd6c4c798ac Merge: a5fcf8a 5d2ed05 Author: David S. Miller Date: Thu Jun 8 10:53:30 2017 -0400 Merge branch 'tcp-Namespaceify-3-sysctls' Eric Dumazet says: ==================== tcp: Namespaceify 3 sysctls Move tcp_sack, tcp_window_scaling and tcp_timestamps sysctls to network namespaces. ==================== Signed-off-by: David S. Miller commit 5d2ed0521ac98f1ae0243fe52b8ebf95e2abf791 Author: Eric Dumazet Date: Wed Jun 7 10:34:39 2017 -0700 tcp: Namespaceify sysctl_tcp_timestamps Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/secure_seq.h | 5 +++-- include/net/tcp.h | 3 +-- net/core/secure_seq.c | 9 +++++---- net/ipv4/syncookies.c | 6 ++++-- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 5 ++--- net/ipv4/tcp_ipv4.c | 9 +++++---- net/ipv4/tcp_output.c | 7 ++++--- net/ipv6/syncookies.c | 3 ++- net/ipv6/tcp_ipv6.c | 7 ++++--- 11 files changed, 38 insertions(+), 31 deletions(-) commit 9bb37ef00e932eb4b989e855245468feb3980700 Author: Eric Dumazet Date: Wed Jun 7 10:34:38 2017 -0700 tcp: Namespaceify sysctl_tcp_window_scaling Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/syncookies.c | 2 +- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_output.c | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) commit f930103421f6579719b8252285c94c1195f6e032 Author: Eric Dumazet Date: Wed Jun 7 10:34:37 2017 -0700 tcp: Namespaceify sysctl_tcp_sack Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 4 ++-- net/ipv4/syncookies.c | 7 ++++--- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_output.c | 2 +- net/ipv6/syncookies.c | 2 +- 8 files changed, 18 insertions(+), 16 deletions(-) commit eed29f17f09ad7f400bc245f209acad6a8214fac Author: Eric Dumazet Date: Wed Jun 7 10:34:36 2017 -0700 tcp: add a struct net parameter to tcp_parse_options() We want to move some TCP sysctls to net namespaces in the future. tcp_window_scaling, tcp_sack and tcp_timestamps being fetched from tcp_parse_options(), we need to pass an extra parameter. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 2 +- include/net/tcp.h | 2 +- net/ipv4/syncookies.c | 2 +- net/ipv4/tcp_input.c | 18 +++++++++++------- net/ipv4/tcp_minisocks.c | 4 ++-- net/ipv6/syncookies.c | 2 +- 6 files changed, 17 insertions(+), 13 deletions(-) commit f458e6102c1fe3a1d28bae85cdeb0cd66537c4fe Author: Mark Brown Date: Thu Jun 8 15:43:19 2017 +0100 regmap: Fix typo in IS_ENABLED() check Reported-by: Andreas Ziegler Signed-off-by: Mark Brown drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2c6df7dbf9a60e1cd9941f9fb376d4d9ad1e8dd Author: Hannes Reinecke Date: Thu Jun 8 13:46:45 2017 +0200 loop: support 4k physical blocksize When generating bootable VM images certain systems (most notably s390x) require devices with 4k blocksize. This patch implements a new flag 'LO_FLAGS_BLOCKSIZE' which will set the physical blocksize to that of the underlying device, and allow to change the logical blocksize for up to the physical blocksize. Signed-off-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/block/loop.c | 43 +++++++++++++++++++++++++++++++++++++------ drivers/block/loop.h | 1 + include/uapi/linux/loop.h | 3 +++ 3 files changed, 41 insertions(+), 6 deletions(-) commit 51001b7da364a24ed2464f3c22179efdc6b3a960 Author: Hannes Reinecke Date: Thu Jun 8 13:46:44 2017 +0200 loop: Remove unused 'bdev' argument from loop_set_capacity Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/loop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14073f6614f62dc7862c83575b042424599cc867 Author: Matt Ranostay Date: Wed Jun 7 11:37:54 2017 -0700 power: supply: bq27xxx: Add bulk transfer bus methods Declare bus.write/read_bulk/write_bulk(). Add I2C write/read_bulk/write_bulk() to implement the above. Add bq27xxx_write/read_block/write_block() helpers to call the above. Signed-off-by: Matt Ranostay Signed-off-by: Liam Breck Acked-by: "Andrew F. Davis" Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 67 +++++++++++++++++++++++- drivers/power/supply/bq27xxx_battery_i2c.c | 82 +++++++++++++++++++++++++++++- include/linux/power/bq27xxx_battery.h | 3 ++ 3 files changed, 149 insertions(+), 3 deletions(-) commit e2517f3bb44b1ac3772858f4bca0be05d36f492d Author: Liam Breck Date: Wed Jun 7 11:37:53 2017 -0700 dt-bindings: power: supply: bq27xxx: Add monitored-battery documentation Document monitored-battery = <&battery_node> Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay Signed-off-by: Liam Breck Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/supply/bq27xxx.txt | 31 +++++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) commit 413de34ab93edc80ef710c54ceb0987b8496aef3 Author: Liam Breck Date: Wed Jun 7 11:37:52 2017 -0700 power: supply: core: Add power_supply_prop_precharge Battery chargers use POWER_SUPPLY_PROP_PRECHARGE_CURRENT Clarify related item POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel Documentation/power/power_supply_class.txt | 19 ++++++++++++------- drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 3 +++ 3 files changed, 16 insertions(+), 7 deletions(-) commit c08b1f45d7d193b3e6dcbbf30d403cb49b667b8c Author: Liam Breck Date: Wed Jun 7 11:37:51 2017 -0700 power: supply: core: Add power_supply_battery_info and API power_supply_get_battery_info() reads battery data from devicetree. struct power_supply_battery_info provides battery data to drivers. Its fields correspond to elements in enum power_supply_property. Drivers may surface battery data in sysfs via corresponding POWER_SUPPLY_PROP_* fields. Signed-off-by: Matt Ranostay Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel Documentation/power/power_supply_class.txt | 12 +++++++ drivers/power/supply/power_supply_core.c | 57 ++++++++++++++++++++++++++++++ include/linux/power_supply.h | 22 ++++++++++++ 3 files changed, 91 insertions(+) commit 230670479a6c54dcae6387119bb7d4441d7870b2 Author: Liam Breck Date: Wed Jun 7 11:37:50 2017 -0700 dt-bindings: power: supply: Add battery.txt with simple-battery binding Documentation of static battery characteristics that can be defined for batteries that do not embed this data, which are required by fuel-gauge and charger chips for proper handling of the battery. The following properties are defined: voltage-min-design-microvolt charge-full-design-microamp-hours energy-full-design-microwatt-hours precharge-current-microamp charge-term-current-microamp constant-charge-current-max-microamp constant-charge-voltage-max-microamp Property names are derived from corresponding elements in enum power_supply_property from include/linux/power_supply.h https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/power_supply.h Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay Signed-off-by: Liam Breck Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/supply/battery.txt | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit e470f96fe9836fdd7d9398dae9617e487514515b Author: Matt Ranostay Date: Wed Jun 7 11:37:49 2017 -0700 devicetree: property-units: Add uWh and uAh units Add entries for microwatt-hours and microamp-hours. Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Matt Ranostay Signed-off-by: Liam Breck Acked-by: Sebastian Reichel Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/property-units.txt | 2 ++ 1 file changed, 2 insertions(+) commit a5fcf8a6c968ed8e312ff0b2a55d4c62d821eabb Author: Jiri Pirko Date: Tue Jun 6 17:00:16 2017 +0200 net: propagate tc filter chain index down the ndo_setup_tc call We need to push the chain index down to the drivers, so they have the information to which chain the rule belongs. For now, no driver supports multichain offload, so only chain 0 is supported. This is needed to prevent chain squashes during offload for now. Later this will be used to implement multichain offload. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 ++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 4 ++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 4 ++-- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +++++-- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 ++-- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 ++- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 +++++-- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +++++- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 7 ++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 +++++- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 7 +++++-- drivers/net/ethernet/sfc/efx.h | 4 ++-- drivers/net/ethernet/sfc/falcon/efx.h | 4 ++-- drivers/net/ethernet/sfc/falcon/tx.c | 4 ++-- drivers/net/ethernet/sfc/tx.c | 4 ++-- drivers/net/ethernet/ti/netcp_core.c | 4 ++-- include/linux/netdevice.h | 4 ++-- net/dsa/slave.c | 11 ++++++----- net/sched/cls_bpf.c | 1 + net/sched/cls_flower.c | 10 ++++++---- net/sched/cls_matchall.c | 9 +++++---- net/sched/cls_u32.c | 12 ++++++++---- net/sched/sch_mqprio.c | 5 +++-- 26 files changed, 88 insertions(+), 53 deletions(-) commit 13132b3f44d3600983aceb7e9920b8ebb55a7cf8 Author: Geert Uytterhoeven Date: Thu Jun 1 12:27:00 2017 +0200 ARM: dts: armadillo800eva: Split LCD mux and gpio Configuration of the lcd0 pinmux group and GPIO hog for the external GPIO mux are done using a single device node, causing the "output-high" property to be applied to both. This will fail for the pinmux group, but doesn't cause any harm, as the failure is ignored silently. However, after "pinctrl: sh-pfc: propagate errors on group config", the failure will become fatal, leading to a broken display: sh-pfc e6050000.pin-controller: pin_config_group_set op failed for group 102 sh-pfc e6050000.pin-controller: Error applying setting, reverse things back sh-pfc e6050000.pin-controller: failed to select default state Move the GPIO hog to its own node to fix this. Fixes: ffd2f9a5afb730b9 ("ARM: shmobile: armadillo800eva dts: Add pinctrl and gpio-hog for lcdc0") Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 2 ++ 1 file changed, 2 insertions(+) commit 5f0047466e3c653ffc95fe72e1ea19b1f9927e48 Author: Sean Wang Date: Thu Jun 1 01:28:59 2017 +0800 dt-bindings: mediatek: add bindings for MediaTek MT7622 SoC This adds dt-binding documentation for MediaTek MT7622 SoC which currently only includes basic items such as ARM CPU, MediaTek SYSIRQ and UART. Signed-off-by: Sean Wang Reviewed-by: Matthias Brugger Acked-by: Rob Herring Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek.txt | 4 ++++ .../devicetree/bindings/interrupt-controller/mediatek,sysirq.txt | 3 ++- Documentation/devicetree/bindings/serial/mtk-uart.txt | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit 8127881f741dbbf9a1da9e9bc59133820160b217 Author: Daniel Kurtz Date: Tue May 23 11:24:10 2017 +0800 arm64: dts: mt8173: Fix mdp device tree If the mdp_* nodes are under an mdp sub-node, their corresponding platform device does not automatically get its iommu assigned properly. Fix this by moving the mdp component nodes up a level such that they are siblings of mdp and all other SoC subsystems. This also simplifies the device tree. Although it fixes iommu assignment issue, it also break compatibility with old device tree. So, the patch in driver is needed to iterate over sibling mdp device nodes, not child ones, to keep driver work properly. Signed-off-by: Daniel Kurtz Signed-off-by: Minghsiu Tsai Acked-by: Hans Verkuil Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173.dtsi | 126 +++++++++++++++---------------- 1 file changed, 60 insertions(+), 66 deletions(-) commit c6c301d3ff7531894257acc4f4a73928a109bda1 Author: Jun Gao Date: Fri May 26 15:35:06 2017 +0800 dt-bindings: i2c: Add Mediatek MT2701 i2c binding Add MT2701 i2c binding to i2c-mt6577.txt and there is no need to modify i2c driver. Signed-off-by: Jun Gao Reviewed-by: Matthias Brugger Acked-by: Rob Herring Acked-by: Wolfram Sang Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 1 + 1 file changed, 1 insertion(+) commit b78f23459b68a75915fcfb22abfb9ba742d20f30 Author: Matthias Brugger Date: Mon May 22 11:40:21 2017 +0200 dt-bindings: i2c-mtk: Add mt7623 binding The mt7623 dtsi has support for the i2c block, but this is not documented. Add the documentation for SoC mt7623 to de description. Signed-off-by: Matthias Brugger Acked-by: Rob Herring Acked-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 1 + 1 file changed, 1 insertion(+) commit d57c128478da9d65a8de79bf88bb4ad2fff8c4f4 Author: Matthias Brugger Date: Mon May 22 11:40:20 2017 +0200 dt-bindings: i2c-mtk: Delete bindings The bindings file list bindings for mt1827 and mt8135 but these bindings are not supported by the driver. Remove the bindings. Also do some minor style changes to the compatible documentation Signed-off-by: Matthias Brugger Acked-by: Rob Herring Acked-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8491899466eccc8957441b96bd55c7b6efd2fb3b Author: Matthias Brugger Date: Mon May 22 11:40:19 2017 +0200 dt-bindings: i2c-mt6577: Rename file to reflect bindings The i2c-mt6577.txt actually holds the bindings for all mediatek supported i2c controller. Change the name to i2c.mtk.txt to reflect that. Signed-off-by: Matthias Brugger Acked-by: Rob Herring Acked-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-mt6577.txt | 41 ---------------------- Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 41 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 41 deletions(-) commit d81cd7d72f6441df759c3db7adc69f4ad8d54fc4 Author: Hugues Fruchet Date: Fri May 5 17:31:00 2017 +0200 ARM: configs: stm32: STMPE1600 GPIO expander Enable STMPE1600 GPIO expander. Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre TORGUE arch/arm/configs/stm32_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 1800e6dd2c99649efcfbd40c37288c163089df69 Author: Yannick Fertre Date: Thu Jun 8 11:56:16 2017 +0200 ARM: configs: stm32: Add watchdog support in STM32 defconfig This patch adds STM32 watchdog support in stm32_defconfig file Signed-off-by: Yannick Fertre Signed-off-by: Alexandre TORGUE arch/arm/configs/stm32_defconfig | 1 + 1 file changed, 1 insertion(+) commit ac3b708ad49f77b44faa104057783f161491e9e4 Author: Joerg Roedel Date: Wed Jun 7 14:38:15 2017 +0200 iommu/amd: Remove queue_release() function We can use queue_ring_free_flushed() instead, so remove this redundancy. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit fca6af6a5976dfa00182232f666b4f789c98bd0c Author: Joerg Roedel Date: Fri Jun 2 18:13:37 2017 +0200 iommu/amd: Add per-domain timer to flush per-cpu queues Add a timer to each dma_ops domain so that we flush unused IOTLB entries regularily, even if the queues don't get full all the time. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 84 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 17 deletions(-) commit a6e3f6f030396c0576c729fd8ca4bfb654d35bfe Author: Joerg Roedel Date: Fri Jun 2 16:01:53 2017 +0200 iommu/amd: Add flush counters to struct dma_ops_domain The counters are increased every time the TLB for a given domain is flushed. We also store the current value of that counter into newly added entries of the flush-queue, so that we can tell whether this entry is already flushed. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit e241f8e76c152e000d481fc8334d41d22c013fe8 Author: Joerg Roedel Date: Fri Jun 2 15:44:57 2017 +0200 iommu/amd: Add locking to per-domain flush-queue With locking we can safely access the flush-queues of other cpus. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit fd62190a67d6bdf9b93dea056adfcd7fd29b0f92 Author: Joerg Roedel Date: Fri Jun 2 15:37:26 2017 +0200 iommu/amd: Make use of the per-domain flush queue Fill the flush-queue on unmap and only flush the IOMMU and device TLBs when a per-cpu queue gets full. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 60 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 4 deletions(-) commit d4241a276119bf404e6c0e23f06f84b84c4ecfc0 Author: Joerg Roedel Date: Fri Jun 2 14:55:56 2017 +0200 iommu/amd: Add per-domain flush-queue data structures Make the flush-queue per dma-ops domain and add code allocate and free the flush-queues; Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 460c26d05bf7357a4d5b41b3d7a97727f5bdffe1 Author: Joerg Roedel Date: Fri Jun 2 14:28:01 2017 +0200 iommu/amd: Rip out old queue flushing code The queue flushing is pretty inefficient when it flushes the queues for all cpus at once. Further it flushes all domains from all IOMMUs for all CPUs, which is overkill as well. Rip it out to make room for something more efficient. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 143 ++-------------------------------------------- 1 file changed, 6 insertions(+), 137 deletions(-) commit 23e967e17c58779b38f69f8d41d727f59440d36a Author: Tom Lendacky Date: Mon Jun 5 14:52:26 2017 -0500 iommu/amd: Reduce delay waiting for command buffer space Currently if there is no room to add a command to the command buffer, the driver performs a "completion wait" which only returns when all commands on the queue have been processed. There is no need to wait for the entire command queue to be executed before adding the next command. Update the driver to perform the same udelay() loop that the "completion wait" performs, but instead re-read the head pointer to determine if sufficient space is available. The very first time it is found that there is no space available, the udelay() will be skipped to immediately perform the opportunistic read of the head pointer. If it is still found that there is not sufficient space, then the udelay() will be performed. Signed-off-by: Leo Duran Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit d334a5637dfb53f7d07017afc1e491903b482ef8 Author: Tom Lendacky Date: Mon Jun 5 14:52:12 2017 -0500 iommu/amd: Reduce amount of MMIO when submitting commands As newer, higher speed devices are developed, perf data shows that the amount of MMIO that is performed when submitting commands to the IOMMU causes performance issues. Currently, the command submission path reads the command buffer head and tail pointers and then writes the tail pointer once the command is ready. The tail pointer is only ever updated by the driver so it can be tracked by the driver without having to read it from the hardware. The head pointer is updated by the hardware, but can be read opportunistically. Reading the head pointer only when it appears that there might not be room in the command buffer and then re-checking the available space reduces the number of times the head pointer has to be read. Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 35 ++++++++++++++++++++++------------- drivers/iommu/amd_iommu_init.c | 2 ++ drivers/iommu/amd_iommu_types.h | 2 ++ 3 files changed, 26 insertions(+), 13 deletions(-) commit 699cb58c8a52ff39bf659bff7971893ebe111bf2 Author: Johannes Berg Date: Tue May 30 16:34:46 2017 +0200 mac80211: manage RX BA session offload without SKB queue Instead of using the SKB queue with the fake pkt_type for the offloaded RX BA session management, also handle this with the normal aggregation state machine worker. This also makes the use of this more reliable since it gets rid of the allocation of the fake skb. Combined with the previous patch, this finally allows us to get rid of the pkt_type hack entirely, so do that as well. Signed-off-by: Johannes Berg include/net/mac80211.h | 21 +++++++++++++++++---- net/mac80211/agg-rx.c | 47 ++++++++++++---------------------------------- net/mac80211/ht.c | 12 ++++++++++++ net/mac80211/ieee80211_i.h | 11 ----------- net/mac80211/iface.c | 25 ++---------------------- net/mac80211/rx.c | 4 ---- net/mac80211/sta_info.h | 3 +++ 7 files changed, 46 insertions(+), 77 deletions(-) commit a43e61842ec55baa486d60eed2a19af67ba78b9f Merge: 5d473fe 50dffe7 Author: Johannes Berg Date: Thu Jun 8 14:14:40 2017 +0200 Merge remote-tracking branch 'net-next/master' into mac80211-next This brings in commit 7a7c0a6438b8 ("mac80211: fix TX aggregation start/stop callback race") to allow the follow-up cleanup. Signed-off-by: Johannes Berg commit bd77a0f08ec57f7b805dfbaa64b36329dfa005d6 Author: Alex Henrie Date: Fri Jun 2 09:28:39 2017 -0600 HID: apple: Use country code to detect ISO keyboards At least on newer laptops, Apple uses the same USB ID for both ISO and ANSI keyboards. However, they have been good about filling in the bCountryCode field in the HID descriptor on all of their keyboards. A value of 13 indicates an ISO layout and other values indicate various country-specific ANSI layouts. With this patch, users of Apple US keyboards will no longer have to run `echo 0 > /sys/module/hid_apple/parameters/iso_layout` to get a working tilde key. Please test this patch and send feedback if you have a Macbook or an Apple keyboard. Signed-off-by: Alex Henrie Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-apple.c | 59 ++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 32 deletions(-) commit 283a21da1239d8db7fdf6d9077feed73a6efffa2 Author: Dmitry Torokhov Date: Tue Jun 6 23:59:38 2017 -0700 HID: remove no longer used hid->open field Now that all users have migrated to use hid->ll_open_count, we can remove hid->open field. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina include/linux/hid.h | 1 - 1 file changed, 1 deletion(-) commit d9d2401f59355264a435c723aadee5b84b75881b Author: Dmitry Torokhov Date: Tue Jun 6 23:59:37 2017 -0700 greybus: hid: remove custom locking from gb_hid_open/close Now that HID core enforces serialization of transport driver open/close calls we can remove custom locking from greybus hid driver. Signed-off-by: Dmitry Torokhov Acked-by: Greg Kroah-Hartman Acked-by: Viresh Kumar Reviewed-by: Andy Shevchenko Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/staging/greybus/hid.c | 43 ++++++++++++++----------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) commit e399396a6b061ba9e68e64e2867cc3a0f26f0ace Author: Dmitry Torokhov Date: Tue Jun 6 23:59:36 2017 -0700 HID: usbhid: remove custom locking from usbhid_open/close Now that HID core enforces serialization of transport driver open/close calls we can remove custom locking from usbhid driver. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/usbhid/hid-core.c | 115 +++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 62 deletions(-) commit 85ae91133152c8c5e214303b8e26cfcbb91dfeb9 Author: Dmitry Torokhov Date: Tue Jun 6 23:59:35 2017 -0700 HID: i2c-hid: remove custom locking from i2c_hid_open/close Now that HID core enforces serialization of transport driver open/close calls we can remove custom locking from i2c-hid driver. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) commit aaac082dac0a8ac6b00509c7ae2fa8280f966652 Author: Dmitry Torokhov Date: Tue Jun 6 23:59:34 2017 -0700 HID: serialize hid_hw_open and hid_hw_close The HID transport drivers either re-implement exactly the same logic (usbhid, i2c-hid) or forget to implement it (usbhid) which causes issues when the same device is accessed via multiple interfaces (for example input device through evdev and also hidraw). Let's muve the locking logic into HID core to make sure the serialized behavior is always enforced. Also let's uninline and move hid_hw_start() and hid_hw_stop() into hid-core as hid_hw_start() is somewhat large and do not believe we get any benefit from these two being inline. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/hid.h | 72 +++++----------------------------------- 2 files changed, 98 insertions(+), 63 deletions(-) commit 28cbc863f4bfa92c26143493f0463e4eb96a1783 Author: Dmitry Torokhov Date: Tue Jun 6 23:59:33 2017 -0700 HID: usbhid: do not rely on hid->open when deciding to do IO Instead of checking hid->open (that we plan on having HID core manage) in hid_start_in(), let's allocate a couple of new flags: HID_IN_POLLING and HID_OPENED, and use them to decide whether we should be submitting URBs or not. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/usbhid/hid-core.c | 25 ++++++++++++++++++------- drivers/hid/usbhid/usbhid.h | 11 +++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) commit 9a83563fb3f926cbf0d5992d5c70d760c445ba09 Author: Dmitry Torokhov Date: Tue Jun 6 23:59:32 2017 -0700 HID: hiddev: use hid_hw_power instead of usbhid_get/put_power Instead of calling into usbhid code directly, let's use the standard accessors for the transport HID drivers, and stop clobbering their error codes with -EIO. This also allows us to remove usbhid_get/put_power(), leaving only usbhid_power(). Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/usbhid/hid-core.c | 22 +++++----------------- drivers/hid/usbhid/hiddev.c | 14 ++++++-------- drivers/hid/usbhid/usbhid.h | 2 -- 3 files changed, 11 insertions(+), 27 deletions(-) commit d36b7d4c271b2f93127e7e7cc007b5768a296594 Author: Dmitry Torokhov Date: Tue Jun 6 23:59:31 2017 -0700 HID: hiddev: use hid_hw_open/close instead of usbhid_open/close Instead of calling into usbhid code directly, let's use the standard accessors for the transport HID drivers, and stop clobbering their errors with -EIO. This also allows us make usbhid_open and close static. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/usbhid/hid-core.c | 4 ++-- drivers/hid/usbhid/hiddev.c | 16 +++++++++------- drivers/hid/usbhid/usbhid.h | 2 -- 3 files changed, 11 insertions(+), 11 deletions(-) commit 38b2d78c557ebb47e65de5ff1415144c65c4cf7c Author: Daniel Drake Date: Mon Jun 5 14:58:57 2017 -0600 HID: asus: Add support for Zen AiO MD-5110 keyboard Add support for media keys on the MD-5110 wireless keyboard that comes with the Asus V221ID and ZN241IC All In One computers. The keys to support here are WLAN, BRIGHTNESSDOWN and BRIGHTNESSUP. The USB Vendor ID suggests that it is a TURBOX device, but the physical branding only mentions ASUS MD-5110. Signed-off-by: Daniel Drake Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + 3 files changed, 3 insertions(+) commit 5be918035e44ae22854d7938c790d96d5154a5ae Author: Daniel Drake Date: Mon Jun 5 14:58:56 2017 -0600 HID: move Asus keyboard support from hid-chicony to hid-asus The Asus AIO keyboard AK1D was added to hid-chicony based on its USB vendor ID, however images available online suggest that this keyboard is physically branded as ASUS with no mention of Chicony. A recent commit also added support for another Asus AIO keyboard into hid-chicony, this one with USB vendor ID Jess, and a pending review comment asked me to move it into hid-asus because it is also only physically branded as ASUS. I updated the USB ID defines to match the branding and product name, including noting that the recently added keyboard is labelled as ASUS MD-5112. Signed-off-by: Daniel Drake Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 29 +++++++++++++++++++++++++++++ drivers/hid/hid-chicony.c | 2 -- drivers/hid/hid-core.c | 4 ++-- drivers/hid/hid-ids.h | 4 ++-- 4 files changed, 33 insertions(+), 6 deletions(-) commit 6b567085c1bdbacea217dd628f0dbf26dd67db3f Author: Chris Wilson Date: Thu Jun 8 12:14:05 2017 +0100 drm/i915: Remove the spin-request during execbuf await_request Originally we would enable and disable the breadcrumb interrupt immediately on demand. This was slow enough to have a large impact (>30%) on tasks that hopped between engines. However, by using a shadow to keep the irq alive for an extra interrupt (see commit 67b807a89230 ("drm/i915: Delay disabling the user interrupt for breadcrumbs")) and by recently reducing the cost in adding ourselves to the signal tree, we no longer need to spin-request during await_request to avoid delays in throughput tests. Without the earlier patches to stop the wakeup when signaling if the irq was already active, we saw no improvement in execbuf overhead (and corresponding contention in other clients) despite the removal of the spinner in a simple test like glxgears. This means there will be scenarios where now we spend longer enabling the interrupt than we would have spent spinning, but these are not likely to have as noticeable an impact as the high frequency test cases (where there should not be any regression). Ulterior motive: generalising the engine->sync_to to handle different types of semaphores and non-semaphores. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Oscar Mateo Reviewed-by: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170608111405.16466-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 735e0eb669a6bb4f6f7b9574d55b451c838747bd Author: Chris Wilson Date: Thu Jun 8 12:14:04 2017 +0100 drm/i915: Skip adding the request to the signal tree is complete Enabling the interrupt for the signaler takes a finite amount of time (a few microseconds) during which it is possible for the request to complete. Check afterwards and skip adding the request to the signal rbtree if it complete. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170608111405.16466-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 49 ++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 21 deletions(-) commit bac2ef4b470b08e3748784eb8e84e00d3b121c20 Author: Chris Wilson Date: Thu Jun 8 12:14:03 2017 +0100 drm/i915: Report back whether the irq was armed when adding the waiter The important condition that we need to check after enabling the interrupt for signaling is whether the request completed in the process (and so we missed that interrupt). A large cost in enabling the signaling (rather than waiters) is in waking up the auxiliary signaling thread, but we only need to do so to catch that missed interrupt. If we know we didn't miss any interrupts (because we didn't arm the interrupt) then we can skip waking the auxiliary thread. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170608111405.16466-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 9f90ff392877581e2c9b54a2d5ecfd1f50d1f170 Author: Chris Wilson Date: Thu Jun 8 12:14:02 2017 +0100 drm/i915: Check signaled state after enabling signaling Setting up the irq to signal the request completion takes a finite amount of time, during which it is possible that the request already completed. Check afterwards, just in case, so that we can respond immediately. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170608111405.16466-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67ddd75771b6b860bc0cebb3b7fd4cbebeda9cd4 Author: Markus Elfring Date: Tue Apr 25 14:17:50 2017 +0200 HSI: core: Use kcalloc() in two functions Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/hsi_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit de7c98eb7c6f72bbfa87afc5b7e2d3b0188a8d83 Author: Markus Elfring Date: Tue Apr 25 13:56:08 2017 +0200 HSI: Use kcalloc() in hsi_register_board_info() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/hsi_boardinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fbad7c8e2def6a1aa84c3efff23f79539ba530a Author: Markus Elfring Date: Tue Apr 25 12:42:14 2017 +0200 HSI: omap_ssi: Delete an error message for a failed memory allocation in ssi_add_controller() The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such a statement here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/controllers/omap_ssi_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8621e620c172232ec949f962ab3c977a058c516f Author: Markus Elfring Date: Tue Apr 25 11:35:11 2017 +0200 HSI: omap_ssi: Fix a typo in a comment line Add a missing character in this description for a function call. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/controllers/omap_ssi_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a8557de7fb0be63e4e783ad4ad77463afb0d611 Author: Markus Elfring Date: Tue Apr 25 11:20:41 2017 +0200 HSI: omap_ssi: Use devm_kcalloc() in ssi_add_controller() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/controllers/omap_ssi_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34b2486def90f3487cbac2d00a6c4aad0834a331 Author: Markus Elfring Date: Tue Apr 25 10:20:37 2017 +0200 HSI: nokia-modem: Add a space character for better code readability in nokia_modem_probe() The script "checkpatch.pl" pointed information out like the following. ERROR: space required before the open parenthesis '(' Thus fix the affected source code place. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/clients/nokia-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e3b9baa2f798a6cc9865d451269251378067f3a Author: Markus Elfring Date: Tue Apr 25 10:17:06 2017 +0200 HSI: nokia-modem: Delete error messages for a failed memory allocation in two functions The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/clients/nokia-modem.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 1be0593f05e25d56a8f65586ea6d9afa601743bc Author: Markus Elfring Date: Tue Apr 25 09:49:22 2017 +0200 HSI: nokia-modem: Use devm_kcalloc() in nokia_modem_gpio_probe() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/clients/nokia-modem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e78b1218df37f1a1834dff853d967444e332bab Author: Tony Lindgren Date: Wed May 31 15:51:39 2017 -0700 ARM: OMAP2+: Remove unused legacy code for n8x0 We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Reviewed-by: Sebastian Reichel [tony@atomide.com: left out probe changes to avoid merge conflict] Signed-off-by: Tony Lindgren arch/arm/mach-omap2/board-n8x0.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 279ebec8f4721d6d3eaacfa218110df508618e2c Author: Tony Lindgren Date: Wed May 31 15:51:38 2017 -0700 ARM: OMAP2+: Remove unused legacy code for watchdog We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/wd_timer.c | 28 ---------------------------- 1 file changed, 28 deletions(-) commit 1aa8f0cb19e59a0def9925d401d628c1846c3270 Author: Tony Lindgren Date: Wed May 31 15:51:37 2017 -0700 ARM: OMAP2+: Remove unused legacy code for interconnects We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 5 +---- arch/arm/mach-omap2/omap_hwmod.c | 23 ++++++++++------------- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 3 +-- 3 files changed, 12 insertions(+), 19 deletions(-) commit 2a26d31b1bae5d07b97fc05755053295da686ec7 Author: Tony Lindgren Date: Wed May 31 15:51:36 2017 -0700 ARM: OMAP2+: Remove unused legacy code for PRM We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/prm3xxx.c | 17 +++++------- arch/arm/mach-omap2/prm44xx.c | 59 ---------------------------------------- arch/arm/mach-omap2/prm_common.c | 9 ++---- 3 files changed, 10 insertions(+), 75 deletions(-) commit 58a641c827e2ef75b93bf799b05be28eb20cca23 Author: Tony Lindgren Date: Wed May 31 15:51:34 2017 -0700 ARM: OMAP2+: Remove unused legacy code for io.c We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/io.c | 59 ++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 45 deletions(-) commit 48f6693790aa899c813a83f12be1d723849dc3a2 Author: Tony Lindgren Date: Wed May 31 15:51:33 2017 -0700 ARM: OMAP2+: Remove unused legacy code for McBSP We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Acked-by: Peter Ujfalusi Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/mcbsp.c | 70 --------------------------------------------- 1 file changed, 70 deletions(-) commit 46e9d0b61e27a3a9286002311f349f0c33dcb18f Author: Eran Ben Elisha Date: Sun Apr 16 10:03:38 2017 +0300 net/mlx5e: Fill advertised and supported port data from Hardware info Translate hardware port connector type data into link mode supported and advertised info instead of caching it in driver. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 90 ++++++++++++++++++---- 1 file changed, 74 insertions(+), 16 deletions(-) commit 5b4793f817452e478442684e6bba85bddb5a9345 Author: Eran Ben Elisha Date: Mon Feb 13 14:00:59 2017 +0200 net/mlx5e: Add support for reading connector type from PTYS Read port connector type from the firmware instead of caching it in the driver metadata. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 22 ++++++++++++++++++++-- include/linux/mlx5/mlx5_ifc.h | 7 +++++-- include/linux/mlx5/port.h | 13 +++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) commit 0c90e9c6b5549825e410b6589ad6c4478f81ebad Author: Maor Gottlieb Date: Sun Mar 12 11:35:23 2017 +0200 net/mlx5: Update flow table commands layout Update struct mlx5_ifc_create(modify)_flow_table_bits according to the last device specification. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 32 ++++++++++------- include/linux/mlx5/mlx5_ifc.h | 46 +++++++++++------------- 2 files changed, 40 insertions(+), 38 deletions(-) commit 2b64beba025109f64e688ae675985bbf72196b8c Author: Or Gerlitz Date: Wed May 10 20:14:16 2017 +0300 net/mlx5e: Support header re-write of partial fields in TC pedit offload Using a per field mask field, the TC pedit action supports modifying partial fields. E.g if using the TC tool, the following example would make the kernel to only re-write two bytes of the src ip address: tc filter add dev enp1s0 protocol ip parent ffff: prio 30 flower skip_sw ip_proto udp dst_port 8001 action pedit ex munge ip src set 10.1.0.0 retain 0xffff0000 We add driver support for offload these partial re-writes, by setting the per FW action offset-in-field and length-from-offset attributes. The 1st bit set in the mask specifies both the offset and the right shift to apply on the value such that the 1st bit which needs to be set will reside in bit 0 of the FW data field. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 28 +++++++++++++++++-------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 3099eb5a8ee2e46d57302932165fe4f86232a812 Author: Or Gerlitz Date: Thu May 4 23:53:03 2017 +0300 net/mlx5e: Use modify header ID cache for offloaded TC NIC flows Use the modify header ID cache for the header re-write part of offloading TC NIC flows. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 1a9527bb17427a330ef9bd1a65e2c15760095b5f Author: Or Gerlitz Date: Thu May 4 23:43:10 2017 +0300 net/mlx5e: Use modify header ID cache for offloaded TC E-Switch flows Use the modify header ID cache for the header re-write part of offloading TC eswitch flows. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 11c9c548ceb31f431facbc51c7081b4957223c47 Author: Or Gerlitz Date: Thu May 4 21:46:11 2017 +0300 net/mlx5e: Add cache for HW modify header IDs Packets belonging to flows which are different by matching may still need to go through the same header re-write. Add a cache for header re-write IDs keyed by the binary chain of modify header actions. The caching is supported for both eswitch and NIC use-cases, where the actual conversion of the code to use caching comes in next patches, one per use-case. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 134 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 1 + 4 files changed, 137 insertions(+), 1 deletion(-) commit 513f8f7fc049361976062c770a1ffb43b01c73d1 Author: Or Gerlitz Date: Sun May 7 11:33:17 2017 +0300 net/mlx5e: Use short attribute form when adding/deleting offloaded TC flows Instead of going through flow->nic/esw_attr for each usage, assign an attr pointer per the context (nic or esw) and use that. This patch doesn't add any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit de6ea92382f6d93f73ce1f77b9af5051e3f40798 Author: Or Gerlitz Date: Tue Feb 28 10:48:35 2017 +0200 net/mlx5e: Remove limitation of single NIC offloaded TC action per rule Remove the limitation that offloaded NIC filters can have only one action. This allows us for example to provide flow tag as a note to upper layers / apps that that HW header re-write was applied. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ---- 1 file changed, 4 deletions(-) commit 874b2adbed1253a11549cb9b7b912ab65fea9cf2 Author: Tony Lindgren Date: Wed May 31 17:19:21 2017 -0700 power: supply: cpcap-battery: Add a battery driver On the CPCAP PMIC we can use the ADCs for monitoring the battery, and there is also a coulomb counter. So let's add basic support for the battery driver. I did not add any capacity prediction as that should probably be done in the user space. Or at least user space should tell the kernel some battery statistics and then the kernel driver could display the capacity based on that. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Cc: Rob Herring Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 8 + drivers/power/supply/Makefile | 1 + drivers/power/supply/cpcap-battery.c | 808 +++++++++++++++++++++++++++++++++++ 3 files changed, 817 insertions(+) commit 1483384b0caac0a84896d03ebc53737bb889064e Author: Tony Lindgren Date: Wed May 31 17:19:20 2017 -0700 dt-bindings: power: supply: cpcap-battery: Add binding Add binding for cpcap pmic battery. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Signed-off-by: Tony Lindgren Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/supply/cpcap-battery.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 1d2495e8c2d976208e8bb52d52b4e529e3b1ff75 Author: Florian Fainelli Date: Wed May 31 13:39:46 2017 -0700 power: reset: Default POWER_RESET_BRCMSTB to BMIPS_GENERIC On Broadcom MIPS STB platforms, BMIPS_GENERIC is the Kconfig symbol that is used, make this reboot driver default to that value to make sure we can reboot a system properly. Signed-off-by: Florian Fainelli Signed-off-by: Sebastian Reichel drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12031fcae9e74f582579c71c3b2a78cc82ad6c3c Author: Florian Fainelli Date: Wed May 31 13:39:45 2017 -0700 power: reset: Allow selecting POWER_RESET_BRCMSTB on ARM64 Since commit 37eb56dc79a8 ("arm64: Add Broadcom Set Top Box Kconfig entry point") we have ARCH_BRCMSTB also visible on ARM64 platform, yet this reboot driver was not selectable, so fix that. Signed-off-by: Florian Fainelli Signed-off-by: Sebastian Reichel drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be04a0d77eb1896f56eee5ef8f2f5281008c22ec Author: Alexandre Belloni Date: Wed May 31 11:49:15 2017 +0200 power: reset: at91-sama5d2_shdwc: fix clobber list Assembly in at91_lpddr_poweroff has r0 in the clobber list but uses r6. Reported-by: Ben Hutchings Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel drivers/power/reset/at91-sama5d2_shdwc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e9bbbf694fd9ed4d96a303dadce4d8ccf2a4af3 Author: Alexandre Belloni Date: Wed May 31 11:49:14 2017 +0200 power: reset: at91-poweroff: fix clobber list Assembly in at91_lpddr_poweroff has r0 in the clobber list but uses r6. Reported-by: Ben Hutchings Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel drivers/power/reset/at91-poweroff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49fb384653810167dca26812217d0235bece0367 Author: H. Nikolaus Schaller Date: Sun May 21 12:38:16 2017 +0200 power: supply: twl4030-charger: remove nonstandard max_current sysfs attribute Since we now support the standard 'input_current_limit' property by commit 3fb319c2cdcd ("power: supply: twl4030-charger: add writable INPUT_CURRENT_LIMIT property") we can now remove the nonstandard 'max_current' sysfs attribute. See Documentation/power/power_supply_class.txt line 125 Both are functionally equivalent. From ABI point of view it is just a rename of the property. This also removes the entry in Documentation/ABI/testing/sysfs-class-power-twl4030 Signed-off-by: H. Nikolaus Schaller Signed-off-by: Sebastian Reichel .../ABI/testing/sysfs-class-power-twl4030 | 17 ------ drivers/power/supply/twl4030_charger.c | 63 ---------------------- 2 files changed, 80 deletions(-) commit e12854174bbe5bab7b8f3e378e05dc0700112112 Author: Dan Carpenter Date: Thu May 18 10:43:46 2017 +0300 power: supply: ltc3651-charger: fix some error codes in probe There are several cut and past bugs here. ltc3651_charger->charger is NULL at this point, so we return success instead of the intended error codes. Fixes: c94d4ed017ae ("power: supply: Add ltc3651-charger driver") Signed-off-by: Dan Carpenter [Wei Yongjun found the same issue independently] Signed-off-by: Wei Yongjun Acked-by: Mike Looijmans Signed-off-by: Sebastian Reichel drivers/power/supply/ltc3651-charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 105df60f207301631258c966d82d99f826508b41 Author: David Lechner Date: Mon May 15 16:21:15 2017 -0500 power: supply: sysfs: parse string as enum when writing property This fixes the TODO to parse strings and convert them to enum values when writing to a power_supply class property sysfs attribute. There is at least one driver that has a writable enum property that previously could only be written as an integer, so a fallback to writing enums as integers instead of strings is provided so we don't break existing userspace programs. Signed-off-by: David Lechner Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_sysfs.c | 124 ++++++++++++++++++++---------- 1 file changed, 85 insertions(+), 39 deletions(-) commit 71399aa5d68bb3ed8c4caf8bfd71faae39555876 Author: Benson Leung Date: Mon May 8 15:02:48 2017 -0700 power: supply: Add Apple Brick ID power supply type Apple currently supports three very common USB chargers: https://www.apple.com/power-adapters/ These chargers implement a proprietary Apple method for advertising 1A, 2.1A, and 2.4A at 5V called "Brick ID". In addition, 3rd parties implement the same charging method in many charging accessories that work with iOS devices. Devices that have charger detection chips such as the Pericom PI3USB9281, eg. Google Chromebook Pixel 2015, are capable of detecting these chargers, so let's add a type to facilicate passing that info up to userspace. This adds a separate power supply type for Apple's proprietary "Brick ID" charging method. Signed-off-by: Benson Leung Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_sysfs.c | 2 +- include/linux/power_supply.h | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) commit c76e4d2e50068ddd82fe18f86d05a33733877059 Author: Markus Elfring Date: Sat Jun 3 19:16:27 2017 +0200 ARM: OMAP2+: SmartReflex: Delete an error message for a failed memory allocation in two functions Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sr_device.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 6b72de4d331f058dbd8fa327f1e5d0a729583f56 Author: Markus Elfring Date: Sat Jun 3 19:09:07 2017 +0200 ARM: OMAP2+: Use kcalloc() in sr_set_nvalues() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sr_device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1dfb5b59d6571104eff6629a0e73a6af347a3226 Author: Markus Elfring Date: Sat Jun 3 19:02:24 2017 +0200 ARM: OMAP2+: Improve a size determination in sr_dev_init() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a61a2a5a6476c9053a6c50265ded7f1387960fb Author: Markus Elfring Date: Sat Jun 3 17:24:27 2017 +0200 ARM: OMAP2+: Delete an error message for a failed memory allocation in two functions Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap2/hsmmc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6f3ab009a178098e834d9e060f03e1232bb449c1 Author: Tony Lindgren Date: Wed May 31 15:51:32 2017 -0700 ARM: OMAP2+: Remove unused legacy code for device init We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Note that omap_init_sti() won't do anything so we can remove omap2_init_devices() as pointed out by Sebastian Reichel . Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/devices.c | 175 ------------------------------------------ 1 file changed, 175 deletions(-) commit 7bd6934477413753eacbcab8aeb2df7eb84f2867 Author: Tony Lindgren Date: Wed May 31 15:51:31 2017 -0700 ARM: OMAP2+: Remove unused legacy code for PMU We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Makefile | 3 -- arch/arm/mach-omap2/pmu.c | 97 -------------------------------------------- 2 files changed, 100 deletions(-) commit 99b3587debacd24b30ecfae5ae59ed7a5070528b Author: Tony Lindgren Date: Wed May 31 15:51:29 2017 -0700 ARM: OMAP2+: Remove unused legacy code for opp We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Note that the volt_data is still being used. Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Makefile | 1 - arch/arm/mach-omap2/opp.c | 104 ------------------------------------- arch/arm/mach-omap2/opp3xxx_data.c | 86 ------------------------------ arch/arm/mach-omap2/opp4xxx_data.c | 79 ---------------------------- 4 files changed, 270 deletions(-) commit c4a8952612f6c1c28bab200c45d773e08dfd24d5 Author: Michel Thierry Date: Mon Jun 5 10:12:51 2017 -0700 drm/i915/guc: Clear enable_guc_loading in case of init failure And prevent calling i915_ggtt_disable_guc twice (the first when GuC init failed, and the second time during driver unload / intel_uc_fini_hw), and hitting the GEM_BUG_ON. v2: Clear enable_guc_loading unconditionally (Michal) Make sure guc_free_load_err_log is still called (Daniele) Don't shoot the messenger (Chris) Fixes: 3950bf3dbff10 ("drm/i915/guc: Add onion teardown to the GuC setup") Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Signed-off-by: Michel Thierry Reviewed-by: Michal Wajdeczko Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170605171251.9905-1-michel.thierry@intel.com drivers/gpu/drm/i915/intel_uc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 018956d6419be3e5ff5aacc60b2a3cff585adee1 Author: Peter Zijlstra Date: Wed May 31 17:11:49 2017 +0200 locking/selftest: Add RT-mutex support Now that RT-mutex has lockdep annotations, add them to the selftest. 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 lib/locking-selftest-rtmutex.h | 11 +++++ lib/locking-selftest.c | 106 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) commit cfb6133399a490419cda55fcdcf9dbbca65eacba Author: Peter Zijlstra Date: Wed May 31 17:05:46 2017 +0200 locking/selftest: Remove the bad unlock ordering test There is no such thing as a bad unlock order. 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 lib/locking-selftest.c | 29 ----------------------------- 1 file changed, 29 deletions(-) commit f5694788ad8da5da41b501f3d6d2ae22379c4ef9 Author: Peter Zijlstra Date: Mon Sep 19 12:15:37 2016 +0200 rt_mutex: Add lockdep annotations Now that (PI) futexes have their own private RT-mutex interface and implementation we can easily add lockdep annotations to the existing RT-mutex interface. 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 include/linux/rtmutex.h | 25 +++++++++++++++++++++---- kernel/locking/rtmutex-debug.c | 6 +++++- kernel/locking/rtmutex-debug.h | 2 +- kernel/locking/rtmutex.c | 36 +++++++++++++++++++++++++++++------- kernel/locking/rtmutex.h | 2 +- lib/Kconfig.debug | 3 +++ 6 files changed, 60 insertions(+), 14 deletions(-) commit 3942b77121986519ee52ab4dd4ae8f4383dfe765 Author: Peter Zijlstra Date: Tue Nov 8 15:06:03 2016 +0100 MAINTAINERS: Claim atomic*_t maintainership Since Will and me have rewritten and heavily extended the atomic*_t infrastructure over the past few years, claim maintainership of it. We would also like to add Boqun as he helped out with PowerPC and has shown good understanding of these bits. We would still defer to architecture maintainers on implementation details, but we'd take care of the interface and cross architecture semantics of the primitives. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Boqun Feng Cc: Linus Torvalds Cc: Paul McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161108140603.GH3117@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 31b35f6b4d5285a311e10753f4eb17304326b211 Author: Dmitry Vyukov Date: Fri May 26 19:29:00 2017 +0200 locking/x86: Remove the unused atomic_inc_short() methd It is completely unused and implemented only on x86. Remove it. Suggested-by: Mark Rutland Signed-off-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Andrey Ryabinin Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170526172900.91058-1-dvyukov@google.com Signed-off-by: Ingo Molnar arch/tile/lib/atomic_asm_32.S | 3 +-- arch/x86/include/asm/atomic.h | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) commit ebfa4c02fa4806bfef189e88152b833f2a732bff Author: Aubrey Li Date: Wed Jun 7 10:49:02 2017 +0800 sched/idle: Add deferrable vmstat_updater back Deferrable vmstat_updater was missing in commit: c1de45ca831a ("sched/idle: Add support for tasks that inject idle") Add it back. Signed-off-by: Aubrey Li Signed-off-by: Peter Zijlstra (Intel) Cc: Aubrey Li Cc: Christoph Lameter Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1496803742-38274-1-git-send-email-aubrey.li@intel.com Signed-off-by: Ingo Molnar kernel/sched/idle.c | 1 + 1 file changed, 1 insertion(+) commit f5832c1998af2ca8d9947792d1c8e1816ab58e57 Author: Nicolas Pitre Date: Mon May 29 17:02:57 2017 -0400 sched/core: Omit building stop_sched_class when !SMP The stop class is invoked through stop_machine only. This is dead code on UP builds. Signed-off-by: Nicolas Pitre Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170529210302.26868-3-nicolas.pitre@linaro.org Signed-off-by: Ingo Molnar kernel/sched/Makefile | 4 ++-- kernel/sched/core.c | 60 +++++++++++++++++++++++++-------------------------- kernel/sched/sched.h | 4 ++++ 3 files changed, 36 insertions(+), 32 deletions(-) commit 3effcb4247e74a51f5d8b775a1ee4abf87cc089a Author: Daniel Bristot de Oliveira Date: Mon May 29 16:24:03 2017 +0200 sched/deadline: Use the revised wakeup rule for suspending constrained dl tasks We have been facing some problems with self-suspending constrained deadline tasks. The main reason is that the original CBS was not designed for such sort of tasks. One problem reported by Xunlei Pang takes place when a task suspends, and then is awakened before the deadline, but so close to the deadline that its remaining runtime can cause the task to have an absolute density higher than allowed. In such situation, the original CBS assumes that the task is facing an early activation, and so it replenishes the task and set another deadline, one deadline in the future. This rule works fine for implicit deadline tasks. Moreover, it allows the system to adapt the period of a task in which the external event source suffered from a clock drift. However, this opens the window for bandwidth leakage for constrained deadline tasks. For instance, a task with the following parameters: runtime = 5 ms deadline = 7 ms [density] = 5 / 7 = 0.71 period = 1000 ms If the task runs for 1 ms, and then suspends for another 1ms, it will be awakened with the following parameters: remaining runtime = 4 laxity = 5 presenting a absolute density of 4 / 5 = 0.80. In this case, the original CBS would assume the task had an early wakeup. Then, CBS will reset the runtime, and the absolute deadline will be postponed by one relative deadline, allowing the task to run. The problem is that, if the task runs this pattern forever, it will keep receiving bandwidth, being able to run 1ms every 2ms. Following this behavior, the task would be able to run 500 ms in 1 sec. Thus running more than the 5 ms / 1 sec the admission control allowed it to run. Trying to address the self-suspending case, Luca Abeni, Giuseppe Lipari, and Juri Lelli [1] revisited the CBS in order to deal with self-suspending tasks. In the new approach, rather than replenishing/postponing the absolute deadline, the revised wakeup rule adjusts the remaining runtime, reducing it to fit into the allowed density. A revised version of the idea is: At a given time t, the maximum absolute density of a task cannot be higher than its relative density, that is: runtime / (deadline - t) <= dl_runtime / dl_deadline Knowing the laxity of a task (deadline - t), it is possible to move it to the other side of the equality, thus enabling to define max remaining runtime a task can use within the absolute deadline, without over-running the allowed density: runtime = (dl_runtime / dl_deadline) * (deadline - t) For instance, in our previous example, the task could still run: runtime = ( 5 / 7 ) * 5 runtime = 3.57 ms Without causing damage for other deadline tasks. It is note worthy that the laxity cannot be negative because that would cause a negative runtime. Thus, this patch depends on the patch: df8eac8cafce ("sched/deadline: Throttle a constrained deadline task activated after the deadline") Which throttles a constrained deadline task activated after the deadline. Finally, it is also possible to use the revised wakeup rule for all other tasks, but that would require some more discussions about pros and cons. Reported-by: Xunlei Pang Signed-off-by: Daniel Bristot de Oliveira [peterz: replaced dl_is_constrained with dl_is_implicit] Signed-off-by: Peter Zijlstra (Intel) Cc: Juri Lelli Cc: Linus Torvalds Cc: Luca Abeni Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Romulo Silva de Oliveira Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/5c800ab3a74a168a84ee5f3f84d12a02e11383be.1495803804.git.bristot@redhat.com Signed-off-by: Ingo Molnar include/linux/sched.h | 1 + kernel/sched/core.c | 2 + kernel/sched/deadline.c | 98 +++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 89 insertions(+), 12 deletions(-) commit 54d6d3039e2d84b6fbfbe59ec57d856371edf0a2 Author: Daniel Bristot de Oliveira Date: Mon May 29 16:24:02 2017 +0200 sched/deadline: Fix dl_bw comment The sched_dl_entity's dl_bw variable stores the utilization (dl_runtime / dl_period) of a task, not its density (dl_runtime / dl_deadline), as the comment says. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Cc: Juri Lelli Cc: Linus Torvalds Cc: Luca Abeni Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Romulo Silva de Oliveira Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Cc: Xunlei Pang Link: http://lkml.kernel.org/r/8d05f1ccfd02da1a11bda62494d98f5456c1469a.1495803804.git.bristot@redhat.com Signed-off-by: Ingo Molnar include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae83b56a56f8d9643dedbee86b457fa1c5d42f59 Author: Xunlei Pang Date: Wed May 10 21:03:37 2017 +0800 sched/deadline: Zero out positive runtime after throttling constrained tasks When a contrained task is throttled by dl_check_constrained_dl(), it may carry the remaining positive runtime, as a result when dl_task_timer() fires and calls replenish_dl_entity(), it will not be replenished correctly due to the positive dl_se->runtime. This patch assigns its runtime to 0 if positive after throttling. Signed-off-by: Xunlei Pang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Luca Abeni Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Fixes: df8eac8cafce ("sched/deadline: Throttle a constrained deadline task activated after the deadline) Link: http://lkml.kernel.org/r/1494421417-27550-1-git-send-email-xlpang@redhat.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 2 ++ 1 file changed, 2 insertions(+) commit ccc9d651a7d26fec88d2375c4dd4e097cc0f8de7 Author: Claudio Scordino Date: Thu May 18 22:13:37 2017 +0200 sched/deadline: Add documentation about GRUB reclaiming This patch adds the documentation about the GRUB reclaiming algorithm, adding a few details discussed in list. Signed-off-by: Claudio Scordino Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Cc: Daniel Bristot de Oliveira Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-11-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar Documentation/scheduler/sched-deadline.txt | 168 +++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) commit daec5798367012951cdb54fdb5c006e4379c9ae9 Author: Luca Abeni Date: Thu May 18 22:13:36 2017 +0200 sched/deadline: Reclaim bandwidth not used by dl tasks This commit introduces a per-runqueue "extra utilization" that can be reclaimed by deadline tasks. In this way, the maximum fraction of CPU time that can reclaimed by deadline tasks is fixed (and configurable) and does not depend on the total deadline utilization. The GRUB accounting rule is modified to add this "extra utilization" to the inactive utilization of the runqueue, and to avoid reclaiming more than a maximum fraction of the CPU time. Tested-by: Daniel Bristot de Oliveira Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Cc: Claudio Scordino Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-10-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/core.c | 17 ++++++++++------- kernel/sched/deadline.c | 42 +++++++++++++++++++++++++++--------------- kernel/sched/sched.h | 37 +++++++++++++++++++++++++++++++++++-- 3 files changed, 72 insertions(+), 24 deletions(-) commit 9f0d1a5077399143aad7e1244bb031e29116074e Author: Luca Abeni Date: Thu May 18 22:13:35 2017 +0200 sched/deadline: Base GRUB reclaiming on the inactive utilization Instead of decreasing the runtime as "dq = -Uact dt" (eventually divided by the maximum utilization available for deadline tasks), decrease it as "dq = -max{u, (1 - Uinact)} dt", where u is the task utilization and Uinact is the "inactive utilization". In this way, the maximum fraction of CPU time that can be reclaimed is given by the total utilization of deadline tasks. This approach solves a fairness issue with "traditional" global GRUB reclaiming: using the traditional GRUB algorithm, if tasks are allocated to the various cores in a non-uniform way, the reclaiming mechanism allows some tasks to reclaim more time than others. This issue is visible starting 11 time-consuming tasks with runtime 10ms and period 30ms (total utilization 3.666) on a 4-cores system: some tasks will receive much more than the reserved runtime (thanks to the reclaiming mechanism), while other tasks will receive less than the reserved runtime. Tested-by: Daniel Bristot de Oliveira Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Cc: Claudio Scordino Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-9-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit 8fd27231c3302e0c7e1907df1252db97b65eb241 Author: Luca Abeni Date: Thu May 18 22:13:34 2017 +0200 sched/deadline: Track the "total rq utilization" too The total rq utilization is defined as the sum of the utilisations of tasks that are "assigned" to a runqueue, independently from their state (TASK_RUNNING or blocked) Tested-by: Daniel Bristot de Oliveira Signed-off-by: Luca Abeni Signed-off-by: Claudio Scordino Signed-off-by: Peter Zijlstra (Intel) Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-8-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 118 ++++++++++++++++++++++++++++++++++-------------- kernel/sched/sched.h | 11 +++++ 2 files changed, 95 insertions(+), 34 deletions(-) commit 2d4283e9d583a3ee8cfb1cbb9c1270614df4c29d Author: Luca Abeni Date: Thu May 18 22:13:33 2017 +0200 sched/deadline: Make GRUB a task's flag This patch introduces the SCHED_FLAG_RECLAIM flag to specify that a DL task is allowed to reclaim unused CPU time (using the GRUB algorithm). Tested-by: Daniel Bristot de Oliveira Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Cc: Claudio Scordino Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-7-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar include/uapi/linux/sched.h | 1 + kernel/sched/core.c | 3 ++- kernel/sched/deadline.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) commit 4da3abcefe178c650033f371e94fa10e80bce167 Author: Luca Abeni Date: Thu May 18 22:13:32 2017 +0200 sched/deadline: Do not reclaim the whole CPU bandwidth Original GRUB tends to reclaim 100% of the CPU time... And this allows a CPU hog to starve non-deadline tasks. To address this issue, allow the scheduler to reclaim only a specified fraction of CPU time, stored in the new "bw_ratio" field of the dl runqueue structure. Tested-by: Daniel Bristot de Oliveira Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Cc: Claudio Scordino Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-6-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/core.c | 11 +++++++++++ kernel/sched/deadline.c | 12 +++++++++++- kernel/sched/sched.h | 8 ++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) commit c52f14d384628db0217a7a9080ab800d5ffb2d72 Author: Luca Abeni Date: Thu May 18 22:13:31 2017 +0200 sched/deadline: Implement GRUB accounting According to the GRUB (Greedy Reclaimation of Unused Bandwidth) reclaiming algorithm, the runtime is not decreased as "dq = -dt", but as "dq = -Uact dt" (where Uact is the per-runqueue active utilization). Hence, this commit modifies the runtime accounting rule in update_curr_dl() to implement the GRUB rule. Tested-by: Daniel Bristot de Oliveira Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Cc: Claudio Scordino Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-5-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 ++-- kernel/sched/deadline.c | 17 +++++++++++++++++ kernel/sched/sched.h | 2 ++ 3 files changed, 21 insertions(+), 2 deletions(-) commit 387e31300b5760169e6d3f7a9e1eeed12cc5a30b Author: Luca Abeni Date: Thu May 18 22:13:30 2017 +0200 sched/deadline: Fix the update of the total -deadline utilization Now that the inactive timer can be armed to fire at the 0-lag time, it is possible to use inactive_task_timer() to update the total -deadline utilization (dl_b->total_bw) at the correct time, fixing dl_overflow() and __setparam_dl(). Tested-by: Daniel Bristot de Oliveira Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Cc: Claudio Scordino Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-4-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/core.c | 38 ++++++++++++++------------------------ kernel/sched/deadline.c | 28 +++++++++++++--------------- 2 files changed, 27 insertions(+), 39 deletions(-) commit 209a0cbda7a01d2ea32a8b631d35e873bee498e9 Author: Luca Abeni Date: Thu May 18 22:13:29 2017 +0200 sched/deadline: Improve the tracking of active utilization This patch implements a more theoretically sound algorithm for tracking active utilization: instead of decreasing it when a task blocks, use a timer (the "inactive timer", named after the "Inactive" task state of the GRUB algorithm) to decrease the active utilization at the so called "0-lag time". Tested-by: Claudio Scordino Tested-by: Daniel Bristot de Oliveira Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-3-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar include/linux/sched.h | 17 +++ kernel/sched/core.c | 3 + kernel/sched/deadline.c | 269 +++++++++++++++++++++++++++++++++++++++++++++--- kernel/sched/sched.h | 2 + 4 files changed, 276 insertions(+), 15 deletions(-) commit e36d8677bfa55054e4194ec3683189b882a538f6 Author: Luca Abeni Date: Thu May 18 22:13:28 2017 +0200 sched/deadline: Track the active utilization Active utilization is defined as the total utilization of active (TASK_RUNNING) tasks queued on a runqueue. Hence, it is increased when a task wakes up and is decreased when a task blocks. When a task is migrated from CPUi to CPUj, immediately subtract the task's utilization from CPUi and add it to CPUj. This mechanism is implemented by modifying the pull and push functions. Note: this is not fully correct from the theoretical point of view (the utilization should be removed from CPUi only at the 0 lag time), a more theoretically sound solution is presented in the next patches. Tested-by: Daniel Bristot de Oliveira Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Cc: Claudio Scordino Cc: Joel Fernandes Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tommaso Cucinotta Link: http://lkml.kernel.org/r/1495138417-6203-2-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++--- kernel/sched/sched.h | 6 +++++ 2 files changed, 67 insertions(+), 4 deletions(-) commit d5553c0990c8b9cde6a9abb1f15acf8a11c5eef3 Author: Chris Wilson Date: Thu May 4 12:55:08 2017 +0100 drm/i915: Move the unclaimed mmio detection into the powerwell for KMS Replace the large comment about requiring the powerwell for intel_uncore_arm_unclaimed_mmio_detection() by moving the arming of the mmio error detection into the powerwell held for modesetting. Thereby also accomplishing the goal of only arming the mmio detection after a full modeset. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Daniel Vetter Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170504115508.13571-1-chris@chris-wilson.co.uk Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_display.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 1ad3aaf3fcd2444406628a19a9b9e0922b95e2d4 Author: Peter Zijlstra Date: Wed May 17 12:53:50 2017 +0200 sched/core: Implement new approach to scale select_idle_cpu() Hackbench recently suffered a bunch of pain, first by commit: 4c77b18cf8b7 ("sched/fair: Make select_idle_cpu() more aggressive") and then by commit: c743f0a5c50f ("sched/fair, cpumask: Export for_each_cpu_wrap()") which fixed a bug in the initial for_each_cpu_wrap() implementation that made select_idle_cpu() even more expensive. The bug was that it would skip over CPUs when bits were consequtive in the bitmask. This however gave me an idea to fix select_idle_cpu(); where the old scheme was a cliff-edge throttle on idle scanning, this introduces a more gradual approach. Instead of stopping to scan entirely, we limit how many CPUs we scan. Initial benchmarks show that it mostly recovers hackbench while not hurting anything else, except Mason's schbench, but not as bad as the old thing. It also appears to recover the tbench high-end, which also suffered like hackbench. Tested-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Cc: Chris Mason Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: hpa@zytor.com Cc: kitsunyan Cc: linux-kernel@vger.kernel.org Cc: lvenanci@redhat.com Cc: riel@redhat.com Cc: xiaolong.ye@intel.com Link: http://lkml.kernel.org/r/20170517105350.hk5m4h4jb6dfr65a@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/fair.c | 21 ++++++++++++++++----- kernel/sched/features.h | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) commit d0fabd1cb8b70073a0f44f1cf8b663b5e7241c74 Author: Matthias Kaehlcke Date: Tue May 23 14:51:32 2017 -0700 perf/core: Remove unused perf_cgroup_event_cgrp_time() function The function was added by commit e5d1367f17ba ("perf: Add cgroup support") in 2011 and hasn't been used since then. Removing it fixes the following warning when building with Clang: kernel/events/core.c:696:19: error: unused function 'perf_cgroup_event_cgrp_time' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Douglas Anderson Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170523215132.189049-1-mka@chromium.org Signed-off-by: Ingo Molnar kernel/events/core.c | 5 ----- 1 file changed, 5 deletions(-) commit ba5213ae6b88fb170c4771fef6553f759c7d8cdd Author: Peter Zijlstra Date: Tue May 30 11:45:12 2017 +0200 perf/core: Correct event creation with PERF_FORMAT_GROUP Andi was asking about PERF_FORMAT_GROUP vs inherited events, which led to the discovery of a bug from commit: 3dab77fb1bf8 ("perf: Rework/fix the whole read vs group stuff") - PERF_SAMPLE_GROUP = 1U << 4, + PERF_SAMPLE_READ = 1U << 4, - if (attr->inherit && (attr->sample_type & PERF_SAMPLE_GROUP)) + if (attr->inherit && (attr->read_format & PERF_FORMAT_GROUP)) is a clear fail :/ While this changes user visible behaviour; it was previously possible to create an inherited event with PERF_SAMPLE_READ; this is deemed acceptible because its results were always incorrect. 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: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 3dab77fb1bf8 ("perf: Rework/fix the whole read vs group stuff") Link: http://lkml.kernel.org/r/20170530094512.dy2nljns2uq7qa3j@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/events/core.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit a5506c46a4d249a422b0eca537026fc7a1ac78b5 Merge: 36cc2b9 cc1582c Author: Ingo Molnar Date: Thu Jun 8 10:12:12 2017 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit bbf79d21bd4627a01ca8721c9373752819f8e4cc Author: Borislav Petkov Date: Tue Jun 6 19:31:16 2017 +0200 x86/ldt: Rename ldt_struct::size to ::nr_entries ... because this is exactly what it is: the number of entries in the LDT. Calling it "size" is simply confusing and it is actually begging to be called "nr_entries" or somesuch, especially if you see constructs like: alloc_size = size * LDT_ENTRY_SIZE; since LDT_ENTRY_SIZE is the size of a single entry. There should be no functionality change resulting from this patch, as the before/after output from tools/testing/selftests/x86/ldt_gdt.c shows. Signed-off-by: Borislav Petkov Acked-by: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170606173116.13977-1-bp@alien8.de [ Renamed 'n_entries' to 'nr_entries' ] Signed-off-by: Ingo Molnar arch/x86/events/core.c | 2 +- arch/x86/include/asm/mmu_context.h | 4 ++-- arch/x86/kernel/ldt.c | 49 +++++++++++++++++++------------------- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/step.c | 2 +- arch/x86/math-emu/fpu_system.h | 2 +- 6 files changed, 31 insertions(+), 30 deletions(-) commit 5dd0b16cdaff9b94da06074d5888b03235c0bf17 Author: Andy Lutomirski Date: Mon Jun 5 07:40:25 2017 -0700 mm/vmstat: Make NR_TLB_REMOTE_FLUSH_RECEIVED available even on UP This fixes CONFIG_SMP=n, CONFIG_DEBUG_TLBFLUSH=y without introducing further #ifdef soup. Caught by a Kbuild bot randconfig build. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: ce4a4e565f52 ("x86/mm: Remove the UP asm/tlbflush.h code, always use the (formerly) SMP code") Link: http://lkml.kernel.org/r/76da9a3cc4415996f2ad2c905b93414add322021.1496673616.git.luto@kernel.org Signed-off-by: Ingo Molnar include/linux/vm_event_item.h | 2 -- 1 file changed, 2 deletions(-) commit 55799c5ab99e8762e58c387e39f9fa36e8f14158 Author: Takashi Sakamoto Date: Thu Jun 8 09:11:03 2017 +0900 ALSA: firewire: arrange common PCM info/constraints for AMDTP engine applications In ALSA firewire stack, 8 drivers uses IEC 61883-1/6 engine for data transmission. They have common PCM info/constraints and duplicated codes. This commit unifies the codes into fireiwre-lib. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 19 +++++++++++++++++ sound/firewire/bebob/bebob_pcm.c | 21 ------------------- sound/firewire/dice/dice-pcm.c | 20 ------------------ sound/firewire/digi00x/digi00x-pcm.c | 33 ++++++++++-------------------- sound/firewire/fireface/ff-pcm.c | 21 ------------------- sound/firewire/fireworks/fireworks_pcm.c | 21 ------------------- sound/firewire/motu/motu-pcm.c | 20 ------------------ sound/firewire/oxfw/oxfw-pcm.c | 20 ------------------ sound/firewire/tascam/tascam-pcm.c | 35 ++++++-------------------------- 9 files changed, 36 insertions(+), 174 deletions(-) commit bcbc2265f269cc57924371e3bce8c3220d0270c5 Author: Christoph Hellwig Date: Thu Jun 8 09:02:20 2017 +0200 acpi: always include uuid.h Without this the build will fail for !CONFIG_ACPI builds on x86. Fixes: 94116f81 ("ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()") Signed-off-by: Christoph Hellwig include/linux/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit add1318723a0d7b1ec974d2d9ba309cc24bb298a Author: Steve Longerbeam Date: Sun May 21 15:02:10 2017 -0700 gpu: ipu-v3: vdic: include AUTO field order bit in ipu_vdi_set_field_order The field order selection in VDIC_C register uses different bits depending on whether the VDIC is receiving from a CSI ("AUTO") or from memory ("MAN"). Since the VDIC cannot receive from both CSI and memory at the same time, set or clear both field order bits to cover both cases. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-vdi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ffb40733fe432b00fa12ff486364dcfe6d7f247c Author: Philipp Zabel Date: Mon May 15 16:31:37 2017 +0200 gpu: ipu-v3: remove interrupt busy waiting routine This is not used anymore since commit eb8c88808c83 ("drm/imx: add deferred plane disabling"), remove it. Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 16 ---------------- drivers/gpu/ipu-v3/ipu-prv.h | 1 - 2 files changed, 17 deletions(-) commit 93adc8b5705c14d16be382d43699d2ba71248a4b Author: Philipp Zabel Date: Mon May 8 12:45:52 2017 +0200 gpu: ipu-v3: allocate ipuv3_channels as needed Most of the 64 IPUv3 DMA channels are never used, some of them (channels 16, 30, 32, 34-39, and 53-63) are even marked as reserved. Allocate the channel control structure only when a channel is actually requested, replace the fixed size array with a list, and remove the unused enabled and busy fields from the ipuv3_channel structure. Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 23 +++++++++++++++-------- drivers/gpu/ipu-v3/ipu-prv.h | 8 ++------ 2 files changed, 17 insertions(+), 14 deletions(-) commit e1e9733cd37908a9ba61e29154561f0c81420e06 Author: Philipp Zabel Date: Wed Sep 17 15:44:54 2014 +0200 gpu: ipu-v3: Add support for double read/write reduction Allow to skip writing odd chroma rows by setting the RDRW bit for 4:2:0 chroma subsampled formats for any IDMAC write channel. This also allows to skip reading odd rows for the VDIC read channel. Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-cpmem.c | 6 ++++++ include/video/imx-ipu-v3.h | 1 + 2 files changed, 7 insertions(+) commit 16e9ab820ad43108513ec32bb18fb226df4cc7fc Author: Lucas Stach Date: Wed May 3 18:16:46 2017 +0200 gpu: ipu-v3: prg: remove counter load enable The counter load enable bit has no effect when the shadow register set is activated. As we always operate the PRG with shadow enabled it is safe to remove this. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-prg.c | 2 -- 1 file changed, 2 deletions(-) commit 615c16a9d8649b9894592d11bc393e684b11e2ea Author: fred gao Date: Thu May 25 15:33:52 2017 +0800 drm/i915/gvt: Refine virtual reset function during the emulation of virtual reset: 1. only reset the engine related mmio ending with MMIO offset Master_IRQ, not include display stuff. 2. fences are not required to set default value as well to prevent screen flicking. this will fix the issue of Guest screen hang while running Force tdr in Linux guest. v2: - only reset the engine related mmio. (Zhenyu & Zhiyuan) v3: - IMR/Ring mode registers are not save/restored. (Changbin) v4: - redefine the MMIO reset offset for easy understanding. (Zhenyu) - pvinfo can be reset. (Zhenyu) v5: - add more comments for mmio reset. (Zhenyu) Cc: Changbin Du Cc: Zhenyu Wang Cc: Lv zhiyuan Cc: Zhang Yulei Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/mmio.c | 28 ++++++++++++++++++++-------- drivers/gpu/drm/i915/gvt/mmio.h | 2 +- drivers/gpu/drm/i915/gvt/vgpu.c | 9 +++++++-- 3 files changed, 28 insertions(+), 11 deletions(-) commit 0811fa663015c469510f30e2a0f2fe8fd383b224 Author: fred gao Date: Wed May 24 12:02:24 2017 +0800 drm/i915/gvt: Fix GDRST vreg state after reset Emulating the GDRST read behavior correctly to ack the guest reset request. v2: - split the original patch into two: GDRST read handler and virtual gpu reset. (Zhenyu) v3: - emulate the GDRST read right after write. (Zhenyu) Cc: Zhenyu Wang Cc: Zhang Yulei Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 3 +++ 1 file changed, 3 insertions(+) commit 178cd160c6652f57571ba3dc0a9091a1f41d9bc8 Author: Changbin Du Date: Tue Jun 6 15:56:14 2017 +0800 drm/i915/gvt: Tuning the size of MMIO hash lookup table to 2048 On Skylake platform, The traced virtual mmio registers are up to 2039. So tuning the hash table size to improve lookup performance. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbfd76c3746a322a9f33f77b66f85d4f68cabe4a Author: Changbin Du Date: Tue Jun 6 15:56:13 2017 +0800 drm/i915/gvt: Add helper for tuning MMIO hash table We count all the tracked virtual MMIO registers, which can help us to tune the MMIO hash table. v2: Move num_tracked_mmio into gvt structure. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 4 ++++ 2 files changed, 5 insertions(+) commit 5c6d4c676d0ccba2dcd97e47e1f10321da423e7d Author: Changbin Du Date: Tue Jun 6 15:56:12 2017 +0800 drm/i915/gvt: Make the MMIO attribute wrappers be inline Function calls are expensive. I have see obvious overhead call to these wrappers in perf data, especially from the cmd parser side. So make these simple wrappers be inline to kill them all. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 78 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gvt/handlers.c | 80 ------------------------------------- drivers/gpu/drm/i915/gvt/mmio.h | 8 +--- 3 files changed, 79 insertions(+), 87 deletions(-) commit 56a78de54964894de2f65c9fa8066d5e9843e1ce Author: Changbin Du Date: Tue Jun 6 15:56:11 2017 +0800 drm/i915/gvt: Make mmio_attribute as type u8 to save 1.5MB memory Type u8 is big enough to contain all MMIO attribute flags. As the total MMIO size is 2MB so we saved 1.5MB memory. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 2 +- drivers/gpu/drm/i915/gvt/handlers.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit d8d94ba3fc4d28753d0d6ba08340d8467380e666 Author: Changbin Du Date: Tue Jun 6 15:56:10 2017 +0800 drm/i915/gvt: Cleanup struct intel_gvt_mmio_info The size, length, addr_mask fields actually are not necessary. Every tracked mmio has DWORD size, and addr_mask is a legacy field. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/firmware.c | 9 ++------- drivers/gpu/drm/i915/gvt/handlers.c | 7 +------ drivers/gpu/drm/i915/gvt/mmio.h | 3 --- 3 files changed, 3 insertions(+), 16 deletions(-) commit 65f9f6febf12ed5bbcebd3599698eb78b03e5b69 Author: Changbin Du Date: Tue Jun 6 15:56:09 2017 +0800 drm/i915/gvt: Optimize MMIO register handling for some large MMIO blocks Some of traced MMIO registers are a large continuous section. These stuffed the MMIO lookup hash table and so waste lots of memory and get much lower lookup performance. Here we picked out these sections by special handling. These sections include: o Display pipe registers, total 768. o The PVINFO page, total 1024. o MCHBAR_MIRROR, total 65536. o CSR_MMIO, total 3072. So we removed 70,400 items from the hash table, and speed up guest boot time by ~500ms. v2: o add a local function find_mmio_block(). o fix comments. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 162 +++++++++++++++++++++++++++++------- drivers/gpu/drm/i915/gvt/mmio.c | 86 ++----------------- drivers/gpu/drm/i915/gvt/mmio.h | 13 ++- 3 files changed, 147 insertions(+), 114 deletions(-) commit af2c6399aabeb7a7107657a469cb2f16b55dfbae Author: Chuanxiao Dong Date: Fri Jun 2 15:34:24 2017 +0800 drm/i915/gvt: add gtt_invalidate API to flush the GTT TLB add gtt_invalidate API to handle the GTT TLB flush instead of hiding in write_pte64 function. This can avoid overkill when using write_pte64 Suggested-by: Zhenyu Wang Signed-off-by: Chuanxiao Dong Cc: Zhenyu Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 9b7bd65ecdf347b33c37d73b610fd85774b12e87 Author: Chuanxiao Dong Date: Fri Jun 2 15:34:23 2017 +0800 drm/i915/gvt: Add runtime_pm get/put to proctect MMIO accessing In some cases, GVT-g is accessing MMIO without holding runtime_pm and this patch can add the inline API for doing the runtime_pm get/put to make sure when accessing HW MMIO the i915 HW is really powered on. Suggested-by: Zhenyu Wang Signed-off-by: Chuanxiao Dong Cc: Zhenyu Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 10 ++++++++++ drivers/gpu/drm/i915/gvt/handlers.c | 12 ++++++++++++ 2 files changed, 22 insertions(+) commit 89009b7746fa66634061a7e76f881b7ea344d26d Author: Nick Desaulniers Date: Sun May 21 00:15:27 2017 -0700 drm/i915/gvt: remove redundant -Wall This flag is already set in the top level Makefile of the kernel. Also, by having set CONFIG_DRM_I915_GVT, thereby appending -Wall to ccflags, you undo all the -Wno-* cflags previously set in the Make variable KBUILD_CFLAGS. For example: cc foo.c -Wall -Wno-format -Wall resets -Wformat. Signed-off-by: Nick Desaulniers Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1dcba905817f97a4086392276334dce0f6faea7 Author: fred gao Date: Thu May 25 15:32:27 2017 +0800 drm/i915/gvt: Legacy HSW related MMIO handler clean up remove all the legacy pre-BDW mmio handlers and the corresponding usage/definition since pre-BDW platforms are not supported in GVT environment. v2: - clean up all the left dirty code before BDW, e.g all D_HSW usage and itself, D_IVB, D_PRE_BDW. (Zhenyu) v3: - change is based on gvt-staging. (Zhenyu) Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 22 ++++++++++------------ drivers/gpu/drm/i915/gvt/mmio.h | 18 +++++------------- 2 files changed, 15 insertions(+), 25 deletions(-) commit f100daec9c9a5bbf1a715323cb6102e99933fdb3 Author: Ping Gao Date: Wed May 24 09:14:11 2017 +0800 drm/i915/gvt: Trigger scheduling after context complete The time based scheduler poll context busy status at every micro-second during vGPU switch, it will make GPU idle for a while when the context is very small and completed before the next micro-second arrival. Trigger scheduling immediately after context complete will eliminate GPU idle and improve performance. Create two vGPU with same type, run Heaven simultaneously: Before this patch: +---------+----------+----------+ | | vGPU1 | vGPU2 | +---------+----------+----------+ | Heaven | 357 | 354 | +-------------------------------+ After this patch: +---------+----------+----------+ | | vGPU1 | vGPU2 | +---------+----------+----------+ | Heaven | 397 | 398 | +-------------------------------+ v2: Let need_reschedule protect by gvt-lock. Signed-off-by: Ping Gao Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 4 ++++ 1 file changed, 4 insertions(+) commit c713cb2f9b7e1e9ffa8a379cecb13bc6eacd49b6 Author: Ping Gao Date: Wed May 24 20:30:17 2017 +0800 drm/i915/gvt: Support event based scheduling This patch decouple the time slice calculation and scheduler, let other event be able to trigger scheduling without impact the calculation for QoS. v2: add only one new enum definition. v3: fix typo. Signed-off-by: Ping Gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.c | 4 +++- drivers/gpu/drm/i915/gvt/gvt.h | 5 +++++ drivers/gpu/drm/i915/gvt/sched_policy.c | 15 ++++++++++----- 3 files changed, 18 insertions(+), 6 deletions(-) commit 089f93c3f94c368157980578b1efc4f6014ebd97 Author: Xiong Zhang Date: Tue May 23 05:38:09 2017 +0800 drm/i915/gvt: Delete gvt_dbg_cmd() in cmd_parser_exec() Since cmd message have been recorded in trace, gvt_dbg_cmd isn't necessary. This will reduce much of dmesg as gvt_dbg_cmd is repeated on each workload. Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ------ 1 file changed, 6 deletions(-) commit 7fb6a7d65292a524256ed6e2d0e94071b0c53936 Author: Xiong Zhang Date: Tue May 23 05:38:08 2017 +0800 drm/i915/gvt: Change flood gvt dmesg into trace Currently gvt dmesg is so heavy at drm.debug=0x2 that guest and host almost couldn't run on xengt. This patch transfer these repeated messages into trace, so dmesg is light at drm.debug=0x2, and user could get the target message through trace event and trace filter. Suggested-by: Zhi Wang Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 1 + drivers/gpu/drm/i915/gvt/interrupt.c | 20 +++---- drivers/gpu/drm/i915/gvt/mpt.h | 3 +- drivers/gpu/drm/i915/gvt/render.c | 13 ++--- drivers/gpu/drm/i915/gvt/trace.h | 100 +++++++++++++++++++++++++++++++++++ 5 files changed, 119 insertions(+), 18 deletions(-) commit 7b8d57587025dc294094b73f08b389a498fb107f Author: Changbin Du Date: Mon May 22 17:46:47 2017 +0800 drm/i915/gvt: clean up the unused last_ctx_submit_time of struct intel_vgpu Clean up it as it is not used now. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 1 - drivers/gpu/drm/i915/gvt/handlers.c | 1 - 2 files changed, 2 deletions(-) commit 23ce0592ac991447e1d1c1096bef29b5653936c4 Author: Weinan Li Date: Fri May 19 23:48:34 2017 +0800 drm/i915/gvt: add RING_INSTDONE and SC_INSTDONE mmio handler in GVT-g kernel hangcheck needs to check RING_INSTDONE and SC_INSTDONE registers' state to know if hardware is still running. In GVT-g environment, we need to emulate these registers changing for all the guests although they are not render owner. Here we return the physical state for all the guests, then if INSTDONE is changing guest can know hardware is still running although its workload is pending. Read INSTDONE isn't one correct way to know if guest trigger gfx reset, especially with Linux guest, it will read ACTH first, then check INSTDONE and SUBSLICE registers to check if hardware is still running, at last trigger gfx reset when it finds all the registers is frozen. In Windows guest, read INSTDONE usually happens when OS detect TDR. With the difference between Windows and Linux guest, "disable_warn_untrack" may let debug log run into wrong state(Linux guest trigger hangcheck with no ACTHD changed, then check INSTDONE), but actually there is no TDR happened. The new policy is always WARN with untrack MMIO r/w. Bad effect is many noisy untrack mmio warning logs exist when real TDR happen. Even so you can control the log output or not by setting the debug mask bit. v2: remove log in instdone_mmio_read Suggested-by: Zhenyu Wang Cc: Zhenyu Wang Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 15 +++++++++++++++ drivers/gpu/drm/i915/gvt/mmio.c | 7 ------- 2 files changed, 15 insertions(+), 7 deletions(-) commit 0e86cc9ccc3bf557348befaddf5cb613cf3c4458 Author: Changbin Du Date: Thu May 4 10:52:38 2017 +0800 drm/i915/gvt: implement per-vm mmio switching optimization Commit ab9da627906a ("drm/i915: make context status notifier head be per engine") gives us a chance to inspect every single request. Then we can eliminate unnecessary mmio switching for same vGPU. We only need mmio switching for different VMs (including host). This patch introduced a new general API intel_gvt_switch_mmio() to replace the old intel_gvt_load/restore_render_mmio(). This function can be further optimized for vGPU to vGPU switching. To support individual ring switch, we track the owner who occupy each ring. When another VM or host request a ring we do the mmio context switching. Otherwise no need to switch the ring. This optimization is very useful if only one guest has plenty of workloads and the host is mostly idle. The best case is no mmio switching will happen. v2: o fix missing ring switch issue. (chuanxiao) o support individual ring switch. Signed-off-by: Changbin Du Reviewed-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.c | 2 +- drivers/gpu/drm/i915/gvt/render.c | 35 +++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/gvt/render.h | 4 ++-- drivers/gpu/drm/i915/gvt/sched_policy.c | 12 +++++++++++ drivers/gpu/drm/i915/gvt/scheduler.c | 35 ++++++++++++++++++++++++++------- drivers/gpu/drm/i915/gvt/scheduler.h | 4 ++++ 6 files changed, 80 insertions(+), 12 deletions(-) commit 5d0f5de16ef3d127469aa09dcdf07bec5174937f Author: Changbin Du Date: Thu May 4 18:36:54 2017 +0800 drm/i915/gvt: refactor function intel_vgpu_submit_execlist The function intel_vgpu_submit_execlist could be more simpler. It actually does: 1) validate the submission. The first context must be valid, and all two must be privilege_access. 2) submit valid contexts. The first one need emulate schedule_in. We do not need a bitmap, valid desc copy valid_desc. Local variable emulate_schedule_in also can be optimized out. v2: dump desc content in err msg (Zhi Wang) Signed-off-by: Changbin Du Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/execlist.c | 56 +++++++++++++++---------------------- 1 file changed, 23 insertions(+), 33 deletions(-) commit ffc197763e636b928963c5dd9a3eaea8146345e3 Author: Changbin Du Date: Wed May 3 09:20:10 2017 +0800 drm/i915/gvt: rewrite the trace gvt:gvt_command using trace style approach The gvt:gvt_command trace involve unnecessary overhead even this trace is not enabled. We need improve it. The kernel trace infrastructure provide a full api to define a trace event. We should leverage them if possible. And one important thing is that a trace point should store raw data but not format string. This patch include two part work: 1) Refactor the gvt_command trace definition, including: o only store raw trace data. o use __dynamic_array() to declare a variable size buffer. o use __print_array() to format raw cmd data. o rename vm_id as vgpu_id. 2) Improve the trace invoking, including: o remove the cycles calculation for handler. We can get this data by any perf tool. o do not make a backup for raw cmd data which just doesn't make sense. With this patch, this trace has no overhead if it is not enabled. And we are trace style now. The final output example: gvt workload 0-211 [000] ...1 120.555964: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e880, raw cmd {0x4000000} gvt workload 0-211 [000] ...1 120.556014: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e884, raw cmd {0x7a000004,0x1004000,0xe1511018,0x0,0x7d,0x0} gvt workload 0-211 [000] ...1 120.556062: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e89c, raw cmd {0x7a000004,0x140000,0x0,0x0,0x0,0x0} gvt workload 0-211 [000] ...1 120.556110: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e8b4, raw cmd {0x10400002,0xe1511018,0x0,0x7d} Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 50 ++-------------------- drivers/gpu/drm/i915/gvt/trace.h | 78 +++++++++++++---------------------- 2 files changed, 32 insertions(+), 96 deletions(-) commit 833521ebc65b1c3092e5c0d8a97092f98eec595d Author: Chris Wilson Date: Wed May 31 18:50:43 2017 +0300 e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails An error during suspend (e100e_pm_suspend), [ 429.994338] ACPI : EC: event blocked [ 429.994633] e1000e: EEE TX LPI TIMER: 00000011 [ 430.955451] pci_pm_suspend(): e1000e_pm_suspend+0x0/0x30 [e1000e] returns -2 [ 430.955454] dpm_run_callback(): pci_pm_suspend+0x0/0x140 returns -2 [ 430.955458] PM: Device 0000:00:19.0 failed to suspend async: error -2 [ 430.955581] PM: Some devices failed to suspend, or early wake event detected [ 430.957709] ACPI : EC: event unblocked lead to complete failure: [ 432.585002] ------------[ cut here ]------------ [ 432.585013] WARNING: CPU: 3 PID: 8372 at kernel/irq/manage.c:1478 __free_irq+0x9f/0x280 [ 432.585015] Trying to free already-free IRQ 20 [ 432.585016] Modules linked in: cdc_ncm usbnet x86_pkg_temp_thermal intel_powerclamp coretemp mii crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep lpc_ich snd_hda_core snd_pcm mei_me mei sdhci_pci sdhci i915 mmc_core e1000e ptp pps_core prime_numbers [ 432.585042] CPU: 3 PID: 8372 Comm: kworker/u16:40 Tainted: G U 4.10.0-rc8-CI-Patchwork_3870+ #1 [ 432.585044] Hardware name: LENOVO 2356GCG/2356GCG, BIOS G7ET31WW (1.13 ) 07/02/2012 [ 432.585050] Workqueue: events_unbound async_run_entry_fn [ 432.585051] Call Trace: [ 432.585058] dump_stack+0x67/0x92 [ 432.585062] __warn+0xc6/0xe0 [ 432.585065] warn_slowpath_fmt+0x4a/0x50 [ 432.585070] ? _raw_spin_lock_irqsave+0x49/0x60 [ 432.585072] __free_irq+0x9f/0x280 [ 432.585075] free_irq+0x34/0x80 [ 432.585089] e1000_free_irq+0x65/0x70 [e1000e] [ 432.585098] e1000e_pm_freeze+0x7a/0xb0 [e1000e] [ 432.585106] e1000e_pm_suspend+0x21/0x30 [e1000e] [ 432.585113] pci_pm_suspend+0x71/0x140 [ 432.585118] dpm_run_callback+0x6f/0x330 [ 432.585122] ? pci_pm_freeze+0xe0/0xe0 [ 432.585125] __device_suspend+0xea/0x330 [ 432.585128] async_suspend+0x1a/0x90 [ 432.585132] async_run_entry_fn+0x34/0x160 [ 432.585137] process_one_work+0x1f4/0x6d0 [ 432.585140] ? process_one_work+0x16e/0x6d0 [ 432.585143] worker_thread+0x49/0x4a0 [ 432.585145] kthread+0x107/0x140 [ 432.585148] ? process_one_work+0x6d0/0x6d0 [ 432.585150] ? kthread_create_on_node+0x40/0x40 [ 432.585154] ret_from_fork+0x2e/0x40 [ 432.585156] ---[ end trace 6712df7f8c4b9124 ]--- The unwind failures stems from commit 2800209994f8 ("e1000e: Refactor PM flows"), but it may be a later patch that introduced the non-recoverable behaviour. Fixes: 2800209994f8 ("e1000e: Refactor PM flows") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99847 Signed-off-by: Chris Wilson Signed-off-by: Jani Nikula Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b476deab8f412bd5441eb161b0fda86a0246de27 Author: Colin Ian King Date: Thu Apr 27 18:59:11 2017 +0100 igb: make a few local functions static Clean up a few sparse warnings, these following functions can be made static: drivers/net/ethernet/intel/igb/igb_main.c: warning: symbol 'igb_add_mac_filter' was not declared. Should it be static? drivers/net/ethernet/intel/igb/igb_main.c: warning: symbol 'igb_del_mac_filter' was not declared. Should it be static? drivers/net/ethernet/intel/igb/igb_main.c: warning: symbol 'igb_set_vf_mac_filter' was not declared. Should it be static? Signed-off-by: Colin Ian King Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 12301cffc37a138b0e901a8b536a052055c29184 Author: Masahiro Yamada Date: Mon Jun 5 12:57:59 2017 +0900 arm64: dts: uniphier: use SPDX-License-Identifier Follow the recent trend for the license description, and fix the wrongly stated X11 to MIT. The X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Signed-off-by: Masahiro Yamada .../arm64/boot/dts/socionext/uniphier-ld11-ref.dts | 38 +--------------------- arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 38 +--------------------- .../arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 38 +--------------------- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 38 +--------------------- 4 files changed, 4 insertions(+), 148 deletions(-) commit 79d4be390424c6200f1203b9b6e4aa733885daec Author: Masahiro Yamada Date: Fri May 26 17:18:15 2017 +0900 arm64: dts: uniphier: reserve more memory for LD11/LD20 Reserve enough space below the kernel base. The assumed address map is: 80000000 - 80ffffff : for IPP 81000000 - 81ffffff : for ARM secure 82000000 - : for Linux Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 2 +- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b9683c21f69b3d8d7b6741d31a0e3cbf26c7191b Author: Alex Deucher Date: Wed Jun 7 15:27:52 2017 -0400 drm/amdgpu/gfx: consolidate mqd buffer setup code It was duplicated across multiple generations. Reviewed-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 66 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 71 +-------------------------------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 65 +----------------------------- 4 files changed, 74 insertions(+), 132 deletions(-) commit 4853bbb6fbb9429b84ddd3562c7f2967ca880d03 Author: Alex Deucher Date: Wed Jun 7 14:20:21 2017 -0400 drm/amdgpu/gfx: move mec parameter setup into sw_init This will allow us to share more mec code. Reviewed-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 30 +++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 38 +++++++++++++++++------------------ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 26 ++++++++++++------------ 3 files changed, 47 insertions(+), 47 deletions(-) commit 71c37505e7eaa01fa259debad1a71a7ae061039d Author: Alex Deucher Date: Wed Jun 7 13:31:32 2017 -0400 drm/amdgpu/gfx: move more common KIQ code to amdgpu_gfx.c Lots more common stuff. Reviewed-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 103 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 11 ++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 110 ++------------------------------ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 109 ++----------------------------- 4 files changed, 122 insertions(+), 211 deletions(-) commit 2db0cdbe2879f424e28f69755a16344348247d44 Author: Alex Deucher Date: Wed Jun 7 12:59:29 2017 -0400 drm/amdgpu: move mec queue helpers to amdgpu_gfx.h They are gfx related, not general helpers. Reviewed-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 30 ------------------------------ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 30 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 6 files changed, 40 insertions(+), 39 deletions(-) commit ee04fac3b7cc5093653ba87bfdc241d321f4a3da Author: Alex Deucher Date: Wed Jun 7 13:09:53 2017 -0400 drm/amdgpu/gfx9: remove spurious line in kiq setup This overrode what queue was actually assigned for kiq. Reviewed-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 - 1 file changed, 1 deletion(-) commit d6b20c87696347c0a74f21fd18349c86e0ab4bc1 Author: Alex Deucher Date: Wed Jun 7 14:22:48 2017 -0400 drm/amdgpu/gfx8: whitespace change Make it consistent. Reviewed-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ecb1f1f7311f22917d0571587048cf34d2c8570c Author: Marek Szyprowski Date: Mon Apr 24 08:42:20 2017 +0200 clk: samsung: Convert common drivers to the new clk_hw API Clock providers should use the new struct clk_hw based API, so convert Samsung clock providers and their helper functions to the new approach. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-cpu.c | 8 ++- drivers/clk/samsung/clk-pll.c | 14 +++--- drivers/clk/samsung/clk-s3c2410-dclk.c | 75 ++++++++++++++-------------- drivers/clk/samsung/clk.c | 91 +++++++++++++++------------------- drivers/clk/samsung/clk.h | 9 ++-- 5 files changed, 92 insertions(+), 105 deletions(-) commit 7288de7451561cb7e9fa0cb0a1c29019807363ad Author: Marek Szyprowski Date: Mon Apr 24 09:54:12 2017 +0200 clk: samsung: Add local variable to match its purpose Add new variable to avoid using clk pointer for different purposes across the exynos_register_cpu_clock() function. This will help in future rewrite for the new clk_hw API. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-cpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9f57fd6ee43dfa7076b2979d36abbd9160888ae2 Author: Marek Szyprowski Date: Mon Apr 24 08:42:18 2017 +0200 clk: samsung: Remove dead code samsung_clk_register_pll2550x() function is not used anymore, so remove its declaration. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-pll.h | 4 ---- 1 file changed, 4 deletions(-) commit 5e7c8b067621256ef961242928e0819e5936e4c1 Author: Alex Deucher Date: Wed Jun 7 11:07:48 2017 -0400 drm/amdgpu/gfx9: Raven has two MECs This was missed when Andres' queue patches were rebased. Fixes: 42794b27 (drm/amdgpu: take ownership of per-pipe configuration v3) Reviewed-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+) commit 41f6a99abdb423691b24c12f0a0578755b2c1126 Author: Alex Deucher Date: Wed Jun 7 11:05:26 2017 -0400 drm/amdgpu: move gfx_v*_0_compute_queue_acquire to common code Same function was duplicated in all gfx IP files. Reviewed-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 37 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 39 +-------------------------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 39 +-------------------------------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 39 +-------------------------------- 5 files changed, 42 insertions(+), 114 deletions(-) commit cf8b611f55a775cc6514485e7dccf1c0e85b938d Author: Alex Deucher Date: Wed Jun 7 10:46:06 2017 -0400 drm/amdgpu: fix mec queue policy on single MEC asics Fixes hangs on single MEC asics. Fixes: 2ed286fb434 (drm/amdgpu: new queue policy, take first 2 queues of each pipe v2) Reviewed-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 12 +++++++++--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 12 +++++++++--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++++++++--- 3 files changed, 27 insertions(+), 9 deletions(-) commit 50dffe7fad6c156c2928e45c19ff7b86eb951f4c Merge: 5ebe31d 0a528ee Author: David S. Miller Date: Wed Jun 7 15:33:02 2017 -0400 Merge branch 'mlx4-drivers-version-update' Tariq Toukan says: ==================== mlx4 drivers: version update This patchset contains version updates for the MLX4 drivers: Core, EN, and IB. Just like we've done in mlx5, we modify the outdated driver version (reported in ethtool for example). This better reflects the current driver state, and removes the redundant date string. We are not going to change this frequently or even use it. I include the IB patch in this series as it has similar subject and content. It does not cause any kind of conflict with Doug's tree. The rdma mailing list is CCed. Please let me know if I need to submit this differently. ==================== Signed-off-by: David S. Miller commit 0a528ee9a52007984fa60b0c4ef1f39fdf5edf8d Author: Tariq Toukan Date: Wed Jun 7 16:26:15 2017 +0300 IB/mlx4: Bump driver version Remove date and bump version for mlx4_ib driver. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/infiniband/hw/mlx4/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 808df6a209ab21af158de38031f52dd3e9fb409c Author: Tariq Toukan Date: Wed Jun 7 16:26:14 2017 +0300 net/mlx4_en: Bump driver version Remove date and bump version for mlx4_en driver. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_main.c | 4 ++-- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) commit cea2a6d81d214e7f5bdcd3866dbd8a7b05a99c60 Author: Tariq Toukan Date: Wed Jun 7 16:26:13 2017 +0300 net/mlx4_core: Bump driver version Remove date and bump version for mlx4_core driver. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 2 +- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit a97a06c7efc1ee34f500171f1c4e9608295bb79a Author: Kuninori Morimoto Date: Wed Jun 7 00:20:47 2017 +0000 ASoC: rsnd: cleanup pointer related code Current rsnd driver is sharing pointer related code between PIO / DMA. But, it is used only PIO mode now, no longer needed. This patch cleanup these. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 42 ------------------------------ sound/soc/sh/rcar/dma.c | 6 +---- sound/soc/sh/rcar/rsnd.h | 6 ----- sound/soc/sh/rcar/ssi.c | 67 +++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 65 insertions(+), 56 deletions(-) commit 9bc3b4ff18d130da09ad608718d4afcda01b3e56 Merge: 07b7acb e8a3ce1 Author: Mark Brown Date: Wed Jun 7 20:30:32 2017 +0100 Merge branch 'fix/rcar' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar commit 07b7acb51d283d8469696c906b91f1882696a4d4 Author: Kuninori Morimoto Date: Wed Jun 7 00:20:01 2017 +0000 ASoC: rsnd: update pointer more accurate Current rsnd driver updates pointer when DMA transfer was finished in DMA transfer mode. But PulseAudio requests more accurate pointer update when timer mode. This patch consider about DMA transfer residue and update more accurate pointer. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 6 ++++-- sound/soc/sh/rcar/dma.c | 26 +++++++++++++++++++++++++- sound/soc/sh/rcar/rsnd.h | 7 +++++++ sound/soc/sh/rcar/ssi.c | 12 ++++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) commit 580331d04982eb0d96085d57c04d7f69cc05b7d1 Author: Keerthy Date: Tue Jun 6 14:35:02 2017 +0530 regulator: lp87565: Fix the GPL header Fix the GPL header to reflect GPL v2 Signed-off-by: Keerthy Signed-off-by: Mark Brown drivers/regulator/lp87565-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5ebe31d7b20fa6c4b2542f957063e0cdf799b28a Author: Andrew Lunn Date: Wed Jun 7 15:06:19 2017 +0200 net: dsa: mv88e6xxx: Have 6161/6123 use EDSA tags The mv88e6161 and mv88e6123 are capable of using EDSA tags when passing frames from the host to the switch and back. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d6b35212b451d4ac0c07c7b2b15b20ea763df5c Author: Kuninori Morimoto Date: Wed Jun 7 00:37:30 2017 +0000 ASoC: simple-scu-card: remove duplicate paramera from asoc_simple_card_parse_of Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d2fdcc285f8c79ab1a6d20e5196eb173a105b365 Author: Kuninori Morimoto Date: Wed Jun 7 00:37:05 2017 +0000 ASoC: simple-card: remove duplicate parameter from asoc_simple_card_parse_of() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 57d88182ea3e8763111882671fd7462289272f64 Author: Mark Bloch Date: Wed Jun 7 14:36:58 2017 +0300 vxlan: use a more suitable function when assigning NULL When stopping the vxlan interface we detach it from the socket. Use RCU_INIT_POINTER() and not rcu_assign_pointer() to do so. Suggested-by: Stephen Hemminger Signed-off-by: Mark Bloch Signed-off-by: David S. Miller drivers/net/vxlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8ea49d7f589fac1994a3b0af59f25cb284f3eb6 Author: Guodong Xu Date: Wed Jun 7 15:06:04 2017 +0800 regulator: hi6421: Describe consumed platform device The hi6421-regulator driver consumes a similarly named platform device. Adding that to the module device table, allows modprobe to locate this driver once the device is created. Signed-off-by: Guodong Xu Signed-off-by: Mark Brown drivers/regulator/hi6421-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5c7024ae7e6787541dd737ba1eba828d5fc74d58 Author: Wang Xiaoyin Date: Wed Jun 7 15:06:03 2017 +0800 regulator: hi6421v530: add driver for hi6421v530 voltage regulator add the driver for hi6421v530 voltage regulator Signed-off-by: Wang Xiaoyin Signed-off-by: Guodong Xu Signed-off-by: Mark Brown drivers/regulator/Kconfig | 10 ++ drivers/regulator/Makefile | 1 + drivers/regulator/hi6421v530-regulator.c | 207 +++++++++++++++++++++++++++++++ 3 files changed, 218 insertions(+) commit 411652982a20ab60957283e9084c81d791cb69f9 Author: Ryo Kodama Date: Wed Jun 7 14:39:00 2017 +0900 ASoC: ak4613: Improve counting DAI number Add the startup function to count DAI instead of hw_params. This change matches the number of opened DAIs. If this change isn't applied, you may get unexpected error due to mismatching of count. Since the excution number of hw_params and shutdown may be different, the mismatching happens. Signed-off-by: Kuninori Morimoto Signed-off-by: Ryo Kodama Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 1dec4cec9ff1cdc2b1b4b68417c04146df93f43d Author: Ganesh Goudar Date: Wed Jun 7 15:04:51 2017 +0530 cxgb4: Fix tids count for ipv6 offload connection the adapter consumes two tids for every ipv6 offload connection be it active or passive, calculate tid usage count accordingly. Also change the signatures of relevant functions to get the address family. Signed-off-by: Rizwan Ansari Signed-off-by: Varun Prakash Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 14 +++++--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 12 +++++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 38 +++++++++++++++------- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 24 ++++++++++---- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 8 +++-- drivers/target/iscsi/cxgbit/cxgbit_cm.c | 6 ++-- 6 files changed, 71 insertions(+), 31 deletions(-) commit ca3b5ad30c0b32f8d12ddb307b698ff56d56c2aa Author: Kuninori Morimoto Date: Tue Jun 6 23:16:01 2017 +0000 ASoC: hdmi-codec: remove unused ratec struct snd_pcm_hw_constraint_list ratec is not used. Let's remove it Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 1 - 1 file changed, 1 deletion(-) commit 294de6e372673229432dc8bcd80964223bc1589d Author: Liam Girdwood Date: Tue Jun 6 15:55:04 2017 +0100 ASoC: topology: Fix potential build issues with undeclared structs We should be declaring snd_kcontrol_new and soc_dai_link as both are used within this header so need to be declared. [Reworded commit message to indicate this wasn't an immediate build failure -- broonie] Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown include/sound/soc-topology.h | 2 ++ 1 file changed, 2 insertions(+) commit c3421a6a65abc636b067eb15a4c5e9cb59e91c95 Author: Liam Girdwood Date: Tue Jun 6 15:45:09 2017 +0100 ASoC: topology: Dont free template strings whilst they are in use. Template name pointers are copied when creating new widgets and are freed in widget destroy. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cc9d4714a8da98f905c63d74e9897fc6f4563fca Author: Liam Girdwood Date: Tue Jun 6 15:45:08 2017 +0100 ASoC: topology: rephrase deferred binding warning. Rewrite the message to be more meaningful. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8597af855f3e34aaebaff0e5c3dbd07611c87f1 Author: Liam Girdwood Date: Tue Jun 6 15:45:07 2017 +0100 ASoC: topology: Allow bespoke configuration post widget creation Current topology only allows for widget configuration before the widget is registered. This patch also allows further configuration and usage after registration is complete. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-topology.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit c92a4fb249bf98670543b4c41307e1e71942d513 Author: Krzysztof Kozlowski Date: Fri Jun 2 20:13:46 2017 +0200 ARM: dts: exynos: Use human-friendly symbols for GIC interrupt properties Replace hard-coded values of type of GIC interrupt and its flags with respective macros from header to increase code readability. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5.dtsi | 84 +++++++++++++++++++-------------------- arch/arm/boot/dts/exynos5250.dtsi | 8 ++-- arch/arm/boot/dts/exynos5420.dtsi | 76 +++++++++++++++++------------------ arch/arm/boot/dts/exynos5440.dtsi | 2 +- 4 files changed, 85 insertions(+), 85 deletions(-) commit 6ff0b90d746146f8270207551c0edbfe80986846 Author: Krzysztof Kozlowski Date: Fri Jun 2 20:13:45 2017 +0200 ARM: dts: exynos: Use human-friendly symbols for interrupt flags in board sources Replace hard-coded values of interrupt flags with respective macros from header to increase code readability. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250-monk.dts | 6 +++--- arch/arm/boot/dts/exynos3250-rinato.dts | 6 +++--- arch/arm/boot/dts/exynos4210-origen.dts | 2 +- arch/arm/boot/dts/exynos4210-trats.dts | 4 ++-- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 6 +++--- arch/arm/boot/dts/exynos4412-odroidx.dts | 2 +- arch/arm/boot/dts/exynos4412-trats2.dts | 8 ++++---- arch/arm/boot/dts/exynos5420-peach-pit.dts | 4 ++-- arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi | 2 +- arch/arm/boot/dts/exynos5800-peach-pi.dts | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) commit 2af168e171f75c783366164c7c810e8ee1440405 Author: Eric Anholt Date: Fri Jun 2 18:57:33 2017 -0700 drm/pl111: Fix offset calculation for the primary plane. If src_x/y were nonzero, we failed to shift them down by 16 to get the pixel offset. The recent CMA helper function gets it right. Signed-off-by: Eric Anholt Fixes: bed41005e617 ("drm/pl111: Initial drm/kms driver for pl111") Reported-by: Mircea Carausu Link: http://patchwork.freedesktop.org/patch/msgid/20170603015733.13266-1-eric@anholt.net Reviewed-by: Sean Paul drivers/gpu/drm/pl111/pl111_display.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 4b7f4958a37e016317d3f25bd5290942f72597b4 Author: Steve Twiss Date: Wed Jun 7 09:13:48 2017 +0100 regulator: da9061: BUCK and LDO regulator driver Regulator support for the DA9061 is added into the DA9062 regulator driver. The regulators for DA9061 differ from those of DA9062. A new DA9061 enumeration list for the LDOs and Bucks supported by this device is added. Regulator information added: the old regulator information for DA9062 is renamed from local_regulator_info[] to local_da9062_regulator_info[] and a new array is added to support local_da9061_regulator_info[]. The probe() function switches on the da9062_compatible_types enumeration and configures the correct da9062_regulator_info array and number of regulator entries. Kconfig is updated to reflect support for DA9061 and DA9062 regulators. Signed-off-by: Steve Twiss Signed-off-by: Mark Brown drivers/regulator/Kconfig | 4 +- drivers/regulator/da9062-regulator.c | 303 +++++++++++++++++++++++++++++++++-- 2 files changed, 293 insertions(+), 14 deletions(-) commit a453f3693f2aa9ebba623f8cff1e3d7c5df96ddd Author: Krzysztof Kozlowski Date: Tue May 23 20:36:53 2017 +0200 pinctrl: samsung: Explicitly cast pointer returned by of_iomap() to iomem For S5Pv210 retention control, the driver stores the iomem pointer from of_iomap() under a void pointer member. This makes sparse unhappy: drivers/pinctrl/samsung/pinctrl-exynos.c:664:36: warning: incorrect type in argument 1 (different address spaces) drivers/pinctrl/samsung/pinctrl-exynos.c:664:36: expected void const volatile [noderef] *addr drivers/pinctrl/samsung/pinctrl-exynos.c:664:36: got void * The iomem pointer is used safely (stored under priv by s5pv210_retention_init(), used by s5pv210_retention_disable()) thus we can add explicit casts to iomem to silence the warning. Signed-off-by: Krzysztof Kozlowski drivers/pinctrl/samsung/pinctrl-exynos-arm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a1ea9a400f5c76cdbe31a8f5c3154f464d84b803 Author: Krzysztof Kozlowski Date: Tue May 23 20:41:40 2017 +0200 pinctrl: samsung: Handle memory allocation failure during wakeup banks init Check if kmemdup failed during wakeup banks initialization. Otherwise NULL pointer would be stored under "irq_chip" member of bank and later dereferenced in interrupt handler. Signed-off-by: Krzysztof Kozlowski drivers/pinctrl/samsung/pinctrl-exynos.c | 2 ++ 1 file changed, 2 insertions(+) commit 71b96c3a8a2d35f74ca7559f9d1b123d97da6f4f Author: Krzysztof Kozlowski Date: Tue May 23 20:41:39 2017 +0200 pinctrl: samsung: Constify wakeup driver specific data Static exynos_irq_chip structures, containing driver specific data, are referenced only through opaque data pointer in const of_device_id table. The contents of pointed memory (exynos_irq_chip structure itself) is then copied with kmemdup() during wakeup initialization so exynos_irq_chip can be made const for code safenes. Signed-off-by: Krzysztof Kozlowski drivers/pinctrl/samsung/pinctrl-exynos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfa76ddf5b3aad642cc904daa3d3784cbb5f2d57 Author: Krzysztof Kozlowski Date: Tue May 16 20:56:27 2017 +0200 pinctrl: samsung: Split Exynos drivers per ARMv7 and ARMv8 Exynos pinctrl drivers contain pretty big per-SoC data structures. The pinctrl-exynos object file contained code and data for both ARMv7 and ARMv8 SoCs thus it grew big. There will not be a shared image between ARMv7 and ARMv8 so there is no need to combine all of this into one driver. Splitting the data allows to make it more granular (e.g. code related to ARMv8 Exynos is self-contained), slightly speed up the compilation and reduce the effective size of compiled kernel. The common data structures and functions reside still in existing pinctrl-exynos.c. Only the SoC-specific parts were moved out to new files. Except marking few functions non-static and adding them to header, there were no functional changes in the code. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Acked-by: Linus Walleij Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar drivers/pinctrl/samsung/Kconfig | 10 + drivers/pinctrl/samsung/Makefile | 2 + drivers/pinctrl/samsung/pinctrl-exynos-arm.c | 815 +++++++++++++++++ drivers/pinctrl/samsung/pinctrl-exynos-arm64.c | 399 ++++++++ drivers/pinctrl/samsung/pinctrl-exynos.c | 1162 +----------------------- drivers/pinctrl/samsung/pinctrl-exynos.h | 8 + drivers/pinctrl/samsung/pinctrl-samsung.c | 8 +- 7 files changed, 1245 insertions(+), 1159 deletions(-) commit bc5f1598e9b1de209ff05ddef6b1aa3ace11deab Author: Masami Hiramatsu Date: Tue May 23 15:10:04 2017 +0900 selftests/ftrace: Return unsupported if it detects older kernel Return unsupported if the kernel is too old to support instance independent ftrace filter for some testcases. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan .../selftests/ftrace/test.d/ftrace/func_event_triggers.tc | 9 +++++++++ .../selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc | 9 +++++++++ 2 files changed, 18 insertions(+) commit 565d557603231468ab71c74df383da42dc72b334 Author: Masami Hiramatsu Date: Tue May 23 15:09:01 2017 +0900 selftests/ftrace: Use top-level available_filter_function Use top-level available_filter_function if the test case is running under an instance. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan .../selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc | 4 ++++ 1 file changed, 4 insertions(+) commit 1917d2c82bc4ba121b16c4afcaf0c3723c36bf4e Author: Masami Hiramatsu Date: Tue May 23 15:07:57 2017 +0900 selftests/ftrace: Add instance indication in test log Add instance test indication in test log too. Current ftracetest shows instance test indication on the list of test, but not in the log for each test. This adds instance test indication on the top of each log, like below; execute (instance) : /ftrace/test.d/ftrace/func_set_ftrace_file.tc Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/ftracetest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7b91c0b1c7f40241d8d47f0a2a0d616a1127635 Author: Masami Hiramatsu Date: Tue May 23 15:06:53 2017 +0900 selftests/ftrace: Reset ftrace filter on older kernel Since older kernel didn't support separated instance of set_ftrace_filter, if the test case set the filter in an instance, it will propagate to top-level instance. This means that the filter setting remains even if we remove the instance, and will cause other tests failure. To avoid this issue, reset the ftrace filter if we detect the propagation. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/test.d/instances/instance-event.tc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 47b586f66a9e78c91586b9c363603a52c75840d7 Author: Colin Ian King Date: Sun May 7 15:33:05 2017 -0300 [media] pvrusb2: remove redundant check on cnt > 8 The 2nd check of cnt > 8 is redundant as cnt is already checked and thresholded to a maximum of 8 a few statements earlier. Remove this redundant 2nd check. Detected by CoverityScan, CID#114281 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5c5180a2302ecdee28c900d91256bbfe1a1e9fa Merge: 2b30842 f938062 Author: David S. Miller Date: Wed Jun 7 12:51:42 2017 -0400 Merge branch 'nfp-ctrl-vNIC' Jakub Kicinski says: ==================== nfp: ctrl vNIC This series adds the ability to use one vNIC as a control channel for passing messages to and from the application firmware. The implementation restructures the existing netdev vNIC code to be able to deal with nfp_nets with netdev pointer set to NULL. Control vNICs are not visible to userspace (other than for dumping ring state), and since they don't have netdevs we use a tasklet for RX and simple skb list for TX queuing. Due to special status of the control vNIC we have to reshuffle the init code a bit to make sure control vNIC will be fully brought up (and therefore communication with app FW can happen) before any netdev or port is visible to user space. FW will designate which vNIC is supposed to be used as control one by setting _pf%u_net_ctrl_bar symbol. Some FWs depend on metadata being prepended to control message, some prefer to look at queue ID to decide that something is a control message. Our implementation can cater to both. First two users of this code will be eBPF maps and flower offloads. ==================== Signed-off-by: David S. Miller commit f9380629fafcf05cb188cbce5e028f0e99f8f49d Author: Jakub Kicinski Date: Mon Jun 5 17:01:57 2017 -0700 nfp: advertise support for NFD ABI 0.5 NFD ABI 0.5 is equivalent to NFD ABI 3.0 but requires that the driver checks the APP id symbol and makes sure it can support given app. Most advanced apps will likely require control vNIC (ability to exchange control messages between the driver and app FW). Detailed app version checking and capability exchange is left to app-specific code. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 02082701b974eea3afdb4ac25ab613adabebe41a Author: Jakub Kicinski Date: Mon Jun 5 17:01:56 2017 -0700 nfp: create control vNICs and wire up rx/tx When driver encounters an nfp_app which has a control message handler defined, allocate a control vNIC. This control channel will be used to exchange data with the application FW such as flow table programming, statistics and global datapath control. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app.c | 18 +++ drivers/net/ethernet/netronome/nfp/nfp_app.h | 44 ++++++++ drivers/net/ethernet/netronome/nfp/nfp_main.h | 7 ++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 121 ++++++++++++++++++--- 5 files changed, 177 insertions(+), 15 deletions(-) commit 2c7e41c0b2f103056f93dd5922c03d6e2021c76d Author: Jakub Kicinski Date: Mon Jun 5 17:01:55 2017 -0700 nfp: allow non-equal distribution of IRQs Thus far the code assumed all vNICs will request similar number of IRQs. This will be no longer true with control vNICs (where 1 IRQ will suffice). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6d4b0d8ed6d2f9e1741b9abd0ce64c641f890d6c Author: Jakub Kicinski Date: Mon Jun 5 17:01:54 2017 -0700 nfp: slice the netdev spawning function We want to be able to create a special vNIC for control messages. This vNIC should be created before any netdev is registered to allow nfp_app logic to exchange messages with the FW app before any netdev is visible to user space. Unfortunately we can't enable IRQs until we know how many vNICs we will need to spawn. Divide the function which spawns netdevs for vNICs into three parts: - vNIC/memory allocation; - IRQ allocation; - netdev init and register. This will help us insert the initialization of the control channel after IRQ allocation but before netdev init and register. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 62 ++++++++++++++--------- 1 file changed, 37 insertions(+), 25 deletions(-) commit 21537bc7019a4dfd5c6f615a235e0b171ef3dda8 Author: Jakub Kicinski Date: Mon Jun 5 17:01:53 2017 -0700 nfp: don't clutter init code passing fw_ver around Reading fw version from the BAR is trivial. Don't pass it around through layers of init functions, simply read it again where needed. This commit has the side effect of each vNIC having the exact NFD version from its own control memory, rather than all data vNICs assuming the version of the first one. This should not result in user-visible changes, though. Capabilities of data vNICs of trival apps are identical. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 73e253f0e5d7557650159ecfac5b2653b6d02cf0 Author: Jakub Kicinski Date: Mon Jun 5 17:01:52 2017 -0700 nfp: map all queue controllers at once RX and TX queue controllers are interleaved. Instead of creating two mappings which map the same area at slightly different offset, create only one mapping. Always map all queue controllers to simplify the code and allow reusing the mapping for non-data vNICs. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.h | 6 +- drivers/net/ethernet/netronome/nfp/nfp_net.h | 1 + drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 122 +++++----------------- 3 files changed, 28 insertions(+), 101 deletions(-) commit c24ca95ff648dd6477d488bb41b9282b67bd22e9 Author: Jakub Kicinski Date: Mon Jun 5 17:01:51 2017 -0700 nfp: make vNIC ctrl memory mapping function reusable We will soon need to map control vNIC PCI memory as well as data vNIC memory. Make the function for mapping areas pointed to by an RTsym reusable. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 55 ++++++++++++----------- 1 file changed, 28 insertions(+), 27 deletions(-) commit 77ece8d5f1960f82d66b68fbc0c92938cdfa2688 Author: Jakub Kicinski Date: Mon Jun 5 17:01:50 2017 -0700 nfp: add control vNIC datapath Since control vNICs don't have a netdev, they can't use napi and queuing stack provides. Add simple tasklet-based data receive and send of control messages with queuing on a skb_list. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app.h | 11 + drivers/net/ethernet/netronome/nfp/nfp_net.h | 17 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 323 ++++++++++++++++++++- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 3 + 4 files changed, 345 insertions(+), 9 deletions(-) commit 5c0dbe9ecf02349490794a4205d61c6603390082 Author: Jakub Kicinski Date: Mon Jun 5 17:01:49 2017 -0700 nfp: prepare config and enable for working without netdevs Out of the three stages of ifup/ifdown (allocate, configure, start) - this commit prepares the configuration stage for working with control vNICs. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a7b1ad0875479e7390eb46e1190e50ffc39707b9 Author: Jakub Kicinski Date: Mon Jun 5 17:01:48 2017 -0700 nfp: allow allocation and initialization of netdev-less vNICs vNICs used for sending and receiving control messages shouldn't really have a netdev. Add the ability to initialize vNICs for netdev-less operation. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 170 ++++++++++++--------- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 7 +- .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 2 +- 4 files changed, 105 insertions(+), 76 deletions(-) commit 042f4ba62ff5fbe1428639187578bae39f513e23 Author: Jakub Kicinski Date: Mon Jun 5 17:01:47 2017 -0700 nfp: make sure debug accesses don't depend on netdevs We want to be able to inspect the state of descriptor rings of the control vNIC, so it will use the same interface as data vNICs. Make sure the code doesn't use netdevs to determine state of the rings and names things appropriately. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 11 +++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c | 9 ++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) commit c821e617896e99b82fa82777b1ac1263c51eea64 Author: Jakub Kicinski Date: Mon Jun 5 17:01:46 2017 -0700 nfp: prepare print macros for use without netdev To be able to reuse print macros easily with control vNICs make the macros check if netdev pointer is populated and use dev_* print functions otherwise. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 33 +++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) commit cd083ce158cf43f8c26ad9a552ba25b222536e1e Author: Jakub Kicinski Date: Mon Jun 5 17:01:45 2017 -0700 nfp: move nfp_net_vecs_init() Move nfp_net_vecs_init() after all datapath functions. We will need to init poll() callbacks from this function soon. No functional changes. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 4621199dbfb188e4871520569233f7c7528ab439 Author: Jakub Kicinski Date: Mon Jun 5 17:01:44 2017 -0700 nfp: reuse ring free code on close On the close path reuse the ring free helpers introduced for runtime reconfiguration. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit ee26756d01cbff9e8b9ef9635f58b05b27492a49 Author: Jakub Kicinski Date: Mon Jun 5 17:01:43 2017 -0700 nfp: split out the allocation part of open Our open/close implementations have 3 stages: - allocation/freeing of ring resources, irqs etc., - device config, - device/stack enable (can't fail). Right now all of those stages are placed in separate functions, apart from allocation during open. Fix that. It will make it easier for us to allocate resources for netdev-less vNICs. Because we want to reuse allocation code in netdev-less vNICs leave the netif_set_real_num_[rt]x_queues() calls inside open. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 57 +++++++++++++--------- 1 file changed, 35 insertions(+), 22 deletions(-) commit d00ca2f3783b97c936f2a3df9dd0fabf4c0a8290 Author: Jakub Kicinski Date: Mon Jun 5 17:01:42 2017 -0700 nfp: reorder open and close functions We will soon reuse parts of .ndo_stop() for clean up after errors in .ndo_open(). Reorder the associated functions to make that possible. No functional changes. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 140 ++++++++++----------- 1 file changed, 70 insertions(+), 70 deletions(-) commit 97adc2b39e91b9037ef0a14d1e996acd09471c4b Author: Jasmin Jessich Date: Sun May 7 18:23:34 2017 -0300 [media] dvb_ca_en50221: Fix wrong EXPORT_SYMBOL order Some EXPORT_SYMBOL() on this file don't match the name of functions that preceeds them. Also, some kernel-doc markups also have a wrong name. Fix it. Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ca_en50221.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit e754eba685aac2a9b5538176fa2d254ad25f464d Author: David Howells Date: Wed Jun 7 12:40:03 2017 +0100 rxrpc: Provide a cmsg to specify the amount of Tx data for a call Provide a control message that can be specified on the first sendmsg() of a client call or the first sendmsg() of a service response to indicate the total length of the data to be transmitted for that call. Currently, because the length of the payload of an encrypted DATA packet is encrypted in front of the data, the packet cannot be encrypted until we know how much data it will hold. By specifying the length at the beginning of the transmit phase, each DATA packet length can be set before we start loading data from userspace (where several sendmsg() calls may contribute to a particular packet). An error will be returned if too little or too much data is presented in the Tx phase. Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 34 ++++++++++++++++++++++++ fs/afs/rxrpc.c | 18 ++++++++++++- include/linux/rxrpc.h | 1 + include/net/af_rxrpc.h | 2 ++ net/rxrpc/af_rxrpc.c | 5 +++- net/rxrpc/ar-internal.h | 3 ++- net/rxrpc/call_object.c | 3 +++ net/rxrpc/sendmsg.c | 54 ++++++++++++++++++++++++++++++++++++-- 8 files changed, 115 insertions(+), 5 deletions(-) commit 3ab26a6fd01ba211ba5dea0d86d53897b9e8430c Author: David Howells Date: Wed Jun 7 14:41:52 2017 +0100 rxrpc: Consolidate sendmsg parameters Consolidate the sendmsg control message parameters into a struct rather than passing them individually through the argument list of rxrpc_sendmsg_cmsg(). This makes it easier to add more parameters. Signed-off-by: David Howells net/rxrpc/sendmsg.c | 83 ++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 42 deletions(-) commit 515559ca21713218595f3a4dad44a4e7eea2fcfb Author: David Howells Date: Wed Jun 7 16:27:15 2017 +0100 rxrpc: Provide a getsockopt call to query what cmsgs types are supported Provide a getsockopt() call that can query what cmsg types are supported by AF_RXRPC. Documentation/networking/rxrpc.txt | 9 +++++++++ include/linux/rxrpc.h | 24 ++++++++++++++---------- net/rxrpc/af_rxrpc.c | 30 +++++++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 11 deletions(-) commit 8ec6107aecca8d9051f3705784e6b92481aba3cd Author: Jasmin Jessich Date: Sun May 7 18:23:28 2017 -0300 [media] dvb_ca_en50221: use foo *bar, instead of foo * bar Make checkpatch happier by fixing this warning: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ca_en50221.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit c3ca46ef719580eb01994fc6032db470fde92d85 Author: Masami Hiramatsu Date: Tue May 23 15:05:50 2017 +0900 ftrace/kprobes: selftests: Check kretprobe maxactive is supported Check the kretprobe maxactive is supported by kprobe_events interface. To ensure the kernel feature, this changes ftrace README to describe it. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan kernel/trace/trace.c | 3 ++- tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_maxactive.tc | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 1d0864db8f3af3978d7b5207f9165fbe2a37148c Author: Masami Hiramatsu Date: Tue May 23 15:04:46 2017 +0900 selftests/ftrace: Reduce trace buffer checking overhead Current event/toplevel-enable.tc checking the trace buffer by dumping all events while recording events. However, this makes system very busy. To reduce this overhead comes from reading trace buffer and recording trace buffer, use head instead of cat and stop tracing while reading. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 27af344ba09c552d6ee9f1ef05bc00dc676fb0e8 Author: Masami Hiramatsu Date: Tue May 23 15:03:43 2017 +0900 selftests/ftrace: Skip full-glob-matching filter test on older kernel Skip a part of ftrace filter test related to full-glob matching if we are sure that the testing kernel is so old that it does not support full-glob-matching yet. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan .../ftrace/test.d/ftrace/func-filter-glob.tc | 28 +++++++++++++--------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 08f9f03a5340d2a996049b7c54b2e1769b2755bb Author: Mickaël Salaün Date: Fri May 26 20:43:58 2017 +0200 selftests/seccomp: Force rebuild according to dependencies Rebuild the seccomp tests when kselftest_harness.h is updated. Signed-off-by: Mickaël Salaün Acked-by: Kees Cook Cc: Andy Lutomirski Cc: Shuah Khan Cc: Will Drewry Signed-off-by: Shuah Khan tools/testing/selftests/seccomp/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 7e6a32abdded8ed3d50ca7d26d17b19ffa0ea34d Author: Mickaël Salaün Date: Mon Jun 5 20:37:17 2017 +0200 Documentation/dev-tools: Add kselftest_harness documentation Add ReST metadata to kselftest_harness.h to be able to include the comments in the Sphinx documentation. Signed-off-by: Mickaël Salaün Cc: Andy Lutomirski Cc: Jonathan Corbet Cc: Kees Cook Cc: Shuah Khan Cc: Will Drewry Signed-off-by: Shuah Khan Documentation/dev-tools/kselftest.rst | 33 +++ tools/testing/selftests/kselftest_harness.h | 415 ++++++++++++++++++++++------ 2 files changed, 363 insertions(+), 85 deletions(-) commit 1256a525573120a79d5893b7342285f088b47dcc Author: Mickaël Salaün Date: Fri May 26 20:44:01 2017 +0200 selftests: Remove the TEST_API() wrapper from kselftest_harness.h Remove the TEST_API() wrapper to expose the underlying macro arguments to the documentation tools. Signed-off-by: Mickaël Salaün Acked-by: Kees Cook Cc: Andy Lutomirski Cc: Jonathan Corbet Cc: Kees Cook Cc: Shuah Khan Cc: Will Drewry Signed-off-by: Shuah Khan tools/testing/selftests/kselftest_harness.h | 355 ++++++++++++---------------- 1 file changed, 150 insertions(+), 205 deletions(-) commit cef04cdcb4275592ed6b6822e1939de44acce15b Author: Mickaël Salaün Date: Fri May 26 20:44:00 2017 +0200 Documentation/dev-tools: Use reStructuredText markups for kselftest Include and convert kselftest to the Sphinx format. Signed-off-by: Mickaël Salaün Acked-by: Kees Cook Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Shuah Khan Documentation/dev-tools/index.rst | 1 + Documentation/dev-tools/kselftest.rst | 67 +++++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 27 deletions(-) commit 55c70f11e729f17c86f2400a457138682e03b00f Author: Mickaël Salaün Date: Fri May 26 20:43:59 2017 +0200 Documentation/dev-tools: Add kselftest Move kselftest.txt to dev-tools/kselftest.rst . Signed-off-by: Mickaël Salaün Acked-by: Kees Cook Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Shuah Khan Documentation/00-INDEX | 2 - Documentation/dev-tools/kselftest.rst | 109 ++++++++++++++++++++++++++++++++++ Documentation/kselftest.txt | 109 ---------------------------------- 3 files changed, 109 insertions(+), 111 deletions(-) commit dfa47d31fa0a5120c53c48da1b2a15dab3b8ea8c Author: Mickaël Salaün Date: Fri May 26 20:43:57 2017 +0200 selftests: Cosmetic renames in kselftest_harness.h Keep the content consistent with the new name. Signed-off-by: Mickaël Salaün Acked-by: Kees Cook Cc: Andy Lutomirski Cc: Shuah Khan Cc: Will Drewry Signed-off-by: Shuah Khan tools/testing/selftests/kselftest_harness.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0b40808a10842131742b1646a465b877a277168a Author: Mickaël Salaün Date: Fri May 26 20:43:56 2017 +0200 selftests: Make test_harness.h more generally available The seccomp/test_harness.h file contains useful helpers to build tests. Moving it to the selftest directory should benefit to other test components. Keep seccomp maintainers for this file. Signed-off-by: Mickaël Salaün Acked-by: Kees Cook Acked-by: Will Drewry Cc: Andy Lutomirski Cc: Shuah Khan Link: https://lkml.kernel.org/r/CAGXu5j+8CVz8vL51DRYXqOY=xc3zuKFf=PTENe88XYHzFYidUQ@mail.gmail.com Signed-off-by: Shuah Khan MAINTAINERS | 1 + tools/testing/selftests/kselftest_harness.h | 535 +++++++++++++++++++++++++ tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +- tools/testing/selftests/seccomp/test_harness.h | 535 ------------------------- 4 files changed, 537 insertions(+), 536 deletions(-) commit 4996976fcde4bb738ce68ca01a8b358d71aab7bb Author: Michael Ellerman Date: Wed May 31 20:40:15 2017 +1000 selftests: sync: Skip the test if kernel support is not found The "Sync framework" test doesn't work if the kernel has no support, obviously. Rather than reporting a failure, check for the kernel support by looking for /sys/kernel/debug/sync/sw_sync, and if not found skip the test. Signed-off-by: Michael Ellerman Reviewed-by: Gustavo Padovan Signed-off-by: Shuah Khan tools/testing/selftests/sync/sync_test.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit eff33cfa0631a8f887df5f941e6ad1ae9a43a013 Author: Michal Suchanek Date: Thu May 18 14:52:58 2017 +0200 selftests/vm: Fix test for virtual address range mapping for arm64 Arm64 has 256TB address space so fix the test to pass on Arm as well. Also remove unneeded numaif header. Signed-off-by: Michal Suchanek Signed-off-by: Shuah Khan tools/testing/selftests/vm/virtual_address_range.c | 35 ++++++++++++++++------ 1 file changed, 26 insertions(+), 9 deletions(-) commit 1f666e522cc49df2659f40be118624bf7a529a0f Author: Naresh Kamboju Date: Mon May 22 12:47:43 2017 +0530 selftests: futex: print testcase-name and PASS/FAIL/ERROR status Most of the tests under selftests follow a pattern for their results, which can then be parsed easily by other external tools easily. Though futex tests do print the test results very well, it doesn't really follow the general selftests pattern. This patch makes necessary changes to fix that. Output before this patch: futex_requeue_pi: Test requeue functionality Arguments: broadcast=0 locked=0 owner=0 timeout=0ns Result: PASS Output after this patch: futex_requeue_pi: Test requeue functionality Arguments: broadcast=0 locked=0 owner=0 timeout=0ns selftests: futex-requeue-pi [PASS] Signed-off-by: Naresh Kamboju Signed-off-by: Shuah Khan tools/testing/selftests/futex/functional/futex_requeue_pi.c | 3 ++- .../selftests/futex/functional/futex_requeue_pi_mismatched_ops.c | 4 +++- .../selftests/futex/functional/futex_requeue_pi_signal_restart.c | 3 ++- .../selftests/futex/functional/futex_wait_private_mapped_file.c | 5 +++-- tools/testing/selftests/futex/functional/futex_wait_timeout.c | 4 +++- .../selftests/futex/functional/futex_wait_uninitialized_heap.c | 3 ++- tools/testing/selftests/futex/functional/futex_wait_wouldblock.c | 3 ++- tools/testing/selftests/futex/include/logging.h | 4 ++-- 8 files changed, 19 insertions(+), 10 deletions(-) commit ff9b47a02a4239d7f3b6b34d8108e69cc9d94b17 Author: Boris Brezillon Date: Tue Jun 6 13:34:26 2017 +0200 drm/atmel-hlcdc: Fix panel registration Attach the panel-bridge created by drm_panel_bridge_add() to the parallel RGB encoder. Fixes: 96160a8071b2 ("drm/atmel-hlcdc: Replace the panel usage with drm_panel_bridge.") Reviewed-by: Eric Anholt Signed-off-by: Boris Brezillon Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1496748866-17165-1-git-send-email-boris.brezillon@free-electrons.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 2 -- 1 file changed, 2 deletions(-) commit af822177d614f985cb89dcf6e505e2d76a3f3683 Author: Hans de Goede Date: Fri Jun 2 17:04:23 2017 -0300 [media] staging: atomisp: Fix endless recursion in hmm_init hmm_init calls hmm_alloc to set dummy_ptr, hmm_alloc calls hmm_init when dummy_ptr is not yet set, which is the case in the call from hmm_init, so it calls hmm_init again, this continues until we have a stack overflow due to the recursion. This commit fixes this by adding a separate flag for tracking if hmm_init has been called. Not pretty, but it gets the job done, eventually we should be able to remove the hmm_init call from hmm_alloc. Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f1e627a41db14a4bb7bb5ee39486528121ed11c2 Author: Chen Guanqiao Date: Sun May 28 15:06:41 2017 -0300 [media] staging: atomisp: lm3554: fix sparse warnings(was not declared. Should it be static?) Fix "symbol 'xxxxxxx' was not declared. Should it be static?" sparse warnings. Signed-off-by: Chen Guanqiao Reviewed-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/lm3554.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 123387d5efa6a8aff141c9dbf29f68dc1126aa99 Author: Maarten Lankhorst Date: Tue Jun 6 16:31:50 2017 +0200 drm/bridge: Build the panel wrapper in drm_kms_helper This fixes the following depmod error when building drm as a module: depmod: ERROR: Found 6 modules in dependency cycles! depmod: ERROR: Cycle detected: drm -> drm_kms_helper -> drm Fixes: 13dfc0540a57 ("drm/bridge: Refactor out the panel wrapper from the lvds-encoder bridge.") Tested-by: Lofstedt, Marta Reviewed-by: Eric Anholt Signed-off-by: Maarten Lankhorst Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/3fd262cf-1db6-4335-320c-af92f9014502@linux.intel.com drivers/gpu/drm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef14aa3bc1564f714b4e30bea78762b29516cc48 Author: Hans de Goede Date: Sun May 28 09:31:53 2017 -0300 [media] staging: atomisp: Make ov2680 driver less chatty There is no reason for all this printk spamming and certainly not at an error log level. Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ov2680.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit da3e18059be96c67365e63e4d1e3f301d802c3c8 Author: Hans de Goede Date: Sun May 28 09:31:52 2017 -0300 [media] staging: atomisp: Ignore errors from second gpio in ov2680 driver As the existing comment in the driver indicates the sensor has only 1 pin, but some boards may have 2 gpios defined and we toggle both as we we don't know which one is the right one. However if the ACPI resources table defines only 1 gpio (as expected) the gpio1_ctrl call will always fail, causing the probing of the driver to file. This commit ignore the return value of the gpio1_ctrl call, fixing this. Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ov2680.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d6998234935e72521e26a8b7b8a85956cbfa3c7c Author: Cosar Dindar Date: Mon May 22 16:35:00 2017 +0200 ARM: dts: stm32: enable CRC32 on stm32429i-eval board Enable the CRC32 crypto on stm32429i-eval board. Signed-off-by: Cosar Dindar Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 22b2807dae2c79eb9f75a5c0e4cdfd418fd14fcf Author: Hans de Goede Date: Sun May 28 09:31:51 2017 -0300 [media] staging: atomisp: Add OVTI2680 ACPI id to ov2680 driver Add OVTI2680 ACPI id to ov2680 driver Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ov2680.c | 1 + 1 file changed, 1 insertion(+) commit 6706e9008dc6df4093deff12f93a1072708e0aef Author: Hans de Goede Date: Sun May 28 09:31:50 2017 -0300 [media] staging: atomisp: Add INT0310 ACPI id to gc0310 driver Add INT0310 ACPI id to gc0310 driver Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/gc0310.c | 1 + 1 file changed, 1 insertion(+) commit 42c6d864acaede779a4e44f8ce8d23c1012a1e64 Author: Hans de Goede Date: Sun May 28 09:31:49 2017 -0300 [media] staging: atomisp: Set step to 0 for mt9m114 menu control menu controls are not allowed to have a step size, set step to 0 to fix an oops from the WARN_ON in v4l2_ctrl_new_custom() triggering because of this. Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/mt9m114.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 797f91e6417abcc9a07f9c99dd9128ae7622ee81 Author: Hans de Goede Date: Sun May 28 09:31:48 2017 -0300 [media] staging: atomisp: Do not call dev_warn with a NULL device Do not call dev_warn with a NULL device, this silence the following 2 warnings: [ 14.392194] (NULL device *): Failed to find gmin variable gmin_V2P8GPIO [ 14.392257] (NULL device *): Failed to find gmin variable gmin_V1P8GPIO We could switch to using pr_warn for dev == NULL instead, but as comments in the source indicate, the check for these 2 special gmin variables with a NULL device is a workaround for 2 specific evaluation boards, so completely silencing the missing warning for these actually is a good thing. Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 008d8e10054b3548cf9781083c26809486d7c07c Author: Hans de Goede Date: Sun May 28 09:31:47 2017 -0300 [media] staging: atomisp: Fix calling efivar_entry_get() with unaligned arguments efivar_entry_get has certain alignment requirements and the atomisp platform code was not honoring these, causing an oops by triggering the WARN_ON in arch/x86/platform/efi/efi_64.c: virt_to_phys_or_null_size(). This commit fixes this by using the members of the efivar struct embedded in the efivar_entry struct we kzalloc as arguments to efivar_entry_get(), which is how all the other callers of efivar_entry_get() do this. Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../atomisp/platform/intel-mid/atomisp_gmin_platform.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 58518a0547a04f804531aeb59a5d92fbd1875ca7 Author: Cosar Dindar Date: Mon May 22 16:34:00 2017 +0200 ARM: dts: stm32: enable CRC32 on stm32429-disco board Enable the CRC32 crypto on stm32429-disco board. Signed-off-by: Cosar Dindar Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429-disco.dts | 4 ++++ 1 file changed, 4 insertions(+) commit fc993494134bfa76084529dda99ea8fcf23bec73 Author: Alan Cox Date: Fri May 26 12:29:48 2017 -0300 [media] atomisp: de-duplicate sh_css_mmu_set_page_table_base_index Between the ISP2400 and ISP2401 code base this function moved file. The merge of the drivers left us with two version in ifdefs. Resolve this down to a single copy. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../pci/atomisp2/css2400/ia_css_mmu_private.h | 2 -- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 24 +--------------------- .../atomisp/pci/atomisp2/css2400/sh_css_mmu.c | 6 ------ 3 files changed, 1 insertion(+), 31 deletions(-) commit a68883f1e2fc03758feccf0b38ccb2dc06b4eec4 Author: Cosar Dindar Date: Mon May 22 16:34:00 2017 +0200 ARM: dts: stm32: Add CRC support to stm32f429 Add CRC32 Crypto support to stm32f429. Signed-off-by: Cosar Dindar Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 4950cfecd109735390c058e18adc5bd5bc38847e Author: Alan Cox Date: Fri May 26 12:29:36 2017 -0300 [media] atomisp: remove sh_css_irq - it contains nothing We won't be adding abstractions or moving them here so kill it. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/Makefile | 1 - .../media/atomisp/pci/atomisp2/css2400/sh_css_irq.c | 16 ---------------- 2 files changed, 17 deletions(-) commit 29a323ea90c900aaa9794e567b8d616580ac82ec Author: Alan Cox Date: Fri May 26 12:29:25 2017 -0300 [media] atomisp: Unify lut free logic ISP2401 introduced a helper for this which we can use just as well on the ISP2400 and remove some more noise differences. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 7 ------- .../media/atomisp/pci/atomisp2/css2400/sh_css_params.c | 14 -------------- 2 files changed, 21 deletions(-) commit b1c056e05b25ba7bf58c9c4f82a767dcfa052f43 Author: Alan Cox Date: Fri May 26 12:29:15 2017 -0300 [media] atomisp: Unify load_preview_binaries for the most part ISP2401 introduced a rather sensible change to cut through the structure spaghetti. Adopt that for the ISP2400 as well. It makes no difference to the actual code other than readability. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 40 +--------------------- 1 file changed, 1 insertion(+), 39 deletions(-) commit 0ef9e6e5559306079200742ee40f5754672dd498 Author: Alan Cox Date: Fri May 26 12:28:55 2017 -0300 [media] atomisp: unify sh_css_hmm_buffer_record_acquire The ISP2401 version of this function returns a pointer to the buffer, whilst the ISP2400 version returns a boolean if a slot is found. We can trivially unify the code to use the ISP2401 version. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 40 ++-------------------- 1 file changed, 3 insertions(+), 37 deletions(-) commit 4a2fcc0c91b3d8b12322f7568eb62ce9f97e7bcf Author: Alan Cox Date: Fri May 26 12:28:41 2017 -0300 [media] atomisp: eliminate dead code under HAS_RES_MGR This define is never set and these code paths are never used so they can go away. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../css2400/isp/modes/interface/isp_const.h | 16 ---------- .../css2400/isp/modes/interface/isp_exprs.h | 23 --------------- .../atomisp2/css2400/runtime/binary/src/binary.c | 34 ---------------------- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 30 ------------------- 4 files changed, 103 deletions(-) commit 9dff81436d4d8aa252233bd146d882aaa04094e3 Author: Dan Carpenter Date: Fri May 26 12:28:05 2017 -0300 [media] atomisp2: off by one in atomisp_s_input() The isp->inputs[] array has isp->input_cnt elements which have been initialized so this > should be >=. This bug is harmless. The check against ATOM_ISP_MAX_INPUTS prevents us from reading beyond the end of the array. The uninitialized elements are zeroed out so we will end up returning -EINVAL a few lines later because the .camera pointer is NULL. Signed-off-by: Dan Carpenter Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94e23b61486c979e92357f9c3a97a277209720ea Author: Alan Cox Date: Fri May 26 12:27:54 2017 -0300 [media] atomisp2: tidy up confused ifdefs The two drivers were machine merged and in this case the machine output was to say the least not optimal. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 26 +++++----------------- 1 file changed, 5 insertions(+), 21 deletions(-) commit 13dd385740627d5119c7918d46cecbe72e3b21c5 Author: Hugues Fruchet Date: Fri May 5 17:31:00 2017 +0200 ARM: dts: stm32: Enable OV2640 camera support of STM32F429-EVAL board Enable OV2640 camera support of STM32F429-EVAL board. Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit f16595ae2048e201365425a337ed5281ce60caf2 Author: Alan Cox Date: Fri May 26 12:27:40 2017 -0300 [media] atomisp2: remove HRT_UNSCHED HRT_UNSCHED is never defined or set in the driver, so this is dead code that can be retired, simplifying the code a bit further. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c | 7 ------- .../atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c | 8 +------- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 10 ++-------- .../media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 5 ----- 4 files changed, 3 insertions(+), 27 deletions(-) commit c04b2e72af8d379b4d85f28e922bb1515d565891 Author: Hugues Fruchet Date: Wed Jun 7 17:39:11 2017 +0200 ARM: dts: stm32: Enable STMPE1600 gpio expander of STM32F429-EVAL board Enable STMPE1600 gpio expander of STM32F429-EVAL board. Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 2310ae5c12ce5768cc8c14601fec8b256dd01e4e Author: Alan Cox Date: Fri May 26 12:27:29 2017 -0300 [media] atomisp: remove NUM_OF_BLS With the removal of the HAS_BL bootloader code the value of NUM_OF_BLS is an invariant zero. So let's get rid of it. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5c9f9d602e54433483355b474353ba2e2de8caa3 Author: Alan Cox Date: Fri May 26 12:27:18 2017 -0300 [media] atompisp: HAS_BL is never defined so lose it Kill off the HAS_BL define and the code and includes it brackets. We never define HAS_BL or use that functionality. Signed-off-by: Alan Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 101 --------------------- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 19 +--- .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 7 -- 3 files changed, 1 insertion(+), 126 deletions(-) commit 4518c3fe7ca7288e6ca8d0cbb977e4c725d0398a Author: Juan Antonio Pedreira Martos Date: Tue May 23 21:27:11 2017 -0300 [media] staging: media: atomisp: fix non static symbol warnings Fix a couple of sparse warnings: drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:59:14: warning: symbol 'repool_pgnr' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:387:6: warning: symbol 'punit_ddr_dvfs_enable' was not declared. Should it be static? Mark these symbols as static, so they are no longer incorrectly exported. Signed-off-by: Juan Antonio Pedreira Martos Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e1b28f132675963e06b54ba8e1acf13399325a8d Author: Paolo Cretaro Date: Mon May 22 18:04:46 2017 -0300 [media] atomisp: use NULL instead of 0 for pointers Fix warning issued by sparse: Using plain integer as NULL pointer Signed-off-by: Paolo Cretaro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c | 2 +- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 2 +- drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) commit 74058c596b5007e2186258fccf20e1103cd88f39 Author: Christoph Fanelsa Date: Tue May 16 17:07:40 2017 -0300 [media] staging: media: cxd2099: Fix checkpatch issues Fix checkpatch warnings of prefered using '%s..", __func__' as function name in a string Signed-off-by: Christoph Fanelsa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/cxd2099/cxd2099.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a9fad21ab7f0b83f27f53544111cd43a2fbca034 Author: Hirokazu Honda Date: Tue May 30 06:53:58 2017 -0300 [media] mtk-vcodec: Show mtk driver error without DEBUG definition A driver error message is shown without DEBUG definition to find an error and debug easily. Signed-off-by: Hirokazu Honda Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit ba1f1f70c2c08fa71fc6b60f3071e33e8b549660 Author: Daniel Kurtz Date: Tue May 23 00:24:11 2017 -0300 [media] media: mtk-mdp: Fix mdp device tree If the mdp_* nodes are under an mdp sub-node, their corresponding platform device does not automatically get its iommu assigned properly. Fix this by moving the mdp component nodes up a level such that they are siblings of mdp and all other SoC subsystems. This also simplifies the device tree. Although it fixes iommu assignment issue, it also break compatibility with old device tree. So, the patch in driver is needed to iterate over sibling mdp device nodes, not child ones, to keep driver work properly. Signed-off-by: Daniel Kurtz Signed-off-by: Minghsiu Tsai Signed-off-by: Matthias Brugger Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit e8e16b7b29e916704c37e4fbbb9b6436b0cca51a Author: Hugues Fruchet Date: Fri May 5 17:31:00 2017 +0200 ARM: dts: stm32: Enable DCMI camera interface on STM32F429-EVAL board Enable DCMI camera interface on STM32F429-EVAL board. Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit c5789f419d28dc4ba629557487b348563a9ea518 Author: Minghsiu Tsai Date: Tue May 23 00:24:09 2017 -0300 [media] dt-bindings: mt8173: Fix mdp device tree If the mdp_* nodes are under an mdp sub-node, their corresponding platform device does not automatically get its iommu assigned properly. Fix this by moving the mdp component nodes up a level such that they are siblings of mdp and all other SoC subsystems. This also simplifies the device tree. Although it fixes iommu assignment issue, it also break compatibility with old device tree. So, the patch in driver is needed to iterate over sibling mdp device nodes, not child ones, to keep driver work properly. Signed-off-by: Minghsiu Tsai Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/mediatek-mdp.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit ba7f0df0895a62fc021dcbc9a59ec75b84c039b8 Author: Hugues Fruchet Date: Fri May 5 17:31:00 2017 +0200 ARM: dts: stm32: Enable DCMI support on STM32F429 MCU Enable DCMI camera interface on STM32F429 MCU. Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit f903ebf751ddd58ee1a9c765888c0cad63176f4f Author: Philipp Zabel Date: Tue Jun 6 12:59:02 2017 -0300 [media] coda: copy headers in front of every I-frame That way we don't have to rely on userspace to inject the headers on IDR requests, and there is always enough information to start decoding at an I-frame. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7e68c53387f1180745d6ef25d6425aef767b519e Author: Philipp Zabel Date: Tue Jun 6 12:59:01 2017 -0300 [media] coda: implement forced key frames Implement the V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME control to force IDR frames. This is useful to implement VFU (Video Fast Update) on RTP transmissions. We already force an IDR frame at the beginning of each GOP to work around a firmware bug on i.MX27, use the same mechanism to service IDR requests from userspace. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 12 ++++++++---- drivers/media/platform/coda/coda-common.c | 3 +++ drivers/media/platform/coda/coda.h | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) commit a3dbff6eecad72333bae656681331aab27adee4d Author: Jia-Ju Bai Date: Thu Jun 1 04:17:51 2017 -0300 [media] cx18: Fix a sleep-in-atomic bug in snd_cx18_pcm_hw_free The driver may sleep under a spin lock, and the function call path is: snd_cx18_pcm_hw_free (acquire the lock by spin_lock_irqsave) vfree --> may sleep To fix it, the "substream->runtime->dma_area" is passed to a temporary value, and mark it NULL when holding the lock. The memory is freed by vfree through the temporary value outside the lock holding. Signed-off-by: Jia-Ju Bai [hans.verkuil@cisco.com: removed unnecessary 'if (dma_area)'] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx18/cx18-alsa-pcm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d989dc20c508cd82e2a95ff5d6c4bb091803f1c8 Author: Jia-Ju Bai Date: Thu Jun 1 04:13:54 2017 -0300 [media] ivtv: Fix a sleep-in-atomic bug in snd_ivtv_pcm_hw_free The driver may sleep under a spin lock, and the function call path is: snd_ivtv_pcm_hw_free (acquire the lock by spin_lock_irqsave) vfree --> may sleep To fix it, the "substream->runtime->dma_area" is passed to a temporary value, and mark it NULL when holding the lock. The memory is freed by vfree through the temporary value outside the lock holding. Signed-off-by: Jia-Ju Bai [hans.verkuil@cisco.com: removed unnecessary 'if (dma_area)'] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/ivtv-alsa-pcm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dde32d413447d7f12031d24c7898dd126e5eabe3 Author: Kevin Hilman Date: Tue Jun 6 20:37:40 2017 -0300 [media] davinci: vpif_capture: cleanup raw camera support The current driver has a handful of hard-coded assumptions based on its primary use for capture of video signals. Cleanup those assumptions, and also query the subdev for format information and use that if available. Tested with 10-bit raw bayer input (SGRBG10) using the aptina,mt9v032 sensor, and also tested that composite video input still works from ti,tvp514x decoder. Both tests done on the da850-evm board with the add-on UI board. NOTE: Will need further testing for other sensors with different bus formats. Signed-off-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif_capture.c | 82 ++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) commit 4a5f8ae50b66a40cd9cec8f72f5f64611504ddc1 Author: Kevin Hilman Date: Tue Jun 6 20:37:39 2017 -0300 [media] davinci: vpif_capture: get subdevs from DT when available Enable getting of subdevs from DT ports and endpoints. The _get_pdata() function was larely inspired by (i.e. stolen from) am437x-vpfe.c Signed-off-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif_capture.c | 126 +++++++++++++++++++++++++- drivers/media/platform/davinci/vpif_display.c | 5 + include/media/davinci/vpif_types.h | 9 +- 3 files changed, 134 insertions(+), 6 deletions(-) commit 6e3520f2e20262fbf913ffff14f1d345c7b82c25 Author: Kevin Hilman Date: Tue Jun 6 20:37:38 2017 -0300 [media] davinci: vpif_capture: drop compliance hack Capture driver silently overrides pixel format with a hack (according to the comments) to pass v4l2 compliance tests. This isn't needed for normal functionality, and works for composite video and raw camera capture without. In addition, the hack assumes that it only supports raw capture with a single format (SBGGR8) which isn't true. VPIF can also capture 10- and 12-bit raw formats as well. Forthcoming patches will enable VPIF input with raw-camera support and has been tested with 10-bit format from the aptina,mt9v032 sensor. Any compliance failures should be fixed with a real fix. Signed-off-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif_capture.c | 15 --------------- 1 file changed, 15 deletions(-) commit 94829de433db0253a5c238ef74a70b7043b93e57 Author: Rodrigo Vivi Date: Tue Jun 6 09:06:06 2017 -0700 drm/i915: Unify GT* and GT3 definitions This patch clean up a bit the platform definition block in a way to avoid duplications and to let clear that GT3 for the current platform only have the extra Media engine (BSD2). v2: Kabylake IS_KABYLAKE as Anusha noticed. v3: Avoid EXTRA_ENGINE_MASK and list rings out on GT3 to make it more clear. Cc: Chris Wilson Cc: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Reviewed-by: Anusha Srivatsa Link: http://patchwork.freedesktop.org/patch/msgid/1496765166-7068-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_pci.c | 57 +++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 30 deletions(-) commit aa8f42f7a10f749f8226ce75e770b36caca53cc4 Author: Lionel Debieve Date: Wed Jun 7 16:50:21 2017 +0200 ARM: dts: stm32: Add missing reset-cells node in stm32f746 rcc node must include reset-cells node. Signed-off-by: Lionel Debieve Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f746.dtsi | 1 + 1 file changed, 1 insertion(+) commit a1986f4174a4c19b5634f9873943126bbe85a285 Author: Rodrigo Vivi Date: Mon Jun 5 15:12:02 2017 -0700 drm/i915: Remove unnecessary PORT3 definition. Let's be picky and just use PICK directly. So we can extend this later without creating a new PORT_X por every new number of ports we have to handle. Cc: Manasi Navare Signed-off-by: Rodrigo Vivi Reviewed-by: Manasi Navare Link: http://patchwork.freedesktop.org/patch/msgid/1496700722-13755-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5489d5dbb497ca3c6301f33792bcca1c064de98e Author: Alexandre TORGUE Date: Wed Jun 7 16:41:36 2017 +0200 ARM: dts: stm32: Set gpio controller as interrupt controller on F4 and F7 This patch set each gpio controller as a interrupt controller. User who wants to use gpio as interrupt will have choice to use either "gpiolib" interface or "common" interrupt interface. Acked-by: Linus Walleij Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 22 ++++++++++++++++++++++ arch/arm/boot/dts/stm32f746.dtsi | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit d281e13b0bfe745a21061a194e386a949784393f Author: Jim Mattson Date: Thu Jun 1 12:44:46 2017 -0700 KVM: nVMX: Update vmcs12->guest_linear_address on nested VM-exit The guest-linear address field is set for VM exits due to attempts to execute LMSW with a memory operand and VM exits due to attempts to execute INS or OUTS for which the relevant segment is usable, regardless of whether or not EPT is in use. Fixes: 119a9c01a5922 ("KVM: nVMX: pass valid guest linear-address to the L1") Signed-off-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d923fcf6361da3b8b25b13ce6c1e427e759f125a Author: Jim Mattson Date: Thu Jun 1 12:43:37 2017 -0700 KVM: nVMX: Don't update vmcs12->xss_exit_bitmap on nested VM-exit The XSS-exiting bitmap is a VMCS control field that does not change while the CPU is in non-root mode. Transferring the unchanged value from vmcs02 to vmcs12 is unnecessary. Signed-off-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 -- 1 file changed, 2 deletions(-) commit bf9a496a1fa434670285bd592c75d009cbb99720 Author: Rodrigo Vivi Date: Tue Jun 6 13:30:40 2017 -0700 drm/i915/cnl: Also need power well sanitize. The workaround added in commit c6782b76d31a ("drm/i915/gen9: Reset secondary power well equests left on by DMC/KVMR") needs to be applied on Cannonlake as well. So let's assume any platform using this power well setup will also need and let's just go ahead and remove if condition. Cc: Imre Deak Signed-off-by: Rodrigo Vivi Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-11-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8bcd3dd417660dce8cf38a731a888f09e8028190 Author: Ville Syrjälä Date: Tue Jun 6 13:30:39 2017 -0700 drm/i915/cnl: Add power wells for CNL CNL power wells are very similar to SKL, with the exception that the misc IO well has been split into separate AUX IO wells. Not sure if DMC is supposed to manage the AUX wells for us or not. Let's assume so for now. v2: DDI A power well wants DDI A domains, not DDI B domains v3: s/BIT/BIT_ULL and add proper Aux IO domains. (Rodrigo) v4: Remove PW_DDI_E. Not supported on Current CNL SKUs. (Rodrigo). v5: Removed DDI_E_IO_DOMAINS and moved PORT_DDI_E_IO to DDI_A_IO for the same reasons as v4 when we found out that current CNL SKUs don't have the full port E split. Signed-off-by: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-10-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 5 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 136 +++++++++++++++++++++++++++++++- 2 files changed, 137 insertions(+), 4 deletions(-) commit 7bd0a2c6e1ece06624c1547307f21b0550382ce2 Author: Michel Thierry Date: Tue Jun 6 13:30:38 2017 -0700 drm/i915/gen10: Set value of Indirect Context Offset for gen10 Indirect Context Offset Pointer has changed for Cannonlake. INDIRECT_CTX_OFFSET[15:6] valid value for CNL is 19h per Spec. v2: rebased to intel_lr_indirect_ctx_offset v3: Commit message added per Tvrtko request. Signed-off-by: Michel Thierry Signed-off-by: Rodrigo Vivi Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-9-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_lrc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1dc0766c33473d61fd85caa5031daf34f719cd3f Author: Rodrigo Vivi Date: Tue Jun 6 13:30:37 2017 -0700 drm/i915/cnl: Cannonlake has same MOCS table than Skylake. All registers and default configuration are the same for Skylake and Cannonlake. v2: Don't apply Wa for platforms without MOCS. (Paulo) v3: Removed WaDisableSkipCaching that Joonas noticed that according to spec it is not applicable to CNL. Cc: Paulo Zanoni Signed-off-by: Rodrigo Vivi Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-8-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_mocs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7ae7e9ab2078ed987903bc6c308abe57d575a59 Author: Rodrigo Vivi Date: Tue Jun 6 13:30:36 2017 -0700 drm/i915/cnl: Configure EU slice power gating. Cannonlake also supports slice power gating on devices with more than one slice as SKL. Let's assume that this is the same for SKL+ and exclude BXT only. v2: Also remove KBL. Signed-off-by: Rodrigo Vivi Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-7-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_device_info.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8366be98f6792419ac2e19648391988edec7a7fe Author: James Irwin Date: Tue Jun 6 13:30:35 2017 -0700 drm/i915/cnl: Cannonlake has 4 planes (3 sprites) per pipe Issue: VIZ-4525 Reviewed-by: Damien Lespiau Signed-off-by: James Irwin Signed-off-by: Damien Lespiau Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-6-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_device_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c2e0fd92c194f495aaa8a8a1c86ea1b8c4bd304 Author: Paulo Zanoni Date: Tue Jun 6 13:30:34 2017 -0700 drm/i915/cnl: add IS_CNL_REVID macro We're going to use it in the next commits. Signed-off-by: Paulo Zanoni Signed-off-by: Rodrigo Vivi Reviewed-by: Jim Bride Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-5-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 4531662d1abf6c1f0e5c2b86ddb60e61509786c8 Author: Jim Mattson Date: Tue May 23 11:52:54 2017 -0700 kvm: vmx: Check value written to IA32_BNDCFGS Bits 11:2 must be zero and the linear addess in bits 63:12 must be canonical. Otherwise, WRMSR(BNDCFGS) should raise #GP. Fixes: 0dd376e709975779 ("KVM: x86: add MSR_IA32_BNDCFGS to msrs_to_save") Signed-off-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/include/asm/msr-index.h | 2 ++ arch/x86/kvm/vmx.c | 3 +++ 2 files changed, 5 insertions(+) commit 95578277cbdb60e3c68cb92c843cafc1f77c4f55 Author: Rodrigo Vivi Date: Tue Jun 6 13:30:33 2017 -0700 drm/i915/cnl: Add Cannonlake PCI IDs for Y-skus. By the Spec all CNL Y skus are 2+2, i.e. GT2. v2: Really include the PCI IDs to the picidlist[]; Reviewed-by: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-4-git-send-email-rodrigo.vivi@intel.com include/drm/i915_pciids.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e918d79a5d0a1b431e2cac0e6e6ac9452fd9ab32 Author: Rodrigo Vivi Date: Tue Jun 6 13:30:32 2017 -0700 drm/i915/cnl: Add Cannonlake PCI IDs for U-skus. Platform enabling and its power-on are organized in different skus (U x Y x S x H, etc). So instead of organizing it in GT1 x GT2 x GT3 let's also use the platform sku. This is also the new Spec style what makes the review much more easy and straightforward. v2: Really include the PCI IDs to the picidlist[]; v3: Remove PCI IDs not present in spec. v4: Rebase. Signed-off-by: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Reviewed-by: Clinton Taylor Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-3-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + include/drm/i915_pciids.h | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 4439af9f911ae0243ffe4e2dfc12bace49605d8b Author: Jim Mattson Date: Wed May 24 10:49:25 2017 -0700 kvm: x86: Guest BNDCFGS requires guest MPX support The BNDCFGS MSR should only be exposed to the guest if the guest supports MPX. (cf. the TSC_AUX MSR and RDTSCP.) Fixes: 0dd376e709975779 ("KVM: x86: add MSR_IA32_BNDCFGS to msrs_to_save") Change-Id: I3ad7c01bda616715137ceac878f3fa7e66b6b387 Signed-off-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/cpuid.h | 8 ++++++++ arch/x86/kvm/vmx.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit a8b6fda38f80e75afa3b125c9e7f2550b579454b Author: Jim Mattson Date: Tue May 23 11:52:52 2017 -0700 kvm: vmx: Do not disable intercepts for BNDCFGS The MSR permission bitmaps are shared by all VMs. However, some VMs may not be configured to support MPX, even when the host does. If the host supports VMX and the guest does not, we should intercept accesses to the BNDCFGS MSR, so that we can synthesize a #GP fault. Furthermore, if the host does not support MPX and the "ignore_msrs" kvm kernel parameter is set, then we should intercept accesses to the BNDCFGS MSR, so that we can skip over the rdmsr/wrmsr without raising a #GP fault. Fixes: da8999d31818fdc8 ("KVM: x86: Intel MPX vmx and msr handle") Signed-off-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 1 - 1 file changed, 1 deletion(-) commit acf1dba661e908e923320b4226bad4d8fc23c6f5 Author: Rodrigo Vivi Date: Tue Jun 6 13:30:31 2017 -0700 drm/i915/cnl: Cannonlake uses CNP PCH. Avoid warning when CNP is detected with CNL. Also let's force it on the virtual detection. Signed-off-by: Rodrigo Vivi Reviewed-by: Anusha Srivatsa Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-2-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.c | 4 ++++ 1 file changed, 4 insertions(+) commit 413f3c19f8ecefd29067897db9c414a29d86685f Author: Rodrigo Vivi Date: Tue Jun 6 13:30:30 2017 -0700 drm/i915/cnl: Introduce Cannonlake platform defition. Cannonlake is a Intel® Processor containing Intel® HD Graphics following Kabylake. It is Gen10. Let's start by adding the platform definition based on previous platforms but yet as alpha_support. On following patches we will start adding PCI IDs and the platform specific changes. CNL has an increased DDB size as Damien had previously noticed and provided a separated patch that got squashed here. v2: Squash DDB size here per Ander request. Credits-to: Damien Lespiau Signed-off-by: Rodrigo Vivi Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1496781040-20888-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_pci.c | 8 ++++++++ drivers/gpu/drm/i915/intel_device_info.c | 1 + 3 files changed, 12 insertions(+) commit 2b30842b23b9e6796c7bd5f0916fd2ebf6b7d633 Author: Andrew Lunn Date: Wed Jun 7 03:57:09 2017 +0200 net: fec: Clear and enable MIB counters on imx51 Both the IMX51 and IMX53 datasheet indicates that the MIB counters should be cleared during setup. Otherwise random numbers are returned via ethtool -S. Add a quirk and a function to do this. Tested on an IMX51. Signed-off-by: Andrew Lunn Reviewed-by: Fabio Estevam Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec.h | 4 ++++ drivers/net/ethernet/freescale/fec_main.c | 27 ++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) commit 7bffbd2d4273d5e8108cac3265d50d8e31f9d6a3 Author: Yannick Fertre Date: Wed Jun 7 15:39:40 2017 +0200 ARM: dts: stm32: Add watchdog support for STM32F429 eval board This patch adds watchdog support for STM32x9I-Eval board. Signed-off-by: Yannick Fertre Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 5 +++++ 1 file changed, 5 insertions(+) commit e89960c5ae51eac6a663be20dcfc2a58de1416f5 Author: Yannick Fertre Date: Thu Apr 6 14:19:00 2017 +0200 ARM: dts: stm32: Add watchdog support for STM32F429 SoC Add watchdog into DT for stm32f429 family. Signed-off-by: Yannick FERTRE Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 06e226c7fb233f676b01b144d0b321ebe510fdcd Author: Stephen Boyd Date: Fri Jun 2 15:30:06 2017 -0700 clk: sunxi-ng: Move all clock types to a library We've run into kconfig missing dependency errors in the sunxi-ng code a couple times now. Each time the fix is to find the missing select statement and add it to the Kconfig entry for a particular SoC driver. Given that all this code is builtin (non-modular) we don't need to do this complicated dependency tracking in Kconfig. Instead we can move all the "library"ish code to be compiled as lib-y instead of obj-y, let the linker throw away unused code in the resulting vmlinux, and drop all the Kconfig stuff we use to track clock types. Suggested-by: Arnd Bergmann Signed-off-by: Stephen Boyd [Maxime: added lib.a to obj-y, added the comment] Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 119 ------------------------------------------ drivers/clk/sunxi-ng/Makefile | 35 ++++++++----- 2 files changed, 22 insertions(+), 132 deletions(-) commit 5a90c14c0b11342f1121c9aa3fd8b679595015c7 Author: Chen-Yu Tsai Date: Fri May 26 16:00:24 2017 +0800 clk: sunxi-ng: a83t: Add support for A83T's PRCM The A83T's PRCM has the same set of clocks and resets as the A64. However, a few dividers are different. And due to the lack of a low speed 32.768 kHz oscillator, a few of the clock parents are different. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-r.c | 107 +++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) commit 0d28276b5cb520f6d3f4ef449377517579574e16 Author: Chen-Yu Tsai Date: Fri May 26 16:00:23 2017 +0800 dt-bindings: clock: sunxi-ccu: Add compatible string for A83T PRCM The A83T's PRCM has the same set of clocks and resets as the A64. However, a few dividers are different. And due to the lack of a low speed 32.768 kHz oscillator, a few of the clock parents are different. The PRCM also has controls for various power domains. These are not supported yet. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b5e53469f35f8f295ae6bbb66604580fc02cfcf4 Author: Arnd Bergmann Date: Mon May 22 22:29:40 2017 +0200 clk: sunxi-ng: select SUNXI_CCU_MULT for sun8i-a83t We get a link error when CCU_MULT is not set with the newly added driver: drivers/clk/sunxi-ng/ccu-sun8i-a83t.o:(.data.__compound_literal.1+0x4): undefined reference to `ccu_mult_ops' drivers/clk/sunxi-ng/ccu-sun8i-a83t.o:(.data.__compound_literal.3+0x4): undefined reference to `ccu_mult_ops' Fixes: 46b492116666 ("clk: sunxi-ng: Add driver for A83T CCU") Signed-off-by: Arnd Bergmann Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f2fe1b640f8d5c3567ea1088544bf55e4d9654d8 Author: Chen-Yu Tsai Date: Mon May 22 14:25:48 2017 +0800 clk: sunxi-ng: a83t: Fix audio PLL divider offset The divider of the audio PLL has an offset of 1. Fix this in the driver. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit faea8b0e33c2e6a276d34a755258bb2176553616 Author: Chen-Yu Tsai Date: Mon May 22 14:25:47 2017 +0800 clk: sunxi-ng: a83t: Fix PLL lock status register offset The offset for the PLL lock status register was incorrectly set to 0x208, which actually points to an unused register. The correct register offset is 0x20c. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05359be1176bd097af9e7e833ff0317c55c5a86c Author: Chen-Yu Tsai Date: Fri May 19 15:06:09 2017 +0800 clk: sunxi-ng: Add driver for A83T CCU The A83T clock control unit is a hybrid of some new style clock designs from the A80, and old style layout from the other Allwinner SoCs. Like the A80, the SoC does not have a low speed 32.768 kHz oscillator. Unlike the A80, there is no clock input either. The only low speed clock available is the internal oscillator which runs at around 16 MHz, divided by 512, yielding a low speed clock around 31.250 kHz. Also, the MMC2 module clock supports switching to a "new timing" mode. This mode divides the clock output by half, and disables the CCU based clock delays. The MMC controller must be configure to the same mode, and then use its internal clock delays. This driver does not support runtime switching of the timing modes. Instead, the new timing mode is enforced at probe time. Consumers can check which mode is active by trying to get the current phase delay of the MMC2 phase clocks, which will return -ENOTSUPP if the new timing mode is active. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 11 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 922 +++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun8i-a83t.h | 64 ++ include/dt-bindings/clock/sun8i-a83t-ccu.h | 140 +++++ include/dt-bindings/reset/sun8i-a83t-ccu.h | 98 +++ 6 files changed, 1236 insertions(+) commit 13e0dde8b2ed043aa3e65437342d501715d975c1 Author: Chen-Yu Tsai Date: Fri May 19 15:06:08 2017 +0800 clk: sunxi-ng: Support multiple variable pre-dividers On the A83T, the AHB1 clock has a shared pre-divider on the two PLL-PERIPH clock parents. To support such instances of shared pre-dividers, this patch extends the mux clock type to support multiple variable pre-dividers. As the pre-dividers are only used to calculate the rate, but do not participate in the factorization process, this is fairly straightforward. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 10 +++++----- drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 10 +++++----- drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 10 +++++----- drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 10 +++++----- drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 10 +++++----- drivers/clk/sunxi-ng/ccu-sun8i-r.c | 10 +++++----- drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 10 +++++----- drivers/clk/sunxi-ng/ccu_mux.c | 18 +++++++++++------- drivers/clk/sunxi-ng/ccu_mux.h | 13 ++++++++----- 9 files changed, 54 insertions(+), 47 deletions(-) commit 11ad470c5486ab848f04418c56d58f078ad53a9a Author: Chen-Yu Tsai Date: Fri May 19 15:06:07 2017 +0800 dt-bindings: clock: sunxi-ccu: Add compatible string for A83T CCU The A83T clock control unit is a hybrid of some new style clock designs from the A80, and old style layout from the other Allwinner SoCs. Like the A80, the SoC does not have a low speed 32.768 kHz oscillator. Unlike the A80, there is no clock input either. The only low speed clock available is the internal oscillator which runs at around 16 MHz, divided by 512, yielding a low speed clock around 31.250 kHz. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 2 ++ 1 file changed, 2 insertions(+) commit 1f6d640cad6e5885e175ed359b87f615a3448e8f Author: Wei Yongjun Date: Thu May 18 15:55:13 2017 +0000 clk: sunxi-ng: de2: fix wrong pointer passed to PTR_ERR() PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Fixes: b0d9a4bd52bd ("clk: sunxi-ng: add support for DE2 CCU") Signed-off-by: Wei Yongjun Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0adad031ef5d0d89ee92d92964d3799685ea2387 Author: Maxime Ripard Date: Wed May 17 09:40:37 2017 +0200 clk: sunxi-ng: sun5i: Export video PLLs The video PLLs are used directly by the HDMI controller. Export them so that we can use them in our DT node. Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun5i.h | 6 ++++-- include/dt-bindings/clock/sun5i-ccu.h | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) commit abea24218aa9e40e504d89ac1b7c6b4588a6cd9b Author: Maxime Ripard Date: Wed May 17 09:40:36 2017 +0200 clk: sunxi-ng: mux: Re-adjust parent rate Currently, the parent rate given back to the clock framework in our request is the original parent rate we calculated before trying to round the rate of our clock. This works fine unless our clock also changes its parent rate, in which case we will simply ignore that change and still use the previous parent rate. Create a new function to re-adjust the parent rate to take the pre-dividers into account, and give that back to the clock framework. Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_mux.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit d754b15951ffe3c85e2581eaa244ed4a82080970 Author: Maxime Ripard Date: Wed May 17 09:40:35 2017 +0200 clk: sunxi-ng: mux: Change pre-divider application function prototype The current function name is a bit confusing, and doesn't really allow to create an explicit function to reverse the operation. We also for now change the parent rate through a pointer, while we don't return anything. In order to be less confusing, and easier to use for downstream users, change the function name to something hopefully clearer, and return the adjusted rate instead of changing the pointer. Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_div.c | 8 ++++---- drivers/clk/sunxi-ng/ccu_mp.c | 8 ++++---- drivers/clk/sunxi-ng/ccu_mult.c | 8 ++++---- drivers/clk/sunxi-ng/ccu_mux.c | 29 ++++++++++++----------------- drivers/clk/sunxi-ng/ccu_mux.h | 8 ++++---- 5 files changed, 28 insertions(+), 33 deletions(-) commit ea8edcded581ed9bd935ef7c575b0bf58eb56c82 Author: Maxime Ripard Date: Wed May 17 09:40:34 2017 +0200 clk: sunxi-ng: mux: split out the pre-divider computation code The pre-divider retrieval code was merged into the function to apply the current pre-divider onto the parent clock rate so that we can use that adjusted value to do our factors computation. However, since we'll need to do the reverse operation, we need to split out that code into a function that will be shared. Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_mux.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 73e3e04fc009973d55a523ece1a7261ef7a089be Author: Maxime Ripard Date: Wed May 17 09:40:33 2017 +0200 clk: sunxi-ng: mux: Don't just rely on the parent for CLK_SET_RATE_PARENT The current code only rely on the parent to change its rate in the case where CLK_SET_RATE_PARENT is set. However, some clock rates might be obtained only through a modification of the parent and the clock divider. Just rely on the round rate of the clocks to give us the best computation that might be achieved for a given rate. round_rate functions now need to honor CLK_SET_RATE_PARENT, but either the functions already do that if they modify the parent, or don't modify the praents at all. Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_mux.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit e69b2afa876d246feff724dfc7b0b58aec360633 Author: Maxime Ripard Date: Wed May 17 09:40:32 2017 +0200 clk: sunxi-ng: div: Switch to divider_round_rate divider_round_rate_parent already evaluates changing the parent rate if CLK_SET_RATE_PARENT is set. Now that we can do that on muxes too, let's just use it. Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_div.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) commit 10a8d9b90642da9b6cef477725c4c6bdd4c36cb3 Author: Maxime Ripard Date: Wed May 17 09:40:31 2017 +0200 clk: sunxi-ng: Pass the parent and a pointer to the clocks round rate The clocks might need to modify their parent clocks. In order to make that possible, give them access to the parent clock being evaluated, and to a pointer to the parent rate so that they can modify it if needed. Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_div.c | 7 ++++--- drivers/clk/sunxi-ng/ccu_mp.c | 7 ++++--- drivers/clk/sunxi-ng/ccu_mult.c | 11 ++++++----- drivers/clk/sunxi-ng/ccu_mux.c | 8 +++++--- drivers/clk/sunxi-ng/ccu_mux.h | 3 ++- drivers/clk/sunxi-ng/ccu_nkm.c | 7 ++++--- 6 files changed, 25 insertions(+), 18 deletions(-) commit 22833a9165a1c72a54ddc696a3765bd6f87fbb92 Author: Maxime Ripard Date: Wed May 17 09:40:30 2017 +0200 clk: divider: Make divider_round_rate take the parent clock So far, divider_round_rate only considers the parent clock returned by clk_hw_get_parent. This works fine on clocks that have a single parents, this doesn't work on muxes, since we will only consider the first parent, while other parents may totally be able to provide a better combination. Clocks in that case cannot use divider_round_rate, so would have to come up with a very similar logic to work around it. Instead of having to do something like this, and duplicate that logic everywhere, create a divider_round_rate parent to allow caller to give an additional parameter for the parent clock to consider. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Acked-by: Stephen Boyd Signed-off-by: Chen-Yu Tsai drivers/clk/clk-divider.c | 19 ++++++++++--------- include/linux/clk-provider.h | 16 +++++++++++++--- 2 files changed, 23 insertions(+), 12 deletions(-) commit b042e42feec495dd199525d3f88ffb323e5ec199 Author: Tobias Klauser Date: Mon May 15 12:23:07 2017 +0200 clk: sunxi-ng: explicitly include linux/spinlock.h ccu_reset.h and ccu_reset.c use spinlock_t and associated functions but rely on implict inclusion of linux/spinlock.h which means that changes in other headers could break the build. Thus, add an explicit include. Signed-off-by: Tobias Klauser Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_reset.h | 1 + 1 file changed, 1 insertion(+) commit 763c5bd045b1098be444142403398f1414fd42fb Author: Icenowy Zheng Date: Mon May 15 00:30:34 2017 +0800 clk: sunxi-ng: add support for DE2 CCU The "Display Engine 2.0" in Allwinner newer SoCs contains a clock management unit for its subunits, like the DE CCU in A80. Add a sunxi-ng style driver for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 5 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 260 +++++++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun8i-de2.h | 28 ++++ 4 files changed, 294 insertions(+) commit ed74f8a8a67952320277a53a0c46a0cdf44fbe8f Author: Icenowy Zheng Date: Mon May 15 00:30:33 2017 +0800 dt-bindings: add binding for the Allwinner DE2 CCU Allwinner "Display Engine 2.0" contains some clock controls in it. In order to add them as clock drivers, we need a device tree binding. Add the binding here. Also add the device tree binding headers. Signed-off-by: Icenowy Zheng Acked-by: Rob Herring Signed-off-by: Maxime Ripard .../devicetree/bindings/clock/sun8i-de2.txt | 31 ++++++++++++++++++++++ include/dt-bindings/clock/sun8i-de2.h | 18 +++++++++++++ include/dt-bindings/reset/sun8i-de2.h | 14 ++++++++++ 3 files changed, 63 insertions(+) commit 21b29920933086b34f4a58692a079e9914115019 Author: Icenowy Zheng Date: Wed May 24 19:17:23 2017 +0800 ARM: sun8i: v3s: add device nodes for DE2 display pipeline Allwinner V3s SoC features a "Display Engine 2.0" with only one mixer and only one TCON connected to this mixer, which have RGB LCD output. Add device nodes for this display pipeline. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v3s.dtsi | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 9bea19aac3226872af247f4d37d673fd15431941 Author: Antoine Tenart Date: Thu Jun 1 21:39:05 2017 +0200 ARM: dts: sunxi: add SoC specific compatibles for the crypto nodes Add SoC specific compatibles for all sunXi crypto nodes, in addition to the one already used (allwinner,sun4i-a10-crypto). Signed-off-by: Antoine Tenart Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 3 ++- arch/arm/boot/dts/sun7i-a20.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit e1679f09210fc2ed762747588c49f3b8909b9067 Author: Antoine Tenart Date: Thu Jun 1 21:39:04 2017 +0200 ARM: sun5i: add a cryptographic engine node Add a node for the cryptographic engine that can be found on sun5i SoCs. This cryptographic engine is compatible with the Allwinner cryptographic accelerator driver. Signed-off-by: Antoine Tenart Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 63b956875a1ab695c1768758e25694420dd53a37 Author: Icenowy Zheng Date: Wed Jun 7 08:23:05 2017 +0800 arm64: allwinner: h5: enable dwmac-sun8i for Nano Pi NEO2 Add the required DT parts to enable Ethernet (dwmac-sun8i driver) on the Nano Pi NEO2 board. It uses an external Realtek RTL8211E PHY connected via RGMII to provide GbE network. Specially unlike other Allwinner boards, the phy is connected to MDIO address 7, not 1. This includes the regulator (which is controlled by a GPIO pin) and the actual Ethernet MAC node, referring the RGMII pins of the device. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard .../boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 4b157a5c3b79fbba37732e04fedaf27405af6ed8 Author: Icenowy Zheng Date: Wed Jun 7 08:23:04 2017 +0800 arm64: allwinner: h5: enable dwmac-sun8i for Orange Pi Prime Add the required DT parts to enable Ethernet (dwmac-sun8i driver) on the Orange Pi Prime board. It uses an external Realtek RTL8211E PHY connected via RGMII to provide GbE network. This includes the regulator (which is controlled by a GPIO pin) and the actual Ethernet MAC node, referring the RGMII pins of the device. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard .../dts/allwinner/sun50i-h5-orangepi-prime.dts | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 9907da07d49ce56b3039bb8448e3bed9ccef7163 Author: Icenowy Zheng Date: Wed Jun 7 08:23:03 2017 +0800 arm64: allwinner: h5: sort the device nodes in / part for some boards The reg_vcc3v3 node is wrongly placed at the start of the / part, but not with other fixed regulators used by the board, which makes the device nodes unsorted. As Orange Pi Prime and Nano Pi NEO2 device trees are copy'n'paste works, they share the device node unsorted issue. Fix this by move reg_vcc3v3 node to the position before reg_usb0_vbus. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts | 14 +++++++------- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) commit 96219b00486538853214fd9ba67576e1ce4e4607 Author: Icenowy Zheng Date: Sun Jun 4 10:43:45 2017 +0800 arm64: allwinner: a64: add device tree for SoPine with baseboard Pine64 have made an official baseboard when SoPine SoM is out. The official baseboard is like the original Pine64 -- but with SD card slot replaced with Pine64's eMMC module slot. Add a device tree for SoPine with the baseboard. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../dts/allwinner/sun50i-a64-sopine-baseboard.dts | 126 +++++++++++++++++++++ 2 files changed, 127 insertions(+) commit e7295499903d197c3a96d76b6747e156b00d6364 Author: Corentin Labbe Date: Wed May 31 09:18:49 2017 +0200 arm64: allwinner: bananapi-m64: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the BananaPi M64. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 94dcfdc77fc55ed1956011ceea341911c6e760a0 Author: Corentin Labbe Date: Wed May 31 09:18:48 2017 +0200 arm64: allwinner: pine64-plus: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the pine64 plus. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard .../arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 97023943749367111b9a88e09d1b9bd157dd3326 Author: Corentin Labbe Date: Wed May 31 09:18:47 2017 +0200 arm64: allwinner: pine64: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the pine64 It uses an external PHY via RMII. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e53f67e981bcc5547857475241b3a4a066955f8c Author: Corentin Labbe Date: Wed May 31 09:18:46 2017 +0200 arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver The dwmac-sun8i is an Ethernet MAC that supports 10/100/1000 Mbit connections. It is very similar to the device found in the Allwinner H3, but lacks the internal 100 Mbit PHY and its associated control bits. This adds the necessary bits to the Allwinner A64 SoC .dtsi, but keeps it disabled at this level. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 79b953605ded6a9a995040a1c8cc665127a6411a Author: Corentin Labbe Date: Wed May 31 09:18:45 2017 +0200 arm64: allwinner: sun50i-a64: Add dt node for the syscon control module This patch add the dt node for the syscon register present on the Allwinner A64. Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit c3904a2698916305e94eb7fae72e3ea1df9f83b4 Author: Icenowy Zheng Date: Sun Jun 4 10:43:44 2017 +0800 arm64: allwinner: a64: add DTSI file for SoPine SoM SoPine is a SoM by Pine64, which have a gold finger compatible with the slot of DDR3 SODIMM (signals are not compatible), and have an A64, an AXP803, a LPDDR3 DRAM chip, a power led and a MicroSD slot on it. The card detect pin of the MicroSD slot on the SoM is pulled down, which makes it unusable; however, the slot is at the surface of the SoM that is closed to the baseboard, so it's nearly impossible to hot-swap it, thus I make it non-removable. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard .../boot/dts/allwinner/sun50i-a64-sopine.dtsi | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 494d8a2ca9f107a1068f523bd5a49cad4291b28e Author: Chen-Yu Tsai Date: Mon Jun 5 17:00:33 2017 +0800 arm64: allwinner: a64: Convert CCU raw number references to macros The A64 device tree file has some remnants of raw number references to the CCU node, likely from when the CCU bindings and device tree changes were first merged. Convert these, and the R_CCU ones, to use the proper defined macros from their respective device tree binding header files. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 35 ++++++++++++++------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 2273aa169125fd66e47cee2582f7f8ec3cf32544 Author: Andreas Färber Date: Tue Apr 18 21:25:38 2017 +0200 arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl Pine64 exposes all A64 UARTs, not just UART0. Since the pins can be used as GPIO, don't enable the new UART nodes by default, but prepare the pinctrl settings to aid in activating them via overlays, i.e., overriding the status property of &uartX nodes. For UART4 (Euler) the safer route of not including RTS/CTS pins is chosen, whereas for UART1 (Bluetooth) they are included. Add the corresponding pinctrl nodes where missing. Suggested-by: Maxime Ripard Signed-off-by: Andreas Färber Signed-off-by: Maxime Ripard .../arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 29 ++++++++++++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 15 +++++++++++ 2 files changed, 44 insertions(+) commit 3b38fded38cff850a3b0ba85e96528ad791dafc5 Author: Icenowy Zheng Date: Mon Apr 17 19:57:36 2017 +0800 arm64: allwinner: a64: enable RSB on A64 Allwinner A64 have a RSB controller like the one on A23/A33 SoCs. Add it and its pinmux. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 226ab0999ad35042c83a026af80983a33ebd98cc Author: Andreas Färber Date: Fri Apr 14 21:08:04 2017 +0200 arm64: dts: allwinner: pine64: Add remaining UART aliases Enabling uart2 node currently leads to a /dev/ttyS1 device, with ttyS0..4 always present, causing confusion on the user's part. dtc cannot resolve an overlay's &uart2 reference for strings, only for phandles, so it would need to hardcode the full node path. Avoid this and enforce reliable numbering by adding serialX aliases for: UART1 - on Wifi/BT connector UART2 - on Pi-2 connector UART3 - on Euler connector UART4 - on Euler connector Signed-off-by: Andreas Färber Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 798257194e9fe0151ec83628e95b056e44e642b7 Author: Andreas Färber Date: Fri Apr 14 19:13:20 2017 +0200 arm64: dts: allwinner: a64: Add UART2 pin nodes UART2 is exposed on the Pi connector of Pine64. Make a pinctrl node available at the SoC level, to simplify enabling UART2 via DT overlay. Signed-off-by: Andreas Färber Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit d6d1291d3b9dbd9945751a19733f0c154321e705 Author: Icenowy Zheng Date: Mon Apr 17 19:15:41 2017 +0800 arm64: allwinner: h5: add support for NanoPi NEO2 board NanoPi NEO2 is a board with the same size factor with the original NanoPi NEO by FriendlyELEC. It has a H5 instead of H3 on NanoPi NEO, and the ethernet is upgraded to 1Gbps (with external RTL8211E PHY). Add support for this board. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts | 134 +++++++++++++++++++++ 2 files changed, 135 insertions(+) commit 2ff2836152c431478f0b6bb2a567fef398a9520b Author: Icenowy Zheng Date: Fri Apr 14 00:38:07 2017 +0800 arm64: allwinner: h5: add support for Orange Pi Prime board Orange Pi Prime is a new Allwinner H5-based SBC by Xunlong. It's like a Orange Pi Plus 2E with H3 replaced with H5, eMMC replaced with onboard SPI NOR Flash and wireless card changed to Realtek RTL8723BS (with Bluetooth functionality). Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../dts/allwinner/sun50i-h5-orangepi-prime.dts | 205 +++++++++++++++++++++ 2 files changed, 206 insertions(+) commit 85d95f785500786a707c50804a86615205c1b941 Author: Yannick Fertre Date: Wed Jun 7 15:20:53 2017 +0200 ARM: dts: stm32: Enable ltdc & simple panel on stm32f429-Eval board Enable ltdc & enable am-480272h3tmqw-t01h panel. Signed-off-by: Yannick Fertre Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit bcb49099cfb464cdfeb0d4c04a2c53ae823dea0f Author: Yannick Fertre Date: Wed Jun 7 14:58:10 2017 +0200 ARM: dts: stm32: Add ltdc support on stm32f429 MCU Add LTDC (Lcd-tft Display Controller) support. Signed-off-by: Yannick Fertre Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 46 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) commit cc20ba4ed8576abfa10a17e81cb4521f474624f0 Author: Anton Blanchard Date: Sat May 6 22:00:11 2017 -0300 [media] ir-spi: Fix issues with lirc API The ir-spi driver has 2 issues which prevents it from working with lirc: 1. The ir-spi driver uses 16 bits of SPI data to create one cycle of the waveform. As such our SPI clock needs to be 16x faster than the carrier frequency. The driver is inconsistent in how it currently handles this. It initializes it to the carrier frequency: But the commit message has some example code which initialises it to 16x the carrier frequency: val = 608000; ret = ioctl(fd, LIRC_SET_SEND_CARRIER, &val); To maintain compatibility with lirc, always do the frequency adjustment in the driver. 2. lirc presents pulses in microseconds, but the ir-spi driver treats them as cycles of the carrier. Similar to other lirc drivers, do the conversion with DIV_ROUND_CLOSEST(). Fixes: fe052da49201 ("[media] rc: add support for IR LEDs driven through SPI") Cc: stable@vger.kernel.org Signed-off-by: Anton Blanchard Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-spi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit fb3562c81e98e52f6acca2cd7ee36532634ec38e Author: Johan Hovold Date: Thu Jun 1 04:46:00 2017 -0300 [media] mceusb: drop redundant urb reinitialisation Drop a since commit e1159cb35712 ("[media] mceusb: remove pointless mce_flush_rx_buffer function") redundant reinitialisation of two urb fields immediately after they have been initialised. Signed-off-by: Johan Hovold Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 3 --- 1 file changed, 3 deletions(-) commit 2d5a6ce71c72d98d4f7948672842e3e8c265a8b7 Author: Johan Hovold Date: Thu Jun 1 04:45:59 2017 -0300 [media] mceusb: fix memory leaks in error path Fix urb and transfer-buffer leaks in an urb-submission error path which may be hit when a device is disconnected. Fixes: 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver") Cc: stable # 2.6.36 Cc: Jarod Wilson Signed-off-by: Johan Hovold Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 2 ++ 1 file changed, 2 insertions(+) commit 4e66a52a2e4c832dfa35a39204d0f7ce717d4a4a Author: Dave Stevenson Date: Fri Jun 2 09:18:14 2017 -0300 [media] tc358743: Add support for platforms without IRQ line interrupts is listed as an optional property in the DT binding, but in reality the driver didn't work without it. The existing driver relied on having the interrupt line connected to the SoC to trigger handling various events. Add the option to poll the interrupt status register via a timer if no interrupt source is defined. Signed-off-by: Dave Stevenson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 2da2391c0f200b07bdc4b8984d69112337dc6dc7 Author: Dave Stevenson Date: Fri Jun 2 09:18:13 2017 -0300 [media] tc358743: Setup default mbus_fmt before registering Previously the mbus_fmt_code was set after the device was registered. If a connected sub-device called tc358743_get_fmt prior to that point it would get an invalid code back. Signed-off-by: Dave Stevenson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3cb0fe6f74e566b1e4df81f518db16cedb268fc5 Author: Dave Stevenson Date: Fri Jun 2 09:18:12 2017 -0300 [media] tc358743: Add enum_mbus_code There was no way to query the supported mbus formats from this driver. enum_mbus_code is the function to expose that, so implement it. Signed-off-by: Dave Stevenson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a7a04b5b2c6e060c80cd9617b351ffbd618fc587 Author: Hans Verkuil Date: Wed May 31 06:50:26 2017 -0300 [media] cec: improve debug messages - use __func__ instead of writing the full function name - drop debug message in cec_config_log_addr since the same information will be reported later - use debug level 1 for errors and infrequent events, use level 2 for debugging CEC message traffic - log when a transmit is retried, very useful to know when debugging - debug messages now all start with lower case Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit f44848b6f7ca8b8cbc3d04be3eb476b1ec531681 Author: Vikas Manocha Date: Wed Jun 7 13:55:25 2017 +0200 ARM: dts: stm32: add stm32f769I & stm32f746 discovery board support Stm32f769I & stm32f746 are MCUs of stm32f7 family. Here are the major specs of the two boards: stm32f769I discovery board: - Cortex-M7 core @216MHz - 2MB mcu internal flash - 512KB internal sram - 16MB sdram memory - 64MB qspi flash memory - 4 inch wvga LCD-TFT Display stm32f746 discovery board: - Cortex-M7 core @216MHz - 1MB mcu internal flash - 320KB internal sram - 8MB sdram memory - 16MB qspi flash memory - 4.3 inch 480x272 LCD-TFT display Signed-off-by: Vikas Manocha Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/stm32f746-disco.dts | 74 +++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/stm32f746.dtsi | 13 ++++++ arch/arm/boot/dts/stm32f769-disco.dts | 74 +++++++++++++++++++++++++++++++++++ 4 files changed, 163 insertions(+) commit 43b288baa8f39054dc5e7102a329180bbeb1e115 Author: Arvind Yadav Date: Wed May 31 06:31:54 2017 -0300 [media] tc358743: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7c7356bab8e85c8d2e335752dcb89d94fe10d660 Author: Yoshihiro Shimoda Date: Mon May 29 19:42:15 2017 +0900 phy: rcar-gen3-usb3: add support for R-Car Gen3 USB 3.0 PHY The USB 3.0 PHY modules of R-Car Gen3 SoCs have: - Spread spectrum clock (ssc). - Using USB 2.0 EXTAL clock instead of USB 3.0 clock. - Enabling VBUS detection for usb3.0 peripheral. So, this driver supports these features. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/rcar-gen3-phy-usb3.txt | 46 +++++ MAINTAINERS | 4 +- drivers/phy/renesas/Kconfig | 7 + drivers/phy/renesas/Makefile | 1 + drivers/phy/renesas/phy-rcar-gen3-usb3.c | 226 +++++++++++++++++++++ 5 files changed, 282 insertions(+), 2 deletions(-) commit 48e3e36a253c66d47843ebe78422cec30095e3d5 Author: Sakari Ailus Date: Mon May 29 11:45:43 2017 -0300 [media] v4l2-ctrls: Correctly destroy mutex in v4l2_ctrl_handler_free() The mutex that was initialised in v4l2_ctrl_handler_init_class() was not destroyed in v4l2_ctrl_handler_free(). Do that. Additionally, explicitly refer to the ctrl handler's mutex in mutex initialisation for clarity. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cc0140e2a04513ccdd950d939729e557d23cc910 Author: Sakari Ailus Date: Fri May 26 05:21:37 2017 -0300 [media] v4l2-ctrls.c: Implement unlocked variant of v4l2_ctrl_handler_setup() Sometimes the caller is already holding the control handler mutex and using it to serialise something. Provide an unlocked variant of the same function to be used in those cases. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 21 +++++++++++++++++++-- include/media/v4l2-ctrls.h | 13 +++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) commit ec62c9a54cc28dd20dfb08b4663d021028b1a97e Author: Hugues Fruchet Date: Fri May 19 07:04:52 2017 -0300 [media] atmel-isi: code cleanup Ensure that ISI is clocked before starting sensor sub device. Remove un-needed type check in try_fmt(). Use clamp() macro for hardware capabilities. Fix wrong tabulation to space. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isi.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit e71a4e1bebaf7fd990efbdc04b38e5526914f0f1 Author: Ard Biesheuvel Date: Tue Jun 6 17:00:22 2017 +0000 arm64: ftrace: add support for far branches to dynamic ftrace Currently, dynamic ftrace support in the arm64 kernel assumes that all core kernel code is within range of ordinary branch instructions that occur in module code, which is usually the case, but is no longer guaranteed now that we have support for module PLTs and address space randomization. Since on arm64, all patching of branch instructions involves function calls to the same entry point [ftrace_caller()], we can emit the modules with a trampoline that has unlimited range, and patch both the trampoline itself and the branch instruction to redirect the call via the trampoline. Signed-off-by: Ard Biesheuvel [will: minor clarification to smp_wmb() comment] Signed-off-by: Will Deacon arch/arm64/Kconfig | 2 +- arch/arm64/Makefile | 3 +++ arch/arm64/include/asm/module.h | 3 +++ arch/arm64/kernel/Makefile | 3 +++ arch/arm64/kernel/ftrace-mod.S | 18 +++++++++++++++ arch/arm64/kernel/ftrace.c | 51 +++++++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/module.c | 6 ++++- 7 files changed, 84 insertions(+), 2 deletions(-) commit 42654ebad0c7f54768068e5daa7a6a44ba43c738 Merge: 6fb05e0 963761a Author: Mauro Carvalho Chehab Date: Wed Jun 7 07:50:43 2017 -0300 Merge tag 'media/v4.12-2' into patchwork media fixes for v4.12-rc4 * tag 'media/v4.12-2': (598 commits) [media] rc-core: race condition during ir_raw_event_register() [media] cec: drop MEDIA_CEC_DEBUG [media] cec: rename MEDIA_CEC_NOTIFIER to CEC_NOTIFIER [media] cec: select CEC_CORE instead of depend on it [media] rainshadow-cec: ensure exit_loop is intialized [media] atomisp: don't treat warnings as errors Linux 4.12-rc3 x86/ftrace: Make sure that ftrace trampolines are not RWX x86/mm/ftrace: Do not bug in early boot on irqs_disabled in cpu_flush_range() selftests/ftrace: Add a testcase for many kprobe events kprobes/x86: Fix to set RWX bits correctly before releasing trampoline ftrace: Fix memory leak in ftrace_graph_release() ipv4: add reference counting to metrics net: ethernet: ax88796: don't call free_irq without request_irq first ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets sctp: fix ICMP processing if skb is non-linear net: llc: add lock_sock in llc_ui_bind to avoid a race condition PCI/msi: fix the pci_alloc_irq_vectors_affinity stub blk-mq: Only register debugfs attributes for blk-mq queues x86/timers: Move simple_udelay_calibration past init_hypervisor_platform ... Signed-off-by: Mauro Carvalho Chehab commit f8af0b364e249eef0c71200826563947cd74267e Author: Ard Biesheuvel Date: Tue Jun 6 17:00:21 2017 +0000 arm64: ftrace: don't validate branch via PLT in ftrace_make_nop() When turning branch instructions into NOPs, we attempt to validate the action by comparing the old value at the call site with the opcode of a direct relative branch instruction pointing at the old target. However, these call sites are statically initialized to call _mcount(), and may be redirected via a PLT entry if the module is loaded far away from the kernel text, leading to false negatives and spurious errors. So skip the validation if CONFIG_ARM64_MODULE_PLTS is configured. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/ftrace.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) commit 94116f8126de9762751fd92731581b73b56292e5 Author: Andy Shevchenko Date: Mon Jun 5 19:40:46 2017 +0300 ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16 bytes. Instead we convert them to use guid_t type. At the same time we convert current users. acpi_str_to_uuid() becomes useless after the conversion and it's safe to get rid of it. Acked-by: Rafael J. Wysocki Cc: Borislav Petkov Acked-by: Dan Williams Cc: Amir Goldstein Reviewed-by: Jarkko Sakkinen Reviewed-by: Jani Nikula Acked-by: Jani Nikula Cc: Ben Skeggs Acked-by: Benjamin Tissoires Acked-by: Joerg Roedel Acked-by: Adrian Hunter Cc: Yisen Zhuang Acked-by: Bjorn Helgaas Acked-by: Felipe Balbi Acked-by: Mathias Nyman Reviewed-by: Heikki Krogerus Acked-by: Mark Brown Signed-off-by: Andy Shevchenko Signed-off-by: Christoph Hellwig drivers/acpi/acpi_extlog.c | 4 ++-- drivers/acpi/bus.c | 23 ---------------------- drivers/acpi/nfit/core.c | 6 +++--- drivers/acpi/utils.c | 16 +++++++-------- drivers/char/tpm/tpm_crb.c | 9 ++++----- drivers/char/tpm/tpm_ppi.c | 20 ++++++++----------- drivers/gpu/drm/i915/intel_acpi.c | 14 +++++-------- drivers/gpu/drm/nouveau/nouveau_acpi.c | 20 +++++++++---------- drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c | 9 ++++----- drivers/hid/i2c-hid/i2c-hid.c | 9 ++++----- drivers/iommu/dmar.c | 11 +++++------ drivers/mmc/host/sdhci-pci-core.c | 9 ++++----- drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 15 +++++++------- drivers/pci/pci-acpi.c | 13 ++++++------ drivers/pci/pci-label.c | 4 ++-- drivers/usb/dwc3/dwc3-pci.c | 10 +++++----- drivers/usb/host/xhci-pci.c | 9 ++++----- drivers/usb/misc/ucsi.c | 6 +++--- drivers/usb/typec/typec_wcove.c | 8 ++++---- include/acpi/acpi_bus.h | 11 ++++++----- include/linux/acpi.h | 3 +-- include/linux/pci-acpi.h | 2 +- sound/soc/intel/skylake/skl-nhlt.c | 7 ++++--- tools/testing/nvdimm/test/iomap.c | 6 +++--- tools/testing/nvdimm/test/nfit.c | 2 +- tools/testing/nvdimm/test/nfit_test.h | 4 +++- 26 files changed, 106 insertions(+), 144 deletions(-) commit 6f428096a4d1e1809b162ca40dec5f7d09f3f1d1 Author: Greg Kroah-Hartman Date: Tue Jun 6 15:32:03 2017 +0200 driver core: remove CLASS_ATTR usage There was only 2 remaining users of CLASS_ATTR() so let's finally get rid of them and force everyone to use the correct RW/RO/WO versions instead. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Acked-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman arch/powerpc/platforms/pseries/dlpar.c | 2 +- arch/powerpc/platforms/pseries/mobility.c | 7 ++++--- include/linux/device.h | 2 -- 3 files changed, 5 insertions(+), 6 deletions(-) commit c6706de0ce8bc8cd1e336b8cf0acabf1adedba6c Author: Takashi Sakamoto Date: Wed Jun 7 08:46:45 2017 +0900 ALSA: pcm: obsolete RULES_DEBUG local macro Added tracepoints obsoleted RULES_DEBUG local macro and relevant codes. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 89 ++++--------------------------------------------- 1 file changed, 7 insertions(+), 82 deletions(-) commit 37567c55035a3a6c6cdf060301a7d8e514627afa Author: Takashi Sakamoto Date: Wed Jun 7 08:46:44 2017 +0900 ALSA: pcm: enable parameter tracepoints only when CONFIG_SND_DEBUG is enabled In a previous commit, tracepoints are added for PCM parameter processing. As long as I know, this implementation increases size of relocatable object by 35%. For vendors who are conscious of memory footprint, it brings apparent disadvantage. This commit utilizes CONFIG_SND_DEBUG configuration to enable/disable the tracepoints. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 7 +++++++ 1 file changed, 7 insertions(+) commit be4e31dab0e14c1f6fa5c03b33056058b93316e2 Author: Takashi Sakamoto Date: Wed Jun 7 08:46:43 2017 +0900 ALSA: pcm: tracepoints for refining PCM parameters When working for devices which support configurable modes for its data transmission or which consists of several components, developers are likely to use rules of parameters of PCM substream. However, there's no infrastructure to assist their work. In old days, ALSA PCM core got a local 'RULES_DEBUG' macro to debug refinement of parameters for PCM substream. Although this is merely a makeshift. With some modifications, we get the infrastructure. This commit is for the purpose. Refinement of mask/interval type of PCM parameters is probed as tracepoint events as 'hw_mask_param' and 'hw_interval_param' on existent 'snd_pcm' subsystem. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/Makefile | 1 + sound/core/pcm_native.c | 33 ++++++++++ sound/core/pcm_param_trace.h | 142 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+) commit aac5e972d4c7bc728df605f5427d9c2458c34ea9 Author: Garlic Tseng Date: Thu Jun 1 13:42:10 2017 +0800 arm: dts: mediatek: Add audio driver node for MT2701 Add audio driver node for mt2701 Signed-off-by: Garlic Tseng Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701-evb.dts | 65 ++++++++++++++++++++++++++ arch/arm/boot/dts/mt2701.dtsi | 98 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) commit d7f910bfedd863d13ea320030fe98e42d0938ed5 Author: Takashi Iwai Date: Fri Jun 2 17:35:30 2017 +0200 ALSA: timer: Wrap with spinlock for queue access For accessing the snd_timer_user queue indices, we take tu->qlock. But it's forgotten in a couple of places. The one in snd_timer_user_params() should be safe without the spinlock as the timer is already stopped. But it's better for consistency. The one in poll is just a read-out, so it's not inevitably needed, but it'd be good to make the result consistent, too. Tested-by: Alexander Potapenko Signed-off-by: Takashi Iwai sound/core/timer.c | 4 ++++ 1 file changed, 4 insertions(+) commit 890e2cb5d184629702a2c1a1e9631f9f64523c65 Author: Takashi Iwai Date: Fri Jun 2 17:16:59 2017 +0200 ALSA: timer: Improve user queue reallocation ALSA timer may reallocate the user queue upon request, and it happens at three places for now: at opening, at SNDRV_TIMER_IOCTL_PARAMS, and at SNDRV_TIMER_IOCTL_SELECT. However, the last one, snd_timer_user_tselect(), doesn't need to reallocate the buffer since it doesn't change the queue size. It does just because tu->tread might have been changed before starting the timer. Instead of *_SELECT ioctl, we should reallocate the queue at SNDRV_TIMER_IOCTL_TREAD; then the timer is guaranteed to be stopped, thus we can reassign the buffer more safely. This patch implements that with a slight code refactoring. Essentially, the patch achieves: - Introduce realloc_user_queue() for (re-)allocating the ring buffer, and call it from all places. Also, realloc_user_queue() uses kcalloc() for avoiding possible leaks. - Add the buffer reallocation at SNDRV_TIMER_IOCTL_TREAD. When it fails, tu->tread is restored to the old value, too. - Drop the buffer reallocation at snd_timer_user_tselect(). Tested-by: Alexander Potapenko Signed-off-by: Takashi Iwai sound/core/timer.c | 94 +++++++++++++++++++++++++----------------------------- 1 file changed, 43 insertions(+), 51 deletions(-) commit 4c7aba46c9e82aa236502760a677e666589afead Merge: d2dc2a9 ba3021b Author: Takashi Iwai Date: Wed Jun 7 10:25:30 2017 +0200 Merge branch 'for-linus' into for-next For applying more ALSA timer cleanups. commit 4e93b6481c87ea5afde944a32b4908357ec58992 Author: Juergen Gross Date: Tue May 30 20:52:26 2017 +0200 xen: don't print error message in case of missing Xenstore entry When registering for the Xenstore watch of the node control/sysrq the handler will be called at once. Don't issue an error message if the Xenstore node isn't there, as it will be created only when an event is being triggered. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/manage.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 764e4ef0a8871339eeddaf27ccc47aeeea28b974 Author: Markus Elfring Date: Thu Jun 1 22:17:03 2017 +0200 ARM: OMAP1: Fix a typo in a comment line Adjust a line in this description for the software module. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap1/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9e317c388d48da80fc266f06dc6298cbd790b8c Author: Markus Elfring Date: Thu Jun 1 22:04:29 2017 +0200 ARM: OMAP1: Delete an error message for a failed memory allocation in omap1_dm_timer_init() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap1/timer.c | 2 -- 1 file changed, 2 deletions(-) commit 2abe5b343dc790cc577700b07ca8d10fed62ae0e Author: Markus Elfring Date: Thu Jun 1 22:00:21 2017 +0200 ARM: OMAP1: DMA: Delete an unnecessary return statement in omap1_show_dma_caps() The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected function. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap1/dma.c | 1 - 1 file changed, 1 deletion(-) commit 61ee221ee45bc10d9115ba6ce8862ee62289a98f Author: Markus Elfring Date: Thu Jun 1 21:54:36 2017 +0200 ARM: OMAP1: DMA: Delete an error message for a failed memory allocation in omap1_system_dma_init() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap1/dma.c | 2 -- 1 file changed, 2 deletions(-) commit d27a30bbc8b0c84a4cc922b201f9e85e9a2de741 Author: Markus Elfring Date: Thu Jun 1 21:48:11 2017 +0200 ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap1/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bafd73093f2f431f5a363f8057abc0ccc118853 Author: Antony Antony Date: Tue Jun 6 12:12:14 2017 +0200 xfrm: add UDP encapsulation port in migrate message Add XFRMA_ENCAP, UDP encapsulation port, to km_migrate announcement to userland. Only add if XFRMA_ENCAP was in user migrate request. Signed-off-by: Antony Antony Reviewed-by: Richard Guy Briggs Signed-off-by: Steffen Klassert include/net/xfrm.h | 6 ++++-- net/key/af_key.c | 6 ++++-- net/xfrm/xfrm_policy.c | 2 +- net/xfrm/xfrm_state.c | 6 ++++-- net/xfrm/xfrm_user.c | 23 +++++++++++++++++------ 5 files changed, 30 insertions(+), 13 deletions(-) commit 4ab47d47af20addd6ecee1ece0205b1fbf483942 Author: Antony Antony Date: Tue Jun 6 12:12:13 2017 +0200 xfrm: extend MIGRATE with UDP encapsulation port Add UDP encapsulation port to XFRM_MSG_MIGRATE using an optional netlink attribute XFRMA_ENCAP. The devices that support IKE MOBIKE extension (RFC-4555 Section 3.8) could go to sleep for a few minutes and wake up. When it wake up the NAT mapping could have expired, the device send a MOBIKE UPDATE_SA message to migrate the IPsec SA. The change could be a change UDP encapsulation port, IP address, or both. Reported-by: Paul Wouters Signed-off-by: Antony Antony Reviewed-by: Richard Guy Briggs Signed-off-by: Steffen Klassert include/net/xfrm.h | 6 ++++-- net/key/af_key.c | 2 +- net/xfrm/xfrm_policy.c | 11 ++++------- net/xfrm/xfrm_state.c | 18 +++++++++++++----- net/xfrm/xfrm_user.c | 14 ++++++++++++-- 5 files changed, 34 insertions(+), 17 deletions(-) commit d2dc2a96de9d58038ac1f9ee432e88a70958d59b Author: Takashi Sakamoto Date: Wed Jun 7 09:38:06 2017 +0900 ALSA: fireface: constify ALSA specific operations ALSA fireface driver has ALSA specific operations for MIDI/PCM data. Structured data for the operations can be constified. Additionally, The structured data can be function local. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-midi.c | 22 ++++++++--------- sound/firewire/fireface/ff-pcm.c | 52 +++++++++++++++++++-------------------- 2 files changed, 35 insertions(+), 39 deletions(-) commit 875becf8412c60ffae93c5f69e95a4d023f0e8ee Author: Takashi Sakamoto Date: Wed Jun 7 09:38:05 2017 +0900 ALSA: firewire: process packets in 'struct snd_pcm_ops.ack' callback In recent commit for ALSA PCM core, some arrangement is done for 'struct snd_pcm_ops.ack' callback. This is called when appl_ptr is explicitly moved in intermediate buffer for PCM frames, except for some cases described later. For drivers in ALSA firewire stack, usage of this callback has a merit to reduce latency between time of PCM frame queueing and handling actual packets in recent isochronous cycle, because no need to wait for software IRQ context from isochronous context of OHCI 1394. If this works well in a case that mapped page frame is used for the intermediate buffer, user process should execute some commands for ioctl(2) to tell the number of handled PCM frames in the intermediate buffer just after handling them. Therefore, at present, with a combination of below conditions, this doesn't work as expected and user process should wait for the software IRQ context as usual: - when ALSA PCM core judges page frame mapping is available for status data (struct snd_pcm_mmap_status) and control data (struct snd_pcm_mmap_control). - user process handles PCM frames by loop just with 'snd_pcm_mmap_begin()' and 'snd_pcm_mmap_commit()'. - user process uses PCM hw plugin in alsa-lib to operate I/O without 'sync_ptr_ioctl' option. Unfortunately, major use case include these three conditions. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 19 +++++++++++++++++++ sound/firewire/amdtp-stream.h | 1 + sound/firewire/bebob/bebob_pcm.c | 16 ++++++++++++++++ sound/firewire/dice/dice-pcm.c | 18 ++++++++++++++++++ sound/firewire/digi00x/digi00x-pcm.c | 16 ++++++++++++++++ sound/firewire/fireface/ff-pcm.c | 16 ++++++++++++++++ sound/firewire/fireworks/fireworks_pcm.c | 16 ++++++++++++++++ sound/firewire/motu/motu-pcm.c | 16 ++++++++++++++++ sound/firewire/oxfw/oxfw-pcm.c | 16 ++++++++++++++++ sound/firewire/tascam/tascam-pcm.c | 16 ++++++++++++++++ 10 files changed, 150 insertions(+) commit 378506a7e600a025131df947a15f9bc23b522690 Author: Alex Deucher Date: Tue Jun 6 17:41:20 2017 -0400 drm/amdgpu/gfx: create a common bitmask function (v2) The same function was duplicated in all the gfx IPs. Use a single implementation for all. v2: use static inline (Alex Xie) Reviewed-by: Alex Xie Suggested-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 11 +++-------- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 19 +++---------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 +++-------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 +++-------- 5 files changed, 25 insertions(+), 40 deletions(-) commit 943c05bdb53da273c43ec44eec37c6a70409b5e9 Author: Alex Deucher Date: Wed May 31 10:05:04 2017 -0400 drm/amdgpu/gfx8: drop per-APU CU limits Always use the max for the family rather than the per sku limits. This makes sure the mask is always the max size to avoid reporting the wrong number of CUs. Reviewed-by: Alex Xie Reviewed-by: Andres Rodriguez Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 71 +---------------------------------- 1 file changed, 2 insertions(+), 69 deletions(-) commit bf5a01d7c50fb0c4e1c3d320d670bad252d50bcb Author: Leonard Crestez Date: Tue Jun 6 20:50:43 2017 +0300 ARM: imx6ull: Make suspend/resume work like on 6ul Suspend and resume on imx6ull is currenty not working because of some missed checks where behavior should match imx6ul. Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/pm-imx6.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b3ea575770c7eeb259c77b6861cd14d00eb309df Author: Leonard Crestez Date: Tue Jun 6 20:50:42 2017 +0300 ARM: imx: Add MXC_CPU_IMX6ULL and cpu_is_imx6ull Support for imx6ull is already present but it's based on of_machine_is_compatible("fsl,imx6ull") checks. Add it to the MXC_CPU_* enumeration as well. This also fixes /sys/devices/soc0/soc_id reading "Unknown". Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/cpu.c | 3 +++ arch/arm/mach-imx/mxc.h | 6 ++++++ 2 files changed, 9 insertions(+) commit cc20028f68e760d6958e892aba1f9bafbce63e22 Author: Fabio Estevam Date: Mon Jun 5 13:22:20 2017 -0300 ARM: dts: imx6: Fix PCI GPIO reset polarity The imx6 PCI driver ignores the GPIO polarity from 'reset-gpio' and considers that the PCI reset is active low, unless the property 'reset-gpio-active-high' is present. Fix the device tree description by explicitly passing the 'GPIO_ACTIVE_LOW' flag to the 'reset-gpio' property. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-ba16.dtsi | 2 +- arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 2 +- arch/arm/boot/dts/imx6q-novena.dts | 2 +- arch/arm/boot/dts/imx6qdl-apf6dev.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 2 +- arch/arm/boot/dts/imx6sx-nitrogen6sx.dts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 216fe8f021e33c36e3b27c49c9f1951f6b037d7f Merge: 9747e23 b29794e Author: David S. Miller Date: Tue Jun 6 22:20:08 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Just some simple overlapping changes in marvell PHY driver and the DSA core code. Signed-off-by: David S. Miller commit 9747e2313838ee8f5d8073fd6aa7289255c3c51b Merge: 9204657 20b2af3 Author: David S. Miller Date: Tue Jun 6 21:14:21 2017 -0400 Merge branch 'phylib-support-for-MV88X3310-10G-phy' Russell King says: ==================== net: Add phylib support for MV88X3310 10G phy This patch series adds support for the Marvell 88x3310 PHY found on the SolidRun Macchiatobin board. The first patch introduces a set of generic Clause 45 PHY helpers that C45 PHY drivers can make use of if they wish. Patch 2 ensures that the Clause 22 aneg_done function will not be called for incompatible Clause 45 PHYs. Patch 3 fixes the aneg restart to be compatible with C45 PHYs - it can currently only cope with C22 PHYs. Patch 4 moves the "gen10g" driver into the Clause 45 code, grouping all core clause 45 code together. Patch 5 adds the phy_interface_t types for XAUI and 10GBase-KR links. As 10GBase-KR appears to be compatible with XFI and SFI, XFI and SFI, I currently see no reason to add XFI and SFI interface modes. There seems to be vendor code out there using these, but they all alias back to the same hardware settings. Patch 6 adds support for the MV88X3310 PHY, which supports both the copper and fiber interfaces. It should be noted that the MV88X3310 automatically switches its MAC facing interface between 10GBase-KR and SGMII depending on the negotiated speed. This was discussed with Florian, and we agreed to update the phy interface mode depending on the properties of the actual link mode to the PHY. v2: - update sysfs-class-net-phydev documentation - avoid genphy_aneg_done for non-C22 PHYs - expand comment about 0x30 constant - add comment about lack of reset - configure driver using MARVELL_10G_PHY ==================== Signed-off-by: David S. Miller commit 20b2af32ff3f0ac74f2bfd0bc2c175b56002d1f1 Author: Russell King Date: Mon Jun 5 12:23:16 2017 +0100 net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support Add phylib support for the Marvell Alaska X 10 Gigabit PHY (MV88X3310). This phy is able to operate at 10G, 1G, 100M and 10M speeds, and only supports Clause 45 accesses. The PHY appears (based on the vendor IDs) to be two different vendors IP, with each devad containing several instances. This PHY driver has only been tested with the RJ45 copper port, fiber port and a Marvell Armada 8040-based ethernet interface. It should be noted that to use the full range of speeds, MAC drivers need to also reconfigure the link mode as per phydev->interface, since the PHY automatically changes its interface mode depending on the negotiated speed. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller MAINTAINERS | 6 + drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/marvell10g.c | 368 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 380 insertions(+) commit c125ca091873f2e848cc31c2371a3a66c2fd4dd8 Author: Russell King Date: Mon Jun 5 12:23:10 2017 +0100 net: phy: add XAUI and 10GBASE-KR PHY connection types XAUI allows XGMII to reach an extended distance by using a XGXS layer at each end of the MAC to PHY link, operating over four Serdes lanes. 10GBASE-KR is a single lane Serdes backplane ethernet connection method with autonegotiation on the link. Some PHYs use this to connect to the ethernet interface at 10G speeds, switching to other connection types when utilising slower speeds. 10GBASE-KR is also used for XFI and SFI to connect to XFP and SFP fiber modules. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/ABI/testing/sysfs-class-net-phydev | 2 +- Documentation/devicetree/bindings/net/ethernet.txt | 2 ++ include/linux/phy.h | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) commit 921690f2aa8830c5e3923b944a1c72ab6b683afe Author: Russell King Date: Mon Jun 5 12:23:05 2017 +0100 net: phy: split out 10G genphy support Move the old 10G genphy support to sit beside the new clause 45 library functions, so all the 10G phy code is together. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy-c45.c | 64 ++++++++++++++++++++++++++ drivers/net/phy/phy_device.c | 105 ++++++++----------------------------------- 2 files changed, 83 insertions(+), 86 deletions(-) commit 002ba7058a7f141cf22d37967a4ef78239c50e9e Author: Russell King Date: Mon Jun 5 12:23:00 2017 +0100 net: phy: hook up clause 45 autonegotiation restart genphy_restart_aneg() can only restart autonegotiation on clause 22 PHYs. Add a phy_restart_aneg() function which selects between the clause 22 and clause 45 restart functionality depending on the PHY type and whether the Clause 45 PHY supports the Clause 22 register set. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 23 +++++++++++++++++++++-- include/linux/phy.h | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) commit 41408ad519f7a2a1c5229e61f2a97f4df1b61adc Author: Russell King Date: Mon Jun 5 12:22:55 2017 +0100 net: phy: avoid genphy_aneg_done() for PHYs without clause 22 support Avoid calling genphy_aneg_done() for PHYs that do not implement the Clause 22 register set. Clause 45 PHYs may implement the Clause 22 register set along with the Clause 22 extension MMD. Hence, we can't simply block access to the Clause 22 functions based on the PHY being a Clause 45 PHY. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5acde34a5a420ffe7441bb7d3909dc2618025c3c Author: Russell King Date: Mon Jun 5 12:22:50 2017 +0100 net: phy: add 802.3 clause 45 support to phylib Add generic helpers for 802.3 clause 45 PHYs for >= 10Gbps support. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Makefile | 2 +- drivers/net/phy/phy-c45.c | 234 +++++++++++++++++++++++++++++++++++++++++++ drivers/net/phy/phy_device.c | 20 ++-- include/linux/phy.h | 12 +++ 4 files changed, 253 insertions(+), 15 deletions(-) commit b608a89221b401d7b07a1b6330777a034d204410 Author: Fabio Estevam Date: Tue Jun 6 12:45:54 2017 -0300 clk: imx7d: Fix the DDR PLL enable bit Commit ad14972422899b6 ("clk: imx7d: Fix the powerdown bit location of PLL DDR") used the incorrect bit for the IMX_PLLV3_DDR_IMX7 case. Fix it accordingly to avoid a kernel hang. Reported-by: Leonard Crestez Signed-off-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Stephen Boyd drivers/clk/imx/clk-pllv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f3195ecd5c318c042d913841baa056750ccea75 Author: Carlo Caione Date: Tue Jun 6 12:23:42 2017 +0200 ARM64: dts: meson-gx: Fix sensors reporting from SCP Switch to use the new compatible for the SCPI sensors so that the sensor readings are reported using the correct scale. Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6653ebd48f493efe3f3598ff3fe7b3d5451665df Author: Alex Deucher Date: Fri Jun 2 16:30:46 2017 -0400 drm/amdgpu/gfx6: properly cache mc_arb_ramcfg This was missing for gfx6. Acked-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a7049de1e8ba21cf7d7645aa678debf38951838a Author: Alex Deucher Date: Mon Jun 5 11:03:59 2017 -0400 drm/amdgpu/gfx9: new queue policy, take first 2 queues of each pipe Instead of taking the first pipe and giving the rest to kfd, take the first 2 queues of each pipe. Effectively, amdgpu and amdkfd own the same number of queues. But because the queues are spread over multiple pipes the hardware will be able to better handle concurrent compute workloads. amdgpu goes from 1 pipe to 4 pipes, i.e. from 1 compute threads to 4 amdkfd goes from 3 pipe to 4 pipes, i.e. from 3 compute threads to 4 gfx9 was missed when this patch set was rebased to include gfx9. Acked-by: Tom St Denis Acked-by: Christian König Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1361f45531e7bd820182c70306f79234088d2a5b Author: Alex Deucher Date: Mon Jun 5 10:58:56 2017 -0400 drm/amdgpu/gfx9: allocate queues horizontally across pipes Pipes provide better concurrency than queues, therefore we want to make sure that apps use queues from different pipes whenever possible. Optimize for the trivial case where an app will consume rings in order, therefore we don't want adjacent rings to belong to the same pipe. gfx9 was missed when these patches were rebased. Reviewed-by: Tom St Denis Acked-by: Christian König Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 115 +++++++++++++++------------------- 1 file changed, 52 insertions(+), 63 deletions(-) commit b1e8b9c5b19c58e3159c2acc77167f4a4c74621f Author: Hawking Zhang Date: Tue Jun 6 16:25:44 2017 +0800 drm/amd/powerplay: fix memory leak in cz_hwmgr backend vddc_dep_on_dal_pwrl is allocated and initialized in cz_hwmgr_backend_init Thus free the memory in cz_hwmgr_backend_fini Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 95ef1f53c5fac7f32225a17a08e4aed320ac649a Author: Hawking Zhang Date: Tue Jun 6 16:19:34 2017 +0800 drm/amd/powerplay: fix memory leak in rv_hwmgr backend vddc_dep_on_dal_pwrl and vq_budgeting_table are allocated and initialized in rv_hwmgr_backend_init. Thus free the memory in rv_hwmgr_backend_fini Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit dd4e2237dce92f97e88385916d5f9d9b30252a46 Author: Eric Huang Date: Fri Jun 2 10:57:24 2017 -0400 drm/amd/powerplay: add sclk and mclk overdrive for vega10 For overclocking sclk and mclk. Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 148 ++++++++++++++++++--- 1 file changed, 133 insertions(+), 15 deletions(-) commit d0856f3ad5af1e2487df97fa667307982c89b717 Author: Rex Zhu Date: Fri Jun 2 20:04:40 2017 +0800 drm/amd/powerplay: fix populate dpm level failed when s3 on vega10. As the min clk may be large than boot level can support. in this case, just ignore the min clk. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit b9509c80dfcd3452d645fbc702916d6e8ffb7a4d Author: Huang Rui Date: Thu Jun 1 15:33:26 2017 +0800 drm/amdgpu: update to use RREG32_SOC15/WREG32_SOC15 for gmc9 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2a4191833eda0d934b5d3e26b28bb2a1225c8dcf Author: Huang Rui Date: Thu Jun 1 15:30:04 2017 +0800 drm/amdgpu: update to use RREG32_SOC15/WREG32_SOC15 for mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 177 +++++++++++++++----------------- 1 file changed, 83 insertions(+), 94 deletions(-) commit 89f99cebc4bd32a5d3cb457cfe29c9e59a53545e Author: Huang Rui Date: Thu Jun 1 15:15:28 2017 +0800 drm/amdgpu: update to use RREG32_SOC15/WREG32_SOC15 for gfxhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 141 ++++++++++++++----------------- 1 file changed, 64 insertions(+), 77 deletions(-) commit 916910ad916a5c63dcd724a557bab092abdb9e7b Author: Huang Rui Date: Wed May 31 10:35:42 2017 +0800 drm/amdgpu: fix the gart table cleared issue for S3 Something writes over the first 8 MB so reserve this on vega10 until we root cause it. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++++ 6 files changed, 14 insertions(+), 1 deletion(-) commit a0bae3577f46f6b61ccfa4cb0772fd804be1de96 Author: Huang Rui Date: Wed May 3 09:52:06 2017 +0800 drm/amdgpu: add ip block number prints User is able to follow the ip block number to write the ip_block_mask for selecting the one which user would like to enable. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) commit ed8cf00ce4dcdd7b50bf094d8015d8839ce770f3 Author: Huang Rui Date: Wed May 3 09:40:17 2017 +0800 drm/amdgpu: add ip name print for selecting ips with ip_block_mask Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1191d110c31bde9683f3871e49466eb799ebdc0f Author: Huang Rui Date: Wed May 31 23:49:46 2017 +0800 drm/amdgpu: remove mmhub ip Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 93 ------------------------------ drivers/gpu/drm/amd/amdgpu/soc15.c | 2 - drivers/gpu/drm/amd/include/amd_shared.h | 1 - 4 files changed, 97 deletions(-) commit 373f59232546f0450d0898dfb858a18e4b17e5d7 Author: Huang Rui Date: Wed May 31 23:46:26 2017 +0800 drm/amdgpu: remove gfxhub ip Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 93 ------------------------------ drivers/gpu/drm/amd/amdgpu/soc15.c | 2 - drivers/gpu/drm/amd/include/amd_shared.h | 1 - 4 files changed, 97 deletions(-) commit 13052be59a301ab4cf10f614f0abdbce6b384c49 Author: Huang Rui Date: Wed May 31 23:35:44 2017 +0800 drm/amdgpu: export mmhub get clockgating into gmc Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 +--- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) commit d5583d4f69c4db863d4d56ba2a3ec2333220f864 Author: Huang Rui Date: Wed May 31 23:13:34 2017 +0800 drm/amdgpu: export mmhub set clockgating into gmc Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 12 ++++++++---- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h | 2 ++ 3 files changed, 13 insertions(+), 5 deletions(-) commit 77f6c76370632570870bee6793958488316e1732 Author: Huang Rui Date: Wed May 31 22:59:18 2017 +0800 drm/amdgpu: export mmhub sw_init into gmc Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 + drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 27 +++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h | 1 + 3 files changed, 17 insertions(+), 12 deletions(-) commit 0c8c0847cc68e33ddececfbfdffc3ef8dec4e677 Author: Huang Rui Date: Wed May 31 22:57:18 2017 +0800 drm/amdgpu: export gfxhub sw_init into gmc Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 26 ++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 ++ 3 files changed, 17 insertions(+), 12 deletions(-) commit 1e4eccdaf293695f4781ce8b08d3b542d87173c5 Author: Huang Rui Date: Wed May 31 22:32:35 2017 +0800 drm/amdgpu: fix to miss program invalidation at resume This patch moves invalidation into gart enable function from hw_init. Because we would like align the sequence calling between init and resume. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 27 +++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 27 +++++++++++++++------------ 2 files changed, 30 insertions(+), 24 deletions(-) commit 3dff4cc4b0f99f039d41ff86c3503372f9719124 Author: Huang Rui Date: Wed May 31 22:17:11 2017 +0800 drm/amdgpu: abstract setup vmid config for gfxhub/mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 51 ++++++++++++++++--------------- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 52 +++++++++++++++++--------------- 2 files changed, 55 insertions(+), 48 deletions(-) commit d5c87390f1a0e82c3ce4ab8d7ba8a323e8729484 Author: Huang Rui Date: Wed May 31 21:52:00 2017 +0800 drm/amdgpu: abstract disable identity aperture for gfxhub/mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 37 ++++++++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 36 +++++++++++++++++-------------- 2 files changed, 41 insertions(+), 32 deletions(-) commit 02c4704bd2c69606557ea98442af72920a242f92 Author: Huang Rui Date: Wed May 31 21:39:10 2017 +0800 drm/amdgpu: abstract system domain enablement for gfxhub/mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 22 ++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 27 ++++++++++++++++----------- 2 files changed, 32 insertions(+), 17 deletions(-) commit 41f6f3111115e6a3d8280d04134d11e75b5c19d0 Author: Huang Rui Date: Wed May 31 18:07:48 2017 +0800 drm/amdgpu: abstract cache initialization for gfxhub/mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 72 +++++++++++--------------- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 88 +++++++++++--------------------- 2 files changed, 62 insertions(+), 98 deletions(-) commit 342698393981e2c9d990c62cb613524e68668378 Author: Huang Rui Date: Wed May 31 17:19:01 2017 +0800 drm/amdgpu: abstract TLB initialization for gfxhub/mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 51 ++++++++++++++------------------ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 22 ++++++++++++++ 2 files changed, 44 insertions(+), 29 deletions(-) commit fc4b884b269f7bc06e9615db33be4e617eb90ae9 Author: Huang Rui Date: Wed May 31 17:04:28 2017 +0800 drm/amdgpu: abstract system aperture initialization for gfxhub/mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 58 ++++++++++--------- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 98 +++++++++++++++----------------- 2 files changed, 77 insertions(+), 79 deletions(-) commit 9bbad6fda00baa8680554086c67b93f7ae72de3b Author: Huang Rui Date: Wed May 31 16:40:14 2017 +0800 drm/amdgpu: abstract gart aperture initialization for gfxhub/mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 37 +++++++++++++++++--------------- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 35 +++++++++++++++++------------- 2 files changed, 40 insertions(+), 32 deletions(-) commit a51dca4f21728ba24c10eb39e40200924c0ba083 Author: Huang Rui Date: Wed May 31 16:20:48 2017 +0800 drm/amdgpu: abstract gart table initialization for gfxhub/mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 34 ++++++++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 34 ++++++++++++++++++++------------ 2 files changed, 42 insertions(+), 26 deletions(-) commit 92046578ac88e0a93f8ef03240e6c832b0189aa7 Author: Daniel Borkmann Date: Tue Jun 6 18:38:04 2017 +0200 bpf: cgroup skb progs cannot access ld_abs/ind Commit fb9a307d11d6 ("bpf: Allow CGROUP_SKB eBPF program to access sk_buff") enabled programs of BPF_PROG_TYPE_CGROUP_SKB type to use ld_abs/ind instructions. However, at this point, we cannot use them, since offsets relative to SKF_LL_OFF will end up pointing skb_mac_header(skb) out of bounds since in the egress path it is not yet set at that point in time, but only after __dev_queue_xmit() did a general reset on the mac header. bpf_internal_load_pointer_neg_helper() will then end up reading data from a wrong offset. BPF_PROG_TYPE_CGROUP_SKB programs can use bpf_skb_load_bytes() already to access packet data, which is also more flexible than the insns carried over from cBPF. Fixes: fb9a307d11d6 ("bpf: Allow CGROUP_SKB eBPF program to access sk_buff") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Chenbo Feng Signed-off-by: David S. Miller kernel/bpf/verifier.c | 1 - 1 file changed, 1 deletion(-) commit feec084a7cf49adb4a87bea9867fb2ba99821f48 Author: Jason Wang Date: Tue Jun 6 14:09:49 2017 +0800 tun: use symmetric hash Tun actually expects a symmetric hash for queue selecting to work correctly, otherwise packets belongs to a single flow may be redirected to the wrong queue. So this patch switch to use __skb_get_hash_symmetric(). Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5461bd41fd93829fdd726c01f43799c743aba9a0 Author: Vivien Didelot Date: Mon Jun 5 18:17:16 2017 -0400 net: dsa: mv88e6xxx: fix 6085 frame mode masking The register bits used for the frame mode were masked with DSA (0x1) instead of the mask value (0x3) in the 6085 implementation of port_set_frame_mode. Fix this. Fixes: 56995cbc3540 ("net: dsa: mv88e6xxx: Refactor CPU and DSA port setup") Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fb05e0dd32e566facb96ea61a48c7488daa5ac3 Author: Steven Toth Date: Tue Jun 6 09:30:27 2017 -0300 [media] saa7164: fix double fetch PCIe access condition Avoid a double fetch by reusing the values from the prior transfer. Originally reported via https://bugzilla.kernel.org/show_bug.cgi?id=195559 Thanks to Pengfei Wang for reporting. Signed-off-by: Steven Toth Reported-by: Pengfei Wang Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7164/saa7164-bus.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 9e9e6a78143bbb6cb9cffd29ab48d5f32def4e20 Author: Pavel Machek Date: Sat May 27 05:12:40 2017 -0300 [media] Doc*/media/uapi: fix control name V4L2_CID_EXPOSURE_BIAS does not exist, fix documentation. Signed-off-by: Pavel Machek Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8946ab3a4cb46abe0113a267857fdb32b05a3f23 Author: Nori, Sekhar Date: Fri May 26 07:55:27 2017 -0300 [media] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video For both BT.656 and BT.1120 video, the pixel format used by VPIF is Y/CbCr 4:2:2 in semi-planar format (Luma in one plane and Chroma in another). This corresponds to NV16 pixel format. This is documented in section 36.2.3 of OMAP-L138 Technical Reference Manual, SPRUH77A. The VPIF driver incorrectly sets the default format to V4L2_PIX_FMT_YUV422P. Fix it. Reported-by: Alejandro Hernandez Signed-off-by: Sekhar Nori Acked-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif_capture.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b14ac545688d8cc4b2b707d71d106799ad476964 Author: Philipp Zabel Date: Mon May 22 13:34:48 2017 -0300 [media] coda: improve colorimetry handling The hardware codec is not colorspace aware. We should trust userspace to set the correct colorimetry information on the OUTPUT queue and mirror the exact same setting on the CAPTURE queue. There is no reason to restrict colorspace to JPEG or REC709 only. Also, set the default colorspace, as returned by calling VIDIOC_TRY/S_FMT with V4L2_COLORSPACE_DEFAULT, initially. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 51 ++++++++++++++++++++++--------- drivers/media/platform/coda/coda.h | 3 ++ 2 files changed, 39 insertions(+), 15 deletions(-) commit ce1ec5c07e0671cc6b5961bba9f740bb951d33f7 Author: Ulrich Hecht Date: Fri May 19 10:07:02 2017 -0300 [media] media: adv7180: add adv7180cp, adv7180st compatible strings Used to differentiate between models with 3 and 6 inputs. Signed-off-by: Ulrich Hecht Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7180.c | 2 ++ 1 file changed, 2 insertions(+) commit da73ad2d53b5fe77cd70b958bb6c54d641473e06 Author: Ulrich Hecht Date: Fri May 19 10:07:03 2017 -0300 [media] media: adv7180: Add adv7180cp, adv7180st bindings To differentiate between two classes of chip packages that have different numbers of input ports. Signed-off-by: Ulrich Hecht Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/i2c/adv7180.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e09c3481d91652de135295ac3bd6505fb2b32613 Author: Niklas Söderlund Date: Tue May 23 21:15:40 2017 -0300 [media] rcar-vin: fix bug in pixelformat selection If the requested pixelformat is not supported fallback to the default format, do not revert the entire format. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 8afb72eda5f3f6f032a3b95b9ea59db2e1e2fcfc Author: Niklas Söderlund Date: Tue May 23 21:15:39 2017 -0300 [media] rcar-vin: add missing error check to propagate error The return value of __rvin_try_format_source is not checked, add a check and propagate the error. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f8a668f72e79a2ee7c1aef7d36d3b59f9d4cf9a5 Author: Niklas Söderlund Date: Tue May 23 21:15:37 2017 -0300 [media] rcar-vin: remove subdevice matching from bind and unbind callbacks There is only one subdevice registered with the async framework so there is no need for the driver to check which subdevice is bound or unbound. Remove these checks since the async framework preforms this. Signed-off-by: Niklas Söderlund [hans.verkuil@cisco.com: fix typo: surce -> source] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-core.c | 40 +++++++++++------------------ 1 file changed, 15 insertions(+), 25 deletions(-) commit 286556c0b63a91d48770d5979e6653656235dbb0 Merge: 8ea4fae 95b9afd Author: David S. Miller Date: Tue Jun 6 15:41:25 2017 -0400 Merge branch 'bpf-prog-map-ID' Martin KaFai Lau says: ==================== Introduce bpf ID This patch series: 1) Introduce ID for both bpf_prog and bpf_map. 2) Add bpf commands to iterate the prog IDs and map IDs of the system. 3) Add bpf commands to get a prog/map fd from an ID 4) Add bpf command to get prog/map info from a fd. The prog/map info is a jump start in this patchset and it is not meant to be a complete list. They can be extended in the future patches. v3: - I suspect v2 may not have applied cleanly. In particular, patch 1 has conflict with a recent change in struct bpf_prog_aux introduced at a similar time frame: 8726679a0fa3 ("bpf: teach verifier to track stack depth") v3 should have fixed it. v2: Compiler warning fixes: - Remove lockdep_is_held() usage. Add comment to explain the lock situation instead. - Add static for idr related variables - Add __user to the uattr param in bpf_prog_get_info_by_fd() and bpf_map_get_info_by_fd(). ==================== Signed-off-by: David S. Miller commit 95b9afd3987f91c09151158279e165276a95c597 Author: Martin KaFai Lau Date: Mon Jun 5 12:15:53 2017 -0700 bpf: Test for bpf ID Add test to exercise the bpf_prog/map id generation, bpf_(prog|map)_get_next_id(), bpf_(prog|map)_get_fd_by_id() and bpf_get_obj_info_by_fd(). Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/include/uapi/linux/bpf.h | 41 +++++++ tools/lib/bpf/bpf.c | 68 +++++++++++ tools/lib/bpf/bpf.h | 5 + tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_obj_id.c | 35 ++++++ tools/testing/selftests/bpf/test_progs.c | 191 ++++++++++++++++++++++++++++++ 6 files changed, 341 insertions(+), 1 deletion(-) commit 1e270976908686ec25fb91b8a34145be54137976 Author: Martin KaFai Lau Date: Mon Jun 5 12:15:52 2017 -0700 bpf: Add BPF_OBJ_GET_INFO_BY_FD A single BPF_OBJ_GET_INFO_BY_FD cmd is used to obtain the info for both bpf_prog and bpf_map. The kernel can figure out the fd is associated with a bpf_prog or bpf_map. The suggested struct bpf_prog_info and struct bpf_map_info are not meant to be a complete list and it is not the goal of this patch. New fields can be added in the future patch. The focus of this patch is to create the interface, BPF_OBJ_GET_INFO_BY_FD cmd for exposing the bpf_prog's and bpf_map's info. The obj's info, which will be extended (and get bigger) over time, is separated from the bpf_attr to avoid bloating the bpf_attr. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/filter.h | 2 - include/uapi/linux/bpf.h | 28 ++++++++ kernel/bpf/syscall.c | 163 ++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 174 insertions(+), 19 deletions(-) commit 783d28dd11f68fb25d1f2e0de7c42336394ef128 Author: Martin KaFai Lau Date: Mon Jun 5 12:15:51 2017 -0700 bpf: Add jited_len to struct bpf_prog Add jited_len to struct bpf_prog. It will be useful for the struct bpf_prog_info which will be added in the later patch. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 1 + arch/powerpc/net/bpf_jit_comp64.c | 1 + arch/s390/net/bpf_jit_comp.c | 1 + arch/sparc/net/bpf_jit_comp_64.c | 1 + arch/x86/net/bpf_jit_comp.c | 1 + include/linux/filter.h | 1 + 6 files changed, 6 insertions(+) commit bd5f5f4ecb78e2698dad655645b6d6a2f7012a8c Author: Martin KaFai Lau Date: Mon Jun 5 12:15:50 2017 -0700 bpf: Add BPF_MAP_GET_FD_BY_ID Add BPF_MAP_GET_FD_BY_ID command to allow user to get a fd from a bpf_map's ID. bpf_map_inc_not_zero() is added and is called with map_idr_lock held. __bpf_map_put() is also added which has the 'bool do_idr_lock' param to decide if the map_idr_lock should be acquired when freeing the map->id. In the error path of bpf_map_inc_not_zero(), it may have to call __bpf_map_put(map, false) which does not need to take the map_idr_lock when freeing the map->id. It is currently limited to CAP_SYS_ADMIN which we can consider to lift it in followup patches. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 2 + kernel/bpf/syscall.c | 95 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 87 insertions(+), 10 deletions(-) commit b16d9aa4c2b90af8d2c3201e245150f8c430c3bc Author: Martin KaFai Lau Date: Mon Jun 5 12:15:49 2017 -0700 bpf: Add BPF_PROG_GET_FD_BY_ID Add BPF_PROG_GET_FD_BY_ID command to allow user to get a fd from a bpf_prog's ID. bpf_prog_inc_not_zero() is added and is called with prog_idr_lock held. __bpf_prog_put() is also added which has the 'bool do_idr_lock' param to decide if the prog_idr_lock should be acquired when freeing the prog->id. In the error path of bpf_prog_inc_not_zero(), it may have to call __bpf_prog_put(map, false) which does not need to take the prog_idr_lock when freeing the prog->id. It is currently limited to CAP_SYS_ADMIN which we can consider to lift it in followup patches. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 8 +++-- kernel/bpf/syscall.c | 91 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 87 insertions(+), 12 deletions(-) commit 34ad5580f8f9c86cb273ebea25c149613cd1667e Author: Martin KaFai Lau Date: Mon Jun 5 12:15:48 2017 -0700 bpf: Add BPF_(PROG|MAP)_GET_NEXT_ID command This patch adds BPF_PROG_GET_NEXT_ID and BPF_MAP_GET_NEXT_ID to allow userspace to iterate all bpf_prog IDs and bpf_map IDs. The API is trying to be consistent with the existing BPF_MAP_GET_NEXT_KEY. It is currently limited to CAP_SYS_ADMIN which we can consider to lift it in followup patches. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 7 +++++++ kernel/bpf/syscall.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit f3f1c054c288bb6e503005e6d73611151ed20e91 Author: Martin KaFai Lau Date: Mon Jun 5 12:15:47 2017 -0700 bpf: Introduce bpf_map ID This patch generates an unique ID for each created bpf_map. The approach is similar to the earlier patch for bpf_prog ID. It is worth to note that the bpf_map's ID and bpf_prog's ID are in two independent ID spaces and both have the same valid range: [1, INT_MAX). Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 1 + kernel/bpf/syscall.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) commit dc4bb0e2356149aee4cdae061936f3bbdd45595c Author: Martin KaFai Lau Date: Mon Jun 5 12:15:46 2017 -0700 bpf: Introduce bpf_prog ID This patch generates an unique ID for each BPF_PROG_LOAD-ed prog. It is worth to note that each BPF_PROG_LOAD-ed prog will have a different ID even they have the same bpf instructions. The ID is generated by the existing idr_alloc_cyclic(). The ID is ranged from [1, INT_MAX). It is allocated in cyclic manner, so an ID will get reused every 2 billion BPF_PROG_LOAD. The bpf_prog_alloc_id() is done after bpf_prog_select_runtime() because the jit process may have allocated a new prog. Hence, we need to ensure the value of pointer 'prog' will not be changed any more before storing the prog to the prog_idr. After bpf_prog_select_runtime(), the prog is read-only. Hence, the id is stored in 'struct bpf_prog_aux'. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 1 + kernel/bpf/syscall.c | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) commit 8ea4fae926afd81f4d7fd43444562afc8629f77c Author: Ganesh Goudar Date: Mon Jun 5 18:34:20 2017 +0530 cxgb4: implement ndo_set_vf_rate() Implement ndo_set_vf_rate() for mgmt interface to support rate-limiting of VF traffic using 'ip' command. Based on the original work of Kumar Sanghvi Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 106 ++++++++++++++++++++++++ 2 files changed, 107 insertions(+) commit 4f5a98410d29bf87f587b19f5ae4e244b1ed4e18 Author: Joe Perches Date: Mon Jun 5 05:22:50 2017 -0700 ppp: mppe: Use vsnprintf extension %phN Using this extension reduces the object size. $ size drivers/net/ppp/ppp_mppe.o* text data bss dec hex filename 5683 216 8 5907 1713 drivers/net/ppp/ppp_mppe.o.new 5808 216 8 6032 1790 drivers/net/ppp/ppp_mppe.o.old Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ppp/ppp_mppe.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit f8fe99754673719ab791713a676bf27dae616fbc Author: yuval.shaia@oracle.com Date: Mon Jun 5 10:18:40 2017 +0300 net: phy: Delete unused function phy_ethtool_gset It's unused, so remove it. Signed-off-by: Yuval Shaia Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/networking/phy.txt | 1 - drivers/net/phy/phy.c | 24 ------------------------ include/linux/phy.h | 1 - 3 files changed, 26 deletions(-) commit c13be1d942c1e9c2250370f4dfc46031ade0802a Merge: cc5d0db 34a730a Author: Mark Brown Date: Tue Jun 6 20:10:47 2017 +0100 Merge branch 'topic/lzo' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regmap-1wire commit cb42b64838654df6e8767d2f4eb8b59dfcd414c5 Author: Axel Lin Date: Sun May 28 14:02:17 2017 +0800 regulator: bd9571mwv: Statize local symbols These functions are only used by this driver, make them static. Signed-off-by: Axel Lin Acked-by: Marek Vasut Signed-off-by: Mark Brown drivers/regulator/bd9571mwv-regulator.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6aba9c65649e5ef137bce7a958c0749f13af88a1 Author: Baruch Siach Date: Tue May 30 08:33:30 2017 +0300 spi: atmel: print version only after successful registration Don't print the version at the beginning of atmel_spi_probe(). This avoids spamming the log whenever a deferred probe runs. Signed-off-by: Baruch Siach Acked-by: Nicolas Ferre Signed-off-by: Mark Brown drivers/spi/spi-atmel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fc0b2acc754a183aa79e2abb8bca8fd915832694 Author: Jarkko Nikula Date: Tue May 30 17:31:21 2017 +0300 spi: pxa2xx: Add support for Intel Cannonlake Intel Cannonlake LPSS SPI has up to four chip selects per port like in Broxton and is clocked like Sunrisepoint and Kaby Lake. Add a new type LPSS_CNL_SSP and configuration that enable runtime chip select detection and use the same FIFO thresholds than in Sunrisepoint. Patch adds support for both Cannonlake SoC and PCH. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 22 ++++++++++++++++++++++ include/linux/pxa2xx_ssp.h | 1 + 2 files changed, 23 insertions(+) commit e8883cb61aa0a91980222e5e9d114100783eb7e2 Author: Dharageswari R Date: Wed May 31 10:30:26 2017 +0530 ASoC: Intel: Boards: Add 4-channel DMIC fixup. This patch adds a 4-channel dmic fixup so that DMIC copier will receive 4 channel data and further selection will be done by mic-select module. Signed-off-by: Dharageswari R Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_rt298.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7a1b749b34e8238acae8a039a8f6822f4f4e2061 Author: Dharageswari R Date: Wed May 31 10:30:25 2017 +0530 ASoC: Intel: Skylake: Add enum control for mic selection User may prefer to select data from particular mics. A mic-select module in DSP allows this selection. Create possible enum controls to allow user to select a combination of mics to capture data from. Based on the user selection, parameters are generated and passed to mic-select module during init. Signed-off-by: Dharageswari R Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 159 +++++++++++++++++++++++++++ sound/soc/intel/skylake/skl-topology.h | 20 ++++ sound/soc/intel/skylake/skl-tplg-interface.h | 1 + 3 files changed, 180 insertions(+) commit db6879efb9d1d48ff9c2bd49dde05ecf757d73cf Author: Dharageswari R Date: Wed May 31 10:30:24 2017 +0530 ASoC: Intel: Skylake: Add mic-select module type mic-select module is a DSP module, which is used to select one or more input channels. This patch adds mic-select module type. Signed-off-by: Dharageswari R Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 2 ++ sound/soc/intel/skylake/skl-tplg-interface.h | 1 + 2 files changed, 3 insertions(+) commit 98cf2c03b467fa67df58cb52adeb85b425cabcb2 Author: Douglas Anderson Date: Tue May 30 09:51:30 2017 -0700 ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used In commit 9a075265c6dc ("ASoC: Intel: sst: Remove unused function sst_restore_shim64()"), we deleted the sst_restore_shim64() since it was never used. ...but a quick look at the code shows that we should also be able to remove the sst_save_shim64() function and the structure members we were storing data in. Once we delete sst_save_shim64() there are no longer any users of the 'sst_shim_regs64' structure. That means we can delete it completely and also avoid allocating memory for it. This saves a whopping 136 bytes of devm allocated memory. We also get the nice benefit of avoiding an error path in the init code. Note that the saving code that we're removing (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson Reviewed-by: Andy Shevchenko Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.c | 19 ------------------- sound/soc/intel/atom/sst/sst.h | 22 ---------------------- sound/soc/intel/atom/sst/sst_acpi.c | 14 -------------- 3 files changed, 55 deletions(-) commit d27ae103bf89a0ed28976da58a8f5e1c4c85ecb5 Author: Leilk Liu Date: Fri Jun 2 15:18:41 2017 +0800 spi: mediatek: Add bindings for mediatek MT7622 soc platform This patch adds a DT binding documentation for the MT7622 soc. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 + 1 file changed, 1 insertion(+) commit dc43f46a9b6988a40d4e11d05b8107d4546c61b9 Author: Charles Keepax Date: Wed May 31 16:51:13 2017 +0100 ASoC: cs35l35: Add additional delay for reset Very fast systems may violate the minimum constraints for time the reset line needs to remain low, or communicate with the device too soon after releasing the reset. Fix this by adding some delays in to allow the chip to properly reset, also factor out the reset into a function as it is likely it will be re-used in later additions to the driver. Signed-off-by: Charles Keepax Acked-by: Paul Handrigan Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit a00cebf51d5ceed8ba9f6fac5fb189b38cd5a7c2 Author: Peter Rosin Date: Wed May 31 14:32:33 2017 +0200 ASoC: atmel: tse850: fix off-by-one in the "ANA" enumeration count At some point I added the "Low" entry at the beginning of the array without bumping the enumeration count from 9 to 10. Fix this. While at it, fix the anti-pattern for the other enumeration (used by MUX{1,2}). Fixes: aa43112445f0 ("ASoC: atmel: tse850: add ASoC driver for the Axentia TSE-850") Signed-off-by: Peter Rosin Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/atmel/tse850-pcm5142.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f440c48c5d5a11f1892819c409e183b2056e4ba Author: Geert Uytterhoeven Date: Thu Jun 1 12:36:15 2017 +0200 ASoC: rsnd: Document optional reset properties Document the optional properties for describing module resets, to support resetting these modules on R-Car Gen2 and Gen3. Note that the audio module has resets for the Serial Sound Interfaces only. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 3 +++ 1 file changed, 3 insertions(+) commit 2e312f6cdb02a2707870172473b9dee34f620b93 Author: Sascha Hauer Date: Fri Jun 2 07:38:04 2017 +0200 spi: imx: rename 'bpw' variables 'bpw' is ambiguous and only the context makes sure if bytes_per_word or bits_per_word is meant. Use the full names instead to make reading the code easier. Signed-off-by: Sascha Hauer Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 65017ee2cd69bfd9ccdaa1f61b220e9717408106 Author: Sascha Hauer Date: Fri Jun 2 07:38:03 2017 +0200 spi: imx: remove bytes_per_word from private driver struct We already have bits_per_word in the private driver struct and bytes_per_word can be calculated from it, so remove bits_per_word. Signed-off-by: Sascha Hauer Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit d6be7d1db51799fb510458b8ede6e5bef96ab1f0 Author: Sascha Hauer Date: Fri Jun 2 07:38:02 2017 +0200 spi: imx: drop bogus unnecessary dma config It's unnecessary to call spi_imx_dma_configure() from probe(). It will be called later anyway again when an actual DMA transfer is prepared. Signed-off-by: Sascha Hauer Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 2 -- 1 file changed, 2 deletions(-) commit d52345b6cf8ecd2c765edf81f49fa62483dd6437 Author: Sascha Hauer Date: Fri Jun 2 07:38:01 2017 +0200 spi: imx: put struct spi_imx_config members into driver private struct struct spi_imx_config used to hold data specific to the current transfer. However, other data is in the drivers private data struct. Let's drop struct spi_imx_config and put the variables into the drivers private data struct aswell. Signed-off-by: Sascha Hauer Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 50 +++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) commit 494f3193bd8ca6a15a813bf0f8b5552ec0d173f3 Author: Sascha Hauer Date: Fri Jun 2 07:38:00 2017 +0200 spi: imx: Drop unnecessary check __spi_validate makes sure that every transfer has a valid bits_per_word and speed_hz setting. We do not need to fallback to values from the spi_device. Signed-off-by: Sascha Hauer Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 7 ------- 1 file changed, 7 deletions(-) commit abb1ff195a21094f3bfb1cf8d425ff360d8a89ee Author: Sascha Hauer Date: Fri Jun 2 07:37:59 2017 +0200 spi: imx: Nothing to do in setupxfer when transfer is NULL When the spi_transfer given in spi_imx_setupxfer is NULL then we have nothing to do. Bail out early in this case so that we do not have to test for t != NULL multiple times later. Signed-off-by: Sascha Hauer Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cc5d0db390b0ff0f5da95b643a2b070da15a9c3e Author: Alex A. Mihaylov Date: Fri Jun 2 10:06:27 2017 +0300 regmap: Add 1-Wire bus support Add basic support regmap (register map access) API for 1-Wire bus Signed-off-by: Mark Brown drivers/base/regmap/Kconfig | 6 +- drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-w1.c | 245 ++++++++++++++++++++++++++++++++++++++++ include/linux/regmap.h | 34 ++++++ 4 files changed, 285 insertions(+), 1 deletion(-) commit 34a730aa74c7c743f4ca9635e0d0b2479d6ed53c Author: Jonas Gorski Date: Fri Jun 2 15:15:37 2017 +0200 regmap: make LZO cache optional Commit 2cbbb579bcbe3 ("regmap: Add the LZO cache support") added support for LZO compression in regcache, but there were never any users added afterwards. Since LZO support itself has its own size, it currently is rather a deoptimization. So make it optional by introducing a symbol that can be selected by drivers wanting to make use of it. Saves e.g. ~46 kB on MIPS (size of LZO support + regcache LZO code). Signed-off-by: Jonas Gorski Signed-off-by: Mark Brown drivers/base/regmap/Kconfig | 5 ++++- drivers/base/regmap/Makefile | 3 ++- drivers/base/regmap/regcache.c | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) commit 8e16638256425faf74c5b9ffa40e5f0d9aa4413b Author: Kuninori Morimoto Date: Mon Jun 5 04:28:45 2017 +0000 ASoC: simple-card-utils: share same dev_dbg() for sysclk Let's share same debug message for sysclk Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 9 ++++++--- sound/soc/generic/audio-graph-card.c | 7 ------- sound/soc/generic/audio-graph-scu-card.c | 5 ----- sound/soc/generic/simple-card-utils.c | 5 ++++- sound/soc/generic/simple-card.c | 7 ------- sound/soc/generic/simple-scu-card.c | 5 ----- 6 files changed, 10 insertions(+), 28 deletions(-) commit 4579771ebb78aa26831ee3d9617690da5198072c Author: Kuninori Morimoto Date: Mon Jun 5 04:28:29 2017 +0000 ASoC: simple-card-utils: share same dev_dbg() for Dai Name Let's share same debug message for DAI Name Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 1 - sound/soc/generic/simple-card-utils.c | 2 ++ sound/soc/generic/simple-card.c | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) commit aaad9c131b8fcdb493ed64e56cea8ea52977e091 Author: Kuninori Morimoto Date: Mon Jun 5 04:28:12 2017 +0000 ASoC: simple-card-utils: share same dev_dbg() for DAI format Let's share same debug message for DAI format Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 1 - sound/soc/generic/simple-card-utils.c | 2 ++ sound/soc/generic/simple-card.c | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) commit d4dbcb63c8bde48741468cf7c711b76ed3e7fce5 Author: Kuninori Morimoto Date: Mon Jun 5 04:27:56 2017 +0000 ASoC: simple-card-utils: share same dev_dbg() for Card Name Let's share same debug message for Card Name Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-scu-card.c | 2 -- sound/soc/generic/simple-card-utils.c | 2 ++ sound/soc/generic/simple-scu-card.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) commit 35fc3b9ff66b907ca7a75c971decf291adf78131 Author: Arvind Yadav Date: Mon Jun 5 17:36:28 2017 +0530 spi: davinci: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Mark Brown drivers/spi/spi-davinci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2b747a5f04fbb26ad09241506704ddce462e581b Author: Arvind Yadav Date: Mon Jun 5 19:20:40 2017 +0530 spi: davinci: Fix compilation warning. If CONFIG_OF is disable, it'll through compilation warning. drivers/spi/spi-davinci.c: In function ‘spi_davinci_get_pdata’: drivers/spi/spi-davinci.c:880:2: warning: return makes pointer from integer without a cast [enabled by default] return -ENODEV; drivers/spi/spi-davinci.c: In function ‘davinci_spi_probe’: drivers/spi/spi-davinci.c:919:7: warning: assignment makes integer from pointer without a cast [enabled by default] ret = spi_davinci_get_pdata(pdev, dspi); Signed-off-by: Arvind Yadav Changes in v2: Add fix for both the warning. Changes in v1: It has fix for first warning. Signed-off-by: Mark Brown drivers/spi/spi-davinci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8b2840b6daca728cecfa925b50bf638189e2fbca Author: Icenowy Zheng Date: Mon Jun 5 21:27:22 2017 +0800 ASoC: sun4i-codec: Add support for V3s codec The codec in the V3s is similar to the one found on the A31. One key difference is the analog path controls are routed through the PRCM block. This is supported by the sun8i-codec-analog driver, and tied into this codec driver with the audio card's aux_dev. In addition, the V3s does not have LINEIN, LINEOUT, MBIAS and MIC2, MIC3, and the FIFO related registers are like H3. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/sound/sun4i-codec.txt | 11 ++-- sound/soc/sunxi/sun4i-codec.c | 63 ++++++++++++++++++++++ 2 files changed, 70 insertions(+), 4 deletions(-) commit 2cfeaec0ec896bc0b8aad2de28a3de4572c7e4a1 Author: Icenowy Zheng Date: Mon Jun 5 21:27:21 2017 +0800 ASoC: sun8i-codec-analog: add support for V3s SoC The V3s SoC features an analog codec with headphone support but without mic2 and linein. Add support for it. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt | 1 + sound/soc/sunxi/sun8i-codec-analog.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit 50aadc14cee74009c72e7d66954b15f27d45c02f Author: Icenowy Zheng Date: Mon Jun 5 21:27:20 2017 +0800 ASoC: sun8i-codec-analog: prepare a mixer control/widget/route set for V3s Allwinner V3s has an analog codec without MIC2 and Line In, which will need a special set of mixer controls/widgets/routes, otherwise meaningless controls will be exported to userspace and confuse the user. Add the special set, and use it when the SoC has no MIC2 and Line In. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec-analog.c | 101 ++++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) commit 99cacebfba8685bf6c55b2edadc3f2edd7621aeb Author: Corentin Labbe Date: Mon Jun 5 21:21:28 2017 +0200 arm64: allwinner: orangepi-pc2: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI PC2. It uses an external PHY rtl8211e via RGMII. This patch create the needed regulator, emac and phy nodes. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard .../boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 252006cf0da13e65151cd7e7d0d6bb14bc0ca815 Author: Corentin Labbe Date: Wed May 31 09:18:40 2017 +0200 arm: sun8i: orangepi-zero: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI Zero. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8c7ba536e70976e09b148b43be1299abf3cc1560 Author: Corentin Labbe Date: Mon Jun 5 21:21:27 2017 +0200 ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Banana Pi M2+ It uses an external PHY rtl8211e via RGMII. This patch create the needed regulator, emac and phy nodes. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 1dcd0095019aca7533eaeed9475d995a4eb30137 Author: Corentin Labbe Date: Mon Jun 5 21:21:26 2017 +0200 ARM: sun8i: orangepi-plus: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI plus. It uses an external PHY rtl8211e via RGMII. This patch create the needed regulator, emac and phy nodes. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 378af662f8d4a30ceddae1e5c5d1acb6da7f9796 Author: Corentin Labbe Date: Wed May 31 09:18:44 2017 +0200 arm: sun8i: nanopi-neo: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the NanoPi Neo. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 75ee680cbd2e4d0156b94f9fec50076361ab12f2 Author: Corentin Labbe Date: Wed May 31 09:18:43 2017 +0200 arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high On the Orange Pi PC Plus, the polarity of the LEDs on the RJ45 Ethernet port were changed from active low to active high. Signed-off-by: Chen-Yu Tsai Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 +++++ 1 file changed, 5 insertions(+) commit a9992f2dd1890112643a93d621ff5a4c97c55d53 Author: Corentin Labbe Date: Wed May 31 09:18:42 2017 +0200 arm: sun8i: orangepi-2: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI 2. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 25b9c3f58d2917c3e3cb572f4af5b67d562143dd Author: Corentin Labbe Date: Wed May 31 09:18:41 2017 +0200 arm: sun8i: orangepi-one: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI One. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit d342cb6f018a6967e52ff7701beac2ead15530cb Author: Corentin Labbe Date: Wed May 31 09:18:39 2017 +0200 arm: sun8i: orangepi-pc: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI PC. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0eba511a3cac29d6338b22b5b727f40cf8d163df Author: Corentin Labbe Date: Wed May 31 09:18:38 2017 +0200 arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver The dwmac-sun8i is an ethernet MAC hardware that support 10/100/1000 speed. This patch enable the dwmac-sun8i on Allwinner H3/H5 SoC Device-tree. SoC H3/H5 have an internal PHY, so optionals syscon and ephy are set. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit d91d3daf5de90e0118227d8ddcb7bb4ff40c1b91 Author: Corentin Labbe Date: Wed May 31 09:18:37 2017 +0200 arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module This patch add the dt node for the syscon register present on the Allwinner H3/H5 Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock.. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 98d87eb5664b5a39d6dcb66639b6b7e536d71ffb Author: Chen-Yu Tsai Date: Mon Jun 5 17:00:32 2017 +0800 ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros Now that the R_CCU device tree binding headers have been merged, we can convert the raw number references in the device trees to use the defined macros. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit bd8448f732f15b4b160fa8fe200305240c704deb Author: Niklas Söderlund Date: Tue May 23 21:15:36 2017 -0300 [media] rcar-vin: refactor and fold in function after stall handling rework With the driver stopping and starting the stream each time the driver is stalled rvin_capture_off() can be folded in to the only caller. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 82ec4ca9b5c3b1410e2f068d3fbdd41a51c35baf Author: Niklas Söderlund Date: Tue May 23 21:15:35 2017 -0300 [media] rcar-vin: allow switch between capturing modes when stalling If userspace can't feed the driver with buffers as fast as the driver consumes them the driver will stop video capturing and wait for more buffers from userspace, the driver is stalled. Once it have been feed one or more free buffers it will recover from the stall and resume capturing. Instead of continue to capture using the same capture mode as before the stall allow the driver to choose between single and continuous mode based on free buffer availability. Do this by stopping capturing when the driver becomes stalled and restart capturing once it continues. By doing this the capture mode will be evaluated each time the driver is recovering from a stall. This behavior is needed to fix a bug where continuous capturing mode is used, userspace is about to stop the stream and is waiting for the last buffers to be returned from the driver and is not queuing any new buffers. In this case the driver becomes stalled when there are only 3 buffers remaining streaming will never resume since the driver is waiting for userspace to feed it more buffers before it can continue streaming. With this fix the driver will then switch to single capture mode for the last 3 buffers and a deadlock is avoided. The issue can be demonstrated using yavta. $ yavta -f RGB565 -s 640x480 -n 4 --capture=10 /dev/video22 Device /dev/video22 opened. Device `R_Car_VIN' on `platform:e6ef1000.video' (driver 'rcar_vin') supports video, capture, without mplanes. Video format set: RGB565 (50424752) 640x480 (stride 1280) field interlaced buffer size 614400 Video format: RGB565 (50424752) 640x480 (stride 1280) field interlaced buffer size 614400 4 buffers requested. length: 614400 offset: 0 timestamp type/source: mono/EoF Buffer 0/0 mapped at address 0xb6cc7000. length: 614400 offset: 614400 timestamp type/source: mono/EoF Buffer 1/0 mapped at address 0xb6c31000. length: 614400 offset: 1228800 timestamp type/source: mono/EoF Buffer 2/0 mapped at address 0xb6b9b000. length: 614400 offset: 1843200 timestamp type/source: mono/EoF Buffer 3/0 mapped at address 0xb6b05000. 0 (0) [-] interlaced 0 614400 B 38.240285 38.240303 12.421 fps ts mono/EoF 1 (1) [-] interlaced 1 614400 B 38.282329 38.282346 23.785 fps ts mono/EoF 2 (2) [-] interlaced 2 614400 B 38.322324 38.322338 25.003 fps ts mono/EoF 3 (3) [-] interlaced 3 614400 B 38.362318 38.362333 25.004 fps ts mono/EoF 4 (0) [-] interlaced 4 614400 B 38.402313 38.402328 25.003 fps ts mono/EoF 5 (1) [-] interlaced 5 614400 B 38.442307 38.442321 25.004 fps ts mono/EoF 6 (2) [-] interlaced 6 614400 B 38.482301 38.482316 25.004 fps ts mono/EoF 7 (3) [-] interlaced 7 614400 B 38.522295 38.522312 25.004 fps ts mono/EoF 8 (0) [-] interlaced 8 614400 B 38.562290 38.562306 25.003 fps ts mono/EoF This fix also allow the driver to switch to single capture mode if userspace doesn't feed it buffers fast enough. Or the other way around, if userspace suddenly feeds the driver buffers faster it can switch to continues capturing mode. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 996ce3afbe33617c9c21b4a50a92a266d70c0b8b Author: Niklas Söderlund Date: Tue May 23 21:15:34 2017 -0300 [media] rcar-vin: select capture mode based on free buffers Instead of selecting single or continuous capture mode based on how many buffers userspace intends to give us select capture mode based on number of free buffers we can allocate to hardware when the stream is started. This change is a prerequisite to enable the driver to switch from continuous to single capture mode (or the other way around) when the driver is stalled by userspace not feeding it buffers as fast as it consumes it. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 31 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 9e9214478a90bd9ed6db8dd4612c026e74e328ed Author: Niklas Söderlund Date: Tue May 23 21:15:33 2017 -0300 [media] rcar-vin: move functions which acts on hardware This only moves whole structs, defines and functions around, no code is changed inside any function. The reason for moving this code around is to prepare for refactoring and fixing of a start/stop stream bug without having to use forward declarations. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 182 ++++++++++++++--------------- 1 file changed, 91 insertions(+), 91 deletions(-) commit 45a6e6043693c52e98103d423a3c0875cac397be Author: Niklas Söderlund Date: Tue May 23 21:15:32 2017 -0300 [media] rcar-vin: decrease buffers needed to capture It's possible to grab frames using only one buffer, this should never have been set to anything else then 1. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 557d61672f3f5a0f66954602379008e549824ead Author: Niklas Söderlund Date: Tue May 23 21:15:31 2017 -0300 [media] rcar-vin: use pad information when verifying media bus format Use information about pad index when enumerating mbus codes. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-core.c | 1 + 1 file changed, 1 insertion(+) commit f4dbfbc75b6416a07f8106ee4931bfbc9c11f451 Author: Niklas Söderlund Date: Tue May 23 21:15:30 2017 -0300 [media] rcar-vin: move pad lookup to async bound handler Information about pads will be needed when enumerating the media bus codes in the async complete handler which is run before rvin_v4l2_probe(). Move the pad lookup to the async bound handler so they are available when needed. Signed-off-by: Niklas Söderlund [hans.verkuil@cisco.com: fix typo: surce -> source] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-core.c | 30 ++++++++++++++++++++++++++++- drivers/media/platform/rcar-vin/rcar-v4l2.c | 22 --------------------- 2 files changed, 29 insertions(+), 23 deletions(-) commit 5de75b1decb6085f5f91462735ffbe0dd952dc9f Author: Niklas Söderlund Date: Tue May 23 21:15:29 2017 -0300 [media] rcar-vin: refactor pad lookup code The pad lookup code can be broken out to increase readability and to reduce code duplication. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 36 +++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) commit 1eb36419ecc3a93e068f6bff6297a1e6e55fb33d Author: Niklas Söderlund Date: Tue May 23 21:15:28 2017 -0300 [media] rcar-vin: move subdev source and sink pad index to rvin_graph_entity It makes more sense to store the sink and source pads in struct rvin_graph_entity since that contains other subdevice related information. The data type to store pad information in is unsigned int and not int, change this. While we are at it drop the _idx suffix from the names, this never made sense. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 20 ++++++++++---------- drivers/media/platform/rcar-vin/rcar-vin.h | 9 +++++---- 2 files changed, 15 insertions(+), 14 deletions(-) commit bff589be59c50924a9715951160578e570cba5c6 Author: Andy Lutomirski Date: Wed Nov 25 07:53:13 2015 -0800 platform/x86: dell-wmi: Convert to the WMI bus infrastructure Move some initialization out of _init and into _probe. Update signatures and logic to use the wmi bus and device structures. Signed-off-by: Andy Lutomirski [dvhart: drop deprecated sparse_keymap_free, order declarations, add commit msg] Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi.c | 136 +++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 66 deletions(-) commit f9dd82c0ea5588bac5f9ba284c8e609ffd9dfbe5 Author: Darren Hart (VMware) Date: Tue Jun 6 10:07:32 2017 -0700 platform/x86: wmi-bmof: New driver to expose embedded Binary WMI MOF metadata Many laptops (and maybe servers?) have embedded WMI Binary MOF metadata. We do not yet have open-source tools for processing the data, although one is in the works thanks to Pali: https://github.com/pali/bmfdec There is currently no interface to get the data in the first place. By exposing it, we facilitate the development of new tools. This is based on the original work of Andy Lutomirski , but contains several modifications in response to various reviews. Signed-off-by: Darren Hart (VMware) Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/platform/x86/Kconfig | 12 ++++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/wmi-bmof.c | 124 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) commit fd70da6a6267c91fbdda9c560f098cfd52fba00f Author: Darren Hart (VMware) Date: Fri May 19 19:28:36 2017 -0700 platform/x86: wmi: Require query for data blocks, rename writable to setable The Microsoft WMI documentation requires all data blocks to implement the Query Control Method (WQxx). If we encounter a data block not implementing this control method, issue a warning, and ignore the data block. Remove the "readable" attribute as all data blocks must be readable (query-able). Be consistent with the language in the documentation, replace the "writable" attribute with "setable". Simplify (flatten) the control flow of wmi_create_device a bit while we are updating it for the above changes. Signed-off-by: Darren Hart (VMware) Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki drivers/platform/x86/wmi.c | 117 +++++++++++++++++++++++---------------------- include/linux/wmi.h | 7 +-- 2 files changed, 63 insertions(+), 61 deletions(-) commit f63019861cd1192e546397b13f926876a93450fd Author: Andy Lutomirski Date: Tue Dec 29 22:53:51 2015 -0800 platform/x86: wmi: Add an interface for subdrivers to access sibling devices Some subdrivers need to access sibling devices. This gives them a clean way to do so. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 17 +++++++++++++++++ include/linux/wmi.h | 4 ++++ 2 files changed, 21 insertions(+) commit 9599ed919f9bc42ea0bdd49745bc8451019e0447 Author: Andy Lutomirski Date: Fri Nov 27 11:56:02 2015 -0800 platform/x86: wmi: Bind the platform device, not the ACPI node We already have the PNP glue to instantiate platform devices for the ACPI devices that WMI drives. WMI should therefore attach to the platform device, not the ACPI node. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 57 +++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 24 deletions(-) commit 56a370259db4f6204d3514431d1629e0a7135b53 Author: Andy Lutomirski Date: Wed Nov 25 18:19:26 2015 -0800 platform/x86: wmi: Add a new interface to read block data wmi_query_block is unnecessarily indirect. Add a straightforward method for wmi bus drivers to use to read block data. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 54 ++++++++++++++++++++++++++++++++-------------- include/linux/wmi.h | 4 ++++ 2 files changed, 42 insertions(+), 16 deletions(-) commit 1686f5444546c3b53547aa8736afcf05833ed31a Author: Andy Lutomirski Date: Wed Nov 25 17:33:25 2015 -0800 platform/x86: wmi: Incorporate acpi_install_notify_handler As a platform driver, acpi_driver.notify will not be available, so use acpi_install_notify_handler as we will be converting to a platform driver. This gives event drivers a simple way to handle events. It also seems closer to what the Windows docs suggest that Windows does: it sounds like, in Windows, the mapper is responsible for called _WED before dispatching to the subdriver. Signed-off-by: Andy Lutomirski [dvhart: merge two development commits and update commit message] Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 89 +++++++++++++++++++++++++++++++++++++--------- include/linux/wmi.h | 1 + 2 files changed, 73 insertions(+), 17 deletions(-) commit 6ee50aaa9a20c7c11c964c249440857ab58ece36 Author: Darren Hart (VMware) Date: Tue Jun 6 10:13:49 2017 -0700 platform/x86: wmi: Instantiate all devices before adding them At some point, we will want sub-drivers to get references to other devices on the same WMI bus. This change is needed to avoid races. This ends up simplifying the setup code and fixing some leaks, too. This is based on the original work of Andy Lutomirski , but includes several modifications, many in response to review from Michał Kępień : https://www.spinics.net/lists/platform-driver-x86/msg08201.html Signed-off-by: Darren Hart (VMware) Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki drivers/platform/x86/wmi.c | 49 +++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 20 deletions(-) commit d4fc91adfde11c41295d1cf001bdbec5d6879016 Author: Andy Lutomirski Date: Wed Nov 25 14:03:43 2015 -0800 platform/x86: wmi: Probe data objects for read and write capabilities The Dell XPS 13 9350 has one RW data object, one RO data object, and one totally inaccessible data object. Check for the existence of the accessor methods and report in sysfs. The docs also permit WQxx getters for single-instance objects to take no parameters. Probe for that as well to avoid ACPICA warnings about mismatched signatures. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 101 +++++++++++++++++++++++++++++++++++++++++++-- include/linux/wmi.h | 6 +++ 2 files changed, 103 insertions(+), 4 deletions(-) commit d79b10740210c6c686a9256b801e08f7679e04e2 Author: Andy Lutomirski Date: Wed Nov 25 10:01:37 2015 -0800 platform/x86: wmi: Split devices into types and add basic sysfs attributes Divide the "data", "method" and "event" types. All devices get "instance_count" and "expensive" attributes, data and method devices get "object_id" attributes, and event devices get "notify_id" attributes. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 78 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) commit a1c31bcd5772b13b39b028126fa9de918c36cf26 Author: Andy Lutomirski Date: Wed Nov 25 08:24:42 2015 -0800 platform/x86: wmi: Fix error handling when creating devices We have two memory leaks. If guid_already_parsed returned true, we leak the wmi_block. If wmi_create_device failed, we leak the device. Simplify the logic and fix both of them. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 844af950da946cfab227a04b950614da04cb6275 Author: Andy Lutomirski Date: Tue Nov 24 19:49:23 2015 -0800 platform/x86: wmi: Turn WMI into a bus driver WMI is logically a bus: the WMI driver binds to an ACPI node (or more than one), and each instance of the WMI driver enumerates its children and hopes that drivers will attach to the children that are useful. This patch gives WMI a driver model bus type and the ability to match to drivers. The bus itself is a device in the new "wmi_bus" class, and all of the individual WMI devices are slotted into the device hierarchy correctly. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 197 +++++++++++++++++++++++++++++++++++---------- include/linux/wmi.h | 47 +++++++++++ 2 files changed, 201 insertions(+), 43 deletions(-) commit b0e86302973d9e710c722a8436cc7e099d2a5b0d Author: Andy Lutomirski Date: Tue Nov 24 19:50:01 2015 -0800 platform/x86: wmi: Track wmi devices per ACPI device Currently we free all devices when we detach from any ACPI node. Instead, keep track of which node WMI devices are attached to and free them only as needed. While we are at it, match up notifications with the device they came from correctly. This will make our behavior more straightforward on systems with more than one WMI node in the ACPI tables (e.g. the Dell XPS 13 9350). This also adds a warning when GUIDs are not unique. NB: The guid_string parameter in guid_already_parsed was a little-endian binary GUID, not a string. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 58 ++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 22 deletions(-) commit 46492ee4a6ca82e878218059c0f8539c8f9ac14e Author: Andy Lutomirski Date: Tue Nov 24 19:54:46 2015 -0800 platform/x86: wmi: Clean up acpi_wmi_add Rearrange acpi_wmi_add to use Linux's error handling conventions. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 7f5809bf6e2e43953e48e86cb039736a6448e070 Author: Andy Lutomirski Date: Thu Nov 19 14:44:46 2015 -0800 platform/x86: wmi: Pass the acpi_device through to parse_wdg We will need the device to convert to a bus architecture and bind WMI to the platform device. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 0f97ebd1bcc408fe1820e83e6e11b06ce041018f Author: Andy Lutomirski Date: Tue Nov 24 20:15:48 2015 -0800 platform/x86: wmi: Drop "Mapper (un)loaded" messages WMI is just a driver. There is no need to announce when it is loaded. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 3 --- 1 file changed, 3 deletions(-) commit ea30afb4ae9d436e991234b6e07c1f8be5d2349a Merge: 359fce1 c70eb09 Author: David S. Miller Date: Tue Jun 6 13:05:02 2017 -0400 Merge branch 's390-next-updates' Julian Wiedmann says: ==================== s390/net updates please apply the following qeth updates for net-next. Aside from some janitorial changes, this adds early setup for virtualized HiperSockets devices - building upon the code that landed via -net earlier. ==================== Signed-off-by: David S. Miller commit c70eb09dc210b8d6fdd4a93d5bc25d85133fb9d2 Author: Julian Wiedmann Date: Tue Jun 6 14:33:50 2017 +0200 s390/qeth: do early device setup for z/VM IQD NICs qeth currently supports early setup for OSM and OSN devices. This patch adds early setup support for z/VM HiperSockets, since they can only be coupled to L3 networks. Based on an initial version by Dmitriy Lakhvich. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 2 ++ drivers/s390/net/qeth_core_main.c | 44 ++++++++++++++++++++++++++++++--------- drivers/s390/net/qeth_core_sys.c | 2 +- 3 files changed, 37 insertions(+), 11 deletions(-) commit 79a04e40f7f0e968b485a0d0cb12dcffc7f509c6 Author: Ursula Braun Date: Tue Jun 6 14:33:49 2017 +0200 s390/qeth: add support for early L3 device setup Similar to how qeth currently does early L2 setup of OSM and OSN devices, add support for early setup of L3-only devices. This adds a qeth_l3_devtype that contains all core and l3-specific sysfs attributes, so that they can be created in one go while probing. This just adds the infrastructure, exploitation of the support happens in a subsequent patch. Signed-off-by: Ursula Braun Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3.h | 1 + drivers/s390/net/qeth_l3_main.c | 18 +++++++++++++----- drivers/s390/net/qeth_l3_sys.c | 11 +++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) commit cf536ffea99472e043929749508d6656163138a1 Author: Julian Wiedmann Date: Tue Jun 6 14:33:48 2017 +0200 s390/qeth: silence qeth_fix_features() Noting the lack of TSO support on every feature change is just silly, in particular since the requested features might not even affect NETIF_F_TSO. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 664e42ac8b1bc39540ac9d657efa45c3e213e6c2 Author: Julian Wiedmann Date: Tue Jun 6 14:33:47 2017 +0200 s390/qeth: consolidate pack buffer flushing qeth_switch_to_nonpacking_if_needed() contains an open-coded version of qeth_flush_buffers_on_no_pci(). Extract a single helper instead. Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 65 +++++++++++++++------------------------ 1 file changed, 25 insertions(+), 40 deletions(-) commit 84616e86f830490c4bbf93ddc1e374cd61865060 Author: Julian Wiedmann Date: Tue Jun 6 14:33:46 2017 +0200 s390/qeth: add missing strings for IPA return codes commit 76b11f8e270f ("qeth: HiperSockets Network Traffic Analyzer") missed adding the human-readable translations when adding new RCs. Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_mpc.c | 2 ++ 1 file changed, 2 insertions(+) commit 521c10ea2315366192a0641d5a063320685c0db1 Author: Julian Wiedmann Date: Tue Jun 6 14:33:45 2017 +0200 s390/qeth: log bridgeport capabilities Bridgeport is a l2-specific feature, and we should write its capabilities to a debug entry. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 23274596b565f8fba3d07e6cbed1de07947e365d Author: Julian Wiedmann Date: Tue Jun 6 14:33:44 2017 +0200 s390/qeth: query IPv6 IPA support on HiperSockets HiperSocket devices don't need the full IPv6 initialization, but we should still query the supported assists for logging purposes. Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 94a9c981f7bdfdb6d092d1f92546bf61552c95d7 Author: Julian Wiedmann Date: Tue Jun 6 14:33:43 2017 +0200 s390/qeth: remove skb_is_nonlinear() check on IQD qeth doesn't advertise NETIF_F_SG for L3 IQDs. So trust the stack to not hand us any nonlinear skbs, and remove an always-true condition. With the fact that data_offset < 0 is no longer possible on IQDs, apply a small cleanup to subsequent code. Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 4845b93ff2c9247f5fed88182ea71dba370e76bb Author: Julian Wiedmann Date: Tue Jun 6 14:33:42 2017 +0200 s390/qeth: remove support for IPA_IP_FRAGMENTATION This Assist was never actually implemented in any hardware, so just remove the leftovers. Signed-off-by: Julian Wiedmann Reviewed-by: Hans Wippel Reviewed-by: Thomas Richter Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 3 +-- drivers/s390/net/qeth_core_mpc.h | 2 +- drivers/s390/net/qeth_l3_main.c | 26 -------------------------- 3 files changed, 2 insertions(+), 29 deletions(-) commit af2728e4deb9f08721374f3adc06b1d3e7d133ec Author: Oder Chiou Date: Tue Jun 6 14:59:54 2017 +0800 ASoC: rt5663: Fix the IRQ issue The patch fixed the IRQ issue. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 2 +- sound/soc/codecs/rt5663.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 08862251476f899c4c4528e922df5854076b8661 Author: Kuninori Morimoto Date: Tue Jun 6 02:37:07 2017 +0000 ASoC: audio-graph-scu-card: add missing MIX binding example Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../bindings/sound/audio-graph-scu-card.txt | 47 +++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit 010f21b2ba0cd546d7489ca536a156b281faa3fb Author: Kuninori Morimoto Date: Tue Jun 6 02:35:43 2017 +0000 ASoC: simple-scu-card: tidyup "Sampling Rate Conversion" "Sampling Rate Conversion" is better than "Sampling Rate Convert" Reported-by: James Cameron Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/simple-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d70c34db3357cedf8735ebad0b0fa5fed7b54b35 Author: Kuninori Morimoto Date: Tue Jun 6 02:35:10 2017 +0000 ASoC: rsnd: remove unused rsnd_dai_path_info commit 2ea2cc86db7c ("ASoC: rsnd: remove struct rcar_snd_info") removed all struct rsnd_dai_path_info related code. This patch removes unused rsnd_dai_path_info. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/rsnd.h | 1 - 1 file changed, 1 deletion(-) commit f07b38e53b71aeb62f865632d31d3f579a77ffc0 Author: Kuninori Morimoto Date: Tue Jun 6 02:34:42 2017 +0000 ASoC: rsnd: remove unused rsnd_ssi_non_ops rsnd_ssi_non_ops is never used. Let's remove it Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ssi.c | 8 -------- 1 file changed, 8 deletions(-) commit dbbb08f500d6146398b794fdc68a8e811366b451 Author: Kees Cook Date: Mon Jun 5 21:52:30 2017 -0700 arm64, vdso: Define vdso_{start,end} as array Adjust vdso_{start|end} to be char arrays to avoid compile-time analysis that flags "too large" memcmp() calls with CONFIG_FORTIFY_SOURCE. Cc: Jisheng Zhang Acked-by: Catalin Marinas Suggested-by: Mark Rutland Signed-off-by: Kees Cook Signed-off-by: Will Deacon arch/arm64/kernel/vdso.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 359fce1d4052e31bd74b34e026ffcb709c3bc433 Merge: 928a759 bd5ddba Author: David S. Miller Date: Tue Jun 6 12:45:25 2017 -0400 Merge branch 'net-trap-control-action' Jiri Pirko says: ==================== net: introduce trap control action to tc and offload it This patchset introduces a control action dedicated to indicate to trap the matched packet to CPU. This is specific action for HW offloads. Also, the patchset offloads the action to mlxsw driver. Example usage: $ tc filter add dev enp3s0np19 parent ffff: protocol ip prio 20 flower skip_sw dst_ip 192.168.10.1 action trap v1->v2: - patch 1 - fix the comment according to Andrew's note ==================== Signed-off-by: David S. Miller commit bd5ddba52dc0e2b37ce67e68ba1c419693009185 Author: Jiri Pirko Date: Tue Jun 6 14:12:07 2017 +0200 spectrum_flower: Implement gact trap TC action offload Just use the previously prepared infrastructure and offload the gact trap action to ACL. Signed-off-by: Jiri Pirko Reviewed-by: Yotam Gigi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 4 ++++ 1 file changed, 4 insertions(+) commit df7eea963e4debe3b8286935c2fe9021c81ddbb6 Author: Jiri Pirko Date: Tue Jun 6 14:12:06 2017 +0200 acl: Introduce ACL trap action Use trap/discard flex action to implement trap. Signed-off-by: Jiri Pirko Reviewed-by: Yotam Gigi Signed-off-by: David S. Miller .../mellanox/mlxsw/core_acl_flex_actions.c | 40 ++++++++++++++++++++-- .../mellanox/mlxsw/core_acl_flex_actions.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 5 +++ 4 files changed, 45 insertions(+), 2 deletions(-) commit 0db7b386f5e779085d5e20ad9d88b8a4b8767c02 Author: Jiri Pirko Date: Tue Jun 6 14:12:05 2017 +0200 mlxsw: spectrum: Introduce ACL trap Introduce an ACL trap and put it into ip2me trap group. Signed-off-by: Jiri Pirko Reviewed-by: Yotam Gigi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 +++- drivers/net/ethernet/mellanox/mlxsw/trap.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit be8408e1440cbc86683e4e1c65270ad517b4274a Author: Jiri Pirko Date: Tue Jun 6 14:12:04 2017 +0200 mlxsw: pci: Fix size of trap_id field in CQE The "trap_id" is 9bits long. So far, this was not a problem since we used only traps with ids that fit into 8bits. But the ACL traps that are going to be introduced use the 9th bit. Fixes: eda6500a987a ("mlxsw: Add PCI bus implementation") Signed-off-by: Jiri Pirko Reviewed-by: Yotam Gigi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a4d1fee2f844813cb2092b7a06b0e20ed9e2fa4 Author: Jiri Pirko Date: Tue Jun 6 14:12:03 2017 +0200 net: sched: introduce helper to identify gact trap action Introduce a helper called is_tcf_gact_trap which could be used to tell if the action is gact trap or not. Signed-off-by: Jiri Pirko Reviewed-by: Yotam Gigi Signed-off-by: David S. Miller include/net/tc_act/tc_gact.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit e25ea21ffa66a029acfa89d2611c0e7ef23e7d8c Author: Jiri Pirko Date: Tue Jun 6 14:12:02 2017 +0200 net: sched: introduce a TRAP control action There is need to instruct the HW offloaded path to push certain matched packets to cpu/kernel for further analysis. So this patch introduces a new TRAP control action to TC. For kernel datapath, this action does not make much sense. So with the same logic as in HW, new TRAP behaves similar to STOLEN. The skb is just dropped in the datapath (and virtually ejected to an upper level, which does not exist in case of kernel). Signed-off-by: Jiri Pirko Reviewed-by: Yotam Gigi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 7 +++++++ net/core/dev.c | 2 ++ net/sched/cls_bpf.c | 1 + net/sched/sch_atm.c | 1 + net/sched/sch_cbq.c | 1 + net/sched/sch_drr.c | 1 + net/sched/sch_dsmark.c | 1 + net/sched/sch_fq_codel.c | 1 + net/sched/sch_hfsc.c | 1 + net/sched/sch_htb.c | 1 + net/sched/sch_multiq.c | 1 + net/sched/sch_prio.c | 1 + net/sched/sch_qfq.c | 1 + net/sched/sch_sfb.c | 1 + net/sched/sch_sfq.c | 1 + 15 files changed, 22 insertions(+) commit 73714c05df97d7527e7eaaa771472ef2ede46fa3 Author: Ville Syrjälä Date: Fri Mar 31 21:00:56 2017 +0300 drm/i915: Fix 90/270 rotated coordinates for FBC The clipped src coordinates have already been rotated by 270 degrees for when the plane rotation is 90/270 degrees, hence the FBC code should no longer swap the width and height. Cc: stable@vger.kernel.org Cc: Tvrtko Ursulin Cc: Paulo Zanoni Fixes: b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170331180056.14086-4-ville.syrjala@linux.intel.com Reviewed-by: Paulo Zanoni Tested-by: Tvrtko Ursulin Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_fbc.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit fce5adf568abb1e8264d677156e2e0deb529194d Author: Ville Syrjälä Date: Fri Mar 31 21:00:55 2017 +0300 drm/i915: Fix SKL+ watermarks for 90/270 rotation skl_check_plane_surface() already rotates the clipped plane source coordinates to match the scanout direction because that's the way the GTT mapping is set up. Thus we no longer need to rotate the coordinates in the watermark code. For cursors we use the non-clipped coordinates which are not rotated appropriately, but that doesn't actually matter since cursors don't even support 90/270 degree rotation. v2: Resolve conflicts from SKL+ wm rework Cc: stable@vger.kernel.org Cc: Tvrtko Ursulin Fixes: b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170331180056.14086-3-ville.syrjala@linux.intel.com Tested-by: Tvrtko Ursulin Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit 928a759593d21ec184536bde0b4816d21bcd5a86 Author: Colin Ian King Date: Tue Jun 6 11:47:40 2017 +0100 net/mlxfw: remove redundant goto on error check The check to see of err is set and the subsequent goto is extraneous as the next statement is where the goto is jumping to. Remove this redundant check and goto. Detected by CoverityScan, CID#1437734 ("Identical code for different branches") Signed-off-by: Colin Ian King Acked-by: Yotam Gigi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c | 2 -- 1 file changed, 2 deletions(-) commit d96a7d2adb040a67e163a82dad6316f9f572498a Author: Ville Syrjälä Date: Fri Mar 31 21:00:54 2017 +0300 drm/i915: Fix scaling check for 90/270 degree plane rotation Starting from commit b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") we've already rotated the src coordinates by 270 degrees by the time we check if a scaler is needed or not, so we must not account for the rotation a second time. Previously we did these steps in the opposite order and hence the scaler check had to deal with rotation itself. The double rotation handling causes us to enable a scaler pretty much every time 90/270 degree plane rotation is requested, leading to fuzzier fonts and whatnot. v2: s/unsigned/unsigned int/ to appease checkpatch v3: s/DRM_ROTATE_0/DRM_MODE_ROTATE_0/ Cc: stable@vger.kernel.org Cc: Tvrtko Ursulin Reported-by: Tvrtko Ursulin Tested-by: Tvrtko Ursulin Fixes: b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170331180056.14086-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit bb3631405460a4436aede80a60181e6087795597 Merge: 25f4115 4e25572 Author: David S. Miller Date: Tue Jun 6 12:05:57 2017 -0400 Merge tag 'rxrpc-rewrite-20170606' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Support service upgrade Here's a set of patches that allow AF_RXRPC to support the AuriStor service upgrade facility. This allows the server to change the service ID requested to an upgraded service if the client requests it upon the initiation of a connection. This is used by the AuriStor AFS-compatible servers to implement IPv6 handling and improved facilities by providing improved volume location, volume, protection, file and cache management services. Note that certain parts of the AFS protocol carry hard-coded IPv4 addresses. The reason AuriStor does it this way is that probing the improved service ID first will not incur an ABORT or any other response on some servers if the server is not listening on it - and so one have to employ a timeout. This is implemented in the server by allowing an AF_RXRPC server to call bind() twice on a socket to allow it to listen on two service IDs and then call setsockopt() to instruct the server to upgrade one into the other if the client requests it (by setting userStatus to 1 on the first DATA packet on a connection). If the upgrade occurs, all further operations on that connection are done with the new service ID. AF_RXRPC has to handle this automatically as connections are not exposed to userspace. Clients can request this facility by setting an RXRPC_UPGRADE_SERVICE command in the sendmsg() control buffer and then observing the resultant service ID in the msg_addr returned by recvmsg(). This should only be used to probe the service. Clients should then use the returned service ID in all subsequent communications with that server. Note that the kernel will not retain this information should the connection expire from its cache. ==================== Signed-off-by: David S. Miller commit c2d1a0ced2603c4a17fa9c53c37e415905cf5a6d Author: Ville Syrjälä Date: Tue Jun 6 16:32:29 2017 +0300 drm/i915: Restore has_fbc=1 for ILK-M Restore the lost has_fbc flag for mobile ILK. Cc: Carlos Santa Cc: Rodrigo Vivi Fixes: a13233804686 ("drm/i915: Introduce GEN5_FEATURES for device info") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170606133229.12439-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4127dc43e2fb274e349e22a537fa7dca1e70cfc8 Author: Ville Syrjälä Date: Tue Jun 6 15:44:12 2017 +0300 drm/i915: s/fbc_fc/fbc_false_color/ We're not that short on characters that we can't spell out "false_color". Saves me from figuring out what "fc" means the next time look at the code. Cc: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170606124412.5335-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3fd5d1ecae2d91bf3d3ce73ce0ef97d84d93a770 Author: Ville Syrjälä Date: Tue Jun 6 15:43:18 2017 +0300 drm/i915: Implement fbc_status "Compressing" info for all platforms The number of compressed segments has been available ever since FBC2 was introduced in g4x, it just moved from the STATUS register into STATUS2 on IVB. For FBC1 if we really wanted the number of compressed segments we'd have to trawl through the tags, but in this case since the code just uses the number of compressed segments as an indicator whether compression has occurred we can just check the state of the COMPRESSING and COMPRESSED bits. IIRC the hardware will try to periodically recompress all uncompressed lines even if they haven't changed and the COMPRESSED bit will be cleared while the compressor is running, so just checking the COMPRESSED bit might not give us the right answer. Hence it seems better to check for both COMPRESSED and COMPRESSING as that should tell us that the compressor is at least trying to do something. While at it move the IVB+ register define to the right place, unify the naming convention of the compressed segment count masks, and fix up the mask for g4x. v2: s/ILK_DPFC_STATUS2/IVB_FBC_STATUS2/ (Paulo) Cc: Paulo Zanoni Cc: Gabriel Krisman Bertazi Signed-off-by: Ville Syrjälä Tested-by: Gabriel Krisman Bertazi # SNB Reviewed-by: Paulo Zanoni # ilk+ Acked-by: Paulo Zanoni # pre-ilk Link: http://patchwork.freedesktop.org/patch/msgid/20170606124318.31755-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_debugfs.c | 22 ++++++++++++++++------ drivers/gpu/drm/i915/i915_reg.h | 10 +++++----- 2 files changed, 21 insertions(+), 11 deletions(-) commit 25f411501bb0a674f3af9208fda2b9861b54ca6f Merge: 9d15e5c fd8e597 Author: David S. Miller Date: Tue Jun 6 11:58:16 2017 -0400 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 2017-06-06 This series contains updates and fixes to e1000e and igb. Matwey V Kornilov fixes an issue where igb_get_phy_id_82575() relies on the fact that page 0 is already selected, but this is not the case after igb_read_phy_reg_gs40g()/igb_write_phy_reg_gs40g() were removed in a previous commit. This leads to initialization failure and some devices not working. To fix the issue, explicitly select page 0 before first access to PHY registers. Arnd Bergmann modifies the driver to avoid a "defined but not used" warning by removing #ifdefs and using __maybe_unused annotation instead for new power management functions. Jake provides most of the changes in the series, all around PTP and timestamp fixes/updates. Resolved several race conditions based on the hardware can only handle one transmit timestamp at a time, so fix the locking logic, as well as create a statistic for "skipped" timestamps to help administrators identify issues. Benjamin Poirier provides 2 changes, first to igb to remove the second argument to igb_update_stats() since it always passes the same two arguments. So instead of having to pass the second argument, just update the function to the necessary information from the adapter structure. Second modifies the e1000e_get_stats64() call to dev_get_stats() to avoid ethtool garbage being reported. Konstantin Khlebnikov modifies e1000e to use disable_hardirq(), instead of disable_irq() for MSIx vectors in e1000_netpoll(). ==================== Signed-off-by: David S. Miller commit ec1b4ee2834e66884e5b0d3d465f347ff212e372 Author: Ville Syrjälä Date: Thu Dec 15 19:47:34 2016 +0200 drm/i915: Workaround VLV/CHV DSI scanline counter hardware fail The scanline counter is bonkers on VLV/CHV DSI. The scanline counter increment is not lined up with the start of vblank like it is on every other platform and output type. This causes problems for both the vblank timestamping and atomic update vblank evasion. On my FFRD8 machine at least, the scanline counter increment happens about 1/3 of a scanline ahead of the start of vblank (which is where all register latching happens still). That means we can't trust the scanline counter to tell us whether we're in vblank or not while we're on that particular line. In order to keep vblank timestamping in working condition when called from the vblank irq, we'll leave scanline_offset at one, which means that the entire line containing the start of vblank is considered to be inside the vblank. For the vblank evasion we'll need to consider that entire line to be bad, since we can't tell whether the registers already got latched or not. And we can't actually use the start of vblank interrupt to get us past that line as the interrupt would fire too soon, and then we'd up waiting for the next start of vblank instead. One way around that would using the frame start interrupt instead since that wouldn't fire until the next scanline, but that would require some bigger changes in the interrupt code. So for simplicity we'll just poll until we get past the bad line. v2: Adjust the comments a bit Cc: stable@vger.kernel.org Cc: Jonas Aaberg Tested-by: Jonas Aaberg Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99086 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161215174734.28779-1-ville.syrjala@linux.intel.com Tested-by: Mika Kahola Reviewed-by: Mika Kahola drivers/gpu/drm/i915/intel_display.c | 9 +++++++++ drivers/gpu/drm/i915/intel_sprite.c | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) commit 0ad17864613f29726f56d346091a9176a359e615 Author: Niklas Söderlund Date: Tue May 23 21:15:27 2017 -0300 [media] rcar-vin: fix standard in input enumeration The driver supports a single input only, which can be either analog or digital. If the subdevice supports dv_timings_cap the input is digital and the driver should not fill in the standard. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e5770b7bdbfe9f23bb75a7d5a88c1f5e18e20738 Author: Bo YU Date: Mon Jun 5 23:44:40 2017 -0400 staging: speakup: alignment match open parens I have aligned argument with parenthesis, so checkpatch no check also. Signed-off-by: Bo YU Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f101456460cce9be7cdad5798a0ecdd671986c8 Author: Bo YU Date: Mon Jun 5 23:44:26 2017 -0400 staging: speakup: in serialio.c no over 80 chars long Fixed the checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Bo YU Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 79de2d0e8dd33892489733f5efbe4ac53f5e7f7d Author: Bo YU Date: Mon Jun 5 23:44:11 2017 -0400 staging: speakup: add a space around '|' Add a space around logical symbol '|' to wipe out checkpatch check Signed-off-by: Bo YU Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6089ae42faf3132d9f02cec951a006be87edade Author: Bo YU Date: Mon Jun 5 23:43:55 2017 -0400 staging: speakup: add a missing blank line after declaration Fixed checkpatch warning by adding a blank line after declare expression Signed-off-by: Bo YU Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 1 + 1 file changed, 1 insertion(+) commit 88a5b39b69ab1828fd4130e2baadd184109cea69 Author: Daniel Micay Date: Mon Jun 5 21:52:34 2017 -0700 staging/rts5208: Fix read overflow in memcpy Noticed by FORTIFY_SOURCE, this swaps memcpy() for strncpy() to zero-value fill the end of the buffer instead of over-reading a string from .rodata. Signed-off-by: Daniel Micay [kees: wrote commit log] Signed-off-by: Kees Cook Cc: Greg Kroah-Hartman Cc: Wayne Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 372bd1eb8484525832a3959cc0b878a7f01dd70b Author: Colin Ian King Date: Mon Jun 5 09:21:58 2017 +0100 staging: rtl8723bs: fix a couple of spelling mistakes Replace cant with cannot, argumetns with arguments and add line break to overly long DBG_871X statement. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_com.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 498c4b4e9c23855d17ecc2a108d949bb68020481 Author: Jia-Ju Bai Date: Mon Jun 5 15:30:16 2017 +0800 staging: rt5208: Fix a sleep-in-atomic bug in xd_copy_page The driver may sleep under a spin lock, and the function call path is: rtsx_exclusive_enter_ss (acquire the lock by spin_lock) rtsx_enter_ss rtsx_power_off_card xd_cleanup_work xd_delay_write xd_finish_write xd_copy_page wait_timeout schedule_timeout --> may sleep To fix it, "wait_timeout" is replaced with mdelay in xd_copy_page. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/xd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac669251087d876d6e51eb648f98e575f0d0499d Author: Sudip Mukherjee Date: Sun Jun 4 20:36:54 2017 +0100 staging: sm750fb: change default screen resolution Update the default screen resolution and also use 24bpp for a better screen performance. Tested-by: Teddy Wang Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97b30bad76960375a61b54832a8641c9b23b14b5 Author: Adrian Stanciu Date: Sun Jun 4 15:07:33 2017 +0300 staging: comedi: ni_labpc_isadma: fixed a comment coding style issue Fixed a BLOCK_COMMENT_STYLE warning reported by checkpatch.pl script. Signed-off-by: Adrian Stanciu Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_labpc_isadma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 831081626f78f09fd99564988b6c09bfc4ee6df7 Author: Niklas Söderlund Date: Tue May 23 21:15:26 2017 -0300 [media] rcar-vin: fix how pads are handled for v4l2 subdevice operations The rcar-vin driver only uses one pad, pad number 0. - All v4l2 operations that did not check that the requested operation was for pad 0 have been updated with a check to enforce this. - All v4l2 operations that stored (and later restored) the requested pad before substituting it for the subdevice pad number have been updated to not store the incoming pad and simply restore it to 0 after the subdevice operation is complete. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit b655741f2149296bb1b9efc1161d7125718108d7 Author: Niklas Söderlund Date: Tue May 23 21:15:25 2017 -0300 [media] rcar-vin: use rvin_reset_format() in S_DV_TIMINGS Use rvin_reset_format() in rvin_s_dv_timings() instead of just resetting a few fields. This fixes an issue where the field format was not properly set after S_DV_TIMINGS. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 6afaaab06a47f605424f1cbbcf10159fafdc12a8 Author: Niklas Söderlund Date: Tue May 23 21:15:24 2017 -0300 [media] rcar-vin: reset bytesperline and sizeimage when resetting format These two were forgotten when refactoring the format reset code. If they are not also reset at the same time as width and height the format returned from G_FMT will not match reality. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 +++ 1 file changed, 3 insertions(+) commit 652e535efa745e173f1de28a3aa211a1e4ff38da Author: Sakari Ailus Date: Wed Jan 11 08:37:32 2017 -0200 [media] v4l: Remove V4L2 OF framework in favour of V4L2 fwnode framework All drivers have been converted from V4L2 OF to V4L2 fwnode. The V4L2 OF framework is now unused. Remove it. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Tested-by: Hans Verkuil Tested-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/Makefile | 3 - drivers/media/v4l2-core/v4l2-of.c | 327 -------------------------------------- include/media/v4l2-of.h | 128 --------------- 3 files changed, 458 deletions(-) commit d6a60897e3db4b86112cfca318e5cd4f5bbfcda1 Author: Sakari Ailus Date: Thu Mar 9 08:21:46 2017 -0300 [media] docs-rst: media: Switch documentation to V4L2 fwnode API Instead of including the V4L2 OF header in ReST documentation, use the V4L2 fwnode header instead. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Tested-by: Hans Verkuil Tested-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-core.rst | 2 +- Documentation/media/kapi/v4l2-fwnode.rst | 3 +++ Documentation/media/kapi/v4l2-of.rst | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) commit 859969b38e2e9352f0227e1ef0be1dff4a3b7299 Author: Sakari Ailus Date: Fri Aug 26 20:17:25 2016 -0300 [media] v4l: Switch from V4L2 OF not V4L2 fwnode API Switch users of the v4l2_of_ APIs to the more generic v4l2_fwnode_ APIs. Async OF matching is replaced by fwnode matching and OF matching support is removed. Signed-off-by: Sakari Ailus Acked-by: Benoit Parrot # i2c/ov2569.c, am437x/am437x-vpfe.c and ti-vpe/cal.c Tested-by: Hans Verkuil # Atmel sama5d3 board + ov2640 sensor Tested-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 11 +++++ drivers/media/i2c/adv7604.c | 7 +-- drivers/media/i2c/mt9v032.c | 7 +-- drivers/media/i2c/ov2659.c | 8 ++-- drivers/media/i2c/ov5645.c | 7 +-- drivers/media/i2c/ov5647.c | 7 +-- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 7 +-- drivers/media/i2c/s5k5baf.c | 6 +-- drivers/media/i2c/smiapp/Kconfig | 1 + drivers/media/i2c/smiapp/smiapp-core.c | 29 ++++++------ drivers/media/i2c/tc358743.c | 11 +++-- drivers/media/i2c/tvp514x.c | 6 +-- drivers/media/i2c/tvp5150.c | 7 +-- drivers/media/i2c/tvp7002.c | 6 +-- drivers/media/platform/Kconfig | 4 ++ drivers/media/platform/am437x/Kconfig | 1 + drivers/media/platform/am437x/am437x-vpfe.c | 15 +++--- drivers/media/platform/atmel/Kconfig | 2 + drivers/media/platform/atmel/atmel-isc.c | 13 ++++-- drivers/media/platform/atmel/atmel-isi.c | 11 +++-- drivers/media/platform/exynos4-is/Kconfig | 2 + drivers/media/platform/exynos4-is/media-dev.c | 13 +++--- drivers/media/platform/exynos4-is/mipi-csis.c | 6 +-- drivers/media/platform/omap3isp/isp.c | 49 ++++++++++---------- drivers/media/platform/pxa_camera.c | 11 +++-- drivers/media/platform/rcar-vin/Kconfig | 1 + drivers/media/platform/rcar-vin/rcar-core.c | 19 ++++---- drivers/media/platform/soc_camera/soc_camera.c | 7 +-- drivers/media/platform/stm32/stm32-dcmi.c | 13 +++--- drivers/media/platform/ti-vpe/cal.c | 15 +++--- drivers/media/platform/xilinx/Kconfig | 1 + drivers/media/platform/xilinx/xilinx-vipp.c | 63 ++++++++++++++------------ drivers/media/v4l2-core/v4l2-async.c | 14 +----- include/media/v4l2-async.h | 5 -- include/media/v4l2-subdev.h | 2 - 35 files changed, 212 insertions(+), 175 deletions(-) commit 4ba459a224fd8e85b241d15481d63aaa3b306d4e Author: Ville Syrjälä Date: Thu Jun 1 21:30:43 2017 +0300 drm/i915: Remove dead code from runtime resume handler Remove the SNB PCH refclock init call from the runtime resume handler. I don't think it was actually needed even when we had SNB runtime PM, and if definitely isn't needed ever since SNB runtime PM was nuked in commit d4c5636e7447 ("drm/i915: Remove runtime PM for SNB"). Cc: Rodrigo Vivi Cc: Paulo Zanoni Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601183043.28543-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.c | 3 --- 1 file changed, 3 deletions(-) commit 048ea05b4f4c8f8cf0a9d4c5fc7d16f867160764 Author: Sakari Ailus Date: Wed Aug 31 04:28:46 2016 -0300 [media] v4l: flash led class: Use fwnode_handle instead of device_node in init Pass the more generic fwnode_handle to the init function than the device_node. Signed-off-by: Sakari Ailus Tested-by: Hans Verkuil Tested-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab drivers/leds/leds-aat1290.c | 5 +++-- drivers/leds/leds-max77693.c | 5 +++-- drivers/media/v4l2-core/v4l2-flash-led-class.c | 12 ++++++------ include/media/v4l2-flash-led-class.h | 6 +++--- 4 files changed, 15 insertions(+), 13 deletions(-) commit ecdf0cfe711b3780e829a6e24ffd3275f9cbfc2a Author: Sakari Ailus Date: Tue Aug 16 06:54:59 2016 -0300 [media] v4l: async: Add fwnode match support Add fwnode matching to complement OF node matching. And fwnode may also be an OF node. Do not enable fwnode matching yet. It will replace OF matching soon. Signed-off-by: Sakari Ailus Tested-by: Hans Verkuil Tested-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 15 +++++++++++++++ include/media/v4l2-async.h | 5 +++++ include/media/v4l2-subdev.h | 3 +++ 3 files changed, 23 insertions(+) commit ca50c197bd9610ea984cfc0dc6855f183cbb46f8 Author: Sakari Ailus Date: Fri Aug 12 08:05:51 2016 -0300 [media] v4l: fwnode: Support generic fwnode for parsing standardised properties The fwnode_handle is a more generic way than OF device_node to describe firmware nodes. Instead of the OF API, use more generic fwnode API to obtain the same information. As the V4L2 fwnode support will be required by a small minority of e.g. ACPI based systems (the same might actually go for OF), make this a module instead of embedding it in the videodev module. The origins of the V4L2 fwnode framework is in the V4L2 OF framework. Signed-off-by: Sakari Ailus Tested-by: Hans Verkuil Tested-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/Kconfig | 3 + drivers/media/v4l2-core/Makefile | 1 + drivers/media/v4l2-core/v4l2-fwnode.c | 345 ++++++++++++++++++++++++++++++++++ include/media/v4l2-fwnode.h | 104 ++++++++++ 4 files changed, 453 insertions(+) commit 614d651e1abda005ec9df5accef4b02aafcdf1ed Author: Sean Young Date: Wed May 17 14:32:54 2017 -0300 [media] staging: remove todo and replace with lirc_zilog todo The lirc_zilog driver is the last remaining lirc driver, so the existing todo is no longer relevant. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/TODO | 47 ++++++++++++++++++++++-------- drivers/staging/media/lirc/TODO.lirc_zilog | 36 ----------------------- 2 files changed, 35 insertions(+), 48 deletions(-) commit c52f2ba747e14f4ae0b04397c0baac85754f2ca2 Author: Sean Young Date: Wed May 17 14:32:53 2017 -0300 [media] sir_ir: remove init_chrdev and init_sir_ir functions Inlining these functions into the probe function makes it much more readable. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sir_ir.c | 58 ++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 36 deletions(-) commit f23f54087096e51ffc6765b7ddddb5f9eb517fa9 Author: Sean Young Date: Wed May 17 14:32:52 2017 -0300 [media] sir_ir: remove init_port and drop_port functions These functions are too short and removing them makes the code more readable. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sir_ir.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit b462e1b20dc39f4af05bcbf850e574c381b17038 Author: Sean Young Date: Wed May 17 14:32:51 2017 -0300 [media] sir_ir: use dev managed resources Several error paths do not free up resources. This simplifies the code and fixes this. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sir_ir.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 1beb5a7d1b17f187491599410709fd0544ea1c16 Author: Sean Young Date: Wed May 17 14:32:50 2017 -0300 [media] sir_ir: attempt to free already free_irq If the probe fails (e.g. port already in use), rmmod causes null deref. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sir_ir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da731edb5b7667d0752eeaf473896fc123b8e95f Author: Ricardo Silva Date: Mon May 15 16:40:16 2017 -0300 [media] lirc_zilog: Fix unbalanced braces around if/else Fix all checkpatch reported issues for: * CHECK: "braces {} should be used on all arms of this statement". * CHECK: "Unbalanced braces around else statement". Make sure all if/else statements are balanced in terms of braces. Most cases in code are, but a few were left unbalanced, so put them all consistent with the recommended style. Signed-off-by: Ricardo Silva Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d44e07c752ecfed1fb131cd0c5f103e299c22ab4 Author: Ricardo Silva Date: Mon May 15 16:40:15 2017 -0300 [media] lirc_zilog: Use sizeof(*p) instead of sizeof(struct P) Fix all checkpatch reported issues for "CHECK: Prefer kzalloc(sizeof(*

)...) over kzalloc(sizeof(struct

)...)". Other similar case in the code already using recommended style, so make it all consistent with the recommended practice. Signed-off-by: Ricardo Silva Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 41a603f8d94c6e7627ddd4e13763b4523aa473ac Author: Ricardo Silva Date: Mon May 15 16:40:14 2017 -0300 [media] lirc_zilog: Use __func__ for logging function name Fix all checkpatch reported issues for "CHECK: Prefer using '"%s...", __func__' to using '', ..." Use recommended style. Additionally, __func__ was already used in similar cases throughout the code, so make it all consistent. Signed-off-by: Ricardo Silva Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 28b671b4bac52b4ad8e1a9e8aa7514da7efe924d Author: Ricardo Silva Date: Mon May 15 16:40:13 2017 -0300 [media] lirc_zilog: Fix NULL comparisons style Fix all checkpatch reported issues for "CHECK: Comparison to NULL could be written...". Do these comparisons using the recommended coding style and consistent with other similar cases in the file, which already used the recommended way. Signed-off-by: Ricardo Silva Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 48 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit 32ddcbb5b8dc10bf922ff3a6666cb3748efca388 Author: Ricardo Silva Date: Mon May 15 16:40:12 2017 -0300 [media] lirc_zilog: Fix whitespace style checks Fix style issues reported by checkpatch, affecting whitespace only: * CHECK: "Please don't use multiple blank lines". Two of these still triggering and left untouched because used for separating logical blocks (vars from functions, etc.). * CHECK: "spaces preferred around that ''". All fixed. * CHECK: "Alignment should match open parenthesis". All fixed except one on line 1161, left untouched for readability. Move towards recommended coding style without compromising readability. Signed-off-by: Ricardo Silva Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 35 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) commit 2270962c9dd341509e1a0abb7b32c1389045eb3e Author: David Härdeman Date: Mon May 1 13:10:27 2017 -0300 [media] tm6000: key_addr is unused The key_addr member is only assigned, never used. So, remove it. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/tm6000/tm6000-input.c | 4 ---- 1 file changed, 4 deletions(-) commit 0781cb2860634656632c1722a1fe335ab9d138e5 Author: David Härdeman Date: Mon May 1 13:10:22 2017 -0300 [media] rc-core: cx231xx - leave the internals of rc_dev alone Just some debug statements to change. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-input.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a55a71da3db4acd5a374e0fb70a445266e71c6f1 Author: David Härdeman Date: Mon May 1 13:10:01 2017 -0300 [media] rc-core: img-ir - leave the internals of rc_dev alone Changing the protocol does not imply that the keymap changes. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/img-ir/img-ir-hw.c | 4 ---- 1 file changed, 4 deletions(-) commit a387ffc8043b8b894cdc9d3f134b52d9c492ac26 Author: David Härdeman Date: Mon May 1 13:09:56 2017 -0300 [media] rc-core: ati_remote - leave the internals of rc_dev alone The REP_DELAY setting on the input device is independent of hardware. This change should not change how to driver works (as it does a keydown/keyup and has no real repeat handling). Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ati_remote.c | 3 --- 1 file changed, 3 deletions(-) commit 2dc0b351fe7e27b0ceabcde0272bef75eb05bd48 Author: David Härdeman Date: Mon May 1 13:04:57 2017 -0300 [media] lirc_dev: cleanup header Remove some stuff from lirc_dev.h which is not used anywhere. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab include/media/lirc_dev.h | 7 ------- 1 file changed, 7 deletions(-) commit 463015ddb44122d03bbbf8a39cd170a347b2a010 Author: David Härdeman Date: Mon May 1 13:04:47 2017 -0300 [media] lirc_dev: cleanup includes Remove superfluous includes and defines. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 29debf3d9d214f600af38069e5954699934abe74 Author: David Härdeman Date: Mon May 1 13:04:37 2017 -0300 [media] lirc_dev: return POLLHUP and POLLERR when device is gone Most drivers return both values when the device is gone. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e435e572ef9a890512b76b00e42e16f5553ca8f Author: David Härdeman Date: Mon May 1 13:04:31 2017 -0300 [media] lirc_dev: remove unused module parameter The "debug" parameter isn't actually used anywhere. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 5 ----- 1 file changed, 5 deletions(-) commit 5be2b76a9ca4ea5fd3e221114d62eeb0d78267ca Author: David Härdeman Date: Mon May 1 13:04:26 2017 -0300 [media] lirc_dev: remove superfluous get/put_device() calls device_add() and friends already manage the references to the parent device so these calls aren't necessary. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 4 ---- 1 file changed, 4 deletions(-) commit 712551f0e45d668bd42cf5ce752f02fa0bba63f2 Author: David Härdeman Date: Mon May 1 13:04:21 2017 -0300 [media] lirc_dev: remove lirc_irctl_init() and lirc_cdev_add() These two functions only make the logic in lirc_register_driver() harder to follow. (Note that almost no other driver calls kobject_set_name() on their cdev so I simply removed that part). Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) commit bd16168da80dde6cfc6b7f89959206b74409cb86 Author: David Härdeman Date: Mon May 1 13:04:16 2017 -0300 [media] lirc_zilog: remove module parameter minor Always let the kernel decide what minor the lirc chardev gets. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 56481f0060a48938e31461efa2ad54d3b293ebe8 Author: David Härdeman Date: Mon May 1 13:04:11 2017 -0300 [media] lirc_dev: merge lirc_register_driver() and lirc_allocate_driver() Merging the two means that lirc_allocate_buffer() is called before device_add() and cdev_add() which makes more sense. This also simplifies the locking slightly because lirc_allocate_buffer() will always be called with lirc_dev_lock held. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) commit e0e3c77cc218d754eae9ddcc62d8ede5b31cf7c2 Author: David Härdeman Date: Mon May 1 13:04:06 2017 -0300 [media] lirc_dev: make fops mandatory Every caller of lirc_register_driver() passes their own fops and there are no users of lirc_dev_fop_write() in the kernel tree. Thus we can make fops mandatory and remove lirc_dev_fop_write(). Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 41 +++++------------------------------------ include/media/lirc_dev.h | 3 --- 2 files changed, 5 insertions(+), 39 deletions(-) commit 258232269590cee2acd4bb28b8e027ad340a85f9 Author: David Härdeman Date: Mon May 1 13:04:01 2017 -0300 [media] lirc_dev: clarify error handling out_sysfs is misleading, sysfs only comes into play after device_add(). Also, calling device_init() before the rest of struct dev is filled out is clearer. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c3104e1b42744156c414003043587d128de2b91f Author: David Härdeman Date: Mon May 1 13:03:56 2017 -0300 [media] lirc_dev: remove sampling kthread There are no drivers which use this functionality. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 94 +-------------------------------- drivers/staging/media/lirc/lirc_zilog.c | 1 - include/media/lirc_dev.h | 16 ------ 3 files changed, 2 insertions(+), 109 deletions(-) commit 2c5a1f44667b75e75302d87e61b335e68f4078f1 Author: David Härdeman Date: Mon May 1 13:03:46 2017 -0300 [media] lirc_dev: remove unused set_use_inc/set_use_dec Since there are no users of this functionality, it can be removed altogether. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 2 -- drivers/media/rc/lirc_dev.c | 24 ++++++------------------ include/media/lirc_dev.h | 6 ------ 3 files changed, 6 insertions(+), 26 deletions(-) commit 52e809f9fe3e4922e1cb539079ad1b262e163a3b Author: David Härdeman Date: Mon May 1 13:03:41 2017 -0300 [media] lirc_dev: remove pointless functions drv->set_use_inc and drv->set_use_dec are already optional so we can remove all dummy functions. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 14 ++------------ drivers/staging/media/lirc/lirc_zilog.c | 11 ----------- 2 files changed, 2 insertions(+), 23 deletions(-) commit c779a9cdf7c65291b94ad174e003348bc2ab7cdf Author: A Sun Date: Thu Apr 13 05:06:47 2017 -0300 [media] mceusb: TX -EPIPE (urb status = -32) lockup fix Once IR blasting or mceusb device commands fail with mce_async_callback() TX -EPIPE error, all subsequent TX to device then fail with the same error. ... [ 249.986174] mceusb 1-1.2:1.0: requesting 38000 HZ carrier [ 249.986210] mceusb 1-1.2:1.0: send request called (size=0x4) [ 249.986256] mceusb 1-1.2:1.0: send request complete (res=0) [ 249.986403] mceusb 1-1.2:1.0: Error: request urb status = -32 (TX HALT) [ 249.999885] mceusb 1-1.2:1.0: send request called (size=0x3) [ 249.999929] mceusb 1-1.2:1.0: send request complete (res=0) [ 250.000013] mceusb 1-1.2:1.0: Error: request urb status = -32 (TX HALT) [ 250.019830] mceusb 1-1.2:1.0: send request called (size=0x21) [ 250.019868] mceusb 1-1.2:1.0: send request complete (res=0) [ 250.020007] mceusb 1-1.2:1.0: Error: request urb status = -32 (TX HALT) ... Fault simulation/injection is by executing the following USB operation in a mceusb instrumented driver, prior to TX I/O. retval = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0), USB_REQ_SET_FEATURE, USB_RECIP_ENDPOINT, USB_ENDPOINT_HALT, usb_pipeendpoint(ir->pipe_out), NULL, 0, USB_CTRL_SET_TIMEOUT); dev_dbg(ir->dev, "set halt retval, %d", retval); After setting halt state for the TX endpoint, perform an lirc "irsend" to generate TX traffic to device. After the TX HALT, the patch restores subsequent TX to working state. ... [ 508.009638] mceusb 1-1.2:1.0: send request called (size=0x3) [ 508.009697] mceusb 1-1.2:1.0: send request complete (res=0) [ 508.009847] mce_async_callback() [ 508.009864] mceusb 1-1.2:1.0: Error: request urb status = -32 (TX HALT) [ 508.009890] mceusb 1-1.2:1.0: kevent 0 scheduled [ 508.021552] mceusb 1-1.2:1.0: send request called (size=0x21) [ 508.021598] mceusb 1-1.2:1.0: send request complete (res=0) [ 508.021963] mce_async_callback() [ 508.021981] mceusb 1-1.2:1.0: tx data: 84 b0 0c 8c 0c 84 8c 0c 8c 0c 84 8c 0c 8c 0c 84 98 0c 98 0c 84 98 0c 8c 0c 84 8c 0c 8c 0c 81 8c 80 (length=33) [ 508.021997] mceusb 1-1.2:1.0: Raw IR data, 0 pulse/space samples [ 508.066627] mceusb 1-1.2:1.0: send request called (size=0x3) [ 508.066669] mceusb 1-1.2:1.0: send request complete (res=0) [ 508.066841] mce_async_callback() [ 508.066858] mceusb 1-1.2:1.0: tx data: 9f 08 03 (length=3) ... Signed-off-by: A Sun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 53 ++++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 19 deletions(-) commit a06854a600f6ccb72f097d86a44688949b867906 Author: A Sun Date: Sun Mar 26 15:28:08 2017 -0300 [media] mceusb: RX -EPIPE (urb status = -32) lockup failure fix RX -EPIPE failure with infinite loop and flooding of [ 2851.966506] mceusb 1-1.2:1.0: Error: urb status = -32 log message at 8000 messages per second. Bug trigger appears to be normal, but heavy, IR receiver use. Driver and Linux host become unusable after error. Also seen at https://sourceforge.net/p/lirc/mailman/message/34886165/ Fix: Message reports RX usb halt (stall) condition requiring usb_clear_halt() call in non-interrupt context to recover. Add driver workqueue call to perform this recovery based on method in use for the usbnet device driver. Signed-off-by: A Sun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) commit 2aa1bd1c1ca82f57f3e6967d34c8c985dcc22f48 Author: Alex Deryskyba Date: Tue Apr 25 04:41:09 2017 -0300 [media] rc: meson-ir: switch config to NEC decoding on shutdown On the Amlogic SoCs, the bootloader firmware can handle the IR hardware in order to Wake up or Power back the system when in suspend on shutdown mode. This patch switches the hardware configuration in a state usable by the firmware to permit powering the system back. Some vendor bootloader firmware were modified to switch to this configuration but it may not be the case for all available products. This patch was originally posted at [1]. [1] https://github.com/LibreELEC/linux-amlogic/pull/27 Signed-off-by: Alex Deryskyba Signed-off-by: Neil Armstrong Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 48b0a69126dcc8659c2301eb41729445f444e36b Author: Jonas Karlman Date: Tue Apr 25 04:40:48 2017 -0300 [media] rc: meson-ir: store raw event without processing This patch fixes meson-it driver by storing event without processing to avoid losing key pressed events when system is loaded and events are occurring too fast. This issue was reported at [1] [1] https://github.com/LibreELEC/linux-amlogic/pull/42 Signed-off-by: Jonas Karlman Signed-off-by: Neil Armstrong Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 842e39c0988c4ab4ce42dce512990e87f3eb97bc Author: Devin Heitmueller Date: Wed Apr 19 20:13:54 2017 -0300 [media] rc: fix breakage in "make menuconfig" for media_build The Kconfig format is strict enough where if the indentation isn't correct then the "make menuconfig" will break. Fix the indentation to match all the other entries. Signed-off-by: Devin Heitmueller Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 611ee552a538b0c999b1bee0b7b142d69ebfd460 Author: Heiner Kallweit Date: Wed Apr 12 16:34:50 2017 -0300 [media] rc: meson-ir: change irq name to to of node name Switch the interrupt description to the default which is the of node name. This is more in line with the interrupt descriptions in other meson drivers. Signed-off-by: Heiner Kallweit Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 137edc02e7f005ca2a7060b41968aa46a3b7b048 Author: Heiner Kallweit Date: Wed Apr 12 16:33:57 2017 -0300 [media] rc: meson-ir: use readl_relaxed in the interrupt handler We don't need the memory barriers here and an interrupt handler should be as fast as possible. Therefore switch to readl_relaxed. Signed-off-by: Heiner Kallweit Reviewed-by: Neil Armstrong Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 705aa578d408f669cd28d9de076ff14bc659371c Author: Heiner Kallweit Date: Wed Apr 12 16:32:35 2017 -0300 [media] rc: meson-ir: switch to managed rc device allocation / registration Switch to the managed versions of rc_allocate_device/rc_register_device, thus simplifying the code. Signed-off-by: Heiner Kallweit Reviewed-by: Neil Armstrong Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit e7a937b5c4142c626766d00558ea4b761a00edaf Author: Heiner Kallweit Date: Wed Apr 12 16:30:48 2017 -0300 [media] rc: meson-ir: make use of the bitfield macros Make use of the bitfield macros thus partially hiding the complexity of dealing with bitfields. The patch also includes a minor fix to REG0_RATE_MASK, so far it was set to bit 0..10, but according to the spec it's bit 0..11. [mchehab@s-opensource.com: readd REG1_MODE_SHIFT and REG2_MODE_SHIFT that got removed on the original patch, as this will be used on another patch] Signed-off-by: Heiner Kallweit Reviewed-by: Neil Armstrong Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 1ffc931c320a8ac5e106eac2aecaa1a4b4b2bea0 Author: Heiner Kallweit Date: Wed Apr 12 16:28:42 2017 -0300 [media] rc: meson-ir: remove irq from struct meson_ir The irq number is used in the probe function only, therefore just use a local variable. Signed-off-by: Heiner Kallweit Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 956bd18a2769bbdc979c6917efa8ad4600f50d0e Author: Andi Shyti Date: Mon Mar 27 10:34:35 2017 -0300 [media] rc: ir-spi: remove unnecessary initialization Signed-off-by: Andi Shyti Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c80992e8ff8acf13048559d431227d1e10541a1 Author: A Sun Date: Sun Mar 26 16:04:51 2017 -0300 [media] mceusb: fix inaccurate debug buffer dumps, and misleading debug messages Some dev_dbg messages are misleading. Some dev_dbg messages have inconsistent formatting. mceusb_dev_printdata() prints incorrect range of bytes (0 to len) in buffer which the driver will actually process next. Signed-off-by: A Sun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 8e175b22e8640bf3a58e071af54190b909e4a944 Author: A Sun Date: Sun Mar 26 15:33:07 2017 -0300 [media] mceusb: sporadic RX truncation corruption fix Intermittent RX truncation and loss of IR received data. This resulted in receive stream synchronization errors where driver attempted to incorrectly parse IR data (eg 0x90 below) as command response. [ 3969.139898] mceusb 1-1.2:1.0: processed IR data [ 3969.151315] mceusb 1-1.2:1.0: rx data: 00 90 (length=2) [ 3969.151321] mceusb 1-1.2:1.0: Unknown command 0x00 0x90 [ 3969.151336] mceusb 1-1.2:1.0: rx data: 98 0a 8d 0a 8e 0a 8e 0a 8e 0a 8e 0a 9a 0a 8e 0a 0b 3a 8e 00 80 41 59 00 00 (length=25) [ 3969.151341] mceusb 1-1.2:1.0: Raw IR data, 24 pulse/space samples [ 3969.151348] mceusb 1-1.2:1.0: Storing space with duration 500000 Bug trigger appears to be normal, but heavy, IR receiver use. Signed-off-by: A Sun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 90df4bfb4d9e00a1ab6885900b808bef2b62a21c Author: Nicholas Piggin Date: Mon May 29 16:26:44 2017 +1000 powerpc/64s: Machine check handle ifetch from foreign real address for POWER9 The i-side 0111b machine check, which is "Instruction Fetch to foreign address space", was missed by 7b9f71f974 ("powerpc/64s: POWER9 machine check handler"). The POWER9 processor core considers host real addresses with a nonzero value in RA(8:12) as foreign address space, accessible only by the copy and paste instructions. The copy and paste instruction pair can be used to invoke the Nest accelerators via the Virtual Accelerator Switchboard (VAS). It is an error for any regular load/store or ifetch to go to a foreign addresses. When relocation is on, this causes an MMU exception. When relocation is off, a machine check exception. It is possible to trigger this machine check by branching to a foreign address with MSR[IR]=0. Fixes: 7b9f71f974a1 ("powerpc/64s: POWER9 machine check handler") Reported-by: Mahesh Salgaonkar Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mce.h | 15 ++++++++------- arch/powerpc/kernel/mce.c | 1 + arch/powerpc/kernel/mce_power.c | 3 +++ 3 files changed, 12 insertions(+), 7 deletions(-) commit 1656df35d689ac6a93d7503725d9e62ce50c7f38 Author: Colin Ian King Date: Mon May 22 05:13:25 2017 -0300 [media] em28xx: fix spelling mistake: "missdetected" -> "misdetected" Trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e1082d28721081858a51f6c0148a3c7603d9e65e Author: Gustavo A. R. Silva Date: Wed May 3 21:13:18 2017 -0300 [media] media: i2c: initialize scalar variables Initialize scalar variables _pid_ and _ver_ to avoid a possible misbehavior. Addresses-Coverity-ID: 1324239 Addresses-Coverity-ID: 1324240 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2659.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 834ebbc8f3a062f18131ff7ad7ddf27dc947e4c2 Author: Philipp Zabel Date: Wed Mar 15 08:31:35 2017 -0300 [media] coda: simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional without special cases and to call reset_control_reset unconditionally. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 0f42b331b6f7e9281381cc240d8c3a27cf0fa5ca Author: Oleh Kravchenko Date: Sat Apr 22 12:47:13 2017 -0300 [media] cx231xx: Initial support Astrometa T2hybrid This patch provide only digital support; The device is based on 24C02N EEPROM, Panasonic MN88473 demodulator, Rafael Micro R828D tuner and CX23102-11Z chipset; USB id: 15f4:0135. Status: - DVB-T/T2 works fine; - Composite works fine; - Analog not implemented. Signed-off-by: Oleh Kravchenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/Kconfig | 2 ++ drivers/media/usb/cx231xx/cx231xx-cards.c | 34 +++++++++++++++++++++ drivers/media/usb/cx231xx/cx231xx-dvb.c | 49 +++++++++++++++++++++++++++++++ drivers/media/usb/cx231xx/cx231xx.h | 1 + 4 files changed, 86 insertions(+) commit 53460c53b7619c14e8564a3ba2c60fc27f303f6b Author: Devin Heitmueller Date: Wed Apr 19 20:13:55 2017 -0300 [media] au0828: Add timer to restart TS stream if no data arrives on bulk endpoint For reasons unclear, we intermittently see a case where the tune is successful but the bulk stream fails to deliver any packets. Add a timer to automatically stop/start the data pump if we encounter such a case. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-dvb.c | 30 ++++++++++++++++++++++++++++++ drivers/media/usb/au0828/au0828.h | 2 ++ 2 files changed, 32 insertions(+) commit d7590b5704d6489ec5e6c7f65e90f8126a910b23 Author: Devin Heitmueller Date: Wed Apr 19 20:13:53 2017 -0300 [media] au8522: Set the initial modulation We need to set the initial modulation on driver setup, or else any calls to GET_FRONTEND prior to the first SET_FRONTEND call will get back garbage. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/au8522_common.c | 1 + 1 file changed, 1 insertion(+) commit d9928a115ac5b1b0e77f42a13b47a2a0d46d96d3 Author: Devin Heitmueller Date: Wed Apr 19 20:13:52 2017 -0300 [media] xc5000: Don't spin waiting for analog lock The xc5000 driver should not be spinning waiting for an analog lock. The ioctl() should be returning immediately and the application is responsible for polling for lock status. This behavior isn't very visible in cases where you tune to a valid channel, since lock is usually achieved much faster than 400ms. However it is highly visible where doing things like changing video standards, which sends tuning request for a frequency that is almost never going to have an actual channel on it. Also fixup the return values to treat zero as success and an actual error code on error (to be consistent with other functions). Note this change has no practical effect at this time as none of the callers inspect the return value. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/xc5000.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit b01052ab0924f07a80538974806f9681d8ea74d1 Author: Devin Heitmueller Date: Wed Apr 19 20:13:50 2017 -0300 [media] au8522: fix lock detection to be more reliable Only looking at the lock register causes the status to float between locked and not locked when there is no signal. So improve the logic to also examine the state of the FSC PLL, which results in the lock status being consistently reported. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/au8522_decoder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6211d28eabf40759d7e48fe23ee55e68aa8b9ba7 Author: Devin Heitmueller Date: Wed Apr 19 20:13:49 2017 -0300 [media] au8522 Remove 0x4 bit for register reads The second highest bit in the register value is an indicator to do a register read, so remove it since now au8522_regread() inserts the bit automatically. Also remove a stray instance where we were actually trying to write to the I2C status register, which was actually a read. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/au8522_dig.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit d6f79a915f35a2e16e413ed01dd6254ba54500ff Author: Devin Heitmueller Date: Wed Apr 19 20:13:48 2017 -0300 [media] au8522: remove leading bit for register writes The leading bit in register values is actually an indicator as to whether to perform a read or write, so remove the bit from the register values, since the au8522_writereg() is now responsible for adding this bit automatically. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/au8522_dig.c | 200 +++++++++++++++---------------- 1 file changed, 100 insertions(+), 100 deletions(-) commit 678de4b4306982b7b7beb70ea11cf21bd95ccf17 Author: Devin Heitmueller Date: Wed Apr 19 20:13:47 2017 -0300 [media] au8522: remove note about VBI not being implemented I got this working a couple of years ago. Remove it from the list of known issues. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/au8522_decoder.c | 1 - 1 file changed, 1 deletion(-) commit 427de05cf20f6b3bbcc79a6f3511fa13797fbdbe Author: Devin Heitmueller Date: Wed Apr 19 20:13:46 2017 -0300 [media] au8522: rework setup of audio routing The original code was based on my reverse engineering of an I2C trace of the Windows driver. Now that I know what the registers actually do, restructure the code a bit, removing some unneeded register programming and fixing the sequencing of operations. This reduces the time it takes to change inputs from 1300ms down to 600ms (as measured by "time v4l2-ctl -i 0") Note this does not address outstanding issues related to the management of the module clocks and power control for the various blocks, which will be done in a separate patch. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/au8522_decoder.c | 29 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit bb750c7b4cecd6c9d12f41cb71e301141bad8835 Author: Devin Heitmueller Date: Wed Apr 19 20:13:45 2017 -0300 [media] au8522: don't touch i2c master registers on au8522 Some stray lines got inserted into the driver when I reverse engineered the I2C traffic (at the time I didn't know what the registers did). It turns up these registers muck with the onboard I2C master, which we don't use since we instead use the I2C gate. Remove the lines which can actually interfere with the operation of the bus. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/au8522_decoder.c | 2 -- 1 file changed, 2 deletions(-) commit c70b18f72b19a5b09a1ba3fd77b66fa4bf53b52b Author: Devin Heitmueller Date: Wed Apr 19 20:13:44 2017 -0300 [media] au8522: don't attempt to configure unsupported VBI slicer Since we don't suppoort sliced VBI with the au0828/au8522, there is no need to configure the au8522 VBI slicer, which because of the coefficients requires a large amount of i2c traffic. Remove the relevant code. Note that this has no effect on raw VBI support, which is currently the only supported way to access VBI on this device. Signed-off-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/au8522_decoder.c | 38 ---------------------------- 1 file changed, 38 deletions(-) commit ac5c03b33a022b3c7736eb0cb1cc13fcb053ef01 Author: Rene Hickersberger Date: Fri May 5 11:09:58 2017 -0300 [media] media: s5p-cec: Fixed spelling mistake Fixed spelling mistake of "successfully" Signed-off-by: Rene Hickersberger Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-cec/s5p_cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd47bc412072563589245aefac372ee4a886cd7d Author: Benjamin Gaignard Date: Thu May 18 05:45:10 2017 -0300 [media] cec: stih: fix typos in comments Minor fixes in comments Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/cec/stih-cec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e201031df9d36a4c58f8380c9def7e6ae57fa1b6 Author: Benjamin Gaignard Date: Thu May 18 05:45:09 2017 -0300 [media] cec: stih: allow to use max CEC logical addresses Hardware could support up to 16 logical addresses which is more than needed by CEC specifications. Let use CEC_MAX_LOG_ADDRS instead of limited it on one. stih_cec_adap_log_addr() function was alredy written to support multiple addresses requests. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/cec/stih-cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2eeb329619a514b2d77a8ebd72f578dbe78bf52d Author: Gustavo A. R. Silva Date: Wed May 17 18:19:00 2017 -0300 [media] media: platform: coda: remove variable self assignment Remove variable self assignment. Addresses-Coverity-ID: 1408817 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 1 - 1 file changed, 1 deletion(-) commit ab64a58976cd2ec9c479f40bec31c7ce93e1ccc9 Author: Johan Hovold Date: Fri May 12 07:01:30 2017 -0300 [media] usbvision: add missing USB-descriptor endianness conversions Add the missing endianness conversions to a debug call printing the USB device-descriptor idVendor and idProduct fields during probe. Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbvision/usbvision-video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 043f77edae8bd50f238b7afc6bdf49c4db0ed4ac Author: Hans Verkuil Date: Wed May 10 03:36:56 2017 -0300 [media] v4l2-ioctl.c: always copy G/S_EDID result The VIDIOC_G/S_EDID ioctls can return valid data even if an error is returned. Mark those ioctls accordingly. Rather than using an explicit 'if' to check for the ioctl (as was done until now for VIDIOC_QUERY_DV_TIMINGS) just set a new flag in the v4l2_ioctls array. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit ce550362c5cf1e50f8116ba00f2e5bdb3ed151dd Author: Petr Cvek Date: Mon May 1 01:21:57 2017 -0300 [media] pxa_camera: Fix a call with an uninitialized device pointer In 'commit 295ab497d6357 ("[media] media: platform: pxa_camera: make printk consistent")' a pointer to the device structure in mclk_get_divisor() was changed to pcdev_to_dev(pcdev). The pointer used by pcdev_to_dev() is still uninitialized during the call to mclk_get_divisor() as it happens in v4l2_device_register() at the end of the probe. The dev_warn and dev_dbg caused a line in the log: (NULL device *): Limiting master clock to 26000000 Fix this by using an initialized pointer from the platform_device (as before the old patch). Signed-off-by: Petr Cvek Acked-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a065c2e52744b302d408436fbc1f153696ae0bd0 Author: Petr Cvek Date: Mon May 1 01:21:29 2017 -0300 [media] pxa_camera: Add (un)subscribe_event ioctl The v4l2-compliance complains about nonexistent vidioc_subscribe_event and vidioc_unsubscribe_event calls. Add them to fix the complaints. Signed-off-by: Petr Cvek Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 4 ++++ 1 file changed, 4 insertions(+) commit a14c5d29b4f762e5f752df14b6569fbf936f4ee0 Author: Petr Cvek Date: Mon May 1 01:21:10 2017 -0300 [media] pxa_camera: Fix incorrect test in the image size generation During the transfer from the soc_camera a test in pxa_mbus_image_size() got removed. Without it any PXA_MBUS_LAYOUT_PACKED format causes either the return of a wrong value (PXA_MBUS_PACKING_2X8_PADHI doubles the correct value) or EINVAL (PXA_MBUS_PACKING_NONE and PXA_MBUS_PACKING_EXTEND16). This was observed in an error from the ffmpeg (for some of the YUYV subvariants). This patch re-adds the same test as in soc_camera version. Signed-off-by: Petr Cvek Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 3 +++ 1 file changed, 3 insertions(+) commit 30a42a1c90bec5f8c482fe2d0fc444c9e1b15cd8 Author: Petr Cvek Date: Mon May 1 01:20:45 2017 -0300 [media] pxa_camera: Add remaining Bayer 8 formats This patch adds Bayer 8 GBRG and RGGB support and move GRBG definition close to BGGR (so all Bayer 8 variants are together). No other changes are needed as the driver handles them as RAW data stream. The RGGB variant was tested in a modified OV9640 driver. Signed-off-by: Petr Cvek Acked-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 40 +++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit e7b09f18ec79c002e2139d6a4df0110933743796 Author: Peter Boström Date: Thu Apr 27 09:28:18 2017 -0300 [media] uvcvideo: Add iFunction or iInterface to device names Permits distinguishing between two /dev/videoX entries from the same physical UVC device (that naturally share the same iProduct name). This change matches current Windows behavior by prioritizing iFunction over iInterface, but unlike Windows it displays both iProduct and iFunction/iInterface strings when both are available. Signed-off-by: Peter Boström Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 7b848ed60f409ce860023c79aa9a5c8d1833ebab Author: Daniel Roschka Date: Thu Apr 27 09:28:17 2017 -0300 [media] uvcvideo: Quirk for webcam in MacBook Pro 2016 Add the probe def quirk for the webcam found in the Apple MacBook Pro 2016, to get it working out of the box. Signed-off-by: Daniel Roschka Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 603c33a3216735119aed6dd4dbac89a214c0fb4e Author: Frank Schaefer Date: Wed Apr 26 13:43:12 2017 -0300 [media] em28xx: fix+improve the register (usb control message) debugging - avoid duplicate debugging messages in em28xx_read_reg_req_len() - do not describe successful usb transfers in em28xx_read_reg_len() as "failed" - report errors in em28xx_write_regs_req(), too - print the usb error numbers, too Signed-off-by: Frank Schäfer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-core.c | 35 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 017725c702ebd30abd42b55768869f3900d8909b Author: Colin Ian King Date: Tue Apr 25 18:32:23 2017 -0300 [media] cx18: fix spelling mistake: "demodualtor" -> "demodulator" trivial fix to spelling mistake and add in a white space in a CX18_ERR error message Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx18/cx18-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35378ce143071c2a6bad4b59a000e9b9f8f6ea67 Author: Pan Bian Date: Sun Apr 23 10:06:36 2017 -0300 [media] cx25840: fix unchecked return values In functions cx25840_initialize(), cx231xx_initialize(), and cx23885_initialize(), the return value of create_singlethread_workqueue() is used without validation. This may result in NULL dereference and cause kernel crash. This patch fixes it. Signed-off-by: Pan Bian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/cx25840/cx25840-core.c | 36 +++++++++++++++++++------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit b9150e8131914df75d396a5730a599d358f016d8 Author: Pan Bian Date: Sun Apr 23 09:18:29 2017 -0300 [media] cobalt: fix unchecked return values Function pci_find_ext_capability() may return 0, which is an invalid address. In function cobalt_pcie_status_show(), its return value is used without validation. This patch adds checks to validate the return address. Signed-off-by: Pan Bian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cobalt/cobalt-driver.c | 2 ++ 1 file changed, 2 insertions(+) commit 13174c388a76005c1abe454e47a37cd57edd8c8d Author: Pan Bian Date: Sun Apr 23 06:26:45 2017 -0300 [media] m5602_s5k83a: check return value of kthread_create Function kthread_create() returns an ERR_PTR on error. However, in function s5k83a_start(), its return value is used without validation. This may result in a bad memory access bug. This patch fixes the bug. Signed-off-by: Pan Bian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/m5602/m5602_s5k83a.c | 5 +++++ 1 file changed, 5 insertions(+) commit d90b336f3f652ff0441e631a06236f785581c8f7 Author: Devin Heitmueller Date: Fri Apr 21 13:28:37 2017 -0300 [media] mxl111sf: Fix driver to use heap allocate buffers for USB messages The recent changes in 4.9 to mandate USB buffers be heap allocated broke this driver, which was allocating the buffers on the stack. This resulted in the device failing at initialization. Introduce dedicated send/receive buffers as part of the state structure, and add a mutex to protect access to them. Note: we also had to tweak the API to mxl111sf_ctrl_msg to pass the pointer to the state struct rather than the device, since we need it inside the function to access the buffers and the mutex. This patch adjusts the callers to match the API change. Signed-off-by: Devin Heitmueller Reported-by: Doug Lung Cc: Michael Ira Krufky Cc: # for v4.5 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 4 ++-- drivers/media/usb/dvb-usb-v2/mxl111sf.c | 32 +++++++++++++++++------------ drivers/media/usb/dvb-usb-v2/mxl111sf.h | 8 +++++++- 3 files changed, 28 insertions(+), 16 deletions(-) commit 682559d9d5bdb986134c891951509ae19068f937 Author: Songjun Wu Date: Thu Apr 20 05:51:30 2017 -0300 [media] atmel-isc: Set the default DMA memory burst size Sometimes 'DMA single access' is not enough to transfer a frame of image, '8-beat burst access' is set as the default DMA memory burst size. Signed-off-by: Songjun Wu Acked-by: Nicolas Ferre Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 4e0973a918b9a42e217093f078e04a61e5dd95a5 Author: Devin Heitmueller Date: Sat Sep 20 09:23:44 2014 -0300 [media] cx88: Fix regression in initial video standard setting Setting initial standard at the top of cx8800_initdev would cause the first call to cx88_set_tvnorm() to return without programming any registers (leaving the driver saying it's set to NTSC but the hardware isn't programmed). Even worse, any subsequent attempt to explicitly set it to NTSC-M will return success but actually fail to program the underlying registers unless first changing the standard to something other than NTSC-M. Set the initial standard later in the process, and make sure the field is zero at the beginning to ensure that the call always goes through. This regression was introduced in the following commit: commit ccd6f1d488e7 ("[media] cx88: move width, height and field to core struct") Author: Hans Verkuil [media] cx88: move width, height and field to core struct Signed-off-by: Devin Heitmueller Cc: # for v3.19 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx88/cx88-cards.c | 9 ++++++++- drivers/media/pci/cx88/cx88-video.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) commit 65878b126c8f2d761273241cf778b1c6aa50c500 Author: Kevin Hilman Date: Tue May 30 18:21:25 2017 -0700 ARM: dts: da850-evm: fix tca6416 for use with GPIO hogs In order GPIOS from this controller to be used with the "gpio-hogs" property, the tca6416 node has to properly labeled as a gpio-controller, and use #gpio-cells. With that, the SEL_A, SEL_B, SEL_C lines that are used to select VPIF input can be configured using GPIO hogs. As an example, example, the configuration below selects the analog video input on the da850-evm UI board: &tca6416 { status = "okay"; sel_a { gpio-hog; gpios = <7 GPIO_ACTIVE_HIGH>; output-high; line-name = "ADC_ENn"; }; sel_b { gpio-hog; gpios = <6 GPIO_ACTIVE_HIGH>; output-high; line-name = "CAMERA_ENn"; }; sel_c { gpio-hog; gpios = <5 GPIO_ACTIVE_HIGH>; output-low; line-name = "VIDEO_IN_ENn"; }; }; Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 2 ++ 1 file changed, 2 insertions(+) commit 37404f91ef8b910e6117b7920c082d71aba27250 Author: Hugues Fruchet Date: Fri May 5 12:31:21 2017 -0300 [media] stm32-dcmi: STM32 DCMI camera interface driver This V4L2 subdev driver enables Digital Camera Memory Interface (DCMI) of STMicroelectronics STM32 SoC series. Signed-off-by: Yannick Fertre Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 12 + drivers/media/platform/Makefile | 2 + drivers/media/platform/stm32/Makefile | 1 + drivers/media/platform/stm32/stm32-dcmi.c | 1403 +++++++++++++++++++++++++++++ 4 files changed, 1418 insertions(+) commit a3f194c6fa928fa290e10cd1a8b5cddada4d3438 Author: Hugues Fruchet Date: Fri May 5 12:31:20 2017 -0300 [media] dt-bindings: Document STM32 DCMI bindings This adds documentation of device tree bindings for the STM32 DCMI (Digital Camera Memory Interface). Acked-by: Rob Herring Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/st,stm32-dcmi.txt | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 58d876fa7181f2f393190c1d32c056b5a9d34aa2 Author: Dan Carpenter Date: Fri May 5 08:34:58 2017 +0300 cxl: Unlock on error in probe We should unlock if get_cxl_adapter() fails. Fixes: 594ff7d067ca ("cxl: Support to flash a new image on the adapter from a guest") Signed-off-by: Dan Carpenter Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/flash.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b59b1d390483e3ff3342d7b7cd0ec19e847a6142 Author: Frank Wang Date: Fri Jun 2 11:20:26 2017 +0800 phy: rockchip-inno-usb2: add support of usb2-phy for rk3228 SoCs This adds support usb2-phy for rk3228 SoCs and amend phy Documentation. Signed-off-by: Frank Wang Signed-off-by: Kishon Vijay Abraham I .../bindings/phy/phy-rockchip-inno-usb2.txt | 1 + drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 60 ++++++++++++++++++++++ 2 files changed, 61 insertions(+) commit 9632781122e5f7adfaf29aeb4387d7b354556593 Author: William Wu Date: Fri Jun 2 11:20:25 2017 +0800 phy: rockchip-inno-usb2: add one phy comprises with two host-ports support At the current rockchip-inno-usb2 phy driver framework, it can only support usb2-phy which comprises with one otg-port and one host-port. However, some Rockchip SoCs' (e.g RK3228, RK3229) usb2-phy comprises with two host-ports, so we use index of otg id for one host-port configuration, and make it work the same as otg-port host mode. Signed-off-by: William Wu Signed-off-by: Frank Wang Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 5a74a8b74233f0e3c018d4e1c2a52e9393605f47 Author: William Wu Date: Fri Jun 2 11:20:24 2017 +0800 phy: rockchip-inno-usb2: increase otg sm work first schedule time In rockchip-inno-usb2 phy driver, we use otg_sm_work to dynamically manage power consumption for phy otg-port. If the otg-port works as peripheral mode and does not communicate with usb host, we will suspend phy. But once suspend phy, the phy no longer has any internal clock running, include the utmi_clk which supplied for usb controller. So if we suspend phy before usb controller init, it will cause usb controller fail to initialize. Specifically, without this patch, the observed order is: 1. unplug usb cable 2. start system, do dwc2 controller probe 3. dwc2_lowlevel_hw_enable() - phy_init() - rockchip_usb2phy_init() - schedule otg_sm_work after 2s put phy in suspend, and close utmi_clk 4. dwc2_hsotg_udc_start() - fail to initialize the usb core Generally, dwc2_hsotg_udc_start() can be called within 5s after start system on Rockchip platform, so we increase the the first schedule delay time to 6s for otg_sm_work afer usb controller calls phy_init(), this can make sure that the usb controller completes initialization before phy enter suspend. Signed-off-by: William Wu Signed-off-by: Frank Wang Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbbe98cd44508def1c6b7f98d5dc676d23bc9031 Author: William Wu Date: Fri Jun 2 11:20:23 2017 +0800 phy: rockchip-inno-usb2: add a delay after phy resume When resume phy, it need about 1.5 ~ 2ms to wait for utmi_clk which used for USB controller to become stable. Signed-off-by: William Wu Signed-off-by: Frank Wang Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 3 +++ 1 file changed, 3 insertions(+) commit 6d6ce40f63af9860ba12e6540fc9c9feb4338a1d Author: Tony Lindgren Date: Mon May 22 17:37:23 2017 -0700 phy: cpcap-usb: Add CPCAP PMIC USB support Some Motorola phones like droid 4 use a custom CPCAP PMIC that has a multiplexing USB PHY. This USB PHY can operate at least in four modes using pin multiplexing and two control GPIOS: - Pass through companion PHY for the SoC USB PHY - ULPI PHY for the SoC - Pass through USB for the modem - UART debug console for the SoC This patch adds support for droid 4 USB PHY and debug UART modes, support for other modes can be added later on as needed. Both peripheral and host mode are working for the USB. The host mode depends on the cpcap-charger driver for VBUS. VBUS and ID pin detection are done using cpcap-adc IIO ADC driver. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Acked-by: Rob Herring Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/phy-cpcap-usb.txt | 40 ++ drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 1 + drivers/phy/motorola/Kconfig | 11 + drivers/phy/motorola/Makefile | 5 + drivers/phy/motorola/phy-cpcap-usb.c | 674 +++++++++++++++++++++ 6 files changed, 732 insertions(+) commit 4a3449d1a0a10c28e685bd8dfd06fb88179c5168 Author: Martin Blumenstingl Date: Thu Jun 1 18:41:14 2017 +0530 phy: meson8b-usb2: add support for the USB PHY on Meson8 SoCs Meson8 uses the same USB PHY as found on the Meson8b and GXBB SoCs. Add a new of_device_id to indicate this. Also update the Kconfig option and MODULE_DESCRIPTION accordingly. Signed-off-by: Martin Blumenstingl Signed-off-by: Kishon Vijay Abraham I drivers/phy/amlogic/Kconfig | 6 +++--- drivers/phy/amlogic/phy-meson8b-usb2.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit b78e290868e60abbd0d78c988a9e94ef1e128544 Author: Martin Blumenstingl Date: Sat May 20 16:12:50 2017 +0200 dt-bindings: phy: meson8b-usb2-phy: add support for the Meson8 SoCs Meson8 uses the same USB PHY as found on the Meson8b and GXBB SoCs. This adds a new compatible string to indicate that this binding also supports the Meson8 SoCs. Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 697b373c6df682dc6aba10cc1e81a2664c7cbbd4 Author: Martin Blumenstingl Date: Sat May 20 15:50:41 2017 +0200 phy: meson: add USB2 PHY support for Meson GXL and GXM This adds a new driver for the USB2 PHYs found on Meson GXL and GXM SoCs (both SoCs are using the same USB PHY register layout). The USB2 PHY is a simple PHY which only has a few registers to configure the mode (host/device) and a reset register (to enable/disable the PHY). Unfortunately there are no datasheets available for this PHY. The driver was written by reading the code from Amlogic's GPL kernel sources and by analyzing the registers on an actual GXL and GXM device running the kernel that was shipped on the boards I have. Signed-off-by: Martin Blumenstingl Signed-off-by: Kishon Vijay Abraham I drivers/phy/amlogic/Kconfig | 13 ++ drivers/phy/amlogic/Makefile | 1 + drivers/phy/amlogic/phy-meson-gxl-usb2.c | 273 +++++++++++++++++++++++++++++++ 3 files changed, 287 insertions(+) commit 8cda2a0dfefa6ea99be80c7ed6ec57fb4d3d470f Author: Martin Blumenstingl Date: Sat May 20 15:50:40 2017 +0200 dt-bindings: phy: meson-gxl-usb2-phy: Add documentation for the Meson GXL USB2 PHY This adds the DT binding documentation for the USB2 PHY(s) found in the Meson GXL and GXM SoCs. Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/meson-gxl-usb2-phy.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit fd8e597ba4afb769a8fb642555a6e0c5349a6ae8 Author: Konstantin Khlebnikov Date: Fri May 19 10:18:49 2017 +0300 e1000e: use disable_hardirq() also for MSIX vectors in e1000_netpoll() Replace disable_irq() which waits for threaded irq handlers with disable_hardirq() which waits only for hardirq part. Fixes: 311191297125 ("e1000: use disable_hardirq() for e1000_netpoll()") Signed-off-by: Konstantin Khlebnikov Acked-by: Cong Wang Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 24ad2a9209a0bf1ec37fac25a011c98551865abb Author: Benjamin Poirier Date: Wed May 17 16:24:13 2017 -0400 e1000e: Don't return uninitialized stats Some statistics passed to ethtool are garbage because e1000e_get_stats64() doesn't write them, for example: tx_heartbeat_errors. This leaks kernel memory to userspace and confuses users. Do like ixgbe and use dev_get_stats() which first zeroes out rtnl_link_stats64. Fixes: 5944701df90d ("net: remove useless memset's in drivers get_stats64") Reported-by: Stefan Priebe Signed-off-by: Benjamin Poirier Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81e3f64a9b2d837717a58606d9f22420a47fdf68 Author: Benjamin Poirier Date: Tue May 16 15:55:16 2017 -0700 igb: Remove useless argument Given that all callers of igb_update_stats() pass the same two arguments: (adapter, &adapter->stats64), the second argument can be removed. Signed-off-by: Benjamin Poirier Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 2 +- drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) commit e5f36ad14c93f2ca0b8b865f05cfa146c57c826d Author: Jacob Keller Date: Wed May 3 10:29:03 2017 -0700 igb: check for Tx timestamp timeouts during watchdog The igb driver has logic to handle only one Tx timestamp at a time, using a state bit lock to avoid multiple requests at once. It may be possible, if incredibly unlikely, that a Tx timestamp event is requested but never completes. Since we use an interrupt scheme to determine when the Tx timestamp occurred we would never clear the state bit in this case. Add an igb_ptp_tx_hang() function similar to the already existing igb_ptp_rx_hang() function. This function runs in the watchdog routine and makes sure we eventually recover from this case instead of permanently disabling Tx timestamps. Note: there is no currently known way to cause this without hacking the driver code to force it. Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/ethernet/intel/igb/igb_main.c | 1 + drivers/net/ethernet/intel/igb/igb_ptp.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) commit c3b8f85ec24674896aac9a6e41235b8d38db3dde Author: Jacob Keller Date: Wed May 3 10:28:59 2017 -0700 igb: add statistic indicating number of skipped Tx timestamps The igb driver can only handle one Tx timestamp request at a time. This means it is possible for an application timestamp request to be ignored. There is no easy way for an administrator to determine if this occurred. Add a new statistic which tracks this, tx_hwtstamp_skipped. Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/ethernet/intel/igb/igb_ethtool.c | 1 + drivers/net/ethernet/intel/igb/igb_main.c | 2 ++ 3 files changed, 4 insertions(+) commit cff57141456482b410a2312b88467ceb4c26d75d Author: Jacob Keller Date: Wed May 3 10:28:57 2017 -0700 e1000e: add statistic indicating number of skipped Tx timestamps The e1000e driver can only handle one Tx timestamp request at a time. This means it is possible for an application timestamp request to be ignored. There is no easy way for an administrator to determine if this occurred. Add a new statistic which tracks this, tx_hwtstamp_skipped. Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/e1000.h | 1 + drivers/net/ethernet/intel/e1000e/ethtool.c | 1 + drivers/net/ethernet/intel/e1000e/netdev.c | 17 ++++++++++------- 3 files changed, 12 insertions(+), 7 deletions(-) commit 74344e32fcc0d09342b77ed9d23ea74b3799d157 Author: Jacob Keller Date: Wed May 3 10:28:55 2017 -0700 igb: avoid permanent lock of *_PTP_TX_IN_PROGRESS The igb driver uses a state bit lock to avoid handling more than one Tx timestamp request at once. This is required because hardware is limited to a single set of registers for Tx timestamps. The state bit lock is not properly cleaned up during igb_xmit_frame_ring() if the transmit fails such as due to DMA or TSO failure. In some hardware this results in blocking timestamps until the service task times out. In other hardware this results in a permanent lock of the timestamp bit because we never receive an interrupt indicating the timestamp occurred, since indeed the packet was never transmitted. Fix this by checking for DMA and TSO errors in igb_xmit_frame_ring() and properly cleaning up after ourselves when these occur. Reported-by: Reported-by: David Mirabito Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 4ccdc013b0ae04755a8f7905e0525955d52a77d0 Author: Jacob Keller Date: Wed May 3 10:28:52 2017 -0700 igb: fix race condition with PTP_TX_IN_PROGRESS bits Hardware related to the igb driver has a limitation of only handling one Tx timestamp at a time. Thus, the driver uses a state bit lock to enforce that only one timestamp request is honored at a time. Unfortunately this suffers from a simple race condition. The bit lock is not cleared until after skb_tstamp_tx() is called notifying the stack of a new Tx timestamp. Even a well behaved application which sends only one timestamp request at once and waits for a response might wake up and send a new packet before the bit lock is cleared. This results in needlessly dropping some Tx timestamp requests. We can fix this by unlocking the state bit as soon as we read the Timestamp register, as this is the first point at which it is safe to unlock. To avoid issues with the skb pointer, we'll use a copy of the pointer and set the global variable in the driver structure to NULL first. This ensures that the next timestamp request does not modify our local copy of the skb pointer. This ensures that well behaved applications do not accidentally race with the unlock bit. Obviously an application which sends multiple Tx timestamp requests at once will still only timestamp one packet at a time. Unfortunately there is nothing we can do about this. Reported-by: David Mirabito Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_ptp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 5012863b7347866764c4a4e58b62fb05346b0d06 Author: Jacob Keller Date: Wed May 3 10:28:50 2017 -0700 e1000e: fix race condition around skb_tstamp_tx() The e1000e driver and related hardware has a limitation on Tx PTP packets which requires we limit to timestamping a single packet at once. We do this by verifying that we never request a new Tx timestamp while we still have a tx_hwtstamp_skb pointer. Unfortunately the driver suffers from a race condition around this. The tx_hwtstamp_skb pointer is not set to NULL until after skb_tstamp_tx() is called. This function notifies the stack and applications of a new timestamp. Even a well behaved application that only sends a new request when the first one is finished might be woken up and possibly send a packet before we can free the timestamp in the driver again. The result is that we needlessly ignore some Tx timestamp requests in this corner case. Fix this by assigning the tx_hwtstamp_skb pointer prior to calling skb_tstamp_tx() and use a temporary pointer to hold the timestamped skb until that function finishes. This ensures that the application is not woken up until the driver is ready to begin timestamping a new packet. This ensures that well behaved applications do not accidentally race with condition to skip Tx timestamps. Obviously an application which sends multiple Tx timestamp requests at once will still only timestamp one packet at a time. Unfortunately there is nothing we can do about this. Reported-by: David Mirabito Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 000ba1f2ebf0d6f93b9ae6cfbe5417e66f1b8e8c Author: Arnd Bergmann Date: Thu Apr 27 21:09:52 2017 +0200 igb: mark PM functions as __maybe_unused The new wake function is only used by the suspend/resume handlers that are defined in inside of an #ifdef, which can cause this harmless warning: drivers/net/ethernet/intel/igb/igb_main.c:7988:13: warning: 'igb_deliver_wake_packet' defined but not used [-Wunused-function] Removing the #ifdef, instead using a __maybe_unused annotation simplifies the code and avoids the warning. Fixes: b90fa8763560 ("igb: Enable reading of wake up packet") Signed-off-by: Arnd Bergmann Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 440aeca4b9858248d8f16d724d9fa87a4f65fa33 Author: Matwey V Kornilov Date: Thu Nov 24 13:32:48 2016 +0300 igb: Explicitly select page 0 at initialization The functions igb_read_phy_reg_gs40g/igb_write_phy_reg_gs40g (which were removed in 2a3cdea) explicitly selected the required page at every phy_reg access. Currently, igb_get_phy_id_82575 relays on the fact that page 0 is already selected. The assumption is not fulfilled for my Lex 3I380CW motherboard with integrated dual i211 based gigabit ethernet. This leads to igb initialization failure and network interfaces are not working: igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k igb: Copyright (c) 2007-2014 Intel Corporation. igb: probe of 0000:01:00.0 failed with error -2 igb: probe of 0000:02:00.0 failed with error -2 In order to fix it, we explicitly select page 0 before first access to phy registers. See also: https://bugzilla.suse.com/show_bug.cgi?id=1009911 See also: http://www.lex.com.tw/products/pdf/3I380A&3I380CW.pdf Fixes: 2a3cdea ("igb: Remove GS40G specific defines/functions") Cc: # 4.5+ Signed-off-by: Matwey V Kornilov Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_82575.c | 1 + 1 file changed, 1 insertion(+) commit 28df169b9afa121153ef2a3ef4ceae72512cde6d Author: Andrew F. Davis Date: Wed May 24 13:09:30 2017 -0500 reset: Add the TI SCI reset driver Some TI Keystone family of SoCs contain a system controller (like the Power Management Micro Controller (PMMC) on 66AK2G SoCs) that manage the low-level device control (like clocks, resets etc) for the various hardware modules present on the SoC. These device control operations are provided to the host processor OS through a communication protocol called the TI System Control Interface (TI SCI) protocol. This patch adds a reset driver that communicates to the system controller over the TI SCI protocol for performing reset management of various devices present on the SoC. Various reset functionalities are achieved by the means of different TI SCI device operations provided by the TI SCI framework. Signed-off-by: Andrew F. Davis [s-anna@ti.com: documentation changes, revised commit message] Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Acked-by: Santosh Shilimkar [p.zabel@pengutronix.de: const struct reset_control_ops] Signed-off-by: Philipp Zabel MAINTAINERS | 1 + drivers/reset/Kconfig | 8 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-ti-sci.c | 269 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 279 insertions(+) commit 18a006203b88b702835999428400e1707d7ca3af Author: Andrew F. Davis Date: Wed May 24 13:09:29 2017 -0500 dt-bindings: reset: Add TI SCI reset binding Add TI SCI reset controller binding. This describes the DT binding details for a reset controller node providing reset management services to hardware blocks (reset consumers) using the Texas Instrument's System Control Interface (TI SCI) protocol to communicate to a system controller block present on the SoC. Signed-off-by: Andrew F. Davis [s-anna@ti.com: revise the binding format] Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Acked-by: Santosh Shilimkar Acked-by: Rob Herring Signed-off-by: Philipp Zabel .../devicetree/bindings/reset/ti,sci-reset.txt | 62 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 63 insertions(+) commit d25e4334c2900f15251f16c8ffc5151db800b2aa Author: Philipp Zabel Date: Wed May 31 17:42:29 2017 +0200 reset: use kref for reference counting Use kref for reference counting and enjoy the advantages of refcount_t. Signed-off-by: Philipp Zabel drivers/reset/core.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit de09eb52a1cceb6f80464a008c67c7bebb242314 Author: Suniel Mahesh Date: Mon Jun 5 23:47:16 2017 +0530 arm: dts: am33xx: Remove redundant interrupt-parent property Interrupt-parent property is defined in the root node as "interrupt-parent = <&intc>". This interrupt-parent value becomes the default for the system, so removed redundant "interrupt-parent" property from mmc, mac, lcdc and tscadc nodes. Signed-off-by: Suniel Mahesh Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 6 ------ 1 file changed, 6 deletions(-) commit 7ff64afbc73c32171d9e08aa5444c68a654bb9d0 Author: Robert Nelson Date: Mon Jun 5 10:36:21 2017 -0500 ARM: dts: bonegreen-wireless: add WL1835 Bluetooth device node This adds the serial slave device for the WL1835 Bluetooth interface. Signed-off-by: Robert Nelson CC: Ricardo Salveti CC: Tony Lindgren CC: Jason Kridner Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-bonegreen-wireless.dts | 5 +++++ 1 file changed, 5 insertions(+) commit d132a000887b47e2d8ba711224d19bd58727abe2 Author: Keerthy Date: Fri Jun 2 14:54:01 2017 +0530 ARM: dts: AM43XX: Remove min and max voltage values for dcdc3 dcdc3 supplies to DDR on AM43x series. When we set both min and max values to the same value. The regulator framework sets that particular voltage. This is bad as we are changing the ddr voltage when executing from ddr. Hence remove the min and max values. The ddr supply voltage shall be set from bootloader when not executing from ddr and not while executing from kernel. The previous discussion can be found here: http://www.spinics.net/lists/devicetree/msg56399.html Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-gp-evm.dts | 2 -- arch/arm/boot/dts/am437x-sk-evm.dts | 2 -- arch/arm/boot/dts/am43x-epos-evm.dts | 2 -- 3 files changed, 6 deletions(-) commit accc55d9baebee484d04ac198b91fc6568a242e9 Author: Robert Nelson Date: Tue May 30 11:20:23 2017 -0500 ARM: dts: Add am335x-boneblue BeagleBone Blue is robotics-oriented version of the BeagleBone Black (BBB). This board can be indentified by the BLAx value after A335BNLT (BBB) in the at24 eeprom: BLAx [aa 55 33 ee 41 33 33 35 42 4e 4c 54 42 4c 41 30 |.U3.A335BNLTBLA2|] http://beagleboard.org/blue https://github.com/beagleboard/beaglebone-blue firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address Signed-off-by: Robert Nelson CC: Jason Kridner CC: Drew Fustini Acked-by: Jason Kridner Signed-off-by: Tony Lindgren arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-boneblue.dts | 460 ++++++++++++++++++++++++++++++++++ 2 files changed, 461 insertions(+) commit 2277795eb8e384dbfcee43b0e74dd3bc1129b4f8 Author: Marek Belisko Date: Sun May 21 12:38:17 2017 +0200 ARM: dts: twl4030: Add missing madc reference for bci subnode The twl4030_charger driver expects an iio channel to detect the presence of an AC charger by looking at VAC (madc channel 11). This definition is missing in the device tree. Signed-off-by: Marek Belisko Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/twl4030.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 70f05be3213393f20f01e4d59625df7ee49fe32f Author: Tero Kristo Date: Wed May 31 18:00:03 2017 +0300 ARM: OMAP2+: hwmod: populate clkctrl clocks for hwmods if available If clkctrl clocks are available on a device, populate these automatically to replace hwmod main_clk info. First, the patch parses all "ti,clkctrl" compatible nodes and maps these against existing clockdomain data. Once done, individual hwmod init routines can search for a clkctrl clock handle based on the clockdomain info and the created mapping. This patch also drops the obsolete "_mod_ck" search as the implementation required for this was not accepted usptream. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 145 +++++++++++++++++++++++++++++++++++---- 1 file changed, 130 insertions(+), 15 deletions(-) commit 308b4e381b5849c190ca4a93388c9ccfbc525e3b Author: Tero Kristo Date: Wed May 31 18:00:02 2017 +0300 ARM: OMAP4: cminst: add support for clkdm_xlate_address This function gets the physical base address of a clockdomain. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/cminst44xx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0bf76e00e5d8410a77b07b32ac9afea61d1e0ecd Author: Tero Kristo Date: Wed May 31 18:00:01 2017 +0300 ARM: omap2+: clockdomain: add clkdm_xlate_address This new function can be used to get the physical address of a clockdomain. Required for mapping the clkctrl clocks under hwmod without modification to DT data. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/clockdomain.c | 8 ++++++++ arch/arm/mach-omap2/clockdomain.h | 2 ++ 2 files changed, 10 insertions(+) commit 90129336712c3c8dcd0d81a5dfaea52dd8391e62 Author: Tero Kristo Date: Wed May 31 18:00:00 2017 +0300 ARM: OMAP2+: PRCM: store also physical addresses for instances In some cases the physical address info is needed, so store this under the existing cm*_base, prm_base and prcm_mpu_base variables. These are converted now to structs that contain both virtual and physical address base for the instance. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/cm.h | 7 +++++-- arch/arm/mach-omap2/cm2xxx_3xxx.h | 4 ++-- arch/arm/mach-omap2/cm33xx.c | 4 ++-- arch/arm/mach-omap2/cm3xxx.c | 3 ++- arch/arm/mach-omap2/cm_common.c | 31 +++++++++++++++++++------------ arch/arm/mach-omap2/cminst44xx.c | 19 ++++++++++--------- arch/arm/mach-omap2/prcm-common.h | 7 +++++++ arch/arm/mach-omap2/prcm_mpu44xx.c | 4 ++-- arch/arm/mach-omap2/prcm_mpu_44xx_54xx.h | 4 +++- arch/arm/mach-omap2/prm.h | 2 +- arch/arm/mach-omap2/prm2xxx_3xxx.h | 4 ++-- arch/arm/mach-omap2/prm33xx.c | 4 ++-- arch/arm/mach-omap2/prm3xxx.c | 2 +- arch/arm/mach-omap2/prm44xx.c | 4 ++-- arch/arm/mach-omap2/prm_common.c | 23 +++++++++++++---------- arch/arm/mach-omap2/prminst44xx.c | 16 +++++++++------- 16 files changed, 82 insertions(+), 56 deletions(-) commit 24d8d498a8703462f0141f2fcdcd325de1ab2bb8 Author: Tero Kristo Date: Wed May 31 17:59:59 2017 +0300 ARM: OMAP4: hwmod_data: add opt clks for dss_hdmi and dss_venc These extra optional clocks are required as main clock for these modules are going to be routed to the main module clock. Otherwise, the hdmi / tv clocks are not going to be enabled during usage, leading to failure. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 138f7ca78f5a0677f591fdf23d0309c2f4774bf7 Author: Tero Kristo Date: Wed May 31 17:59:58 2017 +0300 ARM: OMAP2+: timer: add support for fetching fck handle from DT The mux clock handle shall be provided via "fck" DT handle. This avoids the need to lookup the main clock via hwmod core, which will not work with the clkctrl clock support anymore; the main clock is not going to be a mux. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren Signed-off-by: Tony Lindgren arch/arm/mach-omap2/timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8d39ff3d1696f7c6122500e21016f6837984ad8b Author: Tony Lindgren Date: Wed May 31 15:51:30 2017 -0700 ARM: OMAP2+: Remove unused legacy code for timer We are now booting all mach-omap2 in device tree only mode. Any code that is only called in legacy boot mode where of_have_populated_dt() is not set is safe to remove now. Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/timer.c | 169 +++++--------------------------------------- 1 file changed, 19 insertions(+), 150 deletions(-) commit c9f0726ff360cf75aaafd326e439e9234630aee9 Merge: 55f5b0b ce42cf4 Author: Dave Airlie Date: Tue Jun 6 16:54:27 2017 +1000 Merge tag 'exynos-drm-next-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Summary: - Rework vblank handling . This patch series adds frame counter callback and removes unnecessary pipe relevnt fields and simplifies event handling. - clean up and fix up sw-trigger relevant code . This patch series moves TE relevant code from Panel and HDMI to DECON driver to fix a race between interrupt handlers and DECON disable, and to fix timeout issue at wait-for-vblank. . It removes unnecessary flags and check code specific to Exynos driver. * tag 'exynos-drm-next-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (27 commits) drm/exynos/decon5433: remove useless check drm/exynos/decon5433: kill BIT_SUSPENDED flag drm/exynos/decon5433: kill BIT_WIN_UPDATED flag drm/exynos/decon5433: kill BIT_CLKS_ENABLED flag drm/exynos/decon5433: kill BIT_IRQS_ENABLED flag drm/exynos/decon5433: move TE handling to DECON dt-bindings: exynos5433-decon: add TE interrupt binding dt-bindings: exynos5433-decon: fix interrupts bindings drm/exynos/decon5433: always do sw-trigger when vblanks enabled drm/exynos: mixer: document YCbCr magic numbers drm/exynos: mixer: simplify mixer_cfg_rgb_fmt() drm/exynos/dsi: fix bridge_node DT parsing drm/exynos/hdmi: fix pipeline disable order drm/exynos/decon5433: simplify shadow protect code drm/exynos/decon5433: kill BIT_IRQS_ENABLED drm/exynos/decon5433: kill DECON_UPDATE workaround drm/exynos: kill mode_set_nofb callback drm/exynos: kill pipe field from drivers contexts drm/exynos: set plane possible_crtcs in exynos_plane_init drm/exynos: kill exynos_drm_private::pipe ... commit 55f5b0bf51f86a32f9ef6cb81636358fc0f1bb8b Merge: 562ff05 7f69694 Author: Dave Airlie Date: Tue Jun 6 16:53:16 2017 +1000 Merge tag 'drm-misc-next-2017-06-02' of git://anongit.freedesktop.org/git/drm-misc into drm-next Core Changes: - Stop proliferation of drm_vblank_cleanup by adding to the docs and deleting boilerplate (Daniel) - Roll out and use mode_valid hooks across crtc/encoder/bridge (Jose) - Add drm_vblank.[hc] to isolate vblank code from optional irq helpers (Daniel) Driver Changes: - Replace drm_for_each_connector with drm_for_each_connector_iter (Gustavo) - A couple misc driver fixes Cc: Gustavo Padovan Cc: Jose Abreu Cc: Daniel Vetter * tag 'drm-misc-next-2017-06-02' of git://anongit.freedesktop.org/git/drm-misc: (34 commits) drm/vc4: Mark the device as active when enabling runtime PM. drm: remove writeq/readq function definitions drm/atmel-hlcdc: Use crtc->mode_valid() callback drm/exynos: Drop drm_vblank_cleanup drm/hdlcd|mali: Drop drm_vblank_cleanup drm/doc: Polish irq helper documentation drm: Extract drm_vblank.[hc] drm/vc4: Fix comment in vc4_drv.h drm/pl111: fix warnings without CONFIG_ARM_AMBA drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc() drm/arcgpu: Drop drm_vblank_cleanup drm/atmel: Drop drm_vblank_cleanup drm/imx: Drop drm_vblank_cleanup drm/meson: Drop drm_vblank_cleanup drm/stm: Drop drm_vblank_cleanup drm/sun4i: Drop drm_vblank_cleanup drm: better document how to send out the crtc disable event drm: Use vsnprintf extension %ph drm/doc: move printf helpers out of drmP.h drm/pl111: select DRM_PANEL ... commit 7b87fe94299c965adcab384486ee3bf82ad15f9c Author: Christian Lamparter Date: Tue Mar 28 01:11:40 2017 +0200 ARM: debug: qcom: add UART addresses to Kconfig help for IPQ4019 Add information about the IPQ4019 debug UART physical and virtual addresses in the DEBUG_QCOM_UARTDM Kconfig help section. Signed-off-by: Christian Lamparter Signed-off-by: Andy Gross arch/arm/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) commit 1d917530c9ed2585cf3ed7db933e85a41b45141f Author: Abhishek Sahu Date: Fri Apr 28 15:57:53 2017 +0530 ARM: qcom_defconfig: Enable IPQ4019 clock and pinctrl These configs are required for booting kernel in QCOM IPQ4019 boards. Signed-off-by: Abhishek Sahu Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 35dfa3efea635c41cc5be1cf48dcc96b295964cd Author: Jonathan Neuschäfer Date: Wed Apr 5 14:10:48 2017 +0200 soc: qcom: smsm: Improve error handling, quiesce probe deferral Don't use size if info indicates an error condition. Previously a non-ENOENT error (such as -EPROBE_DEFER) would lead to size being used even though it hadn't necessarily been initialized in qcom_smem_get. Don't print an error message in the -EPROBE_DEFER case. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smsm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 20afb8ec093ad71d72656a4714673b1021ea5876 Author: Bjorn Andersson Date: Wed Apr 26 15:04:44 2017 -0700 arm64: dts: apq8016-sbc: Correct WLAN LED default-trigger The TX status trigger of the wlan interface is named phy0tx, so this updates the default-trigger for the WLAN LED to use that instead. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99c3334d5906111ca995f64c6a78a9c28aeddfe9 Author: Rajendra Nayak Date: Wed Apr 5 10:25:29 2017 +0530 arm64: dts: msm8996: Add CPU clock controller node Add the DT node for Kryo CPU clock controller on msm8996 devices. Signed-off-by: Rajendra Nayak Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 4255db146247dbce60c84a7388f65e82fc139439 Author: Jeremy McNicoll Date: Sun Jan 29 21:44:33 2017 -0800 arm64: dts: smem enablement for msm8992 SMEM allows various subsystems/processors to share memory/data (heap format) in order to enable various peripherals. Signed-off-by: Jeremy McNicoll Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8992.dtsi | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 75a3f782e85d20591b7b66a3175a8ecbf150609c Author: Jeremy McNicoll Date: Fri Jan 27 01:10:02 2017 -0800 arm64: dts: msm8992 add fixed regulator This regulator is not moving anywhere. Sit, stay... Signed-off-by: Jeremy McNicoll Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8992.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5594207294fcbfe8e9fe86c81d1d8b88cb530e66 Author: Linus Walleij Date: Mon May 15 09:50:12 2017 +0200 ARM: dts: add GSBI8 defines to the MSM8660 family This defines the memory location and interrupt used by the GSBI8 I2C adapter on the MSM8660 SoCs. We add it as "disabled" by default so that boards using this I2C can enable it. Signed-off-by: Linus Walleij Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8660.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 567cf21350e443802c382104c3ebd5cd7a2b70c2 Author: Linus Walleij Date: Sat May 13 16:15:53 2017 +0200 ARM: dts: Qualcomm APQ8060 DragonBoard ALS sensor This adds the Capella CM3605 ambient light and proximity sensor to the APQ8060 DragonBoard device tree. Notice that we also set up pin config for the AOUT line and GPIO lines, and that we set the default trigger on the infrared LED to associate with the "cm3605" trigger so the IR LED is controlled by this the CM3605 driver. Signed-off-by: Linus Walleij Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 80 ++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 6d78cea61c31bca8a8c84a3e1121453a2f147da2 Author: Linus Walleij Date: Sat May 13 16:15:43 2017 +0200 ARM: dts: add XOADC and IIO HWMON to MSM8660/APQ8060 This adds the PM8058 XOADC node to the PM8058 PMIC node, defines the 16 channels and further also define an IIO HWMON node for the channels that are used for housekeeping of voltages and die temperature for the PMIC chip die. Tested on the APQ8060 DragonBoard: cd /sys/class/hwmon/hwmon0 cat in2_input 4773 (DC mains ~5V) cat in4_input 625 (0.625V reference voltage) cat in5_input 1250 (1.25V reference voltage) cat temp1_input 35852 (die temperature) Signed-off-by: Linus Walleij Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8660.dtsi | 59 +++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 650df439cfb96c303328935559b2d06127a5a0b0 Author: Christian Lamparter Date: Tue May 2 21:19:24 2017 +0200 ARM: dts: qcom: ipq4019: fix i2c_0 node This patch fixes two typos in the i2c_0 node for the ipq4019. The reg property length is just 0x600. The core clock is GCC_BLSP1_QUP1_I2C_APPS_CLK. GCC_BLSP1_QUP2_I2C_APPS_CLK is used by the second i2c. Fixes: e76b4284b520ba3 ("qcom: ipq4019: add i2c node to ipq4019 SoC and DK01 device tree") Signed-off-by: Christian Lamparter Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-ipq4019.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5533b0cda3bf8b17e3688cce4b66bd5448d6cd1e Author: Sven Eckelmann Date: Fri Apr 28 12:10:36 2017 +0200 ARM: dts: qcom: add gsbi7 serial to ipq8064 SoC device tree The gsbi_serial7 under gsbi7 is used by the IPQ8068 based board EWS870AP as main serial console. Signed-off-by: Sven Eckelmann Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-ipq8064.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 552df26309f3aa5b9ead23c13abc2a3b2dc23eaf Author: Srinath Mannam Date: Fri Jun 2 12:04:35 2017 +0530 arm64: dts: Add PWM and SDHCI DT nodes for Stingray SOC The Stingray SoC has two instances of SDHCI controller and one instance of iProc PWM. Let's enable above mentioned devices in Stingray DT. Signed-off-by: Srinath Mannam Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli .../boot/dts/broadcom/stingray/bcm958742-base.dtsi | 39 ++++++++++++++++++++++ .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 28 ++++++++++++++++ 2 files changed, 67 insertions(+) commit 0dc454ee8915387ac4210bb771d4eafc1f82be3b Author: Anup Patel Date: Fri Jun 2 12:04:34 2017 +0530 arm64: dts: Add PL022, PL330 and SP805 DT nodes for Stingray We have two instance of PL022 SPI controllers, one instance of DMA PL330, and one non-secure SP805 Watchdog on Stingray SOC. This patch adds DT nodes for the above mentioned devices in Stingray DT. Signed-off-by: Anup Patel Reviewed-by: Pramod KUMAR Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli .../boot/dts/broadcom/stingray/bcm958742k.dts | 30 +++++++++++++ .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 52 ++++++++++++++++++++++ 2 files changed, 82 insertions(+) commit 1256ea18875d275b00f46b0b2299dcca00febe6d Author: Oza Pawandeep Date: Fri Jun 2 12:04:33 2017 +0530 arm64: dts: Add I2C DT nodes for Stingray SoC This patch adds I2C DT nodes on Stingray SoC. Signed-off-by: Oza Pawandeep Reviewed-by: Vikram Prakash Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli .../boot/dts/broadcom/stingray/bcm958742-base.dtsi | 22 ++++++++++++++++++++++ .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 20 ++++++++++++++++++++ 2 files changed, 42 insertions(+) commit 2fa9e9e29ea27b3b2dcb00a87a1102209eb5b90b Author: Pramod Kumar Date: Fri Jun 2 12:04:32 2017 +0530 arm64: dts: Add GPIO DT nodes for Stingray SOC The GPIOs on Stingray SOC are based on iProc GPIOs hence using this we add GPIO DT nodes for Stingray SOC. Signed-off-by: Pramod Kumar Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 8aa428cc1e2e7764377eb916a77007bdec86a7c2 Author: Pramod Kumar Date: Fri Jun 2 12:04:31 2017 +0530 arm64: dts: Add pinctrl DT nodes for Stingray SOC This patch adds pinctrl and pinmux related DT nodes for Stingray SOC. For manageability, pinctrl and pinmum DT nodes are added as separate DTSi file and included in main DTSi file. Signed-off-by: Pramod Kumar Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Vikram Prakash Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli .../dts/broadcom/stingray/stingray-pinctrl.dtsi | 345 +++++++++++++++++++++ .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 2 + .../dt-bindings/pinctrl/brcm,pinctrl-stingray.h | 68 ++++ 3 files changed, 415 insertions(+) commit 0f67ae3787a35cd0a5bfc13c9c69b400e2087f14 Author: Pramod Kumar Date: Fri Jun 2 12:04:30 2017 +0530 arm64: dts: Add NAND DT nodes for Stingray SOC This patch adds NAND controller DT Node and NAND chip DT node for Stingray SOC and Stingray reference boards. Signed-off-by: Pramod Kumar Signed-off-by: Abhishek Shah Reviewed-by: Vikram Prakash Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi | 13 +++++++++++++ 2 files changed, 28 insertions(+) commit 73da8f979804623466b91c1c31092ac653c9f385 Author: Sandeep Tripathy Date: Fri Jun 2 12:04:29 2017 +0530 arm64: dts: Add clock DT nodes for Stingray SOC This patch describes Stingray SOC clock tree using DT nodes in Stingray DTS. Signed-off-by: Sandeep Tripathy Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli .../boot/dts/broadcom/stingray/stingray-clock.dtsi | 170 +++++++++++++++++++++ .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 9 ++ 2 files changed, 179 insertions(+) commit d4b4aba6be8a6debb4a853c156cd40ea2a162314 Author: Anup Patel Date: Fri Jun 2 12:04:28 2017 +0530 arm64: dts: Initial DTS files for Broadcom Stingray SOC The Broadcom Stingray SoC is a new member in Broadcom iProc SoC family. This patch adds initial DTS files for Broadcom Stingray SoC and two of its reference boards (bcm958742k and bcm958742t). We have lot of reference boards and large number of devices in Broadcom Stingray SoC so eventually we will have quite a few DTS files for Stingray. To tackle, we have added a separate directory for Stingray DTS files. Signed-off-by: Anup Patel Signed-off-by: Scott Branden Reviewed-by: Ray Jui Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/Makefile | 1 + arch/arm64/boot/dts/broadcom/stingray/Makefile | 6 + .../boot/dts/broadcom/stingray/bcm958742-base.dtsi | 55 ++++ .../boot/dts/broadcom/stingray/bcm958742k.dts | 48 ++++ .../boot/dts/broadcom/stingray/bcm958742t.dts | 40 +++ .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 302 +++++++++++++++++++++ 6 files changed, 452 insertions(+) commit 24db8c91948dbe6c1dafd43e930705d699693c7c Author: Sandeep Tripathy Date: Fri Jun 2 12:04:26 2017 +0530 dt-bindings: clk: Extend binding doc for Stingray SOC Update iproc clock dt-binding documentation with Stingray pll and clock details. Signed-off-by: Sandeep Tripathy Reviewed-by: Ray Jui Reviewed-by: Scott Branden Acked-by: Rob Herring Signed-off-by: Florian Fainelli .../bindings/clock/brcm,iproc-clocks.txt | 76 ++++++++++++++++ include/dt-bindings/clock/bcm-sr.h | 101 +++++++++++++++++++++ 2 files changed, 177 insertions(+) commit fa53757bca338028338e4e9b8b59ac4ebbdeb80a Author: Masahiro Yamada Date: Mon Jun 5 12:57:58 2017 +0900 ARM: dts: uniphier: use SPDX-License-Identifier Follow the recent trend for the license description, and fix the wrongly stated X11 to MIT. The X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4-ref.dts | 38 +--------------------------- arch/arm/boot/dts/uniphier-ld4.dtsi | 38 +--------------------------- arch/arm/boot/dts/uniphier-ld6b-ref.dts | 38 +--------------------------- arch/arm/boot/dts/uniphier-ld6b.dtsi | 38 +--------------------------- arch/arm/boot/dts/uniphier-pro4-ace.dts | 38 +--------------------------- arch/arm/boot/dts/uniphier-pro4-ref.dts | 38 +--------------------------- arch/arm/boot/dts/uniphier-pro4-sanji.dts | 38 +--------------------------- arch/arm/boot/dts/uniphier-pro4.dtsi | 38 +--------------------------- arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 38 +--------------------------- arch/arm/boot/dts/uniphier-pxs2-vodka.dts | 38 +--------------------------- arch/arm/boot/dts/uniphier-pxs2.dtsi | 38 +--------------------------- arch/arm/boot/dts/uniphier-ref-daughter.dtsi | 38 +--------------------------- arch/arm/boot/dts/uniphier-sld3-ref.dts | 38 +--------------------------- arch/arm/boot/dts/uniphier-sld3.dtsi | 38 +--------------------------- arch/arm/boot/dts/uniphier-sld8-ref.dts | 38 +--------------------------- arch/arm/boot/dts/uniphier-sld8.dtsi | 38 +--------------------------- arch/arm/boot/dts/uniphier-support-card.dtsi | 38 +--------------------------- 17 files changed, 17 insertions(+), 629 deletions(-) commit b10ee7e3869a0aecba70fba9691d55b364098d96 Author: Masahiro Yamada Date: Sun May 14 02:20:50 2017 +0900 arm64: dts: uniphier: fix simple-bus unit address format error Compiling the UniPhier DT files with W=1, DTC warns like follows: Warning (simple_bus_reg): Node /soc/smpctrl@59800000 simple-bus unit address format error, expected "59801000" Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 2 +- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3fc9a121102eb8d30b18c8193db81b09353ba531 Author: Viresh Kumar Date: Thu Apr 20 16:25:10 2017 +0530 arm64: dts: uniphier: Use - instead of @ for DT OPP entries Compiling the DT file with W=1, DTC warns like follows: Warning (unit_address_vs_reg): Node /opp_table0/opp@1000000000 has a unit name, but no reg property Fix this by replacing '@' with '-' as the OPP nodes will never have a "reg" property. Reported-by: Krzysztof Kozlowski Reported-by: Masahiro Yamada Suggested-by: Mark Rutland Signed-off-by: Viresh Kumar Acked-by: Rob Herring Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 14 +++++------ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 32 ++++++++++++------------ 2 files changed, 23 insertions(+), 23 deletions(-) commit 18088678597a27901bc03eb6b67284c68f838417 Author: Masahiro Yamada Date: Sun May 14 02:20:49 2017 +0900 ARM: dts: uniphier: fix simple-bus unit address format error Compiling the UniPhier DT files with W=1, DTC warns like follows: Warning (simple_bus_reg): Node /soc/system-bus@58c00000/support_card@1,1f00000/ethernet@00000000 simple-bus unit address format error, expected "0" Warning (simple_bus_reg): Node /soc/system-bus@58c00000/support_card@1,1f00000/uart@000b0000 simple-bus unit address format error, expected "b0000" Warning (simple_bus_reg): Node /soc/smpctrl@59800000 simple-bus unit address format error, expected "59801000" Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4.dtsi | 2 +- arch/arm/boot/dts/uniphier-pro4.dtsi | 2 +- arch/arm/boot/dts/uniphier-pro5.dtsi | 2 +- arch/arm/boot/dts/uniphier-pxs2.dtsi | 2 +- arch/arm/boot/dts/uniphier-sld3.dtsi | 2 +- arch/arm/boot/dts/uniphier-sld8.dtsi | 2 +- arch/arm/boot/dts/uniphier-support-card.dtsi | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) commit f21683ae6ef99d79b3113367cfc6cd51852e8202 Author: Viresh Kumar Date: Thu Apr 20 16:25:10 2017 +0530 ARM: dts: uniphier: Use - instead of @ for DT OPP entries Compiling the DT file with W=1, DTC warns like follows: Warning (unit_address_vs_reg): Node /opp_table0/opp@1000000000 has a unit name, but no reg property Fix this by replacing '@' with '-' as the OPP nodes will never have a "reg" property. Reported-by: Krzysztof Kozlowski Reported-by: Masahiro Yamada Suggested-by: Mark Rutland Signed-off-by: Viresh Kumar Acked-by: Rob Herring Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pro5.dtsi | 32 ++++++++++++++++---------------- arch/arm/boot/dts/uniphier-pxs2.dtsi | 16 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-) commit 6f0fa58e459642b16901521cc58ac474b787ec5b Author: Masahiro Yamada Date: Fri May 19 20:42:30 2017 +0900 kbuild: simplify silent build (-s) detection This allows to detect -s (--silent) option without checking GNU Make version. As commit e36aaea28972 ("kbuild: Fix silent builds with make-4") pointed out, GNU Make 4.x changed the way/order it presents the command line options into MAKEFLAGS. In Make 3.8x, 's' is always the first in a group of short options. The group may be prefixed with '-' in some cases. In Make 4.x, 's' is always the last in a group of short options. As commit e6ac89fabd03 ("kbuild: Correctly deal with make options which contain an 's'") addressed, we also need to deal with long options that contain 's', like --warn-undefined-variables. Test cases: [1] command line input: make --silent -> MAKEFLAGS for Make 3.8x: s -> MAKEFLAGS for Make 4.x : s [2] command line input: make -srR -> MAKEFLAGS for Make 3.8x: sRr -> MAKEFLAGS for Make 4.x : rRs [3] command line input: make -s -rR --warn-undefined-variables -> MAKEFLAGS for Make 3.8x: --warn-undefined-variables -sRr -> MAKEFLAGS for Make 4.x : rRs --warn-undefined-variables My idea to cater to all the cases more easily is to filter out long options (--%), then search 's' with $(findstring ...). This way will be more future-proof even if future versions of Make put 's' in the middle of the group. Signed-off-by: Masahiro Yamada Makefile | 9 +-------- tools/build/Makefile.build | 8 +------- tools/scripts/Makefile.include | 8 +------- 3 files changed, 3 insertions(+), 22 deletions(-) commit 78bcac7b2ae1e4f6e96c68ff353c140669ea231c Author: Andi Shyti Date: Mon Jun 5 15:29:18 2017 -0700 Input: add support for the STMicroelectronics FingerTip touchscreen The stmfts (ST-Microelectronics FingerTip S) touchscreen device is a capacitive multi-touch controller mainly for mobile use. It's connected through i2c bus at the address 0x49 and it interfaces with userspace through input event interface. At the current state it provides a touchscreen multitouch functionality up to 10 fingers. Each finger is enumerated with a distinctive id (from 0 to 9). If enabled the device can support single "touch" hovering, by providing three coordinates, x, y and distance. It is possible to select the touchkey functionality which provides a basic two keys interface for "home" and "back" menu, typical in mobile phones. Signed-off-by: Andi Shyti Reviewed-by: Javier Martinez Canillas Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/st,stmfts.txt | 43 ++ drivers/input/touchscreen/Kconfig | 11 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/stmfts.c | 822 +++++++++++++++++++++ 4 files changed, 877 insertions(+) commit 131b3de7016b73fca1aba8ffb528217ac95b2505 Author: Linus Walleij Date: Mon Jun 5 14:48:44 2017 -0700 Input: add D-Link DIR-685 touchkeys driver This adds support for the D-Link DIR-685 touchkeys found in the router with this name. The vendor code calles this a "touchpad" but we are registering it here under its real name. Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/dlink,dir685-touchkeys.txt | 21 +++ MAINTAINERS | 6 + drivers/input/keyboard/Kconfig | 11 ++ drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/dlink-dir685-touchkeys.c | 155 +++++++++++++++++++++ 5 files changed, 194 insertions(+) commit 68f04b571da49c246eb54a7fe46233f17c77ad0f Author: Ayan Shafqat Date: Thu May 18 14:32:57 2017 -0400 Doc: fix a markup error in coding-style.rst The "\n\t" sequence needs to be quoted or it will not render properly. [jc: no signoff from the author, but it's trivial] Signed-off-by: Jonathan Corbet Documentation/process/coding-style.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c251e2a843364354c5de4d204b0b7777f1199a9f Author: Wolfram Sang Date: Tue May 23 15:46:54 2017 +0200 docs: driver-api: i2c: remove some outdated information a) Linux can be an I2C slave meanwhile b) all drivers except one use the driver model currently Update the documentation. Signed-off-by: Wolfram Sang Signed-off-by: Jonathan Corbet Documentation/driver-api/i2c.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 6a08d83e4324fcb23994dfd481acedf49e37cc06 Author: Wolfram Sang Date: Sat May 27 20:52:43 2017 +0200 Documentation: DMA API: fix a typo in a function name Correct the typo, the wrongly typed function does not exist. Fixes: 6c9c6d6301287e ("dma-debug: New interfaces to debug dma mapping errors") Signed-off-by: Wolfram Sang Signed-off-by: Jonathan Corbet Documentation/DMA-API.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d35d9cc6526f7b34889002f9eab0270fba05403e Author: Sanjeev Gupta Date: Mon May 29 19:48:46 2017 +0800 Docs: Insert missing space to separate link from text Korean translation, there should be a space terminating the link. Acked-by: SeongJae Park Signed-off-by: Jonathan Corbet Documentation/translations/ko_KR/howto.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68ce0c3dff92d4231028173dd75a8e954cf094d5 Author: SeongJae Park Date: Thu Jun 1 13:21:02 2017 +0900 doc/ko_KR/memory-barriers: Update control-dependencies example This commit applies upstream change, commit b26cfc48e3e0 ("doc: Update control-dependencies section of memory-barriers.txt"), to Korean translation. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Documentation/translations/ko_KR/memory-barriers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d15e5cc8cb68326f7f89b76e04c834fe8e1a2db Author: Colin Ian King Date: Mon Jun 5 19:08:04 2017 +0100 mdio: mux: fix an incorrect less than zero error check using a u32 The u32 variable v is being checked to see if an error return is less than zero and this check has no effect because it is unsigned. Fix this by making v and int (this also matches the type of cb->bus_number which is assigned to the value in v). Detected by CoverityScan, CID#1440454 ("Unsigned compared against zero") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/phy/mdio-mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ae0bb3f409d48251a9a1730a514b3521d8f6042 Author: Luca Coelho Date: Wed Apr 5 09:42:18 2017 +0300 iwlwifi: remove unnecessary code in iwl_trans_alloc_tx_cmd When we removed dev_cmd_headroom, the check for dev_cmd_ptr == NULL became unnecessary, since we just return dev_cmd_ptr anyway. Cleanup the function to avoid useless code. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit b7e94bab81dc9cba5269542b2da524fc749078af Author: Luca Coelho Date: Mon Jun 5 23:21:19 2017 +0300 iwlwifi: bump max FW API to 31 Bump the maximum accepted firmware API number for devices in the 8000, 9000 and A000 families. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit fccdbaa849f62a0992f8b77878a13e3c54161b87 Author: Mordechai Goodstein Date: Sun Apr 2 18:25:06 2017 +0300 iwlwifi: fw-api: cleanup cycle includes The include in the deleted file are included in the fw-api.h file. Which caused a cycle include in the dependencies. Signed-off-by: Mordechai Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 2 -- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tof.h | 2 -- 2 files changed, 4 deletions(-) commit 12edae864161c5fe9f7e5d9fad0d599f344e970d Author: Johannes Berg Date: Thu Mar 30 14:17:51 2017 +0200 iwlwifi: mvm: remove SCAN_GROUP The firmware no longer uses this command group, so remove it from the driver as well. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 1 - 1 file changed, 1 deletion(-) commit e8226a5e4a687cbf9133f47b5d166eb09ddcda1d Author: Johannes Berg Date: Fri Mar 31 11:25:52 2017 +0200 iwlwifi: mvm: link to TX commands in documentation Link from the TX_CMD enum value to the TX command structs. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b7bea642d5e53291aaa1a55adbcaa7e481d11940 Author: Johannes Berg Date: Fri Mar 31 10:48:17 2017 +0200 iwlwifi: mvm: document structures used for BEACON_TEMPLATE_CMD Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 6 ++++++ 1 file changed, 6 insertions(+) commit e153c1e4c37fcffa26e901251767c1404db83934 Author: Johannes Berg Date: Thu Mar 30 14:23:21 2017 +0200 iwlwifi: mvm: link queue cmd docs to A000 command structs Document which structures are used with the command for the A000 hardware flavour. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0aaece81114e403315ae01a6cd36044e32922d3b Author: Johannes Berg Date: Thu Mar 30 14:30:40 2017 +0200 iwlwifi: split firmware API from iwl-trans.h In order to more clearly document which parts of this file are firmware API and which are something else, split the firmware API into a separate file to include here. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-api.h | 205 ++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 137 +--------------- 2 files changed, 206 insertions(+), 136 deletions(-) commit b8aed81cd38151928d7af81f2f2ed98481809f2f Author: Johannes Berg Date: Thu Mar 30 14:21:54 2017 +0200 iwlwifi: fix a kernel-doc tag The kernel-doc here is on an enum, so don't tag it as struct but correctly as enum instead, preventing an error. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 771147b0676fb545b7fd268277452609bcaf9243 Author: Johannes Berg Date: Wed Mar 22 22:26:03 2017 +0100 iwlwifi: mvm: clear firmware running bit earlier Clear the firmware running bit before flushing the FW (error) dump work, because otherwise debugfs isn't blocked (previous patch) and can cause a new work to be scheduled, which will then run after we actually shut down the device, wreaking havoc. Clearing it ensures that debugfs can't interfere anymore, and we can safely cancel or flush the work struct. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 65b280fe9bde124587f9ca290404515d52513b3f Author: Johannes Berg Date: Wed Mar 22 22:10:36 2017 +0100 iwlwifi: mvm: convert ucode_loaded to a status bit Convert ucode_loaded to a status bit called FIRMWARE_RUNNING. This will make it easier to clear this earlier, to avoid any spurious accesses while shutting down, for example through debugfs. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit aab6930d30d5176fe1ff38fe051a9fca2cac066d Author: Johannes Berg Date: Wed Mar 22 22:05:12 2017 +0100 iwlwifi: mvm: add and use iwl_mvm_device_running() This will help refactor this later. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 25 ++++++++++++++--------- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 5 +++++ drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 13 ++++++++---- 4 files changed, 30 insertions(+), 15 deletions(-) commit 86bbb1e1e0ba8878b554bbb912d348f3b819f5c4 Author: Johannes Berg Date: Wed Mar 22 21:44:59 2017 +0100 iwlwifi: mvm: use schedule_delayed_work() There's no need to refer to system_wq directly, use the provided wrapper schedule_delayed_work(). Made with the following spatch: @@ expression E,F; @@ -queue_delayed_work(system_wq, E, F); +schedule_delayed_work(E, F); Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 6 +++--- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/tdls.c | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) commit 504bd624663cde6141ab025445c93420c387062e Author: Johannes Berg Date: Wed Mar 22 22:19:41 2017 +0100 iwlwifi: mvm: check firmware is up in debugfs Protect various debugfs files that need to communicate with the firmware from being used when the firmware isn't running. Some will just reject getting written to, while others that store some state will simply store it and not apply it immediately. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 55 +++++++++++++++++++++--- 1 file changed, 49 insertions(+), 6 deletions(-) commit 9eca702ca1da715199c104363cad041d989aafd1 Author: Liad Kaufman Date: Sun Mar 26 14:09:46 2017 +0300 iwlwifi: mvm: disable prph collection in a000 hw Apart from the current list of PRPH that can't be collected in A000 HW, the rest of the debug dump data the driver collects is valid, so there is no need to disable collection only because of this. Disable PRPH collecting in A000 HW, and allow collecting the rest of the debug data. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 723b45e24150f1b9bde5c1f51f1a845982cb4eeb Author: Liad Kaufman Date: Sun Mar 26 13:56:28 2017 +0300 iwlwifi: pcie: support dumping FH in a000 hw FH in A000 HW are placed in a different location, and need to be read as prph, rather than direct. Support A000 dumping as well as legacy. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 2 ++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) commit 6e5848732288d93f14bb30ce81f09950988556dd Author: Sara Sharon Date: Wed Mar 22 14:07:50 2017 +0200 iwlwifi: add 9000 and A000 device families Add two new device families to differentiate them from 8000. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 ++ drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-io.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 5 +++-- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 13 +++++++------ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 16 ++++++++-------- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +- 11 files changed, 29 insertions(+), 25 deletions(-) commit de8ba41b5e5002e28756963df311246485c330d5 Author: Liad Kaufman Date: Thu Mar 16 13:00:59 2017 +0200 iwlwifi: mvm: support init flow debugging In case an assert happens on init flow, the current driver powers down the NIC, except if iwlmvm modparam init_dbg=1, and only on very specific flows. Extend this capability to cover most failure cases by keeping track of what init configurations have been completed. This way, we can allow NOT powering down the NIC, while making sure that when the driver is removed we don't try to free resources that haven't been allocated. (This can result in a kernel panic.) Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/led.c | 5 ++++- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 10 ++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 18 +++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/tof.c | 6 +++++- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 5 +++++ 7 files changed, 42 insertions(+), 6 deletions(-) commit 1247070d4763cf0dc8bd7b313d606941c6464e69 Author: Beni Lev Date: Sun Mar 19 19:03:51 2017 +0200 iwlwifi: mvm: add TLV for NAN API differentiation Due to NAN FW API change, add TLV in order to distiguish between the 2 API versions Signed-off-by: Beni Lev Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 2 ++ 1 file changed, 2 insertions(+) commit a02797c15dd98434774fa67b323ebee158dc6ecf Author: Sara Sharon Date: Wed Mar 22 14:06:41 2017 +0200 iwlwifi: add dbgc_supported to transport configuration Use transport configuration to determine DBGC support instead of relying on device family. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 3 ++- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 3 ++- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 3 ++- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) commit 8b4d649552ca857d4f6e903d2f51fec8936e65f0 Author: Sara Sharon Date: Wed Mar 22 13:51:12 2017 +0200 iwlwifi: remove references to 8000 B-step devices We don't have any 8000 B-step right now, and there is no firmware loading code for them anyway. Further more, 9000 B-step devices will hit those code paths. Remove code that was introduced only for 8000 B-step. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 -- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 21 --------------------- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 14 ++------------ 4 files changed, 2 insertions(+), 36 deletions(-) commit 7042678dffa3707dea3feb34f09241d54e40648c Author: Sara Sharon Date: Wed Mar 22 12:20:40 2017 +0200 iwlwifi: cleanup references to 8000 family in NVM code NVM code is tightly coupled with 8000 family, while it really refers to extended NVM format introduced back then. Separate it to a configuration dependent boolean, and rename defines accordingly. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 3 +- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 3 +- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 3 +- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 4 +- drivers/net/wireless/intel/iwlwifi/iwl-drv.h | 12 +-- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 95 ++++++++++------------ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 22 ++--- 8 files changed, 70 insertions(+), 74 deletions(-) commit 6ffe5de35b05907faf4edb66cfd8ddf3c47e099f Author: Sara Sharon Date: Thu Mar 16 11:06:41 2017 +0200 iwlwifi: pcie: add AMSDU to gen2 This is essentially the same code as gen1, except that it uses gen2 functions and SW checksum is not included. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 3 + drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 172 ++++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 +- 3 files changed, 172 insertions(+), 6 deletions(-) commit 6857df8c10e6986940ee7e14b587352e928589a2 Author: Johannes Berg Date: Wed Mar 15 14:06:53 2017 +0100 iwlwifi: mvm: document RX structures Document the structures used in RX and link them to the command ID. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rx.h | 81 ++++++++++++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 8 +++ 2 files changed, 84 insertions(+), 5 deletions(-) commit f5bd90b72d613ad5a9c3b38dee6ae6b5e3565be4 Author: Sara Sharon Date: Thu Mar 16 10:44:31 2017 +0200 iwlwifi: mvm: add AMSDU flag to offload assist Enable offload assist for AMSDU when the AMSDU present flag is set. Fixes: a830baba9c2e ("iwlwifi: mvm: support new TX API") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4a5f06a01cfd1f7a9141bdb760bf5b68cca7f224 Author: Alexandre Belloni Date: Mon Jun 5 00:02:57 2017 +0200 clk: at91: fix clk-generated compilation Fix missing } Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/clk-generated.c | 1 + 1 file changed, 1 insertion(+) commit 818831c8b22f75353f59a63a484e20736c0567c9 Author: Christoph Hellwig Date: Sun Jun 4 14:42:24 2017 +0200 libata: implement SECURITY PROTOCOL IN/OUT This allows us to use the generic OPAL code with ATA devices. Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 32 ++++++++++++++++++++ drivers/ata/libata-scsi.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/ata.h | 1 + include/linux/libata.h | 1 + 4 files changed, 110 insertions(+) commit a0fd2454a36ffab2ce39b3a91c1385a5f98e63f0 Author: Christoph Hellwig Date: Sun Jun 4 14:42:23 2017 +0200 libata: factor out a ata_identify_page_supported helper tj: Updated line continuation style for consistency as pointed out by Sergei. Signed-off-by: Christoph Hellwig Cc: Sergei Shtylyov Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 59 +++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 27 deletions(-) commit 1d51d5f3907abf86ef0521971bcddf5853564263 Author: Christoph Hellwig Date: Sun Jun 4 14:42:22 2017 +0200 libata: clarify log page naming / grouping Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 10 +++++----- include/linux/ata.h | 10 +++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) commit efe205a320f24c4fe4af18c0cff2ffb07091951c Author: Christoph Hellwig Date: Sun Jun 4 14:42:21 2017 +0200 libata: factor out a ata_log_supported helper Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 59 +++++++++++++---------------------------------- 1 file changed, 16 insertions(+), 43 deletions(-) commit f01f62c257cc343246a5a9b2df8135f01fc044ab Author: Christoph Hellwig Date: Sun Jun 4 14:42:20 2017 +0200 libata: move ata_read_log_page to libata-core.c It is core functionality, and only one of the users is in the EH code. Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/ata/libata-eh.c | 64 ----------------------------------------------- drivers/ata/libata.h | 4 +-- 3 files changed, 66 insertions(+), 66 deletions(-) commit 3a9aedb282acf1499a31834c457335e4535e4a1d Author: Guenter Roeck Date: Mon May 29 16:21:31 2017 -0700 watchdog: w83627hf: Add support for NCT6793D and NCT6795D Both NCT6793D and NCT6795D are compatible to NCT6792D. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/w83627hf_wdt.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 2501b015313fe2fa40ed11fa4dd1748e09b7c773 Author: Sebastian Reichel Date: Fri May 12 14:05:32 2017 +0200 watchdog: core: add option to avoid early handling of watchdog On some systems its desirable to have watchdog reboot the system when it does not come up fast enough. This adds a kernel parameter to disable the auto-update of watchdog before userspace takes over and a kernel option to set the default. The info messages were added to shorten error searching on misconfigured systems. Signed-off-by: Sebastian Reichel Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 11 +++++++++++ drivers/watchdog/watchdog_dev.c | 19 ++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) commit 166fbcf88fdafa02f784ec25ac64745c716b2de0 Author: Maciej S. Szmigiero Date: Mon Apr 17 22:37:05 2017 +0200 watchdog: f71808e_wdt: Add F71868 support This adds support for watchdog part of Fintek F71868 Super I/O chip to f71808e_wdt driver. The F71868 chip is, in general, very similar to a F71869, however it has slightly different set of available reset pulse widths. Tested on MSI A55M-P33 motherboard. Signed-off-by: Maciej S. Szmigiero Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 7 ++++--- drivers/watchdog/f71808e_wdt.c | 27 ++++++++++++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) commit 4332d113c66a6ecb3702cb8f265adbbe654f9d5f Author: Yannick Fertre Date: Thu Apr 6 14:19:25 2017 +0200 watchdog: Add STM32 IWDG driver This patch adds IWDG (Independent WatchDoG) support for STM32 platform. Signed-off-by: Yannick FERTRE Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 12 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/stm32_iwdg.c | 253 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 266 insertions(+) commit 5df11427b2d20ac1f4fdd1bcb6319743a4b6797e Author: Yannick Fertre Date: Thu Apr 6 14:19:24 2017 +0200 dt-bindings: watchdog: Document STM32 IWDG bindings This adds documentation of device tree bindings for the STM32 IWDG (Independent WatchDoG). Signed-off-by: Yannick Fertre Acked-by: Rob Herring Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/watchdog/st,stm32-iwdg.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f66872b5be147b32806dc98d808ee784fe7965c7 Author: Steve Twiss Date: Tue Mar 28 15:43:30 2017 +0100 Documentation: devicetree: watchdog: da9062/61 watchdog timer binding Add binding information for DA9062 and DA9061 watchdog. Example bindings for both DA9062 and DA9061 devices are added. For the DA9061 device, a fallback compatible line is added as a valid combination of compatible strings. The original binding for DA9062 (only) used to reside inside the Documentation/devicetree/bindings/mfd/da9062.txt MFD document. The da9062-watchdog section was deleted in that file and replaced with a link to the new DA9061/62 binding information stored in this patch. Acked-by: Rob Herring Signed-off-by: Steve Twiss Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/watchdog/da9062-wdt.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 03bca15833f2865b11835b7f5bfa594d1aaacecc Author: Guenter Roeck Date: Sun Feb 28 13:12:23 2016 -0800 watchdog: gpio: Convert to use infrastructure triggered keepalives The watchdog infrastructure now supports handling watchdog keepalive if the watchdog is running while the watchdog device is closed. The infrastructure now also supports generating additional heartbeats if the maximum hardware timeout is smaller than or close to the configured timeout. Convert the driver to use this infrastructure. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/gpio_wdt.c | 73 ++++++++------------------------------------- 1 file changed, 13 insertions(+), 60 deletions(-) commit ecd94a41debfd21961c9f59f639dce26f2c779f0 Author: Uwe Kleine-König Date: Wed Mar 29 17:34:24 2017 +0200 watchdog: orion: make license info match the file header The header says: This file is licensed under the terms of the GNU General Public License version 2. The right identifier for MODULE_LICENSE is "GPL v2" then. Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/orion_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08497f22b15affcf08fb2d1173caa73e7ad54df7 Author: Krzysztof Kozlowski Date: Mon Mar 13 21:07:26 2017 +0200 watchdog: s3c2410: Minor code cleanup Cleanup the code from minor readability issues (no functional changes): 1. Fix checkpatch: ERROR: Do not include the paragraph about writing to the Free Software Foundation's mailing address. 2. Fix checkpatch: WARNING: quoted string split across lines 3. Fix chechpatch: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' 4. Use 'dev' consistently in probe function instead of mixing dev with &pdev->dev. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/s3c2410_wdt.c | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit a9a02c46624ad112eb07ca26b6a025c1358ed3ad Author: Krzysztof Kozlowski Date: Mon Mar 13 21:07:25 2017 +0200 watchdog: s3c2410: Simplify getting driver data Simplify the flow in helper function for getting the driver data by using of_device_get_match_data() and only one if() branch. The code should be equivalent. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/s3c2410_wdt.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 58415efe96670b858eb7b5ab066881ae3f1dad25 Author: Krzysztof Kozlowski Date: Mon Mar 13 21:07:24 2017 +0200 watchdog: s3c2410: Constify local structures Structures watchdog_device, watchdog_ops and s3c2410_wdt_variant are not modified so they can be made const to increase code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/s3c2410_wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 954351e8707bcdf6091cc55dab4e9e2453de6655 Author: Andy Shevchenko Date: Sat Mar 11 00:22:17 2017 +0200 watchdog: intel-mid_wdt: Keep watchdog running Firmware followed by bootloader leaves watchdog running. Keep it running in the driver. User will not need any additional options to reboot in case of panic during boot. Signed-off-by: Andy Shevchenko Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/intel-mid_wdt.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 0ab1380804ad709ced066eb10568110987e42570 Author: Chris Brandt Date: Sat Mar 4 17:37:36 2017 -0500 watchdog: renesas-wdt: add support for rza Describe the WDT hardware in the RZ/A series. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/renesas-wdt.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aea24187f65e8adb00b2be949cd809fcb2aa241c Author: Chris Brandt Date: Sat Mar 4 17:37:35 2017 -0500 watchdog: add rza_wdt driver Adds a watchdog timer driver for the Renesas RZ/A Series SoCs. A reset handler is also included since a WDT overflow is the only method for restarting an RZ/A SoC. Signed-off-by: Chris Brandt Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 8 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/rza_wdt.c | 199 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+) commit b7fe92999a98a9aab3c292bd44942f3bdbe04765 Author: Andy Shevchenko Date: Mon Jun 5 19:40:45 2017 +0300 ACPI / extlog: Switch to use new generic UUID API There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. Cc: Borislav Petkov Signed-off-by: Andy Shevchenko Signed-off-by: Christoph Hellwig drivers/acpi/acpi_extlog.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit dfcaad8faeec3208bb1905ca3c1e4fd4cef46113 Author: Andy Shevchenko Date: Mon Jun 5 19:40:44 2017 +0300 ACPI / bus: Switch to use new generic UUID API There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. Acked-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko Signed-off-by: Christoph Hellwig drivers/acpi/bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5b53696a30d5f52d35fec21c1da1e52520225efe Author: Andy Shevchenko Date: Mon Jun 5 19:40:43 2017 +0300 ACPI / APEI: Switch to use new generic UUID API There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. Cc: Borislav Petkov Signed-off-by: Andy Shevchenko Signed-off-by: Christoph Hellwig drivers/acpi/apei/ghes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 41c8bdb3ab10c1fefcac61d081e2fd9aaf8694b8 Author: Andy Shevchenko Date: Mon Jun 5 19:40:42 2017 +0300 acpi, nfit: Switch to use new generic UUID API There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. Reviewed-by: Dan Williams Signed-off-by: Andy Shevchenko Signed-off-by: Christoph Hellwig drivers/acpi/nfit/core.c | 54 ++++++++++++++++++++++++------------------------ drivers/acpi/nfit/nfit.h | 3 +-- include/linux/acpi.h | 1 + 3 files changed, 29 insertions(+), 29 deletions(-) commit 84a0a967a44b9da6c5effff628aafa7698050574 Author: Markus Elfring Date: Sun Jun 4 21:21:20 2017 +0200 arm/xen: Adjust one function call together with a variable assignment The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code place. Signed-off-by: Markus Elfring Reviewed-by: Stefano Stabellini arch/arm/xen/p2m.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d6bb4ec32c832fb0fcc43636327e17a0724e2324 Author: Markus Elfring Date: Sun Jun 4 21:12:36 2017 +0200 arm/xen: Delete an error message for a failed memory allocation in __set_phys_to_machine_multi() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Reviewed-by: Stefano Stabellini arch/arm/xen/p2m.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 031229b862f13ee5af8e1b06af258614f94dcbcd Author: Markus Elfring Date: Sun Jun 4 20:50:55 2017 +0200 arm/xen: Improve a size determination in __set_phys_to_machine_multi() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Stefano Stabellini arch/arm/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 813baa607de4227f9817e25228ad0a5f860fb6de Author: Anup Patel Date: Fri Jun 2 12:04:25 2017 +0530 dt-bindings: bcm: Add Broadcom Stingray bindings document This patch adds DT bindings info for Broadcom Stingray SOC and related reference boards. Signed-off-by: Anup Patel Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,stingray.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5dca80f63eaf18eca2ba3ebf61056feb66103951 Author: Alexandre Belloni Date: Thu Mar 2 18:31:14 2017 +0100 watchdog: sama5d4: Add comment explaining what happens on resume Because suspending to RAM may lose the register values, they are restored on resume. This is currently done unconditionally because there is currently no way to know (from the driver) whether they have really been lost or are still valid. Writing MR also pings the watchdog and this may not be what is expected so add a comment explaining why it happens. Signed-off-by: Alexandre Belloni Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sama5d4_wdt.c | 5 +++++ 1 file changed, 5 insertions(+) commit 39bd56df7b2dae80d4099c64ad776775a3876ed5 Author: Alexandre Belloni Date: Thu Mar 2 18:31:13 2017 +0100 watchodg: sama5d4: simplify probe Because the only way to use the driver is to have a device tree enabling it, pdev->dev.of_node will never be NULL. Remove the unnecessary check. Signed-off-by: Alexandre Belloni Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sama5d4_wdt.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit bb817bef3b1989a9cdb40362cfb8d2aa224ac1bc Author: Ard Biesheuvel Date: Fri Jun 2 13:52:07 2017 +0000 efi/arm: Enable DMI/SMBIOS Wire up the existing arm64 support for SMBIOS tables (aka DMI) for ARM as well, by moving the arm64 init code to drivers/firmware/efi/arm-runtime.c (which is shared between ARM and arm64), and adding a asm/dmi.h header to ARM that defines the mapping routines for the firmware tables. This allows userspace to access these tables to discover system information exposed by the firmware. It also sets the hardware name used in crash dumps, e.g.: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = ed3c0000 [00000000] *pgd=bf1f3835 Internal error: Oops: 817 [#1] SMP THUMB2 Modules linked in: CPU: 0 PID: 759 Comm: bash Not tainted 4.10.0-09601-g0e8f38792120-dirty #112 Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 ^^^ NOTE: This does *NOT* enable or encourage the use of DMI quirks, i.e., the the practice of identifying the platform via DMI to decide whether certain workarounds for buggy hardware and/or firmware need to be enabled. This would require the DMI subsystem to be enabled much earlier than we do on ARM, which is non-trivial. Signed-off-by: Ard Biesheuvel Acked-by: Russell King Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-14-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/arm/Kconfig | 17 +++++++++++++++++ arch/arm/include/asm/dmi.h | 19 +++++++++++++++++++ arch/arm64/kernel/efi.c | 15 --------------- drivers/firmware/efi/arm-runtime.c | 16 ++++++++++++++++ 4 files changed, 52 insertions(+), 15 deletions(-) commit ac81d3de03f7d8593a94240d057c8e2e8e869897 Author: Sai Praneeth Date: Fri Jun 2 13:52:06 2017 +0000 x86/efi: Extend CONFIG_EFI_PGT_DUMP support to x86_32 and kexec as well CONFIG_EFI_PGT_DUMP=y, as the name suggests, dumps EFI page tables to the kernel log during kernel boot. This feature is very useful while debugging page faults/null pointer dereferences to EFI related addresses. Presently, this feature is limited only to x86_64, so let's extend it to other EFI configurations like kexec kernel, efi=old_map and to x86_32 as well. This doesn't effect normal boot path because this config option should be used only for debug purposes. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Matt Fleming Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-13-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi.c | 3 ++- arch/x86/platform/efi/efi_32.c | 9 ++++++++- arch/x86/platform/efi/efi_64.c | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) commit 5f72cad65cfaac5e40d0de8b7f48ee647af69cd5 Author: Geliang Tang Date: Fri Jun 2 13:52:05 2017 +0000 efi/efi_test: Use memdup_user() helper Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Acked-by: Ivan Hu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-12-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/test/efi_test.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 2959c95d510cc45b246ba727eb8fdf8b601c6eec Author: Jan Kiszka Date: Fri Jun 2 13:52:04 2017 +0000 efi/capsule: Add support for Quark security header The firmware for Quark X102x prepends a security header to the capsule which is needed to support the mandatory secure boot on this processor. The header can be detected by checking for the "_CSH" signature and - to avoid any GUID conflict - validating its size field to contain the expected value. Then we need to look for the EFI header right after the security header and pass the real header to __efi_capsule_setup_info. To be minimal invasive and maximal safe, the quirk version of efi_capsule_setup_info() is only effective on Quark processors. Tested-by: Bryan O'Donoghue Signed-off-by: Jan Kiszka Signed-off-by: Ard Biesheuvel Reviewed-by: Andy Shevchenko Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-11-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/platform/efi/quirks.c | 137 +++++++++++++++++++++++++++++++++++++++++ drivers/firmware/efi/Kconfig | 9 +++ 2 files changed, 146 insertions(+) commit 2a457fb31df62c6b482f78e4f74aaed99271f44d Author: Ard Biesheuvel Date: Fri Jun 2 13:52:03 2017 +0000 efi/capsule-loader: Use page addresses rather than struct page pointers To give some leeway to code that handles non-standard capsule headers, let's keep an array of page addresses rather than struct page pointers. This gives special implementations of efi_capsule_setup_info() the opportunity to mangle the payload a bit before it is presented to the firmware, without putting any knowledge of the nature of such quirks into the generic code. Tested-by: Bryan O'Donoghue Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-10-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/capsule-loader.c | 12 ++++++++---- drivers/firmware/efi/capsule.c | 7 ++++--- include/linux/efi.h | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) commit 3fabd628d5ea24b02ddb1230ffca1df0f779f84e Author: Ard Biesheuvel Date: Fri Jun 2 13:52:02 2017 +0000 efi/capsule-loader: Redirect calls to efi_capsule_setup_info() via weak alias To allow platform specific code to hook into the capsule loading routines, indirect calls to efi_capsule_setup_info() via a weak alias of __efi_capsule_setup_info(), allowing platforms to redefine the former but still use the latter. Tested-by: Bryan O'Donoghue Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-9-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/capsule-loader.c | 56 +++++++++++++++++------------------ include/linux/efi.h | 12 ++++++++ 2 files changed, 39 insertions(+), 29 deletions(-) commit 171fd0222957abe28e6d78de667f457376f45cf1 Author: Fabian Frederick Date: Fri Jun 2 13:52:01 2017 +0000 efi/capsule: Remove NULL test on kmap() kmap() can't fail. Signed-off-by: Fabian Frederick Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Cc: Kweh Hock Leong Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-8-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/capsule-loader.c | 4 ---- drivers/firmware/efi/capsule.c | 4 ---- 2 files changed, 8 deletions(-) commit 82c3768b8d68c40ecde92338899c838b7c674ffb Author: Ard Biesheuvel Date: Fri Jun 2 13:52:00 2017 +0000 efi/capsule-loader: Use a cached copy of the capsule header Instead of kmapping the capsule data twice, copy the capsule header into the capsule info struct we keep locally. This is an improvement by itself, but will also enable handling of non-standard header formats more easily. Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-7-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/capsule-loader.c | 41 +++++++++++++++-------------------- 1 file changed, 17 insertions(+), 24 deletions(-) commit 41b0c376951417d1b37448957b30f766b10d3090 Author: Jan Kiszka Date: Fri Jun 2 13:51:59 2017 +0000 efi/capsule: Adjust return type of efi_capsule_setup_info() We actually expect int at the caller and never return any size information. Signed-off-by: Jan Kiszka Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-6-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/capsule-loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5dce14b9d1a29cf76331f0fe8eb7efd63e0fcb9a Author: Jan Kiszka Date: Fri Jun 2 13:51:58 2017 +0000 efi/capsule: Clean up pr_err/_info() messages Avoid __func__, improve the information provided by some of the messages. Signed-off-by: Jan Kiszka Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-5-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/capsule-loader.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 7367633f0bfd783ae5838141f3af88bba6c45eb9 Author: Jan Kiszka Date: Fri Jun 2 13:51:57 2017 +0000 efi/capsule: Remove pr_debug() on ENOMEM or EFAULT Both cases are not worth a debug log message - the error code is telling enough. Signed-off-by: Jan Kiszka Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-4-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/capsule-loader.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit fb153dc53f0eb8e8ad6a69f773e44c2d12daa5d0 Author: Jan Kiszka Date: Fri Jun 2 13:51:56 2017 +0000 efi/capsule: Fix return code on failing kmap/vmap If kmap or vmap fail, it means we ran out of memory. There are no user-provided addressed involved that would justify EFAULT. Signed-off-by: Jan Kiszka Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/capsule-loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3229f83bd8baf7bdbe8056e468743fdcba492e28 Author: Fabio Estevam Date: Mon Jun 5 08:17:49 2017 -0300 ARM: dts: imx7d-sdb: Add Bluetooth support imx7d-sdb has a BCM4339 BT chip connected to UART6. Add support for it. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-sdb.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6e823e9720b7e2aa36138bc776001069df851e13 Author: Fabio Estevam Date: Mon Jun 5 08:17:48 2017 -0300 ARM: dts: imx7d-sdb: Add Wifi support imx7d-sdb has a BCM4339 Wifi chip connected to USDHC2. Add support for it. While at it, move the WL_REG_ON pin to the correct pinctrl node. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-sdb.dts | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit b877039aa1fe3a9ac784619a3415feed50e6fb91 Author: Fabio Estevam Date: Mon Jun 5 08:17:47 2017 -0300 ARM: dts: imx7d-sdb: Adjust the regulator nodes It is not recommended to place the regulator nodes inside 'simple-bus', so adjust them accordingly. The motivation for rearranging this is to make it easier to add new regulator nodes in the future. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-sdb.dts | 66 +++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 38 deletions(-) commit 12de44f55dcd99f740c19fa514c181be5c686625 Author: Fabio Estevam Date: Sun Jun 4 14:31:15 2017 -0300 ARM: dts: imx: Fix Ethernet PHY reset polarity The FEC driver ignores the GPIO polarity from 'phy-reset-gpios' and considers that the Ethernet PHY is active low, unless the property 'phy-reset-active-high' is present. Fix the device tree description by explicitly passing the 'GPIO_ACTIVE_LOW' flag to the 'phy-reset-gpios' property. Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25-karo-tx25.dts | 2 +- arch/arm/boot/dts/imx25-pdk.dts | 2 +- arch/arm/boot/dts/imx25.dtsi | 1 + arch/arm/boot/dts/imx28-cfa10037.dts | 2 +- arch/arm/boot/dts/imx28-cfa10049.dts | 2 +- arch/arm/boot/dts/imx28-cfa10057.dts | 2 +- arch/arm/boot/dts/imx28-cfa10058.dts | 2 +- arch/arm/boot/dts/imx28-eukrea-mbmx287lc.dts | 2 +- arch/arm/boot/dts/imx28-evk.dts | 2 +- arch/arm/boot/dts/imx28-m28cu3.dts | 2 +- arch/arm/boot/dts/imx50-evk.dts | 2 +- arch/arm/boot/dts/imx50.dtsi | 1 + arch/arm/boot/dts/imx51-apf51.dts | 2 +- arch/arm/boot/dts/imx53-mba53.dts | 2 +- arch/arm/boot/dts/imx53-qsb-common.dtsi | 2 +- arch/arm/boot/dts/imx53-smd.dts | 2 +- arch/arm/boot/dts/imx53-tx53.dtsi | 2 +- arch/arm/boot/dts/imx53-voipac-dmm-668.dtsi | 2 +- arch/arm/boot/dts/imx6dl-riotboard.dts | 2 +- arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 2 +- arch/arm/boot/dts/imx6q-evi.dts | 2 +- arch/arm/boot/dts/imx6q-gw5400-a.dts | 2 +- arch/arm/boot/dts/imx6q-novena.dts | 2 +- arch/arm/boot/dts/imx6qdl-aristainetos.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-tx6.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 2 +- arch/arm/boot/dts/imx6ul-tx6ul-mainboard.dts | 2 +- arch/arm/boot/dts/imx6ul-tx6ul.dtsi | 4 ++-- 32 files changed, 33 insertions(+), 31 deletions(-) commit 9ed5c17d4c0a03796ae027c8202307ebe75d28c7 Author: Scott Wood Date: Mon Jun 5 11:28:22 2017 +0800 arm64: dts: ls1012a: Add coreclk ls1012a has separate input root clocks for core PLLs versus the platform PLL, with the latter described as sysclk in the hw docs. Accordingly, update the clock-frequency in sysclk to 125M as platform input clock. Signed-off-by: Scott Wood Signed-off-by: Tang Yuantian Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 0fc9a6919cab399a79330ea1f1ac769766ae4705 Author: Ran Wang Date: Fri Jun 2 10:30:00 2017 +0800 arm64: dts: ls1046a: Add dis_rxdet_inp3_quirk property to USB3 node Add "dis_rxdet_inp3_quirk" boolean property to USB3 node. This property is used to disable rx detection in P3 PHY mode. Signed-off-by: Ran Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 715c32da6d61a043f2085b77618b9d20ef68961f Author: yinbo.zhu Date: Wed May 31 17:03:59 2017 +0800 arm64: dts: ls208xa: disable SD UHS-I modes by default on RDB Currently SD UHS-I modes were enabled by default on LS208xARDB boards, but the new LS2088ARDB RevF board didn't support them any more since SDHC circuit had been reworked. This patch is to disable SD UHS-I modes by default in case of any issue on LS2088ARDB RevF Signed-off-by: yinbo.zhu Acked-by: Yangbo Lu Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit 2f878491b3674b7c61d9b214aec35c66e5946da9 Author: Icenowy Zheng Date: Mon Jun 5 01:53:23 2017 +0800 net-next: stmmac: dwmac-sun8i: ensure the EPHY is properly reseted The EPHY may be already enabled by bootloaders which have Ethernet capability (e.g. current U-Boot). Thus it should be reseted properly before doing the enabling sequence in the dwmac-sun8i driver, otherwise the EMAC reset process may fail if no cable is plugged, and then fail the dwmac-sun8i probing. Tested on Orange Pi PC, One and Zero. All the boards fail to have dwmac-sun8i probed with "EMAC reset timeout" without cable plugged before, and with this fix they're now all able to successfully probe the EMAC without cable plugged and then use the connection after a cable is hot-plugged in. Fixes: 9f93ac8d408 ("net-next: stmmac: Add dwmac-sun8i") Signed-off-by: Icenowy Zheng Tested-by: Corentin Labbe Acked-by: Corentin Labbe Reviewed-by: Corentin Labbe Acked-by: is not as formal as Signed-off-by:. It is a record that the acker Reviewed-by: is similar. Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 5 +++++ 1 file changed, 5 insertions(+) commit 697dae1ee1e320bb6b20c02f0259a0fa3a768b72 Author: yuval.shaia@oracle.com Date: Sun Jun 4 20:24:46 2017 +0300 net/3com: Make el3_netdev_get_ecmd return void Make return value void since function never returns meaningfull value. Signed-off-by: Yuval Shaia Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c509.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 82c01a84d5a9bd3b9347bb03eed2f05bbccef933 Author: yuval.shaia@oracle.com Date: Sun Jun 4 20:22:00 2017 +0300 net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void Make return value void since functions never returns meaningfull value. Signed-off-by: Yuval Shaia Signed-off-by: David S. Miller drivers/net/cris/eth_v10.c | 5 ++--- drivers/net/ethernet/3com/3c59x.c | 4 +++- drivers/net/ethernet/amd/pcnet32.c | 5 +---- drivers/net/ethernet/cirrus/ep93xx_eth.c | 5 ++++- drivers/net/ethernet/dec/tulip/winbond-840.c | 5 ++--- drivers/net/ethernet/faraday/ftmac100.c | 5 ++++- drivers/net/ethernet/fealnx.c | 5 ++--- drivers/net/ethernet/intel/e100.c | 5 ++++- drivers/net/ethernet/jme.c | 5 ++--- drivers/net/ethernet/korina.c | 5 ++--- drivers/net/ethernet/micrel/ks8851.c | 5 ++++- drivers/net/ethernet/micrel/ks8851_mll.c | 5 ++++- drivers/net/ethernet/nuvoton/w90p910_ether.c | 5 ++++- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c | 6 +++--- drivers/net/ethernet/realtek/8139cp.c | 5 ++--- drivers/net/ethernet/realtek/r8169.c | 4 +++- drivers/net/ethernet/sgi/ioc3-eth.c | 5 ++--- drivers/net/ethernet/sis/sis190.c | 4 +++- drivers/net/ethernet/smsc/epic100.c | 5 ++--- drivers/net/ethernet/smsc/smc911x.c | 7 +++---- drivers/net/ethernet/smsc/smc91c92_cs.c | 13 +++++-------- drivers/net/ethernet/smsc/smc91x.c | 7 ++----- drivers/net/ethernet/tundra/tsi108_eth.c | 5 ++--- drivers/net/ethernet/via/via-rhine.c | 5 ++--- drivers/net/mii.c | 8 ++------ drivers/net/usb/ax88179_178a.c | 5 ++++- drivers/net/usb/r8152.c | 2 +- drivers/net/usb/usbnet.c | 4 +++- include/linux/mii.h | 2 +- 29 files changed, 78 insertions(+), 73 deletions(-) commit c7c6b8715a554a9868673fae7cd30795788228db Author: yuval.shaia@oracle.com Date: Sun Jun 4 20:08:51 2017 +0300 net/dec: Make __de_get_link_ksettings return void Make return value void since function never return meaningfull value Signed-off-by: Yuval Shaia Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/de2104x.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit fafd3cdfbe246e280c0a18b424dfae73f5485c5d Author: Christoph Hellwig Date: Tue May 23 10:52:58 2017 +0200 MAINTAINERS: add uuid entry I'll keep maintaining whatever little changed we need here, with Andy as my designated reviewer. Signed-off-by: Christoph Hellwig MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2b4db79618ade14a9566455cbbea339f74674789 Author: Amir Goldstein Date: Thu May 18 15:29:33 2017 +0300 tmpfs: generate random sb->s_uuid This is used by overlayfs to encode intrasystem unique file handles. Suggested-by: Miklos Szeredi Cc: Hugh Dickins Cc: Andrew Morton Signed-off-by: Amir Goldstein Signed-off-by: Christoph Hellwig mm/shmem.c | 2 ++ 1 file changed, 2 insertions(+) commit bf47643389bbc1164c2615dc420ed0010264222e Author: Christoph Hellwig Date: Wed May 17 09:55:26 2017 +0200 scsi_debug: switch to uuid_t Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko drivers/scsi/scsi_debug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8e41226324e7c00f2087bfbc9f470d665e92df18 Author: Christoph Hellwig Date: Wed May 17 09:54:27 2017 +0200 nvme: switch to uuid_t Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko drivers/nvme/host/fabrics.c | 8 ++++---- drivers/nvme/host/fabrics.h | 2 +- drivers/nvme/host/fc.c | 3 +-- drivers/nvme/target/nvmet.h | 1 + include/linux/nvme-fc.h | 3 +-- include/linux/nvme.h | 3 ++- 6 files changed, 10 insertions(+), 10 deletions(-) commit 680895d6efe47332d25e49817d2d6781295c1614 Author: Christoph Hellwig Date: Wed May 17 09:51:09 2017 +0200 sysctl: switch to use uuid_t Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko kernel/sysctl_binary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59b9c6291c4fcacf2e8290d79560aa78edbbbe2e Author: Christoph Hellwig Date: Wed May 17 09:38:37 2017 +0200 partitions/ldm: switch to use uuid_t And the uuid helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko block/partitions/ldm.c | 10 +++++----- block/partitions/ldm.h | 6 ++---- 2 files changed, 7 insertions(+), 9 deletions(-) commit 01633fd254182eaa9372efa5c0688bf286e60d6b Author: Christoph Hellwig Date: Wed May 17 09:32:50 2017 +0200 overlayfs: use uuid_t instead of uuid_be Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/overlayfs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 85787090a21eb749d8b347eaf9ff1a455637473c Author: Christoph Hellwig Date: Wed May 10 15:06:33 2017 +0200 fs: switch ->s_uuid to uuid_t For some file systems we still memcpy into it, but in various places this already allows us to use the proper uuid helpers. More to come.. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Acked-by: Mimi Zohar  (Changes to IMA/EVM) Reviewed-by: Andy Shevchenko drivers/xen/tmem.c | 6 +++--- fs/ext4/super.c | 2 +- fs/f2fs/super.c | 2 +- fs/gfs2/ops_fstype.c | 2 +- fs/gfs2/sys.c | 22 +++++----------------- fs/ocfs2/super.c | 2 +- fs/overlayfs/copy_up.c | 5 ++--- fs/overlayfs/namei.c | 2 +- fs/xfs/xfs_mount.c | 3 +-- include/linux/cleancache.h | 2 +- include/linux/fs.h | 5 +++-- mm/cleancache.c | 2 +- security/integrity/evm/evm_crypto.c | 2 +- security/integrity/ima/ima_policy.c | 2 +- 14 files changed, 23 insertions(+), 36 deletions(-) commit 787d8c530af73257240fc0c0f60e296a83d5e5f4 Author: Christoph Hellwig Date: Thu Jun 1 07:00:26 2017 +0200 ima/policy: switch to use uuid_t Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Acked-by: Mimi Zohar Reviewed-by: Andy Shevchenko security/integrity/ima/ima_policy.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 1dd771eb0b09fe9c12ea58b18c676b32a528be39 Author: Christoph Hellwig Date: Wed May 10 15:16:44 2017 +0200 block: remove blk_part_pack_uuid This helper was only used by IMA of all things, which would get spurious errors if CONFIG_BLOCK is disabled. Just opencode the call there. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Acked-by: Mimi Zohar Reviewed-by: Andy Shevchenko include/linux/genhd.h | 11 ----------- security/integrity/ima/ima_policy.c | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) commit d905fdaaa7d59abde1535075cca6774fd7f0ef0a Author: Amir Goldstein Date: Thu May 4 16:26:23 2017 +0300 xfs: use the common helper uuid_is_null() Use the common helper uuid_is_null() and remove the xfs specific helper uuid_is_nil(). The common helper does not check for the NULL pointer value as xfs helper did, but xfs code never calls the helper with a pointer that can be NULL. Conform comments and warning strings to use the term 'null uuid' instead of 'nil uuid', because this is the terminology used by lib/uuid.c and its users. It is also the terminology used in userspace by libuuid and xfsprogs. Signed-off-by: Amir Goldstein [hch: remove now unused uuid.[ch]] Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Andy Shevchenko fs/xfs/Makefile | 3 +-- fs/xfs/uuid.c | 32 -------------------------------- fs/xfs/uuid.h | 23 ----------------------- fs/xfs/xfs_linux.h | 1 - fs/xfs/xfs_log_recover.c | 6 +++--- fs/xfs/xfs_mount.c | 8 ++++---- 6 files changed, 8 insertions(+), 65 deletions(-) commit cb0ba6cc22f372a2d42f9f2afc5a35f432cc61e2 Author: Christoph Hellwig Date: Fri May 5 09:39:10 2017 +0200 xfs: remove uuid_getnodeuniq and xfs_uu_t Opencode uuid_getnodeuniq in the only caller, and directly decode the uuid_t representation instead of using a structure cast for it. Signed-off-by: Christoph Hellwig fs/xfs/uuid.c | 25 ------------------------- fs/xfs/uuid.h | 1 - fs/xfs/xfs_mount.c | 5 ++++- 3 files changed, 4 insertions(+), 27 deletions(-) commit e64e17a554746a7f794f3d480d06e4be530fc090 Author: Christoph Hellwig Date: Thu May 11 14:00:57 2017 +0200 S390/sysinfo: use uuid_is_null instead of opencoding it And switch to use uuid_t instead of the old uuid_be type. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko arch/s390/include/asm/sysinfo.h | 4 ++-- arch/s390/kernel/sysinfo.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit ef40dda5bbc310f6517082c0ff002913104358cd Author: Christoph Hellwig Date: Thu May 11 09:01:42 2017 +0200 uuid: hoist uuid_is_null() helper from libnvdimm Hoist the libnvdimm helper as an inline helper to linux/uuid.h using an auxiliary const variable uuid_null in lib/uuid.c. [hch: also add the guid variant. Both do the same but I'd like to keep casts to a minimum] The common helper uses the new abstract type uuid_t * instead of u8 *. Suggested-by: Christoph Hellwig Signed-off-by: Amir Goldstein [hch: added guid_is_null] Signed-off-by: Christoph Hellwig Acked-by: Dan Williams Reviewed-by: Andy Shevchenko drivers/nvdimm/btt_devs.c | 9 +-------- include/linux/uuid.h | 13 +++++++++++++ lib/uuid.c | 5 +++++ 3 files changed, 19 insertions(+), 8 deletions(-) commit df33767d9fe0ca93c606cc9042df05e5045c8158 Author: Christoph Hellwig Date: Thu May 11 14:00:57 2017 +0200 uuid: hoist helpers uuid_equal() and uuid_copy() from xfs These helper are used to compare and copy two uuid_t type objects. Signed-off-by: Amir Goldstein [hch: also provide the respective guid_ versions] Signed-off-by: Christoph Hellwig Reviewed-by: Andy Shevchenko fs/xfs/uuid.c | 6 ------ fs/xfs/uuid.h | 7 ------- include/linux/uuid.h | 20 ++++++++++++++++++++ lib/test_uuid.c | 4 ++-- 4 files changed, 22 insertions(+), 15 deletions(-) commit b10bf0e281040f152da93fede1d43ec57caa7cee Author: Christoph Hellwig Date: Wed May 10 14:22:11 2017 +0200 uuid: don't export guid_index and uuid_index These are only used in uuid.c and vsprintf.c and aren't something modules should use directly. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko lib/uuid.c | 2 -- 1 file changed, 2 deletions(-) commit f9727a17db9bab71ddae91f74f11a8a2f9a0ece6 Author: Christoph Hellwig Date: Wed May 17 10:02:48 2017 +0200 uuid: rename uuid types Our "little endian" UUID really is a Wintel GUID, so rename it and its helpers such (guid_t). The big endian UUID is the only true one, so give it the name uuid_t. The uuid_le and uuid_be names are retained for now, but will hopefully go away soon. The exception to that are the _cmp helpers that will be replaced by better primitives ASAP and thus don't get the new names. Also the _to_bin helpers are named to match the better named uuid_parse routine in userspace. Also remove the existing typedef in XFS that's now been superceeded by the generic type name. Signed-off-by: Christoph Hellwig [andy: also update the UUID_LE/UUID_BE macros including fallout] Signed-off-by: Andy Shevchenko Reviewed-by: Amir Goldstein Reviewed-by: Darrick J. Wong Reviewed-by: Andy Shevchenko Signed-off-by: Christoph Hellwig fs/xfs/xfs_linux.h | 2 -- include/linux/uuid.h | 55 +++++++++++++++++++++++++++-------------------- include/uapi/linux/uuid.h | 12 +++++++---- lib/test_uuid.c | 32 +++++++++++++-------------- lib/uuid.c | 30 +++++++++++++------------- lib/vsprintf.c | 4 ++-- 6 files changed, 73 insertions(+), 62 deletions(-) commit 60927bc314363f91616c1f4577541c2a2e27aba3 Author: Christoph Hellwig Date: Wed May 17 09:56:45 2017 +0200 uuid: remove uuid_be defintions from the uapi header We don't use uuid_be and the UUID_BE constants in any uapi headers, so make them private to the kernel. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Andy Shevchenko include/linux/uuid.h | 15 +++++++++++++++ include/uapi/linux/uuid.h | 16 ---------------- 2 files changed, 15 insertions(+), 16 deletions(-) commit 12ce5f8c5c56fcd027bb9d12d17d2628d7dd9882 Author: Christoph Hellwig Date: Wed May 31 16:40:52 2017 +0200 nfsd: namespace-prefix uuid_parse Signed-off-by: Christoph Hellwig fs/nfsd/export.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e6fd2093a85d3be874c47d4f43bea5bdf0770955 Author: Amir Goldstein Date: Thu May 4 16:26:20 2017 +0300 md: namespace private helper names The md private helper uuid_equal() collides with a generic helper of the same name. Rename the md private helper to md_uuid_equal() and do the same for md_sb_equal(). Signed-off-by: Amir Goldstein Signed-off-by: Christoph Hellwig Reviewed-by: Shaohua Li Reviewed-by: Andy Shevchenko drivers/md/md.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8ec1507dc9d16ecd9ada2f67efa95f8d586335fb Author: Jiri Pirko Date: Sun Jun 4 18:49:28 2017 +0200 net: sched: select cls when cls_act is enabled It really makes no sense to have cls_act enabled without cls. In that case, the cls_act code is dead. So select it. This also fixes an issue recently reported by kbuild robot: [linux-next:master 1326/4151] net/sched/act_api.c:37:18: error: implicit declaration of function 'tcf_chain_get' Reported-by: kbuild test robot Fixes: db50514f9a9c ("net: sched: add termination action to allow goto chain") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b1f359f9805c2a1ec0f57e08b74baf383eb4b6a9 Author: Christoph Hellwig Date: Fri May 5 09:53:09 2017 +0200 xfs: use uuid_be to implement the uuid_t type Use the generic Linux definition to implement our UUID type, this will allow using more generic infrastructure in the future. Signed-off-by: Christoph Hellwig Reviewed-by: Amir Goldstein Reviewed-by: Brian Foster Reviewed-by: Andy Shevchenko Reviewed-by: Darrick J. Wong fs/xfs/uuid.h | 4 ---- fs/xfs/xfs_linux.h | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) commit dfd7487e991e5201808ff5e25fd1ffe5b1acbce8 Author: Amir Goldstein Date: Thu May 4 16:26:16 2017 +0300 xfs: use uuid_copy() helper to abstract uuid_t uuid_t definition is about to change. Signed-off-by: Amir Goldstein Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Andy Shevchenko Reviewed-by: Darrick J. Wong fs/xfs/xfs_inode_item.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 41bb26f8db3ad33b083e57eb9fc5828796110e77 Author: Christoph Hellwig Date: Sun May 28 08:56:46 2017 +0300 uuid,afs: move struct uuid_v1 back into afs This essentially is a partial revert of commit ff548773 ("afs: Move UUID struct to linux/uuid.h") and moves struct uuid_v1 back into fs/afs as struct afs_uuid. It however keeps it as big endian structure so that we can use the normal uuid generation helpers when casting to/from struct afs_uuid. The V1 uuid intrepretation in struct form isn't really useful to the rest of the kernel, and not really compatible to it either, so move it back to AFS instead of polluting the global uuid.h. Signed-off-by: Christoph Hellwig Acked-by: David Howells fs/afs/cmservice.c | 16 ++++++++-------- fs/afs/internal.h | 11 ++++++++++- fs/afs/main.c | 2 +- include/linux/uuid.h | 24 ------------------------ 4 files changed, 19 insertions(+), 34 deletions(-) commit 4e2ec43654f240a3731612764850140f669d1b4b Author: Rosen, Rami Date: Sun Jun 4 15:20:01 2017 +0300 genetlink: remove ops_list from genetlink header. commit d91824c08fbc ("genetlink: register family ops as array") removed the ops_list member from both genl_family and genl_ops; while the documentation of genl_family was updated accordingly by this patch, ops_list remained in the documentation of the genl_ops object. This patch fixes it by removing ops_list from genl_ops documentation. Signed-off-by: Rami Rosen Signed-off-by: David S. Miller include/net/genetlink.h | 1 - 1 file changed, 1 deletion(-) commit fe811e1de389c373ddf0671888e32f9ad973c969 Author: Chris Brandt Date: Fri Jun 2 09:06:49 2017 -0700 ARM: dts: r7s72100: add clock bit definitions Add the remaining bit locations for the module stop clock registers. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman include/dt-bindings/clock/r7s72100-clock.h | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 4e255721d1575a766ada06dc7eb03acdcd34eaaf Author: David Howells Date: Mon Jun 5 14:30:49 2017 +0100 rxrpc: Add service upgrade support for client connections Make it possible for a client to use AuriStor's service upgrade facility. The client does this by adding an RXRPC_UPGRADE_SERVICE control message to the first sendmsg() of a call. This takes no parameters. When recvmsg() starts returning data from the call, the service ID field in the returned msg_name will reflect the result of the upgrade attempt. If the upgrade was ignored, srx_service will match what was set in the sendmsg(); if the upgrade happened the srx_service will be altered to indicate the service the server upgraded to. Note that: (1) The choice of upgrade service is up to the server (2) Further client calls to the same server that would share a connection are blocked if an upgrade probe is in progress. (3) This should only be used to probe the service. Clients should then use the returned service ID in all subsequent communications with that server (and not set the upgrade). Note that the kernel will not retain this information should the connection expire from its cache. (4) If a server that supports upgrading is replaced by one that doesn't, whilst a connection is live, and if the replacement is running, say, OpenAFS 1.6.4 or older or an older IBM AFS, then the replacement server will not respond to packets sent to the upgraded connection. At this point, calls will time out and the server must be reprobed. Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 30 ++++++++++++++++++++++++++ include/linux/rxrpc.h | 1 + include/trace/events/rxrpc.h | 1 + net/rxrpc/ar-internal.h | 3 +++ net/rxrpc/conn_client.c | 43 +++++++++++++++++++++++++++++++------- net/rxrpc/input.c | 17 +++++++++++++++ net/rxrpc/output.c | 4 ++++ net/rxrpc/sendmsg.c | 19 +++++++++++++---- 8 files changed, 106 insertions(+), 12 deletions(-) commit 4722974d90e06d0164ca1b73a6b34cec6bdb64ad Author: David Howells Date: Mon Jun 5 14:30:49 2017 +0100 rxrpc: Implement service upgrade Implement AuriStor's service upgrade facility. There are three problems that this is meant to deal with: (1) Various of the standard AFS RPC calls have IPv4 addresses in their requests and/or replies - but there's no room for including IPv6 addresses. (2) Definition of IPv6-specific RPC operations in the standard operation sets has not yet been achieved. (3) One could envision the creation a new service on the same port that as the original service. The new service could implement improved operations - and the client could try this first, falling back to the original service if it's not there. Unfortunately, certain servers ignore packets addressed to a service they don't implement and don't respond in any way - not even with an ABORT. This means that the client must then wait for the call timeout to occur. What service upgrade does is to see if the connection is marked as being 'upgradeable' and if so, change the service ID in the server and thus the request and reply formats. Note that the upgrade isn't mandatory - a server that supports only the original call set will ignore the upgrade request. In the protocol, the procedure is then as follows: (1) To request an upgrade, the first DATA packet in a new connection must have the userStatus set to 1 (this is normally 0). The userStatus value is normally ignored by the server. (2) If the server doesn't support upgrading, the reply packets will contain the same service ID as for the first request packet. (3) If the server does support upgrading, all future reply packets on that connection will contain the new service ID and the new service ID will be applied to *all* further calls on that connection as well. (4) The RPC op used to probe the upgrade must take the same request data as the shadow call in the upgrade set (but may return a different reply). GetCapability RPC ops were added to all standard sets for just this purpose. Ops where the request formats differ cannot be used for probing. (5) The client must wait for completion of the probe before sending any further RPC ops to the same destination. It should then use the service ID that recvmsg() reported back in all future calls. (6) The shadow service must have call definitions for all the operation IDs defined by the original service. To support service upgrading, a server should: (1) Call bind() twice on its AF_RXRPC socket before calling listen(). Each bind() should supply a different service ID, but the transport addresses must be the same. This allows the server to receive requests with either service ID. (2) Enable automatic upgrading by calling setsockopt(), specifying RXRPC_UPGRADEABLE_SERVICE and passing in a two-member array of unsigned shorts as the argument: unsigned short optval[2]; This specifies a pair of service IDs. They must be different and must match the service IDs bound to the socket. Member 0 is the service ID to upgrade from and member 1 is the service ID to upgrade to. Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 34 ++++++++++++++++++++++++++-------- include/linux/rxrpc.h | 1 + include/rxrpc/packet.h | 2 ++ net/rxrpc/af_rxrpc.c | 23 +++++++++++++++++++++++ net/rxrpc/ar-internal.h | 10 ++++++++-- net/rxrpc/call_accept.c | 2 +- net/rxrpc/conn_service.c | 11 ++++++++++- 7 files changed, 71 insertions(+), 12 deletions(-) commit 28036f44851e2515aa91b547b45cefddcac52ff6 Author: David Howells Date: Mon Jun 5 14:30:49 2017 +0100 rxrpc: Permit multiple service binding Permit bind() to be called on an AF_RXRPC socket more than once (currently maximum twice) to bind multiple listening services to it. There are some restrictions: (1) All bind() calls involved must have a non-zero service ID. (2) The service IDs must all be different. (3) The rest of the address (notably the transport part) must be the same in all (a single UDP socket is shared). (4) This must be done before listen() or sendmsg() is called. This allows someone to connect to the service socket with different service IDs and lays the foundation for service upgrading. The service ID used by an incoming call can be extracted from the msg_name returned by recvmsg(). Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 4 +++ net/rxrpc/af_rxrpc.c | 62 ++++++++++++++++++++++++-------------- net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/call_accept.c | 3 +- net/rxrpc/local_object.c | 1 + net/rxrpc/security.c | 3 +- 6 files changed, 51 insertions(+), 24 deletions(-) commit 68d6d1ae5c0429bcc8911e1db5f80fe2cd1ca974 Author: David Howells Date: Mon Jun 5 14:30:49 2017 +0100 rxrpc: Separate the connection's protocol service ID from the lookup ID Keep the rxrpc_connection struct's idea of the service ID that is exposed in the protocol separate from the service ID that's used as a lookup key. This allows the protocol service ID on a client connection to get upgraded without making the connection unfindable for other client calls that also would like to use the upgraded connection. The connection's actual service ID is then returned through recvmsg() by way of msg_name. Whilst we're at it, we get rid of the last_service_id field from each channel. The service ID is per-connection, not per-call and an entire connection is upgraded in one go. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 5 ++--- net/rxrpc/ar-internal.h | 2 +- net/rxrpc/conn_client.c | 4 ++++ net/rxrpc/conn_event.c | 4 ++-- net/rxrpc/conn_object.c | 1 - net/rxrpc/conn_service.c | 1 + net/rxrpc/proc.c | 2 +- net/rxrpc/recvmsg.c | 7 +++++-- net/rxrpc/rxkad.c | 2 +- net/rxrpc/security.c | 4 ++-- 10 files changed, 19 insertions(+), 13 deletions(-) commit 8dd0ee651d8aefdc2d8ae0fcc9c68dfc943c9e4c Author: Will Deacon Date: Mon Jun 5 11:40:23 2017 +0100 arm64: cpufeature: Fix CPU_OUT_OF_SPEC taint for uniform systems Commit 3fde2999fac5 ("arm64: cpufeature: Don't dump useless backtrace on CPU_OUT_OF_SPEC") changed the cpufeature detection code to use add_taint instead of WARN_TAINT_ONCE when detecting a heterogeneous system with mismatched feature support. Unfortunately, this resulted in all systems getting the taint, regardless of any feature mismatch. This patch fixes the problem by conditionalising the taint on detecting a feature mismatch. Acked-by: Mark Rutland Reported-by: Heiner Kallweit Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c0f2e21953324def9e2f8394406b557d7cb5af64 Author: Sudeep Holla Date: Thu Apr 27 15:20:37 2017 +0100 cpufreq: scpi: use new scpi_ops functions to remove duplicate code scpi_ops now provide APIs to get the transition_latency and to add OPPs to the devices making those logic redundant here. This patch makes use of those APIs and removes the redundant code in this driver. Cc: "Rafael J. Wysocki" Acked-by: Viresh Kumar Signed-off-by: Sudeep Holla drivers/cpufreq/scpi-cpufreq.c | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) commit 45ca7df7c345465dbd2426a33012c9c33d27de62 Author: Sudeep Holla Date: Thu Apr 27 15:08:51 2017 +0100 firmware: arm_scpi: add support to populate OPPs and get transition latency Currently only CPU devices use the transition latency and the OPPs populated in the SCPI driver. scpi-cpufreq has logic to handle these. However, even GPU and other users of SCPI DVFS will need the same logic. In order to avoid duplication, this patch adds support to get DVFS transition latency and add all the OPPs to the device using OPP library helper functions. The helper functions added here can be used for any device whose DVFS are managed by SCPI. Also, we also have incorrect dependency on the cluster identifier for the CPUs. It's fundamentally wrong as the domain id need not match the cluster id. This patch gets rid of that dependency by making use of the clock bindings which are already in place. Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 63 +++++++++++++++++++++++++++++++++++++++++++ include/linux/scpi_protocol.h | 3 +++ 2 files changed, 66 insertions(+) commit 96160a8071b2d76b5dfe6c2478684207cc758553 Author: Eric Anholt Date: Thu May 11 11:31:28 2017 -0700 drm/atmel-hlcdc: Replace the panel usage with drm_panel_bridge. This cuts 135 lines of boilerplate, at the cost of losing the filtering of get_modes() using atmel_hlcdc_dc_mode_valid(). The atomic check will still check that we don't set an invalid mode, though. Acked-by: Boris Brezillon Signed-off-by: Eric Anholt Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170511183128.25085-7-eric@anholt.net drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 163 ++--------------------- 1 file changed, 14 insertions(+), 149 deletions(-) commit 4386c096c2ffa1b3232d701e9d7ff82a1378e1c5 Author: Christophe Leroy Date: Mon May 29 17:31:56 2017 +0200 powerpc/mm: Rename map_page() to map_kernel_page() on 32-bit These two functions implement the same semantics, so unify their naming so we can share code that calls them. The longer name is more descriptive so use it. Signed-off-by: Christophe Leroy Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/32/pgtable.h | 2 ++ arch/powerpc/include/asm/nohash/32/pgtable.h | 2 ++ arch/powerpc/mm/8xx_mmu.c | 2 +- arch/powerpc/mm/dma-noncoherent.c | 2 +- arch/powerpc/mm/mem.c | 4 ++-- arch/powerpc/mm/mmu_decl.h | 1 - arch/powerpc/mm/pgtable_32.c | 8 ++++---- 7 files changed, 12 insertions(+), 9 deletions(-) commit 510fc3c0d761b8f274e2a62f9b4c69bdc6841182 Author: Eric Anholt Date: Thu May 11 11:31:27 2017 -0700 drm/atmel-hlcdc: Drop custom encoder cleanup func. drm_encoder_cleanup() finishes with memsetting it to 0, already. Acked-by: Boris Brezillon Signed-off-by: Eric Anholt Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170511183128.25085-6-eric@anholt.net drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 7b1298e05310f1fe58401f40e5426a558ec5d3ac Author: Eric Anholt Date: Thu May 11 11:31:24 2017 -0700 drm/vc4: Switch DPI to using the panel-bridge helper. Another 100 lines of boilerplate gone, while allowing for bridges to be connected in the display chain. Reviewed-by: Boris Brezillon Signed-off-by: Eric Anholt Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170511183128.25085-3-eric@anholt.net drivers/gpu/drm/vc4/vc4_dpi.c | 164 ++++++++---------------------------------- 1 file changed, 30 insertions(+), 134 deletions(-) commit 656fa22f9ceabbae74ea4628dd02d297aa07104b Author: Eric Anholt Date: Thu May 11 11:31:23 2017 -0700 drm/vc4: Switch DSI to the panel-bridge layer, and support bridges. The newer version of the RPi panel driver is going to be a combination of a bridge and a panel, but we should also support panels without a bridge, so the panel-bridge layer lets us do that cleanly. v2: Drop "dev" argument. Signed-off-by: Eric Anholt Acked-by: Daniel Vetter Reviewed-by: Boris Brezillon Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170511183128.25085-2-eric@anholt.net drivers/gpu/drm/vc4/Kconfig | 2 +- drivers/gpu/drm/vc4/vc4_dsi.c | 154 ++++++------------------------------------ 2 files changed, 21 insertions(+), 135 deletions(-) commit d2485644c7836514e337de456b5a6c8a1119fc8b Author: Balbir Singh Date: Tue May 2 15:17:06 2017 +1000 powerpc/mm/hugetlb: Add support for page accounting Add __GFP_ACCOUNT to __hugepte_alloc() Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abd667be1502f92a9c98404ad3f2e52ea13724f2 Author: Balbir Singh Date: Tue May 2 15:17:05 2017 +1000 powerpc/mm/book(e)(3s)/32: Add page table accounting Add support in pte_alloc_one() and pgd_alloc() by passing __GFP_ACCOUNT in the flags Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/nohash/32/pgalloc.h | 3 ++- arch/powerpc/mm/pgtable_32.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit de3b87611dd1f3c00f4e42fe298457260ea781e0 Author: Balbir Singh Date: Tue May 2 15:17:04 2017 +1000 powerpc/mm/book(e)(3s)/64: Add page table accounting Introduce a helper pgtable_gfp_flags() which just returns the current gfp flags and adds __GFP_ACCOUNT to account for page table allocation. The generic helper is added to include/asm/pgalloc.h and has two variants - WARNING ugly bits ahead 1. If the header is included from a module, no check for mm == &init_mm is done, since init_mm is not exported 2. For kernel includes, the check is done and required see (3e79ec7 arch: x86: charge page tables to kmemcg) The fundamental assumption is that no module should be doing pgd/pud/pmd and pte alloc's on behalf of init_mm directly. NOTE: This adds an overhead to pmd/pud/pgd allocations similar to x86. The other alternative was to implement pmd_alloc_kernel/pud_alloc_kernel and pgd_alloc_kernel with their offset variants. For 4k page size, pte_alloc_one no longer calls pte_alloc_one_kernel. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/32/pgalloc.h | 3 ++- arch/powerpc/include/asm/book3s/64/pgalloc.h | 16 ++++++++++------ arch/powerpc/include/asm/nohash/64/pgalloc.h | 11 +++++++---- arch/powerpc/include/asm/pgalloc.h | 14 ++++++++++++++ arch/powerpc/mm/pgtable_64.c | 20 ++++++++++++++------ 5 files changed, 47 insertions(+), 17 deletions(-) commit c5cee6421cd651446b93c231f0ab8ff2530ba25d Author: Balbir Singh Date: Thu May 25 17:28:32 2017 +1000 powerpc/mm/hash: Do a local flush if possible when no batch is active Currently in hpte_need_flush() if there is no batch pending we always do a global TLB flush, which is inefficient if the mm has never run on another thread. Instead do the same check that __flush_tlb_pending() does and check if a local flush is sufficient when batch->active is false. Instead of open-coding it we use mm_is_thread_local(). Signed-off-by: Balbir Singh [mpe: Don't use a local, just inline mm_is_thread_local()] Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb_hash64.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 13dfc0540a575b47b2d640b093ac16e9e09474f6 Author: Eric Anholt Date: Fri Jun 2 13:25:14 2017 -0700 drm/bridge: Refactor out the panel wrapper from the lvds-encoder bridge. Many DRM drivers have common code to make a stub connector implementation that wraps a drm_panel. By wrapping the panel in a DRM bridge, all of the connector code (including calls during encoder enable/disable) goes away. v2: Fix build with CONFIG_DRM=m, drop "dev" argument that should just be the panel's dev, move kerneldoc up a level and document _remove(). v3: Fix another breakage with CONFIG_DRM=m, fix breakage with CONFIG_OF=n, move protos under CONFIG_DRM_PANEL_BRIDGE, wrap a line. Signed-off-by: Eric Anholt Acked-by: Daniel Vetter (v1) Reviewed-by: Boris Brezillon (v2) Acked-by: Archit Taneja (v2) Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170602202514.11900-1-eric@anholt.net Documentation/gpu/drm-kms-helpers.rst | 6 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/bridge/Kconfig | 11 +- drivers/gpu/drm/bridge/lvds-encoder.c | 157 +++----------------------- drivers/gpu/drm/bridge/panel.c | 200 ++++++++++++++++++++++++++++++++++ include/drm/drm_bridge.h | 7 ++ 6 files changed, 241 insertions(+), 141 deletions(-) commit d6e41f1151feeb118eee776c09323aceb4a415d9 Author: Andy Lutomirski Date: Sun May 28 10:00:17 2017 -0700 x86/mm, KVM: Teach KVM's VMX code that CR3 isn't a constant When PCID is enabled, CR3's PCID bits can change during context switches, so KVM won't be able to treat CR3 as a per-mm constant any more. I structured this like the existing CR4 handling. Under ordinary circumstances (PCID disabled or if the current PCID and the value that's already in the VMCS match), then we won't do an extra VMCS write, and we'll never do an extra direct CR3 read. The overhead should be minimal. I disallowed using the new helper in non-atomic context because PCID support will cause CR3 to stop being constant in non-atomic process context. (Frankly, it also scares me a bit that KVM ever treated CR3 as constant, but it looks like it was okay before.) Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Rik van Riel Cc: Thomas Gleixner Cc: kvm@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 19 +++++++++++++++++++ arch/x86/kvm/vmx.c | 21 ++++++++++++++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) commit be4ffc0d787fafb22b89a2f29e71fea3b119205e Author: Andy Lutomirski Date: Sun May 28 10:00:16 2017 -0700 x86/mm: Be more consistent wrt PAGE_SHIFT vs PAGE_SIZE in tlb flush code Nadav pointed out that some code used PAGE_SIZE and other code used PAGE_SHIFT. Use PAGE_SHIFT instead of multiplying or dividing by PAGE_SIZE. Requested-by: Nadav Amit Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3d28ebceaffab40f30afa87e33331560148d7b8b Author: Andy Lutomirski Date: Sun May 28 10:00:15 2017 -0700 x86/mm: Rework lazy TLB to track the actual loaded mm Lazy TLB state is currently managed in a rather baroque manner. AFAICT, there are three possible states: - Non-lazy. This means that we're running a user thread or a kernel thread that has called use_mm(). current->mm == current->active_mm == cpu_tlbstate.active_mm and cpu_tlbstate.state == TLBSTATE_OK. - Lazy with user mm. We're running a kernel thread without an mm and we're borrowing an mm_struct. We have current->mm == NULL, current->active_mm == cpu_tlbstate.active_mm, cpu_tlbstate.state != TLBSTATE_OK (i.e. TLBSTATE_LAZY or 0). The current cpu is set in mm_cpumask(current->active_mm). CR3 points to current->active_mm->pgd. The TLB is up to date. - Lazy with init_mm. This happens when we call leave_mm(). We have current->mm == NULL, current->active_mm == cpu_tlbstate.active_mm, but that mm is only relelvant insofar as the scheduler is tracking it for refcounting. cpu_tlbstate.state != TLBSTATE_OK. The current cpu is clear in mm_cpumask(current->active_mm). CR3 points to swapper_pg_dir, i.e. init_mm->pgd. This patch simplifies the situation. Other than perf, x86 stops caring about current->active_mm at all. We have cpu_tlbstate.loaded_mm pointing to the mm that CR3 references. The TLB is always up to date for that mm. leave_mm() just switches us to init_mm. There are no longer any special cases for mm_cpumask, and switch_mm() switches mms without worrying about laziness. After this patch, cpu_tlbstate.state serves only to tell the TLB flush code whether it may switch to init_mm instead of doing a normal flush. This makes fairly extensive changes to xen_exit_mmap(), which used to look a bit like black magic. Perf is unchanged. With or without this change, perf may behave a bit erratically if it tries to read user memory in kernel thread context. We should build on this patch to teach perf to never look at user memory when cpu_tlbstate.loaded_mm != current->mm. Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 3 +- arch/x86/include/asm/tlbflush.h | 12 ++- arch/x86/kernel/ldt.c | 7 +- arch/x86/mm/init.c | 2 +- arch/x86/mm/tlb.c | 216 ++++++++++++++++++++-------------------- arch/x86/xen/mmu_pv.c | 51 +++++----- 6 files changed, 147 insertions(+), 144 deletions(-) commit ce4a4e565f5264909a18c733b864c3f74467f69e Author: Andy Lutomirski Date: Sun May 28 10:00:14 2017 -0700 x86/mm: Remove the UP asm/tlbflush.h code, always use the (formerly) SMP code The UP asm/tlbflush.h generates somewhat nicer code than the SMP version. Aside from that, it's fallen quite a bit behind the SMP code: - flush_tlb_mm_range() didn't flush individual pages if the range was small. - The lazy TLB code was much weaker. This usually wouldn't matter, but, if a kernel thread flushed its lazy "active_mm" more than once (due to reclaim or similar), it wouldn't be unlazied and would instead pointlessly flush repeatedly. - Tracepoints were missing. Aside from that, simply having the UP code around was a maintanence burden, since it means that any change to the TLB flush code had to make sure not to break it. Simplify everything by deleting the UP code. Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/Kconfig | 2 +- arch/x86/include/asm/hardirq.h | 2 +- arch/x86/include/asm/mmu.h | 6 --- arch/x86/include/asm/mmu_context.h | 2 - arch/x86/include/asm/tlbbatch.h | 2 - arch/x86/include/asm/tlbflush.h | 76 +------------------------------------- arch/x86/mm/init.c | 2 - arch/x86/mm/tlb.c | 17 +-------- 8 files changed, 5 insertions(+), 104 deletions(-) commit 3f79e4c7c9c2f5c30751ea5c8dd9fd1d56b81947 Author: Andy Lutomirski Date: Sun May 28 10:00:13 2017 -0700 x86/mm: Use new merged flush logic in arch_tlbbatch_flush() Now there's only one copy of the local tlb flush logic for non-kernel pages on SMP kernels. The only functional change is that arch_tlbbatch_flush() will now leave_mm() on the local CPU if that CPU is in the batch and is in TLBSTATE_LAZY mode. Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 454bbad9793f59f5656ce5971ee473a8be736ef5 Author: Andy Lutomirski Date: Sun May 28 10:00:12 2017 -0700 x86/mm: Refactor flush_tlb_mm_range() to merge local and remote cases The local flush path is very similar to the remote flush path. Merge them. This is intended to make no difference to behavior whatsoever. It removes some code and will make future changes to the flushing mechanics simpler. This patch does remove one small optimization: flush_tlb_mm_range() now has an unconditional smp_mb() instead of using MOV to CR3 or INVLPG as a full barrier when applicable. I think this is okay for a few reasons. First, smp_mb() is quite cheap compared to the cost of a TLB flush. Second, this rearrangement makes a bigger optimization available: with some work on the SMP function call code, we could do the local and remote flushes in parallel. Third, I'm planning a rework of the TLB flush algorithm that will require an atomic operation at the beginning of each flush, and that operation will replace the smp_mb(). Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 1 - arch/x86/mm/tlb.c | 113 +++++++++++++++++----------------------- 2 files changed, 48 insertions(+), 66 deletions(-) commit 59f537c1dea04287165bb11407921e095250dc80 Author: Andy Lutomirski Date: Sun May 28 10:00:11 2017 -0700 x86/mm: Change the leave_mm() condition for local TLB flushes On a remote TLB flush, we leave_mm() if we're TLBSTATE_LAZY. For a local flush_tlb_mm_range(), we leave_mm() if !current->mm. These are approximately the same condition -- the scheduler sets lazy TLB mode when switching to a thread with no mm. I'm about to merge the local and remote flush code, but for ease of verifying and bisecting the patch, I want the local and remote flush behavior to match first. This patch changes the local code to match the remote code. Signed-off-by: Andy Lutomirski Acked-by: Rik van Riel Cc: Andrew Morton Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2055abe9c6789cedef29abbdaa488a087faccc3 Author: Andy Lutomirski Date: Sun May 28 10:00:10 2017 -0700 x86/mm: Pass flush_tlb_info to flush_tlb_others() etc Rather than passing all the contents of flush_tlb_info to flush_tlb_others(), pass a pointer to the structure directly. For consistency, this also removes the unnecessary cpu parameter from uv_flush_tlb_others() to make its signature match the other *flush_tlb_others() functions. This serves two purposes: - It will dramatically simplify future patches that change struct flush_tlb_info, which I'm planning to do. - struct flush_tlb_info is an adequate description of what to do for a local flush, too, so by reusing it we can remove duplicated code between local and remove flushes in a future patch. Signed-off-by: Andy Lutomirski Acked-by: Rik van Riel Cc: Andrew Morton Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org [ Fix build warning. ] Signed-off-by: Ingo Molnar arch/x86/include/asm/paravirt.h | 6 ++-- arch/x86/include/asm/paravirt_types.h | 5 ++- arch/x86/include/asm/tlbflush.h | 19 ++++++----- arch/x86/include/asm/uv/uv.h | 11 +++--- arch/x86/mm/tlb.c | 64 +++++++++++++++++------------------ arch/x86/platform/uv/tlb_uv.c | 10 +++--- arch/x86/xen/mmu_pv.c | 10 +++--- 7 files changed, 61 insertions(+), 64 deletions(-) commit 4241119eeb14f762e2d7f6e7c52afd22cea1de37 Merge: e73ad5f 3c2993b Author: Ingo Molnar Date: Mon Jun 5 09:54:49 2017 +0200 Merge tag 'v4.12-rc4' into x86/mm, to pick up fixes Signed-off-by: Ingo Molnar commit 28be1b454c2bb60e317b3135211a378fa2718886 Author: Jiri Slaby Date: Wed May 31 10:12:39 2017 +0200 x86/boot: Remove unused copy_*_gs() functions copy_from_gs() and copy_to_gs() are unused in the boot code. They have actually never been used -- they were always commented out since their addition in 2007: 5be865661516 ("String-handling functions for the new x86 setup code.") So remove them -- they can be restored from history if needed. Signed-off-by: Jiri Slaby Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170531081243.5709-1-jslaby@suse.cz Signed-off-by: Ingo Molnar arch/x86/boot/copy.S | 20 -------------------- 1 file changed, 20 deletions(-) commit f99973e18b65ca1fff8c81532e3132b8f622aea8 Author: Frederic Weisbecker Date: Thu Jun 1 16:47:09 2017 +0200 nohz: Fix buggy tick delay on IRQ storms When the tick is stopped and we reach the dynticks evaluation code on IRQ exit, we perform a soft tick restart if we observe an expired timer from there. It means we program the nearest possible tick but we stay in dynticks mode (ts->tick_stopped = 1) because we may need to stop the tick again after that expired timer is handled. Now this solution works most of the time but if we suffer an IRQ storm and those interrupts trigger faster than the hardware clockevents min delay, our tick won't fire until that IRQ storm is finished. Here is the problem: on IRQ exit we reprog the timer to at least NOW() + min_clockevents_delay. Another IRQ fires before the tick so we reschedule again to NOW() + min_clockevents_delay, etc... The tick is eternally rescheduled min_clockevents_delay ahead. A solution is to simply remove this soft tick restart. After all the normal dynticks evaluation path can handle 0 delay just fine. And by doing that we benefit from the optimization branch which avoids clock reprogramming if the clockevents deadline hasn't changed since the last reprog. This fixes our issue because we don't do repetitive clock reprog that always add hardware min delay. As a side effect it should even optimize the 0 delay path in general. Reported-and-tested-by: Octavian Purdila Signed-off-by: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1496328429-13317-1-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/time/tick-sched.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 9b01d43170aa70a435105f6413759e2ab7e00219 Author: Perr Zhang Date: Fri Jun 2 11:59:53 2017 +0800 sched/header: Remove leftover, obsolete comment There is no more set_task_vxid() helper, remove its description. Signed-off-by: Perr Zhang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170602035953.28949-1-strongbox8@zoho.com Signed-off-by: Ingo Molnar include/linux/sched.h | 2 -- 1 file changed, 2 deletions(-) commit e58e871becec2d3b04ed91c0c16fe8deac9c9dfa Author: Levin, Alexander (Sasha Levin) Date: Wed May 31 00:38:09 2017 +0000 tools/lib/lockdep: Remove private kernel headers Move to using tools/include/ instead. Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@redhat.com Link: http://lkml.kernel.org/r/20170531003747.10557-2-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/include/asm/sections.h | 4 ++ tools/include/linux/compiler.h | 12 ++++ tools/include/linux/debug_locks.h | 13 +++++ tools/include/linux/delay.h | 4 ++ tools/include/linux/ftrace.h | 4 ++ tools/include/linux/gfp.h | 4 ++ tools/include/linux/hardirq.h | 11 ++++ tools/include/linux/interrupt.h | 4 ++ tools/include/linux/irqflags.h | 38 ++++++++++++ tools/include/linux/kallsyms.h | 33 +++++++++++ tools/include/linux/kern_levels.h | 25 ++++++++ tools/include/linux/kernel.h | 4 ++ tools/include/linux/kmemcheck.h | 8 +++ tools/include/linux/linkage.h | 4 ++ tools/include/linux/lockdep.h | 67 ++++++++++++++++++++++ tools/include/linux/module.h | 11 ++++ tools/include/linux/mutex.h | 4 ++ tools/include/linux/proc_fs.h | 4 ++ tools/include/linux/rcu.h | 24 ++++++++ tools/include/linux/sched/clock.h | 4 ++ tools/include/linux/sched/task.h | 4 ++ tools/include/linux/seq_file.h | 4 ++ tools/include/linux/spinlock.h | 26 +++++++++ tools/include/linux/stacktrace.h | 32 +++++++++++ tools/include/trace/events/lock.h | 4 ++ tools/lib/lockdep/lockdep.c | 2 + tools/lib/lockdep/preload.c | 2 - tools/lib/lockdep/rbtree.c | 2 +- tools/lib/lockdep/uinclude/asm/hash.h | 6 -- tools/lib/lockdep/uinclude/asm/hweight.h | 3 - tools/lib/lockdep/uinclude/asm/sections.h | 3 - tools/lib/lockdep/uinclude/linux/compiler.h | 12 ---- tools/lib/lockdep/uinclude/linux/debug_locks.h | 12 ---- tools/lib/lockdep/uinclude/linux/delay.h | 3 - tools/lib/lockdep/uinclude/linux/ftrace.h | 3 - tools/lib/lockdep/uinclude/linux/gfp.h | 3 - tools/lib/lockdep/uinclude/linux/hardirq.h | 11 ---- tools/lib/lockdep/uinclude/linux/hash.h | 1 - tools/lib/lockdep/uinclude/linux/interrupt.h | 3 - tools/lib/lockdep/uinclude/linux/irqflags.h | 38 ------------ tools/lib/lockdep/uinclude/linux/kallsyms.h | 33 ----------- tools/lib/lockdep/uinclude/linux/kern_levels.h | 25 -------- tools/lib/lockdep/uinclude/linux/kernel.h | 61 -------------------- tools/lib/lockdep/uinclude/linux/kmemcheck.h | 8 --- tools/lib/lockdep/uinclude/linux/linkage.h | 3 - tools/lib/lockdep/uinclude/linux/list.h | 1 - tools/lib/lockdep/uinclude/linux/lockdep.h | 59 ------------------- tools/lib/lockdep/uinclude/linux/module.h | 11 ---- tools/lib/lockdep/uinclude/linux/mutex.h | 3 - tools/lib/lockdep/uinclude/linux/poison.h | 1 - tools/lib/lockdep/uinclude/linux/prefetch.h | 6 -- tools/lib/lockdep/uinclude/linux/proc_fs.h | 3 - .../lib/lockdep/uinclude/linux/rbtree_augmented.h | 2 - tools/lib/lockdep/uinclude/linux/rcu.h | 23 -------- tools/lib/lockdep/uinclude/linux/seq_file.h | 3 - tools/lib/lockdep/uinclude/linux/spinlock.h | 25 -------- tools/lib/lockdep/uinclude/linux/stacktrace.h | 32 ----------- tools/lib/lockdep/uinclude/linux/stringify.h | 7 --- tools/lib/lockdep/uinclude/trace/events/lock.h | 3 - 59 files changed, 355 insertions(+), 410 deletions(-) commit 4ea4b3c25752499a67c4a35cafd2d5535017faad Author: Levin, Alexander (Sasha Levin) Date: Thu May 25 12:58:58 2017 +0000 tools/lib/lockdep: Hide liblockdep output from test results This would prevent the liblockdep error messages from getting mixed in with the test result output. Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-22-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/run_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3f5a3934f4165f7f59bf8383011ed559b8acce7e Author: Levin, Alexander (Sasha Levin) Date: Thu May 25 12:58:57 2017 +0000 tools/lib/lockdep: Add dummy current_gfp_context() Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-21-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/uinclude/linux/kernel.h | 3 +++ 1 file changed, 3 insertions(+) commit 61d4595eed163ea416c13c4b994f22190711151b Author: Levin, Alexander (Sasha Levin) Date: Thu May 25 12:58:56 2017 +0000 tools/include: Add IS_ERR_OR_NULL to err.h Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-20-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/include/linux/err.h | 5 +++++ 1 file changed, 5 insertions(+) commit 3156cbaeda991f6b330dd8260d863bfad71b358e Author: Levin, Alexander (Sasha Levin) Date: Thu May 25 12:58:55 2017 +0000 tools/lib/lockdep: Add empty __is_[module,kernel]_percpu_address This would fix the build error caused by: 383776fa7 ("locking/lockdep: Handle statically initialized PER_CPU locks properly") Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-19-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/uinclude/linux/lockdep.h | 5 +++++ tools/lib/lockdep/uinclude/linux/module.h | 5 +++++ 2 files changed, 10 insertions(+) commit f9155dd8d9281adac4d8c95ca66f7db22cd292e1 Author: Levin, Alexander (Sasha Levin) Date: Thu May 25 12:58:53 2017 +0000 tools/lib/lockdep: Include err.h This provides PTR_ERR() now used by lockdep. Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-18-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/uinclude/linux/kernel.h | 1 + 1 file changed, 1 insertion(+) commit 12d83f7361724e5aa4299bb28e4caadc62ae482b Author: Levin, Alexander (Sasha Levin) Date: Thu May 25 12:58:52 2017 +0000 tools/include: Add (mostly) empty include/linux/sched/mm.h Now required by liblockdep. Signed-off-by: Sasha Levin [ Added header guard. ] Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-17-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/include/linux/sched/mm.h | 4 ++++ 1 file changed, 4 insertions(+) commit d8633a32f2a466e8f03f6f06dab237ff4a1e95f2 Author: Ben Hutchings Date: Thu May 25 12:58:51 2017 +0000 tools/lib/lockdep: Use LDFLAGS Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/20170525130005.5947-16-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3addcc087d1ca398afbdefa3e671d580b026a71 Author: Ben Hutchings Date: Thu May 25 12:58:49 2017 +0000 tools/lib/lockdep: Remove double-quotes from soname Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/20170525130005.5947-15-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea59f30d6a30c4c0ef54d1e19ac70c35b6ef91b6 Author: Ben Hutchings Date: Thu May 25 12:58:48 2017 +0000 tools/lib/lockdep: Fix object file paths used in an out-of-tree build Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/20170525130005.5947-14-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6c8e6483850e7a7e44fd584790969c308887c468 Author: Levin, Alexander (Sasha Levin) Date: Thu May 25 12:58:47 2017 +0000 tools/lib/lockdep: Fix compilation for 4.11 - More rcu stubs - New dummy headers due to sched header split - jhash2 included in due to kernel lockdep inclusion and usage Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-13-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/include/linux/bitops.h | 10 ++ tools/include/linux/jhash.h | 175 ++++++++++++++++++++++++++ tools/include/linux/unaligned/packed_struct.h | 46 +++++++ tools/lib/lockdep/uinclude/linux/bitops.h | 3 - tools/lib/lockdep/uinclude/linux/compiler.h | 2 + tools/lib/lockdep/uinclude/linux/kernel.h | 2 + tools/lib/lockdep/uinclude/linux/rcu.h | 2 + 7 files changed, 237 insertions(+), 3 deletions(-) commit 20fb654aef1c929f7befb40678e2cb65a77ead7f Author: Alexander Sverdlin Date: Thu May 25 12:58:46 2017 +0000 tools/lib/lockdep: Don't mix fd-based and stream IO Mixing fd-based and stream-base IO results in interleaved output like following: ===================================== liblockdep 4.7.6 ------------------------------------- conopal/372 is trying to release lock (0x3a45c) at: /lib/libpt.so.2.17-alpha2(_ZN11PTimedMutex6SignalEv+0x3c) [0xb613c688] but there are no more locks to release! other info that might help us debug this: no locks held by conopal/372. stack backtrace: ===================================== liblockdep 4.7.6 ---------------------------------/usr/lib/liblockdep.so.4.7.6(+0x1e3c)[0xb67c2e3c] /usr/lib/liblockdep.so.4.7.6(+0x5fe0)[0xb67c6fe0] /usr/lib/liblockdep.so.4.7.6(+0x6450)[0xb67c7450] /usr/lib/liblockdep.so.4.7.6(lock_release+0x5c)[0xb67c7c40] /usr/lib/liblockdep.so.4.7.6(pthread_mutex_unlock+0x38)[0xb67c91d4] /lib/libpt.so.2.17-alpha2(_ZN11PTimedMutex6SignalEv+0x3c)[0xb613c688] /lib/libpt.so.2.17-alpha2(_ZN10PContainer14AssignContentsERKS_+0xe4)[0xb6160730] /lib/libopal.so.3.17-alpha2(_ZN15OpalMediaFormat14AssignContentsERK10PContainer+0x90)[0xb6435edc] /lib/libopal.so.3.17-alpha2(_ZN15OpalMediaFormataSERK7PString+0x68)[0xb643b610] /lib/libopal.so.3.17-alpha2(_ZN15OpalMediaFormatC2EPKc+0x68)[0xb643b6cc] /lib/libopal.so.3.17-alpha2(_ZN11OpalWAVFile14AddMediaFormatERK15OpalMediaFormat+0x330)[0xb66b2224] /lib/libopal.so.3.17-alpha2(+0x2526f8)[0xb640c6f8] /lib/ld-linux-armhf.so.3(+0x102f0)[0xb6f852f0] /lib/ld-linux-armhf.so.3(+0x1044c)[0xb6f8544c] /lib/ld-linux-armhf.so.3(+0xac4)[0xb6f75ac4] /usr/lib/liblockdep.so.4.7.6(+0x1e3c)[0xb67c2e3c] /usr/lib/liblockdep.so.4.7.6(+0x5fe0)[0xb67c6fe0] /usr/lib/liblockdep.so.4.7.6(+0x6450)[0xb67c7450] /usr/lib/liblockdep.so.4.7.6(lock_release+0x5c)[0xb67c7c40] /usr/lib/liblockdep.so.4.7.6(pthread_mutex_unlock+0x38)[0xb67c91d4] /lib/libpt.so.2.17-alpha2(_ZN11PTimedMutex6SignalEv+0x3c)[0xb613c688] /lib/libopal.so.3.17-alpha2(_ZN15OpalMediaFormat14AssignContentsERK10PContainer+0x78)[0xb6435ec4] /lib/libopal.so.3.17-alpha2(_ZN15OpalMediaFormataSERK7PString+0x68)[0xb643b610] /lib/libopal.so.3.17-alpha2(_ZN15OpalMediaFormatC2EPKc+0x68)[0xb643b6cc] /lib/libopal.so.3.17-alpha2(_ZN11OpalWAVFile14AddMediaFormatERK15OpalMediaFormat+0x330)[0xb66b2224] /lib/libopal.so.3.17-alpha2(+0x2526f8)[0xb640c6f8] /lib/ld-linux-armhf.so.3(+0x102f0)[0xb6f852f0] /lib/ld-linux-armhf.so.3(+0x1044c)[0xb6f8544c] /lib/ld-linux-armhf.so.3(+0xac4)[0xb6f75ac4] Therefore change all bare printf(...) to dprintf(STDOUT_FILENO, ...) to sychronize with backtrace_symbols_fd(). [ BUG: bad unlock balance detected! ] Signed-off-by: Alexander Sverdlin Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-12-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/preload.c | 3 ++- tools/lib/lockdep/uinclude/linux/kallsyms.h | 3 ++- tools/lib/lockdep/uinclude/linux/lockdep.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 24b4d0a1f952355566c0428aba4065a5c3a6ed2c Author: Alexander Sverdlin Date: Thu May 25 12:58:44 2017 +0000 tools: Add install make target for liblockdep Allow user to call "liblockdep_install" target. Also add liblockdep to "all" and "install" targets (as "help" command suggests). Signed-off-by: Alexander Sverdlin Signed-off-by: Sasha Levin Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Linus Walleij Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-11-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8a0d404ec5ea5ee7cd3a8a4668f5d6f8e52cf1d8 Author: Levin, Alexander (Sasha Levin) Date: Thu May 25 12:58:42 2017 +0000 MAINTAINERS: Update email for Sasha Levin New position, new email address. Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-10-alexander.levin@verizon.com Signed-off-by: Ingo Molnar MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9b94d283caa55e9d292a29b431940482a433cb3 Author: Vishal Thanki Date: Thu May 25 12:58:41 2017 +0000 tools/lib/lockdep: Remove -lpthread compiler option With -lpthread option, the test for ABBA_2threads was failing, and test passed if it was removed. Since -pthread compiler option is sufficient for linking to pthread libraries, this patch removes -lpthread. Signed-off-by: Vishal Thanki Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ben@decadent.org.uk Link: http://lkml.kernel.org/r/20170525130005.5947-9-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/run_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1baa75406ecc2d77c9e6ecf45a707838a5bf7f29 Author: Ben Hutchings Date: Thu May 25 12:58:39 2017 +0000 tools/lib/lockdep: Fix 'defined but not used' warning for init_utsname() We define init_utsname() as static but not inline, resulting in a warning for every source file that includes lockdep.h but doesn't call it. Since it is only used by lockdep.c, define it in there. Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/20170525130005.5947-8-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/lockdep.c | 10 ++++++++++ tools/lib/lockdep/uinclude/linux/lockdep.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) commit b016d870cadae31d7c5eb2eef794d2e733f6595c Author: Ben Hutchings Date: Thu May 25 12:58:38 2017 +0000 tools/lib/lockdep: Fix 'set but not used' warnings liblockdep defines trivial macros for working with interrupt flags, as interrupts are never disabled in userland. This results in warnings from gcc when -Wunused-but-set-variable is enabled, and it is enabled by -Wall. Fix this by evaluating the flags parameter and casting it to void. Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/20170525130005.5947-7-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/uinclude/linux/irqflags.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bb7ea2a9af4c98ed70adf7627a2ba5d1ff1725e0 Author: Ben Hutchings Date: Thu May 25 12:58:37 2017 +0000 tools/lib/lockdep: Fix 'unused value' warnings liblockdep defines various macros that may expand to an expression with no effect, while the in-kernel definition does have an effect. This results in warnings from gcc when -Wunused-value is enabled, and is is enabled by -Wall. Fix this by introducing trivial functions, as function return values are generally allowed to be ignored. Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/20170525130005.5947-6-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/uinclude/linux/debug_locks.h | 2 +- tools/lib/lockdep/uinclude/linux/kernel.h | 12 +++++++++--- tools/lib/lockdep/uinclude/linux/lockdep.h | 6 +++++- 3 files changed, 15 insertions(+), 5 deletions(-) commit db8f7796c491a7b0a220a89a4abd9134f3906f43 Author: Ben Hutchings Date: Thu May 25 12:58:36 2017 +0000 tools/lib/lockdep: Enable -Wall by default Regressions in liblockdep may be missed because it doesn't enable warnings. Adding -Wall immediately introduces a lot of warnings, but those will be fixed by the following commits. Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/20170525130005.5947-5-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/Makefile | 1 + 1 file changed, 1 insertion(+) commit 108744c45fd8a51e763e976d9e5b2cc265d4a847 Author: Ben Hutchings Date: Thu May 25 12:58:34 2017 +0000 tools/lib/lockdep: Define the ARRAY_SIZE() macro lockdep.c now uses ARRAY_SIZE(). Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Fixes: 75dd602a5198 ("lockdep: Fix lock_chain::base size") Link: http://lkml.kernel.org/r/20170525130005.5947-4-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/uinclude/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+) commit 98dcea0cfd04e083ac74137ceb9a632604740e2d Author: Ben Hutchings Date: Thu May 25 12:58:33 2017 +0000 tools/lib/lockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing lock_chain/: Depth liblockdep has been broken since commit 75dd602a5198 ("lockdep: Fix lock_chain::base size"), as that adds a check that MAX_LOCK_DEPTH is within the range of lock_chain::depth and in liblockdep it is much too large. That should have resulted in a compiler error, but didn't because: - the check uses ARRAY_SIZE(), which isn't yet defined in liblockdep so is assumed to be an (undeclared) function - putting a function call inside a BUILD_BUG_ON() expression quietly turns it into some nonsense involving a variable-length array It did produce a compiler warning, but I didn't notice because liblockdep already produces too many warnings if -Wall is enabled (which I'll fix shortly). Even before that commit, which reduced lock_chain::depth from 8 bits to 6, MAX_LOCK_DEPTH was too large. Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: # for versions before 4.6, use a value of 255 Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/20170525130005.5947-3-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/uinclude/linux/lockdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3752466b6bf04868296ac6bc27ea1765008636d8 Author: Ben Hutchings Date: Thu May 25 12:58:31 2017 +0000 tools/lib/lockdep: Fix undefined symbol prandom_u32 __lock_pin_lock() now calls prandom_u32() which is not defined in liblockdep. __lock_pin_lock() and its caller lock_pin_lock() are dead code in liblockdep, but we still need to provide a definition of prandom_u32() in case lazy binding is disabled. Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Fixes: e7904a28f533 ("locking/lockdep, sched/core: Implement a better ...") Link: http://lkml.kernel.org/r/20170525130005.5947-2-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/lib/lockdep/lockdep.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8bc39bca5e3e8da0d62f7f4d67fdbeecab02b350 Merge: 094094a 3c2993b Author: Greg Kroah-Hartman Date: Mon Jun 5 09:27:05 2017 +0200 Merge 4.12-rc4 into tty-next We want the tty locking fix in here, so that maybe we can finally get it fixed for real... Signed-off-by: Greg Kroah-Hartman commit 64d09f5ecb237974bc824800e5e5012fd71801c7 Author: Yang Li Date: Fri Jun 2 18:20:23 2017 -0500 MAINTAINERS: Update my email address from freescale to nxp Signed-off-by: Li Yang Signed-off-by: Michael Ellerman MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c67ec7010132a4d948686eeab8a23acb9fb62afe Author: Yang Li Date: Fri Jun 2 18:20:22 2017 -0500 MAINTAINERS: Update entry for Freescale SoC drivers Add myself as the maintainer for drivers/fsl/soc/ and fix the scope for device tree bindings. Signed-off-by: Li Yang Acked-by: Scott Wood Signed-off-by: Michael Ellerman MAINTAINERS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b27ce776852078df9e14a223b375db6507096963 Author: Nicholas Piggin Date: Sun Jun 4 22:06:22 2017 +1000 selftests/powerpc: context_switch use private futexes with threads This reduces overhead of mutex locking and increases context switch rate significantly (which helps to measure and profile the context switch path). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman .../selftests/powerpc/benchmarks/context_switch.c | 53 ++++++++++++++-------- 1 file changed, 33 insertions(+), 20 deletions(-) commit b802ab46ba12c617fd55b072f1906627e636947b Author: Colin Ian King Date: Mon Jun 5 16:49:12 2017 +1000 powerpc: Fix some spelling mistakes Collation of some spelling fixes from Colin. Attemping -> Attempting intialized -> initialized missmanaged -> mismanaged Signed-off-by: Colin Ian King Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +- arch/powerpc/sysdev/xive/common.c | 2 +- drivers/tty/hvc/hvcs.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) commit b0febde779fd5d2e3e6f83843a828726117fe0a7 Author: Jose Abreu Date: Thu May 25 15:19:19 2017 +0100 drm/bridge/synopsys: dw-hdmi: Use bridge->mode_valid() callback Now that we have a callback to check if bridge supports a given mode we can use it in Synopsys Designware HDMI bridge so that we restrict the number of probbed modes to the ones we can actually display. Also, there is no need to use mode_fixup() callback as mode_valid() will handle the mode validation. NOTE: I also had to change the pdata declaration of mode_valid custom callback so that the passed modes are const. I also changed in the platforms I found. Not even compiled it though. Signed-off-by: Jose Abreu Acked-by: Neil Armstrong Acked-by: Philipp Zabel Cc: Carlos Palminha Cc: Daniel Vetter Cc: Archit Taneja Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: David Airlie Cc: Philipp Zabel Cc: Carlo Caione Cc: Kevin Hilman Cc: Mark Yao Cc: Heiko Stuebner Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/3d8d449e4d13d2535fa292c75f5fa931de4a4fa8.1495720737.git.joabreu@synopsys.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 41 +++++++++-------------------- drivers/gpu/drm/imx/dw_hdmi-imx.c | 10 ++++--- drivers/gpu/drm/meson/meson_dw_hdmi.c | 5 ++-- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 +- include/drm/bridge/dw_hdmi.h | 2 +- 5 files changed, 24 insertions(+), 36 deletions(-) commit aae1a2ce1416fa79213bd765cee5b961540265b3 Merge: a4e1ce2 de5ed99 Author: David S. Miller Date: Sun Jun 4 23:49:49 2017 -0400 Merge branch 'mlxsw-Minor-cleanup' Jiri Pirko says: ==================== mlxsw: Minor cleanup Fix small issues I noticed during the refactoring. First patch adds file name comments in the header file to make it clear what goes where. Second patch fixes a typo and third patch simply aligns RIF index allocation with similar allocations in the driver. ==================== Signed-off-by: David S. Miller commit de5ed99e9777a487da4ad9c58e409ed26b640d9e Author: Ido Schimmel Date: Sun Jun 4 16:53:40 2017 +0200 mlxsw: spectrum_router: Align RIF index allocation with existing code The way we usually allocate an index is by letting the allocation function return an error instead of an invalid index. Do the same for RIF index. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit da0abcf93fe5353268b0b5b30396fb10dc32bef4 Author: Ido Schimmel Date: Sun Jun 4 16:53:39 2017 +0200 mlxsw: Fix typo inside enumeration Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit cb4cc0e0b18ef683eed191707fa812a1719b9723 Author: Ido Schimmel Date: Sun Jun 4 16:53:38 2017 +0200 mlxsw: spectrum: Tidy up header file Make it clear where functions are defined and move misplaced declaration to their correct place. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 47 ++++++++++++++------------ 1 file changed, 25 insertions(+), 22 deletions(-) commit a4e1ce24f7e2dc59d2bba5c11487778030f9d5bf Author: Yotam Gigi Date: Sun Jun 4 16:49:58 2017 +0200 mlxsw: spectrum: Rename the firmware file Change the firmware file name to be in "mellanox" directory. This commit is a followup to the linux-firmware commit a4c72696f5f4 ("Mellanox: Add firmware for mlxsw_spectrum") Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc85c910aed30029a33179df873d930143acb1bc Merge: a619cc8 e7b80de Author: David S. Miller Date: Sun Jun 4 23:08:32 2017 -0400 Merge branch 'qed-vf-xdp' Yuval Mintz says: qed*: Support VF XDP attachment ==================== Each driver queue [Rx, Tx, XDP-forwarding] requires an allocated HW/FW connection + configured queue-zone. VF handling by the PF has several limitations that prevented adding the capability to perform XDP at driver-level: - The VF assumes there's 1-to-1 correspondance between the VF queue and the used connection, meaning q is always going to use cid, whereas for its own queues the PF is acquiring a new cid per each new queue. - There's a 1-to-1 correspondate between the VF-queues and the HW queue zones. While this is necessary for Rx-queues [as the queue-zone contains the producer], transmission queues can share the underlaying queue-zone [only shared configuration is coalescing]. But all VF<->PF communication mechanisms assume there's a single identifier that identify a queue [as queue-zone == queue], while sharing queue-zones requires passing additional information. - VFs currently don't try mapping a doorbell bar - there's a small doorbell window in the regview allowing VFs to doorbell up to 16 connections; but this window isn's wide enough for the added XDP forwarding queues. This series is going to add the necessary infrastrucutre to finally let our VFs support XDP assuming both the PF and VF drivers are sufficiently new [Legacy support would be retained both for older VFs and older PFs, but both will be needed for this new support to work]. Basically, the various database driver maintains for its queue-cids would be revised, and queue-cids would be identified using the (queue-zone, unique index) pair. The TLV mechanism would then be extended to allow VFs to communicate that unique-index as well as the already provided queue-zone. Finally, the VFs would try to map their doorbell bar and inform their PF that they're using it. Almost all the changes are in qed, with exception of #3 [which does some cleanup in qede as well] and #11 that actually enables the feature. ==================== Signed-off-by: David S. Miller commit e7b80dece83b86f8f630a47a9e0419051c7b1005 Author: Mintz, Yuval Date: Sun Jun 4 13:31:09 2017 +0300 qede: VF XDP support This introduces 2 changes needed for XDP to be supported for VFs: a. On VF-side, publish the NDO based on qed outputs b. On PF-side, request qed to allocate sufficient cids per-VF to allow the child vfs to support it Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 34 +++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) commit cbb8a12c089c7f04b86d08d89bdab71ec9bff1f5 Author: Mintz, Yuval Date: Sun Jun 4 13:31:08 2017 +0300 qed: VF XDP support The final addition on the qed front - - VFs would now require their PFs to provide multiple CIDs - Based on the availability of connections from PF, determine whether XDP is feasible and share it with qede via dev_info. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 19 +++++++++++++++---- drivers/net/ethernet/qlogic/qed/qed_vf.c | 13 ++++++++++--- drivers/net/ethernet/qlogic/qed/qed_vf.h | 12 ++++++++++++ include/linux/qed/qed_eth_if.h | 3 +++ 4 files changed, 40 insertions(+), 7 deletions(-) commit 1a850bfc9e71871599ddbc0d4d4cffa2dc409855 Author: Mintz, Yuval Date: Sun Jun 4 13:31:07 2017 +0300 qed: VFs to try utilizing the doorbell bar VFs are currently not mapping their doorbell bar, instead relying on the small doorbell window they have in their limited regview bar. In order to increase the number of possible Tx connections [queues] employeed by VF past 16, we need to start using the doorbell bar if one such is exposed - VF would communicate this fact to PF which would return the size-bar internally configured into chip, according to which the VF would decide whether to actually utilize the doorbell bar. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 5 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 8 +- drivers/net/ethernet/qlogic/qed/qed_main.c | 24 ++-- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 1 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 61 ++++++++- drivers/net/ethernet/qlogic/qed/qed_vf.c | 181 +++++++++++++++++-------- drivers/net/ethernet/qlogic/qed/qed_vf.h | 23 +++- 7 files changed, 231 insertions(+), 72 deletions(-) commit 08bc8f15e69cbd9f8e3d7bbba4814cec50d51cfe Author: Mintz, Yuval Date: Sun Jun 4 13:31:06 2017 +0300 qed: Multiple qzone queues for VFs This adds the infrastructure for supporting VFs that want to open multiple transmission queues on the same queue-zone. At this point, there are no VFs that actually request this functionality, but later patches would remedy that. a. VF and PF would communicate the capability during ACQUIRE; Legacy VFs would continue on behaving as they do today b. PF would communicate number of supported CIDs to the VF and would enforce said limitation c. Whenever VF passes a request for a given queue configuration it would also pass an associated index within said queue-zone Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 8 +- drivers/net/ethernet/qlogic/qed/qed_l2.c | 30 ++++-- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 136 ++++++++++++++++++++++++---- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 1 + drivers/net/ethernet/qlogic/qed/qed_vf.c | 39 +++++++- drivers/net/ethernet/qlogic/qed/qed_vf.h | 32 ++++++- include/linux/qed/qed_if.h | 4 + 7 files changed, 215 insertions(+), 35 deletions(-) commit 007bc37179c14a6d1ff1545695e2492b3a376bc1 Author: Mintz, Yuval Date: Sun Jun 4 13:31:05 2017 +0300 qed: IOV db support multiple queues per qzone Allow the infrastructure a PF maintains for each one of its VFs to support multiple queue-cids on a single queue-zone. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 12 +- drivers/net/ethernet/qlogic/qed/qed_l2.h | 3 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 164 +++++++++++++++++----------- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 16 ++- 4 files changed, 123 insertions(+), 72 deletions(-) commit 3b19f47820756f9905e7ef184747fbb3c8ed062f Author: Mintz, Yuval Date: Sun Jun 4 13:31:04 2017 +0300 qed: Make VF legacy a bitfield Until now we used to have a single VF legacy compatibility mode, one that affected the place of the Rx producers of those VFs [mostly]. As PF would soon support allocating CIDs for VFs instead of having a static CID<->queue configuration for them, we'll need to have an additional legacy mode since existing VFs would need to continue on using the older mode of operation. Change the infrastrucutre so that the legacy would be able to indicate which of the legacy behaviors is needed for a given VF. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 10 +++++---- drivers/net/ethernet/qlogic/qed/qed_l2.h | 10 +++++---- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 34 ++++++++++++++++++----------- 3 files changed, 33 insertions(+), 21 deletions(-) commit bbe3f233ec5ea99049f33471c0c0d0d2a78e2116 Author: Mintz, Yuval Date: Sun Jun 4 13:31:03 2017 +0300 qed: Assign a unique per-queue index to queue-cid When a queue-cid is allocated, assign an index inside that's CID's queue-zone. For PFs and VFS, this number is going to be unique and derive from a per-queue-zone bitmap, while for PF's VFs queues the number is currently going to constant; Later, we'd add the capability of a VF to communicate such an index to its PF. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 62 ++++++++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_l2.h | 7 ++++ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 20 ++++++++-- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 3 ++ 4 files changed, 88 insertions(+), 4 deletions(-) commit 3946497aff655b9bb1807ef7e2ecbe799e6d832a Author: Mintz, Yuval Date: Sun Jun 4 13:31:02 2017 +0300 qed: Pass vf_params when creating a queue-cid We're going to need additional information for queue-cids that a PF creates for its VFs, so start by refactoring existing logic used for initializing said struct into receiving a structure encapsulating the VF-specific information that needs to be provided. This also introduces QED_QUEUE_CID_SELF - each queue-cid would hold an indication to whether it belongs to the hw-function holding it [whether that's a PF or a VF], or else what's the VF id it belongs to. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 67 ++++++++++++++++++----------- drivers/net/ethernet/qlogic/qed/qed_l2.h | 33 +++++++++++--- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 40 +++++++++++------ 3 files changed, 95 insertions(+), 45 deletions(-) commit f604b17d7fdef574792a7e0b39f1b926d6b43d9d Author: Mintz, Yuval Date: Sun Jun 4 13:31:01 2017 +0300 qed*: L2 interface to use the SB structures directly Part of an effort of a cleaner seperation between qed and the protocol drivers, the L2 interface is to use the SB structure for initialization purposes opaquely. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 32 +++++++++++++++------------- drivers/net/ethernet/qlogic/qed/qed_l2.h | 24 +++++++++++++++------ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 13 +++++++++-- drivers/net/ethernet/qlogic/qed/qed_vf.c | 8 +++---- drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++-- include/linux/qed/qed_eth_if.h | 3 +-- 6 files changed, 52 insertions(+), 32 deletions(-) commit 0db711bb26209992da375730eab6b3cec1edee7a Author: Mintz, Yuval Date: Sun Jun 4 13:31:00 2017 +0300 qed: Create L2 queue database First step in allowing a single PF/VF to open multiple queues on the same queue zone is to add per-hwfn database of queue-cids as a two-dimensional array where entry would be according to [queue zone][internal index]. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 3 ++ drivers/net/ethernet/qlogic/qed/qed_dev.c | 24 +++++++-- drivers/net/ethernet/qlogic/qed/qed_l2.c | 86 +++++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_l2.h | 6 +++ drivers/net/ethernet/qlogic/qed/qed_vf.c | 5 ++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 12 +++++ 6 files changed, 133 insertions(+), 3 deletions(-) commit 6bea61da1716761c95cd32117be6004b0e14b4b2 Author: Mintz, Yuval Date: Sun Jun 4 13:30:59 2017 +0300 qed: Add bitmaps for VF CIDs Each PF has a bitmap for its own ranges of CIDs, to allow easy grabbing of an available CID when such is needed. But VFs are not using the same mechanism, instead relying on hard-coded CIDs [ queue-index == cid ]. As an infrastructure step toward increasing number of CIDs of VFs, the PF is going to maintain bitmaps for the VF CIDs as well - the bitmaps would be per-VF and the ranges would be the same [in HW all VFs of a given PF have the same mapping of CIDs, and the HW is capable of distinguishing between those according to the VF index] Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 222 ++++++++++++++++++++++-------- drivers/net/ethernet/qlogic/qed/qed_cxt.h | 54 ++++++-- 2 files changed, 202 insertions(+), 74 deletions(-) commit a619cc8bedd0df6dfbc389f4c904070be87a0e5c Merge: a11227d e2fcad5 Author: David S. Miller Date: Sun Jun 4 23:01:48 2017 -0400 Merge branch 'skb-sgvec-overflow' Jason A. Donenfeld says: ==================== net: Avoiding stack overflow in skb_to_sgvec The recent bug with macsec and historical one with virtio have indicated that letting skb_to_sgvec trounce all over an sglist without checking the length is probably a bad idea. And it's not necessary either: an sglist already explicitly marks its last item, and the initialization functions are diligent in doing so. Thus there's a clear way of avoiding future overflows. So, this patchset, from a high level, makes skb_to_sgvec return a potential error code, and then adjusts all callers to check for the error code. There are two situations in which skb_to_sgvec might return such an error: 1) When the passed in sglist is too small; and 2) When the passed in skbuff is too deeply nested. So, the first patch in this series handles the issues with skb_to_sgvec directly, and the remaining ones then handle the call sites. ==================== Signed-off-by: David S. Miller commit e2fcad58fd230f635a74e4e983c6f4ea893642d2 Author: Jason A. Donenfeld Date: Sun Jun 4 04:16:26 2017 +0200 virtio_net: check return value of skb_to_sgvec always Signed-off-by: Jason A. Donenfeld Reviewed-by: Sergei Shtylyov Cc: "Michael S. Tsirkin" Cc: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit cda7ea6903502af34015000e16be290a79f07638 Author: Jason A. Donenfeld Date: Sun Jun 4 04:16:25 2017 +0200 macsec: check return value of skb_to_sgvec always Signed-off-by: Jason A. Donenfeld Cc: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/macsec.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 89a5ea99662505d2d61f2a3030a6896c2cb3cdb0 Author: Jason A. Donenfeld Date: Sun Jun 4 04:16:24 2017 +0200 rxrpc: check return value of skb_to_sgvec always Signed-off-by: Jason A. Donenfeld Acked-by: David Howells Signed-off-by: David S. Miller net/rxrpc/rxkad.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 3f29770723fe498a5c5f57c3a31a996ebdde03e1 Author: Jason A. Donenfeld Date: Sun Jun 4 04:16:23 2017 +0200 ipsec: check return value of skb_to_sgvec always Signed-off-by: Jason A. Donenfeld Cc: Steffen Klassert Cc: Herbert Xu Cc: "David S. Miller" Signed-off-by: David S. Miller net/ipv4/ah4.c | 8 ++++++-- net/ipv4/esp4.c | 20 +++++++++++++------- net/ipv6/ah6.c | 8 ++++++-- net/ipv6/esp6.c | 20 +++++++++++++------- 4 files changed, 38 insertions(+), 18 deletions(-) commit 48a1df65334b74bd7531f932cca5928932abf769 Author: Jason A. Donenfeld Date: Sun Jun 4 04:16:22 2017 +0200 skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow This is a defense-in-depth measure in response to bugs like 4d6fa57b4dab ("macsec: avoid heap overflow in skb_to_sgvec"). There's not only a potential overflow of sglist items, but also a stack overflow potential, so we fix this by limiting the amount of recursion this function is allowed to do. Not actually providing a bounded base case is a future disaster that we can easily avoid here. As a small matter of house keeping, we take this opportunity to move the documentation comment over the actual function the documentation is for. While this could be implemented by using an explicit stack of skbuffs, when implementing this, the function complexity increased considerably, and I don't think such complexity and bloat is actually worth it. So, instead I built this and tested it on x86, x86_64, ARM, ARM64, and MIPS, and measured the stack usage there. I also reverted the recent MIPS changes that give it a separate IRQ stack, so that I could experience some worst-case situations. I found that limiting it to 24 layers deep yielded a good stack usage with room for safety, as well as being much deeper than any driver actually ever creates. Signed-off-by: Jason A. Donenfeld Cc: Steffen Klassert Cc: Herbert Xu Cc: "David S. Miller" Cc: David Howells Cc: Sabrina Dubroca Cc: "Michael S. Tsirkin" Cc: Jason Wang Signed-off-by: David S. Miller include/linux/skbuff.h | 8 +++---- net/core/skbuff.c | 65 ++++++++++++++++++++++++++++++++------------------ 2 files changed, 46 insertions(+), 27 deletions(-) commit a11227dcc345c1792945cae8a3b22882a723620f Merge: 5071034 b7d3ed5 Author: David S. Miller Date: Sun Jun 4 21:58:24 2017 -0400 Merge branch 'bpf-Add-BPF-support-to-all-perf_event' Merge branch 'bpf-Add-BPF-support-to-all-perf_event' Alexei Starovoitov says: ==================== bpf: Add BPF support to all perf_event v3->v4: one more tweak to reject unsupported events at map update time as Peter suggested v2->v3: more refactoring to address Peter's feedback. Now all perf_events are attachable and readable v1->v2: address Peter's feedback. Refactor patch 1 to allow attaching bpf programs to all event types and reading counters from all of them as well patch 2 - more tests patch 3 - address Dave's feedback and document bpf_perf_event_read() and bpf_perf_event_output() properly ==================== Signed-off-by: David S. Miller commit b7d3ed5be9bd7e0689eee0f0f36702937cd8f7c8 Author: Teng Qin Date: Fri Jun 2 21:03:54 2017 -0700 bpf: update perf event helper functions documentation This commit updates documentation of the bpf_perf_event_output and bpf_perf_event_read helpers to match their implementation. Signed-off-by: Teng Qin Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 11 +++++++---- tools/include/uapi/linux/bpf.h | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) commit 41e9a8046c92e26a68fdf5a4cb831b7c60113602 Author: Teng Qin Date: Fri Jun 2 21:03:53 2017 -0700 samples/bpf: add tests for more perf event types $ trace_event tests attaching BPF program to HW_CPU_CYCLES, SW_CPU_CLOCK, HW_CACHE_L1D and other events. It runs 'dd' in the background while bpf program collects user and kernel stack trace on counter overflow. User space expects to see sys_read and sys_write in the kernel stack. $ tracex6 tests reading of various perf counters from BPF program. Both tests were refactored to increase coverage and be more accurate. Signed-off-by: Teng Qin Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_helpers.h | 3 +- samples/bpf/trace_event_user.c | 73 ++++++++++++++--- samples/bpf/tracex6_kern.c | 28 +++++-- samples/bpf/tracex6_user.c | 180 ++++++++++++++++++++++++++++++++--------- 4 files changed, 228 insertions(+), 56 deletions(-) commit f91840a32deef5cb1bf73338bc5010f843b01426 Author: Alexei Starovoitov Date: Fri Jun 2 21:03:52 2017 -0700 perf, bpf: Add BPF support to all perf_event types Allow BPF_PROG_TYPE_PERF_EVENT program types to attach to all perf_event types, including HW_CACHE, RAW, and dynamic pmu events. Only tracepoint/kprobe events are treated differently which require BPF_PROG_TYPE_TRACEPOINT/BPF_PROG_TYPE_KPROBE program types accordingly. Also add support for reading all event counters using bpf_perf_event_read() helper. Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/perf_event.h | 7 +++++-- kernel/bpf/arraymap.c | 28 +++++++-------------------- kernel/events/core.c | 47 +++++++++++++++++++++++++++------------------- kernel/trace/bpf_trace.c | 22 ++++++++-------------- 4 files changed, 48 insertions(+), 56 deletions(-) commit f3ca01d3d7793f76a03ff17945e1b1f2138be9fb Author: Benjamin Gaignard Date: Mon May 29 17:45:51 2017 +0200 drm: zte: use devm_of_platform_populate() Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard CC: Shawn Guo CC: David Airlie CC: dri-devel@lists.freedesktop.org CC: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo Link: http://patchwork.freedesktop.org/patch/msgid/1496072763-31209-4-git-send-email-benjamin.gaignard@linaro.org drivers/gpu/drm/zte/zx_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5071034e4af709d6783b7d105dc296a5cc84739b Author: Sowmini Varadhan Date: Fri Jun 2 09:01:49 2017 -0700 neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d" The command # arp -s 62.2.0.1 a:b:c:d:e:f dev eth2 adds an entry like the following (listed by "arp -an") ? (62.2.0.1) at 0a:0b:0c:0d:0e:0f [ether] PERM on eth2 but the symmetric deletion command # arp -i eth2 -d 62.2.0.1 does not remove the PERM entry from the table, and instead leaves behind ? (62.2.0.1) at on eth2 The reason is that there is a refcnt of 1 for the arp_tbl itself (neigh_alloc starts off the entry with a refcnt of 1), thus the neigh_release() call from arp_invalidate() will (at best) just decrement the ref to 1, but will never actually free it from the table. To fix this, we need to do something like neigh_forced_gc: if the refcnt is 1 (i.e., on the table's ref), remove the entry from the table and free it. This patch refactors and shares common code between neigh_forced_gc and the newly added neigh_remove_one. A similar issue exists for IPv6 Neighbor Cache entries, and is fixed in a similar manner by this patch. Signed-off-by: Sowmini Varadhan Reviewed-by: Julian Anastasov Signed-off-by: David S. Miller include/net/neighbour.h | 1 + net/core/neighbour.c | 60 ++++++++++++++++++++++++++++++++++++++++--------- net/ipv4/arp.c | 4 ++++ 3 files changed, 54 insertions(+), 11 deletions(-) commit 030a89028db07a7987f1f3bd6ee43114e36f5060 Author: Andrew Lunn Date: Sat Jun 3 20:00:36 2017 +0200 net: phy: smsc: Implement PHY statistics Most of the PHYs supported by the SMSC driver have a counter of symbol errors. This is 16 bit wide and wraps around when it reaches its maximum value. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-By: Woojung Huh Signed-off-by: David S. Miller drivers/net/phy/smsc.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 386e2e4bd7ca520e9466150585f87e0b9b9636ac Merge: 4e86d3c 0ac64c3 Author: David S. Miller Date: Sun Jun 4 21:34:17 2017 -0400 Merge branch 'dsa-Fixes-for-mv88e6161' Andrew Lunn says: ==================== dsa: Fixes for mv88e6161 Testing a board with an mv88e6161 turned up two issues. The PHYs were not found, because the wrong method to access them was used. The statistics did not work, because the wrong snapshot method was used ==================== Signed-off-by: David S. Miller commit 0ac64c39490041cb684350823803e6476815a3fb Author: Andrew Lunn Date: Fri Jun 2 23:22:46 2017 +0200 net: dsa: mv88e6xxx: mv88e6161 uses mv88e6320 stats snapshot The mv88e6161 was using the wrong method to perform statistics snapshot. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec8378bb4d8ebfaae035c0e949311f8efefc3a87 Author: Andrew Lunn Date: Fri Jun 2 23:22:45 2017 +0200 net: dsa: mv88e6xxx: 6161 uses global 2 for PHY access Access to the internal PHYs of the 6161 and 6123 go through global 2 SMI registers. Fix the ops structure. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4e86d3cb7bbf41c99ce48e9dae69d9a779415f9b Merge: 2d9888c d23a83f Author: David S. Miller Date: Sun Jun 4 20:07:41 2017 -0400 Merge branch 'dsa-mv88e6xxx-move-registers-macros' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: move registers macros This patchset brings no functional changes. It is the first step of a cleanup renaming the chip header file and moving the Register definitions _as is_ in their proper header files. A following patchset will prefix them with the appropriate model (MV88E6XXX_ or e.g. MV88E6390_) to respect an implicit namespace and easily identify model subtleties in registers layout, as correctly done in the newly added serdes.h header. ==================== Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d23a83f2ae4062bfefc2a1a701a1dcb5416b9c61 Author: Vivien Didelot Date: Fri Jun 2 17:06:19 2017 -0400 net: dsa: mv88e6xxx: move the Global 2 macros Move the GLOBAL2_* macros where they belong, in the related global2.h header. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.h | 101 ----------------------------------- drivers/net/dsa/mv88e6xxx/global2.c | 2 - drivers/net/dsa/mv88e6xxx/global2.h | 103 ++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 103 deletions(-) commit e097097b2738ba7c6fa26629faa561021f03fa42 Author: Vivien Didelot Date: Fri Jun 2 17:06:18 2017 -0400 net: dsa: mv88e6xxx: move the Global 1 macros Move the GLOBAL_* macros where they belong, in the related global1.h header. Include it in global2.c which uses GLOBAL_STATUS_IRQ_DEVICE. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.h | 141 ------------------------------------ drivers/net/dsa/mv88e6xxx/global1.h | 141 ++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global2.c | 1 + 3 files changed, 142 insertions(+), 141 deletions(-) commit d2a160b5a70990361c3045f0fec74aad188b3f7c Author: Vivien Didelot Date: Fri Jun 2 17:06:17 2017 -0400 net: dsa: mv88e6xxx: move the Port macros Move the PORT_* macros where they belong, in the related port.h header. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.h | 160 --------------------------------------- drivers/net/dsa/mv88e6xxx/port.h | 160 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+), 160 deletions(-) commit c4530ee177f309f7c339f21b70fa6f77798650b8 Author: Vivien Didelot Date: Fri Jun 2 17:06:16 2017 -0400 net: dsa: mv88e6xxx: move PHY macros Move the PHY_* macros where they belong, in the related phy.h header. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.h | 4 ---- drivers/net/dsa/mv88e6xxx/phy.h | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) commit 4d5f2ba77801c9ce81dc7a7b32de2d6aa63fbe93 Author: Vivien Didelot Date: Fri Jun 2 17:06:15 2017 -0400 net: dsa: mv88e6xxx: rename chip header The mv88e6xxx.h is meant to contains the chip structures and data. Rename it to chip.h, as for other source/header pairs of the driver. At the same time, ensure that relative header inclusions are separated by a newline and sorted alphabetically. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.h | 928 ++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global1.c | 2 +- drivers/net/dsa/mv88e6xxx/global1.h | 2 +- drivers/net/dsa/mv88e6xxx/global1_atu.c | 2 +- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 2 +- drivers/net/dsa/mv88e6xxx/global2.c | 3 +- drivers/net/dsa/mv88e6xxx/global2.h | 2 +- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 927 ------------------------------- drivers/net/dsa/mv88e6xxx/phy.c | 2 +- drivers/net/dsa/mv88e6xxx/port.c | 3 +- drivers/net/dsa/mv88e6xxx/port.h | 2 +- drivers/net/dsa/mv88e6xxx/serdes.c | 2 +- drivers/net/dsa/mv88e6xxx/serdes.h | 2 +- 14 files changed, 942 insertions(+), 939 deletions(-) commit 2d9888c5b28d872e0f1d9bb7005a1c6b2d1e9615 Merge: 1820dd0 14be36c Author: David S. Miller Date: Sun Jun 4 20:05:15 2017 -0400 Merge branch 'dsa-cleanups-before-multi-CPU-port' Florian Fainelli says: ==================== net: dsa: Cleanups before multi-CPU port This patch series does a bunch of cleanups before we start adding support for multiple CPU ports. ==================== Signed-off-by: David S. Miller commit 14be36c2c96cd18cfa036f230b57ea78d82a303f Author: Florian Fainelli Date: Fri Jun 2 12:31:23 2017 -0700 net: dsa: Initialize all CPU and enabled ports masks in dsa_ds_parse() There was no reason for duplicating the code that initializes ds->enabled_port_mask in both dsa_parse_ports_dn() and dsa_parse_ports(), instead move this to dsa_ds_parse() which is early enough before ops->setup() has run. While at it, we can now make dsa_is_cpu_port() check ds->cpu_port_mask which is a step towards being multi-CPU port capable. Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 2 +- net/dsa/dsa2.c | 33 +++++++++++++++------------------ 2 files changed, 16 insertions(+), 19 deletions(-) commit e41c1b5030e279c6626d3d052c3ca5ce5e2508df Author: Florian Fainelli Date: Fri Jun 2 12:31:22 2017 -0700 net: dsa: Consistently use dsa_port for dsa_*_port_{apply, unapply} We have all the information we need in dsa_port, so use it instead of repeating the same arguments over and over again. Suggested-by: Vivien Didelot Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 90 ++++++++++++++++++++++++++-------------------------------- 1 file changed, 41 insertions(+), 49 deletions(-) commit 937c7df85ce7ce6b2319894f6ad3376f15dff186 Author: Florian Fainelli Date: Fri Jun 2 12:31:21 2017 -0700 net: dsa: Pass dsa_port reference to ethtool setup/restore We do not need to have a reference to a dsa_switch, instead we should pass a reference to a CPU dsa_port, change that. This is a preliminary change to better support multiple CPU ports. Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa.c | 6 ++++-- net/dsa/dsa2.c | 4 ++-- net/dsa/dsa_priv.h | 4 ++-- net/dsa/legacy.c | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) commit 1820dd0633b9972028e377ee76e5d40873491d25 Author: Colin Ian King Date: Fri Jun 2 16:22:27 2017 +0100 rxrpc: remove redundant proc_remove call The proc_remove call is dead code as it occurs after a return and hence can never be called. Remove it. Detected by CoverityScan, CID#1437743 ("Logically dead code") Signed-off-by: Colin Ian King Acked-by: David Howells Signed-off-by: David S. Miller net/rxrpc/net_ns.c | 1 - 1 file changed, 1 deletion(-) commit 8e2f6dd298beb93c30e1699a5c26492a10214447 Author: Eric Dumazet Date: Fri Jun 2 08:02:26 2017 -0700 dccp: consistently use dccp_write_space() DCCP uses dccp_write_space() for sk->sk_write_space method. Unfortunately a passive connection (as provided by accept()) is using the generic sk_stream_write_space() function. Lets simply inherit sk->sk_write_space from the parent instead of forcing the generic one. Signed-off-by: Eric Dumazet Cc: Gerrit Renker Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 1 - 1 file changed, 1 deletion(-) commit f0a4581605802cc136f68cfcf325035054fa92a3 Author: Colin Ian King Date: Fri Jun 2 15:13:34 2017 +0100 net: phy: marvell: make some functions static functions m88e1510_get_temp_critical, m88e1510_set_temp_critical and m88e1510_get_temp_alarm can be made static as they not need to be in global scope. Cleans up sparse warnings: "symbol 'm88e1510_get_temp_alarm' was not declared. Should it be static?" "symbol 'm88e1510_get_temp_critical' was not declared. Should it be static?" Signed-off-by: Colin Ian King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a5eb62f3cb39fdd32e86d4b722e5b44c38e08890 Author: LABBE Corentin Date: Fri Jun 2 13:36:27 2017 +0200 netxen: remove writeq/readq function definitions Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which already have them. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit fbd0ac60420fa2f5d45865326ad1074b80f29060 Author: Joe Perches Date: Fri Jun 2 02:40:44 2017 -0700 net-procfs: Use vsnprintf extension %phN Save a bit of code by using the kernel extension. $ size net/core/net-procfs.o* text data bss dec hex filename 3701 120 0 3821 eed net/core/net-procfs.o.new 3764 120 0 3884 f2c net/core/net-procfs.o.old Signed-off-by: Joe Perches Signed-off-by: David S. Miller net/core/net-procfs.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 342fa1964439511268265be44b3e08825bbe4d05 Author: Jon Mason Date: Wed May 31 15:44:50 2017 -0400 mdio: mux: make child bus walking more permissive and errors more verbose If any errors are encountered while walking the device tree structure of the MDIO bus for children, the code may silently continue, silently exit, or throw an error and exit. This make it difficult for device tree writers to know there is an error. Also, it makes any error in a child entry of the MDIO bus be fatal for all entries. Instead, we should provide verbose errors describing the error and then attempt to continue if it all possible. Also, use of_mdio_parse_addr() Signed-off-by: Jon Mason Signed-off-by: David S. Miller drivers/net/phy/mdio-mux.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit e8317a40383469413a73c02494f2a4026d66e33f Merge: f4d0166 fd7da28 Author: David S. Miller Date: Sun Jun 4 18:12:24 2017 -0400 Merge branch 'net-dissection-and-matching-on-tos-and-ttl' Or Gerlitz says: ==================== net: add support for dissection and matching on ip tos and ttl The 1st two patches enable matching/classifying on ip tos and ttl by the flow dissector and flower. The other two patches offload matching on tcp flags and ip tos in mlx5. The mlx5 patches touch single file/function and not interfere with other inflight mlx5 submissions. V2: repost as asked by Dave. ==================== Signed-off-by: David S. Miller commit fd7da28b280d0c8b94417e85e49fea3db1ba7965 Author: Or Gerlitz Date: Thu Jun 1 21:37:40 2017 +0300 net/mlx5e: Offload TC matching on ip tos / traffic-class Enable offloading of TC matching on ipv4 tos or ipv6 traffic-class. Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 26 ++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit e77834ec0a3dcb1b4976f64efc7078ae84ec76db Author: Or Gerlitz Date: Thu Jun 1 21:37:39 2017 +0300 net/mlx5e: Offload TC matching on tcp flags Enable offloading of TC matching on tcp flags. Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 4d80cc0aaaab9efac14c9d3d702b69961800de20 Author: Or Gerlitz Date: Thu Jun 1 21:37:38 2017 +0300 net/sched: cls_flower: add support for matching on ip tos and ttl Benefit from the support of ip header fields dissection and allow users to set rules matching on ipv4 tos and ttl or ipv6 traffic-class and hoplimit. Signed-off-by: Or Gerlitz Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 5 +++++ net/sched/cls_flower.c | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) commit 518d8a2e9bad83c6040eccebc3d1f7388fc034e7 Author: Or Gerlitz Date: Thu Jun 1 21:37:37 2017 +0300 net/flow_dissector: add support for dissection of misc ip header fields Add support for dissection of ip tos and ttl and ipv6 traffic-class and hoplimit. Both are dissected into the same struct. Uses similar call to ip dissection function as with tcp, arp and others. Signed-off-by: Or Gerlitz Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller include/net/flow_dissector.h | 11 +++++++++++ net/core/flow_dissector.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit 855615eee9b1989cac8ec5eaae4562db081a239b Author: Peter Zijlstra Date: Wed May 31 17:52:04 2017 +0200 x86/tsc: Remove the TSC_ADJUST clamp Now that all affected platforms have a microcode update; and we check this and disable TSC_DEADLINE and print a microcode revision update error if its too old, we can remove the TSC_ADJUST clamp. This should help with systems where the second socket runs ahead of the first socket and needs a negative adjustment. In this case we'd hit the 0 clamp and give up for not achieving synchronization. Signed-off-by: Peter Zijlstra (Intel) Cc: kevin.b.stanton@intel.com Link: http://lkml.kernel.org/r/20170531155306.100950003@infradead.org Signed-off-by: Thomas Gleixner arch/x86/kernel/tsc_sync.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit bd9240a18edfbfa72e957fc2ba831cf1f13ea073 Author: Peter Zijlstra Date: Wed May 31 17:52:03 2017 +0200 x86/apic: Add TSC_DEADLINE quirk due to errata Due to errata it is possible for the TSC_DEADLINE timer to misbehave after using TSC_ADJUST. A microcode update is available to fix this situation. Avoid using the TSC_DEADLINE timer if it is affected by this issue and report the required microcode version. [ tglx: Renamed function to apic_check_deadline_errata() ] Signed-off-by: Peter Zijlstra (Intel) Cc: kevin.b.stanton@intel.com Link: http://lkml.kernel.org/r/20170531155306.050849877@infradead.org Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/apic.c | 79 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit c6e9f42bbeecbc10cd4fbcca474b5859aba1de67 Author: Peter Zijlstra Date: Wed May 31 17:52:02 2017 +0200 x86/apic: Change the lapic name in deadline mode So that we can more easily see in what mode the lapic timer operates. Signed-off-by: Peter Zijlstra (Intel) Cc: kevin.b.stanton@intel.com Link: http://lkml.kernel.org/r/20170531155305.989808008@infradead.org Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/apic.c | 1 + 1 file changed, 1 insertion(+) commit 20dcf8e244b963a5c64cdda336d00d5169d17985 Author: Al Viro Date: Sat Jun 3 22:00:37 2017 -0400 lpfc debugfs: get rid of pointless access_ok() copy_from_user() needs no protection - it does the checks itself Signed-off-by: Al Viro drivers/scsi/lpfc/lpfc_debugfs.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 5a5011936ec0ef22e9433cf2ee3520db4993b445 Author: Al Viro Date: Sat Jun 3 21:50:46 2017 -0400 adb: get rid of pointless access_ok() Signed-off-by: Al Viro drivers/macintosh/adb.c | 4 ---- 1 file changed, 4 deletions(-) commit 31acd2665b8f45548e1acfb9131657646333f91c Author: Al Viro Date: Sat Jun 3 21:44:11 2017 -0400 isdn: get rid of pointless access_ok() copy_to_user()/copy_from_user()/get_user() check themselves Signed-off-by: Al Viro drivers/isdn/i4l/isdn_common.c | 18 ------------------ drivers/isdn/i4l/isdn_ppp.c | 6 ------ drivers/isdn/isdnloop/isdnloop.c | 2 -- 3 files changed, 26 deletions(-) commit ae2a9762d6f54331f683464f07498cf66e7c125c Author: Al Viro Date: Sat Jun 3 21:41:51 2017 -0400 compat statfs: switch to copy_to_user() Signed-off-by: Al Viro fs/statfs.c | 58 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) commit 9f98c6e67ffd1961884e70023a33e81730cd7fcb Author: Richard Porter Date: Sun Jun 4 11:10:12 2017 +0100 staging: ks7010: use le16_to_cpu() to access __le16 field Fixes sparse warning: drivers/staging/ks7010/ks_hostif.c:959:24: warning: restricted __le16 degrades to integer Signed-off-by: Richard Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b6502e5bc5ef16179bcd812dfa43d8bbb5689d4 Author: Andrew Jones Date: Sun Jun 4 14:44:01 2017 +0200 KVM: arm/arm64: timer: remove request-less vcpu kick The timer work is only scheduled for a VCPU when that VCPU is blocked. This means we only need to wake it up, not kick (IPI) it. While calling kvm_vcpu_kick() would just do the wake up, and not kick, anyway, let's change this to avoid request-less vcpu kicks, as they're generally not a good idea (see "Request-less VCPU Kicks" in Documentation/virtual/kvm/vcpu-requests.rst) Signed-off-by: Andrew Jones Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7484931e4a8b06fe734ac2b5134f09204bad11a Author: Andrew Jones Date: Sun Jun 4 14:44:00 2017 +0200 KVM: arm/arm64: PMU: remove request-less vcpu kick Refactor PMU overflow handling in order to remove the request-less vcpu kick. Now, since kvm_vgic_inject_irq() uses vcpu requests, there should be no chance that a kick sent at just the wrong time (between the VCPU's call to kvm_pmu_flush_hwstate() and before it enters guest mode) results in a failure for the guest to see updated GIC state until its next exit some time later for some other reason. Signed-off-by: Andrew Jones Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/pmu.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit 325f9c649c8a4e447e4d3babacc7a60b75012d5d Author: Andrew Jones Date: Sun Jun 4 14:43:59 2017 +0200 KVM: arm/arm64: use vcpu requests for irq injection Don't use request-less VCPU kicks when injecting IRQs, as a VCPU kick meant to trigger the interrupt injection could be sent while the VCPU is outside guest mode, which means no IPI is sent, and after it has called kvm_vgic_flush_hwstate(), meaning it won't see the updated GIC state until its next exit some time later for some other reason. The receiving VCPU only needs to check this request in VCPU RUN to handle it. By checking it, if it's pending, a memory barrier will be issued that ensures all state is visible. See "Ensuring Requests Are Seen" of Documentation/virtual/kvm/vcpu-requests.rst Signed-off-by: Andrew Jones Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_host.h | 1 + arch/arm64/include/asm/kvm_host.h | 1 + virt/kvm/arm/arm.c | 7 +++++++ virt/kvm/arm/vgic/vgic.c | 9 +++++++-- 4 files changed, 16 insertions(+), 2 deletions(-) commit 7b244e2be654d90d77800015d23395357dbc82ba Author: Andrew Jones Date: Sun Jun 4 14:43:58 2017 +0200 KVM: arm/arm64: change exit request to sleep request A request called EXIT is too generic. All requests are meant to cause exits, but different requests have different flags. Let's not make it difficult to decide if the EXIT request is correct for some case by just always providing unique requests for each case. This patch changes EXIT to SLEEP, because that's what the request is asking the VCPU to do. Signed-off-by: Andrew Jones Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_host.h | 2 +- arch/arm64/include/asm/kvm_host.h | 2 +- virt/kvm/arm/arm.c | 12 ++++++------ virt/kvm/arm/psci.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) commit 424c989b1a664a270727550506321af0a605c302 Author: Andrew Jones Date: Sun Jun 4 14:43:57 2017 +0200 KVM: arm/arm64: optimize VCPU RUN We can make a small optimization by not checking the state of the power_off field on each run. This is done by treating power_off like pause, only checking it when we get the EXIT VCPU request. When a VCPU powers off another VCPU the EXIT request is already made, so we just need to make sure the request is also made on self power off. kvm_vcpu_kick() isn't necessary for these cases, as the VCPU would just be kicking itself, but we add it anyway as a self kick doesn't cost much, and it makes the code more future-proof. Signed-off-by: Andrew Jones Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/arm.c | 19 +++++++++++-------- virt/kvm/arm/psci.c | 2 ++ 2 files changed, 13 insertions(+), 8 deletions(-) commit cc9b43f99d5ff4df75d11e75c0bfaf08f1ff5a9a Author: Andrew Jones Date: Sun Jun 4 14:43:56 2017 +0200 KVM: arm/arm64: use vcpu requests for power_off System shutdown is currently using request-less VCPU kicks. This leaves open a tiny race window, as it doesn't ensure the state change to power_off is seen by a VCPU just about to enter guest mode. VCPU requests, OTOH, are guaranteed to be seen (see "Ensuring Requests Are Seen" of Documentation/virtual/kvm/vcpu-requests.rst) This patch applies the EXIT request used by pause to power_off, fixing the race. Signed-off-by: Andrew Jones Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/psci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0592c005622582fb4049a2f710d92c3a70f4c79b Author: Andrew Jones Date: Sun Jun 4 14:43:55 2017 +0200 KVM: arm/arm64: replace pause checks with vcpu request checks The current use of KVM_REQ_VCPU_EXIT for pause is fine. Even the requester clearing the request is OK, as this is the special case where the sole requesting thread and receiving VCPU are executing synchronously (see "Clearing Requests" in Documentation/virtual/kvm/vcpu-requests.rst) However, that's about to change, so let's ensure only the receiving VCPU clears the request. Additionally, by guaranteeing KVM_REQ_VCPU_EXIT is always set when pause is, we can avoid checking pause directly in VCPU RUN. Signed-off-by: Andrew Jones Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/arm.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 6a6d73be12fbe492d0678cd84d3b35e2bc9698e4 Author: Andrew Jones Date: Sun Jun 4 14:43:54 2017 +0200 KVM: arm/arm64: properly use vcpu requests arm/arm64 already has one VCPU request used when setting pause, but it doesn't properly check requests in VCPU RUN. Check it and also make sure we set vcpu->mode at the appropriate time (before the check) and with the appropriate barriers. See Documentation/virtual/kvm/vcpu-requests.rst. Also make sure we don't leave any vcpu requests we don't intend to handle later set in the request bitmap. If we don't clear them, then kvm_request_pending() may return true when it shouldn't. Using VCPU requests properly fixes a small race where pause could get set just as a VCPU was entering guest mode. Signed-off-by: Andrew Jones Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm/kvm/handle_exit.c | 1 + arch/arm64/kvm/handle_exit.c | 1 + virt/kvm/arm/arm.c | 14 ++++++++++++-- virt/kvm/arm/psci.c | 1 + 4 files changed, 15 insertions(+), 2 deletions(-) commit 3bb96149f235be624a012e678fde8cd69d0c02e6 Author: Andrew Jones Date: Sun Jun 4 14:43:53 2017 +0200 KVM: Add documentation for VCPU requests Signed-off-by: Andrew Jones Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall Documentation/virtual/kvm/vcpu-requests.rst | 307 ++++++++++++++++++++++++++++ 1 file changed, 307 insertions(+) commit 2fa6e1e12a024b48b2c7ea39f50205246e027da7 Author: Radim Krčmář Date: Sun Jun 4 14:43:52 2017 +0200 KVM: add kvm_request_pending A first step in vcpu->requests encapsulation. Additionally, we now use READ_ONCE() when accessing vcpu->requests, which ensures we always load vcpu->requests when it's accessed. This is important as other threads can change it any time. Also, READ_ONCE() documents that vcpu->requests is used with other threads, likely requiring memory barriers, which it does. Signed-off-by: Radim Krčmář [ Documented the new use of READ_ONCE() and converted another check in arch/mips/kvm/vz.c ] Signed-off-by: Andrew Jones Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/mips/kvm/trap_emul.c | 2 +- arch/mips/kvm/vz.c | 2 +- arch/powerpc/kvm/booke.c | 2 +- arch/powerpc/kvm/powerpc.c | 5 ++--- arch/s390/kvm/kvm-s390.c | 2 +- arch/x86/kvm/x86.c | 4 ++-- include/linux/kvm_host.h | 5 +++++ 7 files changed, 13 insertions(+), 9 deletions(-) commit 2387149eade25f32dcf1398811b3d0293181d005 Author: Andrew Jones Date: Sun Jun 4 14:43:51 2017 +0200 KVM: improve arch vcpu request defining Marc Zyngier suggested that we define the arch specific VCPU request base, rather than requiring each arch to remember to start from 8. That suggestion, along with Radim Krcmar's recent VCPU request flag addition, snowballed into defining something of an arch VCPU request defining API. No functional change. (Looks like x86 is running out of arch VCPU request bits. Maybe someday we'll need to extend to 64.) Signed-off-by: Andrew Jones Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_host.h | 3 ++- arch/arm64/include/asm/kvm_host.h | 3 ++- arch/powerpc/include/asm/kvm_host.h | 4 ++-- arch/s390/include/asm/kvm_host.h | 6 ++--- arch/x86/include/asm/kvm_host.h | 47 ++++++++++++++++++++----------------- include/linux/kvm_host.h | 7 ++++++ 6 files changed, 41 insertions(+), 29 deletions(-) commit f2c45807d3992fe0f173f34af9c347d907c31686 Author: Thomas Gleixner Date: Tue May 30 23:15:59 2017 +0200 alarmtimer: Switch over to generic set/get/rearm routine All required callbacks are in place. Switch the alarm timer based posix interval timer callbacks to the common implementation and remove the incorrect private implementation. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.825471962@linutronix.de kernel/time/alarmtimer.c | 121 +++++++-------------------------------------- kernel/time/posix-timers.c | 12 ++--- kernel/time/posix-timers.h | 6 +++ 3 files changed, 29 insertions(+), 110 deletions(-) commit b3bf6f369d50ece9dec6338741648005d95c19e4 Author: Thomas Gleixner Date: Tue May 30 23:15:58 2017 +0200 alarmtimer: Implement arm callback Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.747567162@linutronix.de kernel/time/alarmtimer.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e344c9e76bc6af997926171bfd90d25bbae0a2c5 Author: Thomas Gleixner Date: Tue May 30 23:15:57 2017 +0200 alarmtimer: Implement try_to_cancel callback Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.670026824@linutronix.de kernel/time/alarmtimer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d653d8457c76da11f047af1f66256ac9b8421b69 Author: Thomas Gleixner Date: Tue May 30 23:15:56 2017 +0200 alarmtimer: Implement remaining callback Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.592676753@linutronix.de kernel/time/alarmtimer.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit e7561f1633ac735df48c55ad09a2530e9ab9fab1 Author: Thomas Gleixner Date: Tue May 30 23:15:55 2017 +0200 alarmtimer: Implement forward callback Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.513694229@linutronix.de kernel/time/alarmtimer.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b3db80f77a95a45dbb2136f7b2a364dc797ea914 Author: Thomas Gleixner Date: Tue May 30 23:15:54 2017 +0200 alarmtimer: Implement timer_rearm() callback Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.434598989@linutronix.de kernel/time/alarmtimer.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit eae1c4ae275fe3e024454c012a548ee0d700f54c Author: Thomas Gleixner Date: Tue May 30 23:15:53 2017 +0200 posix-timers: Make use of cancel/arm callbacks Replace the hrtimer calls by calls to the new try_to_cancel()/arm() kclock callbacks and move the hrtimer specific implementation into the corresponding callback functions. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.355396667@linutronix.de kernel/time/posix-timers.c | 181 +++++++++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 81 deletions(-) commit 525b8ed91671e29e187dfe02d408b11190ccf494 Author: Thomas Gleixner Date: Tue May 30 23:15:52 2017 +0200 posix-timers: Add cancel/arm callbacks Add timer_try_to_cancel() and timer_arm() callbacks to kclock which allow to make common_timer_set() usable by both hrtimer and alarmtimer based clocks. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.278022962@linutronix.de kernel/time/posix-timers.h | 3 +++ 1 file changed, 3 insertions(+) commit eabdec04385376d560078992710104cc7be2ce1b Author: Thomas Gleixner Date: Tue May 30 23:15:51 2017 +0200 posix-timers: Zero settings value in common code Zero out the settings struct in the common code so the callbacks do not have to do it themself. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.200870713@linutronix.de kernel/time/posix-cpu-timers.c | 5 +---- kernel/time/posix-timers.c | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) commit 91d57bae08689199c8acc77a8b3b41150cafab1c Author: Thomas Gleixner Date: Tue May 30 23:15:50 2017 +0200 posix-timers: Make use of forward/remaining callbacks Replace the hrtimer calls by calls to the new forward/remaining kclock callbacks and move the hrtimer specific implementation into the corresponding callback functions. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.121437232@linutronix.de kernel/time/posix-timers.c | 64 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 15 deletions(-) commit 63841b2a6969501de183efafc14d20175e402804 Author: Thomas Gleixner Date: Tue May 30 23:15:49 2017 +0200 posix-timers: Add forward/remaining callbacks Add two callbacks to kclock which allow using common_)timer_get() for both hrtimer and alarm timer based clocks. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.044915536@linutronix.de kernel/time/posix-timers.h | 2 ++ 1 file changed, 2 insertions(+) commit 21e55c1f83880a56360287c00f2b5cd5e5a4a912 Author: Thomas Gleixner Date: Tue May 30 23:15:48 2017 +0200 posix-timers: Add active flag to k_itimer Keep track of the activation state of posix timers. This is a preparatory change for making common_timer_get() usable by both hrtimer and alarm timer implementations. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.967783982@linutronix.de include/linux/posix-timers.h | 2 ++ kernel/time/posix-timers.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit f37fb0aa4f453c7c785bbcecc4991ac48c5c0e51 Author: Thomas Gleixner Date: Tue May 30 23:15:47 2017 +0200 posix-timers: Use timer_rearm() callback in posixtimer_rearm() Use the new timer_rearm() callback to replace the conditional hardcoded calls into the hrtimer and cpu timer code. This allows later to bring the same logic to alarmtimers. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.889661919@linutronix.de kernel/time/posix-cpu-timers.c | 7 +++++-- kernel/time/posix-timers.c | 12 ++++++------ kernel/time/posix-timers.h | 2 -- 3 files changed, 11 insertions(+), 10 deletions(-) commit 96fe3b072f134e4993f829d599eaa1e0eb5a10e5 Author: Thomas Gleixner Date: Tue May 30 23:15:46 2017 +0200 posix-timers: Rename do_schedule_next_timer That function is a misnomer. Rename it with a proper prefix to posixtimer_rearm(). Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.811362578@linutronix.de include/linux/posix-timers.h | 2 +- kernel/signal.c | 2 +- kernel/time/posix-cpu-timers.c | 2 +- kernel/time/posix-timers.c | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) commit 30802945893bc944b5971b408b37511a03b54e5c Author: Thomas Gleixner Date: Tue May 30 23:15:45 2017 +0200 posix-timers: Add timer_rearm() callback Add a timer_rearm() callback which is used to make the rescheduling of posix interval timers independent of the underlying clock implementation. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.732632167@linutronix.de kernel/time/posix-timers.h | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit d97bb75ddd2f38068df01da8abf26df78756253c Author: Thomas Gleixner Date: Tue May 30 23:15:44 2017 +0200 posix-timers: Store k_clock pointer in k_itimer Having the k_clock pointer in the k_itimer struct avoids the lookup in several code pathes and makes the next steps of unification of the hrtimer and alarmtimer based posix timers simpler. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.641222072@linutronix.de include/linux/posix-timers.h | 2 ++ kernel/time/posix-cpu-timers.c | 2 ++ kernel/time/posix-timers.c | 7 ++++--- 3 files changed, 8 insertions(+), 3 deletions(-) commit 80105cd0e62ba8a2caf8eebd52f42952c7c04046 Author: Thomas Gleixner Date: Tue May 30 23:15:43 2017 +0200 posix-timers: Move interval out of the union Preparatory patch to unify the alarm timer and hrtimer based posix interval timer handling. The interval is used as a criteria for rearming decisions so moving it out of the clock specific data structures allows later unification. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.563922908@linutronix.de include/linux/posix-timers.h | 4 ++-- kernel/time/alarmtimer.c | 13 ++++++------- kernel/time/posix-timers.c | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 19 deletions(-) commit af888d677a3f4473c198b4720319dd037f398b51 Author: Thomas Gleixner Date: Tue May 30 23:15:42 2017 +0200 posix-timers: Unify overrun/requeue_pending handling hrtimer based posix-timers and posix-cpu-timers handle the update of the rearming and overflow related status fields differently. Move that update to the common rearming code. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.484936964@linutronix.de kernel/time/posix-cpu-timers.c | 18 +++++++----------- kernel/time/posix-timers.c | 15 ++++++++------- 2 files changed, 15 insertions(+), 18 deletions(-) commit bab0aae9dcba9466dcc968b8bd21914f8f691631 Author: Thomas Gleixner Date: Tue May 30 23:15:41 2017 +0200 posix-timers: Move posix-timer internals to core None of these declarations is required outside of kernel/time. Move them to an internal header. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170530211656.394803853@linutronix.de include/linux/posix-timers.h | 30 ------------------------------ kernel/time/alarmtimer.c | 2 ++ kernel/time/posix-clock.c | 2 ++ kernel/time/posix-cpu-timers.c | 2 ++ kernel/time/posix-timers.c | 1 + kernel/time/posix-timers.h | 29 +++++++++++++++++++++++++++++ 6 files changed, 36 insertions(+), 30 deletions(-) commit 03676b41a8ffcbb1f6d9eb6ca754b2bfa431fd59 Author: Thomas Gleixner Date: Tue May 30 23:15:40 2017 +0200 posix-timers: Cleanup struct k_itimer As a preparation for further changes, cleanup the formatting of the k_itimer structure and add kernel doc comments. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.316574129@linutronix.de include/linux/posix-timers.h | 61 +++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 21 deletions(-) commit 6631fa12c105e326bbe5fb215eb216e86c90d1ba Author: Thomas Gleixner Date: Tue May 30 23:15:39 2017 +0200 posix-timers: Avoid gazillions of forward declarations Move it below the actual implementations as there are new callbacks coming which would require even more forward declarations. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.238209952@linutronix.de kernel/time/posix-timers.c | 190 +++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 101 deletions(-) commit 3a06c7ac24f9f24ec059cd77c2dbdf7fbfd0aaaf Author: Thomas Gleixner Date: Tue May 30 23:15:38 2017 +0200 posix-clocks: Remove interval timer facility and mmap/fasync callbacks The only user of this facility is ptp_clock, which does not implement any of those functions. Remove them to prevent accidental users. Especially the interval timer interfaces are now more or less impossible to implement because the necessary infrastructure has been confined to the core code. Aside of that it's really complex to make these callbacks implemented according to spec as the alarm timer implementation demonstrates. If at all then a nanosleep callback might be a reasonable extension. For now keep just what ptp_clock needs. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.145036286@linutronix.de include/linux/posix-clock.h | 22 --------- kernel/time/posix-clock.c | 113 -------------------------------------------- 2 files changed, 135 deletions(-) commit a81129e5a189973abd661704b261f8aad9325407 Author: Thomas Gleixner Date: Tue May 30 23:15:37 2017 +0200 posix-timers: Remove unused export of posix_timer_event() Since the removal of the mmtimer driver the export is not longer needed. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.052744418@linutronix.de kernel/time/posix-timers.c | 1 - 1 file changed, 1 deletion(-) commit 18c700c4e3d0a37c43a2df8b8f740121d4dac645 Author: Thomas Gleixner Date: Tue May 30 23:15:36 2017 +0200 alarmtimer: Remove pointless config conditional Having a IF_ENABLED(CONFIG_POSIX_TIMERS) inside of a #ifdef CONFIG_POSIX_TIMERS section is pointless. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211655.975218056@linutronix.de kernel/time/alarmtimer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 978267b6430c07d62cb38f83e058a3132c52eca1 Merge: 6bc51cb ff86bf0c Author: Thomas Gleixner Date: Sun Jun 4 15:21:52 2017 +0200 Merge branch 'timers/urgent' into WIP.timers Pick up urgent fixes to avoid conflicts. commit 6bc51cbaa9d75c7c240282da5ff270815caccac0 Author: Christoph Hellwig Date: Sat Jun 3 21:01:02 2017 +0200 signal: Remove non-uapi By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of include include/asm-generic/siginfo.h and untangle the unholy mess of includes. [ tglx: Removed uapi/asm/siginfo.h from m32r, microblaze, mn10300 and score ] Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: Fenghua Yu Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: Arnd Bergmann Cc: sparclinux@vger.kernel.org Cc: "David S. Miller" Link: http://lkml.kernel.org/r/20170603190102.28866-6-hch@lst.de arch/arc/include/asm/Kbuild | 1 - arch/arc/include/uapi/asm/Kbuild | 2 ++ arch/arm/include/asm/Kbuild | 1 - arch/arm/include/uapi/asm/Kbuild | 2 ++ arch/c6x/include/asm/Kbuild | 1 - arch/c6x/include/uapi/asm/Kbuild | 1 + arch/cris/include/asm/Kbuild | 1 - arch/cris/include/uapi/asm/Kbuild | 2 ++ arch/h8300/include/asm/Kbuild | 1 - arch/h8300/include/uapi/asm/Kbuild | 2 ++ arch/hexagon/include/asm/Kbuild | 1 - arch/hexagon/include/uapi/asm/Kbuild | 2 ++ arch/ia64/include/asm/siginfo.h | 1 - arch/m32r/include/uapi/asm/Kbuild | 2 ++ arch/m32r/include/uapi/asm/siginfo.h | 6 ------ arch/m68k/include/asm/Kbuild | 1 - arch/m68k/include/uapi/asm/Kbuild | 1 + arch/microblaze/include/uapi/asm/Kbuild | 1 + arch/microblaze/include/uapi/asm/siginfo.h | 1 - arch/mn10300/include/uapi/asm/Kbuild | 2 ++ arch/mn10300/include/uapi/asm/siginfo.h | 1 - arch/nios2/include/asm/Kbuild | 1 - arch/nios2/include/uapi/asm/Kbuild | 1 + arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/uapi/asm/Kbuild | 2 ++ arch/score/include/uapi/asm/Kbuild | 2 ++ arch/score/include/uapi/asm/siginfo.h | 6 ------ arch/sh/include/asm/Kbuild | 1 - arch/sh/include/uapi/asm/Kbuild | 2 ++ arch/sparc/include/asm/siginfo.h | 1 - arch/unicore32/include/asm/Kbuild | 1 - arch/unicore32/include/uapi/asm/Kbuild | 1 + arch/xtensa/include/asm/Kbuild | 1 - arch/xtensa/include/uapi/asm/Kbuild | 1 + include/asm-generic/siginfo.h | 17 ----------------- include/uapi/asm-generic/siginfo.h | 15 +++++++++++++-- 36 files changed, 39 insertions(+), 47 deletions(-) commit b9253a43370e8f3c46c0ee24b04fa2ffec37b7c0 Author: Christoph Hellwig Date: Sat Jun 3 21:01:01 2017 +0200 signal: Move copy_siginfo_to_user to Having it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to signal.h instead where several related functions already reside. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: Fenghua Yu Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: Arnd Bergmann Cc: sparclinux@vger.kernel.org Cc: "David S. Miller" Link: http://lkml.kernel.org/r/20170603190102.28866-5-hch@lst.de include/asm-generic/siginfo.h | 4 ---- include/linux/signal.h | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) commit 31ea70e0308b73a1b862bd17c06efc3cbcfd2016 Author: Christoph Hellwig Date: Sat Jun 3 21:01:00 2017 +0200 posix-timers: Move the do_schedule_next_timer declaration Having it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to posix-timers.h instead. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: Fenghua Yu Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: Arnd Bergmann Cc: sparclinux@vger.kernel.org Cc: "David S. Miller" Link: http://lkml.kernel.org/r/20170603190102.28866-4-hch@lst.de include/asm-generic/siginfo.h | 1 - include/linux/posix-timers.h | 3 +++ kernel/signal.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit 7994200ce69a3873dfa2641254a13bb0a40056f3 Author: Christoph Hellwig Date: Sat Jun 3 21:00:59 2017 +0200 ia64: Remove HAVE_ARCH_COPY_SIGINFO Since ia64 defines __ARCH_SI_PREAMBLE_SIZE it can just use the generic copy_siginfo implementation, which is identical to the architecture specific one. With that support for HAVE_ARCH_COPY_SIGINFO can go away entirely. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: Fenghua Yu Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: Arnd Bergmann Cc: sparclinux@vger.kernel.org Cc: "David S. Miller" Link: http://lkml.kernel.org/r/20170603190102.28866-3-hch@lst.de arch/ia64/include/asm/siginfo.h | 22 ---------------------- arch/ia64/include/uapi/asm/siginfo.h | 1 - include/linux/signal.h | 7 +------ 3 files changed, 1 insertion(+), 29 deletions(-) commit f70c80068f073ace4b9071803d2e2691fe0c3d05 Author: Christoph Hellwig Date: Sat Jun 3 21:00:58 2017 +0200 sparc: Simplify There is no need for the forward declaration of compat_siginfo provided here. We can't yet use the generic header as we need to pull in the sparc-specific version of the uapi , but this prepares for removing the non-uapi entirely. Signed-off-by: Christoph Hellwig Acked-by: "David S. Miller" Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: Fenghua Yu Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: Arnd Bergmann Cc: sparclinux@vger.kernel.org Link: http://lkml.kernel.org/r/20170603190102.28866-2-hch@lst.de arch/sparc/include/asm/siginfo.h | 12 ------------ 1 file changed, 12 deletions(-) commit 04c848d398797a626608ff48804d809ae6687163 Author: Thomas Gleixner Date: Wed May 31 11:58:33 2017 +0200 genirq: Warn when IRQ_NOAUTOEN is used with shared interrupts Shared interrupts do not go well with disabling auto enable: 1) The sharing interrupt might request it while it's still disabled and then wait for interrupts forever. 2) The interrupt might have been requested by the driver sharing the line before IRQ_NOAUTOEN has been set. So the driver which expects that disabled state after calling request_irq() will not get what it wants. Even worse, when it calls enable_irq() later, it will trigger the unbalanced enable_irq() warning. Reported-by: Brian Norris Signed-off-by: Thomas Gleixner Cc: dianders@chromium.org Cc: jeffy Cc: Marc Zyngier Cc: tfiga@chromium.org Link: http://lkml.kernel.org/r/20170531100212.210682135@linutronix.de kernel/irq/chip.c | 7 +++++++ kernel/irq/manage.c | 12 ++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit 201d7f47f34bd7cb19161d0426f13b141e381f30 Author: Thomas Gleixner Date: Wed May 31 11:58:32 2017 +0200 genirq: Handle NOAUTOEN interrupt setup proper If an interrupt is marked NOAUTOEN then request_irq() installs the action, but does not enable the interrupt via startup_irq(). The interrupt is enabled via enable_irq() later from the driver. enable_irq() calls irq_enable(). That means that for interrupts which have a irq_startup() callback this callback is never invoked. Neither is irq_domain_activate_irq() invoked for such interrupts. If an interrupt depends on irq_startup() or irq_domain_activate_irq() then the enable via irq_enable() is not enough. Add a status flag IRQD_IRQ_STARTED_UP and use this to select the proper mechanism in enable_irq(). Use the flag also to avoid pointless calls into the low level functions. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: dianders@chromium.org Cc: jeffy Cc: Brian Norris Cc: tfiga@chromium.org Link: http://lkml.kernel.org/r/20170531100212.130986205@linutronix.de include/linux/irq.h | 6 +++++ kernel/irq/chip.c | 76 +++++++++++++++++++++++++++++++++++++---------------- kernel/irq/manage.c | 12 ++++++--- 3 files changed, 69 insertions(+), 25 deletions(-) commit 0710f9a637ef209e53c8127cf588a46130fcdcc5 Author: Christoffer Dall Date: Sun Jun 4 13:23:52 2017 +0200 KVM: arm/arm64: Use uaccess functions for GICv3 {sc}active We recently rewrote the sactive and cactive handlers to take the kvm lock for guest accesses to these registers. However, when accessed from userspace this lock is already held. Unfortunately we forgot to change the private accessors for GICv3, because these are redistributor registers and not distributor registers. Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-mmio-v3.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 1d80d1bd176ac7e9414d49096bfb3da2c929ee8a Author: Colin Ian King Date: Sun Jun 4 00:31:42 2017 +0100 staging: ccree: fix spelling mistake: "chanined" -> "chained" Trivial fix to spelling mistake in SSI_LOG_ERR message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54f6f4deed7344da7463d4d79872f9e2efb2daa8 Author: Colin Ian King Date: Sat Jun 3 23:44:41 2017 +0100 staging: rtl8723bs: fix another spelling mistake I found one more spelling mistake in a DBG_8192C debug message, replace "avaliable" with "available", add some spacing between text and a number and split overly long line Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 66cd04714bfde78788543b45a6c474462c776f07 Author: Konrad Malkowski Date: Fri Jun 2 22:40:33 2017 -0400 staging: rtl8192e: all lines in dot11d.h are less than 80 chars long This patch fixes the checkpoint.pl warning: WARNING: line over 80 characters Signed-off-by: Konrad Malkowski Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/dot11d.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3137139a65822f331d4cce195da1440c1dc0a071 Author: edcarter Date: Fri Jun 2 18:18:24 2017 -0700 Staging: comedi: s626.c: fixed trailing */ style issue Fixed coding style issue where trailing */ in block comments were not on separate lines. Signed-off-by: Elias Carter Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b52fb1407269a2cbf94b29cb8003512b4f118dfe Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:39 2017 +0300 staging: ccree: remove descriptor context definitions Remove definitions of descriptor context which are not used in the driver. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_crypto_ctx.h | 86 ----------------------------------- 1 file changed, 86 deletions(-) commit da38a83ba7fffe34b8886f025aa9938479220dcd Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:38 2017 +0300 staging: ccree: remove last remnants of sblkcipher The cipher code had some left overs of an attempt to support synch. cipher API with the HW. Remove the code handling this. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.c | 102 +++---------------------------------- drivers/staging/ccree/ssi_driver.h | 1 - 2 files changed, 6 insertions(+), 97 deletions(-) commit d3eff5722c5c2f550b24fd61ec173f038fcee447 Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:37 2017 +0300 staging: ccree: remove last remnants of sash algo The hash code had some left overs from a misguided attempt to support shash API with the HW. Remove the code handling this. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_hash.c | 448 +++++++++++---------------------------- 1 file changed, 127 insertions(+), 321 deletions(-) commit 087fabd1cd5f046b9b461a356465806077340db2 Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:36 2017 +0300 staging: ccree: fix wrong whitespace usage Some of the register definition files had none kernel coding style usage of tabs vs. spaces in macro definitions. This patch fixes them. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/dx_crys_kernel.h | 308 ++++++++++++++++----------------- drivers/staging/ccree/dx_host.h | 256 +++++++++++++-------------- 2 files changed, 282 insertions(+), 282 deletions(-) commit ee15d1694623f7c0398e3c06bd2b452eba8a0d05 Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:35 2017 +0300 staging: ccree: remove spurious blank line Remove spurious blank line from cc_regs.h Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_regs.h | 1 - 1 file changed, 1 deletion(-) commit 1c0cccd9aa33595849ce0e944be1d44e603e4e95 Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:34 2017 +0300 staging: ccree: remove dead code Remove some unused macro definitions from hash definitions. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/hash_defs.h | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) commit ef78342266fef6bbb07587be2b0c70e5cdad2519 Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:33 2017 +0300 staging: ccree: drop no longer used macro MSB64 macro is no longer used or needed. Drop it. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_hw_queue_defs.h | 2 -- 1 file changed, 2 deletions(-) commit 84d69a7b03ea00864fff34ee3c95ee7ab679f26e Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:32 2017 +0300 staging: ccree: use snake_case for hash enums Hash enum were named using CamelCase, move over to snake_case. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_hw_queue_defs.h | 4 ++-- drivers/staging/ccree/hash_defs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit c928f1d7cb691584184fcb408b61ad9ed600130f Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:31 2017 +0300 staging: ccree: remove unused struct struct SepHashPrivateContext is not used anywhere in the code. Remove it. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/hash_defs.h | 18 ------------------ 1 file changed, 18 deletions(-) commit ed7443911ec1584b182304117f1f0b0adfa02079 Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:30 2017 +0300 staging: ccree: remove custom bitfield macros With all users removed or re-factored to use the standard kernel bit fields ops we can now drop the custom bit field macros. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_bitops.h | 39 ------------------ drivers/staging/ccree/cc_hw_queue_defs.h | 2 +- drivers/staging/ccree/cc_lli_defs.h | 2 - drivers/staging/ccree/cc_regs.h | 71 +++----------------------------- drivers/staging/ccree/ssi_driver.h | 1 - 5 files changed, 7 insertions(+), 108 deletions(-) commit 37a99c98313fc506d42109d6b70a63e8ac1136bc Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:29 2017 +0300 staging: ccree: move request_mgr to generic bitfield ops request_mgr was using custom bit field macros. move over to standard kernel bitfield ops. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_regs.h | 5 +++++ drivers/staging/ccree/ssi_request_mgr.c | 27 +++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) commit 7f821f0c6ffa877278f9432df4905ddd30ee7e07 Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:28 2017 +0300 staging: ccree: remove cycle count debug support The ccree driver had support for rough performance debugging via cycle counting which has bit rotted and can easily be replcaed with perf. Remove it from the driver. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_hw_queue_defs.h | 14 ---- drivers/staging/ccree/ssi_aead.c | 33 --------- drivers/staging/ccree/ssi_cipher.c | 20 ------ drivers/staging/ccree/ssi_config.h | 6 -- drivers/staging/ccree/ssi_driver.c | 8 --- drivers/staging/ccree/ssi_driver.h | 25 ------- drivers/staging/ccree/ssi_hash.c | 28 -------- drivers/staging/ccree/ssi_request_mgr.c | 116 ------------------------------- 8 files changed, 250 deletions(-) commit 841d1d806cea997d4388cc6a18057d2d7d5f4d0e Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:27 2017 +0300 staging: ccree: remove unused debug macros The DUMP_SGL() and DUMP_MLLI_TABLE() debug macros were defined but not used anywhere and the difference of their definitions for debug vs. none debug indicated this has not being used in a while. Remove the dead code. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 19 ------------------- 1 file changed, 19 deletions(-) commit b9532954214491354a07c6408c6275f09fe9775a Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:26 2017 +0300 staging: ccree: move M/LLI defines to header file A bunch of macros used to define M/LLI descriptors where being defined in the C file. Move them over to private include file where other relevant definitions are stored. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_lli_defs.h | 8 ++++++++ drivers/staging/ccree/ssi_buffer_mgr.c | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) commit c6f7f2f4591f63ec0eba903fceb242af3af5d12c Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:25 2017 +0300 staging: ccree: refactor LLI access macros The Linked List Item descriptors were being programmed via a set of macros which suffer a few problems: - Use of macros rather than inline leaves out parameter type checking and risks multiple macro parameter evaluation side effects. - Implemented via hand rolled versions of bitfield operations. This patch refactors LLI programming into a set of of inline functions using generic kernel bitfield access infrastructure, thus resolving the above issues and opening the way later on to drop the hand rolled bitfield macros once additional users are dropped in later patches in the series. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_lli_defs.h | 39 ++++++++++++++++++---------------- drivers/staging/ccree/ssi_buffer_mgr.c | 8 +++---- 2 files changed, 25 insertions(+), 22 deletions(-) commit 13ddf621568c5f9d2467fd46f8a0b11c6d5616f4 Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:24 2017 +0300 staging: ccree: remove 48 bit dma addr sim Remove no longer needed code used to simulate 48 bit dma addresses on 32 bit platforms for development purposes. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 19 -------- drivers/staging/ccree/ssi_buffer_mgr.c | 83 --------------------------------- drivers/staging/ccree/ssi_buffer_mgr.h | 16 ------- drivers/staging/ccree/ssi_cipher.c | 4 -- drivers/staging/ccree/ssi_hash.c | 35 -------------- drivers/staging/ccree/ssi_ivgen.c | 3 -- drivers/staging/ccree/ssi_request_mgr.c | 3 -- 7 files changed, 163 deletions(-) commit 8b64e512dea15c6af39e83ebc01f774e2541632a Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:23 2017 +0300 staging: ccree: refactor HW command FIFO access The programming of the HW command FIFO in ccree was done via a set of macros which suffer a few problems: - Use of macros rather than inline leaves out parameter type checking and risks multiple macro parameter evaluation side effects. - Implemented via hand rolled versions of bitfield operations. This patch refactors the HW command queue access into a set of inline functions using generic kernel bitfield access infrastructure, thus resolving the above issues and opening the way later on to drop the hand rolled bitfield macros once additional users are dropped in later patches in the series. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_bitops.h | 8 +- drivers/staging/ccree/cc_hw_queue_defs.h | 644 ++++++++++++---------- drivers/staging/ccree/ssi_aead.c | 901 +++++++++++++++---------------- drivers/staging/ccree/ssi_cipher.c | 224 ++++---- drivers/staging/ccree/ssi_driver.h | 4 +- drivers/staging/ccree/ssi_fips_ll.c | 704 ++++++++++++------------ drivers/staging/ccree/ssi_hash.c | 832 ++++++++++++++-------------- drivers/staging/ccree/ssi_ivgen.c | 77 ++- drivers/staging/ccree/ssi_request_mgr.c | 23 +- drivers/staging/ccree/ssi_sram_mgr.c | 8 +- 10 files changed, 1745 insertions(+), 1680 deletions(-) commit 6562e7db139f48d41d15fd2c3afb06017d6d8f97 Author: Gilad Ben-Yossef Date: Sun Jun 4 11:02:22 2017 +0300 staging: ccree: replace bit shift with BIT macro CC_CTX_SIZE was being defined using a hand rolled bit shift operation. Replace with use of BIT macro. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_crypto_ctx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37de44f238d37c96ab1fec8c88b6d207f5b85635 Author: Fabio Estevam Date: Sat May 27 10:17:52 2017 -0300 ARM: dts: imx7: Fix typo in watchdog pin name Change "WDOD1" to "WDOG1" in watchdog pin names. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-nitrogen7.dts | 2 +- arch/arm/boot/dts/imx7d-pico.dts | 2 +- arch/arm/boot/dts/imx7d-pinfunc.h | 6 +++--- arch/arm/boot/dts/imx7d-sdb.dts | 2 +- arch/arm/boot/dts/imx7s-warp.dts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit 7e9eb6268809cace1601bb4f0603412355cf9dde Author: Leonard Crestez Date: Fri May 26 14:26:06 2017 +0300 ARM: imx_v6_v7_defconfig: Explicitly restore CONFIG_DEBUG_FS This option was removed by "make savedefconfig" in commit c5054a98bce4 ("ARM: imx_v6_v7_defconfig: Select SMSC_PHY") This happened because CONFIG_DEBUG_FS was implicitly selected by CONFIG_TREE_RCU_TRACE which defaulted to true because CONFIG_RCU_TRACE was enabled by default by commit 961518259b3b ("rcu: Enable RCU tracepoints by default to aid in debugging") Recently however CONFIG_RCU_TRACE was completely removed by commit 6e74c237c410 ("rcu: Remove debugfs tracing") The result is that imx_v6_v7_defconfig no longer includes DEBUG_FS on linux-next since next-20170517. This is bad, DEBUG_FS is extremely useful for kernel introspection and testing. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 5d4be5f2b1f1919ffbf1ca5c9c014692848bafd1 Author: Andy Lutomirski Date: Wed Feb 17 12:43:06 2016 -0800 platform/x86: dell-rbtn: Improve explanation about DELLABC6 According to Mario at Dell, the DELLABC6 device should not be used on a Linux system. It also conflicts with Intel-HID and its interactions with Network Manager. Document that we are aware of the device, but that we are intentionally ignoring it. Signed-off-by: Andy Lutomirski [dvhart: New commit message and minor comment wording fixes] Cc: Mario Limonciello Cc: "Pali Rohár" Reviewed-by: Andy Shevchenko Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-rbtn.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit e4f2e3f0ea13cf3424c0f23d01424c68a428333b Author: Andy Lutomirski Date: Wed Feb 17 12:38:07 2016 -0800 platform/x86: dell-wmi: Add a better description for "stealth mode" This is based on Mario's explanation and observation of my laptop. Suggested-by: "Pali Rohár" Signed-off-by: Andy Lutomirski Cc: Mario Limonciello Cc: Matthew Garrett Reviewed-by: Andy Shevchenko Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 074df51ca84d321f4d259b097d80ebca6a3ee9fe Author: Andy Lutomirski Date: Wed Feb 17 12:34:34 2016 -0800 platform/x86: dell-wmi: Add a comment explaining the 0xb2 magic number The hotkey table is 0xb2, add a comment for clarity. Suggested-by: Darren Hart Signed-off-by: Andy Lutomirski Cc: Matthew Garrett Reviewed-by: Pali Rohár Reviewed-by: Andy Shevchenko Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi.c | 1 + 1 file changed, 1 insertion(+) commit d659d11ad37b2bfa8192fdf0ca2850eba955fee5 Author: Michał Kępień Date: Fri May 19 09:44:48 2017 +0200 platform/x86: fujitsu-laptop: use device-specific data in remaining module code To avoid using module-wide data in remaining module code, employ acpi_driver_data() and dev_get_drvdata() to fetch device-specific data to work on in each function. This makes the input local variables in hotkey-related callbacks and the module-wide struct fujitsu_laptop redundant, so remove them. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 123 ++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 59 deletions(-) commit a823f8e757a90ff5697fd9346c2dd0ede0083e89 Author: Michał Kępień Date: Fri May 19 09:44:47 2017 +0200 platform/x86: fujitsu-laptop: use device-specific data in LED-related code In order to perform their duties, all LED callbacks need a pointer to the struct acpi_device representing the FUJ02E3 ACPI device. To limit the use of the module-wide pointer, the same pointer should be extracted from data that gets passed to LED callbacks as arguments. However, LED core does not currently support supplying driver-specific pointers to struct led_classdev callbacks, so the latter have to be implemented a bit differently than backlight device callbacks and platform device attribute callbacks. As the FUJ02E3 ACPI device is the parent device of all LED class devices registered by fujitsu-laptop, struct acpi_device representing the former can be extracted by following the parent link present inside the struct device belonging to the struct led_classdev passed as an argument to each LED callback. To get rid of module-wide structures defining LED class devices, allocate them dynamically using devm_kzalloc() and initialize them in acpi_fujitsu_laptop_leds_register(). Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 102 +++++++++++++++++----------------- 1 file changed, 52 insertions(+), 50 deletions(-) commit 84631e0c8b90411b424682eec4084006fae3f2cc Author: Michał Kępień Date: Fri May 19 09:44:46 2017 +0200 platform/x86: fujitsu-laptop: explicitly pass ACPI device to call_fext_func() Prepare for not using module-wide data in call_fext_func() by explicitly passing it a pointer to struct acpi_device while still using a module-wide pointer in each call. Doing this enables call_fext_func() to fetch the ACPI handle from its argument, making the acpi_handle field of struct fujitsu_laptop useless, so remove that field. While we are at it, the dev field of the same structure is assigned in acpi_fujitsu_laptop_add() but not used for anything, so remove it as well. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 81 ++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 39 deletions(-) commit ca0d9eab0fb5b92c94de049241d639c2db66c3a6 Author: Michał Kępień Date: Fri May 19 09:44:45 2017 +0200 platform/x86: fujitsu-laptop: track the last instantiated FUJ02E3 ACPI device fujitsu-laptop registers two ACPI drivers: one for ACPI device FUJ02B1 enabling backlight control and another for ACPI device FUJ02E3 which handles various other stuff (hotkeys, LEDs, etc.) In a perfect world, private data used by each of these drivers would be neatly encapsulated in a structure specific to a given driver instance. Sadly, firmware present on some Fujitsu laptops makes that impossible by exposing backlight power control (which is what the FUJ02B1 ACPI device should take care of) through the FUJ02E3 ACPI device. This means the backlight driver needs a way to access an ACPI device it is not bound to. When the backlight driver is extracted into a separate module, it will not be able to rely on a module-wide variable any more and such access will happen through an API exposed by fujitsu-laptop. For all known firmwares out in the wild, it seems that whenever the FUJ02B1 ACPI device is present, it is always accompanied by a single instance of the FUJ02E3 ACPI device. We could independently grab an ACPI handle to the FUJ02E3 ACPI device from the backlight driver, but that would require using a hardcoded absolute path to that ACPI device, which is subject to change. It is easier to simply store a module-wide pointer to the last (most likely only) FUJ02E3 ACPI device found, make the aforementioned API use it and cover our bases by warning the user if firmware exposes multiple FUJ02E3 ACPI devices. Introducing this pointer in advance allows us to get rid of the acpi_handle field of struct fujitsu_bl and also enables a bit more step-by-step migration to a device-specific implementation of call_fext_func(). Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 4 ++++ 1 file changed, 4 insertions(+) commit a4b176ea9ab8b10d976dde61972ac884f888ba56 Author: Michał Kępień Date: Fri May 19 09:44:44 2017 +0200 platform/x86: fujitsu-laptop: allocate fujitsu_laptop in acpi_fujitsu_laptop_add() Only allocate memory for struct fujitsu_laptop when the FUJ02E3 ACPI device is present. Use devm_kzalloc() for allocating memory to simplify cleanup. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit f2db7c646b716160dbb8832c24d47a35e9ac299a Author: Michał Kępień Date: Fri May 19 09:44:43 2017 +0200 platform/x86: fujitsu-laptop: use device-specific data in backlight code To prevent using module-wide data in backlight-related code, employ acpi_driver_data() and bl_get_data() where possible to fetch device-specific data to work on in each function. This makes the input local variable in acpi_fujitsu_bl_notify() and the acpi_handle field of struct fujitsu_bl redundant, so remove them. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 75 ++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 37 deletions(-) commit 679374e49c6f6691f5b19751b3a2e36cba0c4a4d Author: Michał Kępień Date: Fri May 19 09:44:42 2017 +0200 platform/x86: fujitsu-laptop: allocate fujitsu_bl in acpi_fujitsu_bl_add() Only allocate memory for struct fujitsu_bl when the FUJ02B1 ACPI device is present. Use devm_kzalloc() for allocating memory to simplify cleanup. Due to the fact that the power property of the backlight device created by the backlight driver is accessed from acpi_fujitsu_laptop_add(), pointer to the allocated memory will remain stored in a module-wide variable until the backlight driver is extracted into a separate module. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 7ec3b54d162f5f1794a153e038b3940497579599 Author: Michał Kępień Date: Fri May 19 09:44:41 2017 +0200 platform/x86: fujitsu-laptop: distinguish current uses of device-specific data In portions of the driver which use device-specific data, rename local variables from fujitsu_bl and fujitsu_laptop to priv in order to clearly distinguish these parts from code that uses module-wide data. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 46a269da7e8a1ab6510ea5c88b2732925e5efc79 Author: Lucas Stach Date: Thu May 18 18:36:14 2017 +0200 drm/etnaviv: restore ETNA_PREP_NOSYNC behaviour This reverts commit cd34db4a526c (drm/etnaviv: Remove manual call to reservation_object_test_signaled_rcu before wait), as the patch to turn reservation_object_wait_timeout_rcu() into reservation_object_test_signaled_rcu() with a 0 timeout has been reverted. This causes the driver to call into the fence wait, even with a timeout of 0 The etnaviv BO cache depends on ETNA_PREP_NOSYNC to be wait-free, even if the BO has attached fences, so restore the behaviour for this flag. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 73726380a26fa1ed490f30fccee10ed9da28dc0c Author: Philipp Zabel Date: Sun May 14 21:51:16 2017 +0200 mux: mmio-based syscon mux controller This adds a driver for mmio-based syscon multiplexers controlled by bitfields in a syscon register range. Signed-off-by: Philipp Zabel Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/mux/Kconfig | 13 +++++ drivers/mux/Makefile | 1 + drivers/mux/mux-mmio.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+) commit 5dc75a2d93d52617d50d72f8c056eb3b8f80ba62 Author: Philipp Zabel Date: Sun May 14 21:51:15 2017 +0200 dt-bindings: add mmio-based syscon mux controller DT bindings This adds device tree binding documentation for mmio-based syscon multiplexers controlled by a bitfields in a syscon register range. Signed-off-by: Philipp Zabel Acked-by: Rob Herring Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/mux/mmio-mux.txt | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit afda08c4caa9489511557def51e322a5f2142a2f Author: Peter Rosin Date: Sun May 14 21:51:14 2017 +0200 mux: adg792a: add mux controller driver for ADG792A/G Analog Devices ADG792A/G is a triple 4:1 mux. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/mux/Kconfig | 12 ++++ drivers/mux/Makefile | 1 + drivers/mux/mux-adg792a.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 170 insertions(+) commit f6689802eb7466c4a51b1ee8af021668a1b4fb13 Author: Peter Rosin Date: Sun May 14 21:51:13 2017 +0200 dt-bindings: mux-adg792a: document devicetree bindings for ADG792A/G mux Analog Devices ADG792A/G is a triple 4:1 mux. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/mux/adi,adg792a.txt | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit ac8498f0ce5301c51c32607af5a318a7e05f45c5 Author: Peter Rosin Date: Sun May 14 21:51:12 2017 +0200 i2c: i2c-mux-gpmux: new driver This is a general purpose i2c mux that uses a multiplexer controlled by the multiplexer subsystem to do the muxing. The user can select if the mux is to be mux-locked and parent-locked as described in Documentation/i2c/i2c-topology. Acked-by: Jonathan Cameron Acked-by: Wolfram Sang Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/i2c/muxes/Kconfig | 13 +++ drivers/i2c/muxes/Makefile | 1 + drivers/i2c/muxes/i2c-mux-gpmux.c | 173 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+) commit 1821355188f14430fdcc75f6f6062c7cbae9e719 Author: Peter Rosin Date: Sun May 14 21:51:11 2017 +0200 dt-bindings: i2c: i2c-mux: document general purpose i2c-mux bindings Describe how a general purpose multiplexer controller is used to mux an i2c bus. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit 7ba9df54b09117c0a062f9eac4a36b0e70893387 Author: Peter Rosin Date: Sun May 14 21:51:10 2017 +0200 iio: multiplexer: new iio category and iio-mux driver When a multiplexer changes how an iio device behaves (for example by feeding different signals to an ADC), this driver can be used to create one virtual iio channel for each multiplexer state. Depends on the generic multiplexer subsystem. Cache any ext_info values from the parent iio channel, creating a private copy of the ext_info attributes for each multiplexer state/channel. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio/multiplexer/Kconfig | 18 ++ drivers/iio/multiplexer/Makefile | 6 + drivers/iio/multiplexer/iio-mux.c | 459 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 486 insertions(+) commit a36954f58f6c01cb8b19c6424b549464c9495e72 Author: Peter Rosin Date: Sun May 14 21:51:09 2017 +0200 dt-bindings: iio: io-channel-mux: document io-channel-mux bindings Describe how a multiplexer can be used to select which signal is fed to an io-channel. Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman .../bindings/iio/multiplexer/io-channel-mux.txt | 39 ++++++++++++++++++++++ MAINTAINERS | 6 ++++ 2 files changed, 45 insertions(+) commit 8a848e754956dcbc35cd2fcf417f66dafa020c9e Author: Peter Rosin Date: Sun May 14 21:51:08 2017 +0200 iio: inkern: api for manipulating ext_info of iio channels Extend the inkern api with functions for reading and writing ext_info of iio channels. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/iio/inkern.c | 60 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/iio/consumer.h | 37 +++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) commit 2c089f08e0de2a784106272c6454ce389fe12376 Author: Peter Rosin Date: Sun May 14 21:51:07 2017 +0200 mux: gpio: add mux controller driver for gpio based multiplexers The driver builds a single multiplexer controller using a number of gpio pins. For N pins, there will be 2^N possible multiplexer states. The GPIO pins can be connected (by the hardware) to several multiplexers, which in that case will be operated in parallel. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin Reviewed-by: Philipp Zabel Signed-off-by: Greg Kroah-Hartman drivers/mux/Kconfig | 18 ++++++++ drivers/mux/Makefile | 1 + drivers/mux/mux-gpio.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) commit a3b02a9c6591ce154cd44e2383406390a45b530c Author: Peter Rosin Date: Sun May 14 21:51:06 2017 +0200 mux: minimal mux subsystem Add a new minimalistic subsystem that handles multiplexer controllers. When multiplexers are used in various places in the kernel, and the same multiplexer controller can be used for several independent things, there should be one place to implement support for said multiplexer controller. A single multiplexer controller can also be used to control several parallel multiplexers, that are in turn used by different subsystems in the kernel, leading to a need to coordinate multiplexer accesses. The multiplexer subsystem handles this coordination. Thanks go out to Lars-Peter Clausen, Jonathan Cameron, Rob Herring, Wolfram Sang, Paul Gortmaker, Dan Carpenter, Colin Ian King, Greg Kroah-Hartman and last but certainly not least to Philipp Zabel for helpful comments, reviews, patches and general encouragement! Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin Reviewed-by: Philipp Zabel Tested-by: Philipp Zabel Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-mux | 16 + Documentation/driver-model/devres.txt | 5 + MAINTAINERS | 3 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/mux/Kconfig | 16 + drivers/mux/Makefile | 5 + drivers/mux/mux-core.c | 547 ++++++++++++++++++++++++++++++ include/linux/mux/consumer.h | 32 ++ include/linux/mux/driver.h | 108 ++++++ 10 files changed, 735 insertions(+) commit 256ac0375098e50d59c415fcbb561f2927fa8780 Author: Peter Rosin Date: Sun May 14 21:51:05 2017 +0200 dt-bindings: document devicetree bindings for mux-controllers and gpio-mux Allow specifying that a single multiplexer controller can be used to control several parallel multiplexers, thus enabling sharing of the multiplexer controller by different consumers. Add a binding for a first mux controller in the form of a GPIO based mux controller. Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/mux/gpio-mux.txt | 69 +++++++++ .../devicetree/bindings/mux/mux-controller.txt | 157 +++++++++++++++++++++ MAINTAINERS | 6 + include/dt-bindings/mux/mux.h | 16 +++ 4 files changed, 248 insertions(+) commit b594b10144f631130110b424d9d5e4f152f14e0c Author: Peter Rosin Date: Sun May 14 21:51:04 2017 +0200 devres: trivial whitespace fix Everything else is indented with two spaces, so fix the odd one out. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06a45a93e7d34aab34522cc49479e1caecf3298c Author: Luis R. Rodriguez Date: Tue May 2 01:31:07 2017 -0700 firmware: move umh try locks into the umh code This moves the usermode helper locks into only code paths that use the usermode helper API from the kernel. The usermode helper locks were originally added to prevent stalling suspend, later the firmware cache was added to help with this, and further later direct filesystem lookup was added by Linus to completely bypass udev due to the amount of issues the umh approach had. The usermode helper locks were kept even when the direct filesystem lookup mechanism is used though. A lot has changed since the original usermode helper locks were added but the recent commit which added the code for firmware_enabled() are intended to address any possible races cured only as collateral by using the locks as though side consequence of code evolution and this not being addressed any time sooner. With the firmware_enabled() code in place we are a bit more sure to move the usermode helper locks to UMH only code. There is a bit of history here so let's recap a bit of it to ensure nothing is lost and things are clear. The direct filesystem approach to loading firmware is rather new, it was added via commit abb139e75c2cdb ("firmware: teach the kernel to load firmware files directly from the filesystem") by Linus merged on the v3.7 release, to enable to bypass udev. usermodehelper_read_lock_wait() was added earlier via commit 9b78c1da60b3c ("firmware_class: Do not warn that system is not ready from async loads") merged on v3.4, after Rafael noted that the async firmware API call request_firmware_nowait() should not be penalized to fail if userspace is not available yet or frozen, it'd allow for a timeout grace period before giving up. The WARN_ON() was kept for the sync firmware API call though on request_firmware(). At this time there was no direct filesystem lookup for firmware though. The original usermode helper lock came from commit a144c6a6c924a ("PM: Print a warning if firmware is requested when tasks are frozen") merged on the v3.0 kernel by Rafael to print a warning back when firmware requests were used on resume(), thaw() or restore() callbacks and there was no direct fs lookups or the firmware cache. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_class.c | 68 +++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 32 deletions(-) commit 8509adcaa9286636ef8ec874ed9ffd9717afe545 Author: Luis R. Rodriguez Date: Tue May 2 01:31:06 2017 -0700 firmware: move assign_firmware_buf() further up This will make subsequent changes easier to read. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_class.c | 77 +++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 39 deletions(-) commit 81f95076281fdd3bc382e004ba1bce8e82fccbce Author: Luis R. Rodriguez Date: Tue May 2 01:31:05 2017 -0700 firmware: add sanity check on shutdown/suspend The firmware API should not be used after we go to suspend and after we reboot/halt. The suspend/resume case is a bit complex, so this documents that so things are clearer. We want to know about users of the API in incorrect places so that their callers are corrected, so this also adds a warn for those cases. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman .../driver-api/firmware/request_firmware.rst | 11 +++ drivers/base/firmware_class.c | 99 ++++++++++++++++++++++ 2 files changed, 110 insertions(+) commit a669f04ab4b4d7e5a7ac8250f0b688a07e10b04c Author: Luis R. Rodriguez Date: Tue May 2 01:31:04 2017 -0700 firmware: always enable the reboot notifier Now that we've have proper wrappers for the fallback mechanism we can easily share the reboot notifier for the firmware_class at all times. This change will make subsequent modifications to the reboot notifier easier to review. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_class.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit c4b768934be613fb882e4e4090946218d76c8e1b Author: Luis R. Rodriguez Date: Tue May 2 01:31:03 2017 -0700 firmware: share fw fallback killing on reboot/suspend We kill pending fallback requests on suspend and reboot, the only difference is that on suspend we only kill custom fallback requests. Provide a wrapper that lets us customize the request with a flag. This also lets us simplify the #ifdef'ery over the calls. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_class.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 6383331d8f390da68e5cb3e9184b5c99429c4545 Author: Luis R. Rodriguez Date: Tue May 2 01:31:02 2017 -0700 firmware: move kill_requests_without_uevent() up above This routine will used in functions declared earlier next. This code shift has no functional changes, it will make subsequent changes easier to read. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_class.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 9f4f9ae81d0affc182f54dd00285ddb90e0b3ae1 Author: Robert Lippert Date: Fri Jun 2 14:53:22 2017 -0700 drivers/misc: add Aspeed LPC snoop driver This driver enables the LPC snoop hardware on the ASPEED BMC which generates an interrupt upon every write to an I/O port by the host. This is typically used to monitor BIOS boot progress by listening to well-known debug port 80h. The functionality in this commit just saves all snooped values to a circular 2K buffer in the kernel, subsequent commits can act on the values to do things with them. Signed-off-by: Robert Lippert Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 8 ++ drivers/misc/Makefile | 1 + drivers/misc/aspeed-lpc-snoop.c | 261 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 270 insertions(+) commit 4ca4f26a9c66103ca158689b7554f07f4968a32c Author: Juri Lelli Date: Wed May 31 17:59:31 2017 +0100 arm,arm64,drivers: add a prefix to drivers arch_topology interfaces Now that some functions that deal with arch topology information live under drivers, there is a clash of naming that might create confusion. Tidy things up by creating a topology namespace for interfaces used by arch code; achieve this by prepending a 'topology_' prefix to driver interfaces. Signed-off-by: Juri Lelli Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Greg Kroah-Hartman arch/arm/kernel/topology.c | 8 ++++---- arch/arm64/kernel/topology.c | 4 ++-- drivers/base/arch_topology.c | 20 ++++++++++---------- include/linux/arch_topology.h | 8 ++++---- 4 files changed, 20 insertions(+), 20 deletions(-) commit 615ffd63149117aa5693d6672944966b490cdb66 Author: Juri Lelli Date: Wed May 31 17:59:30 2017 +0100 arm,arm64,drivers: move externs in a new header file Create a new header file (include/linux/arch_topology.h) and put there declarations of interfaces used by arm, arm64 and drivers code. Signed-off-by: Juri Lelli Acked-by: Russell King Acked-by: Catalin Marinas Acked-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman arch/arm/kernel/topology.c | 7 +------ arch/arm64/kernel/topology.c | 4 +--- drivers/base/arch_topology.c | 1 + include/linux/arch_topology.h | 17 +++++++++++++++++ 4 files changed, 20 insertions(+), 9 deletions(-) commit c105aa31183a6ebec395681b6df47c8b65259322 Author: Juri Lelli Date: Wed May 31 17:59:29 2017 +0100 arm,arm64,drivers: reduce scope of cap_parsing_failed Reduce the scope of cap_parsing_failed (making it static in drivers/base/arch_topology.c) by slightly changing {arm,arm64} DT parsing code. For arm checking for !cap_parsing_failed before calling normalize_ cpu_capacity() is superfluous, as returning an error from parse_ cpu_capacity() (above) means cap_from _dt is set to false. For arm64 we can simply check if raw_capacity points to something, which is not if capacity parsing has failed. Suggested-by: Morten Rasmussen Signed-off-by: Juri Lelli Acked-by: Russell King Acked-by: Catalin Marinas Acked-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman arch/arm/kernel/topology.c | 3 +-- arch/arm64/kernel/topology.c | 5 +---- drivers/base/arch_topology.c | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) commit 2ef7a2953c81ee6b341e3ffb33570adc894cf4a5 Author: Juri Lelli Date: Wed May 31 17:59:28 2017 +0100 arm, arm64: factorize common cpu capacity default code arm and arm64 share lot of code relative to parsing CPU capacity information from DT, using that information for appropriate scaling and exposing a sysfs interface for chaging such values at runtime. Factorize such code in a common place (driver/base/arch_topology.c) in preparation for further additions. Suggested-by: Will Deacon Suggested-by: Mark Rutland Suggested-by: Catalin Marinas Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Greg Kroah-Hartman Signed-off-by: Juri Lelli Acked-by: Russell King Acked-by: Catalin Marinas Acked-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman arch/arm/Kconfig | 1 + arch/arm/kernel/topology.c | 213 ++----------------------------------- arch/arm64/Kconfig | 1 + arch/arm64/kernel/topology.c | 219 +-------------------------------------- drivers/base/Kconfig | 8 ++ drivers/base/Makefile | 1 + drivers/base/arch_topology.c | 242 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 262 insertions(+), 423 deletions(-) commit f70b281b59a871545362a494d99a644153fbbaac Author: Juri Lelli Date: Wed May 31 17:59:27 2017 +0100 arm: remove wrong CONFIG_PROC_SYSCTL ifdef The sysfs cpu_capacity entry for each CPU has nothing to do with PROC_FS, nor it's in /proc/sys path. Remove such ifdef. Cc: Russell King Reported-and-suggested-by: Sudeep Holla Fixes: 7e5930aaef5d ('ARM: 8622/3: add sysfs cpu_capacity attribute') Signed-off-by: Juri Lelli Acked-by: Russell King Signed-off-by: Greg Kroah-Hartman arch/arm/kernel/topology.c | 2 -- 1 file changed, 2 deletions(-) commit 95adb4e59263d3056d75eb385e79f9e037b5b7bc Author: Juri Lelli Date: Wed May 31 17:59:26 2017 +0100 arm: fix return value of parse_cpu_capacity parse_cpu_capacity() has to return 0 on failure, but it currently returns 1 instead if raw_capacity kcalloc failed. Fix it (by directly returning 0). Reported-by: Morten Rasmussen Fixes: 06073ee26775 ('ARM: 8621/3: parse cpu capacity-dmips-mhz from DT') Signed-off-by: Juri Lelli Acked-by: Russell King Acked-by: Vincent Guittot Signed-off-by: Greg Kroah-Hartman arch/arm/kernel/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa081d15a2cc7ca12ff2932df74b4ee3de4a0a45 Author: Juri Lelli Date: Wed May 31 17:59:25 2017 +0100 Documentation: arm: fix wrong reference number in DT definition Reference to cpu capacity binding has a wrong number. Fix it. Reported-by: Lorenzo Pieralisi Signed-off-by: Juri Lelli Acked-by: Rob Herring Acked-by: Russell King Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/arm/cpus.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 761d031ec95b09f4126748a4849b3dabe3c00427 Author: Arvind Yadav Date: Wed May 31 15:55:54 2017 +0530 memory: ti-aemif: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/memory/ti-aemif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 76b069b1cb201748c3a87474fb8ef02be2a01ba8 Author: Kiran Gunda Date: Wed May 10 19:55:41 2017 +0530 spmi: spmi-pmic-arb: enable the SPMI interrupt as a wakeup source Currently the SPMI interrupt will not wake the device. Enable this interrupt as a wakeup source. Signed-off-by: Nicholas Troast Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 1 + 1 file changed, 1 insertion(+) commit 319f68843db8005610a921942c9f539fdcf8017a Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:40 2017 +0530 spmi: pmic_arb: add support for PMIC bus arbiter v3 PMIC bus arbiter v3 supports 512 SPMI peripherals. Add the v3 operators to support this new arbiter version. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 133 +++++++++++++++++++++++++++---------------- 1 file changed, 83 insertions(+), 50 deletions(-) commit 472eaf8bedbbedc4df5f7007d1eceb4624a78afa Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:39 2017 +0530 spmi: pmic-arb: check apid enabled before calling the handler The driver currently invokes the apid handler (periph_handler()) once it sees that the summary status bit for that apid is set. However the hardware is designed to set that bit even if the apid interrupts are disabled. The driver should check whether the apid is indeed enabled before calling the apid handler. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 5f9b2ea3da8cf079e22cbb0fc2ed1b9034f7dd42 Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:38 2017 +0530 spmi: pmic_arb: use appropriate flow handler The current code uses handle_level_irq flow handler even if the trigger type of the interrupt is edge. This can lead to missing of an edge transition that happens when the interrupt is being handled. The level flow handler masks the interrupt while it is being handled, so if an edge transition happens at that time, that edge is lost. Use an edge flow handler for edge type interrupts which ensures that the interrupt stays enabled while being handled - at least until it triggers at which point the flow handler sets the IRQF_PENDING flag and only then masks the interrupt. That IRQF_PENDING state indicates an edge transition happened while the interrupt was being handled and the handler is called again. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit cee0fad772a22c5b309fed3f4c93dc84087059a6 Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:37 2017 +0530 spmi: pmic-arb: clear the latched status of the interrupt PMIC interrupts each have an internal latched status bit which is not visible from any register. This status bit is set as soon as the conditions specified in the interrupt type and polarity registers are met even if the interrupt is not enabled. When it is set, nothing else changes within the PMIC and no interrupt notification packets are sent. If the internal latched status bit is set when an interrupt is enabled, then the value is immediately propagated into the interrupt latched status register and an interrupt notification packet is sent out from the PMIC over SPMI. This PMIC hardware behavior can lead to a situation where the handler for a level triggered interrupt is called immediately after enable_irq() is called even though the interrupt physically triggered while it was disabled within the genirq framework. This situation takes place if the the interrupt fires twice after calling disable_irq(). The first time it fires, the level flow handler will mask and disregard it. Unfortunately, the second time it fires, the internal latched status bit is set within the PMIC and no further notification is received. When enable_irq() is called later, the interrupt is unmasked (enabled in the PMIC) which results in the PMIC immediately sending an interrupt notification packet out over SPMI. This breaks the semantics of level triggered interrupts within the genirq framework since they should be completely ignored while disabled. The PMIC internal latched status behavior also affects how interrupts are treated during suspend. While entering suspend, all interrupts not specified as wakeup mode are masked. Upon resume, these interrupts are unmasked. Thus if any of the non-wakeup PMIC interrupts fired while the system was suspended, then the PMIC will send interrupt notification packets out via SPMI as soon as they are unmasked during resume. This behavior violates genirq semantics as well since non-wakeup interrupts should be completely ignored during suspend. Modify the qpnpint_irq_unmask() function so that the interrupt latched status clear register is written immediately before the interrupt enable register. This clears the internal latched status bit of the interrupt so that it cannot trigger spuriously immediately upon being enabled. Also, while resuming an irq, an unmask could be called even if it was not previously masked. So, before writing these registers, check if the interrupt is already enabled within the PMIC. If it is, then no further register writes are required. This condition check ensures that a valid latched status register bit is not cleared until it is properly handled. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit f6dda8e2e8479f3a71c88d6a21fe98d0fa7e0e31 Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:36 2017 +0530 spmi: pmic-arb: fix missing interrupts irq_enable is called when the device resumes. Note that the irq_enable is called regardless of whether the interrupt was marked enabled/disabled in the descriptor or whether it was masked/unmasked at the controller while resuming. The current driver unconditionally clears the interrupt in its irq_enable callback. This is dangerous as any interrupts that happen right before the resume could be missed. Remove the irq_enable callback and use mask/unmask instead. Also remove struct pmic_arb_irq_spec as it serves no real purpose. It is used only in the translate function and the code is much cleaner without it. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) commit 6bc546e71e50b8dd49130033f066676504c29b0c Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:35 2017 +0530 spmi: pmic-arb: cleanup unrequested irqs We see a unmapped irqs trigger right around bootup. This could likely be because the bootloader exited leaving the interrupts in an unknown or unhandled state. Ack and mask the interrupt if one is found. A request_irq later will unmask it and also setup proper mapping structures. Also the current driver ensures that no read/write transaction is in progress while it makes changes to the interrupt regions. This is not necessary because read/writes over spmi and arbiter interrupt control are independent operations. Hence, remove the synchronized accesses to interrupt region. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 101 ++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 58 deletions(-) commit 7f1d4e58dabb2668dd89547619ae4138996a8e26 Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:34 2017 +0530 spmi: pmic-arb: optimize table lookups The current driver uses a mix of radix tree and a fwd lookup table to translate between apid and ppid. It is buggy and confusing. Instead simply use a radix tree for v1 hardware and use the forward lookup table for v2. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 144 ++++++++++++++++++++++++++----------------- 1 file changed, 88 insertions(+), 56 deletions(-) commit 1ef1ce4e9ddd6dedd80f64ef112a3bd87ab50530 Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:33 2017 +0530 spmi: pmic-arb: fix inconsistent use of apid and chan The driver currently uses "apid" and "chan" to mean apid. Remove the use of chan and use only apid. On a SPMI bus there is allocation to manage up to 4K peripherals. However, in practice only few peripherals are instantiated and only few among the instantiated ones actually interrupt. APID is CPU's way of keeping track of peripherals that could interrupt. There is a table that maps the 256 interrupting peripherals to a number between 0 and 255. This number is called APID. Information about that interrupting peripheral is stored in registers offset by its corresponding apid. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 68 ++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 34 deletions(-) commit 111a10bf3e53aeda5f14297a4c2dbacf3023de45 Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:32 2017 +0530 spmi: pmic-arb: rename spmi_pmic_arb_dev to spmi_pmic_arb Usually *_dev best used for structures that embed a struct device in them. spmi_pmic_arb_dev doesn't embed one. It is simply a driver data structure. Use an appropriate name for it. Also there are many places in the driver that left shift the bit to generate a bit mask. Replace it with the BIT() macro. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 164 +++++++++++++++++++++---------------------- 1 file changed, 82 insertions(+), 82 deletions(-) commit 57102ad79284facacc7a94879cf3e11452557da3 Author: Abhijeet Dharmapurikar Date: Wed May 10 19:55:31 2017 +0530 spmi: pmic_arb: block access of invalid read and writes The system crashes due to bad access when reading from an non configured peripheral and when writing to peripheral which is not owned by current ee. This patch verifies ownership to avoid crashing on write. For reads, since the forward mapping table, data_channel->ppid, is towards the end of the block, we use the core size to figure the max number of ppids supported. The table starts at an offset of 0x800 within the block, so size - 0x800 will give us the area used by the table. Since each table is 4 bytes long (core_size - 0x800) / 4 will gives us the number of data_channel supported. This new protection is functional on hw v2. Signed-off-by: Abhijeet Dharmapurikar Signed-off-by: Kiran Gunda Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 84 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) commit 1a3389ffc538a3a7b73335e84f33120a2f636f55 Author: Catalin Marinas Date: Thu May 25 17:26:47 2017 +0100 drivers: dma-mapping: Do not leave an invalid area->pages pointer in dma_common_contiguous_remap() The dma_common_pages_remap() function allocates a vm_struct object and initialises the pages pointer to value passed as argument. However, when this function is called dma_common_contiguous_remap(), the pages array is only temporarily allocated, being freed shortly after dma_common_contiguous_remap() returns. Architecture code checking the validity of an area->pages pointer would incorrectly dereference already freed pointers. This has been exposed by the arm64 commit 44176bb38fa4 ("arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU"). Fixes: 513510ddba96 ("common: dma-mapping: introduce common remapping functions") Cc: Greg Kroah-Hartman Reported-by: Andrzej Hajda Acked-by: Laura Abbott Reviewed-by: Robin Murphy Signed-off-by: Catalin Marinas Signed-off-by: Greg Kroah-Hartman drivers/base/dma-mapping.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 094094a9373fbea80ec00714eed5c24f6fd39ecf Author: Nava kishore Manne Date: Fri May 26 13:13:18 2017 +0200 serial: uartps: Fix kernel doc warnings This patch fixes the kernel doc warnings in the driver. Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 1 + 1 file changed, 1 insertion(+) commit e2860e1f62f2e87d268403a749ba1f19663ef19f Author: Joel Stanley Date: Mon May 29 19:27:52 2017 +0930 serial: 8250_of: Add reset support This adds the hooks for an optional reset controller in the 8250 device tree node. Signed-off-by: Joel Stanley Reviewed-by: Philipp Zabel Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/8250.txt | 1 + drivers/tty/serial/8250/8250_of.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 71e0779153968c79038a8ed53610d69624115fca Author: Sascha Hauer Date: Wed May 31 08:19:05 2017 +0200 tty: n_gsm: do not send/receive in ldisc close path gsm_cleanup_mux() is called in the line discipline close path which is called at tty_release() time. At this stage the tty is no longer operational enough to send any frames. Sending close frames is therefore not possible and waiting for their answers always times out. This patch removes sending close messages and waiting for their answers from the tty_release path. This patch makes explicit what previously implicitly had been the case already: We are not able to tell the modem that we are about to close the multiplexer on our side. This means the modem will stay in multiplexer mode and re-establishing the multiplexer later fails. The only way for userspace to work around this is to manually send a close frame in N_TTY mode after closing the mux. Signed-off-by: Sascha Hauer Signed-off-by: Greg Kroah-Hartman Documentation/serial/n_gsm.txt | 7 ++++++ drivers/tty/n_gsm.c | 54 +++++++++++++++++++++++++++--------------- 2 files changed, 42 insertions(+), 19 deletions(-) commit e279e6d98e0cf2c2fe008b3c29042b92f0e17b1d Author: Thomas Bogendoerfer Date: Wed May 31 22:21:03 2017 +0200 Fix serial console on SNI RM400 machines sccnxp driver doesn't get the correct uart clock rate, if CONFIG_HAVE_CLOCK is disabled. Correct usage of clk API to make it work with/without it. Fixes: 90efa75f7ab0 (serial: sccnxp: Using CLK API for getting UART clock) Suggested-by: Russell King - ARM Linux Signed-off-by: Thomas Bogendoerfer Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sccnxp.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 8a8dabf2dd68caff842d38057097c23bc514ea6e Author: Alan Cox Date: Fri Jun 2 13:49:30 2017 +0100 tty: handle the case where we cannot restore a line discipline Historically the N_TTY driver could never fail but this has become broken over time. Rather than trying to rewrite half the ldisc layer to fix the breakage introduce a second level of fallback with an N_NULL ldisc which cannot fail, and thus restore the guarantees required by the ldisc layer. We still try and fail to N_TTY first. It's much more useful to find yourself back in your old ldisc (first attempt) or in N_TTY (second attempt), and while I'm not aware of any code out there that makes those assumptions it's good to drive(r) defensively. Signed-off-by: Alan Cox Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Signed-off-by: Greg Kroah-Hartman drivers/tty/Makefile | 3 +- drivers/tty/n_null.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/tty/tty_ldisc.c | 44 +++++++++++++++++--------- include/uapi/linux/tty.h | 1 + 4 files changed, 113 insertions(+), 15 deletions(-) commit 47f58e32a27c647de0963386d2714d570b38e3d3 Author: Greg Kroah-Hartman Date: Sat Jun 3 18:41:07 2017 +0900 tty: reserve N_SPEAKUP number Over in the staging tree, N_SPEAKUP is added, so to make life easier for merging and other development, also reserve it in the tty tree. Signed-off-by: Greg Kroah-Hartman include/uapi/linux/tty.h | 1 + 1 file changed, 1 insertion(+) commit ef189c8dde9a82962ddb2511ee00ab8d4719dfca Author: Tony Lindgren Date: Thu May 25 09:13:33 2017 -0700 usb: host: ohci-omap3: Remove driver in favor of ohci-platform This driver is no longer needed and can be removed. The reason why it's safe to remove this driver is that most omap devices don't have a USB low-speed or full-speed compatible PHY installed and configured with drivers/mfd/omap-usb-host.c. This means that devices like beagleboard and pandaboard need to use a high-speed USB hub in order to use devices like keyboard and mice. Currently the only known configured for a full-speed PHY is the mdm6600 modem on droid 4 and I've verified it works just fine with ohci-platform. Acked-by: Alan Stern Acked-by: Roger Quadros Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Kconfig | 6 +- drivers/usb/host/Makefile | 1 - drivers/usb/host/ohci-omap3.c | 211 ------------------------------------------ 3 files changed, 5 insertions(+), 213 deletions(-) commit 2545d85301cd646965bf21b21d51d079e7e6ef4b Author: Tony Lindgren Date: Thu May 25 09:13:32 2017 -0700 usb: host: ohci-platform: Add support for omap3 and later With the runtime PM implemented for ohci-platform driver, we can now support omap3 and later OHCI by adding one device tree property. Cc: Hans de Goede Cc: Rob Herring Cc: Yoshihiro Shimoda Cc: Sebastian Reichel Acked-by: Alan Stern Acked-by: Roger Quadros Signed-off-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb-ohci.txt | 1 + drivers/usb/host/ohci-platform.c | 5 +++++ 2 files changed, 6 insertions(+) commit 0aa0b93e7af663b6ca9d9ae31d1b73f2c36ddf46 Author: Tony Lindgren Date: Thu May 25 09:13:31 2017 -0700 usb: host: ohci-platform: Add basic runtime PM support This is needed in preparation of adding support for omap3 and later OHCI. The runtime PM will only do something on platforms that implement it. Cc: devicetree@vger.kernel.org Cc: Hans de Goede Cc: Rob Herring Cc: Sebastian Reichel Cc: Yoshihiro Shimoda Signed-off-by: Tony Lindgren Acked-by: Roger Quadros Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-platform.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit fa72e6afa795dbb35d0cc6332606e83e4415e45e Author: Mariusz Skamra Date: Fri May 26 12:15:59 2017 +0200 usb: Make use of ktime_* comparison functions Start using ktime_* compare functions to make the code backportable. Now that may be a bit tricky due to recent change of ktime_t. Signed-off-by: Mariusz Skamra Acked-by: Kuppuswamy Sathyanarayanan Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/otg_fsm.c | 8 ++++---- drivers/usb/host/ehci-timer.c | 2 +- drivers/usb/host/fotg210-hcd.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit bab3548078237706f53baafe43ae58257225549d Author: Badhri Jagan Sridharan Date: Tue May 30 12:39:53 2017 -0700 usb: typec: Add a sysfs node to manage port type User space applications in some cases have the need to enforce a specific port type(DFP/UFP/DRP). This change allows userspace to attempt setting the desired port type. Low level drivers can however reject the request if the specific port type is not supported. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-typec | 15 ++++ drivers/usb/typec/typec.c | 106 +++++++++++++++++++++++++--- include/linux/usb/typec.h | 4 ++ 3 files changed, 115 insertions(+), 10 deletions(-) commit 7ee4ce6e933fbb2e5db2c39977b847704589575e Author: Heikki Krogerus Date: Tue May 16 15:26:11 2017 +0300 usb: typec: update partner power delivery support with opmode If USB PD contract is established after creation of the partner, the power delivery support attribute of the partner needs to be updated separately. This can be done in typec_set_pwr_opmode() by checking if the port has already partner and updating the value if it does. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/typec.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit e6b20121c6d5d17d38ea93d1ec550713142e54c2 Author: Mathias Nyman Date: Fri Jun 2 16:36:22 2017 +0300 xhci: Add helper to get hardware dequeue pointer for stopped rings. Add xhci_get_hw_deq() helper to retrieve the hardware dequeue pointer an endpoint or stream stopped on. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 8790736dbf2676ea398d8de952c791009290e3cc Author: Mathias Nyman Date: Fri Jun 2 16:36:23 2017 +0300 xhci: Add stream id to xhci_dequeue_state structure The values for the new dequeue segment, new dequeue pointer and new cycle state are needed for manually moving the xHC ring dequeue pointer. These are conveniently stored in a xhci_dequeue_state structure. stream support was added later and stream_id was carried as a function parameter. Move the stream_id to the xhci_dequeue_state structure instead. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 10 +++++----- drivers/usb/host/xhci.c | 2 +- drivers/usb/host/xhci.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit cdd504e11391f0811a681d6efc680ca1e1c8ffac Author: Mathias Nyman Date: Fri Jun 2 16:36:24 2017 +0300 xhci: Find out where an endpoint or stream stopped from its context. When xHC is asked to stop an endpoint it will save the position it stopped on in the endpoint or stream context. xhci driver needs to know if the controller stopped on the exact same TRB that the driver was asked to cancel as it then needs to move past the TD instead of turning the TD to no-op TRBs. xhci driver used to get the stopped position from a "stopped" transfer event before the stop endpoint command completed, but if the ring is already stopped, or in a halted or error state this event is missing. Get the stopped position from the endpoint or stream context instead Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit ed18c5fa945768a9bec994e786edbbbc7695acf6 Author: Mathias Nyman Date: Fri Jun 2 16:36:26 2017 +0300 usb: optimize acpi companion search for usb port devices This optimization significantly reduces xhci driver load time. In ACPI tables the acpi companion port devices are children of the hub device. The port devices are identified by their port number returned by the ACPI _ADR method. _ADR 0 is reserved for the root hub device. The current implementation to find a acpi companion port device loops through all acpi port devices under that parent hub, evaluating their _ADR method each time a new port device is added. for a xHC controller with 25 ports under its roothub it will end up invoking ACPI bytecode 625 times before all ports are ready, making it really slow. The _ADR values are already read and cached earler. So instead of running the bytecode again we can check the cached _ADR value first, and then fall back to the old way. As one of the more significant changes, the xhci load time on Intel kabylake reduced by 70%, (28ms) from initcall xhci_pci_init+0x0/0x49 returned 0 after 39537 usecs to initcall xhci_pci_init+0x0/0x49 returned 0 after 11270 usecs Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/core/usb-acpi.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 11e1d25db643da9d620bfc53b14ff7151220b5fb Author: Mathias Nyman Date: Fri Jun 2 16:36:25 2017 +0300 xhci: remove unused stopped_td pointer We no longer keep track of where we stopped in a stopped_td pointer. We get the ring dequeue pointer from the endpoint or stream context Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 4 ---- drivers/usb/host/xhci.h | 1 - 2 files changed, 5 deletions(-) commit 18edac2e22f47e24815f2c32abdcee183a349e6a Author: Stefan Brüns Date: Wed May 24 02:09:06 2017 +0200 iio: adc: Fix integration time/averaging for INA219/220 INA226/230/231 has integration times per voltage channel and common averaging setting for both channels, while the INA219/220 only has a combined integration time/averaging setting per channel. Only expose the averaging attribute for the INA226, and expose the correct integration times for the INA219. Signed-off-by: Stefan Brüns Signed-off-by: Jonathan Cameron drivers/iio/adc/ina2xx-adc.c | 204 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 182 insertions(+), 22 deletions(-) commit 5c82a6ae0242416cfead597bb2b42aa3481a0ba7 Author: Alexandre Belloni Date: Fri Jun 2 14:15:15 2017 +0200 rtc: remove rtc_device.name rtc->name is only used in messages were it is superfluous. Remove it completely from the structure. Signed-off-by: Alexandre Belloni drivers/rtc/class.c | 7 +++---- include/linux/rtc.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) commit 6b503b216d1eff4d61a0bc34e09d1fd4d6e0ee79 Author: Paolo Cretaro Date: Sun May 28 13:24:38 2017 +0200 iio: adc: meson-saradc: use NULL instead of 0 for pointer Fix sparse warning: Using plain integer as NULL pointer Signed-off-by: Paolo Cretaro Acked-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b9e2a0c0591d2789a43414b8299466800873aea Author: Alexandre Belloni Date: Fri Jun 2 14:13:21 2017 +0200 rtc: ds1307: avoid using rtc-name ds1307->rtc->name is a copy of ds1307->name, use it instead. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42d97ac6a8384197f5b2745592c55aae3191b0e0 Author: Arvind Yadav Date: Tue May 30 16:35:27 2017 +0530 iio:adc:lpc32xx Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Jonathan Cameron drivers/iio/adc/lpc32xx_adc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f4f93bf77dc14e99b2bd383bd67e30294e732372 Author: Paolo Cretaro Date: Thu Jun 1 01:50:55 2017 +0200 iio: adc: mxs-lradc: fix non-static symbol warnings Fix sparse warning "symbol foo was not declared. Should it be static?" for the following symbols: mx23_lradc_adc_irq_names mx28_lradc_adc_irq_names iio_dev_attr_in_voltage0_scale_available iio_dev_attr_in_voltage1_scale_available iio_dev_attr_in_voltage2_scale_available iio_dev_attr_in_voltage3_scale_available iio_dev_attr_in_voltage4_scale_available iio_dev_attr_in_voltage5_scale_available iio_dev_attr_in_voltage6_scale_available iio_dev_attr_in_voltage7_scale_available iio_dev_attr_in_voltage10_scale_available iio_dev_attr_in_voltage11_scale_available iio_dev_attr_in_voltage12_scale_available iio_dev_attr_in_voltage13_scale_available iio_dev_attr_in_voltage14_scale_available iio_dev_attr_in_voltage15_scale_available Signed-off-by: Paolo Cretaro Signed-off-by: Jonathan Cameron drivers/iio/adc/mxs-lradc-adc.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit e18788afebd12a53b3e173d5b1390a785346da2e Author: Jonathan Cameron Date: Sun May 28 16:10:21 2017 +0100 Revert "iio: hi8435: cleanup reset gpio" This reverts commit 61305664a542f874283f74bf0b27ddb31f5045d7. This commit was applied prematurely and will break some existing situations where the signal is inverted as part of voltage level conversions. Signed-off-by: Jonathan Cameron drivers/iio/adc/hi8435.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 0a178fd7327e13ec7f8079a06a20b0ee42ade1eb Author: Arvind Yadav Date: Fri May 26 12:07:41 2017 +0530 iio: adc: xilinx: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Jonathan Cameron drivers/iio/adc/xilinx-xadc-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ec183bf8b5e5f950907705950cf3fd058b17ad1a Author: Wolfram Sang Date: Sun May 28 11:30:46 2017 +0200 iio: use proper name for the R-Car SoC It is 'R-Car', not 'RCar'. No code or binding changes, only descriptive text. Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/renesas,gyroadc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed5210cb07de90b8dc31a420466847755331536b Author: Derek Robson Date: Tue May 30 18:17:10 2017 +1200 Drivers: ccree: cc_hw_queue_defs.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_hw_queue_defs.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit f6858e91eeb4d813150d116d4bcd76c3c52d51be Author: Derek Robson Date: Tue May 30 18:16:55 2017 +1200 Drivers: ccree: cc_regs.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_regs.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ebe22ecce11ee6e6f8e4234b9be43807c1a611a2 Author: Derek Robson Date: Tue May 30 18:16:38 2017 +1200 Drivers: ccree: hash_defs.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/hash_defs.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f4e929bbd87311b6d05c21b2175383bc4d6a55c6 Author: Derek Robson Date: Tue May 30 18:16:22 2017 +1200 Drivers: ccree: ssi_aead.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 45 ++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 16 deletions(-) commit f5bd89b893d2d4cd5f3714fb0085820da572cd8f Author: Derek Robson Date: Tue May 30 18:15:59 2017 +1200 Drivers: ccree: ssi_aead.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2686444e5f7de44aff83f5022c9a3a4920d2a903 Author: Derek Robson Date: Tue May 30 18:15:40 2017 +1200 Drivers: ccree: ssi_buffer_mgr.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 87 +++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 38 deletions(-) commit 84e8a6cf4c418feadb33b68c0a6c8dd39618befb Author: Derek Robson Date: Tue May 30 18:15:26 2017 +1200 Drivers: ccree: ssi_buffer_mgr.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef5d7bd9a913c3f4c2bf3fab66f5df4c87c0da42 Author: Derek Robson Date: Tue May 30 18:15:09 2017 +1200 Drivers: ccree: ssi_cipher.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f892b06826e1972680d7b940b6f9b2d7b8ce3c5c Author: Derek Robson Date: Tue May 30 18:14:54 2017 +1200 Drivers: ccree: ssi_config.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 250a00a7fc1e717e6060b754f9cdd28155018e0e Author: Derek Robson Date: Tue May 30 18:14:38 2017 +1200 Drivers: ccree: ssi_driver.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 3a82eb631f38db5b334f9b0eec078e434b65799b Author: Derek Robson Date: Tue May 30 18:14:20 2017 +1200 Drivers: ccree: ssi_fips.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit cbff760259e369bae99a18dea8e4bb0e3dd5f99c Author: Derek Robson Date: Tue May 30 18:14:03 2017 +1200 Drivers: ccree: ssi_fips.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7c3a293d43763641677a25897b75ac2abd335829 Author: Derek Robson Date: Tue May 30 18:13:46 2017 +1200 Drivers: ccree: ssi_fips_data.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips_data.h | 93 +++++++++++++++++------------------ 1 file changed, 46 insertions(+), 47 deletions(-) commit f77aa70be3ed988dc770578611d0a7cc4582e719 Author: Derek Robson Date: Tue May 30 18:13:26 2017 +1200 Drivers: ccree: ssi_fips_ext.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips_ext.c | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) commit 161d6dd8c8947748b627e015e30d718895d2f316 Author: Derek Robson Date: Tue May 30 18:13:10 2017 +1200 Drivers: ccree: ssi_fips_ll.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips_ll.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit f09e706992bd031f0d94b77e40074e7fea5c89a9 Author: Alexandre Belloni Date: Fri Jun 2 14:03:39 2017 +0200 rtc: pcf8563: avoid using rtc->name pcf8563->rtc->name is a copy of pcf8563_driver.driver.name, use it instead Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f8606533b961b06c258cf4804e3379aa14c5951 Author: Alexandre Belloni Date: Fri Jun 2 14:01:37 2017 +0200 rtc: dev: remove rtc->name from debug message rtc->name is superfluous here because the rtc is already registered at that point and its name has already been printed. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77a73f3caece06d1d17268f43ec39c5779e6ce24 Author: Alexandre Belloni Date: Fri Jun 2 13:57:03 2017 +0200 rtc: sysfs: make name uniform The name sysfs attribute is not useful in its current form because of all the drivers: - 3 are using the feature correctly - 2 are clearly misusing it - 60 are using driver.name, either directly or indirectly - 46 are using pdev->name - 8 are using client->name - 31 are using a variation of driver.name (addition or removal of rtc-, -rtc, _rtc, rtc_) Make it uniform and use the driver name and the device name. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ed99f0141b6a7ac0d197c28b814e67d85ac42452 Author: Jia-Ju Bai Date: Thu Jun 1 11:43:35 2017 +0800 rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss The driver may sleep under a spin lock, and the function call path is: rtsx_exclusive_enter_ss (acquire the lock by spin_lock) rtsx_enter_ss rtsx_power_off_card sd_cleanup_work sd_stop_seq_mode sd_switch_clock sd_ddr_tuning sd_ddr_pre_tuning_tx sd_change_phase wait_timeout schedule_timeout --> may sleep To fix it, "wait_timeout" is replaced with mdelay in sd_change_phase. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 385cab7c7131083cbe09d5f1d06df4544caa272d Author: Jia-Ju Bai Date: Thu Jun 1 11:49:08 2017 +0800 rts5208: Fix a sleep-in-atomic bug in sd_power_off_card3v3 The driver may sleep under a spin lock, and the function call path is: rtsx_exclusive_enter_ss (acquire the lock by spin_lock) rtsx_enter_ss rtsx_power_off_card sd_power_off_card3v3 wait_timeout schedule_timeout --> may sleep To fix it, "wait_timeout" is replaced with mdelay in sd_power_off_card3v3. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0eee1b6dabd79019196fd1d1a66eeb93788867a Author: Gilad Ben-Yossef Date: Thu Jun 1 14:02:56 2017 +0300 staging: ccree: add parentheses to macro argument Add parentheses around macro argument to guard against precedence issues. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_crypto_ctx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33c73ae72e39caffca2f1be30a87c09504126b2f Author: Gilad Ben-Yossef Date: Thu Jun 1 14:02:55 2017 +0300 staging: ccree: fix comments formatting A few of the comments in cc_crypto_ctx.h where not formatted correctly. Format according to coding style guidelines. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_crypto_ctx.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 3e008c17448ba6263934711e3575f9801601674f Author: Gilad Ben-Yossef Date: Thu Jun 1 14:02:53 2017 +0300 staging: ccree: fix longer than 80 chars lines Clip longer than 80 chars lines in header files worked on in the patch set. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_crypto_ctx.h | 3 ++- drivers/staging/ccree/cc_regs.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit f9f28369a792384fda648614fff9c03ad1b4833d Author: Gilad Ben-Yossef Date: Thu Jun 1 14:02:51 2017 +0300 staging: ccree: remove spurious blank lines Remove spurious blanks lines from cc_crypto_ctx.h file Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_crypto_ctx.h | 6 ------ 1 file changed, 6 deletions(-) commit 9f5c6b7258619e5f486430c90bfae028a1ca963b Author: Mart Lubbers Date: Mon May 29 20:31:45 2017 +0200 Staging: gdm724x: Change spaces to tabs This patch fixes the following checkpatch.pl warning in gdm_usb.c: WARNING: suspect code indent for conditional statements (8, 12) Signed-off-by: Mart Lubbers Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_usb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f7a320ffebe2bdce3a189ecb531a401c653f754f Author: Gleb Fotengauer-Malinovskiy Date: Tue May 30 17:11:35 2017 +0300 staging: android: uapi: drop definitions of removed ION_IOC_{FREE,SHARE} ioctls This problem was found by strace ioctl list generator. Fixes: 15c6098cfec5 ("staging: android: ion: Remove ion_handle and ion_client") Signed-off-by: Gleb Fotengauer-Malinovskiy Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/uapi/ion.h | 18 ------------------ 1 file changed, 18 deletions(-) commit 349190d56be6eccb940df18831d8654b19a697aa Author: Okash Khawaja Date: Thu Jun 1 14:15:29 2017 +0100 staging: speakup: remove unused code In spk_ttyio_release we read tty's index but never do anything with it. The patch removes this dead code. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 3 --- 1 file changed, 3 deletions(-) commit 011cca558b6256ff14464e61c111707415a0484f Author: Okash Khawaja Date: Wed May 31 20:50:12 2017 +0100 staging: speakup: check for null before calling TTY's flush_buffer We should check the flush_buffer method of a tty for null before invoking it. Some drivers such as usbserial don't implement flush_buffer. This will be required for upcoming patches where we expand spk_ttyio to support more than just ttyS*. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d0b112ac2ae3738a9f1a86f97dc5fbd23be7e123 Author: Nikola Jelic Date: Sun May 28 00:14:11 2017 +0200 staging: lustre: in-place endianness functions lib-move.c file has a lot of expressions in the form of: v = le[32|64]_to_cpu(v); This caused a lot of sparse warnings. Replaced with: le[32|64]_to_cpus(&v); Signed-off-by: Nikola Jelic Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/lib-move.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit e4e5f9c6c7fc76daa8f6118ce2c4f822b366ed21 Author: Nikola Jelic Date: Sat May 27 23:37:28 2017 +0200 staging: lustre: changed __u32 to __be32 Temporary variable is used only as __be32, for both assignments and reads, but the type is inconsistent (__u32). Signed-off-by: Nikola Jelic Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/lib-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78c486189dde9affd39a2a8b9d27ee32cea4a04e Author: Nikola Jelic Date: Fri May 19 20:48:07 2017 +0200 lustre: ko2iblnd: removed forced u32 casts after htonl sockaddr_in.sin_addr.s_addr is __be32 integral type, so the (__force u32) cast after the htonl call is unnecessary, and also detected by sparse: drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2309:33: warning: incorrect type in assignment (different base types) drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2381:30: warning: incorrect type in assignment (different base types) Signed-off-by: Nikola Jelic Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 135e55f1d712fc4f92302aa9daa6304a51963678 Author: Valentin Vidic Date: Fri May 5 07:27:41 2017 +0200 staging: lustre: cleanup le32 assignment to ldp_flags Introduces a local var to collect flags and convert them to le32. Fixes the following sparse warnings: drivers/staging/lustre/lustre/lmv/lmv_obd.c:2305:23: warning: invalid assignment: |= drivers/staging/lustre/lustre/lmv/lmv_obd.c:2305:23: left side has type restricted __le32 drivers/staging/lustre/lustre/lmv/lmv_obd.c:2305:23: right side has type int drivers/staging/lustre/lustre/lmv/lmv_obd.c:2383:39: warning: invalid assignment: |= drivers/staging/lustre/lustre/lmv/lmv_obd.c:2383:39: left side has type restricted __le32 drivers/staging/lustre/lustre/lmv/lmv_obd.c:2383:39: right side has type int Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 82a52f8ee02bfbecc45bcc0b72daafb39304064b Author: Mathias Rav Date: Thu May 18 22:49:22 2017 -0400 staging: lustre: lprocfs: Use seq_puts instead of seq_printf Reported by checkpatch.pl: "WARNING: Prefer seq_puts to seq_printf". Signed-off-by: Mathias Rav Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/obdclass/lprocfs_status.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8b23093269c84b0da1201e1949c91d0beb9892ef Author: Mathias Rav Date: Thu May 18 22:49:21 2017 -0400 staging: lustre: Use kstrtouint_from_user in ldlm_rw_uint Clean up the helper functions used to implement "dump_granted_max" in debugfs. Replace the lprocfs_rd_uint() and lprocfs_wr_uint() generic callbacks with a simpler, more direct implementation of ldlm_rw_uint_fops. There's a slight change in lustre debugfs write semantics: Using kstrtox causes EINVAL when the written number is followed by other (garbage) characters, whereas previously the garbage would be ignored and such a write would succeed. Signed-off-by: Mathias Rav Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 20 ++++++++++++- .../lustre/lustre/obdclass/lprocfs_status.c | 34 ---------------------- 2 files changed, 19 insertions(+), 35 deletions(-) commit 93e7ea8ca0ba8959ccd8e7555fe2c3cb3a2530e5 Author: Konrad Malkowski Date: Thu May 25 23:01:20 2017 -0400 staging: lustre: Replace printk_ratelimited with pr_warn_ratelimited This patch fixes the checkpoint.pl warning: WARNING: Prefer printk_ratelimited or pr__ratelimited to printk_ratelimit Signed-off-by: Konrad Malkowski Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/tracefile.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 84b84dc19bf19d66b8c8fe54a74c0f5edee51e86 Author: Stefan Brüns Date: Wed May 24 02:09:05 2017 +0200 iio: adc: ina2xx: Make use of attribute flags consistent on all channels Flags for shared channel attributes should be set on all channels of a channel set. I.e. SAMP_FREQUENCY and OVERSAMPLING_RATIO are set on the in_voltage{0,1} channels, thus should be set on in_power, in_current. Signed-off-by: Stefan Brüns Signed-off-by: Jonathan Cameron drivers/iio/adc/ina2xx-adc.c | 2 ++ 1 file changed, 2 insertions(+) commit f06a0d2c880c17672f62d2d5b82410bddf64d1a7 Author: Nikita Yushchenko Date: Tue May 23 11:07:46 2017 +0300 iio: hi8435: remote ampersands from hi8435_info definition C syntax allows apersands when initializing structures fields with function pointers, but in Linux sources ampersands are normally not used in thix context. Signed-off-by: Nikita Yushchenko Signed-off-by: Jonathan Cameron drivers/iio/adc/hi8435.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9d965236fe9b7006261eaf5a81ad36cedf2f9035 Author: Tony Lindgren Date: Mon May 22 17:51:46 2017 -0700 iio: adc: cpcap: Remove hung interrupt quirk This is no longer needed as the real problem was interrupt flags not getting passed properly from device tree to the cpcap-core.c mfd driver. This got fixed with commit ac89473213c6 ("mfd: cpcap: Fix interrupt to use level interrupt") So let's remove ADC interrupt specific the quirk. Cc: Marcel Partap Cc: Michael Scott Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Jonathan Cameron drivers/iio/adc/cpcap-adc.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) commit 951d21de88e4df3449b063180ddec0c668b64c53 Author: Tony Lindgren Date: Mon May 22 17:51:45 2017 -0700 iio: adc: cpcap: Fix die temperature It seems that "MC13783 Power Management and Audio Ciruit User's Guide" MC1378UG.pdf documents several similar components as in the CPCAP PMIC. Chapter "9.5.5 Die Temperature and UID" says that the die temperature value is 282 at 25C with LSB of -1.14C. Converting CPCAP PMIC channel3 values with following seems to produce values that make sense for a PMIC die: temperature = 25000 + ((regval - 282) * 114) As we don't have any other documentation, let's assume the die temperature is unconfigured in the Motorola mapphone Linux kernel and the current temperature conversion table should be only used for the battery thermistor and not for the die temperature. Cc: Marcel Partap Cc: Michael Scott Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Jonathan Cameron drivers/iio/adc/cpcap-adc.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 3f9f3a1a1451f4f389423dae4b5404b1abd48025 Author: Tony Lindgren Date: Mon May 22 17:51:44 2017 -0700 iio: adc: cpcap: Fix default register values and battery temperature Looking at the register dumps from Android kernel on droid 4, I noticed the values with the mainline kernel don't match. Let's fix this by initializing the ADC registers to what Android does. For getting correct values from the battery thermistor, we need to toggle the CPCAP_BIT_THERMBIAS_EN when measuring battery temperature to get correct battery temperatures. And looks like we also need to wait a little bit before reading the battery temperature as otherwise the results are inaccurate. Cc: Marcel Partap Cc: Michael Scott Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Jonathan Cameron drivers/iio/adc/cpcap-adc.c | 57 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 8 deletions(-) commit e5aeee51f6b4fb22e851105ee6d8ad211c40a214 Author: Alexander Levin Date: Sat Jun 3 03:39:13 2017 +0000 perf/core: Don't release cred_guard_mutex if not taken If we failed to acquire task's cred_guard_mutex we shouldn't proceed to release it in the error path. Fixes: a63fbed776c ("perf/tracing/cpuhotplug: Fix locking order") Signed-off-by: Alexander Levin Cc: peterz@infradead.org Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: mhiramat@kernel.org Cc: paulmck@linux.vnet.ibm.com Cc: bigeasy@linutronix.de Link: http://lkml.kernel.org/r/20170603033903.12056-1-alexander.levin@verizon.com Signed-off-by: Thomas Gleixner kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c80aec5e0596858f8e8b26fb4844969ea5eb66e7 Author: Chen-Yu Tsai Date: Wed May 31 15:58:20 2017 +0800 ARM: sun8i: a83t: Add device node for PRCM The A83T's PRCM has the same set of clocks and resets as the A64. However, a few dividers are different. And due to the lack of a low speed 32.768 kHz oscillator, a few of the clock parents are different. The PRCM also has controls for various power domains. These are not supported yet, neither in software nor in the device tree binding. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 562ff059bd5f8f04881256532c6d835af3db55bd Merge: 2a1720376 cc8dd76 Author: Dave Airlie Date: Sat Jun 3 11:30:42 2017 +1000 Merge tag 'omapdrm-4.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm changes for v4.13 * dmabuf fence support * TILER rotation fixes * big pile of various cleanups and refactorings * tag 'omapdrm-4.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (64 commits) drm/omap: fix tiled buffer stride calculations drm/omap: fix YUV422 90/270 rotation with mirroring drm/omap: fix YUV422 rotation with TILER drm/omap: pass rotation to dispc drm/omap: DRM_MODE_REFLECT_* instead of mirror boolean drm/omap: use DRM_MODE_ROTATE_* instead of OMAP_DSS_ROT_* drm/omap: remove omap_drm_win drm/omap: add drm_rotation_to_tiler helper() drm/omap: rename color_mode to fourcc drm/omap: cleanup formats array drm/omap: remove omap_framebuffer_get_formats() drm/omap: use DRM_FORMAT_* instead of OMAP_DSS_COLOR_* drm/omap: use u32 instead of enum omap_color_mode drm/omap: change supported_modes to an array drm/omap: remove unneeded prototypes drm/omap: add format_is_yuv() helper drm/omap: cleanup offset calculation drm/omap: remove dma & vrfb rotation drm/omap: ratelimit OCP error drm/omap: remove CLUT ... commit 086cebfa72fa22e1e49f251d33fe1ceaab4af2d4 Author: Arvind Yadav Date: Tue May 30 09:44:28 2017 -0700 Input: s3c2410_ts - handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/s3c2410_ts.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 58be76896786b512e97cb743ec271648623a7107 Author: Hans de Goede Date: Fri Jun 2 17:51:42 2017 -0700 Input: axp20x-pek - add wakeup support At least on devices with the AXP288 PMIC the device is expected to wakeup from suspend when the power-button gets pressed, add support for this. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/axp20x-pek.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit cfe76a28e37112f471d4bcb8d5f336e3416299b7 Author: Linus Walleij Date: Fri May 12 09:40:49 2017 +0200 clk: versatile: delete old RealView clock implementation The old RealView clock implementation is not used anymore (nothing in the kernel calls realview_clk_init()) as we have moved all clocks over to device tree. Delete it. Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/versatile/Makefile | 1 - drivers/clk/versatile/clk-realview.c | 97 ------------------------------ include/linux/platform_data/clk-realview.h | 1 - 3 files changed, 99 deletions(-) commit 3542976d85d96ab83f6c5b3ff9fb483620c6ba47 Author: Phil Elwell Date: Thu Jun 1 15:14:22 2017 +0100 clk: bcm2835: Minimise clock jitter for PCM clock Fractional clock dividers generate accurate average frequencies but with jitter, particularly when the integer divisor is small. Introduce a new metric of clock accuracy to penalise clocks with a good average but worse jitter compared to clocks with an average which is no better but with lower jitter. The metric is the ideal rate minus the worse deviation from that ideal using the nearest integer divisors. Use this metric for parent selection for clocks requiring low jitter (currently just PCM). Signed-off-by: Phil Elwell Reviewed-by: Eric Anholt Acked-by: Stefan Wahren Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit 8c0de581c4f590450a9e9850e8049f9313bb1e62 Author: Phil Elwell Date: Thu Jun 1 15:14:16 2017 +0100 clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Restrict clock sources for the PCM peripheral to the oscillator and PLLD_PER because other source may have varying rates or be switched off. Prevent other sources from being selected by replacing their names in the list of potential parents with dummy entries (entry index is significant). Signed-off-by: Phil Elwell Reviewed-by: Eric Anholt Acked-by: Stefan Wahren Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit e45098d703fbb9a7b02eae581aadb684b31e0eec Author: Phil Elwell Date: Mon May 15 10:35:04 2017 -0700 clk: bcm2835: Correct the prediv logic If a clock has the prediv flag set, both the integer and fractional parts must be scaled when calculating the resulting frequency. Signed-off-by: Phil Elwell Signed-off-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 887541159c5e4a89779c021553f89df9596ddd94 Merge: c3c4cb8 618aee0 Author: Stephen Boyd Date: Fri Jun 2 15:39:32 2017 -0700 Merge branch 'clk-bulk-get' into clk-next * clk-bulk-get: clk: add managed version of clk_bulk_get clk: add clk_bulk_get accessories commit 618aee02e2f57042f4cdeab228caf631e524b281 Author: Dong Aisheng Date: Fri May 19 21:49:05 2017 +0800 clk: add managed version of clk_bulk_get This patch introduces the managed version of clk_bulk_get. Cc: Michael Turquette Cc: Stephen Boyd Cc: Russell King Cc: Geert Uytterhoeven Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: Mark Brown Cc: Shawn Guo Cc: Fabio Estevam Cc: Sascha Hauer Cc: Anson Huang Cc: Robin Gong Cc: Bai Ping Cc: Leonard Crestez Cc: Octavian Purdila Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd drivers/clk/clk-devres.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/clk.h | 21 +++++++++++++++++++++ 2 files changed, 57 insertions(+) commit 266e4e9d9150e98141b85c7400f8aa3cd57a7f9b Author: Dong Aisheng Date: Fri May 19 21:49:04 2017 +0800 clk: add clk_bulk_get accessories These helper function allows drivers to get several clk consumers in one operation. If any of the clk cannot be acquired then any clks that were got will be put before returning to the caller. This can relieve the driver owners' life who needs to handle many clocks, as well as each clock error reporting. Cc: Michael Turquette Cc: Stephen Boyd Cc: Russell King Cc: Geert Uytterhoeven Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: Mark Brown Cc: Shawn Guo Cc: Fabio Estevam Cc: Sascha Hauer Cc: Anson Huang Cc: Robin Gong Cc: Bai Ping Cc: Leonard Crestez Cc: Octavian Purdila Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd drivers/clk/Makefile | 2 +- drivers/clk/clk-bulk.c | 157 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/clk.h | 111 ++++++++++++++++++++++++++++++++++ 3 files changed, 269 insertions(+), 1 deletion(-) commit 938361e7a50619b76a1415c86438eaee41397220 Author: Rodrigo Vivi Date: Fri Jun 2 13:06:44 2017 -0700 drm/i915/cnp: Panel Power sequence changes for CNP PCH. Panel Power sequences for CNP is similar to Broxton, but with only one sequencer. Main difference from SPT is that PP_DIVISOR was removed and power cycle delay has been moved to PP_CONTROL. v2: Add missed pp_div write, that is now part of PP_CONTROL[8:4] as on Broxton. (Found by DK) v3: Improve commit message. (By DK) Cc: Dhinakaran Pandiyan Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Clinton Taylor Reviewed-by: Dhinakaran Pandiyan Link: http://patchwork.freedesktop.org/patch/msgid/1496434004-29812-6-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_dp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3d02352cd9e8b43805bf68e50e395fda2e218791 Author: Rodrigo Vivi Date: Fri Jun 2 13:06:43 2017 -0700 drm/i915/cnp: add CNP gmbus support On CNP PCH based platforms the gmbus is on the south display that is on PCH. The existing implementation for previous platforms already covers the need for CNP expect for the pin pair configuration that follows similar definitions that we had on BXT. v2: Don't drop "_BXT" as the indicator of the first platform supporting this pin numbers. Suggested by Daniel. v3: Add missing else and fix register table since CNP GPIO_CTL starts on 0xC5014. v4: Fix pin number and map according to the current available VBT. Re-add pin 4 for port D. Lost during some rebase. v5: Use table as spec. If VBT is wrong it should be ignored. Cc: Daniel Vetter Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Anusha Srivatsa Link: http://patchwork.freedesktop.org/patch/msgid/1496434004-29812-5-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 3 ++- drivers/gpu/drm/i915/intel_hdmi.c | 8 +++++--- drivers/gpu/drm/i915/intel_i2c.c | 15 +++++++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) commit 4c9f7086ac6d069d5b79ba37ef4f1ed4fa3dc3f7 Author: Rodrigo Vivi Date: Fri Jun 2 13:06:42 2017 -0700 drm/i915/cnp: Backlight support for CNP. Split out BXT and CNP's setup_backlight(),enable_backlight(), disable_backlight() and hz_to_pwm() into two separate functions instead of reusing BXT function. Reuse set_backlight() and get_backlight() since they have no reference to the utility pin. v2: Reuse BXT functions with controller 0 instead of redefining it. (Jani). Use dev_priv->rawclk_freq instead of getting the value from SFUSE_STRAP. v3: Avoid setup backligh controller along with hooks and fully reuse hooks setup as suggested by Jani. v4: Clean up commit message. v5: Implement per PCH instead per platform. v6: Introduce a new function for CNP.(Jani and Ville) v7: Squash the all CNP Backlight support patches into a single patch. (Jani) v8: Correct indentation, remove unneeded blank lines and correct mail address (Jani). v9: Remove unused enum pipe. (by CI) v10: Remove comment mentioning SFUSE_STRAP in a part of the code that we don't use it. (Jani) Make controller = 0 since current CNP has only one controller and put a comment mentioning why we reuse the BXT definitions and are keeping the controller = 0. (DK) v11: Remove spurious line. (DK) Reviewed-by: Dhinakaran Pandiyan Reviewed-by: Jani Nikula Suggested-by: Jani Nikula Suggested-by: Ville Syrjala Cc: Ville Syrjala Cc: Jani Nikula Signed-off-by: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1496434004-29812-4-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_panel.c | 96 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit 9d81a99713bc29b2f96403b8f7c1720e1b277b35 Author: Rodrigo Vivi Date: Fri Jun 2 13:06:41 2017 -0700 drm/i915/cnp: Get/set proper Raw clock frequency on CNP. RAWCLK_FREQ register has changed for platforms with CNP+. [29:26] This field provides the denominator for the fractional part of the microsecond counter divider. The numerator is fixed at 1. Program this field to the denominator of the fractional portion of reference frequency minus one. If the fraction is 0, program to 0. 0100b = Fraction .2 MHz = Fraction 1/5. 0000b = Fraction .0 MHz. [25:16] This field provides the integer part of the microsecond counter divider. Program this field to the integer portion of the reference frequenct minus one. Also this register tells us that proper raw clock should be read from SFUSE_STRAP and programmed to this register. Up to this point on other platforms we are reading instead of programming it so probably relying on whatever BIOS had configured here. Now on let's follow the spec and also program this register fetching the right value from SFUSE_STRAP as Spec tells us to do. v2: Read from SFUSE_STRAP and Program RAWCLK_FREQ instead of reading the value relying someone else will program that for us. v3: Add missing else. (Jani) v4: Addressing all Ville's catches: Use macro for shift bits instead of defining shift. Remove shift from the cleaning bits with mask that already has it. Add missing I915_WRITE to actually write the reg. Stop using useless DIV_ROUND_* on divider that is exact dividion and use DIV_ROUND_CLOSEST for the fraction part. v5: Remove useless Read-Modify-Write on raclk_freq reg. (Ville). v6: Change is per PCH instead of per platform. Cc: Ville Syrjälä Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1496434004-29812-3-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 5 +++++ drivers/gpu/drm/i915/intel_cdclk.c | 29 ++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) commit f9831bfec7414d8f54f064b6b21de0685f107a47 Author: Michael Thalmeier Date: Wed May 31 11:40:03 2017 +0200 i2c: mxs: change error printing to debug for mxs_i2c_pio_wait_xfer_end Instead of printing errors after mxs_i2c_pio_wait_xfer_end returns with an error code just print a debug message. NAKs and timeouts can occur in this situation normally, so do not treat them as errors. Signed-off-by: Michael Thalmeier Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mxs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ec7e0bb35f8d339b51b440b5fc525618784f11f4 Author: Dhinakaran Pandiyan Date: Fri Jun 2 13:06:40 2017 -0700 drm/i915/cnp: Add PCI ID for Cannonpoint LP PCH The first two bytes of PCI ID for CNP_LP PCH are the same as that of SPT_LP. We should really be looking at the first 9 bits instead of the first 8 to identify platforms, although this seems to have not caused any problems on earlier platforms. Introduce a 9 bit extended mask for SPT and CNP while not touching the code for any of the other platforms. v2: (Rodrigo) Make platform agnostic and fix commit message. Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Anusha Srivatsa Link: http://patchwork.freedesktop.org/patch/msgid/1496434004-29812-2-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.c | 8 +++++++- drivers/gpu/drm/i915/i915_drv.h | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 7b22b8c402c8ee26dd4dc1474887a2a91961e766 Author: Rodrigo Vivi Date: Fri Jun 2 13:06:39 2017 -0700 drm/i915/cnp: Introduce Cannonpoint PCH. Most of south engine display that is in PCH is still the same as SPT and KBP, except for this key differences: - Backlight: Backlight programming changed in CNP PCH. - Panel Power: Sligh programming changed in CNP PCH. - GMBUS and GPIO: The pin mapping has changed in CNP PCH. All of these changes follow more the BXT style. v2: Update definition to use dev_priv isntead of dev (Tvrtko). Cc: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Reviewed-by: Anusha Srivatsa Link: http://patchwork.freedesktop.org/patch/msgid/1496434004-29812-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_irq.c | 6 ++++-- 3 files changed, 10 insertions(+), 2 deletions(-) commit 90b84c057414cbcca53337c64afc348541989d7d Author: Wolfram Sang Date: Thu May 18 23:11:40 2017 +0200 i2c: sh_mobile: drop needless check for of_node After removal of platform_data support, we can simplify OF handling. of_match_device() evaluates to NULL if !CONFIG_OF or if there is no node pointer for that device, so we can remove the check for the node ptr. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-sh_mobile.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit d2f31c49cf7cfe8f02b70614ae56a39b0c1d8a75 Author: Wolfram Sang Date: Thu May 18 23:11:39 2017 +0200 i2c: sh_mobile: remove platform_data No platform currently upstream makes use of this platform_data anymore. The ones that did are converted to DT meanwhile. So, remove it. The old platforms likely don't have the 'clks_per_cnt' feature, otherwise it would have been implemented by now. And in the unlikely case they need to setup a different bus speed, we should rather go for a generic i2c platform data just for that. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-sh_mobile.c | 8 -------- include/linux/i2c/i2c-sh_mobile.h | 11 ----------- 2 files changed, 19 deletions(-) commit 6c42778780c40c7db0ee2bb56436cae86e4c1ba4 Author: Wolfram Sang Date: Tue May 16 13:21:05 2017 +0200 i2c: stub: use pr_fmt Instead of hard coding "i2c-stub:", let's use the pr_fmt mechanism to achieve the same more easily. This makes it easier to stay consistent when adding new messages. Also, remove an unneeded OOM message while we are here. Signed-off-by: Wolfram Sang Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/i2c-stub.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit df5da47fe722e36055b97134e6bb9df58c12495c Author: Hoan Tran Date: Mon Apr 24 11:00:26 2017 -0700 i2c: xgene-slimpro: Add ACPI support by using PCC mailbox This patch adds ACPI support by using PCC mailbox communication interface. Signed-off-by: Hoan Tran Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xgene-slimpro.c | 174 ++++++++++++++++++++++++++++++--- 1 file changed, 161 insertions(+), 13 deletions(-) commit d140bd42b2ced34ce31e9e4384526ce159feabf1 Author: Hoan Tran Date: Mon Apr 24 11:00:25 2017 -0700 i2c: xgene-slimpro: Use a single function to send command message This patch refactors the code to use a single message function to send command message. Signed-off-by: Hoan Tran Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xgene-slimpro.c | 67 +++++++++++++--------------------- 1 file changed, 26 insertions(+), 41 deletions(-) commit 7f696942a7e52df2a99410bf23da513f9aad04fb Author: Eric Anholt Date: Mon May 15 10:16:15 2017 -0700 drm/vc4: Mark the device as active when enabling runtime PM. Failing to do so meant that we got a resume() callback on first use of the device, so we would leak the bin BO that we allocated during probe. Signed-off-by: Eric Anholt Fixes: 553c942f8b2c ("drm/vc4: Allow using more than 256MB of CMA memory.") Link: http://patchwork.freedesktop.org/patch/msgid/20170515171615.10168-1-eric@anholt.net Reviewed-by: Boris Brezillon drivers/gpu/drm/vc4/vc4_v3d.c | 1 + 1 file changed, 1 insertion(+) commit f4d01666616adeebe72f84ee6e9385e309805ba5 Author: Eric Dumazet Date: Thu Jun 1 14:18:36 2017 -0700 tcp: remove unnecessary skb_reset_tail_pointer() __pskb_trim_head() does not need to reset skb tail pointer. Also change the comments, __pskb_pull_head() does not exist. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 80b7d81912d807f161d55e9c2c9cc81061666f83 Author: Chenbo Feng Date: Wed May 31 18:16:00 2017 -0700 bpf: Remove the capability check for cgroup skb eBPF program Currently loading a cgroup skb eBPF program require a CAP_SYS_ADMIN capability while attaching the program to a cgroup only requires the user have CAP_NET_ADMIN privilege. We can escape the capability check when load the program just like socket filter program to make the capability requirement consistent. Change since v1: Change the code style in order to be compliant with checkpatch.pl preference Signed-off-by: Chenbo Feng Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/syscall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fb9a307d11d62749d75b404f15517d73f5d6e148 Author: Chenbo Feng Date: Wed May 31 18:15:59 2017 -0700 bpf: Allow CGROUP_SKB eBPF program to access sk_buff This allows cgroup eBPF program to classify packet based on their protocol or other detail information. Currently program need CAP_NET_ADMIN privilege to attach a cgroup eBPF program, and A process with CAP_NET_ADMIN can already see all packets on the system, for example, by creating an iptables rules that causes the packet to be passed to userspace via NFLOG. Signed-off-by: Chenbo Feng Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 1 + 1 file changed, 1 insertion(+) commit d0a65400eba812e86aa5676524dad09af3292f5a Author: Jon Mason Date: Wed May 31 15:43:30 2017 -0400 net: phy: use of_mdio_parse_addr use of_mdio_parse_addr() in place of an OF read of reg and a bounds check (which is litterally the exact same thing that of_mdio_parse_addr() does) Signed-off-by: Jon Mason Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 775e68a93fe4d33ec93949c8022ed84b97a97096 Author: Yuchung Cheng Date: Wed May 31 11:30:53 2017 -0700 tcp: use TS opt on RTTs for congestion control Currently when a data packet is retransmitted, we do not compute an RTT sample for congestion control due to Kern's check. Therefore the congestion control that uses RTT signals may not receive any update during loss recovery which could last many round trips. For example, BBR and Vegas may not be able to update its min RTT estimation if the network path has shortened until it recovers from losses. This patch mitigates that by using TCP timestamp options for RTT measurement for congestion control. Note that we already use timestamps for RTT estimation. Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 9ae122c62a26ed3022d0affb5b7fffe0292bae16 Author: Satanand Burla Date: Wed May 31 10:45:15 2017 -0700 liquidio: Fix checkpatch errors with references crossing single line Signed-off-by: Satanand Burla Signed-off-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 8 ++++---- drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 11 +++++------ drivers/net/ethernet/cavium/liquidio/request_manager.c | 3 +-- 3 files changed, 10 insertions(+), 12 deletions(-) commit 2d68f0a48bf06350f9ee72c058a5b20babf95758 Author: sixiao@microsoft.com Date: Wed May 31 10:28:27 2017 -0700 tools: hv: set hotplug for VF on Suse On HyperV, the VF interface can be offered by a host at any time. Mark the VF interface as hotplug, to make sure it will be brought up automatically when it is registered. Signed-off-by: Simon Xiao Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller tools/hv/bondvf.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a22431a323cf47d16ea3edb9b691043f15345652 Author: sixiao@microsoft.com Date: Wed May 31 10:28:13 2017 -0700 tools: hv: set allow-hotplug for VF on Ubuntu On HyperV, the VF interface can be offered by a host at any time. Mark the VF interface as hotplug, to make sure it will be brought up automatically when it is registered. Signed-off-by: Simon Xiao Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller tools/hv/bondvf.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4c1588a27991c9047cbd3a109632597514722e47 Author: Rick Farrington Date: Wed May 31 09:48:09 2017 -0700 liquidio: VF interrupt initialization cleanup Set initialization state variable to (reflect interrupt initialization) at correct time (immediately after having configured interrupts). This fixes problem of inconsistent IRQ allocation in case of [obscure] failure when negotiating with PF driver during init. Clean-up of interrupt enablement during initialization & avoid potential race condition with chip-specific code (i.e. perform interrupt control in main driver module). Added explanatory comments regarding interrupt enablement. Signed-off-by: Rick Farrington Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller .../net/ethernet/cavium/liquidio/cn23xx_vf_device.c | 10 ---------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 19 +++++++++++++++++-- 2 files changed, 17 insertions(+), 12 deletions(-) commit a97051f4553551d13e586ab3cb6ae13093a44a81 Author: Ganesh Goudar Date: Wed May 31 19:10:21 2017 +0530 cxgb4: fix incorrect cim_la output for T6 take care of UpDbgLaRdPtr[0-3] restriction for T6. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c3c4cb8d627731b8cfe906431f1b64b056197055 Author: Stephen Boyd Date: Fri Jun 2 10:57:05 2017 -0700 clk: meson-gxbb: Add const to some parent name arrays These can be marked as const * const. Cc: Neil Armstrong Cc: Jerome Brunet Signed-off-by: Stephen Boyd drivers/clk/meson/gxbb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 91a09e0c77d5462706c3f44178a7eb3dd0e9804e Merge: 6e7da28 ff35641 Author: David S. Miller Date: Fri Jun 2 13:56:27 2017 -0400 Merge branch 'sctp-improve-asoc-streams-management' Xin Long says: ==================== sctp: improve asoc streams management This patchset changes to define asoc->stream as an object, and also improve some codes to make it more clearly. ==================== Signed-off-by: David S. Miller commit ff356414dc006170153c79434eb81d130c03beec Author: Xin Long Date: Wed May 31 16:36:32 2017 +0800 sctp: merge sctp_stream_new and sctp_stream_init Since last patch, sctp doesn't need to alloc memory for asoc->stream any more. sctp_stream_new and sctp_stream_init both are used to alloc memory for stream.in or stream.out, and their names are also confusing. This patch is to merge them into sctp_stream_init, and only pass stream and streamcnt parameters into it, instead of the whole asoc. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 4 ++-- net/sctp/associola.c | 3 ++- net/sctp/sm_make_chunk.c | 3 ++- net/sctp/stream.c | 33 +++++++++++---------------------- 4 files changed, 17 insertions(+), 26 deletions(-) commit cee360ab4dd66fc1de33a5fa1cb418fa21c27ce3 Author: Xin Long Date: Wed May 31 16:36:31 2017 +0800 sctp: define the member stream as an object instead of pointer in asoc As Marcelo's suggestion, stream is a fixed size member of asoc and would not grow with more streams. To avoid an allocation for it, this patch is to define it as an object instead of pointer and update the places using it, also create sctp_stream_update() called in sctp_assoc_update() to migrate the stream info from one stream to another. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 3 +- net/sctp/associola.c | 13 ++++----- net/sctp/chunk.c | 4 +-- net/sctp/outqueue.c | 10 +++---- net/sctp/proc.c | 4 +-- net/sctp/sm_make_chunk.c | 2 +- net/sctp/sm_statefuns.c | 8 +++--- net/sctp/socket.c | 14 +++++----- net/sctp/stream.c | 68 ++++++++++++++++++++++------------------------ net/sctp/ulpqueue.c | 8 +++--- 10 files changed, 65 insertions(+), 69 deletions(-) commit f6b3130919eac29314f159563ebd3584821a294d Merge: 8fedfee 14c735c Author: Stephen Boyd Date: Fri Jun 2 10:51:41 2017 -0700 Merge tag 'meson-clk-for-4.13' of git://github.com/BayLibre/clk-meson into clk-next Pull Amlogic clock driver updates from Jerome Brunet: * Expose more i2s and spdif output clocks * Expose EE uart and SPICC gate clocks * Remove cpu_clk from to gxbb * Mark clk81 as critical on gxbb * Add CEC EE clocks * tag 'meson-clk-for-4.13' of git://github.com/BayLibre/clk-meson: clk: meson-gxbb: Add EE 32K Clock for CEC clk: gxbb: remove CLK_IGNORE_UNUSED from clk81 clk: meson: meson8b: mark clk81 as critical clk: meson: gxbb: remove the "cpu_clk" from the GXBB and GXL driver clk: meson-gxbb: un-export the CPU clock clk: meson-gxbb: expose UART clocks clk: meson-gxbb: expose SPICC gate clk: meson-gxbb: expose spdif master clock clk: meson-gxbb: expose i2s master clock clk: meson-gxbb: expose spdif clock gates commit 8fedfee49fb57244df8d96de1478eed79f45bd83 Author: Arvind Yadav Date: Fri Apr 28 18:33:07 2017 +0530 clk: palmas: undo preparation of a clock source. Undo preparation of a clock source, if palmas_clks_init_configure is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Stephen Boyd drivers/clk/clk-palmas.c | 1 + 1 file changed, 1 insertion(+) commit 428c9de583921c4b699622272c04af4e362c474c Author: Geert Uytterhoeven Date: Fri Apr 28 15:08:53 2017 +0200 clk: Provide dummy of_clk_get_from_provider() for compile-testing When CONFIG_ON=n, dummies are provided for of_clk_get() and of_clk_get_by_name(), but not for of_clk_get_from_provider(). Provide a dummy for the latter, to improve the ability to do compile-testing. This requires removing the existing dummy in the Lantiq clock code. Fixes: 766e6a4ec602d0c1 ("clk: add DT clock binding support") Signed-off-by: Geert Uytterhoeven Acked-by: Thomas Langer Signed-off-by: Stephen Boyd arch/mips/lantiq/clk.c | 5 ----- include/linux/clk.h | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) commit 6e7da286e3513ac1e107ef8dffa5f254029d68e7 Merge: b260831 85cfa71 Author: David S. Miller Date: Fri Jun 2 13:47:29 2017 -0400 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 2017-06-01 This series contains updates to i40e, i40evf and the "new" AVF virtchnl. This is the introduction of the Intel(R) Ethernet Adaptive Virtual Function driver code and device ID, as presented at the NetDEV 1.2 conference in 2016. http://netdevconf.org/1.2/session.html?anjali-singhai The idea is to convert the interface between the i40evf driver and the parent i40e PF driver to be generic, as the i40evf driver should in the future be able to run on top of other Intel PF drivers, and negotiate any features beyond a "base expected" set. ==================== Signed-off-by: David S. Miller commit f7a478178a8ea970abd34f7ab73e66c9119b1606 Author: Takashi Iwai Date: Thu Jun 1 22:36:02 2017 +0200 ALSA: doc: Update copy_user, copy_kernel and fill_silence PCM ops Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai .../sound/kernel-api/writing-an-alsa-driver.rst | 111 ++++++++++++++------- 1 file changed, 76 insertions(+), 35 deletions(-) commit fed5794fccf40297f17e0032cc8211cdad0ba6df Author: Takashi Iwai Date: Sun May 21 19:08:57 2017 +0200 ALSA: pcm: Build OSS writev/readv helpers conditionally The snd_pcm_oss_writev3() and snd_pcm_oss_readv3() are used only in io.c with CONFIG_SND_PCM_OSS_PLUGINS=y. Add an ifdef to reduce the build of these functions. Along with it, since they are called always for in-kernel copy, reduce the argument and call snd_pcm_kernel_writev() and *_readv() directly instead. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/oss/io.c | 4 ++-- sound/core/oss/pcm_oss.c | 12 ++++++------ sound/core/oss/pcm_plugin.h | 6 ++---- 3 files changed, 10 insertions(+), 12 deletions(-) commit 13f72c8c28fc4b2d5329c940086c8939756600c2 Author: Takashi Iwai Date: Sun May 21 10:14:42 2017 +0200 ALSA: pcm: Kill set_fs() in PCM OSS layer This is the last-standing one: kill the set_fs() usage in PCM OSS layer by replacing with the new API functions to deal with the direct in-kernel buffer copying. The code to fill the silence can be replaced even to a one-liner to pass NULL buffer instead of the manual copying. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/oss/pcm_oss.c | 77 ++++++++---------------------------------------- 1 file changed, 12 insertions(+), 65 deletions(-) commit 66b5542e3a781091920430da42640bdf40499dea Author: Takashi Iwai Date: Sun May 21 10:19:16 2017 +0200 usb: gadget: u_uac1: Kill set_fs() usage With the new API to perform the in-kernel buffer copy, we can get rid of set_fs() usage in this driver, finally. Acked-by: Greg Kroah-Hartman Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai drivers/usb/gadget/function/u_uac1.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 68541213720df9bb7904cc1fecab563d424849ae Author: Takashi Iwai Date: Wed May 24 18:23:20 2017 +0200 ALSA: pcm: Direct in-kernel read/write support Now all materials are ready, let's allow the direct in-kernel read/write, i.e. a kernel-space buffer is passed for read or write, instead of the normal user-space buffer. This feature is used by OSS layer and UAC1 driver, for example. The __snd_pcm_lib_xfer() takes in_kernel argument that indicates the in-kernel buffer copy. When this flag is set, another transfer code is used. It's either via copy_kernel PCM ops or the normal memcpy(), depending on the driver setup. As external API, snd_pcm_kernel_read(), *_write() and other variants are provided. That's all. This support is really simple because of the code refactoring until now. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/pcm.h | 38 +++++++++++++++++++++++++++++++++----- sound/core/pcm_lib.c | 26 +++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 6 deletions(-) commit a9cd29e79965f0f769d13edcf2e9adb389698e7b Author: Takashi Iwai Date: Wed May 24 18:18:15 2017 +0200 ALSA: pcm: Simplify snd_pcm_playback_silence() Use the existing silence helper codes for simplification. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 50 ++++++++++++++++++++------------------------------ 1 file changed, 20 insertions(+), 30 deletions(-) commit 5c7264cfbb209efea04bbbd69b8b4f5f2fc5f86d Author: Takashi Iwai Date: Wed May 24 22:36:23 2017 +0200 ALSA: pcm: Unify read/write loop Both __snd_pcm_lib_read() and __snd_pcm_write() functions have almost the same code to loop over samples. For simplification, this patch unifies both as the single helper, __snd_pcm_lib_xfer(). Other than that, there should be no functional change by this patch. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/pcm.h | 13 ++-- sound/core/pcm_lib.c | 184 +++++++++++++-------------------------------------- 2 files changed, 51 insertions(+), 146 deletions(-) commit 9f60063094ba72e2767be18289baf5151f1f1c2f Author: Takashi Iwai Date: Wed May 24 18:15:26 2017 +0200 ALSA: pcm: More unification of PCM transfer codes This patch proceeds more abstraction of PCM read/write loop codes. For both interleaved and non-interleaved transfers, the same copy or silence transfer code (which is defined as pcm_transfer_f) is used now. This became possible since we switched to byte size to copy_* and fill_silence ops argument instead of frames. And, for both read and write, we can use the same copy function (which is defined as pcm_copy_f), just depending on whether interleaved or non-interleaved mode. The transfer function is determined at the beginning of the loop, depending on whether the driver gives the specific copy ops or it's the standard read/write. Another bonus by this change is that we now guarantee the silencing behavior when NULL buffer is passed to write helpers. It'll simplify some codes later. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 254 +++++++++++++++++++++++++-------------------------- 1 file changed, 123 insertions(+), 131 deletions(-) commit c48f12ee0acbd431d6c3ed249f79a6d68b757058 Author: Takashi Iwai Date: Sun May 21 09:35:21 2017 +0200 ALSA: pcm: Call directly the common read/write helpers Make snd_pcm_lib_read() and *_write() static inline functions that call the common helper functions directly. This reduces a slight amount of codes, and at the same time, it's a preparation for the further cleanups / fixes. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/pcm.h | 43 +++++++++++--- sound/core/pcm_lib.c | 156 ++++++++++++++++++--------------------------------- 2 files changed, 89 insertions(+), 110 deletions(-) commit bdc4acf7f6eb14a64c549c04c741b18e3afb350e Author: Takashi Iwai Date: Wed May 24 17:59:17 2017 +0200 ALSA: pcm: Shuffle codes Just shuffle the codes, without any change otherwise. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 212 +++++++++++++++++++++++++-------------------------- 1 file changed, 106 insertions(+), 106 deletions(-) commit 6ba63929ae76e5aaafa14021517fab41cfcd5c83 Author: Takashi Iwai Date: Wed May 24 17:51:30 2017 +0200 ALSA: pcm: Check PCM state by a common helper function Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 81 +++++++++++++++++++--------------------------------- 1 file changed, 29 insertions(+), 52 deletions(-) commit 2ae48354a1a7afbec0c61280e6410a90894a21e7 Author: Takashi Iwai Date: Wed May 10 22:21:52 2017 +0200 ALSA: pcm: Drop the old copy and silence ops Now that all users of old copy and silence ops have been converted to the new PCM ops, the old stuff can be retired and go away. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/pcm.h | 5 ----- sound/core/pcm_lib.c | 38 +------------------------------------- sound/soc/soc-pcm.c | 2 -- 3 files changed, 1 insertion(+), 44 deletions(-) commit 1facf21e8b903524b34f09c39a7d27b4b71a07f7 Author: Takashi Iwai Date: Wed May 10 22:20:10 2017 +0200 [media] solo6x10: Convert to the new PCM ops Replace the copy and the silence ops with the new PCM ops. The device supports only 1 channel and 8bit sample, so it's always bytes=frames, and we need no conversion of unit in the callback. Also, it's a capture stream, thus no silence is needed. Acked-by: Hans Verkuil Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai drivers/media/pci/solo6x10/solo6x10-g723.c | 32 ++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit aa708c613b96c9c3a00a5ba78a203616cab27f86 Author: Takashi Iwai Date: Wed May 10 21:59:12 2017 +0200 ASoC: blackfin: Convert to the new PCM ops Replace the copy and the silence ops with the new PCM ops. In AC97 and I2S-TDM mode, we need to convert back to frames, but otherwise the conversion is pretty straightforward. Reviewed-by: Takashi Sakamoto Acked-by: Mark Brown Signed-off-by: Takashi Iwai sound/soc/blackfin/bf5xx-ac97-pcm.c | 27 +++++++++++++++++++-------- sound/soc/blackfin/bf5xx-i2s-pcm.c | 36 ++++++++++++++++++++++++------------ 2 files changed, 43 insertions(+), 20 deletions(-) commit 1cc2f8ba0b3e63e0c8977cbad89e90352251c518 Author: Takashi Iwai Date: Wed May 10 21:57:16 2017 +0200 ALSA: sh: Convert to the new PCM ops Replace the copy and the silence ops with the new PCM ops. Fixed also the user-space buffer copy with the proper copy_from_user*() variant. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/sh/sh_dac_audio.c | 54 +++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 24 deletions(-) commit 4b83eff81c817d7e4c75605670320722611315b9 Author: Takashi Iwai Date: Wed May 10 20:34:45 2017 +0200 ALSA: sb: Convert to the new PCM ops Replace the copy and the silence ops with the new PCM ops. For avoiding the code redundancy, slightly hackish macros are introduced. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/isa/sb/emu8000_pcm.c | 190 ++++++++++++++++++++++++++------------------- 1 file changed, 109 insertions(+), 81 deletions(-) commit a6970bb1dd996943fce8c975282c7146fd69f560 Author: Takashi Iwai Date: Wed May 10 20:33:05 2017 +0200 ALSA: gus: Convert to the new PCM ops Replace the copy and the silence ops with the new PCM ops. For simplifying the code a bit, two local helpers are introduced here: get_bpos() and playback_copy_ack(). Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/isa/gus/gus_pcm.c | 97 ++++++++++++++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 38 deletions(-) commit 0925e6b26fcb52808145fbbb6d769485cb46f47b Author: Takashi Iwai Date: Wed May 10 20:32:25 2017 +0200 ALSA: hdsp: Convert to the new PCM ops Replace the copy and the silence ops with the new PCM ops. The conversion is straightforward with standard helper functions. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/rme9652/hdsp.c | 67 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 17 deletions(-) commit 7b6ae34da6302ea1b64b45c957c1a323e1fb2e08 Author: Takashi Iwai Date: Wed May 10 20:31:41 2017 +0200 ALSA: rme9652: Convert to the new PCM ops Replace the copy and the silence ops with the new PCM ops. The conversion is straightforward with standard helper functions. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/rme9652/rme9652.c | 71 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 17 deletions(-) commit 53945f5b8ae550d8c6f7ac8ed9b1e496778fad45 Author: Takashi Iwai Date: Wed May 10 20:30:34 2017 +0200 ALSA: rme96: Convert to the new PCM ops Replace the copy and the silence ops with the new PCM ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/rme96.c | 70 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 26 deletions(-) commit 032db751efa7d3eb80a3f4b3fde51eb4f6c24308 Author: Takashi Iwai Date: Wed May 10 20:29:25 2017 +0200 ALSA: rme32: Convert to the new PCM copy ops Replace the copy and the silence ops with the new ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/rme32.c | 65 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 22 deletions(-) commit 6c6ba11fad0b01356f53a37a1d776dd45c6875ae Author: Takashi Iwai Date: Wed May 10 20:19:17 2017 +0200 ALSA: korg1212: Convert to the new PCM ops Replace the copy and the silence ops with the new PCM ops. Although we can refactor this messy code, at this time, the changes are kept as small as possible. Let's clean up later. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/korg1212/korg1212.c | 112 ++++++++++++++++++++++++------------------ 1 file changed, 65 insertions(+), 47 deletions(-) commit 21de5673663f2620fa2838e4e2ea5db9c91fad4d Author: Takashi Iwai Date: Wed May 10 20:25:17 2017 +0200 ALSA: nm256: Convert to new PCM copy ops Replace the copy and the silence ops with the new ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/nm256/nm256.c | 57 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 20 deletions(-) commit b96c3a155696eae0a3c08b71f7642ccb1437ac75 Author: Takashi Iwai Date: Wed May 10 20:16:36 2017 +0200 ALSA: es1938: Convert to the new PCM copy ops Replace the copy ops with the new copy_user and copy_kernel ops. It's used only for a capture stream (for some hardware workaround), thus we need no silence operation. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/es1938.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit d53611d21ef6000619e87f6cfc1f6d870c10cd93 Author: Takashi Iwai Date: Wed May 10 20:15:40 2017 +0200 ALSA: dummy: Convert to new PCM copy ops It's a dummy ops, so just replacing it. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/drivers/dummy.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 29d1a873de542cbb46d0641037d2601cb76be5b1 Author: Takashi Iwai Date: Wed May 10 20:02:35 2017 +0200 ALSA: pcm: Introduce copy_user, copy_kernel and fill_silence ops For supporting the explicit in-kernel copy of PCM buffer data, and also for further code refactoring, three new PCM ops, copy_user, copy_kernel and fill_silence, are introduced. The old copy and silence ops will be deprecated and removed later once when all callers are converted. The copy_kernel ops is the new one, and it's supposed to transfer the PCM data from the given kernel buffer to the hardware ring-buffer (or vice-versa depending on the stream direction), while the copy_user ops is equivalent with the former copy ops, to transfer the data from the user-space buffer. The major difference of the new copy_* and fill_silence ops from the previous ops is that the new ops take bytes instead of frames for size and position arguments. It has two merits: first, it allows the callback implementation often simpler (just call directly memcpy() & co), and second, it may unify the implementations of both interleaved and non-interleaved cases, as we'll see in the later patch. As of this stage, copy_kernel ops isn't referred yet, but only copy_user is used. Reviewed-by: Takashi Sakamoto Acked-by: Mark Brown Signed-off-by: Takashi Iwai include/sound/pcm.h | 7 +++++ sound/core/pcm_lib.c | 89 +++++++++++++++++++++++++++++++++++++++++++--------- sound/soc/soc-pcm.c | 3 ++ 3 files changed, 84 insertions(+), 15 deletions(-) commit 5343b1579247875ccfa88778e8db17e181c9f3fe Author: Marek Szyprowski Date: Wed May 31 13:00:17 2017 +0200 ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family Exynos5250 and Exynos542x SoCs have the same CEC hardware module as Exynos4 SoC series, so enable support for it using the same compatible string. Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 7 +++++++ arch/arm/boot/dts/exynos5250-snow-common.dtsi | 4 ++++ arch/arm/boot/dts/exynos5250.dtsi | 13 +++++++++++++ arch/arm/boot/dts/exynos5420-pinctrl.dtsi | 7 +++++++ arch/arm/boot/dts/exynos5420.dtsi | 13 +++++++++++++ arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 4 ++++ 6 files changed, 48 insertions(+) commit 71ae3df2445a6cb3a1c1980954ee79ac944165f8 Author: Corentin Labbe Date: Fri Jun 2 13:25:10 2017 +0200 drm: remove writeq/readq function definitions Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which already have them. Signed-off-by: Corentin Labbe Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170602112510.17544-1-clabbe.montjoie@gmail.com include/drm/drm_os_linux.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit b260831182e12418ef32a62553326e10e2a48e2e Merge: 3a5f899 dc4528e Author: David S. Miller Date: Fri Jun 2 10:33:04 2017 -0400 Merge branch 'qed-Enhance-storage-APIs' Yuval Mintz says: ==================== qed: Enhance storage APIs This series is intended to add additional information and features to the API between qed and its storage protocol drivers [qedi, qedf]. Patch #2 adds some information stored on device such as wwpn & wwnn to allow qedf utilize it; #1 fixes an issue with the reading of those values [which were unused until now]. Patch #3 would allow the protocol drivers access to images on persistent storage which is a prerequirement for adding boot from SAN support. Patch #4 adds infrastrucutre to a future feature for qedi. ==================== Signed-off-by: David S. Miller commit dc4528e9e890f82900d75ac6276aba8ce89a80b6 Author: Mintz, Yuval Date: Fri Jun 2 08:58:33 2017 +0300 qed: Add support for changing iSCSI mac Enhance API between qedi and qed, allowing qedi to inform device's firmware when the iSCSI mac is to be changed. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 66 +++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sp.h | 1 + include/linux/qed/qed_iscsi_if.h | 7 +++ 3 files changed, 74 insertions(+) commit 20675b37ee76d11430fd3d4da0851fc6a4e36abc Author: Mintz, Yuval Date: Fri Jun 2 08:58:32 2017 +0300 qed: Support NVM-image reading API Storage drivers require images from the nvram in boot-from-SAN scenarios. This provides the necessary API between qed and the protocol drivers to perform such reads. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 16 ++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.c | 89 ++++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 21 +++++++ include/linux/qed/qed_if.h | 18 ++++++ 4 files changed, 144 insertions(+) commit 3c5da94278026a4583320f97f6547573fb3a93aa Author: Mintz, Yuval Date: Fri Jun 2 08:58:31 2017 +0300 qed: Share additional information with qedf Share several new tidbits with qedf: - wwpn & wwnn - Absolute pf-id [this one is actually meant for qedi as well] - Number of available CQs While we're at it, now that qedf will be aware of the available CQs we can add some validation on the inputs it provides. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 8 +++++++- drivers/net/ethernet/qlogic/qed/qed_fcoe.c | 14 ++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_main.c | 2 ++ include/linux/qed/qed_fcoe_if.h | 5 +++++ include/linux/qed/qed_if.h | 2 ++ 5 files changed, 30 insertions(+), 1 deletion(-) commit 5779675912fa87d8d0af651537acc0e312f06c70 Author: Mintz, Yuval Date: Fri Jun 2 08:58:30 2017 +0300 qed: Correct order of wwnn and wwpn Driver reads values via HSI splitting this 8-byte into 2 32-bit values and builds a single u64 field - but it does so by shifting the lower field instead of the higher. Luckily, we still don't use these fields for anything - but we're about to start. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8e71bf75efceff07e04e1f8a4b7c0dbff7205949 Author: Florian Westphal Date: Fri Apr 21 11:49:09 2017 +0200 selinux: use pernet operations for hook registration It will allow us to remove the old netfilter hook api in the near future. Signed-off-by: Florian Westphal Signed-off-by: Paul Moore security/selinux/hooks.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 3a5f8997dc643a0e0e9a0895c2214b21e5e774a2 Author: Zhang Shengju Date: Thu Jun 1 15:37:02 2017 +0800 team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias Add a new macro MODULE_ALIAS_TEAM_MODE to unify and simplify the declaration of team mode alias. Signed-off-by: Zhang Shengju Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/team/team_mode_activebackup.c | 2 +- drivers/net/team/team_mode_broadcast.c | 2 +- drivers/net/team/team_mode_loadbalance.c | 2 +- drivers/net/team/team_mode_random.c | 2 +- drivers/net/team/team_mode_roundrobin.c | 2 +- include/linux/if_team.h | 2 ++ 6 files changed, 7 insertions(+), 5 deletions(-) commit 223c24be740d293519ef8e03f5c075fab5512fd2 Author: Elaine Zhang Date: Tue May 2 15:34:06 2017 +0800 clk: rockchip: mark some special clk as critical on rk3368 The jtag clk no driver to handle them. But this clk need enable,so make it as critical. The ddrphy/ddrupctl clks no driver to handle them, Chip design requirements for these clock to always on, The pmu_hclk_otg0 is Chip design defect, must be always on, Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3368.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1d24ad457c54f0c8a835c33b7f687c454b643fcb Author: Chris Wilson Date: Thu Jun 1 14:33:29 2017 +0100 drm/i915: Allow kswapd to pause the device whilst reaping In commit 5763ff04dc4e ("drm/i915: Avoid GPU stalls from kswapd") we stopped direct reclaim and kswapd from triggering GPU/client stalls whilst running (by restricting the objects they could reap to be idle). However with abusive GPU usage, it becomes quite easy to starve kswapd of memory and prevent it from making forward progress towards obtaining enough free memory (thus driving the system closer to swap exhaustion). Relax the previous restriction to allow kswapd (but not direct reclaim) to stall the device whilst reaping purgeable pages. v2: Also acquire the rpm wakelock to allow kswapd to unbind buffers. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170601133331.5973-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem_shrinker.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 55bb6a633c33caf68ab470907ecf945289cb733d Author: Elaine Zhang Date: Tue May 2 15:34:05 2017 +0800 clk: rockchip: mark noc and some special clk as critical on rk3288 The atclk/dbg/jtag/hsic-xin12m/pclk_core clks no driver to handle them. But this clks need enable,so make it as ignore_unused for now. The ddrupctl0/ddrupctl1/publ0/publ1 clks no driver to handle them, Chip design requirements for these clock to always on, The pmu_hclk_otg0 is Chip design defect, must be always on, Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3288.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit f18c0994cda54dc21d3b0ce2ba130b5ea8f58666 Author: Elaine Zhang Date: Tue May 2 15:34:04 2017 +0800 clk: rockchip: mark noc and some special clk as critical on rk3228 The jtag/bus/peri/initmem/rom/stimer/phy clks no driver to handle them. But this clks need enable,so make it as critical. The ddrupctl/ddrmon/ddrphy clks no driver to handle them, Chip design requirements for these clock to always on, The hclk_otg_pmu is Chip design defect, must be always on, The new document will update the description of this clock. All these non-noc/non-arbi clocks,IC suggest always on, Because it's have some order limitation, between the NOC clock switch and bus IDLE(or pd on/off). The software is not very good to solve this constraint. Always on these clocks, has no effect on the system power consumption. The new document will update the description of these clock. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3228.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 0cee73f751ceb507d052f1a45d5f5f38bc33b25a Author: Yuantian Tang Date: Fri Jun 2 15:23:03 2017 +0800 ahci: qoriq: add ls1088a platforms support Ls1088a is new introduced arm-based soc with sata support with following features: * Complies with the serial ATA 3.0 specification and the AHCI 1.3.1 specification * Contains a high-speed descriptor-based DMA controller * Supports the following: * Speeds of 1.5 Gb/s (first-generation SATA), 3 Gb/s (second-generation SATA), and 6 Gb/s (third-generation SATA) * FIS-based switching * Native command queuing (NCQ) commands * Port multiplier operation * Asynchronous notification * SATA Vendor BIST mode Signed-off-by: Tang Yuantian Signed-off-by: Tejun Heo drivers/ata/ahci_qoriq.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f2893aaba435fcb55b86dc1be8c6f64f8d60e64b Author: Elaine Zhang Date: Tue May 2 15:34:03 2017 +0800 clk: rockchip: mark pclk_ddrupctl as critical_clock on rk3036 No driver to handle this clk yet, but chip design requiress for this clock supplying the ddr controller to be always on. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3036.c | 1 + 1 file changed, 1 insertion(+) commit ff8f797557c73f1f191866a013b61a7286330021 Author: Weinan Li Date: Wed May 31 10:35:52 2017 +0800 drm/i915: return the correct usable aperture size under gvt environment I915_GEM_GET_APERTURE ioctl is used to probe aperture size from userspace. In gvt environment, each vm only use the ballooned part of aperture, so we should return the correct available aperture size exclude the reserved part by balloon. v2: add 'reserved' in struct i915_address_space to record the reserved size in ggtt (Chris) v3: remain aper_size as total, adjust aper_available_size exclude reserved and pinned. UMD driver need to adjust the max allocation size according to the available aperture size but not total size. KMD return the correct usable aperture size any time (Chris, Joonas) v4: decrease reserved in deballoon (Joonas) v5: add onion teardown in balloon, add vgt_deballoon_space (Joonas) v6: change title name (Zhenyu) v7: code style refine (Joonas) Suggested-by: Chris Wilson Suggested-by: Joonas Lahtinen Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Zhenyu Wang Signed-off-by: Weinan Li Link: http://patchwork.freedesktop.org/patch/msgid/1496198152-14175-1-git-send-email-weinan.z.li@intel.com Reviewed-by: Joonas Lahtinen Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + drivers/gpu/drm/i915/i915_vgpu.c | 44 ++++++++++++++++++++++++++----------- 3 files changed, 34 insertions(+), 15 deletions(-) commit f6022e88faca1a6a21cbd0f009b477bc530b9cc7 Author: Elaine Zhang Date: Fri Jun 2 09:47:25 2017 +0800 clk: rockchip: add clock controller for rk3128 Add the clock tree definition for the new rk3128 SoC. And it also applies to the RK3126 SoC. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-rk3128.c | 612 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 613 insertions(+) commit de2ddc3b694d4594d922534db19e15fc39a3fcee Author: Elaine Zhang Date: Fri Jun 2 09:47:24 2017 +0800 dt-bindings: add bindings for rk3128 clock controller Add devicetree bindings for Rockchip cru which found on Rockchip SoCs. Signed-off-by: Elaine Zhang Acked-by: Rob Herring Signed-off-by: Heiko Stuebner .../bindings/clock/rockchip,rk3128-cru.txt | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 5d2595627efcd18268d36427634a4a3f04a01a6b Author: Elaine Zhang Date: Fri Apr 28 15:02:47 2017 +0800 clk: rockchip: export more rk3228 clocks ids This patch exports related BUS/VPU/RGA/HDCP/IEP/TSP/WIFI/ VIO/USB/EFUSE/GPU/CRYPTO clocks for dts reference. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3228.c | 92 +++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 46 deletions(-) commit 25fb42b1cfde85f905dd1d61ea1e089c16e1ad77 Author: Eddie Cai Date: Tue Apr 25 14:41:10 2017 +0800 clk: rockchip: add ids for rk3399 testclks used for camera handling clk_testout1 and clk_testout2 are used for camera handling, so add their ids. Signed-off-by: Eddie Cai Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f08b559edf9363ff04a1d9f01338ab852bb29f73 Merge: f88b8e7 b20841b Author: Heiko Stuebner Date: Fri Jun 2 14:48:32 2017 +0200 Merge branch 'v4.13-shared/clkids' into v4.13-clk/next commit b20841b9e0d730206de6ee95f4d00e3f8815ad50 Author: Elaine Zhang Date: Fri Jun 2 09:47:23 2017 +0800 clk: rockchip: add dt-binding header for rk3128 Add the dt-bindings header for the rk3128, that gets shared between the clock controller and the clock references in the dts. Add softreset ID for rk3128. And it also applies to the RK3126 SoC. Signed-off-by: Elaine Zhang Acked-by: Rob Herring Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3128-cru.h | 282 +++++++++++++++++++++++++++++++++ 1 file changed, 282 insertions(+) commit 81b61d37705173b8b9eb52c4566a8fc7c7099520 Author: William Wu Date: Fri Jun 2 15:04:25 2017 +0800 ARM: dts: rockchip: enable usb for rk3229 evb board Rockchip's rk3229 evaluation board has one usb otg controller and three usb host controllers. Each usb controller connect with one usb2 phy port through UTMI+ interface. And the three usb host interfaces use the same GPIO VBUS drive. Let's enable them to support usb on rk3229 evb board. Signed-off-by: William Wu Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3229-evb.dts | 74 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 3880af4541a178b38cce0456c9afa3ab96534e90 Author: William Wu Date: Fri Jun 2 15:04:24 2017 +0800 ARM: dts: rockchip: add usb nodes on rk322x This patch adds usb otg/host controllers and phys nodes on rk322x. Signed-off-by: William Wu Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk322x.dtsi | 138 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 137 insertions(+), 1 deletion(-) commit d6d517b7730c2dada199db83ebbc670c50fa9952 Author: Sara Sharon Date: Mon Mar 6 10:16:11 2017 +0200 iwlwifi: add wait for tx queue empty Now that we have 512 queues, add a wait for single TX queue to gen2. This replaces gen1 wait_tx_queues_empty, which was limited to 32 queues. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 2 + drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 20 ++++++- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 41 ++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 2 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 72 ++++++++++++++--------- 6 files changed, 107 insertions(+), 34 deletions(-) commit 3a07d36c2d891b30c25e03146eceaeb6e6375810 Author: Johannes Berg Date: Wed Mar 15 10:18:20 2017 +0100 iwlwifi: mvm: fix many kernel-doc warnings Fix many kernel-doc warnings. In one case, this required adding a new enum value to be able to document things properly. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-power.h | 35 ++++++++++++++-------- .../net/wireless/intel/iwlwifi/mvm/fw-api-tof.h | 16 ++++++---- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 15 ++++++++-- 3 files changed, 46 insertions(+), 20 deletions(-) commit e4eb275ac5cfe71686612d929a9829345b2a4ada Author: Johannes Berg Date: Wed Mar 15 10:22:06 2017 +0100 iwlwifi: mvm: remove unused REPLY_MAX This value is unused, and there's no reason we'd ever use it. Just remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 2 -- 1 file changed, 2 deletions(-) commit 69d22e737e07c37def4674ef4e8fe63fef8a654c Author: Johannes Berg Date: Wed Mar 15 10:02:23 2017 +0100 iwlwifi: kernel-doc: make proper links Using %enum instead of &enum (and in one case, %struct) results in the wrong parsing. Fix that so that if documentation is generated, the result is clickable links. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-error-dump.h | 8 ++++---- drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 10 +++++----- drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-power.h | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) commit b1e06c65fb69c5e3fddcd91987561e225eaa9bfa Author: Johannes Berg Date: Wed Mar 15 09:53:13 2017 +0100 iwlwifi: mvm: remove unused TX_CMD_NEXT_FRAME_* Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 25 +--------------------- 1 file changed, 1 insertion(+), 24 deletions(-) commit 0705b953eee4fe20b01ff8e13b8f32c7eac78446 Author: Haim Dreyfuss Date: Thu Mar 9 15:18:58 2017 +0200 iwlwifi: Add fw_name_pre_rf_next_step to support different rf steps Integrated chip may have different HW and RF steps. Currently, the driver supports only different HW steps. Add logic to support different RF steps enables combining different HW and RF steps. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 6 ++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 3 +++ drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 5 +++++ drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 4 ++++ 4 files changed, 18 insertions(+) commit 5538409ba3935aa1ecaff8255137c3a6a19e0a30 Author: Liad Kaufman Date: Sun Mar 12 11:09:58 2017 +0200 iwlwifi: pcie: support page dumping in wrt in gen2 In gen2, page dumping needs to be done in the trans layer, as it is the one with access to the paging pointers. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 2ba57c8bf9d4dbeb5d23c0ee94ace119e8ea41c9 Author: Liad Kaufman Date: Sun Mar 12 11:00:04 2017 +0200 iwlwifi: mvm: remove wrt support of page dumps in gen2 In gen2, page dumping should be done in transport layer, since the addresses needed for the paging mechanism reside there. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 15fc196d6ec388f724093f4950b5927efd31d5b8 Author: Johannes Berg Date: Fri Mar 10 14:01:42 2017 +0100 iwlwifi: mvm: document structures used by commands Add documentation to a lot of command IDs that links to the appropriate structure(s) used with those IDs. In one case, actually add and use a new struct for that purpose. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/coex.c | 3 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 218 ++++++++++++++++++++++-- 2 files changed, 209 insertions(+), 12 deletions(-) commit d69f0a2d88dd7c8e82f027d2d48238426c45e07e Author: Johannes Berg Date: Tue Mar 14 10:58:16 2017 +0100 iwlwifi: mvm: create/name various enums Some values should be in enums so documentation can refer to them, some values should be named for the same reason. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 10 +++- .../net/wireless/intel/iwlwifi/mvm/fw-api-stats.h | 25 +++++++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 61 +++++++++++++++++----- 3 files changed, 77 insertions(+), 19 deletions(-) commit 4d151c2e22532d1167370349ed71125ac2dd5228 Author: Johannes Berg Date: Tue Mar 14 11:04:06 2017 +0100 iwlwifi: mvm: disentangle binding command versions The comments/size of the different binding commands get lost in documentation, so introduce two different command structs that can be used there. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit a85281ebdef114bde8fc93fa99c79f1c567f23d8 Author: Sara Sharon Date: Sun Mar 12 10:34:10 2017 +0200 iwlwifi: update device ID for a000 family Three configurations will share device ID 2720, and will be differentiated by RF ID. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 3 ++- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) commit 676258651742e69cd77460ea62a591be1aaf2f0e Author: Johannes Berg Date: Tue Mar 14 11:01:27 2017 +0100 iwlwifi: mvm: add documentation links to various fields Link various fields to the documentation of the enums that define their values. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-coex.h | 10 +++---- .../net/wireless/intel/iwlwifi/mvm/fw-api-mac.h | 10 +++---- .../net/wireless/intel/iwlwifi/mvm/fw-api-power.h | 4 +-- .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 14 +++++----- .../net/wireless/intel/iwlwifi/mvm/fw-api-stats.h | 4 +++ drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 4 +-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 31 +++++++++++++--------- 7 files changed, 45 insertions(+), 32 deletions(-) commit 31a658b2afc7bff8a4d51418677b579d85060b31 Author: Johannes Berg Date: Thu Mar 9 15:56:57 2017 +0100 iwlwifi: mvm: fix some kernel-doc This mostly fixes missing tags/struct names, but also some other things. Lots of issues remain though. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 4 +- .../net/wireless/intel/iwlwifi/mvm/fw-api-power.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rx.h | 7 +-- .../net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 32 +++++------ .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 22 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 17 +++--- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 62 +++++++++++----------- 7 files changed, 78 insertions(+), 68 deletions(-) commit 0b90964a265d6e0b60182b88f3947c6ef0ae4184 Author: Sara Sharon Date: Thu Mar 9 13:09:03 2017 +0200 iwlwifi: mvm: wait for the flushed queue only The function flushed only agg queue and no more traffic is queued on it. However, it waits for all queues to empty, which is not necessary and may take more time. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 816dc0bc549a34673ef6533b3cb9c135c0b869f6 Author: Johannes Berg Date: Tue Mar 14 10:55:09 2017 +0100 iwlwifi: mvm: add documentation to some WoWLAN commands Add some documentation for the WoWLAN commands, also linking the correct enums used. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-d3.h | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 3b43fbcac4765ac5f7b92464b7d9685eaa34467b Author: Johannes Berg Date: Mon Mar 13 21:48:39 2017 +0100 iwlwifi: mvm: disentangle paging command structs Instead of using a union and hard-coding the size difference, declare both command structs properly, use a union on the stack to build them and the right sizeof() for the size. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 29 +++++++++++++++++++------ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 19 +++++++++------- 2 files changed, 33 insertions(+), 15 deletions(-) commit aed35826d67f31afe010c1d25d204badf7057a25 Author: Johannes Berg Date: Mon Mar 13 12:47:37 2017 +0100 iwlwifi: mvm: use u8 for reserved fields There's no saying what kind of type a reserved field will get in the future, so use u8 arrays to reserve space. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-stats.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 56c1f3c4bd1ee04f8032345fba97cff616fea22a Author: Johannes Berg Date: Mon Mar 13 12:07:52 2017 +0100 iwlwifi: mvm: fix MCC endianness bug Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3dc6dd9698174b2cf6d078ddfba39ff8640afe47 Author: Johannes Berg Date: Thu Mar 9 14:08:51 2017 +0100 iwlwifi: mvm: use proper sta_addr in firmware API There's no point to declare an address as a __le32/__le16 and then only take a pointer to it anyway, change that to just a sta_addr[ETH_ALEN]. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 6 ++---- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit 72361c3d28cf4102b7b514609d3710707b1a1096 Author: Johannes Berg Date: Thu Mar 9 17:06:45 2017 +0100 iwlwifi: mvm: document which group enums are used with which group ID Make it explicit which command definition enum is supposed to be used with which command group, rather than relying on being able to figure it out by name. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 27 ++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit 6909afcade61f760b528118ccb837c8506c23cc1 Author: Johannes Berg Date: Mon Mar 13 13:40:23 2017 +0100 iwlwifi: mvm: fix endianness in lq_cmd declaration This member doesn't seem to be used, so this doesn't really fix anything, but it's better to have the right type there. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4f3695eccf9481801d42bebc7a282c5a2af7281 Author: Sara Sharon Date: Mon Mar 6 11:13:02 2017 +0200 iwlwifi: mvm: support old method of NVM parsing Add configuration for allowing driver's nvm parsing and bypassing the new host command, for debugging. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit e9e1ba3dbf00bb2eed4e681ae59f433e45d2e78f Author: Sara Sharon Date: Sun Jan 8 16:46:14 2017 +0200 iwlwifi: mvm: support getting nvm data from firmware This API replaces the complex NVM parsing of the iwlwifi module. Instead, we get all needed data from firmware. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 77 +++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 37 +++++----- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 90 ++++++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 9 ++- 6 files changed, 194 insertions(+), 22 deletions(-) commit f718d426d7e42eec6e5d2932f52a51de23bd3b30 Author: Matt Brown Date: Wed May 24 09:45:59 2017 +1000 powerpc/lib/xor_vmx: Ensure no altivec code executes before enable_kernel_altivec() The xor_vmx.c file is used for the RAID5 xor operations. In these functions altivec is enabled to run the operation and then disabled. The code uses enable_kernel_altivec() around the core of the algorithm, however the whole file is built with -maltivec, so the compiler is within its rights to generate altivec code anywhere. This has been seen at least once in the wild: 0:mon> di $xor_altivec_2 c0000000000b97d0 3c4c01d9 addis r2,r12,473 c0000000000b97d4 3842db30 addi r2,r2,-9424 c0000000000b97d8 7c0802a6 mflr r0 c0000000000b97dc f8010010 std r0,16(r1) c0000000000b97e0 60000000 nop c0000000000b97e4 7c0802a6 mflr r0 c0000000000b97e8 faa1ffa8 std r21,-88(r1) ... c0000000000b981c f821ff41 stdu r1,-192(r1) c0000000000b9820 7f8101ce stvx v28,r1,r0 <-- POP c0000000000b9824 38000030 li r0,48 c0000000000b9828 7fa101ce stvx v29,r1,r0 ... c0000000000b984c 4bf6a06d bl c0000000000238b8 # enable_kernel_altivec This patch splits the non-altivec code into xor_vmx_glue.c which calls the altivec functions in xor_vmx.c. By compiling xor_vmx_glue.c without -maltivec we can guarantee that altivec instruction will not be executed outside of the enable/disable block. Signed-off-by: Matt Brown [mpe: Rework change log and include disassembly] Signed-off-by: Michael Ellerman arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/xor_vmx.c | 53 ++++++++--------------------------- arch/powerpc/lib/xor_vmx.h | 20 +++++++++++++ arch/powerpc/lib/xor_vmx_glue.c | 62 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 43 deletions(-) commit 48a316e350974739235c234430ec0e129f864a43 Author: Hari Bathini Date: Fri Jun 2 13:00:27 2017 +0530 powerpc/fadump: Set an upper limit for boot memory size By default, 5% of system RAM is reserved for preserving boot memory. Alternatively, a user can specify the amount of memory to reserve. See Documentation/powerpc/firmware-assisted-dump.txt for details. In addition to the memory reserved for preserving boot memory, some more memory is reserved, to save HPTE region, CPU state data and ELF core headers. Memory Reservation during first kernel looks like below: Low memory Top of memory 0 boot memory size | | | |<--Reserved dump area -->| V V | Permanent Reservation V +-----------+----------/ /----------+---+----+-----------+----+ | | |CPU|HPTE| DUMP |ELF | +-----------+----------/ /----------+---+----+-----------+----+ | ^ | | \ / ------------------------------------------- Boot memory content gets transferred to reserved area by firmware at the time of crash This implicitly means that the sum of the sizes of boot memory, CPU state data, HPTE region, DUMP preserving area and ELF core headers can't be greater than the total memory size. But currently, a user is allowed to specify any value as boot memory size. So, the above rule is violated when a boot memory size around 50% of the total available memory is specified. As the kernel is not handling this currently, it may lead to undefined behavior. Fix it by setting an upper limit for boot memory size to 25% of the total available memory. Also, instead of using memblock_end_of_DRAM(), which doesn't take the holes, if any, in the memory layout into account, use memblock_phys_mem_size() to calculate the percentage of total available memory. Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman arch/powerpc/include/asm/fadump.h | 3 +++ arch/powerpc/kernel/fadump.c | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit e7467dc6947d7074417aa4cda44b851010fd0795 Author: Hari Bathini Date: Mon May 22 15:04:47 2017 +0530 powerpc/fadump: Update comment about offset where fadump is reserved With commit f6e6bedb7731 ("powerpc/fadump: Reserve memory at an offset closer to bottom of RAM"), memory for fadump is no longer reserved at the top of RAM. But there are still a few places which say so. Change them appropriately. Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman Documentation/powerpc/firmware-assisted-dump.txt | 4 ++-- arch/powerpc/kernel/fadump.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 81d9eca502fcc360950ef476124626d97856e139 Author: Hari Bathini Date: Mon May 22 15:04:23 2017 +0530 powerpc/fadump: Add a warning when 'fadump_reserve_mem=' is used With commit 11550dc0a00b ("powerpc/fadump: reuse crashkernel parameter for fadump memory reservation"), 'fadump_reserve_mem=' parameter is deprecated in favor of 'crashkernel=' parameter. Add a warning if 'fadump_reserve_mem=' is still used. Fixes: 11550dc0a00b ("powerpc/fadump: reuse crashkernel parameter for fadump memory reservation") Suggested-by: Prarit Bhargava Signed-off-by: Hari Bathini [mpe: Unsplit long printk strings] Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit d49394a131060fda209ba91e903c9d6316db2e4d Author: Sara Sharon Date: Sun Mar 5 13:01:08 2017 +0200 iwlwifi: mvm: flush per station for DQA mode Avoid using the global flush and move to flush per station whenever possible in DQA mode. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 26 ++++++++++++---------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 6 ++++- .../net/wireless/intel/iwlwifi/mvm/time-event.c | 5 ++++- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 17 ++++++++++++++ 5 files changed, 42 insertions(+), 14 deletions(-) commit a57bf53e294d2919f2bd1e0817c63105adf3c023 Author: Jose Abreu Date: Thu May 25 15:19:21 2017 +0100 drm/atmel-hlcdc: Use crtc->mode_valid() callback Now that we have a callback to check if crtc supports a given mode we can use it in atmel-hlcdc so that we restrict the number of probbed modes to the ones we can actually display. Also, remove the mode_fixup() callback as this is no longer needed because mode_valid() will be called before. Signed-off-by: Jose Abreu Signed-off-by: Boris Brezillon Link: http://patchwork.freedesktop.org/patch/msgid/95fd6c06c58bd0b957e36a8d7068e6a74b581304.1495720737.git.joabreu@synopsys.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 10 +++++----- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 5 +++-- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 5 +++-- 3 files changed, 11 insertions(+), 9 deletions(-) commit 98b8cd7f75643e0a442d7a4c1cef2c9d53b7e92b Author: Michal Suchanek Date: Sat May 27 17:46:15 2017 +0200 powerpc/fadump: Return error when fadump registration fails - log an error message when registration fails and no error code listed in the switch is returned - translate the hv error code to posix error code and return it from fw_register - return the posix error code from fw_register to the process writing to sysfs - return EEXIST on re-registration - return success on deregistration when fadump is not registered - return ENODEV when no memory is reserved for fadump Signed-off-by: Michal Suchanek Tested-by: Hari Bathini [mpe: Use pr_err() to shrink the error print] Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit f782ddf297318d544bf71ee1e8afbac8d55f1878 Author: Christophe Leroy Date: Fri Apr 21 13:18:52 2017 +0200 powerpc: Remove __ilog2()s and use generic ones With the __ilog2() function as defined in arch/powerpc/include/asm/bitops.h, GCC will not optimise the code in case of constant parameter. The generic ilog2() function in include/linux/log2.h is written to handle the case of the constant parameter. This patch discards the three __ilog2() functions and defines __ilog2() as ilog2() For non constant calls, the generated code is doing the same: int test__ilog2(unsigned long x) { return __ilog2(x); } int test__ilog2_u32(u32 n) { return __ilog2_u32(n); } int test__ilog2_u64(u64 n) { return __ilog2_u64(n); } On PPC32 before the patch: 00000000 : 0: 7c 63 00 34 cntlzw r3,r3 4: 20 63 00 1f subfic r3,r3,31 8: 4e 80 00 20 blr 0000000c : c: 7c 63 00 34 cntlzw r3,r3 10: 20 63 00 1f subfic r3,r3,31 14: 4e 80 00 20 blr On PPC32 after the patch: 00000000 : 0: 7c 63 00 34 cntlzw r3,r3 4: 20 63 00 1f subfic r3,r3,31 8: 4e 80 00 20 blr 0000000c : c: 7c 63 00 34 cntlzw r3,r3 10: 20 63 00 1f subfic r3,r3,31 14: 4e 80 00 20 blr On PPC64 before the patch: 0000000000000000 <.test__ilog2>: 0: 7c 63 00 74 cntlzd r3,r3 4: 20 63 00 3f subfic r3,r3,63 8: 7c 63 07 b4 extsw r3,r3 c: 4e 80 00 20 blr 0000000000000010 <.test__ilog2_u32>: 10: 7c 63 00 34 cntlzw r3,r3 14: 20 63 00 1f subfic r3,r3,31 18: 7c 63 07 b4 extsw r3,r3 1c: 4e 80 00 20 blr 0000000000000020 <.test__ilog2_u64>: 20: 7c 63 00 74 cntlzd r3,r3 24: 20 63 00 3f subfic r3,r3,63 28: 7c 63 07 b4 extsw r3,r3 2c: 4e 80 00 20 blr On PPC64 after the patch: 0000000000000000 <.test__ilog2>: 0: 7c 63 00 74 cntlzd r3,r3 4: 20 63 00 3f subfic r3,r3,63 8: 7c 63 07 b4 extsw r3,r3 c: 4e 80 00 20 blr 0000000000000010 <.test__ilog2_u32>: 10: 7c 63 00 34 cntlzw r3,r3 14: 20 63 00 1f subfic r3,r3,31 18: 7c 63 07 b4 extsw r3,r3 1c: 4e 80 00 20 blr 0000000000000020 <.test__ilog2_u64>: 20: 7c 63 00 74 cntlzd r3,r3 24: 20 63 00 3f subfic r3,r3,63 28: 7c 63 07 b4 extsw r3,r3 2c: 4e 80 00 20 blr Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 8 -------- arch/powerpc/include/asm/bitops.h | 27 +-------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) commit 22ef33b368a3992b30b63606062902e9b139cd4e Author: Christophe Leroy Date: Fri Apr 21 13:18:50 2017 +0200 powerpc: Replace ffz() by equivalent generic function With the ffz() function as defined in arch/powerpc/include/asm/bitops.h GCC will not optimise the code in case of constant parameter. This patch replaces ffz() by the generic function. The generic ffz(x) expects to never be called with ~x == 0 as written in the comment in include/asm-generic/bitops/ffz.h The only user of ffz() within arch/powerpc/ is platforms/512x/mpc5121_ads_cpld.c, which checks if x is not 0xff For non constant calls, the generated code is doing the same: unsigned long testffz(unsigned long x) { return ffz(x); } On PPC32, before the patch: 00000018 : 18: 7c 63 18 f9 not. r3,r3 1c: 40 82 00 0c bne 28 20: 38 60 00 20 li r3,32 24: 4e 80 00 20 blr 28: 7d 23 00 d0 neg r9,r3 2c: 7d 23 18 38 and r3,r9,r3 30: 7c 63 00 34 cntlzw r3,r3 34: 20 63 00 1f subfic r3,r3,31 38: 4e 80 00 20 blr On PPC32, after the patch: 00000018 : 18: 39 23 00 01 addi r9,r3,1 1c: 7d 23 18 78 andc r3,r9,r3 20: 7c 63 00 34 cntlzw r3,r3 24: 20 63 00 1f subfic r3,r3,31 28: 4e 80 00 20 blr On PPC64, before the patch: 0000000000000030 <.testffz>: 30: 7c 60 18 f9 not. r0,r3 34: 38 60 00 40 li r3,64 38: 4d 82 00 20 beqlr 3c: 7c 60 00 d0 neg r3,r0 40: 7c 63 00 38 and r3,r3,r0 44: 7c 63 00 74 cntlzd r3,r3 48: 20 63 00 3f subfic r3,r3,63 4c: 7c 63 07 b4 extsw r3,r3 50: 4e 80 00 20 blr On PPC64, after the patch: 0000000000000030 <.testffz>: 30: 38 03 00 01 addi r0,r3,1 34: 7c 03 18 78 andc r3,r0,r3 38: 7c 63 00 74 cntlzd r3,r3 3c: 20 63 00 3f subfic r3,r3,63 40: 4e 80 00 20 blr Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/bitops.h | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 2fcff790dcb419af1545cbd6bba7a04f2d90938f Author: Christophe Leroy Date: Fri Apr 21 13:18:48 2017 +0200 powerpc: Use builtin functions for fls()/__fls()/fls64() With the fls() functions as defined in arch/powerpc/include/asm/bitops.h GCC will not optimise the code in case of constant parameter. This patch replaces __fls() by the builtin function, and modifies fls() and fls64() to use builtins instead of inline assembly For non constant calls, the generated code is doing the same: int testfls(unsigned int x) { return fls(x); } unsigned long test__fls(unsigned long x) { return __fls(x); } int testfls64(__u64 x) { return fls64(x); } On PPC32, before the patch: 00000064 : 64: 7c 63 00 34 cntlzw r3,r3 68: 20 63 00 20 subfic r3,r3,32 6c: 4e 80 00 20 blr 00000070 : 70: 7c 63 00 34 cntlzw r3,r3 74: 20 63 00 1f subfic r3,r3,31 78: 4e 80 00 20 blr 0000007c : 7c: 2c 03 00 00 cmpwi r3,0 80: 40 82 00 10 bne 90 84: 7c 83 00 34 cntlzw r3,r4 88: 20 63 00 20 subfic r3,r3,32 8c: 4e 80 00 20 blr 90: 7c 63 00 34 cntlzw r3,r3 94: 20 63 00 40 subfic r3,r3,64 98: 4e 80 00 20 blr On PPC32, after the patch: 00000054 : 54: 7c 63 00 34 cntlzw r3,r3 58: 20 63 00 20 subfic r3,r3,32 5c: 4e 80 00 20 blr 00000060 : 60: 7c 63 00 34 cntlzw r3,r3 64: 20 63 00 1f subfic r3,r3,31 68: 4e 80 00 20 blr 0000006c : 6c: 2c 03 00 00 cmpwi r3,0 70: 41 82 00 10 beq 80 74: 7c 63 00 34 cntlzw r3,r3 78: 20 63 00 40 subfic r3,r3,64 7c: 4e 80 00 20 blr 80: 7c 83 00 34 cntlzw r3,r4 84: 20 63 00 40 subfic r3,r3,32 88: 4e 80 00 20 blr On PPC64, before the patch: 00000000000000a0 <.testfls>: a0: 7c 63 00 34 cntlzw r3,r3 a4: 20 63 00 20 subfic r3,r3,32 a8: 7c 63 07 b4 extsw r3,r3 ac: 4e 80 00 20 blr 00000000000000b0 <.test__fls>: b0: 7c 63 00 74 cntlzd r3,r3 b4: 20 63 00 3f subfic r3,r3,63 b8: 7c 63 07 b4 extsw r3,r3 bc: 4e 80 00 20 blr 00000000000000c0 <.testfls64>: c0: 7c 63 00 74 cntlzd r3,r3 c4: 20 63 00 40 subfic r3,r3,64 c8: 7c 63 07 b4 extsw r3,r3 cc: 4e 80 00 20 blr On PPC64, after the patch: 0000000000000090 <.testfls>: 90: 7c 63 00 34 cntlzw r3,r3 94: 20 63 00 20 subfic r3,r3,32 98: 7c 63 07 b4 extsw r3,r3 9c: 4e 80 00 20 blr 00000000000000a0 <.test__fls>: a0: 7c 63 00 74 cntlzd r3,r3 a4: 20 63 00 3f subfic r3,r3,63 a8: 4e 80 00 20 blr ac: 60 00 00 00 nop 00000000000000b0 <.testfls64>: b0: 7c 63 00 74 cntlzd r3,r3 b4: 20 63 00 40 subfic r3,r3,64 b8: 7c 63 07 b4 extsw r3,r3 bc: 4e 80 00 20 blr Those builtins have been in GCC since at least 3.4.6 (see https://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Other-Builtins.html ) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/bitops.h | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit f83647d642270f6b9d75736817fb5a66273ec903 Author: Christophe Leroy Date: Fri Apr 21 13:18:46 2017 +0200 powerpc: Discard ffs()/__ffs() function and use builtin functions instead With the ffs() function as defined in arch/powerpc/include/asm/bitops.h GCC will not optimise the code in case of constant parameter, as shown by the small exemple below. int ffs_test(void) { return 4 << ffs(31); } c0012334 : c0012334: 39 20 00 01 li r9,1 c0012338: 38 60 00 04 li r3,4 c001233c: 7d 29 00 34 cntlzw r9,r9 c0012340: 21 29 00 20 subfic r9,r9,32 c0012344: 7c 63 48 30 slw r3,r3,r9 c0012348: 4e 80 00 20 blr With this patch, the same function will compile as follows: c0012334 : c0012334: 38 60 00 08 li r3,8 c0012338: 4e 80 00 20 blr The same happens with __ffs() For non constant calls, the generated code is doing the same, allthought it is slightly different on 64 bits for ffs(): unsigned long test__ffs(unsigned long x) { return __ffs(x); } int testffs(int x) { return ffs(x); } On PPC32, before the patch: 0000003c : 3c: 7d 23 00 d0 neg r9,r3 40: 7d 23 18 38 and r3,r9,r3 44: 7c 63 00 34 cntlzw r3,r3 48: 20 63 00 1f subfic r3,r3,31 4c: 4e 80 00 20 blr 00000050 : 50: 7d 23 00 d0 neg r9,r3 54: 7d 23 18 38 and r3,r9,r3 58: 7c 63 00 34 cntlzw r3,r3 5c: 20 63 00 20 subfic r3,r3,32 60: 4e 80 00 20 blr On PPC32, after the patch: 0000002c : 2c: 7d 23 00 d0 neg r9,r3 30: 7d 23 18 38 and r3,r9,r3 34: 7c 63 00 34 cntlzw r3,r3 38: 20 63 00 1f subfic r3,r3,31 3c: 4e 80 00 20 blr 00000040 : 40: 7d 23 00 d0 neg r9,r3 44: 7d 23 18 38 and r3,r9,r3 48: 7c 63 00 34 cntlzw r3,r3 4c: 20 63 00 20 subfic r3,r3,32 50: 4e 80 00 20 blr On PPC64, before the patch: 0000000000000060 <.test__ffs>: 60: 7c 03 00 d0 neg r0,r3 64: 7c 03 18 38 and r3,r0,r3 68: 7c 63 00 74 cntlzd r3,r3 6c: 20 63 00 3f subfic r3,r3,63 70: 7c 63 07 b4 extsw r3,r3 74: 4e 80 00 20 blr 0000000000000080 <.testffs>: 80: 7c 03 00 d0 neg r0,r3 84: 7c 03 18 38 and r3,r0,r3 88: 7c 63 00 74 cntlzd r3,r3 8c: 20 63 00 40 subfic r3,r3,64 90: 7c 63 07 b4 extsw r3,r3 94: 4e 80 00 20 blr On PPC64, after the patch: 0000000000000050 <.test__ffs>: 50: 7c 03 00 d0 neg r0,r3 54: 7c 03 18 38 and r3,r0,r3 58: 7c 63 00 74 cntlzd r3,r3 5c: 20 63 00 3f subfic r3,r3,63 60: 4e 80 00 20 blr 0000000000000070 <.testffs>: 70: 7c 03 00 d0 neg r0,r3 74: 7c 03 18 38 and r3,r0,r3 78: 7c 63 00 34 cntlzw r3,r3 7c: 20 63 00 20 subfic r3,r3,32 80: 7c 63 07 b4 extsw r3,r3 84: 4e 80 00 20 blr (ffs() operates on an int so cntlzw is equivalent to cntlzd) In addition, when reading the generated vmlinux, we can observe that with the builtin functions, GCC sometimes efficiently spreads the instructions within the generated functions while the inline assembly force them to remain grouped together. __builtin_ffs() is already used in arch/powerpc/include/asm/page_32.h Those builtins have been in GCC since at least 3.4.6 (see https://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Other-Builtins.html ) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/bitops.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 45cb08f4791ce6a15c54598b4cb73db4b4b8294f Author: Christophe Leroy Date: Thu Mar 16 09:55:45 2017 +0100 powerpc: Handle simultaneous interrupts at once It often happens to have simultaneous interrupts, for instance when having double Ethernet attachment. With the current implementation, we suffer the cost of kernel entry/exit for each interrupt. This patch introduces a loop in __do_irq() to handle all interrupts at once before returning. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/kernel/irq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3c29b6038828c1f4c9ecbfec14d4fc5e25f1c947 Author: Christophe Leroy Date: Fri Mar 10 11:37:01 2017 +0100 powerpc/8xx: fix mpc8xx_get_irq() return on no irq IRQ 0 is a valid HW interrupt. So get_irq() shall return 0 when there is no irq, instead of returning irq_linear_revmap(... ,0) Fixes: f2a0bd3753dad ("[POWERPC] 8xx: powerpc port of core CPM PIC") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/sysdev/mpc8xx_pic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 362957c27ed0d9ff485d3266ed22d944cbfea6cc Author: Christophe Leroy Date: Fri Aug 5 13:28:05 2016 +0200 powerpc/40x: Clear MSR_DR in one insn instead of two Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/kernel/misc_32.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 92aa2fe039835a73fec335517652de32eeb58e0a Author: Christophe Leroy Date: Wed Apr 19 14:56:32 2017 +0200 powerpc/mm: The 8xx doesn't call do_page_fault() for breakpoints The 8xx has a dedicated exception for breakpoints, that directly calls do_break() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da929f6af4689c75868dc373b4549f53945b5af0 Author: Christophe Leroy Date: Wed Apr 19 14:56:30 2017 +0200 powerpc/mm: Evaluate user_mode(regs) only once in do_page_fault() Analysis of the assembly code shows that when using user_mode(regs), at least the 'andi.' is redone all the time, and also the 'lwz ,132(r31)' most of the time. With the new form, the 'is_user' is mapped to cr4, then all further use of is_user results in just things like 'beq cr4,218 ' Without the patch: 50: 81 1e 00 84 lwz r8,132(r30) 54: 71 09 40 00 andi. r9,r8,16384 58: 40 82 00 0c bne 64 84: 81 3e 00 84 lwz r9,132(r30) 8c: 71 2a 40 00 andi. r10,r9,16384 90: 41 a2 01 64 beq 1f4 d4: 81 3e 00 84 lwz r9,132(r30) dc: 71 28 40 00 andi. r8,r9,16384 e0: 41 82 02 08 beq 2e8 108: 81 3e 00 84 lwz r9,132(r30) 110: 71 28 40 00 andi. r8,r9,16384 118: 41 82 02 28 beq 340 1e4: 81 3e 00 84 lwz r9,132(r30) 1e8: 71 2a 40 00 andi. r10,r9,16384 1ec: 40 82 01 68 bne 354 228: 81 3e 00 84 lwz r9,132(r30) 22c: 71 28 40 00 andi. r8,r9,16384 230: 41 82 ff c4 beq 1f4 288: 71 2a 40 00 andi. r10,r9,16384 294: 41 a2 fe 60 beq f4 50c: 81 3e 00 84 lwz r9,132(r30) 514: 71 2a 40 00 andi. r10,r9,16384 518: 40 a2 fc e0 bne 1f8 534: 81 3e 00 84 lwz r9,132(r30) 53c: 71 2a 40 00 andi. r10,r9,16384 540: 41 82 fc b8 beq 1f8 This patch creates a local var called 'is_user' which contains the result of user_mode(regs) With the patch: 20: 81 03 00 84 lwz r8,132(r3) 48: 55 09 97 fe rlwinm r9,r8,18,31,31 58: 2e 09 00 00 cmpwi cr4,r9,0 5c: 40 92 00 0c bne cr4,68 88: 41 b2 01 90 beq cr4,218 d4: 40 92 01 d0 bne cr4,2a4 120: 41 b2 00 f8 beq cr4,218 138: 41 b2 ff a0 beq cr4,d8 1d4: 40 92 00 e0 bne cr4,2b4 Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 97a011e69b42bec8ac10f8510d3cd73b50882d88 Author: Christophe Leroy Date: Wed Apr 19 14:56:28 2017 +0200 powerpc/mm: Remove a redundant test in do_page_fault() The result of (trap == 0x400) is already in is_exec. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8de85ca32f572f5dee00733022d8a1ce87aed3d Author: Christophe Leroy Date: Wed Apr 19 14:56:24 2017 +0200 powerpc/mm: Only call store_updates_sp() on stores in do_page_fault() Function store_updates_sp() checks whether the faulting instruction is a store updating r1. Therefore we can limit its calls to store exceptions. This patch is an improvement of commit a7a9dcd882a67 ("powerpc: Avoid taking a data miss on every userspace instruction miss") With the same microbenchmark app, run with 500 as argument, on an MPC885 we get: Before this patch: 152000 DTLB misses After this patch: 147000 DTLB misses Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9affa9e228d3ece66ed322909e84cfb08f6c4c64 Author: Christophe Leroy Date: Mon May 29 17:32:06 2017 +0200 powerpc/mm: Remove __this_fixmap_does_not_exist() This function has not been used since commit 9494a1e8428ea ("powerpc: use generic fixmap.h) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable_32.c | 5 ----- 1 file changed, 5 deletions(-) commit e63739b1687ea37390e5463f43d0547477d324e3 Author: Balbir Singh Date: Thu May 25 13:36:50 2017 +1000 powerpc/mm/ptdump: Dump the first entry of the linear mapping as well The check in hpte_find() should be < and not <= for PAGE_OFFSET Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/dump_hashpagetable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9548c55295a4268f9187e1ec93264a0682fa745 Author: John Youn Date: Fri Apr 28 12:55:20 2017 +0400 usb: gadget: Allow a non-SuperSpeed gadget to support LPM This commit allows a gadget that does not support SuperSpeed to indicate that it supports LPM. It does this by setting the 'lpm_capable' flag in the gadget structure. If a gadget sets this, the composite gadget framework will set the bcdUSB to 0x0201 to indicate that this supports BOS descriptors, and also return a USB 2.0 Extension descriptor as part of the BOS descriptor set. See USB 2.0 LPM ECN Section 3. Signed-off-by: John Youn Signed-off-by: Sevak Arakelyan Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 8 ++++++-- include/linux/usb/gadget.h | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) commit 0b67a6be14be5fb050b0358022c497d0619ebc40 Author: John Youn Date: Fri Apr 28 12:55:14 2017 +0400 usb: gadget: composite: Exclude SS Dev Cap Desc Don't send the SuperSpeed USB Device Capability descriptor if the gadget is not capable of SuperSpeed. Signed-off-by: John Youn Signed-off-by: Sevak Arakelyan Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 51 +++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 23 deletions(-) commit e16828cf945ca11b05df1cc755af8e4b669f6dd3 Author: Jerry Zhang Date: Tue Apr 18 16:11:48 2017 -0700 usb: gadget: function: f_fs: Move epfile waitqueue to ffs_data. There were individual waitqueues for each epfile but eps_enable would iterate through all of them, resulting in essentially the same wakeup time. The waitqueue represents the function being enabled, so a central waitqueue in ffs_data makes more sense and is less redundant. Also use wake_up_interruptible to reflect use of wait_event_interruptible. Acked-by: Michal Nazarewicz Signed-off-by: Jerry Zhang Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 19 ++++++++++--------- drivers/usb/gadget/function/u_fs.h | 3 +++ 2 files changed, 13 insertions(+), 9 deletions(-) commit 222155de45573e978cda988b7efc7d4e7b9a8ff9 Author: Jerry Zhang Date: Wed Apr 19 18:23:38 2017 -0700 usb: gadget: function: f_fs: Let ffs_epfile_ioctl wait for enable. This allows users to make an ioctl call as the first action on a connection. Ex, some functions might want to get endpoint size before making any i/os. Previously, calling ioctls before read/write would depending on the timing of endpoints being enabled. ESHUTDOWN is now a possible return value and ENODEV is not, so change docs accordingly. Acked-by: Michal Nazarewicz Signed-off-by: Jerry Zhang Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 93 +++++++++++++++++++++---------------- include/uapi/linux/usb/functionfs.h | 7 +-- 2 files changed, 58 insertions(+), 42 deletions(-) commit 8a8b161df5ce06ef5a315899f83978e765be09e8 Author: Stefan Agner Date: Sun Apr 16 20:12:50 2017 -0700 usb: gadget: remove redundant self assignment The assignment ret = ret is redundant and can be removed. Reviewed-by: Krzysztof Opasiak Reviewed-by: Peter Chen Signed-off-by: Stefan Agner Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b0b3ddf8fb37283d0d488d667fac4c069d612ba3 Author: Felipe Balbi Date: Tue May 9 16:30:24 2017 +0300 usb: move ReST documentation to Documentation/driver-api/usb/ This is where all other USB ReST documentation has moved to. Signed-off-by: Felipe Balbi Documentation/driver-api/usb/index.rst | 2 + Documentation/driver-api/usb/typec.rst | 184 +++++++++++++++++++++++ Documentation/driver-api/usb/usb3-debug-port.rst | 100 ++++++++++++ Documentation/usb/typec.rst | 184 ----------------------- Documentation/usb/usb3-debug-port.rst | 100 ------------ 5 files changed, 286 insertions(+), 284 deletions(-) commit 8b4cfe0bb7a4117087e2431d668ab79faabe3faa Author: Felipe Balbi Date: Wed Apr 19 15:02:20 2017 +0300 usb: dwc3: add ReST documentation Document a few details about DWC3 in order to help people report bugs and debug DWC3. Signed-off-by: Felipe Balbi Documentation/driver-api/usb/dwc3.rst | 712 +++++++++++++++++++++++++++++++++ Documentation/driver-api/usb/index.rst | 1 + 2 files changed, 713 insertions(+) commit af32423a2d866a3263552b000a70c11cffbd2b55 Author: Felipe Balbi Date: Wed Apr 26 16:09:09 2017 +0300 usb: dwc3: trace: decode ctrl request Instead of *always* dumping raw ctrl bytes, let's decode standard requests which will make the lives of those debugging DWC3 quite a bit easier. Output will now look like so: irq/34-dwc3-1594 [000] d..1 107.573081: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 107.573694: dwc3_ctrl_req: Set Address(Addr = 01) irq/34-dwc3-1594 [000] d..1 107.588319: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 107.588816: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9) irq/34-dwc3-1594 [000] d..1 107.589191: dwc3_ctrl_req: Set Configuration(Config = 3) irq/34-dwc3-1594 [000] d..1 107.589846: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 5) irq/34-dwc3-1594 [000] d..1 107.590146: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 22) irq/34-dwc3-1594 [000] d..1 107.590546: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9) irq/34-dwc3-1594 [000] d..1 107.590840: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 69) irq/34-dwc3-1594 [000] d..1 107.591138: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 9) irq/34-dwc3-1594 [000] d..1 107.591541: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 32) irq/34-dwc3-1594 [000] d..1 107.591834: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.701005: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.721080: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.722709: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.728979: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.730544: dwc3_ctrl_req: Get Device Qualifier Descriptor(Index = 0, Length = 10) irq/34-dwc3-1594 [000] d..1 115.776018: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9) irq/34-dwc3-1594 [000] d..1 115.776760: dwc3_ctrl_req: Set Configuration(Config = 0) irq/34-dwc3-1594 [000] d..1 115.777676: dwc3_ctrl_req: Get Configuration(Length = 1) irq/34-dwc3-1594 [000] d..1 115.924797: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 115.929025: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500) irq/34-dwc3-1594 [000] d..1 115.929566: dwc3_ctrl_req: Get String Descriptor(Index = 1, Length = 500) irq/34-dwc3-1594 [000] d..1 115.930911: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500) irq/34-dwc3-1594 [000] d..1 115.931528: dwc3_ctrl_req: Get String Descriptor(Index = 2, Length = 500) irq/34-dwc3-1594 [000] d..1 115.932950: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500) irq/34-dwc3-1594 [000] d..1 115.933533: dwc3_ctrl_req: Get String Descriptor(Index = 3, Length = 500) Note that Class and Vendor requests won't be decoded for obvious reasons. Those will be printed as a raw sequence of bytes. This patch has been tested against a normal host (both Linux and Windows) and USB30CV Chapter 9 tests. Signed-off-by: Felipe Balbi drivers/usb/dwc3/debug.h | 234 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/trace.h | 8 +- 2 files changed, 238 insertions(+), 4 deletions(-) commit 3587f36a125fd18596e8068ec70cbaae84bb624c Author: Felipe Balbi Date: Fri Apr 28 11:28:35 2017 +0300 usb: dwc3: debug: remove static char buffer from dwc3_decode_event() Instead, we can require caller to pass a buffer for the function to use. This cleans things quite a bit. Signed-off-by: Felipe Balbi drivers/usb/dwc3/debug.h | 13 ++++++------- drivers/usb/dwc3/trace.h | 4 +++- 2 files changed, 9 insertions(+), 8 deletions(-) commit e42f09b85f200e277d6d11d8c973f18efcc847fd Author: Felipe Balbi Date: Fri Apr 28 12:54:52 2017 +0300 usb: dwc3: trace: rely on __string() and __assign_str() Instead of going for a 512 byte buffer and using snprintf(), let's rely on helps __string() and __assign_str() where possible. Signed-off-by: Felipe Balbi drivers/usb/dwc3/trace.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit dfc5e80578f21552e7d5880ea7c0556b8b625895 Author: Felipe Balbi Date: Wed Apr 26 13:44:51 2017 +0300 usb: dwc3: gadget: slight cleanup to dwc3_process_event_entry() No functional changes, just a slight readability improvement. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 436841d53dd798ad67fc7c9bc7403613a9d9b4e0 Author: Felipe Balbi Date: Thu Apr 20 15:21:27 2017 +0300 usb: dwc3: debugfs: slightly improve output of trb_ring Instead of printing out enqueue and dequeue pointer value as a header to the output, let's mark the TRBs in question with 'E' and 'D'. The output looks slightly easier to read. Signed-off-by: Felipe Balbi drivers/usb/dwc3/debugfs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit bfad65ee9be2096a854e350ba6324e3e48ad5e1d Author: Felipe Balbi Date: Wed Apr 19 14:59:27 2017 +0300 usb: dwc3: update documentation No functional changes, just making sure we can use these for ReST docs later. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 44 +++++++++-------- drivers/usb/dwc3/ep0.c | 2 +- drivers/usb/dwc3/gadget.c | 121 +++++++++++++++++++++++++++++++--------------- drivers/usb/dwc3/gadget.h | 22 +++++++-- 4 files changed, 124 insertions(+), 65 deletions(-) commit a7ea58f3814398ccfc154e2461f2a2011cc4a1bd Author: Felipe Balbi Date: Tue Apr 25 14:23:41 2017 +0300 tools: usb: testusb: update default vary for superspeed Currently, default vary will not accomodate superspeed endpoints causing unexpected babble errors in the IN direction. Let's update default 'vary' parameter so that we can maintain a "short-less" transfer as hinted at the comment. Reported-by: Ammy Yi Signed-off-by: Felipe Balbi tools/usb/testusb.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 04fb365c453e14ff9e8a28f1c46050d920a27a4a Author: Felipe Balbi Date: Wed May 17 15:57:45 2017 +0300 usb: dwc3: replace %p with %pK %p will leak kernel pointers, so let's not expose the information on dmesg and instead use %pK. %pK will only show the actual addresses if explicitly enabled under /proc/sys/kernel/kptr_restrict. Cc: Acked-by: Greg Kroah-Hartman Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-st.c | 2 +- drivers/usb/dwc3/gadget.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) commit 63e07c0fdc41d7d585dad72ed01856c68ce52bbe Author: Szemző András Date: Wed May 31 03:06:24 2017 +0200 ARM: at91: debug: add samv7x support Add support for low level debugging on Atmel samv7x. Signed-off-by: Szemző András Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/Kconfig.debug | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 82208e7568c29aa687fd93b6702106b21a780b5b Author: Szemző András Date: Wed May 31 03:06:23 2017 +0200 ARM: at91: add armv7m SoC detection Add SAME70/V71/S70/V70 chip-ids to SoC detection. Signed-off-by: Szemző András Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni drivers/soc/atmel/soc.c | 24 ++++++++++++++++++++++++ drivers/soc/atmel/soc.h | 26 ++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit b2f06274337074a64ad42550f336b9f279eb835a Author: Alexandre Belloni Date: Wed May 31 03:06:22 2017 +0200 ARM: at91: handle CONFIG_PM for armv7m configurations There is currently no PM support for samx7 but the symbol can still be selected. This avoids compilation issues. Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/mach-at91/Kconfig | 6 ++++++ arch/arm/mach-at91/Makefile | 3 +-- arch/arm/mach-at91/samv7.c | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) commit 2d4c44e979eaa846dfa63717c4f4818e11161c66 Author: Szemző András Date: Wed May 31 03:06:21 2017 +0200 ARM: at91: Add armv7m support Add Atmel SAME70/SAMS70/SAMV71 SoC support. Signed-off-by: Szemző András Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/mach-at91/Kconfig | 10 +++++++++- arch/arm/mach-at91/Makefile | 1 + arch/arm/mach-at91/Makefile.boot | 3 +++ arch/arm/mach-at91/samv7.c | 25 +++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) commit 8a9d600a8e119373fe17555219948d8d235a62d5 Author: Alexandre Belloni Date: Wed May 31 03:06:20 2017 +0200 ARM: at91: Document armv7m compatibles Introduce necessary compatibles to describe the armv7m based SoCs. Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni .../devicetree/bindings/arm/atmel-at91.txt | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit f0979987c91debc7146fbe1509c2466b44cb9796 Author: Alexandre Belloni Date: Wed May 31 03:06:19 2017 +0200 ARM: at91: Documentation: add armv7m families The Atmel sams70, samv70 and samv71 are Cortex-M7 based MCUs that can run Linux (without MMU). Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Documentation/arm/Atmel/README | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit cc8dd7661ccc2d8dc88921da8e6cc7c2fcdb0341 Author: Tomi Valkeinen Date: Thu May 18 11:51:51 2017 +0300 drm/omap: fix tiled buffer stride calculations omap_gem uses page alignment for buffer stride. The related calculations are a bit off, though, as byte stride of 4096 gets aligned to 8192, instead of 4096. This patch changes the code to use DIV_ROUND_UP(), which fixes those calculations and makes them more readable. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2add8d1310eb5b1094e02a7261b6e35df5e65bf3 Author: Tomi Valkeinen Date: Tue May 16 15:25:45 2017 +0300 drm/omap: fix YUV422 90/270 rotation with mirroring When rotating 90/270 + mirroring with YUV422, the end result will have adjacent pixels swapped. The problem is that dispc_ovl_set_rotation_attrs() has wrong rotation values for these cases. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4df6e4277503f0d05e261c3cae0c282fdca4437 Author: Tomi Valkeinen Date: Mon May 15 11:09:25 2017 +0300 drm/omap: fix YUV422 rotation with TILER TILER rotation with YUV422 pixelformats does not work at the moment. All other pixel formats work, because the pixelformat's pixel size is equal to tiler unit size (e.g. XR24's pixel size is 32 bits, and the TILER unit size that has to be used is 32 bits). For YUV422 formats this is not the case, as the TILER unit size has to be 32 bits, but the pixel size is 16 bits. The end result is OCP errors and sync losts. This patch adds the code to adjust the variables for YUV422 formats. We could make the code more generic by passing around the pixel format, rotation type, angle and the tiler unit size, which would allow us to do calculations without special case for YUV422. However, this would make the code more complex, and at least for now this is much more easier to handle with these two special cases for YUV422. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 20 ++++++++++++++++++-- drivers/gpu/drm/omapdrm/omap_fb.c | 14 ++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) commit 16f9ede51ff9b37e04fb64dad8b4099c2814c436 Author: Tomi Valkeinen Date: Tue May 16 12:48:58 2017 +0300 drm/omap: pass rotation to dispc The omapdrm driver has not passed the rotation value to the dispc driver. This doesn't affect RGB formats, but YUV formats don't work without dispc knowing the orientation. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_fb.c | 2 ++ 1 file changed, 2 insertions(+) commit 4eebb80e2465be3f5ec471547c455494c050ebd1 Author: Tomi Valkeinen Date: Tue May 16 12:05:24 2017 +0300 drm/omap: DRM_MODE_REFLECT_* instead of mirror boolean Change dispc driver to use the DRM_MODE_REFLECT flags instead of a mirror boolean. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 24 ++++++++++-------------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 -- drivers/gpu/drm/omapdrm/omap_plane.c | 1 - 3 files changed, 10 insertions(+), 17 deletions(-) commit 0bd97c42d975a1e0849105bb8f23a68490683aab Author: Tomi Valkeinen Date: Tue May 16 11:05:09 2017 +0300 drm/omap: use DRM_MODE_ROTATE_* instead of OMAP_DSS_ROT_* At the moment the dispc driver uses a custom enum for rotation. Change it to use the DRM's DRM_MODE_ROTATE_*. Note that mirroring is at the moment handled as a separate boolean in the dispc driver, so we only use the DRM_MODE_ROTATE_* values. Note, DSS HW uses clockwise rotation, DRM counter-clockwise. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 60 +++++++++++++++++------------------ drivers/gpu/drm/omapdrm/dss/omapdss.h | 8 ----- drivers/gpu/drm/omapdrm/omap_plane.c | 2 +- 3 files changed, 31 insertions(+), 39 deletions(-) commit 218ed5358a4045382674f8feeee0efb526f9431b Author: Tomi Valkeinen Date: Mon May 15 13:40:08 2017 +0300 drm/omap: remove omap_drm_win struct omap_drm_window is only used to pass plane setup data to omap_framebuffer_update_scanout(). This can as well be accomplished by just passing the DRM state. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_drv.h | 11 +---------- drivers/gpu/drm/omapdrm/omap_fb.c | 37 ++++++++++++++++++------------------ drivers/gpu/drm/omapdrm/omap_plane.c | 25 +----------------------- 3 files changed, 21 insertions(+), 52 deletions(-) commit 8958aeb9c7bc86c89667af049243c47836111ab7 Author: Tomi Valkeinen Date: Mon May 15 12:57:46 2017 +0300 drm/omap: add drm_rotation_to_tiler helper() Add a helper function to convert DRM rotation to TILER rotation. Also drop a error print that can never happen, as the DRM framework makes sure the rotation is valid. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_fb.c | 56 ++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 25 deletions(-) commit 41aff42ae6e3e9dbb800640fe3bb62383d4aa6e3 Author: Tomi Valkeinen Date: Thu May 4 11:31:56 2017 +0300 drm/omap: rename color_mode to fourcc Now that we use fourccs, we can also rename the 'color_mode' variables to 'fourcc'. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 108 ++++++++++++++--------------- drivers/gpu/drm/omapdrm/dss/dss_features.c | 5 +- drivers/gpu/drm/omapdrm/dss/dss_features.h | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 4 +- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- 5 files changed, 58 insertions(+), 63 deletions(-) commit c2e52e32049c0e94aa35a0635a2b150478ef3b2a Author: Tomi Valkeinen Date: Thu May 4 11:29:58 2017 +0300 drm/omap: cleanup formats array omap_fb.c has a table with DSS and DRM formats, used to convert between them. This is no longer needed, so we can change the array to a plain array of DRM_FORMAT_* values which contain all possible pixel formats supported by any DSS IP version. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_fb.c | 49 ++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 29 deletions(-) commit eecad4371d986f38b66202817e2b461ac3c64139 Author: Tomi Valkeinen Date: Thu May 4 11:27:49 2017 +0300 drm/omap: remove omap_framebuffer_get_formats() We now get a fourcc array from dispc when asking for a plane's supported pixel formats, so we can drop omap_framebuffer_get_formats() which was used to convert between DSS and DRM pixel formats. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_drv.h | 2 -- drivers/gpu/drm/omapdrm/omap_fb.c | 22 ---------------------- drivers/gpu/drm/omapdrm/omap_plane.c | 15 +++++++-------- 3 files changed, 7 insertions(+), 32 deletions(-) commit 3e1d65cdf84f88affa718396a392f9f9a0d8a5f6 Author: Tomi Valkeinen Date: Thu May 4 10:40:46 2017 +0300 drm/omap: use DRM_FORMAT_* instead of OMAP_DSS_COLOR_* This patch changes omapdrm to use DRM_FORMAT_* values instead of OMAP_DSS_COLOR_* enum. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 143 +++++++++++++++-------------- drivers/gpu/drm/omapdrm/dss/dss_features.c | 117 +++++++++++------------ drivers/gpu/drm/omapdrm/dss/omapdss.h | 16 +--- drivers/gpu/drm/omapdrm/omap_fb.c | 32 +++---- 4 files changed, 148 insertions(+), 160 deletions(-) commit 9c39d17e0614d18d809ccf2c3858994feb4fcdaa Author: Tomi Valkeinen Date: Thu May 4 11:19:12 2017 +0300 drm/omap: use u32 instead of enum omap_color_mode In this step we drop 'enum omap_color_mode', and use u32 instead. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 34 +++++++++++++++--------------- drivers/gpu/drm/omapdrm/dss/dss_features.c | 16 +++++++------- drivers/gpu/drm/omapdrm/dss/dss_features.h | 4 ++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 6 +++--- drivers/gpu/drm/omapdrm/omap_drv.h | 2 +- drivers/gpu/drm/omapdrm/omap_fb.c | 8 +++---- 6 files changed, 35 insertions(+), 35 deletions(-) commit 18c0d6217a4898b9cae1b999e0dd37f8239ba0ae Author: Tomi Valkeinen Date: Thu May 4 10:27:53 2017 +0300 drm/omap: change supported_modes to an array enum omap_color_mode is a bitmask, so at the moment we present the supported color modes as mask. To be able to move to fourccs, we need to use an array to present the supported color modes. As a first step towards fourccs, this patch changes the code to use an array to store the enums. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 2 +- drivers/gpu/drm/omapdrm/dss/dss_features.c | 153 +++++++++++++++++------------ drivers/gpu/drm/omapdrm/dss/dss_features.h | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/omap_drv.h | 2 +- drivers/gpu/drm/omapdrm/omap_fb.c | 14 ++- 6 files changed, 103 insertions(+), 72 deletions(-) commit 22245f531a769164402f4e63f1f1e18de981aff3 Author: Tomi Valkeinen Date: Thu May 4 10:18:00 2017 +0300 drm/omap: remove unneeded prototypes omapdss.h contains prototypes for three functions, which are also defined in dss_features.h. Remove the extra prototypes from omapdss.h. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/omapdss.h | 5 ----- 1 file changed, 5 deletions(-) commit 5edec14c73553941ea80f3527f3be02c071caac6 Author: Tomi Valkeinen Date: Thu May 4 09:13:32 2017 +0300 drm/omap: add format_is_yuv() helper In a few places the dispc driver needs to know whether the pixel format is an YUV format. Add a helper to figure that out. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 56 +++++++++++++++---------------------- 1 file changed, 23 insertions(+), 33 deletions(-) commit 185e23e1f63aa3f2a7ad77f9315b5f8d84002bb0 Author: Tomi Valkeinen Date: Wed May 3 15:01:10 2017 +0300 drm/omap: cleanup offset calculation The code to calculate offset in dispc's calc_offset() is overly complex. Simplify it. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 517a8a9564c0dea98e6d4e2c7f0fe4cbb9b8c9ba Author: Tomi Valkeinen Date: Wed May 3 14:14:27 2017 +0300 drm/omap: remove dma & vrfb rotation We have three rotation methods supported by the SoCs with DSS: DMA, VRFB and TILER. DMA rotation works in theory on all DSS platforms, but in practice it's unusable due to the huge amount of memory bandwidth it uses, and has never really been used. VRFB is available on OMAP3, but is not supported by omapdrm, even though we have some code for it in the dispc driver. TILER is supported on OMAP4/OMAP5/DRA7/AM5 platforms, but has some driver bugs. To clean up the driver to help fixing the TILER issues, this patch drops the DMA and VRFB rotation support, leaving only TILER rotation. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 248 +---------------------------- drivers/gpu/drm/omapdrm/dss/dss_features.c | 16 -- drivers/gpu/drm/omapdrm/dss/dss_features.h | 2 - drivers/gpu/drm/omapdrm/dss/omapdss.h | 5 +- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/omapdrm/omap_plane.c | 2 +- 6 files changed, 10 insertions(+), 265 deletions(-) commit dc50be89d78fa381b07ed11b82b00674dd6bf6b7 Author: Tomi Valkeinen Date: Fri Mar 3 12:15:39 2017 +0200 drm/omap: ratelimit OCP error Use dev_err_ratelimited() when an OCP error happens, to slightly easen the flood. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_irq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4b9cdd96e7ea3dc2cd0edac67835f6f38c4f14c9 Author: Tomi Valkeinen Date: Fri Mar 10 10:32:30 2017 +0200 drm/omap: remove CLUT DSS IP versions 2 and 3 support CLUT modes (color lookup table), but the driver has never supported those. We still have had some code for CLUT modes. As the newer DSS IP versions have dropped CLUT support, we might as well clean up the driver by removing the CLUT related code. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 57 ++---------------------------- drivers/gpu/drm/omapdrm/dss/dss_features.c | 6 ---- drivers/gpu/drm/omapdrm/dss/omapdss.h | 4 --- 3 files changed, 2 insertions(+), 65 deletions(-) commit 6d86278c9ddb2026727a6a9ba5a4550561aea940 Author: Tomi Valkeinen Date: Mon Aug 29 11:15:49 2016 +0300 drm/omap: fix setting & clearing DOUBLESTRIDE The code that sets and clears DOUBLESTRIDE is only ran when using NV12. This is not correct, as we might first set the bith when using NV12, but never clear it when using other formats. Fix it so that when the bit is available (when the HW supports NV12) we always either set or clear the bit. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit eb06225244481ae0f14f5bca1cae966aa2839d7c Author: Laurent Pinchart Date: Fri May 12 15:33:55 2017 +0300 drm/omap: Remove unused omap_dss_find_output() function The omap_dss_find_output() function is unused, remove it. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 - drivers/gpu/drm/omapdrm/dss/output.c | 13 ------------- 2 files changed, 14 deletions(-) commit b82f6cc6a7d069b391fc3512be689f5eff97337b Author: Tomi Valkeinen Date: Fri May 12 13:05:45 2017 +0300 drm/omap: remove omap_overlay & omap_overlay_manager Structs omap_overlay and omap_overlay_manager are not used, remove them. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/omapdss.h | 91 ----------------------------------- 1 file changed, 91 deletions(-) commit c63204781b9320cf19044c0464350676bcae1219 Author: Tomi Valkeinen Date: Fri May 12 12:58:21 2017 +0300 drm/omap: remove unused fields Remove unused fields in struct omap_dss_device. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/omapdss.h | 17 ----------------- 1 file changed, 17 deletions(-) commit d2935c1e96dc243c941d09f0f9777bffb1e5e468 Author: Tomi Valkeinen Date: Fri May 12 12:56:57 2017 +0300 drm/omap: remove legacy get_resolution get_resolution is not used, remove it. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c | 2 -- drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 2 -- drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | 2 -- drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 2 -- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 9 --------- drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 2 -- drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 2 -- drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 2 -- drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 2 -- drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c | 2 -- drivers/gpu/drm/omapdrm/dss/display.c | 10 ---------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 5 ----- 12 files changed, 42 deletions(-) commit fb251e348519b16ba9baf040f5f295fb1d08fcc5 Author: Tomi Valkeinen Date: Fri May 12 12:55:22 2017 +0300 drm/omap: remove unused get_dimensions() get_dimensions function pointer is not used, remove it. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 -- 1 file changed, 2 deletions(-) commit aa61321d4c08dd98049b8d45d5d73d87e849ed97 Author: Tomi Valkeinen Date: Thu May 4 12:18:43 2017 +0300 drm/omap: remove rfbi The RFBI driver has not worked nor compiled for many years. There are very few boards out there that use RFBI, and no one has stepped up to fix it. So let's remove the RFBI code that doesn't even compile. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/Kconfig | 13 - drivers/gpu/drm/omapdrm/dss/Makefile | 1 - drivers/gpu/drm/omapdrm/dss/core.c | 6 - drivers/gpu/drm/omapdrm/dss/dss.h | 4 - drivers/gpu/drm/omapdrm/dss/omapdss.h | 32 - drivers/gpu/drm/omapdrm/dss/rfbi.c | 1075 --------------------------------- 6 files changed, 1131 deletions(-) commit b42d7f511eb2e7a169e8674a4503f7e9e5ce742d Author: Tomi Valkeinen Date: Fri May 12 12:49:14 2017 +0300 drm/omap: dpi: remove legacy data_lines Remove DPI's legacy data_lines code. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 4 ---- drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 5 ----- drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 5 ----- drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 4 ---- drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 5 ----- drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 5 ----- drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c | 4 ---- drivers/gpu/drm/omapdrm/dss/dpi.c | 13 ------------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 6 ------ 9 files changed, 51 deletions(-) commit e0eb2acbec25e875312d433ebd9fcf364a070d6f Author: Tomi Valkeinen Date: Fri May 12 12:48:33 2017 +0300 drm/omap: remove recommended_bpp recommended_bpp hasn't been used for ages, remove the code. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 1 - drivers/gpu/drm/omapdrm/dss/display.c | 33 ------------------------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 -- 3 files changed, 36 deletions(-) commit f2214bc845552f280039f69f0c4cd43807019292 Author: Tomi Valkeinen Date: Fri May 12 12:40:55 2017 +0300 drm/omap: venc: remove set_type & invert_vid_out_polarity Non-DT booting is no longer supported, so remove legacy code. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | 10 ---------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 10 ---------- drivers/gpu/drm/omapdrm/dss/venc.c | 23 ----------------------- 3 files changed, 43 deletions(-) commit 111d47d7a7dc10415936a0c5fb8e02bc17f4d533 Author: Tomi Valkeinen Date: Fri May 12 12:38:46 2017 +0300 drm/omap: sdi: remove legacy set_datapairs Non-DT booting is no longer supported, so remove legacy code. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/omapdss.h | 6 ------ drivers/gpu/drm/omapdrm/dss/sdi.c | 7 ------- 2 files changed, 13 deletions(-) commit c08feea909153aa2b7c5b1e153535227246b5aee Author: Tomi Valkeinen Date: Fri May 12 12:37:04 2017 +0300 drm/omap: connector-dvi/hdmi: remove extra include Remove extra includes related to non-DT boot. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 1 - drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | 1 - 2 files changed, 2 deletions(-) commit 11b23e1355a94996c1eaa7c87517b311d188436c Author: Tomi Valkeinen Date: Fri May 12 12:36:48 2017 +0300 drm/omap: connector-analog-tv: remove non-DT support Non-DT booting is no longer supported, so remove legacy code. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart .../gpu/drm/omapdrm/displays/connector-analog-tv.c | 49 ++-------------------- 1 file changed, 3 insertions(+), 46 deletions(-) commit de63742f7856c471087ab548e37cf5bace3e40a0 Author: Tomi Valkeinen Date: Fri May 12 12:36:32 2017 +0300 drm/omap: acx565akm: remove non-DT support Non-DT booting is no longer supported, so remove legacy code. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart .../drm/omapdrm/displays/panel-sony-acx565akm.c | 47 ++-------------------- 1 file changed, 3 insertions(+), 44 deletions(-) commit bf31ce724318e9e612556fecf27c704103576ab0 Author: Tomi Valkeinen Date: Fri May 12 12:36:18 2017 +0300 drm/omap: panel-dpi: remove non-DT support Non-DT booting is no longer supported, so remove legacy code. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 76 ++-------------------------- 1 file changed, 3 insertions(+), 73 deletions(-) commit 9d24159a6c007cfa50a1d5165207c67ae247a602 Author: Tomi Valkeinen Date: Fri Feb 24 13:24:50 2017 +0200 drm/omap: define compat_ioctl Define compat_ioctl in omapdriver_fops to make it possible to use 32bit apps on 64bit platform. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_drv.c | 1 + 1 file changed, 1 insertion(+) commit 2150c19b15b01458cfa0b2db68c7ad035011a1fb Author: Tomi Valkeinen Date: Tue Feb 21 09:57:12 2017 +0200 drm/omap: 64bit compile fixes Fix a few type issues that cause compile warnings on 64 bit ARM compiler. The change should not affect 32bit platforms. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 2e953d83a6797e4f1c6fe48c08fc9a8fcb50db78 Author: Tomi Valkeinen Date: Mon Feb 20 13:18:38 2017 +0200 drm/omap: remove read_irqenable() We only use read_irqenable() to flush posted write. Instead of having a separate function for this, do the flush implicitly in write_irqenable(). Thus we can remove read_irqenable(). Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 9 +++------ drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 - drivers/gpu/drm/omapdrm/omap_irq.c | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) commit 49a3057a5a2fa06264b0756cf417f75b56b7063b Author: Tomi Valkeinen Date: Fri Feb 17 12:30:07 2017 +0200 drm/omap: remove ovl_set_channel_out At the moment we have ovl_set_channel_out() to configure the output channel of an overlay. It makes sense to have this configuration as part of the rest of overlay configuration, and in DSS6+ we need the output channel when doing the other overlay configuration. This patch adds a 'channel' parameter to ovl_setup(), so that all overlay configuration is done via the same function, and removes the ovl_set_channel_out(). Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 13 ++++++------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 5 ++--- drivers/gpu/drm/omapdrm/omap_plane.c | 6 ++---- 3 files changed, 10 insertions(+), 14 deletions(-) commit 5806bce107d777a150cacb9082f7f6399102cacc Author: Tomi Valkeinen Date: Fri Feb 17 12:20:16 2017 +0200 drm/omap: remove unused ovl_enabled() ovl_enabled() is not used anywhere, so remove it. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 6 ------ drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 - 2 files changed, 7 deletions(-) commit 564f88c1b975bd26ddcea961fd95f14108ef3f69 Author: Tomi Valkeinen Date: Thu Apr 27 13:02:28 2017 +0300 drm/omap: add new connector types We have been using DRM_MODE_CONNECTOR_Unknown for many of our outputs because there has not been a proper connector type for them. We now have connector type for DPI so let's take it into use. At the same time, add better connector types for the remaining outputs too. This patch sets the following outputs to use the following connector types: DPI -> DPI DBI -> DPI (MIPI DBI is very similar to DPI at the bus level) SDI -> LVDS (SDI, TI Flatlink 3G, is a type of LVDS) VENC -> SVIDEO or Composite Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 54156c2a17a3641f3666df602914433590c97ea4 Author: Laurent Pinchart Date: Sun May 7 01:37:24 2017 +0300 drm: omapdrm: sdi: Remove platform driver The SDI platform driver was used for non-DT platforms only. On DT platforms the SDI port is handled manually. As OMAP display devices are now instantiated from DT only, remove the SDI platform driver. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/core.c | 6 ----- drivers/gpu/drm/omapdrm/dss/dss.h | 3 --- drivers/gpu/drm/omapdrm/dss/sdi.c | 54 -------------------------------------- 3 files changed, 63 deletions(-) commit 5115bba18c98fd664a7d887fb77ec12fd31d07cb Author: Laurent Pinchart Date: Sun May 7 01:37:24 2017 +0300 drm: omapdrm: dpi: Remove platform driver The DPI platform driver was used for non-DT platforms only. On DT platforms the DPI port is handled manually. As OMAP display devices are now instantiated from DT only, remove the DPI platform driver. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/core.c | 6 --- drivers/gpu/drm/omapdrm/dss/dpi.c | 93 -------------------------------------- drivers/gpu/drm/omapdrm/dss/dss.h | 3 -- 3 files changed, 102 deletions(-) commit 6e471faba30b9dd2498e21e9a233aae3af85159c Author: Laurent Pinchart Date: Sat May 6 02:57:12 2017 +0300 drm: omapdrm: Infer the OMAP version from the SoC family The omapdrm exposes the SoC version to userspace through an integer that contains the OMAP model (e.g. 0x3430 for the OMAP3430). This is an unfortunate choice of userspace API as it's both conceptually wrong (userspace nowadays should use /sys/bus/soc/ for that purpose) and inaccurate as many models with different features are reported with the same version number. The only known user of this API is the xomap X11 driver. Even if it has been deprecated for some time we can't drop the kernel API yet. We can, however, infer the version number from the SoC family to avoid the need to pass the version number through platform data. Do this, which makes the omapdrm platform data not needed anymore, and ready to be removed. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 15 +++++++++++++-- drivers/gpu/drm/omapdrm/omap_drv.h | 1 - 2 files changed, 13 insertions(+), 3 deletions(-) commit 278cba7eaf5422510fc4a6b5a4d447f17b00506e Author: Laurent Pinchart Date: Wed Dec 14 03:35:03 2016 +0200 drm: omapdrm: Remove unused default display name support The default display name is both unused and never set by platform data. Remove default display name module parameter, platform data field and runtime infrastructure. Signed-off-by: Laurent Pinchart Acked-by: Bartlomiej Zolnierkiewicz Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/core.c | 18 ------------------ drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 - drivers/video/fbdev/omap2/omapfb/dss/core.c | 2 -- include/linux/platform_data/omapdss.h | 1 - 4 files changed, 22 deletions(-) commit fd07ab7881c6478a7022704efb938fd2f5a8ca83 Author: Laurent Pinchart Date: Sat May 6 00:26:15 2017 +0300 drm: omapdrm: Remove unused dss_get_core_pdev() function The dss_get_core_pdev() function is unused, remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/core.c | 5 ----- drivers/gpu/drm/omapdrm/dss/dss.h | 1 - 2 files changed, 6 deletions(-) commit 1dff212ce62bb31c4eb7fc86c996b988663e9ec3 Author: Laurent Pinchart Date: Sun May 7 00:42:26 2017 +0300 drm: omapdrm: Drop support for non-DT devices All OMAP platforms use DT nowadays, drop support for non-DT devices. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/display.c | 19 ++----- drivers/gpu/drm/omapdrm/dss/dsi.c | 93 +++++++---------------------------- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 8 ++- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 8 ++- drivers/gpu/drm/omapdrm/dss/venc.c | 16 ++---- 5 files changed, 35 insertions(+), 109 deletions(-) commit b22622f0cba3a6ee780787abd84b3b0c1ad09b26 Author: Laurent Pinchart Date: Sun May 7 00:29:09 2017 +0300 drm: omapdrm: Remove duplicate error messages when mapping memory The devm_ioremap_resource() call can handle being given a NULL resource, and prints an error message when mapping fails. Switch the remaining devm_ioremap() calls to devm_ioremap_resource() and remove all extraneous resource NULL checks and error messages printed manually by the driver. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 14 +++----------- drivers/gpu/drm/omapdrm/dss/dsi.c | 27 +++++++++------------------ drivers/gpu/drm/omapdrm/dss/dss.c | 14 +++----------- drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 9 +-------- drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 9 +-------- drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | 9 +-------- drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 9 +-------- drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | 12 +++--------- drivers/gpu/drm/omapdrm/dss/rfbi.c | 14 +++----------- drivers/gpu/drm/omapdrm/dss/venc.c | 14 +++----------- drivers/gpu/drm/omapdrm/dss/video-pll.c | 20 ++------------------ 11 files changed, 30 insertions(+), 121 deletions(-) commit c488dd2048662f35c56d002379221edf1a2a9404 Author: Laurent Pinchart Date: Mon May 8 21:59:24 2017 +0300 drm: omapdrm: Take GEM object reference when exporting dmabuf To ensure that neither the GEM object nor the DRM device goes away while a GEM object exported through dma-buf is still accessible, references must be taken to both the GEM object and the DRM device at export time. The dma-buf release handler already releases the GEM object, but the export handler doesn't take a corresponding reference, which results in a refcount underflow. Fix this by replacing the custom implementation by drm_gem_dmabuf_export() and drm_gem_dmabuf_release() that handle reference counting for us. Fixes: 6ad11bc3a0b8 ("staging: drm/omap: dmabuf/prime support") Signed-off-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 97817fd46518aa2f457ce41f6a9aecd36b461426 Author: Laurent Pinchart Date: Fri Apr 21 00:33:58 2017 +0300 drm: omapdrm: Map pages for DMA in DMA_TO_DEVICE direction The display engine only reads from memory, there's no need to use bidirectional DMA mappings. Use DMA_TO_DEVICE instead. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_gem.c | 11 +++++------ drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) commit 930dc19c0b7278c26c85f05f92cb417f2bd28aa3 Author: Laurent Pinchart Date: Fri Apr 21 00:33:57 2017 +0300 drm: omapdrm: DMA-unmap pages for all buffer types when freeing buffers Both coherent (uncached) and non-coherent (cached) buffers can have their pages mapped to the device through the DMA mapping API. Make sure to unmap any mapped page when freeing a buffer, regardless of its type. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_gem.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 24fbaca0e20acebfcdf7468f03465d5b1966c314 Author: Laurent Pinchart Date: Fri Apr 21 00:33:56 2017 +0300 drm: omapdrm: Fix incorrect usage of the term 'cache coherency' The is_cache_coherent() function currently returns true when the mapping is not cache-coherent. This isn't a bug as such as the callers interpret cache-coherent as meaning that the driver has to handle the coherency manually, but it is nonetheless very confusing. Fix it and add a bit more documentation to explain how cached buffers are handled. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_gem.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit d61ce7da02a3c52317474f2a15dd610ec652d513 Author: Laurent Pinchart Date: Fri Apr 21 00:33:55 2017 +0300 drm: omapdrm: Rename GEM DMA sync functions The omap_gem_cpu_sync() function operates at a page level, while the omap_gem_dma_sync() function operates at a buffer level. Rename them to omap_gem_cpu_sync_page() and omap_gem_dma_sync_buffer() respectively to avoid confusion. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 4 ++-- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 6 +++--- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) commit 57c22f7cc24ab6284d23d370929f2d452bb79729 Author: Laurent Pinchart Date: Fri Apr 21 00:33:54 2017 +0300 drm: omapdrm: Rename the omap_gem_object addrs field to dma_addrs The field contains DMA addresses, clarify that by renaming it. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_gem.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 4fa6ce48a97d687fa733292cb7103a8971976280 Author: Laurent Pinchart Date: Fri Apr 21 00:33:53 2017 +0300 drm: omapdrm: Lower indentation level in omap_gem_dma_sync_buffer() This makes the function more readable. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_gem.c | 43 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit bc20c85caba279b7c63146bab683ca1a81de9f79 Author: Laurent Pinchart Date: Fri Apr 21 00:33:52 2017 +0300 drm: omapdrm: Rename omap_gem_(get|put)_paddr() to omap_gem_(un)pin() The reflects the purpose of the function better. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 4 ++-- drivers/gpu/drm/omapdrm/omap_fb.c | 6 ++--- drivers/gpu/drm/omapdrm/omap_fbdev.c | 9 ++++---- drivers/gpu/drm/omapdrm/omap_gem.c | 38 ++++++++++++++++++++++--------- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 6 ++--- 5 files changed, 39 insertions(+), 24 deletions(-) commit 16869083b9bec8c1090442bd176a5b376708aba0 Author: Laurent Pinchart Date: Fri Apr 21 00:33:51 2017 +0300 drm: omapdrm: Rename occurrences of paddr to dma_addr The fields, variables and functions deal with DMA addresses, name them accordingly. The omap_gem_get_paddr() and omap_gem_put_paddr() will be addressed differently separately. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 6 +-- drivers/gpu/drm/omapdrm/omap_fb.c | 21 +++++----- drivers/gpu/drm/omapdrm/omap_fbdev.c | 8 ++-- drivers/gpu/drm/omapdrm/omap_gem.c | 70 +++++++++++++++---------------- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 8 ++-- 5 files changed, 57 insertions(+), 56 deletions(-) commit aa0408bcb1b8c2c5941b6e0e7ce0ad2b733bb971 Author: Laurent Pinchart Date: Fri Apr 21 00:33:50 2017 +0300 drm: omapdrm: Remove remap argument to omap_gem_get_paddr() The function is always called with the remap argument set to true. Hardcode that behaviour and remove it. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 3 +-- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 10 ++++------ drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) commit dff6c24698a4d05d9a90de97612ec520c6fa8bd8 Author: Laurent Pinchart Date: Tue May 9 01:27:14 2017 +0300 drm: omapdrm: Add zpos property Create a standard zpos property for every plane as an alias to the omapdrm-specific zorder property. Unlike the zorder property that has to be instantiated for both planes and CRTCs due to backward compatibility, the zpos property is only instantiated for planes. When userspace will have switched to the zpos property the zorder property will be removed. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 4 +++- drivers/gpu/drm/omapdrm/omap_plane.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit d980278bd8fc5b4054d4a7593620ad3ec6e1104a Author: Laurent Pinchart Date: Tue May 9 01:27:13 2017 +0300 drm: omapdrm: Remove custom plane state The custom plane state only encapsulates the standard plane state with adding any custom field. Remove it and use the atomic plane helpers directly. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_plane.c | 58 ++++-------------------------------- 1 file changed, 6 insertions(+), 52 deletions(-) commit ba527c13644fdeacdb4756fc9dd9aa598a40bce3 Author: Laurent Pinchart Date: Tue May 9 01:27:12 2017 +0300 drm: omapdrm: Store the Z order in the plane state zpos field The DRM core implements a standard "zpos" property to control planes ordering. The omapdrm driver implements a similar property named "zorder". Although we can't switch to DRM core handling of the "zpos" property for backward compatibility reasons, we can store the zorder value in the drm_plane_state zpos field, saving us from adding a custom field to the plane state. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_plane.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit d6f544f6bf419a5bc65f7f2d070db008d1119097 Author: Laurent Pinchart Date: Tue May 9 01:27:11 2017 +0300 drm: omapdrm: Remove legacy buffer synchronization support The omapdrm driver uses a custom API to synchronize with the SGX GPU. This is unusable as such in the mainline kernel as the API is only partially implemented and requires additional out-of-tree patches. Furthermore, as no SGX driver is available in the mainline kernel, the API can't be considered as a stable mainline API. Now that the driver supports synchronization through fences, remove legacy buffer synchronization support. The two userspace ioctls are turned into no-ops to avoid breaking userspace and will be removed in the future. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 53 +-------- drivers/gpu/drm/omapdrm/omap_drv.h | 5 - drivers/gpu/drm/omapdrm/omap_gem.c | 214 ------------------------------------- include/uapi/drm/omap_drm.h | 4 +- 4 files changed, 6 insertions(+), 270 deletions(-) commit a9e6f9f7d603ef769b4cd33e0a2b61ba48a1058e Author: Laurent Pinchart Date: Tue May 9 01:27:10 2017 +0300 drm: omapdrm: Use DRM core's atomic commit helper The DRM core atomic helper now supports asynchronous commits natively. The custom omapdrm implementation isn't needed anymore, remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 112 +++++-------------------------------- drivers/gpu/drm/omapdrm/omap_drv.h | 9 +-- 2 files changed, 15 insertions(+), 106 deletions(-) commit ce9a8f1ad7564fa24bc12066b41f2a09eb1a8394 Author: Laurent Pinchart Date: Tue May 9 01:27:09 2017 +0300 drm: omapdrm: Handle events when enabling/disabling CRTCs The driver currently handles vblank events only when updating planes on an already enabled CRTC. The atomic update API however allows requesting an event when enabling or disabling a CRTC. This currently leads to event objects being leaked in the kernel and to events not being sent out. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 49bbbfa8d27a227521a9e07cb1612f60e8f0e8ff Author: Dmitry Torokhov Date: Mon May 29 20:22:34 2017 -0700 Input: synaptics-rmi4 - use %phN to form F34 configuration ID Instead of printing bytes one by one, let's use %phN to print the buffer in one go. Also use hweight8 to count number of partitions instead of inspecting it bit by bit. Reviewed-by: Benjamin Tissoires Tested-by: Nick Dyer Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f34v7.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 4e19dcd93b894e9903f4be89527e0a78304da685 Merge: ee177c5 2d75588 Author: Michael Turquette Date: Fri Jun 2 14:03:59 2017 +0900 Merge tag 'clk-renesas-for-v4.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next clk: renesas: Updates for v4.13 - Add more module clocks for R-Car H3 ES2.0 and M3-W, - Add CPG/MSSR drivers for all supported R-Car Gen2 SoCs, enabling support for module resets, which are not supported by the existing driver, - Rework Kconfig and Makefile logic, - Small fixes and cleanups. commit 704ffd74e1b1a02f1300afc290920be04097d7c1 Merge: f47fbc3 72a7786 Author: Olof Johansson Date: Thu Jun 1 17:29:02 2017 -0700 Merge tag 'realtek-arm64-dt-for-4.12' of git://github.com/afaerber/linux into next/dt64 Realtek ARM64 based SoC DT for v4.12 This adds an initial DT for the RTD1295 SoC and a TV box based on it. * tag 'realtek-arm64-dt-for-4.12' of git://github.com/afaerber/linux: ARM64: dts: Add Realtek RTD1295 and Zidoo X9S dt-bindings: arm: Add Realtek RTD1295 bindings dt-bindings: Add vendor prefix for Zidoo Signed-off-by: Olof Johansson commit 88e98d3b32752c0bb30930f28d302196e2625342 Merge: f85a543 de9aa53 Author: Olof Johansson Date: Thu Jun 1 17:28:11 2017 -0700 Merge tag 'realtek-arm64-soc-for-4.12' of git://github.com/afaerber/linux into next/arm64 Realtek ARM64 SoC for v4.12 This adds a Kconfig symbol for DTs being added, plus a MAINTAINERS entry. * tag 'realtek-arm64-soc-for-4.12' of git://github.com/afaerber/linux: MAINTAINERS: Add Realtek section ARM64: Prepare Realtek RTD1295 Signed-off-by: Olof Johansson commit f46b563f2f270e451b2e1cee78573508cc1de256 Author: Linus Walleij Date: Wed May 24 11:07:48 2017 +0200 ARM: dts: augment Moxa and Aspeed DTS for FTTMR010 This augments the Moxa Art and Aspeed device trees to: - Explicitly name the clock "PCLK" as the Faraday FTTMR010 names it. - List the Moxa timer as compatible with the Faradat FTTMR010 vanilla version. - Add a comment that the Aspeed driver is a Faraday FTTMR010 derivative. - Pass all IRQs to the timer from Aspeed: they are all there so they should be in the device tree, we only use the first one anyways. Tested-by: Joel Stanley Tested-by: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/boot/dts/aspeed-g4.dtsi | 7 +++---- arch/arm/boot/dts/aspeed-g5.dtsi | 7 +++---- arch/arm/boot/dts/moxart.dtsi | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) commit b90b24f5895f7f8250937e5066b8f50bce0837f2 Merge: 996e559 664ed4e Author: Olof Johansson Date: Thu Jun 1 17:26:06 2017 -0700 Merge tag 'gemini-v4.13-dts-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/dt This is a first set of Gemini DTS patches for the v4.13 cycle. This adds the reset and clock lines to the Gemini core DTS SoC. These bindings have been ACKed by the DT maintainer Rob. The reset driver is going to be merged by the reset maintainer. The clock driver is going to be merged by the clock maintainers. Each of these have their macro defines coming with them, split off as separate patches. A post-rc1 patch will be sumbitted for switching the numerical values to the defined macros in line with the ARM SoC DT header merge strategy. * tag 'gemini-v4.13-dts-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: Add clocks to the Gemini SoC ARM: dts: Add the Gemini reset controller dt-bindings: Augment Gemini for clocks, resets Signed-off-by: Olof Johansson commit f47fbc377be516d414150f37b6aa7a6b5e0e3c5d Merge: 5ed02db 0b03c32 Author: Olof Johansson Date: Thu Jun 1 17:25:24 2017 -0700 Merge tag 'renesas-arm64-dt-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt64 Renesas ARM64 Based SoC DT Updates for v4.13 * Add support for R-Car H3 ES2.0 * Break out common board support * Set drive-strength for ravb pins for r8a7795/h3ulcb and r8a7796/m3ulcb * Enable HDMI outputs on r8a7795/salvator-x * Add R-Car audio to DT of r8a7796 SoC * Add current sense amplifiers to DT of r8a779[56]/salvator-x * Enable NFS-root on r8a7796/salvator-x * Enable HS200 for eMMC on r8a779[56]/salvator-x, r8a7795/h3ulcb and r8a7796/m3ulcb * Enable EthernetAVB, I2C r8a7796/m3ulcb * Update memory node to 2 GiB map on r8a7796/m3ulcb * tag 'renesas-arm64-dt-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (35 commits) arm64: dts: r8a7795: salvator-x: Add support for R-Car H3 ES2.0 arm64: dts: r8a7795: Add support for R-Car H3 ES2.0 arm64: dts: ulcb: Set drive-strength for ravb pins arm64: dts: renesas: r8a7795-salvator-x: Enable HDMI outputs arm64: dts: renesas: r8a7795-salvator-x: Add DU external dot clocks arm64: dts: renesas: salvator-x: Add HDMI output connectors arm64: dts: renesas: salvator-x: Add DU external dot clock sources arm64: dts: renesas: r8a7795: Add HDMI encoder support arm64: dts: salvator-x: Add panel backlight support arm64: dts: r8a7796: Add PWM device nodes arm64: dts: r8a7796: add Sound MIX support arm64: dts: r8a7796: add Sound CTU support arm64: dts: r8a7796: add Sound DVC support arm64: dts: r8a7796: add Sound SRC support arm64: dts: r8a7796: add Sound SSI DMA support arm64: dts: r8a7796: add Sound SSI PIO support arm64: dts: r8a7796: add AUDIO_DMAC support arm64: dts: salvator-x: Add current sense amplifiers arm64: dts: renesas: Extract common ULCB board support arm64: dts: renesas: Extract common Salvator-X board support ... Signed-off-by: Olof Johansson commit 996e559a2dc90b602947beb0285e83ebfaebc87f Merge: 5ed02db 2ae0fcc Author: Olof Johansson Date: Thu Jun 1 17:24:15 2017 -0700 Merge tag 'renesas-dt-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM Based SoC DT Updates for v4.13 * Switch to panel-lvds bindings for Mitsubishi panels * Clean up PFC node names * Enable UHS-I SDR-50 and SDR-104 on r8a7793/Gose * Add GyroADC clock and device for r8a7791 SoC * Add USB clocks to device tree for r7s72100 SoC * tag 'renesas-dt-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: renesas: Switch to panel-lvds bindings for Mitsubishi panels ARM: dts: gose: Enable UHS-I SDR-50 and SDR-104 ARM: dts: r8a7793: set maximum frequency for SDHI clocks ARM: dts: r8a7791: Add GyroADC clock and device node ARM: dts: r7s72100: add usb clocks to device tree ARM: dts: sh73a0: update PFC node name to pin-controller ARM: dts: r8a7793: update PFC node name to pin-controller ARM: dts: r8a7791: update PFC node name to pin-controller ARM: dts: r8a7790: update PFC node name to pin-controller ARM: dts: r8a7779: update PFC node name to pin-controller ARM: dts: r8a7778: update PFC node name to pin-controller ARM: dts: r8a7740: update PFC node name to pin-controller ARM: dts: r8a73a4: update PFC node name to pin-controller ARM: dts: emev2: update PFC node name to pin-controller ARM: dts: r7s72100: add USB bit definitions ARM: dts: r7s72100: add Renesas RZ/A1 pinctrl header ARM: dts: r8a7791: add GyroADC clock Signed-off-by: Olof Johansson commit f85a543e5373eebad2aa43785d58f6727e4203a3 Author: Jayachandran C Date: Mon May 22 07:36:05 2017 +0000 arm64: defconfig: drop ARCH_VULCAN ARCH_VULCAN (Broadcom Vulcan) has been discontinued and all its dependencies have been moved to ARCH_THUNDER2. It can be dropped from defconfig now. Signed-off-by: Jayachandran C Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 1 - 1 file changed, 1 deletion(-) commit a314520d8231765012051fbcfd7bea8a41daee94 Author: Jayachandran C Date: Mon May 22 07:36:04 2017 +0000 arm64: disable Broadcom Vulcan platform Disable the option ARCH_VULCAN as a step towards deleting it entirely. There is still a reference in the kernel tree for ARCH_VULCAN, so we have to keep the config option around until that reference is removed. Signed-off-by: Jayachandran C Signed-off-by: Olof Johansson arch/arm64/Kconfig.platforms | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0c34ca478ad5fa3a0abae5eae288afea422ddde5 Merge: 0266f79 fe47d56 Author: David S. Miller Date: Thu Jun 1 17:34:57 2017 -0400 Merge branch 'dsa-tagger-simplification' Vivien Didelot says: ==================== net: dsa: tagger simplification This series clarifies the hot path, removes the labels in tagging implementations, and frees the original SKB in the xmit caller. Changes in v3: - drop removal of usused rcv arguments because they will be used later - include the new ksz tagging implementation - add reviewers' tags Changes in v2: - do not remove tagger function copies - document hot path requirements - make netdev_uses_dsa simpler - add reviewers' tags ==================== Signed-off-by: David S. Miller commit fe47d563065c91cd30088d9b118b79d44905be6f Author: Vivien Didelot Date: Thu Jun 1 16:07:15 2017 -0400 net: dsa: factor skb freeing on xmit As of a86d8becc3f0 ("net: dsa: Factor bottom tag receive functions"), the rcv caller frees the original SKB in case or error. Be symmetric with that and make the xmit caller do the same. At the same time, fix the checkpatch NULL comparison check: CHECK: Comparison to NULL could be written "!nskb" #208: FILE: net/dsa/tag_trailer.c:35: + if (nskb == NULL) Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 8 ++++++-- net/dsa/tag_brcm.c | 6 +----- net/dsa/tag_dsa.c | 8 ++------ net/dsa/tag_edsa.c | 8 ++------ net/dsa/tag_ksz.c | 4 +--- net/dsa/tag_lan9303.c | 5 +---- net/dsa/tag_mtk.c | 6 +----- net/dsa/tag_qca.c | 6 +----- net/dsa/tag_trailer.c | 4 +--- 9 files changed, 16 insertions(+), 39 deletions(-) commit 5470979585d81271d4338c2accfd5e71dafa4af6 Author: Vivien Didelot Date: Thu Jun 1 16:07:14 2017 -0400 net: dsa: remove out_drop label in taggers rcv Many rcv functions from net/dsa/tag_*.c have a useless out_drop goto label which simply returns NULL. Kill it in favor of the obvious. Reviewed-by: Florian Fainelli Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/tag_brcm.c | 11 ++++------- net/dsa/tag_dsa.c | 13 +++++-------- net/dsa/tag_edsa.c | 13 +++++-------- net/dsa/tag_mtk.c | 9 +++------ net/dsa/tag_qca.c | 11 ++++------- net/dsa/tag_trailer.c | 9 +++------ 6 files changed, 24 insertions(+), 42 deletions(-) commit 717ffbfb28ac2b53d3140b2a7dfd345e1569b3a5 Author: Vivien Didelot Date: Thu Jun 1 16:07:13 2017 -0400 net: dsa: remove dsa_uses_tagged_protocol Since dev->dsa_ptr is a pointer to a dsa_switch_tree, there is no need to have another inline helper just to check rcv. Remove dsa_uses_tagged_protocol and check dsa_ptr && dsa_ptr->rcv together at the same time. Reviewed-by: Florian Fainelli Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 02f840cbc9fa9ee147d882edb96b203999c3ac62 Author: Vivien Didelot Date: Thu Jun 1 16:07:12 2017 -0400 net: dsa: do not cast dst dsa_ptr is not a void pointer anymore since Nov 2011, as of cf50dcc24f82 ("dsa: Change dsa_uses_{dsa, trailer}_tags() into inline functions"), but an explicit dsa_switch_tree pointer, thus remove the (void *) cast. Reviewed-by: Florian Fainelli Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 2 +- net/dsa/legacy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 73a7ece8f70c955464080e434b5324bcdfdcb1b1 Author: Vivien Didelot Date: Thu Jun 1 16:07:11 2017 -0400 net: dsa: comment hot path requirements The DSA layer uses inline helpers and copy of the tagging functions for faster access in hot path. Add comments to detail that. Reviewed-by: Florian Fainelli Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 3 +++ net/dsa/dsa_priv.h | 1 + 2 files changed, 4 insertions(+) commit 85cfa71764cab95228e0abebdd77e0382c3c34be Author: Jesse Brandeburg Date: Thu May 11 11:23:21 2017 -0700 i40evf: update i40evf.txt with new content The addition of the AVF and virtchnl code to the i40evf driver means we should update the i40evf.txt file with the most up to date information. It seems this file hasn't been updated in a while, so the changes cover a little more than just AVF, but it's all only in the i40evf.txt. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Documentation/networking/i40evf.txt | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit abf709a1e7316b3f99647bb88c4031b1e62e1c75 Author: Preethi Banala Date: Thu May 11 11:23:20 2017 -0700 i40evf: Add support for Adaptive Virtual Function Add device ID define and mac_type assignment needed for Adaptive Virtual Function (VF Base Mode Support). Also, update version to v3.0.0 in order to indicate clearly that this is the first driver supporting the AVF device ID. Signed-off-by: Preethi Banala Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/Kconfig | 10 ++++++---- drivers/net/ethernet/intel/i40evf/i40e_common.c | 1 + drivers/net/ethernet/intel/i40evf/i40e_devids.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf_main.c | 7 ++++--- 4 files changed, 12 insertions(+), 7 deletions(-) commit 73556269aab30c39cba9cf8efafc402d0deb87b2 Author: Sridhar Samudrala Date: Thu May 11 11:23:19 2017 -0700 virtchnl: Add compile time static asserts to validate structure sizes This uses preprocessor tricks to make sure that a divide by zero occurs if a struct changes size outside the expected number of bytes. Signed-off-by: Sridhar Samudrala Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher include/linux/avf/virtchnl.h | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit a33c83c4353b2efc4d883bad06a86a9ba2dde4fc Author: Sridhar Samudrala Date: Thu May 11 11:23:18 2017 -0700 virtchnl: Add pad fields to a couple of structures This removes holes and makes structure sizes consistent across 32 and 64 bit builds. Signed-off-by: Sridhar Samudrala Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher include/linux/avf/virtchnl.h | 3 +++ 1 file changed, 3 insertions(+) commit 735e35c56bbc91621942dc5111b2970beb00e75a Author: Jesse Brandeburg Date: Thu May 11 11:23:17 2017 -0700 i40e/virtchnl: move function to virtchnl This moves a function that is needed for the virtchnl interface from the i40e PF driver over to the virtchnl.h file. It was manually verified that the function in question is unchanged except for the function name and function header, which explains the slight difference in the number of lines removed/added. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 150 +-------------------- include/linux/avf/virtchnl.h | 147 ++++++++++++++++++++ 2 files changed, 148 insertions(+), 149 deletions(-) commit ff3f4cc267f6f39c2fc525c8918c929809defbfa Author: Jesse Brandeburg Date: Thu May 11 11:23:16 2017 -0700 virtchnl: finish conversion to virtchnl interface This patch implements the complete version of the virtchnl.h file with final renames, and fixes the related code in i40e and i40evf. It also expands comments, and adds details on the usage of certain fields. In addition, due to the changes a couple of casts are needed to prevent errors found by sparse after renaming some fields. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 18 +-- drivers/net/ethernet/intel/i40evf/i40e_common.c | 2 +- drivers/net/ethernet/intel/i40evf/i40evf.h | 2 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 11 +- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 6 +- include/linux/avf/virtchnl.h | 128 +++++++++++++-------- 6 files changed, 102 insertions(+), 65 deletions(-) commit f0adc6e831baaef16577ea2af5eb3e91fd4efef4 Author: Jesse Brandeburg Date: Thu May 11 11:23:15 2017 -0700 i40evf/virtchnl: whitespace cleanups This patch fixes up a bunch of whitespace issues introduced by the previous automated change of name from i40e to virtchnl. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 12 ++++-------- drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 3 +-- include/linux/avf/virtchnl.h | 6 +++--- 3 files changed, 8 insertions(+), 13 deletions(-) commit 764430ce6f8c38d7ed3b6d2cfe9450b9d3c78809 Author: Jesse Brandeburg Date: Thu May 11 11:23:14 2017 -0700 i40e/virtchnl: refactor code for validate checks This change updates the arguments passed to the validate function and fixes the caller, as well as uses the new return values added to virtchnl.h One other minor tweak, remove a duplicate set to zero of valid_len. This is in preparation for moving the function to virtchnl.h. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 36 ++++++++++++---------- include/linux/avf/virtchnl.h | 17 ++++++++++ 2 files changed, 37 insertions(+), 16 deletions(-) commit eedcfef85b15ae02c488625556702594a618c616 Author: Jesse Brandeburg Date: Thu May 11 11:23:13 2017 -0700 virtchnl: convert to new macros As part of the conversion, change the arguments to VF_IS_V1[01] macros and move them to virtchnl.h Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 +++--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 3 --- include/linux/avf/virtchnl.h | 3 +++ 3 files changed, 6 insertions(+), 6 deletions(-) commit 260e93820ad6c35d189210b4d86989a1df054e55 Author: Jesse Brandeburg Date: Thu May 11 11:23:12 2017 -0700 virtchnl: move some code to core driver Before moving this function over to virtchnl.h, move some driver specific checks that had snuck into a fairly generic function, back into the caller of the function. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 30 +++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) commit 310a2ad92e3fd9139e3641464f1de113fa89825b Author: Jesse Brandeburg Date: Thu May 11 11:23:11 2017 -0700 virtchnl: rename i40e to generic virtchnl This morphs all the i40e and i40evf references to/in virtchnl.h to be generic, using only automated methods. Updates all the callers to use the new names. A followup patch provides separate clean ups for messy line conversions from these "automatic" changes, to make them more reviewable. Was executed with the following sed script: sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_client.c sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_prototype.h sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40e_common.c sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40e_prototype.h sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf.h sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf_client.c sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf_main.c sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c sed -i -f transform_script include/linux/avf/virtchnl.h transform_script: ----8<---- s/I40E_VIRTCHNL_SUPPORTED_QTYPES/SAVE_ME_SUPPORTED_QTYPES/g s/I40E_VIRTCHNL_VF_CAP/SAVE_ME_VF_CAP/g s/I40E_VIRTCHNL_/VIRTCHNL_/g s/i40e_virtchnl_/virtchnl_/g s/i40e_vfr_/virtchnl_vfr_/g s/I40E_VFR_/VIRTCHNL_VFR_/g s/VIRTCHNL_OP_ADD_ETHER_ADDRESS/VIRTCHNL_OP_ADD_ETH_ADDR/g s/VIRTCHNL_OP_DEL_ETHER_ADDRESS/VIRTCHNL_OP_DEL_ETH_ADDR/g s/VIRTCHNL_OP_FCOE/VIRTCHNL_OP_RSVD/g s/SAVE_ME_SUPPORTED_QTYPES/I40E_VIRTCHNL_SUPPORTED_QTYPES/g s/SAVE_ME_VF_CAP/I40E_VIRTCHNL_VF_CAP/g ----8<---- Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 4 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 370 ++++++++++----------- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 6 +- drivers/net/ethernet/intel/i40evf/i40e_common.c | 10 +- drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 4 +- drivers/net/ethernet/intel/i40evf/i40evf.h | 22 +- drivers/net/ethernet/intel/i40evf/i40evf_client.c | 18 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 48 +-- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 280 ++++++++-------- include/linux/avf/virtchnl.h | 233 ++++++------- 11 files changed, 499 insertions(+), 498 deletions(-) commit 55cdfd48f217533d2eef3e68ccc5b7af098e8640 Author: Jesse Brandeburg Date: Thu May 11 11:23:10 2017 -0700 i40e: use new unified virtchnl header file This patch changes the i40e driver to start using the new virtchnl interface header file, and removes an already existing duplicate of the i40e_virtchnl.h file contained in the i40e directory. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_common.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl.h | 449 ----------------------- 4 files changed, 3 insertions(+), 452 deletions(-) commit 681bdf80cff6844f81216b6b05516d82f69c23fd Author: Jesse Brandeburg Date: Thu May 11 11:23:09 2017 -0700 i40e/i40evf: create and use new unified header file This moves a header for i40evf to include/linux/avf/virtchnl.h. The directory name AVF is an acronym for the Intel(R) Adaptive Virtual Function. This first step creates the new file, which is a rename of drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h to include/linux/avf/virtchnl.h, and should show up in git as a rename when using git log --follow. To keep things building after the move, the changes to the i40evf driver are made to point to the new include file location. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher MAINTAINERS | 1 + drivers/net/ethernet/intel/i40evf/i40e_common.c | 2 +- drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 2 +- drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h | 446 --------------------- drivers/net/ethernet/intel/i40evf/i40evf.h | 2 +- include/linux/avf/virtchnl.h | 446 +++++++++++++++++++++ 6 files changed, 450 insertions(+), 449 deletions(-) commit 392908033308892b9da71551a65b4e59c5006b1c Author: Jesse Brandeburg Date: Thu May 11 11:23:08 2017 -0700 i40evf: drop i40e_type.h include This drops the i40e_type.h include in anticipation of the next patch which moves this file to a location where type.h doesn't exist, and all the places this file is included already include i40e_type.h before this file. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h | 2 -- 1 file changed, 2 deletions(-) commit 23c0c210a1adcfca27a52808d1a0cbd807e86518 Author: Randy Li Date: Tue May 30 23:52:46 2017 +0800 ARM: dts: rockchip: add adc button for Firefly The only adc button connected to adc input is recovery button. Signed-off-by: Randy Li Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-firefly-reload.dts | 17 +++++++++++++++++ arch/arm/boot/dts/rk3288-firefly.dtsi | 13 +++++++++++++ 2 files changed, 30 insertions(+) commit a107ebf61e8cc59dfbaeb676fa2d2a1783250f80 Author: Leo Liu Date: Wed May 31 14:25:54 2017 -0400 drm/amdgpu: add saved_bo to save vce 4.0 context when suspend We are using PSP to resume firmware after suspend, and it is resumed at where it got suspended, so we'd better save the the context. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h | 1 + drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 45 +++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 8 deletions(-) commit 78b3c83983ce42067816a30825f9692eae952093 Author: Leo Liu Date: Wed May 31 14:13:20 2017 -0400 drm/amdgpu: use existing function amdgpu_bo_create_kernel To simplify vce bo create Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) commit 91415a09ab868aa14584465771f69666354d2ceb Author: Leo Liu Date: Wed May 31 14:07:36 2017 -0400 drm/amdgpu: add vcpu_bo cpu address for vce Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h | 1 + 1 file changed, 1 insertion(+) commit e59c020598666ffc22c627910667e44ac2412304 Author: Alex Xie Date: Thu Jun 1 09:42:59 2017 -0400 drm/amdgpu: Move compute vm bug logic to amdgpu_vm.c In review, Christian would like to keep the logic inside amdgpu_vm.c with a cost of slightly slower. The loop is still optimized out with this patch. v2: remove the if statement. Now it is not slower. Signed-off-by: Alex Xie Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 32 ------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 5 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 38 ++++++++++++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + 5 files changed, 39 insertions(+), 39 deletions(-) commit 117a48a7add55e6d9e84a23fe585c6a648096a64 Author: Rex Zhu Date: Wed May 31 19:53:04 2017 +0800 drm/amd/powerplay: enable CKS by default on vega10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 040cd2d1f5037be4a1cfe4f4e4b3be248707dc0c Author: Rex Zhu Date: Wed May 31 19:29:53 2017 +0800 drm/amd/powerplay: Align with VBIOS to support AVFS parameters. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atomfirmware.h | 12 ++++++------ drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 12 ++++++------ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) commit c5b053d2a07b3628ed3a9ccf5082d93762618bf2 Author: Rex Zhu Date: Wed May 31 16:58:31 2017 +0800 drm/amd/powerplay: Add floor DCEF for DS on boot. Use the vbios to look up the default frequencies for socclk and dcefclk. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 31 +++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.h | 3 +++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 +++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) commit 30181faae37fa80d3aa73672e5df5f2a5b8dea0a Author: Bart Van Assche Date: Wed May 31 14:43:50 2017 -0700 nfsd: Check queue type before submitting a SCSI request Since using scsi_req() is only allowed against request queues for which struct scsi_request is the first member of their private request data, refuse to submit SCSI commands against a queue for which this is not the case. References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: J. Bruce Fields Cc: Jeff Layton Cc: Omar Sandoval Cc: linux-nfs@vger.kernel.org Signed-off-by: Jens Axboe fs/nfsd/blocklayout.c | 3 +++ 1 file changed, 3 insertions(+) commit 73d17701db503382eeed03afb3a6c39ec4d9a5c7 Author: Bart Van Assche Date: Wed May 31 14:43:49 2017 -0700 cdrom: Check SCSI passthrough support before reading audio The CDROMREADAUDIO ioctl uses SCSI passthrough when the .disk pointer has been set in struct cdrom_device_info. Hence check whether SCSI passthrough is supported before submitting a SCSI command. Note: both the ide-cd and sr drivers set the disk pointer in struct cdrom_device_info but neither the pcd nor the gdrom driver sets that pointer. References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Omar Sandoval Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe drivers/cdrom/cdrom.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ec2be6a98e50d3eb9f35f70aa51c5d2c23737c55 Author: Bart Van Assche Date: Wed May 31 14:43:48 2017 -0700 pktcdvd: Check queue type before attaching to a queue Since the pktcdvd driver only supports request queues for which struct scsi_request is the first member of their private request data, refuse to register block layer queues for which struct scsi_request is not the first member of the private data. References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/pktcdvd.c | 5 +++++ 1 file changed, 5 insertions(+) commit d9f972644606ecc2581390b43cb5a980b54c04bf Author: Bart Van Assche Date: Wed May 31 14:43:47 2017 -0700 bsg: Check queue type before attaching to a queue Since BSG only supports request queues for which struct scsi_request is the first member of their private request data, refuse to register block layer queues for which struct scsi_request is not the first member of their private data. References: commit bd1599d931ca ("scsi_transport_sas: fix BSG ioctl memory corruption") References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Omar Sandoval Signed-off-by: Jens Axboe block/bsg.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9efc160f4bbd69b17b48edec53067537d04e62b7 Author: Bart Van Assche Date: Wed May 31 14:43:46 2017 -0700 block: Introduce queue flag QUEUE_FLAG_SCSI_PASSTHROUGH From the context where a SCSI command is submitted it is not always possible to figure out whether or not the queue the command is submitted to has struct scsi_request as the first member of its private data. Hence introduce the flag QUEUE_FLAG_SCSI_PASSTHROUGH. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Cc: Omar Sandoval Cc: Don Brace Signed-off-by: Jens Axboe block/bsg-lib.c | 1 + drivers/block/cciss.c | 1 + drivers/ide/ide-probe.c | 1 + drivers/scsi/scsi_lib.c | 2 ++ drivers/scsi/scsi_transport_sas.c | 1 + include/linux/blkdev.h | 3 +++ 6 files changed, 9 insertions(+) commit 0266f79778de0afadd070941aae493c28529d974 Author: Ido Schimmel Date: Wed May 31 21:33:42 2017 +0300 mlxsw: spectrum: Add bridge dependency for spectrum When BRIDGE is a loadable module, MLXSW_SPECTRUM mustn't be built-in: drivers/built-in.o: In function `mlxsw_sp_bridge_device_create': drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:145: undefined reference to `br_vlan_enabled' drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:158: undefined reference to `br_multicast_enabled' drivers/built-in.o: In function `mlxsw_sp_dev_rif_type': drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:2972: undefined reference to `br_vlan_enabled' drivers/built-in.o: In function `mlxsw_sp_inetaddr_vlan_event': drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3310: undefined reference to `br_vlan_enabled' Add Kconfig dependency to enforce usable configurations. Fixes: c57529e1d5d8 ("mlxsw: spectrum: Replace vPorts with Port-VLAN") Signed-off-by: Ido Schimmel Reported-by: Nikolay Aleksandrov Tested-by: Nikolay Aleksandrov Cc: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + 1 file changed, 1 insertion(+) commit edea55abb86ff67afda96120d6254290e7a75d9e Author: Bart Van Assche Date: Thu Jun 1 08:55:13 2017 -0700 blk-mq-debugfs: Add 'kick' operation Running a queue causes the block layer to examine the per-CPU and hw queues but not the requeue list. Hence add a 'kick' operation that also examines the requeue list. Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Eduardo Valentin Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2720bab50258782573df0f536681bece11e784f0 Author: Bart Van Assche Date: Thu Jun 1 08:55:12 2017 -0700 blk-mq-debugfs: Show busy requests Requests that got stuck in a block driver are neither on blk_mq_ctx.rq_list nor on any hw dispatch queue. Make these visible in debugfs through the "busy" attribute. Signed-off-by: Bart Van Assche Reviewed-by: Eduardo Valentin Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 8ef1a191038c138d5675933cd69d47747d0d396b Author: Bart Van Assche Date: Thu Jun 1 08:55:11 2017 -0700 blk-mq-debugfs: Show requeue list When verifying whether or not a blk-mq driver forgot to kick the requeue list after having requeued a request it is important to be able to verify the contents of the requeue list. Hence export that list through debugfs. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Ming Lei Reviewed-by: Eduardo Valentin Cc: Christoph Hellwig Cc: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit c0cb1c6d39060ce04470b10347b7b6f1df77bef5 Author: Bart Van Assche Date: Thu Jun 1 08:55:10 2017 -0700 blk-mq-debugfs: Show atomic request flags When analyzing e.g. queue lockups it is important to know whether or not a request has already been started. Hence also show the atomic request flags. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Ming Lei Reviewed-by: Eduardo Valentin Cc: Omar Sandoval Cc: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f3314c61c2e615dd1ba4f005326586eb223b1a94 Merge: 042cc40 2428fd0 Author: David S. Miller Date: Thu Jun 1 14:53:10 2017 -0400 Merge branch 'stmmac-add-dwmac-sun8i-ethernet-driver' Corentin Labbe says: ==================== net-next: stmmac: add dwmac-sun8i ethernet driver This patch series add the driver for dwmac-sun8i which handle the Ethernet MAC present on Allwinner H3/H5/A83T/A64 SoCs. This driver is the continuation of the sun8i-emac driver. During the development, it appeared that in fact the hardware was a modified version of some dwmac. So the driver is now written as a glue driver for stmmac. It supports 10/100/1000 Mbit/s speed with half/full duplex. It can use an internal PHY (MII 10/100) or an external PHY via RGMII/RMII. This patch series enable the driver only for the H3/A64/H5 SoC since A83T doesn't have the necessary clocks present in mainline. The driver have been tested on the following boards: - H3 Orange PI PC, BananaPI-M2+ - A64 Pine64, BananaPi-M64 - A83T BananaPI-M3 The first two patchs are some mandatory changes for letting dwmac-sun8i be used. The following three patchs add the driver and its documentation. The remaining are DT patch enabling it. Regards Corentin Labbe Changes since v5: - Added DT patch for NanoPi neo - Use the new adjust_link variables (speedxxx/speedmask) - Made the timeout of readl_poll_timeout from 10 to 100ms - Fix sun8i_unpower_phy that could be called twice - Replace phy by phy-handle in doc/dwmac-sun8i.txt Changes since v4: - Re-ordered by alphabetical order some DT nodes - Simplified power/unpower_phy functions by testing the use of internal_phy - Added a patch for adding dwmac-sun8i to arm64 defconfig - Fix a typo in sun50i-a64-system-controller (wrongly used sun8i) - Reworked uc/mc filter address setting Changes since v3: - Renamed tx-delay/rx-delay to tx-delay-ps/rx-delay-ps - fix syscon compatible example - Changed parameter type for setup() function - Dropped some DT patchs for boards which I could not test further Changes since v2: - corrected order of syscon compatible - added compatible = "ethernet-phy-ieee802.3-c22 to PHY - added set_mac function Changes since v1: - added TX/RX delay units - splitted syscon documentation in its own patch - regulator is now disabled after clk_prepare_enable(gmac->tx_clk) error - Fixed a memory leak on mac_device_info - Use now generic pin config for all DT stuff - CONFIG_DWMAC_SUN8I is now set to y in defconfigs ==================== Signed-off-by: David S. Miller commit 2428fd0fe5508f5d8599d70cd6f650e19e835b5a Author: LABBE Corentin Date: Wed May 31 09:18:52 2017 +0200 arm64: defconfig: Enable dwmac-sun8i driver on defconfig Enable the dwmac-sun8i ethernet driver as a module in the ARM64 defconfig. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 5209324407477f5dbe2ad6def17584e80b7faa91 Author: LABBE Corentin Date: Wed May 31 09:18:51 2017 +0200 arm: multi_v7: Enable dwmac-sun8i driver on multi_v7_defconfig Enable the dwmac-sun8i driver in the multi_v7 default configuration Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit b97a96848011322f7ce24c7a4dce5c0066846e56 Author: LABBE Corentin Date: Wed May 31 09:18:50 2017 +0200 arm: sunxi: Enable dwmac-sun8i driver on sunxi_defconfig Enable the dwmac-sun8i driver in the sunxi default configuration Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/configs/sunxi_defconfig | 1 + 1 file changed, 1 insertion(+) commit 67e29b4240e305c687b43de908c51f842ce1b507 Author: LABBE Corentin Date: Wed May 31 09:18:49 2017 +0200 arm64: allwinner: bananapi-m64: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the BananaPi M64. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 72aa5f0fd198569be85c843bbbf6ec4a06553910 Author: LABBE Corentin Date: Wed May 31 09:18:48 2017 +0200 arm64: allwinner: pine64-plus: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the pine64 plus. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller .../arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 93264150b017ae1d3edbae883d0df6962d859180 Author: LABBE Corentin Date: Wed May 31 09:18:47 2017 +0200 arm64: allwinner: pine64: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the pine64 It uses an external PHY via RMII. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 103aefa01c1ba7528a6035658dcf43f85409115d Author: LABBE Corentin Date: Wed May 31 09:18:46 2017 +0200 arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver The dwmac-sun8i is an Ethernet MAC that supports 10/100/1000 Mbit connections. It is very similar to the device found in the Allwinner H3, but lacks the internal 100 Mbit PHY and its associated control bits. This adds the necessary bits to the Allwinner A64 SoC .dtsi, but keeps it disabled at this level. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit b89acf34c6427104b63cdc2be9300c80540728ed Author: LABBE Corentin Date: Wed May 31 09:18:45 2017 +0200 arm64: allwinner: sun50i-a64: Add dt node for the syscon control module This patch add the dt node for the syscon register present on the Allwinner A64. Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 6f9461d6a489b3e9884a7a4eb9df6f20ad7c5857 Author: LABBE Corentin Date: Wed May 31 09:18:44 2017 +0200 arm: sun8i: nanopi-neo: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the NanoPi Neo. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 29eb9d2984402db5e303c476c8efa8a2f587196b Author: LABBE Corentin Date: Wed May 31 09:18:43 2017 +0200 arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high On the Orange Pi PC Plus, the polarity of the LEDs on the RJ45 Ethernet port were changed from active low to active high. Signed-off-by: Chen-Yu Tsai Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 0d38218c4d84ec1a975195cf45eeda0fae6b0c0a Author: LABBE Corentin Date: Wed May 31 09:18:42 2017 +0200 arm: sun8i: orangepi-2: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI 2. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit bec8f59b740d8e4f6c7fa868487f795a5897b09a Author: LABBE Corentin Date: Wed May 31 09:18:41 2017 +0200 arm: sun8i: orangepi-one: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI One. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0e4da3444597a737e26d296d782227674effc5b7 Author: LABBE Corentin Date: Wed May 31 09:18:40 2017 +0200 arm: sun8i: orangepi-zero: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI Zero. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 62781b28785d3b21b58152489fea6fe14450eaaf Author: LABBE Corentin Date: Wed May 31 09:18:39 2017 +0200 arm: sun8i: orangepi-pc: Enable dwmac-sun8i The dwmac-sun8i hardware is present on the Orange PI PC. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 33125eaae481ad7da6b281f25b77a7bc91732b25 Author: LABBE Corentin Date: Wed May 31 09:18:38 2017 +0200 arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver The dwmac-sun8i is an ethernet MAC hardware that support 10/100/1000 speed. This patch enable the dwmac-sun8i on Allwinner H3/H5 SoC Device-tree. SoC H3/H5 have an internal PHY, so optionals syscon and ephy are set. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sunxi-h3-h5.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 2c0cba482e795ff2cae4729bd1522b289c5b4412 Author: LABBE Corentin Date: Wed May 31 09:18:37 2017 +0200 arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module This patch add the dt node for the syscon register present on the Allwinner H3/H5 Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock.. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/arm/boot/dts/sunxi-h3-h5.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 9f93ac8d4085f718d3c7c5fedcb98dbdd2287648 Author: LABBE Corentin Date: Wed May 31 09:18:36 2017 +0200 net-next: stmmac: Add dwmac-sun8i The dwmac-sun8i is a heavy hacked version of stmmac hardware by allwinner. In fact the only common part is the descriptor management and the first register function. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 990 +++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 15 + .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 9 +- include/linux/stmmac.h | 1 + 6 files changed, 1025 insertions(+), 2 deletions(-) commit ce5a4ff3c5058a1c934d3416385948a499a62e6f Author: LABBE Corentin Date: Wed May 31 09:18:35 2017 +0200 dt-bindings: syscon: Add DT bindings documentation for Allwinner syscon This patch adds documentation for Device-Tree bindings for the syscon present in allwinner devices. Signed-off-by: Corentin Labbe Acked-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/misc/allwinner,syscon.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 0441bde003bee53a61d7e365562a295f2049ca53 Author: LABBE Corentin Date: Wed May 31 09:18:34 2017 +0200 dt-bindings: net-next: Add DT bindings documentation for Allwinner dwmac-sun8i This patch adds documentation for Device-Tree bindings for the Allwinner dwmac-sun8i driver. Signed-off-by: Corentin Labbe Acked-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/dwmac-sun8i.txt | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit ec33d71de7309c50531c2ae0eb178244899e6e46 Author: LABBE Corentin Date: Wed May 31 09:18:33 2017 +0200 net-next: stmmac: add optional setup function Instead of adding more ifthen logic for adding a new mac_device_info setup function, it is easier to add a function pointer to the function needed. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++- include/linux/stmmac.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit 3874191898675ac34b6d1d94cfe997c570492bbb Author: LABBE Corentin Date: Wed May 31 09:18:32 2017 +0200 net-next: stmmac: export stmmac_set_mac_addr/stmmac_get_mac_addr Thoses symbol will be needed for the dwmac-sun8i ethernet driver. For letting it to be build as module, they need to be exported. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 042cc409349f997d8a04f26829e4a048538a9794 Author: Stephen Rothwell Date: Wed May 31 15:43:37 2017 +1000 powerpc: use asm-generic/socket.h as much as possible asm-generic/socket.h already has an exception for the differences that powerpc needs, so just include it after defining the differences. Signed-off-by: Stephen Rothwell Acked-by: Arnd Bergmann Signed-off-by: David S. Miller arch/powerpc/include/uapi/asm/socket.h | 92 +--------------------------------- 1 file changed, 1 insertion(+), 91 deletions(-) commit 44225c9c79ae288b5f1668dc5dda7ba9f87995f1 Author: Chris Packham Date: Thu May 25 11:49:13 2017 +1200 mtd: mchp23k256: switch to mtd_device_register() Use mtd_device_register() instead of mtd_device_parse_register() to eliminate two unused parameters. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/devices/mchp23k256.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4db4d35ebda390b5287d758fdd51b26c24fbc26b Author: Chris Packham Date: Thu May 25 11:49:12 2017 +1200 mtd: mchp23k256: Add OF device ID table This allows registering of this device via a Device Tree. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn Acked-by: Boris Brezillon Acked-by: Rob Herring Signed-off-by: Brian Norris .../devicetree/bindings/mtd/microchip,mchp23k256.txt | 18 ++++++++++++++++++ drivers/mtd/devices/mchp23k256.c | 8 ++++++++ 2 files changed, 26 insertions(+) commit e3db1289e7432a882823a7effc474aff78868489 Merge: c316cf6 05e97a9 Author: Brian Norris Date: Thu Jun 1 11:24:24 2017 -0700 Merge MTD fixes into -next commit cf97825862f0acd7d6bad67da59962e4badc870a Author: Vadim Lomovtsev Date: Wed May 31 18:51:57 2017 +0300 EDAC, thunderx: Fix a warning during l2c debugfs node creation Compare the number of debugfs entries created by thunderx_create_debugfs_nodes() with the requested number of entries to properly determine whether to print a warning. Signed-off-by: Vadim Lomovtsev Cc: linux-edac Cc: linux-mips@linux-mips.org Link: http://lkml.kernel.org/r/20170531155157.93583-1-stemerkhanov@cavium.com Signed-off-by: Sergey Temerkhanov Signed-off-by: Borislav Petkov drivers/edac/thunderx_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1151f838cb626005f4d69bf675dacaaa5ea909d6 Author: Ard Biesheuvel Date: Fri May 19 16:42:00 2017 +0100 arm64: kernel: restrict /dev/mem read() calls to linear region When running lscpu on an AArch64 system that has SMBIOS version 2.0 tables, it will segfault in the following way: Unable to handle kernel paging request at virtual address ffff8000bfff0000 pgd = ffff8000f9615000 [ffff8000bfff0000] *pgd=0000000000000000 Internal error: Oops: 96000007 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 1284 Comm: lscpu Not tainted 4.11.0-rc3+ #103 Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 task: ffff8000fa78e800 task.stack: ffff8000f9780000 PC is at __arch_copy_to_user+0x90/0x220 LR is at read_mem+0xcc/0x140 This is caused by the fact that lspci issues a read() on /dev/mem at the offset where it expects to find the SMBIOS structure array. However, this region is classified as EFI_RUNTIME_SERVICE_DATA (as per the UEFI spec), and so it is omitted from the linear mapping. So let's restrict /dev/mem read/write access to those areas that are covered by the linear region. Reported-by: Alexander Graf Fixes: 4dffbfc48d65 ("arm64/efi: mark UEFI reserved regions as MEMBLOCK_NOMAP") Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/mm/mmap.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit cae285ea12b54adb99fb758f9edc0333606e4f89 Author: Richard Gong Date: Thu Jun 1 09:23:59 2017 -0500 dt-bindings: reset: Add reset manager offsets for Stratix10 There are several changes in reset manager offsets from Arria10 to Stratix10. This patch is based on one from Arria10 and adds offset updates for Stratix10 Signed-off-by: Richard Gong include/dt-bindings/reset/altr,rst-mgr-s10.h | 108 +++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit 838b56adab18040657ec40322fd01d6ebf312ee7 Author: Logan Gunthorpe Date: Tue May 30 16:39:17 2017 -0600 dmaengine: ste_dma40: Cleanup scatterlist layering violations This dma engine driver directly accesses page_link assuming knowledge that should be contained only in scatterlist.h. We replace this access with a call to sg_chain which is equivalent. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Acked-by: Linus Walleij Cc: Dan Williams Cc: Vinod Koul Cc: Per Förlin Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ce81801372313805aa649ea18d27b2fb5f6c16b5 Author: Logan Gunthorpe Date: Tue May 30 16:39:16 2017 -0600 dmaengine: imx-dma: cleanup scatterlist layering violations This dma engine driver directly accesses page_link assuming knowledge that should be contained only in scatterlist.h. We replace these with calls to sg_chain and sg_assign_page. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Acked-by: Linus Walleij Cc: Dan Williams Cc: Vinod Koul Cc: Per Förlin Signed-off-by: Vinod Koul drivers/dma/imx-dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 33cb0880e0544c1553d37f4877fbd7a7a84f444f Author: Wolfram Sang Date: Sun May 28 11:30:44 2017 +0200 dmaengine: use proper name for the R-Car SoC It is 'R-Car', not 'r-car'. No code or binding changes, only descriptive text. Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/shdma.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f28e783ff668cf5757182f6b00d488be37226bff Author: Casey Schaufler Date: Wed May 31 13:23:41 2017 -0700 Smack: Use cap_capable in privilege check Use cap_capable() rather than capable() in the Smack privilege check as the former does not invoke other security module privilege check, while the later does. This becomes important when stacking. It may be a problem even with minor modules. Signed-off-by: Casey Schaufler security/smack/smack.h | 2 +- security/smack/smack_access.c | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) commit 51d59af26fe81967e0d7ec92bd9381d3b26434f3 Author: Casey Schaufler Date: Wed May 31 08:53:42 2017 -0700 Smack: Safer check for a socket in file_receive The check of S_ISSOCK() in smack_file_receive() is not appropriate if the passed descriptor is a socket. Reported-by: Stephen Smalley Signed-off-by: Casey Schaufler security/smack/smack_lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e661a58279132da0127c67705e59d12f6027858d Author: Florian Westphal Date: Fri Apr 21 11:49:08 2017 +0200 smack: use pernet operations for hook registration It will allow us to remove the old netfilter hook api in the near future. Signed-off-by: Florian Westphal Signed-off-by: Casey Schaufler security/smack/smack_netfilter.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit ce6ef68f433f2c97e5d2cf35d2b694e17592d350 Author: Yotam Gigi Date: Thu Jun 1 16:26:46 2017 +0300 mlxsw: spectrum: Implement the ethtool flash_device callback Add callback to the ethtool flash_device op. This callback uses the mlxfw module to flash the new firmware file to the device. As the firmware flash process takes about 20 seconds and ethtool takes the rtnl lock during the flash_device callback, release the rtnl lock at the beginning of the flash process and take it again before leaving the callback. This way, the rtnl is not held during the process. To make sure the device does not get deleted during the flash process, take a reference to it before releasing the rtnl lock. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 51 +++++++++++++++++++++----- 1 file changed, 42 insertions(+), 9 deletions(-) commit 40aa306f8dafaf872da1a71479e933bd3ce0c294 Merge: 7b954ed 1ee240e Author: David S. Miller Date: Thu Jun 1 12:17:21 2017 -0400 Merge branch 'qed-Status-block-changes' Yuval Mintz says: ==================== qed: Status block changes The device maintains a CAM mapping of the internal status blocks and the various PF/VF MSI-x vector mappings. During initialization, the driver reads the HW memory and constructs a shadow SW implementation which it would later use for manipulation of interrupts. E.g., when enabling VFs and setting their MSI-x tables. The driver currently has some very strict assumptions on the order the entries are placed in the CAM. Specifically, it assumes that all entries belonging to a PF would be consecutive and in-order in the CAM, and that the VF entries would then follow. But there's no actual HW constraint enforcing this assumption [although management firmware does set it accordingly to same assumption initially]. Since the CAM is re-configurable, there are now SW flows employeed by other OSes that might cause the assumption to be invalid. Such flows allow the PF to forfeit some of it's available interrupts in favor of its VFs or vice versa. While those are not employeed today by qed, we want to relax the assumptions as much as we can - both to allow functionality after PDA as well as allowing future compatibility where the driver would be loaded after a newer one has 'dirtied' the CAM configuration. In addition to patches meant for the above relaxation, the series also contains various cleanups & refactoring for interrupt logic [most of which is !semantic]. ==================== Signed-off-by: David S. Miller commit 1ee240e31d4c0a5fd37ebaf064ca1f6cb6adcb6f Author: Mintz, Yuval Date: Thu Jun 1 15:29:11 2017 +0300 qed: No need to reset SBs on IOV init Since we're resetting the IGU CAM each time we initialize the PF device, there's no need to reset the VF SBs again when initializing IOV. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 30 +---------------------------- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 5 ++--- 3 files changed, 4 insertions(+), 33 deletions(-) commit ebbdcc669c7f9d8632d358a739d814485f8917dc Author: Mintz, Yuval Date: Thu Jun 1 15:29:10 2017 +0300 qed: Reset IGU CAM to default on init The IGU CAM contains an assocaition between hardware SBs and interrupt lines, and it can be dynamically configured to allow more interrupts in one entity over another, specifically for Re-distibution of SBs between a PF and its child VFs. While we don't yet use this functionality, there are other clients that do and as such its possible the information passed from management firmware during initialization in regard to the possible number of SBs doesn't accurately reflect the current HW configuration. The following changes are going to apply to the driver init sequence: a. PF is going to re-configure all entries belonging to itself and its child VFs in IGU CAM based on the management firmware info regarding the number of SBs that are supposed to exist there. b. PF is going to stop using the SB resource [management firmware provided information] for anything but the initialization. Instead, it would use the live-time counters it maintains for the numbers. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 35 ++++---- drivers/net/ethernet/qlogic/qed/qed_int.c | 138 +++++++++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_int.h | 9 ++ 3 files changed, 162 insertions(+), 20 deletions(-) commit 50a207147fceb64ad24c1e08e4a2a75535922e81 Author: Mintz, Yuval Date: Thu Jun 1 15:29:09 2017 +0300 qed: Hold a single array for SBs A PF today holds 2 different arrays - one holding information about the HW configuration and one holding information about the SBs that are used by the protocol drivers. These arrays aren't really connected - e.g., protocol driver initializing a given SB would not mark the same SB as occupied in the HW shadow array. Move into a single array [at least for PFs] - hold the mapping of the driver-protocol SBs on the HW entry which they configure. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 4 --- drivers/net/ethernet/qlogic/qed/qed_fcoe.c | 5 +++- drivers/net/ethernet/qlogic/qed/qed_int.c | 46 ++++++++++++++++++++++------- drivers/net/ethernet/qlogic/qed/qed_int.h | 23 +++++++++++---- drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_roce.c | 5 ++-- drivers/net/ethernet/qlogic/qed/qed_vf.c | 27 +++++++++++++++-- drivers/net/ethernet/qlogic/qed/qed_vf.h | 18 +++++++++++ 8 files changed, 103 insertions(+), 27 deletions(-) commit 09b6b14749523e3660b72be2ed91b3c0b852f58f Author: Mintz, Yuval Date: Thu Jun 1 15:29:08 2017 +0300 qed: Provide auxiliary for getting free VF SB IOV code is very intrusive in its manipulation of the status block database. Add a new auxiliary function to allow the PF to find an available unused status block to configure for a specific VF's MSI-x vector. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 20 ++++++++++++ drivers/net/ethernet/qlogic/qed/qed_int.h | 11 +++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 49 ++++++++++++----------------- 3 files changed, 51 insertions(+), 29 deletions(-) commit 1ac72433c565c8db38fd1f9db80a73193369e5fc Author: Mintz, Yuval Date: Thu Jun 1 15:29:07 2017 +0300 qed: Remove assumption on SB order in IGU Current code assumes there's a known layout for SBs in the IGU, where all the SBs of a single entity would be laid in consecutive order of vectors. While the assumption is still kept by management firmware, we already have the necessary information to eliminate it, so no reason to keep it in code. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 79 ++++++++++++------------------- drivers/net/ethernet/qlogic/qed/qed_int.h | 15 ++---- 2 files changed, 33 insertions(+), 61 deletions(-) commit 726fdbe9fa7ebccda1579716f68f8bae6fa9c87a Author: Mintz, Yuval Date: Thu Jun 1 15:29:06 2017 +0300 qed: Encapsulate interrupt counters in struct We already have an API struct that contains interrupt-related numbers. Use it to encapsulate all information relating to the status of SBs as (used|free). Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 ++-- drivers/net/ethernet/qlogic/qed/qed_int.c | 20 +++++++++----------- drivers/net/ethernet/qlogic/qed/qed_int.h | 10 +++++----- drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 9 ++++----- include/linux/qed/qed_if.h | 12 +++++++++--- 6 files changed, 30 insertions(+), 27 deletions(-) commit a333f7f3fd327d736a23c52aafcfe17c75f2610c Author: Mintz, Yuval Date: Thu Jun 1 15:29:05 2017 +0300 qed: Add aux. function translating sb_id -> igu_sb_id An additional step for relaxing the IGU order assumption, we now add an auxiliary function that can be used for finding the HW status block that's associated with a given MSI-x vector. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit d031548e9194714dc2e8cb928d9f671432c8a342 Author: Mintz, Yuval Date: Thu Jun 1 15:29:04 2017 +0300 qed: Distinguish between sb_id and igu_sb_id In qed code, sb_id means 2 different things: - An interrupt vector [usually when received as a parameter from a protocol driver, but not only] that's associated with a status block. - An index to a status block entity existing in HW. This patch renames the references to the HW entity, adding an 'igu_' prefix to allow an easier distinction. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 12 ++++++---- drivers/net/ethernet/qlogic/qed/qed_int.c | 39 +++++++++++++++++-------------- drivers/net/ethernet/qlogic/qed/qed_int.h | 4 ++-- 3 files changed, 30 insertions(+), 25 deletions(-) commit d749dd0dc117e7b02fa3a169c431476d59d18950 Author: Mintz, Yuval Date: Thu Jun 1 15:29:03 2017 +0300 qed: IGU read revised As a first step for relaxing various assumptions done by driver about the IGU mapping, the driver is now going to read the entire IGU into a shadow copy, and mark in its database each status block that's relevant for it. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_int.c | 203 ++++++++++------------------ drivers/net/ethernet/qlogic/qed/qed_int.h | 11 +- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 7 +- 4 files changed, 83 insertions(+), 140 deletions(-) commit 979cead3deb9f938cd91aa9775744fe7275151c0 Author: Mintz, Yuval Date: Thu Jun 1 15:29:02 2017 +0300 qed: Minor refactoring in interrupt code Separate the portions controlling interrupt enablement form those controlling the ability of HW to generate attentions. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 8befd73c23c929c038dd85027ed60eb1a6e4c1e9 Author: Mintz, Yuval Date: Thu Jun 1 15:29:01 2017 +0300 qed: Make qed_int_cau_conf_pi() static Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 68 +++++++++++++++---------------- drivers/net/ethernet/qlogic/qed/qed_int.h | 18 -------- 2 files changed, 34 insertions(+), 52 deletions(-) commit 7b954ed7529b6bae8712345dd9d22afa57b96dca Author: Colin Ian King Date: Thu Jun 1 13:22:42 2017 +0100 net: dsa: make function ksz_rcv static function ksz_rcv can be made static as it does not need to be in global scope. Reformat arguments to make it checkpatch warning free too. Cleans up sparse warning: "symbol 'ksz_rcv' was not declared. Should it be static?" Signed-off-by: Colin Ian King Reviewed-by: Woojung Huh Signed-off-by: David S. Miller net/dsa/tag_ksz.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 97fcc193f67e584dc6564767c6e186fe1ecd71d2 Author: Gao Feng Date: Thu Jun 1 17:58:39 2017 +0800 ppp: remove unnecessary bh disable in xmit path Since the commit 55454a565836 ("ppp: avoid dealock on recursive xmit"), the PPP xmit path is protected by wrapper functions which disable the bh already. So it is unnecessary to disable the bh again in the real xmit path. Signed-off-by: Gao Feng Acked-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit ba52d61e0ffbb8538d5f07071d38a78afb920176 Author: Roopa Prabhu Date: Wed May 31 22:53:25 2017 -0700 ipv4: route: restore skb_dst_set in inet_rtm_getroute recent updates to inet_rtm_getroute dropped skb_dst_set in inet_rtm_getroute. This patch restores it because it is needed to release the dst correctly. Fixes: 3765d35ed8b9 ("net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup") Reported-by: John Fastabend Signed-off-by: David Ahern Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/ipv4/route.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 94073ad77fff221b5e66b8b9863a546ba212d6a3 Author: Christoph Hellwig Date: Sat May 27 06:07:20 2017 -0400 fs/locks: don't mess with the address limit in compat_fcntl64 Instead write a proper compat syscall that calls common helpers. [ jlayton: fix pointer dereferencing in fixup_compat_flock ] Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Signed-off-by: Jeff Layton fs/fcntl.c | 118 +++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 67 insertions(+), 51 deletions(-) commit 29e6beb5a55fe79c94e0f746d0de7bd851cd3618 Author: Gregory CLEMENT Date: Fri Apr 7 15:47:08 2017 +0200 clk: mvebu: cp110: make failure labels more meaningful In preparation to the addition of a new clock, rename the goto labels used to handle the failure cases using a name related to the failure cause. This will allow to insert additional failing cases without renaming all the labels. Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT drivers/clk/mvebu/cp110-system-controller.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit d20dc1493db438fbbfb7733adc82f472dd8a0789 Author: Sakari Ailus Date: Wed May 24 17:53:55 2017 +0300 of: Support const and non-const use for to_of_node() Turn to_of_node() into a macro in order to support both const and non-const use. Additionally make the fwnode argument to is_of_node() const as well. Signed-off-by: Sakari Ailus Reviewed-by: Kieran Bingham Signed-off-by: Rob Herring include/linux/of.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit debd3a3b27c76c65a7d032b6f01710e6a6d555ab Author: Sakari Ailus Date: Wed May 24 17:53:54 2017 +0300 of: Make of_fwnode_handle() safer On the expense of a little bit more complexity in the of_fwnode_handle() macro, make the macro result in NULL in case its argument is NULL while still referencing it only once. Signed-off-by: Sakari Ailus Reviewed-by: Kieran Bingham Signed-off-by: Rob Herring include/linux/of.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1df09bc66f9bc146732628f8426787f35ab1804b Author: Sakari Ailus Date: Wed May 24 17:53:53 2017 +0300 of: Move OF property and graph API from base.c to property.c base.c contains both core OF functions and increasingly other functionality such as accessing properties and graphs, including convenience functions. In the near future this would also include OF specific implementation of the fwnode property and graph APIs. Create driver/of/property.c to contain procedures for accessing and interpreting device tree properties. The procedures are moved from drivers/of/base.c, with no changes other than copying only the includes required by the moved procedures. Signed-off-by: Sakari Ailus Signed-off-by: Rob Herring drivers/of/Makefile | 2 +- drivers/of/base.c | 733 ----------------------------------------------- drivers/of/property.c | 766 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 767 insertions(+), 734 deletions(-) commit 20bb377106af69d16269b1837e9a945b9f508a2e Author: Chris Wilson Date: Sun May 21 13:40:14 2017 +0100 drm/i915: Fix logical inversion for gen4 quirking The assertion that we want to make before disabling the pin of the pages for the unknown swizzling quirk is that the quirk is indeed active, and that the quirk is disabled before we do apply it to the pages. Fixes: 2c3a3f44dc13 ("drm/i915: Fix pages pin counting around swizzle quirk") Fixes: 957870f93412 ("drm/i915: Split out i915_gem_object_set_tiling()") Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170521124014.27678-1-chris@chris-wilson.co.uk Reviewed-bhy: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aed2fc102ffaa9bd41e4cff140d3ec8482d13ff5 Author: Chris Wilson Date: Tue May 30 13:13:34 2017 +0100 drm/i915: Check the ring is empty when declaring the engines are idle As another precaution when testing whether the CS engine is actually idle, also inspect the ring's HEAD/TAIL registers, which should be equal when there are no commands left to execute by the GPU. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170530121334.17364-3-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++++ 1 file changed, 5 insertions(+) commit 04f7b24eccdfae680a36e9825fe0d61dcd5ed528 Author: Chris Wilson Date: Thu Jun 1 10:04:46 2017 +0100 drm/i915/guc: Assert that we switch between known ggtt->invalidate functions When we enable the GuC, we enable an alternative mechanism for doing post-GGTT update invalidation. Likewise, when we disable the GuC, we restore the previous method. Assert that we change between known endpoints, so that we can catch if we accidentally clobber some other gen and if we change the invalidate routine without updating guc. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Oscar Mateo Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Michel Thierry Link: http://patchwork.freedesktop.org/patch/msgid/20170601090446.1334-1-chris@chris-wilson.co.uk Reviewed-by: Michal Wajdeczko Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9a993cc1ea952b0018f393f7f58fa04f531543ed Author: Ryan Hsu Date: Wed May 31 14:21:28 2017 +0300 ath10k: fix the logic of limiting tdls peer counts The original idea is to limit the maximum TDLS peer link, but the logic is always false, and never be able to restrict the number of TDLS peer creation. Fix the logic here and also move the checking earlier, so that it could avoid to handle the failure case, e.g disable the tdls peer, delete the peer and also vdev count cleanup. Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 49 +++++++++++++++-------------------- 1 file changed, 21 insertions(+), 28 deletions(-) commit a9f5f287fa1d47d61dfa8b60f94831174b2ea4d0 Author: Anilkumar Kolli Date: Wed May 31 14:21:27 2017 +0300 ath10k: add BMI parameters to fix calibration from DT/pre-cal QCA99X0, QCA9888, QCA9984 supports calibration data in either OTP or DT/pre-cal file. Current ath10k supports Calibration data from OTP only. If caldata is loaded from DT/pre-cal file, fetching board id and applying calibration parameters like tx power gets failed. error log: [ 15.733663] ath10k_pci 0000:01:00.0: failed to fetch board file: -2 [ 15.741474] ath10k_pci 0000:01:00.0: could not probe fw (-2) This patch adds calibration data support from DT/pre-cal file. Below parameters are used to get board id and applying calibration parameters from cal data. EEPROM[OTP] FLASH[DT/pre-cal file] Cal param 0x700 0x10000 Board id 0x10 0x8000 Tested on QCA9888 with pre-cal file. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/bmi.h | 2 ++ drivers/net/wireless/ath/ath10k/core.c | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) commit 4f40b423339b8121fbd5d6735bf6942020355c98 Author: Ben Greear Date: Wed May 31 14:21:26 2017 +0300 ath10k: initialize nbytes to 0 ath10k firmware checks nbytes == 0 as part of determining if DMA has completed successfully. To help make this work more often, have the driver initialize nbytes to zero when freeing the descriptor slot. Signed-off-by: Ben Greear Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ce.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3d06bf421a9b376bb658b1531de8826f1bf811ff Author: Jani Nikula Date: Wed May 31 13:16:31 2017 +0300 drm/i915/dvo: fix debug logging on unknown DID Print DID not VID on the DID error path. Looks like a copy-paste error from the VID error path. Clarify and clean up error logging, making them distinguishable from each other, while at it. Reported-by: Petru Mihancea Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101243 Reviewed-by: Clinton Taylor Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170531101631.26953-1-jani.nikula@intel.com drivers/gpu/drm/i915/dvo_ch7xxx.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 6bb099b088c70f76b5f34672a83d4452b1e3af36 Author: Ben Greear Date: Wed May 31 14:21:21 2017 +0300 ath10k: log when longer bmi cmds happen This lets one have a clue that maybe timeouts are happening when we just aren't waiting long enough. Signed-off-by: Ben Greear Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 13c3b26a71dfed57152ccfdb8fb5fb29584ded7c Author: Ben Greear Date: Wed May 31 14:21:19 2017 +0300 ath10k: increase BMI timeout When testing a 9888 chipset NIC, I notice it often takes almost 2 seconds, and then many times OTP fails, probably due to the two-second timeout. [ 2269.841842] ath10k_pci 0000:05:00.0: bmi cmd took: 1984 jiffies (HZ: 1000), rv: 0 [ 2273.608185] ath10k_pci 0000:05:00.0: bmi cmd took: 1986 jiffies (HZ: 1000), rv: 0 [ 2277.294732] ath10k_pci 0000:05:00.0: bmi cmd took: 1989 jiffies (HZ: 1000), rv: 0 So, increase the BMI timeout to 3 seconds. Signed-off-by: Ben Greear Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/bmi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7618138d8b40adfea7660ccabbb6b131d72e444b Author: Imre Deak Date: Wed May 31 20:05:35 2017 +0300 drm/i915/ddi: Avoid long delays during system suspend / eDP disabling Atm disabling either DP or eDP outputs can generate a spurious short pulse interrupt. The reason is that after disabling the port the source will stop sending a valid stream data, while the sink expects either a valid stream or the idle pattern. Since neither of this is sent the sink assumes (after an arbitrary delay) that the link is lost and requests for link retraining with a short pulse. The spurious pulse is a real problem at least for eDP panels with long power-off / power-cycle delays: as part of disabling the output we disable the panel power. The subsequent spurious short pulse handling will have to turn the power back on, which means the driver has to do a redundant wait for the power-off and power-cycle delays. During system suspend this leads to an unnecessary delay up to ~1s on systems with such panels as reported by Rui. To fix this put the sink to DPMS D3 state before turning off the port. According to the DP spec in this state the sink should not request retraining. This is also what we do already on pre-ddi platforms. As an alternative I also tried configuring the port to send idle pattern - which is against BSPec - and leave the port in normal mode before turning off the port. Neither of these resolved the problem. Cc: Zhang Rui Cc: David Weinehall Cc: Ville Syrjälä Reported-and-tested-by: Zhang Rui Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1496250335-7627-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_ddi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 789f35d70c33b5c3809907d586f080c62ada7365 Author: Maarten Lankhorst Date: Thu Jun 1 12:34:13 2017 +0200 drm/i915/glk: Fix dotclock calculation in skl_check_pipe_max_pixel_rate Seems that GLK has a dotclock that's twice the display clock. skl_max_scale checks for IS_GEMINILAKE, so perform the same check here. While at it, change the DRM_ERROR to DEBUG_KMS. Fixes: 73b0ca8ec76d ("drm/i915/skl+: consider max supported plane pixel rate while scaling") Cc: Mahesh Kumar Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170601103413.7037-1-maarten.lankhorst@linux.intel.com Reviewed-by: Mahesh Kumar drivers/gpu/drm/i915/intel_pm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 7a10d63f02e0bb4f31d452e6ba0f4d46c1f8791d Author: Geert Uytterhoeven Date: Thu Jun 1 12:28:38 2017 +0200 drm/amdkfd: Spelling s/apreture/aperture/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b312b2b25b6ac9e2eb03f4ca651b33108752de3a Author: Dan Carpenter Date: Wed Jun 14 13:58:53 2017 +0300 drm/amdkfd: NULL dereference involving create_process() We accidentally return ERR_PTR(0) which is NULL. The caller is not expecting that and it leads to an Oops. Fixes: dd59239a9862 ("amdkfd: init aperture once per process") Signed-off-by: Dan Carpenter Reviewed-by: Felix Kuehling Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0b56e9a7e8358e59b21d8a425e463072bfae523c Author: Vivek Gautam Date: Thu May 11 12:17:42 2017 +0530 phy: Group vendor specific phy drivers Adding vendor specific directories in phy to group phy drivers under their respective vendor umbrella. Also updated the MAINTAINERS file to reflect the correct directory structure for phy drivers. Signed-off-by: Vivek Gautam Acked-by: Heiko Stuebner Acked-by: Viresh Kumar Acked-by: Krzysztof Kozlowski Acked-by: Yoshihiro Shimoda Reviewed-by: Jaehoon Chung Cc: Kishon Vijay Abraham I Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Yoshihiro Shimoda Cc: Guenter Roeck Cc: Heiko Stuebner Cc: Viresh Kumar Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: Sylwester Nawrocki Cc: Krzysztof Kozlowski Cc: Jaehoon Chung Cc: Stephen Boyd Cc: Martin Blumenstingl Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Kishon Vijay Abraham I MAINTAINERS | 18 +- drivers/phy/Kconfig | 491 +--------- drivers/phy/Makefile | 70 +- drivers/phy/allwinner/Kconfig | 31 + drivers/phy/allwinner/Makefile | 2 + drivers/phy/allwinner/phy-sun4i-usb.c | 891 +++++++++++++++++ drivers/phy/allwinner/phy-sun9i-usb.c | 202 ++++ drivers/phy/amlogic/Kconfig | 14 + drivers/phy/amlogic/Makefile | 1 + drivers/phy/amlogic/phy-meson8b-usb2.c | 286 ++++++ drivers/phy/broadcom/Kconfig | 55 ++ drivers/phy/broadcom/Makefile | 6 + drivers/phy/broadcom/phy-bcm-cygnus-pcie.c | 221 +++++ drivers/phy/broadcom/phy-bcm-kona-usb2.c | 155 +++ drivers/phy/broadcom/phy-bcm-ns-usb2.c | 137 +++ drivers/phy/broadcom/phy-bcm-ns-usb3.c | 303 ++++++ drivers/phy/broadcom/phy-bcm-ns2-pcie.c | 101 ++ drivers/phy/broadcom/phy-brcm-sata.c | 493 ++++++++++ drivers/phy/hisilicon/Kconfig | 20 + drivers/phy/hisilicon/Makefile | 2 + drivers/phy/hisilicon/phy-hi6220-usb.c | 168 ++++ drivers/phy/hisilicon/phy-hix5hd2-sata.c | 191 ++++ drivers/phy/marvell/Kconfig | 50 + drivers/phy/marvell/Makefile | 6 + drivers/phy/marvell/phy-armada375-usb2.c | 158 +++ drivers/phy/marvell/phy-berlin-sata.c | 299 ++++++ drivers/phy/marvell/phy-berlin-usb.c | 214 ++++ drivers/phy/marvell/phy-mvebu-sata.c | 138 +++ drivers/phy/marvell/phy-pxa-28nm-hsic.c | 220 +++++ drivers/phy/marvell/phy-pxa-28nm-usb2.c | 355 +++++++ drivers/phy/phy-armada375-usb2.c | 158 --- drivers/phy/phy-bcm-cygnus-pcie.c | 221 ----- drivers/phy/phy-bcm-kona-usb2.c | 155 --- drivers/phy/phy-bcm-ns-usb2.c | 137 --- drivers/phy/phy-bcm-ns-usb3.c | 303 ------ drivers/phy/phy-bcm-ns2-pcie.c | 101 -- drivers/phy/phy-berlin-sata.c | 299 ------ drivers/phy/phy-berlin-usb.c | 214 ---- drivers/phy/phy-brcm-sata.c | 493 ---------- drivers/phy/phy-da8xx-usb.c | 251 ----- drivers/phy/phy-dm816x-usb.c | 290 ------ drivers/phy/phy-exynos-dp-video.c | 122 --- drivers/phy/phy-exynos-mipi-video.c | 377 -------- drivers/phy/phy-exynos-pcie.c | 281 ------ drivers/phy/phy-exynos4210-usb2.c | 260 ----- drivers/phy/phy-exynos4x12-usb2.c | 378 -------- drivers/phy/phy-exynos5-usbdrd.c | 782 --------------- drivers/phy/phy-exynos5250-sata.c | 250 ----- drivers/phy/phy-exynos5250-usb2.c | 401 -------- drivers/phy/phy-hi6220-usb.c | 168 ---- drivers/phy/phy-hix5hd2-sata.c | 191 ---- drivers/phy/phy-meson8b-usb2.c | 286 ------ drivers/phy/phy-miphy28lp.c | 1286 ------------------------- drivers/phy/phy-mvebu-sata.c | 138 --- drivers/phy/phy-omap-control.c | 360 ------- drivers/phy/phy-omap-usb2.c | 439 --------- drivers/phy/phy-pxa-28nm-hsic.c | 220 ----- drivers/phy/phy-pxa-28nm-usb2.c | 355 ------- drivers/phy/phy-qcom-apq8064-sata.c | 287 ------ drivers/phy/phy-qcom-ipq806x-sata.c | 209 ---- drivers/phy/phy-qcom-qmp.c | 1153 ---------------------- drivers/phy/phy-qcom-qusb2.c | 493 ---------- drivers/phy/phy-qcom-ufs-i.h | 155 --- drivers/phy/phy-qcom-ufs-qmp-14nm.c | 178 ---- drivers/phy/phy-qcom-ufs-qmp-14nm.h | 177 ---- drivers/phy/phy-qcom-ufs-qmp-20nm.c | 232 ----- drivers/phy/phy-qcom-ufs-qmp-20nm.h | 235 ----- drivers/phy/phy-qcom-ufs.c | 691 ------------- drivers/phy/phy-qcom-usb-hs.c | 295 ------ drivers/phy/phy-qcom-usb-hsic.c | 159 --- drivers/phy/phy-rcar-gen2.c | 337 ------- drivers/phy/phy-rcar-gen3-usb2.c | 507 ---------- drivers/phy/phy-rockchip-dp.c | 154 --- drivers/phy/phy-rockchip-emmc.c | 383 -------- drivers/phy/phy-rockchip-inno-usb2.c | 1284 ------------------------ drivers/phy/phy-rockchip-pcie.c | 346 ------- drivers/phy/phy-rockchip-typec.c | 1023 -------------------- drivers/phy/phy-rockchip-usb.c | 540 ----------- drivers/phy/phy-s5pv210-usb2.c | 187 ---- drivers/phy/phy-samsung-usb2.c | 267 ----- drivers/phy/phy-samsung-usb2.h | 73 -- drivers/phy/phy-spear1310-miphy.c | 261 ----- drivers/phy/phy-spear1340-miphy.c | 294 ------ drivers/phy/phy-stih407-usb.c | 180 ---- drivers/phy/phy-sun4i-usb.c | 891 ----------------- drivers/phy/phy-sun9i-usb.c | 202 ---- drivers/phy/phy-ti-pipe3.c | 697 -------------- drivers/phy/phy-tusb1210.c | 146 --- drivers/phy/phy-twl4030-usb.c | 839 ---------------- drivers/phy/qualcomm/Kconfig | 58 ++ drivers/phy/qualcomm/Makefile | 9 + drivers/phy/qualcomm/phy-qcom-apq8064-sata.c | 287 ++++++ drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c | 209 ++++ drivers/phy/qualcomm/phy-qcom-qmp.c | 1153 ++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qusb2.c | 493 ++++++++++ drivers/phy/qualcomm/phy-qcom-ufs-i.h | 155 +++ drivers/phy/qualcomm/phy-qcom-ufs-qmp-14nm.c | 178 ++++ drivers/phy/qualcomm/phy-qcom-ufs-qmp-14nm.h | 177 ++++ drivers/phy/qualcomm/phy-qcom-ufs-qmp-20nm.c | 232 +++++ drivers/phy/qualcomm/phy-qcom-ufs-qmp-20nm.h | 235 +++++ drivers/phy/qualcomm/phy-qcom-ufs.c | 691 +++++++++++++ drivers/phy/qualcomm/phy-qcom-usb-hs.c | 295 ++++++ drivers/phy/qualcomm/phy-qcom-usb-hsic.c | 159 +++ drivers/phy/renesas/Kconfig | 17 + drivers/phy/renesas/Makefile | 2 + drivers/phy/renesas/phy-rcar-gen2.c | 337 +++++++ drivers/phy/renesas/phy-rcar-gen3-usb2.c | 507 ++++++++++ drivers/phy/rockchip/Kconfig | 51 + drivers/phy/rockchip/Makefile | 6 + drivers/phy/rockchip/phy-rockchip-dp.c | 154 +++ drivers/phy/rockchip/phy-rockchip-emmc.c | 383 ++++++++ drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 1284 ++++++++++++++++++++++++ drivers/phy/rockchip/phy-rockchip-pcie.c | 346 +++++++ drivers/phy/rockchip/phy-rockchip-typec.c | 1023 ++++++++++++++++++++ drivers/phy/rockchip/phy-rockchip-usb.c | 540 +++++++++++ drivers/phy/samsung/Kconfig | 95 ++ drivers/phy/samsung/Makefile | 11 + drivers/phy/samsung/phy-exynos-dp-video.c | 122 +++ drivers/phy/samsung/phy-exynos-mipi-video.c | 377 ++++++++ drivers/phy/samsung/phy-exynos-pcie.c | 281 ++++++ drivers/phy/samsung/phy-exynos4210-usb2.c | 260 +++++ drivers/phy/samsung/phy-exynos4x12-usb2.c | 378 ++++++++ drivers/phy/samsung/phy-exynos5-usbdrd.c | 782 +++++++++++++++ drivers/phy/samsung/phy-exynos5250-sata.c | 250 +++++ drivers/phy/samsung/phy-exynos5250-usb2.c | 401 ++++++++ drivers/phy/samsung/phy-s5pv210-usb2.c | 187 ++++ drivers/phy/samsung/phy-samsung-usb2.c | 267 +++++ drivers/phy/samsung/phy-samsung-usb2.h | 73 ++ drivers/phy/st/Kconfig | 33 + drivers/phy/st/Makefile | 4 + drivers/phy/st/phy-miphy28lp.c | 1286 +++++++++++++++++++++++++ drivers/phy/st/phy-spear1310-miphy.c | 261 +++++ drivers/phy/st/phy-spear1340-miphy.c | 294 ++++++ drivers/phy/st/phy-stih407-usb.c | 180 ++++ drivers/phy/ti/Kconfig | 78 ++ drivers/phy/ti/Makefile | 7 + drivers/phy/ti/phy-da8xx-usb.c | 251 +++++ drivers/phy/ti/phy-dm816x-usb.c | 290 ++++++ drivers/phy/ti/phy-omap-control.c | 360 +++++++ drivers/phy/ti/phy-omap-usb2.c | 439 +++++++++ drivers/phy/ti/phy-ti-pipe3.c | 697 ++++++++++++++ drivers/phy/ti/phy-tusb1210.c | 146 +++ drivers/phy/ti/phy-twl4030-usb.c | 839 ++++++++++++++++ 143 files changed, 22382 insertions(+), 22337 deletions(-) commit 858edde001e14f070d0fff347fb56c6c79e15312 Author: Vivek Gautam Date: Thu May 11 12:17:41 2017 +0530 phy: Move ULPI phy header out of drivers to include path Although ULPI phy is currently being used by tusb1210, there can be other consumers too in future. So move this to the includes path for phy. Signed-off-by: Vivek Gautam Cc: Stephen Boyd Cc: Heikki Krogerus Cc: Kishon Vijay Abraham I Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-usb@vger.kernel.org Acked-by: Heikki Krogerus Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-tusb1210.c | 3 +-- drivers/phy/ulpi_phy.h | 31 ------------------------------- include/linux/phy/ulpi_phy.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 33 deletions(-) commit 706a3b69955816bd0f3591be738db64cba74b674 Author: Vivek Gautam Date: Thu May 11 12:17:40 2017 +0530 phy: qcom-usb: Remove unused ulpi phy header Ulpi phy header is not used for anything. Remove the same from qcom-hs and qcom-hsic phy drivers. Signed-off-by: Vivek Gautam Suggested-by: Stephen Boyd Cc: Kishon Vijay Abraham I Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-qcom-usb-hs.c | 3 +-- drivers/phy/phy-qcom-usb-hsic.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 219569ad0c41df7a7f999a2cad688c6b6ce173e2 Author: amit karwar Date: Fri May 26 20:31:31 2017 +0530 rsi: use subdirectory for firmware file linux-firmware maintainers prefer to have a subdirectory for firmware files. Code is changed here to pick firmware file from a subdirectory. Firmware file with a new loading mechanism will be submitted inside rsi directory. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f71719951420da588bc707939c64c72112b1f0e Author: Xinming Hu Date: Fri May 26 06:57:13 2017 +0000 mwifiex: uap: process remain on channel expired event AP interface need process remain-on-channel firmware event and notify cfg80211, this will be used in the listen-stage of p2p find procedure. Signed-off-by: Xinming Hu Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/uap_event.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 01926202b34b252514350a60ab20ec63ad1c5fad Author: Shawn Lin Date: Fri May 26 09:41:49 2017 +0800 mwifiex: simplify the code around ra_list We don't need to check if the list is empty separately as we could use list_first_entry_or_null to cover it. Signed-off-by: Shawn Lin Reviewed-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/tdls.c | 7 ++----- drivers/net/wireless/marvell/mwifiex/wmm.c | 8 ++------ 2 files changed, 4 insertions(+), 11 deletions(-) commit 4f8e25458cb6efc9e4497bb5cecb3a667d4963ab Author: Colin Ian King Date: Thu May 25 14:45:03 2017 +0100 qtnfmac: remove duplicated assignment to mac mac is being assigned twice, remove redundant 2nd assignment. Detected by CoverityScan, CID#1437554 ("Incorrect expression") Signed-off-by: Colin Ian King Acked-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 991dca01dd6719d1dd1bd4c39f5a12680c74b15e Author: Daniel Vetter Date: Wed May 24 16:51:53 2017 +0200 drm/exynos: Drop drm_vblank_cleanup Only in the load failure path, where the hardware is quiet anyway. Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Reviewed-by: Inki Dae Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-19-daniel.vetter@ffwll.ch drivers/gpu/drm/exynos/exynos_drm_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9d643f63128bcec2b845fd0719a6b971b68c59cc Author: Nick Desaulniers Date: Tue May 30 20:08:38 2017 -0700 KVM: x86: avoid large stack allocations in em_fxrstor em_fxstor previously called fxstor_fixup. Both created instances of struct fxregs_state on the stack, which triggered the warning: arch/x86/kvm/emulate.c:4018:12: warning: stack frame size of 1080 bytes in function 'em_fxrstor' [-Wframe-larger-than=] static int em_fxrstor(struct x86_emulate_ctxt *ctxt) ^ with CONFIG_FRAME_WARN set to 1024. This patch does the fixup in em_fxstor now, avoiding one additional struct fxregs_state, and now fxstor_fixup can be removed as it has no other call sites. Further, the calculation for offsets into xmm_space can be shared between em_fxstor and em_fxsave. Signed-off-by: Nick Desaulniers [Clean up calculation of offsets and fix it for 64-bit mode. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 82 +++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 45 deletions(-) commit 7461fbc46e9078d3143d396e2ad1c0c5bfd07b6f Author: Dan Carpenter Date: Thu May 18 10:41:15 2017 +0300 KVM: white space cleanup in nested_vmx_setup_ctls_msrs() This should have been indented one more character over and it should use tabs. Signed-off-by: Dan Carpenter Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9196cebbe41559d2c485f004b3db869ba34ba29 Author: Dan Carpenter Date: Thu May 18 10:39:53 2017 +0300 KVM: Tidy the whitespace in nested_svm_check_permissions() I moved the || to the line before. Also I replaced some spaces with a tab on the "return 0;" line. It looks OK in the diff but originally that line was only indented 7 spaces. Signed-off-by: Dan Carpenter Acked-by: Joerg Roedel Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ee177c5d6369f8e5d3e4793dce501cf4431313a1 Author: Bryan O'Donoghue Date: Mon May 15 11:58:59 2017 +0100 clk: Fix __set_clk_rates error print-string When failing to set a clock the printout emitted is incorrect. "u32 rate" is formatted as %d and should be %u whereas "unsigned long clk_set_rate()" is formatted as %ld and should be %lu as per Documentation/printk-formats.txt. Fixes: 2885c3b2a3da ("clk: Show correct information when fail to set clock rate") Signed-off-by: Bryan O'Donoghue Signed-off-by: Stephen Boyd drivers/clk/clk-conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7374aec95636ca39409545eba4ef5ff3125c2346 Author: Sudeep Holla Date: Thu May 18 17:19:28 2017 +0100 clk: scpi: fix return type of __scpi_dvfs_round_rate The frequencies above the maximum value of signed integer(i.e. 2^31 -1) will overflow with the current code. This patch fixes the return type of __scpi_dvfs_round_rate from 'int' to 'unsigned long'. Fixes: cd52c2a4b5c4 ("clk: add support for clocks provided by SCP(System Control Processor)") Cc: Michael Turquette Cc: Stephen Boyd Signed-off-by: Sudeep Holla Signed-off-by: Stephen Boyd drivers/clk/clk-scpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4cd4475effd8fb6fd021fc7c881b4aa74480fa9e Author: Maksim Salau Date: Mon Apr 24 12:59:53 2017 +0300 USB: serial: upd78f0730: make constants static Some local constants don't change from call to call and are good candidates to become static. This will prevent copying of these constants to stack during runtime. Signed-off-by: Maksim Salau Signed-off-by: Johan Hovold drivers/usb/serial/upd78f0730.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cb60606d835ca8b2f744835116bcabe64ce88849 Author: Chris Wilson Date: Wed May 31 20:05:14 2017 +0100 drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion") added the restoration of the invalidation routine after the GuC was disabled, but missed that the GuC was unconditionally disabled when not used. This then overwrites the invalidate routine for the older chipsets, causing havoc and breaking resume as the most obvious victim. We place the guard inside i915_ggtt_disable_guc() to be backport friendly (the bug was introduced into v4.11) but it would be preferred to be in more control over when this was guard (i.e. do not try and teardown the data structures before we have enabled them). That should be true with the reorganisation of the guc loaders. Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion") Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Oscar Mateo Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: # v4.11+ Link: http://patchwork.freedesktop.org/patch/msgid/20170531190514.3691-1-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 80b4ae7acea48774761a54ba8432206b20e4d8f1 Author: Scott Wood Date: Mon Mar 20 10:37:23 2017 +0800 clk: qoriq: Separate root input clock for core PLLs on ls1012a ls1012a has separate input root clocks for core PLLs versus the platform PLL, with the latter described as sysclk in the hw docs. If a second input clock, named "coreclk", is present, this clock will be used for the core PLLs. Signed-off-by: Scott Wood Signed-off-by: Tang Yuantian Acked-by: Rob Herring Signed-off-by: Stephen Boyd drivers/clk/clk-qoriq.c | 91 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 77 insertions(+), 14 deletions(-) commit 3d362b1fab97dffaf3f6ef55a03c7dcccfa97fd3 Author: Scott Wood Date: Mon Mar 20 10:37:22 2017 +0800 dt-bindings: qoriq-clock: Add coreclk ls1012a has separate input root clocks for core PLLs versus the platform PLL, with the latter described as sysclk in the hw docs. Update the qoriq-clock binding to allow a second input clock, named "coreclk". If present, this clock will be used for the core PLLs. Signed-off-by: Scott Wood Signed-off-by: Tang Yuantian Acked-by: Rob Herring Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/qoriq-clock.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 30ee809e980b07f467fca3e7ee16e8d034cf41af Author: Xiaolei Li Date: Wed May 31 16:26:41 2017 +0800 mtd: nand: mediatek: add support for MT2712 NAND FLASH Controller MT2712 NAND FLASH Controller is similar to MT2701 except those following: (1) MT2712 supports up to 148B spare size per 1KB size sector (the same with 74B spare size per 512B size sector). There are three new spare format: 61, 67, 74. (2) MT2712 supports up to 80 bit ecc strength. There are three new ecc strength level: 68, 72, 80. (3) MT2712 ECC encode parity data register's start offset is 0x300, and different with 0x10 of MT2701. (4) MT2712 improves ecc irq function. When ECC works in ECC_NFI_MODE, MT2701 will generate ecc irq number the same with ecc steps during page read. However, MT2712 can only generate one ecc irq. Changes of this patch are: (1) add two new variables named pg_irq_sel, encode_parity_reg0 in struct mtk_ecc_caps. (2) add new bitfield ECC_PG_IRQ_SEL for register ECC_IRQ_REG. (3) add ecc strength array of mt2712. (4) add spare size array of mt2712. (5) add mt2712 nfc and ecc device compatiable and data. Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_ecc.c | 39 +++++++++++++++++++++++++++++++++++---- drivers/mtd/nand/mtk_nand.c | 14 ++++++++++++++ 2 files changed, 49 insertions(+), 4 deletions(-) commit 7ec4a37c5d71f0a0bfeb1346d4e832a090ca292d Author: Xiaolei Li Date: Wed May 31 16:26:40 2017 +0800 mtd: nand: mediatek: add support for different MTK NAND FLASH Controller IP ECC strength and spare size supported may be different among MTK NAND FLASH Controller IPs. This patch contains changes as following: (1) add new struct mtk_nfc_caps to support different spare size. (2) add new struct mtk_ecc_caps to support different ecc strength. (3) remove ECC_CNFG_xBIT define, use a for loop to do ecc strength config. (4) remove PAGEFMT_SPARE_ define, use a for loop to do spare format config. (5) malloc ecc->eccdata buffer according to max ecc strength of this IP. Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_ecc.c | 181 ++++++++++++++++++-------------------------- drivers/mtd/nand/mtk_ecc.h | 2 +- drivers/mtd/nand/mtk_nand.c | 169 +++++++++++++++++++---------------------- 3 files changed, 153 insertions(+), 199 deletions(-) commit 582212ceb9bcd9ef0808497a8e066c4eef442e19 Author: Xiaolei Li Date: Wed May 31 16:26:39 2017 +0800 mtd: nand: mediatek: refine register NFI_PAGEFMT setting The register NFI_PAGEFMT is always 32 bits length, so it is better to do register program using writel() compare with writew(). Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2968698ba03187b09e84fbc709f0b5d19ddd94ff Author: Xiaolei Li Date: Wed May 31 16:26:38 2017 +0800 mtd: nand: mediatek: update DT bindings Add MT2712 NAND Flash Controller dt bindings documentation. Signed-off-by: Xiaolei Li Reviewed-by: Matthias Brugger Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/mtk-nand.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 05b6c2313e91ac65915bde5e55bc6f194bfe22f3 Author: Arnd Bergmann Date: Wed May 31 10:19:26 2017 +0200 mtd: nand: atmel: mark resume function __maybe_unused The newly added suspend/resume support causes a harmless warning: drivers/mtd/nand/atmel/nand-controller.c:2513:12: error: 'atmel_nand_controller_resume' defined but not used [-Werror=unused-function] This shuts up the warning with a __maybe_unused annotation. Fixes: b107007a7114 ("mtd: nand: atmel: Add PM ops") Signed-off-by: Arnd Bergmann Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79e0348c4e24fd1affdcf055e0269755580e0fcc Author: Masahiro Yamada Date: Thu May 25 13:50:20 2017 +0900 mtd: nand: check ecc->total sanity in nand_scan_tail Drivers are supposed to set correct ecc->{size,strength,bytes} before calling nand_scan_tail(), but it does not complain about ecc->total bigger than oobsize. In this case, chip->scan_bbt() crashes due to memory corruption, but it is hard to debug. It would be kind to fail it earlier with a clear message. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2165c4a1f71a04c7ea6493f18740a3afd4e47e4f Author: Boris Brezillon Date: Tue May 16 18:35:45 2017 +0200 mtd: nand: Support 'EXIT GET STATUS' command in nand_command[_lp]() READ0 is sometimes used to exit GET STATUS mode. When this is the case no address cycles are requested, and we can use this information to detect that READSTART should not be issued after READ0 or that we shouldn't wait for the chip to be ready. Signed-off-by: Boris Brezillon Tested-by: Thomas Petazzoni drivers/mtd/nand/nand_base.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 41145649f4acb30249b636b945053db50c9331c5 Author: Boris Brezillon Date: Tue May 16 18:27:49 2017 +0200 mtd: nand: Wait for PAGEPROG to finish in drivers setting NAND_ECC_CUSTOM_PAGE_ACCESS Drivers setting NAND_ECC_CUSTOM_PAGE_ACCESS are supposed to handle the full read/write page sequence, and waiting for a page to actually be programmed is part of this write-page sequence. This is also what is done in ->write_oob_xxx() hooks, so let's do that in ->write_page_xxx() as well to make it consistent. Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 6 +++++- drivers/mtd/nand/nand_base.c | 10 ++++++---- drivers/mtd/nand/nand_micron.c | 10 ++++++++-- drivers/mtd/nand/tango_nand.c | 13 ++++++++++++- 4 files changed, 31 insertions(+), 8 deletions(-) commit a186493237a9d8559997c2f97c33c4716d602fd2 Author: Boris Brezillon Date: Wed May 17 10:47:50 2017 +0200 mtd: nand: tango: Fix incorrect use of SEQIN command SEQIN is supposed to be used when one wants to start programming a page. What we want here is just to change the column within the page, which is done with the RNDIN command. Fixes: 6956e2385a16 ("mtd: nand: add tango NAND flash controller support") Cc: stable@vger.kernel.org Signed-off-by: Boris Brezillon Acked-by: Marc Gonzalez drivers/mtd/nand/tango_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df5586d7bf6cce421ed48e9b2a88a8bdaa4fd9d0 Author: Boris Brezillon Date: Tue May 16 00:23:46 2017 +0200 mtd: nand: sunxi: Remove unneeded ->cmdfunc(NAND_CMD_READ0, 0, page) The core already sends the NAND_CMD_READ0 for us. Duplicating this call in the driver is useless and introduces a perf penalty. Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 1 - 1 file changed, 1 deletion(-) commit 2de85e73360104d3582363dcebdcdd7dc20431be Author: Boris Brezillon Date: Tue May 16 00:23:45 2017 +0200 mtd: nand: sunxi: Actually use DMA for subpage reads ecc->read_subpage is set to sunxi_nfc_hw_ecc_read_subpage_dma when ->dmac != NULL, but is then unconditionally overwritten in the common init path. Remove this extra assignment to allow usage of the DMA operation when possible. Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 1 - 1 file changed, 1 deletion(-) commit 7d135bcced20be2b50128432c5426a7278ec4f6d Author: Boris Brezillon Date: Sat May 6 18:03:33 2017 +0200 mtd: nand: Drop the ->errstat() hook The ->errstat() hook is no longer implemented NAND controller drivers. Get rid of it before someone starts abusing it. Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 16 ---------------- include/linux/mtd/nand.h | 5 ----- 2 files changed, 21 deletions(-) commit 0b4773fd1649e0d418275557723a7ef54f769dc9 Author: Boris Brezillon Date: Tue May 16 00:17:41 2017 +0200 mtd: nand: Drop unused cached programming support Cached programming is always skipped, so drop the associated code until we decide to really support it. Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) commit 6e532afaca8ed41107fa0a551d7b2db99a869540 Author: Boris Brezillon Date: Thu Mar 16 09:36:00 2017 +0100 mtd: nand: atmel: Add PM ops Provide a ->resume() hook to make sure the NAND timings are correctly restored by resetting all chips connected to the controller. Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit f9ce2eddf1769a2cf93e87332c55063537e69119 Author: Boris Brezillon Date: Thu Mar 16 09:35:59 2017 +0100 mtd: nand: atmel: Add ->setup_data_interface() hooks The NAND controller IP can adapt the NAND controller timings dynamically. Implement the ->setup_data_interface() hook to support this feature. Note that it's not supported on at91rm9200 because this SoC has a completely different SMC block, which is not supported yet. Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 1 + drivers/mtd/nand/atmel/nand-controller.c | 329 ++++++++++++++++++++++++++++++- 2 files changed, 328 insertions(+), 2 deletions(-) commit 104e442a67cfba4d0cc982384761befb917fb6a1 Author: Boris Brezillon Date: Thu Mar 16 09:35:58 2017 +0100 mtd: nand: Pass the CS line to ->setup_data_interface() Some NAND controllers can assign different NAND timings to different CS lines. Pass the CS line information to ->setup_data_interface() so that the NAND controller driver knows which CS line is concerned by the setup_data_interface() request. Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 7 +++---- drivers/mtd/nand/mxc_nand.c | 12 +++++------- drivers/mtd/nand/nand_base.c | 22 +++++++++++++--------- drivers/mtd/nand/s3c2410.c | 5 ++--- drivers/mtd/nand/sunxi_nand.c | 7 +++---- drivers/mtd/nand/tango_nand.c | 7 +++---- include/linux/mtd/nand.h | 12 ++++++++---- 7 files changed, 37 insertions(+), 35 deletions(-) commit ebb528d97830731b5fce27a72191e4fb94a4e66d Author: Boris Brezillon Date: Mon Apr 10 10:35:18 2017 +0200 mtd: nand: gpmi: Kill gpmi_nand_exit() The only user of gpmi_nand_exit() is gpmi_nand_remove(). Move its content to the caller. Signed-off-by: Boris Brezillon Reviewed-by: Marek Vasut Acked-by: Han Xu drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 4d02423e9afe6c46142ce98bbcaf5167316dbfbf Author: Boris Brezillon Date: Mon Apr 10 10:35:17 2017 +0200 mtd: nand: gpmi: Fix gpmi_nand_init() error path The GPMI driver is wrongly assuming that nand_release() can safely be called on an uninitialized/unregistered NAND device. Add a new err_nand_cleanup label in the error path and only execute if nand_scan_tail() succeeded. Note that we now call nand_cleanup() instead of nand_release() (nand_release() is actually grouping the mtd_device_unregister() and nand_cleanup() in one call) because there's no point in trying to unregister a device that has never been registered. Signed-off-by: Boris Brezillon Reviewed-by: Marek Vasut Acked-by: Han Xu Reviewed-by: Marek Vasut drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d7e578c8118113789b7abd2977e208c64d6f8465 Author: Stefan Agner Date: Fri Apr 21 18:23:36 2017 -0700 mtd: gpmi: document current clock requirements The clock requirements are completely missing, add the clocks currently required by the driver. Signed-off-by: Stefan Agner Acked-by: Rob Herring Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/gpmi-nand.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit b4af694f1c51f035f70fe964e4859bd9dbaa52b8 Author: Stefan Agner Date: Fri Apr 21 18:23:35 2017 -0700 mtd: nand: gpmi: add i.MX 7 SoC support Add support for i.MX 7 SoC. The i.MX 7 has a slightly different clock architecture requiring only two clocks to be referenced. The IP is slightly different compared to i.MX 6, but currently none of this differences are in use, therefore reuse GPMI_IS_MX6. Signed-off-by: Stefan Agner Reviewed-by: Marek Vasut Signed-off-by: Boris Brezillon drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 15 +++++++++++++++ drivers/mtd/nand/gpmi-nand/gpmi-nand.h | 7 +++++-- 2 files changed, 20 insertions(+), 2 deletions(-) commit 6b7ee72149a4a6963e361c5324cea2961f17989a Author: Stefan Agner Date: Fri Apr 21 18:23:34 2017 -0700 mtd: nand: gpmi: unify clock handling Add device specific list of clocks required, and handle all clocks in a single for loop. This avoids further code duplication when adding i.MX 7 support. Signed-off-by: Stefan Agner Reviewed-by: Marek Vasut Signed-off-by: Boris Brezillon drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 41 +++++++++++++++------------------- drivers/mtd/nand/gpmi-nand/gpmi-nand.h | 2 ++ 2 files changed, 20 insertions(+), 23 deletions(-) commit 086567f12e1188c57e061a53825a5eff5a7923a0 Author: Pavel Machek Date: Fri Apr 21 12:51:07 2017 +0200 mtd: nand: Optimize checking of erased buffers If we see ~0UL in flash, there's no need for hweight, and no need to check number of bitflips. So this should be net win. Signed-off-by: Pavel Machek Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 838ff7b333263abc9e7e026bb225ed66511f450f Author: Thomas Petazzoni Date: Sat Apr 29 11:06:46 2017 +0200 mtd: nand: fsmc_nand: handle on-die ECC case This commit adjusts the fsmc_nand driver so that it accepts the NAND_ECC_ON_DIE case. It simply does nothing in this case, since both the ECC operations and OOB layout will be defined by the NAND chip code rather than by the NAND controller code. Signed-off-by: Thomas Petazzoni Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 3 +++ 1 file changed, 3 insertions(+) commit 9748e1d87573c94191442d6bd0307f523e5cd8b8 Author: Thomas Petazzoni Date: Sat Apr 29 11:06:45 2017 +0200 mtd: nand: add support for Micron on-die ECC Now that the core NAND subsystem has support for on-die ECC, this commit brings the necessary code to support on-die ECC on Micron NANDs. In micron_nand_init(), we detect if the Micron NAND chip supports on-die ECC mode, by checking a number of conditions: - It must be an ONFI NAND - It must be a SLC NAND - Enabling *and* disabling on-die ECC must work - The on-die ECC must be correcting 4 bits per 512 bytes of data. Some Micron NAND chips have an on-die ECC able to correct 8 bits per 512 bytes of data, but they work slightly differently and therefore we don't support them in this patch. Then, if the on-die ECC cannot be disabled (some Micron NAND have on-die ECC forcefully enabled), we bail out, as we don't support such NANDs. Indeed, the implementation of raw_read()/raw_write() make the assumption that on-die ECC can be disabled. Support for Micron NANDs with on-die ECC forcefully enabled can easily be added, but in the absence of such HW for testing, we preferred to simply bail out. If the on-die ECC is supported, and requested in the Device Tree, then it is indeed enabled, by using custom implementations of the ->read_page(), ->read_page_raw(), ->write_page() and ->write_page_raw() operation to properly handle the on-die ECC. In the non-raw functions, we need to enable the internal ECC engine before issuing the NAND_CMD_READ0 or NAND_CMD_SEQIN commands, which is why we set the NAND_ECC_CUSTOM_PAGE_ACCESS option at initialization time (it asks the NAND core to let the NAND driver issue those commands). Signed-off-by: Thomas Petazzoni Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_micron.c | 216 +++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/nand.h | 2 + 2 files changed, 218 insertions(+) commit 110d33dd428ea49b9482bcb780fb096dfb4dcd3e Author: Maxime Ripard Date: Sat May 27 18:09:36 2017 +0200 drm/sun4i: Add compatible for the A10s pipeline The A10s has a slightly different display pipeline than the A13, with an HDMI controller. Add a compatible for it. Reviewed-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 1 + drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + 2 files changed, 2 insertions(+) commit 9c5681011a0c328be2351cfb1d1149b74c48d3a1 Author: Maxime Ripard Date: Sat May 27 18:09:35 2017 +0200 drm/sun4i: Add HDMI support The earlier Allwinner SoCs (A10, A10s, A20, A31) have an embedded HDMI controller. That HDMI controller is able to do audio and CEC, but those have been left out for now. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/Kconfig | 8 + drivers/gpu/drm/sun4i/Makefile | 5 + drivers/gpu/drm/sun4i/sun4i_hdmi.h | 157 +++++++++ drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 127 +++++++ drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 501 ++++++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 225 +++++++++++++ 6 files changed, 1023 insertions(+) commit 22662f12768f971809b478386d9cc4947d00497a Author: Maxime Ripard Date: Sat May 27 18:09:34 2017 +0200 dt-bindings: display: sun4i: Add allwinner,tcon-channel property The Allwinner Timings Controller has two, mutually exclusive, channels. When the binding has been introduced, it was assumed that there would be only a single user per channel in the system. While this is likely for the channel 0 which only connects to LCD displays, it turns out that the channel 1 can be connected to multiple controllers in the SoC (HDMI and TV encoders for example). And while the simultaneous use of HDMI and TV outputs cannot be achieved, switching from one to the other at runtime definitely sounds plausible. Add an extra property, allwinner,tcon-channel, to specify for a given endpoint which TCON channel it is connected to, while falling back to the previous mechanism if that property is missing. Acked-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 1240f0b9eaa88c6c287c379f6edf303ebe9ec979 Author: Maxime Ripard Date: Sat May 27 18:09:33 2017 +0200 dt-bindings: display: sun4i: Add HDMI display bindings One of the possible output of the display pipeline, on the SoCs that have it, is the HDMI controller. Add a binding for it. Acked-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Maxime Ripard .../bindings/display/sunxi/sun4i-drm.txt | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 49baeb074783f5bdf770dc9fac5fbb2837190583 Author: Maxime Ripard Date: Sat May 27 18:09:32 2017 +0200 drm/sun4i: Ignore the generic connectors for components The generic connectors such as hdmi-connector doesn't have any driver in, so if they are added to the component list, we will be waiting forever for a non-existing driver to probe. Add a list of the connectors we want to ignore when building our component list. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b8317a3d50ceb3eae3a280c50c0de61ec302b806 Author: Maxime Ripard Date: Sat May 27 18:09:31 2017 +0200 drm/sun4i: tcon: multiply the vtotal when not in interlace It appears that the total vertical resolution needs to be doubled when we're not in interlaced. Make sure that is the case. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tcon.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit a88cbbd469b05548f499e4320758f0364beada08 Author: Maxime Ripard Date: Sat May 27 18:09:30 2017 +0200 drm/sun4i: tcon: Change vertical total size computation inconsistency Both TCON channels need to have the resolution doubled, since the size the hardware is going to use is whatever we put in the register divided by two. However, we handle it differently for the two channels: in the channel 0, our register access macro does the multiplication of the value passed as paremeter, while in the channel 1, the macro doesn't do this, and we need to do it before calling it. Make this consistent by aligning the channel 0 with the channel 1 behaviour. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +- drivers/gpu/drm/sun4i/sun4i_tcon.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3cb2f46b3da4c45342414c63cd465de483cb102a Author: Maxime Ripard Date: Sat May 27 18:09:29 2017 +0200 drm/sun4i: tcon: Fix tcon channel 1 backporch calculation It seems like what's called a backporch in the datasheet is actually the backporch plus the sync period. Fix that in our driver. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7cb9b9143bc249d494020b55a57acef36d26682 Author: Maxime Ripard Date: Sat May 27 18:09:28 2017 +0200 drm/sun4i: tcon: Switch mux on only for composite Even though that mux is undocumented, it seems like it needs to be set to 1 when using composite, and 0 when using HDMI. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tcon.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f8c73f4f027b11d1f5d3bebd9077b5a748ef2a02 Author: Maxime Ripard Date: Sat May 27 18:09:27 2017 +0200 drm/sun4i: tcon: Move the muxing out of the mode set function The muxing can actually happen on both channels on some SoCs, so it makes more sense to just move it out of the sun4i_tcon1_mode_set function and create a separate function that needs to be called by the encoders. Let's do that and convert the existing drivers. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_rgb.c | 1 + drivers/gpu/drm/sun4i/sun4i_tcon.c | 22 ++++++++++++++++------ drivers/gpu/drm/sun4i/sun4i_tcon.h | 2 ++ drivers/gpu/drm/sun4i/sun4i_tv.c | 1 + 4 files changed, 20 insertions(+), 6 deletions(-) commit 1a07542600badeb4b8649ec8a6ce77ff1e064820 Author: Maxime Ripard Date: Sat May 27 18:09:26 2017 +0200 drm/sun4i: tcon: Add channel debug While all functions have debug logs, the channel enable and disable are not logged. Make sure this is the case. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1a0edb3f71c0c306fe8c831ee24abc56413a5a46 Author: Icenowy Zheng Date: Wed May 17 22:47:22 2017 +0800 drm/sun4i: tcon: add support for V3s TCON Allwinner V3s SoC features a TCON without channel 1. Add support for it. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++- drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 9df90c25a003916e7ed856a5fad1355ca5cb22ca Author: Icenowy Zheng Date: Wed May 17 22:47:21 2017 +0800 drm/sun4i: Add compatible string for V3s display engine Allwinner V3s features the new "Display Engine 2.0", which can now also be driven with our subdrivers in sun4i-drm. Add the compatible string for in sun4i_drv.c, in order to make the display engine and its components probed. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + 1 file changed, 1 insertion(+) commit 9d75b8c0b999663d85cddda2791bb15b5f4a8f4a Author: Icenowy Zheng Date: Wed May 17 22:47:20 2017 +0800 drm/sun4i: add support for Allwinner DE2 mixers Allwinner have a new "Display Engine 2.0" in their new SoCs, which comes with mixers to do graphic processing and feed data to TCON, like the old backends and frontends. Add support for the mixer on Allwinner V3s SoC; it's the simplest one. Currently a lot of functions are still missing -- more investigations are needed to gain enough information for them. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/Kconfig | 10 + drivers/gpu/drm/sun4i/Makefile | 3 + drivers/gpu/drm/sun4i/sun8i_layer.c | 134 ++++++++++++ drivers/gpu/drm/sun4i/sun8i_layer.h | 36 ++++ drivers/gpu/drm/sun4i/sun8i_mixer.c | 414 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun8i_mixer.h | 137 ++++++++++++ 6 files changed, 734 insertions(+) commit a43a42ad9ceae94eca1a80ef072d6a19f0160a57 Author: Icenowy Zheng Date: Wed May 17 22:47:19 2017 +0800 drm/sun4i: add a Kconfig option for sun4i-backend As sun4i-backend is now a dedicated module, add an Kconfig option for it to make it optional, since some build may only use other engines. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/Kconfig | 10 ++++++++++ drivers/gpu/drm/sun4i/Makefile | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 73b0ca8ec76d593d8ebb9d3a5e4021da852310e7 Author: Mahesh Kumar Date: Fri May 26 20:45:46 2017 +0530 drm/i915/skl+: consider max supported plane pixel rate while scaling A display resolution is only supported if it meets all the restrictions below for Maximum Pipe Pixel Rate. The display resolution must fit within the maximum pixel rate output from the pipe. Make sure that the display pipe is able to feed pixels at a rate required to support the desired resolution. For each enabled plane on the pipe { If plane scaling enabled { Horizontal down scale amount = Maximum[1, plane horizontal size / scaler horizontal window size] Vertical down scale amount = Maximum[1, plane vertical size / scaler vertical window size] Plane down scale amount = Horizontal down scale amount * Vertical down scale amount Plane Ratio = 1 / Plane down scale amount } Else { Plane Ratio = 1 } If plane source pixel format is 64 bits per pixel { Plane Ratio = Plane Ratio * 8/9 } } Pipe Ratio = Minimum Plane Ratio of all enabled planes on the pipe If pipe scaling is enabled { Horizontal down scale amount = Maximum[1, pipe horizontal source size / scaler horizontal window size] Vertical down scale amount = Maximum[1, pipe vertical source size / scaler vertical window size] Note: The progressive fetch - interlace display mode is equivalent to a 2.0 vertical down scale Pipe down scale amount = Horizontal down scale amount * Vertical down scale amount Pipe Ratio = Pipe Ratio / Pipe down scale amount } Pipe maximum pixel rate = CDCLK frequency * Pipe Ratio In this patch our calculation is based on pipe downscale amount (plane max downscale amount * pipe downscale amount) instead of Pipe Ratio. So, max supported crtc clock with given scaling = CDCLK / pipe downscale. Flip will fail if, current crtc clock > max supported crct clock with given scaling. Changes since V1: - separate out fixed_16_16 wrapper API definition Changes since V2: - Fix buggy crtc !active condition (Maarten) - use intel_wm_plane_visible wrapper as per Maarten's suggestion Changes since V3: - Change failure return from ERANGE to EINVAL Changes since V4: - Rebase based on previous patch changes Changes since V5: - return EINVAL instead of continue (Maarten) Changes since V6: - Improve commit message - Address review comment Changes since V7: - use !enable instead of !active - rename config variable for consistency (Maarten) Signed-off-by: Mahesh Kumar Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170526151546.25025-4-mahesh1.kumar@intel.com drivers/gpu/drm/i915/intel_display.c | 3 ++ drivers/gpu/drm/i915/intel_drv.h | 2 + drivers/gpu/drm/i915/intel_pm.c | 87 ++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) commit 8e56133e5c7b7a7a97f6a92d92f664d5ecd30745 Author: Alexandre Belloni Date: Fri May 12 16:25:30 2017 +0200 clk: at91: fix clk-generated parenting clk_generated_startup is called after clk_hw_register. So the first call to get_parent will not have the correct value (i.e. 0) and because this is cached, it may never be updated. Signed-off-by: Alexandre Belloni Fixes: df70aeef6083 ("clk: at91: add generated clock driver") Signed-off-by: Stephen Boyd drivers/clk/at91/clk-generated.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bb9d85f6e9de8fef5236c076530eab67a2f2431b Author: Kumar, Mahesh Date: Thu Jun 1 11:29:18 2017 +0530 drm/i915/skl: New ddb allocation algorithm This patch implements new DDB allocation algorithm as per HW team recommendation. This algo takecare of scenario where we allocate less DDB for the planes with lower relative pixel rate, but they require more DDB to work. It also takes care of enabling same watermark level for each plane in crtc, for efficient power saving. Changes since v1: - Rebase on top of Paulo's patch series Changes since v2: - Fix the for loop condition to enable WM Changes since v3: - Fix crash in cursor i-g-t reported by Maarten - Rebase after addressing Paulo's comments - Few other ULT fixes Changes since v4: - Rebase on drm-tip - Added separate function to enable WM levels Changes since v5: - Fix a crash identified in skl-6770HQ system Changes since v6: - Address review comments from Matt Changes since v7: - Fix failure return in skl_compute_plane_wm (Matt) - fix typo Changes since v8: - Always check cursor wm enable irrespective of total_data_rate Changes since v9: - fix typo Signed-off-by: Mahesh Kumar Reviewed-by: Maarten Lankhorst Reviewed-by: Matt Roper Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170601055918.4601-1-mahesh1.kumar@intel.com drivers/gpu/drm/i915/intel_pm.c | 257 +++++++++++++++++++++++++--------------- 1 file changed, 159 insertions(+), 98 deletions(-) commit 87969338436710638076d8083dda8b0de703f4a5 Author: Icenowy Zheng Date: Wed May 17 22:47:17 2017 +0800 drm/sun4i: abstract a engine type As we are going to add support for the Allwinner DE2 engine in sun4i-drm driver, we will finally have two types of display engines -- the DE1 backend and the DE2 mixer. They both do some display blending and feed graphics data to TCON, and is part of the "Display Engine" called by Allwinner, so I choose to call them both "engine" here. Abstract the engine type to a new struct with an ops struct, which contains functions that should be called outside the engine-specified code (in TCON, CRTC or TV Encoder code). In order to preserve bisectability, we also switch the backend and layer code in its own module. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/Makefile | 5 +- drivers/gpu/drm/sun4i/sun4i_backend.c | 78 +++++++++++++++------------- drivers/gpu/drm/sun4i/sun4i_backend.h | 19 +++---- drivers/gpu/drm/sun4i/sun4i_crtc.c | 11 ++-- drivers/gpu/drm/sun4i/sun4i_crtc.h | 4 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- drivers/gpu/drm/sun4i/sun4i_drv.h | 2 +- drivers/gpu/drm/sun4i/sun4i_layer.c | 9 ++-- drivers/gpu/drm/sun4i/sun4i_layer.h | 4 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 38 ++++++++------ drivers/gpu/drm/sun4i/sun4i_tv.c | 9 ++-- drivers/gpu/drm/sun4i/sunxi_engine.h | 98 +++++++++++++++++++++++++++++++++++ 12 files changed, 192 insertions(+), 87 deletions(-) commit 367d73d2806085bb507ab44c1f532640917fd5ca Author: Maarten Lankhorst Date: Wed May 31 17:42:36 2017 +0200 drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2. On some systems there can be a race condition in which no crtc state is added to the first atomic commit. This results in all crtc's having a null DDB allocation, causing a FIFO underrun on any update until the first modeset. Changes since v1: - Do not take the connection_mutex, this is already done below. Reported-by: Maarten Lankhorst Inspired-by: Mahesh Kumar Signed-off-by: Maarten Lankhorst Fixes: 98d39494d375 ("drm/i915/gen9: Compute DDB allocation at atomic check time (v4)") Cc: # v4.8+ Cc: Mahesh Kumar Cc: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/20170531154236.27180-1-maarten.lankhorst@linux.intel.com Reviewed-by: Mahesh Kumar Reviewed-by: Matt Roper drivers/gpu/drm/i915/intel_pm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ad14972422899b620fb594789824f0871dfb788c Author: Fabio Estevam Date: Mon May 15 08:55:05 2017 -0300 clk: imx7d: Fix the powerdown bit location of PLL DDR According to the MX7D Reference Manual the powerdown bit of CCM_ANALOG_PLL_DDRn register is bit 20, so fix it accordingly. Signed-off-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 2 +- drivers/clk/imx/clk-pllv3.c | 5 +++++ drivers/clk/imx/clk.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit 9593f4f56cf5d1c443f66660a0c7f01de38f979d Author: Ralph Sennhauser Date: Wed May 24 16:58:52 2017 +0200 clk: mvebu: armada-38x: add support for 1866MHz variants The Linksys WRT3200ACM CPU is clocked at 1866MHz. Add 1866MHz to the list of supported CPU frequencies. Also update multiplier and divisor for the l2clk and ddrclk. Noticed by the following warning: [ 0.000000] Selected CPU frequency (16) unsupported Signed-off-by: Ralph Sennhauser Reviewed-by: Gregory CLEMENT Signed-off-by: Stephen Boyd drivers/clk/mvebu/armada-38x.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ce42cf4b03e6ad1a6316b2a74a4ceae4b70adcac Author: Andrzej Hajda Date: Wed Apr 5 09:28:37 2017 +0200 drm/exynos/decon5433: remove useless check TE IRQ is enabled only in case of sw-trigger, so trigger check is redundant. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 3 --- 1 file changed, 3 deletions(-) commit 2073ddb4ff8492dcd2c5f3a9f01252ce7f5a2974 Author: Andrzej Hajda Date: Wed Apr 5 09:28:36 2017 +0200 drm/exynos/decon5433: kill BIT_SUSPENDED flag Exynos tracked suspend state to prevent touching disabled HW. After fixing disable order in HDMI and moving TE handling to DECON it is not needed anymore - all IRQ handlers and callbacks touching HW are called only with enabled DECON. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 38 --------------------------- 1 file changed, 38 deletions(-) commit a48ff5010153946355d6d7e171807977e712c9c8 Author: Andrzej Hajda Date: Wed Apr 5 09:28:35 2017 +0200 drm/exynos/decon5433: kill BIT_WIN_UPDATED flag The flag was used to trigger software update in TE IRQ handler only if framebuffers were replaced. Since TE update is triggered always when VBLANKs are enabled and after framebuffer replacement VBLANKs are always enabled the flag becomes redundant. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 ---- 1 file changed, 4 deletions(-) commit 3643e758744dc2c336387fb2cb79c93c3242f18f Author: Andrzej Hajda Date: Wed Apr 5 09:28:34 2017 +0200 drm/exynos/decon5433: kill BIT_CLKS_ENABLED flag The flag was used to check if IRQ handlers can touch HW. Since driver enables IRQs only if hardware is enabled the flag becomes redundant. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 358eccc0eec8d76db7221f6d51d7d528c656ef46 Author: Andrzej Hajda Date: Wed Apr 5 09:28:33 2017 +0200 drm/exynos/decon5433: kill BIT_IRQS_ENABLED flag Since DECON uses enable_irq/disable_irq to full control IRQs, there is no point in having flags to trace it separately. As a bonus condition for software trigger becomes always true, so it can be removed. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit b37d53a0382c03064e6fee3ea1fdc77caf4906c6 Author: Andrzej Hajda Date: Wed Apr 5 09:28:32 2017 +0200 drm/exynos/decon5433: move TE handling to DECON DECON is the only user of TE signal, moving all TE related code to DECON driver allows to precise control of IRQ handlers. This control allows to fix race between IRQ handler and DECON disable code - now it is possible to disable DECON during IRQ handling which can result in kernel crash. Beside race fixing this change allows further code simplification. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 94 ++++++++++++++++++++------- 1 file changed, 71 insertions(+), 23 deletions(-) commit f8b7f1f86fbebe81d996dcb51231bc0536569a4f Author: Andrzej Hajda Date: Wed Apr 5 09:28:31 2017 +0200 dt-bindings: exynos5433-decon: add TE interrupt binding DECON command mode can use hardware trigger where transmission is triggered automatically, or software trigger - where TE interrupt handler should trigger transmission. DECON will use software trigger if TE interrupt is specified. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae Documentation/devicetree/bindings/display/exynos/exynos5433-decon.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8875f8214b6644e3c08d6b7ce1d419fdfb2b4f4 Author: Andrzej Hajda Date: Wed Apr 5 09:28:30 2017 +0200 dt-bindings: exynos5433-decon: fix interrupts bindings DECON requires different interrupts depending on mode of work, which depends on panel it is connected to. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae .../devicetree/bindings/display/exynos/exynos5433-decon.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 366dcad34c2fe1684bd93892d06e774e44600f34 Author: Andrzej Hajda Date: Wed Apr 5 09:28:29 2017 +0200 drm/exynos/decon5433: always do sw-trigger when vblanks enabled When vblanks are enabled userspace and/or kernel can expect vblank interrupt at declared period of time. To generate vblank interrupt image transfer must be triggered. This patch fixes vblank timeouts in case of sw-trigger mode. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2a6e4cd53c498c6762d9fa69745b84ff99815905 Author: Tobias Jakobi Date: Fri Mar 10 15:21:54 2017 +0100 drm/exynos: mixer: document YCbCr magic numbers The output stage of the mixer uses YCbCr for the internal computations, which is the reason that some registers take YCbCr related data as input. In particular this applies to MXR_BG_COLOR{0,1,2} and MXR_CM_COEFF_{Y,CB,CR}. Document the formatting of the data which we write to these registers. While at it, unify wording of comments in the register header. Reviewed-by: Andrzej Hajda Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 33 +++++++++++++++++++++++++-------- drivers/gpu/drm/exynos/regs-mixer.h | 7 +++++-- 2 files changed, 30 insertions(+), 10 deletions(-) commit 2a39db01361ec378718648de90a6e817f891b8d4 Author: Tobias Jakobi Date: Fri Mar 10 14:30:16 2017 +0100 drm/exynos: mixer: simplify mixer_cfg_rgb_fmt() Convert if-statements to switch statement. Removes duplicated code. Reviewed-by: Andrzej Hajda Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit 526b4d3e8b5af7195a2aba596b8ec1622c8da564 Author: Andrzej Hajda Date: Thu Apr 13 16:19:50 2017 +0900 drm/exynos/dsi: fix bridge_node DT parsing DSIM uses MIC bridge which is between DECON and DSIM, so the driver should expect bridge node on input side. Fixes: 86418f9 ("drm: convert drivers to use of_graph_get_remote_node") Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 625e63e27c5bec5bbcec8aeaea82d0b1975d2cf4 Author: Andrzej Hajda Date: Fri May 19 17:27:08 2017 +0900 drm/exynos/hdmi: fix pipeline disable order Hardware require that MIXER(crtc) should be disabled prior to HDMI(encoder). It was achieved by disabling crtc from encoder disable callback, bypassing drm core. As a result drm core tried to call vblank related routines on disabled crtc. The patch fixes it by simplifying hdmi_disable routine - now it only cancels hotplug worker. Hardware will be disabled in proper moment during pipe clock disable. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit b2adc5307514abe5872185351f772b95cfdce2ff Author: Andrzej Hajda Date: Wed Mar 15 15:41:10 2017 +0100 drm/exynos/decon5433: simplify shadow protect code There is no point in protecting only particular windows during update. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 20 +++++++------------- include/video/exynos5433_decon.h | 1 + 2 files changed, 8 insertions(+), 13 deletions(-) commit 3ba808456b3fe77dc4e17de22bb317b70465903d Author: Andrzej Hajda Date: Wed Mar 15 15:41:09 2017 +0100 drm/exynos/decon5433: kill BIT_IRQS_ENABLED BIT_IRQS_ENABLED flag duplicates drm_vblank_crtc::refcount, it could be safely removed. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit f8172eb3b28b2a497fcbabd7b2d9048ca2b585fc Author: Andrzej Hajda Date: Wed Mar 15 15:41:08 2017 +0100 drm/exynos/decon5433: kill DECON_UPDATE workaround Since fixing CMU code (drm/exynos/decon5433: fix CMU programming) DECON started behave predictable and does not need special care during DECON_UPDATE writes. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c7954aa6f79b1fff83453e33edb359c236eea5df Author: Andrzej Hajda Date: Wed Mar 15 15:41:07 2017 +0100 drm/exynos: kill mode_set_nofb callback All Exynos CRTCs are fully configured by .enable callback. The only users of mode_set_nofb actually did nothing in their callbacks - they immediately returned because devices were in suspend state - mode_set_nofb is always called on disabled device. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos7_drm_decon.c | 1 - drivers/gpu/drm/exynos/exynos_drm_crtc.c | 10 ---------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 2 -- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 1 - 4 files changed, 14 deletions(-) commit 2949390eb1be95633afdc39923f53ea5b326242a Author: Andrzej Hajda Date: Wed Mar 15 15:41:06 2017 +0100 drm/exynos: kill pipe field from drivers contexts Since possible_crtcs are set by Exynos core helper pipe fields have no raison d'etre. The only place it was used, as a hack, is fimd_clear_channels, to avoid calling drm_crtc_handle_vblank, but DRM core has already other protection mechanism (vblank->enabled), so it could be safely removed. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 -- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 4 +--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 11 ++--------- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 15 +-------------- drivers/gpu/drm/exynos/exynos_mixer.c | 2 -- 5 files changed, 4 insertions(+), 30 deletions(-) commit 2c82607b56ad7035077dbb0d37093d8f2b21e235 Author: Andrzej Hajda Date: Wed Mar 15 15:41:05 2017 +0100 drm/exynos: set plane possible_crtcs in exynos_plane_init All Exynos planes are assigned to exactly one CRTC, it allows to simplify initialization by moving setting of possible_crtcs to exynos_plane_init. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_plane.c | 5 ++--- drivers/gpu/drm/exynos/exynos_drm_plane.h | 1 - drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 +- drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) commit f44d3d2f84d6bc6b685f40a18e08b4bdcaf3d1ef Author: Andrzej Hajda Date: Wed Mar 15 15:41:04 2017 +0100 drm/exynos: kill exynos_drm_private::pipe The field duplicates drm_dev->mode_config.num_crtc. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 18 ++++-------------- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 11 ++--------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 3 --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 9 ++------- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 4 +--- drivers/gpu/drm/exynos/exynos_mixer.c | 8 ++------ 6 files changed, 11 insertions(+), 42 deletions(-) commit d644951c2b2b013751e7dd5efe886340e196fab4 Author: Andrzej Hajda Date: Mon May 29 10:05:25 2017 +0900 drm/exynos: kill exynos_drm_crtc::pipe Since crtc index is stored in drm_crtc pipe field became redundant. The patch beside removing the field simplifies also exynos_drm_crtc_get_pipe_from_type. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 3 +-- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 3 +-- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 12 +++--------- drivers/gpu/drm/exynos/exynos_drm_crtc.h | 1 - drivers/gpu/drm/exynos/exynos_drm_drv.h | 8 -------- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 3 +-- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 3 +-- drivers/gpu/drm/exynos/exynos_mixer.c | 3 +-- 8 files changed, 8 insertions(+), 28 deletions(-) commit 0586feba322e1de05075700eb4b835c8b683e62b Author: Andrzej Hajda Date: Wed Mar 15 15:41:02 2017 +0100 drm/exynos/decon5433: implement frame counter DECON in Exynos5433 has frame counter, it can be used to implement get_vblank_counter callback. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 12 ++++++++++++ drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 +++++++++++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + 3 files changed, 24 insertions(+) commit 73b7b44fbd93509d3f30c83ca53c79a5534b0d68 Author: Andrzej Hajda Date: Wed Mar 15 15:41:01 2017 +0100 drm/exynos: simplify completion event handling All Exynos CRTC drivers shouldn't fail at referencing vblank events, alternate path is actually dead code. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_crtc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 9b43c161c8ac268af88b9994f0ebfe661d8b84a5 Merge: 2a1720376 e379cbe Author: Inki Dae Date: Thu Jun 1 16:21:07 2017 +0900 Merge tag 'exynos-drm-fixes-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into exynos-drm-next - Fix a regression to description of exynos_drm_crtc - Remove preclose hook of Exynos . This was a exynos change of the patch series[1] merged already. - Fix one dt broken issue - Make sure to release bridge_node of Exynos MIPI-DSI driver. [1] https://lists.freedesktop.org/archives/dri-devel/2017-March/135111.html commit 2d7b56378d32b0cf006f8944cbba4046df45dd25 Author: Caesar Wang Date: Wed May 31 10:14:23 2017 +0800 drm/rockchip: gem: add the lacks lock and trivial changes As the allocation and free buffer that need to add mutex lock for drm mm, but it lacks the locking on error path in rockchip_gem_iommu_map(). Also, the trivial changes like The comment should be placed in the kerneldoc and unused blank line. Signed-off-by: Caesar Wang Reviewed-by: Mark Yao Signed-off-by: Mark Yao Link: http://patchwork.freedesktop.org/patch/msgid/1496196863-25738-1-git-send-email-wxt@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 21774f21dc673043c777a56c5dd0ea4e88c256d3 Author: Daniel Vetter Date: Wed May 24 16:51:51 2017 +0200 drm/hdlcd|mali: Drop drm_vblank_cleanup IRQs are properly shut down, so it almost works as race-free shutdown. Except the irq is stopped after the vblank stuff, so boom anyway. Proper way would be to call drm_atomic_helper_shutdown before any of the kms things gets stopped. So no harm in removing the drm_vblank_cleanup here really. Same story for both hdlcd and mali. v2: Move misplaced malidp hunk to this patch (Liviu). Cc: Liviu Dudau Cc: Brian Starkey Acked-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-17-daniel.vetter@ffwll.ch drivers/gpu/drm/arm/hdlcd_drv.c | 2 -- drivers/gpu/drm/arm/malidp_drv.c | 2 -- 2 files changed, 4 deletions(-) commit 16584b204573ece64de80f20eb6202495aeb35c2 Author: Daniel Vetter Date: Wed May 31 11:22:53 2017 +0200 drm/doc: Polish irq helper documentation Pull a (much shorter) overview into drm_irq.c, and instead put the callback documentation into in-line comments in drm_drv.h. v2: Move the include stanzas back to the split-up patch (Stefan). Cc: Stefan Agner Reviewed-by: Stefan Agner Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170531092253.12833-1-daniel.vetter@ffwll.ch Documentation/gpu/drm-internals.rst | 54 ------------------------------------- drivers/gpu/drm/drm_irq.c | 30 +++++++++++++++++---- drivers/gpu/drm/drm_vblank.c | 3 +++ include/drm/drmP.h | 9 +++++-- include/drm/drm_drv.h | 33 +++++++++++++++++++++-- 5 files changed, 66 insertions(+), 63 deletions(-) commit 3ed4351a83ca05d3cd886ade6900be1067aa7903 Author: Daniel Vetter Date: Wed May 31 11:21:46 2017 +0200 drm: Extract drm_vblank.[hc] drm_irq.c contains both the irq helper library (optional) and the vblank support (optional, but part of the modeset uapi, and doesn't require the use of the irq helpers at all. Split this up for more clarity of the scope of the individual bits. v2: Move misplaced hunks to this patch (Stefan). Cc: Stefan Agner Reviewed-by: Stefan Agner Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170531092146.12528-1-daniel.vetter@ffwll.ch Documentation/gpu/drm-internals.rst | 9 + Documentation/gpu/drm-kms.rst | 4 +- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_internal.h | 3 +- drivers/gpu/drm/drm_irq.c | 1623 +--------------------------------- drivers/gpu/drm/drm_vblank.c | 1645 +++++++++++++++++++++++++++++++++++ include/drm/drmP.h | 5 +- include/drm/drm_file.h | 1 + include/drm/drm_irq.h | 158 +--- include/drm/drm_prime.h | 2 + include/drm/drm_vblank.h | 181 ++++ 11 files changed, 1869 insertions(+), 1764 deletions(-) commit 284e76387c38260e834c99b010a68d75fc46b394 Author: Rick Altherr Date: Mon May 22 14:12:24 2017 -0700 hw_random: timeriomem_rng: Allow setting RNG quality from platform data When a hw_random device's quality is non-zero, it will automatically be used to fill the kernel's entropy pool. Since timeriomem_rng is used by many different devices, the quality needs to be provided by platform data or device tree. Signed-off-by: Rick Altherr Signed-off-by: Herbert Xu drivers/char/hw_random/timeriomem-rng.c | 7 +++++++ include/linux/timeriomem-rng.h | 3 +++ 2 files changed, 10 insertions(+) commit b14c53451719dc6ec8e6387e5be3be23294a6f1d Author: Rick Altherr Date: Mon May 22 14:12:23 2017 -0700 dt-bindings: timeriomem_rng: Add entropy quality property Signed-off-by: Rick Altherr Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/timeriomem_rng.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 2a9faf8b7e4350967ed7b59e39522972b9ead0c9 Author: Ard Biesheuvel Date: Sun May 21 10:23:40 2017 +0000 crypto: arm/crc32 - enable module autoloading based on CPU feature bits Make the module autoloadable by tying it to the CPU feature bits that describe whether the optional instructions it relies on are implemented by the current CPU. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/crc32-ce-glue.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a83ff88bedb2794f5990439276bf0abbc4b3aeb8 Author: Ard Biesheuvel Date: Sun May 21 10:23:39 2017 +0000 crypto: arm/sha2-ce - enable module autoloading based on CPU feature bits Make the module autoloadable by tying it to the CPU feature bit that describes whether the optional instructions it relies on are implemented by the current CPU. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/sha2-ce-glue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bd56f95ea933d1dd1628373a8213716225605d1c Author: Ard Biesheuvel Date: Sun May 21 10:23:38 2017 +0000 crypto: arm/sha1-ce - enable module autoloading based on CPU feature bits Make the module autoloadable by tying it to the CPU feature bit that describes whether the optional instructions it relies on are implemented by the current CPU. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/sha1-ce-glue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c9d9f608b4339435ccec6bd2ec1a5c42e066788e Author: Ard Biesheuvel Date: Sun May 21 10:23:37 2017 +0000 crypto: arm/ghash-ce - enable module autoloading based on CPU feature bits Make the module autoloadable by tying it to the CPU feature bit that describes whether the optional instructions it relies on are implemented by the current CPU. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/ghash-ce-glue.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4d8061a5918dea53402170932a861c09f3b88df5 Author: Ard Biesheuvel Date: Sun May 21 10:23:36 2017 +0000 crypto: arm/aes-ce - enable module autoloading based on CPU feature bits Make the module autoloadable by tying it to the CPU feature bit that describes whether the optional instructions it relies on are implemented by the current CPU. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/aes-ce-glue.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fca63efe6eafb6c50fd8809b509579a5418221fc Merge: 658a7568 b90da67 Author: Michael Turquette Date: Thu Jun 1 12:16:35 2017 +0900 Merge branch 'clk-ap806' into clk-next commit b90da67543e5aae5cb8162402ac5b483fb660dbd Author: Gregory CLEMENT Date: Wed May 31 16:07:26 2017 +0200 clk: mvebu: ap806: introduce a new binding As for cp110, the initial intent when the binding of the ap806 system controller was to have one flat node. The idea being that what is currently a clock-only driver in drivers would become a MFD driver, exposing the clock, GPIO and pinctrl functionality. However, after taking a step back, this would lead to a messy binding. Indeed, a single node would be a GPIO controller, clock controller, pinmux controller, and more. This patch adopts a more classical solution of a top-level syscon node with sub-nodes for the individual devices. The main benefit will be to have each functional block associated to its own sub-node where we can put its own properties. The introduction of the Armada 7K/8K is still in the early stage so the plan is to remove the old binding. However, we don't want to break the device tree compatibility for the few devices already in the field. For this we still keep the support of the legacy compatible string with a big warning in the kernel about updating the device tree. Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/cc8c8c40fa4c4e71133033358992ec38e5aa2be5.1496239589.git-series.gregory.clement@free-electrons.com drivers/clk/mvebu/ap806-system-controller.c | 56 ++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 12 deletions(-) commit 55de4d06b4589e5fba9f27b6876884e5af68890e Author: Gregory CLEMENT Date: Wed May 31 16:07:24 2017 +0200 clk: mvebu: ap806: do not depend anymore of the *-clock-output-names As it was done for the cp110, this patch modifies the way the clock names are created. The name of each clock is now created by using its physical address as a prefix (as it was done for the platform device names). Thanks to this we have an automatic way to compute a unique name. Reviewed-by: Thomas Petazzoni Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/e66cdd54d36c6bef78460a51e577f171b6ccb031.1496239589.git-series.gregory.clement@free-electrons.com drivers/clk/mvebu/ap806-system-controller.c | 46 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit d9ff21eea139430ce61bce885605f7828debf028 Author: Gregory CLEMENT Date: Wed May 31 16:07:22 2017 +0200 clk: mvebu: ap806: cosmetic improvement Instead of using &pdev->dev all over the place, introduce a pointer variable for it. Signed-off-by: Gregory CLEMENT Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/5a55e081d96fc6d2a28331b59df90f56d32a9f24.1496239589.git-series.gregory.clement@free-electrons.com drivers/clk/mvebu/ap806-system-controller.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7e5b11afecc0f558c5a6723970770f92f2529d4e Author: Gregory CLEMENT Date: Wed May 31 16:07:25 2017 +0200 dt-bindings: ap806: introduce a new binding This patch updates the documentation according to the changes made in the patch "clk: mvebu: ap806: introduce a new binding" Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/32e35c1d5919bdf9dc7d58678f0c0b462886d03e.1496239589.git-series.gregory.clement@free-electrons.com .../bindings/arm/marvell/ap806-system-controller.txt | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit d1a26232c3ce1db2e7c9c114150e93a9fc6ec42e Author: Gregory CLEMENT Date: Wed May 31 16:07:23 2017 +0200 dt-bindings: ap806: do not depend anymore of the *-clock-output-names This patch updates the documentation according to the change made in the patch "clk: mvebu: ap806: do not depend anymore of the *-clock-output-names": the clock names are no more part of the binding. Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/d502b5abc68cbb5739ce72ba8be27528f9042a28.1496239589.git-series.gregory.clement@free-electrons.com .../devicetree/bindings/arm/marvell/ap806-system-controller.txt | 4 ---- 1 file changed, 4 deletions(-) commit a5e2ee5da47412c98b023acb49d0787e40e4ec6a Author: David S. Miller Date: Wed May 31 19:35:00 2017 -0700 bpf: Take advantage of stack_depth tracking in sparc64 JIT Signed-off-by: David S. Miller arch/sparc/net/bpf_jit_comp_64.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 551f40c42f02000077a6cc5416bfe213052dbbf0 Merge: 6c21a2a 419585a Author: David S. Miller Date: Wed May 31 20:56:40 2017 -0400 Merge branch 'dsa-add-Microchip-KSZ9477-DSA-driver' Woojung Huh says: ==================== dsa: add Microchip KSZ9477 DSA driver This series of patches is for Microchip KSZ9477 DSA driver. KSZ9477 is 7 ports GigE switch with numerous advanced features. 5 ports are 10/100/1000 Mbps internal PHYs and 2 ports have Interfaces to SGMII, RGMII, MII or RMII. This patch supports VLAN, MDB, FDB and port mirroring offloads. Welcome reviews and comments from community. Note: Tests are performed on internal development board. V5 - add missing MODULE_LICENSE V4 - update per review comments - cosmetic changes - net/dsa/tag_ksz.c * skb_put() & memset() are changed to skb_put_padto() - drivers/net/dsa/microchip/ksz_common. * vlan access mutex is updated * mib_names[] is changed to static const V3 - update per review comments - cosmetic changes - drivers/net/dsa/microchip/ksz_common.c * clean up ksz_switch_chips[] * consolidate checking loops into functions * update mutex for better locking * replace devm_kmalloc_array() to devm_kcalloc() - MAINTAINERS * add missing net/dsa/tag_ksz.c V2 - update per review comments - several cosmetic changes - net/dsa/tag_ksz.c * constants are changed to defines * remove skb_linearize() in ksz_rcv() * ksz_xmit()checks skb tailroom before allocate new skb - drivers/net/phy/micrel.c * remove PHY_HAS_MAGICANEG from ksphy_driver[] - drivers/net/dsa/microchip/ksz_common.c * add timeout to avoid endless loop * port initialization is move to ksz_port_enable() instead of ksz_setup_ports() - Documentation/devicetree/bindings/net/dsa/ksz.txt * fix typo and indentations ==================== Signed-off-by: David S. Miller commit 419585a98e825a08ed7b3e38ba0b1383f5a7c1bb Author: Woojung Huh Date: Wed May 31 20:19:29 2017 +0000 dsa: add maintainer of Microchip KSZ switches Adding maintainer of Microchip KSZ switches. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh Signed-off-by: David S. Miller MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5033a7cbeca26aed5d8db1fda47b2fb0ece0d95c Author: Woojung Huh Date: Wed May 31 20:19:23 2017 +0000 net: dsa: Add Microchip KSZ switches binding A sample SPI configuration for Microchip KSZ switches. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/ksz.txt | 72 +++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit b987e98e50ab90e5291581204ef7a1c649313a70 Author: Woojung Huh Date: Wed May 31 20:19:19 2017 +0000 dsa: add DSA switch driver for Microchip KSZ9477 The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch with numerous advanced features. 5 ports incorporate 10/100/1000 Mbps PHYs. The other 2 ports have interfaces that can be configured as SGMII, RGMII, MII or RMII. Either of these may connect directly to a host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 2 + drivers/net/dsa/Makefile | 1 + drivers/net/dsa/microchip/Kconfig | 12 + drivers/net/dsa/microchip/Makefile | 2 + drivers/net/dsa/microchip/ksz_9477_reg.h | 1676 +++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.c | 1279 ++++++++++++++++++++ drivers/net/dsa/microchip/ksz_priv.h | 210 ++++ drivers/net/dsa/microchip/ksz_spi.c | 216 ++++ include/linux/platform_data/microchip-ksz.h | 29 + 9 files changed, 3427 insertions(+) commit fc3973a1fa090d5f5437621a9ae1f2232a04ee5b Author: Woojung Huh Date: Wed May 31 20:19:13 2017 +0000 phy: micrel: add Microchip KSZ 9477 Switch PHY support Adding Microchip 9477 Phy included in KSZ9477 Switch. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 11 +++++++++++ include/linux/micrel_phy.h | 2 ++ 2 files changed, 13 insertions(+) commit 8b8010fb7876e816300ddd60fa089e9ceb209f3e Author: Woojung Huh Date: Wed May 31 20:19:06 2017 +0000 dsa: add support for Microchip KSZ tail tagging Adding support for the Microchip KSZ switch family tail tagging. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh Signed-off-by: David S. Miller include/net/dsa.h | 1 + net/dsa/Kconfig | 3 ++ net/dsa/Makefile | 1 + net/dsa/dsa.c | 3 ++ net/dsa/dsa_priv.h | 3 ++ net/dsa/tag_ksz.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 112 insertions(+) commit 6c21a2a65ded27ce49847339efe4e1373a2319e5 Merge: d2e0ef4 2960ae4 Author: David S. Miller Date: Wed May 31 19:29:48 2017 -0400 Merge branch 'bpf-stack-tracker' Alexei Starovoitov says: ==================== bpf: stack depth tracking Introduce tracking of bpf program stack depth in the verifier and use that info to reduce bpf program stack consumption in the interpreter and x64 JIT. Other JITs can take advantage of it as well in the future. Most of the programs consume very little stack, so it's good optimization in general and it's the first step toward bpf to bpf function calls. Also use internal opcode for bpf_tail_call() marking to make clear that jmp|call|x opcode is not uapi and may be used for actual indirect call opcode in the future. ==================== Signed-off-by: David S. Miller commit 2960ae48c4636778761610dd49187691c3774465 Author: Alexei Starovoitov Date: Tue May 30 13:31:35 2017 -0700 bpf: take advantage of stack_depth tracking in x64 JIT Take advantage of stack_depth tracking in x64 JIT. Round up allocated stack by 8 bytes to make sure it stays aligned for functions called from JITed bpf program. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller arch/x86/net/bpf_jit_comp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 177366bf7ceb35860281a6ebe824e42bf96fd95d Author: Alexei Starovoitov Date: Tue May 30 13:31:34 2017 -0700 bpf: change x86 JITed program stack layout in order to JIT programs with different stack sizes we need to make epilogue and exception path to be stack size independent, hence move auxiliary stack space from the bottom of the stack to the top of the stack. Nice side effect is that JITed function prologue becomes shorter due to imm8 offset encoding vs imm32. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller arch/x86/net/bpf_jit.S | 20 +++++++--------- arch/x86/net/bpf_jit_comp.c | 58 ++++++++++++++++++++++++--------------------- 2 files changed, 40 insertions(+), 38 deletions(-) commit b870aa901f4be1d32c13faf9e8f40bf2a8562e19 Author: Alexei Starovoitov Date: Tue May 30 13:31:33 2017 -0700 bpf: use different interpreter depending on required stack size 16 __bpf_prog_run() interpreters for various stack sizes add .text but not a lot comparing to run-time stack savings text data bss dec hex filename 26350 10328 624 37302 91b6 kernel/bpf/core.o.before_split 25777 10328 624 36729 8f79 kernel/bpf/core.o.after_split 26970 10328 624 37922 9422 kernel/bpf/core.o.now Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/core.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 105c03614bff2de60adf338e3ee90652b65c2d05 Author: Alexei Starovoitov Date: Tue May 30 13:31:32 2017 -0700 bpf: fix stack_depth usage by test_bpf.ko test_bpf.ko doesn't call verifier before selecting interpreter or JITing, hence the tests need to manually specify the amount of stack they consume. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller lib/test_bpf.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 50bbfed96766acb8b9e1b299e3daae5187c3eb5a Author: Alexei Starovoitov Date: Tue May 30 13:31:31 2017 -0700 bpf: track stack depth of classic bpf programs To track stack depth of classic bpf programs we only need to analyze ST|STX instructions, since check_load_and_stores() verifies that programs can load from stack only after write. We also need to change the way cBPF stack slots map to eBPF stack, since typical classic programs are using slots 0 and 1, so they need to map to stack offsets -4 and -8 respectively in order to take advantage of small stack interpreter and JITs. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/filter.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 80a58d02559465b0ea403ff91c8bca9a733b1b0d Author: Alexei Starovoitov Date: Tue May 30 13:31:30 2017 -0700 bpf: reconcile bpf_tail_call and stack_depth The next set of patches will take advantage of stack_depth tracking, so make sure that the program that does bpf_tail_call() has stack depth large enough for the callee. We could have tracked the stack depth of the prog_array owner program and only allow insertion of the programs with stack depth less than the owner, but it will break existing applications. Some of them have trivial root bpf program that only does multiple bpf_tail_calls and at init time the prog array is empty. In the future we may add a flag to do such tracking optionally, but for now play simple and safe. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 1 + 1 file changed, 1 insertion(+) commit 8726679a0fa317f8e83d0843b266453f31bff092 Author: Alexei Starovoitov Date: Tue May 30 13:31:29 2017 -0700 bpf: teach verifier to track stack depth teach verifier to track bpf program stack depth Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 1 + kernel/bpf/verifier.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit f696b8f471ec987e987e38206b8eb23c39ee5a86 Author: Alexei Starovoitov Date: Tue May 30 13:31:28 2017 -0700 bpf: split bpf core interpreter split __bpf_prog_run() interpreter into stack allocation and execution parts. The code section shrinks which helps interpreter performance in some cases. text data bss dec hex filename 26350 10328 624 37302 91b6 kernel/bpf/core.o.before 25777 10328 624 36729 8f79 kernel/bpf/core.o.after Very short programs got slower (due to extra function call): Before: test_bpf: #89 ALU64_ADD_K: 1 + 2 = 3 jited:0 7 PASS test_bpf: #90 ALU64_ADD_K: 3 + 0 = 3 jited:0 8 PASS test_bpf: #91 ALU64_ADD_K: 1 + 2147483646 = 2147483647 jited:0 7 PASS test_bpf: #92 ALU64_ADD_K: 4294967294 + 2 = 4294967296 jited:0 11 PASS test_bpf: #93 ALU64_ADD_K: 2147483646 + -2147483647 = -1 jited:0 7 PASS After: test_bpf: #89 ALU64_ADD_K: 1 + 2 = 3 jited:0 11 PASS test_bpf: #90 ALU64_ADD_K: 3 + 0 = 3 jited:0 11 PASS test_bpf: #91 ALU64_ADD_K: 1 + 2147483646 = 2147483647 jited:0 11 PASS test_bpf: #92 ALU64_ADD_K: 4294967294 + 2 = 4294967296 jited:0 14 PASS test_bpf: #93 ALU64_ADD_K: 2147483646 + -2147483647 = -1 jited:0 10 PASS Longer programs got faster: Before: test_bpf: #266 BPF_MAXINSNS: Ctx heavy transformations jited:0 20286 20513 PASS test_bpf: #267 BPF_MAXINSNS: Call heavy transformations jited:0 31853 31768 PASS test_bpf: #268 BPF_MAXINSNS: Jump heavy test jited:0 9815 PASS test_bpf: #269 BPF_MAXINSNS: Very long jump backwards jited:0 6 PASS test_bpf: #270 BPF_MAXINSNS: Edge hopping nuthouse jited:0 13959 PASS test_bpf: #271 BPF_MAXINSNS: Jump, gap, jump, ... jited:0 210 PASS test_bpf: #272 BPF_MAXINSNS: ld_abs+get_processor_id jited:0 21724 PASS test_bpf: #273 BPF_MAXINSNS: ld_abs+vlan_push/pop jited:0 19118 PASS After: test_bpf: #266 BPF_MAXINSNS: Ctx heavy transformations jited:0 19008 18827 PASS test_bpf: #267 BPF_MAXINSNS: Call heavy transformations jited:0 29238 28450 PASS test_bpf: #268 BPF_MAXINSNS: Jump heavy test jited:0 9485 PASS test_bpf: #269 BPF_MAXINSNS: Very long jump backwards jited:0 12 PASS test_bpf: #270 BPF_MAXINSNS: Edge hopping nuthouse jited:0 13257 PASS test_bpf: #271 BPF_MAXINSNS: Jump, gap, jump, ... jited:0 213 PASS test_bpf: #272 BPF_MAXINSNS: ld_abs+get_processor_id jited:0 19389 PASS test_bpf: #273 BPF_MAXINSNS: ld_abs+vlan_push/pop jited:0 19583 PASS For real world production programs the difference is noise. This patch is first step towards reducing interpreter stack consumption. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/core.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 71189fa9b092ef125ee741eccb2f5fa916798afd Author: Alexei Starovoitov Date: Tue May 30 13:31:27 2017 -0700 bpf: free up BPF_JMP | BPF_CALL | BPF_X opcode free up BPF_JMP | BPF_CALL | BPF_X opcode to be used by actual indirect call by register and use kernel internal opcode to mark call instruction into bpf_tail_call() helper. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 2 +- arch/powerpc/net/bpf_jit_comp64.c | 2 +- arch/s390/net/bpf_jit_comp.c | 2 +- arch/sparc/net/bpf_jit_comp_64.c | 2 +- arch/x86/net/bpf_jit_comp.c | 2 +- include/linux/filter.h | 3 +++ kernel/bpf/core.c | 2 +- kernel/bpf/verifier.c | 2 +- 8 files changed, 10 insertions(+), 7 deletions(-) commit d2e0ef493ad953048bdf562b06cc4330b3fd9fb7 Merge: c380e37 47eaa23 Author: David S. Miller Date: Wed May 31 17:58:14 2017 -0400 Merge branch 'nfp-move-BPF-offload-code-into-app' Jakub Kicinski says: ==================== nfp: move BPF offload code into app This series moves the eBPF offload code out of netdev/vNIC handling and starts building the nfp_app. Port init is moved into the apps as well because various apps associate vNICs, representors with ports differently. First patch adds a helper for updating tc stats which has been waiting in my tree to be included in any moderately related series. Next series will bring communicating with FW using control messages, then representors, BPF maps, tc flower... :) ==================== Signed-off-by: David S. Miller commit 47eaa23b4c27d735cb797be71c711a99f99e9ff6 Author: Jakub Kicinski Date: Wed May 31 08:06:51 2017 -0700 nfp: fix memory leak on FW load error Free management FW info when app FW load failed. Fixes: eefbde7e1002 ("nfp: add hwmon support") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 + 1 file changed, 1 insertion(+) commit c66a9cf408037781fc1984bc60785049b453d8a4 Author: Jakub Kicinski Date: Wed May 31 08:06:50 2017 -0700 nfp: move basic eBPF stats to app-specific code Allow apps to associate private data with vNICs and move BPF-specific fields of nfp_net to such structure. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 19 ++++++++- drivers/net/ethernet/netronome/nfp/bpf/main.h | 18 +++++++++ drivers/net/ethernet/netronome/nfp/bpf/offload.c | 46 +++++++++++++--------- drivers/net/ethernet/netronome/nfp/nfp_net.h | 15 ++----- .../net/ethernet/netronome/nfp/nfp_net_common.c | 3 -- 5 files changed, 67 insertions(+), 34 deletions(-) commit bb45e51cb0f8fea496eb2d6a9ef2ffb5da564048 Author: Jakub Kicinski Date: Wed May 31 08:06:49 2017 -0700 nfp: move bpf offload code to the BPF app Move bulk of the eBPF offload code out of common vNIC code into app-specific callbacks. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 84 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/bpf/main.h | 5 ++ drivers/net/ethernet/netronome/nfp/nfp_app.h | 61 ++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net.h | 1 - .../net/ethernet/netronome/nfp/nfp_net_common.c | 66 +++-------------- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 1 + 6 files changed, 159 insertions(+), 59 deletions(-) commit d9ae7f2bfead4600e85459be93082ca8b1c884f9 Author: Jakub Kicinski Date: Wed May 31 08:06:48 2017 -0700 nfp: move eBPF offload files to BPF app directory Pure move of eBPF offload files to BPF app directory, only change the names and relative header location. nfp_asm.h stays in the main dir and it doesn't really have to include nfp_bpf.h. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 6 +- drivers/net/ethernet/netronome/nfp/bpf/jit.c | 1899 ++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/bpf/main.h | 201 +++ drivers/net/ethernet/netronome/nfp/bpf/offload.c | 287 +++ drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 174 ++ drivers/net/ethernet/netronome/nfp/nfp_asm.h | 2 +- drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 201 --- drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c | 1899 -------------------- .../net/ethernet/netronome/nfp/nfp_bpf_verifier.c | 174 -- .../net/ethernet/netronome/nfp/nfp_net_offload.c | 287 --- 10 files changed, 2565 insertions(+), 2565 deletions(-) commit 2707d6f18baa8a8ff2cabddfb324d0be7f512fe5 Author: Jakub Kicinski Date: Wed May 31 08:06:47 2017 -0700 nfp: report app name in ethtool -i Let the app print its name in ethtool -i output. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_app.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_app.h | 9 +++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 5 +++-- drivers/net/ethernet/netronome/nfp/nic/main.c | 1 + 5 files changed, 15 insertions(+), 3 deletions(-) commit 8aa0cb00743a1767013a5ee0a581db62620aabd7 Author: Jakub Kicinski Date: Wed May 31 08:06:46 2017 -0700 nfp: move port init to apps Start fleshing out the apps by turning the vNIC init code to a per-app callback. The two initial apps we have are NIC and eBPF. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 5 +- drivers/net/ethernet/netronome/nfp/bpf/main.c | 58 +++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_app.c | 21 +++++- drivers/net/ethernet/netronome/nfp/nfp_app.h | 50 ++++++++++++- drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | 86 +++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_main.h | 6 ++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 61 ++++++++-------- drivers/net/ethernet/netronome/nfp/nic/main.c | 57 +++++++++++++++ 8 files changed, 309 insertions(+), 35 deletions(-) commit 69394af5de15493fa7bb42ed123d51e713a88b3c Author: Jakub Kicinski Date: Wed May 31 08:06:45 2017 -0700 nfp: turn reading PCIe RTsym parameters into a helper Turn the function to read number of ports into a generic helper. While at it make sure we propagate all errors other than -ENOENT. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 24 ++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 5c9143598ea1a5f7a92761966f0c65a459eef7b4 Author: Jakub Kicinski Date: Wed May 31 08:06:44 2017 -0700 nfp: add missing fall through statements GCC 7 checks for fall through comments, add the two missing ones. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 ++ 1 file changed, 2 insertions(+) commit d897a638e98c476c56118d0dcc1bc55450504866 Author: Jakub Kicinski Date: Wed May 31 08:06:43 2017 -0700 sched: add helper for updating statistics on all actions Forgetting to disable preemption around tcf_action_stats_update() seems to be a common mistake. Add a helper function for updating stats on all actions of a filter. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 10 +--------- drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 10 +--------- drivers/net/ethernet/netronome/nfp/nfp_net_offload.c | 11 ++--------- include/net/pkt_cls.h | 19 +++++++++++++++++++ 4 files changed, 23 insertions(+), 27 deletions(-) commit c380e377a50e944a2b9a892133b5a37b3ec90fe3 Merge: a99bbf6e d9c23ff Author: David S. Miller Date: Wed May 31 17:55:10 2017 -0400 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 2017-05-31 This series contains updates to ixgbe and ixgbevf only. Scott enables support for TSO & GSO for MPLS encapsulated packets for both ixgbe and ixgbevf. Liwei Song fixes an issue where seqcount/seqlock in ixgbe_get_stats64() are not initialized in time, so move the initialization into probe routine after the transmit and receive rings are initialized. Paul cleans up led_[on|off] for X550EM_X, since the firmware configures the PHY & MAC and we have no PHY access so LED on/off is not supported with this device. Emil provides several fixes, starting with enabling RSS on VF to VF traffic on the same PF. Fixed PHY identification, where the previous method was unreliable, so use a different register to ensure proper identification. Cleaned up the logic which could cause us to skip the link configuration, this skipping over the link configuration was leaving SFP+ PHY's in an unstable state, so always call setup_mac_link(). Added RS1 (rate select 1) support for ixgbe. Lastly, fixed incorrect logic in the setting up of SFP+ link speed. Mark fixes the thermal sensor event logic, where it was being executed when there really was no thermal event. So simplify the logic to only execute when there is a thermal event. Tony adds additional error checks and reporting when setting a VF MAC address to ensure that the MAC filter was successfully added. Also fixed possible truncation warnings, as well as implicit fallthrough warnings. ==================== Signed-off-by: David S. Miller commit a99bbf6ed4b7dfd5b6bea1b74a9e51c9ecf1850c Merge: 8eb1b3c 0a4ecc2 Author: David S. Miller Date: Wed May 31 17:49:37 2017 -0400 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 2017-05-31 This series contains updates to i40e and i40evf only. Jesse provides a couple of fixes, starting with cleaning up duplicate lines of code. Fixed a missing line which enables RSS as a negotiated feature. Since the VF does not have any way of reporting FCoE enabled, so just force the code to always report FCoE as disabled. Jake provides several fixes and changes, starting with fixing a race condition in i40e. The hardware has a limitation on transmit PTP packets, which requires us to limit the driver to timestamping a single packet at once. This is done using a state bitlock which enforces that only one timestamp request is honored at a time, unfortunately this suffers from a race condition. Fixed a corner case where we failed to cleanup the bit lock after a failed transmit, and resulted in a state bit being locked forever. Added a new statistic which tracks when a transmit timestamp request is skipped/ignored, since the driver can only handle one transmit timestamp request at a time. Christophe Jaillet fixes a NULL pointer dereference if kzalloc fails. ==================== Signed-off-by: David S. Miller commit 90c1130953c1efcc56c79ab810a18c5b72d89669 Author: Andres Rodriguez Date: Fri Mar 17 14:41:21 2017 -0400 drm/amdgpu: use LRU mapping policy for SDMA engines Spreading the load across multiple SDMA engines can increase memory transfer performance. Signed-off-by: Andres Rodriguez Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6065343a116fce16f7523ab10841efd942ce612d Author: Andres Rodriguez Date: Fri Mar 17 14:30:15 2017 -0400 drm/amdgpu: guarantee bijective mapping of ring ids for LRU v3 Depending on usage patterns, the current LRU policy may create a non-injective mapping between userspace ring ids and kernel rings. This behaviour is undesired as apps that attempt to fill all HW blocks would be unable to reach some of them. This change forces the LRU policy to create bijective mappings only. v2: compress ring_blacklist v3: simplify amdgpu_ring_is_blacklisted() logic Signed-off-by: Andres Rodriguez Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 16 +++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 33 +++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 ++-- 3 files changed, 42 insertions(+), 11 deletions(-) commit 795f2813e628bcf57a69f2dfe413360d14a1d7f4 Author: Andres Rodriguez Date: Mon Mar 6 16:27:55 2017 -0500 drm/amdgpu: implement lru amdgpu_queue_mgr policy for compute v4 Use an LRU policy to map usermode rings to HW compute queues. Most compute clients use one queue, and usually the first queue available. This results in poor pipe/queue work distribution when multiple compute apps are running. In most cases pipe 0 queue 0 is the only queue that gets used. In order to better distribute work across multiple HW queues, we adopt a policy to map the usermode ring ids to the LRU HW queue. This fixes a large majority of multi-app compute workloads sharing the same HW queue, even though 7 other queues are available. v2: use ring->funcs->type instead of ring->hw_ip v3: remove amdgpu_queue_mapper_funcs v4: change ring_lru_list_lock to spinlock, grab only once in lru_get() Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 38 +++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 63 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 ++ 5 files changed, 110 insertions(+), 1 deletion(-) commit effd924d2f3b9c52d5bd8137c3803e83f719a290 Author: Andres Rodriguez Date: Thu Feb 16 00:47:32 2017 -0500 drm/amdgpu: untie user ring ids from kernel ring ids v6 Add amdgpu_queue_mgr, a mechanism that allows disjointing usermode's ring ids from the kernel's ring ids. The queue manager maintains a per-file descriptor map of user ring ids to amdgpu_ring pointers. Once a map is created it is permanent (this is required to maintain FIFO execution guarantees for a context's ring). Different queue map policies can be configured for each HW IP. Currently all HW IPs use the identity mapper, i.e. kernel ring id is equal to the user ring id. The purpose of this mechanism is to distribute the load across multiple queues more effectively for HW IPs that support multiple rings. Userspace clients are unable to check whether a specific resource is in use by a different client. Therefore, it is up to the kernel driver to make the optimal choice. v2: remove amdgpu_queue_mapper_funcs v3: made amdgpu_queue_mgr per context instead of per-fd v4: add context_put on error paths v5: rebase and include new IPs UVD_ENC & VCN_* v6: drop unused amdgpu_ring_is_valid_index (Alex) Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 27 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 128 +++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 6 + drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 251 ++++++++++++++++++++++++++ 5 files changed, 309 insertions(+), 106 deletions(-) commit ecd910eb1f091dd25f4a737a3bc50c0c8892eac7 Author: Andres Rodriguez Date: Fri Feb 24 20:50:20 2017 -0500 drm/amdgpu: workaround tonga HW bug in HQD programming sequence Tonga based asics may experience hangs when an HQD's EOP parameters are modified. Workaround this HW issue by avoiding writes to these registers for tonga asics. Based on the following ROCm commit: 2a0fb8 - drm/amdgpu: Synchronize KFD HQD load protocol with CP scheduler From the ROCm git repository: https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver.git CC: Jay Cornwall Suggested-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 894700f3b7e01e87954a94be6508205c7f024386 Author: Andres Rodriguez Date: Fri Feb 24 15:28:43 2017 -0500 drm/amdgpu: condense mqd programming sequence The MQD structure matches the reg layout. Take advantage of this to simplify HQD programming. Note that the ACTIVE field still needs to be programmed last. Suggested-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 44 +++++------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 84 +++++------------------------------ 2 files changed, 23 insertions(+), 105 deletions(-) commit 0a281f5a2cba94a574167edadca88a3130a88612 Author: Andres Rodriguez Date: Fri Feb 3 23:30:04 2017 -0500 drm/amdgpu: new queue policy, take first 2 queues of each pipe v2 Instead of taking the first pipe and giving the rest to kfd, take the first 2 queues of each pipe. Effectively, amdgpu and amdkfd own the same number of queues. But because the queues are spread over multiple pipes the hardware will be able to better handle concurrent compute workloads. amdgpu goes from 1 pipe to 4 pipes, i.e. from 1 compute threads to 4 amdkfd goes from 3 pipe to 4 pipes, i.e. from 3 compute threads to 4 v2: fix policy comment Reviewed-by: Edward O'Callaghan Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7b2124a5dd99b5b794943e26dbcc8ed62aed8d01 Author: Andres Rodriguez Date: Thu Apr 6 00:10:53 2017 -0400 drm/amdgpu: avoid KIQ clashing with compute or KFD queues v2 Instead of picking an arbitrary queue for KIQ, search for one according to policy. The queue must be unused. Also report the KIQ as an unavailable resource to KFD. In testing I ran into KCQ initialization issues when using pipes 2/3 of MEC2 for the KIQ. Therefore the policy disallows grabbing one of these. v2: fix (ring.me + 1) to (ring.me -1) in amdgpu_amdkfd_device_init Reviewed-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 23 +++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 43 ++++++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 42 ++++++++++++++++++++++++----- 4 files changed, 98 insertions(+), 18 deletions(-) commit de65513af1124b28f2a858bc19b71a54dd93824e Author: Andres Rodriguez Date: Tue Apr 4 17:18:28 2017 -0400 drm/amdgpu: remove hardcoded queue_mask in PACKET3_SET_RESOURCES The assumption that we are only using the first pipe no longer holds. Instead, calculate the queue_mask from the queue_bitmap. Acked-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 20 ++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 20 ++++++++++++++++++-- 2 files changed, 36 insertions(+), 4 deletions(-) commit e33fec4835b9d2b1f8f8b1eb7c3415ab75a0faf5 Author: Andres Rodriguez Date: Fri Feb 3 17:31:38 2017 -0500 drm/amdgpu: allocate queues horizontally across pipes Pipes provide better concurrency than queues, therefore we want to make sure that apps use queues from different pipes whenever possible. Optimize for the trivial case where an app will consume rings in order, therefore we don't want adjacent rings to belong to the same pipe. Reviewed-by: Edward O'Callaghan Acked-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 13 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 83 +++++++++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 86 +++++++++++++++++++++-------------- 3 files changed, 113 insertions(+), 69 deletions(-) commit 5e7095625d3ffd74165e5a6f46e894395caeabe8 Author: Andres Rodriguez Date: Thu Feb 2 15:14:14 2017 -0500 drm/amdgpu: remove duplicate magic constants from amdgpu_amdkfd_gfx*.c This information is already available in adev. Reviewed-by: Edward O'Callaghan Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit d0b63bb3385c5683c7531044425f4507ca5251b2 Author: Andres Rodriguez Date: Fri Feb 3 16:28:48 2017 -0500 drm/amdkfd: allow split HQD on per-queue granularity v5 Update the KGD to KFD interface to allow sharing pipes with queue granularity instead of pipe granularity. This allows for more interesting pipe/queue splits. v2: fix overflow check for res.queue_mask v3: fix shift overflow when setting res.queue_mask v4: fix comment in is_pipeline_enabled() v5: clamp res.queue_mask to the first MEC only Reviewed-by: Edward O'Callaghan Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 22 ++++- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 + .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 104 ++++++++++++++------- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 10 +- .../drm/amd/amdkfd/kfd_device_queue_manager_cik.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 3 +- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 17 +++- drivers/gpu/drm/radeon/radeon_kfd.c | 21 ++++- 9 files changed, 130 insertions(+), 55 deletions(-) commit 763a47b8e1abc7cee0a0f550330124ef1199d58d Author: Andres Rodriguez Date: Thu Feb 9 17:39:52 2017 -0500 drm/amdgpu: teach amdgpu how to enable interrupts for any pipe v3 The current implementation is hardcoded to enable ME1/PIPE0 interrupts only. This patch allows amdgpu to enable interrupts for any pipe of ME1. v2: added gfx9 support v3: use soc15_grbm_select for gfx9 Acked-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 48 ++++++++++++--------------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 33 +++++++++++------------ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 50 +++++++++++------------------------ 3 files changed, 49 insertions(+), 82 deletions(-) commit 78c16834234ec3e3171d7f80446da574f3e8d39b Author: Andres Rodriguez Date: Thu Feb 2 00:38:22 2017 -0500 drm/amdgpu: allow split of queues with kfd at queue granularity v4 Previously the queue/pipe split with kfd operated with pipe granularity. This patch allows amdgpu to take ownership of an arbitrary set of queues. It also consolidates the last few magic numbers in the compute initialization process into mec_init. v2: support for gfx9 v3: renamed AMDGPU_MAX_QUEUES to AMDGPU_MAX_COMPUTE_QUEUES v4: fix off-by-one in num_mec checks in *_compute_queue_acquire Reviewed-by: Edward O'Callaghan Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 82 +++++++++++++++++------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 81 +++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 84 +++++++++++++++++++++++-- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 1 + 5 files changed, 211 insertions(+), 44 deletions(-) commit 42794b27cc628d44db28f62f3333bd12416b597f Author: Andres Rodriguez Date: Wed Feb 1 19:08:23 2017 -0500 drm/amdgpu: take ownership of per-pipe configuration v3 Make amdgpu the owner of all per-pipe state of the HQDs. This change will allow us to split the queues between kfd and amdgpu with a queue granularity instead of pipe granularity. This patch fixes kfd allocating an HDP_EOP region for its 3 pipes which goes unused. v2: support for gfx9 v3: fix gfx7 HPD intitialization Reviewed-by: Edward O'Callaghan Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 13 +------ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 36 ++++++++++++----- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 33 +++++++++++----- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 24 ++++++++---- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 45 ---------------------- 7 files changed, 70 insertions(+), 86 deletions(-) commit d59095f7dd8810e67bdad7a65131903646ebc444 Author: Andres Rodriguez Date: Fri Feb 3 16:17:15 2017 -0500 drm/radeon: take ownership of pipe initialization Take ownership of pipe initialization away from KFD. Note that hpd_eop_gpu_addr was already large enough to accomodate all pipes. Reviewed-by: Edward O'Callaghan Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 27 ++++++++++++++------------- drivers/gpu/drm/radeon/radeon_kfd.c | 13 +------------ 2 files changed, 15 insertions(+), 25 deletions(-) commit dc102c436f12386703e95ac13598dc504a7cae26 Author: Andres Rodriguez Date: Wed Feb 1 17:02:13 2017 -0500 drm/amdgpu: rename rdev to adev Rename straggler instances of r(adeon)dev to a(mdgpu)dev Reviewed-by: Edward O'Callaghan Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 70 +++++++++++++++--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 14 +++--- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- 4 files changed, 44 insertions(+), 44 deletions(-) commit 8ae0d2b8a03dc44d72dd3cccb2a78ec89518bebf Author: Andres Rodriguez Date: Thu Apr 13 13:55:41 2017 -0400 drm/amdgpu: fix kgd_hqd_load failing to update shadow_wptr The return value from copy_form_user is 0 for the success case. Reviewed-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97bf47b21d593c92d8c89be159afccb5d6562279 Author: Andres Rodriguez Date: Wed Feb 1 16:37:42 2017 -0500 drm/amdgpu: unify MQD programming sequence for kfd and amdgpu v2 Use the same gfx_*_mqd_commit function for kfd and amdgpu codepaths. This removes the last duplicates of this programming sequence. v2: fix cp_hqd_pq_wptr value Reviewed-by: Edward O'Callaghan Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 51 ++--------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 49 ++-------------------- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 38 ++++++++++++++++- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.h | 5 +++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 49 +++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.h | 5 +++ 6 files changed, 97 insertions(+), 100 deletions(-) commit 486d807cd9a95ea7ee71b2ddc610a09ecf715fb4 Author: Andres Rodriguez Date: Wed Feb 1 16:28:56 2017 -0500 drm/amdgpu: remove duplicate definition of cik_mqd The gfxv7 contains a slightly different version of cik_mqd called bonaire_mqd. This can introduce subtle bugs if fixes are not applied in both places. Reviewed-by: Edward O'Callaghan Acked-by: Christian König Acked-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 135 ++++++++++++++-------------------- 1 file changed, 54 insertions(+), 81 deletions(-) commit bf13ed6b466d85a7d396798c815926bac0850211 Author: Andres Rodriguez Date: Wed Feb 1 00:01:46 2017 -0500 drm/amdgpu: detect timeout error when deactivating hqd Handle HQD deactivation timeouts instead of ignoring them. Reviewed-by: Edward O'Callaghan Acked-by: Christian König Acked-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 34130fb1493c91d50b04daaeb25e82eecc4483c6 Author: Andres Rodriguez Date: Wed Apr 12 17:19:54 2017 -0400 drm/amdgpu: refactor MQD/HQD initialization v3 The MQD programming sequence currently exists in 3 different places. Refactor it to absorb all the duplicates. The success path remains mostly identical except for a slightly different order in the non-kiq case. This shouldn't matter if the HQD is disabled. The error handling paths have been updated to deal with the new code structure. v2: the non-kiq path for gfxv8 was dropped in the rebase v3: split MEC_HPD_SIZE rename, dropped doorbell changes Reviewed-by: Edward O'Callaghan Acked-by: Christian König Acked-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 439 ++++++++++++++++++---------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 78 +++--- 2 files changed, 271 insertions(+), 246 deletions(-) commit 268cb4c7dff0aac96b1c5d596b321aa197d31360 Author: Andres Rodriguez Date: Wed Apr 12 16:53:50 2017 -0400 drm/amdgpu: clarify MEC_HPD_SIZE is specific to a gfx generation Rename MEC_HPD_SIZE to GFXN_MEC_HPD_SIZE to clarify it is specific to a gfx generation. Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 11 +++++------ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 15 +++++++-------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 13 ++++++------- 3 files changed, 18 insertions(+), 21 deletions(-) commit 2ed2388bc0c5b7d04c7b079d673ce61a0333c818 Author: Jagan Teki Date: Tue May 30 17:42:50 2017 +0000 ARM: dts: sun8i: h3: Add initial NanoPi M1 Plus support NanoPi M1 Plus is designed and developed by FriendlyElec for professionals, enterprise users, makers and hobbyists using the Allwinner H3 SOC. NanoPi M1 Plus key features - Allwinner H3, Quad-core Cortex-A7@1.2GHz - 1GB DDR3 RAM - 8GB eMMC - microSD slot - 10/100/1000M Ethernet - Serial Debug Port - 5V 2A DC power-supply Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 64 +++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) commit 61e3d0f79d6eff1928222ec940b7982b99904857 Author: Wolfram Sang Date: Tue May 23 19:23:11 2017 +0200 i2c: reformat core-base file header Finally, apply modern comment rules to the file header. The old style looked very non-Linuxish and challenged my eyes for some time now. I also added my own copyright for the period of me being the maintainer. Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit 16210d0692d69512d77d0610cef0eaa0d783d1ba Author: Wolfram Sang Date: Tue May 23 22:22:34 2017 +0200 i2c: remove unneeded includes from core They seem like cruft to me. I couldn't find any evidence that something included from there is actually used. Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 2 -- 1 file changed, 2 deletions(-) commit 984b292333ea873cfa1eb5ae17344b40a43e26c3 Author: Wolfram Sang Date: Thu May 25 22:55:42 2017 +0200 docs: i2c: dev-interface: adapt to new filenames of the i2c core The I2C core files were renamed, adapt the textfile to it. Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang Documentation/i2c/dev-interface | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 53f8f7c5cf145d639ebd6d13cfdf2e3e9764add3 Author: Wolfram Sang Date: Tue May 23 16:22:23 2017 +0200 i2c: break out ACPI support into separate file Removes some ifdeffery. Also add the new file to the relevant MAINTAINERS section. Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang MAINTAINERS | 1 + drivers/i2c/Makefile | 1 + drivers/i2c/i2c-core-acpi.c | 653 ++++++++++++++++++++++++++++++++++++++++++++ drivers/i2c/i2c-core-base.c | 648 ------------------------------------------- drivers/i2c/i2c-core.h | 15 + 5 files changed, 670 insertions(+), 648 deletions(-) commit 5bf4fa7daea6d5257357b613d0bb81c68e2d1af2 Author: Wolfram Sang Date: Tue May 23 11:50:58 2017 +0200 i2c: break out OF support into separate file Also removes some ifdeffery. Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/Makefile | 1 + drivers/i2c/i2c-core-base.c | 265 +----------------------------------------- drivers/i2c/i2c-core-of.c | 276 ++++++++++++++++++++++++++++++++++++++++++++ drivers/i2c/i2c-core.h | 8 ++ 4 files changed, 286 insertions(+), 264 deletions(-) commit 22c78d1cce104072747023d2ae0351bf3f97d725 Author: Wolfram Sang Date: Tue May 23 12:27:17 2017 +0200 i2c: break out smbus support into separate file Break out the exported SMBus functions and the emulation layer into a separate file. This also involved splitting up the tracing header into an I2C and an SMBus part. Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang Documentation/driver-api/i2c.rst | 3 + drivers/i2c/Makefile | 2 +- drivers/i2c/i2c-core-base.c | 574 ------------------------------------- drivers/i2c/i2c-core-smbus.c | 594 +++++++++++++++++++++++++++++++++++++++ include/trace/events/i2c.h | 226 +-------------- include/trace/events/smbus.h | 249 ++++++++++++++++ 6 files changed, 849 insertions(+), 799 deletions(-) commit e4991ecdc6b8ad2b21f3d6e90ef826b8871103a2 Author: Wolfram Sang Date: Tue May 23 11:14:17 2017 +0200 i2c: break out slave support into separate file Also removes some ifdeffery. Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/Makefile | 1 + drivers/i2c/i2c-core-base.c | 102 +------------------------------------- drivers/i2c/i2c-core-slave.c | 115 +++++++++++++++++++++++++++++++++++++++++++ drivers/i2c/i2c-core.h | 1 + 4 files changed, 118 insertions(+), 101 deletions(-) commit 91ed53491f4fa31879e0965a7e920dc10f78996c Author: Wolfram Sang Date: Tue May 23 11:08:04 2017 +0200 i2c: rename core source file to allow refactorization The I2C core became quite huge and its monolithic structure makes maintenance hard. So, prepare to break out some functionality into separate files by renaming the source file. Note that we keep the resulting object name constant to avoid regressions. Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang Documentation/driver-api/i2c.rst | 2 +- drivers/i2c/Makefile | 4 +- drivers/i2c/busses/i2c-designware-core.c | 2 +- drivers/i2c/i2c-core-base.c | 3831 ++++++++++++++++++++++++++++++ drivers/i2c/i2c-core.c | 3831 ------------------------------ 5 files changed, 3836 insertions(+), 3834 deletions(-) commit 44fc41f92694241917a1590eb03081a68a38f480 Author: Arnd Bergmann Date: Wed May 24 17:58:34 2017 +0200 ARM: s3c64xx: Do not select ARM_AMBA from S3C64XX_PL080 While trying a fix a build warning unrelated to s3c64xx, I ran into a circular dependency: drivers/i2c/Kconfig:7: symbol I2C is selected by FB_DDC drivers/video/fbdev/Kconfig:63: symbol FB_DDC is selected by FB_CYBER2000_DDC drivers/video/fbdev/Kconfig:381: symbol FB_CYBER2000_DDC depends on FB_CYBER2000 drivers/video/fbdev/Kconfig:369: symbol FB_CYBER2000 depends on FB drivers/video/fbdev/Kconfig:5: symbol FB is selected by DRM_KMS_FB_HELPER drivers/gpu/drm/Kconfig:72: symbol DRM_KMS_FB_HELPER is selected by DRM_KMS_CMA_HELPER drivers/gpu/drm/Kconfig:137: symbol DRM_KMS_CMA_HELPER is selected by DRM_PL111 drivers/gpu/drm/pl111/Kconfig:1: symbol DRM_PL111 depends on ARM_AMBA drivers/amba/Kconfig:1: symbol ARM_AMBA is selected by S3C64XX_PL080 arch/arm/mach-s3c64xx/Kconfig:42: symbol S3C64XX_PL080 default value contains DMADEVICES drivers/dma/Kconfig:5: symbol DMADEVICES is selected by SND_SOC_SH4_SIU sound/soc/sh/Kconfig:29: symbol SND_SOC_SH4_SIU is selected by SND_SIU_MIGOR sound/soc/sh/Kconfig:59: symbol SND_SIU_MIGOR depends on I2C The I2C and FB dependencies are hard to untangle, but I notice that S3C64XX_PL080 selecting ARM_AMBA is one piece of the puzzle that can easily be avoided, as ARCH_S3C64XX already select ARM_AMBA. Removing the redundant 'select' now can help us in the future if we run into a variation of the same dependency. Signed-off-by: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c64xx/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 75f0e32b84be1ae0a5d6f66688adf1e85a4f20e5 Author: Rex Zhu Date: Sat May 27 18:18:39 2017 +0800 drm/amd/powerplay: code clean up in vega10_hwmgr.c Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 44 +++++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) commit 93480f897e3ccc1874d26bf7426d824dca832766 Author: Rex Zhu Date: Sat May 27 18:08:13 2017 +0800 Revert "drm/amd/powerplay: disable engine spread spectrum feature on Vega10." This reverts commit f8fdaa0e7b81698ba2ad8c2d20c7f9a44c75e0c6. firmware add support for this feature, so still ctrl by vbios. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit df057e02603b758c5b81e45cf4cdc5c96713eabf Author: Rex Zhu Date: Sat May 27 18:05:35 2017 +0800 drm/amd/powerplay: enable deep sleep by default for vega10 Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 66 ++++++++++++++++++++-- 1 file changed, 61 insertions(+), 5 deletions(-) commit 4022e4f25b89cc64e4d07caa4d19daa5c6dc447b Author: Rex Zhu Date: Sat May 27 17:54:08 2017 +0800 drm/amd/powerplay: enable ulv feature by default for vega10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 33 ++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) commit 301654a4f6c4a0cfcee14a4b2737165ecbd51ce8 Author: Christian König Date: Tue May 16 14:30:27 2017 +0200 drm/amdgpu: stop joining VM PTE updates This isn't beneficial any more since VRAM allocations are now split so that they fits into a single page table. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 61 ++++------------------------------ 1 file changed, 7 insertions(+), 54 deletions(-) commit 53e2e91ddad79f9d42bab5a69ef293a1f1f5d6d7 Author: Christian König Date: Mon May 15 15:19:10 2017 +0200 drm/amdgpu: cache the complete pde Makes it easier to update the PDE with huge pages. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit bb37b67d5729926ef0bf3dafdb5521b932aeb809 Author: Alex Xie Date: Tue May 30 23:50:10 2017 -0400 drm/amdgpu: Remove two ! operations in an if condition Make the code easier to understand. Signed-off-by: Alex Xie Reviewed-by: Michel Dänzer Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dd684d313e280c3bad2ebb7b33e7688ab5409bc9 Author: Alex Xie Date: Tue May 30 17:10:16 2017 -0400 drm/amdgpu: Optimize a function called by every IB sheduling Move several if statements and a loop statment from run time to initialization time. Signed-off-by: Alex Xie Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 33 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 28 +-------------------------- 3 files changed, 40 insertions(+), 27 deletions(-) commit 1410f64651e35411b4bb7a10f32eb6225925110a Author: Leo Liu Date: Mon May 29 13:13:59 2017 -0400 drm/amdgpu: Program ring for vce instance 1 at its register space We need program ring buffer on instance 1 register space domain, when only if instance 1 available, with two instances or instance 0, and we need only program instance 0 regsiter space domain for ring. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 95 +++++++++++++++++++++++++---------- 1 file changed, 68 insertions(+), 27 deletions(-) commit cc28c4ed7e735fc09043054b22370202583f69c3 Author: Harish Kasiviswanathan Date: Thu May 11 22:39:31 2017 -0400 drm/amdgpu: Return EINVAL if no PT BO This change is also useful for the upcoming changes where page tables can be updated by CPU. Signed-off-by: Harish Kasiviswanathan Reviewed-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 48 +++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 18 deletions(-) commit 92456b933cd257845587697a0875878849cef973 Author: Christian König Date: Fri May 12 16:09:26 2017 +0200 drm/amdgpu: add some extra VM error handling If updating the PDs fails we now invalidate all entries to try again later. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit b116632557a565dfdc2b7e5f8d67661a3ac3f835 Author: Christian König Date: Fri May 12 15:39:39 2017 +0200 drm/amdgpu: cleanup adjust_mc_addr handling v4 Rename adjust_mc_addr to get_vm_pde and check the address bits in one place. v2: handle vcn as well, keep setting the valid bit manually, add a BUG_ON() for GMC v6, v7 and v8 as well. v3: handle vcn_v1_0_enc_ring_emit_vm_flush as well. v4: fix the BUG_ON mask for GFX6-8 Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 26 +++++++++----------------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 ++---- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 10 ++++++---- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 ++---- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 12 ++++-------- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 6 ++---- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 12 ++++-------- 11 files changed, 55 insertions(+), 53 deletions(-) commit e8835e0e43ecf0eba2e2810bee04ff39dabb8996 Author: Hawking Zhang Date: Fri May 26 14:40:36 2017 +0800 drm/amdgpu: enable lbpw on raven Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+) commit ba7bb6658e638d2235ce5abf8a24a08c7a1eff60 Author: Hawking Zhang Date: Fri May 26 14:26:51 2017 +0800 drm/amdgpu: init lbpw on raven Load Balancing Per Watt (LBPW) allows dynamically disable CUs when they are idle Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 1d30b9906fd1bb854fc9653ec2520f232103a27f Author: Hawking Zhang Date: Thu May 25 15:23:49 2017 +0800 drm/amdgpu: update sdma 4.1 raven specific golden settings Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b6ba9eaf4dab6ea3d681f636ad7fab0586e6c78 Author: Hawking Zhang Date: Thu May 25 14:58:14 2017 +0800 drm/amdgpu: update GC 9.1 raven specific golden settings Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 01b5cc36e567bbb810fe420504e672fce8577511 Author: Hawking Zhang Date: Thu May 25 14:52:44 2017 +0800 drm/amdgpu: update GC 9.1 golden settings Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 1974a2a28b53e144e0203fc76c21299dcca1a658 Author: Hawking Zhang Date: Thu May 25 16:15:10 2017 +0800 drm/amdgpu: remove unnecessary debug message remnants from bring-up. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 1 - drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 19 ------------------- 2 files changed, 20 deletions(-) commit 88eadc314d375eb454e5b6dcaa1b767483842dee Author: Eric Huang Date: Thu May 25 15:59:59 2017 -0400 drm/amd/powerplay: fix set tools address for Vega10 Tools fb address was failed to send to smu when smu was not running. Changing sequence will fix it. Signed-off-by: Eric Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4edc8f7a389eb324bfd10d798d701a0ffdee16a3 Author: Eric Huang Date: Thu May 25 15:50:30 2017 -0400 drm/amd/powerplay: fix soft pptable size for Vega10 It is to fix bug of sysfs entry pp_table which had size 0 of output before. Signed-off-by: Eric Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c | 1 + 1 file changed, 1 insertion(+) commit 2dc80b00652f2a08f3f1a01e668e3c7ad716f55f Author: Shirish S Date: Thu May 25 10:05:25 2017 +0530 drm/amdgpu: optimize amdgpu driver load & resume time amdgpu_device_resume() & amdgpu_device_init() have a high time consuming call of amdgpu_late_init() which sets the clock_gating state of all IP blocks and is blocking. This patch defers only this setting of clock gating state operation to post resume of amdgpu driver but ideally before the UI comes up or in some cases post ui as well. With this change the resume time of amdgpu_device comes down from 1.299s to 0.199s which further helps in reducing the overall system resume time. V1: made the optimization applicable during driver load as well. TEST:(For ChromiumOS on STONEY only) * UI comes up * amdgpu_late_init() call gets called consistently and no errors reported. Signed-off-by: Shirish S Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 46 +++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 10 deletions(-) commit 8eb1b3c336b36421bd6673ec02222cb57e52372d Author: Michael Kelley Date: Tue May 30 11:36:56 2017 -0700 netvsc: Add #include's for csum_* function declarations Add direct #include statements for declarations of csum_tcpudp_magic() and csum_ipv6_magic(). While the needed #include's are picked up indirectly for the x86 architecture, they aren't on other architectures, resulting in compile errors. Signed-off-by: Michael Kelley Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 9a8d5e4a53dc0f14334d7b19b9107639fcfefd35 Author: Boris Brezillon Date: Tue May 23 16:36:27 2017 +0200 drm/vc4: Fix comment in vc4_drv.h Fixes a copy&paste error. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/1495550187-525-1-git-send-email-boris.brezillon@free-electrons.com drivers/gpu/drm/vc4/vc4_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66d6dd45eee2893f249a13406e112a35cc86c987 Author: Arnd Bergmann Date: Wed May 24 17:49:58 2017 +0200 drm/pl111: fix warnings without CONFIG_ARM_AMBA The driver is written in a way to enable compile-testing without CONFIG_ARM_AMBA, but it just causes needless warnings: drivers/gpu/drm/pl111/pl111_drv.c:149:26: error: 'pl111_drm_driver' defined but not used [-Werror=unused-variable] drivers/gpu/drm/pl111/pl111_drv.c:81:12: error: 'pl111_modeset_init' defined but not used [-Werror=unused-function] This unhides the probe/remove functions again and just leaves the driver object as unused when CONFIG_ARM_AMBA is disabled, with a __maybe_unused annotation to shut up the warning. Fixes: bed41005e617 ("drm/pl111: Initial drm/kms driver for pl111") Signed-off-by: Arnd Bergmann Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170524155020.1777369-1-arnd@arndb.de drivers/gpu/drm/pl111/pl111_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5e7e276a9c3fa4a33aee712f5e28776140895775 Author: Peter Ujfalusi Date: Wed May 24 11:43:41 2017 +0300 ARM: dts: am43xx-clocks: Add support for CLKOUT2 Add the needed clock nodes for the CLKOUT2 to be usable by boards. Signed-off-by: Peter Ujfalusi Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43xx-clocks.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit d3762358a739e7ef63873d6923938def99affa93 Author: Kees Cook Date: Mon May 22 16:49:52 2017 -0700 pstore: Fix format string to use %u for record id The format string for record->id (u64) was using %lld instead of %llu. Signed-off-by: Kees Cook fs/pstore/inode.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit c7f3c595f6ff7a1cfbf7ac782722bf5173e27775 Author: Kees Cook Date: Fri May 19 15:29:10 2017 -0700 pstore: Populate pstore record->time field The current time will be initially available in the record->time field for all pstore_read() and pstore_write() calls. Backends can either update the field during read(), or use the field during write() instead of fetching time themselves. Signed-off-by: Kees Cook drivers/firmware/efi/efi-pstore.c | 3 --- fs/pstore/platform.c | 6 ++++++ fs/pstore/ram.c | 16 +++++----------- include/linux/pstore.h | 5 ++++- 4 files changed, 15 insertions(+), 15 deletions(-) commit e581ca813a40a4ee53c862d8f6303f486c4b4c34 Author: Kees Cook Date: Fri May 19 15:10:31 2017 -0700 pstore: Create common record initializer In preparation for setting timestamps in the pstore core, create a common initializer routine, instead of using static initializers. Signed-off-by: Kees Cook fs/pstore/internal.h | 2 ++ fs/pstore/platform.c | 35 +++++++++++++++++++++-------------- fs/pstore/pmsg.c | 10 +++++----- 3 files changed, 28 insertions(+), 19 deletions(-) commit efb74e4bb1abeb5bd4c9296b2adfdc253561bc72 Author: Kees Cook Date: Fri May 19 13:21:07 2017 -0700 efi-pstore: Refactor erase routine Right now, every pass through the EFI variables during erase would build a copy of the old format variable name. Instead, try each name one time through the EFI variables list. Additionally bump up the buffer size to avoid truncation in pathological cases, and wipe the write name buffer. Signed-off-by: Kees Cook drivers/firmware/efi/efi-pstore.c | 84 ++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 46 deletions(-) commit 656de42e83379e5348e3f4236ff1d79353edfb28 Author: Kees Cook Date: Tue May 16 12:03:31 2017 -0700 pstore: Avoid potential infinite loop If a backend does not correctly iterate through its records, pstore will get stuck loading entries. Detect this with a large record count, and announce if we ever hit the limit. This will let future backend reading bugs less annoying to debug. Additionally adjust the error about pstore_mkfile() failing. Signed-off-by: Kees Cook fs/pstore/platform.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f6525b96dd9f68efe374e5aef864975e628de991 Author: Douglas Anderson Date: Tue May 30 15:50:38 2017 -0700 pstore: Fix leaked pstore_record in pstore_get_backend_records() When the "if (record->size <= 0)" test is true in pstore_get_backend_records() it's pretty clear that nobody holds a reference to the allocated pstore_record, yet we don't free it. Let's free it. Fixes: 2a2b0acf768c ("pstore: Allocate records on heap instead of stack") Signed-off-by: Douglas Anderson Signed-off-by: Kees Cook Cc: stable@vger.kernel.org fs/pstore/platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4a16d1cb245c56e72fd40a28f3cdb394cde4b341 Author: Ankit Kumar Date: Tue May 23 11:16:52 2017 +0530 pstore: Don't warn if data is uncompressed and type is not PSTORE_TYPE_DMESG commit 9abdcccc3d5f ("pstore: Extract common arguments into structure") moved record decompression to function. decompress_record() gets called without checking type and compressed flag. Warning will be reported if data is uncompressed. Pstore type PSTORE_TYPE_PPC_OPAL, PSTORE_TYPE_PPC_COMMON doesn't contain compressed data and warning get printed part of dmesg. Partial dmesg log: [ 35.848914] pstore: ignored compressed record type 6 [ 35.848927] pstore: ignored compressed record type 8 Above warning should not get printed as it is known that data won't be compressed for above type and it is valid condition. This patch returns if data is not compressed and print warning only if data is compressed and type is not PSTORE_TYPE_DMESG. Reported-by: Anton Blanchard Signed-off-by: Ankit Kumar Reviewed-by: Mahesh Salgaonkar Signed-off-by: Kees Cook Fixes: 9abdcccc3d5f ("pstore: Extract common arguments into structure") Cc: stable@vger.kernel.org fs/pstore/platform.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8c6c918da16f55fd4a5df53aa072ba3238f12fec Author: Vlad Yasevich Date: Tue May 30 10:07:02 2017 -0400 rtnetlink: use the new rtnl_get_event() interface Small clean-up to rtmsg_ifinfo() to use the rtnl_get_event() interface instead of using 'internal' values directly. Signed-off-by: Vladislav Yasevich Acked-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9eabf40d91b4fe954efe380d88590d933baa06d Author: Uwe Kleine-König Date: Thu May 25 22:07:13 2017 +0200 memory: omap-gpmc: add error message if bank-width property is absent Instead of failing silently log a hint for the dt author about the reason of the failure. Signed-off-by: Uwe Kleine-König Acked-by: Roger Quadros Signed-off-by: Tony Lindgren drivers/memory/omap-gpmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 95c278b24301fa56704830b2468d063394d0cb49 Author: Uwe Kleine-König Date: Wed May 17 20:38:10 2017 +0200 memory: omap-gpmc: make dts snippet include semicolon In the device tree each property must be terminated with a semicolon, so include them in the output for easier cut-n-paste. Signed-off-by: Uwe Kleine-König Acked-by: Roger Quadros Signed-off-by: Tony Lindgren drivers/memory/omap-gpmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7bc57950bd41d40685ca45a4079ce74d5d41250b Author: Jesper Dangaard Brouer Date: Tue May 30 14:37:51 2017 +0200 samples/bpf: bpf_load.c order of prog_fd[] should correspond with ELF order An eBPF ELF file generated with LLVM can contain several program section, which can be used for bpf tail calls. The bpf prog file descriptors are accessible via array prog_fd[]. At-least XDP samples assume ordering, and uses prog_fd[0] is the main XDP program to attach. The actual order of array prog_fd[] depend on whether or not a bpf program section is referencing any maps or not. Not using a map result in being loaded/processed after all other prog section. Thus, this can lead to some very strange and hard to debug situation, as the user can only see a FD and cannot correlated that with the ELF section name. The fix is rather simple, and even removes duplicate memcmp code. Simply load program sections as the last step, instead of load_and_attach while processing the relocation section. When working with tail calls, it become even more essential that the order of prog_fd[] is consistant, like the current dependency of the map_fd[] order. Signed-off-by: Jesper Dangaard Brouer Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 9831724a08f06f9560fcc3f1132cbd290e5f9149 Author: Arnd Bergmann Date: Tue May 30 11:26:14 2017 +0200 net/mlxfw: select CONFIG_XZ_DEC The new mlxfw code fails to build without the xz library: drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.o: In function `mlxfw_mfa2_xz_dec_run': :(.text.mlxfw_mfa2_xz_dec_run+0x8): undefined reference to `xz_dec_run' drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.o: In function `mlxfw_mfa2_file_component_get': :(.text.mlxfw_mfa2_file_component_get+0x218): undefined reference to `xz_dec_init' :(.text.mlxfw_mfa2_file_component_get+0x2c0): undefined reference to `xz_dec_end' This adds a Kconfig 'select' statement for it, which is also what the other user of that library has. Fixes: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process") Signed-off-by: Arnd Bergmann Acked-by: Yotam Gigi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxfw/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 23c9ee4934e7a79b49151d0f05c24117d69c73fe Author: Vivien Didelot Date: Fri May 26 18:12:51 2017 -0400 net: dsa: remove dev arg of dsa_register_switch The current dsa_register_switch function takes a useless struct device pointer argument, which always equals ds->dev. Drivers either call it with ds->dev, or with the same device pointer passed to dsa_switch_alloc, which ends up being assigned to ds->dev. This patch removes the second argument of the dsa_register_switch and _dsa_register_switch functions. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/dsa_loop.c | 2 +- drivers/net/dsa/lan9303-core.c | 2 +- drivers/net/dsa/mt7530.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/qca8k.c | 2 +- include/net/dsa.h | 2 +- net/dsa/dsa2.c | 10 +++++----- 8 files changed, 12 insertions(+), 12 deletions(-) commit 9525cc53aa8a5b90a1cd3c3cc7f2a771baa4a544 Merge: ffe4064 b15a7c0 Author: David S. Miller Date: Wed May 31 12:35:01 2017 -0400 Merge branch 'dsa-mv88e6xxx-PHY-nitpicks' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: PHY nitpicks This patchset isolates more PPU code into phy.c and makes distinction between PHY Registers read and write implementations vs. generic PHY routines. ==================== Signed-off-by: David S. Miller commit b15a7c039d30db0b38dfbced900f65b65c06bff9 Author: Vivien Didelot Date: Fri May 26 18:03:07 2017 -0400 net: dsa: mv88e6xxx: rename PHY PPU functions Respect the implicit naming convention used in all register sets specific files, by renaming the mv88e6xxx_ppu_* functions with the mv88e6xxx_phy_* prefix. This is simply a s/xxx_ppu/xxx_phy_ppu/ substitution. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/phy.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 7e20cfb50496c0549d11eab521feb5bc565c63a6 Author: Vivien Didelot Date: Fri May 26 18:03:06 2017 -0400 net: dsa: mv88e6xxx: rename PHY PPU accessors Make it clear that mv88e6xxx_phy_ppu_{read,write} are an implementation of the .phy_{read,write} operations, by renaming them with the mv88e6185 prefix, since 88E6185 it is the reference switch model supported in an upstream board (ZII Dev Rev B), which makes use of them. Distinguish the signatures of implementation specific and generic PHY functions in the phy.h header. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 16 ++++++++-------- drivers/net/dsa/mv88e6xxx/phy.c | 4 ++-- drivers/net/dsa/mv88e6xxx/phy.h | 11 +++++++---- 3 files changed, 17 insertions(+), 14 deletions(-) commit 1b17aedffb079fa5c05c2118b7f23a1e72e4dd2f Author: Vivien Didelot Date: Fri May 26 18:03:05 2017 -0400 net: dsa: mv88e6xxx: provide a PHY setup helper Similarly to the VTU, PVT and ATU setup, provide a mv88e6xxx_phy_setup helper which wraps mv88e6xxx_ppu_enable, so that no more PPU-related functions are exposed outside of phy.c. Thus make mv88e6xxx_ppu_enable static. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 11 ++++------- drivers/net/dsa/mv88e6xxx/phy.c | 7 ++++++- drivers/net/dsa/mv88e6xxx/phy.h | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) commit 822446d4ff2b1924f8fe16ebb60675f8c3c7b34f Author: Xinming Hu Date: Tue May 23 07:12:34 2017 +0000 mwifiex: check next packet length for usb tx aggregation The next packet length will be used by interface driver, to check if the next packet still could be aggregated. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 12 ++++++------ drivers/net/wireless/marvell/mwifiex/txrx.c | 4 ++-- drivers/net/wireless/marvell/mwifiex/wmm.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) commit a2ca85ad721de50b90d50f3a11b67c4776a1236d Author: Xinming Hu Date: Tue May 23 07:12:33 2017 +0000 mwifiex: usb: add timer to flush aggregation packets Aggregation will wait for next packet until limit aggr size/number reach. Packet might be drop and also packet dequeue will be stop in some cases. This patch add timer to flush packets in aggregation list to avoid long time waiting. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/usb.c | 258 ++++++++++++++++++++--------- drivers/net/wireless/marvell/mwifiex/usb.h | 14 ++ 2 files changed, 193 insertions(+), 79 deletions(-) commit c59942938c6ab37f69658cafec6869eeb77e2e79 Author: Xinming Hu Date: Tue May 23 07:12:32 2017 +0000 mwifiex: usb: transmit aggregation packets Instead of using 4KB packet buffer for data transfer, new chipset have more device memory. This patch try to aggregation packets in an 16KB buffer. In this way, totally usb transaction cost will be reduced. Thoughput test on usb 2.0 show both TCP TX and UPD TX promote ~40M, from ~240M to ~280M. This feature is default disabled, and can be enabled by module parameter, like: insmod mwifiex.ko aggr_ctrl=1 Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 10 + drivers/net/wireless/marvell/mwifiex/main.c | 4 + drivers/net/wireless/marvell/mwifiex/main.h | 15 + drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 18 ++ drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 24 ++ drivers/net/wireless/marvell/mwifiex/usb.c | 355 ++++++++++++++++++--- drivers/net/wireless/marvell/mwifiex/usb.h | 9 + 7 files changed, 382 insertions(+), 53 deletions(-) commit 42d1abb50ffc51c65e9cec735c8a9711296a05f7 Author: Xinming Hu Date: Tue May 23 07:12:31 2017 +0000 mwifiex: usb: kill urb before free its memory we have observed host system hang when device firmware crash, stack trace show it was an use-after-free case: previous submitted urb will be holding in usbcore, and given back to device driver when device disconnected, while the urb have been freed in usb device disconnect handler. This patch kill the holding urb before free its memory. Signed-off-by: Xinming Hu Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/usb.c | 1 + 1 file changed, 1 insertion(+) commit f4c5d5991590c4f640d5de245047444bf11f69d2 Author: Xinming Hu Date: Tue May 23 07:12:30 2017 +0000 mwifiex: use variable interface header length Usb tx aggregation feature will utilize 4-bytes bus interface header, otherwise it will be set to zero in default case. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 2 +- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 8 ++++---- drivers/net/wireless/marvell/mwifiex/init.c | 5 +++++ drivers/net/wireless/marvell/mwifiex/main.h | 1 + drivers/net/wireless/marvell/mwifiex/pcie.c | 19 ++++++++++--------- drivers/net/wireless/marvell/mwifiex/sdio.c | 12 ++++++------ drivers/net/wireless/marvell/mwifiex/sta_tx.c | 12 ++++++------ drivers/net/wireless/marvell/mwifiex/txrx.c | 11 +++-------- drivers/net/wireless/marvell/mwifiex/uap_txrx.c | 5 ++--- 9 files changed, 38 insertions(+), 37 deletions(-) commit adfdf85d795f4d4f487b61ee0b169d64c6e19081 Author: Imre Deak Date: Tue May 2 15:04:09 2017 +0300 drm/i915: Prevent the system suspend complete optimization Since commit bac2a909a096c9110525c18cbb8ce73c660d5f71 Author: Rafael J. Wysocki Date: Wed Jan 21 02:17:42 2015 +0100 PCI / PM: Avoid resuming PCI devices during system suspend PCI devices will default to allowing the system suspend complete optimization where devices are not woken up during system suspend if they were already runtime suspended. This however breaks the i915/HDA drivers for two reasons: - The i915 driver has system suspend specific steps that it needs to run, that bring the device to a different state than its runtime suspended state. - The HDA driver's suspend handler requires power that it will request from the i915 driver's power domain handler. This in turn requires the i915 driver to runtime resume itself, but this won't be possible if the suspend complete optimization is in effect: in this case the i915 runtime PM is disabled and trying to get an RPM reference returns -EACCESS. Solve this by requiring the PCI/PM core to resume the device during system suspend which in effect disables the suspend complete optimization. Regardless of the above commit the optimization stayed disabled for DRM devices until commit d14d2a8453d650bea32a1c5271af1458cd283a0f Author: Lukas Wunner Date: Wed Jun 8 12:49:29 2016 +0200 drm: Remove dev_pm_ops from drm_class so this patch is in practice a fix for this commit. Another reason for the bug staying hidden for so long is that the optimization for a device is disabled if it's disabled for any of its children devices. i915 may have a backlight device as its child which doesn't support runtime PM and so doesn't allow the optimization either. So if this backlight device got registered the bug stayed hidden. Credits to Marta, Tomi and David who enabled pstore logging, that caught one instance of this issue across a suspend/ resume-to-ram and Ville who rememberd that the optimization was enabled for some devices at one point. The first WARN triggered by the problem: [ 6250.746445] WARNING: CPU: 2 PID: 17384 at drivers/gpu/drm/i915/intel_runtime_pm.c:2846 intel_runtime_pm_get+0x6b/0xd0 [i915] [ 6250.746448] pm_runtime_get_sync() failed: -13 [ 6250.746451] Modules linked in: snd_hda_intel i915 vgem snd_hda_codec_hdmi x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec_realtek snd_hda_codec_generic ghash_clmulni_intel e1000e snd_hda_codec snd_hwdep snd_hda_core ptp mei_me pps_core snd_pcm lpc_ich mei prime_ numbers i2c_hid i2c_designware_platform i2c_designware_core [last unloaded: i915] [ 6250.746512] CPU: 2 PID: 17384 Comm: kworker/u8:0 Tainted: G U W 4.11.0-rc5-CI-CI_DRM_334+ #1 [ 6250.746515] Hardware name: /NUC5i5RYB, BIOS RYBDWi35.86A.0362.2017.0118.0940 01/18/2017 [ 6250.746521] Workqueue: events_unbound async_run_entry_fn [ 6250.746525] Call Trace: [ 6250.746530] dump_stack+0x67/0x92 [ 6250.746536] __warn+0xc6/0xe0 [ 6250.746542] ? pci_restore_standard_config+0x40/0x40 [ 6250.746546] warn_slowpath_fmt+0x46/0x50 [ 6250.746553] ? __pm_runtime_resume+0x56/0x80 [ 6250.746584] intel_runtime_pm_get+0x6b/0xd0 [i915] [ 6250.746610] intel_display_power_get+0x1b/0x40 [i915] [ 6250.746646] i915_audio_component_get_power+0x15/0x20 [i915] [ 6250.746654] snd_hdac_display_power+0xc8/0x110 [snd_hda_core] [ 6250.746661] azx_runtime_resume+0x218/0x280 [snd_hda_intel] [ 6250.746667] pci_pm_runtime_resume+0x76/0xa0 [ 6250.746672] __rpm_callback+0xb4/0x1f0 [ 6250.746677] ? pci_restore_standard_config+0x40/0x40 [ 6250.746682] rpm_callback+0x1f/0x80 [ 6250.746686] ? pci_restore_standard_config+0x40/0x40 [ 6250.746690] rpm_resume+0x4ba/0x740 [ 6250.746698] __pm_runtime_resume+0x49/0x80 [ 6250.746703] pci_pm_suspend+0x57/0x140 [ 6250.746709] dpm_run_callback+0x6f/0x330 [ 6250.746713] ? pci_pm_freeze+0xe0/0xe0 [ 6250.746718] __device_suspend+0xf9/0x370 [ 6250.746724] ? dpm_watchdog_set+0x60/0x60 [ 6250.746730] async_suspend+0x1a/0x90 [ 6250.746735] async_run_entry_fn+0x34/0x160 [ 6250.746741] process_one_work+0x1f2/0x6d0 [ 6250.746749] worker_thread+0x49/0x4a0 [ 6250.746755] kthread+0x107/0x140 [ 6250.746759] ? process_one_work+0x6d0/0x6d0 [ 6250.746763] ? kthread_create_on_node+0x40/0x40 [ 6250.746768] ret_from_fork+0x2e/0x40 [ 6250.746778] ---[ end trace 102a62fd2160f5e6 ]--- v2: - Use the new pci_dev->needs_resume flag, to avoid any overhead during the ->pm_prepare hook. (Rafael) v3: - Update commit message to reference the actual regressing commit. (Lukas) v4: - Rebase on v4 of patch 1/2. Fixes: d14d2a8453d6 ("drm: Remove dev_pm_ops from drm_class") References: https://bugs.freedesktop.org/show_bug.cgi?id=100378 References: https://bugs.freedesktop.org/show_bug.cgi?id=100770 Cc: Rafael J. Wysocki Cc: Marta Lofstedt Cc: David Weinehall Cc: Tomi Sarvela Cc: Ville Syrjälä Cc: Mika Kuoppala Cc: Chris Wilson Cc: Takashi Iwai Cc: Bjorn Helgaas Cc: Lukas Wunner Cc: linux-pci@vger.kernel.org Cc: # v4.10.x: 4d071c3 - PCI/PM: Add needs_resume flag Cc: # v4.10.x Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Reported-and-tested-by: Marta Lofstedt Link: http://patchwork.freedesktop.org/patch/msgid/1493726649-32094-2-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 91110a4b64fe0bdbac084b79dbd5f10c458327e9 Author: Ville Syrjälä Date: Thu May 18 22:38:36 2017 +0300 drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc() drm_atomic_set_mode_for_crtc() doesn't modify the passed mode, so let's make it const. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170518193837.393-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 2 +- include/drm/drm_atomic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 729b7f8dbdaff270c53052897ea06486221a49a2 Author: Jun Gao Date: Fri May 26 15:35:07 2017 +0800 arm: dts: Add Mediatek MT2701 i2c device node Add MT2701 i2c device node. Signed-off-by: Jun Gao Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701-evb.dts | 42 ++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/mt2701.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) commit c56ee52622cef6c8110b5e9eebf35513d3a93544 Author: Rick Chang Date: Wed Dec 14 16:04:49 2016 +0800 arm: dts: mt2701: Add node for Mediatek JPEG Decoder Signed-off-by: Rick Chang Signed-off-by: Minghsiu Tsai [mb: include mt2701-larb-port.h to fix build errors] Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d9c23ff80b9fdc1f2e8efeb5368adfd93493d7b4 Author: Emil Tantilov Date: Thu May 18 16:45:06 2017 -0700 ixgbe: fix incorrect status check Check for ret_val instead of !ret_val to allow the rest of the code to execute and configure the speed properly. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3ce5cb75f39378e3b77628352735632ccc98b489 Author: Emil Tantilov Date: Wed May 17 15:17:56 2017 -0700 ixgbe: add missing configuration for rate select 1 Add RS1 configuration to ixgbe_set_soft_rate_select_speed() Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 08ed48e182ef870517a84d2331c4c5da8f1c3b3a Author: Emil Tantilov Date: Wed May 17 15:17:51 2017 -0700 ixgbe: always call setup_mac_link for multispeed fiber Remove the logic which would previously skip the link configuration in the case where we are already at the requested speed in ixgbe_setup_mac_link_multispeed_fiber(). By exiting early we are skipping the link configuration and as such the driver may not always configure the PHY correctly for SFP+. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 410a494902777c11f95031d9ed757d7f8f09c5c6 Author: Emil Tantilov Date: Wed May 17 15:17:46 2017 -0700 ixgbe: add write flush when configuring CS4223/7 Make sure the writes are processed immediately. Without the flush it is possible for operations on one port to spill over the other as the resource is shared. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit cc1de78c2a3d936d733bc9bd3f6e0655d03c2fb7 Author: Emil Tantilov Date: Wed May 17 15:17:41 2017 -0700 ixgbe: correct CS4223/7 PHY identification Previous method was unreliable. Use a different register to differentiate between the SKUs. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 5 +++-- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) commit 28b2a4b5a38a839452d49bf4012432f2d2d75958 Author: Matthias Brugger Date: Mon May 22 11:40:18 2017 +0200 dt-bindings: mtk-sysirq: Correct bindings for supported SoCs All SoCs supported up to now rely on the fallback binding of mt6577. Fix the binding description to reflect this. Signed-off-by: Matthias Brugger Acked-by: Rob Herring .../interrupt-controller/mediatek,sysirq.txt | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 80666035c70bc8def691b4cb98fa39da3d6fdee1 Author: Tony Nguyen Date: Fri May 12 11:38:10 2017 -0700 ixgbevf: Resolve warnings for -Wimplicit-fallthrough Additions to gcc 7 now warn whenever a switch statement falls through implicitly. This patch adds explicit fall through comments to address the following warnings: drivers/net/ethernet/intel/ixgbevf/vf.c: In function ‘ixgbevf_get_reta_locked’: drivers/net/ethernet/intel/ixgbevf/vf.c:336:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->mac.type < ixgbe_mac_X550_vf) ^ drivers/net/ethernet/intel/ixgbevf/vf.c:338:2: note: here default: ^~~~~~~ drivers/net/ethernet/intel/ixgbevf/vf.c: In function ‘ixgbevf_get_rss_key_locked’: drivers/net/ethernet/intel/ixgbevf/vf.c:402:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->mac.type < ixgbe_mac_X550_vf) ^ drivers/net/ethernet/intel/ixgbevf/vf.c:404:2: note: here default: ^~~~~~~ Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/vf.c | 2 ++ 1 file changed, 2 insertions(+) commit 31f5d9b1e890d52c807093fac7ee7f00eb369897 Author: Tony Nguyen Date: Fri May 12 11:38:09 2017 -0700 ixgbevf: Resolve truncation warning for q_vector->name The following warning is now shown as a result of new checks added for gcc 7: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function ‘ixgbevf_open’: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1363:13: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size between 3 and 18 [-Wformat-truncation=] "%s-%s-%d", netdev->name, "TxRx", ri++); ^~ drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1363:6: note: directive argument in the range [0, 2147483647] "%s-%s-%d", netdev->name, "TxRx", ri++); ^~~~~~~~~~ drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1362:4: note: ‘snprintf’ output between 8 and 32 bytes into a destination of size 24 snprintf(q_vector->name, sizeof(q_vector->name) - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s-%s-%d", netdev->name, "TxRx", ri++); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Resolve this warning by making a couple of changes. - Don't reserve space for the null terminator. Since snprintf adds the null terminator automatically, there is no need for us to reserve a byte for it. - Change a couple variables that can never be negative from int to unsigned int. While we're making changes to the format string, move the constant strings into the format string instead of providing them as specifiers. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 93df9465c93e634c49f18271218076ab0b9aaf75 Author: Tony Nguyen Date: Wed May 31 04:43:47 2017 -0700 ixgbe: Resolve warnings for -Wimplicit-fallthrough This patch adds/changes fall through comments to address new warnings produced by gcc 7. Fixed formatting on a couple of comments in the function. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 9 ++++++--- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 ++++++-- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 7 +++---- 5 files changed, 18 insertions(+), 11 deletions(-) commit e61e4c8b905b995a5334acf5fb9c7bcaec7417da Author: Tony Nguyen Date: Fri May 12 11:38:07 2017 -0700 ixgbe: Resolve truncation warning for q_vector->name The following warning is now shown as a result of new checks added for gcc 7: drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function ‘ixgbe_open’: drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3118:13: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size between 3 and 18 [-Wformat-truncation=] "%s-%s-%d", netdev->name, "TxRx", ri++); ^~ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3118:6: note: directive argument in the range [0, 2147483647] "%s-%s-%d", netdev->name, "TxRx", ri++); ^~~~~~~~~~ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3117:4: note: ‘snprintf’ output between 8 and 32 bytes into a destination of size 24 snprintf(q_vector->name, sizeof(q_vector->name) - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s-%s-%d", netdev->name, "TxRx", ri++); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Resolve this warning by making a couple of changes. - Don't reserve space for the null terminator. Since snprintf adds the null terminator automatically, there is no need for us to reserve a byte for it. - Change a couple variables that can never be negative from int to unsigned int. While we're making changes to the format string, move the constant strings into the format string instead of providing them as specifiers. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6af3d0faede8b8c2ccd93f31d9f146ffd0b463d6 Author: Tony Nguyen Date: Fri Apr 28 12:42:03 2017 -0700 ixgbe: Add error checking to setting VF MAC Currently, when setting a VF MAC address there are no error checks to ensure that the MAC filter was successfully added. This patch adds additional error checks, reporting, and propagation of errors. It also will not set the MAC address unless adding the MAC filter was successful. With these changes, setting the mac address to zeros can no longer call ixgbe_set_vf_mac() as adding a zero MAC address filter is not valid. Instead directly delete the filter and, if successful, clear the MAC address. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 54 +++++++++++++++++++------- 1 file changed, 41 insertions(+), 13 deletions(-) commit 22cb4fff3d9756229f1e67987f4fabb57a8c68ca Author: Mark Rustad Date: Tue Apr 25 13:55:25 2017 -0700 ixgbe: Correct thermal sensor event check The thermal sensor event logic is messed up, because it can execute the code when there is no thermal event. The current logic is that it will exit when !capable && !event whereas it really should exit when !capable || !event. For one thing, it means that the service task is doing too much work. It probably has some other symptoms as well. So, correct the logic, simplifying to only execute when there is a thermal event. The capable check is redundant. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e6b41c888154b5c529ba4d65b6fc55f2a7ae4d75 Author: Emil Tantilov Date: Tue Apr 25 11:31:06 2017 -0700 ixgbe: enable L3/L4 filtering for Tx switched packets This will ensure that VF-to-VF traffic on the same PF is filtered to allow RSS operation. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 5e999fb43ebb5a64554890cda57edc1edd68a2ab Author: Paul Greenwalt Date: Fri Apr 21 05:37:13 2017 -0400 ixgbe: Remove MAC X550EM_X 1Gbase-t led_[on|off] support Since FW configures the PHY and MAC X550EM_X has no PHY access, led_[on|off] is not supported with the 1Gbase-t design. Removed MAC X550EM_X 1Gbase-t led_[on|off] support by setting function pointers to NULL and added NULL pointer checks. Also set init_led_link_act to NULL and added NULL pointer check. Signed-off-by: Paul Greenwalt Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 3 ++- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 3 +++ drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 25 +++++++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) commit b09457e7a1d6e8d311b5342475d267087c4970a6 Author: Liwei Song Date: Sun Dec 4 22:40:44 2016 -0500 ixgbe: initialize u64_stats_sync structures early at ixgbe_probe Fix the following CallTrace: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 71 PID: 1 Comm: swapper/0 Not tainted 4.8.8-WR9.0.0.1_standard #11 Hardware name: Intel Corporation S2600WTT/S2600WTT, BIOS GRNDSDP1.86B.0036.R05.1407140519 07/14/2014 00200086 00200086 eb5e1ab8 c144dd70 00000000 00000000 eb5e1af8 c10af89a c1d23de4 eb5e1af8 00000009 eb5d8600 eb5d8638 eb5e1af8 c10b14d8 00000009 0000000a c1d32911 00000000 00000000 e44c826c eb5d8000 eb5e1b74 c10b214e Call Trace: [] dump_stack+0x5f/0x8f [] register_lock_class+0x25a/0x4c0 [] ? check_irq_usage+0x88/0xc0 [] __lock_acquire+0x5e/0x17a0 [] ? _raw_spin_unlock_irqrestore+0x3b/0x70 [] ? rcu_read_lock_sched_held+0x8a/0x90 [] lock_acquire+0x9f/0x1f0 [] ? dev_get_stats+0x5f/0x110 [] ixgbe_get_stats64+0x113/0x320 [] ? dev_get_stats+0x5f/0x110 [] dev_get_stats+0x5f/0x110 [] rtnl_fill_stats+0x40/0x105 [] rtnl_fill_ifinfo+0x4c5/0xd20 [] ? __kmalloc_node_track_caller+0x1a5/0x410 [] ? __kmalloc_reserve.isra.42+0x27/0x80 [] ? __alloc_skb+0x6f/0x270 [] rtmsg_ifinfo_build_skb+0x71/0xd0 [] rtmsg_ifinfo.part.23+0x1a/0x50 [] ? call_netdevice_notifiers_info+0x2d/0x60 [] rtmsg_ifinfo+0x2b/0x40 [] register_netdevice+0x3d7/0x4d0 [] register_netdev+0x17/0x30 [] ixgbe_probe+0x118d/0x1610 [] local_pci_probe+0x32/0x80 [] ? pci_match_device+0xd2/0x100 [] pci_device_probe+0xc0/0x110 [] driver_probe_device+0x1c5/0x280 [] ? pci_match_device+0xd2/0x100 [] __driver_attach+0x89/0x90 [] ? driver_probe_device+0x280/0x280 [] bus_for_each_dev+0x4f/0x80 [] driver_attach+0x1e/0x20 [] ? driver_probe_device+0x280/0x280 [] bus_add_driver+0x1a7/0x220 [] driver_register+0x59/0xe0 [] ? igb_init_module+0x49/0x49 [] __pci_register_driver+0x4a/0x50 [] ixgbe_init_module+0xa5/0xc4 [] do_one_initcall+0x35/0x150 [] ? parameq+0x18/0x70 [] ? repair_env_string+0x12/0x51 [] ? parse_args+0x260/0x3b0 [] ? __usermodehelper_set_disable_depth+0x43/0x50 [] kernel_init_freeable+0x19b/0x267 [] ? set_debug_rodata+0xf/0xf [] ? trace_hardirqs_on+0xb/0x10 [] ? _raw_spin_unlock_irq+0x32/0x50 [] ? finish_task_switch+0xab/0x1f0 [] ? finish_task_switch+0x69/0x1f0 [] kernel_init+0x10/0x110 [] ? schedule_tail+0x25/0x80 [] ret_from_kernel_thread+0xe/0x24 [] ? rest_init+0x130/0x130 This CallTrace occurred on 32-bit kernel with CONFIG_PROVE_LOCKING enabled. This happens at ixgbe driver probe hardware stage, when comes to ixgbe_get_stats64, the seqcount/seqlock still not initialize, although this was initialize in TX/RX resources setup routin, but it was too late, then lockdep give this Warning. To fix this, move the u64_stats_init function to driver probe stage, which before we get the status of seqcount and after the RX/TX ring was finished init. Signed-off-by: Liwei Song Tested-by: Krishneil Singh drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2a20525b26475528dc5a664478db2fea23c57d42 Author: Scott Peterson Date: Fri Nov 18 11:25:42 2016 -0800 ixgbe/ixgbevf: Enables TSO for MPLS encapsulated packets This patch advertises TSO & GSO features in netdev->mpls_features. In ixgbe(vf)_tso() where we set up segmentation offload, the IP header will be the inner network header when eth_p_mpls() indicates the Ethernet protocol is MPLS (UC or MC). Suggested-by: Alexander Duyck Signed-off-by: Scott Peterson Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 ++++++++++-- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) commit a21512c1698d8106bcece0d24ff590dc92682678 Author: Mauro Carvalho Chehab Date: Thu May 18 22:25:56 2017 -0300 rtc.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - adjust identation of the titles; - mark a table as such; - don't capitalize chapter names. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alexandre Belloni Documentation/rtc.txt | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit 79e68821582d08e369094e7ea45dbfb8fdb37d7e Author: Adrian Chadd Date: Tue May 23 18:49:35 2017 +0300 ath10k: go back to using dma_alloc_coherent() for firmware scratch memory This reverts commit b057886524be ("ath10k: do not use coherent memory for allocated device memory chunks") in 2015 which converted this allocation from dma_map_coherent() to kzalloc() / dma_map_single(). The current problem manifests when using later model NICs with larger (>700KiB) scratch spaces in memory. Although the kzalloc call succeeds, the software IOMMU TLB code (via dma_map_single()) panics because it can't find 700KiB of linear physmem bounce buffers for DMA. Now, this is a bit of a silly failure mode for the dma map API, but it's what we currently have to play with. In these cases, doing kzalloc() works fine, but the dma_map_single() call fails. After chatting with Linus briefly about this, it indeed should be using dma_alloc_coherent() for doing larger device memory allocation that requires some kind of physical address mapping. You're not supposed to be using kzalloc and dma_map_* calls for large memory regions, and I'm guessing not for long-held mappings either. Typically dma mappings should be temporary for DMA, not long held like these. Now, since hopefully the major annoying underlying problem has also been addressed (ie, ath10k is no longer tears down all of these allocations and reallocates them every time the vdevs are brought down) fragmentation should stop being such a touchy issue. If it is though, using dma_alloc_coherent() use gets us access to the CMB APIs too relatively easily and ideally we would be allocating memory early in boot for exactly these reasons. Signed-off-by: Adrian Chadd Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) commit da96aea0ed177105cb13ee83b328f6c61e061d3f Author: Vaibhav Jain Date: Fri May 19 22:18:55 2017 +0530 rtc: interface: Validate alarm-time before handling rollover In function __rtc_read_alarm() its possible for an alarm time-stamp to be invalid even after replacing missing components with current time-stamp. The condition 'alarm->time.tm_year < 70' will trigger this case and will cause the call to 'rtc_tm_to_time64(&alarm->time)' return a negative value for variable t_alm. While handling alarm rollover this negative t_alm (assumed to seconds offset from '1970-01-01 00:00:00') is converted back to rtc_time via rtc_time64_to_tm() which results in this error log with seemingly garbage values: "rtc rtc0: invalid alarm value: -2-1--1041528741 2005511117:71582844:32" This error was generated when the rtc driver (rtc-opal in this case) returned an alarm time-stamp of '00-00-00 00:00:00' to indicate that the alarm is disabled. Though I have submitted a separate fix for the rtc-opal driver, this issue may potentially impact other existing/future rtc drivers. To fix this issue the patch validates the alarm time-stamp just after filling up the missing datetime components and if rtc_valid_tm() still reports it to be invalid then bails out of the function without handling the rollover. Reported-by: Steve Best Signed-off-by: Vaibhav Jain Signed-off-by: Alexandre Belloni drivers/rtc/interface.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 6dc1cf6f932bb0ea4d8f5e913a0a401ecacd2f03 Author: Vaibhav Jain Date: Fri May 19 15:35:09 2017 +0530 rtc: opal: Handle disabled TPO in opal_get_tpo_time() On PowerNV platform when Timed-Power-On(TPO) is disabled, read of stored TPO yields value with all date components set to '0' inside opal_get_tpo_time(). The function opal_to_tm() then converts it to an offset from year 1900 yielding alarm-time == "1900-00-01 00:00:00". This causes problems with __rtc_read_alarm() that expecting an offset from "1970-00-01 00:00:00" and returned alarm-time results in a -ve value for time64_t. Which ultimately results in this error reported in kernel logs with a seemingly garbage value: "rtc rtc0: invalid alarm value: -2-1--1041528741 2005511117:71582844:32" We fix this by explicitly handling the case of all alarm date-time components being '0' inside opal_get_tpo_time() and returning -ENOENT in such a case. This signals generic rtc that no alarm is set and it bails out from the alarm initialization flow without reporting the above error. Signed-off-by: Vaibhav Jain Reported-by: Steve Best Signed-off-by: Alexandre Belloni drivers/rtc/rtc-opal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 251ebd0334835b7e8613067fd063d38c1eaddebd Author: Hans de Goede Date: Fri May 26 12:53:48 2017 +0200 platform/x86: intel_cht_int33fe: Set supplied-from property on max17047 dev Devices with the intel_cht_int33fe ACPI device use a max17047 fuel-gauge combined with a bq24272i charger, in order for the fuel-gauge driver to correctly display charging / discharging status it needs to know which charger is supplying the battery. This commit sets the supplied-from device property to the name of the bq24272i charger for this. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_cht_int33fe.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0a4ecc2c5e0479f269e6ca5f9588b23d649aa948 Author: Christophe Jaillet Date: Fri May 5 21:29:13 2017 +0200 i40e: Check for memory allocation failure If 'kzalloc' fails, a NULL pointer will be dereferenced. Return -ENOMEM instead. Signed-off-by: Christophe JAILLET Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 2 ++ 1 file changed, 2 insertions(+) commit 0bc0706b46cd345537f9bd3cdf5d84c33f5484e4 Author: Jacob Keller Date: Wed May 3 10:29:02 2017 -0700 i40e: check for Tx timestamp timeouts during watchdog The i40e driver has logic to handle only one Tx timestamp at a time, using a state bit lock to avoid multiple requests at once. It may be possible, if incredibly unlikely, that a Tx timestamp event is requested but never completes. Since we use an interrupt scheme to determine when the Tx timestamp occurred we would never clear the state bit in this case. Add an i40e_ptp_tx_hang() function similar to the already existing i40e_ptp_rx_hang() function. This function runs in the watchdog routine and makes sure we eventually recover from this case instead of permanently disabling Tx timestamps. Note: there is no currently known way to cause this without hacking the driver code to force it. Signed-off-by: Jacob Keller Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 ++ drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + drivers/net/ethernet/intel/i40e/i40e_ptp.c | 30 +++++++++++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 + 4 files changed, 34 insertions(+) commit 61189556692e8e58c97e764d6b3f24db5cd243de Author: Jacob Keller Date: Wed May 3 10:29:01 2017 -0700 i40e: use pf data structure directly in i40e_ptp_rx_hang There's no reason to pass a *vsi pointer if we already have the *pf pointer in the only location where we call this function. Lets update the signature and directly pass the *pf data structure pointer. Signed-off-by: Jacob Keller Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 2955faca0403a4f6029d589f60ff44be09f24859 Author: Jacob Keller Date: Wed May 3 10:28:58 2017 -0700 i40e: add statistic indicating number of skipped Tx timestamps The i40e driver can only handle one Tx timestamp request at a time. This means it is possible for an application timestamp request to be ignored. There is no easy way for an administrator to determine if this occurred. Add a new statistic which tracks this, tx_hwtstamp_skipped. Signed-off-by: Jacob Keller Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 + 3 files changed, 3 insertions(+) commit 69077577af5054da8c8adfb6c1ebb565c2f1f158 Author: Jacob Keller Date: Wed May 3 10:28:54 2017 -0700 i40e: avoid permanent lock of *_PTP_TX_IN_PROGRESS The i40e driver uses a bit lock to indicate when a Tx timestamp is in progress to avoid attempting to timestamp multiple packets at once. This is required because hardware only has registers to handle one request at a time. There is a corner case where we failed to cleanup the bit lock after a failed transmit. This can potentially result in a state bit being locked forever. Add some cleanup code to i40e_xmit_frame_ring to check and make sure we cleanup incase of these failures. We also modify i40e_tx_map to return an error code indication DMA failure. Reported-by: Reported-by: David Mirabito Signed-off-by: Jacob Keller Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit bbc4e7d273b594debbcccdf588085b3521365c50 Author: Jacob Keller Date: Wed May 3 10:28:51 2017 -0700 i40e: fix race condition with PTP_TX_IN_PROGRESS bits Hardware related to the i40e driver has a limitation on Tx PTP packets. This requires us to limit the driver to timestamping a single packet at once. This is done using a state bitlock which enforces that only one timestamp request is honored at a time. Unfortunately this suffers from a race condition. The bit lock is not cleared until after skb_tstamp_tx() is called notifying applications of a new Tx timestamp. Even a well behaved application sending only one packet at a time and waiting for a response can wake up and send a new timestamped packet request before the bit lock is cleared. This results in needlessly dropping some Tx timestamp requests. We can fix this by unlocking the state bit as soon as we read the Timestamp register, as this is the first point at which it is safe to timestamp another packet. To avoid issues with the skb pointer, we'll use a copy of the pointer and set the global variable in the driver structure to NULL first. This ensures that the next timestamp request does not modify our local copy of the skb pointer. Now, a well behaved application which has at most one outstanding timestamp request will not accidentally race with the driver unlock bit. Obviously an application attempting to timestamp faster than one request at a time will have some timestamp requests skipped. Unfortunately there is nothing we can do about that. Reported-by: David Mirabito Signed-off-by: Jacob Keller Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ptp.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 9d68322e53e683e332c032def9854501f9cbf4e8 Author: Jesse Brandeburg Date: Fri Apr 28 16:53:17 2017 -0700 i40evf: disable unused flags The i40evf hardware doesn't have any way to ever report FCoE enabled so just force the code to always report FCoE is disabled, remove the unused defines, and mark the OP as reserved. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40e_common.c | 3 +-- drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit eb0b59d49bf46670414acd7b9b32c0db7c856f3e Author: Claudiu Beznea Date: Wed May 31 12:23:12 2017 +0300 ARM: dts: at91: sama5d2_xplained: add pwm controller Add pwm controller bindings for sama5d2_xplained and enable it. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 4 ++++ arch/arm/boot/dts/sama5d2.dtsi | 8 ++++++++ 2 files changed, 12 insertions(+) commit 155b0f690051345deefc653774b739c786067d61 Author: Jesse Brandeburg Date: Fri Apr 28 16:53:16 2017 -0700 i40evf: fix merge error in older patch This patch fixes a missing line that was missed while merging, which results in a driver feature in the VF not working to enable RSS as a negotiated feature. Fixes: 43a3d9ba34c9c ("i40evf: Allow PF driver to configure RSS") Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 1 + 1 file changed, 1 insertion(+) commit 07c0986d6e850548fbe7707fbcfb47127aa0c0a9 Author: Boris Brezillon Date: Tue May 30 11:20:54 2017 +0200 ARM: dts: at91: Add the NOR flash available on sama5d3 dev kits sama5d3 CPU modules embed a parallel NOR flash connected to the EBI bus. Signed-off-by: Boris Brezillon Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d3xcm.dtsi | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit eb873fe4d31b92c455659bf2c54b203d5d46b9a1 Author: Jesse Brandeburg Date: Fri Apr 28 16:53:15 2017 -0700 i40evf: fix duplicate lines This removes two duplicate lines that snuck into the code somehow. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 2 -- 1 file changed, 2 deletions(-) commit 1004a2977bdc7566bca87c565541c3232ed467c4 Author: Boris Brezillon Date: Tue May 30 11:20:53 2017 +0200 ARM: dts: at91: Switch to the new NAND bindings Use the new EBI/NAND bindings to declare NAND chips and remove old NAND nodes along the way. Note that we keep using old bindings in at91rm9200.dtsi because this SoC is not supported by the EBI driver. Signed-off-by: Boris Brezillon Tested-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/aks-cdu.dts | 56 ++++++++------- arch/arm/boot/dts/animeo_ip.dts | 53 +++++++++----- arch/arm/boot/dts/at91-cosino.dtsi | 83 ++++++++++++++-------- arch/arm/boot/dts/at91-kizbox.dts | 42 +++++++++--- arch/arm/boot/dts/at91-kizbox2.dts | 45 ++++++++---- arch/arm/boot/dts/at91-kizboxmini.dts | 52 +++++++++++--- arch/arm/boot/dts/at91-linea.dtsi | 25 +++++-- arch/arm/boot/dts/at91-qil_a9260.dts | 103 ++++++++++++++++------------ arch/arm/boot/dts/at91-sama5d3_xplained.dts | 97 +++++++++++++++----------- arch/arm/boot/dts/at91-sama5d4_xplained.dts | 83 +++++++++++++--------- arch/arm/boot/dts/at91-sama5d4ek.dts | 83 +++++++++++++--------- arch/arm/boot/dts/at91-tse850-3.dts | 70 ++++++++++--------- arch/arm/boot/dts/at91sam9260.dtsi | 28 ++------ arch/arm/boot/dts/at91sam9261.dtsi | 24 ++----- arch/arm/boot/dts/at91sam9261ek.dts | 83 +++++++++++++--------- arch/arm/boot/dts/at91sam9263.dtsi | 28 ++------ arch/arm/boot/dts/at91sam9263ek.dts | 103 ++++++++++++++++------------ arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 103 ++++++++++++++++------------ arch/arm/boot/dts/at91sam9g45.dtsi | 29 ++------ arch/arm/boot/dts/at91sam9m10g45ek.dts | 49 +++++++++---- arch/arm/boot/dts/at91sam9n12.dtsi | 32 ++------- arch/arm/boot/dts/at91sam9n12ek.dts | 26 +++++-- arch/arm/boot/dts/at91sam9rl.dtsi | 42 ++++-------- arch/arm/boot/dts/at91sam9rlek.dts | 85 ++++++++++++++--------- arch/arm/boot/dts/at91sam9x5.dtsi | 92 ++++++++++++------------- arch/arm/boot/dts/at91sam9x5cm.dtsi | 83 ++++++++++++++-------- arch/arm/boot/dts/ethernut5.dts | 47 ++++++++----- arch/arm/boot/dts/ge863-pro3.dtsi | 41 ++++++++--- arch/arm/boot/dts/pm9g45.dts | 99 ++++++++++++++------------ arch/arm/boot/dts/sama5d3.dtsi | 32 --------- arch/arm/boot/dts/sama5d3xcm.dtsi | 76 ++++++++++++-------- arch/arm/boot/dts/sama5d3xcm_cmp.dtsi | 77 +++++++++++++-------- arch/arm/boot/dts/sama5d4.dtsi | 31 --------- arch/arm/boot/dts/tny_a9260_common.dtsi | 89 ++++++++++++++---------- arch/arm/boot/dts/tny_a9263.dts | 103 ++++++++++++++++------------ arch/arm/boot/dts/usb_a9260_common.dtsi | 103 ++++++++++++++++------------ arch/arm/boot/dts/usb_a9263.dts | 103 ++++++++++++++++------------ 37 files changed, 1368 insertions(+), 1032 deletions(-) commit d9c41bf30cf8cea379f5947624e76c893791fec0 Author: Boris Brezillon Date: Tue May 30 11:20:52 2017 +0200 ARM: dts: at91: Declare EBI/NAND controllers Declare new nodes for the EBI and NAND controllers embedded in various at91/sama5 SoCs. Signed-off-by: Boris Brezillon Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9260.dtsi | 37 +++++++++ arch/arm/boot/dts/at91sam9261.dtsi | 32 ++++++++ arch/arm/boot/dts/at91sam9263.dtsi | 61 ++++++++++++++ arch/arm/boot/dts/at91sam9g45.dtsi | 35 ++++++++ arch/arm/boot/dts/at91sam9n12.dtsi | 42 ++++++++++ arch/arm/boot/dts/at91sam9rl.dtsi | 35 ++++++++ arch/arm/boot/dts/at91sam9x5.dtsi | 42 ++++++++++ arch/arm/boot/dts/sama5d2.dtsi | 53 ++++++++++++ arch/arm/boot/dts/sama5d3.dtsi | 113 ++++++++++++++++++++++++++ arch/arm/boot/dts/sama5d4.dtsi | 160 +++++++++++++++++++++++++++++++++++++ 10 files changed, 610 insertions(+) commit 3a689dcb2a92231ffea805065d08ce9eb473e5e6 Author: Boris Brezillon Date: Tue May 30 11:20:51 2017 +0200 dt-bindings: mtd: atmel-nand: Document the nfc-io bindings SAMA5 SoCs embed an advanced NAND controller logic to automate READ/WRITE page accesses. This advanced logic is exposed through a separate I/O mem range and is thus represented in a different node with its own compatible. Document the bindings of this nfc-io block. Signed-off-by: Boris Brezillon Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/mtd/atmel-nand.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 46992a17a853c537c77a99e67912c4f6317a71cb Author: Uwe Kleine-König Date: Fri May 26 20:06:07 2017 +0200 ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags According to the binding documentation and the source code the atmel-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*. This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually IRQ_TYPE_LEVEL_LOW is intended by the dt author. Signed-off-by: Uwe Kleine-König Acked-by: Marek Vasut Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20d4dcec04873dc15446825c21925379da1fd1ce Author: Uwe Kleine-König Date: Fri May 26 21:07:03 2017 +0200 dts: gpio_atmel: adapt binding doc to reality The second cell in a gpio reference is used to pass GPIO_ACTIVE_LOW or GPIO_ACTIVE_HIGH. The gpio device can also be used as irq controller and a reference can contain the IRQ_TYPE_* values in the second cell. Signed-off-by: Uwe Kleine-König Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/gpio/gpio_atmel.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit fb51cbfd4b2ee030b9021b91bca96fcf2cbba875 Author: Daniel Vetter Date: Wed May 24 16:51:50 2017 +0200 drm/arcgpu: Drop drm_vblank_cleanup CRTC don't seem to get shut down in a controlled fashion, but no one bothers to stop interrupts either so this races no matter what. Might as well remove it. A call to drm_atomic_helper_shutdown would be pretty sweet somewhere (and maybe getting rid of the load/unload callbacks while at it). Cc: Alexey Brodkin Reviewed-by: Alexey Brodkin Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-16-daniel.vetter@ffwll.ch Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-14-daniel.vetter@ffwll.ch drivers/gpu/drm/arc/arcpgu_drv.c | 1 - 1 file changed, 1 deletion(-) commit e3ec0e1e38a57ced1449b09be23e87da5d91e2b8 Author: Daniel Vetter Date: Wed May 24 16:51:52 2017 +0200 drm/atmel: Drop drm_vblank_cleanup Again almost correct, but since interrupts are shut down after vblank still a race. Proper cleanup would call drm_atomic_helper_shutdown to make sure this really is safe. v2: Remove misplace malidp hunk (Liviu). Cc: Boris Brezillon Acked-by: Boris Brezillon Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-18-daniel.vetter@ffwll.ch drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 1 - 1 file changed, 1 deletion(-) commit 85769cf7cd7f015ac7c8e45ee8a8f7f485c99481 Author: Daniel Vetter Date: Wed May 24 16:51:58 2017 +0200 drm/imx: Drop drm_vblank_cleanup It's only done in the driver load error path, where vblanks don't need to be quiescent anyway. And that's all drm_vblank_cleanup does, since the core will release the vblank allocations on its own already. So drop it. Cc: Philipp Zabel Acked-by: Philipp Zabel Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-24-daniel.vetter@ffwll.ch drivers/gpu/drm/imx/imx-drm-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a360b39b513776a5be64c0f7ee9613de121aa990 Author: Daniel Vetter Date: Wed May 24 16:52:00 2017 +0200 drm/meson: Drop drm_vblank_cleanup Again seems just cargo-culted. Cc: Neil Armstrong Acked-by: Neil Armstrong Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-26-daniel.vetter@ffwll.ch drivers/gpu/drm/meson/meson_drv.c | 1 - 1 file changed, 1 deletion(-) commit 25b905fe4323f66b65ddce38b7f3fa64d0fe5ae8 Author: Daniel Vetter Date: Wed May 24 16:52:06 2017 +0200 drm/stm: Drop drm_vblank_cleanup Again seems just cargo-culted. Cc: Yannick Fertre Cc: Philippe Cornu Acked-by: Philippe Cornu Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-32-daniel.vetter@ffwll.ch drivers/gpu/drm/stm/ltdc.c | 2 -- 1 file changed, 2 deletions(-) commit d79373bd4d7e88451043ef7e4f5d1a9139e9c337 Author: Daniel Vetter Date: Wed May 24 16:52:07 2017 +0200 drm/sun4i: Drop drm_vblank_cleanup Again seems just cargo-culted ... It's not ordered against any irq/vblank/modeset shutdown. Cc: Maxime Ripard Acked-by: Maxime Ripard Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-33-daniel.vetter@ffwll.ch drivers/gpu/drm/sun4i/sun4i_drv.c | 2 -- 1 file changed, 2 deletions(-) commit 8938d13585bc91e3c5217dc76534759eec2b6e69 Author: Daniel Vetter Date: Wed May 24 16:51:48 2017 +0200 drm: better document how to send out the crtc disable event The kernel doc explained what needs to happen, but not how to most easily accomplish that using the functions. Fix that. Cc: Boris Brezillon Reviewed-by: Boris Brezillon Reviewed-by: Neil Armstrong Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-14-daniel.vetter@ffwll.ch include/drm/drm_crtc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 46466b0dac3f6bee397c1db4f0ebfedf3e8c9e9c Author: Joe Perches Date: Tue May 30 16:35:37 2017 -0700 drm: Use vsnprintf extension %ph Using the extension saves a bit of code. Miscellanea: o Neaten and simplify dump_dp_payload_table o Removed trailing blank space from output $ size drivers/gpu/drm/drm_dp_mst_topology.o.* drivers/gpu/drm/tinydrm/*.o* text data bss dec hex filename 25848 0 16 25864 6508 drivers/gpu/drm/drm_dp_mst_topology.o.new 26091 0 16 26107 65fb drivers/gpu/drm/drm_dp_mst_topology.o.old 3362 2 0 3364 d24 drivers/gpu/drm/tinydrm/mipi-dbi.o.new 3376 2 0 3378 d32 drivers/gpu/drm/tinydrm/mipi-dbi.o.old Signed-off-by: Joe Perches Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/a78a21b5f34947da65473a0b7326922cda51a3be.1496187315.git.joe@perches.com drivers/gpu/drm/drm_dp_mst_topology.c | 51 +++++++++++------------------------ drivers/gpu/drm/tinydrm/mipi-dbi.c | 7 ++--- 2 files changed, 18 insertions(+), 40 deletions(-) commit 99cdb35e787b277bc66ed9fe7d5f9852de9e0eb0 Author: Daniel Vetter Date: Wed May 24 16:51:36 2017 +0200 drm/doc: move printf helpers out of drmP.h And document them lightly. Unfortunately kernel-doc isn't the most awesome for documenting #defines that don't look like functions, it makes functions out of them :-/ Signed-off-by: Daniel Vetter Reviewed-by: Neil Armstrong Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-2-daniel.vetter@ffwll.ch Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-3-daniel.vetter@ffwll.ch include/drm/drmP.h | 17 ----------------- include/drm/drm_modes.h | 17 +++++++++++++++++ include/drm/drm_rect.h | 27 +++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 17 deletions(-) commit 7f1ea2ac30171d9a6aad2916a73e41fa68c8f137 Author: Michel Thierry Date: Tue May 30 17:05:46 2017 -0700 drm/i915/guc: Fix doorbell id selection We are passing parameters in the wrong order to find next zero bit, and when it doesn't find anything it returns size (offset in the code), which is always zero. For reference the function is defined as: find_next_bit( *addr, size, offset ) The incorrect parameter order was added by commit abddffdf3620e ("drm/i915/guc: Sanitize GuC client initialization"). Luckily, currently we only use a single guc client and a single doorbell, which happens to be zero; therefore it isn't necessary to backport this fix (which would be for v4.12). Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Oscar Mateo Signed-off-by: Michel Thierry Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170531000546.30762-1-michel.thierry@intel.com drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7cc23de3e4e9222ae4fd24a00583aa5d2ed7610 Author: Arnd Bergmann Date: Tue May 30 11:22:08 2017 +0200 drm/pl111: select DRM_PANEL When DRM_PANEL is disabled, we get a link error for pl111: drivers/gpu/built-in.o: In function `pl111_connector_destroy': pl111_connector.c:(.text+0x3487e6): undefined reference to `drm_panel_detach' For some reason this only appears in the latest linux-next although the driver appears to have used the symbol for a few weeks already. The solution however is simple enough, we just need to add a 'select' statement. Fixes: bed41005e617 ("drm/pl111: Initial drm/kms driver for pl111") Signed-off-by: Arnd Bergmann Tested-by: Linus Walleij Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170530092224.1204037-1-arnd@arndb.de drivers/gpu/drm/pl111/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1373e77b4f108929caa448bb23f341a4af774cad Author: Gary Bisson Date: Tue Apr 25 16:45:17 2017 +0200 rtc: m41t80: add clock provider support Some devices supported by the m41t80 driver have a programmable square-wave output signal (see M41T80_FEATURE_SQ). This enables to use this feature as a clock provider of common clock framework. Signed-off-by: Gary Bisson Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) commit 17e296eb35dc5b15511ffa4ef5de67e53cb5a284 Author: Gary Bisson Date: Tue Apr 25 16:45:16 2017 +0200 rtc: m41t80: remove sqw sysfs entry In order to use the proper clock framework to control this feature. Signed-off-by: Gary Bisson Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 88 ------------------------------------------------ 1 file changed, 88 deletions(-) commit 0f546b058b86ea2f661cc7a6e931cee5a29959ef Author: Gary Bisson Date: Tue Apr 25 16:45:15 2017 +0200 rtc: m41t80: fix SQW dividers override when setting a date This patch is only relevant for RTC with the SQ_ALT feature which means the clock output frequency divider is stored in the weekday register. Current implementation discards the previous dividers value and clear them as soon as the time is set. Signed-off-by: Gary Bisson Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2de9261c18c2b09a8025872bb470853dc8db726c Author: Gary Bisson Date: Tue Apr 25 16:45:14 2017 +0200 rtc: m41t80: fix SQWE override when setting an alarm Currently setting an alarm clears the SQWE bit which means that the clock output is disabled no matter its previous state. Signed-off-by: Gary Bisson Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 3 +++ 1 file changed, 3 insertions(+) commit 8066360744743fb7f2dee1e2041fc9fc92f9d6b5 Author: David Lowe Date: Sat Apr 22 18:28:00 2017 +0100 rtc: rtc-ds1307: enable support for mcp794xx as a wakeup source without IRQ This patch extends the fixes for ds1337, ds1339, ds3231 in commit 8bc2a40730ec ("rtc: ds1307: add support for the DT property 'wakeup-source'") to mcp794xx devices, so that those parts can similarly be used as a wakeup source without an IRQ to the processor. Tested on Raspberry Pi ZeroW with MCP79400. Signed-off-by: David Lowe Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5b8b9cf76add98e19ff8ceb4247c2920687591a0 Author: Arnd Bergmann Date: Tue May 30 11:14:17 2017 +0200 x86/KASLR: Use the right memcpy() implementation The decompressor has its own implementation of the string functions, but has to include the right header to get those, while implicitly including linux/string.h may result in a link error: arch/x86/boot/compressed/kaslr.o: In function `choose_random_location': kaslr.c:(.text+0xf51): undefined reference to `_mmx_memcpy' This has appeared now as KASLR started using memcpy(), via: d52e7d5a952c ("x86/KASLR: Parse all 'memmap=' boot option entries") Other files in the decompressor already do the same thing. Signed-off-by: Arnd Bergmann Acked-by: Baoquan He Cc: Dave Jiang Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170530091446.1000183-1-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/boot/compressed/kaslr.c | 1 + 1 file changed, 1 insertion(+) commit ca91ab5f112bdcea9516c7ce8f46f4139df69b4a Author: Colin Ian King Date: Mon May 29 07:23:52 2017 +0100 remoteproc: fix spelling mistake: "Resouce" -> "Resource" Trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 Author: Bjorn Andersson Date: Sat May 27 16:23:35 2017 -0700 rpmsg: Introduce Qualcomm RPM glink driver This introduces a basic driver for communicating over "native glink" with the RPM found in Qualcomm platforms. Signed-off-by: Bjorn Andersson drivers/rpmsg/Kconfig | 10 + drivers/rpmsg/Makefile | 1 + drivers/rpmsg/qcom_glink_rpm.c | 1233 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1244 insertions(+) commit 48787c16c55d80639f87f93aabd7e70c4fb145b5 Author: Bjorn Andersson Date: Sat May 27 16:23:34 2017 -0700 soc: qcom: Add device tree binding for GLINK RPM Add device tree binding documentation for the Qualcomm GLINK RPM, used for communication with the Resource Power Management subsystem in various Qualcomm SoCs. Acked-by: Andy Gross Acked-by: Rob Herring Signed-off-by: Bjorn Andersson .../devicetree/bindings/soc/qcom/qcom,glink.txt | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit ffe406457753a7ca2061ecc8c4d3971623066911 Author: Michael Chan Date: Tue May 30 20:03:00 2017 -0400 bnxt_en: Fix xmit_more with BQL. We need to write the doorbell if BQL has stopped the queue and skb->xmit_more is set. Otherwise it is possible for the tx queue to rot and cause tx timeout. Fixes: 4d172f21cefe ("bnxt_en: Implement xmit_more.") Suggested-by: Yuval Mintz Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 665dff997e166c67663f2e0fce16392c70d31511 Author: Arnd Bergmann Date: Tue May 30 13:13:17 2017 +0200 gpio: xra1403: select REGMAP_SPI Without the regmap code, we get a link error: drivers/gpio/built-in.o: In function `xra1403_probe': (.text+0x132e0): undefined reference to `__devm_regmap_init_spi' Fixes: 5704520d7880 ("gpio: xra1403: Add EXAR XRA1403 SPI GPIO expander driver") Signed-off-by: Arnd Bergmann Reviewed-by: Nandor Han Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+) commit fe5984112ebb9951f6f42ee1b20d7441f37c807e Merge: acaa037 c8bac70 Author: Linus Walleij Date: Wed May 31 02:09:43 2017 +0200 Merge tag 'sh-pfc-for-v4.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.13 - Add PWM, AVB MDIO/MII, and sound pin groups on R-Car M3-W, - Add support for RZ/G1M and RZ/G1E, - Small fixes and cleanups. commit 073570dcb5687f6dd0bbc541f68c03c08a57ec58 Author: Arnd Bergmann Date: Tue May 30 11:21:05 2017 +0200 gpiolib: remove unused variable This was left behind by a cleanup patch: drivers/gpio/gpiolib.c: In function 'gpiochip_irqchip_init_valid_mask': drivers/gpio/gpiolib.c:1474:6: error: unused variable 'i' [-Werror=unused-variable] Fixes: 923a654c186c ("gpiolib: Re-use bitmap_fill() instead of open coded loop") Reported-by: kbuild test robot Reported-by: Stephen Rothwell Reported-by: Colin King Signed-off-by: Arnd Bergmann Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 -- 1 file changed, 2 deletions(-) commit acaa037970f610dcd643cc80b3245b683f66d0bc Author: Alexandre TORGUE Date: Mon May 29 18:17:32 2017 +0200 pinctrl: stm32: Implement .get_direction gpio_chip callback Add .get_direction() gpiochip callback in STM32 pinctrl driver. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 23 +++++++++++++++++++++-- drivers/pinctrl/stm32/pinctrl-stm32.h | 5 ++++- 2 files changed, 25 insertions(+), 3 deletions(-) commit 9efa6d1a1eaa1ef392dec8fa68a5de8258dd8e5d Author: Alexandre TORGUE Date: Mon May 29 18:17:31 2017 +0200 pinctrl: stm32: set pin to gpio input when used as interrupt This patch ensures that pin is correctly set as gpio input when it is used as an interrupt. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 39 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 10 deletions(-) commit adeac77549ec13dc3bf87ec21f1b8a00f069bb1c Author: Arnd Bergmann Date: Tue May 30 11:11:28 2017 +0200 pinctrl: mcp23s08: improve I2C Kconfig dependency With "SPI_MASTER=y && I2C=m", we can build mcp23s08 as a built-in driver, which then results in a link failure: drivers/pinctrl/built-in.o: In function `mcp23s08_probe_one.isra.0': :(.text+0x7910): undefined reference to `__devm_regmap_init_i2c' drivers/pinctrl/built-in.o: In function `mcp23s08_init': :(.init.text+0x110): undefined reference to `i2c_register_driver' drivers/pinctrl/built-in.o: In function `mcp23s08_exit': :(.exit.text+0x3c): undefined reference to `i2c_del_driver' To avoid the problem, this adds another dependency on I2C that enforces mcp23s08 to be a loadable module whenever the I2C core is a module. Fixes: 64ac43e6fa28 ("gpio: mcp23s08: move to pinctrl") Signed-off-by: Arnd Bergmann Reviewed-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a5c66b5726a9b6be4b6176e2f815321faef1e8fa Merge: e6cbef0 702c221 Author: David S. Miller Date: Tue May 30 18:14:13 2017 -0400 Merge branch 'bnxt_en-Misc-updates-for-net-next' Michael Chan says: ==================== bnxt_en: Misc. updates for net-next. The 1st 2 patches add short firmware message support for new VF devices. The 3rd patch adds a pci shutdown callback for the RDMA driver for proper shutdown. The next 3 patches improve the doorbell operations by elimiating the double doorbell workaround on newer chips, and by adding xmit_more support. The last patch adds a parameter to bnxt_set_dflt_rings(). ==================== Signed-off-by: David S. Miller commit 702c221ca64060b81af4461553be19cba275da8b Author: Michael Chan Date: Mon May 29 19:06:10 2017 -0400 bnxt_en: Pass in sh parameter to bnxt_set_dflt_rings(). In the existing code, the local variable sh is hardcoded to true to calculate default rings for shared ring configuration. It is better to have the caller determine the value of sh. Reported-by: Gustavo A. R. Silva Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4d172f21cefe896df8477940269b8d52129f8c87 Author: Michael Chan Date: Mon May 29 19:06:09 2017 -0400 bnxt_en: Implement xmit_more. Do not write the TX doorbell if skb->xmit_more is set unless the TX queue is full. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 434c975a8fe2f70b70ac09ea5ddd008e0528adfa Author: Michael Chan Date: Mon May 29 19:06:08 2017 -0400 bnxt_en: Optimize doorbell write operations for newer chips. Older chips require the doorbells to be written twice, but newer chips do not. Add a new common function bnxt_db_write() to write all doorbells appropriately depending on the chip. Eliminating the extra doorbell on newer chips has a significant performance improvement on pktgen. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 30 +++++++++-------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 9 +++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 +-- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +- 4 files changed, 23 insertions(+), 21 deletions(-) commit 3284f9e1ab505b41fa604c81e4b3271c6b88cdcb Author: Michael Chan Date: Mon May 29 19:06:07 2017 -0400 bnxt_en: Add additional chip ID definitions. Add additional chip definitions and macros for all supported chips. Add a new macro BNXT_CHIP_P4_PLUS for the newer generation of chips and use the macro to properly determine the features supported by these newer chips. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 29 +++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 8 deletions(-) commit 0efd2fc65c922dff207ff10a776a7a33e0e3c7c5 Author: Michael Chan Date: Mon May 29 19:06:06 2017 -0400 bnxt_en: Add a callback to inform RDMA driver during PCI shutdown. When bnxt_en gets a PCI shutdown call, we need to have a new callback to inform the RDMA driver to do proper shutdown and removal. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 19 +++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 2 ++ 3 files changed, 22 insertions(+) commit c7ef35eb0c8d0b58d2d5ae5be599e6aa730361b2 Author: Deepak Khungar Date: Mon May 29 19:06:05 2017 -0400 bnxt_en: Add PCI IDs for BCM57454 VF devices. Signed-off-by: Deepak Khungar Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++ 1 file changed, 2 insertions(+) commit e605db801bdeb9d94cccbd4a2f641030067ef008 Author: Deepak Khungar Date: Mon May 29 19:06:04 2017 -0400 bnxt_en: Support for Short Firmware Message The new short message format is used on the new BCM57454 VFs. Each firmware message is a fixed 16-byte message sent using the standard firmware communication channel. The short message has a DMA address pointing to the legacy long firmware message. Signed-off-by: Deepak Khungar Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 66 ++++++++++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 ++ 2 files changed, 69 insertions(+), 1 deletion(-) commit e6cbef0ced13a3ef9a49d895c635b4e0ed4e47a0 Author: Vivien Didelot Date: Fri May 26 18:07:37 2017 -0400 net: dsa: b53: remove unused dev argument The port net device passed to b53_fdb_copy is not used. Remove it. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f3d736c478adbe46234c35b2ef9b55a11dd01d7c Author: Vivien Didelot Date: Fri May 26 18:12:42 2017 -0400 net: dsa: remove dsa_port_is_bridged The helper is only used once and makes the code more complicated that it should. Remove it and reorganize the variables so that it fits on 80 columns. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 85b2e743d392680f42f601813acdd6934f223a76 Author: Neil Armstrong Date: Wed May 24 10:28:25 2017 +0200 ARM64: dts: meson-gxl: Add SPI pinctrl nodes This patch adds the SPICC Controller pins nodes for Amlogic GXL SoCs. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ec0a8260899700b3e49bc1d9d0535c6e888737d2 Author: Neil Armstrong Date: Wed May 24 10:28:24 2017 +0200 ARM64: dts: meson-gxbb: Add SPI pinctrl nodes This patch adds the SPICC Controller pins nodes for Amlogic GXBB SoCs. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 44ddadc38851dcff4ddc054e1329546e1e76a081 Author: Neil Armstrong Date: Wed May 24 10:28:23 2017 +0200 ARM64: dts: meson-gxl: Add Ethernet PHY LEDS pins nodes The Amlogic Meson GXL SoCs embeds an 10/100 Ethernet PHY, this patchs adds the Link and Activity LEDs signals pins nodes. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 6d717619944fc4855f11596cc19be84605420c3e Author: Neil Armstrong Date: Wed May 24 10:28:22 2017 +0200 ARM64: dts: meson-gxl: Add CEC pins nodes Add the AO and EE domain CEC pins nodes for the Amlogic Meson GXL SoCs. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a679f5d23d083ce25cc7ba49a239f16d76b258a7 Author: Neil Armstrong Date: Wed May 24 10:28:21 2017 +0200 ARM64: dts: meson-gxbb: Add CEC pins nodes Add the AO and EE domain CEC pins nodes for the Amlogic Meson GXBB SoCs. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9ef366a45629c80a612e41bd5c6d926aff7013b0 Author: Neil Armstrong Date: Tue May 23 16:21:51 2017 +0200 ARM64: dts: Fix GXBB periphs pinctrl pull-enable register base The pull-enable register base was wrongly copied from the meson8b pinctrl node, but was not used yet. Fixes: c328666d58aa ("ARM64: dts: amlogic: Add Meson GX dtsi from GXBB") Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4c406d55c2f3eb993ed383c959a9a0e94acfe68 Author: Neil Armstrong Date: Tue May 23 16:21:50 2017 +0200 ARM64: dts: Fix GXL periphs pinctrl pull-enable register base The pull-enable register base was wrongly copied from the GXBB pinctrl node, but was not used yet. Fixes: fb0fe92294a9 ("ARM64: dts: meson-gxl: Add pinctrl nodes") Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d79a079c4dd41d1d9fca1b7a887824d72e570c76 Author: Neil Armstrong Date: Tue May 23 16:21:49 2017 +0200 ARM64: dts: meson-gxl: Fix pinctrl periphs gpio-ranges The gpio-range was badly added on the GXL dtsi, the AO pin count is 10 instead of 14. Fixes: 84412e4e857f ("ARM64: dts: meson-gxl: Add gpio-ranges properties") Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bc7ffb08dafb31f744898b0d224e298368b5d37 Author: Andreas Färber Date: Sun May 21 20:51:05 2017 +0200 arm64: dts: amlogic: Add NanoPi K2 The FriendlyARM NanoPi K2 is a single-board computer. Cc: techsupport@friendlyarm.com Signed-off-by: Andreas Färber Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 291 +++++++++++++++++++++ 2 files changed, 292 insertions(+) commit 4db6db7257760071dbd14e0eb3f2891094cda2e1 Author: Andreas Färber Date: Sun May 21 20:51:04 2017 +0200 dt-bindings: arm: amlogic: Add NanoPi K2 The FriendlyARM NanoPi K2 is a single-board computer. Cc: techsupport@friendlyarm.com Acked-by: Rob Herring Signed-off-by: Andreas Färber Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 1 + 1 file changed, 1 insertion(+) commit 0a07236269fa3c6557348a5d8fa8650e532f585d Author: Andreas Färber Date: Sat May 13 17:23:12 2017 +0200 arm64: dts: meson-gxm: Add R-Box Pro The R-Box Pro is a TV box derived from Amlogic q200 reference design. It uses an AP6255 Wifi module. It features an LED tube that lights a surrounding stripe and the top logo in blue or red or pink'ish - blue is on by default, and red (i.e., pink) is configured as panic indicator. This device is available in at least two models, with 2 GB vs. 3 GB RAM as well as varying eMMC size. The intent is to handle this with a single .dts that gets the actual RAM size from U-Boot. Cc: ada@kingnoval.com Signed-off-by: Andreas Färber Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 1 + arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 240 +++++++++++++++++++++ 2 files changed, 241 insertions(+) commit cddfe5c5e2b2d0474cc052c8877b9ff26b206642 Author: Andreas Färber Date: Sat May 13 17:23:11 2017 +0200 dt-bindings: arm: amlogic: Add R-Box Pro Cc: ada@kingnoval.com Acked-by: Rob Herring Signed-off-by: Andreas Färber Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 1 + 1 file changed, 1 insertion(+) commit acbf554e051ffd31577c138a30d7363f825b254a Author: Andreas Färber Date: Sat May 13 17:23:10 2017 +0200 dt-bindings: Add Kingnovel vendor prefix Their domain name is spelled kingnoval, but textually Kingnovel. Cc: ada@kingnoval.com Acked-by: Rob Herring Signed-off-by: Andreas Färber Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 08cd94ec522b68647110374a9bd13f94e693aa11 Author: Madalin Bucur Date: Mon May 15 16:36:38 2017 +0300 dt-bindings: net: move FMan binding Besides the PPC SoCs, the QorIQ DPAA FMan is also present on ARM SoCs, moving the device tree binding document into the bindings/net folder. Signed-off-by: Madalin Bucur Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/fsl-fman.txt | 657 +++++++++++++++++++++ .../devicetree/bindings/powerpc/fsl/fman.txt | 657 --------------------- 2 files changed, 657 insertions(+), 657 deletions(-) commit 7786f6b6dfc12d17eea2df04116de6ebac50c884 Author: Richard Guy Briggs Date: Fri Apr 7 10:17:27 2017 -0400 audit: add ambient capabilities to CAPSET and BPRM_FCAPS records Capabilities were augmented to include ambient capabilities in v4.3 commit 58319057b784 ("capabilities: ambient capabilities"). Add ambient capabilities to the audit BPRM_FCAPS and CAPSET records. The record contains fields "old_pp", "old_pi", "old_pe", "new_pp", "new_pi", "new_pe" so in keeping with the previous record normalizations, change the "new_*" variants to simply drop the "new_" prefix. A sample of the replaced BPRM_FCAPS record: RAW: type=BPRM_FCAPS msg=audit(1491468034.252:237): fver=2 fp=0000000000200000 fi=0000000000000000 fe=1 old_pp=0000000000000000 old_pi=0000000000000000 old_pe=0000000000000000 old_pa=0000000000000000 pp=0000000000200000 pi=0000000000000000 pe=0000000000200000 pa=0000000000000000 INTERPRET: type=BPRM_FCAPS msg=audit(04/06/2017 04:40:34.252:237): fver=2 fp=sys_admin fi=none fe=chown old_pp=none old_pi=none old_pe=none old_pa=none pp=sys_admin pi=none pe=sys_admin pa=none A sample of the replaced CAPSET record: RAW: type=CAPSET msg=audit(1491469502.371:242): pid=833 cap_pi=0000003fffffffff cap_pp=0000003fffffffff cap_pe=0000003fffffffff cap_pa=0000000000000000 INTERPRET: type=CAPSET msg=audit(04/06/2017 05:05:02.371:242) : pid=833 cap_pi=chown,dac_override,dac_read_search,fowner,fsetid,kill, setgid,setuid,setpcap,linux_immutable,net_bind_service,net_broadcast, net_admin,net_raw,ipc_lock,ipc_owner,sys_module,sys_rawio,sys_chroot, sys_ptrace,sys_pacct,sys_admin,sys_boot,sys_nice,sys_resource,sys_time, sys_tty_config,mknod,lease,audit_write,audit_control,setfcap, mac_override,mac_admin,syslog,wake_alarm,block_suspend,audit_read cap_pp=chown,dac_override,dac_read_search,fowner,fsetid,kill,setgid, setuid,setpcap,linux_immutable,net_bind_service,net_broadcast, net_admin,net_raw,ipc_lock,ipc_owner,sys_module,sys_rawio,sys_chroot, sys_ptrace,sys_pacct,sys_admin,sys_boot,sys_nice,sys_resource, sys_time,sys_tty_config,mknod,lease,audit_write,audit_control,setfcap, mac_override,mac_admin,syslog,wake_alarm,block_suspend,audit_read cap_pe=chown,dac_override,dac_read_search,fowner,fsetid,kill,setgid, setuid,setpcap,linux_immutable,net_bind_service,net_broadcast, net_admin,net_raw,ipc_lock,ipc_owner,sys_module,sys_rawio,sys_chroot, sys_ptrace,sys_pacct,sys_admin,sys_boot,sys_nice,sys_resource, sys_time,sys_tty_config,mknod,lease,audit_write,audit_control,setfcap, mac_override,mac_admin,syslog,wake_alarm,block_suspend,audit_read cap_pa=none See: https://github.com/linux-audit/audit-kernel/issues/40 Signed-off-by: Richard Guy Briggs Acked-by: Serge Hallyn Signed-off-by: Paul Moore kernel/audit.h | 1 + kernel/auditsc.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit 4ebeb1ec56d4c54a56b6f43c2603d9a4688c83ba Author: CQ Tang Date: Tue May 30 09:25:49 2017 -0700 PCI: Restore PRI and PASID state after Function-Level Reset After a Function-Level Reset, PCI states need to be restored. Save PASID features and PRI reqs cached. [bhelgaas: search for capability only if PRI/PASID were enabled] Signed-off-by: CQ Tang Signed-off-by: Ashok Raj Signed-off-by: Bjorn Helgaas Cc: Joerg Roedel Cc: Jean-Phillipe Brucker Cc: David Woodhouse drivers/pci/ats.c | 64 ++++++++++++++++++++++++++++++++++++------------- drivers/pci/pci.c | 3 +++ include/linux/pci-ats.h | 10 ++++++++ include/linux/pci.h | 6 +++++ 4 files changed, 67 insertions(+), 16 deletions(-) commit a4f4fa681add289ebfec6d776376ad7a2ffda669 Author: Jean-Philippe Brucker Date: Tue May 30 09:25:48 2017 -0700 PCI: Cache PRI and PASID bits in pci_dev Device drivers need to check if an IOMMU enabled ATS, PRI and PASID in order to know when they can use the SVM API. Cache PRI and PASID bits in the pci_dev structure, similarly to what is currently done for ATS. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Bjorn Helgaas drivers/pci/ats.c | 23 +++++++++++++++++++++++ include/linux/pci.h | 2 ++ 2 files changed, 25 insertions(+) commit 90592b9a35836bacd34d92a3aba7958756b6a7c0 Author: Arjun Vynipadath Date: Tue May 30 13:30:24 2017 +0530 cxgb4: Fix netdev_features flag GRO is not supported by Chelsio HW when rx_csum is disabled. Update the netdev features flag when rx_csum is modified. Signed-off-by: Arjun Vynipadath Signed-off-by: Steve Wise Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 26747211486c5bc7dd014c3caab206576e00c0d0 Author: Arjun Vynipadath Date: Tue May 30 18:06:06 2017 +0530 cxgb4: FW upgrade fixes Disable FW_OK flag while flashing Firmware. This will help to fix any potential mailbox timeouts during Firmware flash. Grab new devlog parameters after Firmware restart. When we FLASH new Firmware onto an adapter, the new Firmware may have the Firmware Device Log located at a different memory address or have a different size for it. Signed-off-by: Arjun Vynipadath Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 12eb070babbcab4b003e060933971089864a6a54 Author: Ganesh Goudar Date: Tue May 30 11:50:40 2017 +0530 cxgb4: add new T5 pci device id Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 1 + 1 file changed, 1 insertion(+) commit b1a73af910e4e77c2eef9953f673d4c74ba07ad7 Author: Surendra Mobiya Date: Tue May 30 11:32:06 2017 +0530 cxgb4: keep carrier off before registering netdev Mark carrier off before registering netdev to ensure that vlan device picks up the correct state of the carrier Signed-off-by: Surendra Mobiya Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 9711164d03ed1aadaa266a6b15c462487cca8056 Merge: ae80390 dfc768f Author: David S. Miller Date: Tue May 30 13:57:33 2017 -0400 Merge branch 'net-qualcomm-add-QCA7000-UART-driver' Stefan Wahren says: ==================== net: qualcomm: add QCA7000 UART driver The Qualcomm QCA7000 HomePlug GreenPHY supports two interfaces: UART and SPI. This patch series adds the missing support for UART. This driver based on the Qualcomm code [1], but contains some changes: * use random MAC address per default * use net_device_stats from device * share frame decoding between SPI and UART driver * improve error handling * reimplement tty_wakeup with work queue (based on slcan) * use new serial device bus instead of ldisc The patches 1 - 3 are just for clean up and are not related to the UART support. Patch 4 adds SET_NETDEV_DEV() to qca_spi. Patches 5 - 16 prepare the existing QCA7000 code for UART support. The last patch contains the new driver. The code itself has been tested on a Freescale i.MX28 board and a Raspberry Pi Zero. Changes in v8: * add necessary header includes to qca_7k.c in order to reflect dependencies Changes in v7: * fix race between tx workqueue and device deregistration (reported by Lino) ==================== Signed-off-by: David S. Miller commit dfc768fbe618d97d0dde88c8e8e586201b0a7587 Author: Stefan Wahren Date: Mon May 29 13:57:25 2017 +0200 net: qualcomm: add QCA7000 UART driver This patch adds the Ethernet over UART driver for the Qualcomm QCA7000 HomePlug GreenPHY. Signed-off-by: Stefan Wahren Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/Kconfig | 16 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/ethernet/qualcomm/qca_7k_common.h | 6 + drivers/net/ethernet/qualcomm/qca_uart.c | 423 ++++++++++++++++++++++++++ 4 files changed, 447 insertions(+) commit 6a1db289d00b58ee5dec2e9139a92582e55ae8a8 Author: Stefan Wahren Date: Mon May 29 13:57:24 2017 +0200 dt-bindings: qca7000: append UART interface to binding This merges the serdev binding for the QCA7000 UART driver (Ethernet over UART) into the existing document. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller .../devicetree/bindings/net/qca,qca7000.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 1820827949201041b233dbe7ac5b5c518944b9dd Author: Stefan Wahren Date: Mon May 29 13:57:23 2017 +0200 dt-bindings: slave-device: add current-speed property This adds a new DT property to define the current baud rate of the slave device. Signed-off-by: Stefan Wahren Reviewed-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/serial/slave-device.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4aab28ca446f39ded6fb60c2344d349fd1771d5e Author: Stefan Wahren Date: Mon May 29 13:57:22 2017 +0200 dt-bindings: qca7000: rename binding Before we can merge the QCA7000 UART binding the document needs to be renamed. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller .../devicetree/bindings/net/qca,qca7000.txt | 56 ++++++++++++++++++++++ .../devicetree/bindings/net/qca-qca7000-spi.txt | 56 ---------------------- 2 files changed, 56 insertions(+), 56 deletions(-) commit fd787048a9a8530c7138d629d3dbeabdfaaec000 Author: Stefan Wahren Date: Mon May 29 13:57:21 2017 +0200 dt-bindings: qca7000-spi: Rework binding In preparation for the QCA7000 UART binding rework the binding document. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller .../devicetree/bindings/net/qca-qca7000-spi.txt | 49 +++++++++++++--------- 1 file changed, 29 insertions(+), 20 deletions(-) commit b2f98200c73cf4bd7c26438490b5a137210e9c7d Author: Stefan Wahren Date: Mon May 29 13:57:20 2017 +0200 net: qualcomm: make qca_7k_common a separate kernel module In order to share common functions between QCA7000 SPI and UART protocol driver the qca_7k_common needs to be a separate kernel module. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/Kconfig | 8 +++++++- drivers/net/ethernet/qualcomm/Makefile | 5 +++-- drivers/net/ethernet/qualcomm/qca_7k_common.c | 10 ++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) commit 60d6702464b9d667312035eb3bd9d390af9626dd Author: Stefan Wahren Date: Mon May 29 13:57:19 2017 +0200 net: qualcomm: prepare frame decoding for UART driver Unfortunately the frame format is not exactly identical between SPI and UART. In case of SPI there is an additional HW length at the beginning. So store the initial state to make the decoding state machine more flexible and easy to extend for UART support. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_7k_common.c | 12 ++++++------ drivers/net/ethernet/qualcomm/qca_7k_common.h | 8 ++++++-- drivers/net/ethernet/qualcomm/qca_spi.c | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) commit f1789286e0200f6a40fc20b05ee0e5e62d044a9e Author: Stefan Wahren Date: Mon May 29 13:57:18 2017 +0200 net: qualcomm: rename qca_framing.c to qca_7k_common.c As preparation for the upcoming UART driver we need a module which contains common functions for both interfaces. The module qca_framing is a good candidate but renaming to qca_7k_common would make it clear. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/Makefile | 2 +- drivers/net/ethernet/qualcomm/qca_7k_common.c | 156 ++++++++++++++++++++++++++ drivers/net/ethernet/qualcomm/qca_7k_common.h | 134 ++++++++++++++++++++++ drivers/net/ethernet/qualcomm/qca_framing.c | 156 -------------------------- drivers/net/ethernet/qualcomm/qca_framing.h | 134 ---------------------- drivers/net/ethernet/qualcomm/qca_spi.c | 2 +- drivers/net/ethernet/qualcomm/qca_spi.h | 2 +- 7 files changed, 293 insertions(+), 293 deletions(-) commit 0d78d5f73adb1f8a789ceaaa4aca58c52bd1d160 Author: Stefan Wahren Date: Mon May 29 13:57:17 2017 +0200 net: qca_spi: Clarify MODULE_DESCRIPTION Since this driver is specific to the QCA7000, we should make the module description more precisely. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55b7a770aef7beeb45e69c4833a22c94a074dcb3 Author: Stefan Wahren Date: Mon May 29 13:57:16 2017 +0200 net: qualcomm: move qcaspi_tx_cmd to qca_spi.c The function qcaspi_tx_cmd() is only called from qca_spi.c. So we better move it there. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_7k.c | 24 ------------------------ drivers/net/ethernet/qualcomm/qca_7k.h | 1 - drivers/net/ethernet/qualcomm/qca_spi.c | 24 ++++++++++++++++++++++++ 3 files changed, 24 insertions(+), 25 deletions(-) commit 96a2227c3ff006bf600f1c2ef08f470f3ccae90e Author: Stefan Wahren Date: Mon May 29 13:57:15 2017 +0200 net: qca_spi: remove QCASPI_MTU There is no need for an additional MTU define. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2280e3cf1d7feb974d35b34863e9ed6e9c56b257 Author: Stefan Wahren Date: Mon May 29 13:57:14 2017 +0200 net: qualcomm: Improve readability of length defines In order to avoid mixing things up, make the MTU and frame length defines easier to read. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_framing.c | 2 +- drivers/net/ethernet/qualcomm/qca_framing.h | 8 ++++---- drivers/net/ethernet/qualcomm/qca_spi.c | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) commit 0324e75db24bb99c6b7e096d84f273429eb94163 Author: Stefan Wahren Date: Mon May 29 13:57:13 2017 +0200 net: qualcomm: use net_device_ops instead of direct call There is no need to export qcaspi_netdev_open and qcaspi_netdev_close because they are also accessible via the net_device_ops. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_debug.c | 5 +++-- drivers/net/ethernet/qualcomm/qca_spi.c | 4 ++-- drivers/net/ethernet/qualcomm/qca_spi.h | 3 --- 3 files changed, 5 insertions(+), 7 deletions(-) commit 00bc2e49e7bfd499ee925f552155c328d765bf8a Author: Stefan Wahren Date: Mon May 29 13:57:12 2017 +0200 net: qca_spi: Use SET_NETDEV_DEV() Use SET_NETDEV_DEV() in qca_spi to create the "/sys/class/net//device" symlink. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_spi.c | 1 + 1 file changed, 1 insertion(+) commit 661ec067b035029ee1c8d282636889a5fd2ddfb3 Author: Stefan Wahren Date: Mon May 29 13:57:11 2017 +0200 net: qca_7k: Use BIT macro Use the BIT macro for the CONFIG and INT register values. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_7k.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e75977b4b88c3b226c7d3964a048fa8c75659b02 Author: Stefan Wahren Date: Mon May 29 13:57:10 2017 +0200 net: qca_framing: use u16 for frame offset It doesn't make sense to use a signed variable for offset here, so fix it up. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_framing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce68349a356d60d942ce5758d835e9cb00dcf61d Author: Stefan Wahren Date: Mon May 29 13:57:09 2017 +0200 net: qualcomm: qca_7k: clean up header includes Currently the includes doesn't reflect the dependencies. So fix this up by removing all unnecessary entries and add the necessary ones explicit. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_7k.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit bef8c056fba09aa4629fe5a2d3efe64068d049db Author: Nagaraju, Vathsala Date: Thu May 25 22:13:29 2017 +0530 drm/i915/psr: disable psr2 for resolution greater than 32X20 psr1 is also disabled for panel resolution greater than 32X20. Added psr2 check to disable only for psr2 panels having resolution greater than 32X20. issue was introduced by commit-id : "acf45d11050abd751dcec986ab121cb2367dcbba" commit message: "PSR2 is restricted to work with panel resolutions upto 3200x2000, move the check to intel_psr_match_conditions and fully block psr." v2: (Rodrigo) Add previous commit details which introduced the issue Fixes: acf45d11050a ("drm/i915/psr: disable psr2 for resolution greater than 32X20") Cc: Rodrigo Vivi Cc: Jim Bride Cc: Yaroslav Shabalin Reported-by: Yaroslav Shabalin Reviewed-by: Rodrigo Vivi Signed-off-by: vathsala nagaraju Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/49935bdff896ee3140bed471012b9f9110a863a4.1495729964.git.vathsala.nagaraju@intel.com drivers/gpu/drm/i915/intel_psr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ae803902c71e4eb340a0d3178d65f757662b5298 Merge: eb67e07 303d977 Author: David S. Miller Date: Tue May 30 12:42:28 2017 -0400 Merge branch 'net-phy-Support-managed-Cortina-phys' Bogdan Purcareata says: ==================== net: phy: Support managed Cortina phys So far, the Cortina family phys (CS4340 in this particular case) are only supported in fixed link mode (via fixed_phy_register). The generic 10G phy driver does not work well with the phylib state machine, when the phy is registered via of_phy_connect. This prohibits the user from describing the phy nodes in the device tree. In order to support this scenario, and to properly describe the board device tree, add a minimal Cortina driver that reads the status from the right register. With the generic 10G C45 driver, the kernel will print messages like: [ 0.226521] mdio_bus 8b96000: Error while reading PHY16 reg at 1.6 [ 0.232780] mdio_bus 8b96000: Error while reading PHY16 reg at 1.5 v3 -> v4: - Add trademark info. - Minor documentation entry consistency nit. v2 -> v3: - Add documentation entry. v1 -> v2: - Change approach for getting the phy_id from hacking get_phy_c45_ids to describing the device in the device tree via ethernet-phy-id. More patch version changes per individual patches. ==================== Signed-off-by: David S. Miller commit 303d97713cedecad337260815690cd244e5ee4dc Author: Bogdan Purcareata Date: Mon May 29 09:11:31 2017 +0000 dt-bindings: net: Add Cortina device tree bindings Add device tree description info for Cortina 10G phy devices. Signed-off-by: Bogdan Purcareata Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/cortina.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 15b9e5330f94ccd8202a3eacc79b5d27da82e1c6 Author: Bogdan Purcareata Date: Mon May 29 09:11:30 2017 +0000 net: phy: Add Cortina CS4340 driver Add basic support for Cortina PHY drivers. Support only CS4340 for now. The phys are not compatible with IEEE 802.3 clause 22/45 registers. Implement proper read_status support. The generic 10G phy driver causes bus register access errors. The driver should be described using the "ethernet-phy-id" device tree compatible. Signed-off-by: Bogdan Purcareata Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 5 ++ drivers/net/phy/Makefile | 1 + drivers/net/phy/cortina.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) commit 7c25904508afef134d7a9d2ad1690ee6554a1faa Author: Frederic Weisbecker Date: Mon May 15 14:56:50 2017 +0200 nohz: Reset next_tick cache even when the timer has no regs Handle tick interrupts whose regs are NULL, out of general paranoia. It happens when hrtimer_interrupt() is called from non-interrupt contexts, such as hotplug CPU down events. Signed-off-by: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/time/tick-sched.c | 2 ++ 1 file changed, 2 insertions(+) commit a091d4ee931b16ce4fef945d39a20b851a7e17b7 Author: Chris Wilson Date: Tue May 30 13:13:33 2017 +0100 drm/i915: Hold a wakeref for probing the ring registers Allow intel_engine_is_idle() to be called outside of the GT wakeref by acquiring the device runtime pm for ourselves. This allows the function to act as check after we assume the engine is idle and we release the GT wakeref held whilst we have requests. At the moment, we do not call it outside of an awake context but taking the wakeref as required makes it more convenient to use for quick debugging in future. [ 2613.401647] RPM wakelock ref not held during HW access [ 2613.401684] ------------[ cut here ]------------ [ 2613.401720] WARNING: CPU: 5 PID: 7739 at drivers/gpu/drm/i915/intel_drv.h:1787 gen6_read32+0x21f/0x2b0 [i915] [ 2613.401731] Modules linked in: snd_hda_intel i915 vgem snd_hda_codec_hdmi x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_realtek coretemp snd_hda_codec_generic crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm r8169 mii mei_me lpc_ich mei prime_numbers [last unloaded: i915] [ 2613.401823] CPU: 5 PID: 7739 Comm: drv_missed_irq Tainted: G U 4.12.0-rc2-CI-CI_DRM_421+ #1 [ 2613.401825] Hardware name: MSI MS-7924/Z97M-G43(MS-7924), BIOS V1.12 02/15/2016 [ 2613.401840] task: ffff880409e3a740 task.stack: ffffc900084dc000 [ 2613.401861] RIP: 0010:gen6_read32+0x21f/0x2b0 [i915] [ 2613.401863] RSP: 0018:ffffc900084dfce8 EFLAGS: 00010292 [ 2613.401869] RAX: 000000000000002a RBX: ffff8804016a8000 RCX: 0000000000000006 [ 2613.401871] RDX: 0000000000000006 RSI: ffffffff81cbf2d9 RDI: ffffffff81c9e3a7 [ 2613.401874] RBP: ffffc900084dfd18 R08: ffff880409e3afc8 R09: 0000000000000000 [ 2613.401877] R10: 000000008a1c483f R11: 0000000000000000 R12: 000000000000209c [ 2613.401879] R13: 0000000000000001 R14: ffff8804016a8000 R15: ffff8804016ac150 [ 2613.401882] FS: 00007f39ef3dd8c0(0000) GS:ffff88041fb40000(0000) knlGS:0000000000000000 [ 2613.401885] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2613.401887] CR2: 00000000023717c8 CR3: 00000002e7b34000 CR4: 00000000001406e0 [ 2613.401889] Call Trace: [ 2613.401912] intel_engine_is_idle+0x76/0x90 [i915] [ 2613.401931] i915_gem_wait_for_idle+0xe6/0x1e0 [i915] [ 2613.401951] fault_irq_set+0x40/0x90 [i915] [ 2613.401970] i915_ring_test_irq_set+0x42/0x50 [i915] [ 2613.401976] simple_attr_write+0xc7/0xe0 [ 2613.401981] full_proxy_write+0x4f/0x70 [ 2613.401987] __vfs_write+0x23/0x120 [ 2613.401992] ? rcu_read_lock_sched_held+0x75/0x80 [ 2613.401996] ? rcu_sync_lockdep_assert+0x2a/0x50 [ 2613.401999] ? __sb_start_write+0xfa/0x1f0 [ 2613.402004] vfs_write+0xc5/0x1d0 [ 2613.402008] ? trace_hardirqs_on_caller+0xe7/0x1c0 [ 2613.402013] SyS_write+0x44/0xb0 [ 2613.402020] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 2613.402022] RIP: 0033:0x7f39eded6670 [ 2613.402025] RSP: 002b:00007fffdcdcb1a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 2613.402030] RAX: ffffffffffffffda RBX: ffffffff81470203 RCX: 00007f39eded6670 [ 2613.402033] RDX: 0000000000000001 RSI: 000000000041bc33 RDI: 0000000000000006 [ 2613.402036] RBP: ffffc900084dff88 R08: 00007f39ef3dd8c0 R09: 0000000000000001 [ 2613.402038] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000041bc33 [ 2613.402041] R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000 [ 2613.402046] ? __this_cpu_preempt_check+0x13/0x20 [ 2613.402052] Code: 01 9b fa e0 0f ff e9 28 fe ff ff 80 3d 6a dd 0e 00 00 0f 85 29 fe ff ff 48 c7 c7 48 19 29 a0 c6 05 56 dd 0e 00 01 e8 da 9a fa e0 <0f> ff e9 0f fe ff ff b9 01 00 00 00 ba 01 00 00 00 44 89 e6 48 [ 2613.402199] ---[ end trace 31f0cfa93ab632bf ]--- Fixes: 5400367a864d ("drm/i915: Ensure the engine is idle before manually changing HWS") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170530121334.17364-2-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_engine_cs.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 863e9fde1a7061dad09bb299c65bed5f1ccb44ff Author: Chris Wilson Date: Tue May 30 13:13:32 2017 +0100 drm/i915: Short-circuit i915_gem_wait_for_idle() if already idle If the device is asleep (no GT wakeref), we know the GPU is already idle. If we add an early return, we can avoid touching registers and checking hw state outside of the assumed GT wakelock. This prevents causing such errors whilst debugging: [ 2613.401647] RPM wakelock ref not held during HW access [ 2613.401684] ------------[ cut here ]------------ [ 2613.401720] WARNING: CPU: 5 PID: 7739 at drivers/gpu/drm/i915/intel_drv.h:1787 gen6_read32+0x21f/0x2b0 [i915] [ 2613.401731] Modules linked in: snd_hda_intel i915 vgem snd_hda_codec_hdmi x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_realtek coretemp snd_hda_codec_generic crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm r8169 mii mei_me lpc_ich mei prime_numbers [last unloaded: i915] [ 2613.401823] CPU: 5 PID: 7739 Comm: drv_missed_irq Tainted: G U 4.12.0-rc2-CI-CI_DRM_421+ #1 [ 2613.401825] Hardware name: MSI MS-7924/Z97M-G43(MS-7924), BIOS V1.12 02/15/2016 [ 2613.401840] task: ffff880409e3a740 task.stack: ffffc900084dc000 [ 2613.401861] RIP: 0010:gen6_read32+0x21f/0x2b0 [i915] [ 2613.401863] RSP: 0018:ffffc900084dfce8 EFLAGS: 00010292 [ 2613.401869] RAX: 000000000000002a RBX: ffff8804016a8000 RCX: 0000000000000006 [ 2613.401871] RDX: 0000000000000006 RSI: ffffffff81cbf2d9 RDI: ffffffff81c9e3a7 [ 2613.401874] RBP: ffffc900084dfd18 R08: ffff880409e3afc8 R09: 0000000000000000 [ 2613.401877] R10: 000000008a1c483f R11: 0000000000000000 R12: 000000000000209c [ 2613.401879] R13: 0000000000000001 R14: ffff8804016a8000 R15: ffff8804016ac150 [ 2613.401882] FS: 00007f39ef3dd8c0(0000) GS:ffff88041fb40000(0000) knlGS:0000000000000000 [ 2613.401885] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2613.401887] CR2: 00000000023717c8 CR3: 00000002e7b34000 CR4: 00000000001406e0 [ 2613.401889] Call Trace: [ 2613.401912] intel_engine_is_idle+0x76/0x90 [i915] [ 2613.401931] i915_gem_wait_for_idle+0xe6/0x1e0 [i915] [ 2613.401951] fault_irq_set+0x40/0x90 [i915] [ 2613.401970] i915_ring_test_irq_set+0x42/0x50 [i915] [ 2613.401976] simple_attr_write+0xc7/0xe0 [ 2613.401981] full_proxy_write+0x4f/0x70 [ 2613.401987] __vfs_write+0x23/0x120 [ 2613.401992] ? rcu_read_lock_sched_held+0x75/0x80 [ 2613.401996] ? rcu_sync_lockdep_assert+0x2a/0x50 [ 2613.401999] ? __sb_start_write+0xfa/0x1f0 [ 2613.402004] vfs_write+0xc5/0x1d0 [ 2613.402008] ? trace_hardirqs_on_caller+0xe7/0x1c0 [ 2613.402013] SyS_write+0x44/0xb0 [ 2613.402020] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 2613.402022] RIP: 0033:0x7f39eded6670 [ 2613.402025] RSP: 002b:00007fffdcdcb1a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 2613.402030] RAX: ffffffffffffffda RBX: ffffffff81470203 RCX: 00007f39eded6670 [ 2613.402033] RDX: 0000000000000001 RSI: 000000000041bc33 RDI: 0000000000000006 [ 2613.402036] RBP: ffffc900084dff88 R08: 00007f39ef3dd8c0 R09: 0000000000000001 [ 2613.402038] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000041bc33 [ 2613.402041] R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000 [ 2613.402046] ? __this_cpu_preempt_check+0x13/0x20 [ 2613.402052] Code: 01 9b fa e0 0f ff e9 28 fe ff ff 80 3d 6a dd 0e 00 00 0f 85 29 fe ff ff 48 c7 c7 48 19 29 a0 c6 05 56 dd 0e 00 01 e8 da 9a fa e0 <0f> ff e9 0f fe ff ff b9 01 00 00 00 ba 01 00 00 00 44 89 e6 48 [ 2613.402199] ---[ end trace 31f0cfa93ab632bf ]--- Fixes: 25112b64b3d2 ("drm/i915: Wait for all engines to be idle as part of i915_gem_wait_for_idle()") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170530121334.17364-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 4 ++++ 1 file changed, 4 insertions(+) commit eb67e07ac63ca362d421bc44766140d9e008914d Merge: b11dabf fc6575b Author: David S. Miller Date: Tue May 30 12:07:04 2017 -0400 Merge branch 'qed-DCBx-and-Attentions-series' Yuval Mintz says: ==================== qed: DCBx and Attentions series The series contains 2 major components [& some odd bits]: - The first 3 patches are DCBx-related, containg missing bits in the implementation, correcting existing API and removing code no longer necessary. - Most of the remaining patches are interrupt/hw-attention related, adding some differeneces relating to QL41xxx and QL45xxx differences. While at it, they also remove a large chunk of unnecessary structure definitions. The series also contain a patch [#10] that was accidently missing from a previous series. ==================== Signed-off-by: David S. Miller commit fc6575bc498cb86e33a39a399355fd7e74ef2002 Author: Mintz, Yuval Date: Mon May 29 09:53:14 2017 +0300 qed: Cache alignemnt padding to match host Improve PCI performance by adjusting padding sizes to match those of the host machine's cacheline. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 15 +++++++++++++-- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) commit 9790c35e9682e0e158653108cc6950f2be196c80 Author: Mintz, Yuval Date: Mon May 29 09:53:13 2017 +0300 qed: Mask parities after occurance Parities might exhibit a flood behavior since we re-enable the attention line without preventing the parity from re-triggering the assertion. Mask the source in AEU until the parity would be handled. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 36 ++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 13 deletions(-) commit 6010179da3a27f4622eb40a731337fbdb8bbc713 Author: Mintz, Yuval Date: Mon May 29 09:53:12 2017 +0300 qed: Print multi-bit attentions properly In strucuture reflecting the AEU hw block some entries represent multiple HW bits, and the associated name is in fact a pattern. Today, whenever such an attention would be asserted the resulted prints would show the pattern string instead of indicating which of the possible bits was set. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 38 +++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) commit ba36f718c7fedbf0b083faec5e3606d98b846cb7 Author: Mintz, Yuval Date: Mon May 29 09:53:11 2017 +0300 qed: Diffrentiate adapter-specific attentions There are 4 attention bits in AEU that have different meaning for QL45xxx and QL41xxx adapters. Instead of doing a massive infrastructure change in favor of these bits, we implement a point fix where only those four would change meaning dependent on the adapter involved. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 80 ++++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 11 deletions(-) commit 0ebbd1c8d9424a341a21eb18170f4eff1f1f0670 Author: Mintz, Yuval Date: Mon May 29 09:53:10 2017 +0300 qed: Get rid of the attention-arrays We have almost all the necessary information regarding attentions in the logic employed for taking register dumps. Add some more and get rid of the seperate implementation we have today for identifying & printing various attention sources. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_debug.c | 250 +++++ drivers/net/ethernet/qlogic/qed/qed_hsi.h | 37 + drivers/net/ethernet/qlogic/qed/qed_int.c | 1312 +-------------------------- 3 files changed, 312 insertions(+), 1287 deletions(-) commit 2a351fd9b9ffe4168409e9f6519e048581ba6a41 Author: Mintz, Yuval Date: Mon May 29 09:53:09 2017 +0300 qed: Support dynamic s-tag change In case management firmware indicates a change in the used S-tag, propagate the configuration to HW and FW. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hsi.h | 4 +++- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 26 +++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 2 ++ drivers/net/ethernet/qlogic/qed/qed_sp.h | 9 ++++++++ drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 24 +++++++++++++++++++++ 5 files changed, 64 insertions(+), 1 deletion(-) commit 88072fd4002a9976063d8f2babd3d030bd6ae0f9 Author: Mintz, Yuval Date: Mon May 29 09:53:08 2017 +0300 qed: QL41xxx VF MSI-x table The QL41xxx adapters' PCI allows a single configuration for the MSI-x table size of all child VFs of a given PF. The existing code wouldn't cause the management firmware to set that value, meaning the VFs would retain the default MSI-x table size. Introduce a new scheme so that whenever a VF is enabled, driver would set the number of MSI-x to be the maximum over the various VFs' needs. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hsi.h | 3 ++- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 35 +++++++++++++++++++++++++++-- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 32 +++++++++++++++++++++++++- 3 files changed, 66 insertions(+), 4 deletions(-) commit 38b23e43ee6f0903de989913884a2142bf8b3d7c Author: Sudarsana Reddy Kalluru Date: Mon May 29 09:53:07 2017 +0300 qed: Don't inherit RoCE DCBx for V2 Older firmware used by device didn't distinguish between RoCE and RoCE V2 from DCBx configuration perspective, and as a result we've used to take a the RoCE-related configuration and apply to it for both. Since we now support configuring each its own values, there's no reason to reflect [& configure] that both are using the same. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 11 ----------- 1 file changed, 11 deletions(-) commit dfc268f6c1ac485b12923059f9fac55ec0522bb7 Author: Sudarsana Reddy Kalluru Date: Mon May 29 09:53:06 2017 +0300 qed: Correct DCBx update scheme Instead of using a boolean value that propagates to FW configuration, use the proper firmware HSI values. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 17 +++++++++-------- drivers/net/ethernet/qlogic/qed/qed_dcbx.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) commit 05930d18c8240482d6332c57b4aba87e846444c9 Author: Sudarsana Reddy Kalluru Date: Mon May 29 09:53:05 2017 +0300 qed: Add missing static/local dcbx info Some getters are not getting filled with the correct information regarding local DCBx. Fixes: 49632b5822ea ("qed: Add support for static dcbx.") Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7421a1671abe5bc07cc7a09f5a1be45acc403db7 Author: Colin Ian King Date: Tue May 30 11:39:45 2017 +0100 ALSA: pcm: include pcm_local.h and remove some extraneous tabs We need to include pcm_local.h to clean up some smatch warnings: symbol 'snd_pcm_timer_done' was not declared. Should it be static? symbol 'snd_pcm_timer_init' was not declared. Should it be static? symbol 'snd_pcm_timer_resolution_change' was not declared. Should it be static? Also remove some extraneous tabs on empty lines and replace space intentation with a tab. Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/core/pcm_timer.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b11dabfd33dd19219ba30d94cb0d2a0c34f0eefe Merge: f1bd4da e1af005 Author: David S. Miller Date: Tue May 30 11:55:34 2017 -0400 Merge branch 'net-more-extack' David Ahern says: ==================== net: another round of extack handling for routing This set focuses on passing extack through lwtunnel and MPLS with additional catches for IPv4 route add and minor cleanups in MPLS encountered passing the extack arg around. v2 - mindful of bloat adding duplicate messages + refactored prefix and prefix length checks in ipv4's fib_table_insert and fib_table_del + refactored label check in mpls - split mpls cleanups into 2 patches + move nla_get_via up in af_mpls to avoid forward declaration ==================== Signed-off-by: David S. Miller commit e1af005b1ce6d33c0467808ddceb09a8a1a424ba Author: David Ahern Date: Sat May 27 16:19:33 2017 -0600 net: mpls: remove unnecessary initialization of err err is initialized to EINVAL and not used before it is set again. Remove the unnecessary initialization. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 2 -- 1 file changed, 2 deletions(-) commit d4e7256007b0763614a41c9c0a5a943dc1095b22 Author: David Ahern Date: Sat May 27 16:19:32 2017 -0600 net: mpls: Make nla_get_via in af_mpls.c nla_get_via is only used in af_mpls.c. Remove declaration from internal.h and move up in af_mpls.c before first use. Code move only; no functional change intended. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 96 ++++++++++++++++++++++++++--------------------------- net/mpls/internal.h | 2 -- 2 files changed, 48 insertions(+), 50 deletions(-) commit 074350e2ebcab9cf62528984a617cc0a05b24fff Author: David Ahern Date: Sat May 27 16:19:31 2017 -0600 net: mpls: Add extack messages for route add and delete failures Add error messages for failures in adding and deleting mpls routes. This covers most of the annoying EINVAL errors. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 125 ++++++++++++++++++++++++++++++++++++---------------- net/mpls/internal.h | 2 +- 2 files changed, 87 insertions(+), 40 deletions(-) commit b7b386f42f079b25b942c756820e36c6bd09b2ca Author: David Ahern Date: Sat May 27 16:19:30 2017 -0600 net: mpls: Pull common label check into helper mpls_route_add and mpls_route_del have the same checks on the label. Move to a helper. Avoid duplicate extack messages in the next patch. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit a1f10abe12b6d70f8b02dedccb48c9d234a57b67 Author: David Ahern Date: Sat May 27 16:19:29 2017 -0600 net: Fill in extack for mpls lwt encap Fill in extack for errors in build_state for mpls lwt encap including passing extack to nla_get_labels and adding error messages for failures in it. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 49 ++++++++++++++++++++++++++++++++++++++---------- net/mpls/internal.h | 2 +- net/mpls/mpls_iptunnel.c | 12 +++++++----- 3 files changed, 47 insertions(+), 16 deletions(-) commit 9ae287274817c032a4428fde84d1ab26d6b96761 Author: David Ahern Date: Sat May 27 16:19:28 2017 -0600 net: add extack arg to lwtunnel build state Pass extack arg down to lwtunnel_build_state and the build_state callbacks. Add messages for failures in lwtunnel_build_state, and add the extarg to nla_parse where possible in the build_state callbacks. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/linux/netlink.h | 10 ++++++++++ include/net/lwtunnel.h | 9 ++++++--- net/core/lwt_bpf.c | 5 +++-- net/core/lwtunnel.c | 20 +++++++++++++++++--- net/ipv4/fib_lookup.h | 3 ++- net/ipv4/fib_semantics.c | 20 +++++++++++--------- net/ipv4/fib_trie.c | 2 +- net/ipv4/ip_tunnel_core.c | 11 +++++++---- net/ipv6/ila/ila_lwt.c | 5 +++-- net/ipv6/route.c | 2 +- net/ipv6/seg6_iptunnel.c | 5 +++-- net/mpls/mpls_iptunnel.c | 5 +++-- 12 files changed, 67 insertions(+), 30 deletions(-) commit c255bd681d1a93fff2a2c249d91449cce830ac64 Author: David Ahern Date: Sat May 27 16:19:27 2017 -0600 net: lwtunnel: Add extack to encap attr validation Pass extack down to lwtunnel_valid_encap_type and lwtunnel_valid_encap_type_attr. Add messages for unknown or unsupported encap types. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/lwtunnel.h | 13 +++++++++---- net/core/lwtunnel.c | 18 +++++++++++++----- net/ipv4/fib_frontend.c | 6 ++++-- net/ipv6/route.c | 4 ++-- 4 files changed, 28 insertions(+), 13 deletions(-) commit 78055998954b7a3e6c31eb24d1d26f0b63a7ec0d Author: David Ahern Date: Sat May 27 16:19:26 2017 -0600 net: ipv4: Add extack message for invalid prefix or length Add extack error message for invalid prefix length and invalid prefix. Example of the latter is a route spec containing 172.16.100.1/24, where the /24 mask means the lower 8-bits should be 0. Amazing how easy that one is to overlook when an EINVAL is returned. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 3 ++- net/ipv4/fib_frontend.c | 7 ++++--- net/ipv4/fib_trie.c | 17 +++++++++++------ 3 files changed, 17 insertions(+), 10 deletions(-) commit ba277e8e05dbd4aa13f74f859e276d5d54467eab Author: David Ahern Date: Sat May 27 16:19:25 2017 -0600 net: ipv4: refactor key and length checks fib_table_insert and fib_table_delete have the same checks on the prefix and length. Refactor into a helper. Avoids duplicate extack messages in the next patch. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 74ee91d8181b9d55fff79bf1fd555b0c8238f67e Author: Linus Walleij Date: Tue May 30 11:46:44 2017 +0200 ata: sata_fsl: cut drvdata assignment ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij Signed-off-by: Tejun Heo drivers/ata/sata_fsl.c | 2 -- 1 file changed, 2 deletions(-) commit 7c61a26891dcb938489c6f9ad793491bb9ae3989 Author: Linus Walleij Date: Tue May 30 11:46:43 2017 +0200 ata: samsung_cf: cut drvdata assignment ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij Signed-off-by: Tejun Heo drivers/ata/pata_samsung_cf.c | 2 -- 1 file changed, 2 deletions(-) commit 0fe98fa056d75d824d1939dd1e8b71927a5f288a Author: Linus Walleij Date: Tue May 30 11:46:42 2017 +0200 ata: rb532_cf: cut drvdata assignment ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij Signed-off-by: Tejun Heo drivers/ata/pata_rb532_cf.c | 2 -- 1 file changed, 2 deletions(-) commit a2136b31d37e8edcea93a00e73b6383403b5b76e Author: Linus Walleij Date: Tue May 30 11:46:41 2017 +0200 ata: dwc_460ex: cut drvdata assignment ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij Signed-off-by: Tejun Heo drivers/ata/sata_dwc_460ex.c | 1 - 1 file changed, 1 deletion(-) commit 62a98c2764e24b6ac637e3d3afe9dd6c5f088449 Author: Linus Walleij Date: Tue May 30 11:46:40 2017 +0200 ata: ep93xx: cut drvdata assignment ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign drv_data like this. Since ata_host_alloc_pinfo() is called after this site, the correct value is set eventually, but this assignment is just plain pointless. Signed-off-by: Linus Walleij Signed-off-by: Tejun Heo drivers/ata/pata_ep93xx.c | 1 - 1 file changed, 1 deletion(-) commit 7ed4a21ad3131588e01178c915e6a854f391104e Author: Linus Walleij Date: Tue May 30 11:46:39 2017 +0200 ata: bf54x: cut drvdata assignment ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij Signed-off-by: Tejun Heo drivers/ata/pata_bf54x.c | 2 -- 1 file changed, 2 deletions(-) commit 03ea8ad78cfb2910862c8dfcd2a627fc04097db2 Author: Matthias Kaehlcke Date: Fri May 26 14:22:37 2017 -0700 cfq-iosched: Delete unused function min_vdisktime() This fixes the following warning when building with clang: block/cfq-iosched.c:970:19: error: unused function 'min_vdisktime' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke Signed-off-by: Jens Axboe block/cfq-iosched.c | 9 --------- 1 file changed, 9 deletions(-) commit f1bd4daead9a4df48d1bb2821cff3a40da543b5b Merge: a399546 9ed9ea7 Author: David S. Miller Date: Tue May 30 11:27:10 2017 -0400 Merge branch 'nfp-pci-core-hwmon-live-mac-addr-change' Jakub Kicinski says: ==================== nfp: pci core, hwmon, live mac addr change This series brings updates to core PCI code, SR-IOV, exposes firmware's capability to change MAC address at runtime and HWMON interfaces. The PCI code updates include resiliency improvement in conditions which are quite unusual, but still shouldn't make the driver oops. We also handle very large device memory operation more gracefully. A timeout is added to acquiring mutexes in device memory. Pablo provides a patch to expose to the stack the ability to change MAC addresses under traffic while David adds HWMON interface for reading device temperature and power consumption. Last three patches are minor improvements to the netdev code. v2: - add patch 1 - fix for devlink build; - fix build issue with the hwmon patch. ==================== Signed-off-by: David S. Miller commit 9ed9ea7084f34fcb1d962a4fbd012fe8a2942df8 Author: Jakub Kicinski Date: Sun May 28 17:53:04 2017 -0700 nfp: don't keep count for free buffers delayed kick We only kick RX free buffer queue controller every NFP_NET_FL_BATCH (currently 16) entries. This means that we will always kick the QC when write ring index is divisable by NFP_NET_FL_BATCH. There is no need to keep counts. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 7 ++----- 2 files changed, 2 insertions(+), 8 deletions(-) commit 770f0cea19510098cb01ac87370e800b53a6bf5d Author: Jakub Kicinski Date: Sun May 28 17:53:03 2017 -0700 nfp: don't add ring size to index calculations Adding ring size to index calculation is pointless, since index will be masked with ring size - 1. Suggested-by: David Laight Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 193d6218ba801c88a5f3ef1bb2357e39074b3cdc Author: Jakub Kicinski Date: Sun May 28 17:53:02 2017 -0700 nfp: fix print format for ring pointers in ring dumps Ring pointers are unsigned. Fix the print formats to avoid showing users negative values. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b5655767c6763f0322d8292f3d9dbc43816d22e Author: Jakub Kicinski Date: Sun May 28 17:53:01 2017 -0700 nfp: don't wait for resources indefinitely There is currently no timeout to the resource and lock acquiring loops. We printed warnings and depended on user sending a signal to the waiting process to stop the waiting. This doesn't work very well when wait happens out of a work queue. The simplest example of that is PCI probe. When user loads the module and card is in a broken state modprobe will wait forever and signals sent to it will not actually reach the probing thread. Make sure all wait loops have a time out. Set the upper wait time to 60 seconds to stay on the safe side. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 5 +++++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp_mutex.c | 9 +++++++-- drivers/net/ethernet/netronome/nfp/nfpcore/nfp_resource.c | 10 ++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) commit eefbde7e10026273a81f54ab3b76e959f4f0ef09 Author: David Brunecz Date: Sun May 28 17:53:00 2017 -0700 nfp: add hwmon support Add support for retrieving temperature and power sensor and limits via NSP. Signed-off-by: David Brunecz Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfp_hwmon.c | 192 +++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_main.c | 21 ++- drivers/net/ethernet/netronome/nfp/nfp_main.h | 10 ++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 2 + .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 8 + .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 12 ++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_cmds.c | 47 ++++- 8 files changed, 286 insertions(+), 7 deletions(-) commit a87853f383afd6cb1cbda982d895e9cadf435098 Author: Jakub Kicinski Date: Sun May 28 17:52:59 2017 -0700 nfp: support variable NSP response lengths We want to support extendable commands, where newer versions of the management FW may provide more information. Zero out the communication buffer before passing control to NSP. This way if management FW is old and only fills in first N bytes, the remaining ones will be zeros which extended ABI fields should reserve as not supported/not available. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2ed4b36d03f9f6e71fe0c5a15941b2ff0bac99ad Author: Jakub Kicinski Date: Sun May 28 17:52:58 2017 -0700 nfp: shorten CPP core probe logs We currently print reserved BAR mappings info as we create them. This makes the probe logs longer than necessary. Print into a buffer instead and log all the info as a single line. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 8b3d5a47ae6b93654e39b543e33ded07c06fa8a9 Author: Jakub Kicinski Date: Sun May 28 17:52:57 2017 -0700 nfp: support long reads and writes with the cpp helpers nfp_cpp_{read,write}() helpers perform device memory mapping (setting the PCIe -> NOC translation BARs) and accessing it. They, however, currently implicitly expect that the length of entire operation will fit in one BAR translation window. There is a number of 16MB windows available, and we don't really need to access such large areas today. If the user, however, manages to trick the driver into making a big mapping (e.g. by providing a huge fake FW file), the driver will print a warning saying "No suitable BAR found for request" and a stack trace - which most users find concerning. To be future-proof and not scare users with warnings, make the nfp_cpp_{read,write}() helpers do accesses chunk by chunk if the area size is large. Set the notion of "large" to 2MB, which is the size of the smallest BAR window. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 3 + .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 87 +++++++++++++++++----- 2 files changed, 72 insertions(+), 18 deletions(-) commit 321b5e9afe2d2b31f78b60724d58a9d02888bb57 Author: Jakub Kicinski Date: Sun May 28 17:52:56 2017 -0700 nfp: only try to get to PCIe ctrl memory if BARs are wide enough For accessing PCIe ctrl memory we depend on the BAR aperture being large enough to reach all registers. Since the BAR aperture can be set in the flash make sure the driver won't oops the kernel when the PCIe configuration is unusual. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 09b857945b21706d432f6e4e1c9e5028be5f14ff Author: Jakub Kicinski Date: Sun May 28 17:52:55 2017 -0700 nfp: don't set aux pointers if ioremap failed If ioremap of PCIe ctrl memory failed we can still get to it through PCI config space, therefore we allow ioremap() to fail. When if fails, however, we must leave all the IOMEM pointers as NULL. Currently we would calculate csr and em pointers, adding offsets to the potential NULL value and therefore making the NULL-checks throughout the code ineffective. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 651e1f2f19995c7585f34688331cda4f88e8df47 Author: Jakub Kicinski Date: Sun May 28 17:52:54 2017 -0700 nfp: set driver VF limit PCI subsystem has support for drivers limiting the number of VFs available below what the IOV capability claims. Make use of it. While at it remove the #ifdef/#endif on CONFIG_PCI_IOV, it was there to avoid unnecessary warnings in case device read failed but kernel doesn't have SR-IOV support anyway. Device reads should not fail. Note that we still need the driver-internal check for the case where max VFs is 0 since PCI subsystem treats 0 as limit not set. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 9d3727595b11ab8f2837b54922efd2998f2cade5 Author: Pablo Cascón Date: Sun May 28 17:52:53 2017 -0700 nfp: add set_mac_address support while the interface is up Expose FW app ability to change MAC address at runtime. Make sure we only depend on it if FW app advertised the right capability. Signed-off-by: Pablo Cascón Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 44 +++++++++++++++++----- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 2 + 2 files changed, 36 insertions(+), 10 deletions(-) commit d935bc84c9403f30afedc2212e6dafe7669a738d Author: Jakub Kicinski Date: Sun May 28 17:52:52 2017 -0700 nfp: add MAY_USE_DEVLINK dependency Fix build with DEVLINK=m and NFP=y. Fixes: 1851f93fd2ee ("nfp: add devlink support") Reported-by: kbuild test robot Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 685c9b24ad5090e7a74781c4784fc12e0a04a176 Author: Shaun McDowell Date: Thu May 25 23:55:54 2017 -0400 nbd: add FUA op support NBD userland client and server have FUA (forced unit access) support and flags defined. Make NBD kernel module recognize NBD_FLAG_SEND_FUA, enable FUA on the queue, and forward FUA requests to the server. Signed-off-by: Shaun McDowell Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 16 +++++++++++++--- include/uapi/linux/nbd.h | 4 ++++ 2 files changed, 17 insertions(+), 3 deletions(-) commit ecef814c994d7d00dfa7bef5aa87dd66e8574946 Author: Chuanxiao Dong Date: Sat May 27 17:44:19 2017 +0800 drm/i915/gvt: Return -EIO if host GuC submission is enabled when loading GVT-g Currently GVT-g cannot work properly when host GuC submission is enabled, so make the driver loading failed in this case. v2: - use DRM_ERROR as it is a fatal message. (Chris) Suggested-by: Chris Wilson Signed-off-by: Chuanxiao Dong Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Zhenyu Wang Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1495878259-7733-2-git-send-email-chuanxiao.dong@intel.com drivers/gpu/drm/i915/intel_gvt.c | 5 +++++ 1 file changed, 5 insertions(+) commit 36ccc4f89fe595567d91e3246c5d81952ba3d8b2 Author: Chuanxiao Dong Date: Sat May 27 17:44:18 2017 +0800 drm/i915/gvt: Return -EIO if host enable_execlists not enabled when loading GVT-g GVT-g relies on the enable_execlists parameter in i915. If this option is not enabled for GVT-g, should return -EIO to make i915 driver loading failed. v2: - Use DMR_ERROR as it is a fatal message. (Chris) Suggested-by: Joonas Lahtinen Signed-off-by: Chuanxiao Dong Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_gvt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 67b7f33eeeaa6368289c6d25b283432e02dcc1c1 Author: Chuanxiao Dong Date: Sat May 27 17:44:17 2017 +0800 drm/i915/gvt: Add gvt options sanitize function The intel_gvt_sanitize_options will sanitize the GVT related options before doing initialize the GVT. Suggested-by: Joonas Lahtinen Signed-off-by: Chuanxiao Dong Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Cc: Chris Wilson Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/intel_gvt.c | 36 ++++++++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_gvt.h | 5 +++++ 3 files changed, 33 insertions(+), 10 deletions(-) commit 21e04ddff42ec957ca86a95de0bb85ae6a9a36f5 Author: Arnd Bergmann Date: Thu May 18 22:21:44 2017 +0200 HID: intel_ish-hid: enable compile testing To increase build coverage, drivers should generally be allowed to build on other architectures even if they are only used on one of them. Signed-off-by: Arnd Bergmann Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 318fc2a867bc5bac688cb88f111eb75792675dc2 Author: Arnd Bergmann Date: Thu May 18 22:21:43 2017 +0200 HID: intel_ish-hid: fix format string for size_t When building for 32-bit architectures, we get a harmless warning: intel-ish-hid/ishtp-hid-client.c: In function 'process_recv': intel-ish-hid/ishtp-hid-client.c:139:7: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format=] This changes the format string to print size_t variables using %zu instead. Signed-off-by: Arnd Bergmann Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp-hid-client.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2503f7babbc7f570d06cfa3ca6b7ceec9262ced3 Author: Arnd Bergmann Date: Thu May 18 22:21:42 2017 +0200 HID: intel_ish-hid: convert timespec to ktime_t The internal accounting uses 'timespec' based time stamps, which is slightly inefficient and also problematic once we get to the time_t overflow in 2038. When communicating to the firmware, we even get an open-coded 64-bit division that prevents the code from being build-tested on 32-bit architectures and is inefficient due to the double conversion from 64-bit nanoseconds to seconds+nanoseconds and then microseconds. This changes the code to use ktime_t instead. Signed-off-by: Arnd Bergmann Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/ipc.c | 15 ++++----------- drivers/hid/intel-ish-hid/ishtp/client.c | 4 ++-- drivers/hid/intel-ish-hid/ishtp/client.h | 6 +++--- drivers/hid/intel-ish-hid/ishtp/hbm.c | 11 ++++------- 4 files changed, 13 insertions(+), 23 deletions(-) commit 538be0aa8610168d7a8f4b119452056f537cff46 Author: Arnd Bergmann Date: Thu May 18 22:21:41 2017 +0200 HID: intel_ish-hid: clarify locking in client code I was trying to understand this code while working on a warning fix and the locking made no sense: spin_lock_irqsave() is pointless when run inside of an interrupt handler or nested inside of another spin_lock_irq() or spin_lock_irqsave(). Here it turned out that the comment above the function is wrong, as both recv_ishtp_cl_msg_dma() and recv_ishtp_cl_msg() can in fact be called from a work queue rather than an ISR, so we do have to use the irqsave() version once. This fixes the comments accordingly, removes the misleading 'dev_flags' variable and modifies the inner spinlock to not use 'irqsave'. No functional change is intended, this is just for readability and it slightly simplifies the object code. Signed-off-by: Arnd Bergmann Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/client.c | 43 +++++++++++++------------------- 1 file changed, 17 insertions(+), 26 deletions(-) commit 1260662fa3f293042fb0ae124c9a621f29f5bcab Author: Arnd Bergmann Date: Thu May 18 22:21:40 2017 +0200 HID: intel_ish-hid: fix potential uninitialized data usage gcc points out an uninialized pointer dereference that could happen if we ever get to recv_ishtp_cl_msg_dma() or recv_ishtp_cl_msg() with an empty &dev->read_list: drivers/hid/intel-ish-hid/ishtp/client.c: In function 'recv_ishtp_cl_msg_dma': drivers/hid/intel-ish-hid/ishtp/client.c:1049:3: error: 'cl' may be used uninitialized in this function [-Werror=maybe-uninitialized] The warning only appeared in very few randconfig builds, as the spinlocks tend to prevent gcc from tracing the variables. I only saw it in configurations that had neither SMP nor LOCKDEP enabled. As we can see, we only enter the case if 'complete_rb' is non-NULL, and then 'cl' is known to point to complete_rb->cl. Adding another initialization to the same pointer is harmless here and makes it clear to the compiler that the behavior is well-defined. Signed-off-by: Arnd Bergmann Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/client.c | 2 ++ 1 file changed, 2 insertions(+) commit fe7296e19221c6dc125a06b52e28ccbdb76d9b58 Author: Shaokun Zhang Date: Wed May 24 15:43:18 2017 +0800 arm64: perf: Extend event config for ARMv8.1 Perf has supported ARMv8.1 feature with 16-bit evtCount filed [see c210ae8 arm64: perf: Extend event mask for ARMv8.1], event config should be extended to 16-bit too, otherwise, if use -e event_name whose event_code is more than 0x3ff, pmu_config_term will return -EINVAL because function pmu_format_max_value depends on event config. This patch extends event config to 16-bit. Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1515b186c2359996b50241c1c6f79ff933d5112a Author: Russell King Date: Fri May 19 16:35:56 2017 +0100 ARM: make configuration of userspace Thumb support an expert option David Mosberger reports random segfaults and other problems when running his buildroot userspace. It turns out that his kernel did not have support for Thumb userspace, nor did his application, but glibc made use of Thumb instructions in glibc. The kernel Thumb support option already recommends being enabled, and is also so biased, but clearly this is not enough of a recommendation. So, hide this behind CONFIG_EXPERT as well, and include a note to indicate the potential issues if it's turned off and userspace Thumb mode is made use of. Reported-by: David Mosberger Signed-off-by: Russell King arch/arm/mm/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3c4ec0f9b3a1cd0365c33e53936274f81d536b94 Author: Keerthy Date: Wed May 24 19:31:41 2017 +0530 ARM: dts: da850: Add interrupt-controller property to gpio node The gpio node has 144 gpios. Each gpio is capable of generating an interrupt. Hence add interrupt-controller property to the gpio node. With this in place one can use interrupts property in device tree to request for the gpio interrupts. Signed-off-by: Keerthy Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 00c26cf9ce4eadf3680e431a374eb4cdc6e824cd Author: Chris Wilson Date: Wed May 24 17:26:53 2017 +0100 drm/i915: Remove toplevel struct_mutex locking from debugfs/i915_drop_caches I have a plan to write a quick test to exercise concurrent usage of i915_gem_shrink(), the simplest way looks to be to have multiple threads using debugfs/i915_drop_caches. However, we currently take one lock over the entire function, serialising the calls into i915_gem_shrink() so reduce the lock coverage. Testcase: igt/gem_shrink/reclaim Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170524162653.5446-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit b5a824250e4aac4fb76c5076b6a5e460e52c831a Author: Chris Wilson Date: Thu May 25 21:48:18 2017 +0100 drm/i915: Add kerneldoc to describe i915_gem_object.vma_list Add kerneldoc for the vma_list stored on the i915_gem_object, in particular, documenting the expected ordering of elements -- i.e. that we do expect GGTT VMA first followed by the ppGTT VMA. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170525204818.12044-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_object.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit db46a72b9713fd20c405e796d7ef841f6d9bd15f Author: Lorenzo Pieralisi Date: Wed May 24 18:22:19 2017 +0100 ARM64/PCI: Set root bus NUMA node on ACPI systems PCI core requires the NUMA node for the struct pci_host_bridge.dev to be set by using the pcibus_to_node(struct pci_bus*) API, that on ARM64 systems relies on the struct pci_host_bridge->bus.dev NUMA node. The struct pci_host_bridge.dev NUMA node is then propagated through the PCI device hierarchy as PCI devices (and bridges) are enumerated under it. Therefore, in order to set-up the PCI NUMA hierarchy appropriately, the struct pci_host_bridge->bus.dev NUMA node must be set before core code calls pcibus_to_node(struct pci_bus*) on it so that PCI core can retrieve the NUMA node for the struct pci_host_bridge.dev device and can propagate it through the PCI bus tree. On ARM64 ACPI based systems the struct pci_host_bridge->bus.dev NUMA node can be set-up in pcibios_root_bridge_prepare() by parsing the root bridge ACPI device firmware binding. Add code to the pcibios_root_bridge_prepare() that, when booting with ACPI, parse the root bridge ACPI device companion NUMA binding and set the corresponding struct pci_host_bridge->bus.dev NUMA node appropriately. Cc: Bjorn Helgaas Cc: Catalin Marinas Reviewed-by: Robert Richter Tested-by: Robert Richter Signed-off-by: Lorenzo Pieralisi Signed-off-by: Will Deacon arch/arm64/kernel/pci.c | 3 +++ 1 file changed, 3 insertions(+) commit 0b997c8c9562dd61733dfeb9e1a5962730338e6e Author: Alexandre Bailon Date: Tue May 23 17:46:57 2017 +0200 ARM: davinci_all_defconfig: Enable CPPI 4.1 USB OTG DMA CPPI 4.1 DMA is now supported on AM18xx. Update the config to use it instead of PIO mode. Signed-off-by: Alexandre Bailon Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 775448ce274a58bb8b5fa49795dc808446434dae Author: Alexandre Bailon Date: Fri May 19 15:33:36 2017 +0200 ARM: dts: da850: Add CPPI 4.1 DMA to USB OTG controller This adds CPPI 4.1 DMA controller to USB OTG controller. Changes since v2: - Fixed the the property reg-names (had glue register defined) - Removed few useless property Signed-off-by: Alexandre Bailon Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 5fd3ffb92d33f86a5c0757ef879f7d785beeec92 Author: Heiko Stuebner Date: Tue May 23 11:12:35 2017 +0200 arm64: dts: rockchip: update common rk3399 operating points The rk3399 has multiple variants with different frequency ratings. The operating points currently in the kernel stem from the op1 variant used in Gru ChromeOS devices and may not be suitable for general rk3399 chips. Therefore bring it back to the official general operating points. Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 7cd1ed45d41f61d01a9eb0862ae8b98b995d34c5 Author: Heiko Stuebner Date: Tue May 23 11:17:19 2017 +0200 arm64: dts: rockchip: introduce rk3399-op1 operating points The OP1 is a rk3399 variant used in ChromeOS devices with a slightly higher frequency rating compared to the regular rk3399, but right now the only available operating points don't match either variant with both needing adjustments to actually fit their specs. Therefore introduce separate operting points, from the ChromeOS kernel, for the OP1 and use it on Gru devices. Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 145 +++++++++++++++++++++++ 2 files changed, 146 insertions(+), 1 deletion(-) commit 5f16a046f8e144c294ef98cd29d9458b5f8273e5 Author: Will Deacon Date: Wed Apr 5 11:14:05 2017 +0100 arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage FUTEX_OP_OPARG_SHIFT instructs the futex code to treat the 12-bit oparg field as a shift value, potentially leading to a left shift value that is negative or with an absolute value that is significantly larger then the size of the type. UBSAN chokes with: ================================================================================ UBSAN: Undefined behaviour in ./arch/arm64/include/asm/futex.h:60:13 shift exponent -1 is negative CPU: 1 PID: 1449 Comm: syz-executor0 Not tainted 4.11.0-rc4-00005-g977eb52-dirty #11 Hardware name: linux,dummy-virt (DT) Call trace: [] dump_backtrace+0x0/0x538 arch/arm64/kernel/traps.c:73 [] show_stack+0x20/0x30 arch/arm64/kernel/traps.c:228 [] __dump_stack lib/dump_stack.c:16 [inline] [] dump_stack+0x120/0x188 lib/dump_stack.c:52 [] ubsan_epilogue+0x18/0x98 lib/ubsan.c:164 [] __ubsan_handle_shift_out_of_bounds+0x250/0x294 lib/ubsan.c:421 [] futex_atomic_op_inuser arch/arm64/include/asm/futex.h:60 [inline] [] futex_wake_op kernel/futex.c:1489 [inline] [] do_futex+0x137c/0x1740 kernel/futex.c:3231 [] SYSC_futex kernel/futex.c:3281 [inline] [] SyS_futex+0x114/0x268 kernel/futex.c:3249 [] el0_svc_naked+0x24/0x28 ================================================================================ syz-executor1 uses obsolete (PF_INET,SOCK_PACKET) sock: process `syz-executor0' is using obsolete setsockopt SO_BSDCOMPAT This patch attempts to fix some of this by: * Making encoded_op an unsigned type, so we can shift it left even if the top bit is set. * Casting to signed prior to shifting right when extracting oparg and cmparg * Consider only the bottom 5 bits of oparg when using it as a left-shift value. Whilst I think this catches all of the issues, I'd much prefer to remove this stuff, as I think it's unused and the bugs are copy-pasted between a bunch of architectures. Reviewed-by: Robin Murphy Signed-off-by: Will Deacon arch/arm64/include/asm/futex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 690e95dd4d67be2eb905e1480b692c84e612a71a Author: Kefeng Wang Date: Tue May 16 15:36:16 2017 +0800 arm64: check return value of of_flat_dt_get_machine_name It's useless to print machine name and setup arch-specific system identifiers if of_flat_dt_get_machine_name() return NULL, especially when ACPI-based boot. Reviewed-by: Geert Uytterhoeven Signed-off-by: Kefeng Wang Signed-off-by: Will Deacon arch/arm64/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) commit 3fde2999fac549024a56353966844ac7633b74ae Author: Will Deacon Date: Thu May 18 16:10:34 2017 +0100 arm64: cpufeature: Don't dump useless backtrace on CPU_OUT_OF_SPEC Unfortunately, it turns out that mismatched CPU features in big.LITTLE systems are starting to appear in the wild. Whilst we should continue to taint the kernel with CPU_OUT_OF_SPEC for features that differ in ways that we can't fix up, dumping a useless backtrace out of the cpufeature code is pointless and irritating. This patch removes the backtrace from the taint. Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6efd8499d9bda657fc82621b24d6122a01332c19 Author: Tobias Klauser Date: Mon May 15 13:40:20 2017 +0200 arm64: mm: explicity include linux/vmalloc.h arm64's mm/mmu.c uses vm_area_add_early, struct vm_area and other definitions but relies on implict inclusion of linux/vmalloc.h which means that changes in other headers could break the build. Thus, add an explicit include. Acked-by: Ard Biesheuvel Signed-off-by: Tobias Klauser Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 1 + 1 file changed, 1 insertion(+) commit 1149aad10b1e2f2cf1ea023889ac8604ae869c5a Author: Kefeng Wang Date: Tue May 9 09:53:37 2017 +0800 arm64: Add dump_backtrace() in show_regs Generic code expects show_regs() to dump the stack, but arm64's show_regs() does not. This makes it hard to debug softlockups and other issues that result in show_regs() being called. This patch updates arm64's show_regs() to dump the stack, as common code expects. Acked-by: Mark Rutland Signed-off-by: Kefeng Wang [will: folded in bug_handler fix from mrutland] Signed-off-by: Will Deacon arch/arm64/include/asm/stacktrace.h | 1 + arch/arm64/kernel/process.c | 1 + arch/arm64/kernel/traps.c | 4 +--- 3 files changed, 3 insertions(+), 3 deletions(-) commit c07ab957d9af8092fc3caf3db5a0fb49098fdc65 Author: Kefeng Wang Date: Tue May 9 09:53:36 2017 +0800 arm64: Call __show_regs directly Generic code expects show_regs() to also dump the stack, but arm64's show_reg() does not do this. Some arm64 callers of show_regs() *only* want the registers dumped, without the stack. To enable generic code to work as expected, we need to make show_regs() dump the stack. Where we only want the registers dumped, we must use __show_regs(). This patch updates code to use __show_regs() where only registers are desired. A subsequent patch will modify show_regs(). Acked-by: Mark Rutland Signed-off-by: Kefeng Wang Signed-off-by: Will Deacon arch/arm64/kernel/probes/kprobes.c | 4 ++-- arch/arm64/mm/fault.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 48f99c8ec0b25756d0283ab058826ae07d14fad7 Author: Dong Bo Date: Tue Apr 25 14:11:29 2017 +0800 arm64: Preventing READ_IMPLIES_EXEC propagation Like arch/arm/, we inherit the READ_IMPLIES_EXEC personality flag across fork(). This is undesirable for a number of reasons: * ELF files that don't require executable stack can end up with it anyway * We end up performing un-necessary I-cache maintenance when mapping what should be non-executable pages * Restricting what is executable is generally desirable when defending against overflow attacks This patch clears the personality flag when setting up the personality for newly spwaned native tasks. Given that semi-recent AArch64 toolchains emit a non-executable PT_GNU_STACK header, userspace applications can already not rely on READ_IMPLIES_EXEC so shouldn't be adversely affected by this change. Cc: Reported-by: Peter Maydell Signed-off-by: Dong Bo [will: added comment to compat code, rewrote commit message] Signed-off-by: Will Deacon arch/arm64/include/asm/elf.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 7152ea7d4f14121fad7c36f213f9a2239eeee8ff Author: Heiko Stuebner Date: Tue May 9 23:24:11 2017 +0200 arm64: dts: rockchip: enable usb3 controllers on rk3399-firefly This allows basic usage of usb3 devices but no typec specific things yet. Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 2eca8411ed14a93bd3890e368a847d26fd4c97d2 Author: Heiko Stuebner Date: Tue May 9 20:34:06 2017 +0200 arm64: dts: rockchip: add ethernet0 alias on rk3399 This is used by bootloaders to override the mac address in the devicetree if needed. Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 + 1 file changed, 1 insertion(+) commit 12335ebaac8639a2745245e5d179f44f3c70fed1 Author: Heiko Stuebner Date: Sat May 6 10:20:38 2017 +0200 arm64: dts: rockchip: bring rk3399-firefly power-tree in line The power-tree on the rk3399-firefly did not completely match the documentation and vendor devicetree. It was also missing some supply-hirarchy information and some regulator-gpio names did not match the schematics. Fix this for the existing regulators before introducing new things. Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 96 ++++++++++++++----------- 1 file changed, 53 insertions(+), 43 deletions(-) commit e2f9d45fb452c60c9aaab55ce6f40601f9ec6516 Author: Tobias Klauser Date: Wed May 24 16:31:16 2017 +0200 iommu/amd: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30bf2df65b0d18f53ee9c92131239f66c8f55d63 Author: Joerg Roedel Date: Mon May 15 16:25:03 2017 +0200 iommu/amd: Ratelimit io-page-faults per device Misbehaving devices can cause an endless chain of io-page-faults, flooding dmesg and making the system-log unusable or even prevent the system from booting. So ratelimit the error messages about io-page-faults on a per-device basis. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) commit 71bb620df634b22a08efd62a0f93c3f2aceaa8e2 Author: Tobias Klauser Date: Wed May 24 16:31:23 2017 +0200 iommu/vt-d: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Signed-off-by: Joerg Roedel drivers/iommu/intel_irq_remapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b316d02a13c3a8ebe681b7232defbdf3fa28c41b Author: Peter Xu Date: Mon May 22 18:28:51 2017 +0800 iommu/vt-d: Unwrap __get_valid_domain_for_dev() We do find_domain() in __get_valid_domain_for_dev(), while we do the same thing in get_valid_domain_for_dev(). No need to do it twice. Signed-off-by: Peter Xu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 630d30a4ee27997323bc0b38843e5b159dd5b2ed Author: Maarten Lankhorst Date: Mon May 1 15:38:04 2017 +0200 drm/i915: Convert intel_sdvo connector properties to atomic. SDVO was the last connector that's still using the legacy paths for properties, and this is with a reason! This connector implements a lot of properties dynamically, and some of them shared with the digital connector state, so sdvo_connector_state subclasses intel_digital_connector_state. set_property had a lot of validation, but this is handled in the drm core, so most of the validation can die off. The properties are written right before enabling the connector, since there is no good way to update the properties without crtc. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-13-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_atomic.c | 40 --- drivers/gpu/drm/i915/intel_display.c | 37 --- drivers/gpu/drm/i915/intel_drv.h | 6 - drivers/gpu/drm/i915/intel_sdvo.c | 518 +++++++++++++++++++---------------- 4 files changed, 280 insertions(+), 321 deletions(-) commit b32962f87acdc52a9734d15e9053e0f8fa1dcc9e Author: Maarten Lankhorst Date: Mon May 1 15:38:03 2017 +0200 drm/i915: Handle force_audio correctly in intel_sdvo Do the same as other connectors, attempt to detect hdmi audio in the detect() callback, and only use the force_audio property as override. Compute has_audio in pipe_config, and use that value instead of the probed value directly. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-12-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_sdvo.c | 51 ++++++++++++++------------------------- 1 file changed, 18 insertions(+), 33 deletions(-) commit 7a5ca19f8baf12d617b34d9a2004d18b84d05fb5 Author: Maarten Lankhorst Date: Mon May 1 15:38:02 2017 +0200 drm/i915: Convert intel_hdmi connector properties to atomic intel_hdmi supports 3 properties, force_audio, broadcast rgb and scaling mode. The last one is only created for eDP, so the is_eDP in set_property is not required. panel fitting and broadcast rgb are straightforward and only requires changing compute_config. force_audio is also used to force DVI mode, which means changes to compute_config and mode_valid. mode_valid is called with connection_mutex held, so it can safely dereference connector->state. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-11-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_drv.h | 3 - drivers/gpu/drm/i915/intel_hdmi.c | 149 +++++++++----------------------------- 2 files changed, 33 insertions(+), 119 deletions(-) commit 8f647a0148aab626e51a9df3a6ba0a77e7ea6b81 Author: Maarten Lankhorst Date: Mon May 1 15:38:01 2017 +0200 drm/i915: Convert intel_dp properties to atomic, v2. intel_dp supports 3 properties, scaling mode, broadcast rgb and force_audio. intel_digital_connector handles the plumbing, so we only have to hook this up in compute_config and init. Changes since v1: - Remove limited_color_range too, unused. (danvet) Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-10-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 105 ++++----------------------------------- drivers/gpu/drm/i915/intel_drv.h | 3 -- 2 files changed, 11 insertions(+), 97 deletions(-) commit e6b72c949376ca7a594ea585e6c8d85053fbe440 Author: Maarten Lankhorst Date: Mon May 1 15:38:00 2017 +0200 drm/i915: Make intel_dp->has_audio reflect hw state only Always detect if audio is available during edid detection. With less magic switching it's easier to convert the dp connector properties to atomic. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-9-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) commit ca937582d9b2e2d041fb8a9f087a93cd62f00c2f Author: Maarten Lankhorst Date: Mon May 1 15:37:59 2017 +0200 drm/i915: Convert LVDS connector properties to atomic. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-8-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_lvds.c | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) commit ba14a1adae2f786cf6f14b815330558efacdc0df Author: Maarten Lankhorst Date: Mon May 1 15:37:58 2017 +0200 drm/i915: Convert DSI connector properties to atomic. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-7-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_dsi.c | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) commit 11c1a9ec25e0bfb59c240f6a43b31defd6d6e821 Author: Maarten Lankhorst Date: Mon May 1 15:37:57 2017 +0200 drm/i915: Add plumbing for digital connector state, v3. Some atomic properties are common between the various kinds of connectors, for example a lot of them use panel fitting mode. It makes sense to put a lot of it in a common place, so each connector can use it while they're being converted. Implement the properties required for the connectors: - scaling mode property - force audio property - broadcast rgb - aspect ratio While at it, make clear that intel_digital_connector_atomic_get_property is a hack that has to be removed when all connector properties are converted to atomic. Changes since v1: - Scaling mode and aspect ratio are partly handled in core now. Changes since v2: - Split out the scaling mode / aspect ratio changes to a preparation patch. - Use mode_changed for panel fitter, changes to this property are checked by fastset. - Allowed_scaling_modes is removed, handled through core now. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-6-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_atomic.c | 131 +++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_display.c | 14 +++- drivers/gpu/drm/i915/intel_drv.h | 23 ++++++ 3 files changed, 159 insertions(+), 9 deletions(-) commit 8b45330ad30193a6e4925ae4d36565fb817533fc Author: Maarten Lankhorst Date: Mon May 1 15:37:56 2017 +0200 drm/i915: Use per-connector scaling mode property None of the intel connectors can use all types of scaling modes, so only try the ones that are possible. This is another preparation for connectors towards conversion to atomic. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-5-maarten.lankhorst@linux.intel.com [mlankhorst: Use renamed drm_connector_attach_scaling_mode_property function] drivers/gpu/drm/i915/intel_dp.c | 29 ++++++++++++----------------- drivers/gpu/drm/i915/intel_dsi.c | 28 +++++++++++----------------- drivers/gpu/drm/i915/intel_lvds.c | 17 ++++++----------- 3 files changed, 29 insertions(+), 45 deletions(-) commit 905e46acd3272d04566fec49afbd7ad9e2ed9ae3 Author: Bhumika Goyal Date: Sat May 27 20:16:15 2017 +0530 ALSA: declare snd_kcontrol_new structures as const Declare snd_kcontrol_new structures as const as they are only passed an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Cross compiled these files: sound/aoa/codecs/tas.c - powerpc sound/mips/{hal2.c/sgio2audio.c} - mips sound/ppc/{awacs.c/beep.c/tumbler.c} - powerpc sound/soc/sh/siu_dai.c - sh Could not find an architecture to compile sound/sh/aica.c. Signed-off-by: Bhumika Goyal Acked-by: Mark Brown Signed-off-by: Takashi Iwai sound/aoa/codecs/tas.c | 14 +++++++------- sound/aoa/fabrics/layout.c | 8 ++++---- sound/core/ctljack.c | 2 +- sound/drivers/vx/vx_mixer.c | 24 ++++++++++++------------ sound/firewire/bebob/bebob_maudio.c | 8 ++++---- sound/mips/hal2.c | 4 ++-- sound/mips/sgio2audio.c | 14 +++++++------- sound/pcmcia/vx/vxp_mixer.c | 4 ++-- sound/ppc/awacs.c | 4 ++-- sound/ppc/beep.c | 2 +- sound/ppc/tumbler.c | 8 ++++---- sound/sh/aica.c | 4 ++-- sound/soc/sh/siu_dai.c | 4 ++-- sound/usb/mixer_quirks.c | 2 +- 14 files changed, 51 insertions(+), 51 deletions(-) commit eead06dff9c34699f0e6c16fc6d6d4f105008336 Author: Maarten Lankhorst Date: Mon May 1 15:37:55 2017 +0200 drm/i915: Use atomic scaling_mode instead of panel.fitting_mode The first step in converting connector properties to atomic is wiring up the atomic state. We're still not completely supoprting the scaling mode in the atomic case, but this is the first step towards it. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-4-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 13 +++++-------- drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_dsi.c | 11 +++++------ drivers/gpu/drm/i915/intel_lvds.c | 11 +++++------ 4 files changed, 15 insertions(+), 21 deletions(-) commit 7dbcbce9f55141d775c0a227e55bc78eb1ac672b Author: Jose Abreu Date: Thu May 25 15:19:18 2017 +0100 drm/bridge: analogix-anx78xx: Use bridge->mode_valid() callback Now that we have a callback to check if bridge supports a given mode we can use it in Analogix bridge so that we restrict the number of probbed modes to the ones we can actually display. Also, there is no need to use mode_fixup() callback as mode_valid() will handle the mode validation. Reviewed-by: Neil Armstrong Signed-off-by: Jose Abreu Cc: Carlos Palminha Cc: Daniel Vetter Cc: Archit Taneja Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: David Airlie Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1d0ed1858ae56c827bd09cc1fa6ff4a05d1530eb.1495720737.git.joabreu@synopsys.com drivers/gpu/drm/bridge/analogix-anx78xx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7e715c2d9c27c23f3187454157c58cf292ed103e Author: Sudip Mukherjee Date: Wed May 17 21:55:07 2017 +0100 backlight: Report error on failure It is possible to update the backlight power and the brightness using the sysfs and on writing it either returns the count or if the callback function does not exist then returns the error code 'ENXIO'. We have a situation where the userspace client is writing to the sysfs to update the power and since the callback function exists the client receives the return value as count and considers the operation to be successful. That is correct as the write to the sysfs was successful. But there is no way to know if the actual operation was done or not. backlight_update_status() returns the error code if it fails. Pass that to the userspace client who is trying to update the power so that the client knows that the operation failed. Signed-off-by: Sudip Mukherjee Acked-by: Daniel Thompson Signed-off-by: Lee Jones drivers/video/backlight/backlight.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 7d2fdaa694c596671c0d1d8d625966f7eb8cdea8 Author: Chris Packham Date: Tue May 30 09:21:40 2017 +1200 EDAC, mv64x60: Check driver registration success Check the return status of platform_driver_register() in mv64x60_edac_init(). Only output messages and initialise the edac_op_state if the registration is successful. Signed-off-by: Chris Packham Cc: linux-edac Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170529212142.25572-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Borislav Petkov drivers/edac/mv64x60_edac.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5d473fedd17ae3a9f92fb35551e307d01459ea6a Author: Bjorn Andersson Date: Sat May 27 14:59:27 2017 -0700 mac80211: Invoke TX LED in more code paths ieee80211_tx_status() is only one of the possible ways a driver can report a handled packet, some drivers call this for every packet while others calls it rarely or never. In order to invoke the TX LED in the non-status reporting cases this patch pushes the call to ieee80211_led_tx() into ieee80211_report_used_skb(), which is shared between the various code paths. Signed-off-by: Bjorn Andersson Signed-off-by: Johannes Berg net/mac80211/status.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e45a79da863c199d7c47b1ee6d33cee23c89eac1 Author: Johannes Berg Date: Wed May 24 09:07:47 2017 +0200 skbuff/mac80211: introduce and use skb_put_zero() This pattern was introduced a number of times in mac80211 just now, and since it's present in a number of other places it makes sense to add a little helper for it. This just adds the helper and transforms the mac80211 code, a later patch will transform other places. Acked-by: David S. Miller Signed-off-by: Johannes Berg include/linux/skbuff.h | 9 +++++++++ net/mac80211/mesh.c | 9 +++------ net/mac80211/mesh_plink.c | 3 +-- 3 files changed, 13 insertions(+), 8 deletions(-) commit d8197317f172193b12fbaa75a653e7caa0614738 Author: Kai Chen Date: Tue May 23 14:58:12 2017 -0700 drm/i915: Remove decoupled MMIO code This is a follow-up patch to the previous patch ([PATCH[1/2] drm/i915: Disable decoupled MMIO) to remove the dead code for decoupled MMIO implementation, as it won't be used any longer on GEN9LP. Therefore, this patch reverts: commit 85ee17ebeedd1af0dccd98f82ab4e644e29d84c0 Author: Praveen Paneri Date: Tue Nov 15 22:49:20 2016 +0530 drm/i915/bxt: Broxton decoupled MMIO Signed-off-by: Kai Chen Reviewed-by: Tvrtko Ursulin Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170523215812.18328-3-kai.chen@intel.com drivers/gpu/drm/i915/i915_drv.h | 3 - drivers/gpu/drm/i915/i915_reg.h | 7 -- drivers/gpu/drm/i915/intel_uncore.c | 126 ------------------------------------ 3 files changed, 136 deletions(-) commit 4a78cc644eed3cf2dae00c3a959910a86c140fd6 Author: Boris Brezillon Date: Fri May 26 17:10:15 2017 +0200 mtd: nand: Make sure drivers not supporting SET/GET_FEATURES return -ENOTSUPP A lot of drivers are providing their own ->cmdfunc(), and most of the time this implementation does not support all possible NAND operations. But since ->cmdfunc() cannot return an error code, the core has no way to know that the operation it requested is not supported. This is a problem we cannot address for all kind of operations with the current design, but we can prevent these silent failures for the GET/SET FEATURES operation by overloading the default ->onfi_{set,get}_features() methods with one returning -ENOTSUPP. Reported-by: Chris Packham Signed-off-by: Boris Brezillon Tested-by: Chris Packham drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c | 2 ++ drivers/mtd/nand/cafe_nand.c | 2 ++ drivers/mtd/nand/denali.c | 2 ++ drivers/mtd/nand/docg4.c | 2 ++ drivers/mtd/nand/fsl_elbc_nand.c | 2 ++ drivers/mtd/nand/fsl_ifc_nand.c | 2 ++ drivers/mtd/nand/hisi504_nand.c | 2 ++ drivers/mtd/nand/mpc5121_nfc.c | 2 ++ drivers/mtd/nand/nand_base.c | 19 +++++++++++++++++++ drivers/mtd/nand/pxa3xx_nand.c | 2 ++ drivers/mtd/nand/qcom_nandc.c | 2 ++ drivers/mtd/nand/sh_flctl.c | 2 ++ drivers/mtd/nand/vf610_nfc.c | 2 ++ drivers/staging/mt29f_spinand/mt29f_spinand.c | 2 ++ include/linux/mtd/nand.h | 5 +++++ 15 files changed, 50 insertions(+) commit 0051c10acabb631cfd439eae73289e6e4c39b2b7 Author: Kai Chen Date: Tue May 23 14:58:11 2017 -0700 drm/i915: Disable decoupled MMIO The decoupled MMIO feature doesn't work as intended by HW team. Enabling it with forcewake will only make debugging efforts more difficult, so let's disable it. Fixes: 85ee17ebeedd ("drm/i915/bxt: Broxton decoupled MMIO") Cc: Zhe Wang Cc: Praveen Paneri Cc: Tvrtko Ursulin Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v4.10+ Signed-off-by: Kai Chen Reviewed-by: Tvrtko Ursulin Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170523215812.18328-2-kai.chen@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 - 1 file changed, 1 deletion(-) commit faf94a0883cedce892ef10a258c9388929462525 Author: Jose Abreu Date: Thu May 25 15:19:16 2017 +0100 drm: Use mode_valid() in atomic modeset This patches makes use of the new mode_valid() callbacks introduced previously to validate the full video pipeline when modesetting. This calls the connector->mode_valid(), encoder->mode_valid(), bridge->mode_valid() and crtc->mode_valid() so that we can make sure that the mode will be accepted in every components. Signed-off-by: Jose Abreu Reviewed-by: Daniel Vetter Reviewed-by: Andrzej Hajda Cc: Carlos Palminha Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Dave Airlie Cc: Andrzej Hajda Cc: Archit Taneja Cc: Laurent Pinchart Changes v1->v2: - Removed call to connector->mode_valid (Ville, Daniel) - Changed function name (Ville) - Use for_each_new_connector_in_state (Ville) - Do not validate if connector and mode didn't change (Ville) - Use new helpers to call mode_valid Signed-off-by: Jose Abreu Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/a457d6a69ad07b3936304653c919068c430c0857.1495720737.git.joabreu@synopsys.com drivers/gpu/drm/drm_atomic_helper.c | 76 +++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 3 deletions(-) commit 97f973d652602425f4dc31a13e8605d5841afe25 Author: Jose Abreu Date: Thu May 25 15:19:15 2017 +0100 drm: Use new mode_valid() helpers in connector probe helper This changes the connector probe helper function to use the new encoder->mode_valid(), bridge->mode_valid() and crtc->mode_valid() helper callbacks to validate the modes. The new callbacks are optional so the behaviour remains the same if they are not implemented. If they are, then the code loops through all the connector's encodersXbridgesXcrtcs and calls the callback. If at least a valid encoderXbridgeXcrtc combination is found which accepts the mode then the function returns MODE_OK. Signed-off-by: Jose Abreu Reviewed-by: Daniel Vetter Cc: Carlos Palminha Cc: Dave Airlie Cc: Andrzej Hajda Cc: Laurent Pinchart Changes v3->v4: - Change function name (Laurent) Changes v2->v3: - Call also bridge->mode_valid (Daniel) Changes v1->v2: - Use new helpers suggested by Ville - Change documentation (Daniel) Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/d4e3ba87d822fa92f1b8773e441b9a02af3bde71.1495720737.git.joabreu@synopsys.com drivers/gpu/drm/drm_probe_helper.c | 67 +++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 4 deletions(-) commit b1240f81a1865670e44d25593e47c2023a20ab62 Author: Jose Abreu Date: Thu May 25 15:19:14 2017 +0100 drm: Introduce drm_bridge_mode_valid() Introduce a new helper function which calls mode_valid() callback for all bridges in an encoder chain. Signed-off-by: Jose Abreu Reviewed-by: Daniel Vetter Cc: Carlos Palminha Cc: Ville Syrjälä Cc: Dave Airlie Cc: Andrzej Hajda Cc: Archit Taneja Cc: Laurent Pinchart Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/36bd5e054496ad3c9c71f1ffe204f28533f55f1e.1495720737.git.joabreu@synopsys.com drivers/gpu/drm/drm_bridge.c | 33 +++++++++++++++++++++++++++++++++ include/drm/drm_bridge.h | 2 ++ 2 files changed, 35 insertions(+) commit da251bf8f93513519a3c18b2b2290557ea5ba860 Author: Jose Abreu Date: Thu May 25 15:19:13 2017 +0100 drm: Add drm_{crtc/encoder/connector}_mode_valid() Add a new helper to call crtc->mode_valid, connector->mode_valid and encoder->mode_valid callbacks. Suggested-by: Ville Syrjälä Signed-off-by: Jose Abreu Reviewed-by: Daniel Vetter Reviewed-by: Andrzej Hajda Cc: Carlos Palminha Cc: Dave Airlie Changes v2->v3: - Move helpers to drm_probe_helper.c (Daniel) - Squeeze patches that introduce helpers into a single one (Daniel) Signed-off-by: Jose Abreu [danvet: Make it compile when CONFIG_DRM_DP_AUX_CHARDEV is selected.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/b55c8bd029da219ff04e39086025c115731a49b1.1495720737.git.joabreu@synopsys.com drivers/gpu/drm/drm_crtc_helper_internal.h | 12 ++++++++++ drivers/gpu/drm/drm_probe_helper.c | 38 ++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit ba6ab3b359c86a762f621de8fc6ba5a229aef23f Author: Arvind Yadav Date: Wed May 24 12:19:06 2017 +0530 dmaengine: imx-sdma: Fix compilation warning. Replace '%d' by '%zu' to fix the following compilation warning:- drivers/dma/imx-sdma.c: In function ‘sdma_prep_dma_cyclic’: drivers/dma/imx-sdma.c:1327:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=] channel, period_len, 0xffff); ^ drivers/dma/imx-sdma.c:1350:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=] dev_dbg(sdma->dev, "entry %d: count: %d dma: %#llx %s%s\n", Signed-off-by: Arvind Yadav Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb9caf370f4d0457789d13a1a1b110a8db846e5e Author: Arvind Yadav Date: Wed May 24 12:09:53 2017 +0530 dmaengine: imx-sdma: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 4d6d74e22096543cb3b35e717cf1b9aea3655f37 Author: Robin Murphy Date: Fri May 19 15:06:44 2017 +0100 dmaengine: pl330: Add IOMMU support to slave tranfers Wire up dma_map_resource() for slave transfers, so that we can let the PL330 use IOMMU-backed DMA mapping ops on systems with an appropriate IOMMU and RAM above 4GB, to avoid CPU bounce buffering. Signed-off-by: Robin Murphy Signed-off-by: Vinod Koul drivers/dma/pl330.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 9 deletions(-) commit 2a1720376adda5ecf8e636fbfb05339c7dad1c55 Merge: a82256b 5ed02db Author: Dave Airlie Date: Tue May 30 15:54:15 2017 +1000 Backmerge tag 'v4.12-rc3' into drm-next Linux 4.12-rc3 Daniel has requested this for some drm-intel-next work. commit a82256bc026722800d1fdeca5521f1ba487bc2ef Merge: 1afc454 cd9f468 Author: Dave Airlie Date: Tue May 30 15:25:28 2017 +1000 Merge tag 'drm-intel-next-2017-05-29' of git://anongit.freedesktop.org/git/drm-intel into drm-next More stuff for 4.13: - skl+ wm fixes from Mahesh Kumar - some refactor and tests for i915_sw_fence (Chris) - tune execlist/scheduler code (Chris) - g4x,g33 gpu reset improvements (Chris, Mika) - guc code cleanup (Michal Wajdeczko, Michał Winiarski) - dp aux backlight improvements (Puthikorn Voravootivat) - buffer based guc/host communication (Michal Wajdeczko) * tag 'drm-intel-next-2017-05-29' of git://anongit.freedesktop.org/git/drm-intel: (253 commits) drm/i915: Update DRIVER_DATE to 20170529 drm/i915: Keep the forcewake timer alive for 1ms past the most recent use drm/i915/guc: capture GuC logs if FW fails to load drm/i915/guc: Introduce buffer based cmd transport drm/i915/guc: Disable send function on fini drm: Add definition for eDP backlight frequency drm/i915: Drop AUX backlight enable check for backlight control drm/i915: Consolidate #ifdef CONFIG_INTEL_IOMMU drm/i915: Only GGTT vma may be pinned and prevent shrinking drm/i915: Serialize GTT/Aperture accesses on BXT drm/i915: Convert i915_gem_object_ops->flags values to use BIT() drm/i915/selftests: Silence compiler warning in igt_ctx_exec drm/i915/guc: Skip port assign on first iteration of GuC dequeue drm/i915: Remove misleading comment in request_alloc drm/i915/g33: Improve reset reliability Revert "drm/i915: Restore lost "Initialized i915" welcome message" drm/i915/huc: Update GLK HuC version drm/i915: Check for allocation failure drm/i915/guc: Remove action status and statistics from debugfs drm/i915/g4x: Improve gpu reset reliability ... commit 83a092cf95f28696ddc36c8add0cf03ac034897f Author: Nicholas Piggin Date: Fri May 12 03:40:40 2017 +1000 powerpc: Link warning for orphan sections Add --orphan-handling=warn to final link flags. This ensures we can handle all sections explicitly. This would have caught subtle breakage such as 7de3b27bac47da9de08409df1d69664acbb72197 at build-time. Also bring existing orphan sections into the fold: - .text.hot and .text.unlikely are compiler generated sections. - .sdata2, .dynsbss, .plt are used by PPC32 - We previously did not specify DWARF_DEBUG or STABS_DEBUG - DWARF_DEBUG did not include all DWARF sections that can be emitted - A number of sections are unused and can be discarded. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 1 + arch/powerpc/kernel/vmlinux.lds.S | 16 ++++++++++++++-- include/asm-generic/vmlinux.lds.h | 12 ++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) commit c494adefef9fcd0de172132e20f102d44c62fa2f Author: Nicholas Piggin Date: Fri May 12 03:40:39 2017 +1000 powerpc/64: Tool to check head sections location sanity Use a tool to check that the location of "fixed sections" are where we expected them to be, which catches cases the linker script can't (stubs being added to start of .text section), and which ends up being neater. Sample output: ERROR: start_text address is c000000000008100, should be c000000000008000 ERROR: see comments in arch/powerpc/tools/head_check.sh Signed-off-by: Nicholas Piggin [mpe: Fold in fix from Nick for 4.6 era toolchains] Signed-off-by: Michael Ellerman arch/powerpc/Makefile.postlink | 8 +++- arch/powerpc/include/asm/head-64.h | 4 +- arch/powerpc/kernel/vmlinux.lds.S | 22 ----------- arch/powerpc/tools/head_check.sh | 78 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+), 25 deletions(-) commit 951eedebcdea06fdcc742c82dc347509ce0e1ba4 Author: Nicholas Piggin Date: Mon May 29 17:39:40 2017 +1000 powerpc/64: Handle linker stubs in low .text code Very large kernels may require linker stubs for branches from HEAD text code. The linker may place these stubs before the HEAD text sections, which breaks the assumption that HEAD text is located at 0 (or the .text section being located at 0x7000/0x8000 on Book3S kernels). Provide an option to create a small section just before the .text section with an empty 256 - 4 bytes, and adjust the start of the .text section to match. The linker will tend to put stubs in that section and not break our relative-to-absolute offset assumptions. This causes a small waste of space on common kernels, but allows large kernels to build and boot. For now, it is an EXPERT config option, defaulting to =n, but a reference is provided for it in the build-time check for such breakage. This is good enough for allyesconfig and custom users / hackers. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 11 +++++++++++ arch/powerpc/include/asm/head-64.h | 18 ++++++++++++++++++ arch/powerpc/kernel/vmlinux.lds.S | 5 +++++ 3 files changed, 34 insertions(+) commit 4ea80652dc75482dca1739762075dd5caa57ae29 Author: Nicholas Piggin Date: Fri May 12 03:40:38 2017 +1000 powerpc/64s: Tool to flag direct branches from unrelocated interrupt vectors Direct banches from code below __end_interrupts to code above __end_interrupts when built with CONFIG_RELOCATABLE are disallowed because they will break when the kernel is not located at 0. Sample output: WARNING: Unrelocated relative branches c000000000000118 bl-> 0xc000000000038fb8 c00000000000013c b-> 0xc0000000001068a4 c000000000000148 b-> 0xc00000000003919c c00000000000014c b-> 0xc00000000003923c c0000000000005a4 b-> 0xc000000000106ffc c000000000001af0 b-> 0xc000000000106ffc c000000000001b24 b-> 0xc000000000106ffc c000000000001b58 b-> 0xc000000000106ffc Signed-off-by: Balbir Singh Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/Makefile.postlink | 9 ++++- arch/powerpc/tools/unrel_branch_check.sh | 57 ++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) commit efe0160cfd40a99c052a00e174787c1f4158a9cd Author: Nicholas Piggin Date: Fri May 12 01:56:52 2017 +1000 powerpc/64: Linker on-demand sfpr functions for modules For final link, the powerpc64 linker generates fpr save/restore functions on-demand, placing them in the .sfpr section. Starting with binutils 2.25, these can be provided for non-final links with --save-restore-funcs. Use that where possible for module links. This saves about 200 bytes per module (~60kB) on powernv defconfig build. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 10 ++++++++++ arch/powerpc/lib/Makefile | 13 ++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) commit cde9f2f4207f769c0f8f0f53a431348ca6f3c182 Author: Nicholas Piggin Date: Fri May 12 01:56:51 2017 +1000 powerpc/64: Do not create new section for save/restore functions There is no need to create a new section for these. Consolidate with 32-bit and just use .text. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/lib/crtsavres.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7c868b66f8cc29bb9a63632b324a6fa661bdec05 Author: Nicholas Piggin Date: Fri May 12 01:56:50 2017 +1000 powerpc/64: Do not link crtsaveres.o in boot crtsaveres.S is empty with 64-bit builds already, so just don't build and link it to match the vmlinux build. Signed-off-by: Nicholas Piggin [mpe: Use CONFIG_PPC64_BOOT_WRAPPER not CONFIG_PPC32 to fix BE build] Signed-off-by: Michael Ellerman arch/powerpc/boot/Makefile | 5 ++++- arch/powerpc/boot/crtsavres.S | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) commit baa25b571a168aff5a13bfdc973f1229e2b12b63 Author: Nicholas Piggin Date: Fri May 12 01:56:49 2017 +1000 powerpc/64: Do not link crtsavres.o in vmlinux The 64-bit linker creates save/restore functions on demand with final links, so vmlinux does not require crtsavres.o. Make crtsavres.o extra-y on 64-bit (it is still required by modules). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/lib/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e8c688251d0e8baca1cd68992c9ef4078a0361c8 Author: Nicholas Piggin Date: Fri May 12 01:56:48 2017 +1000 powerpc/64: Place sfpr section explicitly with the linker script Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/vmlinux.lds.S | 8 ++++++++ 1 file changed, 8 insertions(+) commit 308d263d3f28e816b0d7425ef8b35d69643b7ee0 Author: Stephen Rothwell Date: Fri May 26 18:32:29 2017 +1000 powerpc: Use uapi/asm-generic/sockios.h The arch version is identical except for comments and white space. Signed-off-by: Stephen Rothwell Acked-by: Arnd Bergmann Signed-off-by: Michael Ellerman arch/powerpc/include/uapi/asm/Kbuild | 1 + arch/powerpc/include/uapi/asm/sockios.h | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-) commit b87901e6ec782b881224e1723eb142ff4b61bf70 Author: Stephen Rothwell Date: Fri May 26 16:19:46 2017 +1000 powerpc: Use the asm-generic versions of some uapi includes These are completely obvious as all they do is include the asm-generic versions. Signed-off-by: Stephen Rothwell Acked-by: Arnd Bergmann Signed-off-by: Michael Ellerman arch/powerpc/include/uapi/asm/Kbuild | 5 +++++ arch/powerpc/include/uapi/asm/param.h | 1 - arch/powerpc/include/uapi/asm/poll.h | 1 - arch/powerpc/include/uapi/asm/resource.h | 1 - arch/powerpc/include/uapi/asm/statfs.h | 6 ------ 5 files changed, 5 insertions(+), 9 deletions(-) commit 6e2f03e292ef46eed2b31b0a344a91d514f9cd81 Author: Ivan Mikhaylov Date: Fri May 19 18:47:05 2017 +0300 powerpc/[booke|4xx]: Don't clobber TCR[WP] when setting TCR[DIE] Prevent a kernel panic caused by unintentionally clearing TCR watchdog bits. At this point in the kernel boot, the watchdog may have already been enabled by u-boot. The original code's attempt to write to the TCR register results in an inadvertent clearing of the watchdog configuration bits, causing the 476 to reset. Signed-off-by: Ivan Mikhaylov Signed-off-by: Michael Ellerman arch/powerpc/kernel/time.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 20975a0ae1ccc59a21a149e2fd2964ce88edb0a9 Author: Ivan Mikhaylov Date: Mon May 15 16:07:53 2017 +0300 powerpc/44x/fsp2: Add defconfig for FSP2 board This patch adds default FSP2 config for main usage. Signed-off-by: Ivan Mikhaylov Signed-off-by: Michael Ellerman arch/powerpc/configs/44x/fsp2_defconfig | 126 ++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) commit 9eec6cb142bddd35268c7c59b6c81be6c091aaf9 Author: Ivan Mikhaylov Date: Mon May 15 16:07:52 2017 +0300 powerpc/44x/fsp2: Add device tree for FSP2 board Add a device tree for FSP2 board (476 based). Signed-off-by: Ivan Mikhaylov Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/fsp2.dts | 608 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 608 insertions(+) commit c4b56b023daa91953e9ebe91143e6ca156f0bcb7 Author: Ivan Mikhaylov Date: Mon May 15 16:07:51 2017 +0300 powerpc/44x/fsp2: Platform support for FSP2 (476fpe) board Add platform code support for FSP2 (476fpe) board. Signed-off-by: Ivan Mikhaylov Signed-off-by: Michael Ellerman arch/powerpc/platforms/44x/Kconfig | 12 +++++++ arch/powerpc/platforms/44x/Makefile | 1 + arch/powerpc/platforms/44x/fsp2.c | 62 +++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) commit f9122ee4f5580194014d4ca72092787ae33f29fb Author: Gautham R. Shenoy Date: Tue May 16 14:19:48 2017 +0530 cpuidle-powernv: Allow Deep stop states that don't stop time The current code in the cpuidle-powernv intialization only allows deep stop states (indicated by OPAL_PM_STOP_INST_DEEP) which lose timebase (indicated by OPAL_PM_TIMEBASE_STOP). This assumption goes back to POWER8 time where deep states used to lose the timebase. However, on POWER9, we do have stop states that are deep (they lose hypervisor state) but retain the timebase. Fix the initialization code in the cpuidle-powernv driver to allow such deep states. Further, there is a bug in cpuidle-powernv driver with CONFIG_TICK_ONESHOT=n where we end up incrementing the nr_idle_states even if a platform idle state which loses time base was not added to the cpuidle table. Fix this by ensuring that the nr_idle_states variable gets incremented only when the platform idle state was added to the cpuidle table. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman drivers/cpuidle/cpuidle-powernv.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 22c6663dc69a042a7b4158f162582b4b1ba7a4b7 Author: Gautham R. Shenoy Date: Tue May 16 14:19:47 2017 +0530 powerpc/powernv/idle: Use Requested Level for restoring state on P9 DD1 On Power9 DD1 due to a hardware bug the Power-Saving Level Status field (PLS) of the PSSCR for a thread waking up from a deep state can under-report if some other thread in the core is in a shallow stop state. The scenario in which this can manifest is as follows: 1) All the threads of the core are in deep stop. 2) One of the threads is woken up. The PLS for this thread will correctly reflect that it is waking up from deep stop. 3) The thread that has woken up now executes a shallow stop. 4) When some other thread in the core is woken, its PLS will reflect the shallow stop state. Thus, the subsequent thread for which the PLS is under-reporting the wakeup state will not restore the hypervisor resources. Hence, on DD1 systems, use the Requested Level (RL) field as a workaround to restore the contents of the hypervisor resources on the wakeup from the stop state. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/paca.h | 2 ++ arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/idle_book3s.S | 13 ++++++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) commit 1e1601b38e6e0179fafafc4db2c4ccb71d0854c4 Author: Akshay Adiga Date: Tue May 16 14:19:46 2017 +0530 powerpc/powernv/idle: Restore SPRs for deep idle states via stop API. Some of the SPR values (HID0, MSR, SPRG0) don't change during the run time of a booted kernel, once they have been initialized. The contents of these SPRs are lost when the CPUs enter deep stop states. So instead saving and restoring SPRs from the kernel, use the stop-api provided by the firmware by which the firmware can restore the contents of these SPRs to their initialized values after wakeup from a deep stop state. Apart from these, program the PSSCR value to that of the deepest stop state via the stop-api. This will be used to indicate to the underlying firmware as to what stop state to put the threads that have been woken up by a special-wakeup. And while we are at programming SPRs via stop-api, ensure that HID1, HID4 and HID5 registers which are only available on POWER8 are not requested to be restored by the firware on POWER9. Signed-off-by: Akshay Adiga Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 83 ++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 31 deletions(-) commit cb0be7ec03077a31712183bfbe7801061e2966b8 Author: Gautham R. Shenoy Date: Tue May 16 14:19:45 2017 +0530 powerpc/powernv/idle: Restore LPCR on wakeup from deep-stop On wakeup from a deep stop state which is supposed to lose the hypervisor state, we don't restore the LPCR to the old value but set it to a "sane" value via cur_cpu_spec->cpu_restore(). The problem is that the "sane" value doesn't include UPRT and the HR bits which are required to run correctly in Radix mode. Fix this on POWER9 onwards by restoring the LPCR value whatever it was before executing the stop instruction. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit ec4867355244755fb5c06037ad2fff760701b465 Author: Gautham R. Shenoy Date: Tue May 16 14:19:44 2017 +0530 powerpc/powernv/idle: Decouple Timebase restore & Per-core SPRs restore On POWER8, in case of - nap: both timebase and hypervisor state is retained. - fast-sleep: timebase is lost. But the hypervisor state is retained. - winkle: timebase and hypervisor state is lost. Hence, the current code for handling exit from a idle state assumes that if the timebase value is retained, then so is the hypervisor state. Thus, the current code doesn't restore per-core hypervisor state in such cases. But that is no longer the case on POWER9 where we do have stop states in which timebase value is retained, but the hypervisor state is lost. So we have to ensure that the per-core hypervisor state gets restored in such cases. Fix this by ensuring that even in the case when timebase is retained, we explicitly check if we are waking up from a deep stop that loses per-core hypervisor state (indicated by cr4 being eq or gt), and if this is the case, we restore the per-core hypervisor state. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5f221c3ca13dceaea8eefe21dbd85da91ed9b1e8 Author: Gautham R. Shenoy Date: Tue May 16 14:19:43 2017 +0530 powerpc/powernv/idle: Correctly initialize core_idle_state_ptr The lower 8 bits of core_idle_state_ptr tracks the number of non-idle threads in the core. This is supposed to be initialized to bit-map corresponding to the threads_per_core. However, currently it is initialized to PNV_CORE_IDLE_THREAD_BITS (0xFF). This is correct for POWER8 which has 8 threads per core, but not for POWER9 which has 4 threads per core. As a result, on POWER9, core_idle_state_ptr gets initialized to 0xFF. In case when all the threads of the core are idle, the bits corresponding tracking the idle-threads are non-zero. As a result, the idle entry/exit code fails to save/restore per-core hypervisor state since it assumes that there are threads in the cores which are still active. Fix this by correctly initializing the lower bits of the core_idle_state_ptr on the basis of threads_per_core. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 518470fe962e23ca69a818e1e507eb4d28b6b09b Author: Anton Blanchard Date: Fri May 19 15:46:41 2017 +1000 powerpc: Add HAVE_IRQ_TIME_ACCOUNTING Allow us to enable IRQ_TIME_ACCOUNTING. Even though we currently use VIRT_CPU_ACCOUNTING_NATIVE, that option is quite heavy weight and IRQ_TIME_ACCOUNTING might be better in some cases. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 70a92003de599ff2f15815b3d9c4459411ca4ebf Author: Pavel Machek Date: Sun Apr 2 12:05:36 2017 +0200 powerpc/sequoia: Fix NAND partitions not to overlap Currently the DTS defines two partitions at the same addresses, if you use one, you will corrupt information on the other one. Fix it by shifting the second partition. Signed-off-by: Pavel Machek [mpe: Reconstruct change log from email thread] Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/sequoia.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3f952df3c6d205fe3b1e0e4848d3c3db4a28ef0 Author: Andrew Jeffery Date: Fri May 12 13:28:10 2017 +0930 powerpc: Tweak copy selection parameter in __copy_tofrom_user_power7() Experiments with the netperf benchmark indicated that the size selecting VMX-based copies in __copy_tofrom_user_power7() was suboptimal on POWER8. Measurements showed that parity was in the neighbourhood of 3328 bytes, rather than greater than 4096. The change gives a 1.5-2.0% improvement in performance for 4096-byte buffers, reducing the relative time spent in __copy_tofrom_user_power7() from approximately 7% to approximately 5% in the TCP_RR benchmark. Signed-off-by: Andrew Jeffery Acked-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/lib/copyuser_power7.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09b6c1129f899c72d70b8bea36020644aa3b5a28 Author: Nicholas Piggin Date: Fri May 12 10:47:07 2017 +1000 powerpc/xmon: Fix compile error with PPC_8xx=y Rearrange the code so that mode and badaddr are only defined when they're used. Also unsplit the string for easier grepping, and switch from CONFIG_8xx which is deprecated to CONFIG_PPC_8xx. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 67d20418088680d22037119d914982cd982b5c5a Author: Nicholas Piggin Date: Fri May 12 01:15:20 2017 +1000 powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error Fixes: a7cd88da97 ("powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c") Cc: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Acked-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 2 ++ 1 file changed, 2 insertions(+) commit c07e1b8a27a1419cdd4af7a1def26d12bb24d2b1 Author: Nicholas Piggin Date: Mon May 1 22:01:10 2017 +1000 powerpc/64s: Fix OPAL_CALL non-maskable interrupt reentrancy OPAL_CALL uses SRR[01] with MSR_RI=1, which gets corrupted if there is an interleaving system reset or machine check interrupt. Use HSRR[01] instead, which does not require MSR_RI=0. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-wrappers.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f1fe5252018075e18d7f0c0e23ee173546420361 Author: Nicholas Piggin Date: Mon May 1 22:01:09 2017 +1000 powerpc/64s: Fix FIXUP_ENDIAN non-maskable interrupt reentrancy FIXUP_ENDIAN uses SRR[01] with MSR_RI=1, which gets corrupted if there is an interleaving system reset or machine check interrupt. Set MSR_RI=0 before setting SRRs. The rfid will restore MSR. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/boot/ppc_asm.h | 12 +++++++----- arch/powerpc/include/asm/ppc_asm.h | 11 +++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) commit 32a62b9441d840e676d55b45468371c252a4fa01 Author: Dan Carpenter Date: Mon May 29 20:21:52 2017 -0700 Input: synaptics-rmi4 - change a char type to u8 Smatch doesn't like when we use "%02X" to print char types because, what about if it's a negative? Signed-off-by: Dan Carpenter Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f34v7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79ffd5f98c11572c004d52f7ecd270ab680a7f72 Author: Dmitry Torokhov Date: Fri May 26 16:55:10 2017 -0700 Input: sparse-keymap - remove sparse_keymap_free() Now that all users of sparse_keymap_free() are gone we can remove the stub. Signed-off-by: Dmitry Torokhov drivers/input/sparse-keymap.c | 14 -------------- include/linux/input/sparse-keymap.h | 1 - 2 files changed, 15 deletions(-) commit d8f797c60661a90ee26ca9330cf85ede9aa2ec17 Merge: 8fd7081 5ed02db Author: Dmitry Torokhov Date: Mon May 29 19:54:21 2017 -0700 Merge tag 'v4.12-rc3' into next Sync with mainline to bring in changes in platform drovers dropping calls to sparse_keymap_free() so that we can remove it for good. commit d717f7352ec6a91d17c6a3e681beb4fc1d57af91 Author: Shawn Lin Date: Wed May 24 08:34:49 2017 +0800 arm64: dts: rockchip: add sdmmc/sdio/emmc nodes for RK3328 SoCs This patch adds sdmmc, sdio, emmc nodes for Rockchip RK3328 SoCs. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328.dtsi | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 71c17b06ef7dd23a09725827303e6ed19bf16cce Author: Jan Kiszka Date: Fri May 26 15:17:47 2017 +0200 leds: trigger: gpio: Use threaded IRQ This both simplifies the code because we can drop the workqueue indirection, and it enables using the trigger for GPIOs that work with threaded IRQs themselves. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Jacek Anaszewski drivers/leds/trigger/ledtrig-gpio.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit 71afe3cb1e8fdf89556047e03bcbcd731f1ab108 Author: Jan Kiszka Date: Fri May 26 15:17:46 2017 +0200 leds: trigger: gpio: Refresh LED state after GPIO change The new GPIO may have a different state than the old one. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Jacek Anaszewski drivers/leds/trigger/ledtrig-gpio.c | 2 ++ 1 file changed, 2 insertions(+) commit 18e51064c42ca3945b94dd4652156b62457962bc Author: Daniel Vetter Date: Wed May 24 16:51:37 2017 +0200 drm: Remove drm_device->virtdev This is a leftover from the drm_bus days, where we've had a bus-specific device type for every bus type in drm_device. Except for pci (which we can't remove because dri1 drivers) this is all gone. And the virt driver also doesn't really need it, dev_to_virtio works perfectly fine. Cc: David Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Reviewed-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-3-daniel.vetter@ffwll.ch drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 1 - drivers/gpu/drm/virtio/virtgpu_kms.c | 4 ++-- include/drm/drmP.h | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) commit 4196be5ba0b0f394ecee1cd1fde945034f943556 Author: Martin Schiller Date: Mon May 29 06:08:38 2017 +0200 pinctrl: xway: fix copy/paste error in xrx200_grps Signed-off-by: Martin Schiller Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-xway.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48f471c7009238485bef0a085736f21703fd388d Author: Icenowy Zheng Date: Sat May 27 18:23:03 2017 +0800 dt-bindings: add compatible string for Allwinner R40 pinctrl Allwinner R40 has a pin controller like the ones in older Allwinner SoCs (especially A20), and can use modified version of the A10/A20 pinctrl driver. Add a compatible string for it. Signed-off-by: Icenowy Zheng Acked-by: Rob Herring Reviewed-by: Chen-Yu Tsai Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + 1 file changed, 1 insertion(+) commit 56efa62fcf47df868a7c10c77578aec5fe6dba5f Author: Icenowy Zheng Date: Sat May 27 18:23:02 2017 +0800 pinctrl: sunxi: drop dedicated A20 driver As we added A20 support to A10 pinctrl driver, now we can delete the dedicated A20 pinctrl driver, which is duplicated code. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai [Drop Makefile entry] Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 4 - drivers/pinctrl/sunxi/Makefile | 1 - drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c | 1056 ----------------------------- 3 files changed, 1061 deletions(-) commit 5d8d349618a9464714c07414c5888bfd9416638f Author: Icenowy Zheng Date: Sat May 27 18:23:01 2017 +0800 pinctrl: sunxi: add A20 support to A10 driver As A20 is designed as a pin-compatible upgrade of A10, their pin controller are very similar, and can share one driver. Add A20 support to the A10 driver. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 4 +- drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 287 +++++++++++++++++++++++------- 2 files changed, 226 insertions(+), 65 deletions(-) commit 88798ba2f125e3b3c2b22273b5b0f4a81b391977 Author: Icenowy Zheng Date: Sat May 27 18:23:00 2017 +0800 pinctrl: sunxi: Add SoC ID definitions for A10, A20 and R40 SoCs Allwinner A10, A20 and R40 SoCs have similar GPIO layout. Add SoC definitions in pinctrl-sunxi.h, in order to merge A20 support into A10 driver, and add R40 support into it. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.h | 3 +++ 1 file changed, 3 insertions(+) commit 57d14635f976404fac165047389ff0dbe83bcd5b Author: Stefan Wahren Date: Fri May 26 00:26:26 2017 +0200 staging: vchiq_core: Replace remaining BUG_ON with WARN_ON This replaces all remaining BUG_ON with WARN_ON. So in case of a VCHIQ bug the system is still usable. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d1eab9dec6108e68d43d869a3b6645cc1df3fa9d Author: Stefan Wahren Date: Fri May 26 00:26:25 2017 +0200 staging: vchiq_core: Bail out in case of invalid tx_pos Properly handle the error case in case of an invalid tx_pos. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6f2370d260c4dc6eba1de2b4f55786f99abf937c Author: Stefan Wahren Date: Fri May 26 00:26:24 2017 +0200 staging: vchiq_core: Don't BUG if process is unexpected Bail out properly if the process index doesn't match the remote insert. We also drop the BUG in case the process index is at local insert, so we can trigger the WARN_ON again some steps later. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 5d1a94bb284c8d97b056e8025169609e78b7052f Author: Stefan Wahren Date: Fri May 26 00:26:23 2017 +0200 staging: vchiq_core: Bail out if ref_count is unexpected If the ref counter of service has an unexpected value then we better bail out. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 6b8db0bce33d75b1181e86e55305e1e320102440 Author: Stefan Wahren Date: Fri May 26 00:26:22 2017 +0200 staging: vchiq_core: Bail out if service is NULL In the unlikely case that service is NULL we should bail out instead of calling BUG_ON(). The other BUG_ON calls will be fixed in separate patches. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_core.c | 38 ++++++++++++++-------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 00b9d0f560a6a7b667dda056423b2e50b52e574c Author: Stefan Wahren Date: Fri May 26 00:26:21 2017 +0200 staging: vchiq_core: Don't BUG if sending RESUME fails VCHIQ suspend and resume isn't implemented, but even it was there is no need to call BUG(). Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 1 - 1 file changed, 1 deletion(-) commit 359afaccd97e6257bcda29efa4e83375d9a2cc34 Author: Stefan Wahren Date: Fri May 26 00:26:20 2017 +0200 staging: vchiq_core: Bailout if VCHIQ state is already initialized In case VCHIQ state is already initialized we need to bailout in order to aovid a memory leak. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7c35c6af0cd6896f6e293cf617a5e27116735e5b Author: Stefan Wahren Date: Fri May 26 00:26:19 2017 +0200 staging: vchiq_core: Simplify VCHIQ init Since the ARM side of VCHIQ support only 1 state, we could simplify the init code. This makes it possible to avoid BUG_ON and a theoretical overflow of id. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 244156ca90dceaec2bda8f9b664489d23a5b451f Author: Stefan Wahren Date: Fri May 26 00:26:18 2017 +0200 staging: vchiq_2835_arm: Use PAGE_MASK macro Use the PAGE_MASK instead of open code it. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 025f69ade93952e9415ea5c5f48d729b03e04dfc Author: Stefan Wahren Date: Fri May 26 00:26:17 2017 +0200 staging: vchiq_2835_arm: Handle vmalloc_to_page error case In case vmalloc_to_page returns NULL create_pagelist must abort imediatly. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 804980adb9791e8b2449250c2a82d200a603835c Author: Stefan Wahren Date: Fri May 26 00:26:16 2017 +0200 staging: vchiq_2835_arm: Fix function name cleaup_pagelistinfo Assuming the intension of the function is to clean up, so fix the function name accordingly. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b322396ce804e29804ee84ce17b94baf26fda169 Author: Stefan Wahren Date: Fri May 26 00:26:15 2017 +0200 staging: vchiq_arm: Avoid multiline dereference Reduce the indentation within vchiq_dump_service_use_state in order to avoid a multiline derefernce. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 42a6bd8f77be378d7b014248d559a1624705646d Author: Stefan Wahren Date: Fri May 26 00:26:14 2017 +0200 staging: vchiq_arm: Fix variable names in comment This comment was apparently forgotten in the correction of CamelCase. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76262b2951948d03c85dd2659cfa2e0dc8584ef8 Author: Stefan Wahren Date: Fri May 26 00:26:13 2017 +0200 staging: vchiq_2835_arm: Remove unnecessary assignment to slot_mem_size The variable slot_mem_size is assigned a value which is never used. This issue has been found by CppCheck. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 1 - 1 file changed, 1 deletion(-) commit 158ef80a8741e55c0214c174509b42bc5de6c7e1 Author: Stefan Wahren Date: Fri May 26 00:26:12 2017 +0200 staging: vchiq_2835_arm: Reduce scope of i in free_pagelist We can reduce the scope of the counting variable i. This has been found by CppCheck. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d3de2bb882544798eae3958cfb458b1fe001988b Author: Stefan Wahren Date: Fri May 26 00:26:11 2017 +0200 staging: vchiq_core: Use return value of mutex_lock_killable directly Instead of saving the return value of mutex_lock_killable in a local variable we could use the value directly. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5b29aaaa1e3c33829ab19a0da43fa637f0685603 Author: Juliana Rodrigues Date: Fri May 26 22:02:03 2017 -0300 staging: rtl8188eu: removes comparison to null This patch fixes multiple comparison to NULL checkpatch errors by rewriting the conditional as a negation. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b2f98d02c72bb6c8db445291f97ab0a500bfb3e5 Author: Juliana Rodrigues Date: Fri May 26 22:01:26 2017 -0300 staging: rtl8188eu: removed unnecessary blank lines Removes numerous unnecessary blank lines in order to fix checkpatch styling issues. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 41 +------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) commit 3e63e934f7ebc9c9ad1d854dafe5fa30e2f4512c Author: Juliana Rodrigues Date: Fri May 26 22:00:54 2017 -0300 staging: rtl8188eu: removed unnecessary parentheses This patch removes numerous unnecessary parentheses in order to fix checkpatch styling issues. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit f6da172f21de6551dfe9203767a652ed4b409125 Author: Juliana Rodrigues Date: Fri May 26 22:00:22 2017 -0300 staging: rtl8188eu: removed function names from strings This patch fixes a checkpatch issue caused by using function names inside strings. Those function names were replaced by __func__. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit ae94127b01b411fe9ba0cae2fd7cea170f729c62 Author: Juliana Rodrigues Date: Fri May 26 21:59:48 2017 -0300 staging: rtl8188eu: add spaces around character This patch solves a checkpatch issue caused by not using spaces around an OR sign. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31e6de00485f55a2938420e58a41b756ea1b3da2 Author: Juliana Rodrigues Date: Fri May 26 21:58:35 2017 -0300 staging: rtl8188eu: fixes block comments subsequent lines This patch adds * on block comments subsequent lines, which were causing a checkpatch styling warning. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 34 +++++++++++++++++--------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 74e1e498e84ea957b7fe3d9842f04c346ca2fcbb Author: Juliana Rodrigues Date: Thu May 25 15:30:27 2017 -0300 staging: rtl8188eu: fix comments with lines over 80 characters This patch fixes some checkpatch errors in which comments go over 80 characters per line. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit 9415b671a9b03c602b3b4fb48bb2b341d2d64e30 Author: Szilveszter Székely Date: Thu May 25 19:26:06 2017 +0100 staging: rtl8192u: swap comparison to constant Comparisons should place the constant on the right side of the test This patch fixes coding style issues as reported by checkpatch. Signed-off-by: Szilveszter Székely Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1e5fa9e2607181ba198ffa3f0efe4ad067fda5b4 Author: Ioana Radulescu Date: Wed May 24 07:13:28 2017 -0500 staging: fsl-dpaa2/eth: Map Tx buffers as bidirectional WRIOP hardware may need to write to the hardware annotation area of Tx buffers (e.g. frame status bits) and also to the data area (e.g. L4 checksum in frame header). Map these buffers as DMA_BIDIRECTIONAL, otherwise the write transaction through SMMU will not be allowed. Signed-off-by: Nipun Gupta Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 08eb23974e994a34776e7a83227509d4e4296aa5 Author: Ioana Radulescu Date: Wed May 24 07:13:27 2017 -0500 staging: fsl-dpaa2/eth: Fix address translations Use the correct mechanisms for translating a DMA-mapped IOVA address into a virtual one. Without this fix, once SMMU is enabled on Layerscape platforms, the Ethernet driver throws IOMMU translation faults. Signed-off-by: Nipun Gupta Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 25 +++++++++++++++++++------ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 1 + 2 files changed, 20 insertions(+), 6 deletions(-) commit 3ddf70e15dd740ec17b6fab4e901abb02dbf6291 Author: Derek Robson Date: Wed May 24 16:43:39 2017 +1200 Drivers: ccree: ssi_fips_local.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips_local.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 1a3a8d2e869c997780bd61e592fd9bc5f497aca2 Author: Derek Robson Date: Wed May 24 16:43:26 2017 +1200 Drivers: ccree: ssi_hash.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_hash.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 77f34fc3f5a463c9cbe1b09ea99a616050e84367 Author: Derek Robson Date: Wed May 24 16:43:11 2017 +1200 Drivers: ccree: ssi_hash.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc3d47b3ec037c375101348a6f53e997ef919170 Author: Derek Robson Date: Wed May 24 16:42:57 2017 +1200 Drivers: ccree: ssi_ivgen.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_ivgen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3dc178b164e6bf0d21714917ad5866d59885f91a Author: Derek Robson Date: Wed May 24 16:42:41 2017 +1200 Drivers: ccree: ssi_pm.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff7c2e41d4be593c4ec6858c9faf071097cb4914 Author: Derek Robson Date: Wed May 24 16:42:24 2017 +1200 Drivers: ccree: ssi_pm_ext.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_pm_ext.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5d19caf6e95c071530f9bd874a9bc67520b139f3 Author: Derek Robson Date: Wed May 24 16:42:08 2017 +1200 Drivers: ccree: ssi_pm_ext.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_pm_ext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1010faa482f4f8494748316699b142cd7abb4fff Author: Derek Robson Date: Wed May 24 16:41:49 2017 +1200 Drivers: ccree: ssi_request_mgr.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_request_mgr.c | 37 ++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 2f930981b88bcf0ac7fb2fb53d767bc1a91c9a5e Author: Derek Robson Date: Wed May 24 16:41:27 2017 +1200 Drivers: ccree: ssi_request_mgr.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_request_mgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dbd671c0769c9014553e7fa23a9d8f833274134 Author: Derek Robson Date: Wed May 24 16:41:11 2017 +1200 Drivers: ccree: ssi_sysfs.c - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d057b3b78db1122178099918e760cca7940d8120 Author: Derek Robson Date: Wed May 24 16:40:32 2017 +1200 Drivers: ccree: ssi_sysfs.h - align block comments Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_sysfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba3937d6a6c6da9bc096bc427d8b16fb784cdb92 Author: Gennadii Altukhov Date: Fri May 26 11:28:47 2017 +0200 staging: ccree: fix cc_crypto_ctx.h white spaces Fix checkpatch.pl reported checks: spaces preferred around '/' and '<<' in cc_crypto_ctx.h Signed-off-by: Gennadii Altukhov Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_crypto_ctx.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a135c4f6b548073982a49c26c0caf711369a5354 Author: Marko Stankovic Date: Thu May 25 19:28:31 2017 +0200 staging: wilc1000: add missing blank line after struct declaration Fix a missing blank line issue reported by checkpatch.pl Signed-off-by: Marko Stankovic Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 + 1 file changed, 1 insertion(+) commit 15e7681a21391e4600823f8bf3a1ee3df0b4596d Author: Marko Stankovic Date: Thu May 25 19:28:30 2017 +0200 staging: wilc1000: remove excessive blank lines Fix the multiple blank lines issue reported by checkpatch.pl Signed-off-by: Marko Stankovic Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 15 --------------- 1 file changed, 15 deletions(-) commit 126ef7760b53585850c9091f35c552e65c209d57 Author: Nikola Jelic Date: Tue May 23 23:02:45 2017 +0200 staging: wlan-ng: hfa384x: fix several type issues. There were several in-place conversions of 16 and 32-bit data, which caused sparse to detect them. Changed them to the in situ versions, such as: le16_to_cpu -> le16_to_cpus Signed-off-by: Nikola Jelic Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x_usb.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 675b62d288908eaa6cb2b275c64bbd7973e01259 Author: Rishiraj Manwatkar Date: Sat May 20 06:33:17 2017 +0000 staging: fbtft: Fix to avoid precedence issues Parentheses added to avoid operator precedence issues. Signed-off-by: Rishiraj Manwatkar Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_hx8340bn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca9280d1f82a7a0165a683dc09f182329ebec352 Merge: 13253d8 7e87d11 Author: Greg Kroah-Hartman Date: Mon May 29 15:53:42 2017 +0200 Merge tag 'iio-for-4.13a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new device support, features and cleanups for IIO in the 4.13 cycle Two entirely new drivers in here plus the usual range of cleanups and features. New device support * ad5064 - add ltc2631, ltc2633 and ltc2635 support. * bma180 - trivial support for bma250e (new id) * hid-sensor-rotation - add relative orientation and geometric orientation support. * isl29028 - add isl29030 support (its effectively the same part from a driver point of view) * maxim_thermocouple - add max31856 id. * meson-saradc - add meson8b SoC adc support. * ti-adc084s021 - new driver and bindings. * ti-adc108s102 - new driver and bindings. Staging graduations * isl29028 Features * bma180 - ACPI enumeration for BMA250E which is used in various x86 tablets. * hi8453 - add raw access rather than only events. * hid-sensor-hub - Implement batch mode in which we can set a threshold on the amount of time between data coming from the fifos. This is the first device to do this rather than use a watershed on the number of samples. * hts221 - power management support * lsm6dsx - add system power management support. * rpr0521 - sampling frequency read / write * stm32-trigger - add support for TRG02 triggers. * tsl2583 - runtime power management support. Cleanups * core - inkern: fix a double unlock in iio_read_available_channel_raw when raw value doesn't appear to be raw (error path). - fixup accidental sizeof pointer in iio_device_add_mask_type. * docs - fix an accidental duplicated line in sysfs-bus-iio-meas-spec. * tools - use local include/uapi headers to ensure always up to date. - increase length of allowed trigger names. * ad9834 - symbolic to octal permissions. * ade7753 - symbolic to octal permissions. - fix indentation * ade7754 - symbolic to octal permissions. * ade7758 - symbolic to octal permissions. - ade7854 - symbolic to octal permissions. * as3935 - move out of storm check to given consistent results for raw and processed values. * bmp280 - fix bme280 naming in Kconfig help. * hi8435 - avoid garbage on event after enable. - add missing in_voltage_sensing_mode_available to list possible enum options. - handle the reset gpio with the obvious polarity rather than relying on DT to provide it correctly. * hid-sensors - fix a wrong error path scrubbing of return values. * hid-sensors-accel - drop static on a local variable * hid-sensors-rotation - Add missing scale and offset property parsing support. * ina2xx - Fix a bad use of GENMASK and some typos and whitespace issues. * isl29018 - only declare the ACPI table when ACPI is enabled. * isl29028 - fix proximity sleep times. * lsm6dsx - replace ifdef CONFIG_PM with __maybe_unused to avoid the complexity of dealing with the various PM config variables. * meson-saradc - mark meson_sar_adc_data static and const. * rcar-gyroadc - derive the interface clock speed from the fck clock on the basis they are the same actual clock. - drop the now unused if clock from the bindings. * rpr0521 - disable sensor when marked as such rather than always enabling it. - poweroff if probe fails and we can talk to device. - make sure device powered off when it doesn't need to be on. - use sizeof rather than hardcoded size on value read. - whitespace fixup. - reorder channel numbers ready for buffered support which didn't quite make this pull request. * st-accel - fix platform data initialization to allow remove and reprobe. * st-pressure - fix platform data initialization to allow remove and reprobe. * tsl2x7x - S_IRUGO, S_IWUSR to octal values - rename driver for consistency with more recent drivers - drop FSF mailing address - replace DEVICE_ATTR macros with the shorter DEVICE_ATTR_RW form and relevant function renames. * zpa2326 - report an error for consistency with other error paths. commit 1a2af56431781e7d6db746a1b7ae796443028dfa Author: Kuninori Morimoto Date: Fri May 19 00:58:19 2017 +0000 ASoC: audio-graph-scu-card: tidyup return method from probe() Current return method from probe() is very confusable. This patch tidyup it to normal return method Reported-by: Dan Carpenter Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-scu-card.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 87f937b45f7dacfb09e6f7dddb2db8484dc0e8e3 Author: Kuninori Morimoto Date: Thu May 18 01:45:37 2017 +0000 ASoC: add audio-graph-scu-card support OF-graph base DT binding is used on V4L2, and ALSA SoC is using different style of DT today. Now ALSA SoC supports simple-card driver for generic/simple sound card, and we have simple-scu-card driver for simple-card + ALSA DPCM case. In the future, V4L2 / ALSA will support HDMI, and then, DT bindings between V4L2 / ALSA should be merged. This patch adds new Audio Graph SCU Card which is OF-graph base of simple-scu-card Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/Kconfig | 9 + sound/soc/generic/Makefile | 2 + sound/soc/generic/audio-graph-scu-card.c | 416 +++++++++++++++++++++++++++++++ 3 files changed, 427 insertions(+) commit be10ee2cd351818738097c782b4493e09c6d14f6 Author: Kuninori Morimoto Date: Thu May 18 01:44:46 2017 +0000 ASoC: add audio-graph-scu-card document Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../bindings/sound/audio-graph-scu-card.txt | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 5ea929467dbecd9494fd70cb7cfd7e0730223e13 Merge: 7fa72cc 155b8f3 Author: Mark Brown Date: Mon May 29 14:27:19 2017 +0100 Merge branch 'topic/of-graph' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar commit 6a9a440681f2170b9a07b1cf28c6aa7532c307c8 Author: Shawn Guo Date: Sat May 27 15:50:44 2017 +0800 ASoC: zx-i2s: fix harsh noise with 16-bit audio The audio parameter setup in zx_i2s_hw_params() works fine with 32-bit samples, but for 16-bit ones, all we can hear is harsh noises. As suggested by vendor driver code, DMA burst size and TS width should always be 32 bits, no matter audio sample is 16-bit or 32-bit. Follow the suggestion above to fix the harsh noise issue seen with 16-bit audio samples. Signed-off-by: Shawn Guo Signed-off-by: Mark Brown sound/soc/zte/zx-i2s.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 14c735c8e3082714e3d5fa91843692a9c871cebe Author: Neil Armstrong Date: Wed May 24 11:43:45 2017 +0200 clk: meson-gxbb: Add EE 32K Clock for CEC On Amlogic GX SoCs, there is two CEC controllers : - An Amlogic CEC custom in the AO domain - The Synopsys HDMI-TX Controller in the EE domain Each of these controllers needs a 32.768KHz clock, but there is two paths : - In the EE domain, the "32k_clk" this patchs is adding - In the AO domain, with a more complex dual divider more precise setup The AO 32K clock support will be pushed later in the corresponding gxbb-aoclk driver when the AE CEC driver is ready. The EE 32k_clk must be pushed earlier since mainline support for CEC in the Synopsys HDMI-TX controller is nearby. Signed-off-by: Neil Armstrong [Rebased patch on top of last changes] Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/gxbb.h | 5 ++++- 2 files changed, 58 insertions(+), 1 deletion(-) commit 39c42ca9b2c63348e6179f0955358d7b6a75c186 Author: Jerome Brunet Date: Wed May 24 11:39:32 2017 +0200 clk: gxbb: remove CLK_IGNORE_UNUSED from clk81 clk81 already has CLK_IS_CRITICAL so CLK_IGNORE_UNUSED is not necessary Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong drivers/clk/meson/gxbb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be58e496698dbd757bc4abe4173168cb2e6cb299 Author: Martin Blumenstingl Date: Wed May 24 11:39:31 2017 +0200 clk: meson: meson8b: mark clk81 as critical Disabling clk81 results in an immediate freeze of the whole system. This can happen "accidentally" when the last child-clock of clk81 is disabled (in this case the common clock framework also disables clk81, even if it was only enabled indirectly before). Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong drivers/clk/meson/meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96b61c8d2eae247661ac5a7dfba21e1a858400d1 Author: Martin Blumenstingl Date: Thu May 4 20:19:20 2017 +0200 clk: meson: gxbb: remove the "cpu_clk" from the GXBB and GXL driver It seems that the "cpu_clk" was carried over from the meson8b clock controller driver. On Meson GX (GXBB/GXL/GXM) the registers which are used by the cpu_clk have a different purpose (in other words: they don't control the CPU clock anymore). HHI_SYS_CPU_CLK_CNTL1 bits 31:24 are reserved according to the public S905 datasheet, while bit 23 is the "A53_trace_clk_DIS" gate (which according to the datasheet should only be used in case a silicon bug is discovered) and bits 22:20 are a divider (A53_trace_clk). The meson clk-cpu code however expects that bits 28:20 are reserved for a divider (according to the public S805 datasheet this "SCALE_DIV: This value represents an N+1 divider of the input clock."). The CPU clock on Meson GX SoCs is provided by the SCPI DVFS clock driver instead. Two examples from a Meson GXL S905X SoC: - vcpu (SCPI DVFS clock 0) rate: 1000000000 / cpu_clk rate: 708000000 - vcpu (SCPI DVFS clock 0) rate: 1512000000 / cpu_clk rate: 708000000 Unfortunately the CLKID_CPUCLK was already exported (but is currently not used) to DT. Due to the removal of this clock definition there is now a hole in the clk_hw_onecell_data (which is not a problem because this case is already handled in gxbb_clkc_probe). Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 64 +++--------------------------------------------- drivers/clk/meson/gxbb.h | 2 +- 2 files changed, 4 insertions(+), 62 deletions(-) commit f40a8ce96ae141f5ec83204471df4902e86a572c Author: Martin Blumenstingl Date: Thu May 4 20:19:19 2017 +0200 clk: meson-gxbb: un-export the CPU clock The CPU clock defined in the Meson GX clock driver is actually a left-over from the Meson8b clock controller. Un-export the clock so we can remove it from the driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.h | 2 +- include/dt-bindings/clock/gxbb-clkc.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 9dc6bd7678f6ee518c92808886ee087e31f749cf Author: Helmut Klein Date: Fri Mar 31 18:54:34 2017 +0200 clk: meson-gxbb: expose UART clocks Expose the clock ids of the three none AO uarts to the dt-bindings Acked-by: Neil Armstrong Signed-off-by: Helmut Klein Signed-off-by: Neil Armstrong [tidy the commit message to match similar change] Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.h | 6 +++--- include/dt-bindings/clock/gxbb-clkc.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 34f267f1620ac2c5b4f45cbb93226ddb80c3c6bd Author: Neil Armstrong Date: Thu Apr 20 13:59:10 2017 +0200 clk: meson-gxbb: expose SPICC gate Expose the SPICC gate clock to enable the SPICC controller. Acked-by: Jerome Brunet Signed-off-by: Neil Armstrong [tidy commit message to match similar changes] Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.h | 2 +- include/dt-bindings/clock/gxbb-clkc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit accc1ce7d2ffc6419a8eaf8c0190d9240df0c43f Author: David Wu Date: Fri May 26 15:20:23 2017 +0800 pinctrl: rockchip: Add iomux-route switching support for rk3399 There are 2 IP blocks pin routes need to be switched, that are uart2dbg, pcie_clkreq. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit cedc964a59d48c793ddc0884b2f72a68fc234ae4 Author: David Wu Date: Fri May 26 15:20:22 2017 +0800 pinctrl: rockchip: Add iomux-route switching support for rk3328 There are 8 IP blocks pin routes need to be switched, that are uart2dbg, gmac-m1-optimized, pdm, spi, i2s2, card, tsp, cif. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 83 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit d4970ee076f9aed396c322b41f56443a617116df Author: David Wu Date: Fri May 26 15:20:21 2017 +0800 pinctrl: rockchip: Add iomux-route switching support for rk3228 There are 9 IP blocks pin routes need to be switched, that are pwm-0, pwm-1, pwm-2, pwm-3, sdio, spi, emmc, uart2, uart1. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 132 +++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) commit bd35b9bf8284338db35b3ff0d391b95d67b90444 Author: David Wu Date: Fri May 26 15:20:20 2017 +0800 pinctrl: rockchip: Add iomux-route switching support On the some rockchip SOCS, some things like rk3399 specific uart2 can use multiple pins. Somewhere between the pin io-cells and the uart it seems to have some sort of switch to decide to which pin to actually route the data. +-------+ +--------+ /- GPIO4_B0 (pinmux 2) | uart2 | -- | switch | --- GPIO4_C0 (pinmux 2) +-------+ +--------+ \- GPIO4_C3 (pinmux 2) (switch selects one of the 3 pins base on the GRF_SOC_CON7[BIT0, BIT1]) The routing switch is determined by one pin of a specific group to be set to its special pinmux function. If the pinmux setting is wrong for that pin the ip block won't work correctly anyway. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 65 +++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) commit 0420dbb5acd5b13c850387ab3f36812239984501 Author: Jerome Brunet Date: Thu Mar 2 15:23:38 2017 +0100 clk: meson-gxbb: expose spdif master clock Expose the spdif master clock and the mux to select the appropriate spdif clock parent depending on the data source. Acked-by: Michael Turquette Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.h | 4 ++-- include/dt-bindings/clock/gxbb-clkc.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit b4d44cdcaf993780304e225bde12a5053076baeb Author: Jerome Brunet Date: Thu Jan 26 11:12:52 2017 +0100 clk: meson-gxbb: expose i2s master clock Expose cts_amclk in the device tree bindings Acked-by: Michael Turquette Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.h | 2 +- include/dt-bindings/clock/gxbb-clkc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit c5aee2bc9981fb57cce753d3d7c42ed9b00bd6ac Author: Jerome Brunet Date: Thu Mar 2 15:22:29 2017 +0100 clk: meson-gxbb: expose spdif clock gates Expose the clock gates required for the spdif output Acked-by: Michael Turquette Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.h | 4 ++-- include/dt-bindings/clock/gxbb-clkc.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit c504985e3be8ab4d232d7ff63e773948e06f2da6 Author: Linus Walleij Date: Mon May 29 13:40:45 2017 +0200 gpio/pinctrl: ingenic: depend on OF Fix compile errors due to missing OF. Cc: Paul Cercueil Reported-by: Randy Dunlap Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 1 + drivers/pinctrl/Kconfig | 1 + 2 files changed, 2 insertions(+) commit c1a4634013141b96324c647b45356e16f1fff781 Author: Wolfram Sang Date: Sun May 21 23:57:27 2017 +0200 gpio: adp5588: move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Acked-by: Dmitry Torokhov Signed-off-by: Linus Walleij arch/blackfin/mach-bf537/boards/stamp.c | 2 +- drivers/gpio/gpio-adp5588.c | 2 +- drivers/input/keyboard/adp5588-keys.c | 2 +- include/linux/i2c/adp5588.h | 172 -------------------------------- include/linux/platform_data/adp5588.h | 172 ++++++++++++++++++++++++++++++++ 5 files changed, 175 insertions(+), 175 deletions(-) commit e3fe07e03e61c8483e8ffe804108787192177a76 Author: Bartosz Golaszewski Date: Thu May 25 10:37:38 2017 +0200 gpio: ml-ioh: check the return value of irq_alloc_generic_chip() This function can fail, so check the return value before dereferencing the returned pointer. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-ml-ioh.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit d76e8babe420edbf9f9f9c78e42ef01f0e62dc07 Author: Bartosz Golaszewski Date: Thu May 25 10:37:37 2017 +0200 gpio: sta2x11: check the return value of irq_alloc_generic_chip() This function can fail, so check the return value before dereferencing the returned pointer. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-sta2x11.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 09445a103eb4e6a0b881056c1dc5f4ca8a186671 Author: Bartosz Golaszewski Date: Thu May 25 10:37:36 2017 +0200 gpio: pch: check the return value of irq_alloc_generic_chip() This function can fail, so check the return value before dereferencing the returned pointer. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-pch.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit c7f5326fb433d826de215e894918edfc4e45cc70 Author: Bartosz Golaszewski Date: Thu May 25 10:33:41 2017 +0200 gpio: mockup: support irqmask and irqunmask Even though this is a testing module, be nice and actually implement these functions. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 01a3f23c166dc30f002e17c1ba9412a0390048d3 Author: Bartosz Golaszewski Date: Thu May 25 10:33:40 2017 +0200 gpio: mockup: be quiet unless something goes wrong When inserting and removing the module repeatedly (e.g. when running the libgpiod test-suite) the kernel log gets clobbered with messages reporting successful creation of dummy gpiochips. Remove this message and only emit logs when something bad happens. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 3 --- 1 file changed, 3 deletions(-) commit c650c00c102b2bcafb3b1f3f45e5b1e9e6f72e56 Author: Bartosz Golaszewski Date: Thu May 25 10:33:39 2017 +0200 gpio: mockup: add prefixes to the direction enum All internal symbols except for the direction enum follow the same convention and use the gpio_mockup prefix. Add the prefix to the DIR_IN and DIR_OUT definitions as well for consistency across the file. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c9546cf141798a648c3053067a42936c36d626a3 Author: Bartosz Golaszewski Date: Thu May 25 10:33:38 2017 +0200 gpio: mockup: fix direction values The comment in linux/gpio/driver.h says: @get_direction: returns direction for signal "offset", 0=out, 1=in We got those switched at some point. Fix the values. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34158151d2aa1138983bedb59e5b711d2e25c245 Author: Liping Zhang Date: Sun May 28 22:37:19 2017 +0800 netfilter: cttimeout: use nf_ct_iterate_cleanup_net to unlink timeout objs Similar to nf_conntrack_helper, we can use nf_ct_iterare_cleanup_net to remove these copy & paste code. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_cttimeout.c | 39 +++++-------------------------------- 1 file changed, 5 insertions(+), 34 deletions(-) commit ff1acc4964ccde61a4134c789314593d40dd3c93 Author: Liping Zhang Date: Sun May 28 22:35:52 2017 +0800 netfilter: nf_ct_helper: use nf_ct_iterate_destroy to unlink helper objs When we unlink the helper objects, we will iterate the nf_conntrack_hash, iterate the unconfirmed list, handle the hash resize situation, etc. Actually this logic is same as the nf_ct_iterate_destroy, so we can use it to remove these copy & paste code. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_helper.c | 50 +++---------------------------------- 1 file changed, 4 insertions(+), 46 deletions(-) commit 446a8268b7f56830d8c7b562718ba9dc113ab3c1 Author: Pablo Neira Ayuso Date: Mon May 22 17:48:09 2017 +0100 netfilter: nft_set_hash: add lookup variant for fixed size hashtable This patch provides a faster variant of the lookup function for 2 and 4 byte keys. Optimizing the one byte case is not worth, as the set backend selection will always select the bitmap set type for such case. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_hash.c | 60 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) commit 6c03ae210ce306f443767d619a0390b0a541a5d8 Author: Pablo Neira Ayuso Date: Mon May 22 17:48:03 2017 +0100 netfilter: nft_set_hash: add non-resizable hashtable implementation This patch adds a simple non-resizable hashtable implementation. If the user specifies the set size, then this new faster hashtable flavour is selected. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_hash.c | 210 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 202 insertions(+), 8 deletions(-) commit 1ff75a3e9ab72368fc3ad63d9bc6c7518cbd1389 Author: Pablo Neira Ayuso Date: Mon May 22 17:47:59 2017 +0100 netfilter: nf_tables: allow large allocations for new sets The new fixed size hashtable backend implementation may result in a large array of buckets that would spew splats from mm. Update this code to fall back on vmalloc in case the memory allocation order is too costly. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 2111515abc46cb3e18b22d8551067029acfd1f55 Author: Pablo Neira Ayuso Date: Mon May 22 17:47:56 2017 +0100 netfilter: nft_set_hash: add nft_hash_buckets() Add nft_hash_buckets() helper function to calculate the number of hashtable buckets based on the elements. This function can be reused from the follow up patch to add non-resizable hashtables. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_hash.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 347b408d59e7eadcd09f97eba96fa4c270eb3b23 Author: Pablo Neira Ayuso Date: Mon May 22 17:47:54 2017 +0100 netfilter: nf_tables: pass set description to ->privsize The new non-resizable hashtable variant needs this to calculate the size of the bucket array. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 3 ++- net/netfilter/nf_tables_api.c | 2 +- net/netfilter/nft_set_bitmap.c | 3 ++- net/netfilter/nft_set_hash.c | 3 ++- net/netfilter/nft_set_rbtree.c | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) commit 2b664957c27fe708035b217c908edd1048be355e Author: Pablo Neira Ayuso Date: Mon May 22 17:47:51 2017 +0100 netfilter: nf_tables: select set backend flavour depending on description This patch adds the infrastructure to support several implementations of the same set type. This selection will be based on the set description and the features available for this set. This allow us to select set backend implementation that will result in better performance numbers. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 26 +++++++++++++---- net/netfilter/nf_tables_api.c | 59 ++++++++++++++++++++++++--------------- net/netfilter/nft_set_bitmap.c | 10 +++++-- net/netfilter/nft_set_hash.c | 10 +++++-- net/netfilter/nft_set_rbtree.c | 10 +++++-- 5 files changed, 80 insertions(+), 35 deletions(-) commit 5fc6ced958db70556ce50f7026cd80078bde5a8c Author: Pablo Neira Ayuso Date: Mon May 22 17:47:48 2017 +0100 netfilter: nft_set_hash: use nft_rhash prefix for resizable set backend This patch prepares the introduction of a non-resizable hashtable implementation that is significantly faster. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_hash.c | 212 +++++++++++++++++++++---------------------- 1 file changed, 106 insertions(+), 106 deletions(-) commit 080ed636a559e960010b714dee035dddacbe73b9 Author: Pablo Neira Ayuso Date: Mon May 22 17:47:45 2017 +0100 netfilter: nf_tables: no size estimation if number of set elements is unknown This size estimation is ignored by the existing set backend selection logic, since this estimation structure is stack allocated, set this to ~0 to make it easier to catch bugs in future changes. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_hash.c | 17 ++++------------- net/netfilter/nft_set_rbtree.c | 8 +++----- 2 files changed, 7 insertions(+), 18 deletions(-) commit 187388bc3d63a9a3ae66b8dec255d0426eea2236 Author: Pablo Neira Ayuso Date: Mon May 22 17:47:40 2017 +0100 netfilter: nft_set_hash: unnecessary forward declaration Replace struct rhashtable_params forward declaration by the structure definition itself. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_hash.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 8f23f35f1e89656d766d6295cac23bac26f17de2 Author: Florian Westphal Date: Sun May 21 12:52:59 2017 +0200 netfilter: nat: destroy nat mappings on module exit path only We don't need pernetns cleanup anymore. If the netns is being destroyed, conntrack netns exit will kill all entries in this namespace, and neither conntrack hash table nor bysource hash are per namespace. For the rmmod case, we have to make sure we remove all entries from the nat bysource table, so call the new nf_ct_iterate_destroy in module exit path. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 37 +++++-------------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) commit 0d02d5646eb84403766a11a1d3b19e670a3d45d5 Author: Florian Westphal Date: Sun May 21 12:52:58 2017 +0200 netfilter: conntrack: restart iteration on resize We could some conntracks when a resize occurs in parallel. Avoid this by sampling generation seqcnt and doing a restart if needed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 2843fb69980b84dfa939733c91dceae533aa89e9 Author: Florian Westphal Date: Sun May 21 12:52:57 2017 +0200 netfilter: conntrack: add nf_ct_iterate_destroy sledgehammer to be used on module unload (to remove affected conntracks from all namespaces). It will also flag all unconfirmed conntracks as dying, i.e. they will not be committed to main table. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 4 ++ net/netfilter/nf_conntrack_core.c | 87 ++++++++++++++++++++++++++++++------ 2 files changed, 78 insertions(+), 13 deletions(-) commit b0feacaad13a0aa9657c37ed80991575981e2e3b Author: Florian Westphal Date: Sun May 21 12:52:56 2017 +0200 netfilter: conntrack: don't call iter for non-confirmed conntracks nf_ct_iterate_cleanup_net currently calls iter() callback also for conntracks on the unconfirmed list, but this is unsafe. Acesses to nf_conn are fine, but some users access the extension area in the iter() callback, but that does only work reliably for confirmed conntracks (ct->ext can be reallocated at any time for unconfirmed conntrack). The seond issue is that there is a short window where a conntrack entry is neither on the list nor in the table: To confirm an entry, it is first removed from the unconfirmed list, then insert into the table. Fix this by iterating the unconfirmed list first and marking all entries as dying, then wait for rcu grace period. This makes sure all entries that were about to be confirmed either are in the main table, or will be dropped soon. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 9fd6452d67fb2acda12e5914e2ad371f067f3465 Author: Florian Westphal Date: Sun May 21 12:52:55 2017 +0200 netfilter: conntrack: rename nf_ct_iterate_cleanup There are several places where we needlesly call nf_ct_iterate_cleanup, we should instead iterate the full table at module unload time. This is a leftover from back when the conntrack table got duplicated per net namespace. So rename nf_ct_iterate_cleanup to nf_ct_iterate_cleanup_net. A later patch will then add a non-net variant. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 6 +++--- net/ipv4/netfilter/nf_nat_masquerade_ipv4.c | 4 ++-- net/ipv6/netfilter/nf_nat_masquerade_ipv6.c | 10 +++++----- net/netfilter/nf_conntrack_core.c | 10 +++++----- net/netfilter/nf_conntrack_netlink.c | 4 ++-- net/netfilter/nf_conntrack_proto.c | 4 ++-- net/netfilter/nf_nat_core.c | 6 +++--- 7 files changed, 22 insertions(+), 22 deletions(-) commit cad4394453bd83ac7e82cad94c71149960a93f1a Author: stephen hemminger Date: Fri May 19 09:29:42 2017 -0700 netfilter: nft_rt: make local functions static Resolves warnings: net/netfilter/nft_rt.c:26:6: warning: no previous prototype for ‘nft_rt_get_eval’ [-Wmissing-prototypes] net/netfilter/nft_rt.c:75:5: warning: no previous prototype for ‘nft_rt_get_init’ [-Wmissing-prototypes] net/netfilter/nft_rt.c:106:5: warning: no previous prototype for ‘nft_rt_get_dump’ [-Wmissing-prototypes] Signed-off-by: Stephen Hemminger Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_rt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a32770b1e76bb78d31be856976586834e587ebfb Author: stephen hemminger Date: Fri May 19 09:29:41 2017 -0700 netfilter: dup: resolve warnings about missing prototypes Missing include file causes: net/netfilter/nf_dup_netdev.c:26:6: warning: no previous prototype for ‘nf_fwd_netdev_egress’ [-Wmissing-prototypes] net/netfilter/nf_dup_netdev.c:40:6: warning: no previous prototype for ‘nf_dup_netdev_egress’ [-Wmissing-prototypes] Signed-off-by: Stephen Hemminger Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_dup_netdev.c | 1 + 1 file changed, 1 insertion(+) commit 03eb7d494a6b7667a8e4076572edf5dc2ce3c675 Author: Florian Westphal Date: Wed May 17 11:25:31 2017 +0200 netfilter: ipt_CLUSTERIP: switch to nf_register_net_hook one of the last remaining users of the old api, hopefully followup commit can remove it soon. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_CLUSTERIP.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 04b80ceadcae754d053bbb96c5dce0b8641c8fe9 Author: linzhang Date: Fri May 12 13:11:06 2017 +0800 netfilter: ctnetlink: delete extra spaces This patch cleans up extra spaces. Signed-off-by: linzhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 923a654c186c43734cfac5d7af6940093051bcbc Author: Andy Shevchenko Date: Thu May 25 16:08:38 2017 +0300 gpiolib: Re-use bitmap_fill() instead of open coded loop Re-use bitmap_fill() instead of open coded loop for setting an area of bits in a bitmap. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 193d092939dd8a8de7474c888ccab3c2eccbc223 Author: Andy Shevchenko Date: Tue May 23 20:03:27 2017 +0300 PNP / ACPI: remove FSF address There is no point in keeping an address in the file since it's subject to change. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pnp/pnpacpi/rsparser.c | 4 ---- 1 file changed, 4 deletions(-) commit 1d7f2cdd56d45254be73301d08c65efa8041d3f3 Author: Andy Shevchenko Date: Tue May 23 20:03:26 2017 +0300 PNP / ACPI: join strings back for better maintenance Simply join string literals back for better maintenance and debugging. No functional changes intended. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pnp/pnpacpi/rsparser.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2a56e9195dfb59548cc8b32e8e8d0eef4b65f7eb Author: Jagadish Krishnamoorthy Date: Tue May 23 20:03:25 2017 +0300 PNP / ACPI: add support for GpioInt resource type The PNP ACPI driver parses ACPI interrupt resource but not GpioInt resource. When the firmware passes GpioInt resource for IRQ the PNP ACPI driver ignores it and hence the interrupt for the particular driver will not work. One such example is 8042 keyboard which uses PNP driver for obtaining the interrupt resource. On Intel Braswell project GpioInt is used instead of interrupt resource and the keyboard driver fails to register interrupt. Fix the issue by parsing GpioInt resource type. Signed-off-by: Jagadish Krishnamoorthy Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg [Fixed a parenthesis coding style thing] Signed-off-by: Linus Walleij drivers/pnp/pnpacpi/rsparser.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 25e3ef894eef419ee239da42edc6c1f8a4f1cfb5 Author: Andy Shevchenko Date: Tue May 23 20:03:24 2017 +0300 gpio: acpi: Split out acpi_gpio_get_irq_resource() helper The helper does retrieve pointer to struct acpi_resource_gpio from struct acpi_resource if it represents GpioInt() resource. It will be used by PNP code later on. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 23 ++++++++++++++++++----- include/linux/acpi.h | 7 +++++++ 2 files changed, 25 insertions(+), 5 deletions(-) commit a31f5c3a68520ee6a2adee7d5f13f2e6ef209875 Author: Andy Shevchenko Date: Tue May 23 20:03:23 2017 +0300 gpio: acpi: Override GPIO initialization flags This allows ACPI GPIO code to modify flags based on ACPI GpioIo() / GpioInt() resources. Signed-off-by: Andy Shevchenko Tested-by: Jarkko Nikula Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 50 +++++++++++++++++++++++++++++++++++++++++++-- drivers/gpio/gpiolib.c | 8 ++++++-- drivers/gpio/gpiolib.h | 15 ++++++++++++-- 3 files changed, 67 insertions(+), 6 deletions(-) commit 2eca25af05481c7e462cbc077328e0eb3394d06b Author: Andy Shevchenko Date: Tue May 23 20:03:22 2017 +0300 gpio: acpi: Factor out acpi_gpio_to_gpiod_flags() helper The helper function acpi_gpio_to_gpiod_flags() will be used later to configure pin properly whenever it's requested. While here, introduce a checking error code returned by gpiod_configure_flags() and bail out if it's not okay. Signed-off-by: Andy Shevchenko Tested-by: Jarkko Nikula Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 61 ++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 25 deletions(-) commit ed7fcf1ed5ea4ea01243995ae085757a77cf0f3e Author: Andy Shevchenko Date: Tue May 23 20:03:21 2017 +0300 gpio: acpi: Explain how to get GPIO descriptors in ACPI case Documentation lacks of explanation how we actually use device properties for GPIO resources. Add a section to the documentation about that. Suggested-by: Mika Westerberg Signed-off-by: Andy Shevchenko Tested-by: Jarkko Nikula Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij Documentation/acpi/gpio-properties.txt | 65 ++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 6fe9da42f1d98fdb4be1598e230aca97e66cf35d Author: Andy Shevchenko Date: Tue May 23 20:03:20 2017 +0300 gpio: acpi: Synchronize acpi_find_gpio() and acpi_gpio_count() If we pass connection ID to the both functions and at the same time acpi_can_fallback_to_crs() returns false we will get different results, i.e. the number of GPIO resources returned by acpi_gpio_count() might be not correct. Fix this by calling acpi_can_fallback_to_crs() in acpi_gpio_count() before trying to fallback. Signed-off-by: Andy Shevchenko Tested-by: Jarkko Nikula Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 3 +++ 1 file changed, 3 insertions(+) commit f10e4bf6632b5be11cea875b66ba959833a69258 Author: Andy Shevchenko Date: Tue May 23 20:03:19 2017 +0300 gpio: acpi: Even more tighten up ACPI GPIO lookups The commit 10cf4899f8af ("gpiolib: tighten up ACPI legacy gpio lookups") prevents to getting same resource twice if the driver asks twice using different connection ID. But the whole idea of fallback might bring some problems. Imagine the case when we have two versions of BIOS/hardware where in one _DSD is introduced along with GPIO resources, but the other one uses just plain GPIO resource for another purpose Case 1: Device (DEVX) { ... Name (_CRS, ResourceTemplate () { GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, "\\_SB.GPO0", 0, ResourceConsumer) {15} }) Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"some-gpios", Package() {^DEVX, 0, 0, 0 }}, } }) } Case 2: Device (DEVX) { ... Name (_CRS, ResourceTemplate () { GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, "\\_SB.GPO0", 0, ResourceConsumer) {27} }) } To prevent the possible misconfiguration tighten up even more GPIO ACPI lookups for case without connection ID provided. In the past the issue had been triggered by "use mctrl_gpio helpers" series [1,2]. [1] commit 4ef03d328769 ("tty/serial/8250: use mctrl_gpio helpers") [2] https://patchwork.kernel.org/patch/9283745/ Cc: Dmitry Torokhov Cc: Bastien Nocera Signed-off-by: Andy Shevchenko Tested-by: Jarkko Nikula Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) commit fe06b56cbf9fd6392f31ba1c782a3134daef7c80 Author: Andy Shevchenko Date: Tue May 23 20:03:18 2017 +0300 gpio: acpi: Do sanity check for GpioInt in acpi_find_gpio() Check that we don't ask for output direction on GpioInt resource in cases with or without _DSD defined. Reviewed-by: Dmitry Torokhov Signed-off-by: Andy Shevchenko Tested-by: Jarkko Nikula Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9e66504a919439448dfc57052ddf01b96964bdf7 Author: Andy Shevchenko Date: Tue May 23 20:03:17 2017 +0300 gpio: acpi: Align acpi_find_gpio() with DT version By some reason acpi_find_gpio() and acpi_gpio_count() have compared connection ID to "gpios" when tries to check if suffix is needed or not. Don't do any assumptions about what connection ID can be and, when defined, use it only with suffix as it's done in the device tree version. Reviewed-by: Dmitry Torokhov Signed-off-by: Andy Shevchenko Tested-by: Jarkko Nikula Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c29fd9ebb2b9d4bab16dfdce88547f9867ea6153 Author: Andy Shevchenko Date: Tue May 23 20:03:16 2017 +0300 gpiolib: Export gpiod_configure_flags() to internal users This is preparatory patch for enabling GPIO ACPI to configure a pin accordingly. Signed-off-by: Andy Shevchenko Tested-by: Jarkko Nikula Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 +- drivers/gpio/gpiolib.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit ca37978497194d55dedd28022403b053ad0d11b2 Author: Charles Keepax Date: Tue May 23 15:47:31 2017 +0100 gpio: of: Add documentation of new sleep standard GPIO specifiers Add documentation of new GPIO specifiers indicating if the state of an output pin should be maintained during sleep/low-power mode. Signed-off-by: Charles Keepax Acked-by: Laxman Dewangan Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio.txt | 2 ++ 1 file changed, 2 insertions(+) commit 27a49ed17e2245cacbdea88ad78b8494653e0338 Author: Charles Keepax Date: Tue May 23 15:47:30 2017 +0100 gpio: arizona: Add support for GPIOs that need to be maintained The Arizona devices only maintain the state of output GPIOs whilst the CODEC is active, this can cause issues if the CODEC suspends whilst something is relying on the state of one of its GPIOs. However, in many systems the CODEC GPIOs are used for audio related features and thus the state of the GPIOs is unimportant whilst the CODEC is suspended. Often keeping the CODEC resumed in such a system would incur a power impact that is unacceptable. Allow the user to select whether a GPIO output should keep the CODEC resumed, by adding a flag through the second cell of the GPIO specifier in device tree. Signed-off-by: Charles Keepax Signed-off-by: Linus Walleij drivers/gpio/gpio-arizona.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit 05f479bf7d239f01ff6546f2bdeb14ad0fe65601 Author: Charles Keepax Date: Tue May 23 15:47:29 2017 +0100 gpio: Add new flags to control sleep status of GPIOs Add new flags to allow users to specify that they are not concerned with the status of GPIOs whilst in a sleep/low power state. Signed-off-by: Charles Keepax Acked-by: Rob Herring Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 3 +++ drivers/gpio/gpiolib.c | 12 ++++++++++++ drivers/gpio/gpiolib.h | 1 + include/dt-bindings/gpio/gpio.h | 4 ++++ include/linux/gpio/driver.h | 3 +++ include/linux/gpio/machine.h | 2 ++ include/linux/of_gpio.h | 1 + 7 files changed, 26 insertions(+) commit 83f0124ad81e87b74c2f461b1794e57ab5e7fea0 Author: Tobias Klauser Date: Fri May 19 13:45:16 2017 +0200 microblaze: remove asm-generic wrapper headers Some of microblaze's asm and uapi header are merely including their asm-generic counterpart. Thus, the arch specific headers can be removed and the asm-generic header can be used directly via generic-y. The headers removed from uapi don't need to be added to generic-y in the uapi Kbuild in order to get exported, as they are already listed in mandatory-y. Also order the generic-y list alphabetically. Signed-off-by: Tobias Klauser Signed-off-by: Michal Simek arch/microblaze/include/asm/Kbuild | 45 ++++++++++++++++++++++++- arch/microblaze/include/asm/bitops.h | 1 - arch/microblaze/include/asm/bug.h | 1 - arch/microblaze/include/asm/bugs.h | 1 - arch/microblaze/include/asm/div64.h | 1 - arch/microblaze/include/asm/emergency-restart.h | 1 - arch/microblaze/include/asm/fb.h | 1 - arch/microblaze/include/asm/hardirq.h | 1 - arch/microblaze/include/asm/irq_regs.h | 1 - arch/microblaze/include/asm/kdebug.h | 1 - arch/microblaze/include/asm/kmap_types.h | 6 ---- arch/microblaze/include/asm/linkage.h | 1 - arch/microblaze/include/asm/local.h | 1 - arch/microblaze/include/asm/local64.h | 1 - arch/microblaze/include/asm/parport.h | 1 - arch/microblaze/include/asm/percpu.h | 1 - arch/microblaze/include/asm/serial.h | 1 - arch/microblaze/include/asm/shmparam.h | 1 - arch/microblaze/include/asm/topology.h | 1 - arch/microblaze/include/asm/ucontext.h | 1 - arch/microblaze/include/asm/vga.h | 1 - arch/microblaze/include/asm/xor.h | 1 - arch/microblaze/include/uapi/asm/bitsperlong.h | 1 - arch/microblaze/include/uapi/asm/errno.h | 1 - arch/microblaze/include/uapi/asm/fcntl.h | 1 - arch/microblaze/include/uapi/asm/ioctl.h | 1 - arch/microblaze/include/uapi/asm/ioctls.h | 1 - arch/microblaze/include/uapi/asm/ipcbuf.h | 1 - arch/microblaze/include/uapi/asm/kvm_para.h | 1 - arch/microblaze/include/uapi/asm/mman.h | 1 - arch/microblaze/include/uapi/asm/msgbuf.h | 1 - arch/microblaze/include/uapi/asm/param.h | 1 - arch/microblaze/include/uapi/asm/poll.h | 1 - arch/microblaze/include/uapi/asm/resource.h | 1 - arch/microblaze/include/uapi/asm/sembuf.h | 1 - arch/microblaze/include/uapi/asm/shmbuf.h | 1 - arch/microblaze/include/uapi/asm/siginfo.h | 1 - arch/microblaze/include/uapi/asm/signal.h | 1 - arch/microblaze/include/uapi/asm/socket.h | 1 - arch/microblaze/include/uapi/asm/sockios.h | 1 - arch/microblaze/include/uapi/asm/stat.h | 1 - arch/microblaze/include/uapi/asm/statfs.h | 1 - arch/microblaze/include/uapi/asm/swab.h | 1 - arch/microblaze/include/uapi/asm/termbits.h | 1 - arch/microblaze/include/uapi/asm/termios.h | 1 - 45 files changed, 44 insertions(+), 50 deletions(-) commit f9e3a419aa53d77a9ba348f587775aea726fcafa Author: Charles Keepax Date: Tue May 23 15:47:28 2017 +0100 gpio: of: Reflect decoupling of open collector and active low/high Commit 4c0facddb7d8 ("gpio: core: Decouple open drain/source flag with active low/high") decoupled the open collector outputs from active low/high but did not update the documentation. Update the device tree documentation to correctly reflect this new separation between the two concepts. Signed-off-by: Charles Keepax Acked-by: Laxman Dewangan Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f5ef419630e85e80284cd0256cb5a13a66bbd6c5 Author: Tobias Klauser Date: Fri May 19 13:43:29 2017 +0200 microblaze: wire up statx syscall Add the new statx syscall. Signed-off-by: Tobias Klauser Signed-off-by: Michal Simek arch/microblaze/include/asm/unistd.h | 2 +- arch/microblaze/include/uapi/asm/unistd.h | 1 + arch/microblaze/kernel/syscall_table.S | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit bb26081a98d3db2fde37ff57f8276266b6158471 Author: Nicolai Stange Date: Thu Mar 30 21:45:28 2017 +0200 microblaze: Set ->min_delta_ticks and ->max_delta_ticks for timer In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the microblaze arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Signed-off-by: Nicolai Stange Acked-by: Daniel Lezcano Signed-off-by: Michal Simek arch/microblaze/kernel/timer.c | 2 ++ 1 file changed, 2 insertions(+) commit 82e1e5cd30f52df4f76882ff4c87a1906c8da7ce Author: Neil Armstrong Date: Wed May 24 10:20:42 2017 +0200 pinctrl: meson-gxl: Add Ethernet PHY LEDS pins The Amlogic Meson GXL SoCs embeds an 10/100 Ethernet PHY, this patchs enables the Link and Activity LEDs signals. Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e56751c961eaf232f121025c29af94ab3d64feb2 Author: Geliang Tang Date: Thu Mar 23 21:16:32 2017 +0800 microblaze: use sg_phys() Use sg_phys() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Michal Simek arch/microblaze/kernel/dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 690dead29019b01eca100421762fa3acc041a25f Author: Neil Armstrong Date: Wed May 24 10:20:41 2017 +0200 pinctrl: meson-gxl: Add CEC pins Add the AO and EE domain CEC pins for the Amlogic Meson GXL SoCs. Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit dd0ff54dd724a6d1dfec686669a76ffe6ecad017 Author: Neil Armstrong Date: Wed May 24 10:20:40 2017 +0200 pinctrl: meson-gxbb: Add CEC pins Add the AO and EE domain CEC pins for the Amlogic Meson GXBB SoCs. Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b11ec68fe12cf3645c64892fe30f559ce7eddfd8 Author: Neil Armstrong Date: Wed May 24 10:20:39 2017 +0200 pinctrl: meson-gxl: Fix typo in AO SPDIF pins The AO SPDIF pins were incorrectly defined with the EE pin offset. Fixes: b840d649f9ec ("pinctrl: meson: gxl: add spdif output pins") Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 13586b31c749a9b6a55660be433bf077139d32b0 Author: Neil Armstrong Date: Wed May 24 10:20:38 2017 +0200 pinctrl: meson-gxl: Fix typo in AO I2S pins The AO I2S pins were incorrectly defined with the EE pin offset. Fixes: 2899adf0422 ("pinctrl: meson: gxl: add i2s output pins") Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34e61801a3b9df74b69f0e359d64a197a77dd6ac Author: Neil Armstrong Date: Tue May 23 16:09:19 2017 +0200 pinctrl: meson-gxbb: Add missing GPIODV_18 pin entry GPIODV_18 entry was missing in the original driver push. Fixes: 468c234f9ed7 ("pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC") Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 1 + 1 file changed, 1 insertion(+) commit aa9556956653f85baaadeb4846dc571414f13e36 Author: Neil Armstrong Date: Tue May 23 16:09:18 2017 +0200 pinctrl: meson-gxl: Add missing GPIODV_18 pin entry GPIODV_18 entry was missing in the original driver push. Fixes: 0f15f500ff2c ("pinctrl: meson: Add GXL pinctrl definitions") Signed-off-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 1 + 1 file changed, 1 insertion(+) commit 6dc0048cff988858254fcc26becfc1e9753efa79 Author: Arvind Yadav Date: Tue May 23 14:48:57 2017 +0530 gpio: davinci: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 45857ae954783bcbab6f67c2300b7d98d214c393 Author: Sergey Matyukevich Date: Sun May 28 13:30:26 2017 +0300 ARM: dts: orange-pi-zero: add node for SPI NOR Add node for SPI NOR flash on orange-pi-zero board. Disable this node by default and leave it to users to enable it if their board has SPI NOR flash chip populated. SPI NOR flash was optional in the first production batch in Dec 2016. In later batches flash chip was pre-populated. However there should be quite a few boards around which do not have flash chip. Signed-off-by: Sergey Matyukevich Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 34f4684877c91a9d31e0398d6a103d31953def5a Author: Paul Gortmaker Date: Mon May 22 16:56:48 2017 -0400 pinctrl: bcm: clean up modular vs. non-modular distinctions Fixups here tend to be more of a conglomerate of some of the other repeated/systematic ones we've seen in the earlier pinctrl cleanups. We remove module.h from code that isn't doing anything modular at all; if they have __init sections, then replace it with init.h One driver has a .remove that would be dispatched on module_exit, and as that code is essentially orphaned, so we remove it. In case anyone was previously doing the (pointless) unbind to get to that function, we disable unbind for this one driver as well. A couple bool drivers (hence non-modular) are converted over to to builtin_platform_driver(). Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Eric Anholt Cc: Florian Fainelli Cc: Jon Mason Cc: Linus Walleij Cc: Ray Jui Cc: Scott Branden Cc: Sherman Yin Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-gpio@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker Tested-by: Stefan Wahren Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 16 ++++++++-------- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 20 +++----------------- drivers/pinctrl/bcm/pinctrl-cygnus-mux.c | 11 +++++------ 3 files changed, 16 insertions(+), 31 deletions(-) commit e3d2160f12d6aa7a87d9db09d8458b4a3492cd45 Author: Paul Gortmaker Date: Mon May 22 16:56:47 2017 -0400 pinctrl: tegra: clean up modular vs. non-modular distinctions None of the Kconfigs for any of these drivers are tristate, meaning that they currently are not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the drivers there is no doubt they are builtin-only. All drivers get similar changes, so they are handled in batch. We remove module.h from code that isn't doing anything modular at all; if they have __init sections, then replace it with init.h. A couple drivers have module_exit() code that is essentially orphaned, and so we remove that. Quite a few bool drivers (hence non-modular) are converted over to to builtin_platform_driver(). Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Linus Walleij Cc: Stephen Warren Cc: Thierry Reding Cc: Alexandre Courbot Cc: Pritesh Raithatha Cc: Ashwini Ghuge Cc: linux-gpio@vger.kernel.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/pinctrl/tegra/pinctrl-tegra.c | 1 - drivers/pinctrl/tegra/pinctrl-tegra114.c | 11 ++++------- drivers/pinctrl/tegra/pinctrl-tegra124.c | 11 ++++------- drivers/pinctrl/tegra/pinctrl-tegra20.c | 11 ++++------- drivers/pinctrl/tegra/pinctrl-tegra210.c | 9 ++------- drivers/pinctrl/tegra/pinctrl-tegra30.c | 11 ++++------- 6 files changed, 18 insertions(+), 36 deletions(-) commit 1a8764f45c634b4b9e2aed80a93a40771c84a11a Author: Masahiro Yamada Date: Sun May 21 01:02:17 2017 +0900 pinctrl: single: use of_device_get_match_data() to get soc data Use of_device_get_match_data() instead of of_match_device(). It allows us to remove the forward declaration of pcs_of_match. Signed-off-by: Masahiro Yamada Acked-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-single.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 80fbc2d9b3e9796133470069fa1a10fe2a755a7a Author: Shawn Guo Date: Mon May 22 21:59:35 2017 +0800 pinctrl: zte: fix group_desc initialization There are a couple of issues with group_desc initialization in function zx_pinctrl_build_state(). - num_pins is not initialized and remains zero. - pins shouldn't be initialized with a pointer to variable in the stack. With them fixed, pin_request() in pinmux_enable_setting() can be invoked correctly. Signed-off-by: Shawn Guo Signed-off-by: Linus Walleij drivers/pinctrl/zte/pinctrl-zx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcbcc3043cb83205711910119ecba499219b4748 Author: Neil Armstrong Date: Mon May 22 14:59:26 2017 +0200 pinctrl: meson-gxbb: Add SPI pins for SPICC controller The SPICC controller has dedicated SPI pins, this patchs add the pins definition in the GXBB pinctrl driver Signed-off-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 477fa24ec0e74a44fc04b375f3e69681567622b0 Author: Neil Armstrong Date: Mon May 22 14:59:25 2017 +0200 pinctrl: meson-gxl: Add SPI pins for the SPICC controller The SPICC controller has dedicated SPI pins, this patchs add the pins definition in the GXL pinctrl driver. Signed-off-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f37e335f925968942c6f613fa17c57f625042f87 Author: Gregory CLEMENT Date: Wed May 24 16:32:06 2017 +0200 gpio: mvebu: Select REGMAP_MMIO now that regmap is used Since the commit "gpio: mvebu: switch to regmap for register access" the driver use the regmap. Explicitly select the REGMAP_MMIO symbol to fix build error. Reported-by: kbuild test robot Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+) commit cd9f4688a3297c0df0eecc2adaae5812d3e5b997 Author: Daniel Vetter Date: Mon May 29 09:00:58 2017 +0200 drm/i915: Update DRIVER_DATE to 20170529 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c0492811ef83b3dfed88a7c3fe759ac7ad0197f Author: Chen-Yu Tsai Date: Thu May 25 15:31:38 2017 +0800 ARM: sun7i: a20: cubietruck: Tie AXP209's USB power supply to USB PHY The USB PHY can use either a GPIO pin or the PMIC's USB power supply to sense VBUS. Since both options are available on the Cubietruck, add the missing property for the USB power supply to the USB PHY node. The device tree provides all usable options. Ultimately, which method is used is up to the driver implementation. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 1 + 1 file changed, 1 insertion(+) commit c7b7158f397b6e2fc5cd13925b185502ca026158 Author: Chen-Yu Tsai Date: Thu May 25 15:31:37 2017 +0800 ARM: sun6i: a31: hummingbird: Enable AXP221's ACIN power supply The ACIN pins of the AXP221 PMIC on the A31 Hummingbird are tied to the DC jack on the board through a 12V to 5V buck converter. Enable the ACIN power supply. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 2fb90080db2c76e2ffcce1b8b3867250091b4d65 Author: Chen-Yu Tsai Date: Thu May 25 15:31:36 2017 +0800 ARM: sun4i: a10: cubieboard: Enable AXP209's ACIN power supply The ACIN pins of the AXP209 PMIC on the Cubieboard are tied to the DC jack on the board. Enable the ACIN power supply. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 17aafb5b336b5cb78973c290b12aa0bd239be7fe Author: Chen-Yu Tsai Date: Thu May 25 15:31:35 2017 +0800 ARM: sun7i: a20: bananapi-m1-plus: Enable AXP209's ACIN power supply The ACIN pins of the AXP209 PMIC on the Bananapi M1 Plus are tied to the "power input" micro USB connector next to the SATA connector on the board. Enable the ACIN power supply. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 6df31af7d827ab8dbcf0baec0411813d7a709150 Author: Chen-Yu Tsai Date: Thu May 25 15:31:34 2017 +0800 ARM: sun7i: a20: cubieboard2: Enable AXP209's ACIN power supply The ACIN pins of the AXP209 PMIC on the Cubieboard 2 are tied to the DC jack on the board. Enable the ACIN power supply. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 0ac409a6cac35a8190f7c6fdbfc274603ee43e7f Author: Chen-Yu Tsai Date: Thu May 25 15:31:33 2017 +0800 ARM: sun7i: a20: cubieboard2: Move usb_otg node for alphabetical ordering We want to keep node references in alphabetical order, except for instances where node must be #included first. Move the usb_otg node reference so that all references to non-AXP209 device nodes are in alphabetical order. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit aa668632ae8c25ffc2d94c865af099cca15944b4 Merge: d087e7a 5ed02db Author: Greg Kroah-Hartman Date: Mon May 29 08:18:15 2017 +0200 Merge 4.12-rc3 into tty-next We need the tty fixes/changes here to handle future work. Signed-off-by: Greg Kroah-Hartman commit 1afc45445d15493f3aaadbe2b549b37eaffcc407 Merge: e98c58e 71ebc9a Author: Dave Airlie Date: Mon May 29 06:04:39 2017 +1000 Merge tag 'drm-misc-next-2017-05-26' of git://anongit.freedesktop.org/git/drm-misc into drm-next UAPI Changes: - Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ defines to the UAPI (Robert) Cross-subsystem Changes: - Standardize sync_file.txt documentation format (Mauro) Core Changes: - Turf drm_[cm]alloc functions for kvmalloc alternatives (Michal) - Add optional mode_valid() hook to crtc/encoder/bridge (Jose) - Improve documentation around mode validation/alteration (Daniel) - Reduce sync_file construction time by deferring name creation (Chris) Driver Changes: - pl111: Wire up the clock divider and add debugfs (Eric) - various: Fix include notation and remove -Iinclude/drm (Masahiro) - stm: Add Benjamin Gaignard and Vincent Abriou as STM maintainers (Vincent) - various: Miscellaneous trivial fixes to pl111/stm/vgem/vc4 Cc: Michal Hocko Cc: Eric Anholt Cc: Masahiro Yamada Cc: Robert Foss Cc: Vincent Abriou Cc: Jose Abreu Cc: Daniel Vetter Cc: Chris Wilson Cc: Mauro Carvalho Chehab * tag 'drm-misc-next-2017-05-26' of git://anongit.freedesktop.org/git/drm-misc: (55 commits) dma-buf/sync-file: Defer creation of sync_file->name sync_file.txt: standardize document format gpu: drm: gma500: remove two more dead variable drm/doc: Clarify mode_fixup vs. atomic_check a bit more drm/doc: Document adjusted/request modes a bit better drm: Add crtc/encoder/bridge->mode_valid() callbacks MAINTAINERS: update drm/stm maintainers list drm/stm: ltdc: fix duplicated arguments drm/pl111: Fix return value check in pl111_amba_probe() drm/amd: include instead of "linux/delay.h" drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI drm/vgem: Fix return value check in vgem_init() drm/blend: Fix comment typ-o drm/stm: remove unneeded -Iinclude/drm compiler flag drm/vc4: fix include notation and remove -Iinclude/drm flag drm/pl111: Add a debugfs node to dump our registers. drm/pl111: make structure mode_config_funcs static drm/pl111: make structure pl111_display_funcs static drm/pl111: Register the clock divider and use it. drm: drop drm_[cm]alloc* helpers ... commit 7103de0e5872605d34e951fd03c30fe7d87ea703 Author: Jason Baron Date: Fri May 26 14:34:43 2017 -0400 EDAC, ie31200: Add Intel Kaby Lake CPU support Kaby Lake seems to work just like Skylake. Reported-and-tested-by: Doug Thompson Signed-off-by: Jason Baron Cc: Mauro Carvalho Chehab Cc: Tony Luck Link: http://lkml.kernel.org/r/1495823683-32569-1-git-send-email-jbaron@akamai.com Signed-off-by: Borislav Petkov drivers/edac/ie31200_edac.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 0aa5e49c6845ecd82531341085f367767c9f419a Author: Kees Cook Date: Wed Apr 5 09:49:19 2017 -0700 compiler: Add __designated_init annotation This allows structure annotations for requiring designated initialization in GCC 5.1.0 and later: https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html The structure randomization layout plugin will be using this to help identify structures that need this form of initialization. Signed-off-by: Kees Cook include/linux/compiler-gcc.h | 8 ++++++++ include/linux/compiler.h | 4 ++++ 2 files changed, 12 insertions(+) commit 1132e1e448ce51e3b51fc7afdf661633abc4f202 Author: Kees Cook Date: Sat Apr 15 11:45:20 2017 -0700 gcc-plugins: Detail c-common.h location for GCC 4.6 The c-common.h file moved in stock gcc 4.7, not gcc 4.6. However, most people building plugins with gcc 4.6 are using the Debian or Ubuntu version, which includes a patch to move the headers to the 4.7 location. In case anyone trips over this with a stock gcc 4.6, add a pointer to the patch used by Debian/Ubuntu. Signed-off-by: Kees Cook scripts/gcc-plugins/gcc-common.h | 7 +++++++ 1 file changed, 7 insertions(+) commit f19b1a1735f7453c35031ed5ca3883f20176dde6 Author: Viresh Kumar Date: Tue May 23 12:33:06 2017 +0530 thermal: cpu_cooling: Replace kmalloc with kmalloc_array Checkpatch reports following: WARNING: Prefer kmalloc_array over kmalloc with multiply + cpufreq_cdev->freq_table = kmalloc(sizeof(*cpufreq_cdev->freq_table) * i, Fix that. Signed-off-by: Viresh Kumar Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d72b4015839cca333a8e0108b1739a50f03d2acc Author: Viresh Kumar Date: Tue Apr 25 15:57:24 2017 +0530 thermal: cpu_cooling: Rearrange struct cpufreq_cooling_device This shrinks the size of the structure on arm64 by 8 bytes by avoiding padding of 4 bytes at two places. Also add missing doc comment for freq_table Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit cb1b631864ad7e34324ceccb73d0226dd00ad90d Author: Viresh Kumar Date: Tue Apr 25 15:57:23 2017 +0530 thermal: cpu_cooling: 'freq' can't be zero in cpufreq_state2power() The frequency table shouldn't have any zero frequency entries and so such a check isn't required. Though it would be better to make sure 'state' is within limits. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 53ca1ece60a719e23f686c647cb05d9e12a31974 Author: Viresh Kumar Date: Tue Apr 25 15:57:22 2017 +0530 thermal: cpu_cooling: don't store cpu_dev in cpufreq_cdev 'cpu_dev' is used by only one function, get_static_power(), and it wouldn't be time consuming to get the cpu device structure within it. This would help removing cpu_dev from struct cpufreq_cooling_device. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit da27f69d6a4eaf7bdaaad9d9e1b997a1c8f186aa Author: Viresh Kumar Date: Tue Apr 25 15:57:21 2017 +0530 thermal: cpu_cooling: get_level() can't fail The frequency passed to get_level() is returned by cpu_power_to_freq() and it is guaranteed that get_level() can't fail. Get rid of error code. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 81ee14da1051ee87c243b9a0e55d83f1aa274b76 Author: Viresh Kumar Date: Tue Apr 25 15:57:20 2017 +0530 thermal: cpu_cooling: create structure for idle time stats We keep two arrays for idle time stats and allocate memory for them separately. It would be much easier to follow if we create an array of idle stats structure instead and allocate it once. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 53 ++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 28 deletions(-) commit 349d39dc57396e3e9f39170905ff8d626eea9e44 Author: Viresh Kumar Date: Tue Apr 25 15:57:19 2017 +0530 thermal: cpu_cooling: merge frequency and power tables The cpu_cooling driver keeps two tables: - freq_table: table of frequencies in descending order, built from policy->freq_table. - power_table: table of frequencies and power in ascending order, built from OPP table. If the OPPs are used for the CPU device then both these tables are actually built using the OPP core and should have the same frequency entries. And there is no need to keep separate tables for this. Lets merge them both. Note that the new table is in descending order of frequencies and so the 'for' loops were required to be fixed at few places to make it work. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 153 ++++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 86 deletions(-) commit ba76dd9ddd4046ece873444c2256e09afbd5d32e Author: Viresh Kumar Date: Tue Apr 25 15:57:18 2017 +0530 thermal: cpu_cooling: get rid of 'allowed_cpus' 'allowed_cpus' is a copy of policy->related_cpus and can be replaced by it directly. At some places we are only concerned about online CPUs and policy->cpus can be used there. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 81 +++++++++++++------------------------------ 1 file changed, 25 insertions(+), 56 deletions(-) commit 02bacb21c6575ce408645ddb22fef44940d10257 Author: Viresh Kumar Date: Tue Apr 25 15:57:17 2017 +0530 thermal: cpu_cooling: OPPs are registered for all CPUs The OPPs are registered for all CPUs of a cpufreq policy now and we don't need to run the loop in build_dyn_power_table(). Just check for the policy->cpu and we should be fine. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit b12b6519496bb07b0845ed50eee1ca75c3b7fa81 Author: Viresh Kumar Date: Tue Apr 25 15:57:16 2017 +0530 thermal: cpu_cooling: store cpufreq policy The cpufreq policy can be used by the cpu_cooling driver, lets store it in the cpufreq_cooling_device structure. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 3 +++ 1 file changed, 3 insertions(+) commit 55d852931319d2e3ccde86cd426405231ce6c6ac Author: Viresh Kumar Date: Tue Apr 25 15:57:15 2017 +0530 cpufreq: create cpufreq_table_count_valid_entries() We need such a routine at two places already, lets create one. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/cpufreq/cpufreq_stats.c | 13 ++++--------- drivers/thermal/cpu_cooling.c | 22 +++++++++------------- include/linux/cpufreq.h | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 22 deletions(-) commit 4d753aa7b6279e4b7d338947a434689962f430d1 Author: Viresh Kumar Date: Tue Apr 25 15:57:14 2017 +0530 thermal: cpu_cooling: use cpufreq_policy to register cooling device The CPU cooling driver uses the cpufreq policy, to get clip_cpus, the frequency table, etc. Most of the callers of CPU cooling driver's registration routines have the cpufreq policy with them, but they only pass the policy->related_cpus cpumask. The __cpufreq_cooling_register() routine then gets the policy by itself and uses it. It would be much better if the callers can pass the policy instead directly. This also fixes a basic design flaw, where the policy can be freed while the CPU cooling driver is still active. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/cpufreq/arm_big_little.c | 2 +- drivers/cpufreq/cpufreq-dt.c | 2 +- drivers/cpufreq/dbx500-cpufreq.c | 2 +- drivers/cpufreq/mt8173-cpufreq.c | 4 +- drivers/cpufreq/qoriq-cpufreq.c | 3 +- drivers/thermal/cpu_cooling.c | 61 ++++++++-------------- drivers/thermal/imx_thermal.c | 22 ++++++-- drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 22 +++++--- include/linux/cpu_cooling.h | 26 ++++----- 9 files changed, 74 insertions(+), 70 deletions(-) commit 18f301c934db0f7bae4e7c12e941bce11d67aec5 Author: Viresh Kumar Date: Tue Apr 25 15:57:13 2017 +0530 thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state() 'cpu' is used at only one place and there is no need to keep a separate variable for it. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3e08b2df12983159ea2d9a1aa2b2bc601093b3cb Author: Viresh Kumar Date: Tue Apr 25 15:57:12 2017 +0530 thermal: cpu_cooling: remove cpufreq_cooling_get_level() There is only one user of cpufreq_cooling_get_level() and that already has pointer to the cpufreq_cdev structure. It can directly call get_level() instead and we can get rid of cpufreq_cooling_get_level(). Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 33 +-------------------------------- include/linux/cpu_cooling.h | 6 ------ 2 files changed, 1 insertion(+), 38 deletions(-) commit 04bdbdf93cedc728ceff6af175fcce2bedfdd25f Author: Viresh Kumar Date: Tue Apr 25 15:57:11 2017 +0530 thermal: cpu_cooling: replace cool_dev with cdev Objects of "struct thermal_cooling_device" are named a bit inconsistently. Lets use cdev everywhere. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit 1dea432a671aa87068c28194a6a602a6f358f749 Author: Viresh Kumar Date: Tue Apr 25 15:57:10 2017 +0530 thermal: cpu_cooling: Name cpufreq cooling devices as cpufreq_cdev Objects of "struct cpufreq_cooling_device" are named a bit inconsistently. Lets use cpufreq_cdev everywhere. Also note that the lists containing such devices is renamed similarly too. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 248 +++++++++++++++++++++--------------------- 1 file changed, 124 insertions(+), 124 deletions(-) commit fb8ea3082169612933b5cd14f30415e81f926f7b Author: Viresh Kumar Date: Tue Apr 25 15:57:09 2017 +0530 thermal: cpu_cooling: rearrange globals Just to make it look better. Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 289d72afddf83440117c35d864bf0c6309c1d011 Author: Viresh Kumar Date: Tue Apr 25 15:57:08 2017 +0530 thermal: cpu_cooling: Avoid accessing potentially freed structures After the lock is dropped, it is possible that the cpufreq_dev gets freed before we call get_level() and that can cause kernel to crash. Drop the lock after we are done using the structure. Cc: 4.2+ # 4.2+ Fixes: 02373d7c69b4 ("thermal: cpu_cooling: fix lockdep problems in cpu_cooling") Signed-off-by: Viresh Kumar Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a3995460491d4570af8e99ad34ddf6d1948254d9 Author: Florian Fainelli Date: Sat May 27 10:42:25 2017 -0700 net: phy: Relax error checking on sysfs_create_link() Some Ethernet drivers will attach/connect to a PHY device before calling register_netdevice() which is responsible for calling netdev_register_kobject() which would do the network device's kobject initialization. In such a case, sysfs_create_link() would return -ENOENT because the network device's kobject is not ready yet, and we would fail to connect to the PHY device. In order to keep things simple and symetrical, we just take the success path as indicative of the ability to access the network device's kobject, and create the second link if that's the case. Fixes: 5568363f0cb3 ("net: phy: Create sysfs reciprocal links for attached_dev/phydev") Reported-by: Woojung Hung Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 30 ++++++++++++++++++++++-------- include/linux/phy.h | 2 ++ 2 files changed, 24 insertions(+), 8 deletions(-) commit 523a89041c319bc0f6df60627ccb2413f441fb84 Author: Vivien Didelot Date: Fri May 26 18:02:42 2017 -0400 net: dsa: mv88e6xxx: handle SERDES error appropriately mv88e6xxx_serdes_power returns an error, so no need to print an error message inside of it. Rather print it in its caller when the error is ignored, which is in the mv88e6xxx_port_disable void function. Catch and return its error in the counterpart mv88e6xxx_port_enable. Fixes: 04aca9938255 ("dsa: mv88e6xxx: Enable/Disable SERDES on port enable/disable") Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 5f1d258d5389643ee306bf616385d992ce39eac5 Merge: 34aa83c 7a7e96e Author: David S. Miller Date: Sat May 27 18:51:42 2017 -0400 Merge branch 'rtnetlink-Updates-to-rtnetlink_event' Vladislav Yasevich says: ==================== rtnetlink: Updates to rtnetlink_event() First is the patch to add IFLA_EVENT attribute to the netlink message. It supports only currently white-listed events. Like before, this is just an attribute that gets added to the rtnetlink message only when the messaged was generated as a result of a netdev event. In my case, this is necessary since I want to trap NETDEV_NOTIFY_PEERS event (also possibly NETDEV_RESEND_IGMP event) and perform certain actions in user space. This is not possible since the messages generated as a result of netdev events do not usually contain any changed data. They are just notifications. This patch exposes this notification type to userspace. Second, I remove duplicate messages that a result of a change to bonding options. If netlink is used to configure bonding options, 2 messages are generated, one as a result NETDEV_CHANGEINFODATA event triggered by bonding code and one a result of device state changes triggered by netdev_state_change (called from do_setlink). V6: Updated names and refactored to make it less tied to netdev events. (From David Ahern) V5: Rebased. Added iproute2 patch to the series. V4: * Removed the patch the removed NETDEV_CHANGENAME from event whitelist. It doesn't trigger duplicate messages since name changes can only be done while device is down and netdev_state_change() doesn't report changes while device is down. * Added a patch to clean-up duplicate messages on bonding option changes. V3: Rebased. Cleaned-up duplicate event. V2: Added missed events (from David Ahern) ==================== Signed-off-by: David S. Miller commit 7a7e96e09d463c7c3d51a51c539ae4352085ed18 Author: Vlad Yasevich Date: Sat May 27 10:14:35 2017 -0400 bonding: Prevent duplicate userspace notification Whenever a user changes bonding options, a NETDEV_CHANGEINFODATA notificatin is generated which results in a rtnelink message to be sent. While runnig 'ip monitor', we can actually see 2 messages, one a result of the event, and the other a result of state change that is generated bo netdev_state_change(). However, this is not always the case. If bonding changes were done via sysfs or ifenslave (old ioctl interface), then only 1 message is seen. This patch removes duplicate messages in the case of using netlink to configure bonding. It introduceds a separte function that triggers a netdev event and uses that function in the syfs and ioctl cases. This was discovered while auditing all the different envents and continues the effort of cleaning up duplicated netlink messages. CC: David Ahern CC: Jiri Pirko Signed-off-by: Vladislav Yasevich Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 3 ++- drivers/net/bonding/bond_options.c | 27 +++++++++++++++++++++++++-- include/net/bond_options.h | 2 ++ 3 files changed, 29 insertions(+), 3 deletions(-) commit 3d3ea5af5c0b382bc9d9aed378fd814fb5d4a011 Author: Vlad Yasevich Date: Sat May 27 10:14:34 2017 -0400 rtnl: Add support for netdev event to link messages When netdev events happen, a rtnetlink_event() handler will send messages for every event in it's white list. These messages contain current information about a particular device, but they do not include the iformation about which event just happened. So, it is impossible to tell what just happend for these events. This patch adds a new extension to RTM_NEWLINK message called IFLA_EVENT that would have an encoding of event that triggered this message. This would allow the the message consumer to easily determine if it needs to perform certain actions. Signed-off-by: Vladislav Yasevich Acked-by: David Ahern Signed-off-by: David S. Miller include/linux/rtnetlink.h | 3 +- include/uapi/linux/if_link.h | 11 ++++++++ net/core/dev.c | 2 +- net/core/rtnetlink.c | 65 ++++++++++++++++++++++++++++++++++++++------ 4 files changed, 70 insertions(+), 11 deletions(-) commit 8d2fd30ecfc81f2b5f2bd60815bd3951cb23601c Author: Al Viro Date: Sat May 27 16:38:39 2017 -0400 osf_sigstack(): switch to put_user() Signed-off-by: Al Viro arch/alpha/kernel/osf_sys.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1cc6c4635e9fdc433fafc3b6613ed6924e918336 Author: Al Viro Date: Sat May 27 16:36:12 2017 -0400 osf_sys.c: switch handling of timeval32/itimerval32 to copy_{to,from}_user() Signed-off-by: Al Viro arch/alpha/kernel/osf_sys.c | 53 +++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 24 deletions(-) commit 33dd955df2d35bfca0fc851bcde9189839eb687a Merge: 9ba3eb5 92ebce5 Author: Al Viro Date: Sat May 27 16:22:20 2017 -0400 Merge branch 'work.sys_wait' into misc.alpha commit 9ba3eb5103cf56f0daaf07de4507df76e7813ed7 Author: Al Viro Date: Sat May 13 21:39:49 2017 -0400 osf_getdomainname(): use copy_to_user() Signed-off-by: Al Viro arch/alpha/kernel/osf_sys.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 4d7edbc34cccfc5a20c9c429c7757c34444a5fe2 Author: Al Viro Date: Sat May 27 16:11:23 2017 -0400 nfsd_readlink(): switch to vfs_get_link() Signed-off-by: Al Viro fs/nfsd/vfs.c | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) commit 104289576b33403a2c01097202a07dab74a5c231 Author: Al Viro Date: Sat May 27 00:32:51 2017 -0400 drbd: ->sendpage() never needed set_fs() Signed-off-by: Al Viro drivers/block/drbd/drbd_main.c | 3 --- 1 file changed, 3 deletions(-) commit c02205e9f3f8e4429e5531981906bf25282938b7 Author: Al Viro Date: Fri May 26 23:56:13 2017 -0400 dio: use probe_kernel_read() Signed-off-by: Al Viro drivers/dio/dio.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit f9f5796e7a534cc99cee577be47e109d5123baf1 Author: Al Viro Date: Fri May 26 23:47:39 2017 -0400 hp_sdc: use probe_kernel_read() Signed-off-by: Al Viro drivers/input/serio/hp_sdc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit fd7e8816990b12143c0872822b524ab7d956c3ae Author: Al Viro Date: Fri May 26 23:44:41 2017 -0400 hpfb: use probe_kernel_read() Signed-off-by: Al Viro drivers/video/fbdev/hpfb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c6f08966f50b5cf669387e0eb941a8f6b92a641d Author: Al Viro Date: Thu May 25 12:58:47 2017 -0400 switch compat_drm_dma() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) commit 9e0756800fa2cd6f10116cd0d8b77bb41522370a Author: Al Viro Date: Thu May 25 12:53:59 2017 -0400 switch compat_drm_resctx() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit d7631e30434e7fcf025dd2a7cba879f203f7849b Author: Al Viro Date: Thu May 25 12:50:51 2017 -0400 switch compat_drm_getsareactx() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 7900c6007a927da7944dd721dcdf69092829d4df Author: Al Viro Date: Thu May 25 12:47:00 2017 -0400 switch compat_drm_setsareactx() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 8c9e4cfb409838ca463933742560cbe8c5bd1601 Author: Al Viro Date: Thu May 25 12:44:05 2017 -0400 switch compat_drm_freebufs() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit dbae740e3688e7afc266518d08ad6a65eaf4f259 Author: Al Viro Date: Wed May 24 19:30:28 2017 -0400 switch compat_drm_markbufs() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit b36180a33b739ba563b002d0faeb7c6f7b7a2471 Author: Al Viro Date: Wed May 24 19:27:36 2017 -0400 switch compat_drm_addmap() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit 8547ee9d448be87858f59e3590fc54fc2574cd05 Author: Al Viro Date: Wed May 24 19:18:06 2017 -0400 switch compat_drm_getstats() to drm_ioctl_kernel() The reason we call drm_ioctl_kernel() at all is that we want error handling; conversions would be pointless there - user buffer is simply zeroed. Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 9e92662d01d87a54ee076cd1fcab8b199f6456eb Author: Al Viro Date: Wed May 24 19:10:32 2017 -0400 switch compat_drm_getclient() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_internal.h | 1 + drivers/gpu/drm/drm_ioc32.c | 29 ++++++++++++----------------- drivers/gpu/drm/drm_ioctl.c | 2 +- 3 files changed, 14 insertions(+), 18 deletions(-) commit 5c7640ab625829fd08b7fa0160c6fd188e70b5fe Author: Al Viro Date: Wed May 24 17:54:09 2017 -0400 switch compat_drm_infobufs() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_bufs.c | 48 +++++++++++++++++++----------------- drivers/gpu/drm/drm_ioc32.c | 58 ++++++++++++++++++-------------------------- drivers/gpu/drm/drm_legacy.h | 3 +++ 3 files changed, 53 insertions(+), 56 deletions(-) commit 8c4fe499cabfec5a8fbbc2919ceaae31341f6921 Author: Al Viro Date: Wed May 24 14:26:39 2017 -0400 switch compat_drm_getmap() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit 56c275ccfba8c992544a8ec46439f7d0ff21177f Author: Al Viro Date: Wed May 24 14:20:21 2017 -0400 compat_drm_setunique(): don't bother native equivalent would just fail with -EINVAL; do the same directly. Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 17e3dade62d6e95131ceba1535eb8d2e84b2e040 Author: Al Viro Date: Wed May 24 14:15:20 2017 -0400 switch compat_drm_getunique() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_internal.h | 1 + drivers/gpu/drm/drm_ioc32.c | 21 ++++++++------------- drivers/gpu/drm/drm_ioctl.c | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) commit 012c6741c6aa916e276a0dd2f1c0020041540206 Author: Al Viro Date: Wed May 24 14:11:03 2017 -0400 switch compat_drm_version() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_internal.h | 1 + drivers/gpu/drm/drm_ioc32.c | 42 ++++++++++++++++-------------------------- drivers/gpu/drm/drm_ioctl.c | 2 +- 3 files changed, 18 insertions(+), 27 deletions(-) commit ff22ff9e734a9cc165adddcd59f93a1c450a01ce Author: Al Viro Date: Wed May 24 13:42:27 2017 -0400 switch compat_drm_addbufs() to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 9f43e542a4e3bee069da939a151292fc5526e48f Author: Al Viro Date: Wed May 24 13:59:22 2017 -0400 drm_compat_ioctl(): prepare for conversions to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/drm_ioc32.c | 81 ++++++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 34 deletions(-) commit 7f0dfc1625dbaa1360414206d420231b9828701a Author: Al Viro Date: Wed May 24 12:31:12 2017 -0400 new helper: drm_ioctl_kernel() drm_ioctl() guts sans copying the structure to/from userland and parsing the ioctl cmd. Signed-off-by: Al Viro drivers/gpu/drm/drm_ioctl.c | 41 +++++++++++++++++++++++++++-------------- include/drm/drm_ioctl.h | 1 + 2 files changed, 28 insertions(+), 14 deletions(-) commit bcfe8ad8ef55a1cf3c935c2667e8e5ae598b3b7e Author: Al Viro Date: Sat May 27 00:29:34 2017 -0400 do_sigaltstack(): lift copying to/from userland into callers Signed-off-by: Al Viro kernel/signal.c | 107 ++++++++++++++++++++++++-------------------------------- 1 file changed, 46 insertions(+), 61 deletions(-) commit 613763a1f056211522bac77ff39f25706e678fdd Author: Al Viro Date: Fri May 26 22:04:29 2017 -0400 take compat_sys_old_getrlimit() to native syscall ... and sanitize the ifdefs in there Signed-off-by: Al Viro arch/powerpc/include/asm/compat.h | 1 - arch/s390/include/asm/compat.h | 1 - arch/x86/include/asm/compat.h | 1 - include/linux/syscalls.h | 2 +- kernel/compat.c | 29 ----------------------------- kernel/sys.c | 24 ++++++++++++++++++++++++ 6 files changed, 25 insertions(+), 33 deletions(-) commit 123dbfe088cb4f610c2a4c2da2d1a1f376c8886b Author: Al Viro Date: Fri May 26 21:59:48 2017 -0400 trim __ARCH_WANT_SYS_OLD_GETRLIMIT alpha. m32r, mips and parisc define it, even though the syscall itself is not wired. Signed-off-by: Al Viro arch/alpha/include/asm/unistd.h | 1 - arch/m32r/include/asm/unistd.h | 1 - arch/mips/include/asm/unistd.h | 1 - arch/parisc/include/asm/unistd.h | 1 - 4 files changed, 4 deletions(-) commit f822798e3ced63427d57d128ee8d118126455f84 Author: Dimitri Sivanich Date: Fri May 26 23:30:52 2017 +0200 posix-timers: Remove mmtimer leftovers After removing mmtimer, the mmtimer struct can be removed from the k_itimer struct. Signed-off-by: Thomas Gleixner Cc: Russ Anderson Cc: Dimitri Sivanich Cc: Mike Travis Cc: Nate Zimmer Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170526130534.GE30788@hpe.com include/linux/posix-timers.h | 6 ------ 1 file changed, 6 deletions(-) commit b6b3b80fceb175c825ad6c72659e0a72e201fc5f Author: Thomas Gleixner Date: Sat May 27 12:23:47 2017 +0200 alarmtimer: Fix posix-timer constification fallout Some freezer related variables are only used when either CONFIG_POSIX_TIMER or CONFIG_RTC_CLASS are enabled. Hide them when both are off. Fixes: d3ba5a9a345b ("posix-timers: Make posix_clocks immutable") Reported-by: Ingo Molnar Signed-off-by: Thomas Gleixner Cc: Christoph Helwig kernel/time/alarmtimer.c | 2 ++ 1 file changed, 2 insertions(+) commit a75d30c772078546ac00399a94ecdc82df1a4d72 Author: Christoph Hellwig Date: Sat May 27 06:07:19 2017 -0400 fs/locks: pass kernel struct flock to fcntl_getlk/setlk This will make it easier to implement a sane compat fcntl syscall. [ jlayton: fix undeclared identifiers in 32-bit fcntl64 syscall handler ] Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Signed-off-by: Jeff Layton fs/fcntl.c | 27 +++++++++++++++---- fs/locks.c | 79 +++++++++++++++--------------------------------------- include/linux/fs.h | 8 +++--- 3 files changed, 48 insertions(+), 66 deletions(-) commit 80b79dd0e2f29f06a6a54a5755c718f1c7ebb136 Author: Mauro Carvalho Chehab Date: Sat May 27 06:07:18 2017 -0400 fs: locks: Fix some troubles at kernel-doc comments There are a few syntax violations that cause outputs of a few comments to not be properly parsed in ReST format. No functional changes. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jeff Layton fs/locks.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit e622ec579b9ac3a3280088b991e3a26309582b3b Author: Peter Rajnoha Date: Sat May 27 11:07:35 2017 +0200 doc: update kernel version in sysfs-uevent ABI doc We expect the changes described in ABI/testing/sysfs-uevent doc to appear in 4.13. Signed-off-by: Peter Rajnoha Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-uevent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46505c802a55189955d97195c8567ee263168747 Author: Dmitry Torokhov Date: Fri May 26 13:57:49 2017 -0700 Revert "firmware: vpd: remove platform driver" This reverts commit 7975bd4cca05a99aa14964cfa22366ee64da50ad, because VPD relies on driver core to handle deferrals returned by coreboot_table_find(). Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 44 +++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) commit 925b865f88182e47891cb9b9eb27db4e5a86fc6f Author: Andrew Lunn Date: Fri May 26 01:44:44 2017 +0200 ARM: dts: vf610-zii: Add switch eeprom-length properties Two of the Ethernet switches on this board have EEPROMs connected. Add the eeprom-length property to the device tree, making it possible to access the EEPROM using ethtool -e. Signed-off-by: Andrew Lunn Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 2 ++ 1 file changed, 2 insertions(+) commit d3ba5a9a345b1243276f8a982e1bce557c2504fd Author: Christoph Hellwig Date: Fri May 26 12:03:11 2017 +0300 posix-timers: Make posix_clocks immutable There are no more modular users providing a posix clock. The register function is now pointless so the posix clock array can be initialized statically at compile time and the array including the various k_clock structs can be marked 'const'. Inspired by changes in the Grsecurity patch set, but done proper. [ tglx: Massaged changelog and fixed the POSIX_TIMER=n case ] Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: Mike Travis Cc: Dimitri Sivanich Link: http://lkml.kernel.org/r/20170526090311.3377-3-hch@lst.de include/linux/posix-timers.h | 9 +- kernel/time/alarmtimer.c | 89 ++++++++++--------- kernel/time/posix-clock.c | 2 +- kernel/time/posix-cpu-timers.c | 34 +++----- kernel/time/posix-timers.c | 191 +++++++++++++++++++---------------------- 5 files changed, 151 insertions(+), 174 deletions(-) commit 7e83cab824a86704cdbd7735c19d34e0ce423dc5 Author: Sarangdhar Joshi Date: Fri May 26 16:51:01 2017 -0700 remoteproc: Modify recovery path to use rproc_{start,stop}() Replace rproc_shutdown() by rproc_stop() and rproc_boot() by rproc_start() in the recovery path, in order to avoid remoteproc resources re-allocation overhead and to assist with extracting the coredumps after stopping the remote processor. Signed-off-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) commit 1efa30d0895e7e9a58a59b0880b330b38245be68 Author: Sarangdhar Joshi Date: Fri May 26 16:51:00 2017 -0700 remoteproc: Introduce rproc_{start,stop}() functions In the context of recovering from crash, rproc_trigger_recovery() does rproc_shutdown() followed by rproc_boot(). The remoteproc resources are cleaned up in rproc_shutdown() and immediately reallocated in rproc_boot() which is an unnecessary overhead. Furthermore, we want the memory regions to be accessible after stopping the remote processor, to be able to extract the memory content for a coredump. This patch factors out the code in rproc_boot() and rproc_shutdown() path and introduces rproc_{start,stop}() in order to avoid resource allocation overhead. Signed-off-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 143 +++++++++++++++++++++-------------- 1 file changed, 87 insertions(+), 56 deletions(-) commit 34aa83c2fc23e055968387c8b78ac8bafd735aff Merge: 47936d3 e2a9aa5 Author: David S. Miller Date: Fri May 26 20:46:35 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Overlapping changes in drivers/net/phy/marvell.c, bug fix in 'net' restricting a HW workaround alongside cleanups in 'net-next'. Signed-off-by: David S. Miller commit 8b9afe59465debe2b1bdba422caa54029a79aec2 Author: Chris Packham Date: Thu May 18 20:31:35 2017 +1200 EDAC, mv64x60: Replace in_le32()/out_le32() with readl()/writel() To allow this driver to be used on non-powerpc platforms it needs to use io accessors suitable for all platforms. Signed-off-by: Chris Packham Cc: linux-edac Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170518083135.28048-4-chris.packham@alliedtelesis.co.nz Signed-off-by: Borislav Petkov drivers/edac/mv64x60_edac.c | 84 ++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit 0b3df44eeb319186bb3be2f67c8e93a77156c825 Author: Chris Packham Date: Thu May 18 20:31:34 2017 +1200 EDAC, mv64x60: Fix pdata->name Change this from mpc85xx_pci_err to mv64x60_pci_err. The former is likely a hangover from when this driver was created. Signed-off-by: Chris Packham Cc: linux-edac Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170518083135.28048-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Borislav Petkov drivers/edac/mv64x60_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bddeb2a5b981507cbe2d7bdb545c32f204109c7 Author: Ming Lei Date: Fri May 26 19:53:20 2017 +0800 blk-mq: make per-sw-queue bio merge as default .bio_merge Because what the per-sw-queue bio merge does is basically same with scheduler's .bio_merge(), this patch makes per-sw-queue bio merge as the default .bio_merge if no scheduler is used or io scheduler doesn't provide .bio_merge(). Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++---- block/blk-mq-sched.h | 4 +--- block/blk-mq.c | 64 ---------------------------------------------------- 3 files changed, 58 insertions(+), 72 deletions(-) commit ab42f35d9cb5ac49b5a2a11f940e74f58f207280 Author: Ming Lei Date: Fri May 26 19:53:19 2017 +0800 blk-mq: merge bio into sw queue before plugging Before blk-mq is introduced, I/O is merged to elevator before being putted into plug queue, but blk-mq changed the order and makes merging to sw queue basically impossible. Then it is observed that throughput of sequential I/O is degraded about 10%~20% on virtio-blk in the test[1] if mq-deadline isn't used. This patch moves the bio merging per sw queue before plugging, like what blk_queue_bio() does, and the performance regression is fixed under this situation. [1]. test script: sudo fio --direct=1 --size=128G --bsrange=4k-4k --runtime=40 --numjobs=16 --ioengine=libaio --iodepth=64 --group_reporting=1 --filename=/dev/vdb --name=virtio_blk-test-$RW --rw=$RW --output-format=json RW=read or write Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit 47936d35edbac5e58064bd15e51136050b2f2717 Merge: 0ca3737 57a4943 Author: David S. Miller Date: Fri May 26 15:32:47 2017 -0400 Merge branch 'ibmvnic-Driver-updates' Nathan Fontenot says: ==================== ibmvnic: Driver updates This set of patches implements several updates to the ibmvnic driver to fix issues that have been found in testing. Most of the updates invovle updating queue handling during driver close and reset operations. ==================== Signed-off-by: David S. Miller commit 57a49436f4e8a76a9125c44d084d12b2c6e6206c Author: Nathan Fontenot Date: Fri May 26 10:31:12 2017 -0400 ibmvnic: Reset sub-crqs during driver reset When the ibmvnic driver is resetting, we can just reset the sub crqs instead of releasing all of their resources and re-allocting them. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 46 +++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) commit 8c0543adca2bb17808e46a24eb6e6247181a10b1 Author: Nathan Fontenot Date: Fri May 26 10:31:06 2017 -0400 ibmvnic: Reset tx/rx pools on driver reset When resetting the ibmvnic driver there is not a need to release and re-allocate the resources for the tx and rx pools. These resources can just be reset to avoid the re-allocations. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 71 +++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 4 deletions(-) commit 28cde751021abb16458b858da3403bd7c511c0d7 Author: Nathan Fontenot Date: Fri May 26 10:31:00 2017 -0400 ibmvnic: Reset the CRQ queue during driver reset When a driver reset operation occurs there is not a need to release the CRQ resources and re-allocate them. Instead a reset of the CRQ will suffice. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 152ce47dc48280182ab58539a721dadb3d7a8575 Author: Nathan Fontenot Date: Fri May 26 10:30:54 2017 -0400 ibmvnic: Check adapter state during ibmvnic_poll We do not want to process any receive frames if the ibmvnic_poll routine is invoked while a reset is in process. Also, before replenishing the rx pools in the ibmvnic_poll, we want to make sure the adapter is not in the process of closing. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f185a49a77bd34309fd6af6c5c7695386d010534 Author: Thomas Falcon Date: Fri May 26 10:30:48 2017 -0400 ibmvnic: Deactivate RX pool buffer replenishment on H_CLOSED If H_CLOSED is returned, halt RX buffer replenishment activity until firmware sends a notification that the driver can reset. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit b8c80b8413eec7ae154cdad692a7fd1cb32d0370 Author: Thomas Falcon Date: Fri May 26 10:30:42 2017 -0400 ibmvnic: Halt TX and report carrier off on H_CLOSED return code This patch disables transmissions and reports carrier off if xmit function returns that the hardware TX queue is closed. The driver can then await a signal from firmware to determine the correct reset method. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 8cb31cfc9448e2ce0bda899eb15f74bc0a875d90 Author: John Allen Date: Fri May 26 10:30:37 2017 -0400 ibmvnic: Non-fatal error handling Handle non-fatal error conditions. The process to do this when resetting the driver is to just do __ibmvnic_close followed by __ibmvnic_open. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 56 +++++++++++++++++++++----------------- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 32 insertions(+), 25 deletions(-) commit 10f7621588b86d181a167c1535d0754eb5a58ba8 Author: Thomas Falcon Date: Fri May 26 10:30:31 2017 -0400 ibmvnic: Fix cleanup of SKB's on driver close A race condition occurs when closing the driver. Free'ing of skb's can race between the close routine and ibmvnic_tx_interrupt. To fix this we move the claenup of tx pools during close to after the sub-CRQ interrupts are disabled. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ce9e4efbf4289ce48144ec4986f58033890fb6d Author: John Allen Date: Fri May 26 10:30:25 2017 -0400 ibmvnic: Send gratuitous arp on reset Send gratuitous arp after any reset. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) commit 017892c1ec15d4efcb30edf9fb56a64c889540c3 Author: John Allen Date: Fri May 26 10:30:19 2017 -0400 ibmvnic: Handle failover after failed init crq Handle case where phyp sends a failover after failing to send the init crq. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 11 ++++++++++- drivers/net/ethernet/ibm/ibmvnic.h | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) commit d944c3d60ac9ec6968d97ac5704155d0afac5216 Author: John Allen Date: Fri May 26 10:30:13 2017 -0400 ibmvnic: Track state of adapter napis Track the state of ibmvnic napis. The driver can get into states where it can be reset when napis are already disabled and attempting to disable them again will cause the driver to hang. Signed-off-by: John Allen Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 37 ++++++++++++++++++++++++++++--------- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 29 insertions(+), 9 deletions(-) commit 0ca3737526576d41e6a9e599428c7d44896f1c95 Merge: 5f9e27e e4f3c1c Author: David S. Miller Date: Fri May 26 15:18:50 2017 -0400 Merge branch 'mlxsw-Improve-extensibility' Jiri Pirko says: ==================== mlxsw: Improve extensibility Ido says: Since the initial introduction of the bridge offload in commit 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") the per-port struct was used to store both physical properties of the port as well as logical bridge properties such as learning and active VLANs in the VLAN-aware bridge. The above resulted in a bloated struct and code that is getting increasingly difficult to extend when stacked devices are taken into account as well as more advanced use cases such as IGMP snooping. Due to the incremental development nature of this driver as well as the complexity of the underlying hardware, subsequent design decisions failed to generalize the FID and RIF resources, which could've benefited from a more generic design, resulting in consolidated code paths and better extensibility with regards to future ASICs and use cases. This patchset tries to solve both of these design problems, as they're tightly coupled. To ease the code review, the changes are done in a bottom-up manner, in which the port struct is the first to be patched, then the FIDs the ports are mapped to and finally the RIFs configured on top. The first half of the patchset gradually moves away from the previous design to a design that is more in sync with the underlying hardware and which clearly separates between hardware-specific structs and logical ones such as a bridge port. All the bridge-specific information is removed from the port struct, as well as the list of VLAN devices ("vPorts") configured on top of it. Instead, a linked list of VLANs is introduced, which allows each VLAN to hold a state, such as mapping to a particular FID and membership in a bridge. The data structures are depicted in the following figure: mlxsw_sp_bridge_device +----------+ | | +----+ | | | | | +----------+ | mlxsw_sp_bridge_port | +----------+ | | | | +--> +-----+--> .. | | | | +----+-----+ | | | v | mlxsw_sp_bridge_vlan | +----------+ | | vid X | | | +--> .. | | | | +----+-----+ | | +--+----v-----+ | vid X | +--+ +--> .. | | | mlxsw_sp_port | +----------+ +----------+ | mlxsw_sp_port_vlan | | | | +--+ | | +----------+ This model allows us to consolidate many of the code paths relating to VLAN-aware and VLAN-unaware bridges, as the latter is simply represented using a bridge port with a VLAN list size of one. Another advantage of the model is that it's easy to extend it with future per-VLAN attributes - such as mrouter indication - by merely pushing these down from the bridge port struct to the bridge VLAN one. The second half of the patchset builds on top of previous work and prepares the driver for the common FID and RIF cores, which are finally implemented in the last two patches. These exploit the fact that despite the different kinds of FIDs and RIFs, they do share a common object on which the core operations can operate on. By hiding both objects from the rest of the driver and modeling their operations using a VFT, it'll be easier to extend the driver for future use cases such as VXLAN. Tested using following LNST recipes: https://github.com/jpirko/lnst/tree/master/recipes/switchdev ==================== Signed-off-by: David S. Miller commit e4f3c1c17b6d101af5474e8c72b38aa0baaf719d Author: Ido Schimmel Date: Fri May 26 08:37:40 2017 +0200 mlxsw: spectrum_router: Implement common RIF core The mlxsw driver currently implements three types of RIFs. VLAN and FID RIFs for L3 interfaces on top of VLAN-aware and VLAN-unaware bridges (respectively) and Subport RIFs for all other L3 interfaces. All the RIF types follow a common configuration procedure, which only differs in the type-specific bits. The patch exploits this fact and consolidates the common code paths, thereby simplifying the code and making it more extensible. This work also prepares the driver for use with future ASICs, where the range of the Subport RIFs will be extended and their configuration modified accordingly. By merely implementing a new RIF operations and selecting it during initialization, the same driver could be re-used. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 16 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 552 ++++++++++++--------- 3 files changed, 337 insertions(+), 237 deletions(-) commit a110748725450adb86cb4b20b24dd8c4e0cc2d8f Author: Ido Schimmel Date: Fri May 26 08:37:39 2017 +0200 mlxsw: spectrum: Implement common FID core The device supports three types of FIDs. 802.1Q and 802.1D FIDs for VLAN-aware and VLAN-unaware bridges (respectively) and rFIDs to transport packets to the router block. The different users (e.g., bridge, router, ACLs) of the FIDs infrastructure need not know about the internal FIDs implementation and can therefore interact with it using a restricted set of exported functions. By encapsulating the entire FID logic and hiding it from the rest of the driver we get a code base that it much simpler and easier to work with and extend. For example, in the current Spectrum ASIC only 802.1D FIDs can be assigned a VNI, but future ASICs will also support 802.1Q FIDs. With this patch in place, support for future ASICs can be easily added by implementing a new FID operations according to their capabilities. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 192 +--- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 123 ++- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 17 + drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 978 +++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 6 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 301 +++---- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 419 ++------- 8 files changed, 1278 insertions(+), 761 deletions(-) commit c9ec53f03460b374c5565c09beac2aec5dfc5cbc Author: Ido Schimmel Date: Fri May 26 08:37:38 2017 +0200 mlxsw: spectrum_router: Determine VR first when creating RIF All RIF types are associated with a virtual router (VR), so determine VR first when creating a RIF. That way, we can more easily integrate the common RIF core in the following patches. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 38 +++++++++++++--------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 8e3482d6adef158d362e46cae1415940bf0f9b07 Author: Ido Schimmel Date: Fri May 26 08:37:37 2017 +0200 mlxsw: spectrum_router: Flood packets to router after RIF creation If a packet ingress the router but can't be assigned an ingress RIF, it's dropped. Therefore, in the case of RIF configured on top of a bridge, it makes sense to start flooding broadcast packets to the router only after the RIF was created. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1b8f09a05f33dbced2e48cd1c6d3ee524739ff63 Author: Ido Schimmel Date: Fri May 26 08:37:36 2017 +0200 mlxsw: spectrum_router: Destroy RIF only based on its struct Now that all the information to create a RIF is contained within the RIF struct itself, we can also simplify the destruction logic. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ab01ae916911d11af9f4375b8276378b9474400c Author: Ido Schimmel Date: Fri May 26 08:37:35 2017 +0200 mlxsw: spectrum_router: Configure RIFs based on RIF struct All the information necessary for the configuration of RIFs can now be found in the RIF struct itself, so reduce the arguments list. This gets us one step closer to the common RIF core. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 56 +++++++++------------- 1 file changed, 23 insertions(+), 33 deletions(-) commit 4d93ceebf09b0e85adc8048752eea39785b300bf Author: Ido Schimmel Date: Fri May 26 08:37:34 2017 +0200 mlxsw: spectrum_router: Extend the RIF struct Currently, when a Subport RIF is configured, the LAG status and VLAN of the underlying port are read from the port itself. This is problematic, as we would like to have common code to configure all types of RIFs, which aren't necessarily bound to a port. Instead, embed the RIF in a struct specific to the Subport type, which contains all the necessary information. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 31 +++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) commit a13a594da06c437afa546888ddba64d3bd2db06d Author: Ido Schimmel Date: Fri May 26 08:37:33 2017 +0200 mlxsw: spectrum_router: Allocate RIF prior to its configuration In the following patches the RIF's configuration function is going to expect a RIF struct with all the necessary information. Therefore, allocate the RIF just before it's configured to the device. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 40 ++++++++++------------ 1 file changed, 19 insertions(+), 21 deletions(-) commit caa3ddf8e39022ee2cd87835bc400b9c516fcd95 Author: Ido Schimmel Date: Fri May 26 08:37:32 2017 +0200 mlxsw: spectrum_router: Allocate FID prior to RIF configuration The following patches are going to re-arrange the FID and RIF code, so that when the RIF is configured to the device based on the information present in the RIF struct (which points to a FID). For this reason, move the FID allocation to just before the RIF configuration. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) commit c57529e1d5d882fbd6383163e2cb2e4ba3118174 Author: Ido Schimmel Date: Fri May 26 08:37:31 2017 +0200 mlxsw: spectrum: Replace vPorts with Port-VLAN As explained in the cover letter, since the introduction of the bridge offload in the mlxsw driver, information related to the offloaded bridge and bridge ports was stored in the individual port struct, mlxsw_sp_port. This lead to a bloated struct storing both physical properties of the port (e.g., autoneg status) as well as logical properties of an upper bridge port (e.g., learning, mrouter indication). While this might work well for simple devices, it proved to be hard to extend when stacked devices were taken into account and more advanced use-cases (e.g., IGMP snooping) considered. This patch removes the excess information from the above struct and instead stores it in more appropriate structs that represent the bridge port, the bridge itself and a VLAN configured on the bridge port. The membership of a port in a bridge is denoted using the Port-VLAN struct, which points to the bridge port and also member in the bridge VLAN group of the VLAN it represents. This allows us to completely remove the vPort abstraction and consolidate many of the code paths relating to VLAN-aware and unaware bridges. Note that the FID / vFID code is currently duplicated, but this will soon go away when the common FID core will be introduced. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 775 ++------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 118 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 +- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 1769 ++++++++++++++------ 4 files changed, 1423 insertions(+), 1245 deletions(-) commit ed9ddd3aadac36869579d9075dd68067f87878cf Author: Ido Schimmel Date: Fri May 26 08:37:30 2017 +0200 mlxsw: spectrum: Don't create FIDs upon creation of VLAN uppers Up until now we used to create FIDs upon the creation of VLAN uppers on top of the VLAN-aware bridge. This was done so that in case a router interface (RIF) was configured on top of the bridge, the FID would already be there. Instead, simplify the code and only create the FID upon RIF creation. This is an intermediary step towards the introduction of the common FID core, in which this code would be completely removed. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 95 +--------------------- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 16 +++- 2 files changed, 13 insertions(+), 98 deletions(-) commit f0cebd81c9cec7395da71b43b9c02c000068907a Author: Ido Schimmel Date: Fri May 26 08:37:29 2017 +0200 mlxsw: spectrum: Don't lose bridge port device during enslavement Currently, when port netdevs (or their uppers) are enslaved to a bridge, we simply propagate the CHANGEUPPER event all the way down and lose the context of the actual netdevice used as the bridge port. This leads to a lot of information hanging off the ports (and vPorts), which doesn't logically belong there, such as mrouter indication and unknown unicast flood state. Following patches are going to put the mlxsw_sp_port struct on diet and instead introduce a bridge port struct, where the above mentioned information belongs. But in order to do that, we need to be able to determine the bridge port netdevice, so propagate it down. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 67 +++++++++++++++++--------- 1 file changed, 44 insertions(+), 23 deletions(-) commit 7cbecf245ade1739f34e00a10b2cdedd851bd7f4 Author: Ido Schimmel Date: Fri May 26 08:37:28 2017 +0200 mlxsw: spectrum_router: Replace vPorts with Port-VLAN We're going to get rid of vPorts completely later in the patchset, but the router code is self-contained, so it's a good candidate to start the transition with. Convert all the functions that expects to operate on a vPort to operate on a Port-VLAN instead. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 137 ++++++++++----------- 2 files changed, 67 insertions(+), 74 deletions(-) commit ce95e1545681dd73fa73ac12a06135c4fcdb47cc Author: Ido Schimmel Date: Fri May 26 08:37:27 2017 +0200 mlxsw: spectrum: Change signature of FID leave function When a vPort is destroyed, it leaves the FID it's currently mapped to (if any) and drops the reference. The FID's leave function expects to get the vPort as its argument, but this will have to change when the vPort model is retired. Change the function signature to expect a Port-VLAN struct instead and patch the call sites accordingly. The code introduced in this patch will be removed later in the patchset, but this intermediary step is required in order to ease the code review. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 42 +++++++++++++++------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 23 +++++++----- 3 files changed, 47 insertions(+), 21 deletions(-) commit 31a08a523ae453f7eaf5ad6c1da99d6199141b14 Author: Ido Schimmel Date: Fri May 26 08:37:26 2017 +0200 mlxsw: spectrum: Introduce Port-VLAN structure This is the first step in the transition from the vPort model to a unified Port-VLAN structure. The new structure is defined and created / destroyed upon invocation of the 8021q ndos, but it's not actually used throughout the code. Subsequent patches will initialize it correctly and also create / destroy it upon switchdev's VLAN object. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 48 ++++++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 23 ++++++++++++ 2 files changed, 68 insertions(+), 3 deletions(-) commit 4aafc368daac7781576ca6144622254adf469a15 Author: Ido Schimmel Date: Fri May 26 08:37:25 2017 +0200 mlxsw: spectrum: Set port's mode according to FID mappings We currently transition the port to "Virtual mode" upon the creation of its first VLAN upper, as we need to classify incoming packets to a FID using {Port, VID} and not only the VID. However, it's more appropriate to transition the port to this mode when the {Port, VID} are actually mapped to a FID. Either during the enslavement of the VLAN upper to a VLAN-unaware bridge or the configuration of a router port. Do this change now in preparation for the introduction of the FID core, where this operation will be encapsulated. To prevent regressions, this patch also explicitly configures an OVS slave to "Virtual mode". Otherwise, a packet that didn't hit an ACL rule could be classified to an existing FID based on a global VID-to-FID mapping, thus not incurring a FID mis-classification, which would otherwise trap the packet to the CPU to be processed by the OVS daemon. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 55 ++++++++++++---------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 11 +++++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 23 ++++++++- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 4 files changed, 63 insertions(+), 28 deletions(-) commit 9341b988e606f951df57d15569a425c6c74b945e Author: Ido Schimmel Date: Fri May 26 08:37:24 2017 +0200 bridge: Export multicast enabled state During enslavement to a bridge, after the CHANGEUPPER is sent, the multicast enabled state of the bridge isn't propagated down to the offloading driver unless it's changed. This patch allows such drivers to query the multicast enabled state from the bridge, so that they'll be able to correctly configure their flood tables during port enslavement. In case multicast is disabled, unregistered multicast packets can be treated as broadcast and be flooded through all the bridge ports. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/if_bridge.h | 5 +++++ net/bridge/br_multicast.c | 8 ++++++++ 2 files changed, 13 insertions(+) commit 1f51445af35e8477027d87ca015a10257b13f5a2 Author: Ido Schimmel Date: Fri May 26 08:37:23 2017 +0200 bridge: Export VLAN filtering state It's useful for drivers supporting bridge offload to be able to query the bridge's VLAN filtering state. Currently, upon enslavement to a bridge master, the offloading driver will only learn about the bridge's VLAN filtering state after the bridge device was already linked with its slave. Being able to query the bridge's VLAN filtering state allows such drivers to forbid enslavement in case resource couldn't be allocated for a VLAN-aware bridge and also choose the correct initialization routine for the enslaved port, which is dependent on the bridge type. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/if_bridge.h | 9 +++++++++ net/bridge/br_if.c | 2 +- net/bridge/br_mdb.c | 4 ++-- net/bridge/br_netlink.c | 2 +- net/bridge/br_private.h | 9 --------- net/bridge/br_vlan.c | 8 ++++++++ 6 files changed, 21 insertions(+), 13 deletions(-) commit 5f9e27e60ed961fe28183d8fe600789f676b460d Merge: 03d1da3 04aca99 Author: David S. Miller Date: Fri May 26 15:00:46 2017 -0400 Merge branch 'mv88e6xxx-SERDES' Andrew Lunn says: ==================== net: dsa: mv88e6xxx: Add basic SERDES support Some of the Marvell switches are SERDES interface, which must be powered up before packets can be passed. This is particularly true on the 6390, where the SERDES defaults to down, probably to save power. This series refactors the existing SERDES support for the 6352, and adds 6390 support. v2: Split phy functions out into phy.[ch] Don't add MV88E6XXX_FLAG_G1_ATU_FID back again Move the serdes op up in mv88e6xxx_ops Move some #defines into serdes.h Add a mv88e6xxx_serdes_power() Don't keep moving calls to this helper around in the code v3: Move more phy functions into phy.[ch] Make mv88e6xxx_phy_page_get() and mv88e6xxx_phy_page_put static Use the mv88e6xxx_serdes_power() helper everywhere dev_err(...) when mv88e6xxx_serdes_power() fails Add reviewed-by's ==================== Signed-off-by: David S. Miller commit 04aca9938255fc7097b3fb5700f408524656f2e2 Author: Andrew Lunn Date: Fri May 26 01:03:24 2017 +0200 dsa: mv88e6xxx: Enable/Disable SERDES on port enable/disable Implement the port enable/disable callbacks, which enable/disable the SERDES interfaces, if applicable. This should save a bit of power/heat. We also need to enable SERDES on CPU and DSA ports, so keep the existing call to the op, but make it conditional. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 50 +++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 8 deletions(-) commit 6335e9f2446b44139ac0722a81759a2b2f90bb4c Author: Andrew Lunn Date: Fri May 26 01:03:23 2017 +0200 net: dsa: mv88e6xxx: mv88e6390X SERDES support The mv88e6390X family has 8 SERDES lanes. These can be used for 2 10Gbps ports, ports 9 or 10. If these ports are used at slower speeds, the SERDES lanes become available for other ports for 1000Base-X. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 6 ++ drivers/net/dsa/mv88e6xxx/serdes.c | 154 +++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/serdes.h | 24 ++++++ 3 files changed, 184 insertions(+) commit ba9b989dc77d9f0a0968ff6bc13ad762d3bf468e Author: Andrew Lunn Date: Fri May 26 01:03:22 2017 +0200 net: dsa: mv88e6xxx: Remove SERDES flag Now that we use an op for SERDES operations, we don't need a flag for it. Remove it. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 23 ++--------------------- drivers/net/dsa/mv88e6xxx/phy.c | 3 --- 2 files changed, 2 insertions(+), 24 deletions(-) commit 6d91782f0f140ae515732a9543a0ae3f9f3140ce Author: Andrew Lunn Date: Fri May 26 01:03:21 2017 +0200 net: dsa: mv88e6xxx: Refactor mv88e6352 SERDES code into an op The mv88e6390 family has a different SERDES implementation. Refactor the mv88e6352 code into an ops function, so we can later add the mv88e6390 code. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 64 +++++++++--------------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 6 +-- drivers/net/dsa/mv88e6xxx/serdes.c | 75 +++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/serdes.h | 24 +++++++++++ 5 files changed, 122 insertions(+), 48 deletions(-) commit 10fa5bfcd69730765b496c7d91c5df0da7019489 Author: Andrew Lunn Date: Fri May 26 01:03:20 2017 +0200 net: dsa: mv88e6xxx: Move phy functions into phy.[ch] The upcoming SERDES support will need to make use of PHY functions. Move them out into a file of there own. No code changes. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 233 +------------------------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 2 +- drivers/net/dsa/mv88e6xxx/phy.c | 246 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/phy.h | 37 +++++ 5 files changed, 287 insertions(+), 232 deletions(-) commit 03d1da3c050b9d0f9536ccd0965af91ab8e1df63 Author: Uwe Kleine-König Date: Thu May 25 22:55:11 2017 +0200 net: ethernet: ax88796: support generating a random mac address Instead of falling back to 00:00:00:00:00:00 generate a random address if none is provided via platform data or from the device's register space. Signed-off-by: Uwe Kleine-König Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/8390/ax88796.c | 6 ++++++ 1 file changed, 6 insertions(+) commit db48cc2d31ee5b8ad3238633c4d76e473524b677 Merge: a55667e 5229566 Author: David S. Miller Date: Fri May 26 14:44:51 2017 -0400 Merge branch 'marvell-phy-cleanups' Andrew Lunn says: ==================== More marvell phy cleanups This patchset continues the cleanup of the Marvell PHY driver. These phys use pages to allow more than the 32 registers that fit into the MDIO address space. Cleanup the code used for changing pages. v2 Reverse christmas tree ==================== Signed-off-by: David S. Miller commit 52295666edbaeee71d7089976c751ba59b354449 Author: Andrew Lunn Date: Thu May 25 21:42:08 2017 +0200 net: phy: marvell: Uniform page names Bring all the page names together, remove the repeats, and make them uniform. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 94 +++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 48 deletions(-) commit 53798328ce682c038a7cc3960f6f63531e6a26db Author: Andrew Lunn Date: Thu May 25 21:42:07 2017 +0200 net: phy: marvell: helper to get and set page There is a common pattern of first reading the currently selected page and then changing to another page. Add a helper to do this. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 75 ++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 44 deletions(-) commit 975b388c912e62288c78bffdf4b2bf5fa21ee725 Author: Andrew Lunn Date: Thu May 25 21:42:06 2017 +0200 net: phy: marvell: More hidden page changes refactored EXT_ADDR_PAGE is the same meaning as MII_MARVELL_PHY_PAGE, i.e. change page. Replace it will calls to the helpers. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 62 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 16 deletions(-) commit 3ea17bc7bc023e9fb8b2a4ef255faa0ef5c0ae5e Author: Andrew Lunn Date: Thu May 25 21:42:05 2017 +0200 net: phy: marvell: #defines for copper and fibre pages Replace magic numbers for PHY pages with symbolic names. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit a55667e6f258408f1e7ddcf645d76d67a5ab3d92 Author: Prasad Kanneganti Date: Thu May 25 10:54:29 2017 -0700 liquidio: fix inaccurate count of napi-processed rx packets reported to Octeon lio_enable_irq (called by napi poll) is reporting to Octeon an inaccurate count of processed rx packets causing Octeon to eventually stop forwarding packets to the host. Fix it by using this formula for an accurate count: processed rx packets = droq->pkt_count - droq->pkts_pending Also increase SOFT_COMMAND_BUFFER_SIZE to match what the firmware expects. Signed-off-by: Prasad Kanneganti Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/octeon_device.c | 6 ++++-- drivers/net/ethernet/cavium/liquidio/octeon_iq.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) commit d5c7d9b934dc07261e97088681e3753b3f5eba80 Author: Prasad Kanneganti Date: Thu May 25 10:42:14 2017 -0700 liquidio: fix rare pci_driver.probe failure of VF driver There's a rare pci_driver.probe failure of the VF driver that's caused by PF/VF handshake going out of sync. The culprit is octeon_mbox_write() who ignores an ack timeout condition; it just keeps unconditionally writing all elements of mbox_cmd->data[] even when the other side is not ready for them. Fix it by making each write of mbox_cmd->data[i] conditional to having previously received an ack. Also fix the octeon_mbox_state enum such that each state gets a unique value. Also add ULL suffix to numeric literals in macro definitions. Signed-off-by: Prasad Kanneganti Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 5 ++++- drivers/net/ethernet/cavium/liquidio/octeon_mailbox.h | 12 ++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) commit ae782dec2c60457ec66a5c2589f4bd135ffa5893 Merge: 9226976 86f22d0 Author: David S. Miller Date: Fri May 26 14:37:42 2017 -0400 Merge branch 'phy-sysfs-reciprocal-links' Florian Fainelli says: ==================== net: phy: Create sysfs reciprocal links for attached_dev/phydev This patch series addresses a device topology shortcoming where a program scanning /sys would not be able to establish a mapping between the network device and the PHY device. In the process it turned out that no PHY device documentation existed for sysfs attributes. Changes in v2: - document possible phy_interface values in sysfs-class-net-phydev ==================== Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 86f22d04dfb5412ffb872f08c1660e3917886925 Author: Florian Fainelli Date: Thu May 25 09:21:43 2017 -0700 net: sysfs: Document PHY device sysfs attributes Document the different sysfs attributes that exist for PHY devices: attached_dev, phy_has_fixups, phy_id and phy_interface. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/ABI/testing/sysfs-class-net-phydev | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 8f60219890bd46ca7e54f86c47042f83377d1b5f Author: Florian Fainelli Date: Thu May 25 09:21:42 2017 -0700 net: sysfs: Document "phydev" symbolic link Now that we link the network device to its PHY device, document this sysfs symbolic link. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/ABI/testing/sysfs-class-net | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5568363f0cb358305b90ab3d3330f757943f6d0d Author: Florian Fainelli Date: Thu May 25 09:21:41 2017 -0700 net: phy: Create sysfs reciprocal links for attached_dev/phydev There is currently no way for a program scanning /sys to know whether a network device is attached to a particular PHY device, just like the PHY device is not pointed back to its attached network device. Create a symbolic link in the network device's namespace named "phydev" which points to the PHY device and create a symbolic link in the PHY device's namespace named "attached_dev" that points back to the network device. These links are set up during phy_attach_direct() and removed during phy_detach() for symetry. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bbe5b23dfdd346e782f8c56ab01bb3f5eaddd438 Author: Carlo Caione Date: Mon Apr 17 23:42:44 2017 +0200 ARM: dts: meson: Extend L2 cache controller node for Meson8 and Meson8b This patch extends the L2 cache controller node for the Amlogic Meson8 and Meson8b SoCs with some missing parameters. These are taken from the Amlogic GPL kernel source. Signed-off-by: Carlo Caione [apply the change to Meson8 and Meson8b and updated description] Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 6 ++++++ arch/arm/boot/dts/meson8b.dtsi | 6 ++++++ 2 files changed, 12 insertions(+) commit f44135e1f961d5bed1e737ff8e67564cdfa5eb85 Author: Martin Blumenstingl Date: Mon Apr 17 23:39:38 2017 +0200 ARM: dts: meson8b: inherit meson.dtsi from meson8b.dtsi Currently only meson6.dtsi and meson8.dtsi inherit the generic meson.dtsi. However, since the Meson8b platform is basically a slightly updated version of Meson8 we can safely inherit meson.dtsi. An indicator for this are the nodes which are identical in meson.dtsi and meson8b.dtsi (L2, gic, timer, uart_AO, uart_A, uart_B, uart_C). Additionally this makes the following devices available on Meson8b which were not avaialble before (however, since all affected drivers support Meson6, Meson8 and the whole GX series there's no reason to assume that they are not working): - i2c_a and i2c_B - the IR receiver - SPFIC (SPI flash controller) - the dwmac ethernet controller Differences between Meson8 and Meson8b seem to be: - ARM Cortex-A5 core instead of Cortex-A9 on Meson8 - dwmac on Meson8b supports RGMII - small pinctrl updates Inheriting meson.dtsi makes it easier to maintain by removing duplicate definitions. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 210 +++++++++++++++++------------------------ 1 file changed, 84 insertions(+), 126 deletions(-) commit 200a575b68d25c5ad4d3379e6d43e9b3f6083e1b Author: Martin Blumenstingl Date: Mon Apr 17 23:39:37 2017 +0200 ARM: dts: meson: organize devices in their corresponding busses The Amlogic Meson SoCs have most of the internal peripherals organized in busses. Use them to make the dts easier to read and to avoid duplicated register (bus) offset definitions. The bus information is taken from the vendor kernel: #define IO_CBUS_PHY_BASE 0xc1100000 ///2M #define IO_AOBUS_PHY_BASE 0xc8100000 ///1M There are more internal busses (such as the abp bus which seems to contain audio, HDMI and Mali registers), but since we don't have drivers for them yet these are not added (yet). Signed-off-by: Martin Blumenstingl [khilman: minor whitespace fix] Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 178 ++++++++++++++++++++++-------------------- arch/arm/boot/dts/meson6.dtsi | 2 - arch/arm/boot/dts/meson8.dtsi | 116 ++++++++++++++++++--------- 3 files changed, 170 insertions(+), 126 deletions(-) commit 9226976f9bad60e3eeb36a9d69341a584c87a0c3 Merge: 5dafc87 18c3a61 Author: David S. Miller Date: Fri May 26 14:12:52 2017 -0400 Merge branch 'RTM_GETROUTE--return-fib-result' Roopa Prabhu says: ==================== net: extend RTM_GETROUTE to return fib result This series adds a new RTM_F_FIB_MATCH flag to return matched fib result with RTM_GETROUTE. This is useful for applications and protocols in userspace wanting to query the selected route. examples (with patched iproute2): ipv4: ---- $ip route show default via 192.168.0.2 dev eth0 10.0.14.0/24 nexthop via 172.16.0.3 dev dummy0 weight 1 nexthop via 172.16.1.3 dev dummy1 weight 1 $ip route get 10.0.14.2 10.0.14.2 via 172.16.1.3 dev dummy1 src 172.16.1.1 cache $ip route get fibmatch 10.0.14.2 10.0.14.0/24 nexthop via 172.16.0.3 dev dummy0 weight 1 nexthop via 172.16.1.3 dev dummy1 weight 1 ipv6: ---- $ip -6 route show 2001:db9:100::/120 metric 1024 nexthop via 2001:db8:2::2 dev dummy0 weight 1 nexthop via 2001:db8:12::2 dev dummy1 weight 1 $ip -6 route get 2001:db9:100::1 2001:db9:100::1 from :: via 2001:db8:12::2 dev dummy1 src 2001:db8:12::1 metric 1024 pref medium $ip -6 route get fibmatch 2001:db9:100::1 2001:db9:100::/120 metric 1024 nexthop via 2001:db8:12::2 dev dummy1 weight 1 nexthop via 2001:db8:2::2 dev dummy0 weight 1 v2: - pick up new forward port of patch-01 from david - inet6_rtm_getroute: use container_of for rt6_info to dst conversion ==================== Signed-off-by: David S. Miller commit 18c3a61c4264cd2f7d6f1bde4b1bf036d5b0a2bc Author: Roopa Prabhu Date: Thu May 25 10:42:40 2017 -0700 net: ipv6: RTM_GETROUTE: return matched fib result when requested This patch adds support to return matched fib result when RTM_F_FIB_MATCH flag is specified in RTM_GETROUTE request. This is useful for user-space applications/controllers wanting to query a matching route. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/ipv6/route.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit b61798130f1be5bff08712308126c2d7ebe390ef Author: Roopa Prabhu Date: Thu May 25 10:42:39 2017 -0700 net: ipv4: RTM_GETROUTE: return matched fib result when requested This patch adds support to return matched fib result when RTM_F_FIB_MATCH flag is specified in RTM_GETROUTE request. This is useful for user-space applications/controllers wanting to query a matching route. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/ipv4/route.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 0be1b305d9b808e5b28e74f4ef807851c14c39f2 Author: Roopa Prabhu Date: Thu May 25 10:42:38 2017 -0700 net: ipv4: add new RTM_F_FIB_MATCH flag for use with RTM_GETROUTE This flag when specified will return matched fib result in response to a RTM_GETROUTE query. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller include/uapi/linux/rtnetlink.h | 1 + 1 file changed, 1 insertion(+) commit 6ffd903415320d68a528865296e4740da350785e Author: David Ahern Date: Thu May 25 10:42:37 2017 -0700 net: ipv4: Save trie prefix to fib lookup result Prefix is needed for returning matching route spec on get route request. Signed-off-by: David Ahern Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller include/net/ip_fib.h | 1 + net/ipv4/fib_trie.c | 1 + 2 files changed, 2 insertions(+) commit 3765d35ed8b9363cbf72ffe2282002d717a40843 Author: David Ahern Date: Thu May 25 10:42:36 2017 -0700 net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup Convert inet_rtm_getroute to use ip_route_input_rcu and ip_route_output_key_hash_rcu passing the fib_result arg to both. The rcu lock is held through the creation of the response, so the rtable/dst does not need to be attached to the skb and is passed to rt_fill_info directly. In converting from ip_route_output_key to ip_route_output_key_hash_rcu the xfrm_lookup_route in ip_route_output_flow is dropped since flowi4_proto is not set for a route get request. Signed-off-by: David Ahern Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/ipv4/route.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit d3166e0c959311881eaf7ed2e5130822d4337905 Author: David Ahern Date: Thu May 25 10:42:35 2017 -0700 net: ipv4: Remove event arg to rt_fill_info rt_fill_info has 1 caller with the event set to RTM_NEWROUTE. Given that remove the arg and use RTM_NEWROUTE directly in rt_fill_info. Signed-off-by: David Ahern Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/ipv4/route.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5510cdf7be042a1943222e19912f13a396c0b914 Author: David Ahern Date: Thu May 25 10:42:34 2017 -0700 net: ipv4: refactor ip_route_input_noref A later patch wants access to the fib result on an input route lookup with the rcu lock held. Refactor ip_route_input_noref pushing the logic between rcu_read_lock ... rcu_read_unlock into a new helper that takes the fib_result as an input arg. Signed-off-by: David Ahern Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller include/net/route.h | 3 +++ net/ipv4/route.c | 66 ++++++++++++++++++++++++++++++----------------------- 2 files changed, 40 insertions(+), 29 deletions(-) commit 3abd1ade6765e8edcccad6a9e1039cc709e65dde Author: David Ahern Date: Thu May 25 10:42:33 2017 -0700 net: ipv4: refactor __ip_route_output_key_hash A later patch wants access to the fib result on an output route lookup with the rcu lock held. Refactor __ip_route_output_key_hash, pushing the logic between rcu_read_lock ... rcu_read_unlock into a new helper with the fib_result as an input arg. To keep the name length under control remove the leading underscores from the name and add _rcu to the name of the new helper indicating it is called with the rcu read lock held. Signed-off-by: David Ahern Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller include/net/route.h | 9 ++++++--- net/ipv4/icmp.c | 2 +- net/ipv4/route.c | 53 +++++++++++++++++++++++++++++++---------------------- 3 files changed, 38 insertions(+), 26 deletions(-) commit 05306b848b367e326dc76e7552192056338ac6ad Author: Tony Lindgren Date: Thu May 25 09:15:58 2017 -0700 ARM: dts: Configure USB host for 37xx-evm Looks like nobody bothered to configure USB host for 37xx-evm when we converted things to device tree, so let's add it. This is similar to beagleboard configuration with few extra quirks to configure the port. And as with beagleboard, OHCI won't work because there is no USB LS/FS PHY. A HS USB hub is needed to use devices like keyboard and mice. Acked-by: Roger Quadros Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-evm-37xx.dts | 102 ++++++++++++++++++++++++++++++++ arch/arm/boot/dts/omap3-evm-common.dtsi | 33 +++++++++++ 2 files changed, 135 insertions(+) commit 05e7d622f1536266e6be352fa344e4cce51c95b0 Author: Javier Martinez Canillas Date: Tue May 23 15:34:31 2017 +0200 ARM: dts: omap: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-baltos.dtsi | 2 +- arch/arm/boot/dts/am335x-base0033.dts | 2 +- arch/arm/boot/dts/am335x-bone-common.dtsi | 10 +++++----- arch/arm/boot/dts/am335x-nano.dts | 2 +- arch/arm/boot/dts/am335x-pepper.dts | 2 +- arch/arm/boot/dts/am335x-shc.dts | 2 +- arch/arm/boot/dts/am335x-sl50.dts | 2 +- arch/arm/boot/dts/am437x-idk-evm.dts | 2 +- arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 2 +- arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 +- arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- arch/arm/boot/dts/omap3-sb-t35.dtsi | 2 +- arch/arm/boot/dts/omap4-var-som-om44.dtsi | 2 +- arch/arm/boot/dts/omap5-cm-t54.dts | 2 +- arch/arm/boot/dts/omap5-sbc-t54.dts | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) commit cb11a8baa504a85973def5a848502bbdb944c450 Author: Tony Lindgren Date: Mon May 22 09:13:45 2017 -0700 ARM: dts: Enable earlycon stdout path for LogicPD torpedo As long as the kernel cmdline has "earlycon" in it, this allows seeing debug messages earlier and does not require DEBUG_LL to be enabled. Acked-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit bfaa10635f2e911f8edc7de4fd40a15322bb91e2 Author: Tony Lindgren Date: Mon May 22 09:13:46 2017 -0700 ARM: dts: Enable earlycon stdout path for duovero As long as the kernel cmdline has "earlycon" in it, this allows seeing debug messages earlier and does not require DEBUG_LL to be enabled. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-duovero.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit c2498af5c036ee72e0a0f4247770cab7fd1f34b5 Author: Ricardo Salveti Date: Mon May 22 11:51:38 2017 -0300 arm: dts: boneblack-wireless: add WL1835 Bluetooth device node This adds the serial slave device for the WL1835 Bluetooth interface. Signed-off-by: Ricardo Salveti Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-boneblack-wireless.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 2303587b9b1d7867c6d2ec4ea3bc341a1c8be486 Author: Suman Anna Date: Fri May 19 15:47:42 2017 -0500 ARM: dts: am571x-idk: Enable the system mailboxes 5 and 6 Enable the System Mailboxes 5 and 6 and the corresponding child sub-mailbox (IPC 3.x) nodes for the AM571x IDK board. This is needed to enable communication with the respective remote processors IPU1, IPU2, and DSP1 from the MPU. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren arch/arm/boot/dts/am571x-idk.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 3264ce2079f379b006ae951c14ebac81058d87d5 Author: Suman Anna Date: Fri May 19 15:47:41 2017 -0500 ARM: dts: am572x-idk: Enable the system mailboxes 5 and 6 Enable the System Mailboxes 5 and 6 and the corresponding child sub-mailbox (IPC 3.x) nodes for the AM572x IDK board. This is needed to enable communication with the respective remote processors IPU1, IPU2, DSP1 and DSP2 from the MPU. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren arch/arm/boot/dts/am572x-idk.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit bd71af3c71b51b02f83e3987a3a44ca51894ae8a Author: Uwe Kleine-König Date: Thu May 18 15:00:09 2017 +0200 ARM: dts: omap4-devkit8000: fix gpmc ranges property With two separate &gpmc nodes the second ranges property overwrites the first. So put nand and ethernet in a single node and merge the ranges. While at it also fix the ethernet suffix. Signed-off-by: Uwe Kleine-König Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-devkit8000-common.dtsi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 5dafc87f40d7b7f2b2a3b3153399143c333ec785 Merge: c067598 ec8b1fb Author: David S. Miller Date: Fri May 26 11:01:50 2017 -0400 Merge branch 'nfp-devlink-port-implementation' Jakub Kicinski says: ==================== nfp: devlink port implementation This series adds basic devlink support. The operations we can perform are port show and port split/unsplit. v2: Register devlink first, and then register all the ports. Port {,un}split searches the port list, which is protected by a mutex. If port split is requested before ports are registered we will simply not find the port and return -EINVAL. ==================== Signed-off-by: David S. Miller commit ec8b1fbe682deb376062c5ed04ef9c78160ffbf0 Author: Jakub Kicinski Date: Fri May 26 01:03:36 2017 -0700 nfp: support port splitting via devlink Add support for configuring port split with devlink. Add devlink callbacks to validate requested config and call NSP helpers. Getting the right nfp_port structure can be done with simple iteration. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 97 +++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 23 ++++-- drivers/net/ethernet/netronome/nfp/nfp_port.c | 19 +++++ drivers/net/ethernet/netronome/nfp/nfp_port.h | 4 + 4 files changed, 136 insertions(+), 7 deletions(-) commit f0b81195381f0fd9ec84009a0e5a4bb12ccc9637 Author: Jakub Kicinski Date: Fri May 26 01:03:35 2017 -0700 nfp: calculate total port lanes for split For port splitting we will need to know the total number of lanes in a port. Calculate that based on eth_table information. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 3 +++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) commit 53e7a08f0da16eb67daf616405b0579e98565cdc Author: Jakub Kicinski Date: Fri May 26 01:03:34 2017 -0700 nfp: register ports as devlink ports Extend nfp_port to contain devlink_port structures. Register the ports to allow users inspecting device ports. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 45 +++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 13 +++++++ drivers/net/ethernet/netronome/nfp/nfp_port.h | 8 ++++ 3 files changed, 66 insertions(+) commit 71f8a116b5c4b4957c56a2f1a5bd2a7e19d6d400 Author: Jakub Kicinski Date: Fri May 26 01:03:33 2017 -0700 nfp: add helper for cleaning up vNICs We will soon have to invoke more clean up for vNICs. Move the cleanup callbacks into a helper. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 1851f93fd2ee3dc0f3a6813385010a5d7ec1aabd Author: Simon Horman Date: Fri May 26 01:03:32 2017 -0700 nfp: add devlink support Add initial devlink support. This patch simply switches allocation of per-adapter structure to devlink's priv and register devlink with empty ops table. See following patches for implementation of particular ops. We should now clear the app pointer on exit, this is how devlink callbacks will know app is not initialized. Signed-off-by: Simon Horman Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 39 +++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_main.c | 24 +++++++++++--- drivers/net/ethernet/netronome/nfp/nfp_main.h | 3 ++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 1 + 5 files changed, 63 insertions(+), 5 deletions(-) commit 346cfe8482bf491f6e3e88ea89bc0d6be2b02efd Author: Jakub Kicinski Date: Fri May 26 01:03:31 2017 -0700 nfp: move mutex init out of net code Move mutex init to main file close to structure allocation. This will allow mutex to be taken before net code runs (e.g. from devlink callbacks). While at it remember to destroy the mutex. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 4 ++++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) commit c9e0c6da53231f685d7dbd3d420483e1ede212e2 Author: Chris Wilson Date: Fri May 26 14:22:09 2017 +0100 drm/i915: Keep the forcewake timer alive for 1ms past the most recent use Currently the timer is armed for 1ms after the first use and is killed immediately, dropping the forcewake as early as possible. However, for very frequent operations the forcewake dance has a large impact on latency and keeping the timer alive until we are idle is preferred. To achieve this, if we call intel_uncore_forcewake_get whilst the timer is alive (repeated use), then set a flag to restart the timer on expiry rather than drop the forcewake usage count. The timer is racy, the consequence of the race is to expire the timer earlier than is now desired but does not impact on correct behaviour. The offset the race slightly, we set the active flag again on intel_uncore_forcewake_put. The effect should be to reduce the jitter of reacquiring the fw every 1ms on a busy system. However, the cost is to keep the timer alive for an extra 1ms on a nearly idle system. We chose to incur the jitter previously to keep the timer off for as much as possible. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170526132209.14640-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_uncore.c | 15 ++++++++++++--- drivers/gpu/drm/i915/intel_uncore.h | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) commit ac58d2ab0ad9c8b7e41404048a3ba4375db012d3 Author: Daniele Ceraolo Spurio Date: Mon May 22 10:50:28 2017 -0700 drm/i915/guc: capture GuC logs if FW fails to load We're currently deleting the GuC logs if the FW fails to load, but those are still useful to understand why the loading failed. Keeping the object around allows us to access them after driver load is completed. v2: keep the object around instead of using kernel memory (chris) don't store the logs in the gpu_error struct (Chris) add a check on guc_log_level to avoid snapshotting empty logs v3: use separate debugfs for error log (Chris) v4: rebased v5: clean up obj selection, move err_load inside guc_log, move err_load cleanup, rename functions (Michal) v6: move obj back to intel_guc, move functions to intel_uc.c, don't clear obj on new GuC load, free object only if enable_guc_loading is set (Michal) Cc: Chris Wilson Cc: Oscar Mateo Cc: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Link: http://patchwork.freedesktop.org/patch/msgid/1495475428-19295-1-git-send-email-daniele.ceraolospurio@intel.com Reviewed-by: Michal Wajdeczko Tested-by: Michel Thierry Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 39 ++++++++++++++++++++++++------------- drivers/gpu/drm/i915/intel_uc.c | 25 ++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_uc.h | 3 +++ 3 files changed, 51 insertions(+), 16 deletions(-) commit 5a29ef22098874db79af7bf92a247a0f503bfa6e Author: Vincent Legoll Date: Tue May 9 10:34:09 2017 +0200 genirq: Make early_irq_init() print out more informative The printk in early_irq_init() is cryptic and badly formatted: NR_IRQS:33024 nr_irqs:968 16 The last number is the number of preallocated interrupts, so add a prefix to it: NR_IRQS: 33024, nr_irqs: 968, preallocated irqs: 16 Cleanup the formatting for better readability as well. Signed-off-by: Vincent Legoll Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/1494318849-6733-1-git-send-email-vincent.legoll@gmail.com kernel/irq/irqdesc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9df8109fd7969b94ed2332ae828e0b08ae8cbf9a Author: Matthias Kaehlcke Date: Mon May 22 16:20:35 2017 -0700 x86/ioapic: Remove unused IO_APIC_irq_trigger() function The function isn't used since commit: 5ad274d41c1b ("x86/irq: Remove unused old IOAPIC irqdomain interfaces") Removing it fixes the following warning when building with clang: arch/x86/kernel/apic/io_apic.c:1219:19: error: unused function 'IO_APIC_irq_trigger' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke Cc: Andrew Morton Cc: Douglas Anderson Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170522232035.187985-1-mka@chromium.org Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/io_apic.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit f8a58d639dd95b0188862b4c1c1cc81c737db612 Author: Michal Wajdeczko Date: Fri May 26 11:13:25 2017 +0000 drm/i915/guc: Introduce buffer based cmd transport Buffer based command transport can replace MMIO based mechanism. It may be used to perform host-2-guc and guc-to-host communication. Portions of this patch are based on work by: Michel Thierry Robert Beckett Daniele Ceraolo Spurio v2: use gem_object_pin_map (Chris) don't use DEBUG_RATELIMITED (Chris) don't track action stats (Chris) simplify next fence (Chris) use READ_ONCE (Chris) move blob allocation to new function (Chris) v3: use static owner id (Daniele) v4: but keep channel initialization generic (Daniele) and introduce owner_sub_id (Daniele) Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Oscar Mateo Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170526111326.87280-3-michal.wajdeczko@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/intel_guc_ct.c | 461 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_guc_ct.h | 86 +++++++ drivers/gpu/drm/i915/intel_guc_fwif.h | 43 ++++ drivers/gpu/drm/i915/intel_uc.c | 19 +- drivers/gpu/drm/i915/intel_uc.h | 3 +- 7 files changed, 613 insertions(+), 2 deletions(-) commit 2f64085a75f623f5f5f32237131ea8de1c59be0e Author: Michal Wajdeczko Date: Fri May 26 11:13:24 2017 +0000 drm/i915/guc: Disable send function on fini In earlier patch 789a625 we were enabling send function only after successful init. For completeness, we should make sure that we disable it on fini. v2: don't group steps by submission flag (Chris) Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170526111326.87280-2-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 77a494a7250ce082def81a5fa67c24789ecabe0b Author: Puthikorn Voravootivat Date: Tue May 23 15:38:04 2017 -0700 drm: Add definition for eDP backlight frequency This patch adds the following definition - Bit mask for EDP_PWMGEN_BIT_COUNT and min/max cap register which only use bit 0:4 - Base frequency (27 MHz) for backlight PWM frequency generator. Signed-off-by: Puthikorn Voravootivat Reviewed-by: Dhinakaran Pandiyan Acked-by: Dave Airlie Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170523223805.46372-5-puthik@chromium.org include/drm/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) commit ce70e06c093a9609377e93ee20e7c528e156af14 Author: Geert Uytterhoeven Date: Mon May 22 15:11:45 2017 +0200 spi: slave: Add SPI slave handler controlling system state Add an example SPI slave handler to allow remote control of system reboot, power off, halt, and suspend. Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown drivers/spi/Kconfig | 6 ++ drivers/spi/Makefile | 1 + drivers/spi/spi-slave-system-control.c | 154 +++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+) commit 29f9ffa0e1f9a17c866c04a01acfc9976d78f29a Author: Geert Uytterhoeven Date: Mon May 22 15:11:44 2017 +0200 spi: slave: Add SPI slave handler reporting uptime at previous message Add an example SPI slave handler responding with the uptime at the time of reception of the last SPI message. This can be used by an external microcontroller as a dead man's switch. Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown drivers/spi/Kconfig | 6 ++ drivers/spi/Makefile | 1 + drivers/spi/spi-slave-time.c | 129 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+) commit cf9e4784f3bde3e4749163384f27450ddffe746c Author: Hisashi Nakamura Date: Mon May 22 15:11:43 2017 +0200 spi: sh-msiof: Add slave mode support Add slave mode support to the MSIOF driver, in both PIO and DMA mode. For now this only supports the transmission of messages with a size that is known in advance. Signed-off-by: Hisashi Nakamura Signed-off-by: Hiromitsu Yamasaki [geert: Timeout handling cleanup, spi core integration, cancellation, rewording] Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/sh-msiof.txt | 2 + drivers/spi/spi-sh-msiof.c | 111 +++++++++++++++------ include/linux/spi/sh_msiof.h | 6 ++ 3 files changed, 86 insertions(+), 33 deletions(-) commit aa2ea9115bc3f0735aa65b833076cc5fe3da1489 Author: Geert Uytterhoeven Date: Mon May 22 15:11:42 2017 +0200 spi: Document SPI slave controller support Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown Documentation/spi/spi-summary | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 6c364062bfed3c34490e85bea52ff6e2d4f0f281 Author: Geert Uytterhoeven Date: Mon May 22 15:11:41 2017 +0200 spi: core: Add support for registering SPI slave controllers Add support for registering SPI slave controllers using the existing SPI master framework: - SPI slave controllers must use spi_alloc_slave() instead of spi_alloc_master(), and should provide an additional callback "slave_abort" to abort an ongoing SPI transfer request, - SPI slave controllers are added to a new "spi_slave" device class, - SPI slave handlers can be bound to the SPI slave device represented by an SPI slave controller using a DT child node named "slave", - Alternatively, (un)binding an SPI slave handler to the SPI slave device represented by an SPI slave controller can be done by (un)registering the slave device through a sysfs virtual file named "slave". From the point of view of an SPI slave protocol handler, an SPI slave controller looks almost like an ordinary SPI master controller. The only exception is that a transfer request will block on the remote SPI master, and may be cancelled using spi_slave_abort(). Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/Kconfig | 14 +++- drivers/spi/Makefile | 2 + drivers/spi/spi.c | 179 +++++++++++++++++++++++++++++++++++++++++------- include/linux/spi/spi.h | 35 ++++++++-- 4 files changed, 201 insertions(+), 29 deletions(-) commit a8830cb19cfea04edb0381b52fd90eec44986eb9 Author: Geert Uytterhoeven Date: Mon May 22 15:11:40 2017 +0200 spi: Document DT bindings for SPI controllers in slave mode Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-bus.txt | 76 ++++++++++++++--------- 1 file changed, 45 insertions(+), 31 deletions(-) commit 49d191dd5d41ca3a6b447075d50ce5f287171f71 Author: Puthikorn Voravootivat Date: Tue May 23 15:38:01 2017 -0700 drm/i915: Drop AUX backlight enable check for backlight control There are some panel that (1) does not support display backlight enable via AUX (2) support display backlight adjustment via AUX (3) support display backlight enable via eDP BL_ENABLE pin The current driver required that (1) must be support to enable (2). This patch drops that requirement. Signed-off-by: Puthikorn Voravootivat Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170523223805.46372-2-puthik@chromium.org drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 0b0cda4102de7a3dbcedfb5f943a5d08e4ec8500 Author: Chris Packham Date: Thu May 25 16:05:05 2017 +1200 spi: st-ssc4: whitespace cleanup Remove stray single spaces after a leading hard-tab. Signed-off-by: Chris Packham Signed-off-by: Mark Brown drivers/spi/spi-st-ssc4.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 155b8f3aa633dbce887cded6b6b9399a3c62683e Author: Kuninori Morimoto Date: Thu May 25 01:51:31 2017 +0000 ASoC: simple-card-utils: remove strict limitation of bit/frame master Current asoc_simple_card_parse_daifmt is keeping backward compatibility for bitmaster/framemaster which didn't use phandle. The keep compatibility, it is checking prefix length, but it is too strict. let's loosen it. Otherwise, OF-graph base sound card which doesn't have prefix can't detect daifmt. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ad7449969d827965484306ad8cc56edc7e55687c Author: Colin Ian King Date: Thu May 25 17:51:34 2017 +0100 spi: omap2-mcspi: remove redundant check for error status The check to see if status is less than zero is actually redundant as all previous places where it is -ve have already branched to the exit paths, so it is never less than zero at the check. Detected by CoverityScan, CID#1357119 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-omap2-mcspi.c | 3 --- 1 file changed, 3 deletions(-) commit 503ada8a6d00c70f5b6fe37249e9a5e2f9c9e202 Author: Richard Fitzgerald Date: Fri May 26 10:47:07 2017 +0100 ASoC: wm_adsp: Fix typo in algorithm list warning message The list terminator is 0xbedead but the message warning if it wasn't found was showing that 0xbeadead was expected. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07903ada96139ced48f2f893fe57a26a8fbc6043 Author: Christoph Hellwig Date: Fri May 26 12:03:10 2017 +0300 mmtimer: Remove the SGI SN2 mmtimer driver This driver supports direct system clock access on the ancient SGI SN2 IA64 systems, and implement the only non-builtin k_clock instance. Remove it as any remaining IA64 altix user will be running just as old distros anyway. Dimitri Sivanich stated: "Since this is SN2 specific, this can be removed." Note that this does not affect the never uv_mmtimer driver for x86-based Altix systems. [ tglx: Added comment to CLOCK_SGI_CYCLE ] Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: Mike Travis Cc: Dimitri Sivanich Link: http://lkml.kernel.org/r/20170526090311.3377-2-hch@lst.de drivers/char/Kconfig | 9 - drivers/char/Makefile | 1 - drivers/char/mmtimer.c | 858 ---------------------------------------------- include/uapi/linux/time.h | 6 +- 4 files changed, 5 insertions(+), 869 deletions(-) commit 6bee1af9dcaa05c2b9289ec26ed121039dfea251 Author: Matthias Kaehlcke Date: Thu May 25 15:15:10 2017 -0700 platform/x86: intel_pmc_ipc: Mark ipc_data_readb() as __maybe_unused The function is currently not used, however it is part of the API and might be used in the future. Adding the attribute fixes the following warning when building with clang: drivers/platform/x86/intel_pmc_ipc.c:189:18: error: unused function 'ipc_data_readb' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49dfe2a6779717d9c18395684ee31bdc98b22e53 Author: Thomas Gleixner Date: Wed May 24 10:15:43 2017 +0200 cpuhotplug: Link lock stacks for hotplug callbacks The CPU hotplug callbacks are not covered by lockdep versus the cpu hotplug rwsem. CPU0 CPU1 cpuhp_setup_state(STATE, startup, teardown); cpus_read_lock(); invoke_callback_on_ap(); kick_hotplug_thread(ap); wait_for_completion(); hotplug_thread_fn() lock(m); do_stuff(); unlock(m); Lockdep does not know about this dependency and will not trigger on the following code sequence: lock(m); cpus_read_lock(); Add a lockdep map and connect the initiators lock chain with the hotplug thread lock chain, so potential deadlocks can be detected. Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081549.709375845@linutronix.de kernel/cpu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0266d81e9bf5cc1fe6405c0523dfa015fe55aae1 Author: Thomas Gleixner Date: Wed May 24 10:15:42 2017 +0200 acpi/processor: Prevent cpu hotplug deadlock With the enhanced CPU hotplug lockdep coverage the following lockdep splat happens: ====================================================== WARNING: possible circular locking dependency detected 4.12.0-rc2+ #84 Tainted: G W ------------------------------------------------------ cpuhp/1/15 is trying to acquire lock: flush_work+0x39/0x2f0 but task is already holding lock: cpuhp_thread_fun+0x30/0x160 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (cpuhp_state){+.+.+.}: lock_acquire+0xb4/0x200 cpuhp_kick_ap_work+0x72/0x330 _cpu_down+0x8b/0x100 do_cpu_down+0x3e/0x60 cpu_down+0x10/0x20 cpu_subsys_offline+0x14/0x20 device_offline+0x88/0xb0 online_store+0x4c/0xa0 dev_attr_store+0x18/0x30 sysfs_kf_write+0x45/0x60 kernfs_fop_write+0x156/0x1e0 __vfs_write+0x37/0x160 vfs_write+0xca/0x1c0 SyS_write+0x58/0xc0 entry_SYSCALL_64_fastpath+0x23/0xc2 -> #1 (cpu_hotplug_lock.rw_sem){++++++}: lock_acquire+0xb4/0x200 cpus_read_lock+0x3d/0xb0 apply_workqueue_attrs+0x17/0x50 __alloc_workqueue_key+0x1e1/0x530 scsi_host_alloc+0x373/0x480 [scsi_mod] ata_scsi_add_hosts+0xcb/0x130 [libata] ata_host_register+0x11a/0x2c0 [libata] ata_host_activate+0xf0/0x150 [libata] ahci_host_activate+0x13e/0x170 [libahci] ahci_init_one+0xa3a/0xd3f [ahci] local_pci_probe+0x45/0xa0 work_for_cpu_fn+0x14/0x20 process_one_work+0x1f9/0x690 worker_thread+0x200/0x3d0 kthread+0x138/0x170 ret_from_fork+0x31/0x40 -> #0 ((&wfc.work)){+.+.+.}: __lock_acquire+0x11e1/0x13e0 lock_acquire+0xb4/0x200 flush_work+0x5c/0x2f0 work_on_cpu+0xa1/0xd0 acpi_processor_get_throttling+0x3d/0x50 acpi_processor_reevaluate_tstate+0x2c/0x50 acpi_soft_cpu_online+0x69/0xd0 cpuhp_invoke_callback+0xb4/0x8b0 cpuhp_up_callbacks+0x36/0xc0 cpuhp_thread_fun+0x14e/0x160 smpboot_thread_fn+0x1e8/0x300 kthread+0x138/0x170 ret_from_fork+0x31/0x40 other info that might help us debug this: Chain exists of: (&wfc.work) --> cpu_hotplug_lock.rw_sem --> cpuhp_state Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(cpuhp_state); lock(cpu_hotplug_lock.rw_sem); lock(cpuhp_state); lock((&wfc.work)); *** DEADLOCK *** 1 lock held by cpuhp/1/15: cpuhp_thread_fun+0x30/0x160 stack backtrace: CPU: 1 PID: 15 Comm: cpuhp/1 Tainted: G W 4.12.0-rc2+ #84 Hardware name: Supermicro SYS-4048B-TR4FT/X10QBi, BIOS 1.1a 07/29/2015 Call Trace: dump_stack+0x85/0xc4 print_circular_bug+0x209/0x217 __lock_acquire+0x11e1/0x13e0 lock_acquire+0xb4/0x200 ? lock_acquire+0xb4/0x200 ? flush_work+0x39/0x2f0 ? acpi_processor_start+0x50/0x50 flush_work+0x5c/0x2f0 ? flush_work+0x39/0x2f0 ? acpi_processor_start+0x50/0x50 ? mark_held_locks+0x6d/0x90 ? queue_work_on+0x56/0x90 ? trace_hardirqs_on_caller+0x154/0x1c0 ? trace_hardirqs_on+0xd/0x10 ? acpi_processor_start+0x50/0x50 work_on_cpu+0xa1/0xd0 ? find_worker_executing_work+0x50/0x50 ? acpi_processor_power_exit+0x70/0x70 acpi_processor_get_throttling+0x3d/0x50 acpi_processor_reevaluate_tstate+0x2c/0x50 acpi_soft_cpu_online+0x69/0xd0 cpuhp_invoke_callback+0xb4/0x8b0 ? lock_acquire+0xb4/0x200 ? padata_replace+0x120/0x120 cpuhp_up_callbacks+0x36/0xc0 cpuhp_thread_fun+0x14e/0x160 smpboot_thread_fn+0x1e8/0x300 kthread+0x138/0x170 ? sort_range+0x30/0x30 ? kthread_create_on_node+0x70/0x70 ret_from_fork+0x31/0x40 The problem is that the work is scheduled on the current CPU from the hotplug thread associated with that CPU. It's not required to invoke these functions via the workqueue because the hotplug thread runs on the target CPU already. Check whether current is a per cpu thread pinned on the target CPU and invoke the function directly to avoid the workqueue. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: linux-acpi@vger.kernel.org Cc: Len Brown Link: http://lkml.kernel.org/r/20170524081549.620489733@linutronix.de drivers/acpi/processor_throttling.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 62ec05dd71b19f5be890a1992227cc7b2ac0adc4 Author: Thomas Gleixner Date: Wed May 24 10:15:41 2017 +0200 sched: Provide is_percpu_thread() helper Provide a helper function for checking whether current task is a per cpu thread. Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081549.541649540@linutronix.de include/linux/sched.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fc8dffd379ca5620664336eb895a426b42847558 Author: Thomas Gleixner Date: Wed May 24 10:15:40 2017 +0200 cpu/hotplug: Convert hotplug locking to percpu rwsem There are no more (known) nested calls to get_online_cpus() and all observed lock ordering problems have been addressed. Replace the magic nested 'rwsem' hackery with a percpu-rwsem. Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081549.447014063@linutronix.de include/linux/cpu.h | 2 +- kernel/cpu.c | 107 +++++++--------------------------------------------- 2 files changed, 14 insertions(+), 95 deletions(-) commit 5d5dbc4ef27e72104dea6102e4d1a1bf5a8ed971 Author: Thomas Gleixner Date: Wed May 24 10:15:39 2017 +0200 s390: Prevent hotplug rwsem recursion The text patching functions which are invoked from jump_label and kprobes code are protected against cpu hotplug at the call sites. Use stop_machine_cpuslocked() to avoid recursion on the cpu hotplug rwsem. stop_machine_cpuslocked() contains a lockdep assertion to catch any unprotected callers. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Heiko Carstens Cc: Paul E. McKenney Cc: linux-s390@vger.kernel.org Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20170524081549.354513406@linutronix.de arch/s390/kernel/jump_label.c | 2 +- arch/s390/kernel/kprobes.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 9489cc8f370be811f7e741a772bcce88b712272d Author: Thomas Gleixner Date: Wed May 24 10:15:38 2017 +0200 arm: Prevent hotplug rwsem recursion The text patching functions which are invoked from jump_label and kprobes code are protected against cpu hotplug at the call sites. Use stop_machine_cpuslocked() to avoid recursion on the cpu hotplug rwsem. stop_machine_cpuslocked() contains a lockdep assertion to catch any unprotected callers. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170524081549.275871311@linutronix.de arch/arm/kernel/patch.c | 2 +- arch/arm/probes/kprobes/core.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit c23a465625e287c4deba0fdf5e8adc59cfd2a0b7 Author: Thomas Gleixner Date: Wed May 24 10:15:37 2017 +0200 arm64: Prevent cpu hotplug rwsem recursion The text patching functions which are invoked from jump_label and kprobes code are protected against cpu hotplug at the call sites. Use stop_machine_cpuslocked() to avoid recursion on the cpu hotplug rwsem. stop_machine_cpuslocked() contains a lockdep assertion to catch any unprotected callers. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Paul E. McKenney Cc: Mark Rutland Cc: Peter Zijlstra Cc: Catalin Marinas Cc: Sebastian Siewior Cc: Will Deacon Cc: Steven Rostedt Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170524081549.197070135@linutronix.de arch/arm64/include/asm/insn.h | 1 - arch/arm64/kernel/insn.c | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2d1e38f56622b9bb5af85be63c1052c056f5c677 Author: Thomas Gleixner Date: Wed May 24 10:15:36 2017 +0200 kprobes: Cure hotplug lock ordering issues Converting the cpu hotplug locking to a percpu rwsem unearthed hidden lock ordering problems. There is a wide range of locks involved in this: kprobe_mutex, jump_label_mutex, ftrace_lock, text_mutex, event_mutex, module_mutex, func_hash->regex_lock and a gazillion of lock order permutations with nested get_online_cpus() calls. Some of those permutations are potential deadlocks even with the current nesting hotplug locking scheme, but they can't be discovered by lockdep. The conversion of the hotplug locking to a percpu rwsem requires to prevent nested locking, so it's required to take the hotplug rwsem early in the call chain and establish a proper lock order. After quite some analysis and going down the wrong road severa times the following lock order has been chosen: kprobe_mutex -> cpus_rwsem -> jump_label_mutex -> text_mutex For kprobes which hook on an ftrace function trace point, it's required to drop cpus_rwsem before calling into the ftrace code to avoid a deadlock on the func_hash->regex_lock. [ Steven: Ftrace interaction fixes ] Signed-off-by: Thomas Gleixner Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Masami Hiramatsu Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Sebastian Siewior Link: http://lkml.kernel.org/r/20170524081549.104864779@linutronix.de kernel/kprobes.c | 59 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 27 deletions(-) commit f2545b2d4ce13e068897ef60ae64dffe215f4152 Author: Thomas Gleixner Date: Wed May 24 10:15:35 2017 +0200 jump_label: Reorder hotplug lock and jump_label_lock The conversion of the hotplug locking to a percpu rwsem unearthed lock ordering issues all over the place. The jump_label code has two issues: 1) Nested get_online_cpus() invocations 2) Ordering problems vs. the cpus rwsem and the jump_label_mutex To cure these, the following lock order has been established; cpus_rwsem -> jump_label_lock -> text_mutex Even if not all architectures need protection against CPU hotplug, taking cpus_rwsem before jump_label_lock is now mandatory in code pathes which actually modify code and therefor need text_mutex protection. Move the get_online_cpus() invocations into the core jump label code and establish the proper lock order where required. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: "David S. Miller" Cc: Paul E. McKenney Cc: Chris Metcalf Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Cc: Jason Baron Cc: Ralf Baechle Link: http://lkml.kernel.org/r/20170524081549.025830817@linutronix.de arch/mips/kernel/jump_label.c | 2 -- arch/sparc/kernel/jump_label.c | 2 -- arch/tile/kernel/jump_label.c | 2 -- arch/x86/kernel/jump_label.c | 2 -- kernel/jump_label.c | 20 ++++++++++++++------ 5 files changed, 14 insertions(+), 14 deletions(-) commit a63fbed776c7124ce9f606234267c3c095b2680e Author: Thomas Gleixner Date: Wed May 24 10:15:34 2017 +0200 perf/tracing/cpuhotplug: Fix locking order perf, tracing, kprobes and jump_labels have a gazillion of ways to create dependency lock chains. Some of those involve nested invocations of get_online_cpus(). The conversion of the hotplug locking to a percpu rwsem requires to avoid such nested calls. sys_perf_event_open() protects most of the syscall logic against cpu hotplug. This causes nested calls and lock inversions versus ftrace and kprobes in various interesting ways. It's impossible to move the hotplug locking to the outer end of all call chains in the involved facilities, so the hotplug protection in sys_perf_event_open() needs to be solved differently. Introduce 'pmus_mutex' which protects a perf private online cpumask. This mutex is taken when the mask is updated in the cpu hotplug callbacks and can be taken in sys_perf_event_open() to protect the swhash setup/teardown code and when the final judgement about a valid event has to be made. [ tglx: Produced changelog and fixed the swhash interaction ] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Paul E. McKenney Cc: Sebastian Siewior Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Masami Hiramatsu Link: http://lkml.kernel.org/r/20170524081548.930941109@linutronix.de include/linux/perf_event.h | 2 + kernel/events/core.c | 106 ++++++++++++++++++++++++++++++++------------- 2 files changed, 78 insertions(+), 30 deletions(-) commit fdaf0a51bad496289356d11d796095a293794b5f Author: Thomas Gleixner Date: Wed May 24 10:15:33 2017 +0200 ACPI/processor: Use cpu_hotplug_disable() instead of get_online_cpus() Converting the hotplug locking, i.e. get_online_cpus(), to a percpu rwsem unearthed a circular lock dependency which was hidden from lockdep due to the lockdep annotation of get_online_cpus() which prevents lockdep from creating full dependency chains. CPU0 CPU1 ---- ---- lock((&wfc.work)); lock(cpu_hotplug_lock.rw_sem); lock((&wfc.work)); lock(cpu_hotplug_lock.rw_sem); This dependency is established via acpi_processor_start() which calls into the work queue code. And the work queue code establishes the reverse dependency. This is not a problem of get_online_cpus() recursion, it's a possible deadlock undetected by lockdep so far. The cure is to use cpu_hotplug_disable() instead of get_online_cpus() to protect the probing from acpi_processor_start(). There is a side effect to this: cpu_hotplug_disable() makes a concurrent cpu hotplug attempt via the sysfs interfaces fail with -EBUSY, but that probing usually happens during the boot process where no interaction is possible. Any later invocations are infrequent enough and concurrent hotplug attempts are so unlikely that the danger of user space visible regressions is very close to zero. Anyway, thats preferrable over a real deadlock. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Rafael J. Wysocki Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Cc: linux-acpi@vger.kernel.org Cc: Len Brown Link: http://lkml.kernel.org/r/20170524081548.851588594@linutronix.de drivers/acpi/processor_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b2c2a71e6f07fb67e6f72817d39910f64d2e258 Author: Thomas Gleixner Date: Wed May 24 10:15:32 2017 +0200 PCI: Replace the racy recursion prevention pci_call_probe() can called recursively when a physcial function is probed and the probing creates virtual functions, which are populated via pci_bus_add_device() which in turn can end up calling pci_call_probe() again. The code has an interesting way to prevent recursing into the workqueue code. That's accomplished by a check whether the current task runs already on the numa node which is associated with the device. While that works to prevent the recursion into the workqueue code, it's racy versus normal execution as there is no guarantee that the node does not vanish after the check. There is another issue with this code. It dereferences cpumask_of_node() unconditionally without checking whether the node is available. Make the detection reliable by: - Mark a probed device as 'is_probed' in pci_call_probe() - Check in pci_call_probe for a virtual function. If it's a virtual function and the associated physical function device is marked 'is_probed' then this is a recursive call, so the call can be invoked in the calling context. - Add a check whether the node is online before dereferencing it. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Bjorn Helgaas Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: linux-pci@vger.kernel.org Cc: Sebastian Siewior Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081548.771457199@linutronix.de drivers/pci/pci-driver.c | 47 +++++++++++++++++++++++++---------------------- include/linux/pci.h | 1 + 2 files changed, 26 insertions(+), 22 deletions(-) commit 1ddd45f8d76f0c15ec4e44073eeaaee6a806ee81 Author: Thomas Gleixner Date: Wed May 24 10:15:31 2017 +0200 PCI: Use cpu_hotplug_disable() instead of get_online_cpus() Converting the hotplug locking, i.e. get_online_cpus(), to a percpu rwsem unearthed a circular lock dependency which was hidden from lockdep due to the lockdep annotation of get_online_cpus() which prevents lockdep from creating full dependency chains. There are several variants of this. And example is: Chain exists of: cpu_hotplug_lock.rw_sem --> drm_global_mutex --> &item->mutex CPU0 CPU1 ---- ---- lock(&item->mutex); lock(drm_global_mutex); lock(&item->mutex); lock(cpu_hotplug_lock.rw_sem); because there are dependencies through workqueues. The call chain is: get_online_cpus apply_workqueue_attrs __alloc_workqueue_key ttm_mem_global_init ast_ttm_mem_global_init drm_global_item_ref ast_mm_init ast_driver_load drm_dev_register drm_get_pci_dev ast_pci_probe local_pci_probe work_for_cpu_fn process_one_work worker_thread This is not a problem of get_online_cpus() recursion, it's a possible deadlock undetected by lockdep so far. The cure is to use cpu_hotplug_disable() instead of get_online_cpus() to protect the PCI probing. There is a side effect to this: cpu_hotplug_disable() makes a concurrent cpu hotplug attempt via the sysfs interfaces fail with -EBUSY, but PCI probing usually happens during the boot process where no interaction is possible. Any later invocations are infrequent enough and concurrent hotplug attempts are so unlikely that the danger of user space visible regressions is very close to zero. Anyway, thats preferrable over a real deadlock. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Bjorn Helgaas Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: linux-pci@vger.kernel.org Cc: Sebastian Siewior Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081548.691198590@linutronix.de drivers/pci/pci-driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ba143a5216fb148211160a0ecc1f8d3f92f06bb Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:30 2017 +0200 perf/x86/intel: Drop get_online_cpus() in intel_snb_check_microcode() If intel_snb_check_microcode() is invoked via microcode_init -> perf_check_microcode -> intel_snb_check_microcode then get_online_cpus() is invoked nested. This works with the current implementation of get_online_cpus() but prevents converting it to a percpu rwsem. intel_snb_check_microcode() is also invoked from intel_sandybridge_quirk() unprotected. Drop get_online_cpus() from intel_snb_check_microcode() and add it to intel_sandybridge_quirk() so both call sites are protected. Convert *_online_cpus() to the new interfaces while at it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Borislav Petkov Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Borislav Petkov Link: http://lkml.kernel.org/r/20170524081548.594862191@linutronix.de arch/x86/events/intel/core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 27d3b157fee0bad264eb745d5c547e2e0676f1a2 Author: Thomas Gleixner Date: Wed May 24 10:15:29 2017 +0200 x86/perf: Drop EXPORT of perf_check_microcode The only caller is the microcode update, which cannot be modular. Drop the export. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Borislav Petkov Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Cc: Borislav Petkov Link: http://lkml.kernel.org/r/20170524081548.515204988@linutronix.de arch/x86/events/core.c | 1 - 1 file changed, 1 deletion(-) commit 210e21331fc3a396af640cec652be769d146e49f Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:28 2017 +0200 cpu/hotplug: Use stop_machine_cpuslocked() in takedown_cpu() takedown_cpu() is a cpu hotplug function invoking stop_machine(). The cpu hotplug machinery holds the hotplug lock for write. stop_machine() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use stop_machine_cpuslocked() to avoid the nested call. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081548.423292433@linutronix.de kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9a69931c3959940538884d5962b770c3db75df5 Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:27 2017 +0200 powerpc/powernv: Use stop_machine_cpuslocked() set_subcores_per_core() holds get_online_cpus() while invoking stop_machine(). stop_machine() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use stop_machine_cpuslocked() to avoid the nested call. Convert *_online_cpus() to the new interfaces while at it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Steven Rostedt Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170524081548.331016542@linutronix.de arch/powerpc/platforms/powernv/subcore.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2337e879e8805a630b418f3e73a98084d4724b83 Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:26 2017 +0200 s390/kernel: Use stop_machine_cpuslocked() stp_work_fn() holds get_online_cpus() while invoking stop_machine(). stop_machine() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use stop_machine_cpuslocked() to avoid the nested call. Convert *_online_cpus() to the new interfaces while at it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Heiko Carstens Cc: Paul E. McKenney Cc: linux-s390@vger.kernel.org Cc: Peter Zijlstra Cc: Steven Rostedt Cc: David Hildenbrand Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20170524081548.250203087@linutronix.de arch/s390/kernel/time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fe2a5cd8aa038e2b02fda983afc2083e94c04b4f Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:25 2017 +0200 ARM/hw_breakpoint: Use cpuhp_setup_state_cpuslocked() arch_hw_breakpoint_init() holds get_online_cpus() while registerring the hotplug callbacks. cpuhp_setup_state() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_cpuslocked() to avoid the nested call. Convert *_online_cpus() to the new interfaces while at it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Mark Rutland Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Will Deacon Cc: Steven Rostedt Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170524081548.170940729@linutronix.de arch/arm/kernel/hw_breakpoint.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 04b247c2ebdd6ba1c46c7c22546229a89760b43a Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:24 2017 +0200 perf/x86/intel/cqm: Use cpuhp_setup_state_cpuslocked() intel_cqm_init() holds get_online_cpus() while registerring the hotplug callbacks. cpuhp_setup_state() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_cpuslocked() to avoid the nested call. Convert *_online_cpus() to the new interfaces while at it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Paul E. McKenney Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081548.075604046@linutronix.de arch/x86/events/intel/cqm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e9f5d63f84febb7e9dfe4e0dc696adf88053fbf2 Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:23 2017 +0200 hwtracing/coresight-etm4x: Use cpuhp_setup_state_nocalls_cpuslocked() etm_probe4() holds get_online_cpus() while invoking cpuhp_setup_state_nocalls(). cpuhp_setup_state_nocalls() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_nocalls_cpuslocked() to avoid the nested call. Convert *_online_cpus() to the new interfaces while at it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Mathieu Poirier Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170524081547.983493849@linutronix.de drivers/hwtracing/coresight/coresight-etm4x.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit e560c89c8ac0baadf0da351f602c599016568fc7 Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:22 2017 +0200 hwtracing/coresight-etm3x: Use cpuhp_setup_state_nocalls_cpuslocked() etm_probe() holds get_online_cpus() while invoking cpuhp_setup_state_nocalls(). cpuhp_setup_state_nocalls() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_nocalls_cpuslocked() to avoid the nested call. Convert *_online_cpus() to the new interfaces while at it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Mathieu Poirier Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170524081547.889092478@linutronix.de drivers/hwtracing/coresight/coresight-etm3x.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 419af25fa4d0974fd758a668c08c369c19392a47 Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:21 2017 +0200 KVM/PPC/Book3S HV: Use cpuhp_setup_state_nocalls_cpuslocked() kvmppc_alloc_host_rm_ops() holds get_online_cpus() while invoking cpuhp_setup_state_nocalls(). cpuhp_setup_state_nocalls() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_nocalls_cpuslocked() to avoid the nested call. Convert *_online_cpus() to the new interfaces while at it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Paul E. McKenney Cc: kvm@vger.kernel.org Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Steven Rostedt Cc: kvm-ppc@vger.kernel.org Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Cc: Alexander Graf Link: http://lkml.kernel.org/r/20170524081547.809616236@linutronix.de arch/powerpc/kvm/book3s_hv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a92551e41d5a7b563ae440496bc5ca19d205231d Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:20 2017 +0200 cpufreq: Use cpuhp_setup_state_nocalls_cpuslocked() cpufreq holds get_online_cpus() while invoking cpuhp_setup_state_nocalls() to make subsys_interface_register() and the registration of hotplug calls atomic versus cpu hotplug. cpuhp_setup_state_nocalls() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup/remove_state_nocalls_cpuslocked() to avoid the nested call. Convert *_online_cpus() to the new interfaces while at it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Acked-by: "Rafael J. Wysocki" Acked-by: Viresh Kumar Cc: linux-pm@vger.kernel.org Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081547.731628408@linutronix.de drivers/cpufreq/cpufreq.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 547efeadd42a3c75e41e33c0637cba100fc18289 Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:19 2017 +0200 x86/mtrr: Remove get_online_cpus() from mtrr_save_state() mtrr_save_state() is invoked from native_cpu_up() which is in the context of a CPU hotplug operation and therefor calling get_online_cpus() is pointless. While this works in the current get_online_cpus() implementation it prevents from converting the hotplug locking to percpu rwsems. Remove it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081547.651378834@linutronix.de arch/x86/kernel/cpu/mtrr/main.c | 2 -- 1 file changed, 2 deletions(-) commit c5a81c8ff816d89941fe86961b286765d6ca2f5f Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:18 2017 +0200 padata: Avoid nested calls to cpus_read_lock() in pcrypt_init_padata() pcrypt_init_padata() cpus_read_lock() padata_alloc_possible() padata_alloc() cpus_read_lock() The nested call to cpus_read_lock() works with the current implementation, but prevents the conversion to a percpu rwsem. The other caller of padata_alloc_possible() is pcrypt_init_padata() which calls from a cpus_read_lock() protected region as well. Remove the cpus_read_lock() call in padata_alloc() and document the calling convention. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Steffen Klassert Cc: Peter Zijlstra Cc: Steven Rostedt Cc: linux-crypto@vger.kernel.org Link: http://lkml.kernel.org/r/20170524081547.571278910@linutronix.de kernel/padata.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9596695ee1e7eedd743c43811fe68299eb005b5c Author: Thomas Gleixner Date: Wed May 24 10:15:17 2017 +0200 padata: Make padata_alloc() static No users outside of padata.c Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Steffen Klassert Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Cc: linux-crypto@vger.kernel.org Link: http://lkml.kernel.org/r/20170524081547.491457256@linutronix.de include/linux/padata.h | 3 --- kernel/padata.c | 32 ++++++++++++++++---------------- 2 files changed, 16 insertions(+), 19 deletions(-) commit fe5595c074005bd94f0c7d1644175941149f6768 Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:16 2017 +0200 stop_machine: Provide stop_machine_cpuslocked() Some call sites of stop_machine() are within a get_online_cpus() protected region. stop_machine() calls get_online_cpus() as well, which is possible in the current implementation but prevents converting the hotplug locking to a percpu rwsem. Provide stop_machine_cpuslocked() to avoid nested calls to get_online_cpus(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081547.400700852@linutronix.de include/linux/stop_machine.h | 26 +++++++++++++++++++++++--- kernel/stop_machine.c | 11 +++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) commit 9805c6733349ea3ccd22cf75b8ebaabb5290e310 Author: Thomas Gleixner Date: Wed May 24 10:15:15 2017 +0200 cpu/hotplug: Add __cpuhp_state_add_instance_cpuslocked() Add cpuslocked() variants for the multi instance registration so this can be called from a cpus_read_lock() protected region. Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081547.321782217@linutronix.de include/linux/cpuhotplug.h | 9 +++++++++ kernel/cpu.c | 18 +++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) commit 71def423fe3da0d40ad3427a4cd5f9edc53bff67 Author: Sebastian Andrzej Siewior Date: Wed May 24 10:15:14 2017 +0200 cpu/hotplug: Provide cpuhp_setup/remove_state[_nocalls]_cpuslocked() Some call sites of cpuhp_setup/remove_state[_nocalls]() are within a cpus_read locked region. cpuhp_setup/remove_state[_nocalls]() call cpus_read_lock() as well, which is possible in the current implementation but prevents converting the hotplug locking to a percpu rwsem. Provide locked versions of the interfaces to avoid nested calls to cpus_read_lock(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081547.239600868@linutronix.de include/linux/cpuhotplug.h | 29 ++++++++++++++++++++++++++++ kernel/cpu.c | 47 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 65 insertions(+), 11 deletions(-) commit ade3f680a76b474d9f5375a9b1d100ee787bf469 Author: Thomas Gleixner Date: Wed May 24 10:15:13 2017 +0200 cpu/hotplug: Provide lockdep_assert_cpus_held() Provide a stub function which can be used in places where existing get_online_cpus() calls are moved to call sites. This stub is going to be filled by the final conversion of the hotplug locking mechanism to a percpu rwsem. Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081547.161282442@linutronix.de include/linux/cpu.h | 2 ++ 1 file changed, 2 insertions(+) commit 8f553c498e1772cccb39a114da4a498d22992758 Author: Thomas Gleixner Date: Wed May 24 10:15:12 2017 +0200 cpu/hotplug: Provide cpus_read|write_[un]lock() The counting 'rwsem' hackery of get|put_online_cpus() is going to be replaced by percpu rwsem. Rename the functions to make it clear that it's locking and not some refcount style interface. These new functions will be used for the preparatory patches which make the code ready for the percpu rwsem conversion. Rename all instances in the cpu hotplug code while at it. Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081547.080397752@linutronix.de include/linux/cpu.h | 34 +++++++++++++++++++--------------- kernel/cpu.c | 36 ++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 33 deletions(-) commit bc63cd87f3ce924f02e575ffb12f8c10cd7d3780 Author: Ulrich Hecht Date: Fri May 19 15:07:01 2017 +0200 ARM: dts: gose: add HDMI input Identical to the setup on Koelsch. Signed-off-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793-gose.dts | 68 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) commit 2c4842d3b6b3cf6db0f21e487da7e9bd3aa23090 Author: Takashi Sakamoto Date: Fri May 26 09:30:46 2017 +0900 ALSA: pcm: add local header file for snd-pcm module Several files are used to construct PCM core module, a.k.a snd-pcm. Although available APIs are described in 'include/sound/pcm.h', some of them are not exported as symbols in kernel space. Such APIs are just for module local usage. This commit adds module local header file and move some function prototypes into it so that scopes of them are controlled properly and developers get no confusion from unavailable symbols. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/pcm.h | 32 ------------------------------- sound/core/pcm.c | 2 ++ sound/core/pcm_lib.c | 2 ++ sound/core/pcm_local.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ sound/core/pcm_misc.c | 3 +++ sound/core/pcm_native.c | 2 ++ 6 files changed, 60 insertions(+), 32 deletions(-) commit ed75d6a969056cc8f5dd2df3af6c75b792b9116b Author: Stephen Boyd Date: Thu Jan 26 16:47:28 2017 -0800 arm64: dts: qcom: Collapse usb support into one node We currently have three device nodes for the same USB hardware block, as evident by the reuse of the same reg address multiple times. Now that the chipidea driver fully supports OTG with the MSM wrapper we can collapse all these nodes into one USB device node, reflecting the true nature of the hardware. Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 34 +++++++++-------- arch/arm64/boot/dts/qcom/msm8916.dtsi | 62 +++++++++++++++---------------- 2 files changed, 47 insertions(+), 49 deletions(-) commit b993292f73dcffd113bd5196bd5898432ddd463d Author: Stephen Boyd Date: Thu Jan 26 16:47:27 2017 -0800 ARM: dts: qcom-apq8064: Collapse usb support into one node We currently have three device nodes for the same USB hardware block, as evident by the reuse of the same reg address multiple times. Now that the chipidea driver fully supports OTG with the MSM wrapper we can collapse the three nodes into one USB device node, reflecting the true nature of the hardware. Since we're here, we also mark the irq trigger flags correctly, as IRQ_TYPE_LEVEL_HIGH instead of IRQ_TYPE_NONE. Cc: Bjorn Andersson Cc: Srinivas Kandagatla Cc: Nicolas Dechesne Cc: John Stultz Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross .../arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts | 48 +++---- arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 20 +-- arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts | 53 ++++--- arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 53 ++++--- .../arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts | 16 +-- arch/arm/boot/dts/qcom-apq8064.dtsi | 154 ++++++++++++--------- 6 files changed, 169 insertions(+), 175 deletions(-) commit 4ac5a200b06f1522f8bcc7df1e45ee17221d166a Author: Stephen Boyd Date: Thu Jan 26 16:47:26 2017 -0800 ARM: dts: qcom-msm8974: Add HS usb node and OTG detection mechanisms This USB controller has two phys, so add them both underneath the ULPI bus, but only enable one of them based on the board configuration. To get OTG to work, we need to add the id and vbus detection info and also populate the regulators for the vbus supply. Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 20 +++++++++++ arch/arm/boot/dts/qcom-msm8974.dtsi | 50 ++++++++++++++++++++++++++ arch/arm/boot/dts/qcom-pm8941.dtsi | 32 ++++++++++++++++- 3 files changed, 101 insertions(+), 1 deletion(-) commit ffb35d431b7666544994ecef0ef8b2227c20b6da Author: Bird, Tim Date: Thu Jan 26 16:47:25 2017 -0800 ARM: dts: qcom: add charger otg regulator Add the otg regulator provided by the charger block. Signed-off-by: Tim Bird Reviewed-by: Bjorn Andersson [stephen.boyd@linaro.org: Fix otg supply property name] Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-pm8941.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 939fa844a0ee02058ee743981c9e2d350f699dd1 Author: Stephen Boyd Date: Thu Jan 26 16:47:24 2017 -0800 ARM: dts: qcom: Remove s4/5vs1,2 from RPM pm8941 control These regulators are controlled by the SPMI regulator driver instead of the RPM regulator driver in the downstream android kernel sources. Let's remove them from the DTS here because they'll never be used by the RPM regulator driver. Cc: Bjorn Andersson Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 1 - arch/arm/boot/dts/qcom-msm8974.dtsi | 4 ---- 2 files changed, 5 deletions(-) commit a301b11186151271c20ecebcc1e2ce1928832c93 Author: Gustavo Padovan Date: Thu May 11 16:10:49 2017 -0300 drm: todo: remove task about switch to drm_connector_list_iter This is now completed. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-9-gustavo@padovan.org Documentation/gpu/todo.rst | 13 ------------- 1 file changed, 13 deletions(-) commit eb53a46be597b5f413fbcab9df0a3422bbb3fc16 Author: Gustavo Padovan Date: Thu May 11 16:10:48 2017 -0300 drm: remove unsafe drm_for_each_connector() After converting all users to drm_for_each_connector_iter() we no longer need drm_for_each_connector() so we can go ahead and remove it. Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-8-gustavo@padovan.org include/drm/drm_connector.h | 15 --------------- 1 file changed, 15 deletions(-) commit 4894bf711d19a1bdcc954e0ed4971d6c0b399b90 Author: Gustavo Padovan Date: Fri May 12 13:41:00 2017 -0300 drm/vc4: use drm_for_each_connector_iter() Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter(). v2: add missing drm_connector_list_iter_end(Daniel Vetter) Cc: Eric Anholt Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter Acked-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170512164100.7649-1-gustavo@padovan.org drivers/gpu/drm/vc4/vc4_crtc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 875dd62697fe22d54780980d26089c43e7b9b446 Author: Gustavo Padovan Date: Thu May 11 16:10:46 2017 -0300 drm/nouveau: use drm_for_each_connector_iter() Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter(). Cc: Ben Skeggs Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-6-gustavo@padovan.org drivers/gpu/drm/nouveau/nv50_display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c8bf8b968adb0c14a175a5c2e091f620b9771870 Author: Gustavo Padovan Date: Thu May 11 16:10:45 2017 -0300 drm/mediatek: use drm_for_each_connector_iter() Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter(). Cc: Philipp Zabel Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-5-gustavo@padovan.org drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2fd96b4116bfe922b4a1cf7626b30f5c2010c218 Author: Gustavo Padovan Date: Thu May 11 16:10:44 2017 -0300 drm/i915: use drm_for_each_connector_iter() Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter(). Cc: Daniel Vetter Cc: Jani Nikula Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-4-gustavo@padovan.org drivers/gpu/drm/i915/intel_display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2cbeb64f6c709de67e2ba5b97ff45d2b6147b286 Author: Gustavo Padovan Date: Mon May 15 10:43:30 2017 -0300 drm/rockchip: use drm_for_each_connector_iter() Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter() Cc: Mark Yao Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter Reviewed-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170515134330.3275-1-gustavo@padovan.org drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 48a92916729bd0ed6bc1d938557cd3779a0657fd Author: Gustavo Padovan Date: Thu May 11 16:10:42 2017 -0300 drm/exynos: use drm_for_each_connector_iter() Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter() Cc: Inki Dae Cc: Joonyoung Shim Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-2-gustavo@padovan.org drivers/gpu/drm/exynos/exynos_drm_drv.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 0b884d25f5212bd0323d179c570962bbf822e330 Author: Al Viro Date: Sat May 13 18:12:07 2017 -0400 sel_write_validatetrans(): don't open-code memdup_user_nul() Signed-off-by: Al Viro security/selinux/selinuxfs.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 11e5890b5342c82eefbaa39aec4767ae21ae8803 Author: Heiner Kallweit Date: Fri Mar 10 18:52:34 2017 +0100 rtc: ds1307: convert driver to regmap This patch converts the ds1307 driver to using regmap. It's a rather big patch and I can test with DS3231 only. With this chip it's working fine. I'd appreciate if people with other supported hardware could test as well. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 603 +++++++++++++++++------------------------------ 1 file changed, 221 insertions(+), 382 deletions(-) commit 8d1a81a852f58c5708cd607dcbe36eb32da5cbeb Author: Al Viro Date: Tue May 2 12:46:27 2017 -0400 sanitize do_i2c_smbus_ioctl() no need to mess with __copy_in_user() Signed-off-by: Al Viro fs/compat_ioctl.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit c067598aceba9c5ff221cf5e215b86b9686dd009 Merge: ff5f58f5 03ea01e Author: David S. Miller Date: Thu May 25 17:46:23 2017 -0400 Merge branch 'mlxsw-Support-firmware-flash' Jiri Pirko says: ==================== mlxsw: Support firmware flash Add support for device firmware flash on mlxsw spectrum. The firmware files are expected to be in the Mellanox Firmware Archive version 2 (MFA2) format. The firmware flash is triggered on driver initialization time if the device firmware version does not meet the minimum firmware version supported by the driver. Currently, to activate the newly flashed firmware, the user needs to reboot his system. The first patch introduces the mlxfw module, which implements common logic needed for the firmware flash process on Mellanox products, such as the MFA2 format parsing and the firmware flash state machine logic. As the module implements common logic which will be needed by various different Mellanox drivers, it defines a set of callbacks needed to interact with the specific device. Patches 1-5 implement the needed mlxfw callbacks in the mlxsw spectrum driver. Patches 6 and 7 add boot-time firmware upgrade on the mlxsw spectrum driver. Patch 8 adds a fix needed for new firmware versions. ==================== Signed-off-by: David S. Miller commit 03ea01e9db82203e83b306b6c61d2cc9f0da4199 Author: Ido Schimmel Date: Tue May 23 21:56:30 2017 +0200 mlxsw: spectrum_router: Adjust RIF configuration for new firmware versions In new firmware versions, when configuring a {Port, VID} as a router interface, the driver is responsible for enabling the STP filter and disabling learning. Otherwise, packets are discarded. This change doesn't break existing firmware versions, but is required for newer firmware versions. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 6b7421992b8d6ab8da5d5f3afae17fb5515fd633 Author: Yotam Gigi Date: Tue May 23 21:56:29 2017 +0200 mlxsw: spectrum: Validate firmware revision on init Make the spectrum module check the current device firmware version, and if it is below the supported version, use the libfirmware API to request a firmware file with the supported firmware version and flash it to the device using the mlxfw module. The firmware file names are expected to be of Mellanox Firmware Archive version 2 (MFA2) format and their name are expected to be in the following pattern: "mlxsw_spectrum-...mfa2". Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 67 ++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) commit c41d007588c1b6dac9f6d08c92d7449a8c2bfef8 Author: Yotam Gigi Date: Tue May 23 21:56:28 2017 +0200 mlxsw: core: Create the mlxsw_fw_rev struct This struct was previously an anonymous struct defined inside the mlxsw_bus_info struct. Extract it to a struct named mlxsw_fw_rev, as it will be needed later by the spectrum driver. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit e5e5c88a1f29096f8a6768975d3f987f7eb59d67 Author: Yotam Gigi Date: Tue May 23 21:56:27 2017 +0200 mlxsw: spectrum: Add the needed callbacks for mlxfw integration The mlxfw module defines several needed callbacks in order to flash the device's firmware. As the mlxfw module is shared between several different drivers, those callbacks are the glue functionality that is responsible for hardware interaction. Add those callbacks using the MCQI, MCC, MCDA registers. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 166 +++++++++++++++++++++++++ 1 file changed, 166 insertions(+) commit 4625d59d6d2cd8eda5f3590e1cf453ca64142d5e Author: Yotam Gigi Date: Tue May 23 21:56:26 2017 +0200 mlxsw: reg: Add Management Component Data Access register The MCDA register allows reading and writing a firmware component. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 191839de90f8890e8742b65a656695de335cf0d2 Author: Yotam Gigi Date: Tue May 23 21:56:25 2017 +0200 mlxsw: reg: Add Management Component Control register The MCC register allows controlling and querying the firmware flash state machine (FSM). Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 83 +++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 4f2402d46ba7b83d05809bbce892296f86aa30af Author: Yotam Gigi Date: Tue May 23 21:56:24 2017 +0200 mlxsw: reg: Add Management Component Query Information register The MCQI register queries information about firmware components. It will be needed by the mlxfw module to query various options about the components, such as their max size, alignment and max write size. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 84 +++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit 410ed13cae39df563e31240992fcb32364d186a1 Author: Yotam Gigi Date: Tue May 23 21:56:23 2017 +0200 Add the mlxfw module for Mellanox firmware flash process The mlxfw module is in charge of common logic needed to flash Mellanox devices firmware, which consists of: - Parse the Mellanox Firmware Archive version 2 (MFA2) format, which is the format used to store the Mellanox firmware. The MFA2 format file can hold firmware for many different silicon variants, differentiated by a unique ID called PSID. In addition, the MFA2 file data section is compressed using xz compression to save both file-system space and memory at extraction time. - Implement the firmware flash state machine logic, which is a common logic for Mellanox products needed to flash the firmware to the device. As the module is shared between different Mellanox products, it defines a set of callbacks to be implemented by the specific driver for hardware interaction. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller MAINTAINERS | 8 + drivers/net/ethernet/mellanox/Kconfig | 1 + drivers/net/ethernet/mellanox/Makefile | 1 + drivers/net/ethernet/mellanox/mlxfw/Kconfig | 6 + drivers/net/ethernet/mellanox/mlxfw/Makefile | 2 + drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 102 ++++ drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 273 +++++++++ drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c | 620 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.h | 66 +++ .../net/ethernet/mellanox/mlxfw/mlxfw_mfa2_file.h | 60 ++ .../ethernet/mellanox/mlxfw/mlxfw_mfa2_format.h | 103 ++++ .../net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h | 98 ++++ .../ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c | 126 +++++ .../ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h | 71 +++ 14 files changed, 1537 insertions(+) commit 9027c4639ef1e3254779e3033f229133222445f7 Author: Takashi Iwai Date: Fri May 19 20:22:33 2017 +0200 ALSA: pcm: Call ack() whenever appl_ptr is updated Although the ack callback is supposed to be called at each appl_ptr or hw_ptr update, we missed a few opportunities: namely, forward, rewind and sync_ptr. Formerly calling ack at rewind may have leaded to unexpected results due to the forgotten negative appl_ptr update in indirect-PCM helper, which is the major user of the PCM ack callback. But now we fixed this oversights, thus we can call ack callback safely even at rewind callback -- of course with the proper handling of the error from the callback. This patch adds the calls of ack callback in the places mentioned in the above. Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) commit 9ce7b9cf64dc1a48a074033a83c8ea314b38540c Author: Takashi Iwai Date: Fri May 19 18:51:03 2017 +0200 staging: bcm2835-audio: Deliver indirect-PCM transfer error Now that the indirect-PCM transfer helper gives back an error, we should return the error from ack callbacks. Acked-by: Eric Anholt Signed-off-by: Takashi Iwai drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3e02c5a60e182708005973e34a439d1e25ace9b5 Author: Takashi Iwai Date: Fri May 19 18:49:45 2017 +0200 ALSA: rme32: Deliver indirect-PCM transfer error Now that the indirect-PCM transfer helper gives back an error, we should return the error from ack callbacks. Signed-off-by: Takashi Iwai sound/pci/rme32.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 00277e2b5ffcf9ffb3afb5f728f7f01ad165cbff Author: Takashi Iwai Date: Fri May 19 18:49:23 2017 +0200 ALSA: emu10k1: Deliver indirect-PCM transfer error Now that the indirect-PCM transfer helper gives back an error, we should return the error from ack callbacks. Signed-off-by: Takashi Iwai sound/pci/emu10k1/emupcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cebf6bfe5e32f07d94785f5cf893d19cf7c1c303 Author: Takashi Iwai Date: Fri May 19 18:48:36 2017 +0200 ALSA: cs46xx: Deliver indirect-PCM transfer error Now that the indirect-PCM transfer helper gives back an error, we should return the error from ack callbacks. Signed-off-by: Takashi Iwai sound/pci/cs46xx/cs46xx_lib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0f21e57decaa2c49ace8436781cd4672d3637ddc Author: Takashi Iwai Date: Fri May 19 18:41:45 2017 +0200 ALSA: mips: Deliver indirect-PCM transfer error Now that the indirect-PCM transfer helper gives back an error, we should return the error from ack callbacks. Signed-off-by: Takashi Iwai sound/mips/hal2.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 9629581258cb520a413a4240fc4254a45e0a81df Author: Takashi Iwai Date: Fri May 19 18:31:03 2017 +0200 ALSA: pcm: Fix negative appl_ptr handling in pcm-indirect helpers The indirect-PCM helper codes have an implicit assumption that the appl_ptr always increases. But the PCM core may deal with the decrement of appl_ptr via rewind ioctls, and it may screw up the buffer pointer management. This patch adds the negative appl_ptr diff in transfer functions and let returning an error instead of always accepting the appl_ptr updates. The callers are usually PCM ack callbacks, and they pass the error to the upper layer accordingly. Signed-off-by: Takashi Iwai include/sound/pcm-indirect.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 80debff8d9afbf649a15c7ecb0c2cdeb89b36231 Author: Chris Wilson Date: Thu May 25 13:16:12 2017 +0100 drm/i915: Consolidate #ifdef CONFIG_INTEL_IOMMU We depend on intel_iommu_gfx_mapped for various workarounds, but that is only available under an #ifdef CONFIG_INTEL_IOMMU. Refactor all the cut-and-paste ifdefs to a common routine. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170525121612.2190-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_drv.h | 15 ++++++++------- drivers/gpu/drm/i915/i915_gem.c | 4 +--- drivers/gpu/drm/i915/i915_gem_gtt.c | 14 +++----------- drivers/gpu/drm/i915/i915_gem_stolen.c | 4 +--- drivers/gpu/drm/i915/intel_fbc.c | 4 +--- 5 files changed, 14 insertions(+), 27 deletions(-) commit b2241f182aa0942749e7c95eca92b840ab93263b Author: Chris Wilson Date: Thu May 25 08:25:28 2017 +0100 drm/i915: Only GGTT vma may be pinned and prevent shrinking As only GGTT vma may be permanently pinned and are always at the head of the object's vma list, as soon as we seen a ppGTT vma we can stop searching for any_vma_pinned(). Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170525072528.11185-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_shrinker.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7e1544ae4dda3222538b08eb2da3cf82e0ca90dc Author: Rex Zhu Date: Mon May 22 13:11:41 2017 +0800 drm/amdgpu: fix null point error when rmmod amdgpu. this bug happened when amdgpu load failed. [ 75.740951] BUG: unable to handle kernel paging request at 00000000000031c0 [ 75.748167] IP: [] amdgpu_fbdev_restore_mode+0x20/0x60 [amdgpu] [ 75.755774] PGD 0 [ 75.759185] Oops: 0000 [#1] SMP [ 75.762408] Modules linked in: amdgpu(OE-) ttm(OE) drm_kms_helper(OE) drm(OE) i2c_algo_bit(E) fb_sys_fops(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) rpcsec_gss_krb5(E) nfsv4(E) nfs(E) fscache(E) eeepc_wmi(E) asus_wmi(E) sparse_keymap(E) intel_rapl(E) snd_hda_codec_hdmi(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) snd_hda_intel(E) snd_hda_codec(E) snd_hda_core(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) snd_hwdep(E) snd_pcm(E) snd_seq_midi(E) coretemp(E) kvm_intel(E) snd_seq_midi_event(E) snd_rawmidi(E) kvm(E) snd_seq(E) joydev(E) snd_seq_device(E) snd_timer(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) mei_me(E) ghash_clmulni_intel(E) snd(E) aesni_intel(E) mei(E) soundcore(E) aes_x86_64(E) shpchp(E) serio_raw(E) lrw(E) acpi_pad(E) gf128mul(E) glue_helper(E) ablk_helper(E) mac_hid(E) [ 75.835574] cryptd(E) parport_pc(E) ppdev(E) lp(E) nfsd(E) parport(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) autofs4(E) hid_generic(E) usbhid(E) mxm_wmi(E) psmouse(E) e1000e(E) ptp(E) pps_core(E) ahci(E) libahci(E) wmi(E) video(E) i2c_hid(E) hid(E) [ 75.858489] CPU: 5 PID: 1603 Comm: rmmod Tainted: G OE 4.9.0-custom #2 [ 75.866183] Hardware name: System manufacturer System Product Name/Z170-A, BIOS 0901 08/31/2015 [ 75.875050] task: ffff88045d1bbb80 task.stack: ffffc90002de4000 [ 75.881094] RIP: 0010:[] [] amdgpu_fbdev_restore_mode+0x20/0x60 [amdgpu] [ 75.891238] RSP: 0018:ffffc90002de7d48 EFLAGS: 00010286 [ 75.896648] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001 [ 75.903933] RDX: 0000000000000000 RSI: ffff88045d1bbb80 RDI: 0000000000000286 [ 75.911183] RBP: ffffc90002de7d50 R08: 0000000000000502 R09: 0000000000000004 [ 75.918449] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880464bf0000 [ 75.925675] R13: ffffffffa0853000 R14: 0000000000000000 R15: 0000564e44f88210 [ 75.932980] FS: 00007f13d5400700(0000) GS:ffff880476540000(0000) knlGS:0000000000000000 [ 75.941238] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 75.947088] CR2: 00000000000031c0 CR3: 000000045fd0b000 CR4: 00000000003406e0 [ 75.954332] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 75.961566] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 75.968834] Stack: [ 75.970881] ffff880464bf0000 ffffc90002de7d60 ffffffffa0636592 ffffc90002de7d80 [ 75.978454] ffffffffa059015f ffff880464bf0000 ffff880464bf0000 ffffc90002de7da8 [ 75.986076] ffffffffa0595216 ffff880464bf0000 ffff880460f4d000 ffffffffa0853000 [ 75.993692] Call Trace: [ 75.996177] [] amdgpu_driver_lastclose_kms+0x12/0x20 [amdgpu] [ 76.003700] [] drm_lastclose+0x2f/0xd0 [drm] [ 76.009777] [] drm_dev_unregister+0x16/0xd0 [drm] [ 76.016255] [] drm_put_dev+0x34/0x70 [drm] [ 76.022139] [] amdgpu_pci_remove+0x15/0x20 [amdgpu] [ 76.028800] [] pci_device_remove+0x39/0xc0 [ 76.034661] [] __device_release_driver+0x9a/0x140 [ 76.041121] [] driver_detach+0xb8/0xc0 [ 76.046575] [] bus_remove_driver+0x55/0xd0 [ 76.052401] [] driver_unregister+0x2c/0x50 [ 76.058244] [] pci_unregister_driver+0x29/0x90 [ 76.064466] [] drm_pci_exit+0x9e/0xb0 [drm] [ 76.070507] [] amdgpu_exit+0x1c/0x32 [amdgpu] [ 76.076609] [] SyS_delete_module+0x1a0/0x200 [ 76.082627] [] ? rcu_eqs_enter.isra.36+0x4a/0x50 [ 76.089001] [] do_syscall_64+0x6e/0x180 [ 76.094583] [] entry_SYSCALL64_slow_path+0x25/0x25 [ 76.101114] Code: 94 c0 c3 31 c0 5d c3 0f 1f 40 00 0f 1f 44 00 00 55 31 c0 48 89 e5 53 48 89 fb 48 c7 c7 1d 21 84 a0 e8 ab 77 b3 e0 e8 fc 8b d7 e0 <48> 8b bb c0 31 00 00 48 85 ff 74 09 e8 ff eb fc ff 85 c0 75 03 [ 76.121432] RIP [] amdgpu_fbdev_restore_mode+0x20/0x60 [amdgpu] Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5001793d37e9284eb695afa6772877b1e454a32f Author: Hawking Zhang Date: Wed May 24 18:56:10 2017 +0800 drm/amd/powerplay: set powerplay support cap on raven Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 3 +++ 1 file changed, 3 insertions(+) commit 9e23f192dccf4e70634f529a21b2bd72f5586925 Author: Hawking Zhang Date: Wed May 24 18:54:42 2017 +0800 drm/amd/powerplay: bypass pptable process on raven Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | 6 ++++++ 1 file changed, 6 insertions(+) commit efb792c4b2ca0c58c397ed969965d606a73f56bc Author: Hawking Zhang Date: Tue May 23 21:14:19 2017 +0800 drm/amd/powerplay: add get_temperature interface for raven Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 27 ++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit 5746f36dacde7ff6aee807bfe59a2df502aaa8f0 Author: Hawking Zhang Date: Tue May 23 18:32:30 2017 +0800 drm/amd/powerplay: update magic number for rv hw backend Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit f0846b24b678920e242e5c22f406719e203e2eb5 Author: Hawking Zhang Date: Tue May 23 18:26:14 2017 +0800 drm/amd/powerplay: using MinFClock/MaxFclock to report Min/Max memory clock limits Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 60925ee97e2be4993fb7a2f7e70be0fbce08cf0f Merge: be941bf 145d978 Author: David S. Miller Date: Thu May 25 12:07:08 2017 -0700 Merge branch 'sparc64-queued-locks' Babu Moger says: ==================== Enable queued rwlock and queued spinlock for SPARC This series of patches enables queued rwlock and queued spinlock support for SPARC. These features were introduced some time ago in upstream. Here are some of the earlier discussions. https://lwn.net/Articles/572765/ https://lwn.net/Articles/582200/ https://lwn.net/Articles/561775/ https://lwn.net/Articles/590243/ Tests: Ran AIM7 benchmark to verify the performance on various workloads. https://github.com/davidlohr/areaim. Same benchmark was used when this feature was introduced and enabled on x86. Here are the test results. Kernel 4.11.0-rc6 4.11.0-rc6 + Change baseline queued locks (Avg No.of jobs) (Avg No.of jobs) Workload High systime 10-100 user 17290.48 17295.18 +0.02 High systime 200-1000 users 109814.95 110248.87 +0.39 High systime 1200-2000 users 107912.40 127923.16 +18.54 Disk IO 10-100 users 168910.16 158834.17 -5.96 Disk IO 200-1000 users 242781.74 281285.80 +15.85 Disk IO 1200-2000 users 228518.23 218421.23 -4.41 Disk IO 10-100 users 183933.77 207928.67 +13.04 Disk IO 200-1000 users 491981.56 500162.33 +1.66 Disk IO 1200-2000 users 463395.66 467312.70 +0.84 fserver 10-100 users 254177.53 270283.08 +6.33 fserver IO 200-1000 users 269017.35 324812.2 +20.74 fserver IO 1200-2000 users 229538.87 284713.77 +24.03 Disk I/O results are little bit in negative territory. But majority of the performance changes are in positive and it is significant in some cases. Changes: v3 -> v4: 1. Took care of Geert Uytterhoeven's comment about patch #3(def_bool y) 2. Working on separate patch sets to define CPU_BIG_ENDIAN for all the default big endian architectures based on feedback from Geert and Arnd. v2 -> v3: 1. Rebased the patches on top of 4.12-rc2. 2. Re-ordered the patch #1 and patch #2. That is the same order I have seen the issues. So, it should be addressed in the same order. Patch #1 removes the check __LINUX_SPINLOCK_TYPES_H. Patch #2 addreses the compile error with qrwlock.c. This addresses the comments from Dave Miller on v2. v1 -> v2: Addressed the comments from David Miller. 1. Added CPU_BIG_ENDIAN for all SPARC 2. Removed #ifndef __LINUX_SPINLOCK_TYPES_H guard from spinlock_types.h 3. Removed check for CONFIG_QUEUED_RWLOCKS in SPARC64 as it is the default definition for SPARC64 now. Cleaned-up the previous arch_read_xxx and arch_write_xxx definitions as it is defined now in qrwlock.h. 4. Removed check for CONFIG_QUEUED_SPINLOCKS in SPARC64 as it is the default definition now for SPARC64 now. Cleaned-up the previous arch_spin_xxx definitions as it is defined in qspinlock.h. v1: Initial version ==================== Signed-off-by: David S. Miller commit 145d978585977438ebb55079487827006c604e39 Author: Babu Moger Date: Wed May 24 17:55:15 2017 -0600 arch/sparc: Enable queued spinlock support for SPARC This patch makes the necessary changes in SPARC architecture to enable queued spinlock support. Here are some of the earlier discussions about this feature. https://lwn.net/Articles/561775/ https://lwn.net/Articles/590243/ Cleaned-up the spinlock_64.h. The definitions of arch_spin_xxx are replaced by the function in Signed-off-by: Babu Moger Reviewed-by: Håkon Bugge Reviewed-by: Jane Chu Reviewed-by: Shannon Nelson Reviewed-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/Kconfig | 1 + arch/sparc/include/asm/qspinlock.h | 7 +++ arch/sparc/include/asm/spinlock_64.h | 84 +-------------------------------- arch/sparc/include/asm/spinlock_types.h | 5 ++ 4 files changed, 14 insertions(+), 83 deletions(-) commit 79d39e2bab60d18a68a5abc00be4506864397efc Author: Babu Moger Date: Wed May 24 17:55:14 2017 -0600 arch/sparc: Introduce xchg16 for SPARC SPARC supports 32 bit and 64 bit xchg right now. Add the support for 16 bit (2 byte) xchg. This is required to support queued spinlock feature which uses 2 byte xchg. This is achieved using 4 byte cas instructions with byte manipulations. Also re-arranged the code to call __cmpxchg_u32 inside xchg16. Signed-off-by: Babu Moger Reviewed-by: Håkon Bugge Reviewed-by: Steven Sistare Reviewed-by: Shannon Nelson Reviewed-by: Jane Chu Reviewed-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/include/asm/cmpxchg_64.h | 49 +++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 10 deletions(-) commit a37594f198363fd9321ece54440336fd4b2a9c8e Author: Babu Moger Date: Wed May 24 17:55:13 2017 -0600 arch/sparc: Enable queued rwlocks for SPARC Enable queued rwlocks for SPARC. Here are the discussions on this feature when this was introduced. https://lwn.net/Articles/572765/ https://lwn.net/Articles/582200/ Cleaned-up the arch_read_xxx and arch_write_xxx definitions in spinlock_64.h. These routines are replaced by the functions in include/asm-generic/qrwlock.h Signed-off-by: Babu Moger Reviewed-by: Håkon Bugge Reviewed-by: Jane Chu Reviewed-by: Shannon Nelson Reviewed-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/Kconfig | 1 + arch/sparc/include/asm/qrwlock.h | 7 ++ arch/sparc/include/asm/spinlock_64.h | 124 +------------------------------- arch/sparc/include/asm/spinlock_types.h | 5 +- 4 files changed, 13 insertions(+), 124 deletions(-) commit a12ee2349312d7112b9b7c6ac2e70c5ec2ca334e Author: Babu Moger Date: Wed May 24 17:55:12 2017 -0600 arch/sparc: Introduce cmpxchg_u8 SPARC SPARC supports 32 bit and 64 bit cmpxchg right now. Add support for 8 bit (1 byte) cmpxchg. This is required to support queued rwlocks feature which uses 1 byte cmpxchg. The function __cmpxchg_u8 here uses the 4 byte cas instruction with a byte manipulation to achieve 1 byte cmpxchg. Signed-off-by: Babu Moger Reviewed-by: Håkon Bugge Reviewed-by: Steve Sistare Reviewed-by: Shannon Nelson Reviewed-by: Jane Chu Reviewed-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/include/asm/cmpxchg_64.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 97d9f969161d79e6a4bba247e67ce731ff861f79 Author: Babu Moger Date: Wed May 24 17:55:11 2017 -0600 arch/sparc: Define config parameter CPU_BIG_ENDIAN Found this problem while enabling queued rwlock on SPARC. The parameter CONFIG_CPU_BIG_ENDIAN is used to clear the specific byte in qrwlock structure. Without this parameter, we clear the wrong byte. Here is the code. static inline u8 *__qrwlock_write_byte(struct qrwlock *lock) { return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); } Define CPU_BIG_ENDIAN for SPARC to fix it. Signed-off-by: Babu Moger Reviewed-by: Håkon Bugge Reviewed-by: Jane Chu Reviewed-by: Shannon Nelson Reviewed-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 9ab6055f959032258c0f83a070cd0d26ed7a8fc5 Author: Babu Moger Date: Wed May 24 17:55:10 2017 -0600 kernel/locking: Fix compile error with qrwlock.c Saw these compile errors on SPARC when queued rwlock feature is enabled. CC kernel/locking/qrwlock.o kernel/locking/qrwlock.c: In function ‘queued_read_lock_slowpath’: kernel/locking/qrwlock.c:89: error: implicit declaration of function ‘arch_spin_lock’ kernel/locking/qrwlock.c:102: error: implicit declaration of function ‘arch_spin_unlock’ make[4]: *** [kernel/locking/qrwlock.o] Error 1 Include spinlock.h in qrwlock.c to fix it. Signed-off-by: Babu Moger Reviewed-by: Håkon Bugge Reviewed-by: Jane Chu Reviewed-by: Shannon Nelson Reviewed-by: Vijay Kumar Signed-off-by: David S. Miller kernel/locking/qrwlock.c | 1 + 1 file changed, 1 insertion(+) commit 8b93b4a9e1be78930eb9d640f75818993f70e065 Author: Babu Moger Date: Wed May 24 17:55:09 2017 -0600 arch/sparc: Remove the check #ifndef __LINUX_SPINLOCK_TYPES_H Saw these compile errors on SPARC when queued rwlock feature is enabled. CC kernel/locking/qrwlock.o In file included from ./include/asm-generic/qrwlock_types.h:5, from ./arch/sparc/include/asm/qrwlock.h:4, from kernel/locking/qrwlock.c:24: ./arch/sparc/include/asm/spinlock_types.h:5:3: error: #error "please don't include this file directly" SPARC has this guard which causes compile error when spinlock_types.h is included directly. @ifndef __LINUX_SPINLOCK_TYPES_H @ error "please don't include this file directly" @endif Remove this un-necessary "ifndef __LINUX_SPINLOCK_TYPES_H" stanza from SPARC. Signed-off-by: Babu Moger Suggested-by: David Miller Signed-off-by: David S. Miller arch/sparc/include/asm/spinlock_types.h | 4 ---- 1 file changed, 4 deletions(-) commit ff5f58f53cf19eb3a5a26057dc6f44166e1771be Merge: 2baec2c aab0830 Author: David S. Miller Date: Thu May 25 14:44:50 2017 -0400 Merge branch 'be2net-next' Suresh Reddy says: ==================== be2net: patch-set Hi Dave, Please consider applying these two patches to net-next ==================== Signed-off-by: David S. Miller commit aab0830a3811fc242b8cdd82655e98ed5387cc6a Author: Suresh Reddy Date: Wed May 24 22:24:39 2017 -0400 be2net: Update the driver version to 11.4.0.0 Signed-off-by: Suresh Reddy Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 673c96e5af99b6f8eab3ce37afa11cb28c14cf2f Author: Suresh Reddy Date: Wed May 24 22:24:38 2017 -0400 be2net: Fix UE detection logic for BE3 On certain platforms BE3 chips may indicate spurious UEs (unrecoverable error). Because of the UE detection logic was disabled in the driver for BE3 chips. Because of this, even in cases of a real UE, a failover will not occur. This patch re-enables UE detection on BE3 and if a UE is detected, reads the POST register. If the POST register, reports either a FAT_LOG_STATE or a ARMFW_UE, then it means that a valid UE occurred in the chip. Signed-off-by: Suresh Reddy Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_hw.h | 3 +++ drivers/net/ethernet/emulex/benet/be_main.c | 27 +++++++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) commit 2baec2c3f854d1f79c7bb28386484e144e864a14 Author: David Howells Date: Wed May 24 17:02:32 2017 +0100 rxrpc: Support network namespacing Support network namespacing in AF_RXRPC with the following changes: (1) All the local endpoint, peer and call lists, locks, counters, etc. are moved into the per-namespace record. (2) All the connection tracking is moved into the per-namespace record with the exception of the client connection ID tree, which is kept global so that connection IDs are kept unique per-machine. (3) Each namespace gets its own epoch. This allows each network namespace to pretend to be a separate client machine. (4) The /proc/net/rxrpc_xxx files are now called /proc/net/rxrpc/xxx and the contents reflect the namespace. fs/afs/ should be okay with this patch as it explicitly requires the current net namespace to be init_net to permit a mount to proceed at the moment. It will, however, need updating so that cells, IP addresses and DNS records are per-namespace also. Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/Makefile | 1 + net/rxrpc/af_rxrpc.c | 35 +++++------ net/rxrpc/ar-internal.h | 65 ++++++++++++++++---- net/rxrpc/call_accept.c | 14 +++-- net/rxrpc/call_object.c | 39 ++++++------ net/rxrpc/conn_client.c | 153 +++++++++++++++++++++++------------------------ net/rxrpc/conn_object.c | 55 ++++++++--------- net/rxrpc/conn_service.c | 11 ++-- net/rxrpc/local_object.c | 48 +++++++-------- net/rxrpc/net_ns.c | 85 ++++++++++++++++++++++++++ net/rxrpc/peer_object.c | 26 ++++---- net/rxrpc/proc.c | 40 +++++++++---- 12 files changed, 356 insertions(+), 216 deletions(-) commit 878cd3ba37f77ded9c85e9857e3182a7fe8f5dc3 Author: Rosen, Rami Date: Wed May 24 18:34:11 2017 +0300 net/packet: remove unused parameter in prb_curr_blk_in_use(). This patch removes unused parameter from prb_curr_blk_in_use() method in net/packet/af_packet.c. Signed-off-by: Rami Rosen Signed-off-by: David S. Miller net/packet/af_packet.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit c9e19ea421ac2fcbea869cd79e17446cecf89c95 Merge: 26d732b ca84dfb Author: David S. Miller Date: Thu May 25 13:08:36 2017 -0400 Merge branch 'stmmac-rework-speed-selection' Corentin Labbe says: ==================== net-next: stmmac: rework the speed selection The current stmmac_adjust_link() part which handle speed have some if (has_platform) code and my dwmac-sun8i will add more of them. So we need to handle better speed selection. Moreover the struct link member speed and port are hard to guess their purpose. And their unique usage are to be combined for writing speed. My first try was to create an adjust_link() in stmmac_ops but it duplicate some code The current solution is to have direct value for 10/100/1000 and a mask for them. The first 4 patchs fix some minor problem found in stmmac_adjust_link() and reported by Florian Fainelli in my previous serie. The last patch is the real work. This series is tested on cubieboard2 (dwmac1000) and opipc (dwmac-sun8i). Changes since v3: - Added the patch #4 "Convert old_link to bool" as suggested by Joe Perches - Changed the speedmask Changes since v2: - Use true/false for new_state in patch #1 ==================== Signed-off-by: David S. Miller commit ca84dfb9ab70849c2b01f30d658a8900cff9889d Author: LABBE Corentin Date: Wed May 24 09:16:47 2017 +0200 net-next: stmmac: rework the speed selection The current stmmac_adjust_link() part which handle speed have some if (has_platform) code and my dwmac-sun8i will add more of them. So we need to handle better speed selection. Moreover the struct link member speed and port are hard to guess their purpose. And their unique usage are to be combined for writing speed. So this patch replace speed/port by simpler speed10/speed100/speed1000/speed_mask variables. In dwmac4_core_init and dwmac1000_core_init, port/speed value was used directly without using the struct link. This patch convert also their usage to speedxxx. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 8 ++++--- .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 26 +++++++++++++--------- .../net/ethernet/stmicro/stmmac/dwmac100_core.c | 6 +++-- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 26 +++++++++++++--------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 21 ++++------------- 5 files changed, 43 insertions(+), 44 deletions(-) commit 4d869b03b74d73205956381a967cab7e572144df Author: LABBE Corentin Date: Wed May 24 09:16:46 2017 +0200 net-next: stmmac: Convert old_link to bool This patch convert old_link from int to bool since it store only 1 or 0 Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit afbe17a3ad38e1c90bbb204b7f2accfbe9b9f2dc Author: LABBE Corentin Date: Wed May 24 09:16:45 2017 +0200 net-next: stmmac: use SPEED_xxx instead of raw value Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 50cb16d4fd1263c72f5d384a275a86a72b546121 Author: LABBE Corentin Date: Wed May 24 09:16:44 2017 +0200 net-next: stmmac: Remove unnecessary parenthesis Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99a4cca216d98d48e5bc848b9e88131efa364fb6 Author: LABBE Corentin Date: Wed May 24 09:16:43 2017 +0200 net-next: stmmac: Convert new_state to bool This patch convert new_state from int to bool since it store only 1 or 0 Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 26d732baa09daa196b426b6cb354783eb1c75ec5 Author: Matthias Kaehlcke Date: Tue May 23 17:27:51 2017 -0700 net: jme: Remove unused functions The functions jme_restart_tx_engine(), jme_pause_rx() and jme_resume_rx() are not used. Removing them fixes the following warnings when building with clang: drivers/net/ethernet/jme.c:694:1: error: unused function 'jme_restart_tx_engine' [-Werror,-Wunused-function] drivers/net/ethernet/jme.c:2393:20: error: unused function 'jme_pause_rx' [-Werror,-Wunused-function] drivers/net/ethernet/jme.c:2406:20: error: unused function 'jme_resume_rx' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke Signed-off-by: David S. Miller drivers/net/ethernet/jme.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) commit 13253d808d42dee88a53aa0fa57c5de4e6a460ed Author: Aliza Minkov Date: Thu May 25 16:46:45 2017 +0300 dgnc: fix multiple blank lines coding style problem According to the coding-style documentation, functions in source files should be separated with one blank line. Redundant blank lines were removed from this source file, in accordance with coding-style documentation. Signed-off-by: Aliza Minkov Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 2 -- 1 file changed, 2 deletions(-) commit 7959c3314cc333cac9e0b9becddd968cd4a48188 Author: Marko Stankovic Date: Wed May 24 00:25:24 2017 +0200 staging: vt6655: align function parameters to open parenthesis Alignment styles are used interchangeably, align parameters to open parenthesis and fix issues reported by checkpatch.pl Signed-off-by: Marko Stankovic Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 13 +++++++------ drivers/staging/vt6655/key.c | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) commit fc0f0bd61230f4d85670928539db40ab5528b50c Author: Rui Teng Date: Tue May 23 10:04:15 2017 +0800 drivers/staging/speakup: fix indent coding style problem in spk_ttyio.c This is a patch to the spk_ttyio.c file which fixes up the indent error reported by the checkpatch.pl tool. Signed-off-by: Rui Teng Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c60befe6df8ec85282728677f4445f5e2aab3ee Author: Marko Stankovic Date: Tue May 23 01:19:44 2017 +0200 staging: vt6655: remove unnecessary blank lines Fix unnecessary blank lines issues reported by checkpatch.pl Signed-off-by: Marko Stankovic Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 2 -- 1 file changed, 2 deletions(-) commit 3621014af3847d95947a5baa528e53c2322ef934 Author: Marko Stankovic Date: Tue May 23 01:19:43 2017 +0200 staging: vt6655: replace NULL comparison with '!' operator Fix comparison to NULL issues reported by checkpatch.pl Signed-off-by: Marko Stankovic Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5b5d636221057ae0f33aa906e1bf315f22f05b84 Author: Marko Stankovic Date: Sat May 20 18:50:37 2017 +0200 staging: vt6655: add spaces around '%' operator Fix checkpatch issue by adding spaces around the '%' operator Signed-off-by: Marko Stankovic Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e4e3bca8900b34d1cffa1891745d83b07892fea Author: Paolo Cretaro Date: Thu May 18 23:59:41 2017 +0200 staging: android: ion: set init function as static Fix warning issued by sparse: symbol 'ion_device_create' was not declared. Should it be static? Signed-off-by: Paolo Cretaro Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e45423d76f1c229b1a30ddde205a72774cdb12c6 Author: Dan Carpenter Date: Sat May 20 00:27:18 2017 +0300 staging: speakup: signedness bug in spk_ttyio_in_nowait() On most of the common arches char is signed so it can't ever == 0xff. Let's fix this by making it a u8. Fixes: 6b9ad1c742bf ("staging: speakup: add send_xchar, tiocmset and input functionality for tty") Signed-off-by: Dan Carpenter Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52c05fc744215b3969c9b522d2ff5a82fd3d64ed Merge: a0a32d3 7dab546 Author: David S. Miller Date: Thu May 25 12:54:49 2017 -0400 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2017-05-23 Here's the first Bluetooth & 802.15.4 pull request targeting the 4.13 kernel release. - Bluetooth 5.0 improvements (Data Length Extensions and alternate PHY) - Support for new Intel Bluetooth adapter [[8087:0aaa] - Various fixes to ieee802154 code - Various fixes to HCI UART code ==================== Signed-off-by: David S. Miller commit d70dd245215d6456584119534e6870a9c7b9b9c2 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:59 2017 -0400 staging: unisys: visorbus: remove channel_addr check in handle_command Removed a check for physaddr=0 in handle_command() function in visorchipset.c. Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 3 --- 1 file changed, 3 deletions(-) commit d36c4857cbaede959e012045711a3467e857e132 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:58 2017 -0400 staging: unisys: visorbus: add comment to explain polling logic in controlvm_periodic_work Added a comment to explain polling frequency variation logic in controlvm_periodic_logic() in visorchipset.c. Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 5 +++++ 1 file changed, 5 insertions(+) commit 172f4c367c7239b2390302402cb360ad94fcac4a Author: Sameer Wadgaonkar Date: Fri May 19 16:17:57 2017 -0400 staging: unisys: include: renamed structure spar_io_channel_protocol in iochannel.h to match driver namespace Renamed structure spar_io_channel_protocol to visor_io_channel and changed "visor bus" to "visorbus" in a comment in visornic_main.c and visorhba_main.c. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 2 +- drivers/staging/unisys/visorhba/visorhba_main.c | 7 +++---- drivers/staging/unisys/visornic/visornic_main.c | 13 +++++-------- 3 files changed, 9 insertions(+), 13 deletions(-) commit 68646323cd08e9dae69ea3a0bf58d31fc0963e35 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:56 2017 -0400 staging: unisys: include: renamed #defines in iochannel.h to match driver namespace Renamed #defines * ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE to VISOR_VHBA_CHANNEL_SIGNATURE * ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE to VISOR_VNIC_CHANNEL_SIGNATURE * ULTRA_VSWITCH_CHANNEL_PROTOCOL_SIGNATURE to VISOR_VSWITCH_CHANNEL_SIGNATURE * ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID to VISOR_VHBA_CHANNEL_VERSIONID * ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID to VISOR_VNIC_CHANNEL_VERSIONID * ULTRA_VSWITCH_CHANNEL_PROTOCOL_VERSIONID to VISOR_VSWITCH_CHANNEL_VERSIONID * SPAR_VHBA_CHANNEL_OK_CLIENT to VISOR_VHBA_CHANNEL_OK_CLIENT * SPAR_VNIC_CHANNEL_OK_CLIENT to VISOR_VNIC_CHANNEL_OK_CLIENT Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit c75ebe5e30a0e1ed7ffacd4e45798ff98eca4e86 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:55 2017 -0400 staging: unisys: include: renamed #defines in channel.h to match driver namespace Renamed #defines * ULTRA_CHANNEL_PROTOCOL_SIGNATURE to VISOR_CHANNEL_SIGNATURE * SPAR_CHANNEL_SERVER_READY to VISOR_CHANNEL_SERVER_READY * ULTRA_VALID_CHANNELCLI_TRANSITION VISOR_VALID_CHANNELCLI_TRANSITION * ULTRA_CLIERRORBOOT_THROTTLEMSG_DISABLED to VISOR_CLIERRORBOOT_THROTTLEMSG_DISABLED * ULTRA_CLIERRORBOOT_THROTTLEMSG_NOTATTACHED to VISOR_CLIERRORBOOT_THROTTLEMSG_NOTATTACHED * ULTRA_CLIERRORBOOT_THROTTLEMSG_BUSY to VISOR_CLIERRORBOOT_THROTTLEMSG_BUSY * ULTRA_IO_DRIVER_ENABLES_INTS to VISOR_DRIVER_ENABLES_INTS * ULTRA_IO_CHANNEL_IS_POLLING to VISOR_CHANNEL_IS_POLLING * ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS to VISOR_IOVM_OK_DRIVER_DISABLING_INTS * ULTRA_IO_DRIVER_DISABLES_INTS to VISOR_DRIVER_DISABLES_INTS * ULTRA_IO_DRIVER_SUPPORTS_ENHANCED_RCVBUF_CHECKING to VISOR_DRIVER_ENHANCED_RCVBUF_CHECKING * ULTRA_CHANNEL_ENABLE_INTS to VISOR_CHANNEL_ENABLE_INTS * SPAR_VHBA_CHANNEL_PROTOCOL_UUID to VISOR_VHBA_CHANNEL_UUID * SPAR_VHBA_CHANNEL_PROTOCOL_UUID_STR to VISOR_VHBA_CHANNEL_UUID_STR * SPAR_VNIC_CHANNEL_PROTOCOL_UUID to VISOR_VNIC_CHANNEL_UUID * SPAR_VNIC_CHANNEL_PROTOCOL_UUID_STR to VISOR_VNIC_CHANNEL_UUID_STR * SPAR_SIOVM_UUID to VISOR_SIOVM_UUID Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/Documentation/overview.txt | 8 ++-- drivers/staging/unisys/include/channel.h | 48 +++++++++++----------- drivers/staging/unisys/include/iochannel.h | 11 +++-- drivers/staging/unisys/visorbus/controlvmchannel.h | 2 +- drivers/staging/unisys/visorbus/vbuschannel.h | 2 +- drivers/staging/unisys/visorbus/visorchipset.c | 4 +- drivers/staging/unisys/visorhba/visorhba_main.c | 8 ++-- drivers/staging/unisys/visornic/visornic_main.c | 10 ++--- 8 files changed, 45 insertions(+), 48 deletions(-) commit 315dfc84d11f3624a684a426dcf8535367bbe130 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:54 2017 -0400 staging: unisys: include: renamed function spar_check_channel in channel.h to match driver namespace Renamed function spar_check_channel() to visor_check_channel(). Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 12 ++++++------ drivers/staging/unisys/include/iochannel.h | 4 ++-- drivers/staging/unisys/visorbus/controlvmchannel.h | 12 ++++++------ drivers/staging/unisys/visorbus/visorbus_main.c | 12 ++++++------ 4 files changed, 20 insertions(+), 20 deletions(-) commit bac41a2f682f1e9f8e3aec889ed481d92cc7dadf Author: Sameer Wadgaonkar Date: Fri May 19 16:17:53 2017 -0400 staging: unisys: visorinput: removed enum in ultrainputreport.h to match driver namespace Removed enum ultra_inputaction in ultrainputreport.h and changed elements to #defnes. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman .../staging/unisys/visorinput/ultrainputreport.h | 43 ++++++++++------------ drivers/staging/unisys/visorinput/visorinput.c | 22 +++++------ 2 files changed, 30 insertions(+), 35 deletions(-) commit c2093c804cf72266fbd35ce4edcfcbe36ef0cc9a Author: Sameer Wadgaonkar Date: Fri May 19 16:17:52 2017 -0400 staging: unisys: visorinput: renamed structures in ultrainputreport.h to match driver namespace Renamed structures * ultra_inputactivity to visor_inputactivity * ultra_inputreport to visor_inputreport Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/ultrainputreport.h | 6 +++--- drivers/staging/unisys/visorinput/visorinput.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 785542c6606b986668787c0e819e61eed99edb31 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:51 2017 -0400 staging: unisys: visorinput: renamed #defines in visorinput.c to match driver namespace Renamed #defines * SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID to VISOR_KEYBOARD_CHANNEL_UUID * SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID_STR to VISOR_KEYBOARD_CHANNEL_UUID_STR * SPAR_MOUSE_CHANNEL_PROTOCOL_UUID to VISOR_MOUSE_CHANNEL_UUID * SPAR_MOUSE_CHANNEL_PROTOCOL_UUID_STR to VISOR_MOUSE_CHANNEL_UUID_STR Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/Documentation/overview.txt | 6 ++--- drivers/staging/unisys/visorinput/visorinput.c | 27 ++++++++++------------- 2 files changed, 15 insertions(+), 18 deletions(-) commit d3ad6e69ca59241c35d0c1c3869f8cec92945d95 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:50 2017 -0400 staging: unisys: visorbus: renamed enum in controlvmchannel.h to match driver namespace Renamed enum and its members * ultra_chipset_feature to visor_chipset_feature * ULTRA_CHIPSET_FEATURE_REPLY to VISOR_CHIPSET_FEATURE_REPLY * ULTRA_CHIPSET_FEATURE_PARA_HOTPLUG to VISOR_CHIPSET_FEATURE_PARA_HOTPLUG Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 8 ++++---- drivers/staging/unisys/visorbus/visorchipset.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 545f091389011cdee7cd1313fe973f716a08fb85 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:49 2017 -0400 staging: unisys: visorbus: renamed structures in controlvmchannel.h to match driver namespace Renamed structures * spar_segment_state to visor_segment_state * efi_spar_indication to efi_visor_indication * spar_controlvm_channel_protocol to visor_controlvm_channel * spar_controlvm_parameters_header to visor_controlvm_parameters_header Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 25 +++--- drivers/staging/unisys/visorbus/visorchipset.c | 99 ++++++++++------------ 2 files changed, 59 insertions(+), 65 deletions(-) commit c5a28902b466b531d5170d08bc3ac610e27b2605 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:48 2017 -0400 staging: unisys: visorbus: renamed #defines in controlvmchannel.h to match driver namespace Renamed #defines * SPAR_CONTROLVM_CHANNEL_PROTOCOL_UUID to VISOR_CONTROLVM_CHANNEL_UUID * ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE to VISOR_CONTROLVM_CHANNEL_SIGNATURE * ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID to VISOR_CONTROLVM_CHANNEL_VERSIONID * SPAR_CONTROLVM_CHANNEL_OK_CLIENT to VISOR_CONTROLVM_CHANNEL_OK_CLIENT Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 19 +++++++++---------- drivers/staging/unisys/visorbus/visorchipset.c | 16 ++++++++-------- 2 files changed, 17 insertions(+), 18 deletions(-) commit a27ded9272c763e598adedd445f9c838265b46c1 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:47 2017 -0400 staging: unisys: visorbus: renamed #defines in visorchipset.c to match driver namespace Renamed #defines * UNISYS_SPAR_LEAF_ID to UNISYS_VISOR_LEAF_ID * UNISYS_SPAR_ID_EBX to UNISYS_VISOR_ID_EBX * UNISYS_SPAR_ID_ECX to UNISYS_VISOR_ID_ECX * UNISYS_SPAR_ID_EDX to UNISYS_VISOR_ID_EDX Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2b8ec7da96c197368e5e59d38efb5a5265eb87a7 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:46 2017 -0400 staging: unisys: visorbus: renamed #define in visorchannel.c to match driver namespace Renamed SPAR_CONSOLEVIDEO_CHANNEL_PROTOCOL_GUID to VISOR_CONSOLEVIDEO_CHANNEL_GUID and renamed const spar_video_guid to visor_video_guid Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 55c71ebaf69ac64b4a4aec6ff1ea4e22c8883231 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:45 2017 -0400 staging: unisys: visorbus: renamed structures in vbuschannel.h to match driver namespace Renamed structures * ultra_vbus_deviceinfo to visor_vbus_deviceinfo * spar_vbus_headerinfo to visor_vbus_headerinfo * spar_vbus_channel_protocol to visor_vbus_channel Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 16 +++---- drivers/staging/unisys/visorbus/visorbus_main.c | 58 ++++++++++++------------- 2 files changed, 36 insertions(+), 38 deletions(-) commit 734721746ec576f06788123628df2b0ad3ded54b Author: Sameer Wadgaonkar Date: Fri May 19 16:17:44 2017 -0400 staging: unisys: visorbus: renamed #defines in vbuschannel.h to match driver namespace Renamed #defines: * SPAR_VBUS_CHANNEL_PROTOCOL_UUID to VISOR_VBUS_CHANNEL_UUID * SPAR_VBUS_CHANNEL_PROTOCOL_SIGNATURE to VISOR_VBUS_CHANNEL_SIGNATURE * SPAR_VBUS_CHANNEL_PROTOCOL_VERSIONID to VISOR_VBUS_CHANNEL_VERSIONID Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 9 ++++----- drivers/staging/unisys/visorbus/visorbus_main.c | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) commit 8b0a6cfa7f91d980e50ee05446af4b9ff3131c2a Author: Sameer Wadgaonkar Date: Fri May 19 16:17:43 2017 -0400 staging: unisys: visorbus: renamed functions like my_device_* to match driver namespace Renamed functions * my_device_create() to visorbus_device_create() * my_device_changestate() to visorbus_device_changestate() * my_device_destroy() to visorbus_device_destroy() Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 451072e3f0c7ff46e887765b225513ff0ee29aa2 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:42 2017 -0400 staging: unisys: visorbus: renamed function initiate_chipset_device_pause_resume to match driver namespace Renamed function initiate_chipset_device_pause_resume() to visorchipset_initiate_device_pause_resume(). Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit c0b44136c8bcfbc38ee8d8c9bf3de1b950ecfcbc Author: Sameer Wadgaonkar Date: Fri May 19 16:17:41 2017 -0400 staging: unisys: visorbus: renamed functions like chipset_device_* to match driver namespace Renamed functions * chipset_device_create() to visorchipset_device_create() * chipset_device_destroy() to visorchipset_device_destroy() * chipset_device_pause() to visorchipset_device_pause() * chipset_device_resume() to visorchipset_device_resume() Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 12 ++++++------ drivers/staging/unisys/visorbus/visorbus_private.h | 8 ++++---- drivers/staging/unisys/visorbus/visorchipset.c | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) commit 4f96c7308e8c24dc8e02863830703353c0099cdd Author: Sameer Wadgaonkar Date: Fri May 19 16:17:40 2017 -0400 staging: unisys: visorbus: renamed functions like chipset_bus_* to match driver namespace Renamed functions * chipset_bus_create() to visorchipset_bus_create() * chipset_bus_destroy() to visorchipset_bus_destroy() Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- drivers/staging/unisys/visorbus/visorbus_private.h | 4 ++-- drivers/staging/unisys/visorbus/visorchipset.c | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) commit 9e78fd35dfd1bb8443edf29e589de2e144d17937 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:39 2017 -0400 staging: unisys: visorbus: renamed functions like *_bus_instance to match driver namespace Renamed functions * create_bus_instance() to visorbus_create_instance() * remove_bus_instance() to visorbus_remove_instance() Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f8b5a21febca4cbd5353ece7dcc0a3ed608b187e Author: Sameer Wadgaonkar Date: Fri May 19 16:17:38 2017 -0400 staging: unisys: visorbus: renamed functions like device_*_response to match driver namespace Renamed functions * device_create_response() to visorbus_device_create_response() * device_destroy_response() to visorbus_device_destroy_response() * device_pause_response() to visorbus_device_pause_response() * device_resume_response() to visorbus_device_resume_response() Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 8 ++++---- drivers/staging/unisys/visorbus/visorbus_private.h | 8 ++++---- drivers/staging/unisys/visorbus/visorchipset.c | 9 ++++----- 3 files changed, 12 insertions(+), 13 deletions(-) commit 63847f17f7575fd71bbf6ebaed4f23a8b223b1c2 Author: Sameer Wadgaonkar Date: Fri May 19 16:17:37 2017 -0400 staging: unisys: visorbus: renamed functions like bus_*_response to match driver namespace Renamed functions bus_create_response() to visorbus_create_response() and bus_destroy_response() to visorbus_destroy_response(). Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- drivers/staging/unisys/visorbus/visorbus_private.h | 4 ++-- drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit ec17cb8a6c4b07472f03d950d6d2fb9d1b379d5d Author: Sameer Wadgaonkar Date: Fri May 19 16:17:36 2017 -0400 staging: unisys: visorbus: renamed functions bus_create, bus_destroy and bus_configure to match driver namespace Renamed the functions bus_create() to visorbus_create(), bus_destroy() to visorbus_destroy() and bus_configure() to visorbus_configure Signed-off-by: Sameer Wadgaonkar Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 603a1989c67785d2fec4d881067291adb904f1d7 Author: Jon Frisch Date: Fri May 19 16:17:35 2017 -0400 staging: unisys: visorbus: rename typ to cr_type This patch renames enum crash_obj_type typ to cr_type. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f5d986592e761a4544234915bb5634fa4b74ea5 Author: Logan Gunthorpe Date: Wed May 24 15:59:05 2017 -0600 staging: ccree: Cleanup: remove references to page_link This is a layering violation so we replace it with calls to sg_page. This is a prep patch for replacing page_link and this is one of the very few uses outside of scatterlist.h. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Cc: Greg Kroah-Hartman Cc: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit a0a32d3a0ed98c1ae17973533d87baaac7079279 Author: Uwe Kleine-König Date: Wed May 24 00:26:07 2017 +0200 net: phy: put genphy_config_init's EXPORT_SYMBOL directly after the function Commit af6b6967d6e1 ("net: phy: export genphy_config_init()") introduced this EXPORT_SYMBOL and put it after gen10g_soft_reset() instead of directly after genphy_config_init. Probably this happend when the patch was applied because http://patchwork.ozlabs.org/patch/339622/ looks ok. Signed-off-by: Uwe Kleine-König Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0e1a1b5a833b625c93d3d49847609350ebd79db Author: Eric Dumazet Date: Tue May 23 15:24:46 2017 -0700 tcp: better validation of received ack sequences Paul Fiterau Brostean reported : Linux TCP stack we analyze exhibits behavior that seems odd to me. The scenario is as follows (all packets have empty payloads, no window scaling, rcv/snd window size should not be a factor): TEST HARNESS (CLIENT) LINUX SERVER 1. - LISTEN (server listen, then accepts) 2. - --> --> SYN-RECEIVED 3. - <-- <-- SYN-RECEIVED 4. - --> --> ESTABLISHED 5. - <-- <-- FIN WAIT-1 (server opts to close the data connection calling "close" on the connection socket) 6. - --> --> CLOSING (client sends FIN,ACK with not yet sent acknowledgement number) 7. - <-- <-- CLOSING (ACK is 102 instead of 101, why?) ... (silence from CLIENT) 8. - <-- <-- CLOSING (retransmission, again ACK is 102) Now, note that packet 6 while having the expected sequence number, acknowledges something that wasn't sent by the server. So I would expect the packet to maybe prompt an ACK response from the server, and then be ignored. Yet it is not ignored and actually leads to an increase of the acknowledgement number in the server's retransmission of the FIN,ACK packet. The explanation I found is that the FIN in packet 6 was processed, despite the acknowledgement number being unacceptable. Further experiments indeed show that the server processes this FIN, transitioning to CLOSING, then on receiving an ACK for the FIN it had send in packet 5, the server (or better said connection) transitions from CLOSING to TIME_WAIT (as signaled by netstat). Indeed, tcp_rcv_state_process() calls tcp_ack() but does not exploit the @acceptable status but for TCP_SYN_RECV state. What we want here is to send a challenge ACK, if not in TCP_SYN_RECV state. TCP_FIN_WAIT1 state is not the only state we should fix. Add a FLAG_NO_CHALLENGE_ACK so that tcp_rcv_state_process() can choose to send a challenge ACK and discard the packet instead of wrongly change socket state. With help from Neal Cardwell. Signed-off-by: Eric Dumazet Reported-by: Paul Fiterau Brostean Cc: Neal Cardwell Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit c2b21f688aa4c2bd8e967ec8178e02dfc0a75914 Author: Branislav Katreniak Date: Thu May 18 22:28:33 2017 +0200 staging: ccree: fix checkpatch no space before tabs Fixes checkpatch warning: WARNING: please, no space before tabs Signed-off-by: Branislav Katreniak Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_crypto_ctx.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 6aec6c7a4718d256691e317eaa48c5ee0a549d46 Author: Raphaël Beamonte Date: Tue May 23 20:53:14 2017 +0200 drivers: staging: ccree: ISO C forbids casting to and from non-scalar Fixes the following sparse warnings: drivers/staging/ccree/ssi_hash.c:2447:24: warning: cast to non-scalar drivers/staging/ccree/ssi_hash.c:2447:24: warning: cast from non-scalar drivers/staging/ccree/ssi_hash.c:2448:28: warning: cast to non-scalar drivers/staging/ccree/ssi_hash.c:2448:28: warning: cast from non-scalar Signed-off-by: Raphaël Beamonte Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89cf2a20c3f13dbb4c15a0c6d2e390e700992173 Author: Nick Desaulniers Date: Sun May 21 01:58:07 2017 -0700 sysfs: remove signedness from sysfs_get_dirent sysfs_get_dirent is usually invoked with a string literal, which have the type char[]. While the toplevel Makefile disables -Wpointer-sign, other Makefiles like arch/x86/boot/compressed/Makefile redefine KBUILD_CFLAGS. Fixes the warning: In file included from arch/x86/boot/compressed/kaslr.c:17: In file included from ./include/linux/module.h:17: In file included from ./include/linux/kobject.h:21: ./include/linux/sysfs.h:517:37: warning: passing 'const unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] return kernfs_find_and_get(parent, name); ^~~~ ./include/linux/kernfs.h:462:57: note: passing argument to parameter 'name' here kernfs_find_and_get(struct kernfs_node *kn, const char *name) ^ Signed-off-by: Nick Desaulniers Signed-off-by: Greg Kroah-Hartman include/linux/sysfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f36776fafbaa0094390dd4e7e3e29805e0b82730 Author: Peter Rajnoha Date: Tue May 9 15:22:30 2017 +0200 kobject: support passing in variables for synthetic uevents This patch makes it possible to pass additional arguments in addition to uevent action name when writing /sys/.../uevent attribute. These additional arguments are then inserted into generated synthetic uevent as additional environment variables. Before, we were not able to pass any additional uevent environment variables for synthetic uevents. This made it hard to identify such uevents properly in userspace to make proper distinction between genuine uevents originating from kernel and synthetic uevents triggered from userspace. Also, it was not possible to pass any additional information which would make it possible to optimize and change the way the synthetic uevents are processed back in userspace based on the originating environment of the triggering action in userspace. With the extra additional variables, we are able to pass through this extra information needed and also it makes it possible to synchronize with such synthetic uevents as they can be clearly identified back in userspace. The format for writing the uevent attribute is following: ACTION [UUID [KEY=VALUE ...] There's no change in how "ACTION" is recognized - it stays the same ("add", "change", "remove"). The "ACTION" is the only argument required to generate synthetic uevent, the rest of arguments, that this patch adds support for, are optional. The "UUID" is considered as transaction identifier so it's possible to use the same UUID value for one or more synthetic uevents in which case we logically group these uevents together for any userspace listeners. The "UUID" is expected to be in "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" format where "x" is a hex digit. The value appears in uevent as "SYNTH_UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" environment variable. The "KEY=VALUE" pairs can contain alphanumeric characters only. It's possible to define zero or more more pairs - each pair is then delimited by a space character " ". Each pair appears in synthetic uevents as "SYNTH_ARG_KEY=VALUE" environment variable. That means the KEY name gains "SYNTH_ARG_" prefix to avoid possible collisions with existing variables. To pass the "KEY=VALUE" pairs, it's also required to pass in the "UUID" part for the synthetic uevent first. If "UUID" is not passed in, the generated synthetic uevent gains "SYNTH_UUID=0" environment variable automatically so it's possible to identify this situation in userspace when reading generated uevent and so we can still make a difference between genuine and synthetic uevents. Signed-off-by: Peter Rajnoha Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-uevent | 47 ++++++++++ drivers/base/bus.c | 10 +- drivers/base/core.c | 7 +- include/linux/kobject.h | 4 +- kernel/module.c | 5 +- lib/kobject_uevent.c | 167 ++++++++++++++++++++++++++++++--- 6 files changed, 207 insertions(+), 33 deletions(-) commit 7ae5f10a9fc1ae2f001ab3be5be84a5d0a89f918 Author: Wolfram Sang Date: Sun May 21 22:42:33 2017 +0200 misc: bh1770glc: move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/misc/bh1770glc.c | 2 +- include/linux/i2c/bh1770glc.h | 53 --------------------------------- include/linux/platform_data/bh1770glc.h | 53 +++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 54 deletions(-) commit 610387d162eb1beb6eb2009af5175dc6b44b8da6 Author: Wolfram Sang Date: Sun May 21 22:42:32 2017 +0200 misc: apds990x: move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/misc/apds990x.c | 2 +- include/linux/i2c/apds990x.h | 79 ---------------------------------- include/linux/platform_data/apds990x.h | 79 ++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 80 deletions(-) commit be035303182a1260803a1871065d7b1e67c9ebe9 Author: Keerthy Date: Tue May 23 17:46:56 2017 +0530 regulator: tps65917: Add support for SMPS12 App support for SMPS12 dual phase regulator. Signed-off-by: Keerthy Acked-by: Lee Jones Signed-off-by: Mark Brown drivers/regulator/palmas-regulator.c | 18 +++++++++++++++--- include/linux/mfd/palmas.h | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-) commit 4654bdb63910eaafd586c7c12b473ecc0b3ab94a Author: Wei Yongjun Date: Tue Apr 25 16:13:34 2017 +0000 auxdisplay: Convert list_for_each to entry variant convert list_for_each() to list_for_each_entry() where applicable. Signed-off-by: Wei Yongjun Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/panel.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 70caf709164b7347326205ea19cfafea7d002f81 Author: Colin Ian King Date: Thu Apr 27 18:41:34 2017 +0100 goldfish_pipe: make pipe_dev static Make this static as it's only referenced in this source and it does not need global scope. Cleans up a sparse warning: drivers/platform/goldfish/goldfish_pipe.c: warning: symbol 'pipe_dev' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/platform/goldfish/goldfish_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6a38565e6d783a16854654b3cfb3a178768b37a Author: Tomas Winkler Date: Sun Apr 30 13:12:11 2017 +0300 mei: hw: fix a spelling mistake notifcation -> notification Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bb2d27f837d72f247bfa341a5ccf2d54d2b7d2d Author: Alexander Usyskin Date: Sun Apr 30 13:12:10 2017 +0300 mei: make mei_cl_bus_rescan static mei_cl_bus_rescan is used only in bus.c, so make it local to the file and mark static. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus.c | 2 +- drivers/misc/mei/mei_dev.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 50fa2951bd744d2a82aa33074001efac12d4e1cf Author: Andrew F. Davis Date: Tue May 16 15:02:12 2017 -0500 w1: Organize driver source to natural/common order Structures and functions should be ordered such that forward declaration use is minimized. MODULE_* macros should immediately follow the structures and functions upon which they act. Remaining MODULE_* macros should be at the end of the file in alphabetical order. Signed-off-by: Andrew F. Davis Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds2482.c | 45 ++++++++++++++------------------- drivers/w1/masters/ds2490.c | 33 ++++++++++-------------- drivers/w1/masters/matrox_w1.c | 40 +++++++++++++---------------- drivers/w1/masters/omap_hdq.c | 57 ++++++++++++++++++------------------------ drivers/w1/slaves/w1_bq27000.c | 9 +++---- drivers/w1/slaves/w1_ds2406.c | 8 +++--- drivers/w1/slaves/w1_ds2408.c | 11 ++++---- drivers/w1/slaves/w1_ds2413.c | 10 ++++---- drivers/w1/slaves/w1_ds2423.c | 2 +- drivers/w1/slaves/w1_ds2431.c | 2 +- drivers/w1/slaves/w1_ds2433.c | 10 ++++---- drivers/w1/slaves/w1_ds2760.c | 11 ++++---- drivers/w1/slaves/w1_ds2780.c | 2 +- drivers/w1/slaves/w1_ds2781.c | 2 +- drivers/w1/slaves/w1_ds28e04.c | 10 ++++---- drivers/w1/slaves/w1_smem.c | 12 ++++----- drivers/w1/slaves/w1_therm.c | 18 ++++++------- drivers/w1/w1.c | 18 +++++++------ drivers/w1/w1_family.c | 5 ++-- drivers/w1/w1_int.c | 3 +-- 20 files changed, 138 insertions(+), 170 deletions(-) commit 367a8ce896f14018cc2c6cf2681aa440fff274f4 Author: WANG Cong Date: Tue May 23 09:42:37 2017 -0700 net_sched: only create filter chains for new filters/actions tcf_chain_get() always creates a new filter chain if not found in existing ones. This is totally unnecessary when we get or delete filters, new chain should be only created for new filters (or new actions). Fixes: 5bc1701881e3 ("net: sched: introduce multichain support for filters") Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/pkt_cls.h | 3 ++- net/sched/act_api.c | 2 +- net/sched/cls_api.c | 13 +++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) commit ee538dcea28930bd95606fe00a834935d6fb5613 Author: Jiri Pirko Date: Tue May 23 09:11:59 2017 +0200 net: sched: cls_api: make reclassify return all the way back to the original tp With the introduction of chain goto action, the reclassification would cause the re-iteration of the actual chain. It makes more sense to restart the whole thing and re-iterate starting from the original tp - start of chain 0. Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: David S. Miller net/sched/cls_api.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit abc7a4ef843cf46a070374318fd239e2971c3b9b Merge: ce682ef b359911 Author: David S. Miller Date: Thu May 25 12:01:22 2017 -0400 Merge tag 'mlx5-update-2017-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-update-2017-05-23 First patch from Leon, came to remove the redundant usage of mlx5_vzalloc, and directly use kvzalloc across all mlx5 drivers. 2nd patch from Noa, adds new device IDs into the supported devices list. 3rd and 4th patches from Ilan are adding the basic infrastructure and support for Mellanox's mlx5 FPGA. Last two patches from Tariq came to modify the outdated driver version reported in ethtool and in mlx5_ib to more reflect the current driver state and remove the redundant date string reported in the version. ==================== Signed-off-by: David S. Miller commit 13b9abfc92be7c4454bff912021b9f835dea6e15 Author: Michael Kelley Date: Thu May 18 10:46:07 2017 -0700 Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page Extend the disabling of preemption to include the hypercall so that another thread can't get the CPU and corrupt the per-cpu page used for hypercall arguments. Cc: #4.11 Signed-off-by: Michael Kelley Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3110010896f17f381bd74d72b9d4a46a087c46b8 Author: Andy Shevchenko Date: Thu May 18 10:46:06 2017 -0700 vmbus: Reuse uuid_le_to_bin() helper Instead of open coded variant use generic helper to convert UUID strings to binary format. Signed-off-by: Andy Shevchenko Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/vmbus_drv.c | 51 ++++++++++---------------------------------------- 1 file changed, 10 insertions(+), 41 deletions(-) commit e917a5e23a87e24931625c344daea834cd2d6f2f Author: K. Y. Srinivasan Date: Thu May 18 10:46:05 2017 -0700 drivers: hv: vmbus: Increase the time between retries in vmbus_post_msg() Commit c0bb03924f1a ("Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()") increased the retry/wait limits of vmbus_post_msg() to address the new DoS protection policies in WS2016. Increase the time between retries to make the code more robust. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d10602d306cb7f70545b5e1166efc9409e7d384 Author: Vitaly Kuznetsov Date: Thu May 18 10:46:04 2017 -0700 hv_utils: fix TimeSync work on pre-TimeSync-v4 hosts It was found that ICTIMESYNCFLAG_SYNC packets are handled incorrectly on WS2012R2, e.g. after the guest is paused and resumed its time is set to something different from host's time. The problem is that we call adj_guesttime() with reftime=0 for these old hosts and we don't account for that in 'if (adj_flags & ICTIMESYNCFLAG_SYNC)' branch and hv_set_host_time(). While we could've solved this by adding a check like 'if (ts_srv_version > TS_VERSION_3)' to hv_set_host_time() I prefer to do some refactoring. We don't need to have two separate containers for host samples, struct host_ts which we use for PTP is enough. Throw away 'struct adj_time_work' and create hv_get_adj_host_time() accessor to host_ts to avoid code duplication. Fixes: 3716a49a81ba ("hv_utils: implement Hyper-V PTP source") Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 128 ++++++++++++++++++++++----------------------------- 1 file changed, 54 insertions(+), 74 deletions(-) commit 4f9bac039a64f6306b613a0d90e6b7e75d7ab0c4 Author: Vitaly Kuznetsov Date: Thu May 18 10:46:03 2017 -0700 hv_utils: drop .getcrosststamp() support from PTP driver Turns out that our implementation of .getcrosststamp() never actually worked. Hyper-V is sending time samples every 5 seconds and this is too much for get_device_system_crosststamp() as it's interpolation algorithm (which nobody is currently using in kernel, btw) accounts for a 'slow' device but we're not slow in Hyper-V, our time reference is too far away. .getcrosststamp() is not currently used, get_device_system_crosststamp() almost always returns -EINVAL and client falls back to using PTP_SYS_OFFSET so this patch doesn't change much. I also tried doing interpolation manually (e.g. the same way hv_ptp_gettime() works and it turns out that we're getting even lower quality: PTP_SYS_OFFSET_PRECISE with manual interpolation: * PHC0 0 3 37 4 -3974ns[-5338ns] +/- 977ns * PHC0 0 3 77 7 +2227ns[+3184ns] +/- 576ns * PHC0 0 3 177 10 +3060ns[+5220ns] +/- 548ns * PHC0 0 3 377 12 +3937ns[+4371ns] +/- 1414ns * PHC0 0 3 377 6 +764ns[+1240ns] +/- 1047ns * PHC0 0 3 377 7 -1210ns[-3731ns] +/- 479ns * PHC0 0 3 377 9 +153ns[-1019ns] +/- 406ns * PHC0 0 3 377 12 -872ns[-1793ns] +/- 443ns * PHC0 0 3 377 5 +701ns[+3599ns] +/- 426ns * PHC0 0 3 377 5 -923ns[ -375ns] +/- 1062ns PTP_SYS_OFFSET: * PHC0 0 3 7 5 +72ns[+8020ns] +/- 251ns * PHC0 0 3 17 5 -885ns[-3661ns] +/- 254ns * PHC0 0 3 37 6 -454ns[-5732ns] +/- 258ns * PHC0 0 3 77 10 +1183ns[+3754ns] +/- 164ns * PHC0 0 3 377 5 +579ns[+1137ns] +/- 110ns * PHC0 0 3 377 7 +501ns[+1064ns] +/- 96ns * PHC0 0 3 377 9 +1641ns[+3342ns] +/- 106ns * PHC0 0 3 377 8 -47ns[ +77ns] +/- 160ns * PHC0 0 3 377 5 +54ns[ +107ns] +/- 102ns * PHC0 0 3 377 8 -354ns[ -617ns] +/- 89ns This fact wasn't noticed during the initial testing of the PTP device somehow but got revealed now. Let's just drop .getcrosststamp() implementation for now as it doesn't seem to be suitable for us. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit e546d778d6bb3e1a80697a6556d870c707e6df82 Author: K. Y. Srinivasan Date: Thu May 18 10:46:02 2017 -0700 Drivers: hv: vmbus: Get the current time from the current clocksource The current code uses the MSR based mechanism to get the current tick. Use the current clock source as that might be more optimal. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/asm/mshyperv.h | 1 - drivers/hv/hv.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 7975bd4cca05a99aa14964cfa22366ee64da50ad Author: Dmitry Torokhov Date: Tue May 23 17:07:47 2017 -0700 firmware: vpd: remove platform driver There is no reason why VPD should register platform device and driver, given that we do not use their respective kobjects to attach attributes, nor do we need suspend/resume hooks, or any other features of device core. Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 44 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) commit dd246486f94694edb86e898a24a61ebf2f2fdba4 Author: Dmitry Torokhov Date: Tue May 23 17:07:46 2017 -0700 firmware: vpd: do not clear statically allocated data ro_vpd and rw_vpd are static module-scope variables that are guaranteed to be initialized with zeroes, there is no need for explicit memset(). Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 3 --- 1 file changed, 3 deletions(-) commit 9920a33e3573a207cd49895080e2806134e5e56f Author: Dmitry Torokhov Date: Tue May 23 17:07:45 2017 -0700 firmware: vpd: use kasprintf() when forming name of 'raw' attribute When creating name for the "raw" attribute, let's switch to using kaspeintf() instead of doing it by hand. Also make sure we handle errors. Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 3eec6a1c0cf31b982cad560c16e19fdb1851ae91 Author: Dmitry Torokhov Date: Tue May 23 17:07:42 2017 -0700 firmware: vpd: use kdtrndup when copying section key Instead of open-coding kstrndup with kzalloc + memcpy, let's use the helper. Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 40fbb23881291bb57e4e25e859de8e2287426dac Author: Julius Werner Date: Tue May 23 16:48:17 2017 -0700 firmware: google: memconsole: Prevent overrun attack on coreboot console The recent coreboot memory console update (firmware: google: memconsole: Adapt to new coreboot ring buffer format) introduced a small security issue in the driver: The new driver implementation parses the memory console structure again on every access. This is intentional so that additional lines added concurrently by runtime firmware can be read out. However, if an attacker can write to the structure, they could increase the size value to a point where the driver would read potentially sensitive memory areas from outside the original console buffer during the next access. This can be done through /dev/mem, since the console buffer usually resides in firmware-reserved memory that is not covered by STRICT_DEVMEM. This patch resolves that problem by reading the buffer's size value only once during boot (where we can still trust the structure). Other parts of the structure can still be modified at runtime, but the driver's bounds checks make sure that it will never read outside the buffer. Fixes: a5061d028 ("firmware: google: memconsole: Adapt to new coreboot ring buffer format") Signed-off-by: Julius Werner Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/memconsole-coreboot.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6265539776a0810b7ce6398c27866ddb9c6bd154 Author: Adrian Salido Date: Tue Apr 25 16:55:26 2017 -0700 driver core: platform: fix race condition with driver_override The driver_override implementation is susceptible to race condition when different threads are reading vs storing a different driver override. Add locking to avoid race condition. Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'driver_override'") Cc: stable@vger.kernel.org Signed-off-by: Adrian Salido Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit d14e3a201f06c85527e176f7ebfd967b405b6185 Author: Qiuxu Zhuo Date: Tue May 23 08:09:34 2017 +0800 EDAC, sb_edac: Bump driver version and do some cleanups Collapse 'case:' in *_mci_bind_devs() and update driver version from 1.1.1 to 1.1.2. Signed-off-by: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20170523000934.87971-1-qiuxu.zhuo@intel.com Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 65 ++++++++++++++++---------------------------------- 1 file changed, 21 insertions(+), 44 deletions(-) commit 4d475dde79b561bbd843d7deb7100f9e75596487 Author: Qiuxu Zhuo Date: Thu May 25 14:46:53 2017 +0200 EDAC, sb_edac: Check if ECC enabled when at least one DIMM is present This is based on previous work by Patrick Geary, see Link. Additional cleanups ontop: - Remove the code to read MCMTR from pci_ha1_ta and CHN_TO_HA macro, now that TA0 and TA1 are unified. - Remove get_pdev_same_bus(), since in get_dimm_config() the variable "pvt->pci_ta" for KNL is also ready, we can simply use pci_read_config_dword(pvt->pci_ta, KNL_MCMTR, &pvt->info.mcmtr) to read MCMTR. Signed-off-by: Qiuxu Zhuo Cc: linux-edac Link: https://lkml.kernel.org/r/57884350.1030401@supermicro.com Link: http://lkml.kernel.org/r/20170523000910.87925-1-qiuxu.zhuo@intel.com [ Make __populate_dimms() return int. ] Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 103 +++++++++---------------------------------------- 1 file changed, 18 insertions(+), 85 deletions(-) commit 3286d3eb906cbac832884dda8ce2fdc7acb17a65 Author: Qiuxu Zhuo Date: Tue May 23 08:08:34 2017 +0800 EDAC, sb_edac: Drop NUM_CHANNELS from 8 back to 4 We don't need this quirk anymore now that the EDAC memory controller representation matches the hardware. Signed-off-by: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20170523000834.87881-1-qiuxu.zhuo@intel.com [ Commit message. ] Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6696522957a192130dc42d80ea34796ec7ba0c2b Author: Borislav Petkov Date: Thu May 25 13:20:28 2017 +0200 EDAC, sb_edac: Carve out dimm-populating loop ... to slim down get_dimm_config(). No functionality change. Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 124 ++++++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 58 deletions(-) commit 199389acd95b8a8858e98244b72ea2970bc482ff Author: Borislav Petkov Date: Thu May 25 13:00:05 2017 +0200 EDAC, sb_edac: Fix mod_name It is called "sb_edac.c" now. Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2f747b1f42a2f6b0cf5416be1684c1b94a42f0f Author: Qiuxu Zhuo Date: Tue May 23 08:07:31 2017 +0800 EDAC, sb_edac: Assign EDAC memory controller per h/w controller Tony pointed out: "currently the driver pretends there is one big 8-channel memory controller per socket instead of 2 4-channel controllers. This is fine with all memory controller populated with symmetrical DIMM configurations, but runs into difficulties on asymmetrical setups". Restructure the driver to assign an EDAC memory controller to each real h/w memory controller to resolve the issue. Signed-off-by: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20170523000731.87793-1-qiuxu.zhuo@intel.com [ Break some lines at convenient points. ] Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 168 ++++++++++++++++++++++++------------------------- 1 file changed, 84 insertions(+), 84 deletions(-) commit 7f7c3cde613d15bbd6179dc56a96c2de5d0b51c8 Author: Gustavo A. R. Silva Date: Fri May 19 03:22:41 2017 -0500 uwb: i1480: add missing goto Add missing goto. Addresses-Coverity-ID: 1226913 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/uwb/i1480/dfu/phy.c | 1 + 1 file changed, 1 insertion(+) commit 9b4632ef3ff2097495e3724e7c4c1a307cbcfce4 Author: Masahiro Yamada Date: Sun May 21 02:05:31 2017 +0900 usb: mtu3: cleanup with list_first_entry_or_null() The combo of list_empty() and list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 4642d34a439f80e16af0d56ed6258a33abae257a Author: Benjamin Herrenschmidt Date: Tue May 23 10:44:05 2017 +1000 usb/uhci: Add support for Aspeed BMC SoCs The Aspeed 2400/2500 families have a variant of UHCI which requires some quirks to the driver to work: - The register offsets are different. We add a remapping helper. - All accesses have to be done via 32-bit loads and stores. We force all accessors to use readl/writel. This is of no consequence for reads as we never read "in the middle" of a register. For writes it also works fine as the registers only actually implement the bits we try to write (16-bit for the registers accessed with writew and 8-bit for the register accessed with writeb), so always using a 32-bit write will have no negative effect. We never do partial writes. - The resume detect interrupt is broken - The number of ports is (optionally) provided via the device-tree Signed-off-by: Benjamin Herrenschmidt Acked-by: Alan Stern -- v2. Remove the bulk of the #ifdef's drivers/usb/host/Kconfig | 6 ++++- drivers/usb/host/uhci-hcd.c | 17 +++++++++++--- drivers/usb/host/uhci-hcd.h | 51 ++++++++++++++++++++++++++++++++++++++++ drivers/usb/host/uhci-platform.c | 22 ++++++++++++++++- 4 files changed, 91 insertions(+), 5 deletions(-) Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Kconfig | 6 ++++- drivers/usb/host/uhci-hcd.c | 17 +++++++++++--- drivers/usb/host/uhci-hcd.h | 51 ++++++++++++++++++++++++++++++++++++++++ drivers/usb/host/uhci-platform.c | 22 ++++++++++++++++- 4 files changed, 91 insertions(+), 5 deletions(-) commit 0ef34ad6222abfa513117515fec720c33a58f105 Author: Jon Bloomfield Date: Wed May 24 08:54:11 2017 -0700 drm/i915: Serialize GTT/Aperture accesses on BXT BXT has a H/W issue with IOMMU which can lead to system hangs when Aperture accesses are queued within the GAM behind GTT Accesses. This patch avoids the condition by wrapping all GTT updates in stop_machine and using a flushing read prior to restarting the machine. The stop_machine guarantees no new Aperture accesses can begin while the PTE writes are being emmitted. The flushing read ensures that any following Aperture accesses cannot begin until the PTE writes have been cleared out of the GAM's fifo. Only FOLLOWING Aperture accesses need to be separated from in flight PTE updates. PTE Writes may follow tightly behind already in flight Aperture accesses, so no flushing read is required at the start of a PTE update sequence. This issue was reproduced by running igt/gem_readwrite and igt/gem_render_copy simultaneously from different processes, each in a tight loop, with INTEL_IOMMU enabled. This patch was originally published as: drm/i915: Serialize GTT Updates on BXT v2: Move bxt/iommu detection into static function Remove #ifdef CONFIG_INTEL_IOMMU protection Make function names more reflective of purpose Move flushing read into static function v3: Tidy up for checkpatch.pl Testcase: igt/gem_concurrent_blit Signed-off-by: Jon Bloomfield Cc: John Harrison Cc: Chris Wilson Cc: Daniel Vetter Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1495641251-30022-1-git-send-email-jon.bloomfield@intel.com Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 10 ++++ drivers/gpu/drm/i915/i915_gem_gtt.c | 103 ++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) commit de9aa5308247160950a3ab6420de79014a040699 Author: Andreas Färber Date: Thu Feb 23 16:43:23 2017 +0100 MAINTAINERS: Add Realtek section Add myself as maintainer. Signed-off-by: Andreas Färber MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 1b0d665eb7e3f7aa8f031f1be2dadf3f4b6e0068 Author: Andreas Färber Date: Mon Feb 13 19:45:05 2017 +0100 ARM64: Prepare Realtek RTD1295 Add a Kconfig option ARCH_REALTEK. Acked-by: Arnd Bergmann Signed-off-by: Andreas Färber arch/arm64/Kconfig.platforms | 6 ++++++ 1 file changed, 6 insertions(+) commit 72a7786c0a0d6554b1d2bd3c6a0c3589d4904fb3 Author: Andreas Färber Date: Sat Jan 21 02:18:34 2017 +0100 ARM64: dts: Add Realtek RTD1295 and Zidoo X9S Add initial device trees for the RTD1295 SoC and the Zidoo X9S TV box. The CPUs lack the enable-method property because the vendor device tree uses a custom "rtk-spin-table" method and "psci" did not appear to work. The UARTs lack the interrupts properties because the vendor device tree connects them to a custom interrupt controller. earlycon works without. A list of memory reservations is adopted from v1.2.11 vendor device tree: 0x02200000 can be used for an initrd, 0x01b00000 is audio-related; ion-related 0x02600000, 0x02c00000 and 0x11000000 are left out; 0x10000000 is used for sharing the U-Boot environment; others remain to be investigated. Acked-by: Arnd Bergmann Reviewed-by: Rob Herring Signed-off-by: Andreas Färber arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/realtek/Makefile | 5 + arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts | 42 +++++++ arch/arm64/boot/dts/realtek/rtd1295.dtsi | 131 ++++++++++++++++++++++ 4 files changed, 179 insertions(+) commit 12cc8ad2d1f04705e1ef1c62589ee98b12e59457 Author: Andreas Färber Date: Mon Feb 13 13:46:39 2017 +0100 dt-bindings: arm: Add Realtek RTD1295 bindings The Zidoo X9S and a few other recent TV boxes feature the Realtek RTD1295, a quad-core ARM Cortex-A53 SoC. Acked-by: Arnd Bergmann Acked-by: Roc He Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/arm/realtek.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 06a3067e93bf98a59eea5f3824b33b04c09c36ef Author: Andreas Färber Date: Mon Feb 13 13:23:35 2017 +0100 dt-bindings: Add vendor prefix for Zidoo Zidoo is a Chinese manufacturer of TV boxes. Acked-by: Arnd Bergmann Acked-by: Rob Herring Acked-by: Roc He Signed-off-by: Andreas Färber Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 7fd562b75d7752ed50c61d65f27b558cd93a359b Author: Tony Luck Date: Tue May 23 08:06:03 2017 +0800 EDAC, sb_edac: Don't use "Socket#" in the memory controller name EDAC assigns logical memory controller numbers in the order that we find memory controllers, which depends on which PCI bus they are on. Some systems end up with MC0 on socket0, others (e.g Haswell) have MC0 on socket3. All this is made more confusing for users because we use the string "Socket" while generating names for memory controllers, but the number that we attach there is the memory controller number. E.g. EDAC MC0: Giving out device to module sbridge_edac.c controller Haswell Socket#0: DEV 0000:ff:12.0 (INTERRUPT) Change the names to say "SrcID#%d" (where the number we use is read from the h/w associated with the memory controller instead of some logical number internal to the EDAC driver). New message: EDAC MC0: Giving out device to module sbridge_edac.c controller Haswell SrcID#3: DEV 0000:ff:12.0 (INTERRUPT) Reported-by: Andrey Korolyov Reported-by: Patrick Geary Signed-off-by: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170523000603.87748-1-qiuxu.zhuo@intel.com Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 54 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 19 deletions(-) commit 00cf50d90a99fac96644078f40c88a7ad43fb71c Author: Qiuxu Zhuo Date: Tue May 23 08:05:33 2017 +0800 EDAC, sb_edac: Classify PCI-IDs by topology Each of the PCI device IDs belongs to a CPU socket, or to one of the integrated memory controllers. Provide an enum to specify the domain of each, and distinguish the resource number in each domain: the number of the PCI device IDs per integrated memory controller/socket, and the number of integrated memory controllers per socket. Signed-off-by: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20170523000533.87704-1-qiuxu.zhuo@intel.com [ Realign pci_dev_descr_knl members. ] Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 235 +++++++++++++++++++++++++------------------------ 1 file changed, 121 insertions(+), 114 deletions(-) commit 8b7be72b1fe93fe78f325312a9ece12b9531efeb Author: Fabio Estevam Date: Tue May 23 12:32:44 2017 -0300 ARM: dts: tx6: Remove 'enable-active-low' property Property 'enable-active-low' does not exist. Only 'enable-active-high' is valid, and when this property is absent the gpio regulator will act as active low by default. So remove the unexisting 'enable-active-low' property. Currently the GPIO flag is GPIO_ACTIVE_HIGH. In order to make the dts description accurate, pass the GPIO_ACTIVE_LOW flag instead. This change is safe because the gpio regulator driver does not take the GPIO flag polarity into account. Signed-off-by: Fabio Estevam Acked-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-tx6.dtsi | 3 +-- arch/arm/boot/dts/imx6ul-tx6ul.dtsi | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 71ba49902d35d025b3810d6f19028eff624c67a7 Author: Fabio Estevam Date: Tue May 23 12:32:43 2017 -0300 ARM: dts: imx23-sansa: Remove 'enable-active-low' property Property 'enable-active-low' does not exist. Only 'enable-active-high' is valid, and when this property is absent the gpio regulator will act as active low by default. So remove the unexisting 'enable-active-low' property. Currently the GPIO flag is 0, which means active-high. In order to make the dts description accurate, pass the GPIO_ACTIVE_LOW flag instead. This change is safe because the gpio regulator driver does not take the GPIO flag polarity into account. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx23-sansa.dts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit bdc111bd50cc1378e113647dc251689636986d84 Author: Fabio Estevam Date: Tue May 23 12:16:09 2017 -0300 ARM: dts: imx7d-pico: Pass 'no-1-8-v' property to the eMMC Currently the following eMMC error is seen: mmc1: mmc_select_hs200 failed, error -74 On imx7d-pico the eMMC VCCQ is fixed at 3.15V, so pass the 'no-1-8-v' property to properly describe that 1.8V operation is not possible. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-pico.dts | 1 + 1 file changed, 1 insertion(+) commit d1ceec2a8f6ab1b35c296c3339127adca1ace30b Author: Fabio Estevam Date: Tue May 23 12:16:08 2017 -0300 ARM: dts: imx7d-pico: Add watchdog support imx7d-pico has the WDOG1_B pin connected to the PMIC, so add the wdog1 node and use the 'fsl,ext-reset-output' property to properly describe it. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-pico.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f218868b9dc80c5d919dde9655853c90b34bffc8 Author: Javier Martinez Canillas Date: Tue May 23 15:34:42 2017 +0200 arm64: dts: ls1043a: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 30dd9fb924efccfa080e5cba9cd6c2e1ebbd1822 Author: Javier Martinez Canillas Date: Tue May 23 15:34:34 2017 +0200 ARM: dts: imx: Add generic compatible string for I2C EEPROM The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas Signed-off-by: Shawn Guo arch/arm/boot/dts/imx27-phytec-phycard-s-som.dtsi | 2 +- arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi | 2 +- arch/arm/boot/dts/imx28-evk.dts | 2 +- arch/arm/boot/dts/imx53-tqma53.dtsi | 2 +- arch/arm/boot/dts/imx6q-cm-fx6.dts | 2 +- arch/arm/boot/dts/imx6q-utilite-pro.dts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit bed8c926d17529c7c0ae14a509db1957d7710c8b Author: Masahiro Yamada Date: Wed May 24 14:02:42 2017 +0900 ARM: dts: imx6: use #include "..." to include local DT Most of DT files in ARM use #include "..." to make pre-processor include DT in the same directory, but we have some exceptional files that use #include <...> for that. Fix them to remove -I$(srctree)/arch/$(SRCARCH)/boot/dts path from dtc_cpp_flags. Signed-off-by: Masahiro Yamada Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-zii-rdu2.dts | 4 ++-- arch/arm/boot/dts/imx6qp-zii-rdu2.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 98990faef16ea3109d850f5bf49977897e509e54 Author: Lyude Date: Fri May 19 19:48:39 2017 -0400 drm/radeon: Cleanup pageflipping IRQ handling for evergreen, si Same as the previous patch, but for pageflipping now. This also lets us clear up the copy paste for vblank/vline IRQs. Changes since v1: - Preserve the order all registers are written back Acked-by: Christian König Signed-off-by: Lyude Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/evergreen.c | 105 ++++++++--------------------------- drivers/gpu/drm/radeon/radeon.h | 7 +-- drivers/gpu/drm/radeon/si.c | 111 +++++++++---------------------------- 3 files changed, 51 insertions(+), 172 deletions(-) commit 5cc4e5fc293bfe2634535f544427e8c6061492a5 Author: Lyude Date: Fri May 19 19:48:38 2017 -0400 drm/radeon: Cleanup HDMI audio interrupt handling for evergreen Same as the previous patch, but now for handling HDMI audio interrupts. Changes since v1: - Preserve the order we write back all registers Acked-by: Christian König Signed-off-by: Lyude Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/evergreen.c | 153 +++++++------------------------------ drivers/gpu/drm/radeon/radeon.h | 7 +- 2 files changed, 27 insertions(+), 133 deletions(-) commit 4cd096dde950c878e044211f1e7bac384b1588f5 Author: Lyude Date: Fri May 19 19:48:37 2017 -0400 drm/radeon: Cleanup display interrupt handling for evergreen, si The current code here is really, really bad. A huge amount of it looks to be copy pasted, it has some weird hatred of arrays and code sharing, switch cases everywhere for things that really don't need them, and it makes the file seem immensely more complex then it actually is. This is a pain for maintanence, and is vulnerable to more weird irq handling bugs. So, let's start cleaning this up a bit. Modify all of the IRQ handlers for evergreen/si so that they just use for loops. As well, we add a helper function radeon_irq_kms_set_irq_n_enabled(), whose purpose is just to update the state of registers that enable/disable interrupts while printing any changes to the set of enabled interrupts to the kernel log. Note in this commit, since vblank/vline irq acking is intertwined with page flip irq acking, we can't cut out all of the copy paste in evergreen/si_irq_ack() just yet. Changes since v1: - Preserve order we write back all registers Acked-by: Christian König Signed-off-by: Lyude Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/evergreen.c | 729 +++++++------------------------- drivers/gpu/drm/radeon/radeon.h | 13 +- drivers/gpu/drm/radeon/radeon_irq_kms.c | 35 ++ drivers/gpu/drm/radeon/si.c | 596 ++++++-------------------- 4 files changed, 314 insertions(+), 1059 deletions(-) commit e30a52232cbb6f883056aec06abf00cd917c83e8 Author: Alex Deucher Date: Mon Apr 17 17:51:00 2017 -0400 drm/amdgpu/gfx9: Switch baremetal to use KIQ for compute ring management. (v4) KIQ is the Kernel Interface Queue for managing the MEC. Rather than setting up rings via direct MMIO of ring registers, the rings are configured via special packets sent to the KIQ. The allows the MEC to better manage shared resources and certain power events. It also reduces the code paths in the driver to support and is required for MEC powergating. v2: drop gfx_v9_0_cp_compute_fini() as well v3: rebase on latest changes derived from gfx8, add unmap queues on hw_fini v4: fix copy/paste typo in error message (Rex) Acked-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 374 ++++++++-------------------------- 1 file changed, 81 insertions(+), 293 deletions(-) commit ba0c19f5f000d49efc98c0a4dafbd7266a5a20bc Author: Alex Deucher Date: Mon Apr 17 17:24:47 2017 -0400 drm/amdgpu/gfx9: fix resume of KIQ and KCQs (v2) No need to reset the wptr and clear the rings. The UNMAP_QUEUES packet writes the current MQD state back the MQD on suspend, so there is no need to reset it as well. v2: fix from gfx8 (Rex) Acked-by: Tom St Denis Acked-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 0f1dfd520fdf66cee6bbb5a15f2c2363f3132421 Author: Alex Deucher Date: Mon Apr 17 17:10:11 2017 -0400 drm/amdgpu/gfx9: move SET_RESOURCES into the same command stream As the KCQ setup. This way we only have to wait once for the entire MEC. Acked-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 73 +++++++---------------------------- 1 file changed, 14 insertions(+), 59 deletions(-) commit bd3402ea8798d8397192a573f6076755d9fa4b2c Author: Alex Deucher Date: Mon Apr 17 17:05:02 2017 -0400 drm/amdgpu/gfx9: wait once for all KCQs to be created Rather than waiting for each queue. Acked-by: Tom St Denis Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 60 +++++++++++++++++------------------ 1 file changed, 29 insertions(+), 31 deletions(-) commit 898b7893e43ea47f4953bf61bd57802c33337c11 Author: Alex Deucher Date: Mon Apr 17 16:39:13 2017 -0400 drm/amdgpu: split gfx_v9_0_kiq_init_queue into two One for KIQ and one for the KCQ. This simplifies the logic and allows for future optimizations. Acked-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 63 +++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 21 deletions(-) commit b5ab16bf64347ebc9dbdc51a4f603511babda1e6 Author: Alex Deucher Date: Thu May 11 19:09:49 2017 -0400 drm/amdgpu: properly byteswap gpu_info firmware It's stored in LE format. Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit cd70f3d6e3fa816d516a22347292c4eda07cf8ee Author: Rex Zhu Date: Fri Apr 21 14:02:10 2017 +0800 drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 131 +++++++++++-------------- 1 file changed, 57 insertions(+), 74 deletions(-) commit 8f5508617b1356fafa8ba2960d7748ddbbc89964 Author: Rex Zhu Date: Fri Apr 21 13:15:05 2017 +0800 drm/amd/powerplay: add function set_clock_limit for Rv. Sets floors for various clocks depending on current requirements. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 58 +++++++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h | 6 +++ 2 files changed, 62 insertions(+), 2 deletions(-) commit 96cda84a6762a8caa9aee9381022e28adb3ea1ef Author: Rex Zhu Date: Fri Apr 21 13:14:01 2017 +0800 drm/amd/powerplay: add new clock type in struct gfx_arbit. Add the new clock type to the gfx arbitor so we can determine the proper clock floors for it. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 +++ 1 file changed, 3 insertions(+) commit 746eb864a2bbce4b5265d6b3a6a4d18361b2ad6f Author: Rex Zhu Date: Fri Apr 21 14:01:30 2017 +0800 drm/amd/powerplay: add new clock type for Rv New clock type on RV. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5140a749a20b601de2c692316751d9caf07e7ade Author: Rex Zhu Date: Fri Apr 21 10:32:09 2017 +0800 drm/amd/powerplay: print msg id when smu failed. Print the failed msg when it fails. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit e5432ebd0d51b65231a0761573f94c26c45a0ead Author: Rex Zhu Date: Fri Apr 21 15:04:07 2017 +0800 drm/amd/powerplay: add new smu message for Rv Add additional smu messages. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 781e263bffe7f4e7838acad630291b90b09c8614 Author: Rex Zhu Date: Tue May 23 13:16:09 2017 +0800 drm/amd/powerplay: delete duplicated code in vega10_hwmgr.c Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 5 ----- 1 file changed, 5 deletions(-) commit 68e2c5ffeb164f069692d00659d24dbda31178bc Author: Marek Olšák Date: Wed May 17 20:05:08 2017 +0200 drm/amdgpu: add an INFO query for monitoring VRAM CPU page faults v2: bump the DRM version Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 + include/uapi/drm/amdgpu_drm.h | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) commit 9156e723301c0a7a7def4cde820e018ce791b842 Author: Tom St Denis Date: Tue May 23 11:35:22 2017 -0400 drm/amd/amdgpu: Return error if initiating read out of range on vram If you initiate a read that is out of the VRAM address space return ENXIO instead of 0. Reads that begin below that point will read upto the VRAM limit as before. Cc: stable@vger.kernel.org Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +++ 1 file changed, 3 insertions(+) commit e7f78b69aba479728865ef3ec4229b372fc79f94 Author: Felix Kuehling Date: Thu Apr 20 14:41:34 2017 -0400 drm/radeon: Add module param to control CIK support If AMDGPU supports CIK, add a module parameter to control CIK support in radeon. It's off by default in radeon, while it will be on by default in AMDGPU. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Acked-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon.h | 4 ++++ drivers/gpu/drm/radeon/radeon_drv.c | 6 ++++++ drivers/gpu/drm/radeon/radeon_kms.c | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+) commit 9c2e1ae3ae2fe4759359d76f1e639e0eb4f79030 Author: Tom St Denis Date: Mon May 15 14:22:39 2017 -0400 drm/amd/amdgpu: Clean up gmc6 wait_for_idle Signed-off-by: Tom St Denis Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit c990b718f98087fab16de2fa0090547c88217f92 Author: Tom St Denis Date: Mon May 15 10:46:17 2017 -0400 drm/amd/amdgpu: Tidy up static int dce_v6_0_get_num_crtc() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit e44143e31c1ce8322a3bc284804c593fdbffca07 Author: Tom St Denis Date: Mon May 15 09:23:25 2017 -0400 drm/amd/amdgpu: Drop commented out stub function Drop the function gmc_v6_0_init_compute_vmid() since it wasn't implemented and commented out. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 5 ----- 1 file changed, 5 deletions(-) commit 2de3aac91bff3076bd15222b13ff43742458cb12 Author: Tom St Denis Date: Mon May 15 09:22:05 2017 -0400 drm/amd/amdgpu: Tidy up of gfx_v6_0_setup_rb() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5a7bfded780db20d0b7201544016970b3ad89017 Author: Tom St Denis Date: Mon May 15 09:19:48 2017 -0400 drm/amd/amdgpu: gfx6 tidy up raster config Clean up coding style in gfx_v6_0_write_harvested_raster_configs() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 167327d6e73d9b948d5b0283a3082e452dd4d034 Author: Tom St Denis Date: Mon May 15 08:27:06 2017 -0400 drm/amd/amdgpu: Clean up GFX6 tilemode programming Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 1556 ++++++++++++++------------------- 1 file changed, 676 insertions(+), 880 deletions(-) commit f5f3b16aae4ace99c330e54afe87f32aad3932dc Author: Christian König Date: Mon May 22 13:22:34 2017 +0200 drm/amdgpu: fix merge of vcn_v1_0.c v2 That line got missed during the merge. v2: fix vcn_v1_0_enc_ring_emit_vm_flush as well Signed-off-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 9a94f5a593c05c08ee309a55f618973427c5e074 Author: Christian König Date: Fri May 12 14:46:23 2017 +0200 drm/amdgpu: move adjust adjust_mc_addr into the GFX9 vm_flush functions That GFX9 needs a PDE in the registers is entirely GFX9 specific. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) commit 60bfcd313ce4fab84756fc10f4565a0cd4a737b4 Author: Christian König Date: Wed May 10 14:26:09 2017 +0200 drm/amdgpu: change default of amdgpu_vram_page_split to 512 512 is enough for one PD entry on Vega10. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de37e68a3dc6d526a5e42c393433eb66ac23cee4 Author: Flora Cui Date: Thu May 18 13:56:22 2017 +0800 drm/amdgpu: fix ocl test performance drop partial revert commit <6971d3d> - drm/amdgpu: cleanup logic in amdgpu_vm_flush Signed-off-by: Flora Cui Reviewed-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 78cb9083d91b5183b06809c3fc491932a89ba41f Author: Yintian Tao Date: Fri May 12 14:55:56 2017 +0800 drm/amdgpu/sdma3: correct wptr initialization for sdma If doorbell is used for wptr update, we also need to use it to initialize wptr to 0. Signed-off-by: Yintian Tao Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 05ec3eda8b213ccc7df9645119c06f4d34a6fe2c Author: Christian König Date: Thu May 11 16:21:20 2017 +0200 drm/amdgpu: cleanup VM manager init/fini VM is mandatory for all hw amdgpu supports. So remove the leftovers to make it optionally. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 - drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 59 ++++++++---------------- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 82 ++++++++------------------------- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 82 ++++++++------------------------- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 80 ++++++++------------------------ 6 files changed, 78 insertions(+), 230 deletions(-) commit a340c7bcf1ea01f8bee82d62b521f0c5e4653425 Author: Chunming Zhou Date: Thu May 18 15:19:03 2017 +0800 drm/amdgpu: add dep_sync for amdgpu job The fence in dep_sync cannot be optimized. Signed-off-by: Chunming Zhou Tested and Reviewed-by: Roger.He Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) commit f8af933206e22d756510271b1501202ba1e3aafd Author: Ken Wang Date: Thu May 18 13:33:54 2017 +0800 drm/amdgpu/gfx9: update golden settings Update gfx9 golden settings. Signed-off-by: Ken Wang Acked-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 15d73ce6f948fab3fabcea9a3093a93778856c98 Author: Chunming Zhou Date: Tue May 16 14:34:27 2017 +0800 drm/amdgpu: skip all jobs of guilty vm If the vm is guilty of a GPU reset, skips all its jobs. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit f1892138abcb6d58359189f3b0a6c95f10613513 Author: Chunming Zhou Date: Mon May 15 16:48:27 2017 +0800 drm/amdgpu: return -ENODEV to user space when vram is lost v2 below ioctl will return -ENODEV: amdgpu_cs_ioctl amdgpu_cs_wait_ioctl amdgpu_cs_wait_fences_ioctl amdgpu_gem_va_ioctl amdgpu_info_ioctl v2: only for map and replace cases in amdgpu_gem_va_ioctl Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 ++++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) commit 0c49e0b8a43c8addb0498cd32390f4ef08b5dd27 Author: Chunming Zhou Date: Mon May 15 14:20:00 2017 +0800 drm/amdgpu: check if vram is lost v2 backup first 64 byte of gart table as reset magic, check if magic is same after gpu hw reset. v2: use memcmp instead of manual innovation. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) commit e0ec45063609b4a583e7f4d843275888f2480321 Author: Felix Kuehling Date: Mon May 15 04:08:28 2017 -0400 drm/amd/powerplay: Fix Vega10 power profile switching Clock index 0 is a valid index that is needed to restore the default graphics power profile. Use ~0 to indicate a failure to find a clock index. This fixes the clocks getting stuck in the compute power profile after running a compute application on Vega10. Signed-off-by: Felix Kuehling Signed-off-by: Eric Huang Reviewed-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2d2e5e7e530722bc5815e5c646c5d5ec7479d55c Author: Alex Deucher Date: Tue May 9 12:27:35 2017 -0400 drm/amdgpu: add raven gpu_info support Add support for parsing the gpu info table on raven. This is required to get the gpu config data for raven. Signed-off-by: Alex Deucher Signed-off-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit fbf09b693579ca92a806e6dde83f6abb4832fc70 Author: Hawking Zhang Date: Mon May 15 18:08:18 2017 +0800 drm/amdgpu: correct emit frame size for vcn dec/enc ring only mmhub will be invalidated during vcn dec/enc vm flush Signed-off-by: Hawking Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04e5f2a63547d8d9eb4a7eda371a9252e779976b Author: Hawking Zhang Date: Mon May 15 17:03:02 2017 +0800 drm/amdgpu: correct vmhub for vcn dec/enc ring This got missed due to differences in the trees when raven support was merged. Signed-off-by: Hawking Zhang Reviewed-by: ken wang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 6dbaf8b913f2976ee776beb7c8bb0c52c7066ced Author: Takashi Sakamoto Date: Tue May 23 22:40:42 2017 +0900 ALSA: sb: remove needless evaluation in implementation for copy callback In design of ALSA pcm core, 'struct snd_pcm_ops.copy' is expected to copy PCM frames, according to frame alignment on intermediate buffer for userspace and dedicated buffer for data transmission. In this callback, value of 'channel' argument depends on the frame alignment, which drivers registers to runtime of PCM substream. When target devices can handle non-interleaved buffer, this value has positive value, otherwise negative. ALSA driver for PCM component of EMU8000 chip is programmed with local macro to switch the frame alignment. The 'copy' operation in non-interleaved side has evaluation of the 'channel' argument (actually it's 'voice' argument). This is useless. This commit remove the evaluation. [tiwai: the negative channel argument was the inheritance from the old code where -1 was meant for interleaved mode. The mix-up was dropped meanwhile, thus it's correct to assume that we receive no longer -1 there, and it's safe to cleanup the relevant code. Also, voice=0 for channel==1 is trivial, and it can be dropped, too.] Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/isa/sb/emu8000_pcm.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) commit 097a7fe369421347405d448a5ee1d37087cad4ad Author: Takashi Sakamoto Date: Tue May 23 22:40:20 2017 +0900 ALSA: gus: remove unused local flag ALSA driver series for devices of Gravis Ultra Sound includes local variable 'snd_gf1_pcm_use_dma'. Although this is a flag to change behaviours of local implementations for 'struct snd_pcm_ops.copy' and 'struct snd_pcm_ops.silence', it's invariable during module lifetime. This commit removes this local variable and the relevant operations. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/isa/gus/gus_pcm.c | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) commit c651fd7c116b7438730b9ea8c154a29ca77f88d1 Author: kbuild test robot Date: Thu May 11 09:30:28 2017 +0800 drm/amd/powerplay: fix array_size.cocci warnings drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:75:42-43: WARNING: Use ARRAY_SIZE drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:466:22-23: WARNING: Use ARRAY_SIZE drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:468:22-23: WARNING: Use ARRAY_SIZE drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:470:20-21: WARNING: Use ARRAY_SIZE drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:473:22-23: WARNING: Use ARRAY_SIZE drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:475:21-22: WARNING: Use ARRAY_SIZE drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:477:21-22: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci CC: Rex Zhu Signed-off-by: Fengguang Wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 0dfafa225da5688287d1488c5e491178594d75c3 Author: Alex Deucher Date: Thu May 11 16:44:56 2017 -0400 drm/amdgpu/vcn: remove duplicate mask Looks like a copy past issue. Reported-by: Julia Lawall Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 - 1 file changed, 1 deletion(-) commit df515052edeb164c17854312a79f2754e93bfb33 Author: Chunming Zhou Date: Thu May 11 16:31:52 2017 -0400 drm/amdgpu: add RAVEN pci id (v2) Add the RAVEN pci id. v2: add exp flag for now (Alex) Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +++ 1 file changed, 3 insertions(+) commit a6ca5ac746d104019e76c29e69c2a1fc6dd2b29f Author: Andrey Grodzovsky Date: Wed Feb 1 10:12:19 2017 -0500 drm/amd: Add DCN ivsrcids (v2) v2: squash in some updates (Alex) Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/include/ivsrcid/irqsrcs_dcn_1_0.h | 1134 ++++++++++++++++++++ 1 file changed, 1134 insertions(+) commit 30db095f51e4a4cbec20e93e6f0e6eae98356a0b Author: Hawking Zhang Date: Thu May 11 16:30:31 2017 -0400 drm/amdgpu/powerplay/raven: add smu block and enable powerplay Add the ip block and enable powerplay on raven. Reviewed-by: Hawking Zhang Signed-off-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 2 files changed, 2 insertions(+) commit 380cc704398f9d11aed6c2b17ede6107a577608c Author: Alex Deucher Date: Tue Mar 14 17:57:35 2017 -0400 drm/amdgpu/raven: power up/down VCN via the SMU (v2) By default VCN is powered down like SDMA, power it up/down on driver load/unload. [Rui: Fix to add the parameter 0 to un-gate VCN] v2 Acked-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 401b58ceb598aca618c8df4ce99cb2a7100aa39b Author: Chunming Zhou Date: Fri Mar 10 14:48:09 2017 +0800 drm/amd/powerplay/rv: power up/down sdma via the SMU sdma is powered down by default in vbios, need to power up in driver init. Power it down again on driver tear down. Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit a960d61cbd62544c04adb4fe6513577601ff4535 Author: Rex Zhu Date: Thu May 11 16:38:38 2017 -0400 drm/amd/powerplay: add raven support in hwmgr. (v2) hwmgr handles the GPU power state management. v2: squash in updates (Alex) Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/eventmgr.c | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 9 + .../gpu/drm/amd/powerplay/hwmgr/processpptables.c | 4 + drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 974 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h | 295 +++++++ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 3 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 18 +- 8 files changed, 1291 insertions(+), 18 deletions(-) commit 4fa483e5b30bbc334d7335df95bcc5d8c062e9de Author: Rex Zhu Date: Mon Mar 6 19:10:08 2017 +0800 drm/amd/powerplay: add raven support in smumgr. (v2) smumgr provides the interface for interacting with the smu firmware which handles power management. v2: squash in updates (Alex) Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_inc.h | 43 +++ drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h | 76 +++++ drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 352 +++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 62 ++++ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 9 + 7 files changed, 544 insertions(+), 1 deletion(-) commit adfc7f077d9ac9aab6e4ac15e34ab84519d98b0d Author: Rex Zhu Date: Sun Feb 5 18:50:22 2017 +0800 drm/amd/powerplay: add ppt_v3 define defines clock dependencies for raven. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f4afe799cf1a3b5604d25f9bd1c984bd1b6d49bf Author: Rex Zhu Date: Sun Feb 5 14:53:36 2017 +0800 drm/amdgpu: add raven related define in pptable.h. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/pptable.h | 57 +++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 3 deletions(-) commit 07c5b4ed217139f2f96bf0021de7cb14ed5c941c Author: Rex Zhu Date: Sat Feb 4 14:24:02 2017 +0800 drm/amdgpu/powerplay: add header file for smu10. (v2) Headers define the driver/fw interface for smu10. v2: squash in updates (Alex) Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu10.h | 188 +++++++++++++++++++++ .../gpu/drm/amd/powerplay/inc/smu10_driver_if.h | 116 +++++++++++++ 2 files changed, 304 insertions(+) commit d2a33871b54cd4ec34e33e5560e34a6ef3a993bf Author: Huang Rui Date: Thu Apr 20 10:18:13 2017 +0800 drm/amdgpu: enable sw clock gating for vcn Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb4d56fa37240149a29041430a2d0e579e0c9a2e Author: Huang Rui Date: Thu Apr 20 09:42:41 2017 +0800 drm/amdgpu/vcn: add sw clock gating Add sw controlled clockgating for VCN. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 207 +++++++++++++++++++++++++++++++++- 1 file changed, 205 insertions(+), 2 deletions(-) commit 3b8f5ab331079595bc6e397a3d30dd1f2a306ab1 Author: Leo Liu Date: Thu Mar 30 12:00:25 2017 -0400 drm/amdgpu: update vcn decode create msg Based on new vcn firmware interface changes Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 62a9f37e4ceae83d4661d7c8bbba20e7bb02da45 Author: Leo Liu Date: Wed Mar 29 14:15:15 2017 -0400 drm/amdgpu: add vcn firmware header offset New firmware add psp header. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f93aa00c0bdc85ebd9ace72e34997cf4ba56e839 Author: Leo Liu Date: Tue Feb 21 11:24:09 2017 -0500 drm/amdgpu: get cs support for AMDGPU_HW_IP_VCN_ENC Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit cefbc5989f63d37a8cafc6ccf198d67075aa914b Author: Leo Liu Date: Tue Feb 21 11:23:28 2017 -0500 drm/amdgpu: add AMDGPU_HW_IP_VCN_ENC to info query Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 25547cfd262dc0621b0743aa78471a6c8a6b1e84 Author: Leo Liu Date: Mon May 8 17:31:31 2017 -0400 drm/amdgpu: add vcn enc ib test Update and enable the vcn encode IB test. Signed-off-by: Leo Liu Acked-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 84 +++++++++++++-------------------- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 + 2 files changed, 34 insertions(+), 51 deletions(-) commit c3bd304009dee48adbb2b6937b7f4a07c5e4e281 Author: Leo Liu Date: Tue Feb 21 10:38:42 2017 -0500 drm/amdgpu: enable vcn encode ring tests Wire up the callback and enable them. Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) commit 9b257116e784dafc83fd8094ed2bfc12d193d228 Author: Leo Liu Date: Tue Feb 21 15:19:18 2017 -0500 drm/amdgpu: add vcn enc irq support Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 8ace845ff0e8fc610686c0fa12ec05130fbf1f6b Author: Leo Liu Date: Tue Feb 21 10:36:15 2017 -0500 drm/amdgpu: add vcn enc ring type and functions Add the ring function callbacks for the encode rings. Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 8 ++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 170 +++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+), 1 deletion(-) commit 101c6fee53f6a73c0d044cf890cd8b1b07cf5801 Author: Leo Liu Date: Tue Feb 21 15:21:18 2017 -0500 drm/amdgpu: add vcn enc rings Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 28 +++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) commit 3639f7d855746406c1c1df81560b4d1d83e8c5a4 Author: Leo Liu Date: Wed Feb 15 10:16:25 2017 -0500 drm/amdgpu: change vcn dec rb command specific for decode Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit f2d7e7070896c43d80419a70e446226e3e134fe9 Author: Leo Liu Date: Wed Dec 28 13:36:00 2016 -0500 drm/amdgpu: add vcn ip block to soc15 Signed-off-by: Leo Liu Acked-by: Chunming Zhou Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 2 ++ 1 file changed, 2 insertions(+) commit 81439659f4b88a0224110dacbadbd0a41a346bbc Author: Leo Liu Date: Tue Feb 7 16:11:20 2017 -0500 drm/amdgpu: implement new vcn cache window programming Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit ef80d30b0266c44e31bca49abd5d80cbaa2acd3f Author: Leo Liu Date: Sun Feb 5 15:19:57 2017 -0500 drm/amdgpu: Disable uvd and vce free handles for raven Not required on raven. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fc739f82c5050ec9dc9a13cdcbc4ebb0dd590c37 Author: Leo Liu Date: Wed Jan 25 15:05:53 2017 -0500 drm/amdgpu: get cs support of AMDGPU_HW_IP_VCN_DEC Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +++ 1 file changed, 3 insertions(+) commit bdc799e5eee551f53c7beb01f89cccedc83f7824 Author: Leo Liu Date: Wed Jan 25 15:04:20 2017 -0500 drm/amdgpu: add AMDGPU_HW_IP_VCN_DEC to info query Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fcfc5a90628f69c08018c8ec7b3d6dca5a8a2203 Author: Leo Liu Date: Wed Feb 15 10:24:55 2017 -0500 uapi/drm: add AMDGPU_HW_IP_VCN_ENC for encode CS Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 66e236f180f0ab6b9b9efd9e7fdbfd9de98e333d Author: Leo Liu Date: Tue Feb 7 11:57:08 2017 -0500 uapi/drm: add AMDGPU_HW_IP_VCN_DEC for decode CS Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d8a425bf6edb7177e7dadecc78dcae75852ee9e Author: Leo Liu Date: Sun Feb 5 12:40:30 2017 -0500 drm/amdgpu/vcn: implement ib tests with new message buffer interface Signed-off-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 40 ++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit a4c424c5c633bfe381d16c4342777513dc5a91b4 Author: Leo Liu Date: Wed Jan 25 14:37:41 2017 -0500 drm/amdgpu: implement insert end ring function for vcn decode Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit e7501c34aa002e53f0128f685134eb550a74560d Author: Leo Liu Date: Tue Feb 7 11:52:00 2017 -0500 drm/amdgpu: implement vcn start RB command Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit ef44f8541e8e99f1040c0d1b147956e2c2f25d79 Author: Leo Liu Date: Thu May 11 16:29:08 2017 -0400 drm/amdgpu: add a ring func for vcn start command Needed for the proper command sequence for VCN. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + 2 files changed, 4 insertions(+) commit 7741cced67aed83d87152a601d58bfb16eda8301 Author: Leo Liu Date: Tue Feb 7 11:47:12 2017 -0500 drm/amdgpu: expose vcn RB command Signed-off-by: Leo Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 7 +++++++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) commit 8c303c019014afe5842bf4001b4d762f05b3a77e Author: Leo Liu Date: Mon Feb 6 11:52:46 2017 -0500 drm/amdgpu: move vcn ring test to amdgpu_vcn.c Hope it will be generic for vcn later Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 36 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 2 ++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 45 +-------------------------------- 3 files changed, 39 insertions(+), 44 deletions(-) commit 3e1086cf64669ea94106f9f505b8d964cf70f492 Author: Leo Liu Date: Mon Feb 6 10:52:46 2017 -0500 drm/amdgpu: re-group the functions in amdgpu_vcn.c Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 140 ++++++++++++++++---------------- 1 file changed, 70 insertions(+), 70 deletions(-) commit 95aa13f6b196d3b8e1c694638002c18c07cdccab Author: Leo Liu Date: Thu May 11 16:27:33 2017 -0400 drm/amdgpu: move amdgpu_vcn structure to vcn header Signed-off-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 26 +------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 25 deletions(-) commit 3ea975e4ff959e9a4fafa429ed2481f79ffecb90 Author: Leo Liu Date: Wed Dec 28 13:04:16 2016 -0500 drm/amdgpu: add vcn ip block and type Signed-off-by: Leo Liu Acked-by: Chunming Zhou Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.h | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/include/amd_shared.h | 3 ++- 3 files changed, 40 insertions(+), 1 deletion(-) commit a319f444bb86eb5bb9b896e0606e56e1392cfe38 Author: Leo Liu Date: Wed Dec 28 13:22:18 2016 -0500 drm/amdgpu: add vcn irq functions Signed-off-by: Leo Liu Acked-by: Chunming Zhou Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit cca69fe8ff98b6321765752e0e46d7470e870630 Author: Leo Liu Date: Fri May 5 11:40:59 2017 -0400 drm/amdgpu: add vcn decode ring type and functions Add the ring function callbacks for the decode ring. Signed-off-by: Leo Liu Acked-by: Chunming Zhou Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 266 +++++++++++++++++++++++++++++++ 2 files changed, 268 insertions(+), 1 deletion(-) commit a4bf608be5df37cff51c8a5feba7708ebad7e6f6 Author: Leo Liu Date: Wed Dec 28 12:16:48 2016 -0500 drm/amdgpu: add vcn decode ring support Add the decode ring init. Signed-off-by: Leo Liu Acked-by: Chunming Zhou Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 88b5af70e29edda095f3d26edcd376cb1688cf70 Author: Leo Liu Date: Wed Dec 28 11:57:38 2016 -0500 drm/amdgpu: add vcn ip block functions (v2) Fill in the core VCN 1.0 setup functionality. v2: squash in fixup (Alex) Signed-off-by: Leo Liu Acked-by: Chunming Zhou Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 3 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 417 +++++++++++++++++++++++++++++++++ 3 files changed, 421 insertions(+), 2 deletions(-) commit 2d531d81d0fb906ee74a5d5f8c04857849efa785 Author: Leo Liu Date: Wed Dec 21 13:56:44 2016 -0500 drm/amdgpu: add encode tests for vcn Add encode ring and ib tests. Signed-off-by: Leo Liu Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 203 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 + 2 files changed, 206 insertions(+) commit 95d0906f8506550a7c4a59c770732e7de912cffc Author: Leo Liu Date: Wed Dec 21 13:21:52 2016 -0500 drm/amdgpu: add initial vcn support and decode tests VCN is the new media block on Raven. Add core support and the ring and ib tests for decode. Signed-off-by: Leo Liu Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 4 + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 40 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 425 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 35 +++ 4 files changed, 500 insertions(+), 4 deletions(-) commit 9e2837f6aee2c1859041d901b8d6202f2ba85210 Author: Huang Rui Date: Thu May 11 16:26:16 2017 -0400 drm/amdgpu/soc15: add psp ip block Signed-off-by: Huang Rui Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 1 file changed, 1 insertion(+) commit c1798b540084a3bb026f2d4d2717e982d96527da Author: Huang Rui Date: Fri Dec 16 10:08:48 2016 +0800 drm/amdgpu: register the psp v10 function pointers at psp sw_init Add the psp 10.0 callbacks for PSP. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit dfbd64386111c7356de55a8870e49e154ba51903 Author: Huang Rui Date: Fri Dec 16 10:01:55 2016 +0800 drm/amdgpu: add psp v10 ip block Add the ip block version structure for psp 10.0. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 ++ 2 files changed, 11 insertions(+) commit fd341dc590d743eed360146a8b0d3c4db331b264 Author: Huang Rui Date: Thu May 4 15:28:30 2017 -0400 drm/amdgpu: add psp v10 function callback for raven PSP is the security processor. These are the support functions. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 309 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v10_0.h | 41 +++++ 3 files changed, 352 insertions(+), 1 deletion(-) commit 7fda6eca5de520d2acf2b27a217aa2f703ad627b Author: Huang Rui Date: Mon Feb 27 14:01:55 2017 +0800 drm/amdgpu: add nbio MGCG for raven Add medium grained nbio clockgating implementation. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aecbe64f2b926c7422ce6f0c4d18b7f7dc4a9677 Author: Chunming Zhou Date: Thu May 4 15:06:25 2017 -0400 drm/amdgpu: apply nbio7 for Raven (v3) nbio handles misc bus io operations. Handle differences between different nbio bus versions. v2: switch checks from RAVEN to APU (Alex) squash in raven rev id fetch squash in fix uninitalized hdp flush reg index for raven v3: add some missed RAVEN to APU checks (Alex) Signed-off-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 ++++++++++--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 ++++++-- drivers/gpu/drm/amd/amdgpu/soc15.c | 38 ++++++++++++++++++++++++---------- drivers/gpu/drm/amd/amdgpu/soc15.h | 1 + drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 10 +++++++-- 5 files changed, 54 insertions(+), 18 deletions(-) commit 954d5d437f228e28289ecd5b023abc6fcc9d9aff Author: Chunming Zhou Date: Thu May 4 14:59:54 2017 -0400 drm/amdgpu: add nbio7 support NBIO handles misc bus io functions on the chip. This helper lib has the apppropriate functions for NBIO 7.0. Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 220 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v7_0.h | 49 ++++++++ 3 files changed, 270 insertions(+), 1 deletion(-) commit 16f7bf09612214132c90b4fcd28abc86e74b6ee2 Author: Huang Rui Date: Fri May 5 14:29:42 2017 -0400 drm/amdgpu: enable sdma power gating for raven Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13cfe5d07606e3978de7d4286b3052acd75af67d Author: Huang Rui Date: Tue Feb 28 16:13:32 2017 +0800 drm/amdgpu/sdma4: add dynamic power gating for raven Add the functions to enable dynamic powergating. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit db3144029c30f5567d67c1aa4a2a60d0e94a4803 Author: Huang Rui Date: Tue Feb 28 16:07:48 2017 +0800 drm/amdgpu: init sdma power gating for raven Initialize sdma for powergating. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 48 +++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit fe1a3b2e416b9e5893c32917ff7bccd50477023e Author: Huang Rui Date: Fri May 5 14:28:27 2017 -0400 drm/amdgpu: enable sdma v4 MGCG and LS for raven Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 93e2b09357af78d45a14a3b63bb9a3f3ac77c54b Author: Huang Rui Date: Tue Jan 17 15:09:37 2017 +0800 drm/amdgpu: reuse sdma v4 MGCG and LS function for raven Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7271f068d1aa5b058d17c7aecb836ea381e0947f Author: Chunming Zhou Date: Thu Dec 8 13:56:16 2016 +0800 drm/amdgpu: add Raven sdma golden setting and chip id case Add golden settings for SDMA. Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit c2cdb0ec01a8c5df6706215f81cf5b4b4d48b5a2 Author: Huang Rui Date: Fri May 5 14:27:23 2017 -0400 drm/amdgpu: enable MC MGCG and LS for raven Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2547a7aa3df1cb96a08fbfb457803ca15ee0e18e Author: Huang Rui Date: Wed Feb 8 17:07:59 2017 +0800 drm/amdgpu: add raven clock gating and light sleep for mmhub Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 50 +++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 18 deletions(-) commit bc099ee974fbbd1a109e4390ae16d6bdf0e74e89 Author: Chunming Zhou Date: Mon Jan 16 10:45:50 2017 +0800 drm/amdgpu/gmc9: change fb offset sequence so that used wider Initialize the values earlier. Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2d8e898e097cba408f7df9ba81cab9ba6ced4e4d Author: Chunming Zhou Date: Thu Dec 15 11:15:27 2016 +0800 drm/amdgpu/gmc9: set mc vm fb offset for raven APU fb offset is set by sbios, which is different with DGPU. Signed-off-by: Chunming Zhou Reviewed-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-) commit e4f3abaa97763342b38e265ac1153b8ed4c04866 Author: Chunming Zhou Date: Thu Dec 8 11:28:45 2016 +0800 drm/amdgpu: add raven case for gmc9 golden setting Golden settings for GMC9. Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 18924c719e1d2b194f93ef757584b814421f22a5 Author: Hawking Zhang Date: Mon Feb 13 18:45:28 2017 +0800 drm/amdgpu/gfx9: allow updating gfx mgpg state Wire up the functions to control medium grained powergating. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 197f95c8596bc701a94947a0e198140a6e7dfec3 Author: Hawking Zhang Date: Mon Feb 13 18:40:45 2017 +0800 drm/amdgpu/gfx9: allow updating gfx cgpg state Wire up the enable functions to enable coarse grained powegating. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 5897c99e5c8ab88103d205c5c019508ad7952363 Author: Hawking Zhang Date: Mon Feb 13 18:00:43 2017 +0800 drm/amdgpu/gfx9: allow updating sck slowdown and cp pg state More stuff for gfx pg. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 3a6cc4776d06411e02c1a0b3ab8f6efc27ddef82 Author: Hawking Zhang Date: Fri Feb 10 15:47:28 2017 +0800 drm/amdgpu/gfx9: add enable/disable funcs for cp power gating Used to enable/disable cp powergating. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit ed5ad1e40e1e0b5c845bc576fc7ae202ba2c2367 Author: Hawking Zhang Date: Fri Feb 10 15:36:34 2017 +0800 drm/amdgpu/gfx9: enable/disable sck slowdown thru rlc-smu handshake Required for proper powergating operation. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 91d3130a4d82867ac47d2a45b6f12aab69046695 Author: Hawking Zhang Date: Fri Feb 10 15:13:17 2017 +0800 drm/amdgpu: init gfx power gating on raven Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 81 +++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 6bce46671058832702c4a5122a483f2f3d33fb8d Author: Hawking Zhang Date: Fri Feb 10 14:37:03 2017 +0800 drm/amdgpu/gfx9: rlc save&restore list programming Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 169 +++++++++++++++++++++++++++++++++- 1 file changed, 168 insertions(+), 1 deletion(-) commit c9719c69acd60cb96531fcc6d130e07fe2e97335 Author: Hawking Zhang Date: Mon Feb 13 13:55:23 2017 +0800 drm/amdgpu/gfx9: add rlc bo init/fini setup the save and restore buffers used for gfx powergating. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 236 ++++++++++++++++++++++++++++++---- 1 file changed, 209 insertions(+), 27 deletions(-) commit e999e6e94523d74ed725fefacc9a37f9471bbc1e Author: Hawking Zhang Date: Thu Feb 9 17:11:54 2017 +0800 drm/amdgpu: correct gfx9 csb size programming pa_sc_raster_config/config1 reg is removed from gfx9 csb Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 -- 1 file changed, 2 deletions(-) commit f9d1b81d5763a3d5bb2c05a8add1a829a24a65cd Author: Hawking Zhang Date: Thu Feb 9 14:48:08 2017 +0800 drm/amdgpu/gfx9: enable cp interrupt for CGCG/CGLS/MGCG Required for proper handshaking between the GFX and RLC. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 --- 1 file changed, 3 deletions(-) commit a4d41ad0efc097f9a4cac9c463ea5e412675be30 Author: Hawking Zhang Date: Wed Feb 8 18:17:44 2017 +0800 drm/amdgpu/gfx9: extend rlc fw setup Required for gfx powergating. Change-Id: I5a2f8f41253686d8bb776a92aa68bf90877ebaa8 Signed-off-by: Hawking Zhang Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 46 ++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) commit a4dc61f574e12c1e867370fe743a1c8242934e93 Author: Huang Rui Date: Tue Jan 10 11:04:25 2017 +0800 drm/amdgpu: add gfx clock gating for raven Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 5cf7433d99b659b312857238680fbf09a69b7eed Author: Chunming Zhou Date: Thu Dec 8 11:06:11 2016 +0800 drm/amdgpu/gfx9: add raven gfx config Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit eaa8572403e348a7fe9b9cb798cc648ff8d0ea79 Author: Chunming Zhou Date: Thu Dec 8 10:49:37 2016 +0800 drm/amdgpu/gfx9: add chip name for raven when initializing microcode Fetch the correct ucode for raven. Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) commit a5fdb3369a1d1638752e2f10cf1dafa0359f9f6c Author: Chunming Zhou Date: Thu Dec 8 10:41:58 2016 +0800 drm/amdgpu: add gc9.1 golden setting (v2) Add the GFX9 golden settings. v2: squash in updates Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 060d124b06e09d9e3d0a0f3d0c4e21c0f4e71384 Author: Chunming Zhou Date: Tue Dec 13 15:58:33 2016 +0800 drm/amdgpu: add module firmware for raven Fetch correct firmware for raven for gfx and sdma. Signed-off-by: Chunming Zhou Reviewed-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 4456ef4ea67220d04406b1e0709f629f7733b3b5 Author: Chunming Zhou Date: Thu May 4 14:54:46 2017 -0400 drm/amdgpu: add Raven chip id case for ucode Set the appropriate ucode loading mechanism. Set to direct for now. Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5c5928a238e5649fa5f06d237c21ee6c66664096 Author: Huang Rui Date: Wed Jan 18 18:14:08 2017 +0800 drm/amdgpu: enable soc15 clock gating flags for raven Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 9e5a9eb4ffd3a6276d8c1f2d4dc028df1b2dd229 Author: Huang Rui Date: Wed Jan 18 18:12:59 2017 +0800 drm/amdgpu/soc15: add clock gating functions for raven Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 957c6fe188a1a9d90fd70a141c2208bbc81cd34e Author: Hawking Zhang Date: Tue Dec 27 21:02:48 2016 +0800 drm/amd/amdgpu: fill in raven case in soc15 early init Signed-off-by: Hawking Zhang Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 5 +++++ 1 file changed, 5 insertions(+) commit e0ab9578685038ac5110b822b6628d4b6748ab13 Author: Chunming Zhou Date: Thu Dec 8 10:16:00 2016 +0800 drm/amdgpu/soc15: add Raven golden setting Add the common golden settings for Raven. Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1023b797d14d36b3ce84a052cf13436767371c72 Author: Chunming Zhou Date: Thu Dec 8 10:09:13 2016 +0800 drm/amdgpu: add Raven ip blocks (v2) Add the IP blocks for RAVEN. v2: drop DC for upstream (Alex) Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2ca8a5d2ebd12c72c8b3e5ce251a02c0cc7e18b1 Author: Chunming Zhou Date: Wed Dec 7 17:31:19 2016 +0800 drm/amdgpu: add RAVEN family id definition RAVEN is a new APU. Signed-off-by: Chunming Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++-- drivers/gpu/drm/amd/include/amd_shared.h | 1 + include/uapi/drm/amdgpu_drm.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) commit 702f9292ad60342a8bb0bd67ff61ab23ed84ab1b Author: Alex Deucher Date: Thu May 4 13:09:18 2017 -0400 drm/amdgpu: add register headers for VCN 1.0 Add registers for Video Controller Next 1.0 Signed-off-by: Alex Deucher .../include/asic_reg/raven1/VCN/vcn_1_0_default.h | 202 +++ .../include/asic_reg/raven1/VCN/vcn_1_0_offset.h | 376 ++++++ .../include/asic_reg/raven1/VCN/vcn_1_0_sh_mask.h | 1308 ++++++++++++++++++++ 3 files changed, 1886 insertions(+) commit bfd86c1ab3d9bbcd705c6c4c9c46f14aa929c837 Author: Alex Deucher Date: Thu May 4 13:08:39 2017 -0400 drm/amdgpu: add register headers for THM 10.0 Add registers for THerMal control 10.0 Signed-off-by: Alex Deucher .../include/asic_reg/raven1/THM/thm_10_0_default.h | 141 ++++ .../include/asic_reg/raven1/THM/thm_10_0_offset.h | 257 ++++++ .../include/asic_reg/raven1/THM/thm_10_0_sh_mask.h | 885 +++++++++++++++++++++ 3 files changed, 1283 insertions(+) commit ce869c637ed23a4c2908e0b5e377264055275645 Author: Alex Deucher Date: Thu May 4 13:07:58 2017 -0400 drm/amdgpu: add register headers for SDMA 4.1 Add registers for SDMA 4.1 Signed-off-by: Alex Deucher .../asic_reg/raven1/SDMA0/sdma0_4_1_default.h | 242 +++ .../asic_reg/raven1/SDMA0/sdma0_4_1_offset.h | 459 ++++++ .../asic_reg/raven1/SDMA0/sdma0_4_1_sh_mask.h | 1658 ++++++++++++++++++++ 3 files changed, 2359 insertions(+) commit c4dc7b1a54a043d08172f2d3de02578667a7595c Author: Alex Deucher Date: Thu May 4 13:06:58 2017 -0400 drm/amdgpu: add register headers for NBIO 7.0 Add registers for NBIO 7.0 Signed-off-by: Alex Deucher .../asic_reg/raven1/NBIO/nbio_7_0_default.h | 14865 +++ .../include/asic_reg/raven1/NBIO/nbio_7_0_offset.h | 4640 + .../asic_reg/raven1/NBIO/nbio_7_0_sh_mask.h | 118945 ++++++++++++++++++ 3 files changed, 138450 insertions(+) commit cfeb9192fee617c56cfb1e63b3cfae57bba340ca Author: Alex Deucher Date: Thu May 4 13:05:53 2017 -0400 drm/amdgpu: add register headers for MP 10.0 Add registers for MP 10.0 Signed-off-by: Alex Deucher .../include/asic_reg/raven1/MP/mp_10_0_default.h | 182 +++++ .../include/asic_reg/raven1/MP/mp_10_0_offset.h | 336 ++++++++ .../include/asic_reg/raven1/MP/mp_10_0_sh_mask.h | 886 +++++++++++++++++++++ 3 files changed, 1404 insertions(+) commit 96ded7747cc2e3f4e557913411cedb86a2a6c1d2 Author: Alex Deucher Date: Thu May 4 13:04:55 2017 -0400 drm/amdgpu: add register headers for MMHUB 9.1 Add registers for the MultiMedia Hub 9.1 Signed-off-by: Alex Deucher .../asic_reg/raven1/MMHUB/mmhub_9_1_default.h | 1028 ++ .../asic_reg/raven1/MMHUB/mmhub_9_1_offset.h | 1999 ++++ .../asic_reg/raven1/MMHUB/mmhub_9_1_sh_mask.h | 9790 ++++++++++++++++++++ 3 files changed, 12817 insertions(+) commit 7582d7e64938e1f10ce5899d47dcad6be7db5caf Author: Alex Deucher Date: Thu May 4 13:02:36 2017 -0400 drm/amdgpu: add register headers for GC 9.1 Registers for Graphics Controller 9.1 Signed-off-by: Alex Deucher .../include/asic_reg/raven1/GC/gc_9_1_default.h | 4005 +++ .../amd/include/asic_reg/raven1/GC/gc_9_1_offset.h | 7491 +++++ .../include/asic_reg/raven1/GC/gc_9_1_sh_mask.h | 31191 +++++++++++++++++++ 3 files changed, 42687 insertions(+) commit 752ca077d58e97da947057fbe201b38a7990572a Author: Alex Deucher Date: Thu May 4 13:01:35 2017 -0400 drm/amdgpu: add register headers for DCN 1.0 Registers for Display Controller Next 1.0 Signed-off-by: Alex Deucher .../include/asic_reg/raven1/DCN/dcn_1_0_default.h | 7988 +++ .../include/asic_reg/raven1/DCN/dcn_1_0_offset.h | 14087 +++++ .../include/asic_reg/raven1/DCN/dcn_1_0_sh_mask.h | 54316 +++++++++++++++++++ 3 files changed, 76391 insertions(+) commit 4f059ecdcec2dd6fab757a16cc552093bfd321ee Author: Monk Liu Date: Thu May 11 13:59:15 2017 +0800 drm/amdgpu:use job's list instead of check fence because if the fence is really signaled, it could already released so the fence pointer is a wild pointer, but if we use job->base.node we are safe because job will not be released untill amdgpu_job_timedout finished. Signed-off-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65781c78ad74e4260fbec92c0ecc05738044e177 Author: Monk Liu Date: Thu May 11 13:36:44 2017 +0800 drm/amdgpu/SRIOV:implement guilty job TDR for(V2) 1,TDR will kickout guilty job if it hang exceed the threshold of the given one from kernel paramter "job_hang_limit", that way a bad command stream will not infinitly cause GPU hang. by default this threshold is 1 so a job will be kicked out after it hang. 2,if a job timeout TDR routine will not reset all sched/ring, instead if will only reset on the givn one which is indicated by @job of amdgpu_sriov_gpu_reset, that way we don't need to reset and recover each sched/ring if we already know which job cause GPU hang. 3,unblock sriov_gpu_reset for AI family. V2: 1:put kickout guilty job after sched parked. 2:since parking scheduler prior to kickout already occupies a while, we can do last check on the in question job before doing hw_reset. TODO: 1:when a job is considered as guilty, we should mark some flag in its fence status flag, and let UMD side aware that this fence signaling is not due to job complete but job hang. 2:if gpu reset cause all video memory lost, we need introduce a new policy to implement TDR, like drop all jobs not yet signaled, and all IOCTL on this device will return ERROR DEVICE_LOST. this will be implemented later. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 43 +++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 6 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 11 ++++++- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 7 +++++ 7 files changed, 63 insertions(+), 10 deletions(-) commit 75fbed20e5e36130a381cc162b137aef349d1f81 Author: Monk Liu Date: Thu May 11 13:36:33 2017 +0800 drm/amdgpu:don't init entity for KIQ We don't need a scheduler for KIQ. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0c63e11340c6e41795feaaa3768cd6db3b2f8585 Author: Monk Liu Date: Wed Apr 26 14:51:54 2017 +0800 drm/amdgpu:only call flr_work under infinite timeout Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 15 +++++++++------ drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) commit 7225f8736c66b7130d3a6294217ed86f26b59489 Author: Monk Liu Date: Wed Apr 26 14:51:54 2017 +0800 drm/amdgpu:use job* to replace voluntary that way we can know which job cause hang and can do per sched reset/recovery instead of all sched. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++---- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) commit 4fbf87e2fe472110d8d3f66ffcbfb7fff911c191 Author: Monk Liu Date: Fri May 5 15:09:42 2017 +0800 drm/amdgpu:don't invoke srio-gpu-reset in gpu-reset (v2) because we don't want to do sriov-gpu-reset under certain cases, so just split those two funtion and don't invoke sr-iov one from bare-metal one. V2: remove debugfs_gpu_reset routine on SRIOV case. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 +++++- 4 files changed, 13 insertions(+), 5 deletions(-) commit bea396726d004df08a7d08972d5eeb792857c8bc Author: Chunming Zhou Date: Wed May 10 13:02:39 2017 +0800 drm/amdgpu: id reset count only is updated when used end v2 before that, we have function to check if reset happens by using reset count. v2: always update reset count after vm flush Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b9bf33d5ac55aa9f23b60b4d03017b2e59d02f02 Author: Chunming Zhou Date: Thu May 11 14:52:48 2017 -0400 drm/amdgpu: make pipeline sync be in same place v2 v2: directly return for 'if' case. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 32 +++++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 ++ 5 files changed, 34 insertions(+), 8 deletions(-) commit df83d1ebc9e304fa3ba4bf79dba76418789a77cf Author: Chunming Zhou Date: Tue May 9 15:50:22 2017 +0800 drm/amdgpu: add sched sync for amdgpu job v2 this is an improvement for previous patch, the sched_sync is to store fence that could be skipped as scheduled, when job is executed, we didn't need pipeline_sync if all fences in sched_sync are signalled, otherwise insert pipeline_sync still. v2: handle error when adding fence to sync failed. Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang (v1) Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 +++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 13 +++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) commit a022c54e60222fa192004ed951a658cba7262784 Author: Christian König Date: Mon May 8 15:14:54 2017 +0200 drm/amdgpu: remove unsed amdgpu_gem_handle_lockup (v2) This kind of reset handling was removed a long time ago. v2: fix warning (Alex) Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 46 ++++++++------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) commit 6643be65d9e3e76960119957e5ad1acecb0b8dc0 Author: Chunming Zhou Date: Fri May 5 10:50:09 2017 +0800 drm/amdgpu: print when gpu reset successed Signed-off-by: Chunming Zhou Reviewed-by: Roger.He Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fcf0649fcc71d1d6a8d45d7cba21b6a0ad6489b7 Author: Chunming Zhou Date: Fri May 5 10:33:33 2017 +0800 drm/amdgpu: fix ring0 failed on pro card the root cause is vram content is lost completely after pci reset. Signed-off-by: Chunming Zhou Reviewed-by: Roger.He Acked-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 57 ++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 7 deletions(-) commit 738f64ccc237f80b7673a6cc43051916eb90dc27 Author: Roger.He Date: Fri May 5 13:27:10 2017 +0800 drm/amdgpu: extend lock range for race condition when gpu reset to cover below case: 1. A task gart bind/unbind but not add to adev->gtt_list yet 2. at this time gpu reset, gtt only recover those gtt in adev->gtt_list Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Roger.He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 22 ++++++++++++++-------- 3 files changed, 19 insertions(+), 11 deletions(-) commit 455a7bc27c2118c7e0531b7502dedc80ed2f9d40 Author: Alex Xie Date: Mon May 8 21:36:03 2017 -0400 drm/amdgpu: Fix comments in source code Signed-off-by: Alex Xie Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ea81a173ff2d4ac2807d016715cdc89c1656b20e Author: Alex Xie Date: Mon May 8 13:41:11 2017 -0400 drm/amdgpu: fix errors in comments. Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 67fb56a6dde9bddd3a57614607af255bbb732118 Author: Alex Deucher Date: Thu May 4 10:32:33 2017 -0400 drm/amdgpu/gfx9: move define to header file rather than defining it locally. Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 -- drivers/gpu/drm/amd/amdgpu/soc15d.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 5b9c58f9978fb17692966173262ef05f9a1f9a1e Author: Nikola Pajkovsky Date: Thu May 4 12:39:50 2017 -0400 drm/amd/amdgpu: get rid of else branch else branch is pointless if it's right at the end of function and use unlikely() on err path. Reviewed-by: Christian König Signed-off-by: Nikola Pajkovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 45 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 22 deletions(-) commit 503bb31be42e3fea15c5e81bb2d84a0123438c85 Author: Monk Liu Date: Wed May 3 14:55:07 2017 +0800 drm/amdgpu:cleanup flag not used Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 -- 2 files changed, 3 deletions(-) commit 3b4d68e993d941ec993660f10bacdfd556731dc7 Author: Monk Liu Date: Mon May 1 18:09:22 2017 +0800 drm/amdgpu:use FRAME_CNTL for new GFX ucode (v2) AI affected: CP/HW team requires KMD insert FRAME_CONTROL(end) after the last IB and before the fence of this DMAframe. this is to make sure the cache are flushed, and it's a must change no matter MCBP/SR-IOV or bare-metal case because new CP hw won't do the cache flush for each IB anymore, it just leaves it to KMD now. with this patch, certain MCBP hang issue when rendering vulkan/chained-ib are resolved. v2: drop gfx8 changes. gfx8 is not affected (Alex) Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +++++++ 5 files changed, 12 insertions(+), 1 deletion(-) commit d951eeddface8bcdcb4fd95066801abface55c21 Author: Monk Liu Date: Mon May 1 17:23:44 2017 +0800 drm/amdgpu:new PM4 entry for VI/AI TMZ package will be used for VULKAN/CHAINED-IB MCBP Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15d.h | 7 +++++++ drivers/gpu/drm/amd/amdgpu/vid.h | 6 ++++++ 2 files changed, 13 insertions(+) commit 635e71329858f2051c015d2a8c863bbce04d1e1b Author: Monk Liu Date: Mon May 1 17:05:02 2017 +0800 drm/amdgpu:change SR-IOV DMAframe scheme According to CP/hw team requirment, to support PAL/CHAINED-IB MCBP, kernel driver must guarantee DE_META must be inserted right prior to the work_load DE IB (with PREEMPT flag), there cannot be any non-work_load DE IB between-in DE_META and work_load DE IB. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) commit 9524354358a6ee80f1624b515f157f44b8a0ab2b Author: Monk Liu Date: Mon May 1 18:05:06 2017 +0800 drm/amdgpu:unify gfx8/9 ce/de meta_data Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit eaa05d528850789c05fd5cadbaabb16020151184 Author: Monk Liu Date: Mon May 1 17:00:13 2017 +0800 drm/amdgpu:cleanup indent/format for gfx_v9_0.c Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit b48622b088ec4292e59e661d84323d7c1e6374db Author: Frank Min Date: Tue May 2 19:49:32 2017 +0800 drm/amdgpu: clean doorbell after sending init table to mmsch According to HW design, need to clean doorbell after setup MMSCH table. Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 2 files changed, 2 insertions(+) commit 034b6867a4029bfdf5645949ded8443a3b96987a Author: Xiangliang Yu Date: Thu May 4 14:02:31 2017 +0800 drm/amdgpu/virt: change AI ack-irq message to debug level Change message to debug level as VI does. Signed-off-by: Xiangliang Yu Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 943cafb825736fdbc7e9c7a8eb1cf92a0772e7e7 Author: Xiangliang Yu Date: Thu May 4 11:05:13 2017 +0800 drm/amdgpu/psp: Do not load asd for SRIOV If psp version doesn't match asd version, asd loading will be failed. Add workaround to bypass it for sriov. Signed-off-by: Daniel Wang Signed-off-by: Xiangliang Yu Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5dd696ae5d648b412a29b314c50e5dcf65829b9d Author: Trigger Huang Date: Wed Apr 26 02:29:47 2017 -0400 drm/amdgpu: Bypass GMC/UVD/VCE hw_fini in SR-IOV On vega10, some hw finish operations should not be applied in SR-IOV case. This works as workaround to fix multi-VFs reboot/shutdown issues. Signed-off-by: Trigger Huang Reviewed-by: Xiangliang Yu Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 8 +++++++- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 10 ++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-) commit 2cb681b6e4e317068153e217948d471f3117baee Author: Monk Liu Date: Wed Apr 26 12:00:49 2017 +0800 drm/amdgpu:re-write sriov_reinit_early/late (v2) 1,this way we make those routines compatible with the sequence requirment for both Tonga and Vega10 2,ignore PSP hw init when doing TDR, because for SR-IOV device the ucode won't get lost after VF FLR, so no need to invoke PSP doing the ucode reloading again. v2: squash in ARRAY_SIZE fix Signed-off-by: Monk Liu Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 63 ++++++++++++++++++------------ 1 file changed, 39 insertions(+), 24 deletions(-) commit 17b2e332a277bf8a1314bfa58ac17d38b77d3c14 Author: Monk Liu Date: Fri Apr 21 19:35:11 2017 +0800 drm/amdgpu:need som change on vega10 mailbox if sriov gpu reset is invoked by job timeout, it is run in a global work-queue which is very slow and better not call msleep ortherwise it takes long time to get back CPU. so make below changes: 1: Change msleep 1 to mdelay 5 2: Ignore the ack fail from pf after time out, because VF FLR will clear ack, sometime VF FLR is done prior to the beginning of poll_ack so we can ignore this ack TODO: Put job_timedout (and the following gpu reset) in a driver thread, instead of the global work_struct. Signed-off-by: Monk Liu Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 18 ++++++++++-------- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 10 +++++----- 2 files changed, 15 insertions(+), 13 deletions(-) commit 3af906f0cf6bdf9b7c300a0fa34858a02c71c730 Author: Monk Liu Date: Sun Apr 23 11:25:59 2017 +0800 drm/amdgpu:fix cannot receive rcv/ack irq bug Signed-off-by: Monk Liu Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff82577a10f405e9e0426facdbdd303143146d9f Author: Monk Liu Date: Fri May 5 17:30:50 2017 -0400 drm/amdgpu:kiq reg access need timeout(v2) this is to prevent fence forever waiting if FLR occured during register accessing. v2: use define instead of hardcode for the timeout msec Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 2fdde9fa9705cb4df29445c2a4dd241b1e9c03f2 Author: Alex Deucher Date: Mon Apr 17 16:21:52 2017 -0400 drm/amdgpu/gfx9: wait for completion in KIQ init We need to make sure the various init sequences submitted to KIQ complete before testing the rings. Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 89 +++++++++++++++++++++++++++++++---- 1 file changed, 79 insertions(+), 10 deletions(-) commit f1f7b443788c5e81a7a2ee8079e3d5b9f24ef003 Author: Alex Deucher Date: Mon Apr 17 16:14:09 2017 -0400 drm/amdgpu/gfx9: use new KIQ packet defines Rather than magic numbers. Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 495a746354a056ecb8c13f3baff305d0c50864ec Author: Alex Deucher Date: Mon Apr 17 15:54:55 2017 -0400 drm/amdgpu: add KIQ packet defines to soc15d.h Will be used in subsequent commits rather rather than magic numbers. Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15d.h | 82 +++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit b98724db7f9bb7b0b0e253f903249894f09c01ee Author: Alex Deucher Date: Mon Apr 17 16:32:12 2017 -0400 drm/amdgpu/gfx9: clear the compute ring on reset To be consistent with gfx8. Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+) commit 0ef376cacb3b585acf97dac04369f847ba05f0d0 Author: Alex Deucher Date: Mon Apr 17 15:29:14 2017 -0400 drm/amdgpu/gfx9: create mqd backups And properly synchronize them with the master during queue init. Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit cdf6adb28f79e728389b2e1a5e524504ce710eb6 Author: Shaoyun Liu Date: Fri Apr 28 17:18:26 2017 -0400 drm/amdgpu: Move kiq ring lock out of virt structure The usage of kiq should not depend on the virtualization. Signed-off-by: Shaoyun Liu Reviewed-by:Andres Rodriquez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 ++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 ++ 5 files changed, 9 insertions(+), 6 deletions(-) commit b98b8dbc39d59a06b2104cfafed71ce465573e8e Author: Chunming Zhou Date: Mon Apr 24 11:47:05 2017 +0800 drm/amdgpu: bump module verion for reserved vmid Interface to reserve a vmid for a specific process to add in shader debugging that requries a fixed vmid. Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7a63eb23d8817477f19f2cf51fbf7b27b221049c Author: Chunming Zhou Date: Fri Apr 21 11:13:56 2017 +0800 drm/amdgpu: implement grab reserved vmid V4 Implement the vmid reservation. v2: move sync waiting only when flush needs v3: fix racy v4: peek fence instead of get fence, and fix potential context starved. Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 79 ++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 4 deletions(-) commit c350577073de8fe21e6cdd798c4e4746d670bb47 Author: Chunming Zhou Date: Fri Apr 21 15:51:04 2017 +0800 drm/amdgpu: add limitation for dedicated vm number v4 Limit reserved vmids to 1 to avoid taking too many out of commission and starving the system. v2: move #define to amdgpu_vm.h v3: move reserved vmid counter to id_manager, and increase counter before allocating vmid v4: rename to reserved_vmid_num Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +++ 2 files changed, 12 insertions(+) commit 1e9ef26fb385394c3b0267c8293f4178729d8719 Author: Chunming Zhou Date: Thu Apr 20 16:18:48 2017 +0800 drm/amdgpu: reserve/unreserve vmid by vm ioctl v4 add reserve/unreserve vmid funtions. Used to reserve vmids for certain shader debugging functionality that required a fixed vmid for the life of the debug. v3: only reserve vmid from gfxhub v4: fix racy condition Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 64 +++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 13 deletions(-) commit 36bbf3bf9b23a9fe66558e2aa235f7d81c4a0727 Author: Chunming Zhou Date: Thu Apr 20 16:17:34 2017 +0800 drm/amdgpu: add reserved vmid field in vm struct v2 v2: rename dedicated_vmid to reserved_vmid Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 ++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) commit cfbcacf42803a690be40068325d20d74b6093c8c Author: Chunming Zhou Date: Mon Apr 24 11:09:04 2017 +0800 drm/amdgpu: add vm ioctl It will be used for reserving vmid for shader debugging that requires a fixed vmid. v2: fix warning (Alex) Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + include/uapi/drm/amdgpu_drm.h | 22 ++++++++++++++++++++++ 4 files changed, 40 insertions(+) commit 63a7c7487fb20422a4a71d0bfef5ac2a69caaf68 Author: Trigger Huang Date: Thu Apr 27 03:09:31 2017 -0400 drm/amdgpu: Enable chained IB MCBP support Support for MCBP/Virtualization in combination with chained IBs is formal released on firmware feature version #46. So enable it according to firmware feature version, otherwise, world switch will hang. Signed-off-by: Trigger Huang Reviewed-by: Monk Liu Reviewed-by: Xiangliang Yu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit fe723cd3bf277c37c555959ee75bd1429818284b Author: Rex Zhu Date: Wed Apr 26 16:32:22 2017 +0800 drm/amdgpu:fix get wrong gfx always on cu masks. Bug: SWDEV-117987: Always on CU mask broken for gfx7+ Signed-off-by: Rex Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 10 ++++++++-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 10 ++++++++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 ++++++++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 4 files changed, 26 insertions(+), 8 deletions(-) commit 94c9ceade9a6cf3f85f2c316abd02ce3c5abc800 Author: Rex Zhu Date: Mon Apr 24 22:00:09 2017 +0800 drm/amdgpu: fix s3 ring test failed on Vi caused by KIQ enabled. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ab276632ec62064fb94dbbd441a94062e8bcd37a Author: Xiangliang Yu Date: Fri Apr 21 14:06:09 2017 +0800 drm/amdgpu/virt: change the place of virt_init_setting Change place of virt_init_setting function so that can cover the cg and pg flags configuration. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/vi.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 213cacefcd5c7815802281445ba503d26e794b77 Author: Xiangliang Yu Date: Fri Apr 21 14:01:29 2017 +0800 drm/amdgpu/virt: bypass cg and pg setting for SRIOV GPU hypervisor cover all settings of CG and PG, so guest doesn't need to do anything. Bypass it. Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++ 1 file changed, 2 insertions(+) commit 3032f350ba4d09c2ca7a1dc4b527c7953d7f0be6 Author: Christian König Date: Wed Apr 12 12:53:18 2017 +0200 drm/amdgpu: drop support for per ASIC read registers Only per family registers are still used. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 29 +------------------------- drivers/gpu/drm/amd/amdgpu/vi.c | 42 +------------------------------------- 2 files changed, 2 insertions(+), 69 deletions(-) commit 97fcc76b67b8366633971fd5841a4606d040b67b Author: Christian König Date: Wed Apr 12 12:49:54 2017 +0200 drm/amdgpu: drop support for untouched registers I couldn't figure out what this was original good for, but we don't use it any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/cik.c | 121 +++++++++++++------------- drivers/gpu/drm/amd/amdgpu/si.c | 84 +++++++++--------- drivers/gpu/drm/amd/amdgpu/soc15.c | 50 ++++++----- drivers/gpu/drm/amd/amdgpu/vi.c | 168 ++++++++++++++++++------------------ 5 files changed, 210 insertions(+), 214 deletions(-) commit ca541f3316ff5f8510fb8fcf36f58803f7da7d56 Author: Rex Zhu Date: Tue Apr 18 12:59:41 2017 +0800 drm/amdgpu: delete redundant kiq irq funcs type check in gfx8. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ---- 1 file changed, 4 deletions(-) commit 2d0806cabb5cd8d6d7fb21e38604c70cb4d2e383 Author: Rex Zhu Date: Tue Apr 18 13:00:43 2017 +0800 drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e6f7c765e70fadf9046cfa06159be722ecfb8bd4 Author: Xiaojie Yuan Date: Tue Feb 21 11:41:40 2017 +0800 drm/amdgpu: add HDMI audio support for si dce6 Signed-off-by: Xiaojie Yuan Reviewed-by: Edward O'Callaghan Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 130 +++++++++++++++++++++++++++++++--- 1 file changed, 121 insertions(+), 9 deletions(-) commit 4caca70668b777649cf64c652bc1d506a74052c6 Author: Xiaojie Yuan Date: Sun Feb 19 19:56:17 2017 +0800 drm/amdgpu: add DP audio support for si dce6 (v3) v2: refine dce_v6_0_audio_endpt_wreg() and unify inconsistent method names v3: fix num_pins for tahiti, pitcairn, verde and oland Signed-off-by: Xiaojie Yuan Reviewed-by: Edward O'Callaghan Reviewed-by: Alex Deucher Acked-by: Junwei Zhang Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 467 +++++++++++++++++++-- .../drm/amd/include/asic_reg/dce/dce_6_0_sh_mask.h | 2 + 2 files changed, 433 insertions(+), 36 deletions(-) commit 6a124e675aa4e0b3cc6f96aca8fe2b7fd3c00ae2 Author: Alex Deucher Date: Thu Apr 13 14:35:02 2017 -0400 drm/amdgpu/gfx8: move CP_PQ_STATUS after doorbell range setting (v2) I'm not sure if the order matters, but it seems like it makes more sense to set this after the range is programmed. v2: rebase (Alex) Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4f339b2936bfaba6ee320e17c3b0db5abc3e0bb2 Author: Rex Zhu Date: Tue Apr 11 15:44:29 2017 +0800 drm/amdgpu: set cpg doorbell for fiji and polaris. add set_doorbell functions for mec and cpg. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 82 ++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 39 deletions(-) commit a99f249d49c7de2f37619b13e237e40d6ca8185a Author: Alex Deucher Date: Tue Apr 11 17:37:01 2017 -0400 drm/amdgpu/gfx8: unify the HQD deactivation code This could be used in Andres' priority scheduling patch as well. Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 42 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 22 deletions(-) commit d5dc36a45e9fd1cfc2287fe207121aaad5781fba Author: Alex Deucher Date: Tue Mar 14 15:00:23 2017 -0400 drm/amdgpu/gfx8: enable cp/rlc ints after we disable clockgating Even if we disable clockgating, we still need to make sure the cp/rlc interrupts are enabled for powergating which might still be enabled. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++ 1 file changed, 2 insertions(+) commit dfa6c82ee5a9daf8389b55cffb72675c00798c9b Author: Alex Deucher Date: Tue Mar 14 15:04:59 2017 -0400 drm/amdgpu/gfx7: enable cp/rlc ints after we disable clockgating Even if we disable clockgating, we still need to make sure the cp/rlc interrupts are enabled for powergating which might still be enabled. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit d17c0faf1de82eaaa6c6503e6abb524621206589 Author: Alex Deucher Date: Mon Apr 10 13:00:14 2017 -0400 drm/amdgpu/gfx8: move MEC doorbell range setting It's global, not queue specific, so move it out of the kiq register init function. Tested-and-Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit a545e491bb2d22019fc8b55186d1c815120c12fb Author: Alex Deucher Date: Fri Mar 31 12:00:14 2017 -0400 drm/amdgpu/gfx8: fix resume of KIQ and KCQs No need to reset the wptr and clear the rings. The UNMAP_QUEUES packet writes the current MQD state back the MQD on suspend, so there is no need to reset it as well. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 9d11ca9c0953bd63bfbc19f9d94aefc496136f77 Author: Alex Deucher Date: Thu Mar 30 13:06:32 2017 -0400 drm/amdgpu/gfx8: properly disable the KCQs in hw_fini Use the UNMAP_QUEUES packet to have the KIQ properly disable them. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 3d7e30b381d7d37c572a82a56e54dcfebcc1af0b Author: Alex Deucher Date: Thu Mar 30 12:34:06 2017 -0400 drm/amdgpu/gfx8: use new KIQ packet defines Rather than open coding them. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 346586d5672d9d63057d4fa03dc0816a59439001 Author: Alex Deucher Date: Wed Mar 29 15:31:22 2017 -0400 drm/amdgpu/gfx8: move SET_RESOURCES into the same command stream As the KCQ setup. This way we only have to wait once for the entire MEC. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 87 +++++++++-------------------------- 1 file changed, 23 insertions(+), 64 deletions(-) commit c3a49ab54b01a52ad0dd4e860ae6775f4f5dc207 Author: Alex Deucher Date: Wed Mar 29 13:42:32 2017 -0400 drm/amdgpu/gfx8: wait once for all KCQs to be created Rather than waiting for each queue. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 57 +++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 26 deletions(-) commit 3930011594af82812b69551ce96aefef7c1ac1a9 Author: Alex Deucher Date: Wed Mar 29 13:23:44 2017 -0400 drm/amdgpu: split gfx_v8_0_kiq_init_queue into two One for KIQ and one for the KCQ. This simplifies the logic and allows for future optimizations. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 62 +++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 21 deletions(-) commit f776952b76f1ef666987f8aea4687d12f0d394a7 Author: Alex Deucher Date: Wed Mar 29 13:15:22 2017 -0400 drm/amdgpu/gfx8: wait for completion in KIQ init We need to make sure the various init sequences submitted to KIQ complete before testing the rings. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 88 +++++++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 10 deletions(-) commit 4fdca894bb3be01829bb620b6157cafee9f956a6 Author: Alex Deucher Date: Fri Mar 17 15:27:06 2017 -0400 Revert "drm/amd/amdgpu: Disable GFX_PG on Carrizo until compute issues solved" Re-enable GFX PG. It's working properly with MEC now that KIQ is enabled. Reviewed-by: Samuel Li This reverts commit e9ef19aa1bdeac380662a112f1d03a7c3477527f. drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4e40676e4aade3141194617199bec77a32b5680 Author: David Panariti Date: Tue Mar 28 12:57:31 2017 -0400 drm/amdgpu: Switch baremetal to use KIQ for compute ring management. (v3) KIQ is the Kernel Interface Queue for managing the MEC. Rather than setting up rings via direct MMIO of ring registers, the rings are configured via special packets sent to the KIQ. The allows the MEC to better manage shared resources and certain power events. v2: squash in s3/s4 fix from Rex v3: further fixes from Rex Signed-off-by: David Panariti Reviewed-by: Alex Deucher Acked-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 326 +++------------------------------- 2 files changed, 26 insertions(+), 302 deletions(-) commit a576fe51512050d0005a7be40e59ae7c8b9b49d7 Author: Alex Deucher Date: Mon Apr 10 12:48:02 2017 -0400 drm/amdgpu/gfx8: set doorbell range for polaris as well Add missing chips to the doorbell range setup. These were missed in the KIQ code. Fixes power and performance regressions with KIQ. Spotted by Rex. Tested-and-Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ed6f55d1a9c0cbb6d33387e1a40adb248a311ac3 Author: Alex Deucher Date: Fri Apr 7 17:43:05 2017 -0400 drm/amdgpu/gfx8: add additional MQD initialization Need to properly set the MTYPE and ROQ space setting. This should fix performance regressions with KIQ enabled. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b6dc60cf79ecbb5bbe3b57bbb098a885bba01454 Author: Eric Huang Date: Thu May 11 11:55:48 2017 -0400 drm/amd/powerplay: fix pcie dpm table for vega10 This resolves pcie low speed problem. Signed-off-by: Eric Huang Acked-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9312d9a6a02af1bc8b4bdae42f68e7b77ff35ae5 Author: Rex Zhu Date: Wed May 10 16:33:03 2017 +0800 drm/amd/powerplay: update vega10 smu interface version to E. need update smu firmware to version 0x1c20. Signed-off-by: Rex Zhu Reviewws-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu9_driver_if.h | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 14641ac4ebfbef47f183d5610f0e31affb9ba187 Author: Rex Zhu Date: Thu May 11 14:05:27 2017 +0800 drm/amd/powerplay: delete dead code in vega10_thermal.c Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 3 --- 1 file changed, 3 deletions(-) commit fbf66a3c9c100cedf4942384fa6877be70fb0e7c Author: Rex Zhu Date: Wed May 10 21:51:24 2017 +0800 drm/amd/powerplay: Add Vega10 Powertune Table v3 support. Handle the latest powerplay table format; includes Boost State support. Signed-off-by: Rex Zhu Reviewws-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/vega10_pptable.h | 31 +++++++++++++++ .../amd/powerplay/hwmgr/vega10_processpptables.c | 46 ++++++++++++++++++++-- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 ++ 3 files changed, 77 insertions(+), 3 deletions(-) commit 676b4087fcb44f9816eaeb21261ed25dd3f3c822 Author: Rex Zhu Date: Wed May 10 16:18:34 2017 +0800 drm/amd/powerplay: convert from number of lanes to lane bits on vega10 We need a mask. Signed-off-by: Rex Zhu Reviewws-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9c2cc3a10cace3cb647ecf42197396c9761097ed Author: Rex Zhu Date: Wed May 10 15:51:09 2017 +0800 drm/amd/powerplay: fix bug in processing CKS_Enable bit. Typo in the mask. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab5cf3a55175da6a18cd818726d6c62a1f23cdad Author: Rex Zhu Date: Thu May 11 16:12:21 2017 -0400 drm/amd/powerplay: add avfs fuse overdriver func. Add a function to look up the AVFS fuse values for vega10 These are used to populate the avfs fuse table in the smu. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 3 +- .../gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c | 1276 ++++++++++++++++++++ .../gpu/drm/amd/powerplay/hwmgr/pp_overdriver.h | 48 + drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 43 +- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 1 + 5 files changed, 1368 insertions(+), 3 deletions(-) commit d6c025d243b191e4d577fc217697adb2f0c8a14b Author: Eric Huang Date: Mon May 8 15:11:41 2017 -0400 drm/amd/powerplay: add power profile support for Vega10 (v2) This implements the workload specific interface of optimized compute power profile for Vega10. v2: squash in fix (Tom) Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit ea289b39a6debc21330451d965ee7d35e7a01f1d Author: Alex Deucher Date: Tue May 2 17:28:45 2017 -0400 drm/amdgpu/gfx9: drop duplicate gfx info init (v3) Taken care of by gpu info firmware now. v2: rebase v3: rework based on latest firmware Reviewed-by: Junwei Zhang Tested-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ---------- 1 file changed, 10 deletions(-) commit e2a75f88c3ad4b895b58d4abd877de827a12072f Author: Alex Deucher Date: Thu Apr 27 16:58:01 2017 -0400 drm/amdgpu: parse the gpu_info firmware (v4) And populate the gfx structures from it. v2: update the structures updated by the table v3: rework based on new table structure v4: simplify things Reviewed-by: Junwei Zhang Tested-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 98 ++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit 8ae1a33648969531d93008dda508f1715f1fdbf0 Author: Alex Deucher Date: Wed Apr 26 23:40:37 2017 -0400 drm/amdgpu: add gpu_info firmware (v3) Add a new gpu info firmware to store gpu specific configuration data. This allows us to store hw constants in a unified place. v2: adjust structure and elements v3: further restructure Reviewed-by: Junwei Zhang Tested-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 25 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit 2f590f8419c6abb6d87d89c99931a13404a7dbe1 Author: Dan Carpenter Date: Tue May 23 13:13:45 2017 +0800 drm/amd/powerplay: fix a signedness bugs Smatch complains about a signedness bug here: vega10_hwmgr.c:4202 vega10_force_clock_level() warn: always true condition '(i >= 0) => (0-u32max >= 0)' Fixes: 7b52db39a4c2 ("drm/amd/powerplay: fix bug sclk/mclk level can't be set on vega10.") Signed-off-by: Dan Carpenter Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca7962d8ccc3da48073c419700c0813095c39f25 Author: Chunming Zhou Date: Thu May 11 18:22:17 2017 +0800 drm/amdgpu: fix NULL pointer panic of emit_gds_switch [ 338.384770] BUG: unable to handle kernel NULL pointer dereference at (null) [ 338.384817] IP: [< (null)>] (null) [ 338.385505] RIP: 0010:[<0000000000000000>] [< (null)>] (null) [ 338.385950] Call Trace: [ 338.385993] [] ? amdgpu_vm_flush+0x283/0x400 [amdgpu] [ 338.386025] [] ? printk+0x4d/0x4f [ 338.386074] [] amdgpu_ib_schedule+0x4a6/0x4d0 [amdgpu] [ 338.386140] [] amdgpu_job_run+0x64/0x180 [amdgpu] [ 338.386203] [] amd_sched_main+0x2e9/0x4a0 [amdgpu] [ 338.386232] [] ? prepare_to_wait_event+0x110/0x110 [ 338.386295] [] ? amd_sched_select_entity+0xe0/0xe0 [amdgpu] [ 338.386327] [] kthread+0xd3/0xf0 [ 338.386349] [] ? kthread_park+0x60/0x60 [ 338.386376] [] ret_from_fork+0x25/0x30 [ 338.386401] Code: Bad RIP value. [ 338.386420] RIP [< (null)>] (null) [ 338.386443] RSP [ 338.386458] CR2: 0000000000000000 [ 338.398508] ---[ end trace 4c66fcdc74b9a0a2 ]--- Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e12fcff79974a32eef523b80e5f485a4bbe102bb Author: Lyude Date: Thu May 11 19:31:12 2017 -0400 drm/radeon: Unbreak HPD handling for r600+ We end up reading the interrupt register for HPD5, and then writing it to HPD6 which on systems without anything using HPD5 results in permanently disabling hotplug on one of the display outputs after the first time we acknowledge a hotplug interrupt from the GPU. This code is really bad. But for now, let's just fix this. I will hopefully have a large patch series to refactor all of this soon. Reviewed-by: Christian König Signed-off-by: Lyude Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 4 ++-- drivers/gpu/drm/radeon/evergreen.c | 4 ++-- drivers/gpu/drm/radeon/r600.c | 2 +- drivers/gpu/drm/radeon/si.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit ae5037dcfeef6f90e0b352e05e45d89700cefa23 Author: Alex Deucher Date: Thu May 11 13:57:41 2017 -0400 drm/amd/powerplay/smu7: disable mclk switching for high refresh rates Even if the vblank period would allow it, it still seems to be problematic on some cards. bug: https://bugs.freedesktop.org/show_bug.cgi?id=96868 Cc: stable@vger.kernel.org Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 14efcf11e96aa0346ccc0a931ad6f0a2d1dea828 Author: Alex Deucher Date: Thu May 11 13:46:12 2017 -0400 drm/amd/powerplay/smu7: add vblank check for mclk switching (v2) Check to make sure the vblank period is long enough to support mclk switching. v2: drop needless initial assignment (Nils) bug: https://bugs.freedesktop.org/show_bug.cgi?id=96868 Cc: stable@vger.kernel.org Acked-by: Christian König Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 31 +++++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) commit ab03d9fe508f4e2914a8f4a9eef1b21051cacd0f Author: Alex Deucher Date: Thu May 11 13:14:14 2017 -0400 drm/radeon/ci: disable mclk switching for high refresh rates (v2) Even if the vblank period would allow it, it still seems to be problematic on some cards. v2: fix logic inversion (Nils) bug: https://bugs.freedesktop.org/show_bug.cgi?id=96868 Cc: stable@vger.kernel.org Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/ci_dpm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7121316b6dd7afe039630f0966aaebfb1742c0e5 Author: Alex Deucher Date: Thu May 11 13:10:02 2017 -0400 drm/amdgpu/ci: disable mclk switching for high refresh rates (v2) Even if the vblank period would allow it, it still seems to be problematic on some cards. v2: fix logic inversion (Nils) bug: https://bugs.freedesktop.org/show_bug.cgi?id=96868 Cc: stable@vger.kernel.org Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 32601d48d783ac66e22fb506409a414c426784c0 Author: Christian König Date: Wed May 10 20:06:58 2017 +0200 drm/amdgpu: fix fundamental suspend/resume issue Reinitializing the VM manager during suspend/resume is a very very bad idea since all the VMs are still active and kicking. This can lead to random VM faults after resume when new processes become the same client ID assigned. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 +++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 15 ++------------- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 15 ++------------- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 15 ++------------- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++-------------- 6 files changed, 30 insertions(+), 54 deletions(-) commit ce682ef6e3e019f98cafbdc7058668e0ea8f4a13 Author: Eric Dumazet Date: Tue May 23 12:38:35 2017 -0700 tcp: fix TCP_SYNCNT flakes After the mentioned commit, some of our packetdrill tests became flaky. TCP_SYNCNT socket option can limit the number of SYN retransmits. retransmits_timed_out() has to compare times computations based on local_clock() while timers are based on jiffies. With NTP adjustments and roundings we can observe 999 ms delay for 1000 ms timers. We end up sending one extra SYN packet. Gimmick added in commit 6fa12c850314 ("Revert Backoff [v3]: Calculate TCP's connection close threshold as a time value") makes no real sense for TCP_SYN_SENT sockets where no RTO backoff can happen at all. Lets use a simpler logic for TCP_SYN_SENT sockets and remove @syn_set parameter from retransmits_timed_out() Fixes: 9a568de4818d ("tcp: switch TCP TS option (RFC 7323) to 1ms clock") Signed-off-by: Eric Dumazet Signed-off-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_timer.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 64dba236a15770af1e07f90f23a54789c9f9a3ba Author: Vivien Didelot Date: Tue May 23 15:20:59 2017 -0400 net: dsa: support cross-chip ageing time Now that the switchdev bridge ageing time attribute is propagated to all switch chips of the fabric, each switch can check if the requested value is valid and program itself, so that the whole fabric shares a common ageing time setting. This is especially needed for switch chips in between others, containing no bridge port members but evidently used in the data path. To achieve that, remove the condition which skips the other switches. We also don't need to identify the target switch anymore, thus remove the sw_index member of the dsa_notifier_ageing_time_info notifier structure. On ZII Dev Rev B (with two 88E6352 and one 88E6185) and ZII Dev Rev C (with two 88E6390X), we have the following hardware configuration: # ip link add name br0 type bridge # ip link set master br0 dev lan6 br0: port 1(lan6) entered blocking state br0: port 1(lan6) entered disabled state # echo 2000 > /sys/class/net/br0/bridge/ageing_time Before this patch: zii-rev-b# cat /sys/kernel/debug/mv88e6xxx/sw*/age_time 300000 300000 15000 zii-rev-c# cat /sys/kernel/debug/mv88e6xxx/sw*/age_time 300000 18750 After this patch: zii-rev-b# cat /sys/kernel/debug/mv88e6xxx/sw*/age_time 15000 15000 15000 zii-rev-c# cat /sys/kernel/debug/mv88e6xxx/sw*/age_time 18750 18750 Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 1 - net/dsa/port.c | 1 - net/dsa/switch.c | 4 ---- 3 files changed, 6 deletions(-) commit 39a7d52766b9a795f382e9b1c51ea47a9574a990 Merge: 2a7f38c 8a41d84 Author: David S. Miller Date: Wed May 24 16:22:13 2017 -0400 Merge branch 'mlxsw-tcpflags' Jiri Pirko says: ==================== net: add tcp flags match support to flower and offload it This patch adds support to dissect tcp flags, match on them using flower classifier and offload such rules to mlxsw Spectrum devices. v1->v2: - removed no longer relevant comment from patch 1 as suggested by Or - sent correct patches this time ==================== Signed-off-by: David S. Miller commit 8a41d845c4fd64e6bf909aafa977472689e8c7a5 Author: Jiri Pirko Date: Tue May 23 18:40:48 2017 +0200 mlxsw: spectrum_flower: Add support for tcp flags Allow to offload rules that contain tcp flags within the mask. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 29 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit dea2d6457fce0e1829ae543b2c47d84e51a71445 Author: Jiri Pirko Date: Tue May 23 18:40:47 2017 +0200 mlxsw: spectrum: Add acl block containing tcp flags for ipv4 Add acl block called "ipv4" which contains tcp flags. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.h | 6 ++++++ 1 file changed, 6 insertions(+) commit b4d39b4b547f9287e05a725f4fb77dd5413dc3c9 Author: Jiri Pirko Date: Tue May 23 18:40:46 2017 +0200 mlxsw: acl: Add tcp flags acl element Define new element for tcp flags and place it into scratch area. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h | 2 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 1 + 2 files changed, 3 insertions(+) commit fdfc7dd6ca39b117c709dceee8d32ac4447294d6 Author: Jiri Pirko Date: Tue May 23 18:40:45 2017 +0200 net/sched: flower: add support for matching on tcp flags Benefit from the support of tcp flags dissection and allow user to insert rules matching on tcp flags. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 3 +++ net/sched/cls_flower.c | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit ac4bb5de27010e41f027c635dedca1393e7ebf55 Author: Jiri Pirko Date: Tue May 23 18:40:44 2017 +0200 net: flow_dissector: add support for dissection of tcp flags Add support for dissection of tcp flags. Uses similar function call to tcp dissection function as arp, mpls and others. Signed-off-by: Jiri Pirko Acked-by: Or Gerlitz Signed-off-by: David S. Miller include/net/flow_dissector.h | 9 +++++++++ net/core/flow_dissector.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 93f66edd440fb5c5c97cb211d8560479520f01af Author: Baolin Wang Date: Thu May 18 10:49:19 2017 +0800 DT: hwspinlock: Add binding documentation for Spreadtrum hwspinlock This patch adds the binding documentation for Spreadtrum hardware spinlock device. Acked-by: Rob Herring Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson .../devicetree/bindings/hwlock/sprd-hwspinlock.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 2a7f38c53857d03431897dc97ca83c0af459b7fd Merge: 417ccf6 712c3cb Author: David S. Miller Date: Wed May 24 15:17:22 2017 -0400 Merge branch 'qed-next' Yuval Mintz says: ==================== qed/qede: Mostly-cleanup series This series contains some cleanup of the qed and qede code: - #1 contains mostly static/endian changes in order to allow qede to pass sparse compilation cleanly. - #2, #5 and #6 are either semantic or remove dead-code from driver. - #9, #10 and #11 relate to printing and slightly change some APIs between qed and the protocol drivers for that end [sharing the interface names and information regarding device]. The rest of the patches are minor changes/fixes to various flows in qed. ==================== Signed-off-by: David S. Miller commit 712c3cbf193fcadf0ba67da61432beb1a71e400b Author: Mintz, Yuval Date: Tue May 23 09:41:28 2017 +0300 qed: Replace set_id() api with set_name() Current API between qed and protocol modules allows passing an additional private string - but it doesn't get utilized by qed anywhere. Clarify the API by removing it and renaming it 'set_name'. CC: Manish Rangankar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 1 - drivers/net/ethernet/qlogic/qed/qed_main.c | 9 +++------ drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++-- drivers/scsi/qedf/qedf_main.c | 2 +- drivers/scsi/qedi/qedi_main.c | 2 +- include/linux/qed/qed_if.h | 4 +--- 6 files changed, 8 insertions(+), 14 deletions(-) commit 6bc9f234ff75c15144fb9bc28d828a5ca11cd0a2 Author: Mintz, Yuval Date: Tue May 23 09:41:27 2017 +0300 qede: Log probe of PCI device Replace meaningless logged print ('Ending successfully qede probe') with a single-liner containing interesting information about probed device. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 40 ++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit ae33666ab89675968d77753d18452b1ef654c43a Author: Tomer Tayar Date: Tue May 23 09:41:26 2017 +0300 qed: Provide MBI information in dev_info Pass additional information about package installed on persistent memory so that protocol drivers would be able to log it. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hsi.h | 6 ++++++ drivers/net/ethernet/qlogic/qed/qed_main.c | 3 +++ drivers/net/ethernet/qlogic/qed/qed_mcp.c | 30 ++++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 12 ++++++++++++ include/linux/qed/qed_if.h | 17 +++++++++++++++++ 5 files changed, 68 insertions(+) commit f855df220238436d10c3de67da0b1a280a2092b4 Author: Michal Kalderon Date: Tue May 23 09:41:25 2017 +0300 qed: Enable RoCE parser searching on fp init Since we're closing the parser searching for RDMA when stoping the fastpath, we need to re-enable it when starting the fastpath once again. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 06892f2ea2bd6b146707e4ab367aa5b20eac0ba7 Author: Tomer Tayar Date: Tue May 23 09:41:24 2017 +0300 qed: Flush slowpath tasklet on stop Today, driver has a synchronization point while closing the device which synchronizes its slowpath interrupt line. However, that's insufficient as that ISR would schedule the slowpath-tasklet - so even after ISR is over it's possible the handling of the interrupt has not completed. By doing a disable/enable on the taskelt we guarantee that all HW events that should no longer be genereated from that point onward in the flow are truly behind us. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c31a314b2346819531d3a6585988cef32171312e Author: Mintz, Yuval Date: Tue May 23 09:41:23 2017 +0300 qed: Remove BB_A0 references A0 never went public, so no need to protect against it. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 6 ------ drivers/net/ethernet/qlogic/qed/qed_dev.c | 6 ------ 2 files changed, 12 deletions(-) commit 78cea9ffaa34d289212a2444c2e357f7dabcf674 Author: Tomer Tayar Date: Tue May 23 09:41:22 2017 +0300 qed: Drop the 's' from num_ports_in_engines The parameter reflects the number of physical ports connected to a single engine, not all. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 36 +++++++++++++++---------------- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_ptp.c | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) commit fc561c8bfe831c1509b7f6af3f45fbea78632539 Author: Tomer Tayar Date: Tue May 23 09:41:21 2017 +0300 qed: Log incorrectly installed board In case nvram layout of board is incorrect, board may exhibit peculiar oddities. Log such a rare event. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 +++++ drivers/net/ethernet/qlogic/qed/qed_hsi.h | 2 ++ 2 files changed, 7 insertions(+) commit 4f64675fac061746be112047fab5979e86768a08 Author: Manish Chopra Date: Tue May 23 09:41:20 2017 +0300 qed: !main_ptt for tunnel configuration Flows configuring tunnel ports in HW use the main_ptt which should be reserved for core-functionality. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 3 ++- drivers/net/ethernet/qlogic/qed/qed_l2.c | 17 +++++++++++++++-- drivers/net/ethernet/qlogic/qed/qed_sp.h | 3 +++ drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 14 +++++++++----- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 2 +- 5 files changed, 30 insertions(+), 9 deletions(-) commit 9d7650c25498e4f51213fe48eddde5778434f375 Author: Mintz, Yuval Date: Tue May 23 09:41:19 2017 +0300 qed: Align DP_ERR style with other DP macros Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller include/linux/qed/qed_if.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 48848a0690a36d0248255f6c3b7b6fd2a9948a57 Author: Manish Chopra Date: Tue May 23 09:41:18 2017 +0300 qede: Fix sparse warnings Solves the following warning in qede - - Several cases of missing cpu_to_le16() conversions - Adds 'static' to one function declaration - Removes dcbnl operation that's currently getting populated twice Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_dcbnl.c | 1 - drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 10 ++++++---- drivers/net/ethernet/qlogic/qede/qede_fp.c | 25 ++++++++++++++----------- drivers/net/ethernet/qlogic/qede/qede_roce.c | 4 ++-- 4 files changed, 22 insertions(+), 18 deletions(-) commit 96203fb4237bf70f0fd0fa307ca2975077db3ceb Author: Kuninori Morimoto Date: Thu May 18 01:40:20 2017 +0000 ASoC: hdmi-codec: add .get_dai_id support ALSA SoC needs to know connected DAI ID for probing. It is not a big problem if device/driver was only for sound, but getting DAI ID will be difficult if device includes both Video/Sound, like HDMI. To solve this issue, this patch adds new .get_dai_id callback on hdmi_codec_ops Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/hdmi-codec.h | 9 +++++++++ sound/soc/codecs/hdmi-codec.c | 13 +++++++++++++ 2 files changed, 22 insertions(+) commit 24069b589b02cc1292761b0f72623dd50ad1e19c Author: Kuninori Morimoto Date: Thu May 18 01:40:02 2017 +0000 ASoC: hdmi-codec: remove multi detection support DesignWare HDMI driver (= dw-hdmi) is supporting HDMI sound, and its probe function was calling sound binding function multiple times as same HDMI device different port. Because of this behavior, commit 9731f82d601 ("ASoC: hdmi-codec: enable multi probe for ...") was added for multi detection case. But, this DesignWare HDMI detection/bind code was exchanged/adjusted by commit 69497eb9234 ("drm: bridge: dw-hdmi: Implement DRM bridge..."). Now, all DesignWare HDMI sound ports are detected as 1 bindng function. Because of this, hdmi-codec multi detection support is no longer needed. Thus, this patch removes commit 9731f82d601 ("ASoC: hdmi-codec: enable multi probe for ..."), and its related commit 340327a62c4 ("ASoC: hdmi-codec: Fix hdmi_of_xlate_dai_name...") commit 8480ac56795 ("ASoC: hdmi-codec: remove HDMI device unregister") commit 0c343a35bfe ("ASoC: hdmi-codec: fix spelling mistake: ...) Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 88 ++----------------------------------------- 1 file changed, 3 insertions(+), 85 deletions(-) commit e82f1f7907db860febf6e55bf9702bba34f504c7 Merge: 0c343a3 73b17f1 Author: Mark Brown Date: Wed May 24 18:45:17 2017 +0100 Merge branch 'topic/of-graph' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-hdmi commit 73b17f1a65c881fcf97109d77056006da2d40152 Author: Kuninori Morimoto Date: Thu May 18 01:39:44 2017 +0000 ASoC: simple-card-utils: support snd_soc_get_dai_id() ALSA SoC needs to know connected DAI ID for detecting. It is not a big problem if device/driver was only for sound, but getting DAI ID will be difficult if device includes both Video/Sound, like HDMI. To solve this issue, this patch adds new snd_soc_get_dai_id() and its related .of_xlate_dai_id callback on component driver. In below case, we can handle Sound port (= port@2) as ID = 0 if .of_xlate_dai_id has its support. hdmi { port@0 { /* VIDEO */ }; port@1 { /* VIDEO */ }; port@2 { /* SOUND */ }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7932787f03f33493455360df936d10d0d04fc7c5 Merge: 55cfebf a180e8b Author: Mark Brown Date: Wed May 24 18:44:06 2017 +0100 Merge branch 'topic/dai-id' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-of-graph commit a180e8b988437b3e84a1b501ac4d073467602ca6 Author: Kuninori Morimoto Date: Thu May 18 01:39:25 2017 +0000 ASoC: add snd_soc_get_dai_id() function ALSA SoC needs to know connected DAI ID for detecting. It is not a big problem if device/driver was only for sound, but getting DAI ID will be difficult if device includes both Video/Sound, like HDMI. To solve this issue, this patch adds new snd_soc_get_dai_id() and its related .of_xlate_dai_id callback on component driver. In below case, we can handle Sound port (= port@2) as ID = 0 if .of_xlate_dai_id has its support. hdmi { port@0 { /* VIDEO */ }; port@1 { /* VIDEO */ }; port@2 { /* SOUND */ }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 3 +++ sound/soc/soc-core.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit 0809d9871d1066634f8abae9ecfbdfadecb8cd35 Author: Naveen M Date: Mon May 15 13:42:17 2017 +0530 ASoC: Intel: Add Kabylake RT5663+MAX98927 machine driver entry Adds kbl_rt5663_max98927_i2s machine driver entry into machine table Signed-off-by: Naveen M Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ec040dd5ef6478222fc4ed5b0ffced7bc95d2f27 Author: Naveen M Date: Mon May 15 13:42:16 2017 +0530 ASoC: Intel: Add Kabylake Realtek Maxim machine driver This patch adds Kabylake I2S machine driver which uses codecs MAX98927 as speakers and RT5663 as headset, configured to ssp0 & ssp1 respectively. Signed-off-by: Naveen M Signed-off-by: Harsha Priya Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 15 + sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/kbl_rt5663_max98927.c | 687 +++++++++++++++++++++++++++ 3 files changed, 704 insertions(+) commit 54746dabf770eb268d302f2f770d6dacea24f08a Author: Naveen M Date: Mon May 15 13:42:15 2017 +0530 ASoC: Improve machine driver selection based on quirk data Use quirk function to select the correct machine driver by checking all codecs instead of only one based on quirk data. Signed-off-by: Naveen M Signed-off-by: Harsha Priya Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/common/sst-acpi.h | 20 ++++++++++++++++++++ sound/soc/intel/common/sst-match-acpi.c | 18 ++++++++++++++++++ sound/soc/intel/skylake/skl.c | 14 ++++++++++++++ 3 files changed, 52 insertions(+) commit 7827d66946ad3af734ed46d1d68c23fa6974595c Author: Naveen M Date: Mon May 15 13:42:14 2017 +0530 ASoC: Move quirk to identify correct machine driver sst_acpi_mach has a quirk field to handle board specific quirks. Patch moves quirk call to sst_acpi_find_machine() instead of calling it in respective driver Signed-off-by: Naveen M Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 2 -- sound/soc/intel/common/sst-match-acpi.c | 12 +++++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) commit 915ae2b9f0fe0357a8f9cc53a7eb18ded03d11a4 Author: Naveen M Date: Mon May 15 13:42:13 2017 +0530 ASoC: Intel: Create a helper to search for matching machine Create a helper function to search for a matching machine based on HID. No functional change Signed-off-by: Naveen M Signed-off-by: Harsha Priya Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/common/sst-acpi.h | 3 +++ sound/soc/intel/common/sst-match-acpi.c | 19 +++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) commit 9bf70cd4cd9f82a5f914fbf1fa0d32eff7a5d892 Author: Naveen M Date: Mon May 15 13:42:12 2017 +0530 ASoC: Intel: Convert skl machine data to C99 style C99 style struct initialization helps in readability as well as initialization of variables not specified as NULL. Patch modifies all skl machine data. Suggested-by: Takashi Iwai Signed-off-by: Naveen M Signed-off-by: Vinod Koul Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 60 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 11 deletions(-) commit edc692e5059450350bba38446dc330a31de964f4 Author: Naveen M Date: Mon May 15 13:42:11 2017 +0530 ASoC: Intel: Convert atom machine data to C99 style C99 style struct initialization helps in readability as well as initialization of variables not specified as NULL. Patch modifies all atom machine data. Suggested-by: Takashi Iwai Signed-off-by: Naveen M Signed-off-by: Vinod Koul Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 209 ++++++++++++++++++++++++++++-------- 1 file changed, 162 insertions(+), 47 deletions(-) commit 133e6e5c27340fe2205537373e50d43881a0f745 Author: Shreyas NC Date: Mon May 15 19:44:31 2017 +0530 ASoC: Intel: Skylake: Support for multiple data blocks Module init params are additional data block in the module private data. Skylake driver doesn't yet have support to parse multiple data blocks if it appears in private data. Add support for parsing of multiple data blocks and module init params. Signed-off-by: Shreyas NC Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 9a075265c6dc040e2946d21f4f9d082495bd5460 Author: Matthias Kaehlcke Date: Mon May 22 17:12:58 2017 -0700 ASoC: Intel: sst: Remove unused function sst_restore_shim64() Looks like the function has never been used since it was added by commit b0d94acd634a ("ASoC: Intel: mrfld - add shim save restore"). Removing it fixes the following warning when building with clang: sound/soc/intel/atom/sst/sst.c:360:20: error: unused function 'sst_restore_shim64' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.c | 16 ---------------- 1 file changed, 16 deletions(-) commit f0168a9bfdfd6058c78207616348fed3cd52e739 Author: Keerthy Date: Tue May 23 17:46:55 2017 +0530 regulator: lp87565: Add support for lp87565 PMIC regulators The regulators set consists of 4 BUCKs. The output voltages are configurable and are meant to supply power to the main processor and other components. The ramp delay is configurable for all BUCKs. The BUCKs can be configured in single phase or multiphase modes. Signed-off-by: Keerthy Signed-off-by: Mark Brown drivers/regulator/Kconfig | 8 ++ drivers/regulator/Makefile | 1 + drivers/regulator/lp87565-regulator.c | 237 ++++++++++++++++++++++++++++++++++ 3 files changed, 246 insertions(+) commit 454fa271bc4e71090ef55087027c3f8701fadc5b Author: Neil Armstrong Date: Tue May 23 15:39:33 2017 +0200 spi: Add Meson SPICC driver The SPICC hardware block on the Amlogic SoCs is Communication oriented and can do Full-Duplex 8- to 32-bit width SPI transfers up to 30MHz. The current driver only supportd the PIO transfer mode since the DMA seems broken on available hardware. Signed-off-by: Neil Armstrong Signed-off-by: Mark Brown drivers/spi/Kconfig | 7 + drivers/spi/Makefile | 1 + drivers/spi/spi-meson-spicc.c | 619 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 627 insertions(+) commit 01a330da0c0ea2971be039f74a2288cbd2d17fbf Author: Neil Armstrong Date: Tue May 23 15:39:32 2017 +0200 spi: meson: Add SPICC bindings Add the SPICC (SPI Communications Controller) bindings variant. Signed-off-by: Neil Armstrong Signed-off-by: Mark Brown .../devicetree/bindings/spi/spi-meson.txt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 177e27133ae9c9f5cbc306feaaa53d8fbc75e45f Author: Charles Keepax Date: Tue May 23 16:03:39 2017 +0100 ASoC: cs4271: Remove unnecessary additional variable definition The function already defines a ret variable at the top and makes no particular use of the shadowed definition, as such remove the redundant definition. Signed-off-by: Charles Keepax Acked-by: Paul Handrigan Signed-off-by: Mark Brown sound/soc/codecs/cs4271.c | 2 -- 1 file changed, 2 deletions(-) commit 140385d87adce8d00864667f5132770ac5a13dac Author: Matthias Kaehlcke Date: Tue May 23 12:05:09 2017 -0700 ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai() Looks like the function has never been used since it was added by commit 17119a465706 ("ASoC: Intel: Add Cherrytrail & Braswell machine driver cht_bsw_max98090_ti"). Removing it fixes the following warning when building with clang: sound/soc/intel/boards/cht_bsw_max98090_ti.c:42:35: error: unused function 'cht_get_codec_dai' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 ------------ 1 file changed, 12 deletions(-) commit f6db09488f58372909728cea5a7c063ebf78f386 Author: Richard Fitzgerald Date: Wed May 24 10:59:39 2017 +0100 ASoC: wm_adsp: Remove unused member of struct wm_coeff_ctl_ops The xinfo member of struct wm_coeff_ctl_ops is never used. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 2 -- 1 file changed, 2 deletions(-) commit 6298117a5c5c5c5217b59640d6df7fe078fa7d88 Author: Richard Fitzgerald Date: Wed May 24 10:59:38 2017 +0100 ASoC: wm_adsp: Fix type warning in sprintf The shift member of struct soc_mixer_control is unsigned int. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b28b9149b37f909a05f1e06e5a8b262a519dbd2b Author: Chris Packham Date: Tue May 23 16:03:21 2017 +1200 spi: orion: Handle GPIO chip-selects Some hardware designs use GPIOs to add (or supplement) the SPI chip-select so that more than one SPI slave device can be used. For this to work with the spi-orion driver the SPI_MASTER_GPIO_SS flag needs to be set (because the other outputs are gated internally by the CS) and the correct chip-select (in this case CS0) needs to be driven by the controller. Signed-off-by: Chris Packham Signed-off-by: Mark Brown drivers/spi/spi-orion.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b08a20f58d2efcd88bf5276e34cd4020028accb7 Author: Icenowy Zheng Date: Wed May 24 18:05:59 2017 +0800 ASoC: sun8i-codec-analog: split out mbias Allwinner V3s features an analog codec without MBIAS pin. Split out this part, in order to prepare for the V3s analog codec. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec-analog.c | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) commit 7ac45d1635a4cd2e99a4b11903d4a2815ca1b27b Author: Julian Scheel Date: Wed May 24 12:28:23 2017 +0200 ASoC: simple-card: Fix misleading error message In case cpu could not be found the error message would always refer to /codec/ not being found in DT. Fix this by catching the cpu node not found case explicitly. Signed-off-by: Julian Scheel Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 51d1eda5d852e517953996799780ee4fda31e341 Author: Krzysztof Kozlowski Date: Tue May 16 22:06:48 2017 +0200 pinctrl: samsung: Add include guard to local header The pinctrl-exynos.h header is included only once so till now it did not require an include guard. However adding such is harmless and makes code prepared for more inclusions. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar drivers/pinctrl/samsung/pinctrl-exynos.h | 5 +++++ 1 file changed, 5 insertions(+) commit 71ebc9a3795818eab52e81bbcbdfae130ee35d9e Author: Chris Wilson Date: Tue May 16 12:10:42 2017 +0100 dma-buf/sync-file: Defer creation of sync_file->name Constructing the name takes the majority of the time for allocating a sync_file to wrap a fence, and the name is very rarely used (only via the sync_file status user interface). To reduce the impact on the common path (that of creating sync_file to pass around), defer the construction of the name until it is first used. v2: Update kerneldoc (kbuild test robot) v3: sync_debug.c was peeking at the name v4: Comment upon the potential race between two users of sync_file_get_name() and claim that such a race is below the level of notice. However, to prevent any future nuisance, use a global spinlock to serialize the assignment of the name. v5: Completely avoid the read/write race by only storing the name passed in from the user inside sync_file->user_name and passing in a buffer to dynamically construct the name otherwise. Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Gustavo Padovan Cc: Daniel Vetter Cc: David Herrmann Reviewed-by: Daniel Vetter Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170516111042.24719-1-chris@chris-wilson.co.uk drivers/dma-buf/sync_debug.c | 4 +++- drivers/dma-buf/sync_file.c | 39 ++++++++++++++++++++++++++++++++------- include/linux/sync_file.h | 11 +++++++++-- 3 files changed, 44 insertions(+), 10 deletions(-) commit c16f291dee8b7dc28d4bd0f395ccecf3f898cd21 Author: Mauro Carvalho Chehab Date: Thu May 18 22:26:04 2017 -0300 sync_file.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use markup for document title and authorship; - Mark literal blocks; - Use a numbered list for references. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/e781f61e582e7c7eb5de456608043aff9fe2b2b5.1495157082.git.mchehab@s-opensource.com Documentation/sync_file.txt | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 98f44cb0655cbef0850ba7ff4c8213fb1bf9b6a2 Author: Igor Mitsyanko Date: Thu May 11 14:51:01 2017 -0700 qtnfmac: introduce new FullMAC driver for Quantenna chipsets This patch adds support for new FullMAC WiFi driver for Quantenna QSR10G chipsets. QSR10G (aka Pearl) is Quantenna's 8x8, 160M, 11ac offering. QSR10G supports 2 simultaneous WMACs - one 5G and one 2G. 5G WMAC supports 160M, 8x8 configuration. FW supports up to 8 concurrent virtual interfaces on each WMAC. Patch introduces 2 new drivers: - qtnfmac.ko for interfacing with kernel wireless core - qtnfmac_pearl_pcie.ko for interfacing with hardware over PCIe interface Signed-off-by: Dmitrii Lebed Signed-off-by: Sergei Maksimenko Signed-off-by: Sergey Matyukevich Signed-off-by: Bindu Therthala Signed-off-by: Huizhao Wang Signed-off-by: Kamlesh Rath Signed-off-by: Avinash Patil Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo MAINTAINERS | 8 + drivers/net/wireless/Kconfig | 1 + drivers/net/wireless/Makefile | 1 + drivers/net/wireless/quantenna/Kconfig | 16 + drivers/net/wireless/quantenna/Makefile | 6 + drivers/net/wireless/quantenna/qtnfmac/Kconfig | 19 + drivers/net/wireless/quantenna/qtnfmac/Makefile | 31 + drivers/net/wireless/quantenna/qtnfmac/bus.h | 139 ++ drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 995 ++++++++++ drivers/net/wireless/quantenna/qtnfmac/cfg80211.h | 43 + drivers/net/wireless/quantenna/qtnfmac/commands.c | 1982 ++++++++++++++++++++ drivers/net/wireless/quantenna/qtnfmac/commands.h | 74 + drivers/net/wireless/quantenna/qtnfmac/core.c | 618 ++++++ drivers/net/wireless/quantenna/qtnfmac/core.h | 173 ++ drivers/net/wireless/quantenna/qtnfmac/debug.c | 46 + drivers/net/wireless/quantenna/qtnfmac/debug.h | 50 + drivers/net/wireless/quantenna/qtnfmac/event.c | 452 +++++ drivers/net/wireless/quantenna/qtnfmac/event.h | 27 + .../net/wireless/quantenna/qtnfmac/pearl/pcie.c | 1378 ++++++++++++++ .../quantenna/qtnfmac/pearl/pcie_bus_priv.h | 89 + .../wireless/quantenna/qtnfmac/pearl/pcie_ipc.h | 158 ++ .../quantenna/qtnfmac/pearl/pcie_regs_pearl.h | 353 ++++ drivers/net/wireless/quantenna/qtnfmac/qlink.h | 901 +++++++++ .../net/wireless/quantenna/qtnfmac/qlink_util.c | 71 + .../net/wireless/quantenna/qtnfmac/qlink_util.h | 80 + .../net/wireless/quantenna/qtnfmac/qtn_hw_ids.h | 32 + drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c | 176 ++ drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h | 80 + .../net/wireless/quantenna/qtnfmac/shm_ipc_defs.h | 46 + drivers/net/wireless/quantenna/qtnfmac/trans.c | 224 +++ drivers/net/wireless/quantenna/qtnfmac/trans.h | 57 + drivers/net/wireless/quantenna/qtnfmac/util.c | 114 ++ drivers/net/wireless/quantenna/qtnfmac/util.h | 45 + 33 files changed, 8485 insertions(+) commit e578618934cbbdfdb02c5e2382be281fc8af1135 Author: Dan Carpenter Date: Sat May 20 00:25:39 2017 +0300 rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false We only want to disable this if bt_disable_cnt is >= 2. Fixes: f66509e3d7c2 ("rtlwifi: btcoex: Remove 23b 1ant configuration parameter") Signed-off-by: Dan Carpenter Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86aeb82563b7b20f8b8050a065ce907bd3a2a4b1 Author: Yan-Hsuan Chuang Date: Sat May 20 10:49:07 2017 -0500 rtlwifi: btcoex: 23b 1ant: turn off ps and tdma mechanism when concurrent mode When wifi is under concurrent mode, we can not distinguish if it is the real PS or just a fake one by sending null data, so we turn it off in case of miracast scenario. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 100 +++++++++++++++------ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 19 ++++ 2 files changed, 91 insertions(+), 28 deletions(-) commit f9cbb5b4e90e78a4a7293283f278486a4a83e29d Author: Ping-Ke Shih Date: Sat May 20 10:49:06 2017 -0500 rtlwifi: btcoex: 23b 1ant: fine tune for bt_sco_hid busy Fine tune the parameters in case of act_bt_sco_hid_only_busy. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40ca18823515608737c28214d38e90fc4387fa0c Author: Ping-Ke Shih Date: Sat May 20 10:49:05 2017 -0500 rtlwifi: btcoex: 23b 1ant: fine tune for wifi not connected Fine tune the parameters in cases of scan, assoc and auth when wifi isn't connected. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 37 ++++++++++++++-------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 1ecdc4363f994d98197dd41e5e26aa1d9c3d6455 Author: Ping-Ke Shih Date: Sat May 20 10:49:04 2017 -0500 rtlwifi: btcoex: 23b 1ant: fine tune for wifi connected Fine tune the parameters in cases of bt_acl_busy and scan when wifi is connected. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 114 ++++++++++++++------- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 2 + 2 files changed, 79 insertions(+), 37 deletions(-) commit 056faad2e980c337fb8938793438c3dba2b78c17 Author: Ping-Ke Shih Date: Sat May 20 10:49:03 2017 -0500 rtlwifi: btcoex: 23b 1ant: coex table fine tune Set register settings for coex table fine tune. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 56 +++++++++++++++++++--- 1 file changed, 50 insertions(+), 6 deletions(-) commit 46b5689c3761a901872ce7bd4ecf21810b2577be Author: Ping-Ke Shih Date: Sat May 20 10:49:02 2017 -0500 rtlwifi: btcoex: 23b 1ant: Add coex_table_type to log Display coex_table_type in log. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 5 +++++ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 1 + 2 files changed, 6 insertions(+) commit 8be514054d26baa94a14ad9c3e6c4cccf0478490 Author: Ping-Ke Shih Date: Sat May 20 10:49:01 2017 -0500 rtlwifi: btcoex: 23b 1ant: remove verbose log from periodic function Simplify the debug trace log. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 33 ---------------------- 1 file changed, 33 deletions(-) commit 5ae40d993576f829e386f27132a79fd61b5c75e6 Author: Ping-Ke Shih Date: Sat May 20 10:49:00 2017 -0500 rtlwifi: btcoex: 23b 1ant: check more cases when bt is queing If bt is queing, we need to set the packet priority properly. Originally we only consider if wifi was connected or not, but now we also consider if bt is under abnormal scan or wifi is scanning, roaming or linking, and set the coex table. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 57 +++++++++++++++------- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 1 + 2 files changed, 40 insertions(+), 18 deletions(-) commit c34e42aa3e6e37a3625f88c96bd4923b93d83b6d Author: Ping-Ke Shih Date: Sat May 20 10:48:59 2017 -0500 rtlwifi: btcoex: 23b 1ant: define wifi in high priority task. Add the definition of wifi in high priority task for bt inquiry. According to driver's notifications, btc will knows whether wifi is in high priority tasks or not. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 15 +++++++++++++++ .../wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 1 + 2 files changed, 16 insertions(+) commit fa73a1ebe720c8360d6cce251487cb3917c16e09 Author: Ping-Ke Shih Date: Sat May 20 10:48:58 2017 -0500 rtlwifi: btcoex: 23b 1ant: Special packets statistic in notification Count and log special packets of DHCP, EAPOL and ARP, and check whether the interface is in 4-way handshake. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 27 +++++++++++++++++++++- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 1 + 2 files changed, 27 insertions(+), 1 deletion(-) commit 29c1de91937a5f6204a9dabf9049c263b4a2b57c Author: Ping-Ke Shih Date: Fri May 19 10:59:37 2017 -0500 rtlwifi: btcoex: 23b 1ant: Revise media status notify to fix no scan result issue Force antenna setup for no scan result issue Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 39 ++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) commit f9af7af4a10cbb0c763ef76e9de756cbfea3e09f Author: Ping-Ke Shih Date: Fri May 19 10:59:36 2017 -0500 rtlwifi: btcoex: 23b 1ant: fine tune connect notify When association starts, force antenna setup for no scan result issue. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 3ceac0a772b0b656a538c0d7a13cf881d00c195a Author: Ping-Ke Shih Date: Fri May 19 10:59:35 2017 -0500 rtlwifi: btcoex: 23b 1ant: Add rf status notification If driver announce wifi RF status is off, btc can switch antenna to BT. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 37 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 2 ++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 3 ++ 3 files changed, 42 insertions(+) commit 53e18bcf3c7a8f7067b37c995733b3d3e6ab720d Author: Ping-Ke Shih Date: Fri May 19 10:59:34 2017 -0500 rtlwifi: btcoex: 23b 1ant: Setup register for BT WHCK test If BT is under WHCK, we enter a special mode. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 25 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 1 + 2 files changed, 26 insertions(+) commit 7d0d2c14cc039823b3dcb22b2adc7e130d62f850 Author: Ping-Ke Shih Date: Fri May 19 10:59:33 2017 -0500 rtlwifi: btcoex: 23b 1ant: parse more BT information from C2H BT FW provide more BT status as clues, thus we also display them in coex log to help debug in field. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 98 +++++++++++++++++++--- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 5 ++ 2 files changed, 91 insertions(+), 12 deletions(-) commit f9c6ede79af346ac27cff8d867f4a19ea8d2931d Author: Ping-Ke Shih Date: Fri May 19 10:59:32 2017 -0500 rtlwifi: btcoex: 23b 1ant: Add power_on_setting This change is highly related to init_hwconfig that was decomposed into two parts for better program flow. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 69 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 1 + 2 files changed, 70 insertions(+) commit 8ffb5b6926875bf70c4d403a6cf96f7da65e6d74 Author: Ping-Ke Shih Date: Fri May 19 10:59:31 2017 -0500 rtlwifi: btcoex: 23b 1ant: add wifi_only argument to init_hwconfig In case of wifi_only, we can simply switch antenna to wifi. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 102 +++++++++------------ .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 4 +- 2 files changed, 47 insertions(+), 59 deletions(-) commit 0d4ae142262298c149ea60956bf108b6db011b58 Author: Ping-Ke Shih Date: Fri May 19 10:59:30 2017 -0500 rtlwifi: btcoex: 23b 1ant: adjust wifi duration for bt a2dp The larger the bt a2dp bit pool is, the more time bt needs to receive them. If we do not adjust the wifi duration, the voice quality will be low. Hence we reduce the time that wifi holds, to improve the a2dp service. If the bt is slave, it may receive a packet at any time, so we need to mark them as high priority packets in case of packet loss Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 326 +++++++++++++++------ .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 2 + 2 files changed, 246 insertions(+), 82 deletions(-) commit c01fd117e581193c0929ad70d6716be703b414e0 Author: Ping-Ke Shih Date: Fri May 19 10:59:29 2017 -0500 rtlwifi: btcoex: 23b 1ant: need these information when scan Log the scan procedure, and update ap_num for future usage when scan done. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 30 ++++++++++++++++++++-- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 1 + 2 files changed, 29 insertions(+), 2 deletions(-) commit 96e3baadd01a1608287fe848b5889184e7791dab Author: Ping-Ke Shih Date: Fri May 19 10:59:28 2017 -0500 rtlwifi: btcoex: 23b 1ant: Switch antenna to wifi or BT. Since wifi and BT share the same physical antenna, we should switch antenna to fit every situation. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 326 ++++++++++++--------- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 3 + 2 files changed, 198 insertions(+), 131 deletions(-) commit 1a79ddaa903b44cdf442d6bc5e4878337132aa54 Author: Tom Gaudasinski Date: Thu May 18 19:27:50 2017 +1000 rt2x00: Add device ID for Epson WN7512BEP Make Epson WN7512BEP work by adding its device-id to rt2800usb. Device contains a Ralink RT3071L, registers as vendor Accton/Arcadyan. Signed-off-by: Tom Gaudasinski Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 2 ++ 1 file changed, 2 insertions(+) commit c6c092dcb21e4def00f2b5e077d03434c38acfe4 Author: Markus Elfring Date: Wed May 17 18:12:16 2017 +0200 ssb: Delete an error message for a failed memory allocation in ssb_devices_register() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Acked-by: Michael Büsch Signed-off-by: Kalle Valo drivers/ssb/main.c | 1 - 1 file changed, 1 deletion(-) commit 18caec20bfa56911b5d23811ae344ae8dc163ba9 Author: Tobias Klauser Date: Wed May 24 15:35:05 2017 +0200 EDAC, altera: Constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Cc: Thor Thayer Cc: linux-edac Link: http://lkml.kernel.org/r/20170524133505.1233-1-tklauser@distanz.ch Signed-off-by: Borislav Petkov drivers/edac/altera_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9b238726716bed2ba2f3c1cd755e2e5340dc6ef Author: Arnd Bergmann Date: Wed May 17 16:47:02 2017 +0200 rt2x00: convert rt2x00_desc_read return type This is a semi-automated conversion to change rt2x00_desc_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(\<_rt2x00_desc_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/rt* Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 32 +++++++++++----------- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 26 +++++++++--------- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 14 +++++----- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 12 ++++----- drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 14 +++++----- drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 8 +++--- drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 12 +++------ drivers/net/wireless/ralink/rt2x00/rt61pci.c | 34 ++++++++++++------------ drivers/net/wireless/ralink/rt2x00/rt73usb.c | 18 ++++++------- 9 files changed, 83 insertions(+), 87 deletions(-) commit 5c6a25855cbd057f361c51d98b763eef28175b0b Author: Arnd Bergmann Date: Wed May 17 16:47:01 2017 +0200 rt2x00: convert rt2800_eeprom_read return type This is a semi-automated conversion to change rt2800_eeprom_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\(.*, .*\), &\(.*\));:\3 = \1);:' drivers/net/wireless/ralink/rt2x00/rt2800lib.c Some manual tweaking was required here to work around the line wraps. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 194 ++++++++++++------------- 1 file changed, 97 insertions(+), 97 deletions(-) commit 38651683aa98399f2e08e7978b8df0a707051887 Author: Arnd Bergmann Date: Wed May 17 16:47:00 2017 +0200 rt2x00: convert rt2x00_eeprom_read return type This is a semi-automated conversion to change rt2x00_eeprom_read() to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:= _\(rt2x00_eeprom_read\):= \1:' drivers/net/wireless/ralink/rt2x00/* Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 8 +++--- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 16 ++++++------ drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 34 +++++++++++++------------- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 ++--- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 10 ++------ drivers/net/wireless/ralink/rt2x00/rt61pci.c | 28 ++++++++++----------- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 28 ++++++++++----------- 7 files changed, 62 insertions(+), 68 deletions(-) commit 5fbbe378890fd543a9374ec0f86c9cba6d700712 Author: Arnd Bergmann Date: Wed May 17 16:46:59 2017 +0200 rt2x00: convert rt2*_bbp_read return type This is a semi-automated conversion to change *_bbp_read() to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(\(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:= _\(rt.*_bbp_read\):\1:' drivers/net/wireless/ralink/rt2x00/* Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 29 +++---- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 27 +++--- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 29 +++---- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 116 ++++++++++++------------- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 42 ++++----- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 36 ++++---- 6 files changed, 119 insertions(+), 160 deletions(-) commit eebd68e7824bae9c6ee637f43d3048f8d459dc1e Author: Arnd Bergmann Date: Wed May 17 16:46:58 2017 +0200 rt2x00: convert rt2800_register_read return type This is a semi-automated conversion to change rt2800_register_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(rt2800_register_read(.*, .*\), &\(.*\));:\2 = \1);:' \ 's:\(rt2800_register_read_lock(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/rt2800lib.c The function itself was modified manually along with the one remaining multi-line caller that was not covered automatically and the indirect reference. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 291 ++++++++++++------------- drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 22 +- 2 files changed, 151 insertions(+), 162 deletions(-) commit 48bde9c969724f42af7bc8482c0165292e629f5b Author: Arnd Bergmann Date: Wed May 17 16:46:57 2017 +0200 rt2x00: convert rt2x00usb_register_read return type This is a semi-automated conversion to change rt2x00usb_register_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(\(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(\(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/* Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 104 +++++++++++----------- drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 14 +-- drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00usb.h | 32 +------ drivers/net/wireless/ralink/rt2x00/rt73usb.c | 114 ++++++++++++------------- 5 files changed, 118 insertions(+), 148 deletions(-) commit 3954b4e30609ffade5eca3c13eab2fd70c76b44e Author: Arnd Bergmann Date: Wed May 17 16:46:56 2017 +0200 rt2x00: convert rt2x00mmio_register_read return type This is a semi-automated conversion to change rt2x00mmio_register_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(rt2x00mmio_register_read(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:_rt2x00mmio_register_read:rt2x00mmio_register_read:' \ drivers/net/wireless/ralink/rt2x00/*.c The function itself was modified manually along with the one remaining caller that was not covered automatically. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 128 ++++++++-------- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 140 +++++++++--------- drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 30 ++-- drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 10 +- drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 4 +- drivers/net/wireless/ralink/rt2x00/rt2x00mmio.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00mmio.h | 9 +- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 188 ++++++++++++------------ 8 files changed, 252 insertions(+), 259 deletions(-) commit aea8baa10ac5e9acddf80e48593fe85c22d19286 Author: Arnd Bergmann Date: Wed May 17 16:46:55 2017 +0200 rt2x00: convert rt2x00_rf_read return type This is a semi-automated conversion to change rt2x00_rf_read() to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/rt* Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 11 ++--------- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 10 +++++----- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 10 +++++----- 7 files changed, 18 insertions(+), 25 deletions(-) commit 16d571bb0fe6aa7fed82e19166ca1542026c9c06 Author: Arnd Bergmann Date: Wed May 17 16:46:54 2017 +0200 rt2x00: convert rt2800_rfcsr_read return type With CONFIG_KASAN enabled and gcc-7, we get a warning about rather high stack usage (with a private patch set I have to turn on this warning, which I intend to get into the next kernel release): wireless/ralink/rt2x00/rt2800lib.c: In function 'rt2800_bw_filter_calibration': wireless/ralink/rt2x00/rt2800lib.c:7990:1: error: the frame size of 2144 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] The problem is that KASAN inserts a redzone around each local variable that gets passed by reference, and the newly added function has a lot of them. This is a semi-automated conversion to change rt2800_rfcsr_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(rt2800_rfcsr_read(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(rt2800_rfcsr_read_bank(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/rt2800lib.c Fixes: 41977e86c984 ("rt2x00: add support for MT7620") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 322 ++++++++++++------------- 1 file changed, 158 insertions(+), 164 deletions(-) commit 6b81745e36e346e8aa936219d0311b384313bee3 Author: Arnd Bergmann Date: Wed May 17 16:46:53 2017 +0200 rt2x00: change function pointers for register accessors This prepares the driver for changing all the 'read' register accessors to return the value instead of passing it by reference. Since a lot of them are used in callbacks, this takes care of the callbacks first, adding a couple of helpers that will be removed again one at a time. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 18 +++++++++++---- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 18 +++++++++++---- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 24 ++++++++++++++------ drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 28 +++++++++++++++++++----- drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 20 ++++++++++++----- drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 13 +++++++++++ drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00debug.h | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2x00mmio.h | 6 +++++ drivers/net/wireless/ralink/rt2x00/rt2x00usb.h | 22 ++++++++++++++++++- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 17 ++++++++++---- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 17 ++++++++++---- 15 files changed, 157 insertions(+), 44 deletions(-) commit 4bc606af9fab7d5e3c6f2a333b290f9dce89c19a Author: Kees Cook Date: Mon May 15 14:33:17 2017 -0700 libertas: Remove function entry/exit debugging In at least one place, the enter/exit debugging was not being correctly matched. Based on mailing list feedback, it was desired to drop all of these in favor of using ftrace instead. Suggested-by: Joe Perches Suggested-by: Kalle Valo Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/cfg.c | 104 +-------------------- drivers/net/wireless/marvell/libertas/cmd.c | 116 ++---------------------- drivers/net/wireless/marvell/libertas/cmdresp.c | 9 -- drivers/net/wireless/marvell/libertas/defs.h | 9 -- drivers/net/wireless/marvell/libertas/ethtool.c | 3 - drivers/net/wireless/marvell/libertas/if_cs.c | 36 -------- drivers/net/wireless/marvell/libertas/if_sdio.c | 66 +------------- drivers/net/wireless/marvell/libertas/if_spi.c | 38 ++------ drivers/net/wireless/marvell/libertas/if_usb.c | 27 +----- drivers/net/wireless/marvell/libertas/main.c | 81 +---------------- drivers/net/wireless/marvell/libertas/mesh.c | 28 ------ drivers/net/wireless/marvell/libertas/rx.c | 6 -- drivers/net/wireless/marvell/libertas/tx.c | 3 - 13 files changed, 24 insertions(+), 502 deletions(-) commit 12e3c0433e8a3b817fbb978a1be973a04cd5d6f3 Author: Kees Cook Date: Mon May 15 14:26:40 2017 -0700 libertas: Avoid reading past end of buffer Using memcpy() from a string that is shorter than the length copied means the destination buffer is being filled with arbitrary data from the kernel rodata segment. Instead, redefine the stat strings to be ETH_GSTRING_LEN sizes, like other drivers. This lets us use a single memcpy that does not leak rodata contents. Additionally adjust indentation to keep checkpatch.pl happy. This was found with the future CONFIG_FORTIFY_SOURCE feature. Cc: Daniel Micay Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/mesh.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 438f3d13da5e0714f1add1652865b864a2c36eb7 Author: Stanislaw Gruszka Date: Mon May 15 11:28:26 2017 +0200 iwlegacy: warn when enabling power save iwlegacy firmware can crash when power save is configured. PS was allowed in "dbdac2b iwlegacy: properly enable power saving" with belive that user who enable PS is aware of that and can relate firmware crahes with PS. However some distributions seems to enable PS without user intervention, so warn about that. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlegacy/common.c | 2 ++ drivers/net/wireless/intel/iwlegacy/common.h | 1 + 2 files changed, 3 insertions(+) commit 4a4274bf2dbbd1c7a45be0c89a1687c9d2eef4a0 Author: Arnd Bergmann Date: Thu May 11 13:52:09 2017 +0200 wlcore: fix 64K page support In the stable linux-3.16 branch, I ran into a warning in the wlcore driver: drivers/net/wireless/ti/wlcore/spi.c: In function 'wl12xx_spi_raw_write': drivers/net/wireless/ti/wlcore/spi.c:315:1: error: the frame size of 12848 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Newer kernels no longer show the warning, but the bug is still there, as the allocation is based on the CPU page size rather than the actual capabilities of the hardware. This replaces the PAGE_SIZE macro with the SZ_4K macro, i.e. 4096 bytes per buffer. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c07036f18d93a0703a18a9a9a658d830110a10d8 Author: Karim Eshapa Date: Tue May 9 00:34:10 2017 +0200 rsi: rsi_91x_core: Use time_after time comparison Use time_after kernel macro for time comparison. Signed-off-by: Karim Eshapa Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5578b1ffdc3091dd0ae164b056fd1224fb00f1e9 Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:17 2017 +0530 rsi: Remove old firmware loading method The older firmware loading method is not usable by any Redpine chipset. Hence removing that part of the code. Older firmware image with rsi_91x.fw name is deprecated Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 187 ---------------------------- drivers/net/wireless/rsi/rsi_91x_usb.c | 6 +- drivers/net/wireless/rsi/rsi_91x_usb_ops.c | 126 ------------------- drivers/net/wireless/rsi/rsi_common.h | 3 +- drivers/net/wireless/rsi/rsi_sdio.h | 1 - drivers/net/wireless/rsi/rsi_usb.h | 3 - 6 files changed, 3 insertions(+), 323 deletions(-) commit b78e91bcfb3347f4bc977b7b2799544f908d55d4 Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:16 2017 +0530 rsi: Add new firmware loading method The older firmware loading method has been deprecated and not in use for any chipets. New method is introduced which works based on soft boot loader. In this method, complete RAM image and FLASH image are present in the flash. Before loading the functional firmware, host issues boot loader commands to verify whether firmware to load is different from the current functional firmware. If not, firmware upgrade progresses and boot loader will switch to the new functional firmware. "rs9113_wlan_qspi.rps" is the firmware filename used in this patch. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_hal.c | 527 ++++++++++++++++++++++++++++++++ drivers/net/wireless/rsi/rsi_91x_sdio.c | 11 +- drivers/net/wireless/rsi/rsi_91x_usb.c | 16 +- drivers/net/wireless/rsi/rsi_hal.h | 81 +++++ drivers/net/wireless/rsi/rsi_main.h | 10 + 5 files changed, 635 insertions(+), 10 deletions(-) commit b97e9b94ad75caf8d9fcb6a20cd1e3d7f1e67ae8 Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:15 2017 +0530 rsi: Add new host interface operations Host interface opearation master_reg_read, master_reg_write and load_data_master_write are added. These functions are needed for the new firmware loading method. As part of this, the function master_access_msword is moved from rsi_91x_sdio_ops.c to rsi_91x_sdio.c. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 179 ++++++++++++++++++++++++++++ drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 3 +- drivers/net/wireless/rsi/rsi_91x_usb.c | 65 ++++++++++ drivers/net/wireless/rsi/rsi_main.h | 8 ++ drivers/net/wireless/rsi/rsi_sdio.h | 1 + 5 files changed, 254 insertions(+), 2 deletions(-) commit a2ce952c8e09eb36e3f1da0c2dbe8b41c7b8297c Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:14 2017 +0530 rsi: Add host interface operations as separate structure. Host interface operations are currently function pointers in rsi_hw structure. As more host interface operations are going to be introduced, separate structure is added for these for convenience. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_hal.c | 16 +++++++--------- drivers/net/wireless/rsi/rsi_91x_sdio.c | 11 +++++++++-- drivers/net/wireless/rsi/rsi_91x_usb.c | 9 ++++++++- drivers/net/wireless/rsi/rsi_main.h | 18 ++++++++++++++++-- 4 files changed, 40 insertions(+), 14 deletions(-) commit 88fa51e1b33c27bba6080f04f218e9d17632aec7 Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:13 2017 +0530 rsi: Add usb multi-byte read operation USB multibyte read will be used in the new firmware loading method for RS9113 chipset. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit ea3336ac0094b9d461fdde22127087ee293e609a Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:12 2017 +0530 rsi: Handle usb multi-byte write failure case properly In function usb_write_register_multiple, if any intermediate block transfer is failed, further operations should be terminated. 'else' is removed, as there is no significance for it after return. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4b1fc881173e7c67468c78d7a7b215d527d14042 Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:11 2017 +0530 rsi: use macros in USB specific code For USB vendor read and write operations new macros added to avoid redundant usage of long or'ed macros. Also for timeouts standard USB macros are used. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 2fbbe5179ebe8d7f307c8f9fc9fbd75254fdf4be Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:10 2017 +0530 rsi: Changes in USB read and write operations USB read and write registers maximum size is limited 2^16. More than this size is not used in the driver. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 6 +++--- drivers/net/wireless/rsi/rsi_91x_usb_ops.c | 9 +++++---- drivers/net/wireless/rsi/rsi_usb.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) commit 7bdead7ae944c06ef5916e22254929f583684b4a Author: amit karwar Date: Tue May 16 15:31:09 2017 +0530 rsi: define RSI_USB_BUF_SIZE macro RSI_USB_BUF_SIZE macro is used instead of hardcoding a buffer size to 4096. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 4 ++-- drivers/net/wireless/rsi/rsi_usb.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 897d341dee4f44659ed4b705ae59500fa6b74b28 Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:08 2017 +0530 rsi: Changes to sdio reads and writes SDIO read or write maximum size is limited to 2^16. This is done to make the host interface operations common for SDIO and USB. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 10 +++++----- drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 8 ++++---- drivers/net/wireless/rsi/rsi_sdio.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) commit d7af6bb7e527e700dac04f8e0e791baf716a3988 Author: Prameela Rani Garnepudi Date: Tue May 16 15:31:07 2017 +0530 rsi: Rename file rsi_91x_pkt.c to rsi_91x_hal.c The file rsi_91x_hal.c is going to contain device specific code i.e new firmware loading method for RS9113 chipset. As the file rsi_91x_pkt.c contains code to prepare device specific descriptors for transmit packet, this file is renamed to rsi_91x_hal.c which is more relevant as per it's functionality. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/Makefile | 2 +- drivers/net/wireless/rsi/rsi_91x_hal.c | 215 +++++++++++++++++++++++++++++++++ drivers/net/wireless/rsi/rsi_91x_pkt.c | 215 --------------------------------- 3 files changed, 216 insertions(+), 216 deletions(-) commit d087e7a991f1f61ee2c07db1be7c5cc2aa373f5d Author: Phil Elwell Date: Fri May 19 16:07:23 2017 +0100 serial: 8250: Add CAP_MINI, set for bcm2835aux The AUX/mini-UART in the BCM2835 family of procesors is a cut-down 8250 clone. In particular it is lacking support for the following features: CSTOPB PARENB PARODD CMSPAR CS5 CS6 Add a new capability (UART_CAP_MINI) that exposes the restrictions to the user of the termios API by turning off the unsupported features in the request. N.B. It is almost possible to automatically discover the missing features by reading back the LCR register, but the CSIZE bits don't cooperate (contrary to the documentation, both bits are significant, but CS5 and CS6 are mapped to CS7) and the code is much longer. See: https://github.com/raspberrypi/linux/issues/1561 Signed-off-by: Phil Elwell Acked-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 3 +++ drivers/tty/serial/8250/8250_bcm2835aux.c | 2 +- drivers/tty/serial/8250/8250_port.c | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) commit 9b7becf103e2689d7f005895130ccf89a153fef1 Author: Geert Uytterhoeven Date: Mon May 22 15:15:02 2017 +0200 serial: sh-sci: Update warning message in sci_request_dma_chan() The commit below changed a function call from dma_request_slave_channel_compat() to dma_request_slave_channel(), but forgot to update the printed failure message. Fixes: 219fb0c1436e4893 ("serial: sh-sci: Remove the platform data dma slave rx/tx channel IDs") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5fa4accf5efad012731bf36222815d7df8c17ba6 Author: Arnd Bergmann Date: Mon May 22 15:37:03 2017 +0200 serial: meson: hide an unused function The newly added meson_uart_enable_tx_engine function is only called from the console setup, not the runtime uart, which has an open-coded version of the same register access. This produces a harmless warning when the console code is disabled: drivers/tty/serial/meson_uart.c:127:13: error: 'meson_uart_enable_tx_engine' defined but not used [-Werror=unused-function] Let's move the function inside of the #ifdef to avoid the warning. Fixes: ba50f1df13c8 ("serial: meson: remove unneeded variable assignment in meson_serial_port_write") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/meson_uart.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 22284f400a4dcf48824d96142c0acb75c0c94fba Author: Chris Wilson Date: Tue May 23 11:31:16 2017 +0100 drm/i915: Convert i915_gem_object_ops->flags values to use BIT() Having just watched someone add a new value, 0x3, without realising that the flags were bit values, I have come to appreciate the value in using BIT. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170523103116.32239-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca83d5840cb641b2efb04db0b70fa56955dd1453 Author: Chris Wilson Date: Tue May 23 20:44:12 2017 +0100 drm/i915/selftests: Silence compiler warning in igt_ctx_exec The compiler doesn't always spot the guard that object is allocated on the first pass, leading to: drivers/gpu/drm/i915/selftests/i915_gem_context.c: warning: 'obj' may be used uninitialized in this function [-Wuninitialized]: => 370:8 v2: Make it more obvious by setting obj to NULL on the first pass and any later pass where we need to reallocate. Reported-by: Geert Uytterhoeven Fixes: 791ff39ae32a ("drm/i915: Live testing for context execution") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Matthew Auld c: # v4.12-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170523194412.1195-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/selftests/i915_gem_context.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 664ed4e283926d753e876a1347b7729135a3f6b8 Author: Linus Walleij Date: Thu Apr 20 21:43:38 2017 +0200 ARM: dts: Add clocks to the Gemini SoC We have a clock controller for the Gemini SoC, so make use of the driver and add clocks to the peripherals. Remove the hard-coded frequency from the UART and add switch the timer compatible to the generic that uses the clock framework for clock speed look-up. Signed-off-by: Linus Walleij arch/arm/boot/dts/gemini.dtsi | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 3863c5289920c7ac0df56830aeee0c1b7566f35d Author: Linus Walleij Date: Thu Apr 13 16:09:53 2017 +0200 ARM: dts: Add the Gemini reset controller This adds the Gemini reset controller to the Gemini SoC DTSI file and also adds the reset references to all existing blocks already in the device tree. Signed-off-by: Linus Walleij arch/arm/boot/dts/gemini.dtsi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit a87af2db7263551f695d880015acc0efc5c41212 Author: Linus Walleij Date: Wed May 24 10:05:35 2017 +0200 dt-bindings: Augment Gemini for clocks, resets This augments the platform bindings for the Gemini SoC to include the fact that the system controller also provides clock and reset lines. Acked-by: Rob Herring Acked-by: Philipp Zabel Signed-off-by: Linus Walleij Documentation/devicetree/bindings/arm/gemini.txt | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 2acb037fc42b8ce5ae59a7d5db3c9b35672e3dd7 Author: Linus Walleij Date: Wed May 24 10:19:20 2017 +0200 reset: Add a Gemini reset controller The Cortina Systems Gemini reset controller is a simple 32bit register with self-deasserting reset lines. It is accessed using regmap over syscon. Acked-by: Philipp Zabel Signed-off-by: Linus Walleij Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 7 +++ drivers/reset/Makefile | 1 + drivers/reset/reset-gemini.c | 110 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+) commit 128987916f50d38baa3fad7c1a6dea82f31e6d8c Author: Linus Walleij Date: Wed May 24 10:19:08 2017 +0200 reset: add DT bindings header for Gemini reset controller This adds the DT binding macros used by the reset controller. Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Philipp Zabel include/dt-bindings/reset/cortina,gemini-reset.h | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit dd9bf8634029fb00fb4797e9ccd648e1335119cb Author: Suman Anna Date: Tue May 23 22:00:12 2017 -0500 reset: ti_syscon: Rename TI_SYSCON_RESET to RESET_TI_SYSCON Rename the current Kconfig name used for the TI SYSCON Reset driver from TI_SYSCON_RESET to RESET_TI_SYSCON to match the convention used for all the reset drivers present at the base reset folder. Signed-off-by: Suman Anna Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 2 +- drivers/reset/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2d75588a28c6bbbb7a026087aa61be1492b3d6ac Author: Geert Uytterhoeven Date: Sun Mar 19 18:12:51 2017 +0100 clk: renesas: r8a7794: Add new CPG/MSSR driver Add a new R-Car E2 Clock Pulse Generator / Module Standby and Software Reset driver, using the CPG/MSSR driver core. This will enable support for module resets, which are not supported by the existing driver. The old driver can still be used through a Kconfig option, to preserve backward compatibility with old DTBs. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/Kconfig | 5 +- drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r8a7794-cpg-mssr.c | 255 +++++++++++++++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.c | 6 + drivers/clk/renesas/renesas-cpg-mssr.h | 1 + 5 files changed, 266 insertions(+), 2 deletions(-) commit fd3c2f38264301324b2c1074eb1b65d5e31bd595 Author: Geert Uytterhoeven Date: Sun Mar 19 18:08:59 2017 +0100 clk: renesas: r8a7792: Add new CPG/MSSR driver Add a new R-Car V2H Clock Pulse Generator / Module Standby and Software Reset driver, using the CPG/MSSR driver core. This will enable support for module resets, which are not supported by the existing driver. The old driver can still be used through a Kconfig option, to preserve backward compatibility with old DTBs. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/Kconfig | 5 +- drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r8a7792-cpg-mssr.c | 221 +++++++++++++++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.c | 6 + drivers/clk/renesas/renesas-cpg-mssr.h | 1 + 5 files changed, 232 insertions(+), 2 deletions(-) commit 6449ab814148bb2b9a3006a44da5fde656e599b8 Author: Geert Uytterhoeven Date: Fri Oct 16 11:41:19 2015 +0200 clk: renesas: r8a7791/r8a7793: Add new CPG/MSSR driver Add a new R-Car M2-W/N Clock Pulse Generator / Module Standby and Software Reset driver, using the CPG/MSSR driver core. This will enable support for module resets, which are not supported by the existing driver. The old driver can still be used through a Kconfig option, to preserve backward compatibility with old DTBs. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/Kconfig | 5 +- drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r8a7791-cpg-mssr.c | 286 +++++++++++++++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.c | 11 ++ drivers/clk/renesas/renesas-cpg-mssr.h | 1 + 5 files changed, 302 insertions(+), 2 deletions(-) commit d4e59f108e904e4b58323a151a82d85a351c1eed Author: Geert Uytterhoeven Date: Sun Mar 19 18:05:42 2017 +0100 clk: renesas: r8a7790: Add new CPG/MSSR driver Add a new R-Car H2 Clock Pulse Generator / Module Standby and Software Reset driver, using the CPG/MSSR driver core. This will enable support for module resets, which are not supported by the existing driver. The old driver can still be used through a Kconfig option, to preserve backward compatibility with old DTBs. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/Kconfig | 13 +- drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r8a7790-cpg-mssr.c | 278 +++++++++++++++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.c | 6 + drivers/clk/renesas/renesas-cpg-mssr.h | 1 + 5 files changed, 298 insertions(+), 1 deletion(-) commit 0ea86f5a90574807fa85cc5bf4265bc25dc3438b Author: Geert Uytterhoeven Date: Sun Mar 19 16:38:05 2017 +0100 clk: renesas: Add r8a7794 CPG Core Clock Definitions Add all R-Car E2 Clock Pulse Generator Core Clock Outputs, as listed in Table 7.2d ("List of Clocks [R-Car E2]") of the R-Car Gen2 Hardware User's Manual rev. 2.00. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund include/dt-bindings/clock/r8a7794-cpg-mssr.h | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 77d2e30d1650db34041a1d60535a1e4c3a00c19c Author: Geert Uytterhoeven Date: Sun Mar 19 16:38:05 2017 +0100 clk: renesas: Add r8a7793 CPG Core Clock Definitions Add all R-Car M2-N Clock Pulse Generator Core Clock Outputs, as listed in Table 7.2b ("List of Clocks [R-Car M2-W/M2-N]") of the R-Car Gen2 Hardware User's Manual rev. 2.00. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund include/dt-bindings/clock/r8a7793-cpg-mssr.h | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 34806f12651f0d03c2358c00f3659838ce4407a5 Author: Geert Uytterhoeven Date: Sun Mar 19 16:38:05 2017 +0100 clk: renesas: Add r8a7792 CPG Core Clock Definitions Add all R-Car V2H Clock Pulse Generator Core Clock Outputs, as listed in Table 7.2c ("List of Clocks [R-Car V2H]") of the R-Car Gen2 Hardware User's Manual rev. 2.00. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund include/dt-bindings/clock/r8a7792-cpg-mssr.h | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 27e154b2b681bcfa072c92811e18482e8707df69 Author: Geert Uytterhoeven Date: Mon Oct 12 11:28:17 2015 +0200 clk: renesas: Add r8a7791 CPG Core Clock Definitions Add all R-Car M2-W Clock Pulse Generator Core Clock Outputs, as listed in Table 7.2b ("List of Clocks [R-Car M2-W/M2-N]") of the R-Car Gen2 Hardware User's Manual rev. 2.00. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund include/dt-bindings/clock/r8a7791-cpg-mssr.h | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit cedd162b4dae134a9c5862109afd9ee95bd73520 Author: Geert Uytterhoeven Date: Fri Oct 16 11:41:19 2015 +0200 clk: renesas: Add r8a7790 CPG Core Clock Definitions Add all R-Car H2 Clock Pulse Generator Core Clock Outputs, as listed in Table 7.2a ("List of Clocks [R-Car H2]") of the R-Car Gen2 Hardware User's Manual rev. 2.00. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund include/dt-bindings/clock/r8a7790-cpg-mssr.h | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 4013047a65b376b960a2144b3d125944c8c280bc Author: Geert Uytterhoeven Date: Mon Mar 20 17:46:22 2017 +0100 clk: renesas: cpg-mssr: Document R-Car Gen2 support Document use of the Renesas Clock Pulse Generator / Module Standby and Software Reset DT Bindings for various member of the R-Car Gen2 family (H2, M2-W, V2H, M2-N, and E2). Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 80978a4be267e1783444841143cdb0f0eb40061c Author: Geert Uytterhoeven Date: Mon Apr 24 16:54:14 2017 +0200 clk: renesas: Rework Kconfig and Makefile logic The goals are to: - Allow precise control over and automatic selection of which (sub)drivers are used for which SoC (which may change in the future), - Allow adding support for new SoCs easily, - Allow compile-testing of all (sub)drivers, - Keep driver selection logic in the subsystem-specific Kconfig, independent from the architecture-specific Kconfig (i.e. no "select" from arch/arm64/Kconfig.platforms), to avoid dependencies. This is implemented by: - Introducing Kconfig symbols for all drivers and sub-drivers, - Introducing the Kconfig symbol CLK_RENESAS, which is enabled automatically when building for a Renesas ARM platform, and which enables all required drivers without interaction of the user, based on SoC-specific ARCH_* symbols, - Allowing the user to enable any Kconfig symbol manually if COMPILE_TEST is enabled, - Using the new Kconfig symbols instead of the ARCH_* symbols to control compilation in the Makefile, - Always entering drivers/clk/renesas/ during the build. Note that currently not all (sub)drivers are enabled for compile-testing, as they depend on independent fixes in other subsystems. Signed-off-by: Geert Uytterhoeven Acked-by: Simon Horman Acked-by: Stephen Boyd drivers/clk/Makefile | 2 +- drivers/clk/renesas/Kconfig | 125 +++++++++++++++++++++++++++++---- drivers/clk/renesas/Makefile | 37 +++++----- drivers/clk/renesas/renesas-cpg-mssr.c | 8 +-- 4 files changed, 135 insertions(+), 37 deletions(-) commit 76394a36efb2dcd1ea30607a3831f65272694a62 Author: Geert Uytterhoeven Date: Wed May 17 15:43:56 2017 +0200 clk: renesas: cpg-mssr: Initialize error pointer using ERR_PTR() Coccinelle warns: drivers/clk/renesas/renesas-cpg-mssr.c:323:14-21: ERROR: PTR_ERR applied after initialization to constant on line 260 Initialize clk using ERR_PTR(-ENOTSUPP) instead of NULL to fix this. Reported-by: kbuild test robot Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/renesas-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e361d3c962dda16e27d81e7aa9202828a8f7371 Author: Takashi Sakamoto Date: Wed May 24 10:04:30 2017 +0900 ALSA: control: remove entry limitation for list operation In current implementation of ALSA control core, list operation has a limitation to handle 16384 entries at once. This seems due to allocation in kernel space to copy data from user space. With a commit 53e7bf452584 ("ALSA: control: Simplify snd_ctl_elem_list() implementation"), for the operation, ALSA control core copies data into user space directly. No need to care of kernel spaces anymore. This commit purges the limitation. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/control.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e73ad5ff2f76da25390e9607cb549691639330c3 Author: Andy Lutomirski Date: Mon May 22 15:30:03 2017 -0700 mm, x86/mm: Make the batched unmap TLB flush API more generic try_to_unmap_flush() used to open-code a rather x86-centric flush sequence: local_flush_tlb() + flush_tlb_others(). Rearrange the code so that the arch (only x86 for now) provides arch_tlbbatch_add_mm() and arch_tlbbatch_flush() and the core code calls those functions instead. I'll want this for x86 because, to enable address space ids, I can't support the flush_tlb_others() mode used by exising try_to_unmap_flush() implementation with good performance. I can support the new API fairly easily, though. I imagine that other architectures may be in a similar position. Architectures with strong remote flush primitives (arm64?) may have even worse performance problems with flush_tlb_others() the way that try_to_unmap_flush() uses it. Signed-off-by: Andy Lutomirski Acked-by: Kees Cook Cc: Andrew Morton Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Sasha Levin Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/19f25a8581f9fb77876b7ff3b001f89835e34ea3.1495492063.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbbatch.h | 16 ++++++++++++++++ arch/x86/include/asm/tlbflush.h | 8 ++++++++ arch/x86/mm/tlb.c | 17 +++++++++++++++++ include/linux/mm_types_task.h | 15 +++++++++++---- mm/rmap.c | 16 ++-------------- 5 files changed, 54 insertions(+), 18 deletions(-) commit b3b90e5af7976e46541f5029a369c9c38c5e4cea Author: Andy Lutomirski Date: Mon May 22 15:30:02 2017 -0700 x86/mm: Reduce indentation in flush_tlb_func() The leave_mm() case can just exit the function early so we don't need to indent the entire remainder of the function. Signed-off-by: Andy Lutomirski Acked-by: Kees Cook Cc: Andrew Morton Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/97901ddcc9821d7bc7b296d2918d1179f08aaf22.1495492063.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit ca6c99c0794875c6d1db6e22f246699691ab7e6b Author: Andy Lutomirski Date: Mon May 22 15:30:01 2017 -0700 x86/mm: Reimplement flush_tlb_page() using flush_tlb_mm_range() flush_tlb_page() was very similar to flush_tlb_mm_range() except that it had a couple of issues: - It was missing an smp_mb() in the case where current->active_mm != mm. (This is a longstanding bug reported by Nadav Amit) - It was missing tracepoints and vm counter updates. The only reason that I can see for keeping it at as a separate function is that it could avoid a few branches that flush_tlb_mm_range() needs to decide to flush just one page. This hardly seems worthwhile. If we decide we want to get rid of those branches again, a better way would be to introduce an __flush_tlb_mm_range() helper and make both flush_tlb_page() and flush_tlb_mm_range() use it. Signed-off-by: Andy Lutomirski Acked-by: Kees Cook Cc: Andrew Morton Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Nadav Amit Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/3cc3847cf888d8907577569b8bac3f01992ef8f9.1495492063.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 6 +++++- arch/x86/mm/tlb.c | 27 --------------------------- 2 files changed, 5 insertions(+), 28 deletions(-) commit 8fcc9bc3eaa2ef8345e2b4b22e3a88804ac46337 Author: Baoquan He Date: Sat May 13 13:46:30 2017 +0800 Documentation/kernel-parameters.txt: Update 'memmap=' boot option description In commit: 9710f581bb4c ("x86, mm: Let "memmap=" take more entries one time") ... 'memmap=' was changed to adopt multiple, comma delimited values in a single entry, so update the related description. In the special case of only specifying size value without an offset, like memmap=nn[KMG], memmap behaves similarly to mem=nn[KMG], so update it too here. Furthermore, for memmap=nn[KMG]$ss[KMG], an escape character needs be added before '$' for some bootloaders. E.g in grub2, if we specify memmap=100M$5G as suggested by the documentation, "memmap=100MG" gets passed to the kernel. Clarify all this. Signed-off-by: Baoquan He Acked-by: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dan.j.williams@intel.com Cc: douly.fnst@cn.fujitsu.com Cc: dyoung@redhat.com Cc: m.mizuma@jp.fujitsu.com Link: http://lkml.kernel.org/r/1494654390-23861-4-git-send-email-bhe@redhat.com [ Various spelling fixes. ] Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4cdba14f84c9102c4434384731cd61018b970d59 Author: Baoquan He Date: Sat May 13 13:46:29 2017 +0800 x86/KASLR: Handle the memory limit specified by the 'memmap=' and 'mem=' boot options The 'mem=' boot option limits the max address a system can use - any memory region above the limit will be removed. Furthermore, the 'memmap=nn[KMG]' variant (with no offset specified) has the same behaviour as 'mem='. KASLR needs to consider this when choosing the random position for decompressing the kernel. Do it. Tested-by: Masayoshi Mizuma Signed-off-by: Baoquan He Acked-by: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dan.j.williams@intel.com Cc: douly.fnst@cn.fujitsu.com Cc: dyoung@redhat.com Link: http://lkml.kernel.org/r/1494654390-23861-3-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/kaslr.c | 68 +++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 18 deletions(-) commit d52e7d5a952c5e35783f96e8c5b7fcffbb0d7c60 Author: Baoquan He Date: Sat May 13 13:46:28 2017 +0800 x86/KASLR: Parse all 'memmap=' boot option entries In commit: f28442497b5c ("x86/boot: Fix KASLR and memmap= collision") ... the memmap= option is parsed so that KASLR can avoid those reserved regions. It uses cmdline_find_option() to get the value if memmap= is specified, however the problem is that cmdline_find_option() can only find the last entry if multiple memmap entries are provided. This is not correct. Address this by checking each command line token for a "memmap=" match and parse each instance instead of using cmdline_find_option(). Signed-off-by: Baoquan He Acked-by: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dan.j.williams@intel.com Cc: douly.fnst@cn.fujitsu.com Cc: dyoung@redhat.com Cc: m.mizuma@jp.fujitsu.com Link: http://lkml.kernel.org/r/1494654390-23861-2-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/cmdline.c | 2 +- arch/x86/boot/compressed/kaslr.c | 136 ++++++++++++++++++++++--------------- arch/x86/boot/string.c | 8 +++ 3 files changed, 91 insertions(+), 55 deletions(-) commit 45aea321678856687927c53972321ebfab77759a Author: Peter Zijlstra Date: Wed May 24 08:52:02 2017 +0200 sched/clock: Fix early boot preempt assumption in __set_sched_clock_stable() The more strict early boot preemption warnings found that __set_sched_clock_stable() was incorrectly assuming we'd still be running on a single CPU: BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 caller is debug_smp_processor_id+0x1c/0x1e CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc2-00108-g1c3c5ea #1 Call Trace: dump_stack+0x110/0x192 check_preemption_disabled+0x10c/0x128 ? set_debug_rodata+0x25/0x25 debug_smp_processor_id+0x1c/0x1e sched_clock_init_late+0x27/0x87 [...] Fix it by disabling IRQs. Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Steven Rostedt Cc: lkp@01.org Cc: tipbuild@zytor.com Link: http://lkml.kernel.org/r/20170524065202.v25vyu7pvba5mhpd@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/clock.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 71ec289e62f9cf9face6acfab65da02ef6bc3478 Author: Simon Wunderlich Date: Tue May 23 17:00:43 2017 +0200 mac80211: enable VHT for mesh channel processing Signed-off-by: Simon Wunderlich Signed-off-by: Johannes Berg net/mac80211/mesh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 75d627d53e015027d0f85c928673d368807243cc Author: Simon Wunderlich Date: Tue May 23 17:00:42 2017 +0200 mac80211: mesh: support sending wide bandwidth CSA To support HT and VHT CSA, beacons and action frames must include the corresponding IEs. Signed-off-by: Simon Wunderlich [make ieee80211_ie_build_wide_bw_cs() return void] Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/mesh.c | 45 +++++++++++++++++++++++++++++++++++++++++++-- net/mac80211/util.c | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 2 deletions(-) commit 702fce05f5ad0e2af2c00d5ef41356ffdd4a3a56 Author: Arvind Yadav Date: Mon May 22 16:01:48 2017 +0530 dmaengine: DW DMAC: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Acked-by: Viresh Kumar Acked-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/platform.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fcc785417fba2dc81d2f6ba888caaff463f4f441 Author: Linus Walleij Date: Sat May 20 23:42:54 2017 +0200 dmaengine: pl08x: use GENMASK() to create bitmasks This switches the arbitrary shifting of hex constants in the pl080 header to use GENMASK(). Suggested-by: Vinod Koul Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul include/linux/amba/pl080.h | 50 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 1e1cfc7213a37131a53e7dfada75dce77b8e043d Author: Linus Walleij Date: Sat May 20 23:42:53 2017 +0200 dmaengine: pl08x: Add support for Faraday Technology FTDMAC020 After reading the specs for the Faraday Technology FTDMAC020 found in the Gemini platform, it becomes pretty evident that this is just another PL08x derivative, and should be handled like such by simply extending the existing PL08x driver to handle the quirks in this hardware. This patch makes memcpy work and has been tested on the Gemini and also regression-tested on the Nomadik NHK15 using dmatest with 10 threads per channel without a hinch for hours. I have not implemented slave DMA in those codepaths, because this device (Gemini) does not use slave DMA, and it seems like devices using FTDMAC020 for device DMA have a slightly different register layout so some real hardware is needed to proceed with this. I left some FIXME etc in the code for this. I had to do some refactorings of some helper functions, but I have not split those into separate patches because these refactorings do not make much sense without the increased complexity of handling the FTDMAC020. The DMA test would hang the platform on me on the Gemini after a few thousand iterations, however after turning of the caches the problem immediately disappeared and I could run the DMA engine with 10 threads pers physical channel for days in a row without a crash. I think there is no problem with the DMA driver: instead it is something fishy in the FA526 cache handling code that get pretty heavily exercised by the DMA engine and we need to go and fix that instead. Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/Kconfig | 6 +- drivers/dma/amba-pl08x.c | 767 ++++++++++++++++++++++++++++++++++++--------- include/linux/amba/pl080.h | 83 ++++- 3 files changed, 698 insertions(+), 158 deletions(-) commit ebe9b3005d90d4500f4feb605a4ab6191e2dd34f Author: Linus Walleij Date: Sat May 20 23:42:52 2017 +0200 dmaengine: pl08x: Make slave engine optional If the vendor data does not specify any signals, we do not have to support slave DMA. Make the registration of the slave DMA engine optional, so we can use this for the FTDMAC020 in the Gemini that only has memcpy support. Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/amba-pl08x.c | 128 +++++++++++++++++++++++++++++------------------ 1 file changed, 78 insertions(+), 50 deletions(-) commit 9e972571d4040213775eb40f17ac80c109e09f8a Author: Linus Walleij Date: Sat May 20 23:42:51 2017 +0200 dmaengine: pl08x: Add Faraday FTDMAC020 to compatible list This augments the PL08x bindings to include the Faraday Technology FTDMAC020 DMA engine, as it is clearly a derivative of the PL08x PrimeCell. Also specify that it needs the special peripheral ID specified to work properly. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/arm-pl08x.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4166a56aa8d5babe979d8e0834a741c9f015ad14 Author: Linus Walleij Date: Sat May 20 23:42:50 2017 +0200 ARM/dmaengine: pl08x: pass reasonable memcpy settings We cannot use bits from configuration registers as API between platforms and driver like this, abstract it out to two enums and mimic the stuff passed as device tree data. This is done to make it possible for the driver to generate the ccfg word on-the-fly so we can support more PL08x derivatives. Acked-by: Olof Johansson Acked-by: Arnd Bergmann Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul arch/arm/mach-lpc32xx/phy3250.c | 3 + arch/arm/mach-s3c64xx/pl080.c | 28 +++------ arch/arm/mach-spear/spear3xx.c | 14 ++--- arch/arm/mach-spear/spear6xx.c | 14 ++--- drivers/dma/amba-pl08x.c | 131 ++++++++++++++++++++++++++++------------ include/linux/amba/pl08x.h | 30 +++++++-- 6 files changed, 138 insertions(+), 82 deletions(-) commit aaebdee8b88225ebe28af2afc60446f9fd7228f9 Author: Eric Biggers Date: Mon May 22 17:39:45 2017 -0700 f2fs: don't bother checking for encryption key in ->write_iter() Since only an open file can be written to, and we only allow open()ing an encrypted file when its key is available, there is no need to check for the key again before permitting each ->write_iter(). This code was also broken in that it wouldn't actually have failed if the key was in fact unavailable. Signed-off-by: Eric Biggers Reviewed-by: David Gstir Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 5 ----- 1 file changed, 5 deletions(-) commit b82a6ea6ec39f1b5ef949a38e334eed0dc29f4d1 Author: Eric Biggers Date: Mon May 22 17:39:43 2017 -0700 f2fs: don't bother checking for encryption key in ->mmap() Since only an open file can be mmap'ed, and we only allow open()ing an encrypted file when its key is available, there is no need to check for the key again before permitting each mmap(). This f2fs copy of this code was also broken in that it wouldn't actually have failed if the key was in fact unavailable. Signed-off-by: Eric Biggers Reviewed-by: David Gstir Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 8 -------- 1 file changed, 8 deletions(-) commit 6afae6336ac9c19b5956c003e882b1ee4bca2a9d Author: Chao Yu Date: Fri May 19 23:46:45 2017 +0800 f2fs: wait discard IO completion without cmd_lock held Wait discard IO completion outside cmd_lock to avoid long latency of holding cmd_lock in IO busy scenario. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit e31b98215779e66a490471c6ad886ae231316699 Author: Chao Yu Date: Fri May 19 23:46:44 2017 +0800 f2fs: wake up all waiters in f2fs_submit_discard_endio There could be more than one waiter waiting discard IO completion, so we need use complete_all() instead of complete() in f2fs_submit_discard_endio to avoid hungtask. Fixes: ec9895add2c5 ("f2fs: don't hold cmd_lock during waiting discard command") Cc: Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04dfc23006a200865132ef404778a07b896a0280 Author: Chao Yu Date: Fri May 19 23:46:43 2017 +0800 f2fs: show more info if fail to issue discard Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fb830fc5cfc90ba8236921aacb72c6d70bf78af7 Author: Chao Yu Date: Fri May 19 23:37:01 2017 +0800 f2fs: introduce io_list for serialize data/node IOs Serialize data/node IOs by using fifo list instead of mutex lock, it will help to enhance concurrency of f2fs, meanwhile keeping LFS IO semantics. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 1 + fs/f2fs/data.c | 24 ++++++++++++++++++++---- fs/f2fs/f2fs.h | 7 ++++++- fs/f2fs/gc.c | 3 ++- fs/f2fs/segment.c | 22 +++++++++++++++------- fs/f2fs/super.c | 2 ++ 6 files changed, 46 insertions(+), 13 deletions(-) commit e41e6d75e5010741f01f8aa4f77a5e8a1786652d Author: Chao Yu Date: Fri May 19 23:37:00 2017 +0800 f2fs: split wio_mutex Split wio_mutex to adjust different temperature bio cache. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 ++- fs/f2fs/segment.c | 4 ++-- fs/f2fs/super.c | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) commit 963932a93ceb6bdb0d45572056d8daebf2948cd0 Author: Yunlei He Date: Fri May 19 14:42:12 2017 +0800 f2fs: combine huge num of discard rb tree consistence checks Came across a hungtask caused by huge number of rb tree traversing during adding discard addrs in cp. This patch combine these consistence checks and move it to discard thread. Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit dad48e73127ba10279ea33e6dbc8d3905c4d31c0 Author: Yunlei He Date: Fri May 19 15:06:12 2017 +0800 f2fs: fix a bug caused by NULL extent tree Thread A: Thread B: -f2fs_remount -sbi->mount_opt.opt = 0; <--- -f2fs_iget -do_read_inode -f2fs_init_extent_tree -F2FS_I(inode)->extent_tree is NULL -default_options && parse_options -remount return <--- -f2fs_map_blocks -f2fs_lookup_extent_tree -f2fs_bug_on(sbi, !et); The same problem with f2fs_new_inode. Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 1d7be2708277edfef95171d52fb65ee26eaa076b Author: Jaegeuk Kim Date: Wed May 17 10:36:58 2017 -0700 f2fs: try to freeze in gc and discard threads This allows to freeze gc and discard threads. Cc: stable@vger.kernel.org Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 9 +++++---- fs/f2fs/segment.c | 25 ++++++++++++++++--------- 2 files changed, 21 insertions(+), 13 deletions(-) commit b7b7c4cf1c9ef0272a65f1480457cbfdadcda19d Author: Yunlei He Date: Wed May 17 17:22:51 2017 +0800 f2fs: add a new function get_ssr_cost This patch add a new method get_ssr_cost to select SSR segment more accurately. Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit bd80a4b9812c0d74ecfc0b1b14ca77732faa2259 Author: Hou Pengyang Date: Wed May 17 02:48:48 2017 +0000 f2fs: declare load_free_nid_bitmap static Signed-off-by: Hou Pengyang Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc15620bc826b14006956fd321e026ae96aff53a Author: Jaegeuk Kim Date: Fri May 12 13:51:34 2017 -0700 f2fs: avoid f2fs_lock_op for IPU writes Currently, if we do get_node_of_data before f2fs_lock_op, there may be dead lock as follows, where process A would be in infinite loop, and B will NOT be awaked. Process A(cp): Process B: f2fs_lock_all(sbi) get_dnode_of_data <---- lock dn.node_page flush_nodes f2fs_lock_op So, this patch adds f2fs_trylock_op to avoid f2fs_lock_op done by IPU. Signed-off-by: Hou Pengyang Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 44 +++++++++++++++++++++++++++++++------------- fs/f2fs/f2fs.h | 13 ++++++++++++- fs/f2fs/gc.c | 2 +- fs/f2fs/segment.c | 2 +- 4 files changed, 45 insertions(+), 16 deletions(-) commit a912b54d3aaa011266dc266e3694f782f27233cf Author: Jaegeuk Kim Date: Wed May 10 11:18:25 2017 -0700 f2fs: split bio cache Split DATA/NODE type bio cache according to different temperature, so write IOs with the same temperature can be merged in corresponding bio cache as much as possible, otherwise, different temperature write IOs submitting into one bio cache will always cause split of bio. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 57 +++++++++++++++++++++++++++++++-------------- fs/f2fs/f2fs.h | 10 +++++++- fs/f2fs/gc.c | 2 ++ fs/f2fs/segment.c | 24 ++++++++++++++----- fs/f2fs/segment.h | 4 ++++ fs/f2fs/super.c | 21 ++++++++++++++--- include/trace/events/f2fs.h | 14 ++++++++++- 7 files changed, 103 insertions(+), 29 deletions(-) commit 81377bd62837c8113b1c49c5dfa6b1af8f9ee5c2 Author: Jaegeuk Kim Date: Wed May 10 14:19:54 2017 -0700 f2fs: use fio instead of multiple parameters This patch just changes using fio instead of parameters. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit b9109b0e49b93b0ae663330acb36561b8f4f6905 Author: Jaegeuk Kim Date: Wed May 10 11:28:38 2017 -0700 f2fs: remove unnecessary read cases in merged IO flow Merged IO flow doesn't need to care about read IOs. f2fs_submit_merged_bio -> f2fs_submit_merged_write f2fs_submit_merged_bios -> f2fs_submit_merged_writes f2fs_submit_merged_bio_cond -> f2fs_submit_merged_write_cond Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 14 ++++++------ fs/f2fs/data.c | 55 ++++++++++++++++++++------------------------- fs/f2fs/f2fs.h | 12 +++++----- fs/f2fs/gc.c | 6 ++--- fs/f2fs/node.c | 11 +++++---- fs/f2fs/segment.c | 11 +++++---- fs/f2fs/super.c | 5 +---- include/trace/events/f2fs.h | 2 +- 8 files changed, 51 insertions(+), 65 deletions(-) commit 1919ffc0d7a300d4d8002e92ab3c6dea1974defc Author: Jaegeuk Kim Date: Wed May 10 11:23:36 2017 -0700 f2fs: use f2fs_submit_page_bio for ra_meta_pages This patch avoids to use f2fs_submit_merged_bio for read, which was the only read case. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e5dbd9563e5528f98728ba0bc8361f804ace5aae Author: Weichao Guo Date: Thu May 11 04:28:00 2017 +0800 f2fs: make sure f2fs_gc returns consistent errno By default, f2fs_gc returns -EINVAL in general error cases, e.g., no victim was selected. However, the default errno may be overwritten in two cases: gc_more and BG_GC -> FG_GC. We should return consistent errno in such cases. Signed-off-by: Weichao Guo Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1c6d8ee4b8aaadc3645497658007ca007312351d Author: Chao Yu Date: Wed May 3 23:59:12 2017 +0800 f2fs: support statx Last kernel has already support new syscall statx() in commit a528d35e8bfc ("statx: Add a system call to make enhanced file info available"), with this interface we can show more file info including file creation and some attribute flags to user. This patch tries to support this functionality. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 93607124c5450148e592c3d18ac533b4e5f25b8b Author: Jaegeuk Kim Date: Tue May 16 13:20:16 2017 -0700 f2fs: load inode's flag from disk This patch fixes missing inode flag loaded from disk, reported by Tom. [tom@localhost ~]$ sudo mount /dev/loop0 /mnt/ [tom@localhost ~]$ sudo chown tom:tom /mnt/ [tom@localhost ~]$ touch /mnt/testfile [tom@localhost ~]$ sudo chattr +i /mnt/testfile [tom@localhost ~]$ echo test > /mnt/testfile bash: /mnt/testfile: Operation not permitted [tom@localhost ~]$ rm /mnt/testfile rm: cannot remove '/mnt/testfile': Operation not permitted [tom@localhost ~]$ sudo umount /mnt/ [tom@localhost ~]$ sudo mount /dev/loop0 /mnt/ [tom@localhost ~]$ lsattr /mnt/testfile ----i-------------- /mnt/testfile [tom@localhost ~]$ echo test > /mnt/testfile [tom@localhost ~]$ rm /mnt/testfile [tom@localhost ~]$ sudo umount /mnt/ Cc: stable@vger.kernel.org Reported-by: Tom Yan Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 1 + fs/f2fs/inode.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 3e2e857f9c3a19d55ee0ba7b428b8be5008960bf Author: Kees Cook Date: Fri Apr 21 15:35:27 2017 -0700 module: Add module name to modinfo Accessing the mod structure (e.g. for mod->name) prior to having completed check_modstruct_version() can result in writing garbage to the error logs if the layout of the mod structure loaded from disk doesn't match the running kernel's mod structure layout. This kind of mismatch will become much more likely if a kernel is built with different randomization seed for the struct layout randomization plugin. Instead, add and use a new modinfo string for logging the module name. Signed-off-by: Kees Cook Signed-off-by: Jessica Yu kernel/module.c | 29 ++++++++++++++++++++++------- scripts/mod/modpost.c | 1 + 2 files changed, 23 insertions(+), 7 deletions(-) commit 490194269665d6d4915a4a5774f002885c5a2d8f Author: Kees Cook Date: Fri Apr 21 15:35:26 2017 -0700 module: Pass struct load_info into symbol checks Since we're already using values from struct load_info, just pass this pointer in directly and use what's needed as we need it. This allows us to access future fields in struct load_info too. Signed-off-by: Kees Cook Signed-off-by: Jessica Yu kernel/module.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 240d3d5b2a7a32630f1fadd6b145d48978882824 Author: Jayachandran C Date: Mon May 22 08:58:31 2017 +0000 gpio: xlp: update GPIO_XLP dependency Broadcom Vulcan (ARCH_VULCAN) has been discontinued and will be deleted soon. So, update the GPIO_XLP Kconfig entry to remove the ARCH_VULCAN dependency. Also update the documentation to note that Cavium ThunderX2 uses this driver. Signed-off-by: Jayachandran C Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4b3e4ed6b0d958d7fb2f160bb8ebfb4f0db19382 Author: Richard Guy Briggs Date: Thu Apr 20 13:07:30 2017 -0400 audit: unswing cap_* fields in PATH records The cap_* fields swing in and out of PATH records. If no capabilities are set, the cap_* fields are completely missing and when one of the cap_fi or cap_fp values is empty, that field is omitted. Original: type=PATH msg=audit(04/20/2017 12:17:11.222:193) : item=1 name=/lib64/ld-linux-x86-64.so.2 inode=787694 dev=08:03 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ld_so_t:s0 nametype=NORMAL type=PATH msg=audit(04/20/2017 12:17:11.222:193) : item=0 name=/home/sleep inode=1319469 dev=08:03 mode=file,suid,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:bin_t:s0 nametype=NORMAL cap_fp=sys_admin cap_fe=1 cap_fver=2 Normalize the PATH record by always printing all 4 cap_* fields. Fixed: type=PATH msg=audit(04/20/2017 13:01:31.679:201) : item=1 name=/lib64/ld-linux-x86-64.so.2 inode=787694 dev=08:03 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ld_so_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 type=PATH msg=audit(04/20/2017 13:01:31.679:201) : item=0 name=/home/sleep inode=1319469 dev=08:03 mode=file,suid,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:bin_t:s0 nametype=NORMAL cap_fp=sys_admin cap_fi=none cap_fe=1 cap_fver=2 See: https://github.com/linux-audit/audit-kernel/issues/42 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 09b3ed2d5916f270ffbc5d002a2196ededf5ec7e Author: Sascha Hauer Date: Tue May 23 14:38:27 2017 +0200 spi: imx: Revert "spi: imx: dynamic burst length adjust for PIO mode" This reverts commits 8d4a6cad7adb3ddac32cd52635f20e11de11a658 and 179547e143e773f9f866ad3536275ab627711f3a. Besides the problems already found with this patch it also modifies the spi transfer tx_buf in spi_imx_u32_swap_u8() and spi_imx_u32_swap_u16(). This is hidden from the compiler with an explicit cast from const void* to u32*, so no warning is issued. Signed-off-by: Sascha Hauer Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 163 +++----------------------------------------------- 1 file changed, 8 insertions(+), 155 deletions(-) commit 7dab5467647be42736dcabcd5d035c7b571f4653 Author: Gustavo A. R. Silva Date: Tue May 23 13:11:47 2017 -0500 net: ieee802154: fix potential null pointer dereference Null check at line 918: if (!spi) {, implies spi might be NULL. Function spi_get_drvdata() dereference pointer spi. Move pointer priv assignment after the null check. Addresses-Coverity-ID: 1408888 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Marcel Holtmann drivers/net/ieee802154/ca8210.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a611c58b3d42a92e6b23423e166dd17c0c7fffce Author: Lin Zhang Date: Tue May 23 13:29:39 2017 +0800 net: ieee802154: fix net_device reference release too early This patch fixes the kernel oops when release net_device reference in advance. In function raw_sendmsg(i think the dgram_sendmsg has the same problem), there is a race condition between dev_put and dev_queue_xmit when the device is gong that maybe lead to dev_queue_ximt to see an illegal net_device pointer. My test kernel is 3.13.0-32 and because i am not have a real 802154 device, so i change lowpan_newlink function to this: /* find and hold real wpan device */ real_dev = dev_get_by_index(src_net, nla_get_u32(tb[IFLA_LINK])); if (!real_dev) return -ENODEV; // if (real_dev->type != ARPHRD_IEEE802154) { // dev_put(real_dev); // return -EINVAL; // } lowpan_dev_info(dev)->real_dev = real_dev; lowpan_dev_info(dev)->fragment_tag = 0; mutex_init(&lowpan_dev_info(dev)->dev_list_mtx); Also, in order to simulate preempt, i change the raw_sendmsg function to this: skb->dev = dev; skb->sk = sk; skb->protocol = htons(ETH_P_IEEE802154); dev_put(dev); //simulate preempt schedule_timeout_uninterruptible(30 * HZ); err = dev_queue_xmit(skb); if (err > 0) err = net_xmit_errno(err); and this is my userspace test code named test_send_data: int main(int argc, char **argv) { char buf[127]; int sockfd; sockfd = socket(AF_IEEE802154, SOCK_RAW, 0); if (sockfd < 0) { printf("create sockfd error: %s\n", strerror(errno)); return -1; } send(sockfd, buf, sizeof(buf), 0); return 0; } This is my test case: root@zhanglin-x-computer:~/develop/802154# uname -a Linux zhanglin-x-computer 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux root@zhanglin-x-computer:~/develop/802154# ip link add link eth0 name lowpan0 type lowpan root@zhanglin-x-computer:~/develop/802154# //keep the lowpan0 device down root@zhanglin-x-computer:~/develop/802154# ./test_send_data & //wait a while root@zhanglin-x-computer:~/develop/802154# ip link del link dev lowpan0 //the device is gone //oops [381.303307] general protection fault: 0000 [#1]SMP [381.303407] Modules linked in: af_802154 6lowpan bnep rfcomm bluetooth nls_iso8859_1 snd_hda_codec_hdmi snd_hda_codec_realtek rts5139(C) snd_hda_intel snd_had_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event snd_rawmidi snd_req intel_rapl snd_seq_device coretemp i915 kvm_intel kvm snd_timer snd crct10dif_pclmul crc32_pclmul ghash_clmulni_intel cypted drm_kms_helper drm i2c_algo_bit soundcore video mac_hid parport_pc ppdev ip parport hid_generic usbhid hid ahci r8169 mii libahdi [381.304286] CPU:1 PID: 2524 Commm: 1 Tainted: G C 0 3.13.0-32-generic [381.304409] Hardware name: Haier Haier DT Computer/Haier DT Codputer, BIOS FIBT19H02_X64 06/09/2014 [381.304546] tasks: ffff000096965fc0 ti: ffffB0013779c000 task.ti: ffffB8013779c000 [381.304659] RIP: 0010:[] [] __dev_queue_ximt+0x61/0x500 [381.304798] RSP: 0018:ffffB8013779dca0 EFLAGS: 00010202 [381.304880] RAX: 272b031d57565351 RBX: 0000000000000000 RCX: ffff8800968f1a00 [381.304987] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8800968f1a00 [381.305095] RBP: ffff8e013773dce0 R08: 0000000000000266 R09: 0000000000000004 [381.305202] R10: 0000000000000004 R11: 0000000000000005 R12: ffff88013902e000 [381.305310] R13: 000000000000007f R14: 000000000000007f R15: ffff8800968f1a00 [381.305418] FS: 00007fc57f50f740(0000) GS: ffff88013fc80000(0000) knlGS: 0000000000000000 [381.305540] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [381.305627] CR2: 00007fad0841c000 CR3: 00000001368dd000 CR4: 00000000001007e0 [361.905734] Stack: [381.305768] 00000000002052d0 000000003facb30a ffff88013779dcc0 ffff880137764000 [381.305898] ffff88013779de70 000000000000007f 000000000000007f ffff88013902e000 [381.306026] ffff88013779dcf0 ffffffff81622490 ffff88013779dd39 ffffffffa03af9f1 [381.306155] Call Trace: [381.306202] [] dev_queue_xmit+0x10/0x20 [381.306294] [] raw_sendmsg+0x1b1/0x270 [af_802154] [381.306396] [] ieee802154_sock_sendmsg+0x14/0x20 [af_802154] [381.306512] [] sock_sendmsg+0x8b/0xc0 [381.306600] [] ? __d_alloc+0x25/0x180 [381.306687] [] ? kmem_cache_alloc_trace+0x1c6/0x1f0 [381.306791] [] SYSC_sendto+0x121/0x1c0 [381.306878] [] ? vtime_account_user+x54/0x60 [381.306975] [] ? syscall_trace_enter+0x145/0x250 [381.307073] [] SyS_sendto+0xe/0x10 [381.307156] [] tracesys+0xe1/0xe6 [381.307233] Code: c6 a1 a4 ff 41 8b 57 78 49 8b 47 20 85 d2 48 8b 80 78 07 00 00 75 21 49 8b 57 18 48 85 d2 74 18 48 85 c0 74 13 8b 92 ac 01 00 00 <3b> 50 10 73 08 8b 44 90 14 41 89 47 78 41 f6 84 24 d5 00 00 00 [381.307801] RIP [] _dev_queue_xmit+0x61/0x500 [381.307901] RSP [381.347512] Kernel panic - not syncing: Fatal exception in interrupt [381.347747] drm_kms_helper: panic occurred, switching back to text console In my opinion, there is always exist a chance that the device is gong before call dev_queue_xmit. I think the latest kernel is have the same problem and that dev_put should be behind of the dev_queue_xmit. Signed-off-by: Lin Zhang Acked-by: Stefan Schmidt Signed-off-by: Marcel Holtmann net/ieee802154/socket.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8fafda77762df659e578e349c4a67196d94957dc Author: Lin Zhang Date: Tue May 23 13:21:05 2017 +0800 net: ieee802154: remove explicit set skb->sk Explicit set skb->sk is needless, sock_alloc_send_skb is already set it. Signed-off-by: Lin Zhang Acked-by: Stefan Schmidt Signed-off-by: Marcel Holtmann net/ieee802154/socket.c | 2 -- 1 file changed, 2 deletions(-) commit d1b7abae666cc4630daa3db4e839626bc179f6f1 Author: Jürg Billeter Date: Tue May 23 18:46:25 2017 +0200 Bluetooth: btintel: Add MODULE_FIRMWARE entries for iBT 3.5 controllers The iBT 3.5 controllers (Intel 8265, Windstorm Peak) need intel/ibt-12-16.sfi and intel/ibt-12-16.ddc firmware files from linux-firmware repository. Signed-off-by: Jürg Billeter Signed-off-by: Marcel Holtmann drivers/bluetooth/btintel.c | 2 ++ 1 file changed, 2 insertions(+) commit 3cfd956b02ac7a9fb5f2414171f834871931fbd0 Author: Hao Wei Tee Date: Mon May 22 18:38:55 2017 +0800 platform/x86: ideapad-laptop: Squelch ACPI event 1 Don't simply throw this to userspace via the sparse_keymap (which does not have a mapping for scancode 1), as this causes KEY_UNKNOWN to be emitted, which is a nuisance and of no use at all (it is not the right way to expose this ACPI event to userspace, anyway, and the original intention of the commit which added this (cfee5d63767b2e7997c1f36420d008abbe61565c) was only to suppress an unhandled event log message). Signed-off-by: Hao Wei Tee Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 46936fd65c107ed935e21bfa6fc00b4f510b1714 Author: Arnd Bergmann Date: Mon May 22 15:07:03 2017 +0200 platform/x86: ideapad-laptop: hide unused 'touchpad_store' A readonly sysfs property must not have a 'store' function: drivers/platform/x86/ideapad-laptop.c:438:16: error: 'touchpad_store' defined but not used [-Werror=unused-function] We can either comment it out or remove the function entirely, without a good reason one or or another I picked the second option. Fixes: 7f363145992c ("platform/x86: ideapad-laptop: Switch touchpad attribute to be RO") Signed-off-by: Arnd Bergmann Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 409dcf31538ae6ae96b3a0a1d3211e668bfefe8b Author: Daniel Jurgens Date: Fri May 19 15:48:59 2017 +0300 selinux: Add a cache for quicker retreival of PKey SIDs It is likely that the SID for the same PKey will be requested many times. To reduce the time to modify QPs and process MADs use a cache to store PKey SIDs. This code is heavily based on the "netif" and "netport" concept originally developed by James Morris and Paul Moore (see security/selinux/netif.c and security/selinux/netport.c for more information) Signed-off-by: Daniel Jurgens Acked-by: Doug Ledford Signed-off-by: Paul Moore security/selinux/Makefile | 2 +- security/selinux/hooks.c | 7 +- security/selinux/ibpkey.c | 245 ++++++++++++++++++++++++++++++++++++++ security/selinux/include/ibpkey.h | 31 +++++ security/selinux/include/objsec.h | 6 + 5 files changed, 288 insertions(+), 3 deletions(-) commit ab861dfca1652aa09b26b7aa2899feb29b33dfd9 Author: Daniel Jurgens Date: Fri May 19 15:48:58 2017 +0300 selinux: Add IB Port SMP access vector Add a type for Infiniband ports and an access vector for subnet management packets. Implement the ib_port_smp hook to check that the caller has permission to send and receive SMPs on the end port specified by the device name and port. Add interface to query the SID for a IB port, which walks the IB_PORT ocontexts to find an entry for the given name and port. Signed-off-by: Daniel Jurgens Reviewed-by: James Morris Acked-by: Doug Ledford Signed-off-by: Paul Moore include/linux/lsm_audit.h | 8 ++++++++ security/lsm_audit.c | 5 +++++ security/selinux/hooks.c | 25 ++++++++++++++++++++++ security/selinux/include/classmap.h | 2 ++ security/selinux/include/security.h | 2 ++ security/selinux/ss/services.c | 41 +++++++++++++++++++++++++++++++++++++ 6 files changed, 83 insertions(+) commit cfc4d882d41780d93471066d57d4630995427b29 Author: Daniel Jurgens Date: Fri May 19 15:48:57 2017 +0300 selinux: Implement Infiniband PKey "Access" access vector Add a type and access vector for PKeys. Implement the ib_pkey_access hook to check that the caller has permission to access the PKey on the given subnet prefix. Add an interface to get the PKey SID. Walk the PKey ocontexts to find an entry for the given subnet prefix and pkey. Signed-off-by: Daniel Jurgens Reviewed-by: James Morris Acked-by: Doug Ledford Signed-off-by: Paul Moore include/linux/lsm_audit.h | 7 +++++++ security/lsm_audit.c | 11 ++++++++++ security/selinux/hooks.c | 22 ++++++++++++++++++++ security/selinux/include/classmap.h | 2 ++ security/selinux/include/security.h | 2 ++ security/selinux/ss/services.c | 40 +++++++++++++++++++++++++++++++++++++ 6 files changed, 84 insertions(+) commit 3a976fa6767f3edebbf43839b686efaf71b8dee1 Author: Daniel Jurgens Date: Fri May 19 15:48:56 2017 +0300 selinux: Allocate and free infiniband security hooks Implement and attach hooks to allocate and free Infiniband object security structures. Signed-off-by: Daniel Jurgens Reviewed-by: James Morris Acked-by: Doug Ledford Signed-off-by: Paul Moore security/selinux/hooks.c | 25 ++++++++++++++++++++++++- security/selinux/include/objsec.h | 5 +++++ 2 files changed, 29 insertions(+), 1 deletion(-) commit a806f7a1616f29b80749d708115a643c1f4ba056 Author: Daniel Jurgens Date: Fri May 19 15:48:55 2017 +0300 selinux: Create policydb version for Infiniband support Support for Infiniband requires the addition of two new object contexts, one for infiniband PKeys and another IB Ports. Added handlers to read and write the new ocontext types when reading or writing a binary policy representation. Signed-off-by: Daniel Jurgens Reviewed-by: Eli Cohen Reviewed-by: James Morris Acked-by: Doug Ledford Signed-off-by: Paul Moore security/selinux/include/security.h | 3 +- security/selinux/ss/policydb.c | 112 +++++++++++++++++++++++++++++++----- security/selinux/ss/policydb.h | 27 ++++++--- 3 files changed, 118 insertions(+), 24 deletions(-) commit 47a2b338fe63200d716d2e24131cdb49f17c77da Author: Daniel Jurgens Date: Fri May 19 15:48:54 2017 +0300 IB/core: Enforce security on management datagrams Allocate and free a security context when creating and destroying a MAD agent. This context is used for controlling access to PKeys and sending and receiving SMPs. When sending or receiving a MAD check that the agent has permission to access the PKey for the Subnet Prefix of the port. During MAD and snoop agent registration for SMI QPs check that the calling process has permission to access the manage the subnet and register a callback with the LSM to be notified of policy changes. When notificaiton of a policy change occurs recheck permission and set a flag indicating sending and receiving SMPs is allowed. When sending and receiving MADs check that the agent has access to the SMI if it's on an SMI QP. Because security policy can change it's possible permission was allowed when creating the agent, but no longer is. Signed-off-by: Daniel Jurgens Acked-by: Doug Ledford [PM: remove the LSM hook init code] Signed-off-by: Paul Moore drivers/infiniband/core/core_priv.h | 35 ++++++++++++++ drivers/infiniband/core/mad.c | 52 +++++++++++++++++---- drivers/infiniband/core/security.c | 92 +++++++++++++++++++++++++++++++++++++ include/linux/lsm_hooks.h | 8 ++++ include/linux/security.h | 6 +++ include/rdma/ib_mad.h | 4 ++ security/security.c | 6 +++ 7 files changed, 195 insertions(+), 8 deletions(-) commit 8f408ab64be6319cb7736cbc6982838dcc362306 Author: Daniel Jurgens Date: Fri May 19 15:48:53 2017 +0300 selinux lsm IB/core: Implement LSM notification system Add a generic notificaiton mechanism in the LSM. Interested consumers can register a callback with the LSM and security modules can produce events. Because access to Infiniband QPs are enforced in the setup phase of a connection security should be enforced again if the policy changes. Register infiniband devices for policy change notification and check all QPs on that device when the notification is received. Add a call to the notification mechanism from SELinux when the AVC cache changes or setenforce is cleared. Signed-off-by: Daniel Jurgens Acked-by: James Morris Acked-by: Doug Ledford Signed-off-by: Paul Moore drivers/infiniband/core/device.c | 53 ++++++++++++++++++++++++++++++++++++++++ include/linux/security.h | 23 +++++++++++++++++ security/security.c | 20 +++++++++++++++ security/selinux/hooks.c | 11 +++++++++ security/selinux/selinuxfs.c | 2 ++ 5 files changed, 109 insertions(+) commit d291f1a6523292d916fe1659c67f6db061fbd1b5 Author: Daniel Jurgens Date: Fri May 19 15:48:52 2017 +0300 IB/core: Enforce PKey security on QPs Add new LSM hooks to allocate and free security contexts and check for permission to access a PKey. Allocate and free a security context when creating and destroying a QP. This context is used for controlling access to PKeys. When a request is made to modify a QP that changes the port, PKey index, or alternate path, check that the QP has permission for the PKey in the PKey table index on the subnet prefix of the port. If the QP is shared make sure all handles to the QP also have access. Store which port and PKey index a QP is using. After the reset to init transition the user can modify the port, PKey index and alternate path independently. So port and PKey settings changes can be a merge of the previous settings and the new ones. In order to maintain access control if there are PKey table or subnet prefix change keep a list of all QPs are using each PKey index on each port. If a change occurs all QPs using that device and port must have access enforced for the new cache settings. These changes add a transaction to the QP modify process. Association with the old port and PKey index must be maintained if the modify fails, and must be removed if it succeeds. Association with the new port and PKey index must be established prior to the modify and removed if the modify fails. 1. When a QP is modified to a particular Port, PKey index or alternate path insert that QP into the appropriate lists. 2. Check permission to access the new settings. 3. If step 2 grants access attempt to modify the QP. 4a. If steps 2 and 3 succeed remove any prior associations. 4b. If ether fails remove the new setting associations. If a PKey table or subnet prefix changes walk the list of QPs and check that they have permission. If not send the QP to the error state and raise a fatal error event. If it's a shared QP make sure all the QPs that share the real_qp have permission as well. If the QP that owns a security structure is denied access the security structure is marked as such and the QP is added to an error_list. Once the moving the QP to error is complete the security structure mark is cleared. Maintaining the lists correctly turns QP destroy into a transaction. The hardware driver for the device frees the ib_qp structure, so while the destroy is in progress the ib_qp pointer in the ib_qp_security struct is undefined. When the destroy process begins the ib_qp_security structure is marked as destroying. This prevents any action from being taken on the QP pointer. After the QP is destroyed successfully it could still listed on an error_list wait for it to be processed by that flow before cleaning up the structure. If the destroy fails the QPs port and PKey settings are reinserted into the appropriate lists, the destroying flag is cleared, and access control is enforced, in case there were any cache changes during the destroy flow. To keep the security changes isolated a new file is used to hold security related functionality. Signed-off-by: Daniel Jurgens Acked-by: Doug Ledford [PM: merge fixup in ib_verbs.h and uverbs_cmd.c] Signed-off-by: Paul Moore drivers/infiniband/core/Makefile | 3 +- drivers/infiniband/core/cache.c | 21 +- drivers/infiniband/core/core_priv.h | 77 +++++ drivers/infiniband/core/device.c | 33 ++ drivers/infiniband/core/security.c | 613 +++++++++++++++++++++++++++++++++++ drivers/infiniband/core/uverbs_cmd.c | 15 +- drivers/infiniband/core/verbs.c | 27 +- include/linux/lsm_hooks.h | 27 ++ include/linux/security.h | 21 ++ include/rdma/ib_verbs.h | 48 +++ security/Kconfig | 9 + security/security.c | 22 ++ 12 files changed, 907 insertions(+), 9 deletions(-) commit 801f19b9515fb61e8b2400f5555460f55f22571c Author: Joe Perches Date: Thu May 4 09:17:55 2017 +0100 ARM: 8673/1: Fix __show_regs output timestamps Multiple line formats are not preferred as the second and subsequent lines may not have timestamps. Lacking timestamps makes reading the output a bit difficult. This also makes arm/arm64 output more similar. Previous: [ 1514.093231] pc : [] lr : [] psr: a00f0013 sp : ecdd7e20 ip : 00000000 fp : ffffffff New: [ 1514.093231] pc : [] lr : [] psr: a00f0013 [ 1514.105316] sp : ecdd7e20 ip : 00000000 fp : ffffffff Signed-off-by: Joe Perches Signed-off-by: Russell King arch/arm/kernel/process.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7fcd07506878db19510b6e7bd1f9153bce6702e3 Author: Arnd Bergmann Date: Mon May 22 22:30:20 2017 +0200 gpu: drm: gma500: remove two more dead variable The dead code removal left two unused variables: drivers/gpu/drm/gma500/mdfld_tpo_vid.c: In function 'tpo_vid_get_config_mode': drivers/gpu/drm/gma500/mdfld_tpo_vid.c:34:31: error: unused variable 'ti' [-Werror=unused-variable] This removes them as well. Fixes: 94d7fb4982d2 ("gpu: drm: gma500: remove dead code") Signed-off-by: Arnd Bergmann Signed-off-by: Patrik Jakobsson Link: http://patchwork.freedesktop.org/patch/msgid/20170522203031.2912874-1-arnd@arndb.de drivers/gpu/drm/gma500/mdfld_tpo_vid.c | 2 -- 1 file changed, 2 deletions(-) commit d86d47164b227f01c3ec34c3f5a1613977d563eb Author: Maya Erez Date: Fri May 19 11:54:10 2017 +0300 wil6210: support devices with different PCIe bar size wil6210 devices can have different PCIe bar size, hence get the bar size from PCIe device instead of using a constant bar size. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/ioctl.c | 4 ++-- drivers/net/wireless/ath/wil6210/pcie_bus.c | 17 ++++++++++------- drivers/net/wireless/ath/wil6210/wil6210.h | 4 +++- drivers/net/wireless/ath/wil6210/wmi.c | 4 ++-- 4 files changed, 17 insertions(+), 12 deletions(-) commit 646d402d9f8f5669b3ddc6fbec5f55288777704b Author: Hamad Kadmany Date: Fri May 19 11:54:08 2017 +0300 wil6210: Improve AP stop handling Set resetting flag early when stopping AP to avoid disconnect events as a result of disconnect command sent during AP stop procedure. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 2 ++ 1 file changed, 2 insertions(+) commit 1c3964540425f1c12b652a2f2e45d73ffc16c37e Author: Hamad Kadmany Date: Fri May 19 11:54:07 2017 +0300 wil6210: add option to load FTM FW Module parameter allows to load specific FW used for FTM testing. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/pcie_bus.c | 18 +++++++++++++----- drivers/net/wireless/ath/wil6210/wil6210.h | 9 +++++++-- 2 files changed, 20 insertions(+), 7 deletions(-) commit 0216a895946fa683ea51b842501e66106c0f1017 Author: Lior David Date: Fri May 19 11:54:06 2017 +0300 wil6210: low level RF sector API Added vendor commands for low level control over RF sectors. It allows user space a fine-grained control over RF characteristics for TX and RX, such as direction and gain of TX/RX. Main usages are debugging and diagnostics, but also operational use cases. API includes getting/setting a specific RF sector configuration, as well as getting/setting the selected sector which is used to communicate with a station. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 573 ++++++++++++++++++++++++++++ 1 file changed, 573 insertions(+) commit c1dd8016ae02557e4f3fcf7339865924d9357f76 Author: Sven Eckelmann Date: Fri May 19 11:54:02 2017 +0300 ath10k: fix reported HT MCS rates with NSS > 1 The QCA4019 firmware 10.4-3.2.1-00050 reports only HT MCS rates between 0-9. But 802.11n MCS rates can be larger than that. For example a 2x2 device can send with up to MCS 15. The firmware encodes the higher MCS rates using the NSS field. The actual calculation is not documented by QCA but it seems like the NSS field can be mapped for HT rates to following MCS offsets: * NSS 1: 0 * NSS 2: 8 * NSS 3: 16 * NSS 4: 24 This offset therefore has to be added for HT rates before they are stored in the rate_info struct. Fixes: cec17c382140 ("ath10k: add per peer htt tx stats support for 10.4") Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 8c1f20815231edf1ed2b7133ea07ea94ca31db05 Author: Gustavo A. R. Silva Date: Fri May 19 11:54:00 2017 +0300 ath10k: remove unnecessary code The array fields in struct wmi_start_scan_arg that are checked here are fixed size arrays so they can never be NULL. Addresses-Coverity-ID: 1260031 Cc: Arend Van Spriel Cc: Kalle Valo Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 9 --------- 1 file changed, 9 deletions(-) commit 417ccf6b5bc3f1a390505d5ef65ec17f10e8b29a Author: Alexey Dobriyan Date: Tue May 23 00:21:39 2017 +0300 net: make struct request_sock_ops::obj_size unsigned This field is sizeof of corresponding kmem_cache so it can't be negative. Space will be saved after 32-bit kmem_cache_create() patch. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller include/net/request_sock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c0ebd6fed66388584abb27d7b0f188cc1ec01fe Author: Alexey Dobriyan Date: Tue May 23 00:20:26 2017 +0300 net: make struct inet_frags::qsize unsigned This field is sizeof of corresponding kmem_cache so it can't be negative. Prepare for 32-bit kmem_cache_create(). Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller include/net/inet_frag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9acfd1c02993b4fb11f08104e7166249925f25d5 Author: Govindarajulu Varadarajan Date: Mon May 22 12:19:48 2017 -0700 enic: unmask intr only when napi is complete In case of busy poll, napi_complete_done returns false and does not dequeue napi. In this case do not unmask the intr. We are guaranteed napi is called again. This reduces unnecessary iowrites. Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f93e1cdcf42c1218e2a73be477d8ac21135e7f56 Author: Jiri Pirko Date: Sat May 20 15:01:32 2017 +0200 net/sched: fix filter flushing When user instructs to remove all filters from chain, we cannot destroy the chain as other actions may hold a reference. Also the put in errout would try to destroy it again. So instead, just walk the chain and remove all existing filters. Fixes: 5bc1701881e3 ("net: sched: introduce multichain support for filters") Signed-off-by: Jiri Pirko Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_api.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 31efcc250a1dea96edca6595a9639d898cf99ae5 Author: Jiri Pirko Date: Sat May 20 15:01:31 2017 +0200 net/sched: properly assign RCU pointer in tcf_chain_tp_insert/remove *p_filter_chain is rcu-dereferenced on reader path. So here in writer, property assign the pointer. Fixes: 2190d1d0944f ("net: sched: introduce helpers to work with filter chains") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8208b28a7a32edd58da50292b1f92d41993a9631 Author: Paul Gortmaker Date: Mon May 22 16:56:46 2017 -0400 pinctrl: samsung: Clean up modular vs. non-modular distinctions Fixups here tend to be more all over the map vs. some of the other repeated/systematic ones we've seen elsewhere. We remove module.h from code that isn't doing anything modular at all; if they have __init sections, then replace it with init.h A couple drivers have module_exit() code that is essentially orphaned, and so we remove that. There are no module_init replacements, so we have no concerns wrt. initcall ordering changes as per some of the other cleanups. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Acked-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski drivers/pinctrl/samsung/pinctrl-exynos.c | 1 - drivers/pinctrl/samsung/pinctrl-exynos5440.c | 15 +++------------ drivers/pinctrl/samsung/pinctrl-s3c24xx.c | 2 +- drivers/pinctrl/samsung/pinctrl-s3c64xx.c | 2 +- drivers/pinctrl/samsung/pinctrl-samsung.c | 13 +------------ 5 files changed, 6 insertions(+), 27 deletions(-) commit 9f800214731fddb0a99810bcd1af8d93d22076e0 Author: Daniel Vetter Date: Mon May 15 11:11:36 2017 +0200 drm/doc: Clarify mode_fixup vs. atomic_check a bit more Brought up by both Laurent and Andrzej when reviewing the new ->mode_valid hooks. Since mode_fixup is just a simpler version of the much more generic atomic_check we can't really unify it with mode_valid. Most drivers should probably switch their current mode_fixup code to either the new mode_valid or the atomic_check hooks, but e.g. that doesn't exist yet for bridges, and for CRTCs the situation is a bit more complicated. Hence there's no clear equivalence between mode_fixup and mode_valid, even if it looks like that at first glance. v2: Fix accidental double-dot (Adnrzej). Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Jose Abreu Reviewed-by: Jose Abreu Reviewed-by: Andrzej Hajda Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170515091136.26307-2-daniel.vetter@ffwll.ch include/drm/drm_modeset_helper_vtables.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 9de5d4a61cc2a99634e3b51bda0f8e2fdd8f4287 Author: Daniel Vetter Date: Mon May 15 11:11:35 2017 +0200 drm/doc: Document adjusted/request modes a bit better Laurent started a massive discussion on IRC about this. Let's try to document common usage a bit better. v2: Cross-links+typos. Cc: Laurent Pinchart Cc: Ville Syrjälä Cc: Jose Abreu Reviewed-by: Jose Abreu Reviewed-by: Andrzej Hajda Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170515091136.26307-1-daniel.vetter@ffwll.ch include/drm/drm_bridge.h | 2 +- include/drm/drm_crtc.h | 28 +++++++++++++++++++++++++--- include/drm/drm_modeset_helper_vtables.h | 6 ++++-- 3 files changed, 30 insertions(+), 6 deletions(-) commit 3eb220a5319169fb44dcfe1944c731424c2bee5f Author: Jose Abreu Date: Mon May 15 11:33:47 2017 +0200 drm: Add crtc/encoder/bridge->mode_valid() callbacks This adds a new callback to crtc, encoder and bridge helper functions called mode_valid(). This callback shall be implemented if the corresponding component has some sort of restriction in the modes that can be displayed. A NULL callback implicates that the component can display all the modes. We also change the documentation so that the new and old callbacks are correctly documented. Only the callbacks were implemented to simplify review process, following patches will make use of them. Changes in v2 from Daniel: - Update the warning about how modes aren't filtered in atomic_check - the heleprs help out a lot more now. - Consistenly roll out that warning, crtc/encoder's atomic_check missed it. - Sprinkle more links all over the place, so it's easier to see where this stuff is used and how the differen hooks are related. - Note that ->mode_valid is optional everywhere. - Explain why the connector's mode_valid is special and does _not_ get called in atomic_check. v3: Document what can and cannot be checked in mode_valid a bit better (Andrjez). Answer: Only allowed to look at the mode, nothing else. Cc: Laurent Pinchart Signed-off-by: Jose Abreu Cc: Jose Abreu Cc: Carlos Palminha Cc: Alexey Brodkin Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Dave Airlie Cc: Andrzej Hajda Cc: Archit Taneja Signed-off-by: Daniel Vetter (v2) Reviewed-by: Jose Abreu (v2) Reviewed-by: Andrzej Hajda Link: http://patchwork.freedesktop.org/patch/msgid/20170515093347.31098-1-daniel.vetter@ffwll.ch include/drm/drm_bridge.h | 40 +++++++++ include/drm/drm_modeset_helper_vtables.h | 134 +++++++++++++++++++++++-------- 2 files changed, 141 insertions(+), 33 deletions(-) commit 883c71feaf2e810e0331cf780c738cbb09e93b58 Author: Daniel Jurgens Date: Fri May 19 15:48:51 2017 +0300 IB/core: IB cache enhancements to support Infiniband security Cache the subnet prefix and add a function to access it. Enforcing security requires frequent queries of the subnet prefix and the pkeys in the pkey table. Signed-off-by: Daniel Jurgens Reviewed-by: Eli Cohen Reviewed-by: Leon Romanovsky Reviewed-by: James Morris Acked-by: Doug Ledford Signed-off-by: Paul Moore drivers/infiniband/core/cache.c | 22 ++++++++++++++++++++++ drivers/infiniband/core/core_priv.h | 3 +++ include/rdma/ib_verbs.h | 1 + 3 files changed, 26 insertions(+) commit 270e8573145a26de924e2dc644596332d400445b Author: Matthias Kaehlcke Date: Fri May 19 10:09:32 2017 -0700 selinux: Remove redundant check for unknown labeling behavior The check is already performed in ocontext_read() when the policy is loaded. Removing the array also fixes the following warning when building with clang: security/selinux/hooks.c:338:20: error: variable 'labeling_behaviors' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] Signed-off-by: Matthias Kaehlcke Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 4dc2fce342f8e5b165e2eda29a39446bb07b2457 Author: Stephen Smalley Date: Thu May 18 16:58:31 2017 -0400 selinux: log policy capability state when a policy is loaded Log the state of SELinux policy capabilities when a policy is loaded. For each policy capability known to the kernel, log the policy capability name and the value set in the policy. For policy capabilities that are set in the loaded policy but unknown to the kernel, log the policy capability index, since this is the only information presently available in the policy. Sample output with a policy created with a new capability defined that is not known to the kernel: SELinux: policy capability network_peer_controls=1 SELinux: policy capability open_perms=1 SELinux: policy capability extended_socket_class=1 SELinux: policy capability always_check_network=0 SELinux: policy capability cgroup_seclabel=0 SELinux: unknown policy capability 5 Resolves: https://github.com/SELinuxProject/selinux-kernel/issues/32 Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/include/security.h | 2 ++ security/selinux/selinuxfs.c | 13 ++----------- security/selinux/ss/services.c | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 11 deletions(-) commit ccb544781d34afdb73a9a73ae53035d824d193bf Author: Stephen Smalley Date: Fri May 12 12:41:24 2017 -0400 selinux: do not check open permission on sockets open permission is currently only defined for files in the kernel (COMMON_FILE_PERMS rather than COMMON_FILE_SOCK_PERMS). Construction of an artificial test case that tries to open a socket via /proc/pid/fd will generate a recvfrom avc denial because recvfrom and open happen to map to the same permission bit in socket vs file classes. open of a socket via /proc/pid/fd is not supported by the kernel regardless and will ultimately return ENXIO. But we hit the permission check first and can thus produce these odd/misleading denials. Omit the open check when operating on a socket. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 3ba4bf5f1e2c58bddd84ba27c5aeaf8ca1d36bff Author: Stephen Smalley Date: Fri May 5 09:14:48 2017 -0400 selinux: add a map permission check for mmap Add a map permission check on mmap so that we can distinguish memory mapped access (since it has different implications for revocation). When a file is opened and then read or written via syscalls like read(2)/write(2), we revalidate access on each read/write operation via selinux_file_permission() and therefore can revoke access if the process context, the file context, or the policy changes in such a manner that access is no longer allowed. When a file is opened and then memory mapped via mmap(2) and then subsequently read or written directly in memory, we presently have no way to revalidate or revoke access. The purpose of a separate map permission check on mmap(2) is to permit policy to prohibit memory mapping of specific files for which we need to ensure that every access is revalidated, particularly useful for scenarios where we expect the file to be relabeled at runtime in order to reflect state changes (e.g. cross-domain solution, assured pipeline without data copying). Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 12 ++++++++++++ security/selinux/include/classmap.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) commit db59000ab760f8d77b07b7f2898ff61110f88607 Author: Stephen Smalley Date: Thu Apr 20 11:31:30 2017 -0400 selinux: only invoke capabilities and selinux for CAP_MAC_ADMIN checks SELinux uses CAP_MAC_ADMIN to control the ability to get or set a raw, uninterpreted security context unknown to the currently loaded security policy. When performing these checks, we only want to perform a base capabilities check and a SELinux permission check. If any other modules that implement a capable hook are stacked with SELinux, we do not want to require them to also have to authorize CAP_MAC_ADMIN, since it may have different implications for their security model. Rework the CAP_MAC_ADMIN checks within SELinux to only invoke the capabilities module and the SELinux permission checking. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 46be14d2b6fbc20c9e7008ec8c28b40609ef6f22 Author: Markus Elfring Date: Tue Apr 4 11:33:53 2017 +0200 selinux: Return an error code only as a constant in sidtab_insert() * Return an error code without storing it in an intermediate variable. * Delete the local variable "rc" and the jump label "out" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/sidtab.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 62934ffb9e5f9a904c83f571590631b766d68d12 Author: Markus Elfring Date: Tue Apr 4 10:20:46 2017 +0200 selinux: Return directly after a failed memory allocation in policydb_index() Replace five goto statements (and previous variable assignments) by direct returns after a memory allocation failure in this function. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit a79be238600d1a0319a77b080b762d03c1d253ca Author: Tetsuo Handa Date: Tue Mar 28 23:08:45 2017 +0900 selinux: Use task_alloc hook rather than task_create hook This patch is a preparation for getting rid of task_create hook because task_alloc hook which can do what task_create hook can do was revived. Creating a new thread is unlikely prohibited by security policy, for fork()/execve()/exit() is fundamental of how processes are managed in Unix. If a program is known to create a new thread, it is likely that permission to create a new thread is given to that program. Therefore, a situation where security_task_create() returns an error is likely that the program was exploited and lost control. Even if SELinux failed to check permission to create a thread at security_task_create(), SELinux can later check it at security_task_alloc(). Since the new thread is not yet visible from the rest of the system, nobody can do bad things using the new thread. What we waste will be limited to some initialization steps such as dup_task_struct(), copy_creds() and audit_alloc() in copy_process(). We can tolerate these overhead for unlikely situation. Therefore, this patch changes SELinux to use task_alloc hook rather than task_create hook so that we can remove task_create hook. Signed-off-by: Tetsuo Handa Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 05d7435ecd901f7d474ef9f299dd7d4f6ea8aeeb Author: Vincent Abriou Date: Tue May 23 15:00:46 2017 +0200 MAINTAINERS: update drm/stm maintainers list Add Benjamin Gaignard and Vincent Abriou as STM maintainers: Benjamin Gaignard Vincent Abriou Signed-off-by: Vincent Abriou Acked-by: Daniel Vetter Acked-by: Philippe Cornu Link: http://patchwork.freedesktop.org/patch/msgid/1495544446-22360-1-git-send-email-vincent.abriou@st.com MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit a6187ffdfcc854ce4d97f307e12508a4bde8bcf3 Author: Loic Poulain Date: Tue May 23 11:51:00 2017 +0200 Bluetooth: btwilink: Fix unexpected skb free The caller (hci_core) still owns the skb in case of error, releasing it inside the send function can lead to use-after-free errors. Reported-by: Dan Carpenter Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann drivers/bluetooth/btwilink.c | 1 - 1 file changed, 1 deletion(-) commit 823b84201f4a719414d61b105fd23706c5668ab5 Author: Guodong Xu Date: Mon May 22 21:50:42 2017 +0800 Bluetooth: hci_ll: Fix download_firmware() return when __hci_cmd_sync fails When __hci_cmd_sync() fails, download_firmware() should also fail, and the same error value should be returned as PTR_ERR(skb). Without this fix, download_firmware() will return a success when it actually failed in __hci_cmd_sync(). Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support") Signed-off-by: Guodong Xu Acked-by: Rob Herring Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ll.c | 1 + 1 file changed, 1 insertion(+) commit 296990deb389c7da21c78030376ba244dc1badf5 Author: Eric W. Biederman Date: Mon Oct 24 17:25:19 2016 -0500 mnt: Make propagate_umount less slow for overlapping mount propagation trees Andrei Vagin pointed out that time to executue propagate_umount can go non-linear (and take a ludicrious amount of time) when the mount propogation trees of the mounts to be unmunted by a lazy unmount overlap. Make the walk of the mount propagation trees nearly linear by remembering which mounts have already been visited, allowing subsequent walks to detect when walking a mount propgation tree or a subtree of a mount propgation tree would be duplicate work and to skip them entirely. Walk the list of mounts whose propgatation trees need to be traversed from the mount highest in the mount tree to mounts lower in the mount tree so that odds are higher that the code will walk the largest trees first, allowing later tree walks to be skipped entirely. Add cleanup_umount_visitation to remover the code's memory of which mounts have been visited. Add the functions last_slave and skip_propagation_subtree to allow skipping appropriate parts of the mount propagation tree without needing to change the logic of the rest of the code. A script to generate overlapping mount propagation trees: $ cat runs.h set -e mount -t tmpfs zdtm /mnt mkdir -p /mnt/1 /mnt/2 mount -t tmpfs zdtm /mnt/1 mount --make-shared /mnt/1 mkdir /mnt/1/1 iteration=10 if [ -n "$1" ] ; then iteration=$1 fi for i in $(seq $iteration); do mount --bind /mnt/1/1 /mnt/1/1 done mount --rbind /mnt/1 /mnt/2 TIMEFORMAT='%Rs' nr=$(( ( 2 ** ( $iteration + 1 ) ) + 1 )) echo -n "umount -l /mnt/1 -> $nr " time umount -l /mnt/1 nr=$(cat /proc/self/mountinfo | grep zdtm | wc -l ) time umount -l /mnt/2 $ for i in $(seq 9 19); do echo $i; unshare -Urm bash ./run.sh $i; done Here are the performance numbers with and without the patch: mhash | 8192 | 8192 | 1048576 | 1048576 mounts | before | after | before | after ------------------------------------------------ 1025 | 0.040s | 0.016s | 0.038s | 0.019s 2049 | 0.094s | 0.017s | 0.080s | 0.018s 4097 | 0.243s | 0.019s | 0.206s | 0.023s 8193 | 1.202s | 0.028s | 1.562s | 0.032s 16385 | 9.635s | 0.036s | 9.952s | 0.041s 32769 | 60.928s | 0.063s | 44.321s | 0.064s 65537 | | 0.097s | | 0.097s 131073 | | 0.233s | | 0.176s 262145 | | 0.653s | | 0.344s 524289 | | 2.305s | | 0.735s 1048577 | | 7.107s | | 2.603s Andrei Vagin reports fixing the performance problem is part of the work to fix CVE-2016-6213. Cc: stable@vger.kernel.org Fixes: a05964f3917c ("[PATCH] shared mounts handling: umount") Reported-by: Andrei Vagin Reviewed-by: Andrei Vagin Signed-off-by: "Eric W. Biederman" fs/pnode.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) commit 99b19d16471e9c3faa85cad38abc9cbbe04c6d55 Author: Eric W. Biederman Date: Mon Oct 24 16:16:13 2016 -0500 mnt: In propgate_umount handle visiting mounts in any order While investigating some poor umount performance I realized that in the case of overlapping mount trees where some of the mounts are locked the code has been failing to unmount all of the mounts it should have been unmounting. This failure to unmount all of the necessary mounts can be reproduced with: $ cat locked_mounts_test.sh mount -t tmpfs test-base /mnt mount --make-shared /mnt mkdir -p /mnt/b mount -t tmpfs test1 /mnt/b mount --make-shared /mnt/b mkdir -p /mnt/b/10 mount -t tmpfs test2 /mnt/b/10 mount --make-shared /mnt/b/10 mkdir -p /mnt/b/10/20 mount --rbind /mnt/b /mnt/b/10/20 unshare -Urm --propagation unchaged /bin/sh -c 'sleep 5; if [ $(grep test /proc/self/mountinfo | wc -l) -eq 1 ] ; then echo SUCCESS ; else echo FAILURE ; fi' sleep 1 umount -l /mnt/b wait %% $ unshare -Urm ./locked_mounts_test.sh This failure is corrected by removing the prepass that marks mounts that may be umounted. A first pass is added that umounts mounts if possible and if not sets mount mark if they could be unmounted if they weren't locked and adds them to a list to umount possibilities. This first pass reconsiders the mounts parent if it is on the list of umount possibilities, ensuring that information of umoutability will pass from child to mount parent. A second pass then walks through all mounts that are umounted and processes their children unmounting them or marking them for reparenting. A last pass cleans up the state on the mounts that could not be umounted and if applicable reparents them to their first parent that remained mounted. While a bit longer than the old code this code is much more robust as it allows information to flow up from the leaves and down from the trunk making the order in which mounts are encountered in the umount propgation tree irrelevant. Cc: stable@vger.kernel.org Fixes: 0c56fe31420c ("mnt: Don't propagate unmounts to locked mounts") Reviewed-by: Andrei Vagin Signed-off-by: "Eric W. Biederman" fs/mount.h | 2 +- fs/namespace.c | 2 +- fs/pnode.c | 144 ++++++++++++++++++++++++++++++++++----------------------- 3 files changed, 88 insertions(+), 60 deletions(-) commit 570487d3faf2a1d8a220e6ee10f472163123d7da Author: Eric W. Biederman Date: Mon May 15 14:42:07 2017 -0500 mnt: In umount propagation reparent in a separate pass It was observed that in some pathlogical cases that the current code does not unmount everything it should. After investigation it was determined that the issue is that mnt_change_mntpoint can can change which mounts are available to be unmounted during mount propagation which is wrong. The trivial reproducer is: $ cat ./pathological.sh mount -t tmpfs test-base /mnt cd /mnt mkdir 1 2 1/1 mount --bind 1 1 mount --make-shared 1 mount --bind 1 2 mount --bind 1/1 1/1 mount --bind 1/1 1/1 echo grep test-base /proc/self/mountinfo umount 1/1 echo grep test-base /proc/self/mountinfo $ unshare -Urm ./pathological.sh The expected output looks like: 46 31 0:25 / /mnt rw,relatime - tmpfs test-base rw,uid=1000,gid=1000 47 46 0:25 /1 /mnt/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 48 46 0:25 /1 /mnt/2 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 49 54 0:25 /1/1 /mnt/1/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 50 53 0:25 /1/1 /mnt/2/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 51 49 0:25 /1/1 /mnt/1/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 54 47 0:25 /1/1 /mnt/1/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 53 48 0:25 /1/1 /mnt/2/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 52 50 0:25 /1/1 /mnt/2/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 46 31 0:25 / /mnt rw,relatime - tmpfs test-base rw,uid=1000,gid=1000 47 46 0:25 /1 /mnt/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 48 46 0:25 /1 /mnt/2 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 The output without the fix looks like: 46 31 0:25 / /mnt rw,relatime - tmpfs test-base rw,uid=1000,gid=1000 47 46 0:25 /1 /mnt/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 48 46 0:25 /1 /mnt/2 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 49 54 0:25 /1/1 /mnt/1/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 50 53 0:25 /1/1 /mnt/2/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 51 49 0:25 /1/1 /mnt/1/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 54 47 0:25 /1/1 /mnt/1/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 53 48 0:25 /1/1 /mnt/2/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 52 50 0:25 /1/1 /mnt/2/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 46 31 0:25 / /mnt rw,relatime - tmpfs test-base rw,uid=1000,gid=1000 47 46 0:25 /1 /mnt/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 48 46 0:25 /1 /mnt/2 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 52 48 0:25 /1/1 /mnt/2/1 rw,relatime shared:1 - tmpfs test-base rw,uid=1000,gid=1000 That last mount in the output was in the propgation tree to be unmounted but was missed because the mnt_change_mountpoint changed it's parent before the walk through the mount propagation tree observed it. Cc: stable@vger.kernel.org Fixes: 1064f874abc0 ("mnt: Tuck mounts under others instead of creating shadow/side mounts.") Acked-by: Andrei Vagin Reviewed-by: Ram Pai Signed-off-by: "Eric W. Biederman" fs/mount.h | 1 + fs/namespace.c | 1 + fs/pnode.c | 35 ++++++++++++++++++++++++++++++----- 3 files changed, 32 insertions(+), 5 deletions(-) commit c4d3fd4614248880d700b6286c01839c416e37cb Author: Philippe CORNU Date: Mon May 22 11:30:21 2017 +0200 drm/stm: ltdc: fix duplicated arguments Fix COMPILE_TEST build issue detected with the rule: "duplicated argument to & or |" Signed-off-by: Philippe CORNU Signed-off-by: Benjamin Gaignard Link: http://patchwork.freedesktop.org/patch/msgid/1495445421-20846-1-git-send-email-philippe.cornu@st.com drivers/gpu/drm/stm/ltdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22f0502ed9f3ae624b0b9a922a067cb6f7e7ce09 Author: Sven Eckelmann Date: Fri May 19 13:02:00 2017 +0200 batman-adv: Print correct function names in dbg messages The function names in batman-adv changed slightly in the past. But some of the debug messages were not updated correctly and therefore some messages were incorrect. To avoid this in the future, these kind of messages should use __func__ to automatically print the correct function name. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 3 +- net/batman-adv/bridge_loop_avoidance.c | 73 ++++++++++++++++++---------------- net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/routing.c | 4 +- net/batman-adv/send.c | 6 +-- 5 files changed, 46 insertions(+), 42 deletions(-) commit 679d026932f23112e89e0466742a9c06f8160635 Author: Adam Thomson Date: Tue May 23 09:20:13 2017 +0100 ASoC: da7218: Fix incorrect usage of bitwise '&' operator for SRM check In the SRM lock check section of code the '&' bitwise operator is used as part of checking lock status. Functionally the code works as intended, but the conditional statement is a boolean comparison so should really use '&&' logical operator instead. This commit rectifies this discrepancy. Signed-off-by: Adam Thomson Reviewed-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/codecs/da7218.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f63078abff0d2927c2f58f22b1082520def70865 Author: Michał Winiarski Date: Tue May 23 12:23:59 2017 +0200 drm/i915/guc: Skip port assign on first iteration of GuC dequeue If port[0] is occupied and we're trying to dequeue request from different context, we will inevitably hit BUG_ON in port_assign. Let's skip it - similar to what we're doing in execlists counterpart. Fixes: 77f0d0e925e8a0 ("drm/i915/execlists: Pack the count into the low bits of the port.request") Cc: Chris Wilson Cc: Michał Wajdeczko Cc: Mika Kuoppala Cc: Tvrtko Ursulin Signed-off-by: Michał Winiarski Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170523102400.9614-2-michal.winiarski@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1d5fd00313c49f7972e3356ac58e0ad7934e1948 Author: Michał Winiarski Date: Tue May 23 12:23:58 2017 +0200 drm/i915: Remove misleading comment in request_alloc Passing NULL ctx to request_alloc would lead to null-ptr-deref. v2: Let's not replace the comment with a BUG_ON Signed-off-by: Michał Winiarski Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170523102400.9614-1-michal.winiarski@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_request.c | 3 --- 1 file changed, 3 deletions(-) commit abd7229626b9339e378a8cfcdebe0c0943b06a7f Author: Christoffer Dall Date: Sat May 6 20:01:24 2017 +0200 KVM: arm/arm64: Simplify active_change_prepare and plug race We don't need to stop a specific VCPU when changing the active state, because private IRQs can only be modified by a running VCPU for the VCPU itself and it is therefore already stopped. However, it is also possible for two VCPUs to be modifying the active state of SPIs at the same time, which can cause the thread being stuck in the loop that checks other VCPU threads for a potentially very long time, or to modify the active state of a running VCPU. Fix this by serializing all accesses to setting and clearing the active state of interrupts using the KVM mutex. Reported-by: Andrew Jones Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier arch/arm/include/asm/kvm_host.h | 2 -- arch/arm64/include/asm/kvm_host.h | 2 -- virt/kvm/arm/arm.c | 20 ++++---------------- virt/kvm/arm/vgic/vgic-mmio.c | 18 ++++++++++-------- virt/kvm/arm/vgic/vgic.c | 11 ++++++----- 5 files changed, 20 insertions(+), 33 deletions(-) commit 3197191e5525ea7cf8b3fdd9afc75ab5779d21fd Author: Christoffer Dall Date: Tue May 16 09:44:39 2017 +0200 KVM: arm/arm64: Separate guest and uaccess writes to dist {sc}active Factor out the core register modifier functionality from the entry points from the register description table, and only call the prepare/finish functions from the guest path, not the uaccess path. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/vgic/vgic-mmio-v2.c | 6 +++-- virt/kvm/arm/vgic/vgic-mmio-v3.c | 8 ++++--- virt/kvm/arm/vgic/vgic-mmio.c | 50 ++++++++++++++++++++++++++++++++++------ virt/kvm/arm/vgic/vgic-mmio.h | 8 +++++++ 4 files changed, 60 insertions(+), 12 deletions(-) commit 2602087ef49d8081ece54019aa862dbb12a04806 Author: Christoffer Dall Date: Tue May 16 09:31:58 2017 +0200 KVM: arm/arm64: Allow GICv2 to supply a uaccess register function We are about to differentiate between writes from a VCPU and from userspace to the GIC's GICD_ISACTIVER and GICD_ICACTIVER registers due to different synchronization requirements. Expand the macro to define a register description for the GIC to take uaccess functions as well. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier virt/kvm/arm/vgic/vgic-mmio-v2.c | 22 +++++++++++----------- virt/kvm/arm/vgic/vgic-mmio.h | 4 +++- 2 files changed, 14 insertions(+), 12 deletions(-) commit 912eeed9f5208515b75103e91ff8b64cfdcca7b9 Author: Markus Elfring Date: Sat May 6 17:57:36 2017 +0200 batman-adv: Combine two seq_puts() calls into one call in batadv_nc_nodes_seq_print_text() A bit of text was put into a sequence by two separate function calls. Print the same data by a single function call instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/network-coding.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 626caae9f25746c39b0a1204f8b8f532c1746f10 Author: Markus Elfring Date: Sat May 6 17:50:13 2017 +0200 batman-adv: Replace a seq_puts() call by seq_putc() in two functions Two single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 2 +- net/batman-adv/bat_v.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8ea026b1601c68fd133c3f3b0350dd1cd59ae352 Author: Matthias Schiffer Date: Wed Feb 22 17:25:41 2017 +0100 batman-adv: decrease maximum fragment size With this patch the maximum fragment size is reduced from 1400 to 1280 bytes. Fragmentation v2 correctly uses the smaller of 1400 and the interface MTU, thus generally supporting interfaces with an MTU < 1400 bytes, too. However, currently "Fragmentation v2" does not support re-fragmentation. Which means that once a packet is split into two packets of 1400 + x bytes for instance and the next hop provides an interface with an even smaller MTU of 1280 bytes, then the larger fragment is lost. A maximum fragment size of 1280 bytes is a safer option as this is the minimum MTU required by IPv6, making interfaces with an MTU < 1280 rather exotic. Regarding performance, this should have no negative impact on unicast traffic: Having some more bytes in the smaller and some less in the larger does not change the sum of both fragments. Concerning TT, choosing 1280 bytes fragments might result in more TT messages than necessary when a large network is bridged into batman-adv. However, the TT overhead in general is marginal due to its reactive nature, therefore such a performance impact on TT should not be noticeable for a user. Cc: Matthias Schiffer [linus.luessing@c0d3.blue: Added commit message] Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1d2cf3de334d84812ea2a2ab287867f07c3ef26 Author: Simon Wunderlich Date: Tue May 23 11:41:54 2017 +0200 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a781a7d646ada7a69da4d2a804fe3405f2606b17 Author: Peter Robinson Date: Sat May 20 17:45:07 2017 +0100 extcon: qcom-spmi-misc: add dependency on ARCH_QCOM Depend on the architecture the device actuall is in, also add dep on the compile test to ensure continued coverage. Signed-off-by: Peter Robinson Signed-off-by: Chanwoo Choi drivers/extcon/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b6480faeee234829b315168aebcb281ecf95f178 Author: Wolfram Sang Date: Sun May 21 23:57:26 2017 +0200 gpio: pcf857x: move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Linus Walleij arch/arm/mach-davinci/board-da830-evm.c | 2 +- arch/arm/mach-davinci/board-dm644x-evm.c | 2 +- arch/arm/mach-davinci/board-dm646x-evm.c | 2 +- arch/arm/mach-pxa/balloon3.c | 2 +- arch/arm/mach-pxa/stargate2.c | 2 +- arch/mips/ath79/mach-pb44.c | 2 +- drivers/gpio/gpio-pcf857x.c | 2 +- include/linux/i2c/pcf857x.h | 44 -------------------------------- include/linux/platform_data/pcf857x.h | 44 ++++++++++++++++++++++++++++++++ 9 files changed, 51 insertions(+), 51 deletions(-) commit 0a848d638a25b4f2767b260ed83c271854e93cce Author: Wolfram Sang Date: Sun May 21 23:57:25 2017 +0200 gpio: max732x: move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Linus Walleij arch/arm/mach-pxa/littleton.c | 2 +- drivers/gpio/gpio-max732x.c | 2 +- include/linux/i2c/max732x.h | 22 ---------------------- include/linux/platform_data/max732x.h | 22 ++++++++++++++++++++++ 4 files changed, 24 insertions(+), 24 deletions(-) commit cf5459a9e2f3033bf16773ef5fc32ad0243a513b Author: Markus Elfring Date: Sun Apr 23 22:44:19 2017 +0200 extcon: arizona: Use devm_kcalloc() in arizona_extcon_get_micd_configs() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Charles Keepax Signed-off-by: Chanwoo Choi drivers/extcon/extcon-arizona.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 826a47e978303989a12d318b3539feefb127bbe6 Author: Markus Elfring Date: Sun Apr 23 22:15:20 2017 +0200 extcon: Fix a typo in three comment lines Adjust three words in this description for a function. Signed-off-by: Markus Elfring Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3f5071a8b07b697993a16bbe9cbc8c876ba60048 Author: Markus Elfring Date: Sun Apr 23 20:54:11 2017 +0200 extcon: Use devm_kcalloc() in extcon_dev_register() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". Signed-off-by: Markus Elfring Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ffaa36448985ac948031d1e99997cb4c78bbbb50 Author: Chen-Yu Tsai Date: Mon May 22 14:25:49 2017 +0800 pinctrl: sunxi: Fix SPDIF function name for A83T We use well known standard names for functions that have name, such as I2C, SPI, SPDIF, etc.. Fix the function name of SPDIF, which was named OWA (One Wire Audio) based on Allwinner datasheets. Fixes: 4730f33f0d82 ("pinctrl: sunxi: add allwinner A83T PIO controller support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15accb3cbbcdb7a9f945720de3d3d42fb79e786f Author: Gregory CLEMENT Date: Fri May 19 18:04:43 2017 +0200 MAINTAINERS: extend mvebu SoC entry with pinctrl drivers There was no entry for the mvebu pinctrl drivers. As they are tightly linked to the SoCs and there is a lot of common code to support the various pinctrl of each SoCs, then add a new entry for the mvebu maintainers. Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 3b4c94bbacb06aa7ff595041efec82604e44fc59 Author: Gregory CLEMENT Date: Fri May 19 18:09:23 2017 +0200 gpio: mvebu: allow building driver for Armada 7K/8K The mvebu gpio driver can also be used on arm64 mvebu SoC such as the Armada 7K/8K. This commit allows to build the driver for them (when only ARCH_MVEBU is defined) Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2233bf7a92e784f20d1a4a1d39438dcf51e75161 Author: Thomas Petazzoni Date: Fri May 19 18:09:21 2017 +0200 gpio: mvebu: switch to regmap for register access In order to be able to use this driver with the Armada 7K/8K SoCs, we need to use the regmap to access the registers. Indeed for these new SoCs, the gpio node will be part of a syscon. [gregory.clement@free-electrons.com: - fixed merge conflcit from 4.10 to 4.12-rc1 - added a commit log] Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 436 ++++++++++++++++++++++++++-------------------- 1 file changed, 245 insertions(+), 191 deletions(-) commit 6ec015d6130283fe63bd2f374a34c44d23442286 Author: Gregory CLEMENT Date: Fri May 19 18:09:20 2017 +0200 gpio: mvebu: sort header include This commit sorts alphabetically the header files. Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0a9718104ef34f6f709ad6315356baba04492326 Author: Mauro Carvalho Chehab Date: Thu May 18 22:25:45 2017 -0300 pinctrl: pinctrl.txt: standardize document format Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx. This document is almost following the standard stile. There are only two things to adjust on it: - promote the level of the document title; - mark literal blocks as such. Signed-off-by: Mauro Carvalho Chehab [Fix some indentations] Signed-off-by: Linus Walleij Documentation/pinctrl.txt | 1124 +++++++++++++++++++++++---------------------- 1 file changed, 570 insertions(+), 554 deletions(-) commit 81f66606498cb510a9158805392b8c6d9b5ed51e Author: Shawn Lin Date: Tue May 16 14:30:41 2017 +0800 arm64: dts: rockchip: extent IORESOURCE_MEM_64 of PCIe for rk3399 Make full use of 32 regions and increase IORESOURCE_MEM_64 so that we could have more chance to support PCIe switch with more endpoints attached to our RC. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d633becc583e13b38c4aea53b97a197acd61a521 Author: Shawn Lin Date: Tue May 16 14:30:40 2017 +0800 arm64: dts: rockchip: extent bus-ranges of PCIe for rk3399 In order to support multiple hierarchy of PCIe buses, for instance, PCIe switch, we need to extent bus-ranges to as max as possible. We have 32 regions and could support up to 31 buses except bus 0 for our root bridge. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b74a2e98dc15bad2f07f8fb82b03160d9b1fa13b Author: Kever Yang Date: Wed Apr 12 15:10:44 2017 +0800 arm64: dts: rockchip: add pinctrl settings for some rk3399 peripherals Add pinctrl for sdio, sdmmc, pcie, spdif, hdmi. Signed-off-by: Kever Yang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 113 +++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) commit 65f1e9029c1cbefd88121927cc5705cb9e132e04 Author: Kever Yang Date: Wed Apr 12 15:10:41 2017 +0800 arm64: dts: rockchip: add some missing qos nodes on rk3399 Add qos setting reg for some peripheral like sd, usb, pcie. Signed-off-by: Kever Yang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 45 ++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) commit 5c3c2ea6887176c5ae812c9f0350ff65b10e9485 Author: Arnd Bergmann Date: Wed May 17 22:39:24 2017 +0200 x86/tsc: Fold set_cyc2ns_scale() into caller The newly introduced wrapper function only has one caller, and this one is conditional, causing a harmless warning when CONFIG_CPU_FREQ is disabled: arch/x86/kernel/tsc.c:189:13: error: 'set_cyc2ns_scale' defined but not used [-Werror=unused-function] My first idea was to move the wrapper inside of that #ifdef, but on second thought it seemed nicer to remove it completely again and rename __set_cyc2ns_scale back to set_cyc2ns_scale, but leaving the extra argument. Signed-off-by: Arnd Bergmann Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Prarit Bhargava Cc: Thomas Gleixner Fixes: 615cd03373a0 ("x86/tsc: Fix sched_clock() sync") Link: http://lkml.kernel.org/r/20170517203949.2052220-1-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/kernel/tsc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 1c3c5eab171590f86edd8d31389d61dd1efe3037 Author: Thomas Gleixner Date: Tue May 16 20:42:48 2017 +0200 sched/core: Enable might_sleep() and smp_processor_id() checks early might_sleep() and smp_processor_id() checks are enabled after the boot process is done. That hides bugs in the SMP bringup and driver initialization code. Enable it right when the scheduler starts working, i.e. when init task and kthreadd have been created and right before the idle task enables preemption. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170516184736.272225698@linutronix.de Signed-off-by: Ingo Molnar init/main.c | 10 ++++++++++ kernel/sched/core.c | 4 +++- lib/smp_processor_id.c | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) commit 69a78ff226fe0241ab6cb9dd961667be477e3cf7 Author: Thomas Gleixner Date: Tue May 16 20:42:47 2017 +0200 init: Introduce SYSTEM_SCHEDULING state might_sleep() debugging and smp_processor_id() debugging should be active right after the scheduler starts working. The init task can invoke smp_processor_id() from preemptible context as it is pinned on the boot cpu until sched_smp_init() removes the pinning and lets it schedule on all non isolated cpus. Add a new state which allows to enable those checks earlier and add it to the xen do_poweroff() function. No functional change. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Boris Ostrovsky Acked-by: Mark Rutland Cc: Greg Kroah-Hartman Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170516184736.196214622@linutronix.de Signed-off-by: Ingo Molnar drivers/xen/manage.c | 1 + include/linux/kernel.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit c6202adf3a0969514299cf10ff07376a84ad09bb Author: Thomas Gleixner Date: Tue May 16 20:42:46 2017 +0200 mm/vmscan: Adjust system_state checks To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in kswapd_run() to handle the extra states. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Acked-by: Vlastimil Babka Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Johannes Weiner Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170516184736.119158930@linutronix.de Signed-off-by: Ingo Molnar mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff48cd26fc4889b9deb5f9333d3c61746e450b7f Author: Thomas Gleixner Date: Tue May 16 20:42:45 2017 +0200 printk: Adjust system_state checks To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in boot_delay_msec() to handle the extra states. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170516184736.027534895@linutronix.de Signed-off-by: Ingo Molnar kernel/printk/printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0594729c24d846889408a07057b5cc9e8d931419 Author: Thomas Gleixner Date: Tue May 16 20:42:44 2017 +0200 extable: Adjust system_state checks To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in core_kernel_text() to handle the extra states, i.e. to cover init text up to the point where the system switches to state RUNNING. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170516184735.949992741@linutronix.de Signed-off-by: Ingo Molnar kernel/extable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4def42724594cd399cfee365221f5b38639711d Author: Thomas Gleixner Date: Tue May 16 20:42:43 2017 +0200 async: Adjust system_state checks To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in async_run_entry_fn() and async_synchronize_cookie_domain() to handle the extra states. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Arjan van de Ven Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170516184735.865155020@linutronix.de Signed-off-by: Ingo Molnar kernel/async.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b903dfb277c09e53d499480e9670557dcce36fbd Author: Thomas Gleixner Date: Tue May 16 20:42:42 2017 +0200 iommu/of: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in of_iommu_driver_present() to handle the extra states. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Joerg Roedel Acked-by: Robin Murphy Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20170516184735.788023442@linutronix.de Signed-off-by: Ingo Molnar drivers/iommu/of_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b608fe356fe8328665445a26ec75dfac918c8c5d Author: Thomas Gleixner Date: Tue May 16 20:42:41 2017 +0200 iommu/vt-d: Adjust system_state checks To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state checks in dmar_parse_one_atsr() and dmar_iommu_notify_scope_dev() to handle the extra states. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Joerg Roedel Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Steven Rostedt Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20170516184735.712365947@linutronix.de Signed-off-by: Ingo Molnar drivers/iommu/intel-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d04e31a23c3c828456cb5613f391ce4ac4e5765f Author: Thomas Gleixner Date: Tue May 16 20:42:40 2017 +0200 cpufreq/pasemi: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in pas_cpufreq_cpu_exit() to handle the extra states. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Viresh Kumar Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Steven Rostedt Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170516184735.620023128@linutronix.de Signed-off-by: Ingo Molnar drivers/cpufreq/pasemi-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cdde385c7a33afbe13fd71351da0968540fa566 Author: Thomas Gleixner Date: Tue May 16 20:42:39 2017 +0200 mm: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. get_nid_for_pfn() checks for system_state == BOOTING to decide whether to use early_pfn_to_nid() when CONFIG_DEFERRED_STRUCT_PAGE_INIT=y. That check is dubious, because the switch to state RUNNING happes way after page_alloc_init_late() has been invoked. Change the check to less than RUNNING state so it covers the new intermediate states as well. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mark Rutland Cc: Mel Gorman Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170516184735.528279534@linutronix.de Signed-off-by: Ingo Molnar drivers/base/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9762b33dc31c67e34b36ba4e787e64084b3136ff Author: Thomas Gleixner Date: Tue May 16 20:42:38 2017 +0200 ACPI: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Make the decision whether a pci root is hotplugged depend on SYSTEM_RUNNING instead of !SYSTEM_BOOTING. It makes no sense to cover states greater than SYSTEM_RUNNING as there are not hotplug events on reboot and poweroff. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Cc: Greg Kroah-Hartman Cc: Len Brown Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Link: http://lkml.kernel.org/r/20170516184735.446455652@linutronix.de Signed-off-by: Ingo Molnar drivers/acpi/pci_root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8fcfc1917681ba1ccc23a429543a67aad8bfd00 Author: Thomas Gleixner Date: Tue May 16 20:42:37 2017 +0200 powerpc: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in smp_generic_cpu_bootable() to handle the extra states. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mark Rutland Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Steven Rostedt Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170516184735.359536998@linutronix.de Signed-off-by: Ingo Molnar arch/powerpc/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcd2e4734b428709984e2fa35ebbd6cccc246d47 Author: Thomas Gleixner Date: Tue May 16 20:42:36 2017 +0200 metag: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in stop_this_cpu() to handle the extra states. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Greg Kroah-Hartman Cc: James Hogan Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170516184735.283420315@linutronix.de Signed-off-by: Ingo Molnar arch/metag/kernel/smp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 719b3680d1f789c1e3054e3fcb26bfff07c3c623 Author: Thomas Gleixner Date: Tue May 16 20:42:35 2017 +0200 x86/smp: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in announce_cpu() to handle the extra states. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170516184735.191715856@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef284f5ca5f102bf855e599305c0c16d6e844635 Author: Thomas Gleixner Date: Tue May 16 20:42:34 2017 +0200 arm64: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in smp_send_stop() to handle the extra states. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Acked-by: Catalin Marinas Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Will Deacon Link: http://lkml.kernel.org/r/20170516184735.112589728@linutronix.de Signed-off-by: Ingo Molnar arch/arm64/kernel/smp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5976a66913a8bf42465d96776fd37fb5631edc19 Author: Thomas Gleixner Date: Tue May 16 20:42:33 2017 +0200 arm: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in ipi_cpu_stop() to handle the extra states. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Russell King Cc: Steven Rostedt Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170516184735.020718977@linutronix.de Signed-off-by: Ingo Molnar arch/arm/kernel/smp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8fb12156b8db61af3d49f3e5e104568494581d1f Author: Thomas Gleixner Date: Tue May 16 20:42:32 2017 +0200 init: Pin init task to the boot CPU, initially Some of the boot code in init_kernel_freeable() which runs before SMP bringup assumes (rightfully) that it runs on the boot CPU and therefore can use smp_processor_id() in preemptible context. That works so far because the smp_processor_id() check starts to be effective after smp bringup. That's just wrong. Starting with SMP bringup and the ability to move threads around, smp_processor_id() in preemptible context is broken. Aside of that it does not make sense to allow init to run on all CPUs before sched_smp_init() has been run. Pin the init to the boot CPU so the existing code can continue to use smp_processor_id() without triggering the checks when the enabling of those checks starts earlier. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170516184734.943149935@linutronix.de Signed-off-by: Ingo Molnar init/main.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 8655d5497735b288f8a9b458bd22e7d1bf95bb61 Author: Vlastimil Babka Date: Mon May 15 15:13:16 2017 +0200 sched/numa: Use down_read_trylock() for the mmap_sem A customer has reported a soft-lockup when running an intensive memory stress test, where the trace on multiple CPU's looks like this: RIP: 0010:[] [] native_queued_spin_lock_slowpath+0x10e/0x190 ... Call Trace: [] queued_spin_lock_slowpath+0x7/0xa [] change_protection_range+0x3b1/0x930 [] change_prot_numa+0x18/0x30 [] task_numa_work+0x1fe/0x310 [] task_work_run+0x72/0x90 Further investigation showed that the lock contention here is pmd_lock(). The task_numa_work() function makes sure that only one thread is let to perform the work in a single scan period (via cmpxchg), but if there's a thread with mmap_sem locked for writing for several periods, multiple threads in task_numa_work() can build up a convoy waiting for mmap_sem for read and then all get unblocked at once. This patch changes the down_read() to the trylock version, which prevents the build up. For a workload experiencing mmap_sem contention, it's probably better to postpone the NUMA balancing work anyway. This seems to have fixed the soft lockups involving pmd_lock(), which is in line with the convoy theory. Signed-off-by: Vlastimil Babka Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rik van Riel Acked-by: Mel Gorman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170515131316.21909-1-vbabka@suse.cz Signed-off-by: Ingo Molnar kernel/sched/fair.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c249f255aab86b9b187ba319b9d2684841ac7c8d Author: Dave Kleikamp Date: Mon May 15 14:14:13 2017 -0500 sched/rt: Minimize rq->lock contention in do_sched_rt_period_timer() With CONFIG_RT_GROUP_SCHED=y, do_sched_rt_period_timer() sequentially takes each CPU's rq->lock. On a large, busy system, the cumulative time it takes to acquire each lock can be excessive, even triggering a watchdog timeout. If rt_rq->rt_time and rt_rq->rt_nr_running are both zero, this function does nothing while holding the lock, so don't bother taking it at all. Signed-off-by: Dave Kleikamp Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a767637b-df85-912f-ba69-c90ee00a3fb6@oracle.com Signed-off-by: Ingo Molnar kernel/sched/rt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 896bbb2522587e3b8eb2a0d204d43ccc1042a00d Author: Steven Rostedt (VMware) Date: Thu Mar 9 10:18:42 2017 -0500 sched/core: Allow __sched_setscheduler() in interrupts when PI is not used When priority inheritance was added back in 2.6.18 to sched_setscheduler(), it added a path to taking an rt-mutex wait_lock, which is not IRQ safe. As PI is not a common occurrence, lockdep will likely never trigger if sched_setscheduler was called from interrupt context. A BUG_ON() was added to trigger if __sched_setscheduler() was ever called from interrupt context because there was a possibility to take the wait_lock. Today the wait_lock is irq safe, but the path to taking it in sched_setscheduler() is the same as the path to taking it from normal context. The wait_lock is taken with raw_spin_lock_irq() and released with raw_spin_unlock_irq() which will indiscriminately enable interrupts, which would be bad in interrupt context. The problem is that normalize_rt_tasks, which is called by triggering the sysrq nice-all-RT-tasks was changed to call __sched_setscheduler(), and this is done from interrupt context! Now __sched_setscheduler() takes a "pi" parameter that is used to know if the priority inheritance should be called or not. As the BUG_ON() only cares about calling the PI code, it should only bug if called from interrupt context with the "pi" parameter set to true. Reported-by: Laurent Dufour Tested-by: Laurent Dufour Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: dbc7f069b93a ("sched: Use replace normalize_task() with __sched_setscheduler()") Link: http://lkml.kernel.org/r/20170308124654.10e598f2@gandalf.local.home Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a776b968e52895a350d636e6e7fdcb3b10846fa4 Author: Byungchul Park Date: Fri May 12 10:05:59 2017 +0900 sched/deadline: Remove unnecessary condition in push_dl_task() pick_next_pushable_dl_task(rq) has BUG_ON(rq->cpu != task_cpu(task)) when it returns a task other than NULL, which means that task_cpu(task) must be rq->cpu. So if task == next_task, then task_cpu(next_task) must be rq->cpu as well. Remove the redundant condition and make the code simpler. This way one unnecessary branch and two LOAD operations can be avoided. Signed-off-by: Byungchul Park Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Juri Lelli Reviewed-by: Daniel Bristot de Oliveira Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1494551159-22367-1-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de16b91effdbf5aeff8346b99bcd0991a5362db9 Author: Byungchul Park Date: Fri May 12 10:05:43 2017 +0900 sched/rt: Remove unnecessary condition in push_rt_task() pick_next_pushable_task(rq) has BUG_ON(rq_cpu != task_cpu(task)) when it returns a task other than NULL, which means that task_cpu(task) must be rq->cpu. So if task == next_task, then task_cpu(next_task) must be rq->cpu as well. Remove the redundant condition and make the code simpler. This way one unnecessary branch and two LOAD operations can be avoided. Signed-off-by: Byungchul Park Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Juri Lelli Reviewed-by: Daniel Bristot de Oliveira Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1494551143-22219-1-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar kernel/sched/rt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73215849dfbf63421c1cafea5a1b6da9bb17831e Author: Byungchul Park Date: Fri May 12 09:39:44 2017 +0900 sched/core: Use the new llist_for_each_entry_safe() primitive Now that we've added llist_for_each_entry_safe(), use it to simplify an open coded version of it in sched_ttwu_pending(). Signed-off-by: Byungchul Park Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1494549584-11730-1-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit d714893e61cd8c6e5c7e095f7dd615aa434bca95 Author: Byungchul Park Date: Fri May 12 09:36:56 2017 +0900 llist: Provide a safe version for llist_for_each() Sometimes we have to dereference next field of llist node before entering loop becasue the node might be deleted or the next field might be modified within the loop. So this adds the safe version of llist_for_each(), that is, llist_for_each_safe(). Signed-off-by: Byungchul Park Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Huang, Ying Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1494549416-10539-1-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar include/linux/llist.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 6c8557bdb28df3ae97476c5e2aed6373cd235aab Author: Peter Zijlstra Date: Fri May 19 12:58:25 2017 +0200 smp, cpumask: Use non-atomic cpumask_{set,clear}_cpu() The cpumasks in smp_call_function_many() are private and not subject to concurrency, atomic bitops are pointless and expensive. 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 include/linux/cpumask.h | 11 +++++++++++ kernel/smp.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 3fc5b3b6a80b2e08a0fec0056208c5dff757e547 Author: Aaron Lu Date: Fri May 19 15:53:31 2017 +0800 smp: Avoid sending needless IPI in smp_call_function_many() Inter-Processor-Interrupt(IPI) is needed when a page is unmapped and the process' mm_cpumask() shows the process has ever run on other CPUs. page migration, page reclaim all need IPIs. The number of IPI needed to send to different CPUs is especially large for multi-threaded workload since mm_cpumask() is per process. For smp_call_function_many(), whenever a CPU queues a CSD to a target CPU, it will send an IPI to let the target CPU to handle the work. This isn't necessary - we need only send IPI when queueing a CSD to an empty call_single_queue. The reason: flush_smp_call_function_queue() that is called upon a CPU receiving an IPI will empty the queue and then handle all of the CSDs there. So if the target CPU's call_single_queue is not empty, we know that: i. An IPI for the target CPU has already been sent by 'previous queuers'; ii. flush_smp_call_function_queue() hasn't emptied that CPU's queue yet. Thus, it's safe for us to just queue our CSD there without sending an addtional IPI. And for the 'previous queuers', we can limit it to the first queuer. To demonstrate the effect of this patch, a multi-thread workload that spawns 80 threads to equally consume 100G memory is used. This is tested on a 2 node broadwell-EP which has 44cores/88threads and 32G memory. So after 32G memory is used up, page reclaiming starts to happen a lot. With this patch, IPI number dropped 88% and throughput increased about 15% for the above workload. Signed-off-by: Aaron Lu Signed-off-by: Peter Zijlstra (Intel) Cc: Dave Hansen Cc: Huang Ying Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Link: http://lkml.kernel.org/r/20170519075331.GE2084@aaronlu.sh.intel.com Signed-off-by: Ingo Molnar kernel/smp.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 350fe5ee49f4b94c5ef4164b41cd7a21ec8d8151 Merge: 39d2675 7f38c5b Author: Linus Walleij Date: Tue May 23 09:52:40 2017 +0200 Merge branch 'mcp23s08' of /home/linus/linux-pinctrl into devel commit fe421052b3936739c720d1f771b8a60bb2c5011f Merge: bdb18d9 7f38c5b Author: Linus Walleij Date: Tue May 23 09:52:08 2017 +0200 Merge branch 'mcp23s08' into devel commit 7f38c5b99779554d6c6e5043cfda848b967f2ca9 Author: Sebastian Reichel Date: Mon May 15 11:24:38 2017 +0200 pinctrl: mcp23s08: fix comment for mcp23s08_platform_data.base The comment does not match the driver, which actually supports automatic assignment. Fix this by updating the comment. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij include/linux/spi/mcp23s08.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d8f4494e70ae5fef159719bfbb6abedc53619bf1 Author: Sebastian Reichel Date: Mon May 15 11:24:37 2017 +0200 pinctrl: mcp23s08: drop comment about missing irq support The driver supports using mcp23xxx as interrupt controller, so let's drop all comments stating otherwise. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 19 ++----------------- include/linux/spi/mcp23s08.h | 3 --- 2 files changed, 2 insertions(+), 20 deletions(-) commit ce9bd0a0ff106b478012dc2e4c2b10bb0138dd7a Author: Sebastian Reichel Date: Mon May 15 11:24:36 2017 +0200 pinctrl: mcp23s08: simplify spi_present_mask handling Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij arch/blackfin/mach-bf527/boards/tll6527m.c | 4 ++-- drivers/pinctrl/pinctrl-mcp23s08.c | 29 ++++++++++------------------- include/linux/spi/mcp23s08.h | 6 +----- 3 files changed, 13 insertions(+), 26 deletions(-) commit 386b55488849207a67a462a3a4ccc3dc8c7f21b9 Merge: a9e7f65 fde8e33 Author: Ingo Molnar Date: Tue May 23 09:50:35 2017 +0200 Merge branch 'linus' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 5b1a7e803a9fd960b6d75a1d970519c57cfe2618 Author: Sebastian Reichel Date: Mon May 15 11:24:35 2017 +0200 pinctrl: mcp23s08: generalize irq property handling This moves irq property handling from spi/i2c specific code into the generic mcp23s08_probe_one. This is possible because the device properties are named equally. As a side-effect this drops support for setting the properties via pdata, which has no mainline users. If boardcode wants to enable the chip as interrupt controller it can attach the device properties instead. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 27 +++++++++------------------ include/linux/spi/mcp23s08.h | 18 ------------------ 2 files changed, 9 insertions(+), 36 deletions(-) commit 36cc2b9222b5106de34085c4dd8635ac67ef5cba Author: Dan Carpenter Date: Mon May 22 12:04:18 2017 +0300 perf/core: Fix error handling in perf_event_alloc() We don't set an error code here which means that perf_event_alloc() returns ERR_PTR(0) (in other words NULL). The callers are not expecting that and would Oops. Signed-off-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 375637bc5249 ("perf/core: Introduce address range filtering") Link: http://lkml.kernel.org/r/20170522090418.hvs6icgpdo53wkn5@mwanda Signed-off-by: Ingo Molnar kernel/events/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 85c617abc786d7da9e95c0b4174159864dd3f85c Author: Dan Carpenter Date: Mon May 22 12:03:49 2017 +0300 perf/core: Remove some dead code perf_init_event() can't return NULL. If it did, the error handling is incomplete and we would crash. I have removed this confusing dead code. Signed-off-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20170522090348.5g7yyld5en3yeky4@mwanda Signed-off-by: Ingo Molnar kernel/events/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6089327f5424f227bb6a8cf92363c2617e054453 Author: Kan Liang Date: Fri May 12 07:51:13 2017 -0700 perf/x86: Add sysfs entry to freeze counters on SMI Currently, the SMIs are visible to all performance counters, because many users want to measure everything including SMIs. But in some cases, the SMI cycles should not be counted - for example, to calculate the cost of an SMI itself. So a knob is needed. When setting FREEZE_WHILE_SMM bit in IA32_DEBUGCTL, all performance counters will be effected. There is no way to do per-counter freeze on SMI. So it should not use the per-event interface (e.g. ioctl or event attribute) to set FREEZE_WHILE_SMM bit. Adds sysfs entry /sys/device/cpu/freeze_on_smi to set FREEZE_WHILE_SMM bit in IA32_DEBUGCTL. When set, freezes perfmon and trace messages while in SMM. Value has to be 0 or 1. It will be applied to all processors. Also serialize the entire setting so we don't get multiple concurrent threads trying to update to different values. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Cc: acme@kernel.org Cc: bp@alien8.de Cc: jolsa@kernel.org Link: http://lkml.kernel.org/r/1494600673-244667-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 10 +++++++ arch/x86/events/intel/core.c | 63 ++++++++++++++++++++++++++++++++++++++++ arch/x86/events/perf_event.h | 3 ++ arch/x86/include/asm/msr-index.h | 2 ++ 4 files changed, 78 insertions(+) commit 0d7fcd504cbe8e2a6269a9e267b044700f3da876 Author: Sebastian Reichel Date: Mon May 15 11:24:34 2017 +0200 pinctrl: mcp23s08: simplify spi pdata handling Simplify spi pdata handling, so that it uses pdata when available and falls back to reading device properties otherwise. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 67 ++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 35 deletions(-) commit 5f853acfa9242b3091c145265131232e246d95d4 Author: Sebastian Reichel Date: Mon May 15 11:24:33 2017 +0200 pinctrl: mcp23s08: simplify i2c pdata handling Simplify i2c pdata handling, so that it uses pdata when available and falls back to reading device properties otherwise. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) commit d0e49dabc60bf00b4a148742d3e4a16b1dbd8577 Author: Sebastian Reichel Date: Mon May 15 11:24:32 2017 +0200 pinctrl: mcp23s08: switch to devm_gpiochip_add_data Switching to devm_gpiochip_add_data simplifies the driver's cleanup routine and safes a few loc. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 40 ++------------------------------------ 1 file changed, 2 insertions(+), 38 deletions(-) commit 2f98e78b5a6b0f14073d677a224428e24b3bdccb Author: Sebastian Reichel Date: Mon May 15 11:24:31 2017 +0200 pinctrl: mcp23s08: use managed kzalloc for mcp Let's remove a few lines of code by using managed memory for mcp variable. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 2e29e7677275dd6b50d81890ae28f017234ea52c Author: Sebastian Reichel Date: Mon May 15 11:24:30 2017 +0200 pinctrl: mcp23s08: irq mapping is already done i2c-core and spi-core already assign the irq, so we can drop the additional call from the mcp driver. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 4 ---- 1 file changed, 4 deletions(-) commit 25ca1cea7836ec26d76cc6fe89419b674e23c727 Author: Sebastian Reichel Date: Mon May 15 11:24:29 2017 +0200 pinctrl: mcp23s08: drop OF_GPIO dependency The driver compiles & works perfectly fine without OF_GPIO on x86, so lets drop the dependency. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 8f38910ba4f662222157ce07a0d5becc4328c46a Author: Sebastian Reichel Date: Mon May 15 11:24:28 2017 +0200 pinctrl: mcp23s08: switch to regmap caching Instead of using custom caching, this switches to regmap based caching. Before the conversion the debugfs file used uncached values, so that it was easily possible to see power-loss related problems. The new code will check and recover at this place. The patch will also ensure, that irqs are not cleared by checking register status in debugfs. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 287 +++++++++++++++++++++++++------------ 1 file changed, 192 insertions(+), 95 deletions(-) commit d795cb51dfee2a859b5585101a4e3ce5bc9bff75 Author: Sebastian Reichel Date: Mon May 15 11:24:27 2017 +0200 pinctrl: mcp23s08: drop pullup config from pdata mcp23s08 support configuration of the pullups using the pinconf framework. This removes the custom pullup configuration from platform data, which has no upstream users. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 7 ------- include/linux/spi/mcp23s08.h | 1 - 2 files changed, 8 deletions(-) commit 82039d244f87b6c47e880b398414da55d4f48e06 Author: Sebastian Reichel Date: Mon May 15 11:24:26 2017 +0200 pinctrl: mcp23s08: add pinconf support mcp23xxx device have configurable 100k pullup resistors. This adds support for enabling them using pinctrl's pinconf interface. Signed-off-by: Sebastian Reichel Tested-by: Enric Balletbo i Serra Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/pinctrl-mcp23s08.c | 199 ++++++++++++++++++++++++++++++++----- 2 files changed, 176 insertions(+), 24 deletions(-) commit 64ac43e6fa283f556f0a8f69ad52d6e7d550307d Author: Sebastian Reichel Date: Mon May 15 11:24:25 2017 +0200 gpio: mcp23s08: move to pinctrl This moves the mcp23s08 driver from gpio to pinctrl. Actual pinctrl support for configuration of the pull-up resistors follows in its own patch. Signed-off-by: Sebastian Reichel Acked-by: Sylvain Lemieux Signed-off-by: Linus Walleij arch/arm/configs/lpc32xx_defconfig | 2 +- arch/blackfin/configs/BF609-EZKIT_defconfig | 2 +- arch/blackfin/mach-bf527/boards/tll6527m.c | 4 +- arch/blackfin/mach-bf609/boards/ezkit.c | 4 +- drivers/gpio/Kconfig | 17 - drivers/gpio/Makefile | 1 - drivers/gpio/gpio-mcp23s08.c | 1047 --------------------------- drivers/pinctrl/Kconfig | 13 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-mcp23s08.c | 1047 +++++++++++++++++++++++++++ 10 files changed, 1067 insertions(+), 1071 deletions(-) commit ffb73b08e79418fbf3f2ea44a7818a6715399d2c Author: Takashi Iwai Date: Mon May 22 17:39:13 2017 +0200 ALSA: info: Use kvzalloc() for a temporary write buffer We used to use kmalloc (more exactly, krealloc()) for creating and growing the temporary buffer for text proc write. It can grow up to 16kB, and it's already a bit doubtful whether it's always safe to use kmalloc(). With the recent addition of kvmalloc(), we can have a better chance for succeed of memory allocation, so let's switch to that new API. Signed-off-by: Takashi Iwai sound/core/info.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c2c86a97175f552fd32b339426a489c7af818123 Author: Takashi Iwai Date: Wed May 10 14:33:44 2017 +0200 ALSA: pcm: Remove set_fs() in PCM core code PCM core code has a few usages of set_fs(), mostly for two codepaths: - The DELAY ioctl call from pcm_compat.c - The ioctl wrapper in kernel context for PCM OSS and other This patch removes the set_fs() usage in these places by a slight code refactoring. For the former point, snd_pcm_delay() is changed to return the value directly instead of putting the value to the given address. Each caller stores the result in an appropriate manner. For fixing the latter, snd_pcm_lib_kernel_ioctl() is changed to call the functions directly as well. For achieving it, now the function accepts only the limited set of ioctls that have been used, so far. The primary user of this function is the PCM OSS layer, and the only other user is USB UAC1 gadget driver. Both drivers don't need the full set of ioctls. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_compat.c | 12 ++---- sound/core/pcm_native.c | 102 ++++++++++++++++++++++++++++++------------------ 2 files changed, 67 insertions(+), 47 deletions(-) commit 53e7bf452584e73df8a529a2b157a1225a52637f Author: Takashi Iwai Date: Mon May 22 17:43:04 2017 +0200 ALSA: control: Simplify snd_ctl_elem_list() implementation This patch simplifies the code of snd_ctl_elem_list() in the following ways: - Avoid a vmalloc() temporary buffer but do copy in each iteration; the vmalloc buffer was introduced at the time we took the spinlock for the ctl element management. - Use the standard list_for_each_entry() macro - Merge two loops into one; it used to be a loop for skipping until offset becomes zero and another loop to copy the data. They can be folded into a single loop easily. Reviewed-by: Takashi Sakamoto Tested-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/control.c | 66 +++++++++++++++++++--------------------------------- 1 file changed, 24 insertions(+), 42 deletions(-) commit 6507c57bb013a22ae0f61bdbb2a63380598d34a2 Author: Corentin LABBE Date: Fri May 19 08:53:31 2017 +0200 crypto: ccp - Use IPAD/OPAD constant This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-sha.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1127eea914c74bf8c3cb3ddaa3dcaae628e87263 Author: Corentin LABBE Date: Fri May 19 08:53:30 2017 +0200 crypto: mediatek - Use IPAD/OPAD constant This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Reviewed-by: Matthias Brugger Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-sha.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f14011ad7cf79a590a39ad2dd7062153ef19ab6e Author: Corentin LABBE Date: Fri May 19 08:53:29 2017 +0200 crypto: qat - Use IPAD/OPAD constant This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ebd401e702dd88fb95a92617bf52ad41c3bf61cd Author: Corentin LABBE Date: Fri May 19 08:53:28 2017 +0200 crypto: omap-sham - Use IPAD/OPAD constant This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8139782dce737299385d7c9d91a2f62517540f6f Author: Corentin LABBE Date: Fri May 19 08:53:27 2017 +0200 crypto: mv_cesa - Use IPAD/OPAD constant This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/mv_cesa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d477d813363ce6f393c310de8a2269b3eacd18a5 Author: Corentin LABBE Date: Fri May 19 08:53:26 2017 +0200 crypto: marvell - Use IPAD/OPAD constant This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Acked-by: Boris Brezillon Signed-off-by: Herbert Xu drivers/crypto/marvell/hash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bb9634df0526593f60294f6f3c90787f7d4df7b0 Author: Corentin LABBE Date: Fri May 19 08:53:25 2017 +0200 crypto: ixp4xx - Use IPAD/OPAD constant This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/ixp4xx_crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1126d47db0cf40a5f31060095507ea5416a43344 Author: Corentin LABBE Date: Fri May 19 08:53:24 2017 +0200 crypto: brcm - Use IPAD/OPAD constant This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/bcm/cipher.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 03d7db5654aefb78bf2ded62e2187833fda2a6cc Author: Corentin LABBE Date: Fri May 19 08:53:23 2017 +0200 crypto: hmac - add hmac IPAD/OPAD constant Many HMAC users directly use directly 0x36/0x5c values. It's better with crypto to use a name instead of directly some crypto constant. This patch simply add HMAC_IPAD_VALUE/HMAC_OPAD_VALUE defines in a new include file "crypto/hmac.h" and use them in crypto/hmac.c Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu crypto/hmac.c | 5 +++-- include/crypto/hmac.h | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) commit 9417cd1c517a89ccfb5cc3d3f2a0e50fc64f3445 Author: Eric Biggers Date: Tue May 16 21:03:08 2017 -0700 crypto: x86/aes - Don't use %rbp as temporary register When using the "aes-asm" implementation of AES (*not* the AES-NI implementation) on an x86_64, v4.12-rc1 kernel with lockdep enabled, the following warning was reported, along with a long unwinder dump: WARNING: kernel stack regs at ffffc90000643558 in kworker/u4:2:155 has bad 'bp' value 000000000000001c The problem is that aes_enc_block() and aes_dec_block() use %rbp as a temporary register, which breaks stack traces if an interrupt occurs. Fix this by replacing %rbp with %r9, which was being used to hold the saved value of %rbp. This required rearranging the AES round macro slightly since %r9d cannot be used as the target of a move from %ah-%dh. Performance is essentially unchanged --- actually about 0.2% faster than before. Interestingly, I also measured aes-generic as being nearly 7% faster than aes-asm, so perhaps aes-asm has outlived its usefulness... Signed-off-by: Eric Biggers Reviewed-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/aes-x86_64-asm_64.S | 47 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 25 deletions(-) commit 248c65056ccca7d51db78e6821ff89a020e168bb Author: Christoph Hellwig Date: Tue May 16 16:21:05 2017 +0200 crypto: qat - use pcie_flr instead of duplicating it Signed-off-by: Christoph Hellwig Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_aer.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 5f052c9c631d360d6ec6202714b9d6529a21117a Author: Arvind Yadav Date: Tue May 16 13:57:41 2017 +0530 crypto: img-hash - Handle return value of clk_prepare_enable Here, Clock enable can failed. So adding an error check for clk_prepare_enable. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 986130bf3701e9875a820e06ed5c6ae0a851900b Author: Arvind Yadav Date: Mon May 15 13:52:03 2017 +0530 hwrng: omap3-rom - Handle return value of clk_prepare_enable Here, Clock enable can failed. So adding an error check for clk_prepare_enable. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/char/hw_random/omap3-rom-rng.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 218b6a5b23e939caf2064549b1cb61ba22b9d0a1 Merge: 1db3a61 fadd2ce Author: David S. Miller Date: Mon May 22 23:32:48 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit e5e9b5fae7e7d1fad87e4abb52f5f3d55c9f4e25 Author: Matt Ranostay Date: Tue May 16 19:03:10 2017 -0700 iio: proximity: as3935: add missing required spi-max-frequency spi-max-frequency is required to be set for the as3935 part, and document such usage. Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay Signed-off-by: Rob Herring Documentation/devicetree/bindings/iio/proximity/as3935.txt | 2 ++ 1 file changed, 2 insertions(+) commit 8fd708157a592a376c4d0b3b2ba23b9e9f79caa5 Author: Wolfram Sang Date: Mon May 22 16:30:04 2017 -0700 Input: tsc2007 - move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Acked-by: Lee Jones Signed-off-by: Dmitry Torokhov arch/sh/boards/mach-ecovec24/setup.c | 2 +- drivers/input/touchscreen/tsc2007_core.c | 2 +- drivers/mfd/timberdale.c | 2 +- include/linux/i2c/tsc2007.h | 22 ---------------------- include/linux/platform_data/tsc2007.h | 22 ++++++++++++++++++++++ 5 files changed, 25 insertions(+), 25 deletions(-) commit 0d846a4cbbcbf81e527542d15e165b8f774bace5 Author: Wolfram Sang Date: Mon May 22 16:28:42 2017 -0700 Input: mms114 - move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/mms114.c | 2 +- include/linux/i2c/mms114.h | 24 ------------------------ include/linux/platform_data/mms114.h | 24 ++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 25 deletions(-) commit 8cd9ab9e19b8cf23a7cae503af81ae70154e7956 Author: Wolfram Sang Date: Mon May 22 16:26:56 2017 -0700 Input: mcs - move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mcs_touchkey.c | 2 +- drivers/input/touchscreen/mcs5000_ts.c | 2 +- include/linux/i2c/mcs.h | 35 ---------------------------------- include/linux/platform_data/mcs.h | 35 ++++++++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 37 deletions(-) commit f81126b0b67c864b0b3d614d8adadc3a37ba5209 Author: Wolfram Sang Date: Mon May 22 16:24:22 2017 -0700 Input: lm8323 - move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Signed-off-by: Dmitry Torokhov drivers/input/keyboard/lm8323.c | 2 +- include/linux/i2c/lm8323.h | 46 ------------------------------------ include/linux/platform_data/lm8323.h | 46 ++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 47 deletions(-) commit 69a3025def543b66a9610c86706eebb6b160d3b8 Author: Keith Busch Date: Fri Apr 28 12:02:49 2017 -0400 PCI/DPC: Fix control register setting This driver was OR'ing desired bits from the existing control setting. That could create an invalid DPC Trigger Enabled configuration if the platform previously set this to "ERR_FATAL", 01b. The driver currently wants to set this to ERR_NONFATAL/ERR_FATAL, 10b, and the logical OR of this gets 11b, which is reserved. Fix that by masking off the fields it is setting. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas drivers/pci/pcie/pcie-dpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 993d668183fa49b63939a4f62a558d487fd50c22 Author: Keith Busch Date: Fri Apr 28 12:02:48 2017 -0400 PCI/DPC: Skip DPC event if device is not present The DPC interupt may be executed on a device that is being removed. Skip queuing event handling if the status is all 1's, which should be seen only if the device is not present. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas drivers/pci/pcie/pcie-dpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1db3a61017c627d590315347ccf302d9a6b97970 Merge: 0172397 d0c627b Author: David S. Miller Date: Mon May 22 19:37:40 2017 -0400 Merge branch 'dsa-distribute-switch-events' Vivien Didelot says: ==================== net: dsa: distribute switch events DSA is by nature the support for a switch fabric, which can be composed of a single, or multiple interconnected Ethernet switch chips. The current DSA core behavior is to identify the slave port targeted by a request (e.g. adding a VLAN entry), and program the switch chip to which it belongs accordingly. This is problematic in a multi-chip environment, since all chips of a fabric must be aware of most configuration changes. Here are some concrete examples in a 3-chip environment: [CPU].................... (mdio) (eth0) | : : : _|_____ _______ _______ [__sw0__]--[__sw1__]--[__sw2__] | | | | | | | | | v v v v v v v v v p1 p2 p3 p4 p5 p6 p7 p8 p9 If you add a VLAN entry on p7, sw2 gets programmed, but frames won't reach the CPU interface in a VLAN filtered setup. sw0 and sw1 also need to be programmed. The same problem comes with MAC addresses (FDB, MDB), or ageing time changes for instance. This patch series uses the notification chain introduced for bridging, to notify not only bridge, but switchdev attributes and objects events to all switch chips of the fabric. An ugly debug message printing the ignored event and switch info in the code handling the switch VLAN events would give us: # bridge vlan add dev p7 vid 42 sw0: ignoring DSA_NOTIFIER_VLAN_ADD for sw2 (prepare phase) sw1: ignoring DSA_NOTIFIER_VLAN_ADD for sw2 (prepare phase) sw0: ignoring DSA_NOTIFIER_VLAN_ADD for sw2 (commit phase) sw1: ignoring DSA_NOTIFIER_VLAN_ADD for sw2 (commit phase) To achieve that, patches 1-8 change the scope of the bridge and switchdev callbacks from the DSA slave device to the generic DSA port, so that the port-wide API can be used later for switch ports not exposed to userspace, such as CPU and DSA links. Patches 9-15 move the DSA port specific functions in a new port.c file. Patches 16-20 introduce new events to notify the fabric about switchdev attributes and objects manipulation. This patch series only adds the plumbing to support a distributed configuration, but for the moment, each switch chip ignores events from other chips of the fabric, to keep the current behavior. The next patch series will add support for cross-chip configuration of bridge ageing time, VLAN and MAC address databases operations, etc. ==================== Tested-by: Florian Fainelli Signed-off-by: David S. Miller commit d0c627b8740ca6243054263fbc98981a36ac5618 Author: Vivien Didelot Date: Fri May 19 17:00:55 2017 -0400 net: dsa: add VLAN notifier Add two new DSA_NOTIFIER_VLAN_ADD and DSA_NOTIFIER_VLAN_DEL events to notify not only a single switch, but all switches of a the fabric when an VLAN entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 10 ++++++++++ net/dsa/port.c | 29 +++++++++++++---------------- net/dsa/switch.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 16 deletions(-) commit 8ae5bcdc5d98a99e59f194101e7acd2e9d055758 Author: Vivien Didelot Date: Fri May 19 17:00:54 2017 -0400 net: dsa: add MDB notifier Add two new DSA_NOTIFIER_MDB_ADD and DSA_NOTIFIER_MDB_DEL events to notify not only a single switch, but all switches of a the fabric when an MDB entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 10 ++++++++++ net/dsa/port.c | 29 +++++++++++++---------------- net/dsa/switch.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 16 deletions(-) commit 685fb6a40ddace10a0bc8a680ab6ba65c6cdfdaf Author: Vivien Didelot Date: Fri May 19 17:00:53 2017 -0400 net: dsa: add FDB notifier Add two new DSA_NOTIFIER_FDB_ADD and DSA_NOTIFIER_FDB_DEL events to notify not only a single switch, but all switches of a the fabric when an FDB entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 10 ++++++++++ net/dsa/port.c | 29 +++++++++++++---------------- net/dsa/switch.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 16 deletions(-) commit 1faabf7440f17999f41973e91878c13ad9f080b2 Author: Vivien Didelot Date: Fri May 19 17:00:52 2017 -0400 net: dsa: add notifier for ageing time This patch keeps the port-wide ageing time handling code in dsa_port_ageing_time, pushes the requested ageing time value in a new switch fabric notification, and moves the switch-wide ageing time handling code in dsa_switch_ageing_time. This has the effect that now not only the switch that the target port belongs to can be programmed, but all switches composing the switch fabric. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 8 ++++++++ net/dsa/port.c | 37 ++++++++----------------------------- net/dsa/switch.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 29 deletions(-) commit 52c96f9d7003c74c7fbec7438c0ed78df0cc1c79 Author: Vivien Didelot Date: Fri May 19 17:00:51 2017 -0400 net: dsa: move notifier info to private header The DSA notifier events and info structure definitions are not meant for DSA drivers and users, but only used internally by the DSA core files. Move them from the public net/dsa.h file to the private dsa_priv.h file. Also use this opportunity to turn the events into an anonymous enum, because we don't care about the values, and this will prevent future conflicts when adding (and sorting) new events. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 10 ---------- net/dsa/dsa_priv.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) commit 076e713365c9f4ca1ff3eca9122664a5359b94da Author: Vivien Didelot Date: Fri May 19 17:00:50 2017 -0400 net: dsa: move VLAN handlers Move the DSA port code which handles VLAN objects in port.c, where it belongs. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 8 ++++++++ net/dsa/port.c | 41 +++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 41 ----------------------------------------- 3 files changed, 49 insertions(+), 41 deletions(-) commit 3a9afea37e298f4989629553d44b9bf50dc46125 Author: Vivien Didelot Date: Fri May 19 17:00:49 2017 -0400 net: dsa: move MDB handlers Move the DSA port code which handles MDB objects in port.c, where it belongs. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 7 +++++++ net/dsa/port.c | 40 ++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 41 ----------------------------------------- 3 files changed, 47 insertions(+), 41 deletions(-) commit d1cffff008dc2f238bfd0700c0f5027980089510 Author: Vivien Didelot Date: Fri May 19 17:00:48 2017 -0400 net: dsa: move FDB handlers Move the DSA port code which handles FDB objects in port.c, where it belongs. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 7 +++++++ net/dsa/port.c | 40 ++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 42 ------------------------------------------ 3 files changed, 47 insertions(+), 42 deletions(-) commit d87bd94e1c2006c1bb1d717020116940f9d0735a Author: Vivien Didelot Date: Fri May 19 17:00:47 2017 -0400 net: dsa: move ageing time setter Move the DSA port code which sets a port ageing time in port.c, where it belongs. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 40 ++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 40 ---------------------------------------- 3 files changed, 42 insertions(+), 40 deletions(-) commit 4d61d3043bef7b61e7c30276488ff310bee0d897 Author: Vivien Didelot Date: Fri May 19 17:00:46 2017 -0400 net: dsa: move VLAN filtering setter Move the DSA port code which sets VLAN filtering on a port in port.c, where it belongs. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 16 ++++++++++++++++ net/dsa/slave.c | 16 ---------------- 3 files changed, 18 insertions(+), 16 deletions(-) commit cfbed329beb2e44562c2c6b292142e3c9adc3203 Author: Vivien Didelot Date: Fri May 19 17:00:45 2017 -0400 net: dsa: move bridging routines Move the DSA port code which bridges a port in port.c, where it belongs. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 57 ----------------------------------------------------- 3 files changed, 60 insertions(+), 57 deletions(-) commit a40c175b4a4a2c6f7e111ed6dc0186c75287dff0 Author: Vivien Didelot Date: Fri May 19 17:00:44 2017 -0400 net: dsa: move port state setters Add a new port.c file to hold all DSA port-wide logic. This patch moves in the code which sets a port state. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/Makefile | 2 +- net/dsa/dsa_priv.h | 5 +++++ net/dsa/port.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 40 --------------------------------------- 4 files changed, 61 insertions(+), 41 deletions(-) commit 072bb1903a0ff810c6091d2f6bf7c80e76dab0e6 Author: Vivien Didelot Date: Fri May 19 17:00:43 2017 -0400 net: dsa: change scope of ageing time setter Change the scope of the switchdev bridge ageing time attribute setter from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Also ds->ports is now a contiguous array of dsa_port structures, thus their addresses cannot be NULL. Remove the useless check in dsa_fastest_ageing_time. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit c02c4175cb9f434af8f20045dd43ae9e573c8da2 Author: Vivien Didelot Date: Fri May 19 17:00:42 2017 -0400 net: dsa: change scope of VLAN filtering setter Change the scope of the switchdev VLAN filtering attribute setter from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 01676d129c1a7645879a104cbe5ac43bfa3c25a4 Author: Vivien Didelot Date: Fri May 19 17:00:41 2017 -0400 net: dsa: change scope of VLAN handlers Change the scope of the switchdev VLAN object handlers from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) commit bcebb976ec433e1f8a81d1a70db26420e85386aa Author: Vivien Didelot Date: Fri May 19 17:00:40 2017 -0400 net: dsa: change scope of MDB handlers Change the scope of the switchdev MDB object handlers from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) commit 3fdb023b5e2bad17d0b66e8903de6e38b0c16ca2 Author: Vivien Didelot Date: Fri May 19 17:00:39 2017 -0400 net: dsa: change scope of FDB handlers Change the scope of the switchdev FDB object handlers from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) commit 17d7802b7772ddcf505581fe22cffcd2e8b5120e Author: Vivien Didelot Date: Fri May 19 17:00:38 2017 -0400 net: dsa: change scope of bridging code Now that the bridge join and leave functions only deal with a DSA port, change their scope from the DSA slave net_device to the DSA generic dsa_port. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit a93ecdd9484a51e830249ee9877ac1c1544e75ac Author: Vivien Didelot Date: Fri May 19 17:00:37 2017 -0400 net: dsa: change scope of notifier call chain Change the scope of the fabric notification helper from the DSA slave to the DSA port, since this is a DSA layer specific notion, that can be used by non-slave ports (CPU and DSA). Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit fd364541319749c9880bf3ad613eac80fc6ea91e Author: Vivien Didelot Date: Fri May 19 17:00:36 2017 -0400 net: dsa: change scope of STP state setter Instead of having multiple STP state helpers scoping a slave device supporting both the DSA logic and the switchdev binding, provide a single dsa_port_set_state helper scoping a DSA port, as well as its dsa_port_set_state_now wrapper which skips the prepare phase. This allows us to better separate the DSA logic from the slave device handling. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 665f37e7eec33223bdc50cc1b3e00bca97a30aea Author: Wei Yongjun Date: Sun May 21 01:01:52 2017 +0000 drm/pl111: Fix return value check in pl111_amba_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: bed41005e617 ("drm/pl111: Initial drm/kms driver for pl111") Signed-off-by: Wei Yongjun Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170521010152.6186-1-weiyj.lk@gmail.com drivers/gpu/drm/pl111/pl111_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53286669392b2d888f4b78b0e7894e022e668d11 Author: Marc Zyngier Date: Fri May 12 12:55:38 2017 +0100 Documentation: Update IRQ-domain.txt to document irq_domain_mapping irq_domain_mapping is a rather useful tool to understand how IRqs are mapped in irqdomains, and yet it is not documented anywhere. Let's address this. Signed-off-by: Marc Zyngier Link: http://lkml.kernel.org/r/20170512115538.10767-5-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner Documentation/IRQ-domain.txt | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) commit a97b852b4d4c2f8c50cab13c71566639f9a1a990 Author: Marc Zyngier Date: Fri May 12 12:55:37 2017 +0100 genirq/msi: Populate the domain name if provided by the irqchip In order to ease debug, let's populate the domain name upfront, before any MSI gets requested. This allows the domain to appear in the irq_domain_mapping, and the user to easily find the expected data. Signed-off-by: Marc Zyngier Link: http://lkml.kernel.org/r/20170512115538.10767-4-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner kernel/irq/msi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2370c00dc7232d0c4af224e7730b4de031f3b1a0 Author: Marc Zyngier Date: Fri May 12 12:55:36 2017 +0100 irqdomain: Let irq_domain_mapping display ACPI fwnode attributes If the system is using ACPI, there is no of_node to display. But ACPI can use a struct irqchip_fwid as a domain identifier, and it can be used to display the name contained in that structure. The output on such a system will look like this: pMSI 0 0 0 irqchip@00000000e1180000 MSI 37 0 0 irqchip@00000000e1180000 GICv2m 37 0 0 irqchip@00000000e1180000 GICv2 448 448 0 irqchip@ffff000008003000 Signed-off-by: Marc Zyngier Link: http://lkml.kernel.org/r/20170512115538.10767-3-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner kernel/irq/irqdomain.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit fe17a42e704a64477b15bb2cf8366fe3e5119aff Author: Marc Zyngier Date: Fri May 12 12:55:35 2017 +0100 irqdomain: Let irq_domain_mapping display hierarchical domains Hierarchical domains seem to be hard to grasp, and a number of aspiring kernel hackers find them utterly discombobulating. In order to ease their pain, let's make them appear in /sys/kernel/debug/irq_domain_mapping, such as the following: 96 0x81808 MSI 0x (null) RADIX MSI 96+ 0x00063 GICv2m 0xffff8003ee116980 RADIX GICv2m 96+ 0x00063 GICv2 0xffff00000916bfd8 LINEAR GICv2 [output compressed to fit in a commit log] This shows that IRQ96 is implemented by a stack of three domains, the + sign indicating the stacking. Signed-off-by: Marc Zyngier Link: http://lkml.kernel.org/r/20170512115538.10767-2-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner kernel/irq/irqdomain.c | 68 +++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 25 deletions(-) commit 6f9a22bc5775d231ab8fbe2c2f3c88e45e3e7c28 Author: Michael Hernandez Date: Thu May 18 10:47:47 2017 -0700 PCI/MSI: Ignore affinity if pre/post vector count is more than min_vecs min_vecs is the minimum amount of vectors needed to operate in MSI-X mode which may just include the vectors that don't need affinity. Disabling affinity settings causes the qla2xxx driver scsi_add_host() to fail when blk_mq is enabled as the blk_mq_pci_map_queues() expects affinity masks on each vector. Fixes: dfef358bd1be ("PCI/MSI: Don't apply affinity if there aren't enough vectors left") Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Cc: stable@vger.kernel.org # v4.10+ drivers/pci/msi.c | 14 ++------------ include/linux/interrupt.h | 4 ++-- kernel/irq/affinity.c | 13 ++++++++++++- 3 files changed, 16 insertions(+), 15 deletions(-) commit 0172397e2fcc29dc803c7d0b22aa2a25e4b02991 Merge: bd08048 1876749 Author: David S. Miller Date: Mon May 22 14:59:07 2017 -0400 Merge branch 'nfp-introduce-nfp_port-and-nfp_app' Jakub Kicinski says: ==================== nfp: introduce nfp_port and nfp_app This series builds foundation for upcoming development. So far the nfp driver was focused on delivering basic NIC-like functionality. We want to switch gears a bit going forward and support more advanced applications. First few patches are naming clean ups and reshuffling. The two main structures this series adds are nfp_port and nfp_app. nfp_port represents a device port, where port can mean external port, VF or PF. For now only external port/MAC/PHY port is added. nfp_port is supposed to make it easy to share ethtool and devlink code regardless of netdev type (full vNIC vs representors). nfp_app is an abstraction which should allow easier development of new applications. So far we have relied fully on port capabilities to detect which offloads and features are available. The usual development model for NFP is that people start with one of our "core NIC" FW apps (C one, or a macro assembler one) and build advanced functionality on top of that. Therefore basic netdev code is shared, but the higher-level logic is usually more project specific. The higher-level logic is also per-adapter rather than per-port, so creating per-adapter control entity makes sense. Hopefully the separation of lower-level netdev code and application logic will help us limit interdependencies and accelerate parallel projects (e.g. TC flower offloads vs eBPF offload). v2: - don't hide definition of nfp_app to avoid silly function calls (Dave); - reorder kdoc of nfp_main (Simon); - make nfp_netdev_is_nfp_net() static inline as well. ==================== Signed-off-by: David S. Miller commit 1876749da87500c7228f91398e04291389a18634 Author: Jakub Kicinski Date: Mon May 22 10:59:34 2017 -0700 nfp: refresh port state before reporting autonegotiation State of autonegotiation may have changed but is not yet refreshed. Make sure ethtool respects the NFP_PORT_CHANGED flag when looking at autoneg. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 10 +--------- drivers/net/ethernet/netronome/nfp/nfp_port.c | 12 ++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_port.h | 1 + 3 files changed, 14 insertions(+), 9 deletions(-) commit 46b250311dac828bcb79f0807c16d4157059ce7e Author: Jakub Kicinski Date: Mon May 22 10:59:33 2017 -0700 nfp: mark port state as stale if update failed If reading new state of the port failed, mark the port back as CHANGED. This way next user state request will trigger refresh, which will hopefully succeed. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1f60a5815bade268696d57452dfbfcbf0c655a23 Author: Jakub Kicinski Date: Mon May 22 10:59:32 2017 -0700 nfp: mark port state as stale after reconfig After port configuration is performed mark it as changed. This will close a window of time between configuration and async state refresh which runs from a workqueue where old port state would be reported. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 3eb3b74adb701d575d718df1bbffefa2543a302d Author: Jakub Kicinski Date: Mon May 22 10:59:31 2017 -0700 nfp: provide linking on port structures Add link to nfp_ports to make it possible to iterate over all ports. This will come in handy when some ports may be representors. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_main.h | 2 ++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 15 ++++++--------- drivers/net/ethernet/netronome/nfp/nfp_port.c | 5 +++++ drivers/net/ethernet/netronome/nfp/nfp_port.h | 3 +++ 5 files changed, 17 insertions(+), 9 deletions(-) commit 6d4f8cba5fbbc83e74ee8a49e5234e446306bac6 Author: Jakub Kicinski Date: Mon May 22 10:59:30 2017 -0700 nfp: move refresh tracking into the port structure Track whether physical port's state have changed since last refresh inside the nfp_port structure instead of the vNIC structure. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 4 ---- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 16 ++-------------- drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 10 +++++----- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 10 ++++++++-- drivers/net/ethernet/netronome/nfp/nfp_port.h | 13 +++++++++++++ 5 files changed, 28 insertions(+), 25 deletions(-) commit 3d4ed1e70185936ea7cfeec18dd25963c2908871 Author: Jakub Kicinski Date: Mon May 22 10:59:29 2017 -0700 nfp: update port state in place Always updating port state in place by overriding values in exiting pf->eth_tbl makes things easier to manage and allows us to have a common helper for both full and per-port refresh. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 54 +++++++++++++---------- 1 file changed, 30 insertions(+), 24 deletions(-) commit eb488c26d713b2a9ebba6c12bbefd04e01197693 Author: Jakub Kicinski Date: Mon May 22 10:59:28 2017 -0700 nfp: introduce nfp_port Encapsulate port information into struct nfp_port. nfp_port will soon be extended to contain devlink_port information. It also makes it easier to reuse port-related code between vNICs and representors. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 3 +- drivers/net/ethernet/netronome/nfp/nfp_net.h | 14 ++- .../net/ethernet/netronome/nfp/nfp_net_common.c | 25 +---- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 39 +++++--- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 68 +++++++++----- drivers/net/ethernet/netronome/nfp/nfp_port.c | 104 +++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_port.h | 85 +++++++++++++++++ 7 files changed, 275 insertions(+), 63 deletions(-) commit d88b0a233fafa4abda3b3aa5a69d46574e4c793e Author: Jakub Kicinski Date: Mon May 22 10:59:27 2017 -0700 nfp: disallow mixing vNICs with and without NSP port entry We only support core NIC apps which have vNICs for each physical port/ split and no representors right now. Enforce that either each vNIC has a NSP eth_table entry or if NSP port table is not available none do. One scenario this will prevent from happening is user force-loading wrong firmware file if FW app requires different firmwares per media config. While at it move some code to nfp_net_pf_alloc_vnic() to make it counter-match nfp_net_pf_free_vnic() better. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 52 ++++++++++++++--------- 1 file changed, 32 insertions(+), 20 deletions(-) commit 7ac9ebd567252d1799002b9282c658f7229ba21c Author: Jakub Kicinski Date: Mon May 22 10:59:26 2017 -0700 nfp: introduce very minimal nfp_app Introduce a concept of an application. For now it's just grouping pointers and serving as a layer of indirection. It will help us weaken the dependency on nfp_net in ethtool code. Later series will flesh out support for different apps in the driver. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfp_app.c | 57 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_app.h | 56 +++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_main.h | 3 ++ drivers/net/ethernet/netronome/nfp/nfp_net.h | 4 +- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 19 ++++---- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 26 ++++++++-- 7 files changed, 152 insertions(+), 14 deletions(-) commit 9140b30d318520e6d7dfe3b48aa62e6a7336b510 Author: Jakub Kicinski Date: Mon May 22 10:59:25 2017 -0700 nfp: add nfp_net_pf_free_vnic() function Soon a third place will need to free a struct nfp_net. Add a free counterpart to nfp_net_pf_alloc_vnic(). Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit d4e7f0928593ac7df9b78410beb90178326a22c0 Author: Jakub Kicinski Date: Mon May 22 10:59:24 2017 -0700 nfp: rename netdev/port to vNIC vNIC is a PCIe-side abstraction NFP firmwares supported by this driver use. It was initially meant to represent a device port and therefore a netdev but today should be thought of as a way of grouping descriptor rings and associated state. Advanced apps will have vNICs without netdevs and ports without a vNIC (using representors instead). Make sure code refers to vNICs as vNICs and not ports or netdevs. No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_main.h | 22 +-- drivers/net/ethernet/netronome/nfp/nfp_net.h | 10 +- .../net/ethernet/netronome/nfp/nfp_net_debugfs.c | 4 +- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 150 ++++++++++----------- .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 4 +- 6 files changed, 95 insertions(+), 97 deletions(-) commit beba69ca755542c2581bbb64b2fa79b11047ed8f Author: Jakub Kicinski Date: Mon May 22 10:59:23 2017 -0700 nfp: make nfp_net alloc/init/cleanup/free not depend on netdevs struct nfp_net represents a vNIC, we will be moving away from the requirement for every vNIC to have a netdev associated with it. Remove "netdev" from some function names and prefer passing struct nfp_net pointer as argument instead of struct net_device *. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 12 ++++---- .../net/ethernet/netronome/nfp/nfp_net_common.c | 35 ++++++++++------------ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 14 ++++----- .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 10 +++---- 4 files changed, 35 insertions(+), 36 deletions(-) commit cd6f8db9aebeb7f234b38756ba8ee77230058846 Author: Simon Horman Date: Mon May 22 10:59:22 2017 -0700 nfp: add nfp_cppcore_pcie_unit() helper Add nfp_cppcore_pcie_unit() helper to retrieve the PCIE unit of a CPP handle and use the new helper as appropriate. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 16 ++++------------ drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 11 +++++++++++ 2 files changed, 15 insertions(+), 12 deletions(-) commit bd080488a6cfd37135becedfdc87643b139c2345 Author: Ivan Vecera Date: Fri May 19 19:30:43 2017 +0200 bridge: fix hello and hold timers starting/stopping Current bridge code incorrectly handles starting/stopping of hello and hold timers during STP enable/disable. 1. Timers are stopped in br_stp_start() during NO_STP->USER_STP transition. The timers are already stopped in NO_STP state so this is confusing no-op. 2. During USER_STP->NO_STP transition the timers are started. This does not make sense and is confusion because the timer should not be active in NO_STP state. Cc: davem@davemloft.net Cc: sashok@cumulusnetworks.com Cc: stephen@networkplumber.org Cc: bridge@lists.linux-foundation.org Cc: lucien.xin@gmail.com Cc: nikolay@cumulusnetworks.com Signed-off-by: Ivan Vecera Reviewed-by: Xin Long Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_stp_if.c | 11 ----------- 1 file changed, 11 deletions(-) commit 85deed56032b6c98b541895bfda9bdd74f6ed987 Author: Holger Brunck Date: Mon May 22 09:31:15 2017 +0200 net/wan/fsl_ucc_hdlc: fix muram allocation error sizeof(priv->ucc_pram) is 4 as it is the size of a pointer, but we want to reserve space for the struct ucc_hdlc_param. Signed-off-by: Holger Brunck Cc: Zhao Qiang Signed-off-by: David S. Miller drivers/net/wan/fsl_ucc_hdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a777f715caf0ff95652a872d1af24942cf5002fc Author: Rohit Chavan Date: Mon May 22 11:59:15 2017 +0530 net: ipv4: tcp: fixed comment coding style issue Fixed a coding style issue Signed-off-by: Rohit Chavan Signed-off-by: David S. Miller net/ipv4/tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 241c4667fcf3b64f84a892e2b656027d85e73e6b Author: Rosen, Rami Date: Sun May 21 22:12:38 2017 +0300 net: socket: fix a typo in sockfd_lookup(). This patch fixes a typo in sockfd_lookup() in net/socket.c. Signed-off-by: Rami Rosen Signed-off-by: David S. Miller net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acb5d48f0e5284d7813652f8dd1b94bb6021d8db Merge: 863483c d5d531c Author: David S. Miller Date: Mon May 22 12:12:21 2017 -0400 Merge branch 'netlink-extack-route-add-del' David Ahern says: ==================== net: Add extack for route add/delete failures Use the extack feature to improve error messages to user on route add and delete failures. ==================== Signed-off-by: David S. Miller commit d5d531cb50a848b9f6767fcd7ef0c7767b3e9b21 Author: David Ahern Date: Sun May 21 10:12:05 2017 -0600 net: ipv6: Add extack messages for route add failures Add messages for non-obvious errors (e.g, no need to add text for malloc failures or ENODEV failures). This mostly covers the annoying EINVAL errors Some message strings violate the 80-columns but searchable strings need to trump that rule. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 4 ++++ net/ipv6/route.c | 40 ++++++++++++++++++++++++++++++++-------- 2 files changed, 36 insertions(+), 8 deletions(-) commit 333c430167c21b96de81a674fa6cbe84b09475dc Author: David Ahern Date: Sun May 21 10:12:04 2017 -0600 net: ipv6: Plumb extack through route add functions Plumb extack argument down to route add functions. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 3 ++- include/net/ip6_route.h | 2 +- net/ipv6/addrconf.c | 4 ++-- net/ipv6/ip6_fib.c | 14 +++++++----- net/ipv6/route.c | 57 +++++++++++++++++++++++++++---------------------- 5 files changed, 46 insertions(+), 34 deletions(-) commit c3ab2b4ec8f7c0700bf10957171c479bf3dbca52 Author: David Ahern Date: Sun May 21 10:12:03 2017 -0600 net: ipv4: Add extack messages for route add failures Add messages for non-obvious errors (e.g, no need to add text for malloc failures or ENODEV failures). This mostly covers the annoying EINVAL errors Some message strings violate the 80-columns but searchable strings need to trump that rule. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/linux/netlink.h | 5 +++ net/ipv4/fib_frontend.c | 2 + net/ipv4/fib_semantics.c | 115 ++++++++++++++++++++++++++++++++++++++--------- 3 files changed, 100 insertions(+), 22 deletions(-) commit 6d8422a175ccf2846d9460ed2b6228fe0b12c243 Author: David Ahern Date: Sun May 21 10:12:02 2017 -0600 net: ipv4: Plumb extack through route add functions Plumb extack argument down to route add functions. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 3 ++- net/ipv4/fib_frontend.c | 16 +++++++++------- net/ipv4/fib_lookup.h | 3 ++- net/ipv4/fib_semantics.c | 22 +++++++++++++--------- net/ipv4/fib_trie.c | 4 ++-- 5 files changed, 28 insertions(+), 20 deletions(-) commit 863483c970e968efd6a119a2118f57977d04cefe Author: Girish Moodalbail Date: Fri May 19 15:25:44 2017 -0700 macsec: double accounting of dropped rx/tx packets The macsec implementation shouldn't account for rx/tx packets that are dropped in the netdev framework. The netdev framework itself accounts for such packets by atomically updating struct net_device`rx_dropped and struct net_device`tx_dropped fields. Later on when the stats for macsec link is retrieved, the packets dropped in netdev framework will be included in dev_get_stats() after calling macsec.c`macsec_get_stats64() Signed-off-by: Girish Moodalbail Signed-off-by: David S. Miller drivers/net/macsec.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 39d2675a8bd48362577dfbe84b7b66024dd5176e Author: Nandor Han Date: Mon May 15 08:58:26 2017 +0300 gpio: xra1403: Add XRA1403 support to MAINTAINERS file Add XRA1403 support to MAINTAINERS list. Signed-off-by: Nandor Han Signed-off-by: Linus Walleij MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5704520d7880ee8b5d759e83df6090ea9f1a9b06 Author: Nandor Han Date: Mon May 15 08:58:25 2017 +0300 gpio: xra1403: Add EXAR XRA1403 SPI GPIO expander driver This driver support basic XRA1403 functionalities: - set gpio direction - get gpio direction - set gpio high/low - get gpio status Signed-off-by: Nandor Han Signed-off-by: Semi Malinen Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 5 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-xra1403.c | 237 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 243 insertions(+) commit c239838fbd6d5aadac193e02d0cf1866238da97b Author: Dan Carpenter Date: Sat May 6 03:48:35 2017 +0300 p54: allocate enough space for ->used_rxkeys We have the number of longs, but we should be calculating the number of bytes needed. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/intersil/p54/fwio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e48d661eb13f2f83861428f001c567fdb3f317e8 Author: Kees Cook Date: Fri May 5 15:38:41 2017 -0700 ray_cs: Avoid reading past end of buffer Using memcpy() from a buffer that is shorter than the length copied means the destination buffer is being filled with arbitrary data from the kernel rodata segment. In this case, the source was made longer, since it did not match the destination structure size. Additionally removes a needless cast. This was found with the future CONFIG_FORTIFY_SOURCE feature. Cc: Daniel Micay Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/ray_cs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bdb18d93a79f1c08163f37bef2a517972479e1ed Merge: 7f0ff06 e25f2af Author: Linus Walleij Date: Mon May 22 17:27:18 2017 +0200 Merge branch 'ingenic' into devel commit e25f2af64679581f22b3b9a4681964bd0bb8e417 Author: Paul Cercueil Date: Fri May 12 18:53:07 2017 +0200 MIPS: jz4740: Remove custom GPIO code All the drivers for the various hardware elements of the jz4740 SoC have been modified to use the pinctrl framework for their pin configuration needs. As such, this platform code is now unused and can be deleted. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij arch/mips/include/asm/mach-jz4740/gpio.h | 371 ---------------------- arch/mips/jz4740/Makefile | 2 - arch/mips/jz4740/gpio.c | 519 ------------------------------- 3 files changed, 892 deletions(-) commit 89a6139cd802dc40729b19559effb7a2900b0df6 Author: Paul Cercueil Date: Fri May 12 18:53:02 2017 +0200 MIPS: JZ4780: CI20: Add pinctrl configuration for several drivers We set the pin configuration for the jz4780-nand and jz4780-uart drivers. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij arch/mips/boot/dts/ingenic/ci20.dts | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 636f8ba67fb606a4a0ab4deedb39c71d1ea5dc8a Author: Paul Cercueil Date: Fri May 12 18:53:01 2017 +0200 MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers We set the pin configuration for the jz4740-nand, jz4740-mmc, jz4740-fb, jz4740-pwm and jz4740-uart drivers. This will permit those drivers to be cleaned out of the custom GPIO code that they currently use. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij arch/mips/boot/dts/ingenic/qi_lb60.dts | 13 +++++++++ arch/mips/jz4740/board-qi_lb60.c | 48 +++++++++++++++++++++++++--------- 2 files changed, 49 insertions(+), 12 deletions(-) commit d32613c33705ca0a022657a7b3d2cf94c2e08e08 Author: Paul Cercueil Date: Fri May 12 18:53:00 2017 +0200 MIPS: jz4780: DTS: Add nodes for ingenic pinctrl and gpio drivers For a description of the devicetree node, please read Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.txt For a description of the gpio devicetree nodes, please read Documentation/devicetree/bindings/gpio/ingenic,gpio.txt Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij arch/mips/boot/dts/ingenic/jz4780.dtsi | 98 ++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit 0aeffa7041d84976432e903cb04e8d7b0edf31ed Author: Elena Reshetova Date: Tue Mar 28 11:56:43 2017 +0300 orinoco_usb: convert request_context.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Kalle Valo drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 3951cbb548b2d2fdb1178ad5158fb1d65a8a15df Author: Paul Cercueil Date: Fri May 12 18:52:59 2017 +0200 MIPS: jz4740: DTS: Add nodes for ingenic pinctrl and gpio drivers For a description of the pinctrl devicetree node, please read Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.txt For a description of the gpio devicetree nodes, please read Documentation/devicetree/bindings/gpio/ingenic,gpio.txt Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij arch/mips/boot/dts/ingenic/jz4740.dtsi | 68 ++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 552aa585faff19ceead7aa840d4ce11830ce34a9 Author: Elena Reshetova Date: Tue Mar 28 11:56:42 2017 +0300 hostap: convert hostap_cmd_queue.usecnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Kalle Valo drivers/net/wireless/intersil/hostap/hostap_hw.c | 12 ++++++------ drivers/net/wireless/intersil/hostap/hostap_wlan.h | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) commit 37b4c3ca559f0c5cc2f0e7478e438e486ba57e05 Author: Paul Cercueil Date: Fri May 12 18:52:58 2017 +0200 MIPS: ingenic: Enable pinctrl for all ingenic SoCs There is a pinctrl driver for each of the Ingenic SoCs supported by the upstream Linux kernel. In order to switch away from the old GPIO platform code, we now enable the pinctrl drivers by default for the Ingenic SoCs. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit cf2fd519e6ec1fc5eb0fc15d2544fb26c4fd8e11 Author: Paul Cercueil Date: Fri May 12 18:53:04 2017 +0200 mtd: nand: jz4740: Let the pinctrl driver configure the pins Before, this NAND driver would set itself the configuration of the chip-select pins for the various NAND banks. Now that the JZ4740 and similar SoCs have a pinctrl driver, we rely on the pins being properly configured before the driver probes. Signed-off-by: Paul Cercueil Acked-by: Boris Brezillon Signed-off-by: Linus Walleij drivers/mtd/nand/jz4740_nand.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit 695ff98577aa629fecba28769c628c883681d051 Author: Paul Cercueil Date: Fri May 12 18:53:05 2017 +0200 fbdev: jz4740-fb: Let the pinctrl driver configure the pins Now that the JZ4740 and similar SoCs have a pinctrl driver, we rely on the pins being properly configured before the driver probes. Signed-off-by: Paul Cercueil Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Linus Walleij drivers/video/fbdev/jz4740_fb.c | 104 ++-------------------------------------- 1 file changed, 3 insertions(+), 101 deletions(-) commit 9029679f66d976f8c720eb03c4898274803c9923 Author: Chi-hsien Lin Date: Thu May 18 17:22:19 2017 +0800 brcmfmac: remove setting IBSS mode when stopping AP Upon stopping an AP interface the driver disable INFRA mode effectively setting the interface in IBSS mode. However, this may affect other interfaces running in INFRA mode. For instance, if user creates and stops hostap daemon on virtual interface, then association cannot work on primary interface because default BSS has been set to IBSS mode in firmware side. The IBSS mode should be set when cfg80211 changes the interface. Reviewed-by: Wright Feng Signed-off-by: Chi-hsien Lin [kvalo@codeaurora.org: rephased commit log based on discussion] Signed-off-by: Wright Feng Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 --- 1 file changed, 3 deletions(-) commit 47096d702c542b7cf4009e49cb492cab879d347f Author: Paul Cercueil Date: Fri May 12 18:53:06 2017 +0200 pwm: jz4740: Let the pinctrl driver configure the pins Now that the JZ4740 and similar SoCs have a pinctrl driver, we rely on the pins being properly configured before the driver probes. One inherent problem of this new approach is that the pinctrl framework does not allow us to configure each pin on demand, when the various PWM channels are requested or released. For instance, the PWM channels can be configured from sysfs, which would require all PWM pins to be configured properly beforehand for the PWM function, eventually causing conflicts with other platform or board drivers. The proper solution here would be to modify the pwm-jz4740 driver to handle only one PWM channel, and create an instance of this driver for each one of the 8 PWM channels. Then, it could use the pinctrl framework to dynamically configure the PWM pin it controls. Until this can be done, the only jz4740 board supported upstream (Qi lb60) can configure all of its connected PWM pins in PWM function mode, since those are not used by other drivers nor by GPIOs on the board. Signed-off-by: Paul Cercueil Acked-by: Thierry Reding Signed-off-by: Linus Walleij drivers/pwm/pwm-jz4740.c | 29 ----------------------------- 1 file changed, 29 deletions(-) commit fa5ed6bc11153199b07b06a208a537e137df4e5d Author: Paul Cercueil Date: Fri May 12 18:53:03 2017 +0200 mmc: jz4740: Let the pinctrl driver configure the pins Now that the JZ4740 and similar SoCs have a pinctrl driver, we rely on the pins being properly configured before the driver probes. Signed-off-by: Paul Cercueil Acked-by: Ulf Hansson Signed-off-by: Linus Walleij drivers/mmc/host/jz4740_mmc.c | 44 +++++-------------------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) commit b0653ce39a0d565cbb77c0f9a3f94ead2660927e Author: Paul Cercueil Date: Fri May 12 18:52:57 2017 +0200 gpio: Add gpio-ingenic driver This driver handles the GPIOs of all the Ingenic JZ47xx SoCs currently supported by the upsteam Linux kernel. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-ingenic.c | 394 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 405 insertions(+) commit 6572e5f72d01121f21734a1309dac2ecd7bbff95 Author: Xie Qirong Date: Fri May 12 17:32:59 2017 +0800 brcmfmac: btcoex: replace init_timer with setup_timer setup_timer.cocci suggested the following improvement: drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use setup_timer function for function on line 384. The combination of init_timer and setting up the data and function field manually is equivalent to calling setup_timer(). This is an api consolidation only and improves readability. Acked-by: Arend van Spriel Signed-off-by: Xie Qirong Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b5c23aa4653796d41aea43c3706e9129820c0b9a Author: Paul Cercueil Date: Fri May 12 18:52:56 2017 +0200 pinctrl: add a pinctrl driver for the Ingenic jz47xx SoCs This driver handles pin configuration and pin muxing for the JZ4740 and JZ4780 SoCs from Ingenic. Signed-off-by: Paul Cercueil Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 9 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-ingenic.c | 852 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 862 insertions(+) commit 592870e6ed7dd3491092b3124b17091bf65a1592 Author: Paul Cercueil Date: Fri May 12 18:52:55 2017 +0200 dt/bindings: Document gpio-ingenic This commit adds documentation for the devicetree bindings of the gpio-ingenic driver, which handles GPIOs of the Ingenic SoCs currently supported by the Linux kernel. Signed-off-by: Paul Cercueil Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/ingenic,gpio.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit d503a43ac06ac0ec66244d565dfc2c54fdb2425c Author: Kieran Bingham Date: Sat Mar 4 02:01:19 2017 +0000 drm: rcar-du: Register a completion callback with VSP1 Currently we process page flip events on every display interrupt, however this does not take into consideration the processing time needed by the VSP1 utilised in the pipeline. Register a callback with the VSP driver to obtain completion events, and track them so that we only perform page flips when the full display pipeline has completed for the frame. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 8 ++++++-- drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 1 + drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) commit d7ade201ae7fa253808e42a4001a7738b9f69772 Author: Kieran Bingham Date: Sat Mar 4 02:01:17 2017 +0000 v4l: vsp1: Extend VSP1 module API to allow DRM callbacks To be able to perform page flips in DRM without flicker we need to be able to notify the rcar-du module when the VSP has completed its processing. We must not have bidirectional dependencies on the two components to maintain support for loadable modules, thus we extend the API to allow a callback to be registered within the VSP DRM interface. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Acked-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drm.c | 17 +++++++++++++++++ drivers/media/platform/vsp1/vsp1_drm.h | 11 +++++++++++ include/media/vsp1.h | 7 +++++++ 3 files changed, 35 insertions(+) commit 348a00341efdaf582eb2cb86bddc4bb10406714d Author: Kieran Bingham Date: Sat Mar 4 02:01:18 2017 +0000 v4l: vsp1: Postpone frame end handling in event of display list race If we try to commit the display list while an update is pending, we have missed our opportunity. The display list manager will hold the commit until the next interrupt. In this event, we skip the pipeline completion callback handler so that the pipeline will not mistakenly report frame completion to the user. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Acked-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_dl.c | 19 +++++++++++++++++-- drivers/media/platform/vsp1/vsp1_dl.h | 2 +- drivers/media/platform/vsp1/vsp1_pipe.c | 13 ++++++++++++- 3 files changed, 30 insertions(+), 4 deletions(-) commit 8bd137d4c009d0aa214b839100f905e0c2f8bd14 Author: Paul Cercueil Date: Fri May 12 18:52:54 2017 +0200 dt/bindings: Document pinctrl-ingenic This commit adds documentation for the devicetree bindings of the pinctrl-ingenic driver, which handles pin configuration and pin muxing of the Ingenic SoCs currently supported by the Linux kernel. Signed-off-by: Paul Cercueil Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/ingenic,pinctrl.txt | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit cddebdd19c8e6cc41e04ac91c68000ff8c48383c Author: Nikita Yushchenko Date: Mon May 22 16:19:20 2017 +0300 spi: spi-fsl-dspi: ensure non-zero return on error path Propagate error return from dspi_request_dma() into probe routine's return. Signed-off-by: Nikita Yushchenko Signed-off-by: Mark Brown drivers/spi/spi-fsl-dspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7808c42b4043f71daa91acdf7454d94ed5b7178e Author: Masahiro Yamada Date: Sat May 13 01:18:45 2017 +0900 gpio: zynq: remove unneeded (void *) casts in of_match_table of_device_id::data is an opaque pointer. No explicit cast is needed. Signed-off-by: Masahiro Yamada Acked-by: Sören Brinkmann Signed-off-by: Linus Walleij drivers/gpio/gpio-zynq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7f53b19cdff78f696b61cd5987dfe1a5d432676b Author: Laurent Pinchart Date: Sat Mar 4 15:14:47 2017 +0200 drm: rcar-du: Arm the page flip event after queuing the page flip The page flip event is armed in the atomic begin handler, creating a race condition with the frame end interrupt that could send the event before the atomic operation actually completes. To avoid that, arm the event in the atomic flush handler after queuing the page flip. This change doesn't fully close the race window, as the frame end interrupt could be generated before the page flip is committed to hardware but only handled after the event is armed. However, the race window is now much smaller. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 7f0ff06c1cec4bb2fc039b41943fd23245e3d0ca Author: Nikita Yushchenko Date: Thu May 11 23:02:11 2017 +0300 pinctrl: When claiming hog, skip maps not served by same device When pinctrl device registers, it automatically claims hogs, that is, maps that pinctrl device serves for itself. It is possible that in addition to SoC's pinctrl device, other pinctrl devices get registered. E.g. some gpio expander devies are registered as pinctrl devices. For such devices, pinctrl maps could be defined that set up SoC's pins (e.g. interrupt pin for gpio expander). Such a map will have target device set to gpio expander. Here is device tree snippet that causes this scenario: &i2c0 { sx1503@20 { compatible = "semtech,sx1503q"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sx1503_20>; ... }; }; ... &iomuxc { pinctrl_sx1503_20: pinctrl-sx1503-20 { fsl,pins = < VF610_PAD_PTB1__GPIO_23 0x219d >; }; }; Such a map will have target device set to gpio expander. However is not a hog, it is a regular map that is claimed by core before gpio expander device is probed. Thus when looking for hogs, it is not enough to check that map's target device is set to pinctrl device being registered. Need also check that map's control device is also set to the same. Signed-off-by: Nikita Yushchenko Acked-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f5a64d64b5f5f42999f029f6c04f6dda19339566 Author: David S. Miller Date: Mon May 22 10:26:24 2017 -0400 net: Fix parisc SCM_TIMESTAMPING_PKTINFO value. Needs to follow the existing sequence. Reported-by: Stephen Rothwell Signed-off-by: David S. Miller arch/parisc/include/uapi/asm/socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a02cb8f8def634159b60c3a4d6ba16e471b46e0c Author: Takashi Sakamoto Date: Mon May 22 22:22:21 2017 +0900 ALSA: firewire: remove support for 16 bit PCM samples in playback substream In IEC 61883-6, AM824 is described as format of data block. In this format, one data block consists of several data channels, which is aligned to 32 bit. One data channel has 8 bit label field and 24 bit data field. PCM frames are transferred in Multi Bit Linear Audio (MBLA) data channel. This channel can include 16/20/24 bit PCM sample. As long as I know, models which support IEC 61883-1/6 doesn't allow to switch bit length of PCM sample in MBLA data channel. They always transmit/receive PCM frames of 24 bit length. This can be seen for the other models which support protocols similar to IEC 61883-1/6. On the other hand, current drivers for these protocols supports 16 bit length PCM sample in playback substream. In this case, PCM sample is put into the MBLA data channel with 8 bit padding in LSB side. Although 16 bit PCM sample is major because it's in CD format, this doesn't represent device capability as is. This commit removes support for 16 bit PCM samples in playback substream. Signed-off-by: Takashi Sakamoto Acked-by: Clemens Ladisch Signed-off-by: Takashi Iwai sound/firewire/amdtp-am824.c | 71 +------------------------------- sound/firewire/amdtp-am824.h | 6 +-- sound/firewire/bebob/bebob_pcm.c | 4 -- sound/firewire/dice/dice-pcm.c | 6 --- sound/firewire/digi00x/amdtp-dot.c | 63 +--------------------------- sound/firewire/digi00x/digi00x-pcm.c | 7 +--- sound/firewire/digi00x/digi00x.h | 1 - sound/firewire/fireworks/fireworks_pcm.c | 4 -- sound/firewire/oxfw/oxfw-pcm.c | 4 -- sound/firewire/tascam/amdtp-tascam.c | 62 +--------------------------- sound/firewire/tascam/tascam-pcm.c | 7 +--- sound/firewire/tascam/tascam.h | 1 - 12 files changed, 9 insertions(+), 227 deletions(-) commit 0b03c32db03d63de695c1e0ab1950eb12b135fa7 Author: Geert Uytterhoeven Date: Mon May 15 14:44:12 2017 +0200 arm64: dts: r8a7795: salvator-x: Add support for R-Car H3 ES2.0 Split off support for Salvator-X boards with the ES1.x revision of the R-Car H3 SoC into a separate file. The main r8a7795-salvator-x.dts file now corresponds to Salvator-X with R-Car H3 ES2.0 or later. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + .../boot/dts/renesas/r8a7795-es1-salvator-x.dts | 115 +++++++++++++++++++++ arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 4 +- 3 files changed, 118 insertions(+), 2 deletions(-) commit 291e0c4994d0813f74056163367a100fef7ad2eb Author: Geert Uytterhoeven Date: Mon May 15 14:44:11 2017 +0200 arm64: dts: r8a7795: Add support for R-Car H3 ES2.0 Update r8a7795.dtsi so it corresponds to R-Car H3 ES2.0 or later: - The following devices no longer exist on ES2.0, and are thus removed: fcpf2, fcpvd3, fcpvi2, fdp1-2, usb3-if1, vspd3, vspi2. - The DU <-> VSPD topology is different on ES2.0, hence remove the "compatible" and "vsps" properties from the DU node until the driver can handle this. Move support for the ES1.x revision of the R-Car H3 SoC into a separate file. To avoid duplication, r8a7795-es1.dtsi includes r8a7795.dtsi, and adds device nodes and properties where needed. Note that while currently r8a7795-es1.dtsi only adds device nodes, removal of devices nodes and properties can be implemented using the /delete-node/ and /delete-property/ keywords, as shown below: &soc { /delete-node/ @; }; &